121 Commits
Author SHA1 Message Date
Liu c09223932f docs: specify the CPU rendering benchmark 2026-11-24 21:03:46 +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 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 dbc3eaf20e docs: add the doc-viewer navbar icon and star design 2026-11-21 19:27:19 +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 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 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 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 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 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 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 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 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
Liu afdd175275 docs(specs): remove deferred notes 2026-11-02 22:31: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 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 3f94b84b2b docs: add specs 2026-10-18 15:42:29 +08:00
Liu 19f52bfd2e docs: format examples 2026-10-18 15:42:26 +08:00
Liu 323b641bbc feat(widgets): add groups, scrolling, alignment and checkmark to select 2026-10-18 15:42:25 +08:00
Liu a1078ff201 feat(widgets): add spinner and shimmer widgets 2026-10-18 15:42:23 +08:00
Liu 8876c70f93 feat(widgets): add dialog and alert-dialog widgets 2026-10-18 15:42:21 +08:00
Liu 20ac4484b9 feat(widgets): add empty widget 2026-10-18 15:42:19 +08:00
Liu a805852558 feat(widgets): add item widget 2026-10-18 15:42:18 +08:00
Liu b674004673 feat(widgets): add alert widget 2026-10-17 21:16:54 +08:00
Liu 6b7a4d41de feat(widgets): add badge widget 2026-10-17 21:16:53 +08:00
Liu 7154337944 feat(widgets): add button variants, sizes and themed styles with docs 2026-10-17 21:16:51 +08:00
Liu 92b46eee10 feat(widgets): add icon widget 2026-10-17 21:16:50 +08:00
Liu a1a0c2cebe docs: document supported cursor values and platform caveats 2026-10-17 21:16:45 +08:00