Files
Chris Tate 3e0602ad65 feat: add model-driven theme state
- Add the TypeScript themeState helper across checker, generated ABI, and UiApp runtime.
- Preserve system accessibility behavior while supporting model pack, scheme, and accent precedence.
- Document the API and migrate gpu-components with runtime and replay coverage.

Co-authored-by: MohakBajaj <77928693+MohakBajaj@users.noreply.github.com>
2026-08-17 07:32:35 -05:00
..
2026-08-17 07:32:35 -05:00
2026-08-17 07:32:35 -05:00
2026-08-17 07:32:35 -05:00

Native SDK gpu-components example

An isolated gallery of the built-in Native UI components, authored entirely in TypeScript + Native markup. There is no app-owned Zig: src/core.ts owns controlled state, src/app.native owns the component tree and specimens, and app.zon describes the desktop shell.

The left pane has live pack, System/Light/Dark scheme, and accent selectors backed by the TypeScript model and one themeState(model) helper. “Default” accent inherits the purple app.zon accent; Pink and Teal override it. The pane also contains a real disclosure tree whose rows use the built-in roving keyboard focus and scroll-into-view behavior. The right pane renders only the selected component. Accordion disclosure, dropdown/select/combobox menus, modal surfaces, fields, sliders, tabs, lists, and the focused Tree specimen are all interactive examples of the public markup API.

Run the app with the repository CLI:

native dev

Compile the TypeScript core, validate the markup contract, and run the generated headless app suite:

native test -Dplatform=null