@elabs-ai/components-ai 4.2.0 → 5.1.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 (462) hide show
  1. package/README.md +1 -1
  2. package/dist/{_audio-player-media-chrome-T3XVXWRZ.js → _audio-player-media-chrome.js} +1 -1
  3. package/dist/_code-block-theme.js +12 -0
  4. package/dist/_code-block-theme.js.map +1 -0
  5. package/dist/{_flow-boundary-SHNWLQG5.js → _flow-boundary.js} +1 -1
  6. package/dist/_flow-boundary.js.map +1 -0
  7. package/dist/_flow-lazy.js +8 -0
  8. package/dist/_flow-lazy.js.map +1 -0
  9. package/dist/_lazy-boundary-conformance.js +2 -0
  10. package/dist/_lazy-boundary-conformance.js.map +1 -0
  11. package/dist/_lazy-cjk.js +13 -0
  12. package/dist/_lazy-cjk.js.map +1 -0
  13. package/dist/_lazy-engine-boundary.js +9 -0
  14. package/dist/_lazy-engine-boundary.js.map +1 -0
  15. package/dist/_lazy-math.js +13 -0
  16. package/dist/_lazy-math.js.map +1 -0
  17. package/dist/_lazy-mermaid.js +12 -0
  18. package/dist/_lazy-mermaid.js.map +1 -0
  19. package/dist/_mermaid-error-panel.js +9 -0
  20. package/dist/_mermaid-error-panel.js.map +1 -0
  21. package/dist/{_persona-rive-JEG44YHX.js → _persona-rive.js} +19 -24
  22. package/dist/_persona-rive.js.map +1 -0
  23. package/dist/_streamdown-i18n.js +21 -0
  24. package/dist/_streamdown-i18n.js.map +1 -0
  25. package/dist/_streamdown-safety.js +10 -0
  26. package/dist/_streamdown-safety.js.map +1 -0
  27. package/dist/_theme-scope-store.js +13 -0
  28. package/dist/_theme-scope-store.js.map +1 -0
  29. package/dist/a2ui/a2ui-surface.js +17 -0
  30. package/dist/a2ui/a2ui-surface.js.map +1 -0
  31. package/dist/a2ui/core/catalog.generated.js +10 -0
  32. package/dist/a2ui/core/catalog.generated.js.map +1 -0
  33. package/dist/a2ui/core/complete-json.js +10 -0
  34. package/dist/a2ui/core/complete-json.js.map +1 -0
  35. package/dist/a2ui/core/index.js +37 -0
  36. package/dist/a2ui/core/index.js.map +1 -0
  37. package/dist/a2ui/core/schema.js +11 -0
  38. package/dist/a2ui/core/schema.js.map +1 -0
  39. package/dist/a2ui/core/spec.js +10 -0
  40. package/dist/a2ui/core/spec.js.map +1 -0
  41. package/dist/a2ui/core/validate.js +16 -0
  42. package/dist/a2ui/core/validate.js.map +1 -0
  43. package/dist/a2ui/index.js +54 -0
  44. package/dist/a2ui/index.js.map +1 -0
  45. package/dist/a2ui/ui-catalog.js +18 -0
  46. package/dist/a2ui/ui-catalog.js.map +1 -0
  47. package/dist/agent-event.js +10 -0
  48. package/dist/agent-event.js.map +1 -0
  49. package/dist/agent-timeline.js +11 -0
  50. package/dist/agent-timeline.js.map +1 -0
  51. package/dist/agent.js +25 -0
  52. package/dist/agent.js.map +1 -0
  53. package/dist/artifact.js +23 -0
  54. package/dist/artifact.js.map +1 -0
  55. package/dist/asset-preview.js +22 -0
  56. package/dist/asset-preview.js.map +1 -0
  57. package/dist/attachments.js +33 -0
  58. package/dist/attachments.js.map +1 -0
  59. package/dist/audio-player.js +30 -0
  60. package/dist/audio-player.js.map +1 -0
  61. package/dist/audio-visualizer.js +9 -0
  62. package/dist/audio-visualizer.js.map +1 -0
  63. package/dist/canvas.js +10 -0
  64. package/dist/canvas.js.map +1 -0
  65. package/dist/chain-of-thought.js +22 -0
  66. package/dist/chain-of-thought.js.map +1 -0
  67. package/dist/chat-greeting.js +8 -0
  68. package/dist/chat-greeting.js.map +1 -0
  69. package/dist/chat-shell.js +9 -0
  70. package/dist/chat-shell.js.map +1 -0
  71. package/dist/checkpoint.js +13 -0
  72. package/dist/checkpoint.js.map +1 -0
  73. package/dist/chunk-2XOIG5TG.js +72 -0
  74. package/dist/chunk-2XOIG5TG.js.map +1 -0
  75. package/dist/chunk-34CQ2VHM.js +172 -0
  76. package/dist/chunk-34CQ2VHM.js.map +1 -0
  77. package/dist/chunk-3TDHPXZZ.js +60 -0
  78. package/dist/chunk-3TDHPXZZ.js.map +1 -0
  79. package/dist/chunk-3XNPMDZY.js +478 -0
  80. package/dist/chunk-3XNPMDZY.js.map +1 -0
  81. package/dist/chunk-3YPT3V7L.js +56 -0
  82. package/dist/chunk-3YPT3V7L.js.map +1 -0
  83. package/dist/chunk-475UEU2Q.js +87 -0
  84. package/dist/chunk-475UEU2Q.js.map +1 -0
  85. package/dist/chunk-4CBTII2I.js +95 -0
  86. package/dist/chunk-4CBTII2I.js.map +1 -0
  87. package/dist/chunk-4XRNIZMG.js +22 -0
  88. package/dist/chunk-4XRNIZMG.js.map +1 -0
  89. package/dist/chunk-5NNWUKK5.js +2 -0
  90. package/dist/chunk-5NNWUKK5.js.map +1 -0
  91. package/dist/chunk-5UOMU27Z.js +164 -0
  92. package/dist/chunk-5UOMU27Z.js.map +1 -0
  93. package/dist/chunk-5VGYZ62I.js +264 -0
  94. package/dist/chunk-5VGYZ62I.js.map +1 -0
  95. package/dist/chunk-6IQPH2OS.js +21 -0
  96. package/dist/chunk-6IQPH2OS.js.map +1 -0
  97. package/dist/chunk-6PB2MXCI.js +482 -0
  98. package/dist/chunk-6PB2MXCI.js.map +1 -0
  99. package/dist/chunk-7FD5CZEU.js +215 -0
  100. package/dist/chunk-7FD5CZEU.js.map +1 -0
  101. package/dist/chunk-7RL6KZDF.js +266 -0
  102. package/dist/chunk-7RL6KZDF.js.map +1 -0
  103. package/dist/chunk-ADOYAGGK.js +482 -0
  104. package/dist/chunk-ADOYAGGK.js.map +1 -0
  105. package/dist/chunk-BA3AEMOU.js +21 -0
  106. package/dist/chunk-BA3AEMOU.js.map +1 -0
  107. package/dist/chunk-BBHFOYML.js +336 -0
  108. package/dist/chunk-BBHFOYML.js.map +1 -0
  109. package/dist/chunk-BHUVISIY.js +221 -0
  110. package/dist/chunk-BHUVISIY.js.map +1 -0
  111. package/dist/chunk-BM2LWERA.js +100 -0
  112. package/dist/chunk-BM2LWERA.js.map +1 -0
  113. package/dist/chunk-CMOYXNPJ.js +211 -0
  114. package/dist/chunk-CMOYXNPJ.js.map +1 -0
  115. package/dist/chunk-CZP3RHC4.js +74 -0
  116. package/dist/chunk-CZP3RHC4.js.map +1 -0
  117. package/dist/chunk-DDG5JHQT.js +112 -0
  118. package/dist/chunk-DDG5JHQT.js.map +1 -0
  119. package/dist/chunk-DJODXO7I.js +38 -0
  120. package/dist/chunk-DJODXO7I.js.map +1 -0
  121. package/dist/chunk-DWJDJLPU.js +192 -0
  122. package/dist/chunk-DWJDJLPU.js.map +1 -0
  123. package/dist/chunk-DZW6LM22.js +45 -0
  124. package/dist/chunk-DZW6LM22.js.map +1 -0
  125. package/dist/chunk-ELGCZLZF.js +305 -0
  126. package/dist/chunk-ELGCZLZF.js.map +1 -0
  127. package/dist/chunk-EV3U6ZZB.js +209 -0
  128. package/dist/chunk-EV3U6ZZB.js.map +1 -0
  129. package/dist/chunk-EY7LVUKQ.js +87 -0
  130. package/dist/chunk-EY7LVUKQ.js.map +1 -0
  131. package/dist/chunk-F4C74F7M.js +230 -0
  132. package/dist/chunk-F4C74F7M.js.map +1 -0
  133. package/dist/chunk-FERYDFZA.js +108 -0
  134. package/dist/chunk-FERYDFZA.js.map +1 -0
  135. package/dist/chunk-FUIYG2DS.js +166 -0
  136. package/dist/chunk-FUIYG2DS.js.map +1 -0
  137. package/dist/chunk-GA7M34KU.js +236 -0
  138. package/dist/chunk-GA7M34KU.js.map +1 -0
  139. package/dist/chunk-GKYZT3LA.js +136 -0
  140. package/dist/chunk-GKYZT3LA.js.map +1 -0
  141. package/dist/chunk-H42LRUQ4.js +102 -0
  142. package/dist/chunk-H42LRUQ4.js.map +1 -0
  143. package/dist/chunk-HVXM2G5F.js +222 -0
  144. package/dist/chunk-HVXM2G5F.js.map +1 -0
  145. package/dist/chunk-I4RDAGVY.js +53 -0
  146. package/dist/chunk-I4RDAGVY.js.map +1 -0
  147. package/dist/chunk-IQJG4IDX.js +208 -0
  148. package/dist/chunk-IQJG4IDX.js.map +1 -0
  149. package/dist/chunk-IX2PXG4Y.js +144 -0
  150. package/dist/chunk-IX2PXG4Y.js.map +1 -0
  151. package/dist/chunk-IXICSOOP.js +287 -0
  152. package/dist/chunk-IXICSOOP.js.map +1 -0
  153. package/dist/chunk-JY5HSN4D.js +84 -0
  154. package/dist/chunk-JY5HSN4D.js.map +1 -0
  155. package/dist/chunk-L4SU3QJV.js +174 -0
  156. package/dist/chunk-L4SU3QJV.js.map +1 -0
  157. package/dist/chunk-LMNSBOBG.js +19 -0
  158. package/dist/chunk-LMNSBOBG.js.map +1 -0
  159. package/dist/chunk-MBI7D6IL.js +42 -0
  160. package/dist/chunk-MBI7D6IL.js.map +1 -0
  161. package/dist/chunk-MLFMYCPH.js +192 -0
  162. package/dist/chunk-MLFMYCPH.js.map +1 -0
  163. package/dist/chunk-MOK66734.js +33 -0
  164. package/dist/chunk-MOK66734.js.map +1 -0
  165. package/dist/chunk-MXTAWPYM.js +196 -0
  166. package/dist/chunk-MXTAWPYM.js.map +1 -0
  167. package/dist/chunk-NCL2UZKI.js +96 -0
  168. package/dist/chunk-NCL2UZKI.js.map +1 -0
  169. package/dist/chunk-NET4YLRY.js +107 -0
  170. package/dist/chunk-NET4YLRY.js.map +1 -0
  171. package/dist/chunk-NIG67CFM.js +329 -0
  172. package/dist/chunk-NIG67CFM.js.map +1 -0
  173. package/dist/chunk-NMVNNO3L.js +10 -0
  174. package/dist/chunk-NMVNNO3L.js.map +1 -0
  175. package/dist/chunk-NP7VID4K.js +2 -0
  176. package/dist/chunk-NP7VID4K.js.map +1 -0
  177. package/dist/chunk-NPUCMAG2.js +382 -0
  178. package/dist/chunk-NPUCMAG2.js.map +1 -0
  179. package/dist/chunk-NSCLRHES.js +102 -0
  180. package/dist/chunk-NSCLRHES.js.map +1 -0
  181. package/dist/chunk-OEUXHVFW.js +86 -0
  182. package/dist/chunk-OEUXHVFW.js.map +1 -0
  183. package/dist/chunk-ONBHFIMZ.js +137 -0
  184. package/dist/chunk-ONBHFIMZ.js.map +1 -0
  185. package/dist/chunk-OPH2HHL2.js +228 -0
  186. package/dist/chunk-OPH2HHL2.js.map +1 -0
  187. package/dist/chunk-OQERHIQP.js +287 -0
  188. package/dist/chunk-OQERHIQP.js.map +1 -0
  189. package/dist/chunk-P6YJAZFG.js +103 -0
  190. package/dist/chunk-P6YJAZFG.js.map +1 -0
  191. package/dist/chunk-PG7ERDOD.js +65 -0
  192. package/dist/chunk-PG7ERDOD.js.map +1 -0
  193. package/dist/chunk-PIB5JBMA.js +90 -0
  194. package/dist/chunk-PIB5JBMA.js.map +1 -0
  195. package/dist/chunk-PQ5BPIWQ.js +22 -0
  196. package/dist/chunk-PQ5BPIWQ.js.map +1 -0
  197. package/dist/chunk-PQBF6ZIQ.js +55 -0
  198. package/dist/chunk-PQBF6ZIQ.js.map +1 -0
  199. package/dist/chunk-PTWCTSZL.js +173 -0
  200. package/dist/chunk-PTWCTSZL.js.map +1 -0
  201. package/dist/chunk-QJUNPVOS.js +101 -0
  202. package/dist/chunk-QJUNPVOS.js.map +1 -0
  203. package/dist/chunk-QOBSEGCG.js +996 -0
  204. package/dist/chunk-QOBSEGCG.js.map +1 -0
  205. package/dist/chunk-QUDZOTRV.js +43 -0
  206. package/dist/chunk-QUDZOTRV.js.map +1 -0
  207. package/dist/chunk-RB7G65JC.js +213 -0
  208. package/dist/chunk-RB7G65JC.js.map +1 -0
  209. package/dist/chunk-RPHAOR7P.js +45 -0
  210. package/dist/chunk-RPHAOR7P.js.map +1 -0
  211. package/dist/chunk-RTCSH2AN.js +331 -0
  212. package/dist/chunk-RTCSH2AN.js.map +1 -0
  213. package/dist/chunk-S3ISPW3A.js +28 -0
  214. package/dist/chunk-S3ISPW3A.js.map +1 -0
  215. package/dist/chunk-SEVN656N.js +36 -0
  216. package/dist/chunk-SEVN656N.js.map +1 -0
  217. package/dist/chunk-SKVG672B.js +64 -0
  218. package/dist/chunk-SKVG672B.js.map +1 -0
  219. package/dist/chunk-SSGJ6MEM.js +1076 -0
  220. package/dist/chunk-SSGJ6MEM.js.map +1 -0
  221. package/dist/chunk-SSKZ2AED.js +118 -0
  222. package/dist/chunk-SSKZ2AED.js.map +1 -0
  223. package/dist/chunk-T56JFGXI.js +561 -0
  224. package/dist/chunk-T56JFGXI.js.map +1 -0
  225. package/dist/chunk-TCB6O74A.js +137 -0
  226. package/dist/chunk-TCB6O74A.js.map +1 -0
  227. package/dist/chunk-TTEYPO6X.js +57 -0
  228. package/dist/chunk-TTEYPO6X.js.map +1 -0
  229. package/dist/chunk-TWPHAJNM.js +462 -0
  230. package/dist/chunk-TWPHAJNM.js.map +1 -0
  231. package/dist/chunk-TXJJLP4O.js +336 -0
  232. package/dist/chunk-TXJJLP4O.js.map +1 -0
  233. package/dist/chunk-TZ6TB7VM.js +245 -0
  234. package/dist/chunk-TZ6TB7VM.js.map +1 -0
  235. package/dist/chunk-UBLKJJ7K.js +278 -0
  236. package/dist/chunk-UBLKJJ7K.js.map +1 -0
  237. package/dist/chunk-UCJ6IUFS.js +52 -0
  238. package/dist/chunk-UCJ6IUFS.js.map +1 -0
  239. package/dist/chunk-UCKFJ3QF.js +197 -0
  240. package/dist/chunk-UCKFJ3QF.js.map +1 -0
  241. package/dist/chunk-UPXSLILN.js +20 -0
  242. package/dist/chunk-UPXSLILN.js.map +1 -0
  243. package/dist/chunk-V4DORGWJ.js +92 -0
  244. package/dist/chunk-V4DORGWJ.js.map +1 -0
  245. package/dist/chunk-V6E5DYZD.js +80 -0
  246. package/dist/chunk-V6E5DYZD.js.map +1 -0
  247. package/dist/chunk-VLLYKF3P.js +96 -0
  248. package/dist/chunk-VLLYKF3P.js.map +1 -0
  249. package/dist/chunk-VLNBTOH6.js +43 -0
  250. package/dist/chunk-VLNBTOH6.js.map +1 -0
  251. package/dist/chunk-WMDSMSPL.js +303 -0
  252. package/dist/chunk-WMDSMSPL.js.map +1 -0
  253. package/dist/chunk-WU5BLGTF.js +149 -0
  254. package/dist/chunk-WU5BLGTF.js.map +1 -0
  255. package/dist/chunk-WYTZVSGK.js +245 -0
  256. package/dist/chunk-WYTZVSGK.js.map +1 -0
  257. package/dist/chunk-X47QMM6K.js +187 -0
  258. package/dist/chunk-X47QMM6K.js.map +1 -0
  259. package/dist/chunk-YHUSW7D2.js +40 -0
  260. package/dist/chunk-YHUSW7D2.js.map +1 -0
  261. package/dist/chunk-YSKD7UXX.js +126 -0
  262. package/dist/chunk-YSKD7UXX.js.map +1 -0
  263. package/dist/chunk-YYRDGWOU.js +72 -0
  264. package/dist/chunk-YYRDGWOU.js.map +1 -0
  265. package/dist/chunk-ZIGZMWM7.js +19 -0
  266. package/dist/chunk-ZIGZMWM7.js.map +1 -0
  267. package/dist/chunk-ZKRTUKNP.js +40 -0
  268. package/dist/chunk-ZKRTUKNP.js.map +1 -0
  269. package/dist/code-block.js +38 -0
  270. package/dist/code-block.js.map +1 -0
  271. package/dist/commit.js +51 -0
  272. package/dist/commit.js.map +1 -0
  273. package/dist/composer.js +15 -0
  274. package/dist/composer.js.map +1 -0
  275. package/dist/confirmation.js +53 -0
  276. package/dist/confirmation.js.map +1 -0
  277. package/dist/connection.js +8 -0
  278. package/dist/connection.js.map +1 -0
  279. package/dist/context-panel.js +25 -0
  280. package/dist/context-panel.js.map +1 -0
  281. package/dist/controls.js +10 -0
  282. package/dist/controls.js.map +1 -0
  283. package/dist/conversation.js +19 -0
  284. package/dist/conversation.js.map +1 -0
  285. package/dist/diff-view.js +15 -0
  286. package/dist/diff-view.js.map +1 -0
  287. package/dist/edge.js +10 -0
  288. package/dist/edge.js.map +1 -0
  289. package/dist/environment-variables.js +29 -0
  290. package/dist/environment-variables.js.map +1 -0
  291. package/dist/file-tree.js +23 -0
  292. package/dist/file-tree.js.map +1 -0
  293. package/dist/gallery.js +9 -0
  294. package/dist/gallery.js.map +1 -0
  295. package/dist/grouped-parts.js +21 -0
  296. package/dist/grouped-parts.js.map +1 -0
  297. package/dist/image.js +9 -0
  298. package/dist/image.js.map +1 -0
  299. package/dist/index.d.ts +366 -98
  300. package/dist/index.js +672 -13577
  301. package/dist/index.js.map +1 -1
  302. package/dist/inline-citation.js +39 -0
  303. package/dist/inline-citation.js.map +1 -0
  304. package/dist/jsx-preview.js +17 -0
  305. package/dist/jsx-preview.js.map +1 -0
  306. package/dist/markdown-view.js +17 -0
  307. package/dist/markdown-view.js.map +1 -0
  308. package/dist/message-compare.js +12 -0
  309. package/dist/message-compare.js.map +1 -0
  310. package/dist/message-edit.js +19 -0
  311. package/dist/message-edit.js.map +1 -0
  312. package/dist/message-feedback.js +11 -0
  313. package/dist/message-feedback.js.map +1 -0
  314. package/dist/message-form-spec.js +38 -0
  315. package/dist/message-form-spec.js.map +1 -0
  316. package/dist/message-form.js +26 -0
  317. package/dist/message-form.js.map +1 -0
  318. package/dist/message-table-spec.js +26 -0
  319. package/dist/message-table-spec.js.map +1 -0
  320. package/dist/message-table.js +12 -0
  321. package/dist/message-table.js.map +1 -0
  322. package/dist/message.js +51 -0
  323. package/dist/message.js.map +1 -0
  324. package/dist/mic-selector.js +27 -0
  325. package/dist/mic-selector.js.map +1 -0
  326. package/dist/model-provider-logo.js +13 -0
  327. package/dist/model-provider-logo.js.map +1 -0
  328. package/dist/motion-config.js +9 -0
  329. package/dist/motion-config.js.map +1 -0
  330. package/dist/node.js +22 -0
  331. package/dist/node.js.map +1 -0
  332. package/dist/open-in-chat.js +31 -0
  333. package/dist/open-in-chat.js.map +1 -0
  334. package/dist/package-info.js +25 -0
  335. package/dist/package-info.js.map +1 -0
  336. package/dist/panel.js +10 -0
  337. package/dist/panel.js.map +1 -0
  338. package/dist/part-groups.js +18 -0
  339. package/dist/part-groups.js.map +1 -0
  340. package/dist/permission-mode-select.js +9 -0
  341. package/dist/permission-mode-select.js.map +1 -0
  342. package/dist/persona-sources.js +8 -0
  343. package/dist/persona-sources.js.map +1 -0
  344. package/dist/persona.js +14 -0
  345. package/dist/persona.js.map +1 -0
  346. package/dist/plan.js +32 -0
  347. package/dist/plan.js.map +1 -0
  348. package/dist/prompt-input-effort.js +9 -0
  349. package/dist/prompt-input-effort.js.map +1 -0
  350. package/dist/prompt-input-mode.js +10 -0
  351. package/dist/prompt-input-mode.js.map +1 -0
  352. package/dist/prompt-input-slash.js +12 -0
  353. package/dist/prompt-input-slash.js.map +1 -0
  354. package/dist/prompt-input.js +89 -0
  355. package/dist/prompt-input.js.map +1 -0
  356. package/dist/queue.js +37 -0
  357. package/dist/queue.js.map +1 -0
  358. package/dist/reasoning.js +23 -0
  359. package/dist/reasoning.js.map +1 -0
  360. package/dist/sandbox.js +28 -0
  361. package/dist/sandbox.js.map +1 -0
  362. package/dist/schema-display.js +33 -0
  363. package/dist/schema-display.js.map +1 -0
  364. package/dist/selection-toolbar.js +11 -0
  365. package/dist/selection-toolbar.js.map +1 -0
  366. package/dist/session-header.js +9 -0
  367. package/dist/session-header.js.map +1 -0
  368. package/dist/session-status-bar.js +9 -0
  369. package/dist/session-status-bar.js.map +1 -0
  370. package/dist/shimmer.js +9 -0
  371. package/dist/shimmer.js.map +1 -0
  372. package/dist/snippet.js +17 -0
  373. package/dist/snippet.js.map +1 -0
  374. package/dist/sources.js +17 -0
  375. package/dist/sources.js.map +1 -0
  376. package/dist/speech-input.js +9 -0
  377. package/dist/speech-input.js.map +1 -0
  378. package/dist/stack-trace.js +27 -0
  379. package/dist/stack-trace.js.map +1 -0
  380. package/dist/suggestion.js +16 -0
  381. package/dist/suggestion.js.map +1 -0
  382. package/dist/task.js +18 -0
  383. package/dist/task.js.map +1 -0
  384. package/dist/test-results.js +43 -0
  385. package/dist/test-results.js.map +1 -0
  386. package/dist/token-usage.js +27 -0
  387. package/dist/token-usage.js.map +1 -0
  388. package/dist/tool-result-card.js +9 -0
  389. package/dist/tool-result-card.js.map +1 -0
  390. package/dist/tool.js +27 -0
  391. package/dist/tool.js.map +1 -0
  392. package/dist/toolbar.js +10 -0
  393. package/dist/toolbar.js.map +1 -0
  394. package/dist/transcription.js +11 -0
  395. package/dist/transcription.js.map +1 -0
  396. package/dist/turn-status.js +9 -0
  397. package/dist/turn-status.js.map +1 -0
  398. package/dist/use-audio-level.js +9 -0
  399. package/dist/use-audio-level.js.map +1 -0
  400. package/dist/voice-selector.js +47 -0
  401. package/dist/voice-selector.js.map +1 -0
  402. package/dist/web-preview.js +19 -0
  403. package/dist/web-preview.js.map +1 -0
  404. package/package.json +11 -9
  405. package/schemas/a2ui-surface.v1.schema.json +5434 -0
  406. package/src/_chat-shell-rail.tsx +3 -1
  407. package/src/_flow-boundary.tsx +2 -2
  408. package/src/_persona-rive.tsx +27 -41
  409. package/src/a2ui/a2ui-surface.stories.tsx +662 -0
  410. package/src/a2ui/a2ui-surface.test.tsx +201 -0
  411. package/src/a2ui/a2ui-surface.tsx +354 -0
  412. package/src/a2ui/catalog.source.json +772 -0
  413. package/src/a2ui/core/a2ui-core.test.ts +178 -0
  414. package/src/a2ui/core/catalog.generated.ts +1019 -0
  415. package/src/a2ui/core/complete-json.ts +81 -0
  416. package/src/a2ui/core/index.ts +10 -0
  417. package/src/a2ui/core/schema.ts +111 -0
  418. package/src/a2ui/core/spec.ts +148 -0
  419. package/src/a2ui/core/validate.ts +266 -0
  420. package/src/a2ui/index.ts +7 -0
  421. package/src/a2ui/ui-catalog.tsx +225 -0
  422. package/src/a2ui/wave1-chart-spec.test.ts +87 -0
  423. package/src/a2ui/wave2-chart-spec.test.ts +108 -0
  424. package/src/agentic-workspace.stories.tsx +6 -45
  425. package/src/chat-shell.test.tsx +40 -10
  426. package/src/chat-shell.tsx +90 -44
  427. package/src/chat.stories.tsx +47 -42
  428. package/src/composer.stories.tsx +4 -5
  429. package/src/composer.test.tsx +45 -0
  430. package/src/composer.tsx +104 -21
  431. package/src/context-panel.stories.tsx +1 -1
  432. package/src/context-panel.tsx +1 -1
  433. package/src/conversation.stories.tsx +1 -0
  434. package/src/conversation.test.tsx +16 -0
  435. package/src/conversation.tsx +16 -2
  436. package/src/diff-view.stories.tsx +79 -0
  437. package/src/diff-view.tsx +3 -2
  438. package/src/file-tree.tsx +24 -17
  439. package/src/gallery.stories.tsx +42 -0
  440. package/src/gallery.tsx +2 -2
  441. package/src/grouped-parts.stories.tsx +23 -0
  442. package/src/grouped-parts.tsx +1 -1
  443. package/src/index.ts +1 -0
  444. package/src/message-compare.stories.tsx +40 -0
  445. package/src/message-compare.tsx +2 -1
  446. package/src/message-form.tsx +1 -1
  447. package/src/message-table.stories.tsx +24 -0
  448. package/src/message-table.tsx +1 -1
  449. package/src/package-info.tsx +12 -9
  450. package/src/reasoning.stories.tsx +27 -0
  451. package/src/reasoning.tsx +1 -1
  452. package/src/session-header.stories.tsx +35 -1
  453. package/src/session-header.tsx +1 -1
  454. package/src/sources.stories.tsx +30 -0
  455. package/src/sources.tsx +4 -1
  456. package/src/templates-ai-assistant.stories.tsx +151 -87
  457. package/src/tool.stories.tsx +39 -0
  458. package/src/tool.tsx +3 -3
  459. package/src/toolbar.tsx +0 -10
  460. package/dist/_flow-boundary-SHNWLQG5.js.map +0 -1
  461. package/dist/_persona-rive-JEG44YHX.js.map +0 -1
  462. /package/dist/{_audio-player-media-chrome-T3XVXWRZ.js.map → _audio-player-media-chrome.js.map} +0 -0
@@ -0,0 +1,225 @@
1
+ "use client";
2
+
3
+ /**
4
+ * ui-catalog.tsx — the shipped A2UI catalog: every non-builtin type in
5
+ * `catalog.source.json` bound to its `@elabs-ai/components-ui` component. The
6
+ * schema half (`A2UI_CATALOG_SCHEMA`, generated) says what an agent MAY emit; this
7
+ * half says what it renders AS. A test asserts the two key sets are identical, so
8
+ * a type cannot be validatable-but-unrenderable or the reverse.
9
+ *
10
+ * Apps extend it (`createA2uiCatalog`) with their own types — a chart from
11
+ * `@elabs-ai/components-charts`, a domain card — because `ai` may not import its
12
+ * sibling packages (one-way dependency graph) and an app composes freely.
13
+ */
14
+ import {
15
+ Accordion,
16
+ AccordionContent,
17
+ AccordionItem,
18
+ AccordionTrigger,
19
+ Alert,
20
+ AlertDescription,
21
+ AlertTitle,
22
+ Avatar,
23
+ AvatarFallback,
24
+ Badge,
25
+ BentoGrid,
26
+ BentoGridItem,
27
+ Button,
28
+ ButtonGroup,
29
+ Card,
30
+ CardAction,
31
+ CardContent,
32
+ CardDescription,
33
+ CardFooter,
34
+ CardHeader,
35
+ CardTitle,
36
+ Checkbox,
37
+ Collapsible,
38
+ CollapsibleContent,
39
+ CollapsibleTrigger,
40
+ Descriptions,
41
+ DescriptionsItem,
42
+ EmptyState,
43
+ Heading,
44
+ Input,
45
+ Kbd,
46
+ Label,
47
+ MetricCard,
48
+ Progress,
49
+ RadioGroup,
50
+ RadioGroupItem,
51
+ SectionHeader,
52
+ Select,
53
+ SelectContent,
54
+ SelectItem,
55
+ SelectTrigger,
56
+ SelectValue,
57
+ Separator,
58
+ Slider,
59
+ StatePanel,
60
+ StatusBadge,
61
+ Switch,
62
+ Table,
63
+ TableBody,
64
+ TableCaption,
65
+ TableCell,
66
+ TableFooter,
67
+ TableHead,
68
+ TableHeader,
69
+ TableRow,
70
+ Tabs,
71
+ TabsContent,
72
+ TabsList,
73
+ TabsTrigger,
74
+ Text,
75
+ Textarea,
76
+ Timeline,
77
+ } from "@elabs-ai/components-ui";
78
+ import type { AlertTitleProps } from "@elabs-ai/components-ui";
79
+ import type { ComponentType } from "react";
80
+
81
+ import { A2UI_CATALOG_SCHEMA } from "./core/catalog.generated";
82
+ import type { A2uiCatalogSchema, A2uiCatalogTypeSchema } from "./core/spec";
83
+
84
+ /** One renderable catalog type: its schema plus the component that draws it. */
85
+ export interface A2uiCatalogEntry {
86
+ schema: A2uiCatalogTypeSchema;
87
+ /** Absent for builtins (`Stack`, `Grid`), which the surface draws itself. */
88
+ component?: ComponentType<Record<string, unknown>>;
89
+ }
90
+
91
+ export type A2uiCatalog = Record<string, A2uiCatalogEntry>;
92
+
93
+ // `ComponentType<Record<string, unknown>>` is the erased shape the renderer calls
94
+ // with validated, catalog-shaped props; each binding is a real ui component.
95
+ type AnyComponent = ComponentType<any>; // eslint-disable-line @typescript-eslint/no-explicit-any -- erased at the catalog boundary; props are validated against the schema
96
+
97
+ /**
98
+ * `AlertTitle` inside a surface, as a `<div>` rather than its default `<h5>`.
99
+ *
100
+ * A surface is rendered into a host page whose heading outline the agent cannot see, so a
101
+ * fixed `h5` fails axe's `heading-order` under any host with no `h4` above it — which is
102
+ * most of them. The alert's `role="alert"` announces the title either way, so the heading
103
+ * adds nothing here; `CardTitle` defaults to `div` for the same reason. A host writing real
104
+ * code composes `<AlertTitle as="h3">`, where the level is knowable.
105
+ */
106
+ const SurfaceAlertTitle = (props: AlertTitleProps) => <AlertTitle {...props} as="div" />;
107
+
108
+ /** The `@elabs-ai/components-ui` bindings, one per non-builtin catalog type. */
109
+ export const UI_CATALOG_BINDINGS: Record<string, AnyComponent> = {
110
+ Accordion,
111
+ AccordionContent,
112
+ AccordionItem,
113
+ AccordionTrigger,
114
+ Alert,
115
+ AlertDescription,
116
+ AlertTitle: SurfaceAlertTitle,
117
+ Avatar,
118
+ AvatarFallback,
119
+ Badge,
120
+ BentoGrid,
121
+ BentoGridItem,
122
+ Button,
123
+ ButtonGroup,
124
+ Card,
125
+ CardAction,
126
+ CardContent,
127
+ CardDescription,
128
+ CardFooter,
129
+ CardHeader,
130
+ CardTitle,
131
+ Checkbox,
132
+ Collapsible,
133
+ CollapsibleContent,
134
+ CollapsibleTrigger,
135
+ Descriptions,
136
+ DescriptionsItem,
137
+ EmptyState,
138
+ Heading,
139
+ Input,
140
+ Kbd,
141
+ Label,
142
+ MetricCard,
143
+ Progress,
144
+ RadioGroup,
145
+ RadioGroupItem,
146
+ SectionHeader,
147
+ Select,
148
+ SelectContent,
149
+ SelectItem,
150
+ SelectTrigger,
151
+ SelectValue,
152
+ Separator,
153
+ Slider,
154
+ StatePanel,
155
+ StatusBadge,
156
+ Switch,
157
+ Table,
158
+ TableBody,
159
+ TableCaption,
160
+ TableCell,
161
+ TableFooter,
162
+ TableHead,
163
+ TableHeader,
164
+ TableRow,
165
+ Tabs,
166
+ TabsContent,
167
+ TabsList,
168
+ TabsTrigger,
169
+ Text,
170
+ Textarea,
171
+ Timeline,
172
+ };
173
+
174
+ /**
175
+ * Build a catalog from component bindings + a schema. Every schema type that is
176
+ * not a builtin must have a binding; a binding without a schema is ignored (it
177
+ * would be unvalidatable). Extend the shipped one:
178
+ *
179
+ * ```ts
180
+ * const catalog = createA2uiCatalog(
181
+ * { ...UI_CATALOG_BINDINGS, RevenueChart },
182
+ * { ...A2UI_CATALOG_SCHEMA, RevenueChart: defineA2uiType({ props: { series: { type: "array", required: true } } }) },
183
+ * );
184
+ * ```
185
+ */
186
+ export function createA2uiCatalog(
187
+ bindings: Record<string, AnyComponent>,
188
+ schema: A2uiCatalogSchema = A2UI_CATALOG_SCHEMA,
189
+ ): A2uiCatalog {
190
+ const catalog: A2uiCatalog = {};
191
+ for (const [type, typeSchema] of Object.entries(schema)) {
192
+ if (typeSchema.builtin) {
193
+ catalog[type] = { schema: typeSchema };
194
+ continue;
195
+ }
196
+ const component = bindings[type];
197
+ if (!component) {
198
+ throw new Error(`createA2uiCatalog: catalog type "${type}" has no component binding`);
199
+ }
200
+ catalog[type] = { schema: typeSchema, component };
201
+ }
202
+ return catalog;
203
+ }
204
+
205
+ /** Author a schema entry for an app-provided type with sensible defaults. */
206
+ export function defineA2uiType(
207
+ partial: Partial<A2uiCatalogTypeSchema> & { source?: string },
208
+ ): A2uiCatalogTypeSchema {
209
+ return {
210
+ children: partial.children ?? false,
211
+ props: partial.props ?? {},
212
+ events: partial.events ?? {},
213
+ source: partial.source ?? "app",
214
+ ...(partial.summary ? { summary: partial.summary } : {}),
215
+ ...(partial.builtin ? { builtin: true } : {}),
216
+ };
217
+ }
218
+
219
+ /** The schema half of a catalog (what `validateA2uiSurface` takes). */
220
+ export function catalogSchema(catalog: A2uiCatalog): A2uiCatalogSchema {
221
+ return Object.fromEntries(Object.entries(catalog).map(([t, e]) => [t, e.schema]));
222
+ }
223
+
224
+ /** The shipped catalog: builtins + every `@elabs-ai/components-ui` type above. */
225
+ export const uiCatalog: A2uiCatalog = createA2uiCatalog(UI_CATALOG_BINDINGS);
@@ -0,0 +1,87 @@
1
+ import { CHARTS_A2UI_CATALOG_SCHEMA } from "@elabs-ai/components-charts";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ import { A2UI_CATALOG_SCHEMA, type A2uiCatalogSchema, validateA2uiSurface } from "./core";
5
+
6
+ /**
7
+ * Proves the A2UI catalog's `AutoChart.spec` prop (an opaque `type: "object"`,
8
+ * `packages/ai/src/a2ui/catalog.source.json`) validates `ChartSpec` objects that use the
9
+ * wave-1 fields (`labels`, `annotations`, `nulls`, dumbbell `variant`, …) — an agent that
10
+ * reads the catalog's description can rely on emitting them (`.claude/scratch/datawrapper-parity`).
11
+ * `charts` is a devDependency of `ai` for exactly this kind of cross-catalog test (see
12
+ * `agentic-workspace.stories.tsx`); `ai` never imports `charts` at runtime (D6).
13
+ *
14
+ * `ChartsA2uiCatalogSchema` (charts) and `A2uiCatalogSchema` (ai) are structurally close
15
+ * but not identical (`default?: unknown` vs `default?: A2uiJson`) — the same gap the
16
+ * `createA2uiCatalog` docblock's merge example papers over as a comment, never
17
+ * type-checked. The runtime shapes agree; the cast documents the known type gap rather
18
+ * than widening either schema's `default` field.
19
+ */
20
+ const CATALOG = {
21
+ ...A2UI_CATALOG_SCHEMA,
22
+ ...CHARTS_A2UI_CATALOG_SCHEMA,
23
+ } as unknown as A2uiCatalogSchema;
24
+
25
+ describe("A2UI catalog accepts wave-1 ChartSpec fields", () => {
26
+ it("validates line, pie and dumbbell specs using labels.series, annotations, nulls, labels.slices and variant: arrow", () => {
27
+ const r = validateA2uiSurface(
28
+ {
29
+ a2ui: "1",
30
+ root: {
31
+ type: "Stack",
32
+ children: [
33
+ {
34
+ type: "AutoChart",
35
+ props: {
36
+ spec: {
37
+ type: "line",
38
+ data: [
39
+ { month: "Jan", revenue: 100 },
40
+ { month: "Feb", revenue: null },
41
+ { month: "Mar", revenue: 140 },
42
+ ],
43
+ x: "month",
44
+ series: ["revenue"],
45
+ labels: { series: "end" },
46
+ annotations: [{ kind: "line", y: 120, label: "Target" }],
47
+ nulls: "connect",
48
+ },
49
+ },
50
+ },
51
+ {
52
+ type: "AutoChart",
53
+ props: {
54
+ spec: {
55
+ type: "pie",
56
+ data: [
57
+ { channel: "Direct", share: 62 },
58
+ { channel: "Referral", share: 38 },
59
+ ],
60
+ x: "channel",
61
+ series: ["share"],
62
+ labels: { slices: { show: ["label", "percent"] } },
63
+ },
64
+ },
65
+ },
66
+ {
67
+ type: "AutoChart",
68
+ props: {
69
+ spec: {
70
+ type: "dumbbell",
71
+ data: [{ region: "West", fy24: 10, fy25: 15 }],
72
+ x: "region",
73
+ series: ["fy24"],
74
+ y2: "fy25",
75
+ variant: "arrow",
76
+ },
77
+ },
78
+ },
79
+ ],
80
+ },
81
+ },
82
+ CATALOG,
83
+ );
84
+ expect(r.errors).toEqual([]);
85
+ expect(r.ok).toBe(true);
86
+ });
87
+ });
@@ -0,0 +1,108 @@
1
+ import { CHARTS_A2UI_CATALOG_SCHEMA } from "@elabs-ai/components-charts";
2
+ import { describe, expect, it } from "vitest";
3
+
4
+ import { A2UI_CATALOG_SCHEMA, type A2uiCatalogSchema, validateA2uiSurface } from "./core";
5
+
6
+ /**
7
+ * Proves the A2UI catalog's `AutoChart.spec` prop (an opaque `type: "object"`,
8
+ * `packages/ai/src/a2ui/catalog.source.json`) validates `ChartSpec` objects that use the
9
+ * wave-2 fields — frame chrome (`notes`/`source`), `tooltip`, `facet`, `type: "dual-axis"`
10
+ * with `series[].axis`, and waterfall `groupBy`/`dataFormat` — the same precedent as
11
+ * `wave1-chart-spec.test.ts` (`.claude/scratch/datawrapper-parity`). See that file's docblock
12
+ * for why `charts` is a devDependency of `ai` here and why the cast is needed.
13
+ */
14
+ const CATALOG = {
15
+ ...A2UI_CATALOG_SCHEMA,
16
+ ...CHARTS_A2UI_CATALOG_SCHEMA,
17
+ } as unknown as A2uiCatalogSchema;
18
+
19
+ describe("A2UI catalog accepts wave-2 ChartSpec fields", () => {
20
+ it("validates frame chrome (notes/source), tooltip and facet.by on a line spec", () => {
21
+ const r = validateA2uiSurface(
22
+ {
23
+ a2ui: "1",
24
+ root: {
25
+ type: "AutoChart",
26
+ props: {
27
+ spec: {
28
+ type: "line",
29
+ data: [
30
+ { region: "West", month: "Jan", revenue: 100 },
31
+ { region: "West", month: "Feb", revenue: 120 },
32
+ { region: "East", month: "Jan", revenue: 80 },
33
+ { region: "East", month: "Feb", revenue: 90 },
34
+ ],
35
+ x: "month",
36
+ series: ["revenue"],
37
+ notes: "Preliminary figures, subject to close.",
38
+ source: { name: "Finance", href: "https://example.com/finance" },
39
+ tooltip: { variant: "rows", focus: true },
40
+ facet: { by: "region", scales: { y: "shared" } },
41
+ },
42
+ },
43
+ },
44
+ },
45
+ CATALOG,
46
+ );
47
+ expect(r.errors).toEqual([]);
48
+ expect(r.ok).toBe(true);
49
+ });
50
+
51
+ it("validates a type: dual-axis spec using series[].axis and series[].mark", () => {
52
+ const r = validateA2uiSurface(
53
+ {
54
+ a2ui: "1",
55
+ root: {
56
+ type: "AutoChart",
57
+ props: {
58
+ spec: {
59
+ type: "dual-axis",
60
+ data: [
61
+ { month: "Jan", revenue: 100, margin: 0.2 },
62
+ { month: "Feb", revenue: 120, margin: 0.25 },
63
+ ],
64
+ x: "month",
65
+ series: [
66
+ { key: "revenue", axis: "left", mark: "column" },
67
+ { key: "margin", axis: "right", mark: "line" },
68
+ ],
69
+ axes: { y2: { align: "ticks", zero: "auto" } },
70
+ },
71
+ },
72
+ },
73
+ },
74
+ CATALOG,
75
+ );
76
+ expect(r.errors).toEqual([]);
77
+ expect(r.ok).toBe(true);
78
+ });
79
+
80
+ it("validates a waterfall spec using groupBy (subtotals) and dataFormat", () => {
81
+ const r = validateA2uiSurface(
82
+ {
83
+ a2ui: "1",
84
+ root: {
85
+ type: "AutoChart",
86
+ props: {
87
+ spec: {
88
+ type: "waterfall",
89
+ data: [
90
+ { step: "Starting cash", value: 1000, group: "Q1" },
91
+ { step: "Sales", value: 400, group: "Q1" },
92
+ { step: "Costs", value: -150, group: "Q1" },
93
+ ],
94
+ x: "step",
95
+ series: ["value"],
96
+ groupBy: "group",
97
+ dataFormat: "differences",
98
+ zoomToDifferences: false,
99
+ },
100
+ },
101
+ },
102
+ },
103
+ CATALOG,
104
+ );
105
+ expect(r.errors).toEqual([]);
106
+ expect(r.ok).toBe(true);
107
+ });
108
+ });
@@ -1,22 +1,15 @@
1
1
  import { useState } from "react";
2
2
  import type { Meta, StoryObj } from "@storybook/react-vite";
3
3
  import {
4
- Avatar,
5
- AvatarFallback,
6
4
  Badge,
7
5
  Button,
8
6
  Collapsible,
9
7
  CollapsibleContent,
10
8
  CollapsibleTrigger,
11
- DropdownMenu,
12
- DropdownMenuContent,
13
- DropdownMenuItem,
14
- DropdownMenuLabel,
15
- DropdownMenuSeparator,
16
- DropdownMenuTrigger,
17
9
  Separator,
18
10
  Sidebar,
19
11
  SidebarContent,
12
+ NavUser,
20
13
  SidebarFooter,
21
14
  SidebarGroup,
22
15
  SidebarGroupAction,
@@ -52,18 +45,15 @@ import {
52
45
  Boxes,
53
46
  Calculator,
54
47
  ChevronRight,
55
- ChevronsUpDown,
56
48
  Copy,
57
49
  Database,
58
50
  FolderKanban,
59
51
  Globe,
60
52
  History,
61
- LogOut,
62
53
  MessageSquarePlus,
63
54
  PencilLine,
64
55
  RefreshCw,
65
56
  Search,
66
- Settings,
67
57
  Share2,
68
58
  Sparkles,
69
59
  ThumbsDown,
@@ -345,7 +335,7 @@ function WorkspaceSidebar({
345
335
  <SidebarMenuButton
346
336
  tooltip="New chat"
347
337
  onClick={onNewChat}
348
- className="bg-primary text-primary-foreground hover:bg-primary/90 hover:text-primary-foreground"
338
+ className="bg-primary text-primary-foreground hover:bg-primary-hover hover:text-primary-foreground active:bg-primary-active active:text-primary-foreground"
349
339
  >
350
340
  <MessageSquarePlus />
351
341
  <span>New chat</span>
@@ -479,38 +469,7 @@ function WorkspaceSidebar({
479
469
  </SidebarContent>
480
470
 
481
471
  <SidebarFooter>
482
- <SidebarMenu>
483
- <SidebarMenuItem>
484
- <DropdownMenu>
485
- <DropdownMenuTrigger asChild>
486
- <SidebarMenuButton size="lg" tooltip="Account" className="group">
487
- <Avatar className="size-7 rounded-md">
488
- <AvatarFallback className="rounded-md text-meta">AR</AvatarFallback>
489
- </Avatar>
490
- <span className="grid flex-1 text-start leading-tight">
491
- <span className="truncate text-body font-medium">Avery Rao</span>
492
- <span className="truncate text-meta text-sidebar-muted-foreground group-hover:text-sidebar-accent-foreground">
493
- avery@acme.co
494
- </span>
495
- </span>
496
- <ChevronsUpDown className="ms-auto size-4" />
497
- </SidebarMenuButton>
498
- </DropdownMenuTrigger>
499
- <DropdownMenuContent side="right" align="end" className="w-48">
500
- <DropdownMenuLabel>Account</DropdownMenuLabel>
501
- <DropdownMenuItem>
502
- <Settings className="me-2 size-4" />
503
- Settings
504
- </DropdownMenuItem>
505
- <DropdownMenuSeparator />
506
- <DropdownMenuItem>
507
- <LogOut className="me-2 size-4" />
508
- Sign out
509
- </DropdownMenuItem>
510
- </DropdownMenuContent>
511
- </DropdownMenu>
512
- </SidebarMenuItem>
513
- </SidebarMenu>
472
+ <NavUser user={{ name: "Avery Rao", email: "avery@acme.co" }} />
514
473
  </SidebarFooter>
515
474
 
516
475
  <SidebarRail />
@@ -974,7 +933,7 @@ function AgenticWorkspace({ defaultSidebarOpen = true }: { defaultSidebarOpen?:
974
933
  <SidebarInset className="flex min-w-0 flex-col">
975
934
  {/* Header bar — h-12 to align with the right ContextPanelHeader and
976
935
  the library header convention (ChatShell/ContextPanel). */}
977
- <header className="flex h-12 shrink-0 items-center gap-2 border-b bg-background px-3">
936
+ <header className="flex h-header shrink-0 items-center gap-2 border-b bg-background px-3">
978
937
  <SidebarTrigger className="-ms-1" />
979
938
  <Separator orientation="vertical" className="me-1 h-5" />
980
939
  <div className="flex min-w-0 items-center gap-1.5 text-body">
@@ -1083,9 +1042,11 @@ function AgenticWorkspace({ defaultSidebarOpen = true }: { defaultSidebarOpen?:
1083
1042
  const meta = {
1084
1043
  title: "Patterns/Scenarios/Agentic AI Workspace",
1085
1044
  component: AgenticWorkspace,
1045
+ tags: ["autodocs"],
1086
1046
  parameters: {
1087
1047
  layout: "fullscreen",
1088
1048
  docs: {
1049
+ subtitle: "For copilots and agentic products",
1089
1050
  description: {
1090
1051
  component:
1091
1052
  "A full-page demo scenario composed from the @elabs-ai/components-* grammar: a double-sided application shell (collapsible left nav + the real ContextPanel right rail with animated collapse and asset drill-in) wrapping a complete agentic AI interaction — reasoning, a plan, the AgentTimeline execution rail, tools with JSON behind disclosure, a ToolResultCard chart headline, an ApprovalCard decision, a task summary, a checkpoint, and a grounded AgentMessage answer with an EvidenceChip and a SourceList.",
@@ -58,8 +58,8 @@ describe("ChatShell — slots", () => {
58
58
 
59
59
  it("omits the header row entirely when no header is supplied", () => {
60
60
  const { container } = render(<ChatShell>t</ChatShell>);
61
- // An empty header would still occupy its fixed h-12 row.
62
- expect(container.querySelector(".h-12")).toBeNull();
61
+ // An empty header would still occupy its fixed h-header row.
62
+ expect(container.querySelector(".h-header")).toBeNull();
63
63
  });
64
64
 
65
65
  it("omits the aside rail entirely when no aside is supplied", () => {
@@ -91,16 +91,46 @@ describe("ChatShell — variants", () => {
91
91
  expect(container.querySelector(".border-t")).toBeNull();
92
92
  });
93
93
 
94
- it("makes the bare variant's edge scrims inert (aria-hidden AND pointer-events-none)", () => {
95
- const { container } = render(<ChatShell variant="bare">t</ChatShell>);
96
- const scrims = container.querySelectorAll("[aria-hidden='true']");
97
- expect(scrims).toHaveLength(2);
98
- for (const scrim of scrims) expect(scrim).toHaveClass("pointer-events-none");
94
+ it("makes the edge scrims inert (aria-hidden AND pointer-events-none) in both variants", () => {
95
+ for (const variant of ["card", "bare"] as const) {
96
+ const { container, unmount } = render(<ChatShell variant={variant}>t</ChatShell>);
97
+ const scrims = container.querySelectorAll("[aria-hidden='true']");
98
+ expect(scrims).toHaveLength(2);
99
+ for (const scrim of scrims) expect(scrim).toHaveClass("pointer-events-none");
100
+ unmount();
101
+ }
99
102
  });
103
+ });
100
104
 
101
- it("renders no scrims in the card variant (there is a real divider instead)", () => {
102
- const { container } = render(<ChatShell>t</ChatShell>);
103
- expect(container.querySelectorAll("[aria-hidden='true']")).toHaveLength(0);
105
+ describe("ChatShell floating composer", () => {
106
+ it("floats the composer over the transcript instead of stacking a footer bar", () => {
107
+ const { container } = render(
108
+ <ChatShell composer={<textarea aria-label="Message" />}>
109
+ <p>transcript</p>
110
+ </ChatShell>,
111
+ );
112
+ const layer = container.querySelector("[data-slot='chat-shell-composer']");
113
+ expect(layer).toHaveClass("absolute", "bottom-0", "pb-4");
114
+ // The layer passes pointer events through to the transcript; only the
115
+ // composer column takes input.
116
+ expect(layer).toHaveClass("pointer-events-none");
117
+ expect(screen.getByRole("textbox", { name: "Message" }).parentElement).toHaveClass(
118
+ "pointer-events-auto",
119
+ "max-w-(--chat-composer-column)",
120
+ );
121
+ expect(container.querySelector(".border-t")).toBeNull();
122
+ });
123
+
124
+ it("publishes the composer height so the transcript can scroll clear of it", () => {
125
+ const { container, rerender } = render(
126
+ <ChatShell composer={<textarea aria-label="Message" />}>t</ChatShell>,
127
+ );
128
+ const root = container.firstChild as HTMLElement;
129
+ // jsdom has no layout, so the measured height is 0 — the contract is that
130
+ // the variable is written at all.
131
+ expect(root.style.getPropertyValue("--chat-composer-inset")).toBe("0px");
132
+ rerender(<ChatShell>t</ChatShell>);
133
+ expect(root.style.getPropertyValue("--chat-composer-inset")).toBe("");
104
134
  });
105
135
  });
106
136