88 Commits
Author SHA1 Message Date
Liu 429df6a39b chore(doc-viewer): regenerate the demo code snippets
- pick up the sidebar and input-group placeholder text changes
2026-11-22 20:11:24 +08:00
Liu 3270d8f34f fix(examples): make the fabric demo DPI-aware and fit the window
Run the simulation in a fixed 800x600 world and map it into the widget with an object-fit: contain viewport, so rendering and mouse hit testing share one transform. Derive the draw scale from the canvas buffer and content box because the global scale read in the timer callback does not match the buffer DPI. Let the canvas fill the window instead of a fixed size and keep the fabric world unchanged on resize.
2026-11-22 20:11:23 +08:00
Liu 747a222fcc feat(styles): follow the accent in focus rings and app fills
- generate focus box-shadow overrides from the accent primary color
- add the fill-primary class for app-level primary fills
- use it for the doc-viewer payout progress bar
2026-11-22 20:11:20 +08:00
Liu dc0ab38546 feat(styles): add switchable accent color themes
- generate an override stylesheet for each preset from style-nova
- add the ui_theme_* API, custom colors and single-slot loading
- persist the choice and add the navbar color picker
- keep badge variants, tooltip arrows and swatches consistent
2026-11-21 23:26:31 +08:00
Liu 2c4958b427 feat(doc-viewer): show repository icons, star counts and version badge
- add monochrome GitHub and Gitee assets with light/dark CSS backgrounds
- replace the GitHub text link with icon links for both repositories
- fetch and cache repository star counts at build time and render them
  beside the icons when available
- abbreviate counts of 1000 or more as `Nk` and separate the navbar
  actions with vertical dividers
- move the version number from the navbar to a badge below the Home title
- harden the star script for cold checkouts: root-relative paths, request
  timeouts, cache fallbacks and CI coverage
2026-11-21 20:53:30 +08:00
Liu 0b63de799f fix(doc-viewer): demo code tabs should show a visible hover background
- use a foreground overlay instead of `bg-muted`, which matched the code
  header background exactly
- add a pointer cursor to the clickable tabs
- add a regression test for light and dark hover
2026-11-21 18:53:16 +08:00
Liu 03aef4fed3 test: add context to spinner capture and gallery resize assertions
Spinner tolerances scale with the reference ink size, and gallery resize assertions include the requested width and column index so repeated loop iterations are distinguishable.
2026-11-21 14:45:31 +08:00
Liu ce47e50ed3 fix: keep example tests in the console subsystem on Windows
win.sdk.application was added globally in examples/xmake.lua, so doc-viewer-tests inherited the GUI subsystem and failed to link with WinMain. Scope the rule to the GUI example targets instead.
2026-11-19 22:39:49 +08:00
dependabot[bot] 867ee79a97 build(deps): bump source-map-js in /examples/doc-viewer
Bumps [source-map-js](https://github.com/7rulnik/source-map-js) from 1.2.1 to 1.2.2.
- [Release notes](https://github.com/7rulnik/source-map-js/releases)
- [Changelog](https://github.com/7rulnik/source-map-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/7rulnik/source-map-js/compare/v1.2.1...v1.2.2)

---
updated-dependencies:
- dependency-name: source-map-js
  dependency-version: 1.2.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-19 22:03:59 +08:00
dependabot[bot] 4d1f39cc73 build(deps-dev): bump postcss-selector-parser in /examples/doc-viewer
Bumps [postcss-selector-parser](https://github.com/postcss/postcss-selector-parser) from 6.1.4 to 6.1.6.
- [Release notes](https://github.com/postcss/postcss-selector-parser/releases)
- [Changelog](https://github.com/postcss/postcss-selector-parser/blob/6.1.6/CHANGELOG.md)
- [Commits](https://github.com/postcss/postcss-selector-parser/compare/6.1.4...6.1.6)

---
updated-dependencies:
- dependency-name: postcss-selector-parser
  dependency-version: 6.1.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-19 22:03:59 +08:00
dependabot[bot] fb4fe23a9e build(deps-dev): bump next from 16.4.2 to 16.4.6 in /examples/doc-viewer
Bumps [next](https://github.com/vercel/next.js) from 16.4.2 to 16.4.6.
- [Release notes](https://github.com/vercel/next.js/releases)
- [Commits](https://github.com/vercel/next.js/compare/v16.4.2...v16.4.6)

---
updated-dependencies:
- dependency-name: next
  dependency-version: 16.4.6
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-11-19 22:03:59 +08:00
Liu 75d26f05d0 test: move doc-viewer layout tests into the doc-viewer project
These layout tests need the generated global.css.h and the doc-viewer home-grid component, so they do not belong in the core lcui-tests binary. Move them to examples/doc-viewer/tests, keep their fixture with the tests, and generate the doc-viewer sources before running xmake test so a fresh checkout has global.css.h.
2026-11-19 01:19:59 +08:00
Liu 78ba539b36 build(doc-viewer): lcui packages should use their latest releases
Move @lcui/react to 0.7.0, @lcui/fluent-icons to 2.1.0 and add @lcui/tailwind-config 0.2.0 so lcui build can regenerate the doc-viewer sources from global.css. Refresh both bun.lock and package-lock.json.
2026-11-19 01:19:59 +08:00
Liu 093a6a1e35 feat: add explicit window lifecycle and per-window event routing
- add the window API and lifecycle design specs
- lcui_init no longer creates a window; settings loading is explicit
- add lcui_window_* create/bind/geometry/state/show/close api
- replace display modes with window options and quit-on-last-window
- add per-window event scopes and window-based pointer/keyboard routing
- keep pending updates for widgets appended during a frame
- migrate examples, tests, previews and internals docs
- remove default-scope focus and mouseover getters
2026-11-16 00:03:50 +08:00
Liu 17114108b7 refactor(styles): share the Tailwind config from @lcui/tailwind-config
- replace the duplicated design tokens, core plugin whitelist and shadow
  plugin with the shared package
- drop scripts/theme-colors.js and scripts/tailwind-shadow-plugin.js now
  that both configs consume the package
2026-11-15 23:40:46 +08:00
Liu c6496268c0 fix(doc-viewer): demo language tabs should not wrap onto two rows
- lay out the file and language tab groups as flex rows so width rounding
  cannot push TSX onto a second line after selecting XML
- let the file group shrink with min-width: 0
- add a demo header regression test for every language selection
2026-11-15 23:40:43 +08:00
Liu 9217b1ca3a feat(styles): add light and dark theme support
- share shadcn neutral color tokens between both Tailwind configs
- rewrite Tailwind dark selectors into LCUI-compatible descendant selectors
- theme style-nova components and doc-viewer surfaces for dark mode
- generate GitHub Light and GitHub Dark syntax line pairs for code blocks
- support alpha channels in text style tag colors
- keep focus rings and scrollbars visible on dark surfaces
- use a neutral code surface instead of GitHub's blue-tinted background
2026-11-15 23:40:42 +08:00
Liu 907123560a feat(widgets): add dropdown menu trigger width matching
- add a match-trigger-width attribute for portal menus
- size the opened content panel to the trigger border box
- use it for the home payout currency menu
2026-11-14 11:12:54 +08:00
Liu e87f0f1f06 feat(doc-viewer): localize and rebalance the home gallery
- add Chinese card copy with ¥ amounts and CNY as the default currency
- reorder the 4x2 card grid around Deployment, Distribute and Payout
- remove leftover item min-heights and fix title/media/action alignment
- compile generated UTF-8 page headers with MSVC /utf-8
2026-11-14 00:31:29 +08:00
Liu 3cce29caa4 fix(doc-viewer): rebuild responsive home gallery
- compose the home page from real card, field, attachment and empty widgets
- place gallery cards into responsive columns on first mount and route remount
- update the home layout on native window resizes and breakpoint changes
- refresh navbar, docs page containers and offscreen render helpers
- add gallery layout regressions for mounting, resizing, hover and icon sizing
2026-11-13 21:56:49 +08:00
Liu e857ce1245 feat(widgets): support multiline text input attribute
ui_textinput_enable_multiline() only toggled white-space; is_multiline_mode was never set, so newlines were still filtered and autosize stayed single-line. Set the flag and expose a declarative multiline attribute for textinput, with an integration test covering newline handling.
2026-11-08 17:06:45 +08:00
Liu 00d26db403 docs(doc-viewer): restore heading line height
text-* utilities also emit a paired line-height (text-4xl = 36px/40px) which overrode the semantic 1.4. Text baselines use the font ascent/descent, so the tighter leading clipped the descenders of single-line titles (about 3px at 150% scale on ButtonGroup).

Tailwind has no utility to unset the paired line-height, so append leading-[1.4] after text-* inside @apply; @apply preserves declaration order, so the later line-height wins. Note the rule in AGENTS.md.
2026-11-08 16:10:47 +08:00
Liu 6ee322d06c chore(doc-viewer): add offscreen render script 2026-11-08 14:59:11 +08:00
Liu cca280db23 docs(doc-viewer): update navbar style and icon 2026-11-08 00:22:44 +08:00
Liu 91444c60cd feat(widgets): add class based button styles 2026-11-08 00:20:47 +08:00
Liu 2d2816c222 docs(doc-viewer): default demos to the C variant
- sort demo variants as c > xml > tsx so the code panel matches the preview
- regenerate the demo previews for every docs page
2026-11-08 00:20:43 +08:00
Liu 718bd2d540 feat(doc-viewer): rebuild navigation and docs route
- split the root layout into navbar + docs shell with per-locale docs layouts
- serve docs pages under /{locale}/docs and add home/docs landing redirects
- rebuild the navbar with nova buttons, a language menu and a theme switch
- add the widgets index page and keep the sidebar in the docs layout
- include the nav/widgets-index design spec in docs/superpowers/specs/
2026-11-08 00:20:42 +08:00
Liu 029d5c4e22 feat(widgets): add button group widget
- add button-group, button-group-text and button-group-separator
  prototypes with orientation and separator APIs
- mark direct children as geometry items, keep select, popover and
  dropdown wrappers out of the border geometry and clean up on unlink
- theme the group for the nova style, covering nested groups, select,
  input group and first/last edge rules
- add integration tests for factories, marking, geometry, input flex
  and trigger wrappers
- add zh-CN documentation, field tables, sidebar entry and C/XML/TSX
  examples for every section
2026-11-08 00:20:39 +08:00
Liu a23c16f5c5 feat(widgets): add input group widget 2026-11-08 00:20:36 +08:00
Liu aeb805ca2f docs(doc-viewer): register shared demo snippets once 2026-11-08 00:20:34 +08:00
Liu 3dda91be11 feat(widgets): add accordion widget 2026-11-08 00:20:33 +08:00
Liu 263c62e531 feat(widgets): add breadcrumb widget
- add the breadcrumb family: root, list, item, link, page, separator, ellipsis
- build from a path with a per-call label provider, append_item/append, or explicit data-path items
- collapse overflowing items while keeping as many trailing nodes as fit; the ellipsis opens a Portal-based dropdown
- emit change with the clicked node key; pages, disabled items, and custom append content never emit
- add theme rules, integration tests, a preview scene, and zh-CN docs with C/XML/TSX demos
2026-11-08 00:20:26 +08:00
Liu f226404554 feat(widgets): add sidebar widget 2026-11-02 22:31:25 +08:00
Liu ba50322e22 feat(widgets): add dropdown menu widget 2026-11-02 22:31:24 +08:00
Liu 898a96cb8c feat(widgets): add collapsible widget 2026-11-02 22:31:23 +08:00
Liu 172b0c1908 docs(doc-viewer): add horizontal code scrolling 2026-11-02 22:31:21 +08:00
Liu 1dc63c68ee docs(doc-viewer): scroll long code blocks with line numbers 2026-11-02 22:31:19 +08:00
Liu 49e719995c feat(widgets): add attachment widget 2026-11-02 22:31:17 +08:00
Liu 860b1f1289 feat(widgets): add card widget 2026-11-02 22:31:16 +08:00
Liu ccad5ef131 feat(widgets): add toast widget 2026-11-02 22:31:15 +08:00
Liu 47014c5dbb feat(widgets): add popover widget 2026-10-28 23:40:31 +08:00
Liu 2ac38a6ca6 feat(widgets): add tooltip widget
Add Tooltip/TooltipTrigger/TooltipContent, data-tooltip attributes, Portal placement with border arrow, C attach helpers, docs, and tests.
2026-10-28 23:40:30 +08:00
Liu 16f5e91cb8 feat(widgets): update radio-group style 2026-10-18 15:42:34 +08:00
Liu e80b997c45 feat(widgets): update field style 2026-10-18 15:42:33 +08:00
Liu ad19263271 docs: update checkbox examples 2026-10-18 15:42:33 +08:00
Liu 1e48b886a0 feat(widgets): add progress label and value 2026-10-18 15:42:32 +08:00
Liu d329b1b874 docs: fix sidebar scroll 2026-10-18 15:42:31 +08:00
Liu a7a9f72c0c docs: update style
docs: update style
2026-10-18 15:42:31 +08:00
Liu ae5fc2ea75 docs: update AGENTS.md 2026-10-18 15:42:29 +08:00
Liu 19f52bfd2e docs: format examples 2026-10-18 15:42:26 +08:00