3859 Commits
Author SHA1 Message Date
Liu ed25199836 fix(pandagl): zero glyph bitmap metrics on init
pd_glyph_bitmap_init() only cleared the bitmap fields. When glyph rendering failed and fell back to .notdef, the cached bitmap kept uninitialised metrics, so pd_text_update_line_size() read garbage (valgrind: conditional jump on uninitialised value) and text widths became nondeterministic.
2026-11-19 22:38:10 +08:00
Liu 365c2034c9 docs: clarify commit scope rules 2026-11-19 22:15:56 +08:00
Liu cf7ec0c0ea fix: make window resize conversion explicit
ui_widget_resize() takes floats; passing int values triggered C4244 (int to float) on MSVC, which is fatal under /WX in CI.
2026-11-19 22:15:46 +08:00
Liu 464eed1402 build: centralize package versions and standardize on C11
versions.json is now the single source of truth; scripts/sync-versions.mjs keeps xmake descriptors, tracked version headers and package.json in sync. Sub-library versions are aligned with the published 1.0.0 packages. C11 is set at the project level, and _GNU_SOURCE is defined on POSIX so strict C11 still exposes clock_gettime, strdup and recursive pthread mutexes.
2026-11-19 22:03:59 +08:00
Liu 9f1cb8a6e1 test: stabilize layout tests for Linux font metrics
Use Linux-specific expected heights for Ubuntu Mono wrapping, relax the auto-size width bound, and fix selector/style leaks in the CSS text decoration tests.
2026-11-19 22:03:59 +08:00
Liu 0e0bf7b179 fix(ui): image listener removal should free list nodes
list_unlink() leaves the node allocated. Use list_delete_node() when removing listeners, and destroy listener nodes when the image source is destroyed.
2026-11-19 22:03:59 +08:00
Liu ac011085ec fix(ui): event initialization should clear uninitialized mouse data
Synthetic click events only set target/type/data, leaving mouse coordinates uninitialized. Zero the event before assigning fields so hit testing does not read undefined values.
2026-11-19 22:03:59 +08:00
Liu 1ae26cab65 fix(lcui_ui): window resize should update the bound content
Apply the logical size to the bound widget when the window is resized before the first frame, and reject binding after a window has been closed.
2026-11-19 22:03:59 +08:00
Liu 01b022bd4c fix(ptk): X11 window geometry should reflect requested values
Cache the requested client size and position immediately, emit a size event for unmapped windows, and close hidden windows without waiting for a window manager that may not exist. This keeps synchronous get_size/get_position and close callbacks correct under Xvfb and WSLg.
2026-11-19 22:03:59 +08:00
dependabot[bot] 7decb79323 build(deps): bump source-map-js from 1.2.1 to 1.2.2
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] 7af4d05f49 build(deps-dev): bump postcss-selector-parser from 6.1.4 to 6.1.6
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] 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 c4b9000d36 build: make static library merging opt-in
Keep the sub-library archives separate by default so add_deps() can export each library's own links for tests and development builds. The merge-archive option restores the self-contained lcui library for release/Debian builds, and CI enables it only after tests pass. yutil-tests also needs C11 for its u8 string literals.
2026-11-19 01:26:36 +08:00
Liu 2e58a3936d refactor(ctest): implement timing without yutil
ctest only used y_gettime() for the elapsed time report, which pulled the yutil static library and its private dependency ordering into every test target. Replace it with a local monotonic clock (clock_gettime on POSIX, GetTickCount on Windows) and drop the yutil dependency from ctest and ctest-tests.
2026-11-19 01:20:07 +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 a5444668ac test: unused helpers should be removed and footer initialized
Drop ad_count_children and count_by_type, which no longer have any callers, and initialize footer to NULL before scanning dialog children to silence GCC's -Wmaybe-uninitialized in release builds.
2026-11-19 01:19:58 +08:00
Liu ee6fc1956d fix(ui): debug log should not keep an unused style pointer
cs is only read by UI_DEBUG_MSG, and debug logging compiles the message away in release builds. Reference child->computed_style directly in the log arguments so GCC does not warn about an unused local.
2026-11-19 01:19:58 +08:00
Liu e92a4d3906 fix(css): property table coverage should compare int values
GCC reports -Werror=enum-compare because CSS_PROP_TABLE_COUNT is an anonymous enum while STYLE_KEY_TOTAL belongs to css_prop_key_t. Cast both operands to int so the compile-time coverage check also builds with GCC.
2026-11-19 01:19:58 +08:00
Liu 18b74cc9f1 fix(ui): make fit-content width and tooltip reveal deterministic
Initialize the fit-content width during CSS cascade instead of leaving a
stack-garbage value, and apply tooltip visibility in the reveal frame so the
behavior no longer depends on an extra layout pass.
2026-11-16 00:03:50 +08:00
Liu 86662849bd fix(ui): serialize image loading and start the loader after init
lcui_ui_init created the loader thread before ui_init() had created the image cache, list and mutex, so the thread could enter ui_load_images with uninitialized state (libpng reader crash in the background-style suite). Start the thread after ui_init and guard all image loader entry points with a mutex shared by the loader and UI threads.
2026-11-16 00:03:50 +08:00
Liu 6f3348cb07 fix(ui): refresh canvas box when overflow styles change
Box shadow and text decoration overflow grow the canvas box without changing the layout size, so ui_widget_update_box_size was skipped and the canvas box stayed stale. Recompute it after every style update.
2026-11-16 00:03:50 +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 2966495931 docs: redesign README 2026-11-16 00:03:49 +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 57272be8d1 ci(release): point the release glob at the binary archives 2026-11-15 23:40:45 +08:00
Liu 7278a9ad71 ci(release): publish lcui binary archives as release assets 2026-11-15 23:40:45 +08:00
Liu 2509f18459 build(lcui): ship sub-library headers and merge archives into lcui.lib 2026-11-15 23:40:44 +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 e35d8dcea9 docs: add dark theme design 2026-11-14 11:42:20 +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 855855263b feat(css): add align-self support for flex items
- register align-self and resolve auto against the container align-items
- apply per-item alignment to measuring, cross-axis layout and static positions
- align item media icons with the first title line
2026-11-14 00:31:15 +08:00
Liu 51706dbfb2 fix(widgets): fix password mask buffer overflow
- allocate room for the terminating wide character when masking text blocks
- add a regression that enables password masking before entering text
2026-11-14 00:31:05 +08:00
Liu cbf051e061 fix(ui): refresh status styles only for matched selectors
- skip style refreshes when no :hover/:active/:focus selector matches
- detect self and descendant status selectors separately before refresh
- preserve API text content across CSS content overrides and restore it on exit
- cover unmatched, matched and text-content status changes in integration tests
2026-11-13 22:18: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 1f46778893 fix(ui): stabilize layout measurement and style refresh
- restore intrinsic sizes before measuring flex and block children
- resolve percentage widths against indefinite parents as auto
- reflow parents when child content changes and refresh background geometry
- ignore hidden flex items in gap insertion and use spec static positions
- keep text paint size in sync with the current capture scale
2026-11-13 21:56:39 +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 6667d19e63 fix(widgets): invalidate portal scroll parents on destroy
Portal cached raw scroll area pointers and only skipped widgets whose state was UI_WIDGET_STATE_DELETED. ui_widget_destroy() frees immediately and never sets that state, so replacing the docs layout (locale switch) left dropdown portals pointing at a freed ScrollArea. Destroying the portal then called ui_widget_off() on freed memory.

Register a destroy listener on every bound scroll parent, clear the matching slot, and skip cleared slots while handling scroll events.
2026-11-08 14:58:53 +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 c85a1592b9 fix(widgets): center button text vertically 2026-11-08 00:20:46 +08:00
Liu 78b401c1b5 fix(router): reuse matched components on sibling navigation
- keep the mounted component when the matched component name is unchanged
- initialize matched_widget and add regression tests for nested layouts
2026-11-08 00:20:46 +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