@cueplusplus/ui 0.9.0 → 0.11.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 (330) hide show
  1. package/CHANGELOG.md +337 -0
  2. package/README.md +197 -9
  3. package/dist/chrome/index.d.ts +2 -1
  4. package/dist/chrome/index.js +3 -2
  5. package/dist/chrome/inspector.d.ts +61 -0
  6. package/dist/chrome/inspector.js +121 -0
  7. package/dist/forms/input.d.ts +12 -0
  8. package/dist/forms/textarea.d.ts +12 -0
  9. package/dist/forms/toggle.d.ts +6 -0
  10. package/dist/index.d.ts +7 -3
  11. package/dist/index.js +8 -3
  12. package/dist/instruments/code-block.d.ts +35 -0
  13. package/dist/instruments/code-block.js +173 -0
  14. package/dist/instruments/index.d.ts +2 -1
  15. package/dist/instruments/index.js +2 -1
  16. package/dist/instruments/meter.d.ts +5 -1
  17. package/dist/layout/bento.d.ts +144 -0
  18. package/dist/layout/bento.js +266 -0
  19. package/dist/layout/index.d.ts +4 -2
  20. package/dist/layout/index.js +4 -2
  21. package/dist/layout/preview.d.ts +110 -0
  22. package/dist/layout/preview.js +459 -0
  23. package/dist/primitives/button.d.ts +12 -0
  24. package/dist/primitives/chip.d.ts +1 -1
  25. package/dist/system/index.d.ts +2 -2
  26. package/dist/system/index.js +2 -1
  27. package/dist/system/overrides.d.ts +38 -1
  28. package/dist/system/overrides.js +40 -1
  29. package/manifest/components/accordion.json +24 -6
  30. package/manifest/components/activity-graph.json +20 -5
  31. package/manifest/components/agent-card.json +37 -9
  32. package/manifest/components/agent-handoff.json +21 -5
  33. package/manifest/components/agent-mode-badge.json +22 -4
  34. package/manifest/components/agent-pile.json +38 -8
  35. package/manifest/components/agent-plan.json +9 -2
  36. package/manifest/components/agent-status.json +17 -3
  37. package/manifest/components/agent-surface.json +26 -11
  38. package/manifest/components/alert-dialog.json +29 -5
  39. package/manifest/components/animated-number.json +14 -6
  40. package/manifest/components/app-bar.json +66 -13
  41. package/manifest/components/app-shell.json +133 -31
  42. package/manifest/components/app-window-frame.json +28 -6
  43. package/manifest/components/approval-card.json +37 -7
  44. package/manifest/components/artifact-card.json +16 -4
  45. package/manifest/components/ask-box.json +99 -21
  46. package/manifest/components/audience-icon.json +1 -7
  47. package/manifest/components/autocomplete.json +80 -18
  48. package/manifest/components/avatar-group.json +13 -2
  49. package/manifest/components/avatar.json +22 -4
  50. package/manifest/components/background-inbox.json +9 -2
  51. package/manifest/components/bento.json +306 -0
  52. package/manifest/components/branch-picker.json +29 -7
  53. package/manifest/components/breadcrumb.json +13 -3
  54. package/manifest/components/button-group.json +21 -4
  55. package/manifest/components/button.json +41 -4
  56. package/manifest/components/canvas-split-body.json +4 -1
  57. package/manifest/components/canvas-split-header.json +17 -4
  58. package/manifest/components/canvas-split-line.json +4 -1
  59. package/manifest/components/canvas-split-message.json +8 -1
  60. package/manifest/components/card.json +14 -3
  61. package/manifest/components/carousel.json +54 -12
  62. package/manifest/components/catalogue-icon.json +1 -7
  63. package/manifest/components/channel-beta-icon.json +1 -7
  64. package/manifest/components/channel-matrix.json +80 -15
  65. package/manifest/components/channel-released-icon.json +1 -7
  66. package/manifest/components/chart-container.json +26 -10
  67. package/manifest/components/chart-ramp.json +13 -3
  68. package/manifest/components/chart-swatch.json +9 -2
  69. package/manifest/components/chart-tooltip-content.json +31 -7
  70. package/manifest/components/chart.json +30 -6
  71. package/manifest/components/chat-panel-composer.json +9 -2
  72. package/manifest/components/checkbox-group.json +4 -2
  73. package/manifest/components/checkbox.json +17 -4
  74. package/manifest/components/checkpoint-history.json +13 -3
  75. package/manifest/components/chip.json +35 -5
  76. package/manifest/components/clamp.json +30 -7
  77. package/manifest/components/cli-tool-icon.json +1 -7
  78. package/manifest/components/code-block.json +106 -0
  79. package/manifest/components/code-diff.json +20 -5
  80. package/manifest/components/code-runner.json +32 -6
  81. package/manifest/components/collapsible.json +16 -4
  82. package/manifest/components/color-area.json +4 -1
  83. package/manifest/components/color-field.json +13 -3
  84. package/manifest/components/color-picker.json +75 -17
  85. package/manifest/components/color-slider.json +12 -3
  86. package/manifest/components/color-swatch.json +13 -2
  87. package/manifest/components/colors-section.json +8 -4
  88. package/manifest/components/combobox.json +81 -18
  89. package/manifest/components/command-palette.json +57 -13
  90. package/manifest/components/compaction-row.json +35 -7
  91. package/manifest/components/comparison-card.json +17 -4
  92. package/manifest/components/composer-attachment-chip.json +9 -2
  93. package/manifest/components/composer-bar.json +4 -1
  94. package/manifest/components/composer-command-item.json +8 -2
  95. package/manifest/components/composer-context.json +4 -1
  96. package/manifest/components/composer-input.json +5 -1
  97. package/manifest/components/composer-menu-item.json +4 -1
  98. package/manifest/components/composer-menu.json +12 -2
  99. package/manifest/components/composer-model-item.json +8 -2
  100. package/manifest/components/composer-model-trigger.json +8 -2
  101. package/manifest/components/composer-person-item.json +8 -2
  102. package/manifest/components/composer-send.json +8 -2
  103. package/manifest/components/composer-voice-button.json +4 -1
  104. package/manifest/components/composer-voice.json +8 -2
  105. package/manifest/components/composer.json +76 -17
  106. package/manifest/components/computer-use.json +17 -4
  107. package/manifest/components/confidence-marker.json +13 -3
  108. package/manifest/components/connection-state.json +23 -4
  109. package/manifest/components/container.json +14 -2
  110. package/manifest/components/context-breakdown.json +8 -2
  111. package/manifest/components/context-menu.json +16 -4
  112. package/manifest/components/context-usage.json +16 -4
  113. package/manifest/components/conversation-search.json +22 -5
  114. package/manifest/components/copy-button.json +32 -7
  115. package/manifest/components/cost-meter.json +12 -3
  116. package/manifest/components/cue-logotype.json +17 -3
  117. package/manifest/components/cue-mark.json +17 -3
  118. package/manifest/components/cue-portal-frame.json +13 -3
  119. package/manifest/components/data-row.json +21 -7
  120. package/manifest/components/data-table-pagination.json +18 -4
  121. package/manifest/components/data-table-toolbar.json +30 -7
  122. package/manifest/components/data-tree.json +42 -9
  123. package/manifest/components/date-field.json +13 -2
  124. package/manifest/components/date-picker.json +81 -19
  125. package/manifest/components/date-range-picker.json +81 -19
  126. package/manifest/components/day-separator.json +4 -1
  127. package/manifest/components/delegation-card.json +64 -12
  128. package/manifest/components/density.json +24 -4
  129. package/manifest/components/description-list.json +8 -1
  130. package/manifest/components/diagram.json +33 -7
  131. package/manifest/components/dialog.json +29 -6
  132. package/manifest/components/disclosure.json +31 -7
  133. package/manifest/components/dmx-bar.json +16 -4
  134. package/manifest/components/dmx-strip.json +20 -5
  135. package/manifest/components/document-reference.json +21 -5
  136. package/manifest/components/draft-restore.json +18 -4
  137. package/manifest/components/drawer.json +30 -6
  138. package/manifest/components/dropdown-menu.json +55 -10
  139. package/manifest/components/edit-message.json +32 -7
  140. package/manifest/components/elements-command-palette.json +27 -6
  141. package/manifest/components/elements-data-table.json +9 -2
  142. package/manifest/components/elements-timeline.json +8 -2
  143. package/manifest/components/elicitation-form.json +31 -6
  144. package/manifest/components/empty-state-composer.json +9 -2
  145. package/manifest/components/empty-state-suggestion.json +4 -1
  146. package/manifest/components/empty-state.json +25 -5
  147. package/manifest/components/end-of-turn-summary.json +16 -4
  148. package/manifest/components/env-var-input.json +54 -12
  149. package/manifest/components/error-state.json +17 -4
  150. package/manifest/components/export-dialog.json +27 -8
  151. package/manifest/components/eyebrow.json +4 -1
  152. package/manifest/components/feedback-dialog.json +33 -7
  153. package/manifest/components/field-description.json +4 -1
  154. package/manifest/components/field-error.json +13 -3
  155. package/manifest/components/field-label.json +4 -1
  156. package/manifest/components/field.json +4 -1
  157. package/manifest/components/file-tree.json +16 -4
  158. package/manifest/components/file-upload.json +58 -13
  159. package/manifest/components/flow-graph.json +12 -3
  160. package/manifest/components/folder-icon.json +1 -7
  161. package/manifest/components/footer.json +24 -4
  162. package/manifest/components/frac.json +10 -2
  163. package/manifest/components/generation-loader.json +17 -3
  164. package/manifest/components/generative-ui.json +39 -7
  165. package/manifest/components/grid.json +56 -5
  166. package/manifest/components/group-bar.json +25 -6
  167. package/manifest/components/guardrail-notice.json +22 -5
  168. package/manifest/components/hover-card.json +45 -8
  169. package/manifest/components/icon-button.json +22 -4
  170. package/manifest/components/image-generation.json +8 -2
  171. package/manifest/components/info-tip.json +42 -7
  172. package/manifest/components/inline-citation.json +14 -3
  173. package/manifest/components/input-group.json +24 -5
  174. package/manifest/components/input.json +33 -3
  175. package/manifest/components/inspector.json +199 -0
  176. package/manifest/components/item.json +42 -8
  177. package/manifest/components/job-progress.json +25 -6
  178. package/manifest/components/launcher-bubble.json +32 -7
  179. package/manifest/components/ledger.json +87 -19
  180. package/manifest/components/link.json +16 -3
  181. package/manifest/components/live-region-announcer.json +21 -5
  182. package/manifest/components/log-viewer.json +42 -10
  183. package/manifest/components/map-answer.json +17 -4
  184. package/manifest/components/markdown-text.json +36 -5
  185. package/manifest/components/math-block.json +12 -3
  186. package/manifest/components/mcp-server-icon.json +1 -7
  187. package/manifest/components/mcp-server-panel.json +18 -4
  188. package/manifest/components/memory-chips.json +9 -2
  189. package/manifest/components/menubar.json +33 -7
  190. package/manifest/components/message-actions.json +32 -7
  191. package/manifest/components/message-attachments.json +9 -2
  192. package/manifest/components/message-branches.json +14 -3
  193. package/manifest/components/message-list.json +27 -6
  194. package/manifest/components/message-pair.json +25 -5
  195. package/manifest/components/message-queue.json +13 -3
  196. package/manifest/components/message-timing.json +8 -2
  197. package/manifest/components/message.json +41 -9
  198. package/manifest/components/meter.json +43 -7
  199. package/manifest/components/mobile-composer.json +47 -10
  200. package/manifest/components/model-picker.json +13 -3
  201. package/manifest/components/multi-select.json +78 -17
  202. package/manifest/components/musical-time-input.json +34 -8
  203. package/manifest/components/navigation-menu.json +54 -12
  204. package/manifest/components/node-card.json +42 -7
  205. package/manifest/components/node-handle.json +17 -2
  206. package/manifest/components/number-field.json +28 -6
  207. package/manifest/components/number-ticker.json +8 -2
  208. package/manifest/components/onboarding.json +18 -4
  209. package/manifest/components/otp-field.json +43 -10
  210. package/manifest/components/page-shell.json +35 -6
  211. package/manifest/components/pagination.json +21 -5
  212. package/manifest/components/panel-header.json +15 -3
  213. package/manifest/components/password-input.json +58 -8
  214. package/manifest/components/permission-grant.json +28 -5
  215. package/manifest/components/permission-scopes.json +57 -12
  216. package/manifest/components/piano-keyboard.json +38 -9
  217. package/manifest/components/plussie.json +34 -5
  218. package/manifest/components/popover.json +45 -8
  219. package/manifest/components/preset-section.json +12 -5
  220. package/manifest/components/preview.json +202 -0
  221. package/manifest/components/progress.json +25 -6
  222. package/manifest/components/prompt-library.json +27 -6
  223. package/manifest/components/queue-dock.json +36 -8
  224. package/manifest/components/quota-banner.json +25 -6
  225. package/manifest/components/quote-reply.json +29 -7
  226. package/manifest/components/radio-group.json +12 -2
  227. package/manifest/components/radio.json +17 -3
  228. package/manifest/components/rating.json +60 -13
  229. package/manifest/components/read-aloud.json +35 -8
  230. package/manifest/components/reasoning-effort.json +17 -4
  231. package/manifest/components/reasoning-panel.json +33 -8
  232. package/manifest/components/recommendation-card.json +35 -10
  233. package/manifest/components/regenerate-menu.json +22 -5
  234. package/manifest/components/replay-player.json +29 -7
  235. package/manifest/components/research-report.json +12 -3
  236. package/manifest/components/resizable.json +4 -1
  237. package/manifest/components/retrieval-chunks.json +16 -4
  238. package/manifest/components/revert-dock.json +61 -14
  239. package/manifest/components/reviewable-diff.json +23 -5
  240. package/manifest/components/risk-badge.json +18 -3
  241. package/manifest/components/row.json +17 -4
  242. package/manifest/components/schedule-card.json +25 -6
  243. package/manifest/components/score-breakdown.json +20 -5
  244. package/manifest/components/scroll-anchor.json +13 -3
  245. package/manifest/components/scroll-area.json +31 -8
  246. package/manifest/components/scrollable-tabs-list.json +12 -4
  247. package/manifest/components/scrub-input.json +84 -18
  248. package/manifest/components/seam-cell.json +19 -3
  249. package/manifest/components/seam-grid.json +12 -3
  250. package/manifest/components/search-input.json +69 -10
  251. package/manifest/components/section-header.json +36 -8
  252. package/manifest/components/segmented-control.json +50 -11
  253. package/manifest/components/select.json +74 -16
  254. package/manifest/components/separator.json +4 -1
  255. package/manifest/components/settings-panel.json +41 -9
  256. package/manifest/components/shape-section.json +8 -4
  257. package/manifest/components/shared-conversation.json +21 -5
  258. package/manifest/components/sheet.json +29 -6
  259. package/manifest/components/shimmer-label.json +4 -2
  260. package/manifest/components/sidebar.json +60 -13
  261. package/manifest/components/skill-icon.json +1 -7
  262. package/manifest/components/slider.json +22 -5
  263. package/manifest/components/sources.json +17 -4
  264. package/manifest/components/sparkline.json +17 -4
  265. package/manifest/components/speaker-identity.json +4 -1
  266. package/manifest/components/spec-sheet.json +16 -4
  267. package/manifest/components/spectrum-visualizer.json +41 -10
  268. package/manifest/components/spinner.json +12 -2
  269. package/manifest/components/stack-icon.json +1 -7
  270. package/manifest/components/stack.json +54 -7
  271. package/manifest/components/stacks-matrix-icon.json +1 -7
  272. package/manifest/components/stat.json +28 -4
  273. package/manifest/components/status-bar.json +50 -9
  274. package/manifest/components/status-dot.json +23 -4
  275. package/manifest/components/stepper.json +22 -5
  276. package/manifest/components/stopped-run.json +19 -4
  277. package/manifest/components/streaming-text.json +12 -3
  278. package/manifest/components/subagent-list.json +21 -5
  279. package/manifest/components/suggestions.json +27 -5
  280. package/manifest/components/swap-label.json +18 -4
  281. package/manifest/components/switch.json +18 -3
  282. package/manifest/components/table-scroll-region.json +4 -1
  283. package/manifest/components/table.json +54 -11
  284. package/manifest/components/tabs.json +16 -5
  285. package/manifest/components/tags-input.json +79 -17
  286. package/manifest/components/tail-status.json +37 -8
  287. package/manifest/components/terminal-block.json +25 -5
  288. package/manifest/components/terminal-frame.json +34 -8
  289. package/manifest/components/textarea.json +28 -3
  290. package/manifest/components/theme-configurator.json +47 -11
  291. package/manifest/components/theme-provider.json +79 -15
  292. package/manifest/components/thinking-indicator.json +8 -2
  293. package/manifest/components/thread-list.json +13 -3
  294. package/manifest/components/thread-search.json +22 -5
  295. package/manifest/components/threshold-rail.json +77 -14
  296. package/manifest/components/time-boundary.json +8 -2
  297. package/manifest/components/time-field.json +13 -2
  298. package/manifest/components/timeline-ruler.json +51 -12
  299. package/manifest/components/timeline.json +19 -3
  300. package/manifest/components/title-bar.json +19 -4
  301. package/manifest/components/toast.json +12 -3
  302. package/manifest/components/todo-list.json +8 -2
  303. package/manifest/components/toggle-group.json +33 -7
  304. package/manifest/components/toggle.json +33 -4
  305. package/manifest/components/token-editor.json +26 -7
  306. package/manifest/components/tool-call-card.json +83 -16
  307. package/manifest/components/tool-call.json +37 -9
  308. package/manifest/components/tool-error.json +34 -8
  309. package/manifest/components/tool-group.json +17 -4
  310. package/manifest/components/tool-timeline.json +37 -9
  311. package/manifest/components/toolbar.json +37 -8
  312. package/manifest/components/tooltip.json +41 -7
  313. package/manifest/components/trace-waterfall.json +12 -3
  314. package/manifest/components/tree-visibility-toggle.json +18 -3
  315. package/manifest/components/tree.json +52 -11
  316. package/manifest/components/turn-footer.json +36 -8
  317. package/manifest/components/two-step-button.json +46 -9
  318. package/manifest/components/typing-indicator.json +8 -1
  319. package/manifest/components/universe-grid.json +37 -10
  320. package/manifest/components/unread-divider.json +4 -1
  321. package/manifest/components/usage-chart.json +46 -9
  322. package/manifest/components/verdict-row.json +20 -5
  323. package/manifest/components/voice-conversation.json +37 -7
  324. package/manifest/components/web-preview.json +23 -5
  325. package/manifest/components/web-search.json +20 -5
  326. package/manifest/components/work-collapse.json +30 -7
  327. package/manifest/fixtures.json +111 -0
  328. package/manifest/manifest.json +354 -297
  329. package/manifest/tokens.json +2 -2
  330. package/package.json +8 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,323 @@
1
1
  # @cueplusplus/ui
2
2
 
3
+ ## 0.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - 8a41dcb: Three new components — `Preview`, `Inspector` and `CodeBlock`, each also exported from the root
8
+ barrel — plus a layout fix to `Bento.Tile` and newly documented `aria-label` and `placeholder`
9
+ props on the text inputs and `Toggle`.
10
+
11
+ **Nothing to do: every addition is a new export, and nothing that already compiled changed.** The
12
+ snippets below are fragments; each component has a full, copy-paste quick start in the package
13
+ README (`node_modules/@cueplusplus/ui/README.md`).
14
+
15
+ **`Preview`** (`@cueplusplus/ui/layout`) frames one component: a stage that can carry its own
16
+ theme, a slot for tools at the top right, and a footer. `label` is required, because the frame is
17
+ a `role="group"` named by it.
18
+
19
+ ```tsx
20
+ import { Chip } from "@cueplusplus/ui";
21
+ import { Preview } from "@cueplusplus/ui/layout";
22
+
23
+ <Preview label="Chip preview" theme="terminal" density="compact" resizable>
24
+ <Chip tone="accent">Standby</Chip>
25
+ </Preview>;
26
+ ```
27
+
28
+ - **The stage is a theme island; the chrome is not.** `theme`, `mode`, `density` and `font` land
29
+ on the stage and nowhere else. `tools`, `footer`, the resize grips and anything they open stay in
30
+ the page's scope. With none of the four set, the stage carries no attribute at all and inherits
31
+ the page.
32
+ - **Naming a theme does not load it.** The stage is scoped with `[data-theme="<name>"]`, so that
33
+ theme's stylesheet (`@cueplusplus/theme-<name>/theme.css`) must already be on the page.
34
+ - A stage `mode` with no `theme` restates the page's theme beside it, and a stage `theme` with no
35
+ `mode` repeats the page's mode, because a theme's light block is one compound selector. A stage
36
+ `density` names the nearest theme, as `<Density>` does.
37
+ - Overlays opened on the stage follow its theme, mode and density. A font pairing stops at the
38
+ stage: portals keep the page's. A stage that sets `theme` or `mode` also keeps the page's
39
+ `ThemeProvider` `overrides` off those overlays, so a popover matches the stage it opened from.
40
+ Inside a stage whose `mode` is `"dark"` or `"light"`, `useTheme().resolvedMode` reports that
41
+ mode; with `"system"` it reports the page's.
42
+ - Changing `theme`, `mode`, `density` or `font` keeps the specimen mounted, so its uncontrolled
43
+ state — a typed value, an open disclosure — survives the switch.
44
+ - The specimen sits centred on a dot grid. One wider than the stage keeps its start edge in view
45
+ and the frame scrolls to the rest. The stage reserves a minimum height before its specimen
46
+ loads, and with no `footer` its bottom corners follow the frame's rounded border.
47
+ - **The tools never cover the specimen.** With `tools`, the stage reserves their corner: it pads
48
+ its top by the tools' whole depth, measured in the page's density where the tools are drawn,
49
+ so a stage given a `density` of its own still clears them. The stage reserves this space only
50
+ when `tools` is set; a Preview without tools draws exactly the same markup.
51
+
52
+ `resizable` makes the stage resizable by pointer and keyboard:
53
+
54
+ - `resizable` (`true`, or `{ axis, minWidth, maxWidth, minHeight, maxHeight }`) adds a grip on
55
+ each axis, within 160–1280 × 96–960 px by default; `axis: "x"` or `"y"` keeps one. Each edge grip
56
+ is a focusable `separator` valued in pixels: arrow keys step 8 px, Shift+arrow 64 px, and
57
+ Home/End jump to the bounds. A corner grip drags both axes with the pointer, a double-click
58
+ resets an axis (the corner resets both), and a `W × H` readout shows while dragging.
59
+ - A resizable Preview fills its container's width. Its width bound in force is the smaller of
60
+ `maxWidth` and the frame's own width, re-measured with a `ResizeObserver`, so it stays inside a
61
+ grid track as the viewport changes; a frame narrower than `minWidth` lowers the floor with it,
62
+ and a width a reader chose comes back when the track widens again. The height is bounded by
63
+ `maxHeight` alone, and a taller stage grows the frame.
64
+ - An axis nobody has resized follows the stage's natural size live — a specimen that grows after
65
+ it loads, a track that widens, a Preview mounted hidden and shown later — and is drawn within the
66
+ same bounds its grip announces, so the first key press or drag starts from what is on screen.
67
+ - Without `resizable` there are no grips, and nothing is measured or observed. `Preview` is a
68
+ client component (`"use client"`).
69
+
70
+ **`Inspector`** (`@cueplusplus/ui/chrome`) is the layout of a settings panel, a properties sidebar
71
+ or a wrench menu: titled sections of label-and-control rows, with a footer. The controls are the
72
+ library's own.
73
+
74
+ ```tsx
75
+ import { Inspector } from "@cueplusplus/ui/chrome";
76
+
77
+ <Inspector.Root>
78
+ <Inspector.Section label="Variants">
79
+ <Inspector.Row label="Size">
80
+ <SegmentedControl items={sizes} />
81
+ </Inspector.Row>
82
+ <Inspector.Row label="Label" htmlFor="label">
83
+ <Input id="label" />
84
+ </Inspector.Row>
85
+ </Inspector.Section>
86
+ <Inspector.Footer note="preset · primary" action={<Button>Reset</Button>} />
87
+ </Inspector.Root>;
88
+ ```
89
+
90
+ - `Inspector.Section` takes a `label`, drawn as a `SectionHeader` and used as the group's name.
91
+ - `Inspector.Row` is one column until the Inspector itself is 18rem wide, then label beside
92
+ control. It is a container query, so a row follows the width of the popover or sidebar it sits
93
+ in, not the viewport's.
94
+ - **How a row names its control.** With `htmlFor`, the label is a `<label>` for that id. Without
95
+ it, the row lays its `label` on the control as `aria-label`, but only when the control is a
96
+ single element not already named by `aria-label` or `aria-labelledby`; text, lists and fragments
97
+ are left as they are. The row has no role of its own and never names itself, so a
98
+ `SegmentedControl`, which is already a group, is not announced twice.
99
+ - `Inspector.Footer` puts a quiet `note` at the start and one `action` at the end. A lone `action`
100
+ still sits at the end edge.
101
+ - Static markup — no hooks, no `"use client"` — so a server component can render it.
102
+
103
+ **`CodeBlock`** (`@cueplusplus/ui/instruments`) is a block of code with a caption and a copy
104
+ button, and no syntax-highlighter palette.
105
+
106
+ ```tsx
107
+ import { CodeBlock } from "@cueplusplus/ui/instruments";
108
+
109
+ <CodeBlock
110
+ label="JSX"
111
+ language="jsx"
112
+ code={'<Button variant="primary">Take cue</Button>'}
113
+ />;
114
+ ```
115
+
116
+ - `code` is printed verbatim, and the copy button copies exactly that. `label` is the caption and
117
+ defaults to the language. `language` defaults to `"tsx"` and lands on the `<pre>` as
118
+ `data-language`.
119
+ - `language="jsx"` adds emphasis in three inks the theme already has: tag names in `--cue-fg`,
120
+ attribute names in `--cue-fg-muted`, punctuation in `--cue-fg-subtle`. It reads string literals
121
+ whole, so a brace or a `<` inside a quoted string does not break it, and a `{…}` expression child
122
+ stays plain. Every other language prints plain.
123
+ - No directive: the copy button is its only client code, so a server page can render the rest.
124
+
125
+ **Changes to existing components:**
126
+
127
+ - **`Bento.Tile`**: a long `eyebrow` now truncates on one line instead of running under the tile's
128
+ `meta` and `action` in a narrow track. This is the only runtime change to an existing component.
129
+ - **`Input`** (and with it `PasswordInput` and `SearchInput`) and **`Textarea`** now declare
130
+ `aria-label` and `placeholder` in their props, and **`Toggle`** declares `aria-label`. This is
131
+ documentation only: all of them were already accepted as inherited HTML attributes and forwarded
132
+ to the element, so nothing you pass behaves differently. They now have rows in the props table
133
+ and in the manifest.
134
+
135
+ **Manifest.** `manifest/manifest.json` indexes the three new components, and
136
+ `manifest/components/{preview,inspector,code-block}.json` are new. The records for `input`,
137
+ `password-input`, `search-input`, `textarea` and `toggle` were regenerated with their new rows.
138
+ `manifest/fixtures.json` gains `children.label` ("A short label"), a one-word text fixture for a
139
+ playground or propSet to pick by hand; no prop's `control.fixture` names it.
140
+
141
+ ### Patch Changes
142
+
143
+ - @cueplusplus/tokens@0.11.0
144
+
145
+ ## 0.10.0
146
+
147
+ ### Minor Changes
148
+
149
+ - ddce99e: `@cueplusplus/ui/layout` — and the root barrel with it — now exports `Bento`, a grid of unequal
150
+ tiles whose span is a prop on the tile rather than a class you count out on the container.
151
+
152
+ **Nothing to do: it is a new export, and nothing that already compiled changed.** Adopt it where
153
+ you were writing a bare grid and hand-counting `col-span-*`:
154
+
155
+ ```tsx
156
+ import { Bento } from "@cueplusplus/ui/layout";
157
+
158
+ <Bento.Root cols={3} rows={2} gap={5}>
159
+ <Bento.Tile span={2} rowSpan={2} minHeight="hero" title="Kitchen sink">
160
+ Every component, on one page.
161
+ </Bento.Tile>
162
+ <Bento.Tile href="/docs/components" title="Components">
163
+ Props, variants and a live example.
164
+ </Bento.Tile>
165
+ </Bento.Root>;
166
+ ```
167
+
168
+ `Bento.Root` takes `cols` (2, 3 or 4; defaults to 3), `rows` (1–4), `dense`, and a `gap` off the
169
+ density space ladder (defaults to `4`). `Bento.Tile` takes a `span` (1–4) and a `rowSpan` (1–2)
170
+ from closed sets, plus `minHeight`, `eyebrow`, `title` and `meta`. The container clamps every span
171
+ to its own tracks on the way past — the columns always, and the rows wherever it declared any. The
172
+ column clamp is per breakpoint, because every bento is two tracks wide between 640 px and 1024 px
173
+ whatever it was asked for, and CSS Grid answers an over-wide span by growing an implicit track
174
+ rather than by refusing it.
175
+
176
+ Two things a props table cannot show you, both of them compile-time where a compiler can reach:
177
+
178
+ - **A tile is one thing or the other, in the type.** Either a **link** — `href`, optionally with
179
+ `render`, a router's own element which is cloned, keeps its own `href` because `next/link`
180
+ requires it to declare one, and has its `className` merged with the tile's rather than replaced
181
+ — whose whole surface is a single `<a>` and whose content is therefore static. Or a **panel**,
182
+ whose children may be live and whose link or control is a visible sibling in `action`. `href`
183
+ and `action` are mutually exclusive in the type, and a dev-time `console.error` names any tile
184
+ that puts an interactive child inside an anchor.
185
+ - **Static markup throughout** — no hooks and no `"use client"` — so a server component can draw a
186
+ bento without opening a client boundary. That is why the router escape hatch is an element to
187
+ clone rather than a render function: a directive is per module, and the hook that reads a render
188
+ function is a hook.
189
+
190
+ `manifest/manifest.json` and the new `manifest/components/bento.json` were regenerated with it.
191
+
192
+ - 16d2cae: `@cueplusplus/ui/system` now exports `isSafeTokenValue(value: string): boolean` — whether a string
193
+ may be written into the density stylesheet `ThemeProvider` builds from its `overrides` prop.
194
+
195
+ **Nothing to do.** Nothing about that stylesheet changed: this is the rule `overridesCss()` has
196
+ always applied, exported. Adopt it if you assemble a `TokenOverrides` out of anything a person or
197
+ an API supplies, so a value is refused at your own input rather than discovered from a
198
+ `console.warn` one render later, with half of what you built never having reached the sheet:
199
+
200
+ ```ts
201
+ import {
202
+ isSafeTokenValue,
203
+ type TokenOverrides,
204
+ } from "@cueplusplus/ui/system";
205
+
206
+ isSafeTokenValue("Iosevka, monospace"); // → true
207
+ isSafeTokenValue("red;}"); // → false
208
+ ```
209
+
210
+ It lands against `./system`'s standing policy — that the prop's _shape_ is public while
211
+ `inlineOverrides()`, `overridesCss()` and `OverridesContext` stay internal, because a consumer
212
+ reaching for those would be writing the custom properties by hand — and it lands on the right side
213
+ of it: a _writer_ of custom properties is what the policy excludes, and a _reader_ that refuses a
214
+ value before it is ever written is the opposite of one. `@cueplusplus/ui/configurator`'s
215
+ `isSafeCssValue` is unchanged and unmoved; it is the same rule behind a subpath that also carries
216
+ `ThemeConfigurator`, `ExportDialog` and an optional `react-aria-components` peer, and a caller
217
+ that only wants the question answered should not have to take that graph to ask it.
218
+
219
+ - 88cf751: The component manifest's `schemaVersion` is now `2`, and every `PropDoc` in it — root props and
220
+ every compound part's props alike — carries a required `control`: `{ kind, members?, min?, max?,
221
+ nullable?, fixture? }`, where `kind` is one of `boolean`, `enum`, `number`, `string`, `node`,
222
+ `callback`, `array`, `object` or `opaque`. It answers the question `type` never could: _what edits
223
+ this prop_.
224
+
225
+ **What a reader of `manifest.json` must change: the version pin, and nothing else.** A consumer
226
+ that asserts `schemaVersion === 1` will reject every document this release publishes and has to
227
+ move to `2`; a consumer that ignores the field keeps working once the pin moves. Both published
228
+ manifests (`manifest/manifest.json` and every document under `manifest/components/`) were
229
+ regenerated, as was `manifest/tokens.json`, whose `schemaVersion` moves with them — so all three
230
+ have to be read at the same version.
231
+
232
+ A `variant` prop's `members` are its `cva` recipe's, in the recipe's order; a numeric literal union
233
+ carries its own `min`/`max`, and a prop whose JSDoc states a range with `@min`/`@max` carries that;
234
+ a union with an explicit `| null` is `nullable`.
235
+
236
+ ## Migrating
237
+ - **`type` is unchanged.** It still prints the TypeScript type verbatim, literal unions included,
238
+ and it is still the field to render when a reader wants to know what a prop _is_. `control` is a
239
+ new field beside it, not a replacement for it: nothing was renamed and nothing was removed.
240
+ - **A consumer pinned to `schemaVersion === 1` must move to `2`.** The number changed because
241
+ `control` is _required_: a consumer that reads it needs to know whether the document it fetched
242
+ has one, and an optional field could never tell it — absent would mean both "no control" and
243
+ "an older manifest". A consumer that ignores the field keeps working after changing the pin.
244
+
245
+ ### Patch Changes
246
+
247
+ - c469f49: `Button` now **declares** `children` in `ButtonProps`, so the published manifest documents it and
248
+ the props table has a row for it.
249
+
250
+ **Nothing to do.** The component did not change — it has always taken children, through
251
+ `React.ComponentPropsWithoutRef<"button">`. What changed is what the package says about itself:
252
+ docgen documents a prop only where the library declares it, so the system's most used control
253
+ published no `children` at all. The page did not list it, and a propSet could not name it, which
254
+ is how `/play/button` came to preview an unlabelled `<button>` behind a standing accessibility
255
+ exemption. Declaring it is what lets that exemption expire.
256
+
257
+ If you read `manifest/components/button.json` to generate code or to drive a playground,
258
+ `children` is now in `props` and can be set like any other prop.
259
+
260
+ - 481e8c5: `manifest/components/ledger.json` said `Ledger` could not fold. It can, and the note now says so.
261
+
262
+ **Nothing to do unless you read the manifest.** No API changed, no component moved, and nothing
263
+ you have written needs editing. The documentation that ships inside the package described the
264
+ plain bench as having "no disclosure anywhere — the ledger does not collapse", which was true
265
+ before 0.8.0 and false in it: `collapsible` puts a real
266
+ `button[aria-expanded aria-controls]` inside the `h2`/`h3` and folds the run of rows below it.
267
+
268
+ The corrected note says what shipped — folding is opt-in per heading, and a ledger nobody asks to
269
+ fold still emits no control and no expansion state at all. The manifest is the only published
270
+ surface this touches.
271
+
272
+ - 64b4bab: Every package manifest's `repository` field now names `cueplusplus/cue-ui`, following the
273
+ repository's rename from an earlier working title.
274
+
275
+ **Nothing to do.** No code, no exports, no types, and no package name: the scope is the
276
+ organisation, not the repository, so every specifier you already import is the one you keep
277
+ importing. What moves is metadata — GitHub Packages matches a package to a repository through that
278
+ field, so from this release the "source" link on each package's registry page, and the repository
279
+ the next publish is attributed to, name `cue-ui`. The `directory` beside it is unchanged, so each
280
+ link still lands on that package rather than on the monorepo root.
281
+
282
+ If you have a bookmark or a script pointing at the old URL, GitHub's rename redirect answers it;
283
+ updating it to `https://github.com/cueplusplus/cue-ui` is tidiness rather than repair.
284
+
285
+ - 3471a15: `tokensUsed` in the published component manifest is now scanned from code rather than from bytes,
286
+ so it stops attributing tokens to components that never resolve them.
287
+
288
+ **What to do: re-read the manifest before you trust a `tokensUsed` list you cached.** No API
289
+ changed and nothing you render moves, but the manifest says something different about 48 of 321
290
+ components, and the old answer was padded — in thirteen cases wholly wrong. If you read
291
+ `tokensUsed` to decide which tokens to define when restyling a component, the list you had was
292
+ too wide. It is narrower now, and true.
293
+
294
+ The scanner matched `--cue-*` anywhere in a file's text, comments included. A docblock sentence
295
+ naming a token published it as one the component uses, and a sentence arguing _against_ one
296
+ published the opposite of what it said: `forms/_chassis.ts` explains that the ring reads
297
+ `--cue-focus`, **not** `--cue-accent`, and eleven controls on that chassis published
298
+ `--cue-accent` because of it.
299
+
300
+ What moved, exactly:
301
+
302
+ - **Thirty-four components lose one to four tokens they never painted.**
303
+ - **Thirteen now correctly publish none** — `agent-surface`, `animated-number`,
304
+ `chart-container` and the ten container icons — because their lists were comment-derived in
305
+ their entirety: they paint through classes rather than resolving custom properties by name, and
306
+ the ten icons render no `className` at all. An empty array renders as no Tokens section rather
307
+ than an empty one, which is what the four components that already shipped one do.
308
+ - **One gains four.** `MarkdownText` painted `--cue-accent`, `--cue-fg`, `--cue-fg-muted` and
309
+ `--cue-fg-subtle` and published none of them: the literal pass pairs quotes across the whole
310
+ file, and the apostrophes in that file's prose desynced the pairing so the class strings below
311
+ were read as the insides of strings. Blanking the comments re-pairs them.
312
+ - **Two entries that were never tokens are gone**, `--cue-icon-` and `--cue-space-`: the regex had
313
+ been stopping at the `*` in `--cue-icon-*` and the `$` in `gap-(--cue-space-${n})`.
314
+
315
+ - Updated dependencies [64b4bab]
316
+ - Updated dependencies [362cdda]
317
+ - Updated dependencies [c2238cc]
318
+ - @cueplusplus/tokens@0.10.0
319
+ - @cueplusplus/theme-base@1.0.1
320
+
3
321
  ## 0.9.0
4
322
 
5
323
  ### Minor Changes
@@ -289,6 +607,25 @@
289
607
 
290
608
  ### Patch Changes
291
609
 
610
+ - edb938d: `Table.Row interactive` draws a focus ring. The prop supplied the
611
+ pointer half — the row-hover wash and a pointer cursor — and nothing for
612
+ focus, while the row-activation reading above tells a caller to put `tabIndex`
613
+ on the `<tr>` so `activateRowFromKeyDown` has something to fire on. The two
614
+ together made a row a keyboard user could reach and activate with nothing on
615
+ screen changing. **This is a WCAG 2.4.7 (Focus Visible, AA) fix you inherit by
616
+ upgrading.**
617
+
618
+ The ring is the one `Row` already draws: 2px solid in `--cue-accent`, pulled
619
+ inside the row by `-outline-offset-2` rather than floating outside it, because
620
+ these tables live in clipped panes and scroll regions where an outset ring on
621
+ the first or last row is cut off by the pane's own rim. It is `focus-visible`,
622
+ so a pointer press still paints nothing, and it rides on `interactive` alone:
623
+ a static table of figures is untouched. Nothing to change — and if you drew a
624
+ ring of your own on a focusable row, the library's is now under it.
625
+
626
+ Added after the fact: this shipped in 0.7.0 with no changeset, and a late entry
627
+ beats a hole in the record.
628
+
292
629
  - @cueplusplus/tokens@0.7.0
293
630
 
294
631
  ## 0.6.0
package/README.md CHANGED
@@ -3,11 +3,45 @@
3
3
  Components for console software: dense, keyboard-first interfaces where a screen is mostly data.
4
4
  Base UI underneath for behaviour and accessibility, Tailwind v4 on top for the paint.
5
5
 
6
+ ## Install
7
+
8
+ The `@cueplusplus` scope is served by **GitHub Packages**, not npmjs.com, and GitHub Packages
9
+ authenticates *every* install. That is two settings, in two places, and the split is not
10
+ cosmetic — pnpm ignores an env-expanded credential in a project `.npmrc` and the install fails
11
+ with `401`.
12
+
13
+ Commit the scope routing, and nothing else, at the root of your project:
14
+
15
+ ```ini
16
+ # .npmrc
17
+ @cueplusplus:registry=https://npm.pkg.github.com
18
+ ```
19
+
20
+ Then write the credential once, at the **user** level, where pnpm reads it from. It is a
21
+ **classic** personal access token with `read:packages` — GitHub Packages accepts neither
22
+ fine-grained PATs nor OIDC:
23
+
24
+ ```sh
25
+ pnpm config set //npm.pkg.github.com/:_authToken ghp_…
26
+ ```
27
+
6
28
  ```sh
7
29
  pnpm add @cueplusplus/ui @cueplusplus/tokens @cueplusplus/theme-cue @base-ui/react
8
30
  ```
9
31
 
32
+ Three peers are required and declared: `react` ^19, `react-dom` ^19 and `@base-ui/react` ^1.7.
33
+ `tailwindcss` ^4 is a declared peer too, but an optional one — needed for the default styling
34
+ lane, and without it you own the CSS. Every other peer is optional and scoped to a subpath.
35
+ `@cueplusplus/tokens` arrives as a dependency; installing it by name just makes the token
36
+ constants importable in your own code. The theme package is not a peer at all — see below.
37
+
38
+ CI, Vercel and the token's expiry are in
39
+ [`docs/CONSUMING.md` §1](https://github.com/cueplusplus/cue-ui/blob/main/docs/CONSUMING.md#1-registry-access).
40
+
41
+ ## Quick start
42
+
10
43
  ```css
44
+ /* app/globals.css */
11
45
  @import "tailwindcss";
12
46
  @import "@cueplusplus/ui/styles.css";
13
47
  @import "@cueplusplus/theme-cue/theme.css";
@@ -15,11 +49,16 @@ pnpm add @cueplusplus/ui @cueplusplus/tokens @cueplusplus/theme-cue @base-ui/rea
15
49
 
16
50
  ```tsx
17
51
  import cue from "@cueplusplus/theme-cue";
52
+ import { Button } from "@cueplusplus/ui";
18
53
  import { ThemeProvider } from "@cueplusplus/ui/system";
19
54
 
20
- <ThemeProvider themes={[cue]} theme="cue" density="compact" mode="system">
21
- <App />
22
- </ThemeProvider>;
55
+ export default function App() {
56
+ return (
57
+ <ThemeProvider themes={[cue]} theme="cue" density="compact" mode="system">
58
+ <Button variant="primary">Run cue</Button>
59
+ </ThemeProvider>
60
+ );
61
+ }
23
62
  ```
24
63
 
25
64
  The order of those three `@import`s is load-bearing, and the `themes` prop is not optional in
@@ -27,23 +66,172 @@ practice: this library contains no palette. Install and register a `@cueplusplus
27
66
  or every surface paints `@cueplusplus/theme-base`'s blank base — greys, one desaturated accent,
28
67
  the platform monospace — with nothing erroring to tell you.
29
68
 
69
+ To stop the defaults flashing on first paint, add `prepaintScript()` beside the provider and hand
70
+ both the same array — [§4 of `CONSUMING.md`](https://github.com/cueplusplus/cue-ui/blob/main/docs/CONSUMING.md#4-the-provider)
71
+ is the whole layout.
72
+
73
+ ## What it ships
74
+
30
75
  Common components come from the root entry. Groups that need an optional peer have a subpath of
31
- their own (`/charts`, `/date`, `/flow`, `/color`, `/agent-runtime`, and the rest), so importing a
32
- button never pulls a charting library into your bundle.
76
+ their own, so importing a button never pulls a charting library into your bundle.
77
+
78
+ | Import specifier | What is in it |
79
+ | --- | --- |
80
+ | `@cueplusplus/ui` | the root barrel: every component that costs no optional peer, the brand marks and the container icons included |
81
+ | `@cueplusplus/ui/primitives` | the leaves: buttons, chips, avatars, dots and the two loading shapes |
82
+ | `@cueplusplus/ui/forms` | everything a user types into, toggles, picks from or drags |
83
+ | `@cueplusplus/ui/overlays` | everything that floats: dialogs, sheets, menus, tooltips, the command palette |
84
+ | `@cueplusplus/ui/chrome` | console furniture: panels, rows, bars, tabs, the tree outline and the `Inspector` layout |
85
+ | `@cueplusplus/ui/layout` | page structure: cards, stacks, grids, `Bento`, the `Preview` frame, disclosure and the navigation shapes |
86
+ | `@cueplusplus/ui/layout/carousel` | needs `embla-carousel-react` |
87
+ | `@cueplusplus/ui/layout/resizable` | needs `react-resizable-panels` |
88
+ | `@cueplusplus/ui/instruments` | the readouts: meters, sparklines, tables, logs, `CodeBlock` and the two device frames |
89
+ | `@cueplusplus/ui/instruments/data-table` | needs `@tanstack/react-table` |
90
+ | `@cueplusplus/ui/instruments/log-viewer` | needs `@tanstack/react-virtual`, `anser` |
91
+ | `@cueplusplus/ui/charts` | Recharts in this system's tokens, plus the categorical palette and the ramps; needs `recharts` |
92
+ | `@cueplusplus/ui/date` | calendars, pickers and segmented date/time fields; needs `react-day-picker`, `date-fns`, `react-aria-components`, `@internationalized/date` |
93
+ | `@cueplusplus/ui/color` | the picker suite the configurator edits with, hex and oklch; needs `react-aria-components` |
94
+ | `@cueplusplus/ui/configurator` | the floating panel that edits the token layer live and exports what it edited; needs `react-aria-components` |
95
+ | `@cueplusplus/ui/flow` | React Flow wearing the tokens: node cards, handles, signal-carrying wires; needs `@xyflow/react` (+ `./flow.css`) |
96
+ | `@cueplusplus/ui/chat` | the multi-agent transcript: messages, composer, HITL questions, agent colour |
97
+ | `@cueplusplus/ui/agent-runtime` | the streaming layer under Chat; needs `@assistant-ui/react` |
98
+ | `@cueplusplus/ui/elements` | the agent's own surface, vendored from assistant-ui and repainted onto the tokens; needs `lucide-react` and `heat-graph` (+ `./elements.css`) |
99
+ | `@cueplusplus/ui/elements/markdown` | `MarkdownText`; needs `react-markdown`, `rehype-sanitize` |
100
+ | `@cueplusplus/ui/elements/generative` | the generative-UI renderer and its spec (+ `./elements/generative.css`) |
101
+ | `@cueplusplus/ui/elements/replay` | the scripted session-replay frame |
102
+ | `@cueplusplus/ui/dmx` | 512 bytes at wire rate: the bar, the strip, the patch bar, the channel grid |
103
+ | `@cueplusplus/ui/midi` | sequencer instruments: keyboard, musical clock, ruler, analyser, threshold rail |
104
+ | `@cueplusplus/ui/system` | `ThemeProvider`, `prepaintScript`, the `Density` island, the portal frame, `isSafeTokenValue` |
105
+ | `@cueplusplus/ui/theming` | `createTheme()`, `contrastReport()` and the `--cue-*` vocabulary as constants |
106
+
107
+ Four stylesheet exports. `@cueplusplus/ui/styles.css` is always imported; the other three are
108
+ imported only if you use what they paint — `@cueplusplus/ui/elements.css`,
109
+ `@cueplusplus/ui/flow.css` and `@cueplusplus/ui/elements/generative.css`.
110
+
111
+ ## Showing a component: `Preview`, `Inspector`, `CodeBlock`
112
+
113
+ Three pieces for a page that shows components rather than only using them — a docs page, a design
114
+ review, a settings screen with a live sample. Each is exported from the root barrel as well as from
115
+ its group's subpath, and none needs an optional peer.
116
+
117
+ ### `Preview` — one component on a stage
118
+
119
+ From `@cueplusplus/ui/layout`. A frame with a stage for the specimen, a `tools` slot at the top
120
+ right and a `footer`. `label` is required, because the frame is a `role="group"` named by it. The
121
+ stage can carry its own `theme`, `mode`, `density` and `font`; with none of them set it carries no
122
+ attribute and inherits the page.
123
+
124
+ **A stage `theme` needs that theme's stylesheet on the page.** Naming a theme does not load it: the
125
+ stage is scoped with `[data-theme="<name>"]`, so `@cueplusplus/theme-<name>/theme.css` has to be
126
+ imported like any other palette, or the stage paints the blank base with nothing erroring. The
127
+ example below shows `terminal` on a `cue` page, so both are imported and both are registered:
128
+
129
+ ```css
130
+ /* app/globals.css */
131
+ @import "tailwindcss";
132
+ @import "@cueplusplus/ui/styles.css";
133
+ @import "@cueplusplus/theme-cue/theme.css";
134
+ @import "@cueplusplus/theme-terminal/theme.css";
135
+ ```
136
+
137
+ ```tsx
138
+ import cue from "@cueplusplus/theme-cue";
139
+ import terminal from "@cueplusplus/theme-terminal";
140
+ import { Chip } from "@cueplusplus/ui";
141
+ import { Preview } from "@cueplusplus/ui/layout";
142
+ import { ThemeProvider } from "@cueplusplus/ui/system";
143
+
144
+ export default function ChipPage() {
145
+ return (
146
+ <ThemeProvider themes={[cue, terminal]} theme="cue" density="compact" mode="system">
147
+ <Preview label="Chip preview" theme="terminal" resizable footer="terminal · compact">
148
+ <Chip tone="accent">Standby</Chip>
149
+ </Preview>
150
+ </ThemeProvider>
151
+ );
152
+ }
153
+ ```
154
+
155
+ - Only the stage changes theme. `tools`, `footer`, the resize grips and anything they open stay in
156
+ the page's theme, so the controls that drive a specimen always look like the page around them.
157
+ - `resizable` adds a grip per axis, 160–1280 × 96–960 px by default, that works by pointer and by
158
+ keyboard (arrows step 8 px, Shift+arrow 64 px). Pass `{ axis, minWidth, maxWidth, minHeight,
159
+ maxHeight }` to narrow it. A resizable Preview fills its container's width.
160
+ - It is a client component (`"use client"`).
161
+
162
+ ### `Inspector` — the layout of a settings panel
163
+
164
+ From `@cueplusplus/ui/chrome`. Titled sections of label-and-control rows, then a footer — the shape
165
+ of a properties sidebar or a wrench menu. The controls are the library's own.
166
+
167
+ ```tsx
168
+ import { Button, Input, SegmentedControl } from "@cueplusplus/ui";
169
+ import { Inspector } from "@cueplusplus/ui/chrome";
170
+
171
+ const sizes = [
172
+ { value: "sm", label: "Small" },
173
+ { value: "md", label: "Medium" },
174
+ { value: "lg", label: "Large" },
175
+ ];
176
+
177
+ export function ButtonInspector() {
178
+ return (
179
+ <Inspector.Root>
180
+ <Inspector.Section label="Variants">
181
+ <Inspector.Row label="Size">
182
+ <SegmentedControl items={sizes} defaultValue="md" />
183
+ </Inspector.Row>
184
+ <Inspector.Row label="Label" htmlFor="button-label">
185
+ <Input id="button-label" defaultValue="Run cue" />
186
+ </Inspector.Row>
187
+ </Inspector.Section>
188
+ <Inspector.Footer note="preset · primary" action={<Button size="sm">Reset</Button>} />
189
+ </Inspector.Root>
190
+ );
191
+ }
192
+ ```
193
+
194
+ - A row names its control. With `htmlFor` the label is a `<label>` for that id; without it the row
195
+ lays `label` on the control as `aria-label`, unless the control already names itself.
196
+ - A row is one column until the Inspector is 18rem wide, then label beside control. It is a
197
+ container query, so it follows the popover or sidebar the Inspector sits in, not the viewport.
198
+ - `Inspector` itself has no hooks and no `"use client"`, so a server component can render it.
199
+
200
+ ### `CodeBlock` — code with a caption and a copy button
201
+
202
+ From `@cueplusplus/ui/instruments`.
203
+
204
+ ```tsx
205
+ import { CodeBlock } from "@cueplusplus/ui/instruments";
206
+
207
+ export function ButtonSource() {
208
+ return <CodeBlock label="button.tsx" language="jsx" code={'<Button variant="primary">Run cue</Button>'} />;
209
+ }
210
+ ```
211
+
212
+ - `code` is printed verbatim, and the copy button copies exactly that. `label` is the caption and
213
+ defaults to the language; `language` defaults to `"tsx"`.
214
+ - There is no syntax-highlighter palette. `language="jsx"` picks out tag names, attribute names and
215
+ punctuation in three inks the theme already has; every other language prints plain.
33
216
 
34
217
  ## The machine-readable half
35
218
 
36
219
  This package ships its own manifest: `@cueplusplus/ui/manifest.json` is an index of every
37
220
  component with a SHA-256 for each companion document, and
38
221
  `@cueplusplus/ui/manifest/components/<name>.json` is one component in full — props, variants, the
39
- tokens it paints with, and the hand-written notes on when it is the wrong choice. An agent or a
40
- code generator should read that rather than guess a prop name.
222
+ tokens it paints with, and the hand-written notes on when it is the wrong choice. Beside them,
223
+ `@cueplusplus/ui/manifest/tokens.json` is the token vocabulary and
224
+ `@cueplusplus/ui/manifest/fixtures.json` the playground fixture catalogue. An agent or a code
225
+ generator should read those rather than guess a prop name.
41
226
 
42
227
  The same surfaces are published at <https://ui.cueplusplus.com>, with the docs site, the live
43
228
  kitchen sink and the CUE++ agent skills beside them.
44
229
 
45
- ## Full documentation
230
+ ## Where the rest is
46
231
 
47
- - Installing and using it from another project: [`docs/CONSUMING.md`](https://github.com/cueplusplus/product-design-system/blob/main/docs/CONSUMING.md)
232
+ - Installing and using it from another project: [`docs/CONSUMING.md`](https://github.com/cueplusplus/cue-ui/blob/main/docs/CONSUMING.md)
48
233
  - Every component, with props and a live example: <https://ui.cueplusplus.com/docs/components>
49
234
  - Theming, density and the `--cue-*` contract: <https://ui.cueplusplus.com/docs/theming>
235
+ - The whole surface on one page: <https://ui.cueplusplus.com/kitchen-sink>
236
+ - Every machine-readable surface, with copy-paste snippets: <https://ui.cueplusplus.com/ai>
237
+ - What changed in the version you have: `node_modules/@cueplusplus/ui/CHANGELOG.md`
@@ -6,6 +6,7 @@ import { AppShell, AppShellAsideProps, AppShellBarProps, AppShellBodyProps, AppS
6
6
  import { EmptyState, EmptyStateProps } from "./empty-state.js";
7
7
  import { Eyebrow, EyebrowProps } from "./eyebrow.js";
8
8
  import { Footer, FooterProps } from "./footer.js";
9
+ import { Inspector, InspectorFooterProps, InspectorRootProps, InspectorRowProps, InspectorSectionProps } from "./inspector.js";
9
10
  import { NavigationMenu, NavigationMenuContentProps, NavigationMenuItemProps, NavigationMenuLinkProps, NavigationMenuListProps, NavigationMenuRootProps, NavigationMenuTriggerProps, NavigationMenuViewportProps } from "./navigation-menu.js";
10
11
  import { PageShell, PageShellProps, PageWidth } from "./page-shell.js";
11
12
  import { Panel, PanelHeader, PanelHeaderProps, PanelProps } from "./panel.js";
@@ -19,4 +20,4 @@ import { ScrollableTabsList, ScrollableTabsListProps, Tabs, TabsListProps, TabsP
19
20
  import { TitleBar, TitleBarProps } from "./title-bar.js";
20
21
  import { Tree, TreeProps, TreeVisibility, TreeVisibilityToggle, TreeVisibilityToggleProps } from "./tree.js";
21
22
  import { Toolbar, ToolbarButtonProps, ToolbarGroupProps, ToolbarRootProps, ToolbarSeparatorProps } from "./toolbar.js";
22
- export { AppBar, type AppBarActionsProps, type AppBarBrandProps, type AppBarLinkProps, type AppBarNavProps, type AppBarRegister, type AppBarRootProps, type AppBarSeparatorProps, AppShell, type AppShellAsideProps, type AppShellBarProps, type AppShellBodyProps, type AppShellContentProps, type AppShellNavTriggerProps, type AppShellRootProps, type AppShellScrollerProps, type AppShellSidebarProps, type BarOverflow, EmptyState, type EmptyStateProps, Eyebrow, type EyebrowProps, Footer, type FooterProps, NavigationMenu, type NavigationMenuContentProps, type NavigationMenuItemProps, type NavigationMenuLinkProps, type NavigationMenuListProps, type NavigationMenuRootProps, type NavigationMenuTriggerProps, type NavigationMenuViewportProps, PageShell, type PageShellProps, type PageWidth, Panel, PanelHeader, type PanelHeaderProps, type PanelProps, Row, type RowProps, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, type ScrollEdges, ScrollableTabsList, type ScrollableTabsListProps, SeamList, type SeamListProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, StatusBar, type StatusBarGroupProps, type StatusBarItemProps, type StatusBarProminence, type StatusBarProps, type StatusBarTone, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTabProps, TitleBar, type TitleBarProps, Toolbar, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarRootProps, type ToolbarSeparatorProps, Tree, type TreeGuide, type TreeItem, type TreeProps, type TreeRow, type TreeVisibility, TreeVisibilityToggle, type TreeVisibilityToggleProps, computeScrollEdges, edgeFadeMask, flattenTree, rowVariants };
23
+ export { AppBar, type AppBarActionsProps, type AppBarBrandProps, type AppBarLinkProps, type AppBarNavProps, type AppBarRegister, type AppBarRootProps, type AppBarSeparatorProps, AppShell, type AppShellAsideProps, type AppShellBarProps, type AppShellBodyProps, type AppShellContentProps, type AppShellNavTriggerProps, type AppShellRootProps, type AppShellScrollerProps, type AppShellSidebarProps, type BarOverflow, EmptyState, type EmptyStateProps, Eyebrow, type EyebrowProps, Footer, type FooterProps, Inspector, type InspectorFooterProps, type InspectorRootProps, type InspectorRowProps, type InspectorSectionProps, NavigationMenu, type NavigationMenuContentProps, type NavigationMenuItemProps, type NavigationMenuLinkProps, type NavigationMenuListProps, type NavigationMenuRootProps, type NavigationMenuTriggerProps, type NavigationMenuViewportProps, PageShell, type PageShellProps, type PageWidth, Panel, PanelHeader, type PanelHeaderProps, type PanelProps, Row, type RowProps, ScrollArea, type ScrollAreaOrientation, type ScrollAreaProps, type ScrollEdges, ScrollableTabsList, type ScrollableTabsListProps, SeamList, type SeamListProps, SectionHeader, type SectionHeaderProps, SegmentedControl, type SegmentedControlItem, type SegmentedControlProps, type SegmentedControlSize, StatusBar, type StatusBarGroupProps, type StatusBarItemProps, type StatusBarProminence, type StatusBarProps, type StatusBarTone, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Tabs, type TabsListProps, type TabsPanelProps, type TabsRootProps, type TabsTabProps, TitleBar, type TitleBarProps, Toolbar, type ToolbarButtonProps, type ToolbarGroupProps, type ToolbarRootProps, type ToolbarSeparatorProps, Tree, type TreeGuide, type TreeItem, type TreeProps, type TreeRow, type TreeVisibility, TreeVisibilityToggle, type TreeVisibilityToggleProps, computeScrollEdges, edgeFadeMask, flattenTree, rowVariants };
@@ -5,16 +5,17 @@ import { AppShell } from "./app-shell.js";
5
5
  import { EmptyState } from "./empty-state.js";
6
6
  import { Eyebrow } from "./eyebrow.js";
7
7
  import { Footer } from "./footer.js";
8
+ import { SectionHeader } from "./section-header.js";
9
+ import { Inspector } from "./inspector.js";
8
10
  import { NavigationMenu } from "./navigation-menu.js";
9
11
  import { PageShell } from "./page-shell.js";
10
12
  import { Panel, PanelHeader } from "./panel.js";
11
13
  import { Row, SeamList, rowVariants } from "./row.js";
12
14
  import { ScrollArea } from "./scroll-area.js";
13
- import { SectionHeader } from "./section-header.js";
14
15
  import { SegmentedControl } from "./segmented-control.js";
15
16
  import { StatusBar } from "./status-bar.js";
16
17
  import { ScrollableTabsList, Tabs } from "./tabs.js";
17
18
  import { TitleBar } from "./title-bar.js";
18
19
  import { Tree, TreeVisibilityToggle } from "./tree.js";
19
20
  import { Toolbar } from "./toolbar.js";
20
- export { AppBar, AppShell, EmptyState, Eyebrow, Footer, NavigationMenu, PageShell, Panel, PanelHeader, Row, ScrollArea, ScrollableTabsList, SeamList, SectionHeader, SegmentedControl, StatusBar, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Tabs, TitleBar, Toolbar, Tree, TreeVisibilityToggle, computeScrollEdges, edgeFadeMask, flattenTree, rowVariants };
21
+ export { AppBar, AppShell, EmptyState, Eyebrow, Footer, Inspector, NavigationMenu, PageShell, Panel, PanelHeader, Row, ScrollArea, ScrollableTabsList, SeamList, SectionHeader, SegmentedControl, StatusBar, TAB_FADE_PX, TREE_GUIDE_GLYPHS, Tabs, TitleBar, Toolbar, Tree, TreeVisibilityToggle, computeScrollEdges, edgeFadeMask, flattenTree, rowVariants };