@cueplusplus/ui 0.3.0 → 0.6.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (541) hide show
  1. package/CHANGELOG.md +2263 -0
  2. package/dist/agent-runtime/_glyphs.js +43 -0
  3. package/dist/agent-runtime/branch-picker.d.ts +45 -0
  4. package/dist/agent-runtime/branch-picker.js +87 -0
  5. package/dist/agent-runtime/index.d.ts +4 -0
  6. package/dist/agent-runtime/index.js +4 -0
  7. package/dist/agent-runtime/tool-call-card.d.ts +69 -0
  8. package/dist/agent-runtime/tool-call-card.js +187 -0
  9. package/dist/agent-runtime/use-agent-thread.d.ts +164 -0
  10. package/dist/agent-runtime/use-agent-thread.js +251 -0
  11. package/dist/chat/index.d.ts +2 -2
  12. package/dist/chat/message-list.d.ts +6 -0
  13. package/dist/chat/message-list.js +35 -0
  14. package/dist/chrome/_drag.js +59 -0
  15. package/dist/chrome/_status-bar-item.js +85 -0
  16. package/dist/chrome/_status-bar.d.ts +15 -0
  17. package/dist/chrome/_status-bar.js +171 -0
  18. package/dist/chrome/app-shell.d.ts +120 -2
  19. package/dist/chrome/app-shell.js +107 -8
  20. package/dist/chrome/index.d.ts +4 -3
  21. package/dist/chrome/status-bar.d.ts +87 -4
  22. package/dist/chrome/status-bar.js +80 -16
  23. package/dist/chrome/title-bar.d.ts +11 -1
  24. package/dist/chrome/title-bar.js +1 -3
  25. package/dist/configurator/_export.js +3 -2
  26. package/dist/configurator/_overrides.d.ts +1 -1
  27. package/dist/configurator/token-editor.js +4 -1
  28. package/dist/date/_segments.js +52 -6
  29. package/dist/elements/activity-graph.d.ts +40 -0
  30. package/dist/elements/activity-graph.js +81 -0
  31. package/dist/elements/agent-card.d.ts +49 -0
  32. package/dist/elements/agent-card.js +91 -0
  33. package/dist/elements/agent-handoff.d.ts +24 -0
  34. package/dist/elements/agent-handoff.js +53 -0
  35. package/dist/elements/agent-mode-badge.d.ts +72 -0
  36. package/dist/elements/agent-mode-badge.js +110 -0
  37. package/dist/elements/agent-plan.d.ts +24 -0
  38. package/dist/elements/agent-plan.js +74 -0
  39. package/dist/elements/agent-status.d.ts +29 -0
  40. package/dist/elements/agent-status.js +46 -0
  41. package/dist/elements/agent-surface.d.ts +65 -0
  42. package/dist/elements/agent-surface.js +68 -0
  43. package/dist/elements/animated-number.d.ts +86 -0
  44. package/dist/elements/animated-number.js +118 -0
  45. package/dist/elements/approval-card.d.ts +40 -0
  46. package/dist/elements/approval-card.js +78 -0
  47. package/dist/elements/artifact-card.d.ts +30 -0
  48. package/dist/elements/artifact-card.js +58 -0
  49. package/dist/elements/background-inbox.d.ts +39 -0
  50. package/dist/elements/background-inbox.js +60 -0
  51. package/dist/elements/canvas-split.d.ts +77 -0
  52. package/dist/elements/canvas-split.js +138 -0
  53. package/dist/elements/chart.d.ts +41 -0
  54. package/dist/elements/chart.js +117 -0
  55. package/dist/elements/chat-panel.d.ts +46 -0
  56. package/dist/elements/chat-panel.js +104 -0
  57. package/dist/elements/checkpoint-history.d.ts +31 -0
  58. package/dist/elements/checkpoint-history.js +65 -0
  59. package/dist/elements/clamp.d.ts +90 -0
  60. package/dist/elements/clamp.js +109 -0
  61. package/dist/elements/code-diff.d.ts +42 -0
  62. package/dist/elements/code-diff.js +69 -0
  63. package/dist/elements/code-runner.d.ts +38 -0
  64. package/dist/elements/code-runner.js +84 -0
  65. package/dist/elements/command-palette.d.ts +48 -0
  66. package/dist/elements/command-palette.js +129 -0
  67. package/dist/elements/compaction-row.d.ts +63 -0
  68. package/dist/elements/compaction-row.js +110 -0
  69. package/dist/elements/comparison-card.d.ts +47 -0
  70. package/dist/elements/comparison-card.js +69 -0
  71. package/dist/elements/composer.d.ts +274 -0
  72. package/dist/elements/composer.js +505 -0
  73. package/dist/elements/computer-use.d.ts +40 -0
  74. package/dist/elements/computer-use.js +92 -0
  75. package/dist/elements/confidence-marker.d.ts +39 -0
  76. package/dist/elements/confidence-marker.js +64 -0
  77. package/dist/elements/connection-state.d.ts +29 -0
  78. package/dist/elements/connection-state.js +66 -0
  79. package/dist/elements/context-breakdown.d.ts +30 -0
  80. package/dist/elements/context-breakdown.js +86 -0
  81. package/dist/elements/context-usage.d.ts +99 -0
  82. package/dist/elements/context-usage.js +225 -0
  83. package/dist/elements/conversation-search.d.ts +48 -0
  84. package/dist/elements/conversation-search.js +88 -0
  85. package/dist/elements/cost-meter.d.ts +33 -0
  86. package/dist/elements/cost-meter.js +75 -0
  87. package/dist/elements/data-table.d.ts +31 -0
  88. package/dist/elements/data-table.js +67 -0
  89. package/dist/elements/day-separator.d.ts +34 -0
  90. package/dist/elements/day-separator.js +50 -0
  91. package/dist/elements/diagram.d.ts +34 -0
  92. package/dist/elements/diagram.js +75 -0
  93. package/dist/elements/document-reference.d.ts +37 -0
  94. package/dist/elements/document-reference.js +66 -0
  95. package/dist/elements/draft-restore.d.ts +27 -0
  96. package/dist/elements/draft-restore.js +54 -0
  97. package/dist/elements/edit-message.d.ts +36 -0
  98. package/dist/elements/edit-message.js +77 -0
  99. package/dist/elements/elements.css +459 -0
  100. package/dist/elements/elicitation-form.d.ts +48 -0
  101. package/dist/elements/elicitation-form.js +106 -0
  102. package/dist/elements/empty-state.d.ts +52 -0
  103. package/dist/elements/empty-state.js +98 -0
  104. package/dist/elements/end-of-turn-summary.d.ts +60 -0
  105. package/dist/elements/end-of-turn-summary.js +75 -0
  106. package/dist/elements/error-state.d.ts +29 -0
  107. package/dist/elements/error-state.js +55 -0
  108. package/dist/elements/feedback-dialog.d.ts +36 -0
  109. package/dist/elements/feedback-dialog.js +81 -0
  110. package/dist/elements/file-tree.d.ts +45 -0
  111. package/dist/elements/file-tree.js +84 -0
  112. package/dist/elements/flow-graph.d.ts +45 -0
  113. package/dist/elements/flow-graph.js +78 -0
  114. package/dist/elements/generative/chart.js +200 -0
  115. package/dist/elements/generative/faults.js +111 -0
  116. package/dist/elements/generative/icons.d.ts +41 -0
  117. package/dist/elements/generative/icons.js +190 -0
  118. package/dist/elements/generative/intrinsics.js +483 -0
  119. package/dist/elements/generative/spec.d.ts +110 -0
  120. package/dist/elements/generative/spec.js +366 -0
  121. package/dist/elements/generative.css +1145 -0
  122. package/dist/elements/generative.d.ts +144 -0
  123. package/dist/elements/generative.js +126 -0
  124. package/dist/elements/guardrail-notice.d.ts +29 -0
  125. package/dist/elements/guardrail-notice.js +63 -0
  126. package/dist/elements/image-generation.d.ts +18 -0
  127. package/dist/elements/image-generation.js +64 -0
  128. package/dist/elements/index.d.ts +116 -0
  129. package/dist/elements/index.js +115 -0
  130. package/dist/elements/inline-citation.d.ts +43 -0
  131. package/dist/elements/inline-citation.js +93 -0
  132. package/dist/elements/job-progress.d.ts +49 -0
  133. package/dist/elements/job-progress.js +74 -0
  134. package/dist/elements/launcher-bubble.d.ts +34 -0
  135. package/dist/elements/launcher-bubble.js +72 -0
  136. package/dist/elements/live-region-announcer.d.ts +130 -0
  137. package/dist/elements/live-region-announcer.js +230 -0
  138. package/dist/elements/loading-state.d.ts +27 -0
  139. package/dist/elements/loading-state.js +36 -0
  140. package/dist/elements/map-answer.d.ts +38 -0
  141. package/dist/elements/map-answer.js +93 -0
  142. package/dist/elements/markdown.d.ts +131 -0
  143. package/dist/elements/markdown.js +528 -0
  144. package/dist/elements/math-block.d.ts +51 -0
  145. package/dist/elements/math-block.js +70 -0
  146. package/dist/elements/mcp-server-panel.d.ts +41 -0
  147. package/dist/elements/mcp-server-panel.js +115 -0
  148. package/dist/elements/memory-chips.d.ts +30 -0
  149. package/dist/elements/memory-chips.js +43 -0
  150. package/dist/elements/message-actions.d.ts +38 -0
  151. package/dist/elements/message-actions.js +71 -0
  152. package/dist/elements/message-attachment.d.ts +48 -0
  153. package/dist/elements/message-attachment.js +63 -0
  154. package/dist/elements/message-branches.d.ts +25 -0
  155. package/dist/elements/message-branches.js +65 -0
  156. package/dist/elements/message-pair.d.ts +33 -0
  157. package/dist/elements/message-pair.js +65 -0
  158. package/dist/elements/message-queue.d.ts +31 -0
  159. package/dist/elements/message-queue.js +80 -0
  160. package/dist/elements/message-timing.d.ts +33 -0
  161. package/dist/elements/message-timing.js +37 -0
  162. package/dist/elements/mobile-composer.d.ts +44 -0
  163. package/dist/elements/mobile-composer.js +88 -0
  164. package/dist/elements/model-picker.d.ts +38 -0
  165. package/dist/elements/model-picker.js +69 -0
  166. package/dist/elements/number-ticker.d.ts +18 -0
  167. package/dist/elements/number-ticker.js +47 -0
  168. package/dist/elements/onboarding.d.ts +30 -0
  169. package/dist/elements/onboarding.js +75 -0
  170. package/dist/elements/permission-grant.d.ts +35 -0
  171. package/dist/elements/permission-grant.js +86 -0
  172. package/dist/elements/permission-scopes.d.ts +215 -0
  173. package/dist/elements/permission-scopes.js +249 -0
  174. package/dist/elements/prompt-library.d.ts +43 -0
  175. package/dist/elements/prompt-library.js +117 -0
  176. package/dist/elements/queue-dock.d.ts +101 -0
  177. package/dist/elements/queue-dock.js +132 -0
  178. package/dist/elements/quota-banner.d.ts +26 -0
  179. package/dist/elements/quota-banner.js +66 -0
  180. package/dist/elements/quote-reply.d.ts +44 -0
  181. package/dist/elements/quote-reply.js +79 -0
  182. package/dist/elements/range.d.ts +29 -0
  183. package/dist/elements/range.js +45 -0
  184. package/dist/elements/read-aloud.d.ts +45 -0
  185. package/dist/elements/read-aloud.js +75 -0
  186. package/dist/elements/reasoning-effort.d.ts +36 -0
  187. package/dist/elements/reasoning-effort.js +67 -0
  188. package/dist/elements/reasoning-panel.d.ts +46 -0
  189. package/dist/elements/reasoning-panel.js +75 -0
  190. package/dist/elements/recommendation-card.d.ts +45 -0
  191. package/dist/elements/recommendation-card.js +83 -0
  192. package/dist/elements/regenerate-menu.d.ts +45 -0
  193. package/dist/elements/regenerate-menu.js +51 -0
  194. package/dist/elements/replay.d.ts +217 -0
  195. package/dist/elements/replay.js +498 -0
  196. package/dist/elements/research-report.d.ts +38 -0
  197. package/dist/elements/research-report.js +69 -0
  198. package/dist/elements/retrieval-chunks.d.ts +43 -0
  199. package/dist/elements/retrieval-chunks.js +81 -0
  200. package/dist/elements/revert-dock.d.ts +159 -0
  201. package/dist/elements/revert-dock.js +327 -0
  202. package/dist/elements/reviewable-diff.d.ts +45 -0
  203. package/dist/elements/reviewable-diff.js +110 -0
  204. package/dist/elements/risk-badge.d.ts +52 -0
  205. package/dist/elements/risk-badge.js +91 -0
  206. package/dist/elements/schedule-card.d.ts +42 -0
  207. package/dist/elements/schedule-card.js +90 -0
  208. package/dist/elements/score-breakdown.d.ts +47 -0
  209. package/dist/elements/score-breakdown.js +82 -0
  210. package/dist/elements/scroll-anchor.d.ts +32 -0
  211. package/dist/elements/scroll-anchor.js +121 -0
  212. package/dist/elements/settings-panel.d.ts +52 -0
  213. package/dist/elements/settings-panel.js +107 -0
  214. package/dist/elements/shared-conversation.d.ts +39 -0
  215. package/dist/elements/shared-conversation.js +68 -0
  216. package/dist/elements/sources.d.ts +33 -0
  217. package/dist/elements/sources.js +61 -0
  218. package/dist/elements/speaker-identity.d.ts +32 -0
  219. package/dist/elements/speaker-identity.js +51 -0
  220. package/dist/elements/spec-sheet.d.ts +31 -0
  221. package/dist/elements/spec-sheet.js +45 -0
  222. package/dist/elements/stopped-run.d.ts +22 -0
  223. package/dist/elements/stopped-run.js +50 -0
  224. package/dist/elements/streaming-text.d.ts +31 -0
  225. package/dist/elements/streaming-text.js +45 -0
  226. package/dist/elements/subagent-list.d.ts +37 -0
  227. package/dist/elements/subagent-list.js +79 -0
  228. package/dist/elements/suggestions.d.ts +30 -0
  229. package/dist/elements/suggestions.js +36 -0
  230. package/dist/elements/surfaces.d.ts +85 -0
  231. package/dist/elements/surfaces.js +107 -0
  232. package/dist/elements/tail-status.d.ts +131 -0
  233. package/dist/elements/tail-status.js +94 -0
  234. package/dist/elements/terminal-block.d.ts +29 -0
  235. package/dist/elements/terminal-block.js +54 -0
  236. package/dist/elements/thinking-indicator.d.ts +18 -0
  237. package/dist/elements/thinking-indicator.js +36 -0
  238. package/dist/elements/thread-list.d.ts +35 -0
  239. package/dist/elements/thread-list.js +68 -0
  240. package/dist/elements/thread-search.d.ts +42 -0
  241. package/dist/elements/thread-search.js +99 -0
  242. package/dist/elements/timeline.d.ts +37 -0
  243. package/dist/elements/timeline.js +46 -0
  244. package/dist/elements/todo-list.d.ts +42 -0
  245. package/dist/elements/todo-list.js +59 -0
  246. package/dist/elements/tool-call.d.ts +41 -0
  247. package/dist/elements/tool-call.js +85 -0
  248. package/dist/elements/tool-error.d.ts +39 -0
  249. package/dist/elements/tool-error.js +76 -0
  250. package/dist/elements/tool-group.d.ts +45 -0
  251. package/dist/elements/tool-group.js +71 -0
  252. package/dist/elements/tool-timeline.d.ts +65 -0
  253. package/dist/elements/tool-timeline.js +88 -0
  254. package/dist/elements/trace-waterfall.d.ts +37 -0
  255. package/dist/elements/trace-waterfall.js +69 -0
  256. package/dist/elements/transcript-rules.d.ts +67 -0
  257. package/dist/elements/transcript-rules.js +95 -0
  258. package/dist/elements/turn-footer.d.ts +74 -0
  259. package/dist/elements/turn-footer.js +101 -0
  260. package/dist/elements/typing-indicator.d.ts +16 -0
  261. package/dist/elements/typing-indicator.js +51 -0
  262. package/dist/elements/verdict-row.d.ts +89 -0
  263. package/dist/elements/verdict-row.js +150 -0
  264. package/dist/elements/vocabulary.d.ts +612 -0
  265. package/dist/elements/vocabulary.js +611 -0
  266. package/dist/elements/voice-conversation.d.ts +49 -0
  267. package/dist/elements/voice-conversation.js +123 -0
  268. package/dist/elements/web-preview.d.ts +32 -0
  269. package/dist/elements/web-preview.js +66 -0
  270. package/dist/elements/web-search.d.ts +37 -0
  271. package/dist/elements/web-search.js +66 -0
  272. package/dist/elements/work-collapse.d.ts +103 -0
  273. package/dist/elements/work-collapse.js +131 -0
  274. package/dist/forms/_chassis.d.ts +104 -4
  275. package/dist/forms/_chassis.js +104 -4
  276. package/dist/forms/input-group.d.ts +8 -3
  277. package/dist/forms/input-group.js +8 -3
  278. package/dist/forms/number-field.d.ts +3 -2
  279. package/dist/forms/number-field.js +3 -2
  280. package/dist/icons/containers.d.ts +89 -0
  281. package/dist/icons/containers.js +295 -0
  282. package/dist/icons/index.d.ts +2 -0
  283. package/dist/index.d.ts +12 -6
  284. package/dist/index.js +5 -1
  285. package/dist/instruments/_data-row.js +118 -0
  286. package/dist/instruments/data-row.d.ts +94 -0
  287. package/dist/instruments/data-row.js +151 -0
  288. package/dist/instruments/data-tree.d.ts +126 -0
  289. package/dist/instruments/data-tree.js +303 -0
  290. package/dist/instruments/index.d.ts +5 -2
  291. package/dist/instruments/index.js +4 -1
  292. package/dist/instruments/ledger.d.ts +105 -0
  293. package/dist/instruments/ledger.js +114 -0
  294. package/dist/instruments/table.d.ts +70 -2
  295. package/dist/instruments/table.js +133 -39
  296. package/dist/instruments/two-step-button.js +25 -6
  297. package/dist/layout/sidebar.d.ts +19 -1
  298. package/dist/layout/sidebar.js +19 -1
  299. package/dist/primitives/button.js +11 -1
  300. package/dist/primitives/chip.d.ts +35 -9
  301. package/dist/primitives/chip.js +97 -11
  302. package/dist/system/agent-skin.d.ts +27 -0
  303. package/dist/system/agent-skin.js +20 -0
  304. package/dist/system/portal.d.ts +5 -3
  305. package/dist/system/portal.js +19 -5
  306. package/dist/system/theme-provider.js +54 -9
  307. package/dist/system/use-density.d.ts +9 -0
  308. package/dist/system/use-density.js +9 -0
  309. package/dist/system/use-isomorphic-layout-effect.js +19 -1
  310. package/dist/theming/_presets.d.ts +1 -1
  311. package/dist/theming/_presets.js +74 -11
  312. package/dist/theming/contrast.d.ts +16 -4
  313. package/dist/theming/contrast.js +33 -6
  314. package/dist/theming/create-theme.d.ts +6 -2
  315. package/dist/theming/create-theme.js +32 -5
  316. package/dist/theming/serialize.d.ts +10 -1
  317. package/dist/theming/serialize.js +62 -8
  318. package/manifest/components/activity-graph.json +88 -0
  319. package/manifest/components/agent-card.json +120 -0
  320. package/manifest/components/agent-handoff.json +87 -0
  321. package/manifest/components/agent-mode-badge.json +84 -0
  322. package/manifest/components/agent-plan.json +67 -0
  323. package/manifest/components/agent-status.json +73 -0
  324. package/manifest/components/agent-surface.json +78 -0
  325. package/manifest/components/alert-dialog.json +1 -1
  326. package/manifest/components/animated-number.json +67 -0
  327. package/manifest/components/app-shell.json +142 -9
  328. package/manifest/components/approval-card.json +106 -0
  329. package/manifest/components/artifact-card.json +81 -0
  330. package/manifest/components/audience-icon.json +52 -0
  331. package/manifest/components/autocomplete.json +2 -0
  332. package/manifest/components/background-inbox.json +71 -0
  333. package/manifest/components/branch-picker.json +124 -0
  334. package/manifest/components/button.json +1 -0
  335. package/manifest/components/canvas-split-body.json +62 -0
  336. package/manifest/components/canvas-split-document.json +54 -0
  337. package/manifest/components/canvas-split-header.json +83 -0
  338. package/manifest/components/canvas-split-line.json +62 -0
  339. package/manifest/components/canvas-split-message.json +62 -0
  340. package/manifest/components/canvas-split-thread.json +54 -0
  341. package/manifest/components/canvas-split.json +60 -0
  342. package/manifest/components/catalogue-icon.json +52 -0
  343. package/manifest/components/channel-beta-icon.json +52 -0
  344. package/manifest/components/channel-released-icon.json +52 -0
  345. package/manifest/components/chart.json +93 -0
  346. package/manifest/components/chat-empty-state.json +55 -0
  347. package/manifest/components/chat-panel-assistant-message.json +51 -0
  348. package/manifest/components/chat-panel-composer.json +66 -0
  349. package/manifest/components/chat-panel-messages.json +51 -0
  350. package/manifest/components/chat-panel-typing.json +51 -0
  351. package/manifest/components/chat-panel-user-message.json +51 -0
  352. package/manifest/components/chat-panel.json +57 -0
  353. package/manifest/components/checkpoint-history.json +80 -0
  354. package/manifest/components/chip.json +24 -12
  355. package/manifest/components/clamp.json +102 -0
  356. package/manifest/components/cli-tool-icon.json +52 -0
  357. package/manifest/components/code-diff.json +87 -0
  358. package/manifest/components/code-runner.json +97 -0
  359. package/manifest/components/color-field.json +2 -0
  360. package/manifest/components/color-picker.json +2 -0
  361. package/manifest/components/combobox.json +2 -0
  362. package/manifest/components/compaction-row.json +100 -0
  363. package/manifest/components/comparison-card.json +83 -0
  364. package/manifest/components/composer-actions.json +65 -0
  365. package/manifest/components/composer-attach-button.json +65 -0
  366. package/manifest/components/composer-attachment-chip.json +75 -0
  367. package/manifest/components/composer-attachments.json +60 -0
  368. package/manifest/components/composer-bar.json +73 -0
  369. package/manifest/components/composer-command-item.json +79 -0
  370. package/manifest/components/composer-context.json +67 -0
  371. package/manifest/components/composer-input.json +73 -0
  372. package/manifest/components/composer-menu-item.json +72 -0
  373. package/manifest/components/composer-menu.json +79 -0
  374. package/manifest/components/composer-model-item.json +75 -0
  375. package/manifest/components/composer-model-trigger.json +75 -0
  376. package/manifest/components/composer-person-item.json +79 -0
  377. package/manifest/components/composer-send.json +80 -0
  378. package/manifest/components/composer-toolbar.json +65 -0
  379. package/manifest/components/composer-voice-button.json +68 -0
  380. package/manifest/components/composer-voice.json +75 -0
  381. package/manifest/components/composer.json +2 -0
  382. package/manifest/components/computer-use.json +84 -0
  383. package/manifest/components/confidence-marker.json +74 -0
  384. package/manifest/components/connection-state.json +84 -0
  385. package/manifest/components/context-breakdown.json +65 -0
  386. package/manifest/components/context-usage.json +85 -0
  387. package/manifest/components/conversation-search.json +92 -0
  388. package/manifest/components/cost-meter.json +74 -0
  389. package/manifest/components/cue-portal-frame.json +1 -1
  390. package/manifest/components/data-row.json +203 -0
  391. package/manifest/components/data-tree.json +151 -0
  392. package/manifest/components/date-field.json +2 -0
  393. package/manifest/components/date-picker.json +2 -0
  394. package/manifest/components/date-range-picker.json +2 -0
  395. package/manifest/components/day-separator.json +58 -0
  396. package/manifest/components/delegation-card.json +1 -1
  397. package/manifest/components/density.json +1 -1
  398. package/manifest/components/diagram.json +100 -0
  399. package/manifest/components/document-reference.json +90 -0
  400. package/manifest/components/draft-restore.json +82 -0
  401. package/manifest/components/drawer.json +1 -1
  402. package/manifest/components/dropdown-menu.json +1 -1
  403. package/manifest/components/edit-message.json +105 -0
  404. package/manifest/components/elements-command-palette.json +100 -0
  405. package/manifest/components/elements-composer.json +71 -0
  406. package/manifest/components/elements-data-table.json +68 -0
  407. package/manifest/components/elements-timeline.json +69 -0
  408. package/manifest/components/elicitation-form.json +103 -0
  409. package/manifest/components/empty-state-composer.json +64 -0
  410. package/manifest/components/empty-state-greeting.json +49 -0
  411. package/manifest/components/empty-state-suggestion.json +57 -0
  412. package/manifest/components/empty-state-suggestions.json +49 -0
  413. package/manifest/components/end-of-turn-summary.json +77 -0
  414. package/manifest/components/env-var-input.json +2 -0
  415. package/manifest/components/error-state.json +80 -0
  416. package/manifest/components/feedback-dialog.json +107 -0
  417. package/manifest/components/file-tree.json +83 -0
  418. package/manifest/components/flow-graph.json +75 -0
  419. package/manifest/components/folder-icon.json +52 -0
  420. package/manifest/components/frac.json +59 -0
  421. package/manifest/components/generation-loader.json +64 -0
  422. package/manifest/components/generative-ui.json +93 -0
  423. package/manifest/components/guardrail-notice.json +91 -0
  424. package/manifest/components/hover-card.json +1 -1
  425. package/manifest/components/image-generation.json +67 -0
  426. package/manifest/components/info-tip.json +1 -1
  427. package/manifest/components/inline-citation.json +77 -0
  428. package/manifest/components/input-group.json +4 -2
  429. package/manifest/components/input.json +3 -1
  430. package/manifest/components/job-progress.json +96 -0
  431. package/manifest/components/launcher-bubble.json +105 -0
  432. package/manifest/components/ledger.json +187 -0
  433. package/manifest/components/live-region-announcer.json +79 -0
  434. package/manifest/components/map-answer.json +83 -0
  435. package/manifest/components/markdown-text.json +94 -0
  436. package/manifest/components/math-block.json +74 -0
  437. package/manifest/components/mcp-server-icon.json +52 -0
  438. package/manifest/components/mcp-server-panel.json +87 -0
  439. package/manifest/components/memory-chips.json +65 -0
  440. package/manifest/components/message-actions.json +99 -0
  441. package/manifest/components/message-attachments.json +63 -0
  442. package/manifest/components/message-branches.json +71 -0
  443. package/manifest/components/message-list.json +1 -1
  444. package/manifest/components/message-pair.json +86 -0
  445. package/manifest/components/message-queue.json +74 -0
  446. package/manifest/components/message-timing.json +62 -0
  447. package/manifest/components/mobile-composer.json +126 -0
  448. package/manifest/components/model-picker.json +76 -0
  449. package/manifest/components/multi-select.json +2 -0
  450. package/manifest/components/musical-time-input.json +2 -0
  451. package/manifest/components/node-card.json +1 -1
  452. package/manifest/components/node-handle.json +1 -1
  453. package/manifest/components/number-field.json +3 -1
  454. package/manifest/components/number-ticker.json +61 -0
  455. package/manifest/components/onboarding.json +84 -0
  456. package/manifest/components/otp-field.json +9 -7
  457. package/manifest/components/password-input.json +2 -0
  458. package/manifest/components/permission-grant.json +92 -0
  459. package/manifest/components/permission-scopes.json +139 -0
  460. package/manifest/components/popover.json +1 -1
  461. package/manifest/components/prompt-library.json +99 -0
  462. package/manifest/components/queue-dock.json +110 -0
  463. package/manifest/components/quota-banner.json +94 -0
  464. package/manifest/components/quote-reply.json +105 -0
  465. package/manifest/components/read-aloud.json +111 -0
  466. package/manifest/components/reasoning-effort.json +81 -0
  467. package/manifest/components/reasoning-panel.json +108 -0
  468. package/manifest/components/recommendation-card.json +107 -0
  469. package/manifest/components/regenerate-menu.json +89 -0
  470. package/manifest/components/replay-player.json +102 -0
  471. package/manifest/components/research-report.json +76 -0
  472. package/manifest/components/retrieval-chunks.json +84 -0
  473. package/manifest/components/revert-dock.json +150 -0
  474. package/manifest/components/reviewable-diff.json +93 -0
  475. package/manifest/components/risk-badge.json +74 -0
  476. package/manifest/components/schedule-card.json +101 -0
  477. package/manifest/components/score-breakdown.json +91 -0
  478. package/manifest/components/scroll-anchor.json +72 -0
  479. package/manifest/components/scroll-area.json +7 -7
  480. package/manifest/components/scrub-input.json +2 -0
  481. package/manifest/components/search-input.json +9 -7
  482. package/manifest/components/segmented-control.json +21 -21
  483. package/manifest/components/select.json +1 -0
  484. package/manifest/components/settings-panel.json +118 -0
  485. package/manifest/components/shared-conversation.json +89 -0
  486. package/manifest/components/shimmer-label.json +59 -0
  487. package/manifest/components/skill-icon.json +52 -0
  488. package/manifest/components/sources.json +83 -0
  489. package/manifest/components/speaker-identity.json +61 -0
  490. package/manifest/components/spec-sheet.json +80 -0
  491. package/manifest/components/stack-icon.json +52 -0
  492. package/manifest/components/stacks-matrix-icon.json +52 -0
  493. package/manifest/components/stat.json +1 -1
  494. package/manifest/components/status-bar.json +146 -12
  495. package/manifest/components/status-dot.json +1 -1
  496. package/manifest/components/stopped-run.json +81 -0
  497. package/manifest/components/streaming-text.json +71 -0
  498. package/manifest/components/sub.json +44 -0
  499. package/manifest/components/subagent-list.json +88 -0
  500. package/manifest/components/suggestions.json +84 -0
  501. package/manifest/components/sup.json +44 -0
  502. package/manifest/components/swap-label.json +71 -0
  503. package/manifest/components/table-scroll-region.json +6 -0
  504. package/manifest/components/table.json +88 -4
  505. package/manifest/components/tags-input.json +2 -0
  506. package/manifest/components/tail-status.json +109 -0
  507. package/manifest/components/terminal-block.json +91 -0
  508. package/manifest/components/textarea.json +3 -1
  509. package/manifest/components/theme-provider.json +2 -2
  510. package/manifest/components/thinking-indicator.json +63 -0
  511. package/manifest/components/thread-list.json +76 -0
  512. package/manifest/components/thread-search.json +90 -0
  513. package/manifest/components/threshold-rail.json +2 -2
  514. package/manifest/components/time-boundary.json +62 -0
  515. package/manifest/components/time-field.json +2 -0
  516. package/manifest/components/timeline.json +1 -1
  517. package/manifest/components/title-bar.json +1 -1
  518. package/manifest/components/todo-list.json +69 -0
  519. package/manifest/components/toggle-group.json +9 -7
  520. package/manifest/components/toggle.json +2 -0
  521. package/manifest/components/token-editor.json +1 -1
  522. package/manifest/components/tool-call-card.json +200 -0
  523. package/manifest/components/tool-call.json +119 -0
  524. package/manifest/components/tool-error.json +114 -0
  525. package/manifest/components/tool-group.json +83 -0
  526. package/manifest/components/tool-timeline.json +119 -0
  527. package/manifest/components/toolbar.json +7 -7
  528. package/manifest/components/tooltip.json +1 -1
  529. package/manifest/components/trace-waterfall.json +74 -0
  530. package/manifest/components/turn-footer.json +105 -0
  531. package/manifest/components/typing-indicator.json +53 -0
  532. package/manifest/components/unread-divider.json +55 -0
  533. package/manifest/components/usage-chart.json +1 -1
  534. package/manifest/components/verdict-row.json +91 -0
  535. package/manifest/components/voice-conversation.json +109 -0
  536. package/manifest/components/web-preview.json +87 -0
  537. package/manifest/components/web-search.json +92 -0
  538. package/manifest/components/work-collapse.json +102 -0
  539. package/manifest/manifest.json +2736 -60
  540. package/manifest/tokens.json +22 -1
  541. package/package.json +44 -2
@@ -0,0 +1,105 @@
1
+ import * as React from "react";
2
+ //#region src/instruments/ledger.d.ts
3
+ /** The heading elements a tier or a group may be given. */
4
+ type LedgerHeadingLevel = 2 | 3 | 4;
5
+ interface LedgerRootProps extends React.ComponentPropsWithoutRef<"div"> {
6
+ /**
7
+ * Make the ledger a size container, so a caller's `@container` rules shed
8
+ * columns against the *pane* rather than the viewport. Defaults to `true`.
9
+ *
10
+ * This is the difference between a list that sheds a column when the window
11
+ * narrows and one that also sheds it when a detail drawer opens beside it and
12
+ * takes half the pane — which is the same visual problem and, without a
13
+ * container, an entirely separate piece of code. Switch it off only when an
14
+ * ancestor is already the container the rules name; nesting containers moves
15
+ * which one a bare `@container` query resolves against.
16
+ */
17
+ containment?: boolean;
18
+ }
19
+ interface LedgerTierProps extends React.ComponentPropsWithoutRef<"section"> {
20
+ /**
21
+ * The tier's name. Omitted, the tier draws no heading and reserves no space
22
+ * for one — which is how a single unnamed run of rows uses the same component
23
+ * as a grouped one.
24
+ */
25
+ heading?: React.ReactNode;
26
+ /** How many rows the tier holds, printed beside its name. */
27
+ count?: number;
28
+ /**
29
+ * Dock the heading to the top of the scroll container while the tier's rows
30
+ * scroll past. Defaults to `true`.
31
+ */
32
+ sticky?: boolean;
33
+ /**
34
+ * Which heading element the tier's name is. Defaults to `2`.
35
+ *
36
+ * The outline is the navigation: a screen-reader user moves through a long
37
+ * ledger by heading, so the levels have to describe the real nesting of the
38
+ * page the ledger sits in, not the ledger's own idea of itself.
39
+ */
40
+ headingLevel?: LedgerHeadingLevel;
41
+ /** A qualifier printed after the name — a date, a source, a state. */
42
+ note?: React.ReactNode;
43
+ }
44
+ interface LedgerGroupProps extends React.ComponentPropsWithoutRef<"div"> {
45
+ /**
46
+ * The group's slug, printed in the left gutter.
47
+ *
48
+ * Omitted, the group is a plain block: no gutter, no heading, no indent. A
49
+ * grouped list that has one unnamed run in it should not pay a 7rem empty
50
+ * column for it, and an empty gutter reads as a missing label rather than as
51
+ * an absent one.
52
+ */
53
+ label?: React.ReactNode;
54
+ /** Which heading element the slug is. Defaults to `3`. */
55
+ headingLevel?: 3 | 4;
56
+ /**
57
+ * Dock the slug under the tier heading while the group's rows scroll past.
58
+ * Defaults to `true`.
59
+ *
60
+ * The offset is a custom property, `--cue-ledger-slug-top` (default `2.5rem`):
61
+ * how far down the slug docks depends on how tall the tier heading above it
62
+ * renders, which is a function of the density and the type the *caller*
63
+ * configured. Set it on the ledger — `className="[--cue-ledger-slug-top:2rem]"` —
64
+ * rather than measuring at runtime.
65
+ */
66
+ sticky?: boolean;
67
+ }
68
+ interface LedgerEmptyProps extends React.ComponentPropsWithoutRef<"p"> {}
69
+ /**
70
+ * A grouped run of dense rows under sticky headings: the ledger idiom.
71
+ *
72
+ * The flattest of the three surfaces this package ships over one row model, and
73
+ * the one that does the least: headings, slugs, rows. **Nothing here collapses.**
74
+ * A ledger with a disclosure on it would be a tree with worse semantics, so the
75
+ * component emits no `aria-expanded` anywhere, and a test holds it to that —
76
+ * collapse belongs to `DataTree`, and grouping-with-columns belongs to a
77
+ * grouped `Table`.
78
+ *
79
+ * What it does own is the document outline. Tiers and groups are real `<h2>` /
80
+ * `<h3>` elements at caller-chosen levels, because in a list of two hundred
81
+ * rows the heading list *is* how a screen-reader user navigates.
82
+ *
83
+ * Static markup — no `"use client"`. The rows inside it may be anything;
84
+ * `DataRow` is the intended tenant.
85
+ *
86
+ * @example
87
+ * <Ledger.Root className="[--cue-data-row-cols:1fr_8rem_auto]">
88
+ * <Ledger.Tier heading="Ours" count={12}>
89
+ * <Ledger.Group label="released">
90
+ * <DataRow.Root interactive onActivate={open}>…</DataRow.Root>
91
+ * </Ledger.Group>
92
+ * <Ledger.Group label="lab">
93
+ * <Ledger.Empty>Nothing yet.</Ledger.Empty>
94
+ * </Ledger.Group>
95
+ * </Ledger.Tier>
96
+ * </Ledger.Root>
97
+ */
98
+ declare const Ledger: {
99
+ Root: React.ForwardRefExoticComponent<LedgerRootProps & React.RefAttributes<HTMLDivElement>>;
100
+ Tier: React.ForwardRefExoticComponent<LedgerTierProps & React.RefAttributes<HTMLElement>>;
101
+ Group: React.ForwardRefExoticComponent<LedgerGroupProps & React.RefAttributes<HTMLDivElement>>;
102
+ Empty: React.ForwardRefExoticComponent<LedgerEmptyProps & React.RefAttributes<HTMLParagraphElement>>;
103
+ };
104
+ //#endregion
105
+ export { Ledger, LedgerEmptyProps, LedgerGroupProps, LedgerRootProps, LedgerTierProps };
@@ -0,0 +1,114 @@
1
+ import { cn } from "../lib/cn.js";
2
+ import * as React from "react";
3
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
4
+ //#region src/instruments/ledger.tsx
5
+ /**
6
+ * The one type treatment every heading in the ledger wears: the mono uppercase
7
+ * label of `SectionHeader`, `Eyebrow` and `Table.Head`.
8
+ *
9
+ * Declared once here rather than per heading level so a tier and a group slug
10
+ * can never drift into two label styles; `font-normal` is the part that has to
11
+ * be said out loud, because `<h2>` and `<h3>` come bold by default and a bold
12
+ * micro-label in a dense list reads as a second kind of emphasis.
13
+ */
14
+ const LEDGER_LABEL = "font-mono text-(length:--cue-text-label) font-normal tracking-[0.15em] text-fg-subtle uppercase";
15
+ /** `headingLevel` as a tag name, so the outline is real elements, not roles. */
16
+ const headingTag = (level) => level === 2 ? "h2" : level === 3 ? "h3" : "h4";
17
+ /**
18
+ * A grouped run of dense rows under sticky headings: the ledger idiom.
19
+ *
20
+ * The flattest of the three surfaces this package ships over one row model, and
21
+ * the one that does the least: headings, slugs, rows. **Nothing here collapses.**
22
+ * A ledger with a disclosure on it would be a tree with worse semantics, so the
23
+ * component emits no `aria-expanded` anywhere, and a test holds it to that —
24
+ * collapse belongs to `DataTree`, and grouping-with-columns belongs to a
25
+ * grouped `Table`.
26
+ *
27
+ * What it does own is the document outline. Tiers and groups are real `<h2>` /
28
+ * `<h3>` elements at caller-chosen levels, because in a list of two hundred
29
+ * rows the heading list *is* how a screen-reader user navigates.
30
+ *
31
+ * Static markup — no `"use client"`. The rows inside it may be anything;
32
+ * `DataRow` is the intended tenant.
33
+ *
34
+ * @example
35
+ * <Ledger.Root className="[--cue-data-row-cols:1fr_8rem_auto]">
36
+ * <Ledger.Tier heading="Ours" count={12}>
37
+ * <Ledger.Group label="released">
38
+ * <DataRow.Root interactive onActivate={open}>…</DataRow.Root>
39
+ * </Ledger.Group>
40
+ * <Ledger.Group label="lab">
41
+ * <Ledger.Empty>Nothing yet.</Ledger.Empty>
42
+ * </Ledger.Group>
43
+ * </Ledger.Tier>
44
+ * </Ledger.Root>
45
+ */
46
+ const Ledger = {
47
+ Root: React.forwardRef(function LedgerRoot({ className, containment = true, ...elementProps }, ref) {
48
+ return /* @__PURE__ */ jsx("div", {
49
+ ref,
50
+ "data-slot": "ledger",
51
+ className: cn("flex flex-col font-mono text-(length:--cue-text-ui) text-fg", containment ? "[container-type:inline-size]" : null, className),
52
+ ...elementProps
53
+ });
54
+ }),
55
+ Tier: React.forwardRef(function LedgerTier({ className, heading, count, sticky = true, headingLevel = 2, note, children, ...elementProps }, ref) {
56
+ const Heading = headingTag(headingLevel);
57
+ return /* @__PURE__ */ jsxs("section", {
58
+ ref,
59
+ "data-slot": "ledger-tier",
60
+ className: cn("flex flex-col", className),
61
+ ...elementProps,
62
+ children: [heading === void 0 ? null : /* @__PURE__ */ jsxs(Heading, {
63
+ "data-slot": "ledger-tier-heading",
64
+ className: cn(LEDGER_LABEL, "flex items-baseline gap-(--cue-space-2) py-(--cue-pad-row-y)", sticky ? "sticky top-0 z-2 bg-bg" : null),
65
+ children: [
66
+ /* @__PURE__ */ jsx("span", {
67
+ "data-slot": "ledger-tier-label",
68
+ children: heading
69
+ }),
70
+ count === void 0 ? null : /* @__PURE__ */ jsx("span", {
71
+ "data-slot": "ledger-tier-count",
72
+ className: "tabular-nums",
73
+ children: count
74
+ }),
75
+ note === void 0 ? null : /* @__PURE__ */ jsx("span", {
76
+ "data-slot": "ledger-tier-note",
77
+ className: "tracking-normal normal-case",
78
+ children: note
79
+ })
80
+ ]
81
+ }), children]
82
+ });
83
+ }),
84
+ Group: React.forwardRef(function LedgerGroup({ className, label, headingLevel = 3, sticky = true, children, ...elementProps }, ref) {
85
+ const Heading = headingTag(headingLevel);
86
+ const labelled = label !== void 0;
87
+ return /* @__PURE__ */ jsx("div", {
88
+ ref,
89
+ "data-slot": "ledger-group",
90
+ "data-labelled": labelled ? "" : void 0,
91
+ className: cn(labelled ? "grid [grid-template-columns:var(--cue-ledger-gutter,7rem)_minmax(0,1fr)]" : "flex flex-col", className),
92
+ ...elementProps,
93
+ children: labelled ? /* @__PURE__ */ jsxs(Fragment, { children: [/* @__PURE__ */ jsx(Heading, {
94
+ "data-slot": "ledger-group-label",
95
+ className: cn(LEDGER_LABEL, "min-w-0 truncate py-(--cue-pad-row-y) pr-(--cue-space-3)", sticky ? "sticky self-start [top:var(--cue-ledger-slug-top,2.5rem)] bg-bg" : null),
96
+ children: label
97
+ }), /* @__PURE__ */ jsx("div", {
98
+ "data-slot": "ledger-group-rows",
99
+ className: "flex min-w-0 flex-col",
100
+ children
101
+ })] }) : children
102
+ });
103
+ }),
104
+ Empty: React.forwardRef(function LedgerEmpty({ className, ...elementProps }, ref) {
105
+ return /* @__PURE__ */ jsx("p", {
106
+ ref,
107
+ "data-slot": "ledger-empty",
108
+ className: cn("px-(--cue-pad-row-x) py-(--cue-pad-row-y) font-mono text-(length:--cue-text-ui) text-fg-subtle", className),
109
+ ...elementProps
110
+ });
111
+ })
112
+ };
113
+ //#endregion
114
+ export { Ledger };
@@ -14,10 +14,69 @@ interface TableScrollRegionProps extends Omit<React.ComponentPropsWithoutRef<"di
14
14
  declare const TableScrollRegion: React.ForwardRefExoticComponent<TableScrollRegionProps & React.RefAttributes<HTMLDivElement>>;
15
15
  interface TableRootProps extends React.ComponentPropsWithoutRef<"table"> {}
16
16
  interface TableSectionProps extends React.ComponentPropsWithoutRef<"tbody"> {}
17
- interface TableRowProps extends React.ComponentPropsWithoutRef<"tr"> {}
17
+ interface TableRowProps extends React.ComponentPropsWithoutRef<"tr"> {
18
+ /**
19
+ * The row responds to a pointer: the row-hover wash and a pointer cursor
20
+ * across the whole row. Defaults to `false`.
21
+ *
22
+ * Opt-in rather than automatic, because a table of figures nobody can click
23
+ * that lit up under the pointer would be promising an interaction it does not
24
+ * have. Wiring the row up to actually do something — a click handler, a
25
+ * keyboard path to the same thing — stays the caller's job; this is the paint.
26
+ */
27
+ interactive?: boolean;
28
+ /**
29
+ * Draw the row as picked out of the table. Defaults to `false`.
30
+ *
31
+ * Sets `data-selected`, which is what the tint and the hover-revealed
32
+ * `DataRow.Actions` inside the row both key off — so a hand-written
33
+ * `<tr data-selected>` in a data-driven body gets exactly the same treatment.
34
+ */
35
+ selected?: boolean;
36
+ }
18
37
  interface TableHeadProps extends React.ComponentPropsWithoutRef<"th"> {
19
38
  /** Right-align this column and set it in tabular figures. */
20
39
  numeric?: boolean;
40
+ /**
41
+ * Dock the header band to the top of the scroll container while the rows
42
+ * scroll under it. Defaults to `false`.
43
+ *
44
+ * Set it on the cells, not on the `<tr>`: sticky on a table row is honoured
45
+ * inconsistently across engines, and the cell is the reliable baseline
46
+ * everywhere.
47
+ */
48
+ sticky?: boolean;
49
+ }
50
+ interface TableGroupRowProps extends Omit<React.ComponentPropsWithoutRef<"tr">, "children"> {
51
+ /**
52
+ * How many columns the divider spans. Required: it must equal the table's
53
+ * column count, or the group's cell stops covering the row and the columns
54
+ * below it shift by one.
55
+ */
56
+ span: number;
57
+ /** What the group is called. */
58
+ label: React.ReactNode;
59
+ /** How many rows the group holds, printed beside its name. */
60
+ count?: number;
61
+ /**
62
+ * Dock the divider under the header band while the group's rows scroll past.
63
+ * Defaults to `false`.
64
+ *
65
+ * The offset is the custom property `--cue-table-group-top` (default `0`):
66
+ * how far down the divider docks is the rendered height of the sticky header
67
+ * above it, which depends on the density and type the caller configured. Set
68
+ * it on the table — `className="[--cue-table-group-top:2rem]"` — rather than
69
+ * measuring at runtime.
70
+ */
71
+ sticky?: boolean;
72
+ /**
73
+ * Classes for the divider's *cell*, not its row.
74
+ *
75
+ * The `<tr>` paints nothing — the ground, the type and the sticky offset all
76
+ * live on the `<th>` that spans it, and a background on the row would sit
77
+ * behind the cell's own. Every other prop, and the ref, go to the row.
78
+ */
79
+ className?: string;
21
80
  }
22
81
  interface TableCellProps extends React.ComponentPropsWithoutRef<"td"> {
23
82
  /** Right-align this cell and set it in tabular figures. */
@@ -35,6 +94,14 @@ interface TableCaptionProps extends React.ComponentPropsWithoutRef<"caption"> {}
35
94
  * Static markup — no `"use client"`. Compose it with `Panel` for the rim.
36
95
  * Use {@link TableScrollRegion} only when the table can exceed its container.
37
96
  *
97
+ * For a grouped list, the table stays *one* table: `Table.Head sticky` docks the
98
+ * column names, and one `Table.Body` per group opens with a `Table.GroupRow`
99
+ * divider — so the columns are named once and scan straight through every group
100
+ * boundary. Rows may hold `DataRow` slots, and `DataRow.Actions` reveals inside
101
+ * a cell on hover and on selection exactly as it does in a `Ledger` row — on
102
+ * focus too, once the row holds something focusable outside the track, which a
103
+ * `<tr>` never is by itself. See {@link TableRowProps.interactive}.
104
+ *
38
105
  * @example
39
106
  * <Table.Root>
40
107
  * <Table.Header>
@@ -56,9 +123,10 @@ declare const Table: {
56
123
  Header: React.ForwardRefExoticComponent<TableSectionProps & React.RefAttributes<HTMLTableSectionElement>>;
57
124
  Body: React.ForwardRefExoticComponent<TableSectionProps & React.RefAttributes<HTMLTableSectionElement>>;
58
125
  Row: React.ForwardRefExoticComponent<TableRowProps & React.RefAttributes<HTMLTableRowElement>>;
126
+ GroupRow: React.ForwardRefExoticComponent<TableGroupRowProps & React.RefAttributes<HTMLTableRowElement>>;
59
127
  Head: React.ForwardRefExoticComponent<TableHeadProps & React.RefAttributes<HTMLTableCellElement>>;
60
128
  Cell: React.ForwardRefExoticComponent<TableCellProps & React.RefAttributes<HTMLTableCellElement>>;
61
129
  Caption: React.ForwardRefExoticComponent<TableCaptionProps & React.RefAttributes<HTMLTableCaptionElement>>;
62
130
  };
63
131
  //#endregion
64
- export { Table, TableCaptionProps, TableCellProps, TableHeadProps, TableRootProps, TableRowProps, TableScrollRegion, TableScrollRegionProps, TableSectionProps };
132
+ export { Table, TableCaptionProps, TableCellProps, TableGroupRowProps, TableHeadProps, TableRootProps, TableRowProps, TableScrollRegion, TableScrollRegionProps, TableSectionProps };
@@ -1,6 +1,6 @@
1
1
  import { cn } from "../lib/cn.js";
2
2
  import * as React from "react";
3
- import { jsx } from "react/jsx-runtime";
3
+ import { jsx, jsxs } from "react/jsx-runtime";
4
4
  //#region src/instruments/table.tsx
5
5
  /**
6
6
  * A named horizontal viewport for a table wider than its container.
@@ -20,6 +20,108 @@ const TableScrollRegion = React.forwardRef(function TableScrollRegion({ classNam
20
20
  });
21
21
  });
22
22
  /**
23
+ * The table frame. Owns the type, the collapse and the numeric alignment rule.
24
+ *
25
+ * `data-numeric` is the contract, not a prop: the alignment and
26
+ * `tabular-nums` live in one descendant selector here, so a hand-written
27
+ * `<td data-numeric>` inside a data-driven body lines up exactly like a
28
+ * `<Table.Cell numeric>`. Figures that do not share a column width are
29
+ * unreadable as a column, which is the whole point of a table.
30
+ */
31
+ const TableRoot = React.forwardRef(function TableRoot({ className, ...elementProps }, ref) {
32
+ return /* @__PURE__ */ jsx("table", {
33
+ ref,
34
+ "data-slot": "table",
35
+ className: cn("w-full border-collapse font-mono text-(length:--cue-text-ui) text-fg", "[&_[data-numeric]]:text-right [&_[data-numeric]]:tabular-nums", className),
36
+ ...elementProps
37
+ });
38
+ });
39
+ /** The header band. Sticky-able by the caller; sized by the row padding tokens. */
40
+ const TableHeader = React.forwardRef(function TableHeader({ className, ...elementProps }, ref) {
41
+ return /* @__PURE__ */ jsx("thead", {
42
+ ref,
43
+ "data-slot": "table-header",
44
+ className,
45
+ ...elementProps
46
+ });
47
+ });
48
+ /** The data band. */
49
+ const TableBody = React.forwardRef(function TableBody({ className, ...elementProps }, ref) {
50
+ return /* @__PURE__ */ jsx("tbody", {
51
+ ref,
52
+ "data-slot": "table-body",
53
+ className,
54
+ ...elementProps
55
+ });
56
+ });
57
+ /**
58
+ * One row, separated by a hairline underneath — dropped on the last row so the
59
+ * table never draws a rule against the panel rim it sits in. In a `<thead>` the
60
+ * "last row" is the header row itself, so the header's own bottom border (on
61
+ * the cells) is the only rule there and the two can never stack into 2px.
62
+ *
63
+ * Every row carries the `group/data-row` name unconditionally. It paints
64
+ * nothing by itself, and it is what lets a `DataRow.Actions` cluster inside a
65
+ * `Table.Cell` reveal on hover, on focus and on selection with no second
66
+ * implementation of that idiom for the table — the whole point of the three
67
+ * idioms sharing one row anatomy.
68
+ *
69
+ * **The focus half of that reveal is the caller's to supply here.** A `<tr>` is
70
+ * not focusable and this component does not make it one — a tab stop on every
71
+ * row of a long table is a tab stop a keyboard user has to walk past hundreds
72
+ * of times, which is the reason `Ledger` rows opt in individually. So the
73
+ * reveal-on-focus only happens if the row *contains* something focusable
74
+ * outside the hidden track: a link on the row's name, a checkbox in the leading
75
+ * cell, any real control. Without one, `:focus-within` can never fire — content
76
+ * inside a `visibility: hidden` subtree cannot be focused, so the track cannot
77
+ * bootstrap its own reveal — and a hidden action cluster is then reachable by
78
+ * pointer only, which is a WCAG 2.1.1 failure the screen gives no sign of. A
79
+ * table whose only per-row controls live in a hidden track wants either a
80
+ * focusable cell beside it or an always-visible cluster.
81
+ *
82
+ * The selected tint is the row's, not the cell's: a `background` on the `<tr>`
83
+ * shows through every cell in it, so the fill cannot end up ragged where one
84
+ * cell sets a ground of its own.
85
+ */
86
+ const TableRow = React.forwardRef(function TableRow({ className, interactive = false, selected = false, ...elementProps }, ref) {
87
+ return /* @__PURE__ */ jsx("tr", {
88
+ ref,
89
+ "data-slot": "table-row",
90
+ "data-selected": selected ? "" : void 0,
91
+ className: cn("group/data-row border-b border-border last:border-b-0 data-[selected]:bg-accent-soft", interactive ? "cursor-pointer hover:bg-(--cue-row-hover)" : null, className),
92
+ ...elementProps
93
+ });
94
+ });
95
+ /**
96
+ * A column heading: the same mono uppercase label as `SectionHeader` and
97
+ * `Eyebrow`, on the raised surface so the band reads as chrome rather than as
98
+ * the first row of data.
99
+ *
100
+ * **Sticky swaps the bottom border for an inset shadow.** `Table.Root` collapses
101
+ * its borders, and a collapsed border belongs to the table's shared grid rather
102
+ * than to the cell — so when a cell detaches to stay at the top of the scroll
103
+ * container, its rule stays behind with the rows and the stuck band appears to
104
+ * lose its edge. An inset `box-shadow` is a paint effect on the cell itself, so
105
+ * it travels with it. The alternative — putting the whole table on
106
+ * `border-separate` — would change the geometry of every table in the library
107
+ * to fix one that scrolls.
108
+ *
109
+ * The opaque `bg-surface-1` is not decoration either: a transparent sticky cell
110
+ * is a sticky cell you read the rows through. A caller who wants the header on
111
+ * the page's own ground can pass `className="bg-bg"` — what it must not pass is
112
+ * nothing.
113
+ */
114
+ const TableHead = React.forwardRef(function TableHead({ className, numeric = false, sticky = false, scope = "col", ...elementProps }, ref) {
115
+ return /* @__PURE__ */ jsx("th", {
116
+ ref,
117
+ scope,
118
+ "data-slot": "table-head",
119
+ "data-numeric": numeric ? "" : void 0,
120
+ className: cn("border-b border-border bg-surface-1 px-(--cue-pad-row-x) py-(--cue-pad-row-y) text-left font-mono text-(length:--cue-text-label) font-normal tracking-[0.15em] whitespace-nowrap text-fg-subtle uppercase", sticky ? "sticky top-0 z-3 border-b-0 shadow-[inset_0_-1px_0_var(--cue-hair-strong)]" : null, className),
121
+ ...elementProps
122
+ });
123
+ });
124
+ /**
23
125
  * The canonical console table: hairlines, mono figures, no zebra striping.
24
126
  *
25
127
  * Semantic `<table>` markup throughout — a grid of divs loses row/column
@@ -30,6 +132,14 @@ const TableScrollRegion = React.forwardRef(function TableScrollRegion({ classNam
30
132
  * Static markup — no `"use client"`. Compose it with `Panel` for the rim.
31
133
  * Use {@link TableScrollRegion} only when the table can exceed its container.
32
134
  *
135
+ * For a grouped list, the table stays *one* table: `Table.Head sticky` docks the
136
+ * column names, and one `Table.Body` per group opens with a `Table.GroupRow`
137
+ * divider — so the columns are named once and scan straight through every group
138
+ * boundary. Rows may hold `DataRow` slots, and `DataRow.Actions` reveals inside
139
+ * a cell on hover and on selection exactly as it does in a `Ledger` row — on
140
+ * focus too, once the row holds something focusable outside the track, which a
141
+ * `<tr>` never is by itself. See {@link TableRowProps.interactive}.
142
+ *
33
143
  * @example
34
144
  * <Table.Root>
35
145
  * <Table.Header>
@@ -47,48 +157,32 @@ const TableScrollRegion = React.forwardRef(function TableScrollRegion({ classNam
47
157
  * </Table.Root>
48
158
  */
49
159
  const Table = {
50
- Root: React.forwardRef(function TableRoot({ className, ...elementProps }, ref) {
51
- return /* @__PURE__ */ jsx("table", {
52
- ref,
53
- "data-slot": "table",
54
- className: cn("w-full border-collapse font-mono text-(length:--cue-text-ui) text-fg", "[&_[data-numeric]]:text-right [&_[data-numeric]]:tabular-nums", className),
55
- ...elementProps
56
- });
57
- }),
58
- Header: React.forwardRef(function TableHeader({ className, ...elementProps }, ref) {
59
- return /* @__PURE__ */ jsx("thead", {
60
- ref,
61
- "data-slot": "table-header",
62
- className,
63
- ...elementProps
64
- });
65
- }),
66
- Body: React.forwardRef(function TableBody({ className, ...elementProps }, ref) {
67
- return /* @__PURE__ */ jsx("tbody", {
68
- ref,
69
- "data-slot": "table-body",
70
- className,
71
- ...elementProps
72
- });
73
- }),
74
- Row: React.forwardRef(function TableRow({ className, ...elementProps }, ref) {
160
+ Root: TableRoot,
161
+ Header: TableHeader,
162
+ Body: TableBody,
163
+ Row: TableRow,
164
+ GroupRow: React.forwardRef(function TableGroupRow({ className, span, label, count, sticky = false, ...elementProps }, ref) {
75
165
  return /* @__PURE__ */ jsx("tr", {
76
166
  ref,
77
- "data-slot": "table-row",
78
- className: cn("border-b border-border last:border-b-0", className),
79
- ...elementProps
80
- });
81
- }),
82
- Head: React.forwardRef(function TableHead({ className, numeric = false, scope = "col", ...elementProps }, ref) {
83
- return /* @__PURE__ */ jsx("th", {
84
- ref,
85
- scope,
86
- "data-slot": "table-head",
87
- "data-numeric": numeric ? "" : void 0,
88
- className: cn("border-b border-border bg-surface-1 px-(--cue-pad-row-x) py-(--cue-pad-row-y) text-left font-mono text-(length:--cue-text-label) font-normal tracking-[0.15em] whitespace-nowrap text-fg-subtle uppercase", className),
89
- ...elementProps
167
+ "data-slot": "table-group-row",
168
+ ...elementProps,
169
+ children: /* @__PURE__ */ jsxs("th", {
170
+ colSpan: span,
171
+ scope: "rowgroup",
172
+ "data-slot": "table-group-cell",
173
+ className: cn("bg-bg px-(--cue-pad-row-x) py-(--cue-pad-row-y) text-left font-mono text-(length:--cue-text-label) font-normal tracking-[0.15em] whitespace-nowrap text-fg-subtle uppercase", sticky ? "sticky z-2 [top:var(--cue-table-group-top,0px)]" : null, className),
174
+ children: [/* @__PURE__ */ jsx("span", {
175
+ "data-slot": "table-group-label",
176
+ children: label
177
+ }), count === void 0 ? null : /* @__PURE__ */ jsx("span", {
178
+ "data-slot": "table-group-count",
179
+ className: "ml-(--cue-space-2) tabular-nums",
180
+ children: count
181
+ })]
182
+ })
90
183
  });
91
184
  }),
185
+ Head: TableHead,
92
186
  Cell: React.forwardRef(function TableCell({ className, numeric = false, ...elementProps }, ref) {
93
187
  return /* @__PURE__ */ jsx("td", {
94
188
  ref,
@@ -7,14 +7,33 @@ import { jsx, jsxs } from "react/jsx-runtime";
7
7
  /**
8
8
  * The armed confirm button's fill.
9
9
  *
10
- * The ink is a literal rather than a token because there is no `--cue-warn-fg`
11
- * or `--cue-danger-fg` in the palette — the same pragmatism as `Button`'s
12
- * `danger` variant, which is also `text-white`. Every theme's `warn` is an
13
- * amber and every theme's `danger` is a red, so the two literals hold.
10
+ * Both tones now take the ink their own theme authors against them —
11
+ * `danger-fg` on the red, `warn-fg` on the amber — which is the same shape
12
+ * `Button`'s `danger` variant and `RevertDock`'s confirm paint on the red, and
13
+ * the only place in the package the amber's ink is spent.
14
+ *
15
+ * Both replaced literals, and both literals were wrong in the same way. The
16
+ * red's `text-white` measured 2.99:1 on cue's dark block, which is the default
17
+ * theme. The amber's `text-black` was the better guess of the two — an amber is
18
+ * usually light — but "usually" is not a measurement: it fell to 3.58:1 on
19
+ * requestport's light amber, 3.74:1 on dusk's and 4.22:1 on cue's own, because
20
+ * a light theme darkens its amber to clear the paper and a darkened amber wants
21
+ * paper back. Neither pairing could be fixed by choosing a better literal:
22
+ * which ink a tone can carry is a property of that tone, so each theme derives
23
+ * one. Both tokens clear 4.5:1 on all twenty shipped blocks, and
24
+ * `test/destructive-ink.test.ts` measures this string rather than trusting it.
25
+ *
26
+ * Both tokens are spelled without their prefix on purpose. `tokensUsed` in the
27
+ * package manifest is scanned out of the source text, *comments included*, so a
28
+ * `--cue-…` written in prose is published as a token this component resolves
29
+ * whether or not any class string resolves one. Spelling the amber's ink that
30
+ * way while the palette still had none would have published a token that did
31
+ * not exist; spelling it that way now would still put the claim in the wrong
32
+ * place. The class strings below are where this component names its tokens.
14
33
  */
15
34
  const CONFIRM_TONES = {
16
- danger: "border-transparent bg-danger text-white hover:opacity-90",
17
- warn: "border-transparent bg-warn text-black hover:opacity-90"
35
+ danger: "border-transparent bg-danger text-danger-fg hover:opacity-90",
36
+ warn: "border-transparent bg-warn text-warn-fg hover:opacity-90"
18
37
  };
19
38
  /** The idle trigger: outline only, so a destructive action is never the loudest thing on screen. */
20
39
  const IDLE_TONES = {
@@ -5,7 +5,25 @@ interface SidebarContextValue {
5
5
  collapsed: boolean;
6
6
  toggle: () => void;
7
7
  }
8
- /** Read the collapse state of the nearest {@link SidebarRoot}. */
8
+ /**
9
+ * Read the collapse state of the nearest {@link SidebarRoot}.
10
+ *
11
+ * Hands back `{ collapsed, toggle }`: whether the column is at its narrow
12
+ * width, and the same valve `Sidebar.Rail` pulls. It is for the part the kit
13
+ * does not ship — a footer that drops its labels when the column narrows, a
14
+ * keyboard shortcut, a collapse control somewhere other than the rail.
15
+ *
16
+ * Outside a `Sidebar.Root` it reports `collapsed: false` and a `toggle` that
17
+ * does nothing, rather than throwing. A row rendered on its own — in a test, on
18
+ * a docs page, in a menu that reuses the same markup — is a legitimate thing,
19
+ * and the honest answer for it is that nothing is collapsed.
20
+ *
21
+ * @example
22
+ * const { collapsed } = useSidebar();
23
+ * <Button variant="ghost" icon={Plus} aria-label="New scene">
24
+ * {collapsed ? null : "New scene"}
25
+ * </Button>
26
+ */
9
27
  declare function useSidebar(): SidebarContextValue;
10
28
  /**
11
29
  * Which landmark a navigation column announces as.
@@ -15,7 +15,25 @@ const SidebarContext = React.createContext({
15
15
  collapsed: false,
16
16
  toggle: () => {}
17
17
  });
18
- /** Read the collapse state of the nearest {@link SidebarRoot}. */
18
+ /**
19
+ * Read the collapse state of the nearest {@link SidebarRoot}.
20
+ *
21
+ * Hands back `{ collapsed, toggle }`: whether the column is at its narrow
22
+ * width, and the same valve `Sidebar.Rail` pulls. It is for the part the kit
23
+ * does not ship — a footer that drops its labels when the column narrows, a
24
+ * keyboard shortcut, a collapse control somewhere other than the rail.
25
+ *
26
+ * Outside a `Sidebar.Root` it reports `collapsed: false` and a `toggle` that
27
+ * does nothing, rather than throwing. A row rendered on its own — in a test, on
28
+ * a docs page, in a menu that reuses the same markup — is a legitimate thing,
29
+ * and the honest answer for it is that nothing is collapsed.
30
+ *
31
+ * @example
32
+ * const { collapsed } = useSidebar();
33
+ * <Button variant="ghost" icon={Plus} aria-label="New scene">
34
+ * {collapsed ? null : "New scene"}
35
+ * </Button>
36
+ */
19
37
  function useSidebar() {
20
38
  return React.useContext(SidebarContext);
21
39
  }
@@ -26,6 +26,16 @@ const buttonChassis = "inline-flex select-none items-center justify-center gap-[
26
26
  * reads as white-on-black in `cue` and cyan-on-near-black in `terminal` with no
27
27
  * per-theme branching here.
28
28
  *
29
+ * `danger` is one of the two tones this system fills a control with — the other
30
+ * is the amber on `TwoStepButton`'s confirm — and they are the two the palette
31
+ * gives an ink of their own. It used to be painted `text-white`, a
32
+ * literal chosen when there was nothing else to choose: white measures 2.99:1
33
+ * on cue's own red in dark mode — the default theme, under AA and under the 3:1
34
+ * floor a non-text control gets — and under AA on eight of the ten dark blocks
35
+ * this system ships. `--cue-danger-fg` is authored against each theme's red and
36
+ * clears 4.5:1 on all twenty. `test/destructive-ink.test.ts` measures it here,
37
+ * at the call site, rather than measuring the token pair on its own.
38
+ *
29
39
  * @internal Not part of the public API; imported by `icon-button.tsx`.
30
40
  */
31
41
  const buttonTones = {
@@ -33,7 +43,7 @@ const buttonTones = {
33
43
  secondary: "border border-border text-fg-muted hover:border-border-strong hover:text-fg bg-surface-2",
34
44
  ghost: "text-fg-muted hover:text-fg hover:bg-surface-2 border border-transparent",
35
45
  outline: "border border-border text-fg hover:border-accent hover:text-accent bg-transparent",
36
- danger: "bg-danger text-white hover:opacity-90 border border-transparent",
46
+ danger: "bg-danger text-danger-fg hover:opacity-90 border border-transparent",
37
47
  "danger-outline": "border text-danger bg-transparent hover:bg-danger/10 border-danger/40"
38
48
  };
39
49
  /**