100 Commits
Author SHA1 Message Date
Liu 1b8c8ef6bd chore(release): 3.0.0-alpha.2 2026-11-24 22:01:30 +08:00
Liu b309800d3e build: allow release scope in commit message check
.npmrc uses chore(release): %s again, and the commit-msg hook accepts
"release" alongside lib/ directory names, styles and widgets.
2026-11-24 22:00:47 +08:00
Liu 08778d8bf6 fix(yutil): strlist_sorted_add should not leave a dangling list
realloc() may move the array before the duplicate check returns
early, leaving *strlist pointing at freed memory. Assign the new
pointer before inspecting entries.

Refs GHSA-v42w-m2h7-fm23.
2026-11-24 21:49:21 +08:00
Liu d57350e286 fix(ui-xml): resource node should reject missing type attribute
ui_builder_parse_resource_node() only rejected the case where both
type and src were absent, then passed a NULL type to strstr(). Require
type before dispatching on it, release attributes through the existing
exit path, and check src before loading a font.

Fixes GHSA-xr82-f9q8-h384.
2026-11-24 21:49:20 +08:00
Liu ec5cd503fa fix(css): oversized selectors should not overflow parser buffers
- Cap the token buffer position across chunked input so a selector
  spanning 511-byte reads cannot write past css_parser_t::buffer.
- Reject selector names longer than MAX_NAME_LEN in
  css_selector_create() instead of writing past name[].
- Bound selector name composition in css_selector_collect_name()
  with explicit length checks.
- Fix trim-left in css_parser_commit() reading buffer[pos] instead
  of buffer[i] and moving the wrong number of bytes.

Fixes GHSA-v42w-m2h7-fm23.
2026-11-24 21:24:49 +08:00
Liu c09223932f docs: specify the CPU rendering benchmark 2026-11-24 21:03:46 +08:00
Liu 3d97970efe ci: restrict commit scopes 2026-11-22 23:51:44 +08:00
Liu ced0bd2a52 ci: attach example archives to release assets 2026-11-22 22:14:30 +08:00
Liu 539e3b28a5 chore(release): 3.0.0-alpha.1 2026-11-22 21:59:41 +08:00
Liu cd987b81d0 chore(release): add npm version lifecycle script
- sync versions.json, xmake descriptors, generated headers and the CI TARGET_* values from the version npm just wrote
- generate the commit summary into CHANGELOG.md; human-readable notes are written manually on the Releases page
- drop CHANGELOG.zh-cn.md and the automatic release-notes step
- preserve CRLF in sync-versions so --check passes on Windows
2026-11-22 21:59:12 +08:00
Liu f0577b64ba ci: update GitHub Actions to Node 24 runtimes 2026-11-22 21:02:56 +08:00
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 5b18848ef9 fix(ui): size flex lines by content in fixed-size containers
- subtract the line content height, not the container text sizehint, when
  distributing cross-axis free space
- center icons correctly in text-based flex containers such as empty-media
- pin the empty-media icon to a 16px box
2026-11-22 20:11:23 +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 8948f14c9f docs(examples): remove the shadcn branding from the demos
- use username for the sidebar user menu
- use example.com/username in the input-group button placeholder
- apply the change to the C, XML and TSX variants
2026-11-22 20:11:22 +08:00
Liu b7a5779b61 fix(widgets): keep the sidebar footer menu in flow
- fill the provider height so the footer stays inside the sidebar
- overlay only action menus instead of every menu inside a menu item
- mark action menus with sidebar-menu-action-menu in the demos
- assert the project action layout still overlays its row
2026-11-22 20:11:22 +08:00
Liu 1a030c3a48 fix(styles): keep the focus ring out of grouped inputs
- reset the generic textinput ring on input-group children
- match the accent override specificity in both light and dark modes
- cover the grouped input reset with a test
2026-11-22 20:11:21 +08:00
Liu 63ed1be359 style: drop the pointer cursor from buttons and scrollbars
- keep the default cursor over buttons, select triggers and scrollbars
- update the cursor test for the new button default
2026-11-22 20:11:21 +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 90dbba2cdd feat(widgets): migrate textinput editing to the stb_textedit kernel
- vendor stb_textedit and add the textedit core with canonical text
- map edit indices to pd_text layout for caret, selection and hit testing
- support caret movement, selection, clipboard, undo/redo, password,
  read-only and multiline editing
- render selections with the accent color and configurable text color
- fix caret scaling, input-group repaint and zero-size reflow regressions
- add integration tests, a preview page and internals notes
2026-11-22 20:11:20 +08:00
Liu b0c031f8dc feat: add window icon support
- Add ptk_window_set_icons with Win32 WM_SETICON, X11 _NET_WM_ICON and fb no-op.

- Add LCUI window/default icon APIs, DPI-aware HICON selection and pre-rendered built-in icon assets.

- Add pandagl memory image readers and fix bilinear zoom edge sampling.

- Cover file/data icons, defaults and high-DPI sizes with integration tests.
2026-11-21 23:26:34 +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 64ea750885 feat(css): allow unloading style rules by source
- track rules by the source name passed to the loader
- add css_remove_style_rules() and ui_unload_css_string()
- refresh computed styles after removal and cover it with a test
2026-11-21 22:23:12 +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 331e07840a fix(styles): correct card action and title class selectors 2026-11-21 19:42:40 +08:00
Liu dbc3eaf20e docs: add the doc-viewer navbar icon and star design 2026-11-21 19:27:19 +08:00
Liu 83c1c6d07d feat(styles): add class variants for badge, alert, item and card 2026-11-21 19:22:43 +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 1a6c3100e2 fix(styles): dark button variants should stay flat
- reset the border color under `.dark` for the primary, ghost, destructive
  and link variants, so the base `.dark .button` border cannot outline them
- reset the link variant's hover and active background in dark mode
- add regression tests for the class-based variants
2026-11-21 17:19:03 +08:00
Liu a9d94e2188 fix(font): use the resolved family name for fontconfig aliases
lcui_fc_fonts_init used the candidate name for aliases. When fontconfig falls back (for example no Ubuntu Mono on CI), the alias pointed at a family that was never loaded, so monospace/sans-serif/serif resolved to -2 and text rendering was empty. Query FC_FAMILY and use the actual loaded family.
2026-11-21 15:58:53 +08:00
Liu e56cee573b test: list loaded font families in environment output 2026-11-21 15:58:53 +08:00
Liu a9de756541 test(css): identify properties and cursor values in assertions 2026-11-21 15:58:52 +08:00
Liu 5eb230e877 ci: run library test targets in separate steps 2026-11-21 15:42:48 +08:00
Liu cf111c4a90 test: print environment details before test suites
Log display backend, metrics, screen size, fontconfig matches and font ids once so CI failures can be compared against the local environment.
2026-11-21 15:13:53 +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 e26cd958a0 fix(ptk): emit window size event synchronously on Windows
Hidden windows may not receive WM_SIZE, so the gallery native resize tests saw stale root sizes. Emit PTK_EVENT_SIZE with the requested client size, matching the X11 backend.
2026-11-21 14:45:27 +08:00
Liu e50a5fa5fd test: use relative tolerances for text measurement tests
Shimmer allows a relative capture-width delta, the breadcrumb check asserts it stays within its parent, and assertion names include the property/value and measured metrics so CI failures show numbers instead of only true/false.
2026-11-21 14:26:38 +08:00
Liu 7c72628f23 fix(ui-server): apply window resize before the first frame
ui_server_on_window_resize() required INITIALIZED, but the doc-viewer tests resize a window before ui_server_update transitions PENDING to INITIALIZED, especially under Xvfb, so the resize was ignored. Update the widget whenever a connection exists.
2026-11-21 13:46:27 +08:00
Liu 279eacd3ad fix(css): report unsupported declarations at debug level
Tailwind-generated doc-viewer CSS contains standard values LCUI does not implement (fixed, sticky, grid, table, ...). Skipping them is expected fallback behavior, so log the property or value at debug level instead of error.
2026-11-21 13:42:01 +08:00
Liu 5460d5a733 fix(styles): remove unsupported letter-spacing from dropdown shortcut 2026-11-21 13:41:57 +08:00
Liu 4ab2de700a test: use tailwind-style labels in block and percentage wrap fixtures
Match the flex layout fixture: short utility-style labels keep example titles on one line and consistent across platform fonts.
2026-11-20 00:32:51 +08:00
Liu 64cfdc477c test: use tailwind-style labels in flex layout fixtures
Replace prose CSS declarations with short tailwind utility names so example titles stay on one line and remain readable at narrow widths.
2026-11-20 00:22:14 +08:00
Liu 7404070d5e fix(pandagl): release fontconfig global caches on shutdown
FcInitLoadConfigAndFonts() leaves fontconfig global configuration and caches allocated; FcConfigDestroy() only releases the per-call config. Call FcFini() when the font library is destroyed.
2026-11-20 00:15:26 +08:00
Liu 74255f501c test: shorten flex layout titles to avoid font-dependent wrapping
The example 10/12 titles were long enough to wrap at 320px, so their container height depended on the resolved monospace font. Use short tailwind-style labels, expect the single-line height, and drop the bundled DejaVu Sans Mono fixture.
2026-11-20 00:00:29 +08:00
Liu 4f83a1b2b0 test: pin layout fixtures to a bundled monospace font
The monospace alias resolved to Ubuntu Mono locally and a different font on CI runners, so the 320px flex wrapping expectations diverged. Bundle DejaVu Sans Mono under tests/fixtures/fonts, load it in the layout suites and point the monospace alias at it.
2026-11-19 23:51:09 +08:00
Liu 87d63f3c8a fix(ptk): keep cached window size in sync on Windows
ptk_window_set_size() only issued SetWindowPos(); the cached client size was updated later by WM_SIZE. Closing a window immediately after create/set_size saved the stale 320x240 size. Update the cache with the requested client size, matching the X11 backend.
2026-11-19 23:39:49 +08:00
Liu edf192475d test(css): identify properties in inheritance assertions
The shorthand and default-inheritance checks reused one fixed description inside loops, so the log showed identical lines with no property context. Include the selector and property name in each assertion name.
2026-11-19 23:38:27 +08:00
Liu 7449e6fb4a feat(pandagl): add quiet font loading for optional fonts
pd_font_try_load_file() reports failures at debug level so platform probes, test candidates and CSS @font-face no longer spam errors for missing system fonts. pd_font_load_file() and XML font resources still report errors, and initialization warns once when no usable default font exists.
2026-11-19 23:37:21 +08:00
Liu 7db080e684 test: use the logical monospace font in layout fixtures
Ubuntu Mono and Consola did not exist on Windows (Consola is a typo), so the fixtures fell back to Microsoft YaHei, a proportional font. Use the monospace alias so both platforms select their system monospace font, and unify the flex title height expectation now that Windows also wraps.
2026-11-19 22:49:34 +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
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 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 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
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 20b3221cfd fix(ui): stabilize flex layout and add layout contract tests
- merge own sizehint with child layout extent; keep sizehint callable
- support cross-axis auto margins and flex-basis content/percentage
- fix space-evenly gap, canvas destroy, breadcrumb intrinsic width and dynamic text intrinsic refresh
- add flex contract, sizehint, empty layout and field layout suites
- move empty/field scenarios to theme-independent test fixtures
- document layout coverage and known gaps
2026-11-08 00:20:31 +08:00
Liu a6584f5a95 docs(ui): update library list after helper merges
- remove libui-cursor, libui-router and libworker entries
- point lib/router to lib/router
- update architecture notes for the internal worker queue
2026-11-08 00:20:31 +08:00
Liu af3c76c239 fix(router): remove unused libui dependency 2026-11-08 00:20:30 +08:00
Liu c575d7fab5 refactor(worker): internalize worker task queue
- move the worker queue into src/lcui_worker.c
- expose only lcui_worker_* from <LCUI/worker.h>
- reuse the global async queue in anchor
- fix double unlock, active-state race and cancel target
- add worker integration tests
2026-11-08 00:20:29 +08:00
Liu ef42f0894c refactor(ui): move router widgets into core widgets
- move router-link and router-view into src/widgets
- add <LCUI/widgets/router.h> and aggregate it in widgets.h
- remove the libui-router target and package
2026-11-08 00:20:29 +08:00
Liu 7ecac3ae2b refactor(ui-server): merge ui-cursor into ui-server
- move cursor.c and ui_cursor.h into libui-server
- remove the libui-cursor target and package
- drop the unused ui.h and yutil dependencies
- declare libcss explicitly for ui-server
2026-11-08 00:20:28 +08:00
Liu 53bebe0905 docs: index LCUI internals in AGENTS and project docs
Move code-mechanism reference out of the lcui skill into docs/internals: overview, settings/headers, widgets/Portal/events, CSS, and the layout engine. Add docs/testing/layout-tests.md for the layout test conventions. AGENTS.md now indexes these documents and links each duplicated rule section to its detailed doc. Table display values are parsed but have no layout implementation on the current mainline.
2026-11-08 00:20:28 +08:00
Liu 22c883b79e fix(ui): wrap and stabilize flex column text layout
Persist parent width constraint (source + generation) and wrap text at it; six-pass flex layout with <=1 reflow per child; fit-content clamp for centered auto-width children; re-derive centered column cross width from constraint on standalone reflow; fixed-cross flex containers ignore child size hint. Record row main-axis allocation as a persisted constraint so a flex:1 child keeps its width across standalone reflow. Measure/layout phase split, measurement cache invalidation test, and sizehint capability flag so zero-size results are not mistaken for missing sizehints. Add layout engine rules doc and integration tests (wrap, empty, empty-basic, field-checkbox remount, empty media icon).
2026-11-08 00:20:27 +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