@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
@@ -0,0 +1,202 @@
1
+ {
2
+ "name": "Preview",
3
+ "slug": "preview",
4
+ "group": "layout",
5
+ "importPath": "@cueplusplus/ui",
6
+ "peerDependencies": [],
7
+ "clientOnly": true,
8
+ "description": "A frame for one component: a stage that is its own theme island, a slot for\ntools at the top right, and a footer.\n\n**The stage is the island; the chrome is not.** `theme`, `mode`, `density`\nand `font` land on the stage element only, and the stage republishes the\ntheme and density contexts so an overlay opened on it follows it. The tools,\nthe footer, the grips and anything they open stay in the scope around the\nPreview — a `terminal` preview's own controls do not turn cyan. With none of\nthe four set, the stage carries no attribute and costs what a `<div>` costs.\nA stage `theme` with no `mode` repeats the page's mode beside it.\n\n**`resizable` is handles of its own**, both axes by default: an edge grip per\naxis that is a keyboard-operable `separator` valued in pixels, and a corner\ngrip for the pointer. Double-click resets an axis. The width never outgrows\nthe frame: its bound in force is the frame's own width, observed live, when\nthat is under `maxWidth`. Not `Resizable`, which is split panes on an\noptional peer.\n\nProps, not a compound: one stage and two slots, each saying what it is.",
9
+ "props": [
10
+ {
11
+ "name": "children",
12
+ "type": "ReactNode",
13
+ "required": true,
14
+ "defaultValue": null,
15
+ "description": "The specimen. It renders on the stage, inside whatever scope the stage sets.",
16
+ "control": {
17
+ "kind": "node",
18
+ "fixture": "children.text"
19
+ }
20
+ },
21
+ {
22
+ "name": "label",
23
+ "type": "string",
24
+ "required": true,
25
+ "defaultValue": null,
26
+ "description": "The frame's accessible name — \"Button preview\". Required: a frame that holds\ncontrols and has no name is a group nobody can find.",
27
+ "control": {
28
+ "kind": "string"
29
+ }
30
+ },
31
+ {
32
+ "name": "theme",
33
+ "type": "string",
34
+ "required": false,
35
+ "defaultValue": null,
36
+ "description": "A theme for the stage only. Unset, the stage inherits — no attribute is\nemitted at all. **Naming a theme does not load it**: the stage is scoped to\n`[data-theme=\"<name>\"]`, and that theme's stylesheet must already be on the\npage (`@cueplusplus/theme-<name>/theme.css`). The tools, the footer and\nanything they open stay in the page's theme. With no `mode`, the stage\nrepeats the page's mode beside the theme — `\"system\"` included — so a light\npage's stage paints the theme's light block, not its dark one, and agrees\nwith every overlay opened on it.",
37
+ "control": {
38
+ "kind": "string"
39
+ }
40
+ },
41
+ {
42
+ "name": "mode",
43
+ "type": "\"system\" | \"dark\" | \"light\"",
44
+ "required": false,
45
+ "defaultValue": null,
46
+ "description": "Dark, light or system, for the stage only. A theme's light block is the\ncompound selector `[data-theme][data-mode]`, so with no `theme` the stage\nrestates the page's theme beside the mode; outside any `ThemeProvider` there\nis no theme to restate and the mode alone changes nothing. A stage\n`\"system\"` is stamped as it is, so the stylesheet's `[data-mode=\"system\"]`\nblock follows the OS; `useTheme().resolvedMode` read on the stage reports\nthe page's resolved mode.",
47
+ "control": {
48
+ "kind": "enum",
49
+ "members": [
50
+ "system",
51
+ "dark",
52
+ "light"
53
+ ]
54
+ }
55
+ },
56
+ {
57
+ "name": "density",
58
+ "type": "\"normal\" | \"large\" | \"compact\" | \"ultra-compact\" | \"ultra-large\"",
59
+ "required": false,
60
+ "defaultValue": null,
61
+ "description": "A rung of the density ladder for the stage only, as a `<Density>` island would set it.",
62
+ "control": {
63
+ "kind": "enum",
64
+ "members": [
65
+ "normal",
66
+ "large",
67
+ "compact",
68
+ "ultra-compact",
69
+ "ultra-large"
70
+ ]
71
+ }
72
+ },
73
+ {
74
+ "name": "font",
75
+ "type": "\"source\" | \"system\" | \"geist\" | \"inter\" | \"plex\" | \"roboto\" | \"apple\" | \"office\"",
76
+ "required": false,
77
+ "defaultValue": null,
78
+ "description": "A font pairing for the stage only, as `data-font`. Portals still follow the root's pairing.",
79
+ "control": {
80
+ "kind": "enum",
81
+ "members": [
82
+ "source",
83
+ "system",
84
+ "geist",
85
+ "inter",
86
+ "plex",
87
+ "roboto",
88
+ "apple",
89
+ "office"
90
+ ]
91
+ }
92
+ },
93
+ {
94
+ "name": "resizable",
95
+ "type": "boolean | PreviewResizeOptions",
96
+ "required": false,
97
+ "defaultValue": null,
98
+ "description": "Resize the stage by dragging or with the keyboard. `true` gives both axes\ninside the default bounds (160–1280 px wide, 96–960 px tall); an object\nnarrows the axis or moves the bounds. The width never outgrows the frame:\nits bound in force is the smaller of `maxWidth` and the frame's own width,\nobserved with a `ResizeObserver`, so a Preview in a grid track stays inside\nit as the viewport changes. The height is bounded by `maxHeight` alone, and\na taller stage grows its frame. Unset, the stage is fixed: no grips, and\nnothing measured or observed.\n\nA resizable frame fills its container's width (`w-full`), because the room\nit measures has to be its container's. In a flex row or a centred column a\nframe sized by its content would measure its own stage, and a stage bounded\nby itself can only shrink, with each step lowering the ceiling. A fixed\nPreview keeps sizing to its content; `className` can still set a width.",
99
+ "control": {
100
+ "kind": "opaque"
101
+ }
102
+ },
103
+ {
104
+ "name": "tools",
105
+ "type": "ReactNode",
106
+ "required": false,
107
+ "defaultValue": null,
108
+ "description": "The top-right slot — by convention a row of `IconButton`s. Drawn outside the stage.",
109
+ "control": {
110
+ "kind": "node",
111
+ "fixture": "children.text"
112
+ }
113
+ },
114
+ {
115
+ "name": "footer",
116
+ "type": "ReactNode",
117
+ "required": false,
118
+ "defaultValue": null,
119
+ "description": "The strip under the stage: the thin text and the way out. Drawn outside the stage.",
120
+ "control": {
121
+ "kind": "node",
122
+ "fixture": "children.text"
123
+ }
124
+ }
125
+ ],
126
+ "typeReferences": [
127
+ "Omit<React.ComponentPropsWithoutRef<\"div\">, \"children\">"
128
+ ],
129
+ "subcomponents": [],
130
+ "parts": [],
131
+ "variants": {},
132
+ "defaultVariants": {},
133
+ "tokensUsed": [
134
+ "--cue-accent",
135
+ "--cue-border",
136
+ "--cue-border-strong",
137
+ "--cue-control-sm",
138
+ "--cue-fg",
139
+ "--cue-fg-muted",
140
+ "--cue-font-mono",
141
+ "--cue-hair-strong",
142
+ "--cue-radius-control",
143
+ "--cue-radius-surface",
144
+ "--cue-space-2",
145
+ "--cue-space-4",
146
+ "--cue-space-5",
147
+ "--cue-space-6",
148
+ "--cue-space-8",
149
+ "--cue-surface-1",
150
+ "--cue-surface-2",
151
+ "--cue-surface-3",
152
+ "--cue-text-label"
153
+ ],
154
+ "summary": "A frame for one component: a stage that is its own theme island, tools at the top right, a footer, and grips that resize it on both axes.",
155
+ "examples": [
156
+ {
157
+ "title": "Inheriting the page, resizable",
158
+ "code": "<Preview label=\"Button preview\" resizable footer={<span>Button</span>}>\n <Button variant=\"primary\">Take cue</Button>\n</Preview>",
159
+ "language": "tsx"
160
+ },
161
+ {
162
+ "title": "Its own theme and density",
163
+ "code": "<Preview label=\"Chip preview\" theme=\"terminal\" density=\"compact\">\n <Chip tone=\"accent\">Standby</Chip>\n</Preview>",
164
+ "language": "tsx"
165
+ },
166
+ {
167
+ "title": "Usage",
168
+ "code": "<Preview label=\"Button preview\" tools={<IconButton aria-label=\"Configure Button\" icon={Wrench} />}>\n <Button variant=\"primary\">Take cue</Button>\n</Preview>\n<Preview label=\"Chip preview\" theme=\"terminal\" density=\"compact\" resizable>\n <Chip tone=\"accent\">Standby</Chip>\n</Preview>",
169
+ "language": "tsx"
170
+ }
171
+ ],
172
+ "status": "stable",
173
+ "url": "/docs/components/preview",
174
+ "mdUrl": "/docs/components/preview.md",
175
+ "jsonUrl": "/r/components/preview.json",
176
+ "whenToUse": [
177
+ "Showing one component in a state a reader can see and change — a gallery tile, a docs listing, a design review page.",
178
+ "Putting a component in a different theme, mode, density or font from the page around it, without re-theming the controls that change it.",
179
+ "Letting a reader watch a component respond to its container: pass `resizable` and drag it narrow, or short."
180
+ ],
181
+ "whenNotToUse": [
182
+ "Laying several components out side by side. That is `Bento` or `Grid`; a Preview holds one specimen.",
183
+ "Split panes a user resizes as part of an app. That is `Resizable`; a Preview's grips resize a stage, not a layout."
184
+ ],
185
+ "commonMistakes": [
186
+ "Naming a `theme` whose stylesheet is not on the page. The stage is scoped to `[data-theme]`, and a Preview loads no CSS — import `@cueplusplus/theme-<name>/theme.css` yourself, or the stage paints the blank base.",
187
+ "Setting `mode` outside any `ThemeProvider` and expecting a change. A theme's light block needs the theme on the same element, and with no provider there is no theme to restate.",
188
+ "Putting the controls that configure the specimen in `children`. They would take the stage's theme; put them in `tools`, which follows the page."
189
+ ],
190
+ "specimens": [
191
+ {
192
+ "title": "Preview",
193
+ "group": "layout",
194
+ "components": [
195
+ "Preview"
196
+ ],
197
+ "code": "<Specimens>\n <Specimen label=\"inherits the page, resizable\" wide>\n <Preview\n label=\"Button preview\"\n resizable\n footer={<span className=\"font-mono text-(length:--cue-text-label) text-fg-subtle\">Button · inherits</span>}\n >\n <Button variant=\"primary\">Take cue</Button>\n </Preview>\n </Specimen>\n <Specimen label=\"its own theme and density\" wide>\n <Preview\n label=\"Chip preview\"\n theme=\"terminal\"\n density=\"compact\"\n footer={<span className=\"font-mono text-(length:--cue-text-label) text-fg-subtle\">Chip · terminal · compact</span>}\n >\n <Chip tone=\"accent\">Standby</Chip>\n </Preview>\n </Specimen>\n</Specimens>",
198
+ "note": "A frame for one component. The stage is its own theme island — theme, mode, density and font land on it and nowhere else — while the tools, the footer and anything they open follow the page.",
199
+ "interaction": "with `resizable`, the width and height grips are separators: Left and Right step the width, Up and Down the height, 8 px a press and 64 with Shift; Home and End reach the bounds, and a double-click resets an axis. The corner grip is a pointer convenience over the two."
200
+ }
201
+ ]
202
+ }
@@ -12,42 +12,61 @@
12
12
  "type": "ReactNode",
13
13
  "required": false,
14
14
  "defaultValue": null,
15
- "description": "Caption above the bar. Rendered as Base UI's `Progress.Label`, so it also\nbecomes the bar's accessible name — pass one, or an `aria-label`."
15
+ "description": "Caption above the bar. Rendered as Base UI's `Progress.Label`, so it also\nbecomes the bar's accessible name — pass one, or an `aria-label`.",
16
+ "control": {
17
+ "kind": "node",
18
+ "fixture": "children.text"
19
+ }
16
20
  },
17
21
  {
18
22
  "name": "className",
19
23
  "type": "string",
20
24
  "required": false,
21
25
  "defaultValue": null,
22
- "description": "Extra classes for the frame that holds the header and the track."
26
+ "description": "Extra classes for the frame that holds the header and the track.",
27
+ "control": {
28
+ "kind": "string"
29
+ }
23
30
  },
24
31
  {
25
32
  "name": "height",
26
33
  "type": "number",
27
34
  "required": false,
28
35
  "defaultValue": "5",
29
- "description": "Track height in px at the 16px root, emitted as `rem`. Defaults to `5`."
36
+ "description": "Track height in px at the 16px root, emitted as `rem`. Defaults to `5`.",
37
+ "control": {
38
+ "kind": "number"
39
+ }
30
40
  },
31
41
  {
32
42
  "name": "showValue",
33
43
  "type": "boolean",
34
44
  "required": false,
35
45
  "defaultValue": "false",
36
- "description": "Show the formatted value opposite the label. Defaults to `false`."
46
+ "description": "Show the formatted value opposite the label. Defaults to `false`.",
47
+ "control": {
48
+ "kind": "boolean"
49
+ }
37
50
  },
38
51
  {
39
52
  "name": "trackClassName",
40
53
  "type": "string",
41
54
  "required": false,
42
55
  "defaultValue": null,
43
- "description": "Extra classes for the track."
56
+ "description": "Extra classes for the track.",
57
+ "control": {
58
+ "kind": "string"
59
+ }
44
60
  },
45
61
  {
46
62
  "name": "indicatorClassName",
47
63
  "type": "string",
48
64
  "required": false,
49
65
  "defaultValue": null,
50
- "description": "Extra classes for the fill."
66
+ "description": "Extra classes for the fill.",
67
+ "control": {
68
+ "kind": "string"
69
+ }
51
70
  }
52
71
  ],
53
72
  "typeReferences": [
@@ -14,42 +14,63 @@
14
14
  "type": "readonly SavedPrompt[]",
15
15
  "required": true,
16
16
  "defaultValue": null,
17
- "description": "Everything saved. Filtering happens inside against the name."
17
+ "description": "Everything saved. Filtering happens inside against the name.",
18
+ "control": {
19
+ "kind": "array"
20
+ }
18
21
  },
19
22
  {
20
23
  "name": "query",
21
24
  "type": "string",
22
25
  "required": true,
23
26
  "defaultValue": null,
24
- "description": "Current search text."
27
+ "description": "Current search text.",
28
+ "control": {
29
+ "kind": "string"
30
+ }
25
31
  },
26
32
  {
27
33
  "name": "selectedId",
28
34
  "type": "string",
29
35
  "required": true,
30
36
  "defaultValue": null,
31
- "description": "Which prompt is previewed below the list."
37
+ "description": "Which prompt is previewed below the list.",
38
+ "control": {
39
+ "kind": "string"
40
+ }
32
41
  },
33
42
  {
34
43
  "name": "onQueryChange",
35
44
  "type": "((query: string) => void)",
36
45
  "required": false,
37
46
  "defaultValue": null,
38
- "description": "Called as the search is typed."
47
+ "description": "Called as the search is typed.",
48
+ "control": {
49
+ "kind": "callback",
50
+ "fixture": "callback.log"
51
+ }
39
52
  },
40
53
  {
41
54
  "name": "onSelect",
42
55
  "type": "((id: string) => void)",
43
56
  "required": false,
44
57
  "defaultValue": null,
45
- "description": "Called when a prompt is highlighted."
58
+ "description": "Called when a prompt is highlighted.",
59
+ "control": {
60
+ "kind": "callback",
61
+ "fixture": "callback.log"
62
+ }
46
63
  },
47
64
  {
48
65
  "name": "onInsert",
49
66
  "type": "((id: string) => void)",
50
67
  "required": false,
51
68
  "defaultValue": null,
52
- "description": "Called on double click, to drop the prompt into the composer."
69
+ "description": "Called on double click, to drop the prompt into the composer.",
70
+ "control": {
71
+ "kind": "callback",
72
+ "fixture": "callback.log"
73
+ }
53
74
  }
54
75
  ],
55
76
  "typeReferences": [
@@ -14,56 +14,84 @@
14
14
  "type": "readonly QueuedFollowUp[]",
15
15
  "required": true,
16
16
  "defaultValue": null,
17
- "description": "The turns waiting to send, in the order they will drain. Ordering is the\ncaller's: Cursor lets a person drag one up the list, and a component that\nsorted the array it was given could not be dragged."
17
+ "description": "The turns waiting to send, in the order they will drain. Ordering is the\ncaller's: Cursor lets a person drag one up the list, and a component that\nsorted the array it was given could not be dragged.",
18
+ "control": {
19
+ "kind": "array"
20
+ }
18
21
  },
19
22
  {
20
23
  "name": "open",
21
24
  "type": "boolean",
22
25
  "required": true,
23
26
  "defaultValue": null,
24
- "description": "Whether the entries are showing, or only the summary line."
27
+ "description": "Whether the entries are showing, or only the summary line.",
28
+ "control": {
29
+ "kind": "boolean"
30
+ }
25
31
  },
26
32
  {
27
33
  "name": "onOpenChange",
28
34
  "type": "((open: boolean) => void)",
29
35
  "required": false,
30
36
  "defaultValue": null,
31
- "description": "Called when the dock is expanded or collapsed."
37
+ "description": "Called when the dock is expanded or collapsed.",
38
+ "control": {
39
+ "kind": "callback",
40
+ "fixture": "callback.log"
41
+ }
32
42
  },
33
43
  {
34
44
  "name": "onEdit",
35
45
  "type": "((id: string) => void)",
36
46
  "required": false,
37
47
  "defaultValue": null,
38
- "description": "Put this turn back in the composer to be rewritten. The control exists\nonly when this is given."
48
+ "description": "Put this turn back in the composer to be rewritten. The control exists\nonly when this is given.",
49
+ "control": {
50
+ "kind": "callback",
51
+ "fixture": "callback.log"
52
+ }
39
53
  },
40
54
  {
41
55
  "name": "onSendNow",
42
56
  "type": "((id: string) => void)",
43
57
  "required": false,
44
58
  "defaultValue": null,
45
- "description": "Send this turn now rather than waiting for the run to finish — Cursor's\n`Send now`, Zed's steer button. The control exists only when this is given."
59
+ "description": "Send this turn now rather than waiting for the run to finish — Cursor's\n`Send now`, Zed's steer button. The control exists only when this is given.",
60
+ "control": {
61
+ "kind": "callback",
62
+ "fixture": "callback.log"
63
+ }
46
64
  },
47
65
  {
48
66
  "name": "onRemove",
49
67
  "type": "((id: string) => void)",
50
68
  "required": false,
51
69
  "defaultValue": null,
52
- "description": "Drop this turn before it ever sends. The control exists only when this is\ngiven."
70
+ "description": "Drop this turn before it ever sends. The control exists only when this is\ngiven.",
71
+ "control": {
72
+ "kind": "callback",
73
+ "fixture": "callback.log"
74
+ }
53
75
  },
54
76
  {
55
77
  "name": "summary",
56
78
  "type": "string",
57
79
  "required": false,
58
80
  "defaultValue": null,
59
- "description": "The summary line, replacing the one {@link formatQueueSummary} would build\n— for a dock that counts something else: `2 follow-ups`, `3 steps queued`."
81
+ "description": "The summary line, replacing the one {@link formatQueueSummary} would build\n— for a dock that counts something else: `2 follow-ups`, `3 steps queued`.",
82
+ "control": {
83
+ "kind": "string"
84
+ }
60
85
  },
61
86
  {
62
87
  "name": "labels",
63
88
  "type": "Partial<QueueLabels>",
64
89
  "required": false,
65
90
  "defaultValue": null,
66
- "description": "Copy for the five controls, merged over `QUEUE_LABELS`. Partial: overriding\n`sendNow` does not cost you the other four."
91
+ "description": "Copy for the five controls, merged over `QUEUE_LABELS`. Partial: overriding\n`sendNow` does not cost you the other four.",
92
+ "control": {
93
+ "kind": "opaque"
94
+ }
67
95
  }
68
96
  ],
69
97
  "typeReferences": [
@@ -12,42 +12,61 @@
12
12
  "type": "number",
13
13
  "required": true,
14
14
  "defaultValue": null,
15
- "description": "How much has been consumed."
15
+ "description": "How much has been consumed.",
16
+ "control": {
17
+ "kind": "number"
18
+ }
16
19
  },
17
20
  {
18
21
  "name": "limit",
19
22
  "type": "number",
20
23
  "required": true,
21
24
  "defaultValue": null,
22
- "description": "The allowance. The banner turns amber at 90 percent."
25
+ "description": "The allowance. The banner turns amber at 90 percent.",
26
+ "control": {
27
+ "kind": "number"
28
+ }
23
29
  },
24
30
  {
25
31
  "name": "unit",
26
32
  "type": "string",
27
33
  "required": true,
28
34
  "defaultValue": null,
29
- "description": "What is being counted: messages, runs, credits."
35
+ "description": "What is being counted: messages, runs, credits.",
36
+ "control": {
37
+ "kind": "string"
38
+ }
30
39
  },
31
40
  {
32
41
  "name": "resetsIn",
33
42
  "type": "string",
34
43
  "required": true,
35
44
  "defaultValue": null,
36
- "description": "Pre-formatted time until the window rolls over."
45
+ "description": "Pre-formatted time until the window rolls over.",
46
+ "control": {
47
+ "kind": "string"
48
+ }
37
49
  },
38
50
  {
39
51
  "name": "upgradeLabel",
40
52
  "type": "string",
41
53
  "required": true,
42
54
  "defaultValue": null,
43
- "description": "Label for the way out."
55
+ "description": "Label for the way out.",
56
+ "control": {
57
+ "kind": "string"
58
+ }
44
59
  },
45
60
  {
46
61
  "name": "onUpgrade",
47
62
  "type": "(() => void)",
48
63
  "required": false,
49
64
  "defaultValue": null,
50
- "description": "Called from the upgrade action."
65
+ "description": "Called from the upgrade action.",
66
+ "control": {
67
+ "kind": "callback",
68
+ "fixture": "callback.log"
69
+ }
51
70
  }
52
71
  ],
53
72
  "typeReferences": [
@@ -14,49 +14,71 @@
14
14
  "type": "string",
15
15
  "required": true,
16
16
  "defaultValue": null,
17
- "description": "Text preceding the selection."
17
+ "description": "Text preceding the selection.",
18
+ "control": {
19
+ "kind": "string"
20
+ }
18
21
  },
19
22
  {
20
23
  "name": "selection",
21
24
  "type": "string",
22
25
  "required": true,
23
26
  "defaultValue": null,
24
- "description": "The highlighted run the actions apply to."
27
+ "description": "The highlighted run the actions apply to.",
28
+ "control": {
29
+ "kind": "string"
30
+ }
25
31
  },
26
32
  {
27
33
  "name": "after",
28
34
  "type": "string",
29
35
  "required": true,
30
36
  "defaultValue": null,
31
- "description": "Text following the selection."
37
+ "description": "Text following the selection.",
38
+ "control": {
39
+ "kind": "string"
40
+ }
32
41
  },
33
42
  {
34
43
  "name": "actions",
35
44
  "type": "readonly QuoteAction[]",
36
45
  "required": true,
37
46
  "defaultValue": null,
38
- "description": "What the toolbar offers. Each action names one of the three built-in icons."
47
+ "description": "What the toolbar offers. Each action names one of the three built-in icons.",
48
+ "control": {
49
+ "kind": "array"
50
+ }
39
51
  },
40
52
  {
41
53
  "name": "toolbarVisible",
42
54
  "type": "boolean",
43
55
  "required": true,
44
56
  "defaultValue": null,
45
- "description": "Whether the floating toolbar is showing. Drive it from your own selection handler."
57
+ "description": "Whether the floating toolbar is showing. Drive it from your own selection handler.",
58
+ "control": {
59
+ "kind": "boolean"
60
+ }
46
61
  },
47
62
  {
48
63
  "name": "quoted",
49
64
  "type": "string",
50
65
  "required": false,
51
66
  "defaultValue": null,
52
- "description": "Once quoted, the text carried into the composer, shown under a rule."
67
+ "description": "Once quoted, the text carried into the composer, shown under a rule.",
68
+ "control": {
69
+ "kind": "string"
70
+ }
53
71
  },
54
72
  {
55
73
  "name": "onAction",
56
74
  "type": "((key: string) => void)",
57
75
  "required": false,
58
76
  "defaultValue": null,
59
- "description": "Called with the key of the action that was chosen."
77
+ "description": "Called with the key of the action that was chosen.",
78
+ "control": {
79
+ "kind": "callback",
80
+ "fixture": "callback.log"
81
+ }
60
82
  }
61
83
  ],
62
84
  "typeReferences": [
@@ -12,14 +12,24 @@
12
12
  "type": "string",
13
13
  "required": false,
14
14
  "defaultValue": null,
15
- "description": "Extra classes, merged over the stack defaults."
15
+ "description": "Extra classes, merged over the stack defaults.",
16
+ "control": {
17
+ "kind": "string"
18
+ }
16
19
  },
17
20
  {
18
21
  "name": "orientation",
19
22
  "type": "\"horizontal\" | \"vertical\"",
20
23
  "required": false,
21
24
  "defaultValue": "vertical",
22
- "description": "Lay the options out in a column (default) or a row."
25
+ "description": "Lay the options out in a column (default) or a row.",
26
+ "control": {
27
+ "kind": "enum",
28
+ "members": [
29
+ "horizontal",
30
+ "vertical"
31
+ ]
32
+ }
23
33
  }
24
34
  ],
25
35
  "typeReferences": [
@@ -12,21 +12,35 @@
12
12
  "type": "ReactNode",
13
13
  "required": false,
14
14
  "defaultValue": null,
15
- "description": "Inline label rendered beside the dot and wrapped with it in a `<label>`, so\nthe text is both the accessible name and part of the hit target."
15
+ "description": "Inline label rendered beside the dot and wrapped with it in a `<label>`, so\nthe text is both the accessible name and part of the hit target.",
16
+ "control": {
17
+ "kind": "node",
18
+ "fixture": "children.text"
19
+ }
16
20
  },
17
21
  {
18
22
  "name": "className",
19
23
  "type": "string",
20
24
  "required": false,
21
25
  "defaultValue": null,
22
- "description": "Extra classes, merged over the dot defaults."
26
+ "description": "Extra classes, merged over the dot defaults.",
27
+ "control": {
28
+ "kind": "string"
29
+ }
23
30
  },
24
31
  {
25
32
  "name": "size",
26
33
  "type": "\"sm\" | \"md\"",
27
34
  "required": false,
28
35
  "defaultValue": "md",
29
- "description": "Rung of the density icon ladder for the dot. Defaults to `\"md\"`."
36
+ "description": "Rung of the density icon ladder for the dot. Defaults to `\"md\"`.",
37
+ "control": {
38
+ "kind": "enum",
39
+ "members": [
40
+ "sm",
41
+ "md"
42
+ ]
43
+ }
30
44
  }
31
45
  ],
32
46
  "typeReferences": [