@zeyos/zx 5.4.0 → 5.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (145) hide show
  1. package/CHANGELOG.md +136 -0
  2. package/README.md +23 -16
  3. package/dist/types/components/agent-thread/agent-thread.d.ts +583 -0
  4. package/dist/types/components/app-sidebar/app-sidebar.d.ts +33 -0
  5. package/dist/types/components/approval-card/approval-card.d.ts +596 -0
  6. package/dist/types/components/avatar/avatar.d.ts +91 -4
  7. package/dist/types/components/badge/badge.d.ts +5 -4
  8. package/dist/types/components/block-view/block-view.d.ts +205 -0
  9. package/dist/types/components/composer/composer.d.ts +736 -0
  10. package/dist/types/components/datebox/date-range-box.d.ts +15 -2
  11. package/dist/types/components/datebox/datebox.d.ts +37 -3
  12. package/dist/types/components/kbd/kbd.d.ts +41 -0
  13. package/dist/types/components/launcher/launcher.d.ts +4 -2
  14. package/dist/types/components/prose/prose.d.ts +69 -0
  15. package/dist/types/components/questionnaire/questionnaire.d.ts +0 -36
  16. package/dist/types/components/run-status/run-status.d.ts +393 -0
  17. package/dist/types/components/run-trace/run-trace.d.ts +624 -0
  18. package/dist/types/components/source-list/source-list.d.ts +177 -0
  19. package/dist/types/components/stat-tile/stat-tile.d.ts +20 -0
  20. package/dist/types/components/tag-picker/tag-picker.d.ts +11 -5
  21. package/dist/types/components/tree/tree.d.ts +44 -3
  22. package/dist/types/core/icons.d.ts +22 -1
  23. package/dist/types/core/messages.d.ts +135 -0
  24. package/dist/types/index.d.ts +12 -2
  25. package/dist/types/internal/agent-model.d.ts +587 -0
  26. package/dist/types/internal/app-rail.d.ts +10 -3
  27. package/dist/types/internal/highlight.d.ts +24 -0
  28. package/dist/types/internal/presence-loop.d.ts +148 -0
  29. package/dist/types/internal/row-actions.d.ts +151 -0
  30. package/dist/zx-zeyos.esm.js +4852 -4535
  31. package/dist/zx-zeyos.esm.min.js +4 -4
  32. package/dist/zx.css +3152 -434
  33. package/dist/zx.esm.js +13730 -6595
  34. package/dist/zx.esm.min.js +27 -8
  35. package/dist/zx.global.js +13730 -6595
  36. package/dist/zx.global.min.js +27 -8
  37. package/dist/zx.min.css +1 -1
  38. package/docs/api.json +1474 -205
  39. package/docs/llms.md +698 -39
  40. package/docs/llms.txt +12 -1
  41. package/package.json +1 -1
  42. package/src/components/account-menu/account-menu.js +2 -2
  43. package/src/components/agent-thread/agent-thread.css +417 -0
  44. package/src/components/agent-thread/agent-thread.js +1365 -0
  45. package/src/components/app-rail/app-rail.css +11 -11
  46. package/src/components/app-sidebar/app-sidebar.css +90 -17
  47. package/src/components/app-sidebar/app-sidebar.js +120 -12
  48. package/src/components/approval-card/approval-card.css +289 -0
  49. package/src/components/approval-card/approval-card.js +1377 -0
  50. package/src/components/avatar/avatar.css +56 -1
  51. package/src/components/avatar/avatar.js +148 -26
  52. package/src/components/badge/badge.css +33 -20
  53. package/src/components/badge/badge.js +5 -4
  54. package/src/components/block-view/block-view.css +300 -0
  55. package/src/components/block-view/block-view.js +523 -0
  56. package/src/components/breadcrumb/breadcrumb.css +28 -3
  57. package/src/components/breadcrumb/breadcrumb.js +2 -2
  58. package/src/components/button/button.css +24 -13
  59. package/src/components/button/button.js +20 -2
  60. package/src/components/calendar/calendar.css +14 -4
  61. package/src/components/card-view/card-view.js +2 -2
  62. package/src/components/chart/chart.js +20 -5
  63. package/src/components/check-button/check-button.css +11 -3
  64. package/src/components/check-button/check-button.js +3 -3
  65. package/src/components/composer/composer.css +403 -0
  66. package/src/components/composer/composer.js +1441 -0
  67. package/src/components/context-menu/context-menu.css +7 -1
  68. package/src/components/date-picker/date-picker.css +6 -0
  69. package/src/components/date-picker/date-picker.js +5 -5
  70. package/src/components/date-picker/date-range-picker.css +6 -0
  71. package/src/components/date-picker/date-range-picker.js +3 -3
  72. package/src/components/date-picker/month-picker.js +3 -3
  73. package/src/components/date-picker/time-picker.css +6 -0
  74. package/src/components/datebox/date-range-box.js +30 -6
  75. package/src/components/datebox/datebox.js +44 -7
  76. package/src/components/dialog/dialog.css +0 -1
  77. package/src/components/dialog/dialog.js +2 -1
  78. package/src/components/dock/dock.js +2 -2
  79. package/src/components/dropdown/dropdown.css +2 -1
  80. package/src/components/entity-ref/entity-ref.css +8 -1
  81. package/src/components/file-item/file-item.css +1 -1
  82. package/src/components/finder/finder.js +2 -2
  83. package/src/components/groupbox/groupbox.js +2 -2
  84. package/src/components/kanban-view/kanban-view.css +8 -4
  85. package/src/components/kanban-view/kanban-view.js +3 -3
  86. package/src/components/kbd/kbd.css +64 -0
  87. package/src/components/kbd/kbd.js +121 -0
  88. package/src/components/launcher/launcher.css +30 -25
  89. package/src/components/launcher/launcher.js +15 -21
  90. package/src/components/list-toolbar/list-toolbar.css +7 -1
  91. package/src/components/menu-button/menu-button.css +9 -2
  92. package/src/components/message/message.js +2 -2
  93. package/src/components/module-bar/module-bar.css +11 -1
  94. package/src/components/multi-value-editor/multi-value-editor.js +4 -4
  95. package/src/components/navigation-bar/navigation-bar.css +3 -2
  96. package/src/components/pagination/pagination.js +2 -2
  97. package/src/components/panel/panel.js +2 -2
  98. package/src/components/prose/prose.css +53 -0
  99. package/src/components/prose/prose.js +152 -0
  100. package/src/components/questionnaire/questionnaire.css +7 -17
  101. package/src/components/questionnaire/questionnaire.js +16 -1
  102. package/src/components/rating/rating.css +3 -1
  103. package/src/components/run-status/run-status.css +208 -0
  104. package/src/components/run-status/run-status.js +782 -0
  105. package/src/components/run-trace/run-trace.css +443 -0
  106. package/src/components/run-trace/run-trace.js +1209 -0
  107. package/src/components/search/search.js +2 -2
  108. package/src/components/select/glyphs.js +3 -3
  109. package/src/components/select/select.css +35 -7
  110. package/src/components/select/select.js +4 -4
  111. package/src/components/source-list/source-list.css +208 -0
  112. package/src/components/source-list/source-list.js +355 -0
  113. package/src/components/stat-tile/stat-tile.css +56 -2
  114. package/src/components/stat-tile/stat-tile.js +25 -2
  115. package/src/components/stepper/stepper.css +2 -1
  116. package/src/components/stepper/stepper.js +3 -3
  117. package/src/components/tabbox/tabbox.css +2 -2
  118. package/src/components/tabbox/tabbox.js +2 -2
  119. package/src/components/table/table.css +52 -16
  120. package/src/components/table/table.js +7 -5
  121. package/src/components/tag-picker/tag-picker.css +56 -43
  122. package/src/components/tag-picker/tag-picker.js +21 -16
  123. package/src/components/tree/tree.css +44 -0
  124. package/src/components/tree/tree.js +97 -9
  125. package/src/components/value-list/value-list.css +25 -4
  126. package/src/components/value-list/value-list.js +2 -1
  127. package/src/components/view/record-view.js +3 -3
  128. package/src/components/view-settings/view-settings.css +2 -1
  129. package/src/components/workspace-switcher/workspace-switcher.js +3 -3
  130. package/src/core/icons.js +34 -3
  131. package/src/core/messages.js +143 -0
  132. package/src/elements/define.js +1 -0
  133. package/src/index.js +12 -2
  134. package/src/internal/agent-model.js +488 -0
  135. package/src/internal/app-rail.js +5 -1
  136. package/src/internal/highlight.js +104 -0
  137. package/src/internal/presence-loop.js +343 -0
  138. package/src/internal/row-actions.js +203 -0
  139. package/styles/base.css +26 -1
  140. package/styles/prose.css +306 -0
  141. package/styles/tokens/dark.css +97 -120
  142. package/styles/tokens/global.css +24 -9
  143. package/styles/tokens/semantic.css +464 -184
  144. package/styles/tokens/themes.css +9 -0
  145. package/styles/zx.css +10 -0
package/CHANGELOG.md CHANGED
@@ -8,6 +8,142 @@ and friends remain the complete record.
8
8
 
9
9
  ## Unreleased
10
10
 
11
+ ## 5.6.0 — 2026-11-03
12
+
13
+ Agents: a conversation with AI agents drawn from plain JSON — streamed answers, the steps a run
14
+ took, the approvals that hold it, the message box, and where the run stands — as library
15
+ components instead of layout code. The application owns the transport and the state; model text is
16
+ never HTML; whether an action needs confirmation is always the application's decision.
17
+
18
+ ### Added
19
+
20
+ - **AgentThread** — a conversation as an APG feed (PageDown/PageUp between items, Ctrl+End and
21
+ Ctrl+Home out of it): the person's messages, agents' answers as they stream, run traces,
22
+ approvals and one-line notices, from items `{id, type, author, …}` an agent can produce and an
23
+ application can store. `upsert()`, `patch()`, `appendText()` and `appendBlock()` feed it;
24
+ finished text is never redrawn. Answers carry sources, inline steps, versions with a pager, and
25
+ copy, regenerate, branch and rate actions; the person's messages can offer edit and copy;
26
+ notices can carry an action; any item can link to the application's records (`refs`, `open`
27
+ event); `@name` mentions are marked. One polite status says when an agent starts, answers, needs
28
+ approval or is stopped — streamed text is never read aloud as it arrives. While the reader is at
29
+ the end, new output keeps it in view; scrolled up, "Jump to latest" appears.
30
+ `AgentThread.register(type, render)` draws an application's own item types.
31
+ - **BlockView** / **`renderBlocks()`** — an answer drawn block by block inside `.zx-prose`:
32
+ paragraphs, headings, lists, quotes, code (coloured for js, ts, json, sql, python, shell and css;
33
+ `lines: true` numbers and wraps it), tables, figures, callouts and artifact cards. The inline
34
+ grammar is `**bold**`, `` `code` `` and `[n]` citations, nothing else. `appendText()` streams
35
+ into the last paragraph; a marker split across two chunks resolves when its close arrives.
36
+ `blocksToMarkdown()` and `blocksToText()` export an answer.
37
+ - **RunTrace** — what a run did: tool calls with their arguments and results, retries under the
38
+ call they repeat, hand-offs between agents, plan tasks, a person's requests and decisions,
39
+ per-step links, a live clock on the running step, and a one-line summary ("Worked for 41 s ·
40
+ 5 tool calls · 1 retry") that a plan can replace with its own title.
41
+ - **ApprovalCard** — a request that holds a run until a person answers: details and a preview,
42
+ Approve, Edit (a form from `fields`) and Reject (with a reason) on A, E and R while it has
43
+ focus, an optional typed confirmation, and an answered state that stays as the record. Only the
44
+ values the person changed are listed as edited; `update()` changes a waiting request in place.
45
+ - **SourceList** — the sources an answer cites, each with a card of its title, place and passage; a
46
+ source that names a tool call reveals it. Nothing remote is ever loaded to draw one.
47
+ - **Composer** — the message box: Enter or Mod+Enter sends, `@` mentions, `/` commands through the
48
+ Launcher, attachments by button, paste or drop, context chips, extra tool buttons (plain,
49
+ toggles or disclosures), a draft that survives a reload, and a Send button that becomes Stop
50
+ while the agent works. `update()` changes its label, placeholder, hint and note in place.
51
+ - **RunStatus** — where a run stands: state as glyph and word, a summary, a steps progressbar,
52
+ started / working time / waiting or blocked since / finished, and token and cost meters that warn
53
+ from 80% of a budget. `compact` draws the state alone as a pill for a narrow header.
54
+ - **Avatar** `activity` (idle, thinking, working, needs you, blocked, offline) — a dot that differs
55
+ in shape as well as tone, named in the accessible name — with `animate` joining one shared
56
+ presence animation that runs only on screen, sleeps while the page is hidden and rests under
57
+ reduced motion, and `phase` to keep two avatars of one agent out of step.
58
+ - The run states gain `blocked`; documentation gains an **Agents** chapter and component group.
59
+
60
+ ### Changed
61
+
62
+ - The **ai-chat**, **agent-chat** and **agent-workspace** layouts are built from these components,
63
+ so each is a reference for wiring them; their own stylesheets shrank from about 4,000 lines to
64
+ under 1,500.
65
+ - Documentation site: navigation levels are told apart by size, weight and colour together.
66
+
67
+ ## 5.5.0 — 2026-11-03
68
+
69
+ Calm and precise: a reading register beside the interface one, one row rhythm, navigation that
70
+ recedes, figures without boxes, one chip shape, keycaps everywhere, and colour overrides that reach
71
+ every theme region.
72
+
73
+ ### Added
74
+
75
+ - **Reading type.** `.zx-prose` sets authored content — a document, a record's notes, a message
76
+ body, an assistant's answer — in its own register: `--zx-font-prose`, `--zx-prose-size`,
77
+ `--zx-prose-leading` and `--zx-prose-measure`, so a product can set its documents in a serif
78
+ without touching a control. Headings, lists, quotes, code, marks, frameless tables and figures
79
+ are covered; `data-size="sm"` sets prose at the interface size and `data-zx-measure="full"` drops
80
+ the measure. `.zx-callout` sets a paragraph apart: neutral by default, `data-kind` for a status,
81
+ `data-tone` for a category. `proseAnchors(root)` adds a revealed copy-link to every heading with
82
+ an id.
83
+ - **`kbd()`** — keycaps for every shortcut hint, with platform glyphs for `Mod` and the named keys
84
+ (`keyLabels()` returns the labels without DOM). Button shortcuts, the Launcher's hints and the
85
+ Questionnaire's keys use it; menu shortcuts share its type.
86
+ - **Row rhythm and one type base.** `--zx-row-height` (36px by default) follows the control height,
87
+ and Table body rows are exactly that tall. `--zx-text-base` drives every `--zx-text-*` step, so
88
+ changing the base keeps the hierarchy; setting `--zx-text-md` alone still moves only the control
89
+ size.
90
+ - **Revealed affordances.** `data-zx-reveal-host` / `data-zx-reveal` show a secondary action while
91
+ its row is pointed at, focused, current, selected or has a menu open — keeping its space and its
92
+ tab order, and always visible on touch screens and under contrast preferences. TreeView
93
+ `rowActions(node)` and AppSidebar item `actions` build on it: up to two icon buttons per row, the
94
+ rest in an overflow menu, every label naming its row, the same actions in a context menu, and the
95
+ APG keyboard maps unchanged.
96
+ - **StatTile** `variant: 'plain'` (no frame or fill; the figure at the title weight in tabular
97
+ figures) and `emphasis` (one figure leads its row).
98
+ - **Datebox, DateTimeBox and DateRangeBox** take `displayFormat`, shown while the field is not
99
+ focused, so a screen reads one date format; `format` stays the typing format.
100
+ - **Named icon sizes** per role (`ICON_SIZE`) in the icon module; every chevron, dismiss and check in
101
+ the components uses them, and the text glyphs that stood in for icons are icons.
102
+ - New roles: `--zx-color-text-chrome` (navigation at rest, above 7:1 on the chrome),
103
+ `--zx-color-border-chrome` (the line where a chrome column meets the canvas: none in light, a
104
+ hairline in dark, under `prefers-contrast: more` and in forced colours), `--zx-radius-panel` (a
105
+ panel's corner, concentric with the rounded items it holds) and `--zx-weight-title`.
106
+ - Theme studio: text size moves the whole type scale; **Rows** (Compact, Default, Relaxed) and
107
+ **Reading** (typeface, size, measure) controls with a prose specimen; a **Paper** neutral tint
108
+ whose warmth reaches the page and tapers away in dark; and the **Folio** preset
109
+ (`data-zx-preset="folio"`): ink blue on paper with a serif for reading. Ocean takes compact rows.
110
+
111
+ ### Changed
112
+
113
+ - **Colour overrides on `:root` reach every theme region.** Every colour role is declared once on
114
+ `:root`, as `light-dark(<light>, <dark>)` where the themes differ, and a theme element sets only
115
+ `color-scheme`; an application's or the theme studio's override now reaches light, dark, auto and
116
+ nested regions alike. Browsers without `light-dark()` keep the per-theme blocks. Script that reads
117
+ a colour token as text receives the `light-dark()` expression — resolve it through a probe's
118
+ computed colour, as Chart now does. Rendering is unchanged.
119
+ - **Focus is one opaque 2px accent line** that reaches 3.5:1 or better on every surface and row,
120
+ for every preset and tint, in both themes.
121
+ - **State is never lost under the pointer:** selected, current and striped table rows, pressed
122
+ CheckButtons, the current navigation item and pressed list tools keep their fill on hover, and a
123
+ trigger stays pressed while its menu is open. Hover now shows in dark on default buttons and
124
+ CheckButtons.
125
+ - Menus, listboxes, the tag picker and the Launcher use the concentric panel corner (6px at the
126
+ default base); segmented thumbs are concentric with their tracks.
127
+ - Navigation labels rest one ink step under the content and come up to the full text colour on
128
+ hover, focus and when current. Breadcrumb ancestors shorten before the current page does.
129
+ - **One chip shape.** Badge takes its height from the row and keeps 12px text at both sizes; a
130
+ status is a pill with a 6px dot, a toned tag a small rectangle. TagPicker draws its tags with the
131
+ same construction (they now carry `zx-badge`). Chips use one fill and no border; their remove
132
+ buttons sit inset.
133
+ - Placeholder and border inks used as text or data marks (Stepper's "Optional", StatTile's
134
+ sparkline, Rating's empty stars, ViewSettings' lock, Select's neutral status icon) moved to the
135
+ muted and subtle text roles. Counts and badges use tabular figures; avatar stacks overlap less
136
+ and their overflow chip is opaque. In dark, a resting surface gets a lit top edge instead of a
137
+ shadow.
138
+ - Layouts: reading surfaces (wiki article, issue description, mail body, assistant answers, record
139
+ notes) use `.zx-prose`; property lists share one label column per inspector and one value edge;
140
+ header rules appear once content scrolls under them; record pages set their figures on the page.
141
+
142
+ ### Fixed
143
+
144
+ - FileItem's progress track used `--zx-radius-pill`, which nothing declares.
145
+ - The documentation site's header showed a stale version when served from source.
146
+
11
147
  ## 5.4.0 — 2026-10-29
12
148
 
13
149
  Glass rebuilt as a lit pane with a body under it, five more materials in the theme studio, and a
package/README.md CHANGED
@@ -95,7 +95,8 @@ ZeyOS binding — see `src/zeyos/modules.js`.
95
95
  | API | Description |
96
96
  | --- | --- |
97
97
  | `button()`, `buttonGroup()` | Styled native button and grouped-button factories. |
98
- | `badge()`, `badgeGroup()` | Status-pill factories with semantic kinds, variants, and sizes. |
98
+ | `badge()`, `badgeGroup()` | Status pills with semantic kinds, variants, and sizes; with a `tone`, a categorical tag. |
99
+ | `kbd()` | Keycaps for every shortcut hint, with platform glyphs for `Mod` and the named keys. |
99
100
  | `CheckButton` | Two-state pressed button with optional state-specific labels. |
100
101
  | `Toggle` | Native-button switch with a separate submitted value. |
101
102
  | `Search` | Search input with debounced input, submit, and clear events. |
@@ -108,7 +109,7 @@ ZeyOS binding — see `src/zeyos/modules.js`.
108
109
  | `DatePicker` | APG calendar grid with bounds, week numbers, and optional time selection. |
109
110
  | `MonthPicker` | Twelve-month grid with year navigation. |
110
111
  | `TimePicker` | Segmented local-time picker. |
111
- | `Datebox`, `DateTimeBox` | Formatted date input and its date-time factory variant. |
112
+ | `Datebox`, `DateTimeBox` | Formatted date input and its date-time factory variant; `displayFormat` shows a screen's own date format while the field is not focused. |
112
113
  | `DateRangePicker` | Two-month range calendar with presets, night bounds, and range preview. |
113
114
  | `DateRangeBox` | Formatted date-range input with an anchored range calendar. |
114
115
  | `Timebox` | Segmented signed or unsigned duration input. |
@@ -144,7 +145,7 @@ ZeyOS binding — see `src/zeyos/modules.js`.
144
145
  | `DataFilter` | Declarative select, text, and custom filters for client-side row sets. |
145
146
  | `FilterPanel` | Typed filter form built from a server's own field metadata, drafted then applied. |
146
147
  | `ListToolbar` | Search, result count, view switch, and badged tools above a record view. |
147
- | `TreeView` | APG tree with lazy children, filtering, and tri-state checkboxes. |
148
+ | `TreeView` | APG tree with lazy children, filtering, tri-state checkboxes, and hover-revealed `rowActions`. |
148
149
  | `Finder` | Miller-columns hierarchy browser with an optional preview pane. |
149
150
  | `Pagination` | Page, page-size, and load-more pager, with the pure `paginationRange()` helper. |
150
151
 
@@ -170,7 +171,7 @@ ZeyOS binding — see `src/zeyos/modules.js`.
170
171
  | `Avatar` | Fixed-size user image with initials fallback and optional presence. |
171
172
  | `Groupbox` | Collapsible section backed by native `<details>`. |
172
173
  | `Card` | Semantic content/record surface with media, native title link, actions, and footer. |
173
- | `StatTile`, `statTile()` | Labelled metric with optional delta, sparkline, and loading state. |
174
+ | `StatTile`, `statTile()` | Labelled metric with optional delta, sparkline, and loading state; `variant: 'plain'` sets the figure on the page, and `emphasis` lets one figure lead. |
174
175
  | `Aurora` | One- to four-colour ambient canvas light; chrome, raised content, and overlays respond through shared material tokens. |
175
176
  | `Launcher` | Cmd/Ctrl+K application and record launcher with ranked local items and abortable grouped sources. |
176
177
  | `Panel` | Framed, optionally collapsible section with a footer. |
@@ -286,14 +287,21 @@ region of it — override those tokens rather than switching a mode:
286
287
  }
287
288
  ```
288
289
 
290
+ Data rows follow the control height through `--zx-row-height` (36px by default), and type is one
291
+ base, `--zx-text-base` (14px), with every `--zx-text-*` step derived from it. Authored content —
292
+ a document, a record's notes, a message — takes a second, separate register: wrap it in
293
+ `.zx-prose` and it reads `--zx-font-prose`, `--zx-prose-size`, `--zx-prose-leading` and
294
+ `--zx-prose-measure`, so a product can set its documents in a serif without touching a control.
295
+ `.zx-callout` sets a paragraph apart, neutral unless it is a status or a category.
296
+
289
297
  A second attribute picks the **accent**, orthogonally to the theme:
290
298
 
291
299
  ```html
292
300
  <html data-zx-theme="dark" data-zx-preset="ocean">
293
301
  ```
294
302
 
295
- Six presets ship — `zx` (the ZeyOS green, and the default), `zeyos`, `ocean`, `violet`, `rose`,
296
- `slate`. Each is five declarations of the tier-1 accent ramp that the semantic tier resolves
303
+ Seven presets ship — `zx` (the ZeyOS green, and the default), `zeyos`, `ocean`, `violet`, `rose`,
304
+ `slate`, `folio`. Each is five declarations of the tier-1 accent ramp that the semantic tier resolves
297
305
  through, so a preset rethemes light, dark, and auto at once:
298
306
 
299
307
  ```css
@@ -320,18 +328,17 @@ brushed or glazed, no blur), or Flat. Each is a set of token overrides composed
320
328
  light and dark, and reduced-transparency, high-contrast and forced-colour settings restore solid
321
329
  surfaces on their own.
322
330
 
323
- Anything beyond the accent is a semantic token override, without reaching into component CSS:
331
+ Anything beyond the accent is a semantic token override, without reaching into component CSS.
332
+ Declare it once on `:root`, as `light-dark(<light>, <dark>)` where the two appearances differ: a
333
+ theme attribute only picks which half a region reads, so the override reaches light, dark, auto,
334
+ and nested regions alike, and the roles derived from it follow.
324
335
 
325
336
  ```css
326
- :root[data-zx-theme="acme"] {
327
- --zx-color-bg-page: #f4f1eb;
328
- --zx-color-bg-surface: #fffdf8;
329
- --zx-color-bg-control: #ffffff;
330
- --zx-color-border-control: #978e80;
331
- --zx-color-text: #26221d;
332
- --zx-color-text-muted: #655e54;
333
- --zx-color-accent: #176b52;
334
- --zx-color-on-accent: #ffffff;
337
+ :root {
338
+ --zx-color-bg-page: light-dark(#f4f1eb, #1a1815);
339
+ --zx-color-bg-surface: light-dark(#fffdf8, #22201c);
340
+ --zx-color-text: light-dark(#26221d, #ece6dc);
341
+ --zx-color-text-muted: light-dark(#655e54, #a89f92);
335
342
  }
336
343
  ```
337
344