@kitn.ai/ui 0.20.1 → 0.22.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 (510) hide show
  1. package/README.md +44 -45
  2. package/dist/components/artifact-card.d.ts +51 -0
  3. package/dist/components/artifact.d.ts +1 -1
  4. package/dist/components/attachments.d.ts +2 -2
  5. package/dist/components/audio-visualizer/index.d.ts +3 -3
  6. package/dist/components/audio-visualizer/labs/lab-choreography.d.ts +59 -0
  7. package/dist/components/audio-visualizer/labs/lab-shaders.d.ts +22 -0
  8. package/dist/components/audio-visualizer/labs/lab-visualizer.d.ts +18 -0
  9. package/dist/components/audio-visualizer/variant-aurora.d.ts +2 -2
  10. package/dist/components/audio-visualizer/variant-bar.d.ts +2 -2
  11. package/dist/components/audio-visualizer/variant-custom.d.ts +2 -2
  12. package/dist/components/audio-visualizer/variant-grid.d.ts +1 -1
  13. package/dist/components/audio-visualizer/variant-radial.d.ts +1 -1
  14. package/dist/components/audio-visualizer/variant-wave.d.ts +1 -1
  15. package/dist/components/card-fallback.d.ts +12 -2
  16. package/dist/components/card-renderer.d.ts +63 -2
  17. package/dist/components/chat-container.d.ts +3 -0
  18. package/dist/components/chat-scope-picker.d.ts +2 -2
  19. package/dist/components/chat-thread.d.ts +77 -18
  20. package/dist/components/choice-card.d.ts +3 -28
  21. package/dist/components/composer-dom.d.ts +1 -1
  22. package/dist/components/composer-highlight.d.ts +1 -1
  23. package/dist/components/composer-history.d.ts +1 -1
  24. package/dist/components/composer.d.ts +1 -1
  25. package/dist/components/confirm-card.d.ts +3 -18
  26. package/dist/components/context.d.ts +8 -4
  27. package/dist/components/conversation-item.d.ts +1 -1
  28. package/dist/components/conversation-list.d.ts +4 -3
  29. package/dist/components/embed.d.ts +3 -3
  30. package/dist/components/file-tree.d.ts +11 -22
  31. package/dist/components/form-widgets.d.ts +1 -1
  32. package/dist/components/form.d.ts +3 -44
  33. package/dist/components/link-preview.d.ts +3 -3
  34. package/dist/components/loader.d.ts +30 -48
  35. package/dist/components/message-skills.d.ts +4 -0
  36. package/dist/components/message.d.ts +84 -21
  37. package/dist/components/model-switcher.d.ts +2 -2
  38. package/dist/components/prompt-input.d.ts +2 -2
  39. package/dist/components/response-compare-types.d.ts +11 -2
  40. package/dist/components/response-compare.d.ts +3 -3
  41. package/dist/components/source.d.ts +12 -3
  42. package/dist/components/tasks-card.d.ts +3 -31
  43. package/dist/components/thread.d.ts +17 -5
  44. package/dist/components/toast.d.ts +2 -2
  45. package/dist/components/tool-classify.d.ts +8 -0
  46. package/dist/components/tool-types.d.ts +29 -1
  47. package/dist/components/tool.d.ts +3 -3
  48. package/dist/components/use-card-resolution.d.ts +1 -1
  49. package/dist/create-tween-COnPwAQN.js +338 -0
  50. package/dist/create-tween-DmTUaXWE.js +341 -0
  51. package/dist/create-tween-qs-jjvNA.js +7 -0
  52. package/dist/custom-elements.json +1726 -463
  53. package/dist/elements/agent-card.js +1 -1
  54. package/dist/elements/artifact.js +1 -1
  55. package/dist/elements/attachments.js +1 -1
  56. package/dist/elements/audio-visualizer.js +1 -1
  57. package/dist/elements/avatar.js +1 -1
  58. package/dist/elements/badge.js +1 -1
  59. package/dist/elements/button.js +1 -1
  60. package/dist/elements/card.js +1 -1
  61. package/dist/elements/cards.js +1 -1
  62. package/dist/elements/chain-of-thought.js +1 -1
  63. package/dist/elements/chat-scope-picker.js +1 -1
  64. package/dist/elements/chat-types.d.ts +70 -10
  65. package/dist/elements/chat-workspace.js +1 -1
  66. package/dist/elements/chat.js +1 -1
  67. package/dist/elements/checkpoint.js +1 -1
  68. package/dist/elements/choice.js +1 -1
  69. package/dist/elements/chunks/{Icon-Tj58ES_d.js → Icon-CHG5z5L7.js} +1 -1
  70. package/dist/elements/chunks/{action-icons-ns1Fnedj.js → action-icons-BAtCEEgg.js} +1 -1
  71. package/dist/elements/chunks/arrow-left-CFPTeL1Y.js +1 -0
  72. package/dist/elements/chunks/artifact-fBZOE4SO.js +1 -0
  73. package/dist/elements/chunks/{attachments-mCB5F1Fq.js → attachments-DpYMe5VQ.js} +1 -1
  74. package/dist/elements/chunks/audio-visualizer-DFwzAcuL.js +1 -0
  75. package/dist/elements/chunks/{badge-B4Zuajl2.js → badge-D6zodm6E.js} +1 -1
  76. package/dist/elements/chunks/{button-ZWNif3--.js → button-C42vrGvO.js} +1 -1
  77. package/dist/elements/chunks/card-renderer-DMZsSuvU.js +1 -0
  78. package/dist/elements/chunks/card-tags-D8lZ-C_U.js +1 -0
  79. package/dist/elements/chunks/chat-thread-CNNEhol-.js +1 -0
  80. package/dist/elements/chunks/check-7Q3K-iXE.js +1 -0
  81. package/dist/elements/chunks/chevron-down-CpNYLn7E.js +1 -0
  82. package/dist/elements/chunks/chevron-right-DrH85Fha.js +1 -0
  83. package/dist/elements/chunks/choice-card-YoWjpsFV.js +1 -0
  84. package/dist/elements/chunks/circle-C9KRjKYv.js +1 -0
  85. package/dist/elements/chunks/circle-check-Dmi7Y4zw.js +1 -0
  86. package/dist/elements/chunks/{circle-x-B7faJFlY.js → circle-x-QIxXda6k.js} +1 -1
  87. package/dist/elements/chunks/code-block-CqeugReY.js +1 -0
  88. package/dist/elements/chunks/{collapsible-DM1Ckd4e.js → collapsible-sTv-_5lF.js} +1 -1
  89. package/dist/elements/chunks/{composer-BguS0QL_.js → composer-ldQyeVEB.js} +2 -2
  90. package/dist/elements/chunks/confirm-card-C0RNOwfn.js +1 -0
  91. package/dist/elements/chunks/context-5qgypNHC.js +1 -0
  92. package/dist/elements/chunks/conversation-list-DLzOacXz.js +1 -0
  93. package/dist/elements/chunks/create-tween-V4TXZ93X.js +7 -0
  94. package/dist/elements/chunks/default-input-DeeRSDHc.js +1 -0
  95. package/dist/elements/chunks/define-lE-QvQFn.js +1 -0
  96. package/dist/elements/chunks/{disclosure-CIZ5c8nO.js → disclosure-DZSa9jog.js} +1 -1
  97. package/dist/elements/chunks/{download-Dsbg3ste.js → download-B2ZmnGqW.js} +1 -1
  98. package/dist/elements/chunks/{dropdown-BDd1-Zgi.js → dropdown-R3B7cSRE.js} +1 -1
  99. package/dist/elements/chunks/{ellipsis-Dw6qrss-.js → ellipsis-BmxceY4l.js} +1 -1
  100. package/dist/elements/chunks/embed-BVrtTZPo.js +1 -0
  101. package/dist/elements/chunks/{external-link-Vt74zAoL.js → external-link-BbdR7YO7.js} +1 -1
  102. package/dist/elements/chunks/{file-text-CZrZF6_v.js → file-text-D7dijo1A.js} +1 -1
  103. package/dist/elements/chunks/{file-tree-DF4okKyo.js → file-tree-0upJ5jeb.js} +1 -1
  104. package/dist/elements/chunks/{folder-glP5rha4.js → folder-D8z58t7B.js} +1 -1
  105. package/dist/elements/chunks/form-p5BKJNw5.js +1 -0
  106. package/dist/elements/chunks/hover-card-CN9s2md5.js +1 -0
  107. package/dist/elements/chunks/{icon-BLb8beoi.js → icon-CNiKP37E.js} +1 -1
  108. package/dist/elements/chunks/{info-CIsv92JK.js → info-BSnuJiHI.js} +1 -1
  109. package/dist/elements/chunks/{input-Dds1kFyt.js → input-BauDmzxX.js} +1 -1
  110. package/dist/elements/chunks/{kbd-De_xbgi9.js → kbd-BlHJaP9b.js} +1 -1
  111. package/dist/elements/chunks/{link-i4r_k7z4.js → link-DEi5iUWC.js} +1 -1
  112. package/dist/elements/chunks/link-preview-BaHyM6W4.js +1 -0
  113. package/dist/elements/chunks/{loader-BmQH4s3V.js → loader-CmJG_Fkq.js} +1 -1
  114. package/dist/elements/chunks/{markdown-Zi21WhUz.js → markdown-D2jaMpCN.js} +1 -1
  115. package/dist/elements/chunks/message-C5UfXZ2Z.js +1 -0
  116. package/dist/elements/chunks/message-CXWLmmLn.js +1 -0
  117. package/dist/elements/chunks/message-square-hXylwsy0.js +1 -0
  118. package/dist/elements/chunks/{minimize-2--ifeCGrl.js → minimize-2-C9ytZFMU.js} +1 -1
  119. package/dist/elements/chunks/model-switcher-CivGfD7-.js +1 -0
  120. package/dist/elements/chunks/{overlay-kD8dwRv_.js → overlay-DJL_sbOm.js} +1 -1
  121. package/dist/elements/chunks/{paperclip-q21dYOSK.js → paperclip-CFaB8naM.js} +1 -1
  122. package/dist/elements/chunks/{progress-bar-BrAIIaaJ.js → progress-bar-Br5SksfR.js} +1 -1
  123. package/dist/elements/chunks/{prompt-suggestion-Bjn2K-fR.js → prompt-suggestion-CMIvtAhU.js} +1 -1
  124. package/dist/elements/chunks/reasoning-DpZcNzLq.js +1 -0
  125. package/dist/elements/chunks/{resizable-Dp4JExql.js → resizable-Q8i3T9a_.js} +1 -1
  126. package/dist/elements/chunks/{rotate-cw-CFWWkpj2.js → rotate-cw-B5IHCBFV.js} +1 -1
  127. package/dist/elements/chunks/{scroll-area-Bb0kHH1j.js → scroll-area-eLeydBje.js} +1 -1
  128. package/dist/elements/chunks/scroll-button-DWbz0yA1.js +1 -0
  129. package/dist/elements/chunks/{separator-9kRgr1X9.js → separator-Xic78AD_.js} +1 -1
  130. package/dist/elements/chunks/{settings-B8lmec4D.js → settings-B8H51pAx.js} +1 -1
  131. package/dist/elements/chunks/{settings-group-I0hEuXiN.js → settings-group-CsG9eYLe.js} +1 -1
  132. package/dist/elements/chunks/{share-C3lTiYGt.js → share-CNTx0z__.js} +1 -1
  133. package/dist/elements/chunks/skeleton-CLlHTcMI.js +1 -0
  134. package/dist/elements/chunks/slots-CIw9RlAe.js +1 -0
  135. package/dist/elements/chunks/source-BoVcU5ok.js +1 -0
  136. package/dist/elements/chunks/{star-CSJtGxgv.js → star-CxQVTVhI.js} +1 -1
  137. package/dist/elements/chunks/{store-CHyW95TP.js → store-CLtS5CUG.js} +1 -1
  138. package/dist/elements/chunks/tasks-card-CzlkLmUt.js +1 -0
  139. package/dist/elements/chunks/{text-shimmer-Cn9TmNpI.js → text-shimmer-D5NhpIQ1.js} +1 -1
  140. package/dist/elements/chunks/textarea-x5Uxsmtm.js +1 -0
  141. package/dist/elements/chunks/{thumbs-up-PNVVThEF.js → thumbs-up-UobcJnx9.js} +1 -1
  142. package/dist/elements/chunks/{toast-store-DKbQn3Wn.js → toast-store-BOfs9eXq.js} +1 -1
  143. package/dist/elements/chunks/{tool-DjTRpIpl.js → tool-Be6Dh_dt.js} +1 -1
  144. package/dist/elements/chunks/tooltip-RxMxyCLF.js +1 -0
  145. package/dist/elements/chunks/{triangle-alert-DsHTHCPm.js → triangle-alert-C4yxH2XN.js} +1 -1
  146. package/dist/elements/chunks/use-card-resolution-jva9ehH6.js +1 -0
  147. package/dist/elements/chunks/{variant-aurora-Dc4nQUia.js → variant-aurora-Dx4VRcjS.js} +2 -2
  148. package/dist/elements/chunks/{variant-custom-y_3kVQhS.js → variant-custom-Y1ZTWgEa.js} +1 -1
  149. package/dist/elements/chunks/{variant-wave-D5OR1-9Z.js → variant-wave-B9gml9Cg.js} +2 -2
  150. package/dist/elements/chunks/{video-B7vmenoC.js → video-CrPHsytT.js} +1 -1
  151. package/dist/elements/chunks/x-_-OPHept.js +1 -0
  152. package/dist/elements/coachmark.js +1 -1
  153. package/dist/elements/code-block.js +1 -1
  154. package/dist/elements/command.js +1 -1
  155. package/dist/elements/compare.js +1 -1
  156. package/dist/elements/composer.js +1 -1
  157. package/dist/elements/confirm-card.js +1 -1
  158. package/dist/elements/context-meter.js +1 -1
  159. package/dist/elements/conversation-list.js +1 -1
  160. package/dist/elements/default-input.d.ts +34 -7
  161. package/dist/elements/define.d.ts +1 -0
  162. package/dist/elements/dialog.js +1 -1
  163. package/dist/elements/disclosure.d.ts +1 -1
  164. package/dist/elements/editable-label.js +1 -1
  165. package/dist/elements/element-data-types.d.ts +107 -0
  166. package/dist/elements/embed.js +1 -1
  167. package/dist/elements/empty.js +1 -1
  168. package/dist/elements/feedback-bar.js +1 -1
  169. package/dist/elements/file-tree.js +1 -1
  170. package/dist/elements/file-upload.js +1 -1
  171. package/dist/elements/form.js +1 -1
  172. package/dist/elements/hover-card.js +1 -1
  173. package/dist/elements/icon.js +1 -1
  174. package/dist/elements/image.js +1 -1
  175. package/dist/elements/input.js +1 -1
  176. package/dist/elements/kbd.js +1 -1
  177. package/dist/elements/link-preview.js +1 -1
  178. package/dist/elements/loader.js +1 -1
  179. package/dist/elements/markdown.js +1 -1
  180. package/dist/elements/menu.js +1 -1
  181. package/dist/elements/message-skills.js +1 -1
  182. package/dist/elements/message.js +1 -1
  183. package/dist/elements/model-switcher.js +1 -1
  184. package/dist/elements/nav.js +1 -1
  185. package/dist/elements/notice.js +1 -1
  186. package/dist/elements/pane-group.js +1 -1
  187. package/dist/elements/pane.js +1 -1
  188. package/dist/elements/popover.js +1 -1
  189. package/dist/elements/progress-bar.js +1 -1
  190. package/dist/elements/prompt-dock.js +1 -1
  191. package/dist/elements/prompt-input.js +1 -1
  192. package/dist/elements/prompt-suggestions.js +1 -1
  193. package/dist/elements/reasoning.js +1 -1
  194. package/dist/elements/register.d.ts +8 -6
  195. package/dist/elements/remote.js +1 -1
  196. package/dist/elements/resizable.js +1 -1
  197. package/dist/elements/response-stream.js +1 -1
  198. package/dist/elements/screen.js +1 -1
  199. package/dist/elements/scroll-area.js +1 -1
  200. package/dist/elements/scroll-button.js +1 -1
  201. package/dist/elements/search.js +1 -1
  202. package/dist/elements/segmented.js +1 -1
  203. package/dist/elements/separator.js +1 -1
  204. package/dist/elements/setting-item.js +1 -1
  205. package/dist/elements/settings-group.js +1 -1
  206. package/dist/elements/skeleton.js +1 -1
  207. package/dist/elements/slot-text.d.ts +51 -0
  208. package/dist/elements/slots.d.ts +21 -0
  209. package/dist/elements/source.js +1 -1
  210. package/dist/elements/status.js +1 -1
  211. package/dist/elements/switch.js +1 -1
  212. package/dist/elements/tabs.js +1 -1
  213. package/dist/elements/tasks.js +1 -1
  214. package/dist/elements/text-shimmer.js +1 -1
  215. package/dist/elements/thinking-bar.js +1 -1
  216. package/dist/elements/thread.js +1 -1
  217. package/dist/elements/toast.js +1 -1
  218. package/dist/elements/tool.js +1 -1
  219. package/dist/elements/tooltip.js +1 -1
  220. package/dist/elements/validate-messages.d.ts +25 -0
  221. package/dist/elements/voice-input.js +1 -1
  222. package/dist/elements/voice-output.js +1 -1
  223. package/dist/elements.d.ts +2734 -217
  224. package/dist/index.d.ts +163 -125
  225. package/dist/index.js +6572 -5990
  226. package/dist/index.server.d.ts +5 -0
  227. package/dist/index.server.js +5403 -4860
  228. package/dist/kai-provider.es.d.ts +5 -0
  229. package/dist/kai-provider.es.js +79 -77
  230. package/dist/kai.es.d.ts +5 -0
  231. package/dist/kai.es.js +1 -1
  232. package/dist/llms/llms-full.txt +774 -151
  233. package/dist/llms/llms.txt +57 -5
  234. package/dist/mcp.es.js +4756 -782
  235. package/dist/primitives/card-component-types.d.ts +11 -0
  236. package/dist/primitives/card-data-types.d.ts +196 -0
  237. package/dist/primitives/card-host.d.ts +1 -1
  238. package/dist/primitives/card-recovery.d.ts +3 -3
  239. package/dist/primitives/card-registry.d.ts +4 -14
  240. package/dist/primitives/card-resolution.d.ts +1 -1
  241. package/dist/primitives/card-routing.d.ts +1 -1
  242. package/dist/primitives/card-tags.d.ts +11 -0
  243. package/dist/primitives/card-validate-cards.d.ts +57 -0
  244. package/dist/primitives/card-validate-generator.testlib.d.ts +20 -0
  245. package/dist/primitives/card-validate-schemas.d.ts +17 -0
  246. package/dist/primitives/card-validate.d.ts +24 -0
  247. package/dist/primitives/create-kai-chat.d.ts +3 -3
  248. package/dist/primitives/embed-providers.d.ts +1 -1
  249. package/dist/primitives/link-preview.d.ts +1 -1
  250. package/dist/primitives/message-feedback.d.ts +2 -2
  251. package/dist/primitives/toast-store.d.ts +1 -1
  252. package/dist/react/index.d.ts +730 -302
  253. package/dist/react/use-kai-chat.d.ts +8 -4
  254. package/dist/react.d.ts +5 -0
  255. package/dist/react.js +418 -317
  256. package/dist/register-impl-AxIlqjo7.js +145 -0
  257. package/dist/remote/host-embed.d.ts +1 -1
  258. package/dist/remote/index.d.ts +2 -2
  259. package/dist/remote/provider-runtime.d.ts +2 -2
  260. package/dist/remote/provider.d.ts +2 -2
  261. package/dist/remote/validate.d.ts +1 -1
  262. package/dist/remote/wire.d.ts +1 -1
  263. package/dist/schemas/artifact.schema.json +92 -0
  264. package/dist/schemas/embed.schema.json +0 -2
  265. package/dist/schemas/from-tool-call.d.ts +48 -0
  266. package/dist/schemas/index.d.ts +48 -0
  267. package/dist/schemas/link.schema.json +0 -2
  268. package/dist/schemas/provider-subsets.d.ts +136 -0
  269. package/dist/schemas/registry.d.ts +140 -0
  270. package/dist/schemas/tool-defs.d.ts +121 -0
  271. package/dist/schemas.d.ts +5 -0
  272. package/dist/schemas.js +717 -0
  273. package/dist/solid-BGYSJyHG.js +22960 -0
  274. package/dist/solid-Dt2nEwfl.js +20194 -0
  275. package/dist/solid.d.ts +66 -0
  276. package/dist/solid.js +261 -0
  277. package/dist/solid.server.d.ts +5 -0
  278. package/dist/solid.server.js +261 -0
  279. package/dist/state/index.d.ts +14 -4
  280. package/dist/state/messages.d.ts +8 -3
  281. package/dist/state/mock.d.ts +46 -0
  282. package/dist/state/parts.d.ts +85 -0
  283. package/dist/state/stream.d.ts +15 -9
  284. package/dist/state.d.ts +5 -0
  285. package/dist/state.js +253 -84
  286. package/dist/ui/action-icons.d.ts +1 -1
  287. package/dist/ui/collapsible.d.ts +11 -6
  288. package/dist/ui/dropdown.d.ts +47 -42
  289. package/dist/ui/pane-group.d.ts +1 -1
  290. package/dist/{variant-aurora-DVtGqVH6.js → variant-aurora-B44X69AG.js} +1 -1
  291. package/dist/variant-aurora-BRhV8Flk.js +391 -0
  292. package/dist/variant-aurora-Ds5ou9BH.js +381 -0
  293. package/dist/variant-custom-B20FhtYj.js +170 -0
  294. package/dist/{variant-custom-Dif-IV4u.js → variant-custom-BvA1Schl.js} +1 -1
  295. package/dist/variant-custom-D6Rtvneb.js +200 -0
  296. package/dist/{variant-wave-DbfNdvSi.js → variant-wave-BUQtkryq.js} +1 -1
  297. package/dist/variant-wave-BVYnqy9L.js +218 -0
  298. package/dist/variant-wave-DXC6_LcH.js +208 -0
  299. package/dist/wire/chunk.d.ts +171 -0
  300. package/dist/wire/consume.d.ts +26 -0
  301. package/dist/wire/encode.d.ts +221 -0
  302. package/dist/wire/files.d.ts +116 -0
  303. package/dist/wire/formats/anthropic.d.ts +2 -0
  304. package/dist/wire/formats/openai.d.ts +5 -0
  305. package/dist/wire/index.d.ts +16 -0
  306. package/dist/wire/media-types.d.ts +106 -0
  307. package/dist/wire/read.d.ts +26 -0
  308. package/dist/wire/sink-helpers.d.ts +21 -0
  309. package/dist/wire/sse.d.ts +33 -0
  310. package/dist/wire.d.ts +5 -53
  311. package/dist/wire.js +1126 -0
  312. package/frameworks/react/index.tsx +191 -158
  313. package/frameworks/react/runtime.tsx +21 -1
  314. package/frameworks/react/use-kai-chat.tsx +11 -1
  315. package/llms-full.txt +774 -151
  316. package/llms.txt +57 -5
  317. package/package.json +62 -8
  318. package/src/agent-tooling/archetypes.ts +127 -0
  319. package/src/agent-tooling/integrations/anthropic.ts +436 -0
  320. package/src/agent-tooling/integrations/cloudflare.ts +141 -52
  321. package/src/agent-tooling/integrations/langgraph.ts +80 -13
  322. package/src/agent-tooling/integrations/mastra.ts +161 -12
  323. package/src/agent-tooling/integrations/mock.ts +47 -8
  324. package/src/agent-tooling/integrations/ollama.ts +68 -24
  325. package/src/agent-tooling/integrations/openai.ts +89 -0
  326. package/src/agent-tooling/integrations/openrouter.ts +58 -8
  327. package/src/agent-tooling/integrations/pi.ts +104 -23
  328. package/src/agent-tooling/integrations/pydantic-ai.ts +61 -5
  329. package/src/agent-tooling/integrations/vercel-ai-sdk.ts +120 -13
  330. package/src/agent-tooling/mcp/manifest.ts +206 -25
  331. package/src/agent-tooling/mcp/tools/debug.ts +13 -7
  332. package/src/agent-tooling/mcp/tools/reference.ts +285 -6
  333. package/src/agent-tooling/mcp/tools/scaffold.ts +4152 -661
  334. package/src/agent-tooling/registry.ts +74 -0
  335. package/src/agent-tooling/types.ts +361 -1
  336. package/src/components/artifact-card.tsx +120 -0
  337. package/src/components/audio-visualizer/index.tsx +9 -0
  338. package/src/components/audio-visualizer/labs/lab-choreography.ts +187 -0
  339. package/src/components/audio-visualizer/labs/lab-shaders.ts +363 -0
  340. package/src/components/audio-visualizer/labs/lab-visualizer.tsx +102 -0
  341. package/src/components/audio-visualizer/shader-canvas.tsx +31 -1
  342. package/src/components/card-fallback.tsx +42 -10
  343. package/src/components/card-renderer.tsx +146 -9
  344. package/src/components/chat-container.tsx +4 -0
  345. package/src/components/chat-thread.tsx +128 -52
  346. package/src/components/choice-card.tsx +17 -29
  347. package/src/components/composer.tsx +12 -2
  348. package/src/components/confirm-card.tsx +24 -20
  349. package/src/components/context.tsx +30 -16
  350. package/src/components/conversation-item.tsx +6 -0
  351. package/src/components/conversation-list.tsx +18 -2
  352. package/src/components/file-tree.tsx +11 -22
  353. package/src/components/file-upload.tsx +14 -8
  354. package/src/components/form.tsx +14 -47
  355. package/src/components/loader.tsx +39 -12
  356. package/src/components/message-skills.tsx +4 -0
  357. package/src/components/message.tsx +294 -46
  358. package/src/components/model-switcher.tsx +38 -8
  359. package/src/components/reasoning.tsx +92 -5
  360. package/src/components/response-compare-types.ts +25 -0
  361. package/src/components/response-compare.tsx +4 -9
  362. package/src/components/source.tsx +50 -24
  363. package/src/components/tasks-card.tsx +10 -33
  364. package/src/components/thread.tsx +84 -42
  365. package/src/components/toast.tsx +17 -6
  366. package/src/components/tool-classify.ts +26 -0
  367. package/src/components/tool-types.ts +31 -1
  368. package/src/elements/agent-card.tsx +11 -11
  369. package/src/elements/artifact.tsx +15 -7
  370. package/src/elements/attachments.tsx +6 -4
  371. package/src/elements/avatar.tsx +1 -1
  372. package/src/elements/button.tsx +29 -6
  373. package/src/elements/card.tsx +2 -2
  374. package/src/elements/cards.tsx +109 -14
  375. package/src/elements/chain-of-thought.tsx +14 -10
  376. package/src/elements/chat-scope-picker.tsx +9 -7
  377. package/src/elements/chat-types.ts +59 -6
  378. package/src/elements/chat-workspace.tsx +50 -9
  379. package/src/elements/chat.tsx +90 -3
  380. package/src/elements/choice.tsx +8 -8
  381. package/src/elements/coachmark.tsx +1 -1
  382. package/src/elements/command.tsx +8 -23
  383. package/src/elements/compare.tsx +7 -6
  384. package/src/elements/compiled.css +1 -1
  385. package/src/elements/composer.tsx +8 -8
  386. package/src/elements/confirm-card.tsx +9 -9
  387. package/src/elements/context-meter.tsx +4 -18
  388. package/src/elements/conversation-list.tsx +14 -9
  389. package/src/elements/default-input.tsx +131 -8
  390. package/src/elements/define.tsx +178 -43
  391. package/src/elements/editable-label.tsx +17 -2
  392. package/src/elements/element-data-types.ts +112 -0
  393. package/src/elements/element-meta.json +1624 -306
  394. package/src/elements/element-types.d.ts +2645 -214
  395. package/src/elements/feedback-bar.tsx +1 -1
  396. package/src/elements/file-tree.tsx +1 -1
  397. package/src/elements/file-upload.tsx +1 -1
  398. package/src/elements/form.tsx +14 -6
  399. package/src/elements/input.tsx +1 -1
  400. package/src/elements/kbd.tsx +1 -1
  401. package/src/elements/menu.tsx +40 -32
  402. package/src/elements/message-skills.tsx +7 -9
  403. package/src/elements/message.tsx +200 -32
  404. package/src/elements/model-switcher.tsx +5 -3
  405. package/src/elements/pane.tsx +1 -1
  406. package/src/elements/prompt-dock.tsx +8 -8
  407. package/src/elements/prompt-input.tsx +10 -10
  408. package/src/elements/prompt-suggestions.tsx +7 -4
  409. package/src/elements/reasoning.tsx +1 -1
  410. package/src/elements/register.ts +9 -0
  411. package/src/elements/resizable.globals.d.ts +36 -0
  412. package/src/elements/resizable.tsx +24 -13
  413. package/src/elements/response-stream.tsx +1 -1
  414. package/src/elements/scroll-button.tsx +1 -1
  415. package/src/elements/search.tsx +6 -1
  416. package/src/elements/segmented.tsx +5 -11
  417. package/src/elements/separator.tsx +1 -1
  418. package/src/elements/slot-text.ts +73 -0
  419. package/src/elements/slots.ts +67 -24
  420. package/src/elements/source.tsx +21 -22
  421. package/src/elements/switch.tsx +3 -3
  422. package/src/elements/tasks.tsx +5 -4
  423. package/src/elements/thread.tsx +36 -4
  424. package/src/elements/toast.tsx +3 -2
  425. package/src/elements/tool.tsx +1 -1
  426. package/src/elements/validate-messages.ts +76 -0
  427. package/src/elements/voice-input.tsx +7 -7
  428. package/src/elements/voice-output.tsx +4 -4
  429. package/src/index.ts +145 -6
  430. package/src/primitives/card-component-types.ts +63 -0
  431. package/src/primitives/card-data-types.ts +312 -0
  432. package/src/primitives/card-recovery.ts +13 -2
  433. package/src/primitives/card-registry.tsx +34 -23
  434. package/src/primitives/card-schemas/artifact.schema.json +92 -0
  435. package/src/primitives/card-schemas/embed.schema.json +0 -2
  436. package/src/primitives/card-schemas/link.schema.json +0 -2
  437. package/src/primitives/card-tags.ts +61 -0
  438. package/src/primitives/card-validate-cards.ts +255 -0
  439. package/src/primitives/card-validate-generator.testlib.ts +38 -0
  440. package/src/primitives/card-validate-schemas.ts +58 -0
  441. package/src/primitives/card-validate.ts +48 -20
  442. package/src/primitives/create-tween.ts +54 -2
  443. package/src/primitives/message-feedback.ts +3 -2
  444. package/src/primitives/use-audio-analysis.ts +20 -1
  445. package/src/primitives/use-sequencer.ts +20 -1
  446. package/src/schemas/from-tool-call.ts +151 -0
  447. package/src/schemas/index.ts +340 -0
  448. package/src/schemas/provider-subsets.ts +538 -0
  449. package/src/schemas/registry.ts +355 -0
  450. package/src/schemas/tool-defs.ts +492 -0
  451. package/src/solid.ts +150 -0
  452. package/src/state/index.ts +27 -1
  453. package/src/state/messages.ts +21 -4
  454. package/src/state/mock.ts +211 -0
  455. package/src/state/parts.ts +295 -0
  456. package/src/state/stream.ts +56 -58
  457. package/src/ui/collapsible.tsx +17 -5
  458. package/src/ui/dropdown.tsx +46 -12
  459. package/src/ui/overlay.tsx +10 -4
  460. package/src/wire/chunk.ts +201 -0
  461. package/src/wire/consume.ts +440 -0
  462. package/src/wire/encode.ts +689 -0
  463. package/src/wire/files.ts +342 -0
  464. package/src/wire/formats/anthropic.ts +267 -0
  465. package/src/wire/formats/openai.ts +187 -0
  466. package/src/wire/index.ts +73 -0
  467. package/src/wire/media-types.ts +344 -0
  468. package/src/wire/read.ts +152 -0
  469. package/src/wire/sink-helpers.ts +50 -0
  470. package/src/wire/sse.ts +140 -0
  471. package/dist/create-tween-hvpmSuwW.js +0 -7
  472. package/dist/elements/chunks/arrow-left-DQocUFvy.js +0 -1
  473. package/dist/elements/chunks/audio-visualizer-BqNy7dfm.js +0 -1
  474. package/dist/elements/chunks/card-BkHbp4BA.js +0 -1
  475. package/dist/elements/chunks/chat-thread-CkRN6pZ7.js +0 -1
  476. package/dist/elements/chunks/check-B9-gn6SS.js +0 -1
  477. package/dist/elements/chunks/chevron-down-BNsxc2hk.js +0 -1
  478. package/dist/elements/chunks/chevron-right-Hv00StBO.js +0 -1
  479. package/dist/elements/chunks/circle-0e3KJTDr.js +0 -1
  480. package/dist/elements/chunks/circle-check-BNAS0JEy.js +0 -1
  481. package/dist/elements/chunks/code-block-BFUHn6Va.js +0 -1
  482. package/dist/elements/chunks/context-Cb7k4F-v.js +0 -1
  483. package/dist/elements/chunks/conversation-list-CvoAkWhN.js +0 -1
  484. package/dist/elements/chunks/create-tween-oVvAIG8r.js +0 -7
  485. package/dist/elements/chunks/default-input-Cqqilg9t.js +0 -1
  486. package/dist/elements/chunks/define-D1din7Ld.js +0 -1
  487. package/dist/elements/chunks/hover-card-Cmm6Q53m.js +0 -1
  488. package/dist/elements/chunks/message-BqyXDN3-.js +0 -1
  489. package/dist/elements/chunks/message-feedback-Djr3z6Yb.js +0 -1
  490. package/dist/elements/chunks/message-square-vFAgbDaX.js +0 -1
  491. package/dist/elements/chunks/model-switcher-B94YAKsM.js +0 -1
  492. package/dist/elements/chunks/reasoning-DTpCGtnY.js +0 -1
  493. package/dist/elements/chunks/scroll-button-B0cH5fXf.js +0 -1
  494. package/dist/elements/chunks/skeleton-DSXW5Yya.js +0 -1
  495. package/dist/elements/chunks/slots--V19HwUb.js +0 -1
  496. package/dist/elements/chunks/textarea-CUwqAX0G.js +0 -1
  497. package/dist/elements/chunks/tooltip-CgBZCVKp.js +0 -1
  498. package/dist/elements/chunks/use-card-resolution-BSu_XHjH.js +0 -1
  499. package/dist/elements/chunks/x-GRUeeQFT.js +0 -1
  500. package/dist/host-embed.d.ts +0 -33
  501. package/dist/kai-provider.d.ts +0 -2
  502. package/dist/origin.d.ts +0 -5
  503. package/dist/provider-runtime.d.ts +0 -27
  504. package/dist/register-impl-DQyejdfb.js +0 -145
  505. package/dist/validate.d.ts +0 -4
  506. package/dist/version.d.ts +0 -4
  507. package/src/components/component-meta.json +0 -4550
  508. package/src/elements/card-media.jpg +0 -0
  509. package/src/elements/resizable.d.ts +0 -27
  510. package/src/elements/video-poster.jpg +0 -0
@@ -1,22 +1,23 @@
1
- import { registerAll, WebComponentProps } from './runtime';
1
+ import { registerAll, WebComponentProps } from './runtime.js';
2
2
  export { registerAll };
3
- export { useKaiChat } from './use-kai-chat';
4
- export type { UseKaiChatOptions, KaiChatController, ChatMessage } from './use-kai-chat';
5
- export { useVoiceInput } from './use-voice-input';
3
+ export { useKaiChat } from './use-kai-chat.js';
4
+ export type { UseKaiChatOptions, KaiChatController } from './use-kai-chat.js';
5
+ export type { ChatMessage, ChatMessageAction, CustomAction, AvatarData, FeedbackVote, MessagePart, MessageSource, RawOrigin, ToolPart, ToolKind, CardEnvelope, AttachmentData, } from './use-kai-chat.js';
6
+ export { useVoiceInput } from './use-voice-input.js';
6
7
  export interface AgentCardProps extends WebComponentProps {
7
- /** The agent's name the primary label. Attribute: `name`. */
8
+ /** The agent's name, the primary label. Attribute: `name`. */
8
9
  name?: string;
9
10
  /** Selected / focused state: highlighted border + surface. Attribute: `active`. */
10
11
  active?: boolean;
11
- /** Raise a prominent "Needs you" pill plus a glowing amber edge the attention-routing signal that pulls focus to this agent. Attribute: `needs-attention`. */
12
+ /** Raise a prominent "Needs you" pill plus a glowing amber edge. This is the attention-routing signal that pulls focus to this agent. Attribute: `needs-attention`. */
12
13
  needsAttention?: boolean;
13
- /** Run status a JS PROPERTY (object), not an attribute. Shape: `{ tone, label?, pulse? }`, where `tone` is one of `working` | `idle` | `done` | `error` | `blocked` (maps to the kit's tool hues), `label` is an optional short string beside the dot, and `pulse` animates the dot. Set it with `el.status = { tone: 'working', label: 'Working', pulse: true }`. */
14
+ /** Run status. A JS PROPERTY (object), not an attribute. Shape: `{ tone, label?, pulse? }`, where `tone` is one of `working` | `idle` | `done` | `error` | `blocked` (maps to the kit's tool hues), `label` is an optional short string beside the dot, and `pulse` animates the dot. Set it with `el.status = { tone: 'working', label: 'Working', pulse: true }`. */
14
15
  status?: {
15
16
  tone: "working" | "idle" | "done" | "error" | "blocked";
16
17
  label?: string;
17
18
  pulse?: boolean;
18
19
  };
19
- /** The card was activated clicked, or Enter / Space while focused. Promote this agent back to focus. */
20
+ /** The card was activated by a click, or by Enter / Space while focused. Promote this agent back to focus. */
20
21
  onActivate?: (event: CustomEvent) => void;
21
22
  /** The trailing "..." kebab was clicked. The consumer opens its own menu; the card only surfaces the affordance (the click does not also activate the card). */
22
23
  onMenu?: (event: CustomEvent) => void;
@@ -25,22 +26,22 @@ export declare const AgentCard: import('react').ForwardRefExoticComponent<AgentC
25
26
  export interface ArtifactProps extends WebComponentProps {
26
27
  /** URL the preview iframe frames. Consumer-controlled. */
27
28
  src?: string;
28
- /** Files for the Code tab tree + each file's preview `url`. Set as a JS property (array). */
29
- files: {
29
+ /** Files for the Code tab tree + each file's preview `url`. Omit for a preview-only artifact (the Code tab then has nothing to show; pair it with `no-tabs` to hide the toggle). Set as a JS property (array). */
30
+ files?: {
30
31
  path: string;
31
- url?: undefined | string;
32
- code?: undefined | string;
33
- language?: undefined | string;
34
- type?: undefined | "html" | "pdf" | "image" | "other";
35
- additions?: undefined | number;
36
- deletions?: undefined | number;
37
- status?: undefined | "added" | "modified" | "deleted" | "renamed" | "untracked";
32
+ url?: string;
33
+ code?: string;
34
+ language?: string;
35
+ type?: "html" | "pdf" | "image" | "other";
36
+ additions?: number;
37
+ deletions?: number;
38
+ status?: "added" | "modified" | "deleted" | "renamed" | "untracked";
38
39
  }[];
39
40
  /** Controlled active tab: `preview` or `code`. When set, the artifact follows it (re-asserted on change). Leave unset for an uncontrolled tab (see `defaultTab`). */
40
41
  tab?: "preview" | "code";
41
42
  /** Uncontrolled INITIAL tab (used only when `tab` is unset). Default `preview`. Seeds the starting tab; the user can then switch freely without the consumer re-asserting a controlled `tab`. */
42
43
  defaultTab?: "preview" | "code";
43
- /** Selected file path syncs the tree highlight, Code source, and preview. */
44
+ /** Selected file path. Syncs the tree highlight, Code source, and preview. */
44
45
  activeFile?: string;
45
46
  /** iframe `sandbox` override. Secure default `allow-scripts allow-forms` (NOT `allow-same-origin`). */
46
47
  sandbox?: string;
@@ -76,6 +77,10 @@ export interface ArtifactProps extends WebComponentProps {
76
77
  onMaximizeChange?: (event: CustomEvent<{
77
78
  maximized: boolean;
78
79
  }>) => void;
80
+ /** The maximize PROTOCOL intent, raised as a raw bubbling + composed CustomEvent (not through `dispatch`) so an enclosing `<kai-resizable>` can catch it and maximize the containing panel. Declared here so it is typed and reaches the generated API. Listen for it to drive maximize from your own chrome, or re-emit it to trigger one. */
81
+ onMaximizeIntent?: (event: CustomEvent<{
82
+ requested: boolean;
83
+ }>) => void;
79
84
  /** Fired when the preview navigates. `detail.url` = the new location. */
80
85
  onNavigate?: (event: CustomEvent<{
81
86
  url: string;
@@ -87,14 +92,14 @@ export interface ArtifactProps extends WebComponentProps {
87
92
  }
88
93
  export declare const Artifact: import('react').ForwardRefExoticComponent<ArtifactProps & import('react').RefAttributes<HTMLElement>>;
89
94
  export interface AttachmentsProps extends WebComponentProps {
90
- /** The attachments to render. Set as a JS property (array). */
91
- items: {
95
+ /** The attachments to render. Omit (or pass an empty array) for the empty state, which shows `emptyText` if set and nothing otherwise. Set as a JS property (array). */
96
+ items?: {
92
97
  id: string;
93
98
  type: "file" | "source-document";
94
- filename?: undefined | string;
95
- mediaType?: undefined | string;
96
- url?: undefined | string;
97
- title?: undefined | string;
99
+ filename?: string;
100
+ mediaType?: string;
101
+ url?: string;
102
+ title?: string;
98
103
  }[];
99
104
  /** Layout: `grid` = visual tiles, `inline` = icon + label chips, `list` = rows. */
100
105
  variant?: "grid" | "inline" | "list";
@@ -158,7 +163,7 @@ export interface AvatarProps extends WebComponentProps {
158
163
  src?: string;
159
164
  /** Alt text for the image. Defaults to `fallback`. */
160
165
  alt?: string;
161
- /** Short text shown when there's no image usually initials (e.g. "JD", "AI"). */
166
+ /** Short text shown when there's no image, usually initials (e.g. "JD", "AI"). */
162
167
  fallback?: string;
163
168
  /** Size token: `sm` | `md` (default) | `lg`. */
164
169
  size?: "sm" | "md" | "lg";
@@ -170,7 +175,7 @@ export interface BadgeProps extends WebComponentProps {
170
175
  }
171
176
  export declare const Badge: import('react').ForwardRefExoticComponent<BadgeProps & import('react').RefAttributes<HTMLElement>>;
172
177
  export interface ButtonProps extends WebComponentProps {
173
- /** Visual style. `default` (filled), `subtle` (muted text, hover tint the toolbar icon look), `ghost` (transparent, hover fill), `outline`, or `destructive`. Defaults to `default`. */
178
+ /** Visual style. `default` (filled), `subtle` (muted text, hover tint, the toolbar icon look), `ghost` (transparent, hover fill), `outline`, or `destructive`. Defaults to `default`. */
174
179
  variant?: "default" | "subtle" | "ghost" | "outline" | "destructive";
175
180
  /** Size token. `icon` / `icon-sm` are square (for icon-only buttons); `sm` / `md` / `lg` size text buttons. Defaults to `md`. */
176
181
  size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
@@ -178,11 +183,11 @@ export interface ButtonProps extends WebComponentProps {
178
183
  icon?: string;
179
184
  /** Trailing icon, after the label (e.g. `"chevron-down"` for a menu affordance). */
180
185
  iconTrailing?: string;
181
- /** Accessible name. REQUIRED for icon-only buttons (no visible text); ignored when you slot visible text, which already names the button. */
186
+ /** Accessible name. REQUIRED for icon-only buttons (no visible text); ignored when you slot visible text, which already names the button. An `aria-label` on top of visible text REPLACES that name rather than adding to it, so a button reading "Save" that answers to "Submit" is unusable by speech input (WCAG 2.5.3, Label in Name). The visible text wins. An `icon` / `icon-sm` size hides the slot, which makes the button icon-only whatever you slotted, so `label` is what names it there. */
182
187
  label?: string;
183
188
  /** Disable the button (non-interactive, dimmed). */
184
189
  disabled?: boolean;
185
- /** Stretch the button to the full width of its container (a block button) e.g. a card CTA or a stacked action. Attribute: `full`. */
190
+ /** Stretch the button to the full width of its container (a block button), e.g. a card CTA or a stacked action. Attribute: `full`. */
186
191
  full?: boolean;
187
192
  /** Justify the button's content: `start`, `center` (default), or `end`. Combine with `full` for a full-width, left-aligned button. */
188
193
  align?: "start" | "center" | "end";
@@ -195,7 +200,7 @@ export declare const Button: import('react').ForwardRefExoticComponent<ButtonPro
195
200
  export interface CardProps extends WebComponentProps {
196
201
  /** Surface treatment: `outlined` (default) | `filled` | `plain` | `accent`. Attribute: `appearance`. */
197
202
  appearance?: "outlined" | "filled" | "plain" | "accent";
198
- /** `vertical` (default, media on top) | `horizontal` (media at the start) | `responsive` (horizontal when the card's container is wide enough, else vertical a container query on the card's own width). Attribute: `orientation`. */
203
+ /** `vertical` (default, media on top) | `horizontal` (media at the start) | `responsive` (horizontal when the card's container is wide enough, else vertical, via a container query on the card's own width). Attribute: `orientation`. */
199
204
  orientation?: "vertical" | "horizontal" | "responsive";
200
205
  /** The card width below which a `responsive` card collapses to vertical and the footer actions stack. A CSS length; default `28rem`. Attribute: `collapse`. */
201
206
  collapse?: string;
@@ -244,6 +249,8 @@ export interface CardsProps extends WebComponentProps {
244
249
  }[];
245
250
  /** Optional type→tag overrides/additions (merged over the built-ins). Property: `el.types`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
246
251
  types?: Record<string, string>;
252
+ /** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `types`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.schemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name, matching `mergeCardTags`, where your entry is spread over ours. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. See `CardSchemaMap` in components/card-renderer.tsx. */
253
+ schemas?: Record<string, object>;
247
254
  /** Optional CardPolicy handling child events. Property: `el.policy`. */
248
255
  policy?: {
249
256
  onSubmit?: (cardId: string, data: unknown) => void;
@@ -259,7 +266,9 @@ export interface CardsProps extends WebComponentProps {
259
266
  onError?: (cardId: string, message: string) => void;
260
267
  maxSendPromptMode?: "compose" | "send";
261
268
  };
262
- /** A child card transitioned to a resolved/deferred state (an action was chosen, a form/tasks submission landed, or it was dismissed) re-emitted off the host as a non-bubbling convenience event so a consumer can observe resolution centrally without diffing the cards array. `detail` = `{ cardId, resolution }`. (A `reopen` un-resolves a card and has no `CardResolution`, so it does NOT fire this observe reopen via the underlying bubbling `kai-card` event.) */
269
+ /** Validate each envelope's `data` against the schema for its type before rendering it, using a built-in's own schema or yours from `schemas`. Default `true`; set `validate-cards="false"` (or `el.validateCards = false`) to opt out. A hard failure (wrong type, a missing required field) renders a diagnostic naming the field instead of the card; a soft failure (bounds) renders the card unchanged. Both emit a contract `error` event. On in production too: a model emitting a bad shape is a production failure mode, so stripping the check there would hide it from exactly the person who needs to see it. */
270
+ validateCards?: boolean;
271
+ /** A child card transitioned to a resolved/deferred state (an action was chosen, a form/tasks submission landed, or it was dismissed). Re-emitted off the host as a non-bubbling convenience event so a consumer can observe resolution centrally without diffing the cards array. `detail` = `{ cardId, resolution }`. (A `reopen` un-resolves a card and has no `CardResolution`, so it does NOT fire this; observe reopen via the underlying bubbling `kai-card` event.) */
263
272
  onCardResolved?: (event: CustomEvent<{
264
273
  cardId: string;
265
274
  resolution: {
@@ -283,63 +292,27 @@ export interface CardsProps extends WebComponentProps {
283
292
  }
284
293
  export declare const Cards: import('react').ForwardRefExoticComponent<CardsProps & import('react').RefAttributes<HTMLElement>>;
285
294
  export interface ChainOfThoughtProps extends WebComponentProps {
286
- /** The reasoning steps. Set as a JS property. Compound sub-parts collapse to this one data model (Route 1). Each `{ label, content?, id? }`. */
287
- steps: {
295
+ /** The reasoning steps. Set as a JS property. Compound sub-parts collapse to this one data model (Route 1). Each `{ label, content?, id? }`. Omit to supply the steps as `<kai-step>` light-DOM children instead; when both are present the property's steps come first. */
296
+ steps?: {
288
297
  label: string;
289
- content?: undefined | string;
290
- id?: undefined | string;
298
+ content?: string;
299
+ id?: string;
291
300
  }[];
292
- /** Open mode: `'multiple'` (default any number of steps open at once) or `'single'` (at most one open; opening a step closes the others). */
301
+ /** Open mode: `'multiple'` (default, any number of steps open at once) or `'single'` (at most one open; opening a step closes the others). */
293
302
  type?: "single" | "multiple";
294
303
  /** Controlled open step key(s). When set, it WINS over user interaction (the consumer owns the open set). String in `single` mode, string[] in `multiple` mode. Set as a JS property. */
295
304
  value?: string | string[];
296
- /** Uncontrolled INITIAL open step key(s) seeds which steps render expanded. Ignored once `value` is provided. Set as a JS property. */
305
+ /** Uncontrolled INITIAL open step key(s), seeding which steps render expanded. Ignored once `value` is provided. Set as a JS property. */
297
306
  defaultValue?: string | string[];
298
- /** The open set changed by user click OR an expand()/collapse()/toggle() call. `value` is a string in `single` mode, a string[] in `multiple` mode. (Maps Radix Accordion's onValueChange.) */
307
+ /** The open set changed, by user click OR an expand()/collapse()/toggle() call. `value` is a string in `single` mode, a string[] in `multiple` mode. (Maps Radix Accordion's onValueChange.) */
299
308
  onValueChange?: (event: CustomEvent<{
300
309
  value: string | string[];
301
310
  }>) => void;
302
311
  }
303
312
  export declare const ChainOfThought: import('react').ForwardRefExoticComponent<ChainOfThoughtProps & import('react').RefAttributes<HTMLElement>>;
304
313
  export interface ChatProps extends WebComponentProps {
305
- /** The full message thread to render, newest last. Each entry carries its role, content, and optional reasoning/tools/attachments/actions. Set as a JS property (`el.messages = [...]`). */
306
- messages: {
307
- id: string;
308
- role: "user" | "assistant";
309
- content: string;
310
- reasoning?: undefined | {
311
- text: string;
312
- label?: undefined | string;
313
- };
314
- tools?: undefined | {
315
- type: string;
316
- state: "input-streaming" | "input-available" | "output-available" | "output-error";
317
- input?: undefined | Record<string, unknown>;
318
- output?: undefined | Record<string, unknown>;
319
- toolCallId?: undefined | string;
320
- errorText?: undefined | string;
321
- }[];
322
- attachments?: undefined | {
323
- id: string;
324
- type: "file" | "source-document";
325
- filename?: undefined | string;
326
- mediaType?: undefined | string;
327
- url?: undefined | string;
328
- title?: undefined | string;
329
- }[];
330
- actions?: undefined | ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
331
- id: string;
332
- label: string;
333
- icon?: undefined | string;
334
- tooltip?: undefined | string;
335
- })[];
336
- avatar?: undefined | {
337
- src?: undefined | string;
338
- fallback?: undefined | string;
339
- alt?: undefined | string;
340
- };
341
- feedback?: undefined | "like" | "dislike";
342
- }[];
314
+ /** Show a Search (Globe) button in the input toolbar; fires a `search` event. */
315
+ search?: boolean;
343
316
  /** Value of the input. A **string** is controlled (the host owns the text and updates it on `kai-value-change`). A **ComposerDoc** is a one-time seed that pre-populates pills; the user then edits freely. Leave unset for uncontrolled. */
344
317
  value?: string | ({
345
318
  type: "text";
@@ -366,7 +339,7 @@ export interface ChatProps extends WebComponentProps {
366
339
  /** Keep suggestions visible after the conversation starts. By default suggestions are conversation starters and hide once `messages` is non-empty; set this to keep them always shown. Default false. */
367
340
  persistSuggestions?: boolean;
368
341
  /** Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`. */
369
- proseSize?: "sm" | "lg" | "xs" | "base";
342
+ proseSize?: "xs" | "sm" | "base" | "lg";
370
343
  /** Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`). */
371
344
  codeTheme?: string;
372
345
  /** Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true. */
@@ -393,27 +366,25 @@ export interface ChatProps extends WebComponentProps {
393
366
  };
394
367
  /** Show the scroll-to-bottom button inside the scroll area. Default true. */
395
368
  scrollButton?: boolean;
396
- /** Whether the host has `slot="header-start"` content (left of the title) set by the `<kai-chat>` facade so a custom control forces the header open. */
369
+ /** Whether the host has `slot="header-start"` content (left of the title). Set by the `<kai-chat>` facade so a custom control forces the header open. */
397
370
  headerStart?: boolean;
398
371
  /** Whether the host has `slot="header-end"` content (right of the controls). */
399
372
  headerEnd?: boolean;
400
- /** REPLACE full custom header in place of the built-in title/model/context bar. */
373
+ /** REPLACE: full custom header in place of the built-in title/model/context bar. */
401
374
  headerFull?: boolean;
402
- /** INJECT left sidebar column (e.g. a conversation list / your own nav). */
375
+ /** INJECT: left sidebar column (e.g. a conversation list / your own nav). */
403
376
  sidebar?: boolean;
404
- /** REPLACE custom zero-state rendered in the message area while the thread is empty (replaces the empty message list only; the composer and its suggestions still render). */
377
+ /** REPLACE: custom zero-state rendered in the message area while the thread is empty (replaces the empty message list only; the composer and its suggestions still render). */
405
378
  empty?: boolean;
406
- /** REPLACE full custom composer in place of the built-in prompt input. The projected content wires its own submit (the data-flow boundary). */
379
+ /** REPLACE: full custom composer in place of the built-in prompt input. The projected content wires its own submit (the data-flow boundary). */
407
380
  composer?: boolean;
408
- /** INJECT accessory row just above the composer (e.g. extra actions). */
381
+ /** INJECT: accessory row just above the composer (e.g. extra actions). */
409
382
  composerActions?: boolean;
410
- /** INJECT footer row below the composer (disclaimers, token meter, …). */
383
+ /** INJECT: footer row below the composer (disclaimers, token meter, …). */
411
384
  footer?: boolean;
412
- /** Show a Search (Globe) button in the input toolbar; fires a `search` event. */
413
- search?: boolean;
414
385
  /** Show a Voice (Mic) button in the input toolbar; fires a `voice` event. */
415
386
  voice?: boolean;
416
- /** Rich entity triggers each `{ char, kind, items }` opens a caret-anchored menu that inserts an atomic pill (`/` skills, `@` agents/plugins). Set as a JS property; forwarded to the input. */
387
+ /** Rich entity triggers. Each `{ char, kind, items }` opens a caret-anchored menu that inserts an atomic pill (`/` skills, `@` agents/plugins). Set as a JS property; forwarded to the input. */
417
388
  triggers?: {
418
389
  char: string;
419
390
  kind: string;
@@ -432,6 +403,124 @@ export interface ChatProps extends WebComponentProps {
432
403
  kindIcons?: Record<string, string>;
433
404
  /** Whether each message's action bar is always visible (`'always'`, default) or only revealed on hover of that message row (`'hover'`). */
434
405
  actionsReveal?: "always" | "hover";
406
+ /** Which attachment media types the user may stage, in HTML `accept` syntax: `<kai-chat accept="image/*,application/pdf">`. A plain string, so unlike `messages` it DOES work as an attribute. Omitted means no filter. MEDIA TYPES ONLY -- exact (`image/png`) or subtype wildcard (`text/*`). HTML allows a file extension here and this does not: `accept=".py"` THROWS with the entry named, rather than silently resolving to a picker that accepts nothing. It can only NARROW what the kit can already encode: `accept="image/*"` resolves to the four image formats both APIs take, not to every image type the OS offers. Pass the SAME string to `toOpenAIMessages(msgs, { accept })` and the picker and the wire cannot disagree -- both resolve it through `resolveMediaPolicy` against one declaration. That declaration is readable as `encodableMediaTypes()` from `@kitn.ai/ui/wire`, if you would rather build your own picker than use this prop. */
407
+ accept?: string;
408
+ /** The full message thread to render, newest last. Each entry carries its role, ordered `parts`, and optional actions/avatar/feedback. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). Omit for an empty thread. Re-declared here (rather than inherited from `ChatThreadProps`) because the ELEMENT registers a `[]` default and renders the empty state without it, while the SolidJS `<ChatThread>` component still requires it. The facade hands it a validated array either way. Matches `<kai-thread>`. */
409
+ messages?: {
410
+ id: string;
411
+ role: "user" | "assistant";
412
+ parts: ({
413
+ type: "text";
414
+ text: string;
415
+ raw?: {
416
+ source: string;
417
+ payload: unknown;
418
+ };
419
+ } | {
420
+ type: "reasoning";
421
+ text: string;
422
+ label?: string;
423
+ index?: number;
424
+ streamId?: string;
425
+ signature?: string;
426
+ raw?: {
427
+ source: string;
428
+ payload: unknown;
429
+ };
430
+ } | {
431
+ type: "tool";
432
+ tool: {
433
+ type: string;
434
+ kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
435
+ state: "input-streaming" | "input-available" | "output-available" | "output-error";
436
+ input?: Record<string, unknown>;
437
+ rawInput?: string;
438
+ output?: Record<string, unknown>;
439
+ toolCallId?: string;
440
+ errorText?: string;
441
+ raw?: {
442
+ source: string;
443
+ payload: unknown;
444
+ };
445
+ };
446
+ raw?: {
447
+ source: string;
448
+ payload: unknown;
449
+ };
450
+ } | {
451
+ type: "card";
452
+ envelope: {
453
+ type: string;
454
+ id: string;
455
+ data: unknown;
456
+ title?: string;
457
+ resolution?: {
458
+ kind: "action";
459
+ action: string;
460
+ payload?: unknown;
461
+ at?: string;
462
+ } | {
463
+ kind: "submit";
464
+ data: unknown;
465
+ at?: string;
466
+ } | {
467
+ kind: "dismissed";
468
+ at?: string;
469
+ } | {
470
+ kind: "expired";
471
+ reason?: string;
472
+ at?: string;
473
+ };
474
+ };
475
+ raw?: {
476
+ source: string;
477
+ payload: unknown;
478
+ };
479
+ } | {
480
+ type: "source";
481
+ source: {
482
+ id?: string;
483
+ url?: string;
484
+ title?: string;
485
+ snippet?: string;
486
+ index?: number;
487
+ };
488
+ raw?: {
489
+ source: string;
490
+ payload: unknown;
491
+ };
492
+ } | {
493
+ type: "file";
494
+ attachment: {
495
+ id: string;
496
+ type: "file" | "source-document";
497
+ filename?: string;
498
+ mediaType?: string;
499
+ url?: string;
500
+ title?: string;
501
+ };
502
+ raw?: {
503
+ source: string;
504
+ payload: unknown;
505
+ };
506
+ })[];
507
+ actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
508
+ id: string;
509
+ label: string;
510
+ icon?: string;
511
+ tooltip?: string;
512
+ })[];
513
+ avatar?: {
514
+ src?: string;
515
+ fallback?: string;
516
+ alt?: string;
517
+ };
518
+ feedback?: "like" | "dislike";
519
+ }[];
520
+ /** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
521
+ cardTypes?: Record<string, string>;
522
+ /** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `cardTypes`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.cardSchemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. */
523
+ cardSchemas?: Record<string, object>;
435
524
  /** The staged attachments changed (file added or removed). Carries the full current list so a consumer can react in real time. */
436
525
  onAttachmentsChange?: (event: CustomEvent<{
437
526
  attachments: {
@@ -443,6 +532,14 @@ export interface ChatProps extends WebComponentProps {
443
532
  title?: undefined | string;
444
533
  }[];
445
534
  }>) => void;
535
+ /** One or more picked files were refused because `accept` excluded them. The element renders NO message of its own: it reports the facts (name, media type, whether the kit could have sent it) and what the user should see is the application's call. Only ever fires when `accept` is set. */
536
+ onAttachmentsRejected?: (event: CustomEvent<{
537
+ rejected: {
538
+ filename: string;
539
+ mediaType: string;
540
+ reason: "filtered" | "unsupported";
541
+ }[];
542
+ }>) => void;
446
543
  /** An action button on a message was clicked. `action` is the built-in name or custom id. `state` is present only for the toggleable feedback votes: `'on'` when a like/dislike is set, `'off'` when re-tapped to clear. */
447
544
  onMessageAction?: (event: CustomEvent<{
448
545
  messageId: string;
@@ -485,7 +582,7 @@ export interface CheckpointProps extends WebComponentProps {
485
582
  /** Tooltip on hover. */
486
583
  tooltip?: string;
487
584
  /** Visual button style. */
488
- variant?: "default" | "ghost" | "outline";
585
+ variant?: "ghost" | "default" | "outline";
489
586
  /** Button size (use an `icon*` size for an icon-only checkpoint). */
490
587
  size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
491
588
  /** The checkpoint was clicked. */
@@ -494,14 +591,36 @@ export interface CheckpointProps extends WebComponentProps {
494
591
  export declare const Checkpoint: import('react').ForwardRefExoticComponent<CheckpointProps & import('react').RefAttributes<HTMLElement>>;
495
592
  export interface ChoiceProps extends WebComponentProps {
496
593
  /** The choice definition (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { prompt, options:[…], allowOther?, submitLabel? }`. Import `ChoiceCardData` from `@kitn.ai/ui` for the full shape. */
497
- data?: Record<string, unknown>;
594
+ data?: {
595
+ prompt?: string;
596
+ options: {
597
+ id: string;
598
+ label: string;
599
+ description?: string;
600
+ media?: {
601
+ image?: string;
602
+ imageAlt?: string;
603
+ icon?: string;
604
+ };
605
+ meta?: string;
606
+ recommended?: boolean;
607
+ disabled?: boolean;
608
+ payload?: unknown;
609
+ }[];
610
+ allowOther?: boolean | {
611
+ label?: string;
612
+ placeholder?: string;
613
+ };
614
+ submitLabel?: string;
615
+ dismissible?: boolean;
616
+ };
498
617
  /** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
499
618
  cardId?: string;
500
619
  /** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
501
620
  heading?: string;
502
621
  /** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'action', action:'…' }`. */
503
622
  resolution?: Record<string, unknown>;
504
- /** Controlled selection the selected option id. When set, the consumer owns the current pick (RadioGroup `value`). Attribute: `value`. */
623
+ /** Controlled selection: the selected option id. When set, the consumer owns the current pick (RadioGroup `value`). Attribute: `value`. */
505
624
  value?: string;
506
625
  /** Option id to pre-select on mount (uncontrolled seed). Attribute: `default-value`. */
507
626
  defaultValue?: string;
@@ -524,8 +643,8 @@ export interface CoachmarkProps extends WebComponentProps {
524
643
  badge?: string;
525
644
  /** Floating placement relative to the anchor (default `bottom`). */
526
645
  placement?: string;
527
- /** Color tone: `primary` (default, theme accent), `info` (blue), `success` (green), `warning` (amber), or `error` (red) reusing the kit's tool hues. */
528
- tone?: "error" | "primary" | "info" | "success" | "warning";
646
+ /** Color tone: `primary` (default, theme accent), `info` (blue), `success` (green), `warning` (amber), or `error` (red), reusing the kit's tool hues. */
647
+ tone?: "primary" | "info" | "success" | "warning" | "error";
529
648
  /** Render the arrow that points at the anchor (default `true`). Set `arrow="false"` for a plain bubble with no pointer. */
530
649
  arrow?: boolean;
531
650
  /** The × dismiss button was pressed. The consumer records that this hint was seen so it won't show again. */
@@ -546,11 +665,11 @@ export interface CodeBlockProps extends WebComponentProps {
546
665
  /** Disable syntax highlighting (renders plain text, no Shiki). */
547
666
  codeHighlight?: boolean;
548
667
  /** Code text sizing. */
549
- proseSize?: "sm" | "lg" | "xs" | "base";
668
+ proseSize?: "xs" | "sm" | "base" | "lg";
550
669
  }
551
670
  export declare const CodeBlock: import('react').ForwardRefExoticComponent<CodeBlockProps & import('react').RefAttributes<HTMLElement>>;
552
671
  export interface CommandProps extends WebComponentProps {
553
- /** Flat list of items. Set as a JS property not an HTML attribute. */
672
+ /** Flat list of items. Set as a JS property, not an HTML attribute. */
554
673
  items?: {
555
674
  id: string;
556
675
  label: string;
@@ -563,9 +682,9 @@ export interface CommandProps extends WebComponentProps {
563
682
  placeholder?: string;
564
683
  /** Label shown when no items match the current query. */
565
684
  emptyLabel?: string;
566
- /** Fired when the highlighted/active item changes via Arrow keys or when filtering re-clamps the active row. `id` is the newly active item's id, or `undefined` when no item is active (e.g. the filtered list is empty). Lets a host preview the active item without committing a selection. */
685
+ /** Fired when the highlighted/active item changes, via Arrow keys or when filtering re-clamps the active row. `id` is the newly active item's id, or `undefined` when no item is active (e.g. the filtered list is empty). Lets a host preview the active item without committing a selection. */
567
686
  onActiveChange?: (event: CustomEvent<{
568
- id: undefined | string;
687
+ id: string | undefined;
569
688
  }>) => void;
570
689
  /** Fired on every keystroke in the search input. */
571
690
  onQueryChange?: (event: CustomEvent<{
@@ -584,10 +703,10 @@ export interface CompareProps extends WebComponentProps {
584
703
  compareId?: string;
585
704
  /** Re-hydrate / control the user's pick. Set as a JS PROPERTY: `el.selection = { chosenId, rejectedIds }`. Renders the collapsed winner. */
586
705
  selection?: Record<string, unknown>;
587
- /** Layout: `'auto'` (default columns when wide, tabs when narrow, by CONTAINER width) | `'columns'` (side-by-side) | `'tabs'` (pills to switch). Attribute: `layout`. */
706
+ /** Layout: `'auto'` (default, columns when wide, tabs when narrow, by CONTAINER width) | `'columns'` (side-by-side) | `'tabs'` (pills to switch). Attribute: `layout`. */
588
707
  layout?: "auto" | "columns" | "tabs";
589
708
  /** Prose/text size for the rendered candidates. Attribute: `prose-size`. */
590
- proseSize?: "sm" | "lg" | "xs" | "base";
709
+ proseSize?: "xs" | "sm" | "base" | "lg";
591
710
  /** Shiki theme for code blocks in the candidates. Attribute: `code-theme`. */
592
711
  codeTheme?: string;
593
712
  /** Whether code blocks are syntax-highlighted. Attribute: `code-highlight`. */
@@ -610,7 +729,7 @@ export interface CompareProps extends WebComponentProps {
610
729
  }
611
730
  export declare const Compare: import('react').ForwardRefExoticComponent<CompareProps & import('react').RefAttributes<HTMLElement>>;
612
731
  export interface ComposerProps extends WebComponentProps {
613
- /** Controlled value string or a full ComposerDoc (set as JS property). */
732
+ /** Controlled value: a string or a full ComposerDoc (set as JS property). */
614
733
  value?: string | ({
615
734
  type: "text";
616
735
  text: string;
@@ -632,10 +751,10 @@ export interface ComposerProps extends WebComponentProps {
632
751
  /** Show a loading/streaming state and block submit. */
633
752
  loading?: boolean;
634
753
  /** Maximum height in px before the content scrolls. Default 240. */
635
- maxHeight?: string | number;
754
+ maxHeight?: number | string;
636
755
  /** Whether pressing Enter (without Shift) submits. Default true. */
637
756
  submitOnEnter?: boolean;
638
- /** Trigger definitions set as a JS property. */
757
+ /** Trigger definitions. Set as a JS property. */
639
758
  triggers?: {
640
759
  char: string;
641
760
  kind: string;
@@ -650,7 +769,7 @@ export interface ComposerProps extends WebComponentProps {
650
769
  data?: Record<string, unknown>;
651
770
  }[];
652
771
  }[];
653
- /** Keyword highlight rules set as a JS property. */
772
+ /** Keyword highlight rules. Set as a JS property. */
654
773
  highlights?: (string | {
655
774
  pattern: string;
656
775
  flags?: string;
@@ -684,7 +803,7 @@ export interface ComposerProps extends WebComponentProps {
684
803
  data?: undefined | Record<string, unknown>;
685
804
  };
686
805
  }>) => void;
687
- /** The composer gained focus. `focus`/`blur` are NOT composed natively, so they don't escape the shadow root these re-expose them on the host. (For `keydown`/`paste`/`focusin`/`focusout`, listen NATIVELY on `<kai-composer>`: they're composed and already cross the shadow boundary.) */
806
+ /** The composer gained focus. `focus`/`blur` are NOT composed natively, so they don't escape the shadow root; these re-expose them on the host. (For `keydown`/`paste`/`focusin`/`focusout`, listen NATIVELY on `<kai-composer>`: they're composed and already cross the shadow boundary.) */
688
807
  onFocus?: (event: CustomEvent<{
689
808
  originalEvent: FocusEvent;
690
809
  }>) => void;
@@ -752,12 +871,24 @@ export interface ComposerProps extends WebComponentProps {
752
871
  export declare const Composer: import('react').ForwardRefExoticComponent<ComposerProps & import('react').RefAttributes<HTMLElement>>;
753
872
  export interface ConfirmProps extends WebComponentProps {
754
873
  /** The confirm definition (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { body, tone, actions:[…] }`. Import `ConfirmCardData` from `@kitn.ai/ui` for the full shape. */
755
- data?: Record<string, unknown>;
874
+ data?: {
875
+ heading?: string;
876
+ body?: string;
877
+ tone?: "default" | "warning" | "danger";
878
+ actions: {
879
+ id: string;
880
+ label: string;
881
+ style?: "primary" | "default" | "destructive";
882
+ payload?: unknown;
883
+ default?: boolean;
884
+ }[];
885
+ dismissible?: boolean;
886
+ };
756
887
  /** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
757
888
  cardId?: string;
758
889
  /** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
759
890
  heading?: string;
760
- /** Focus the default action on mount (off by default no focus-stealing). Attribute: `autofocus`. */
891
+ /** Focus the default action on mount (off by default, so nothing steals focus). Attribute: `autofocus`. */
761
892
  autofocus?: boolean;
762
893
  /** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'action', action:'…' }`. */
763
894
  resolution?: Record<string, unknown>;
@@ -785,28 +916,28 @@ export interface ContextProps extends WebComponentProps {
785
916
  }
786
917
  export declare const Context: import('react').ForwardRefExoticComponent<ContextProps & import('react').RefAttributes<HTMLElement>>;
787
918
  export interface ConversationsProps extends WebComponentProps {
788
- /** Pre-bucketed conversation groups (e.g. "Today", "Yesterday"), each with its own conversations. Use this when you want to control the grouping/headers yourself; otherwise pass a flat `conversations` array. Set as a JS property. */
789
- groups: {
919
+ /** The list's section headers (`{ id, name, sortOrder, createdAt }`), rendered in array order. A group carries no conversations of its own; it is matched against `conversations` by id, so the two props are complementary rather than alternatives. Omit for an ungrouped list. Set as a JS property. */
920
+ groups?: {
790
921
  id: string;
791
- userId?: undefined | string;
792
- teamId?: undefined | string;
922
+ userId?: string;
923
+ teamId?: string;
793
924
  name: string;
794
925
  sortOrder: number;
795
926
  createdAt: string;
796
927
  }[];
797
- /** A flat list of conversation summaries; the component buckets them by recency for you. Ignored when `groups` is provided. Set as a JS property. */
798
- conversations: {
928
+ /** Every conversation the list renders, flat. Each one is filed under the group whose `id` equals its `groupId`; one with no `groupId`, or with a `groupId` matching no entry in `groups`, falls into a trailing "Ungrouped" section, so nothing you pass in is ever dropped. There is no recency bucketing. Set as a JS property. Omit to supply them as `<kai-conversation>` light-DOM children instead, or for the empty state. */
929
+ conversations?: {
799
930
  id: string;
800
931
  title: string;
801
- groupId?: undefined | string;
932
+ groupId?: string;
802
933
  scope: {
803
934
  type: "document" | "collection";
804
- documentId?: undefined | string;
805
- filters?: undefined | {
806
- tags?: undefined | string[];
807
- authors?: undefined | string[];
808
- contentType?: undefined | "transcript" | "markdown";
809
- dateRange?: undefined | {
935
+ documentId?: string;
936
+ filters?: {
937
+ tags?: string[];
938
+ authors?: string[];
939
+ contentType?: "transcript" | "markdown";
940
+ dateRange?: {
810
941
  from: string;
811
942
  to: string;
812
943
  };
@@ -815,7 +946,7 @@ export interface ConversationsProps extends WebComponentProps {
815
946
  messageCount: number;
816
947
  lastMessageAt: string;
817
948
  updatedAt: string;
818
- trailing?: undefined | string;
949
+ trailing?: string;
819
950
  }[];
820
951
  /** The id of the currently-open conversation, highlighted in the list. */
821
952
  activeId?: string;
@@ -853,7 +984,7 @@ export interface DialogProps extends WebComponentProps {
853
984
  }
854
985
  export declare const Dialog: import('react').ForwardRefExoticComponent<DialogProps & import('react').RefAttributes<HTMLElement>>;
855
986
  export interface EditableLabelProps extends WebComponentProps {
856
- /** The label text settable and reflected to the `value` attribute. Read `el.value` for live state. */
987
+ /** The label text. Settable and reflected to the `value` attribute. Read `el.value` for live state. */
857
988
  value?: string;
858
989
  /** Controlled edit state. `el.editing = true` opens the field; reflected to the `editing` attribute. */
859
990
  editing?: boolean;
@@ -892,7 +1023,7 @@ export interface EmptyProps extends WebComponentProps {
892
1023
  }
893
1024
  export declare const Empty: import('react').ForwardRefExoticComponent<EmptyProps & import('react').RefAttributes<HTMLElement>>;
894
1025
  export interface FeedbackBarProps extends WebComponentProps {
895
- /** The banner label (e.g. "Was this helpful?"). Attribute: `bar-title` (`title` is avoided it's a global HTML attribute). */
1026
+ /** The banner label (e.g. "Was this helpful?"). Attribute: `bar-title` (`title` is avoided because it is a global HTML attribute). */
896
1027
  barTitle?: string;
897
1028
  /** When set, a not-helpful vote opens an optional detail form before the thank-you confirmation. Attribute: `collect-detail`. */
898
1029
  collectDetail?: boolean;
@@ -932,7 +1063,7 @@ export interface FileTreeProps extends WebComponentProps {
932
1063
  deletions?: undefined | number;
933
1064
  status?: undefined | "added" | "modified" | "deleted" | "renamed" | "untracked";
934
1065
  }[];
935
- /** Selected file path highlighted in the tree. */
1066
+ /** Selected file path, highlighted in the tree. */
936
1067
  activeFile?: string;
937
1068
  /** Folder paths expanded initially. Omit to start with all folders open. */
938
1069
  defaultExpanded?: string[];
@@ -949,7 +1080,7 @@ export interface FileUploadProps extends WebComponentProps {
949
1080
  multiple?: boolean;
950
1081
  /** `accept` attribute for the file picker (e.g. `image/*`). */
951
1082
  accept?: string;
952
- /** Disable the dropzone no clicking, no drag-and-drop. */
1083
+ /** Disable the dropzone: no clicking, no drag-and-drop. */
953
1084
  disabled?: boolean;
954
1085
  /** Default dropzone label (overridable via the default slot). */
955
1086
  label?: string;
@@ -960,8 +1091,46 @@ export interface FileUploadProps extends WebComponentProps {
960
1091
  }
961
1092
  export declare const FileUpload: import('react').ForwardRefExoticComponent<FileUploadProps & import('react').RefAttributes<HTMLElement>>;
962
1093
  export interface FormProps extends WebComponentProps {
963
- /** The form definition a JSON Schema (`type:'object'`) + `x-kai-*` UI hints (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { type:'object', properties:{…} }`. Import the `FormDefinition` type from `@kitn.ai/ui` for the full shape (it is self-referential, so the element types it loosely). */
964
- data?: Record<string, unknown>;
1094
+ /** The form definition: a JSON Schema (`type:'object'`) + `x-kai-*` UI hints (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { type:'object', properties:{…} }`. Import the `FormDefinition` type from `@kitn.ai/ui` for the full shape. It IS self-referential (`FormField.properties` is another `FormField` map), and the generated `element-types.d.ts` inlines every named type, so the shipped declaration bottoms out in a `Record<string, unknown>` placeholder one level down rather than carrying the recursion. That is why `FormDefinition` is a `type` alias: an interface gets no implicit index signature, so it would not be assignable to that placeholder. */
1095
+ data?: {
1096
+ type: "object";
1097
+ title?: string;
1098
+ description?: string;
1099
+ required?: string[];
1100
+ properties: Record<string, {
1101
+ type: "string" | "number" | "integer" | "boolean" | "array" | "object";
1102
+ title?: string;
1103
+ description?: string;
1104
+ default?: unknown;
1105
+ enum?: unknown[];
1106
+ format?: "email" | "uri" | "url" | "date" | "date-time" | "time";
1107
+ minimum?: number;
1108
+ maximum?: number;
1109
+ minLength?: number;
1110
+ maxLength?: number;
1111
+ pattern?: string;
1112
+ minItems?: number;
1113
+ maxItems?: number;
1114
+ items?: Record<string, unknown> | {
1115
+ enum: unknown[];
1116
+ };
1117
+ properties?: Record<string, Record<string, unknown>>;
1118
+ required?: string[];
1119
+ readOnly?: boolean;
1120
+ "x-kai-widget"?: "textarea" | "slider" | "rating" | "radio" | "select" | "checkbox" | "password" | "switch";
1121
+ "x-kai-placeholder"?: string;
1122
+ "x-kai-step"?: number;
1123
+ }>;
1124
+ "x-kai-order"?: string[];
1125
+ "x-kai-inlineMax"?: number;
1126
+ "x-kai-submitLabel"?: string;
1127
+ "x-kai-dismissible"?: boolean;
1128
+ "x-kai-actions"?: {
1129
+ id: string;
1130
+ label: string;
1131
+ variant?: "default" | "ghost" | "outline";
1132
+ }[];
1133
+ };
965
1134
  /** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
966
1135
  cardId?: string;
967
1136
  /** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
@@ -974,7 +1143,7 @@ export interface FormProps extends WebComponentProps {
974
1143
  defaultValues?: Record<string, unknown>;
975
1144
  /** Disable all fields + submit. Attribute: `disabled`. */
976
1145
  disabled?: boolean;
977
- /** The form's values changed on input current coerced values + validity. */
1146
+ /** The form's values changed on input. Carries the current coerced values + validity. */
978
1147
  onValuesChange?: (event: CustomEvent<{
979
1148
  values: Record<string, unknown>;
980
1149
  valid: boolean;
@@ -1021,7 +1190,7 @@ export declare const Image: import('react').ForwardRefExoticComponent<ImageProps
1021
1190
  export interface InputProps extends WebComponentProps {
1022
1191
  /** Native input type: `text` (default) · `email` · `url` · `search` · `tel` · `password` · `number`. Single-line only. */
1023
1192
  type?: string;
1024
- /** Controlled value settable and reflected to the `value` attribute. `el.value = 'hi'` drives it (no event); typing updates it and fires `kai-input`. Read `el.value` for live state. */
1193
+ /** Controlled value. Settable and reflected to the `value` attribute. `el.value = 'hi'` drives it (no event); typing updates it and fires `kai-input`. Read `el.value` for live state. */
1025
1194
  value?: string;
1026
1195
  /** Placeholder shown when empty. */
1027
1196
  placeholder?: string;
@@ -1058,10 +1227,10 @@ export interface InputProps extends WebComponentProps {
1058
1227
  }
1059
1228
  export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLElement>>;
1060
1229
  export interface KbdProps extends WebComponentProps {
1061
- /** Shortcut spec tokens joined by `+` (e.g. `Mod+Shift+K`). Omit it to show default-slot content instead. Display only; the element does not bind keys. */
1230
+ /** Shortcut spec: tokens joined by `+` (e.g. `Mod+Shift+K`). Omit it to show default-slot content instead. Display only; the element does not bind keys. */
1062
1231
  keys?: string;
1063
1232
  /** `mac` uses ⌘/⌥, `other` uses Ctrl. `auto` (default) sniffs the OS. */
1064
- platform?: "other" | "auto" | "mac";
1233
+ platform?: "auto" | "mac" | "other";
1065
1234
  /** Cap size: `sm` or `md`. Defaults to `md`. */
1066
1235
  size?: "sm" | "md";
1067
1236
  }
@@ -1095,7 +1264,7 @@ export interface MarkdownProps extends WebComponentProps {
1095
1264
  /** The markdown source to render. */
1096
1265
  content: string;
1097
1266
  /** Text/markdown sizing. */
1098
- proseSize?: "sm" | "lg" | "xs" | "base";
1267
+ proseSize?: "xs" | "sm" | "base" | "lg";
1099
1268
  /** Shiki theme for fenced code blocks. */
1100
1269
  codeTheme?: string;
1101
1270
  /** Disable syntax highlighting (no Shiki loads). */
@@ -1103,7 +1272,7 @@ export interface MarkdownProps extends WebComponentProps {
1103
1272
  }
1104
1273
  export declare const Markdown: import('react').ForwardRefExoticComponent<MarkdownProps & import('react').RefAttributes<HTMLElement>>;
1105
1274
  export interface MenuProps extends WebComponentProps {
1106
- /** Tree of menu items. Set as a JS property not an HTML attribute. */
1275
+ /** Tree of menu items. Set as a JS property, not an HTML attribute. */
1107
1276
  items?: {
1108
1277
  id?: string;
1109
1278
  label?: string;
@@ -1118,25 +1287,25 @@ export interface MenuProps extends WebComponentProps {
1118
1287
  }[];
1119
1288
  /** Optional placement hint (unused by the underlying Dropdown which always positions bottom-start, kept for future extension). */
1120
1289
  placement?: string;
1121
- /** Built-in trigger: leading icon (a named icon like `"plus"`, an image URL/data-URI, or text). Use this instead of slotting `slot="trigger"` for the common case a slotted trigger overrides it. */
1290
+ /** Built-in trigger: leading icon (a named icon like `"plus"`, an image URL/data-URI, or text). Use this instead of slotting `slot="trigger"` for the common case; a slotted trigger overrides it. */
1122
1291
  triggerIcon?: string;
1123
- /** Built-in trigger: a text label (e.g. `"High"`). */
1292
+ /** Built-in trigger: a text label (e.g. `"High"`). This is the trigger's VISIBLE text, so it is also its accessible name, and `label` does not override it: an accessible name that does not contain the visible text is unreachable by speech input, which is what WCAG 2.5.3 (Label in Name) exists for. A slotted `slot="trigger"` replaces this built-in trigger entirely and is named differently; see `label`. */
1124
1293
  triggerLabel?: string;
1125
1294
  /** Built-in trigger: a trailing icon (e.g. `"chevron-down"` for a select look). */
1126
1295
  triggerIconTrailing?: string;
1127
- /** Accessible name for an icon-only trigger (no visible label). */
1296
+ /** Accessible name for a trigger with no visible label. Ignored when `triggerLabel` is set, which is already the visible name. It DOES name a slotted `slot="trigger"`, and that is a difference in what the two slots MEAN, not a limitation. `<kai-button>`'s slot IS the button's label, so text slotted there is the name and `label` steps aside. This slot is VISUAL content, a `+` or an `<svg>`, with the name supplied separately: decoration beside a name, never a second name competing with one. So `label` names the trigger here by design. Slotting a real WORD rather than a glyph makes that word a visible label, and an accessible name has to contain the visible text. Then either drop `label` or make it contain the word you slotted. */
1128
1297
  label?: string;
1129
1298
  /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute, the menu still self-manages on click/keyboard). Set `el.open = true`, or `<kai-menu open>`; listen for `kai-open-change`. */
1130
1299
  open?: boolean;
1131
1300
  /** Initial open state on mount (uncontrolled seed). */
1132
1301
  defaultOpen?: boolean;
1133
- /** Disable the trigger click/keyboard and `show()` no longer open the menu. */
1302
+ /** Disable the trigger: click/keyboard and `show()` no longer open the menu. */
1134
1303
  disabled?: boolean;
1135
1304
  /** The menu opened or closed (by click, keyboard, Escape, outside-click, or a method). */
1136
1305
  onOpenChange?: (event: CustomEvent<{
1137
1306
  open: boolean;
1138
1307
  }>) => void;
1139
- /** Fired when the user selects a leaf item. - Plain items: `{ id }`. - Checkbox items: `{ id, checked }` where `checked` is the NEW state. - Radio items: `{ id, radioGroup }` the consumer marks `id` as the selected one in `radioGroup` and clears the others. */
1308
+ /** Fired when the user selects a leaf item. - Plain items: `{ id }`. - Checkbox items: `{ id, checked }` where `checked` is the NEW state. - Radio items: `{ id, radioGroup }`, where the consumer marks `id` as the selected one in `radioGroup` and clears the others. */
1140
1309
  onSelect?: (event: CustomEvent<{
1141
1310
  id: string;
1142
1311
  checked?: undefined | boolean;
@@ -1149,27 +1318,101 @@ export interface MessageProps extends WebComponentProps {
1149
1318
  message?: {
1150
1319
  id: string;
1151
1320
  role: "user" | "assistant";
1152
- content: string;
1153
- reasoning?: {
1321
+ parts: ({
1322
+ type: "text";
1323
+ text: string;
1324
+ raw?: {
1325
+ source: string;
1326
+ payload: unknown;
1327
+ };
1328
+ } | {
1329
+ type: "reasoning";
1154
1330
  text: string;
1155
1331
  label?: string;
1156
- };
1157
- tools?: {
1158
- type: string;
1159
- state: "input-streaming" | "input-available" | "output-available" | "output-error";
1160
- input?: Record<string, unknown>;
1161
- output?: Record<string, unknown>;
1162
- toolCallId?: string;
1163
- errorText?: string;
1164
- }[];
1165
- attachments?: {
1166
- id: string;
1167
- type: "file" | "source-document";
1168
- filename?: string;
1169
- mediaType?: string;
1170
- url?: string;
1171
- title?: string;
1172
- }[];
1332
+ index?: number;
1333
+ streamId?: string;
1334
+ signature?: string;
1335
+ raw?: {
1336
+ source: string;
1337
+ payload: unknown;
1338
+ };
1339
+ } | {
1340
+ type: "tool";
1341
+ tool: {
1342
+ type: string;
1343
+ kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
1344
+ state: "input-streaming" | "input-available" | "output-available" | "output-error";
1345
+ input?: Record<string, unknown>;
1346
+ rawInput?: string;
1347
+ output?: Record<string, unknown>;
1348
+ toolCallId?: string;
1349
+ errorText?: string;
1350
+ raw?: {
1351
+ source: string;
1352
+ payload: unknown;
1353
+ };
1354
+ };
1355
+ raw?: {
1356
+ source: string;
1357
+ payload: unknown;
1358
+ };
1359
+ } | {
1360
+ type: "card";
1361
+ envelope: {
1362
+ type: string;
1363
+ id: string;
1364
+ data: unknown;
1365
+ title?: string;
1366
+ resolution?: {
1367
+ kind: "action";
1368
+ action: string;
1369
+ payload?: unknown;
1370
+ at?: string;
1371
+ } | {
1372
+ kind: "submit";
1373
+ data: unknown;
1374
+ at?: string;
1375
+ } | {
1376
+ kind: "dismissed";
1377
+ at?: string;
1378
+ } | {
1379
+ kind: "expired";
1380
+ reason?: string;
1381
+ at?: string;
1382
+ };
1383
+ };
1384
+ raw?: {
1385
+ source: string;
1386
+ payload: unknown;
1387
+ };
1388
+ } | {
1389
+ type: "source";
1390
+ source: {
1391
+ id?: string;
1392
+ url?: string;
1393
+ title?: string;
1394
+ snippet?: string;
1395
+ index?: number;
1396
+ };
1397
+ raw?: {
1398
+ source: string;
1399
+ payload: unknown;
1400
+ };
1401
+ } | {
1402
+ type: "file";
1403
+ attachment: {
1404
+ id: string;
1405
+ type: "file" | "source-document";
1406
+ filename?: string;
1407
+ mediaType?: string;
1408
+ url?: string;
1409
+ title?: string;
1410
+ };
1411
+ raw?: {
1412
+ source: string;
1413
+ payload: unknown;
1414
+ };
1415
+ })[];
1173
1416
  actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
1174
1417
  id: string;
1175
1418
  label: string;
@@ -1183,14 +1426,12 @@ export interface MessageProps extends WebComponentProps {
1183
1426
  };
1184
1427
  feedback?: "like" | "dislike";
1185
1428
  };
1186
- /** Convenience for simple cases when not passing a `message` object. */
1429
+ /** Who is speaking: `'user'` or `'assistant'`. Convenience for simple cases when not passing a `message` object. This is the SEMANTIC role of the message, not an ARIA role. The name collides with the global ARIA `role` attribute, which is why the facade lifts it off the host (see `liftRoleOffHost`). Neither speaker is a valid ARIA role, so a `role="user"` left on `<kai-message>` is a CRITICAL axe `aria-roles` violation. The accessible role lives on the row inside the shadow root instead: `role="article"` plus an `aria-label` naming the speaker, matching the SolidJS `<Message>` component. */
1187
1430
  role?: "user" | "assistant";
1188
- /** Convenience content (used when `message` is not set). */
1189
- content?: string;
1190
1431
  /** Force markdown on/off. Defaults to on for assistant, off for user. */
1191
1432
  markdown?: boolean;
1192
1433
  /** Text/markdown sizing for the message body. */
1193
- proseSize?: "sm" | "lg" | "xs" | "base";
1434
+ proseSize?: "xs" | "sm" | "base" | "lg";
1194
1435
  /** Shiki theme name used for fenced code blocks in the content. */
1195
1436
  codeTheme?: string;
1196
1437
  /** Disable syntax highlighting for code blocks (no Shiki loads). */
@@ -1203,6 +1444,10 @@ export interface MessageProps extends WebComponentProps {
1203
1444
  avatarFallback?: string;
1204
1445
  /** Avatar rail mode. `'none'` omits the avatar rail entirely so the body spans the full row (predictable layout when you never show avatars). Any other value keeps the default behaviour: the built-in avatar when one resolves, or your `slot="avatar"` content when projected (which REPLACES the built-in). */
1205
1446
  avatar?: string;
1447
+ /** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
1448
+ cardTypes?: Record<string, string>;
1449
+ /** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `cardTypes`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.cardSchemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. */
1450
+ cardSchemas?: Record<string, object>;
1206
1451
  /** An action button was clicked. `action` is the built-in name or custom id. `state` is present only for the toggleable feedback votes: `'on'` when a like/dislike is set, `'off'` when re-tapped to clear. */
1207
1452
  onMessageAction?: (event: CustomEvent<{
1208
1453
  messageId: string;
@@ -1212,13 +1457,13 @@ export interface MessageProps extends WebComponentProps {
1212
1457
  }
1213
1458
  export declare const Message: import('react').ForwardRefExoticComponent<MessageProps & import('react').RefAttributes<HTMLElement>>;
1214
1459
  export interface ModelSwitcherProps extends WebComponentProps {
1215
- /** The selectable models. Set as a JS property (array). */
1216
- models: {
1460
+ /** The selectable models. Set as a JS property (array). Omit to supply them as `<kai-model>` light-DOM children instead; when both are present the property's models come first. */
1461
+ models?: {
1217
1462
  id: string;
1218
1463
  name: string;
1219
- provider?: undefined | string;
1220
- description?: undefined | string;
1221
- group?: undefined | string;
1464
+ provider?: string;
1465
+ description?: string;
1466
+ group?: string;
1222
1467
  }[];
1223
1468
  /** The currently-selected model id. Defaults to the first model. */
1224
1469
  currentModel?: string;
@@ -1226,7 +1471,7 @@ export interface ModelSwitcherProps extends WebComponentProps {
1226
1471
  open?: boolean;
1227
1472
  /** Initial open state on mount (uncontrolled seed). */
1228
1473
  defaultOpen?: boolean;
1229
- /** Disable the trigger click/keyboard and `show()` no longer open the dropdown. */
1474
+ /** Disable the trigger: click/keyboard and `show()` no longer open the dropdown. */
1230
1475
  disabled?: boolean;
1231
1476
  /** A model was selected. */
1232
1477
  onModelChange?: (event: CustomEvent<{
@@ -1249,7 +1494,7 @@ export interface NavProps extends WebComponentProps {
1249
1494
  disabled?: boolean;
1250
1495
  children?: Record<string, unknown>[];
1251
1496
  status?: {
1252
- tone: "error" | "primary" | "info" | "success" | "warning" | "neutral";
1497
+ tone: "primary" | "info" | "success" | "warning" | "error" | "neutral";
1253
1498
  label?: string;
1254
1499
  pulse?: boolean;
1255
1500
  };
@@ -1286,7 +1531,7 @@ export interface NavProps extends WebComponentProps {
1286
1531
  export declare const Nav: import('react').ForwardRefExoticComponent<NavProps & import('react').RefAttributes<HTMLElement>>;
1287
1532
  export interface NoticeProps extends WebComponentProps {
1288
1533
  /** `neutral` (default) · `info` · `warning` · `error` · `success`. Drives the leading icon's color and the a11y role (`alert` for errors, else `status`). */
1289
- severity?: "error" | "info" | "success" | "warning" | "neutral";
1534
+ severity?: "neutral" | "info" | "warning" | "error" | "success";
1290
1535
  /** Leading icon: omit for the severity default, `"none"` to hide it, or a named icon to override. */
1291
1536
  icon?: string;
1292
1537
  /** Show a dismiss (×) that hides the notice and emits `kai-dismiss`. */
@@ -1318,7 +1563,7 @@ export interface PaneProps extends WebComponentProps {
1318
1563
  onClose?: (event: CustomEvent) => void;
1319
1564
  /** The dock control was clicked (only present when `show-dock`). */
1320
1565
  onDock?: (event: CustomEvent) => void;
1321
- /** The maximize/restore control was clicked. `detail.maximized` is the intended NEXT state drive the `maximized` prop yourself from it. */
1566
+ /** The maximize/restore control was clicked. `detail.maximized` is the intended NEXT state. Drive the `maximized` prop yourself from it. */
1322
1567
  onMaximize?: (event: CustomEvent<{
1323
1568
  maximized: boolean;
1324
1569
  }>) => void;
@@ -1359,7 +1604,7 @@ export interface PaneGroupProps extends WebComponentProps {
1359
1604
  export declare const PaneGroup: import('react').ForwardRefExoticComponent<PaneGroupProps & import('react').RefAttributes<HTMLElement>>;
1360
1605
  export interface PopoverProps extends WebComponentProps {
1361
1606
  /** Floating placement relative to the trigger (floating-ui placement). */
1362
- placement?: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
1607
+ placement?: "top" | "right" | "bottom" | "left" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start";
1363
1608
  /** Gap in px between the trigger and the panel. */
1364
1609
  gutter?: number;
1365
1610
  /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute, the element still self-manages on click). Set `el.open = true`, or `<kai-popover open>`; listen for `kai-open-change`. */
@@ -1386,10 +1631,10 @@ export interface ProgressBarProps extends WebComponentProps {
1386
1631
  }
1387
1632
  export declare const ProgressBar: import('react').ForwardRefExoticComponent<ProgressBarProps & import('react').RefAttributes<HTMLElement>>;
1388
1633
  export interface PromptDockProps extends WebComponentProps {
1389
- /** How the tray frames the input the SPATIAL inset axis: `inset` (default, the classic recessed frame on every side) | `edge` (top/bottom inset only; the input sits flush left/right so the lips span the full width) | `none` (no inset; the lips attach directly as a plain stack). Attribute: `frame`. */
1390
- frame?: "none" | "inset" | "edge";
1391
- /** How the tray surface looks the VISUAL axis, orthogonal to `frame`: `soft` (default, sunken surface + border + radius) | `outlined` (transparent + border + radius) | `filled` (sunken, no border, + radius) | `plain` (bare). Attribute: `appearance`. */
1392
- appearance?: "outlined" | "filled" | "plain" | "soft";
1634
+ /** How the tray frames the input, the SPATIAL inset axis: `inset` (default, the classic recessed frame on every side) | `edge` (top/bottom inset only; the input sits flush left/right so the lips span the full width) | `none` (no inset; the lips attach directly as a plain stack). Attribute: `frame`. */
1635
+ frame?: "inset" | "edge" | "none";
1636
+ /** How the tray surface looks, the VISUAL axis orthogonal to `frame`: `soft` (default, sunken surface + border + radius) | `outlined` (transparent + border + radius) | `filled` (sunken, no border, + radius) | `plain` (bare). Attribute: `appearance`. */
1637
+ appearance?: "soft" | "outlined" | "filled" | "plain";
1393
1638
  }
1394
1639
  export declare const PromptDock: import('react').ForwardRefExoticComponent<PromptDockProps & import('react').RefAttributes<HTMLElement>>;
1395
1640
  export interface PromptInputProps extends WebComponentProps {
@@ -1424,7 +1669,7 @@ export interface PromptInputProps extends WebComponentProps {
1424
1669
  voice?: boolean;
1425
1670
  /** When set and `loading` is true, the send button is replaced by a Stop button (square icon, "Stop" aria-label). Clicking it fires `kai-stop`. */
1426
1671
  stoppable?: boolean;
1427
- /** Send-button visibility. `'always'` (default) always shows it; `'auto'` shows it only when there's text/attachments (an empty composer hides it Enter still submits). To hide it entirely (Enter-only), it's pure CSS: `::part(send){display:none}` no prop needed. Restyle via `::part(send)`. The Stop button (`stoppable` + `loading`) is unaffected. */
1672
+ /** Send-button visibility. `'always'` (default) always shows it; `'auto'` shows it only when there's text/attachments (an empty composer hides it, though Enter still submits). To hide it entirely (Enter-only), it's pure CSS: `::part(send){display:none}`, no prop needed. Restyle via `::part(send)`. The Stop button (`stoppable` + `loading`) is unaffected. */
1428
1673
  submit?: "always" | "auto";
1429
1674
  /** When `false`, hides the built-in paperclip attach button even though the element otherwise supports attachments. Use this when a `+` menu in `toolbar-start` already exposes "Add files", to avoid a duplicate control. Defaults to `true`. */
1430
1675
  attach?: boolean;
@@ -1437,7 +1682,7 @@ export interface PromptInputProps extends WebComponentProps {
1437
1682
  url?: string;
1438
1683
  title?: string;
1439
1684
  }[];
1440
- /** Rich entity triggers each `{ char, kind, items }` opens a caret-anchored menu that inserts an atomic pill. Convention: `/` → skills, `@` → agents (plugins are the grouping/provenance of those items). Set as a JS property. */
1685
+ /** Rich entity triggers. Each `{ char, kind, items }` opens a caret-anchored menu that inserts an atomic pill. Convention: `/` → skills, `@` → agents (plugins are the grouping/provenance of those items). Set as a JS property. */
1441
1686
  triggers?: {
1442
1687
  char: string;
1443
1688
  kind: string;
@@ -1454,7 +1699,7 @@ export interface PromptInputProps extends WebComponentProps {
1454
1699
  }[];
1455
1700
  /** Default icon per entity kind (kind → image URL/data-URI) for pills/menu items without their own `icon`. Overrides the built-in agent/plugin glyphs. JS property. */
1456
1701
  kindIcons?: Record<string, string>;
1457
- /** The staged attachments changed a file was added (via the paperclip) or removed (per-chip ×). Carries the full current list so a consumer can react in real time (validate, show upload progress, toggle the send button). */
1702
+ /** The staged attachments changed: a file was added (via the paperclip) or removed (per-chip ×). Carries the full current list so a consumer can react in real time (validate, show upload progress, toggle the send button). */
1458
1703
  onAttachmentsChange?: (event: CustomEvent<{
1459
1704
  attachments: {
1460
1705
  id: string;
@@ -1554,7 +1799,7 @@ export interface ReasoningProps extends WebComponentProps {
1554
1799
  streaming?: boolean;
1555
1800
  /** Render `text` as markdown. */
1556
1801
  markdown?: boolean;
1557
- /** Gate the disclosure trigger programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
1802
+ /** Gate the disclosure trigger: programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
1558
1803
  disabled?: boolean;
1559
1804
  /** The reasoning block expanded or collapsed (via the trigger, streaming auto-open, or a method). */
1560
1805
  onOpenChange?: (event: CustomEvent<{
@@ -1575,11 +1820,11 @@ export interface RemoteProps extends WebComponentProps {
1575
1820
  export declare const Remote: import('react').ForwardRefExoticComponent<RemoteProps & import('react').RefAttributes<HTMLElement>>;
1576
1821
  export interface ResizableProps extends WebComponentProps {
1577
1822
  /** Layout axis: `horizontal` (row, default) or `vertical` (column). */
1578
- orientation?: "vertical" | "horizontal";
1823
+ orientation?: "horizontal" | "vertical";
1579
1824
  /** Which item index is maximized (null = none). Declarative source of truth. */
1580
- maximizedIndex?: null | number;
1581
- /** Divider affordance drawn inside each draggable handle's 8px grab zone: - `line` (default) a 1px hairline, transparent at rest, tinting on hover/drag. - `grip` a dotted grip handle. - `none` no visible divider, just the invisible hit-area. The full grab zone and keyboard/ARIA behavior are identical for all three. */
1582
- handle?: "none" | "line" | "grip";
1825
+ maximizedIndex?: number | null;
1826
+ /** Divider affordance drawn inside each draggable handle's 8px grab zone: - `line` (default): a 1px hairline, transparent at rest, tinting on hover/drag. - `grip`: a dotted grip handle. - `none`: no visible divider, just the invisible hit-area. The full grab zone and keyboard/ARIA behavior are identical for all three. */
1827
+ handle?: "line" | "grip" | "none";
1583
1828
  /** Fired on drag-end / keyboard resize / visibility change. `detail.sizes` = panel sizes in percent. */
1584
1829
  onChange?: (event: CustomEvent<{
1585
1830
  sizes: number[];
@@ -1587,7 +1832,11 @@ export interface ResizableProps extends WebComponentProps {
1587
1832
  /** Observe layout maximize state. */
1588
1833
  onMaximizeChange?: (event: CustomEvent<{
1589
1834
  maximized: boolean;
1590
- index: null | number;
1835
+ index: number | null;
1836
+ }>) => void;
1837
+ /** Authoritative maximize state, dispatched as a raw composed CustomEvent (not through `dispatch`) onto the affected `<kai-resizable-item>` and, on restore, onto the group host. A nested element (e.g. `<kai-artifact>`) listens for it to reconcile its own toggle. */
1838
+ onMaximizeState?: (event: CustomEvent<{
1839
+ maximized: boolean;
1591
1840
  }>) => void;
1592
1841
  }
1593
1842
  export declare const Resizable: import('react').ForwardRefExoticComponent<ResizableProps & import('react').RefAttributes<HTMLElement>>;
@@ -1602,14 +1851,15 @@ export interface ResizableItemProps extends WebComponentProps {
1602
1851
  locked?: boolean;
1603
1852
  /** Hide this panel; its divider is dropped and the rest reflow. */
1604
1853
  hidden?: boolean;
1605
- /** Collapse this panel same layout effect as `hidden` (divider dropped, the rest reflow), but it WORKS as a bare boolean from framework JSX. A plain `<kai-resizable-item collapsed>` in React/Solid/Vue/Svelte collapses the panel at the first render; `hidden` does not, because a JSX boolean sets neither the `hidden` attribute nor the IDL property on a custom element, so the parent never sees it. The facade reflects `collapsed` to a `collapsed` attribute the parent reads. Prefer this over `hidden` for declarative collapse. */
1854
+ /** Collapse this panel. Same layout effect as `hidden` (divider dropped, the rest reflow), but it WORKS as a bare boolean from framework JSX. A plain `<kai-resizable-item collapsed>` in React/Solid/Vue/Svelte collapses the panel at the first render; `hidden` does not, because a JSX boolean sets neither the `hidden` attribute nor the IDL property on a custom element, so the parent never sees it. The facade reflects `collapsed` to a `collapsed` attribute the parent reads. Prefer this over `hidden` for declarative collapse. */
1606
1855
  collapsed?: boolean;
1607
1856
  onChange?: (event: CustomEvent<unknown>) => void;
1608
1857
  onMaximizeChange?: (event: CustomEvent<unknown>) => void;
1858
+ onMaximizeState?: (event: CustomEvent<unknown>) => void;
1609
1859
  }
1610
1860
  export declare const ResizableItem: import('react').ForwardRefExoticComponent<ResizableItemProps & import('react').RefAttributes<HTMLElement>>;
1611
1861
  export interface ResponseStreamProps extends WebComponentProps {
1612
- /** Text to stream. A string, or an `AsyncIterable<string>` (set as a JS property async iterables can't be HTML attributes). */
1862
+ /** Text to stream. A string, or an `AsyncIterable<string>` (set as a JS property, since async iterables can't be HTML attributes). */
1613
1863
  text?: string | AsyncIterable<string>;
1614
1864
  /** Reveal animation. */
1615
1865
  mode?: "typewriter" | "fade";
@@ -1622,17 +1872,17 @@ export interface ResponseStreamProps extends WebComponentProps {
1622
1872
  }
1623
1873
  export declare const ResponseStream: import('react').ForwardRefExoticComponent<ResponseStreamProps & import('react').RefAttributes<HTMLElement>>;
1624
1874
  export interface ScopePickerProps extends WebComponentProps {
1625
- /** Authors to offer as scope filters. Set as a JS property. */
1626
- availableAuthors: string[];
1627
- /** Tags to offer as scope filters. Set as a JS property. */
1628
- availableTags: string[];
1875
+ /** Authors to offer as scope filters. Omit to drop the Authors section (for a tag-only picker). Set as a JS property. */
1876
+ availableAuthors?: string[];
1877
+ /** Tags to offer as scope filters. Omit to drop the Tags section (for an author-only picker). Set as a JS property. */
1878
+ availableTags?: string[];
1629
1879
  /** The label shown on the trigger for the active scope. */
1630
1880
  currentLabel?: string;
1631
1881
  /** Drive/observe the dropdown's open state (Shoelace-style: settable + reflected to the `open` attribute, the dropdown still self-manages on click/keyboard). Set `el.open = true`, or `<kai-scope-picker open>`; listen for `kai-open-change`. */
1632
1882
  open?: boolean;
1633
1883
  /** Initial open state on mount (uncontrolled seed). */
1634
1884
  defaultOpen?: boolean;
1635
- /** Disable the trigger click/keyboard and `show()` no longer open the dropdown. */
1885
+ /** Disable the trigger: click/keyboard and `show()` no longer open the dropdown. */
1636
1886
  disabled?: boolean;
1637
1887
  /** The scope dropdown opened or closed (by click, keyboard, Escape, outside-click, or a method). */
1638
1888
  onOpenChange?: (event: CustomEvent<{
@@ -1640,7 +1890,7 @@ export interface ScopePickerProps extends WebComponentProps {
1640
1890
  }>) => void;
1641
1891
  /** A scope was chosen (`undefined` filters = "All Content"). */
1642
1892
  onScopeChange?: (event: CustomEvent<{
1643
- filters: undefined | {
1893
+ filters: {
1644
1894
  tags?: undefined | string[];
1645
1895
  authors?: undefined | string[];
1646
1896
  contentType?: undefined | "transcript" | "markdown";
@@ -1648,7 +1898,7 @@ export interface ScopePickerProps extends WebComponentProps {
1648
1898
  from: string;
1649
1899
  to: string;
1650
1900
  };
1651
- };
1901
+ } | undefined;
1652
1902
  }>) => void;
1653
1903
  }
1654
1904
  export declare const ScopePicker: import('react').ForwardRefExoticComponent<ScopePickerProps & import('react').RefAttributes<HTMLElement>>;
@@ -1680,15 +1930,15 @@ export interface ScrollButtonProps extends WebComponentProps {
1680
1930
  /** CSS id of the scroll container to control. When omitted the element walks up the DOM (outside its own shadow root) to find the nearest scrollable ancestor. Mirrors the `for` convention of `<label for="...">`. */
1681
1931
  for?: string;
1682
1932
  /** Button visual variant: `'outline' | 'ghost' | 'default'`. Defaults to `'outline'`. */
1683
- variant?: "default" | "ghost" | "outline";
1933
+ variant?: "outline" | "ghost" | "default";
1684
1934
  /** Button size token. Defaults to `'icon'` (square). */
1685
1935
  size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
1686
- /** Emitted when the user clicks the button and `scrollToBottom()` is called. Carries no detail consumers use it to know a manual scroll occurred. */
1936
+ /** Emitted when the user clicks the button and `scrollToBottom()` is called. Carries no detail; consumers use it to know a manual scroll occurred. */
1687
1937
  onScroll?: (event: CustomEvent) => void;
1688
1938
  }
1689
1939
  export declare const ScrollButton: import('react').ForwardRefExoticComponent<ScrollButtonProps & import('react').RefAttributes<HTMLElement>>;
1690
1940
  export interface SearchProps extends WebComponentProps {
1691
- /** Controlled query settable and reflected to the `value` attribute. Read `el.value` for live state. */
1941
+ /** Controlled query. Settable and reflected to the `value` attribute. Read `el.value` for live state. */
1692
1942
  value?: string;
1693
1943
  /** Placeholder. Defaults to `Search…`. */
1694
1944
  placeholder?: string;
@@ -1721,7 +1971,7 @@ export interface SegmentedProps extends WebComponentProps {
1721
1971
  label: string;
1722
1972
  icon?: undefined | string;
1723
1973
  }[];
1724
- /** Controlled selected `value` settable and reflected to the `value` attribute. `el.value = 'preview'` drives it; choosing a segment updates it and fires `kai-change`. Read `el.value` for live state. */
1974
+ /** Controlled selected `value`. Settable and reflected to the `value` attribute. `el.value = 'preview'` drives it; choosing a segment updates it and fires `kai-change`. Read `el.value` for live state. */
1725
1975
  value?: string;
1726
1976
  /** Control density: `sm` or `md`. Defaults to `md`. */
1727
1977
  size?: "sm" | "md";
@@ -1732,8 +1982,8 @@ export interface SegmentedProps extends WebComponentProps {
1732
1982
  }
1733
1983
  export declare const Segmented: import('react').ForwardRefExoticComponent<SegmentedProps & import('react').RefAttributes<HTMLElement>>;
1734
1984
  export interface SeparatorProps extends WebComponentProps {
1735
- /** `horizontal` (default, block + full-width) or `vertical` (a rule inside a flex/grid row it stretches to the row height). */
1736
- orientation?: "vertical" | "horizontal";
1985
+ /** `horizontal` (default, block + full-width) or `vertical` (a rule inside a flex/grid row, stretching to the row height). */
1986
+ orientation?: "horizontal" | "vertical";
1737
1987
  }
1738
1988
  export declare const Separator: import('react').ForwardRefExoticComponent<SeparatorProps & import('react').RefAttributes<HTMLElement>>;
1739
1989
  export interface SettingItemProps extends WebComponentProps {
@@ -1762,8 +2012,8 @@ export interface SkeletonProps extends WebComponentProps {
1762
2012
  }
1763
2013
  export declare const Skeleton: import('react').ForwardRefExoticComponent<SkeletonProps & import('react').RefAttributes<HTMLElement>>;
1764
2014
  export interface SkillsProps extends WebComponentProps {
1765
- /** The active skills to badge. Set as a JS property. */
1766
- skills: {
2015
+ /** The active skills to badge. Set as a JS property. Omit to supply them as `<kai-skill>` light-DOM children instead; when both are present the property's skills come first. Nothing renders when there are none. */
2016
+ skills?: {
1767
2017
  id: string;
1768
2018
  name: string;
1769
2019
  }[];
@@ -1774,7 +2024,7 @@ export interface SourceProps extends WebComponentProps {
1774
2024
  href?: string;
1775
2025
  /** Trigger label (defaults to the domain). */
1776
2026
  label?: string;
1777
- /** Hover-card headline. Attribute: `headline` (`title` is avoided it's a global HTML attribute that reflects in a CE constructor and breaks it). */
2027
+ /** Hover-card headline. Attribute: `headline` (`title` is avoided because it is a global HTML attribute that reflects in a CE constructor and breaks it). */
1778
2028
  headline?: string;
1779
2029
  /** Hover-card body text describing the source. */
1780
2030
  description?: string;
@@ -1783,17 +2033,17 @@ export interface SourceProps extends WebComponentProps {
1783
2033
  }
1784
2034
  export declare const Source: import('react').ForwardRefExoticComponent<SourceProps & import('react').RefAttributes<HTMLElement>>;
1785
2035
  export interface SourcesProps extends WebComponentProps {
1786
- /** The sources to render. Set as a JS property. */
1787
- sources: {
2036
+ /** The sources to render. Set as a JS property. Omit to supply them as `<kai-source>` light-DOM children instead; when both are present the property's sources come first. */
2037
+ sources?: {
1788
2038
  href: string;
1789
- title?: undefined | string;
1790
- description?: undefined | string;
1791
- label?: undefined | string;
1792
- showFavicon?: undefined | boolean;
2039
+ title?: string;
2040
+ description?: string;
2041
+ label?: string;
2042
+ showFavicon?: boolean;
1793
2043
  }[];
1794
2044
  /** Show favicons on all items (per-item `showFavicon` overrides). */
1795
2045
  showFavicon?: boolean;
1796
- /** When true, each citation chip is labelled with its 1-based index in the merged (prop + declarative-children) list (`[1]`, `[2]`, …) instead of the per-item `label` or domain fallback. HTML attribute: `numbered` (boolean bare attribute or `numbered="true"`). JS property: `el.numbered = true`. */
2046
+ /** When true, each citation chip is labelled with its 1-based index in the merged (prop + declarative-children) list (`[1]`, `[2]`, …) instead of the per-item `label` or domain fallback. HTML attribute: `numbered` (boolean: a bare attribute or `numbered="true"`). JS property: `el.numbered = true`. */
1797
2047
  numbered?: boolean;
1798
2048
  }
1799
2049
  export declare const Sources: import('react').ForwardRefExoticComponent<SourcesProps & import('react').RefAttributes<HTMLElement>>;
@@ -1809,18 +2059,18 @@ export interface StatusProps extends WebComponentProps {
1809
2059
  }
1810
2060
  export declare const Status: import('react').ForwardRefExoticComponent<StatusProps & import('react').RefAttributes<HTMLElement>>;
1811
2061
  export interface SuggestionsProps extends WebComponentProps {
1812
- /** The suggestions. Strings, or `{ label, value }` when the displayed text and the emitted value differ. Set as a JS property. */
1813
- suggestions: (string | {
2062
+ /** The suggestions. Strings, or `{ label, value }` when the displayed text and the emitted value differ. Set as a JS property. Omit to supply them as `<kai-suggestion>` light-DOM children instead; when both are present the property's suggestions come first. */
2063
+ suggestions?: (string | {
1814
2064
  label: string;
1815
- value?: undefined | string;
1816
- icon?: undefined | string;
2065
+ value?: string;
2066
+ icon?: string;
1817
2067
  })[];
1818
2068
  /** Chip style: `'outline'` (default), `'ghost'`, or `'default'` (filled). */
1819
- variant?: "default" | "ghost" | "outline";
2069
+ variant?: "outline" | "ghost" | "default";
1820
2070
  /** Row height for `layout="list"`: `'md'` (default) or `'lg'` for taller rows. Chips are unaffected. */
1821
2071
  size?: "md" | "lg";
1822
- /** Layout: `'chips'` (default) renders a wrapping row of rounded pills; `'list'` renders a vertical, full-width "Ideas for you" list each row is left-aligned with a leading `icon`, a label, and a hover background. */
1823
- layout?: "list" | "chips";
2072
+ /** Layout: `'chips'` (default) renders a wrapping row of rounded pills; `'list'` renders a vertical, full-width "Ideas for you" list where each row is left-aligned with a leading `icon`, a label, and a hover background. */
2073
+ layout?: "chips" | "list";
1824
2074
  /** Full-width left-aligned rows instead of pills. */
1825
2075
  block?: boolean;
1826
2076
  /** Substring to highlight within each suggestion. */
@@ -1832,7 +2082,7 @@ export interface SuggestionsProps extends WebComponentProps {
1832
2082
  }
1833
2083
  export declare const Suggestions: import('react').ForwardRefExoticComponent<SuggestionsProps & import('react').RefAttributes<HTMLElement>>;
1834
2084
  export interface SwitchProps extends WebComponentProps {
1835
- /** Controlled checked state settable and reflected to the `checked` attribute. `el.checked = true` (or `<kai-switch checked>`) drives it; the toggle UI updates it and fires `kai-change`. Read `el.checked` for live state. */
2085
+ /** Controlled checked state. Settable and reflected to the `checked` attribute. `el.checked = true` (or `<kai-switch checked>`) drives it; the toggle UI updates it and fires `kai-change`. Read `el.checked` for live state. */
1836
2086
  checked?: boolean;
1837
2087
  /** Initial checked state on mount (uncontrolled seed). Bare attribute (`<kai-switch default-checked>`) turns it on. */
1838
2088
  defaultChecked?: boolean;
@@ -1876,7 +2126,23 @@ export interface TabsProps extends WebComponentProps {
1876
2126
  export declare const Tabs: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLElement>>;
1877
2127
  export interface TasksProps extends WebComponentProps {
1878
2128
  /** The tasks definition (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { tasks:[…], selectAll, confirmLabel, … }`. Import `TasksCardData` from `@kitn.ai/ui` for the full shape. */
1879
- data?: Record<string, unknown>;
2129
+ data?: {
2130
+ mode?: "select" | "progress";
2131
+ heading?: string;
2132
+ tasks: {
2133
+ id: string;
2134
+ label: string;
2135
+ description?: string;
2136
+ checked?: boolean;
2137
+ disabled?: boolean;
2138
+ }[];
2139
+ selectAll?: boolean;
2140
+ confirmLabel?: string;
2141
+ allowEmpty?: boolean;
2142
+ min?: number;
2143
+ max?: number;
2144
+ dismissible?: boolean;
2145
+ };
1880
2146
  /** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
1881
2147
  cardId?: string;
1882
2148
  /** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
@@ -1891,7 +2157,7 @@ export interface TasksProps extends WebComponentProps {
1891
2157
  disabled?: boolean;
1892
2158
  /** Display-only: rows can't be toggled and show the default cursor (no pointer, hover, or focus affordances). Keeps the look as-is. Attribute: `readonly`. */
1893
2159
  readonly?: boolean;
1894
- /** The selection changed on a toggle the selected ids in input order. */
2160
+ /** The selection changed on a toggle. Carries the selected ids in input order. */
1895
2161
  onValueChange?: (event: CustomEvent<{
1896
2162
  value: string[];
1897
2163
  }>) => void;
@@ -1920,31 +2186,105 @@ export interface ThinkingBarProps extends WebComponentProps {
1920
2186
  }
1921
2187
  export declare const ThinkingBar: import('react').ForwardRefExoticComponent<ThinkingBarProps & import('react').RefAttributes<HTMLElement>>;
1922
2188
  export interface ThreadProps extends WebComponentProps {
1923
- /** The full message thread to render, newest last. Each entry carries its role, content, and optional reasoning/tools/attachments/actions/avatar. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). */
2189
+ /** The full message thread to render, newest last. Each entry carries its role, ordered `parts`, and optional actions/avatar/feedback. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). */
1924
2190
  messages?: {
1925
2191
  id: string;
1926
2192
  role: "user" | "assistant";
1927
- content: string;
1928
- reasoning?: {
2193
+ parts: ({
2194
+ type: "text";
2195
+ text: string;
2196
+ raw?: {
2197
+ source: string;
2198
+ payload: unknown;
2199
+ };
2200
+ } | {
2201
+ type: "reasoning";
1929
2202
  text: string;
1930
2203
  label?: string;
1931
- };
1932
- tools?: {
1933
- type: string;
1934
- state: "input-streaming" | "input-available" | "output-available" | "output-error";
1935
- input?: Record<string, unknown>;
1936
- output?: Record<string, unknown>;
1937
- toolCallId?: string;
1938
- errorText?: string;
1939
- }[];
1940
- attachments?: {
1941
- id: string;
1942
- type: "file" | "source-document";
1943
- filename?: string;
1944
- mediaType?: string;
1945
- url?: string;
1946
- title?: string;
1947
- }[];
2204
+ index?: number;
2205
+ streamId?: string;
2206
+ signature?: string;
2207
+ raw?: {
2208
+ source: string;
2209
+ payload: unknown;
2210
+ };
2211
+ } | {
2212
+ type: "tool";
2213
+ tool: {
2214
+ type: string;
2215
+ kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
2216
+ state: "input-streaming" | "input-available" | "output-available" | "output-error";
2217
+ input?: Record<string, unknown>;
2218
+ rawInput?: string;
2219
+ output?: Record<string, unknown>;
2220
+ toolCallId?: string;
2221
+ errorText?: string;
2222
+ raw?: {
2223
+ source: string;
2224
+ payload: unknown;
2225
+ };
2226
+ };
2227
+ raw?: {
2228
+ source: string;
2229
+ payload: unknown;
2230
+ };
2231
+ } | {
2232
+ type: "card";
2233
+ envelope: {
2234
+ type: string;
2235
+ id: string;
2236
+ data: unknown;
2237
+ title?: string;
2238
+ resolution?: {
2239
+ kind: "action";
2240
+ action: string;
2241
+ payload?: unknown;
2242
+ at?: string;
2243
+ } | {
2244
+ kind: "submit";
2245
+ data: unknown;
2246
+ at?: string;
2247
+ } | {
2248
+ kind: "dismissed";
2249
+ at?: string;
2250
+ } | {
2251
+ kind: "expired";
2252
+ reason?: string;
2253
+ at?: string;
2254
+ };
2255
+ };
2256
+ raw?: {
2257
+ source: string;
2258
+ payload: unknown;
2259
+ };
2260
+ } | {
2261
+ type: "source";
2262
+ source: {
2263
+ id?: string;
2264
+ url?: string;
2265
+ title?: string;
2266
+ snippet?: string;
2267
+ index?: number;
2268
+ };
2269
+ raw?: {
2270
+ source: string;
2271
+ payload: unknown;
2272
+ };
2273
+ } | {
2274
+ type: "file";
2275
+ attachment: {
2276
+ id: string;
2277
+ type: "file" | "source-document";
2278
+ filename?: string;
2279
+ mediaType?: string;
2280
+ url?: string;
2281
+ title?: string;
2282
+ };
2283
+ raw?: {
2284
+ source: string;
2285
+ payload: unknown;
2286
+ };
2287
+ })[];
1948
2288
  actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
1949
2289
  id: string;
1950
2290
  label: string;
@@ -1958,10 +2298,10 @@ export interface ThreadProps extends WebComponentProps {
1958
2298
  };
1959
2299
  feedback?: "like" | "dislike";
1960
2300
  }[];
1961
- /** Show a typing indicator on the pending assistant turn set while awaiting the assistant's reply. */
2301
+ /** Show a typing indicator on the pending assistant turn. Set it while awaiting the assistant's reply. */
1962
2302
  loading?: boolean;
1963
2303
  /** Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`. */
1964
- proseSize?: "sm" | "lg" | "xs" | "base";
2304
+ proseSize?: "xs" | "sm" | "base" | "lg";
1965
2305
  /** Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`). */
1966
2306
  codeTheme?: string;
1967
2307
  /** Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true. */
@@ -1972,6 +2312,10 @@ export interface ThreadProps extends WebComponentProps {
1972
2312
  scrollButton?: boolean;
1973
2313
  /** Extra classes applied to the thread's inner root. */
1974
2314
  class?: string;
2315
+ /** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
2316
+ cardTypes?: Record<string, string>;
2317
+ /** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `cardTypes`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.cardSchemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. */
2318
+ cardSchemas?: Record<string, object>;
1975
2319
  /** A message's action button was clicked. `action` is the built-in name (`copy` / `like` / `dislike` / `regenerate` / `edit`) or a custom id. `state` is present only for the toggleable feedback votes: `'on'` when a like/dislike is set, `'off'` when re-tapped to clear. */
1976
2320
  onMessageAction?: (event: CustomEvent<{
1977
2321
  messageId: string;
@@ -1981,21 +2325,21 @@ export interface ThreadProps extends WebComponentProps {
1981
2325
  }
1982
2326
  export declare const Thread: import('react').ForwardRefExoticComponent<ThreadProps & import('react').RefAttributes<HTMLElement>>;
1983
2327
  export interface ToastRegionProps extends WebComponentProps {
1984
- /** The toasts to render. Newest is shown on top. Set as a JS property (array); pass a new array reference to update. */
1985
- toasts: {
2328
+ /** The toasts to render. Newest is shown on top. Set as a JS property (array); pass a new array reference to update. Omit for an empty region, which is the normal resting state and how the imperative `toast()` API starts. */
2329
+ toasts?: {
1986
2330
  id: string;
1987
2331
  message: string;
1988
- variant?: undefined | "error" | "info" | "success" | "warning" | "neutral";
1989
- appearance?: undefined | "pill" | "card";
1990
- inverse?: undefined | boolean;
1991
- description?: undefined | string;
1992
- action?: undefined | {
2332
+ variant?: "neutral" | "success" | "warning" | "error" | "info";
2333
+ appearance?: "pill" | "card";
2334
+ inverse?: boolean;
2335
+ description?: string;
2336
+ action?: {
1993
2337
  label: string;
1994
2338
  onAction: () => void | false;
1995
2339
  };
1996
- duration?: undefined | number;
1997
- dismissible?: undefined | boolean;
1998
- target?: undefined | HTMLElement;
2340
+ duration?: number;
2341
+ dismissible?: boolean;
2342
+ target?: HTMLElement;
1999
2343
  }[];
2000
2344
  /** Stack anchor: `'top-center'` (default), `'top-right'`, `'bottom-center'`, … */
2001
2345
  position?: "top-center" | "top-right" | "top-left" | "bottom-center" | "bottom-right" | "bottom-left";
@@ -2017,7 +2361,7 @@ export interface ToastRegionProps extends WebComponentProps {
2017
2361
  /** A toast left the stack. `reason` is `'timeout' | 'close' | 'action'`. */
2018
2362
  onDismiss?: (event: CustomEvent<{
2019
2363
  id: string;
2020
- reason: "action" | "timeout" | "close";
2364
+ reason: "timeout" | "close" | "action";
2021
2365
  }>) => void;
2022
2366
  }
2023
2367
  export declare const ToastRegion: import('react').ForwardRefExoticComponent<ToastRegionProps & import('react').RefAttributes<HTMLElement>>;
@@ -2025,17 +2369,23 @@ export interface ToolProps extends WebComponentProps {
2025
2369
  /** The tool-call to display. Set as a JS property. */
2026
2370
  tool?: {
2027
2371
  type: string;
2372
+ kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
2028
2373
  state: "input-streaming" | "input-available" | "output-available" | "output-error";
2029
2374
  input?: Record<string, unknown>;
2375
+ rawInput?: string;
2030
2376
  output?: Record<string, unknown>;
2031
2377
  toolCallId?: string;
2032
2378
  errorText?: string;
2379
+ raw?: {
2380
+ source: string;
2381
+ payload: unknown;
2382
+ };
2033
2383
  };
2034
2384
  /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute; the element still self-manages on trigger click). Set `el.open = true`, or `<kai-tool open>`; listen for `kai-open-change`. */
2035
2385
  open?: boolean;
2036
2386
  /** Initial open state on mount (uncontrolled seed). */
2037
2387
  defaultOpen?: boolean;
2038
- /** Gate the disclosure trigger programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
2388
+ /** Gate the disclosure trigger: programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
2039
2389
  disabled?: boolean;
2040
2390
  /** The panel expanded or collapsed (by trigger click or a method). */
2041
2391
  onOpenChange?: (event: CustomEvent<{
@@ -2065,7 +2415,7 @@ export interface TooltipProps extends WebComponentProps {
2065
2415
  }
2066
2416
  export declare const Tooltip: import('react').ForwardRefExoticComponent<TooltipProps & import('react').RefAttributes<HTMLElement>>;
2067
2417
  export interface VoiceInputProps extends WebComponentProps {
2068
- /** Transcriber the host supplies records audio, returns the text. This is a **function-valued property** (`el.transcribe = async blob => '...'`) because a value-returning callback can't be modelled as a fire-and-forget event. */
2418
+ /** Transcriber the host supplies: records audio, returns the text. This is a **function-valued property** (`el.transcribe = async blob => '...'`) because a value-returning callback can't be modelled as a fire-and-forget event. */
2069
2419
  transcribe?: (audio: Blob) => Promise<string>;
2070
2420
  /** Disable the mic button (non-interactive). */
2071
2421
  disabled?: boolean;
@@ -2073,11 +2423,11 @@ export interface VoiceInputProps extends WebComponentProps {
2073
2423
  recognitionLang?: string;
2074
2424
  /** Emit live partial transcripts (`kai-transcript-interim`) during native recognition. Attribute: `interim`. No-op on the transcribe/fallback paths. */
2075
2425
  interim?: boolean;
2076
- /** Raw audio captured (before transcription) for hosts that prefer to handle transcription themselves instead of via the `transcribe` property. Also the unsupported-fallback signal: no `transcribe`, no SpeechRecognition, so only the blob is produced (no text). */
2426
+ /** Raw audio captured (before transcription), for hosts that prefer to handle transcription themselves instead of via the `transcribe` property. Also the unsupported-fallback signal: no `transcribe`, no SpeechRecognition, so only the blob is produced (no text). */
2077
2427
  onAudioCaptured?: (event: CustomEvent<{
2078
2428
  blob: Blob;
2079
2429
  }>) => void;
2080
- /** Recording started or stopped lets the host drive its own UI (waveform, push-to-talk indicator) in sync with the mic. Fires on real transitions only (manual click and programmatic start()/stop()), never on mount. */
2430
+ /** Recording started or stopped. Lets the host drive its own UI (waveform, push-to-talk indicator) in sync with the mic. Fires on real transitions only (manual click and programmatic start()/stop()), never on mount. */
2081
2431
  onRecordingChange?: (event: CustomEvent<{
2082
2432
  recording: boolean;
2083
2433
  }>) => void;
@@ -2085,7 +2435,7 @@ export interface VoiceInputProps extends WebComponentProps {
2085
2435
  onTranscriptInterim?: (event: CustomEvent<{
2086
2436
  text: string;
2087
2437
  }>) => void;
2088
- /** Final transcript the `transcribe` property resolved, OR native `SpeechRecognition` produced final text (no `transcribe` set). */
2438
+ /** Final transcript: the `transcribe` property resolved, OR native `SpeechRecognition` produced final text (no `transcribe` set). */
2089
2439
  onTranscription?: (event: CustomEvent<{
2090
2440
  text: string;
2091
2441
  }>) => void;
@@ -2096,43 +2446,43 @@ export interface VoiceOutputProps extends WebComponentProps {
2096
2446
  text?: string;
2097
2447
  /** Speak automatically when `text` is set/changed. */
2098
2448
  autoplay?: boolean;
2099
- /** TTS model seam the host supplies given text, returns an audio `Blob` to play. This is a **function-valued property** (`el.synthesize = async text => blob`); when set, the native `speechSynthesis` path is bypassed. Mirrors `<kai-voice-input>`'s `transcribe`. A value-returning callback can't be modelled as a fire-and-forget event, hence a property. */
2449
+ /** TTS model seam the host supplies: given text, returns an audio `Blob` to play. This is a **function-valued property** (`el.synthesize = async text => blob`); when set, the native `speechSynthesis` path is bypassed. Mirrors `<kai-voice-input>`'s `transcribe`. A value-returning callback can't be modelled as a fire-and-forget event, hence a property. */
2100
2450
  synthesize?: (text: string) => Promise<Blob>;
2101
2451
  /** Disable the button (non-interactive). */
2102
2452
  disabled?: boolean;
2103
- /** Playback started or stopped drive your own UI in sync. Fires on real transitions only (manual click and programmatic speak()/stop()), never on mount. */
2453
+ /** Playback started or stopped. Drive your own UI in sync. Fires on real transitions only (manual click and programmatic speak()/stop()), never on mount. */
2104
2454
  onSpeakingChange?: (event: CustomEvent<{
2105
2455
  speaking: boolean;
2106
2456
  }>) => void;
2107
- /** The model path (`synthesize`) resolved audio the raw `Blob` before playback. */
2457
+ /** The model path (`synthesize`) resolved audio: the raw `Blob` before playback. */
2108
2458
  onSynthesized?: (event: CustomEvent<{
2109
2459
  blob: Blob;
2110
2460
  }>) => void;
2111
2461
  }
2112
2462
  export declare const VoiceOutput: import('react').ForwardRefExoticComponent<VoiceOutputProps & import('react').RefAttributes<HTMLElement>>;
2113
2463
  export interface WorkspaceProps extends WebComponentProps {
2114
- /** Pre-bucketed conversation groups for the sidebar. Set as a JS property. */
2115
- groups: {
2464
+ /** The sidebar's section headers, rendered in array order. A group carries no conversations of its own; it is matched against `conversations` by id, so the two props are complementary rather than alternatives. Omit for an ungrouped sidebar. Set as a JS property. */
2465
+ groups?: {
2116
2466
  id: string;
2117
- userId?: undefined | string;
2118
- teamId?: undefined | string;
2467
+ userId?: string;
2468
+ teamId?: string;
2119
2469
  name: string;
2120
2470
  sortOrder: number;
2121
2471
  createdAt: string;
2122
2472
  }[];
2123
- /** Flat conversation list (auto-bucketed if `groups` is empty). Set as a JS property. */
2124
- conversations: {
2473
+ /** Every conversation in the sidebar, flat. Each one is filed under the group whose `id` equals its `groupId`; one with no `groupId`, or with a `groupId` matching no entry in `groups`, falls into a trailing ungrouped section (headerless when `compact`), so nothing you pass in is ever dropped. There is no recency bucketing. Set as a JS property. Omit for an empty sidebar, or when `no-conversations` replaces the built-in list with your own `sidebar-header` content. */
2474
+ conversations?: {
2125
2475
  id: string;
2126
2476
  title: string;
2127
- groupId?: undefined | string;
2477
+ groupId?: string;
2128
2478
  scope: {
2129
2479
  type: "document" | "collection";
2130
- documentId?: undefined | string;
2131
- filters?: undefined | {
2132
- tags?: undefined | string[];
2133
- authors?: undefined | string[];
2134
- contentType?: undefined | "transcript" | "markdown";
2135
- dateRange?: undefined | {
2480
+ documentId?: string;
2481
+ filters?: {
2482
+ tags?: string[];
2483
+ authors?: string[];
2484
+ contentType?: "transcript" | "markdown";
2485
+ dateRange?: {
2136
2486
  from: string;
2137
2487
  to: string;
2138
2488
  };
@@ -2141,54 +2491,128 @@ export interface WorkspaceProps extends WebComponentProps {
2141
2491
  messageCount: number;
2142
2492
  lastMessageAt: string;
2143
2493
  updatedAt: string;
2144
- trailing?: undefined | string;
2494
+ trailing?: string;
2145
2495
  }[];
2146
2496
  /** Id of the open conversation, highlighted in the sidebar. */
2147
2497
  activeId?: string;
2148
- /** The active conversation's message thread, newest last. Set as a JS property. */
2149
- messages: {
2498
+ /** The active conversation's message thread, newest last. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). Omit for an empty thread. */
2499
+ messages?: {
2150
2500
  id: string;
2151
2501
  role: "user" | "assistant";
2152
- content: string;
2153
- reasoning?: undefined | {
2502
+ parts: ({
2503
+ type: "text";
2154
2504
  text: string;
2155
- label?: undefined | string;
2156
- };
2157
- tools?: undefined | {
2158
- type: string;
2159
- state: "input-streaming" | "input-available" | "output-available" | "output-error";
2160
- input?: undefined | Record<string, unknown>;
2161
- output?: undefined | Record<string, unknown>;
2162
- toolCallId?: undefined | string;
2163
- errorText?: undefined | string;
2164
- }[];
2165
- attachments?: undefined | {
2166
- id: string;
2167
- type: "file" | "source-document";
2168
- filename?: undefined | string;
2169
- mediaType?: undefined | string;
2170
- url?: undefined | string;
2171
- title?: undefined | string;
2172
- }[];
2173
- actions?: undefined | ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
2505
+ raw?: {
2506
+ source: string;
2507
+ payload: unknown;
2508
+ };
2509
+ } | {
2510
+ type: "reasoning";
2511
+ text: string;
2512
+ label?: string;
2513
+ index?: number;
2514
+ streamId?: string;
2515
+ signature?: string;
2516
+ raw?: {
2517
+ source: string;
2518
+ payload: unknown;
2519
+ };
2520
+ } | {
2521
+ type: "tool";
2522
+ tool: {
2523
+ type: string;
2524
+ kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
2525
+ state: "input-streaming" | "input-available" | "output-available" | "output-error";
2526
+ input?: Record<string, unknown>;
2527
+ rawInput?: string;
2528
+ output?: Record<string, unknown>;
2529
+ toolCallId?: string;
2530
+ errorText?: string;
2531
+ raw?: {
2532
+ source: string;
2533
+ payload: unknown;
2534
+ };
2535
+ };
2536
+ raw?: {
2537
+ source: string;
2538
+ payload: unknown;
2539
+ };
2540
+ } | {
2541
+ type: "card";
2542
+ envelope: {
2543
+ type: string;
2544
+ id: string;
2545
+ data: unknown;
2546
+ title?: string;
2547
+ resolution?: {
2548
+ kind: "action";
2549
+ action: string;
2550
+ payload?: unknown;
2551
+ at?: string;
2552
+ } | {
2553
+ kind: "submit";
2554
+ data: unknown;
2555
+ at?: string;
2556
+ } | {
2557
+ kind: "dismissed";
2558
+ at?: string;
2559
+ } | {
2560
+ kind: "expired";
2561
+ reason?: string;
2562
+ at?: string;
2563
+ };
2564
+ };
2565
+ raw?: {
2566
+ source: string;
2567
+ payload: unknown;
2568
+ };
2569
+ } | {
2570
+ type: "source";
2571
+ source: {
2572
+ id?: string;
2573
+ url?: string;
2574
+ title?: string;
2575
+ snippet?: string;
2576
+ index?: number;
2577
+ };
2578
+ raw?: {
2579
+ source: string;
2580
+ payload: unknown;
2581
+ };
2582
+ } | {
2583
+ type: "file";
2584
+ attachment: {
2585
+ id: string;
2586
+ type: "file" | "source-document";
2587
+ filename?: string;
2588
+ mediaType?: string;
2589
+ url?: string;
2590
+ title?: string;
2591
+ };
2592
+ raw?: {
2593
+ source: string;
2594
+ payload: unknown;
2595
+ };
2596
+ })[];
2597
+ actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
2174
2598
  id: string;
2175
2599
  label: string;
2176
- icon?: undefined | string;
2177
- tooltip?: undefined | string;
2600
+ icon?: string;
2601
+ tooltip?: string;
2178
2602
  })[];
2179
- avatar?: undefined | {
2180
- src?: undefined | string;
2181
- fallback?: undefined | string;
2182
- alt?: undefined | string;
2603
+ avatar?: {
2604
+ src?: string;
2605
+ fallback?: string;
2606
+ alt?: string;
2183
2607
  };
2184
- feedback?: undefined | "like" | "dislike";
2608
+ feedback?: "like" | "dislike";
2185
2609
  }[];
2186
2610
  value?: string;
2187
2611
  placeholder?: string;
2188
2612
  loading?: boolean;
2189
2613
  suggestions?: string[];
2190
2614
  suggestionMode?: "submit" | "fill";
2191
- proseSize?: "sm" | "lg" | "xs" | "base";
2615
+ proseSize?: "xs" | "sm" | "base" | "lg";
2192
2616
  codeTheme?: string;
2193
2617
  codeHighlight?: boolean;
2194
2618
  chatTitle?: string;
@@ -2243,6 +2667,10 @@ export interface WorkspaceProps extends WebComponentProps {
2243
2667
  compact?: boolean;
2244
2668
  /** Suppress the built-in ConversationList so the `sidebar-header` slot owns the whole rail flex region (for apps that supply their own rail nav). Default false. Attribute: `no-conversations`. */
2245
2669
  noConversations?: boolean;
2670
+ /** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
2671
+ cardTypes?: Record<string, string>;
2672
+ /** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `cardTypes`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.cardSchemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. */
2673
+ cardSchemas?: Record<string, object>;
2246
2674
  /** A conversation was selected in the sidebar. */
2247
2675
  onConversationSelect?: (event: CustomEvent<{
2248
2676
  id: string;