@kitn.ai/ui 0.16.0 → 0.18.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 (493) hide show
  1. package/README.md +55 -17
  2. package/dist/components/artifact.d.ts +39 -1
  3. package/dist/components/attachment-types.d.ts +12 -0
  4. package/dist/components/attachments.d.ts +2 -10
  5. package/dist/components/card.d.ts +27 -0
  6. package/dist/components/chain-of-thought.d.ts +78 -2
  7. package/dist/components/chat-scope-picker.d.ts +7 -0
  8. package/dist/components/chat-thread.d.ts +39 -16
  9. package/dist/components/choice-card.d.ts +27 -0
  10. package/dist/components/coachmark.d.ts +49 -0
  11. package/dist/components/composer-dom.d.ts +35 -0
  12. package/dist/components/composer-highlight.d.ts +48 -0
  13. package/dist/components/composer-history.d.ts +34 -0
  14. package/dist/components/composer.d.ts +86 -0
  15. package/dist/components/confirm-card.d.ts +17 -0
  16. package/dist/components/conversation-item.d.ts +9 -0
  17. package/dist/components/conversation-list.d.ts +36 -1
  18. package/dist/components/dismissed-stub.d.ts +22 -0
  19. package/dist/components/file-tree.d.ts +15 -0
  20. package/dist/components/form.d.ts +34 -0
  21. package/dist/components/markdown.d.ts +3 -0
  22. package/dist/components/message.d.ts +71 -2
  23. package/dist/components/model-switcher.d.ts +7 -0
  24. package/dist/components/prompt-input.d.ts +13 -4
  25. package/dist/components/prompt-suggestion.d.ts +9 -1
  26. package/dist/components/reasoning.d.ts +14 -1
  27. package/dist/components/response-compare-types.d.ts +66 -0
  28. package/dist/components/response-compare.d.ts +65 -0
  29. package/dist/components/screen.d.ts +46 -0
  30. package/dist/components/tasks-card.d.ts +50 -1
  31. package/dist/components/toast.d.ts +58 -0
  32. package/dist/components/tool-types.d.ts +10 -0
  33. package/dist/components/tool.d.ts +8 -8
  34. package/dist/components/use-card-resolution.d.ts +10 -6
  35. package/dist/components/voice-input.d.ts +27 -0
  36. package/dist/components/voice-output.d.ts +33 -0
  37. package/dist/core-C8fzo39E.js +12 -0
  38. package/dist/custom-elements.json +8472 -1691
  39. package/dist/elements/agent-card.d.ts +1 -0
  40. package/dist/elements/agent-card.js +1 -0
  41. package/dist/elements/artifact.js +1 -0
  42. package/dist/elements/attachments.js +1 -0
  43. package/dist/elements/autoloader.d.ts +2 -0
  44. package/dist/elements/autoloader.js +1 -0
  45. package/dist/elements/avatar.d.ts +1 -0
  46. package/dist/elements/avatar.js +1 -0
  47. package/dist/elements/badge.d.ts +1 -0
  48. package/dist/elements/badge.js +1 -0
  49. package/dist/elements/button.d.ts +1 -0
  50. package/dist/elements/button.js +1 -0
  51. package/dist/elements/card.js +1 -0
  52. package/dist/elements/cards.d.ts +1 -0
  53. package/dist/elements/cards.js +1 -0
  54. package/dist/elements/chain-of-thought.d.ts +0 -12
  55. package/dist/elements/chain-of-thought.js +1 -0
  56. package/dist/elements/chat-scope-picker.js +1 -0
  57. package/dist/elements/chat-types.d.ts +8 -2
  58. package/dist/elements/chat-workspace.js +1 -0
  59. package/dist/elements/chat.js +1 -0
  60. package/dist/elements/checkpoint.js +1 -0
  61. package/dist/elements/choice.js +1 -0
  62. package/dist/elements/chunks/Icon-DLLBeLG5.js +1 -0
  63. package/dist/elements/chunks/action-icons-UB4V5FNq.js +1 -0
  64. package/dist/elements/chunks/arrow-left-C-gwlUmx.js +1 -0
  65. package/dist/elements/chunks/attachments-CgbErf1r.js +1 -0
  66. package/dist/elements/chunks/badge-DTQpgB6N.js +1 -0
  67. package/dist/elements/chunks/bash-InADTalH.js +1 -0
  68. package/dist/elements/chunks/button-XDUM6lXs.js +1 -0
  69. package/dist/elements/chunks/card-CBlFZ-7I.js +1 -0
  70. package/dist/elements/chunks/card-routing-C986KuUA.js +1 -0
  71. package/dist/elements/chunks/chat-thread-BIhmqwNL.js +1 -0
  72. package/dist/elements/chunks/check-hGUoVIKb.js +1 -0
  73. package/dist/elements/chunks/chevron-down-DDoaSUtO.js +1 -0
  74. package/dist/elements/chunks/chevron-right-CdGEUakB.js +1 -0
  75. package/dist/elements/chunks/circle-BKAZdmzb.js +1 -0
  76. package/dist/elements/chunks/circle-check-CmYG-y3I.js +1 -0
  77. package/dist/elements/chunks/circle-x-DewgAEym.js +1 -0
  78. package/dist/elements/chunks/cn-CU7UAWzk.js +1 -0
  79. package/dist/elements/chunks/code-block-DedwxwFI.js +1 -0
  80. package/dist/elements/chunks/collapsible-FfgmTHtM.js +1 -0
  81. package/dist/elements/chunks/composer-Cfbw5HKT.js +65 -0
  82. package/dist/elements/chunks/context-DwJmxlRE.js +1 -0
  83. package/dist/elements/chunks/conversation-list-DsCQMfPq.js +1 -0
  84. package/dist/elements/chunks/core-AYMC6_lb.js +12 -0
  85. package/dist/elements/chunks/css-M7EaDHN_.js +1 -0
  86. package/dist/elements/chunks/default-input-BuqsoENC.js +1 -0
  87. package/dist/elements/chunks/define-rGsaWsLL.js +1 -0
  88. package/dist/elements/chunks/disclosure-CwoAkpMH.js +1 -0
  89. package/dist/elements/chunks/download-DJ06G3Bz.js +1 -0
  90. package/dist/elements/chunks/dropdown-BFg8ri_R.js +1 -0
  91. package/dist/elements/chunks/ellipsis-dlN6YvGw.js +1 -0
  92. package/dist/elements/chunks/engine-javascript-vq0WuIJl.js +141 -0
  93. package/dist/elements/chunks/external-link-DBX2lc_R.js +1 -0
  94. package/dist/elements/chunks/file-text-HfwUx4F9.js +1 -0
  95. package/dist/elements/chunks/file-tree-C6Toj71u.js +1 -0
  96. package/dist/elements/chunks/folder-MYuqa9Xp.js +1 -0
  97. package/dist/elements/chunks/github-dark-dimmed-DUshB20C.js +1 -0
  98. package/dist/elements/chunks/github-light-JYsPkUQd.js +1 -0
  99. package/dist/elements/chunks/hover-card-gE7iyXdW.js +1 -0
  100. package/dist/elements/chunks/html-CPZ3oZQ7.js +1 -0
  101. package/dist/elements/chunks/icon-Vqz4ivrY.js +1 -0
  102. package/dist/elements/chunks/index-BCRhi84a.js +1 -0
  103. package/dist/elements/chunks/info-B_toFS0l.js +1 -0
  104. package/dist/elements/chunks/input-gzbHYZvQ.js +1 -0
  105. package/dist/elements/chunks/javascript-C25yR2R2.js +1 -0
  106. package/dist/elements/chunks/json-DxJze_jm.js +1 -0
  107. package/dist/elements/chunks/kbd-n49c4KZm.js +1 -0
  108. package/dist/elements/chunks/link-CKPs9yM0.js +1 -0
  109. package/dist/elements/chunks/loader-q6MamGus.js +1 -0
  110. package/dist/elements/chunks/markdown-DBrcqq4S.js +64 -0
  111. package/dist/elements/chunks/message-CTqaYI0s.js +1 -0
  112. package/dist/elements/chunks/message-feedback-Cvzm03w0.js +1 -0
  113. package/dist/elements/chunks/message-square-CUg9eRCi.js +1 -0
  114. package/dist/elements/chunks/minimize-2-l2klxP6K.js +1 -0
  115. package/dist/elements/chunks/model-switcher-CmyjiHO1.js +1 -0
  116. package/dist/elements/chunks/overlay-C8sOYqjT.js +1 -0
  117. package/dist/elements/chunks/paperclip-42Ia7xHD.js +1 -0
  118. package/dist/elements/chunks/progress-bar-tzKMWAwO.js +1 -0
  119. package/dist/elements/chunks/prompt-suggestion-D3F6vP_A.js +1 -0
  120. package/dist/elements/chunks/reasoning-BJNmmyov.js +1 -0
  121. package/dist/elements/chunks/resizable-BRsk19qI.js +1 -0
  122. package/dist/elements/chunks/rotate-cw-BgcggLHC.js +1 -0
  123. package/dist/elements/chunks/scroll-area-CgGbFFbT.js +1 -0
  124. package/dist/elements/chunks/separator-8hM4GdHE.js +1 -0
  125. package/dist/elements/chunks/settings-CaUIYOg-.js +1 -0
  126. package/dist/elements/chunks/settings-group-CYjOVIZQ.js +1 -0
  127. package/dist/elements/chunks/share-BTYM3Ddt.js +1 -0
  128. package/dist/elements/chunks/skeleton-DsTYrPUe.js +1 -0
  129. package/dist/elements/chunks/slots-DkZ-Cmha.js +1 -0
  130. package/dist/elements/chunks/star-9R3LBQ9n.js +1 -0
  131. package/dist/elements/chunks/store-CYl5Y0_u.js +1 -0
  132. package/dist/elements/chunks/svelte--5p79yCD.js +1 -0
  133. package/dist/elements/chunks/text-shimmer-CaYGv8Se.js +1 -0
  134. package/dist/elements/chunks/textarea-NEr2SLcD.js +1 -0
  135. package/dist/elements/chunks/thumbs-up-DZYZkFfc.js +1 -0
  136. package/dist/elements/chunks/toast-store-ClxVZRcc.js +1 -0
  137. package/dist/elements/chunks/tool-CHZOmoe9.js +1 -0
  138. package/dist/elements/chunks/tooltip-WpHElELC.js +1 -0
  139. package/dist/elements/chunks/triangle-alert-BlS80PUg.js +1 -0
  140. package/dist/elements/chunks/tsx-B8rCNbgL.js +1 -0
  141. package/dist/elements/chunks/typescript-RycA9KXf.js +1 -0
  142. package/dist/elements/chunks/use-card-resolution-VSVoxDeJ.js +1 -0
  143. package/dist/elements/chunks/video-DxTPZqT8.js +1 -0
  144. package/dist/elements/chunks/vue-BmIZj4XD.js +1 -0
  145. package/dist/elements/chunks/x-C1qtndxn.js +1 -0
  146. package/dist/elements/coachmark.d.ts +1 -0
  147. package/dist/elements/coachmark.js +1 -0
  148. package/dist/elements/code-block.js +1 -0
  149. package/dist/elements/command.d.ts +1 -0
  150. package/dist/elements/command.js +1 -0
  151. package/dist/elements/compare.d.ts +1 -0
  152. package/dist/elements/compare.js +1 -0
  153. package/dist/elements/composer.d.ts +1 -0
  154. package/dist/elements/composer.js +1 -0
  155. package/dist/elements/confirm-card.js +1 -0
  156. package/dist/elements/context-meter.js +1 -0
  157. package/dist/elements/conversation-list.d.ts +1 -11
  158. package/dist/elements/conversation-list.js +1 -0
  159. package/dist/elements/default-input.d.ts +20 -9
  160. package/dist/elements/define.d.ts +11 -0
  161. package/dist/elements/dialog.d.ts +1 -0
  162. package/dist/elements/dialog.js +1 -0
  163. package/dist/elements/disclosure.d.ts +37 -0
  164. package/dist/elements/editable-label.d.ts +1 -0
  165. package/dist/elements/editable-label.js +1 -0
  166. package/dist/elements/embed.js +1 -0
  167. package/dist/elements/empty.js +1 -0
  168. package/dist/elements/feedback-bar.js +1 -0
  169. package/dist/elements/file-tree.js +1 -0
  170. package/dist/elements/file-upload.js +1 -0
  171. package/dist/elements/form.js +1 -0
  172. package/dist/elements/hover-card.d.ts +1 -0
  173. package/dist/elements/hover-card.js +1 -0
  174. package/dist/elements/icon.d.ts +1 -0
  175. package/dist/elements/icon.js +1 -0
  176. package/dist/elements/image.js +1 -0
  177. package/dist/elements/input.d.ts +1 -0
  178. package/dist/elements/input.js +1 -0
  179. package/dist/elements/kbd.d.ts +1 -0
  180. package/dist/elements/kbd.js +1 -0
  181. package/dist/elements/link-preview.js +1 -0
  182. package/dist/elements/loader.js +1 -0
  183. package/dist/elements/markdown.js +1 -0
  184. package/dist/elements/menu.d.ts +1 -0
  185. package/dist/elements/menu.js +1 -0
  186. package/dist/elements/message-skills.d.ts +0 -16
  187. package/dist/elements/message-skills.js +1 -0
  188. package/dist/elements/message.js +1 -0
  189. package/dist/elements/model-switcher.d.ts +1 -11
  190. package/dist/elements/model-switcher.js +1 -0
  191. package/dist/elements/nav.d.ts +1 -0
  192. package/dist/elements/nav.js +1 -0
  193. package/dist/elements/notice.d.ts +1 -0
  194. package/dist/elements/notice.js +1 -0
  195. package/dist/elements/pane-group.d.ts +1 -0
  196. package/dist/elements/pane-group.js +1 -0
  197. package/dist/elements/pane.d.ts +1 -0
  198. package/dist/elements/pane.js +1 -0
  199. package/dist/elements/popover.js +1 -0
  200. package/dist/elements/progress-bar.d.ts +1 -0
  201. package/dist/elements/progress-bar.js +1 -0
  202. package/dist/elements/prompt-dock.d.ts +1 -0
  203. package/dist/elements/prompt-dock.js +1 -0
  204. package/dist/elements/prompt-input.d.ts +1 -9
  205. package/dist/elements/prompt-input.js +1 -0
  206. package/dist/elements/prompt-suggestions.d.ts +0 -6
  207. package/dist/elements/prompt-suggestions.js +1 -0
  208. package/dist/elements/reasoning.js +1 -0
  209. package/dist/elements/register.d.ts +10 -0
  210. package/dist/elements/remote.js +1 -0
  211. package/dist/elements/resizable.d.ts +1 -17
  212. package/dist/elements/resizable.js +1 -0
  213. package/dist/elements/response-stream.js +14 -0
  214. package/dist/elements/screen.d.ts +1 -0
  215. package/dist/elements/screen.js +1 -0
  216. package/dist/elements/scroll-area.d.ts +1 -0
  217. package/dist/elements/scroll-area.js +1 -0
  218. package/dist/elements/scroll-button.js +1 -0
  219. package/dist/elements/search.d.ts +1 -0
  220. package/dist/elements/search.js +1 -0
  221. package/dist/elements/segmented.d.ts +1 -0
  222. package/dist/elements/segmented.js +1 -0
  223. package/dist/elements/separator.d.ts +1 -0
  224. package/dist/elements/separator.js +1 -0
  225. package/dist/elements/setting-item.d.ts +1 -0
  226. package/dist/elements/setting-item.js +1 -0
  227. package/dist/elements/settings-group.d.ts +1 -0
  228. package/dist/elements/settings-group.js +1 -0
  229. package/dist/elements/skeleton.d.ts +1 -0
  230. package/dist/elements/skeleton.js +1 -0
  231. package/dist/elements/slots.d.ts +176 -0
  232. package/dist/elements/source.d.ts +0 -17
  233. package/dist/elements/source.js +1 -0
  234. package/dist/elements/status.d.ts +1 -0
  235. package/dist/elements/status.js +1 -0
  236. package/dist/elements/switch.js +1 -0
  237. package/dist/elements/tabs.d.ts +1 -0
  238. package/dist/elements/tabs.js +1 -0
  239. package/dist/elements/tasks.js +1 -0
  240. package/dist/elements/text-shimmer.js +1 -0
  241. package/dist/elements/thinking-bar.js +1 -0
  242. package/dist/elements/toast.d.ts +1 -0
  243. package/dist/elements/toast.js +1 -0
  244. package/dist/elements/tool.js +1 -0
  245. package/dist/elements/tooltip.d.ts +1 -0
  246. package/dist/elements/tooltip.js +1 -0
  247. package/dist/elements/voice-input.js +1 -0
  248. package/dist/elements/voice-output.d.ts +1 -0
  249. package/dist/elements/voice-output.js +1 -0
  250. package/dist/elements.d.ts +772 -61
  251. package/dist/engine-javascript-C1x7zo1_.js +141 -0
  252. package/dist/index.d.ts +15 -2
  253. package/dist/index.js +14405 -9810
  254. package/dist/kai.es.js +1 -0
  255. package/dist/llms/llms-full.txt +1234 -107
  256. package/dist/llms/llms.txt +4 -4
  257. package/dist/mcp.es.js +217 -6
  258. package/dist/primitives/card-contract.d.ts +20 -4
  259. package/dist/primitives/card-recovery.d.ts +55 -0
  260. package/dist/primitives/composer-model.d.ts +22 -0
  261. package/dist/primitives/composer-triggers.d.ts +19 -0
  262. package/dist/primitives/create-kai-chat.d.ts +38 -0
  263. package/dist/primitives/message-feedback.d.ts +35 -0
  264. package/dist/primitives/toast-store.d.ts +118 -0
  265. package/dist/primitives/use-speech-recognition.d.ts +26 -0
  266. package/dist/react/index.d.ts +1166 -98
  267. package/dist/react/runtime.d.ts +9 -2
  268. package/dist/react/use-kai-chat.d.ts +41 -0
  269. package/dist/react.js +575 -186
  270. package/dist/register-impl-CYWGkgbI.js +141 -0
  271. package/dist/schemas/choice.schema.json +5 -0
  272. package/dist/schemas/tasks.schema.json +7 -2
  273. package/dist/state/index.d.ts +4 -0
  274. package/dist/state/messages.d.ts +11 -0
  275. package/dist/state/stream.d.ts +22 -0
  276. package/dist/state/suggestions.d.ts +4 -0
  277. package/dist/state.js +117 -0
  278. package/dist/theme.tokens.css +87 -0
  279. package/dist/types.d.ts +4 -0
  280. package/dist/ui/agent-card.d.ts +61 -0
  281. package/dist/ui/button.d.ts +5 -2
  282. package/dist/ui/card.d.ts +61 -0
  283. package/dist/ui/collapsible.d.ts +15 -1
  284. package/dist/ui/command.d.ts +33 -0
  285. package/dist/ui/dialog.d.ts +42 -0
  286. package/dist/ui/dropdown.d.ts +95 -1
  287. package/dist/ui/editable-label.d.ts +26 -0
  288. package/dist/ui/hover-card.d.ts +13 -1
  289. package/dist/ui/icon.d.ts +18 -0
  290. package/dist/ui/input.d.ts +33 -0
  291. package/dist/ui/kbd.d.ts +21 -0
  292. package/dist/ui/nav.d.ts +62 -0
  293. package/dist/ui/notice.d.ts +31 -0
  294. package/dist/ui/overlay.d.ts +12 -0
  295. package/dist/ui/pane-grid.d.ts +58 -0
  296. package/dist/ui/pane-group.d.ts +75 -0
  297. package/dist/ui/pane.d.ts +78 -0
  298. package/dist/ui/popover.d.ts +11 -1
  299. package/dist/ui/progress-bar.d.ts +23 -0
  300. package/dist/ui/prompt-dock.d.ts +96 -0
  301. package/dist/ui/resizable.d.ts +12 -0
  302. package/dist/ui/scroll-area.d.ts +4 -0
  303. package/dist/ui/segmented.d.ts +28 -0
  304. package/dist/ui/settings-group.d.ts +32 -0
  305. package/dist/ui/skeleton.d.ts +12 -0
  306. package/dist/ui/stat.d.ts +16 -0
  307. package/dist/ui/status.d.ts +13 -0
  308. package/dist/ui/switch.d.ts +8 -1
  309. package/dist/ui/tabs.d.ts +35 -0
  310. package/dist/ui/tooltip.d.ts +20 -1
  311. package/frameworks/react/index.tsx +1100 -163
  312. package/frameworks/react/runtime.tsx +30 -1
  313. package/frameworks/react/use-kai-chat.tsx +87 -0
  314. package/llms-full.txt +1234 -107
  315. package/llms.txt +4 -4
  316. package/package.json +36 -12
  317. package/src/agent-tooling/mcp/manifest.ts +14 -0
  318. package/src/agent-tooling/mcp/tools/debug.ts +194 -6
  319. package/src/agent-tooling/mcp/tools/reference.ts +32 -0
  320. package/src/agent-tooling/mcp/tools/scaffold.ts +162 -1
  321. package/src/components/artifact.tsx +98 -13
  322. package/src/components/attachment-types.ts +13 -0
  323. package/src/components/attachments.tsx +4 -14
  324. package/src/components/card.tsx +109 -15
  325. package/src/components/chain-of-thought.tsx +210 -1
  326. package/src/components/chat-scope-picker.tsx +13 -3
  327. package/src/components/chat-thread.tsx +238 -137
  328. package/src/components/choice-card.tsx +136 -15
  329. package/src/components/coachmark.tsx +245 -0
  330. package/src/components/component-meta.json +921 -108
  331. package/src/components/composer-dom.ts +159 -0
  332. package/src/components/composer-highlight.ts +242 -0
  333. package/src/components/composer-history.ts +82 -0
  334. package/src/components/composer.tsx +979 -0
  335. package/src/components/confirm-card.tsx +69 -2
  336. package/src/components/conversation-item.tsx +69 -7
  337. package/src/components/conversation-list.tsx +134 -37
  338. package/src/components/dismissed-stub.tsx +80 -0
  339. package/src/components/file-tree.tsx +197 -47
  340. package/src/components/form-widgets.tsx +9 -7
  341. package/src/components/form.tsx +161 -20
  342. package/src/components/image.tsx +3 -5
  343. package/src/components/link-preview.tsx +5 -4
  344. package/src/components/markdown.tsx +5 -2
  345. package/src/components/message.tsx +174 -14
  346. package/src/components/model-switcher.tsx +19 -4
  347. package/src/components/prompt-input.tsx +46 -75
  348. package/src/components/prompt-suggestion.tsx +48 -16
  349. package/src/components/reasoning.tsx +29 -6
  350. package/src/components/response-compare-types.ts +127 -0
  351. package/src/components/response-compare.tsx +460 -0
  352. package/src/components/screen.tsx +176 -0
  353. package/src/components/tasks-card.tsx +374 -23
  354. package/src/components/toast.tsx +486 -0
  355. package/src/components/tool-types.ts +10 -0
  356. package/src/components/tool.tsx +22 -16
  357. package/src/components/use-card-resolution.ts +24 -8
  358. package/src/components/voice-input.tsx +102 -19
  359. package/src/components/voice-output.tsx +202 -0
  360. package/src/elements/agent-card.tsx +67 -0
  361. package/src/elements/artifact.tsx +53 -4
  362. package/src/elements/attachments.tsx +1 -0
  363. package/src/elements/autoloader.ts +89 -0
  364. package/src/elements/avatar.tsx +33 -0
  365. package/src/elements/badge.tsx +32 -0
  366. package/src/elements/button.tsx +126 -0
  367. package/src/elements/card-media.jpg +0 -0
  368. package/src/elements/card.tsx +124 -31
  369. package/src/elements/cards.tsx +81 -7
  370. package/src/elements/chain-of-thought.tsx +77 -32
  371. package/src/elements/chat-scope-picker.tsx +35 -8
  372. package/src/elements/chat-types.ts +9 -2
  373. package/src/elements/chat-workspace.tsx +157 -43
  374. package/src/elements/chat.tsx +49 -25
  375. package/src/elements/choice.tsx +71 -19
  376. package/src/elements/coachmark.tsx +90 -0
  377. package/src/elements/command.tsx +209 -0
  378. package/src/elements/compare.tsx +110 -0
  379. package/src/elements/compiled.css +1 -1
  380. package/src/elements/composer.tsx +151 -0
  381. package/src/elements/confirm-card.tsx +36 -11
  382. package/src/elements/conversation-list.tsx +80 -11
  383. package/src/elements/default-input.tsx +75 -53
  384. package/src/elements/define.tsx +47 -6
  385. package/src/elements/dialog.tsx +98 -0
  386. package/src/elements/disclosure.ts +73 -0
  387. package/src/elements/editable-label.tsx +125 -0
  388. package/src/elements/element-manifest.json +310 -0
  389. package/src/elements/element-meta.json +5954 -1605
  390. package/src/elements/element-types.d.ts +771 -60
  391. package/src/elements/file-tree.tsx +12 -2
  392. package/src/elements/file-upload.tsx +1 -1
  393. package/src/elements/form.tsx +54 -11
  394. package/src/elements/hover-card.tsx +80 -0
  395. package/src/elements/icon-names.json +48 -0
  396. package/src/elements/icon.tsx +41 -0
  397. package/src/elements/input.tsx +203 -0
  398. package/src/elements/kbd.tsx +45 -0
  399. package/src/elements/menu.tsx +217 -0
  400. package/src/elements/message.tsx +84 -55
  401. package/src/elements/model-switcher.tsx +27 -1
  402. package/src/elements/nav.tsx +87 -0
  403. package/src/elements/notice.tsx +53 -0
  404. package/src/elements/pane-group.tsx +119 -0
  405. package/src/elements/pane.tsx +129 -0
  406. package/src/elements/popover.tsx +39 -17
  407. package/src/elements/progress-bar.tsx +39 -0
  408. package/src/elements/prompt-dock.tsx +81 -0
  409. package/src/elements/prompt-input.tsx +112 -63
  410. package/src/elements/prompt-suggestions.tsx +25 -9
  411. package/src/elements/reasoning.tsx +30 -9
  412. package/src/elements/register-impl.ts +41 -3
  413. package/src/elements/register.ts +20 -3
  414. package/src/elements/remote.tsx +4 -0
  415. package/src/elements/resizable.tsx +48 -11
  416. package/src/elements/screen.tsx +90 -0
  417. package/src/elements/scroll-area.tsx +33 -0
  418. package/src/elements/search.tsx +180 -0
  419. package/src/elements/segmented.tsx +135 -0
  420. package/src/elements/separator.tsx +36 -0
  421. package/src/elements/setting-item.tsx +50 -0
  422. package/src/elements/settings-group.tsx +37 -0
  423. package/src/elements/skeleton.tsx +45 -0
  424. package/src/elements/slots.ts +607 -0
  425. package/src/elements/source.tsx +13 -6
  426. package/src/elements/status.tsx +42 -0
  427. package/src/elements/styles.css +19 -0
  428. package/src/elements/switch.tsx +89 -14
  429. package/src/elements/tabs.tsx +95 -0
  430. package/src/elements/tasks.tsx +70 -14
  431. package/src/elements/toast.tsx +89 -0
  432. package/src/elements/tool.tsx +43 -9
  433. package/src/elements/tooltip.tsx +85 -0
  434. package/src/elements/video-poster.jpg +0 -0
  435. package/src/elements/voice-input.tsx +66 -16
  436. package/src/elements/voice-output.tsx +69 -0
  437. package/src/index.ts +35 -2
  438. package/src/primitives/card-contract.ts +14 -5
  439. package/src/primitives/card-recovery.ts +149 -0
  440. package/src/primitives/card-routing.ts +3 -0
  441. package/src/primitives/card-schemas/choice.schema.json +5 -0
  442. package/src/primitives/card-schemas/tasks.schema.json +7 -2
  443. package/src/primitives/composer-model.ts +49 -0
  444. package/src/primitives/composer-triggers.ts +35 -0
  445. package/src/primitives/create-kai-chat.ts +66 -0
  446. package/src/primitives/message-feedback.ts +123 -0
  447. package/src/primitives/toast-store.ts +276 -0
  448. package/src/primitives/use-speech-recognition.ts +135 -0
  449. package/src/state/index.ts +6 -0
  450. package/src/state/messages.ts +36 -0
  451. package/src/state/stream.ts +92 -0
  452. package/src/state/suggestions.ts +9 -0
  453. package/src/types.ts +4 -0
  454. package/src/ui/agent-card.tsx +212 -0
  455. package/src/ui/button.tsx +16 -5
  456. package/src/ui/card.tsx +245 -0
  457. package/src/ui/collapsible.tsx +30 -4
  458. package/src/ui/command.tsx +99 -0
  459. package/src/ui/dialog.tsx +217 -0
  460. package/src/ui/dropdown.tsx +375 -13
  461. package/src/ui/editable-label.tsx +112 -0
  462. package/src/ui/hover-card.tsx +28 -5
  463. package/src/ui/icon.tsx +110 -0
  464. package/src/ui/input.tsx +132 -0
  465. package/src/ui/kbd.tsx +118 -0
  466. package/src/ui/nav.tsx +282 -0
  467. package/src/ui/notice.tsx +84 -0
  468. package/src/ui/overlay.tsx +108 -2
  469. package/src/ui/pane-grid.tsx +116 -0
  470. package/src/ui/pane-group.tsx +280 -0
  471. package/src/ui/pane.tsx +193 -0
  472. package/src/ui/popover.tsx +16 -2
  473. package/src/ui/progress-bar.tsx +83 -0
  474. package/src/ui/prompt-dock.tsx +145 -0
  475. package/src/ui/resizable.tsx +69 -1
  476. package/src/ui/scroll-area.tsx +14 -3
  477. package/src/ui/segmented.tsx +109 -0
  478. package/src/ui/settings-group.tsx +67 -0
  479. package/src/ui/skeleton.tsx +62 -5
  480. package/src/ui/stat.tsx +41 -0
  481. package/src/ui/status.tsx +48 -0
  482. package/src/ui/switch.tsx +49 -23
  483. package/src/ui/tabs.tsx +168 -0
  484. package/src/ui/tooltip.tsx +57 -7
  485. package/theme.css +113 -0
  486. package/dist/components/slash-command.d.ts +0 -15
  487. package/dist/kitn-chat.es.js +0 -1
  488. package/dist/register-impl-wCsFPoh9.js +0 -77
  489. package/dist/register-ujhr1nBS.js +0 -1
  490. package/src/components/slash-command.tsx +0 -232
  491. package/src/elements/framework-usage.json +0 -563
  492. /package/dist/{kitn-chat-provider.d.ts → kai-provider.d.ts} +0 -0
  493. /package/dist/{kitn-chat-provider.es.js → kai-provider.es.js} +0 -0
@@ -1,4 +1,26 @@
1
- import { WebComponentProps } from './runtime';
1
+ import { registerAll, WebComponentProps } from './runtime';
2
+ export { registerAll };
3
+ export { useKaiChat } from './use-kai-chat';
4
+ export type { UseKaiChatOptions, KaiChatController, ChatMessage } from './use-kai-chat';
5
+ export interface AgentCardProps extends WebComponentProps {
6
+ /** The agent's name — the primary label. Attribute: `name`. */
7
+ name?: string;
8
+ /** Selected / focused state: highlighted border + surface. Attribute: `active`. */
9
+ active?: boolean;
10
+ /** Raise a prominent "Needs you" pill plus a glowing amber edge — the attention-routing signal that pulls focus to this agent. Attribute: `needs-attention`. */
11
+ needsAttention?: boolean;
12
+ /** 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 }`. */
13
+ status?: {
14
+ tone: "working" | "idle" | "done" | "error" | "blocked";
15
+ label?: string;
16
+ pulse?: boolean;
17
+ };
18
+ /** The card was activated — clicked, or Enter / Space while focused. Promote this agent back to focus. */
19
+ onActivate?: (event: CustomEvent) => void;
20
+ /** 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). */
21
+ onMenu?: (event: CustomEvent) => void;
22
+ }
23
+ export declare const AgentCard: import('react').ForwardRefExoticComponent<AgentCardProps & import('react').RefAttributes<HTMLElement>>;
2
24
  export interface ArtifactProps extends WebComponentProps {
3
25
  /** URL the preview iframe frames. Consumer-controlled. */
4
26
  src?: string;
@@ -9,9 +31,14 @@ export interface ArtifactProps extends WebComponentProps {
9
31
  code?: undefined | string;
10
32
  language?: undefined | string;
11
33
  type?: undefined | "html" | "pdf" | "image" | "other";
34
+ additions?: undefined | number;
35
+ deletions?: undefined | number;
36
+ status?: undefined | "added" | "modified" | "deleted" | "renamed" | "untracked";
12
37
  }[];
13
- /** Active tab: `preview` (default) or `code`. */
38
+ /** Controlled active tab: `preview` or `code`. When set, the artifact follows it (re-asserted on change). Leave unset for an uncontrolled tab (see `defaultTab`). */
14
39
  tab?: "preview" | "code";
40
+ /** 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`. */
41
+ defaultTab?: "preview" | "code";
15
42
  /** Selected file path — syncs the tree highlight, Code source, and preview. */
16
43
  activeFile?: string;
17
44
  /** iframe `sandbox` override. Secure default `allow-scripts allow-forms` (NOT `allow-same-origin`). */
@@ -38,6 +65,8 @@ export interface ArtifactProps extends WebComponentProps {
38
65
  standalone?: boolean;
39
66
  /** Show the address but make it read-only (visible, nav-tracking, non-editable). */
40
67
  readonlyPath?: boolean;
68
+ /** Friendly address shown in the path field instead of the real current url (read-only, non-navigable). Use when the framed url is not consumer-facing (e.g. a `data:` blob) so a clean address shows instead of leaking it. Scalar string: set as the `display-url` attribute or the `displayUrl` property. */
69
+ displayUrl?: string;
41
70
  /** Fired when a file is selected. `detail.path`. */
42
71
  onFileSelect?: (event: CustomEvent<{
43
72
  path: string;
@@ -82,15 +111,68 @@ export interface AttachmentsProps extends WebComponentProps {
82
111
  }>) => void;
83
112
  }
84
113
  export declare const Attachments: import('react').ForwardRefExoticComponent<AttachmentsProps & import('react').RefAttributes<HTMLElement>>;
114
+ export interface AvatarProps extends WebComponentProps {
115
+ /** Image URL/data-URI. When absent, the `fallback` initials show instead. */
116
+ src?: string;
117
+ /** Alt text for the image. Defaults to `fallback`. */
118
+ alt?: string;
119
+ /** Short text shown when there's no image — usually initials (e.g. "JD", "AI"). */
120
+ fallback?: string;
121
+ /** Size token: `sm` | `md` (default) | `lg`. */
122
+ size?: "sm" | "md" | "lg";
123
+ }
124
+ export declare const Avatar: import('react').ForwardRefExoticComponent<AvatarProps & import('react').RefAttributes<HTMLElement>>;
125
+ export interface BadgeProps extends WebComponentProps {
126
+ /** `default` (muted pill) · `count` (compact number badge) · `citation` (filled primary, for inline citation markers). Defaults to `default`. */
127
+ variant?: "default" | "count" | "citation";
128
+ }
129
+ export declare const Badge: import('react').ForwardRefExoticComponent<BadgeProps & import('react').RefAttributes<HTMLElement>>;
130
+ export interface ButtonProps extends WebComponentProps {
131
+ /** Visual style. `default` (filled), `subtle` (muted text, hover tint — the toolbar icon look), `ghost` (transparent, hover fill), `outline`, or `destructive`. Defaults to `default`. */
132
+ variant?: "default" | "subtle" | "ghost" | "outline" | "destructive";
133
+ /** Size token. `icon` / `icon-sm` are square (for icon-only buttons); `sm` / `md` / `lg` size text buttons. Defaults to `md`. */
134
+ size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
135
+ /** Leading icon: a named icon (e.g. `"mic"`, `"plus"`), an image URL/data-URI, or plain text. Renders before any slotted label. */
136
+ icon?: string;
137
+ /** Trailing icon, after the label (e.g. `"chevron-down"` for a menu affordance). */
138
+ iconTrailing?: string;
139
+ /** Accessible name. REQUIRED for icon-only buttons (no visible text); ignored when you slot visible text, which already names the button. */
140
+ label?: string;
141
+ /** Disable the button (non-interactive, dimmed). */
142
+ disabled?: boolean;
143
+ /** Stretch the button to the full width of its container (a block button) — e.g. a card CTA or a stacked action. Attribute: `full`. */
144
+ full?: boolean;
145
+ /** Justify the button's content: `start`, `center` (default), or `end`. Combine with `full` for a full-width, left-aligned button. */
146
+ align?: "start" | "center" | "end";
147
+ /** Native button `type`. Defaults to `button` (so it never submits a form). */
148
+ type?: "button" | "submit" | "reset";
149
+ /** The button was activated (pointer or keyboard). Carries no detail. The native `click` also bubbles (composed) for consumers who prefer it. */
150
+ onClick?: (event: CustomEvent) => void;
151
+ }
152
+ export declare const Button: import('react').ForwardRefExoticComponent<ButtonProps & import('react').RefAttributes<HTMLElement>>;
85
153
  export interface CardProps extends WebComponentProps {
86
- /** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
87
- heading?: string;
88
- /** Supporting text under the heading. Attribute: `description`. */
89
- description?: string;
90
- /** When set, the card renders its inline error state instead of the body. Attribute: `error-message`. */
91
- errorMessage?: string;
92
- /** Compact spacing for dense lists. Attribute: `dense`. */
154
+ /** Surface treatment: `outlined` (default) | `filled` | `plain` | `accent`. Attribute: `appearance`. */
155
+ appearance?: "outlined" | "filled" | "plain" | "accent";
156
+ /** `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`. */
157
+ orientation?: "vertical" | "horizontal" | "responsive";
158
+ /** The card width below which a `responsive` card collapses to vertical and the footer actions stack. A CSS length; default `28rem`. Attribute: `collapse`. */
159
+ collapse?: string;
160
+ /** Tighter spacing for dense lists. Attribute: `dense`. */
93
161
  dense?: boolean;
162
+ /** Show a close (×) that hides the card and emits `kai-dismiss`. Attribute: `dismissible`. Off by default. */
163
+ dismissible?: boolean;
164
+ /** Render the whole card as a link. Attribute: `href`. Wins over `clickable`. */
165
+ href?: string;
166
+ /** `target` for the `href` anchor. Attribute: `target`. */
167
+ target?: string;
168
+ /** `rel` for the `href` anchor. Attribute: `rel`. */
169
+ rel?: string;
170
+ /** Make the whole card a button (`role="button"`, Enter/Space, hover affordance) that emits `kai-card-click`. Attribute: `clickable`. Ignored when `href` is set. */
171
+ clickable?: boolean;
172
+ /** A `clickable`/`href` card was activated (click, or Enter/Space). */
173
+ onCardClick?: (event: CustomEvent) => void;
174
+ /** The card was dismissed via its × (it also hides itself). */
175
+ onDismiss?: (event: CustomEvent) => void;
94
176
  }
95
177
  export declare const Card: import('react').ForwardRefExoticComponent<CardProps & import('react').RefAttributes<HTMLElement>>;
96
178
  export interface CardsProps extends WebComponentProps {
@@ -109,6 +191,13 @@ export interface CardsProps extends WebComponentProps {
109
191
  kind: "submit";
110
192
  data: unknown;
111
193
  at?: string;
194
+ } | {
195
+ kind: "dismissed";
196
+ at?: string;
197
+ } | {
198
+ kind: "expired";
199
+ reason?: string;
200
+ at?: string;
112
201
  };
113
202
  }[];
114
203
  /** 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. */
@@ -124,17 +213,50 @@ export interface CardsProps extends WebComponentProps {
124
213
  onOpen?: (url: string, target: "tab" | "artifact") => void;
125
214
  onState?: (cardId: string, patch: unknown) => void;
126
215
  onDismiss?: (cardId: string) => void;
216
+ onReopen?: (cardId: string) => void;
127
217
  onError?: (cardId: string, message: string) => void;
128
218
  maxSendPromptMode?: "compose" | "send";
129
219
  };
220
+ /** 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.) */
221
+ onCardResolved?: (event: CustomEvent<{
222
+ cardId: string;
223
+ resolution: {
224
+ kind: "action";
225
+ action: string;
226
+ payload?: unknown;
227
+ at?: undefined | string;
228
+ } | {
229
+ kind: "submit";
230
+ data: unknown;
231
+ at?: undefined | string;
232
+ } | {
233
+ kind: "dismissed";
234
+ at?: undefined | string;
235
+ } | {
236
+ kind: "expired";
237
+ reason?: undefined | string;
238
+ at?: undefined | string;
239
+ };
240
+ }>) => void;
130
241
  }
131
242
  export declare const Cards: import('react').ForwardRefExoticComponent<CardsProps & import('react').RefAttributes<HTMLElement>>;
132
243
  export interface ChainOfThoughtProps extends WebComponentProps {
133
- /** The reasoning steps. Set as a JS property. Compound sub-parts collapse to this one data model (Route 1). */
244
+ /** The reasoning steps. Set as a JS property. Compound sub-parts collapse to this one data model (Route 1). Each `{ label, content?, id? }`. */
134
245
  steps: {
135
246
  label: string;
136
247
  content?: undefined | string;
248
+ id?: undefined | string;
137
249
  }[];
250
+ /** Open mode: `'multiple'` (default — any number of steps open at once) or `'single'` (at most one open; opening a step closes the others). */
251
+ type?: "single" | "multiple";
252
+ /** 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. */
253
+ value?: string | string[];
254
+ /** Uncontrolled INITIAL open step key(s) — seeds which steps render expanded. Ignored once `value` is provided. Set as a JS property. */
255
+ defaultValue?: string | string[];
256
+ /** 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.) */
257
+ onValueChange?: (event: CustomEvent<{
258
+ value: string | string[];
259
+ }>) => void;
138
260
  }
139
261
  export declare const ChainOfThought: import('react').ForwardRefExoticComponent<ChainOfThoughtProps & import('react').RefAttributes<HTMLElement>>;
140
262
  export interface ChatProps extends WebComponentProps {
@@ -174,9 +296,23 @@ export interface ChatProps extends WebComponentProps {
174
296
  fallback?: undefined | string;
175
297
  alt?: undefined | string;
176
298
  };
299
+ feedback?: undefined | "like" | "dislike";
177
300
  }[];
178
- /** Controlled value of the input. When set, the host owns the input text and must update it on `kai-value-change`; leave unset for uncontrolled behavior. */
179
- value?: string;
301
+ /** 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. */
302
+ value?: string | ({
303
+ type: "text";
304
+ text: string;
305
+ } | {
306
+ type: "entity";
307
+ entity: {
308
+ kind: string;
309
+ id: string;
310
+ label: string;
311
+ icon?: string;
312
+ promptText?: string;
313
+ data?: Record<string, unknown>;
314
+ };
315
+ })[];
180
316
  /** Placeholder text shown in the empty input. */
181
317
  placeholder?: string;
182
318
  /** When true, shows the loading/streaming state and disables submit (use while awaiting the assistant's reply). */
@@ -188,7 +324,7 @@ export interface ChatProps extends WebComponentProps {
188
324
  /** 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. */
189
325
  persistSuggestions?: boolean;
190
326
  /** Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`. */
191
- proseSize?: "xs" | "sm" | "base" | "lg";
327
+ proseSize?: "sm" | "lg" | "xs" | "base";
192
328
  /** Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`). */
193
329
  codeTheme?: string;
194
330
  /** Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true. */
@@ -219,27 +355,57 @@ export interface ChatProps extends WebComponentProps {
219
355
  headerStart?: boolean;
220
356
  /** Whether the host has `slot="header-end"` content (right of the controls). */
221
357
  headerEnd?: boolean;
358
+ /** REPLACE — full custom header in place of the built-in title/model/context bar. */
359
+ headerFull?: boolean;
360
+ /** INJECT — left sidebar column (e.g. a conversation list / your own nav). */
361
+ sidebar?: boolean;
362
+ /** 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). */
363
+ empty?: boolean;
364
+ /** REPLACE — full custom composer in place of the built-in prompt input. The projected content wires its own submit (the data-flow boundary). */
365
+ composer?: boolean;
366
+ /** INJECT — accessory row just above the composer (e.g. extra actions). */
367
+ composerActions?: boolean;
368
+ /** INJECT — footer row below the composer (disclaimers, token meter, …). */
369
+ footer?: boolean;
222
370
  /** Show a Search (Globe) button in the input toolbar; fires a `search` event. */
223
371
  search?: boolean;
224
372
  /** Show a Voice (Mic) button in the input toolbar; fires a `voice` event. */
225
373
  voice?: boolean;
226
- /** Slash commandswhen set, typing `/` in the input opens the command palette and fires `kai-slash-select`. Set as a JS property. */
227
- slashCommands?: {
228
- id: string;
229
- label: string;
230
- description?: string;
231
- category?: string;
374
+ /** 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. */
375
+ triggers?: {
376
+ char: string;
377
+ kind: string;
378
+ items?: {
379
+ id: string;
380
+ label: string;
381
+ icon?: string;
382
+ description?: string;
383
+ group?: string;
384
+ kind?: string;
385
+ promptText?: string;
386
+ data?: Record<string, unknown>;
387
+ }[];
232
388
  }[];
233
- /** Command ids to highlight as active in the palette. */
234
- slashActiveIds?: string[];
235
- /** Single-line palette rows. */
236
- slashCompact?: boolean;
389
+ /** Default icon per entity kind (kind image src) for pills/menu items. */
390
+ kindIcons?: Record<string, string>;
237
391
  /** Whether each message's action bar is always visible (`'always'`, default) or only revealed on hover of that message row (`'hover'`). */
238
392
  actionsReveal?: "always" | "hover";
239
- /** An action button on a message was clicked. `action` is the built-in name or custom id. */
393
+ /** The staged attachments changed (file added or removed). Carries the full current list so a consumer can react in real time. */
394
+ onAttachmentsChange?: (event: CustomEvent<{
395
+ attachments: {
396
+ id: string;
397
+ type: "file" | "source-document";
398
+ filename?: undefined | string;
399
+ mediaType?: undefined | string;
400
+ url?: undefined | string;
401
+ title?: undefined | string;
402
+ }[];
403
+ }>) => void;
404
+ /** 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. */
240
405
  onMessageAction?: (event: CustomEvent<{
241
406
  messageId: string;
242
407
  action: string;
408
+ state?: undefined | "on" | "off";
243
409
  }>) => void;
244
410
  /** The header model switcher changed. */
245
411
  onModelChange?: (event: CustomEvent<{
@@ -247,15 +413,6 @@ export interface ChatProps extends WebComponentProps {
247
413
  }>) => void;
248
414
  /** The Search button was clicked. */
249
415
  onSearch?: (event: CustomEvent<Record<string, never>>) => void;
250
- /** A slash command was chosen from the palette. */
251
- onSlashSelect?: (event: CustomEvent<{
252
- command: {
253
- id: string;
254
- label: string;
255
- description?: undefined | string;
256
- category?: undefined | string;
257
- };
258
- }>) => void;
259
416
  /** User submitted a message. */
260
417
  onSubmit?: (event: CustomEvent<{
261
418
  value: string;
@@ -286,9 +443,9 @@ export interface CheckpointProps extends WebComponentProps {
286
443
  /** Tooltip on hover. */
287
444
  tooltip?: string;
288
445
  /** Visual button style. */
289
- variant?: "ghost" | "default" | "outline";
446
+ variant?: "default" | "ghost" | "outline";
290
447
  /** Button size (use an `icon*` size for an icon-only checkpoint). */
291
- size?: "sm" | "lg" | "md" | "icon" | "icon-sm";
448
+ size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
292
449
  /** The checkpoint was clicked. */
293
450
  onSelect?: (event: CustomEvent) => void;
294
451
  }
@@ -302,8 +459,41 @@ export interface ChoiceProps extends WebComponentProps {
302
459
  heading?: string;
303
460
  /** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'action', action:'…' }`. */
304
461
  resolution?: Record<string, unknown>;
462
+ /** Controlled selection — the selected option id. When set, the consumer owns the current pick (RadioGroup `value`). Attribute: `value`. */
463
+ value?: string;
464
+ /** Option id to pre-select on mount (uncontrolled seed). Attribute: `default-value`. */
465
+ defaultValue?: string;
466
+ /** Disable the whole radiogroup + Submit (e.g. while the agent is busy). Attribute: `disabled`. */
467
+ disabled?: boolean;
468
+ /** The selection changed BEFORE submit (a row click or the `select()` method). Distinct from the terminal `action` verb on the `kai-card` contract event. */
469
+ onValueChange?: (event: CustomEvent<{
470
+ value: string;
471
+ }>) => void;
305
472
  }
306
473
  export declare const Choice: import('react').ForwardRefExoticComponent<ChoiceProps & import('react').RefAttributes<HTMLElement>>;
474
+ export interface CoachmarkProps extends WebComponentProps {
475
+ /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute; the element still self-manages). Set `el.open = true`, or `<kai-coachmark open>`; listen for `kai-open-change`. */
476
+ open?: boolean;
477
+ /** Initial open state on mount (uncontrolled seed). */
478
+ defaultOpen?: boolean;
479
+ /** The bold title. Named `headline` because `title` collides with the global `HTMLElement.title` attribute (it throws at registration). */
480
+ headline?: string;
481
+ /** A small badge pill beside the headline (e.g. "New"). */
482
+ badge?: string;
483
+ /** Floating placement relative to the anchor (default `bottom`). */
484
+ placement?: string;
485
+ /** Color tone: `primary` (default, theme accent), `info` (blue), `success` (green), `warning` (amber), or `error` (red) — reusing the kit's tool hues. */
486
+ tone?: "error" | "primary" | "info" | "success" | "warning";
487
+ /** Render the arrow that points at the anchor (default `true`). Set `arrow="false"` for a plain bubble with no pointer. */
488
+ arrow?: boolean;
489
+ /** The × dismiss button was pressed. The consumer records that this hint was seen so it won't show again. */
490
+ onDismiss?: (event: CustomEvent<Record<string, never>>) => void;
491
+ /** The coachmark opened or closed (a method, the ×, or a driven `open`). */
492
+ onOpenChange?: (event: CustomEvent<{
493
+ open: boolean;
494
+ }>) => void;
495
+ }
496
+ export declare const Coachmark: import('react').ForwardRefExoticComponent<CoachmarkProps & import('react').RefAttributes<HTMLElement>>;
307
497
  export interface CodeBlockProps extends WebComponentProps {
308
498
  /** The source code to render. */
309
499
  code: string;
@@ -314,9 +504,210 @@ export interface CodeBlockProps extends WebComponentProps {
314
504
  /** Disable syntax highlighting (renders plain text, no Shiki). */
315
505
  codeHighlight?: boolean;
316
506
  /** Code text sizing. */
317
- proseSize?: "xs" | "sm" | "base" | "lg";
507
+ proseSize?: "sm" | "lg" | "xs" | "base";
318
508
  }
319
509
  export declare const CodeBlock: import('react').ForwardRefExoticComponent<CodeBlockProps & import('react').RefAttributes<HTMLElement>>;
510
+ export interface CommandProps extends WebComponentProps {
511
+ /** Flat list of items. Set as a JS property — not an HTML attribute. */
512
+ items?: {
513
+ id: string;
514
+ label: string;
515
+ icon?: string;
516
+ description?: string;
517
+ shortcut?: string;
518
+ group?: string;
519
+ }[];
520
+ /** Placeholder text for the search input. */
521
+ placeholder?: string;
522
+ /** Label shown when no items match the current query. */
523
+ emptyLabel?: string;
524
+ /** 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. */
525
+ onActiveChange?: (event: CustomEvent<{
526
+ id: undefined | string;
527
+ }>) => void;
528
+ /** Fired on every keystroke in the search input. */
529
+ onQueryChange?: (event: CustomEvent<{
530
+ value: string;
531
+ }>) => void;
532
+ /** Fired when the user selects an item (click or Enter). */
533
+ onSelect?: (event: CustomEvent<{
534
+ id: string;
535
+ }>) => void;
536
+ }
537
+ export declare const Command: import('react').ForwardRefExoticComponent<CommandProps & import('react').RefAttributes<HTMLElement>>;
538
+ export interface CompareProps extends WebComponentProps {
539
+ /** The compare definition (prompt + the two candidates). Set as a JS PROPERTY: `el.data = { prompt, candidates: [A, B], collapse? }`. Import `ResponseCompareData` from `@kitn.ai/ui` for the full shape. */
540
+ data?: Record<string, unknown>;
541
+ /** Stable id correlating every emitted event. Attribute: `compare-id`. */
542
+ compareId?: string;
543
+ /** Re-hydrate / control the user's pick. Set as a JS PROPERTY: `el.selection = { chosenId, rejectedIds }`. Renders the collapsed winner. */
544
+ selection?: Record<string, unknown>;
545
+ /** Layout: `'auto'` (default — columns when wide, tabs when narrow, by CONTAINER width) | `'columns'` (side-by-side) | `'tabs'` (pills to switch). Attribute: `layout`. */
546
+ layout?: "auto" | "columns" | "tabs";
547
+ /** Prose/text size for the rendered candidates. Attribute: `prose-size`. */
548
+ proseSize?: "sm" | "lg" | "xs" | "base";
549
+ /** Shiki theme for code blocks in the candidates. Attribute: `code-theme`. */
550
+ codeTheme?: string;
551
+ /** Whether code blocks are syntax-highlighted. Attribute: `code-highlight`. */
552
+ codeHighlight?: boolean;
553
+ /** The user committed a pick. `detail` = `{ chosenId, rejectedIds, at }`. */
554
+ onCompareSelect?: (event: CustomEvent<{
555
+ chosenId: string;
556
+ rejectedIds: string[];
557
+ at?: undefined | number;
558
+ }>) => void;
559
+ /** The definition was unusable. */
560
+ onError?: (event: CustomEvent<{
561
+ compareId: string;
562
+ message: string;
563
+ }>) => void;
564
+ /** Both candidates have settled and the pick is live. */
565
+ onReady?: (event: CustomEvent<{
566
+ compareId: string;
567
+ }>) => void;
568
+ }
569
+ export declare const Compare: import('react').ForwardRefExoticComponent<CompareProps & import('react').RefAttributes<HTMLElement>>;
570
+ export interface ComposerProps extends WebComponentProps {
571
+ /** Controlled value — string or a full ComposerDoc (set as JS property). */
572
+ value?: string | ({
573
+ type: "text";
574
+ text: string;
575
+ } | {
576
+ type: "entity";
577
+ entity: {
578
+ kind: string;
579
+ id: string;
580
+ label: string;
581
+ icon?: string;
582
+ promptText?: string;
583
+ data?: Record<string, unknown>;
584
+ };
585
+ })[];
586
+ /** Placeholder text shown when the composer is empty. */
587
+ placeholder?: string;
588
+ /** Disable the composer entirely (non-interactive). */
589
+ disabled?: boolean;
590
+ /** Show a loading/streaming state and block submit. */
591
+ loading?: boolean;
592
+ /** Maximum height in px before the content scrolls. Default 240. */
593
+ maxHeight?: string | number;
594
+ /** Whether pressing Enter (without Shift) submits. Default true. */
595
+ submitOnEnter?: boolean;
596
+ /** Trigger definitions — set as a JS property. */
597
+ triggers?: {
598
+ char: string;
599
+ kind: string;
600
+ items?: {
601
+ id: string;
602
+ label: string;
603
+ icon?: string;
604
+ description?: string;
605
+ group?: string;
606
+ kind?: string;
607
+ promptText?: string;
608
+ data?: Record<string, unknown>;
609
+ }[];
610
+ }[];
611
+ /** Keyword highlight rules — set as a JS property. */
612
+ highlights?: (string | {
613
+ pattern: string;
614
+ flags?: string;
615
+ class?: string;
616
+ })[];
617
+ /** Default icon per entity kind (kind → image URL/data-URI) for items without their own `icon`. Overrides the built-in agent/plugin glyphs. JS property. */
618
+ kindIcons?: Record<string, string>;
619
+ /** The composer lost focus. */
620
+ onBlur?: (event: CustomEvent<{
621
+ originalEvent: FocusEvent;
622
+ }>) => void;
623
+ /** An entity pill was inserted into the composer. */
624
+ onEntityAdd?: (event: CustomEvent<{
625
+ entity: {
626
+ kind: string;
627
+ id: string;
628
+ label: string;
629
+ icon?: undefined | string;
630
+ promptText?: undefined | string;
631
+ data?: undefined | Record<string, unknown>;
632
+ };
633
+ }>) => void;
634
+ /** An entity pill was deleted from the composer. */
635
+ onEntityRemove?: (event: CustomEvent<{
636
+ entity: {
637
+ kind: string;
638
+ id: string;
639
+ label: string;
640
+ icon?: undefined | string;
641
+ promptText?: undefined | string;
642
+ data?: undefined | Record<string, unknown>;
643
+ };
644
+ }>) => void;
645
+ /** 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.) */
646
+ onFocus?: (event: CustomEvent<{
647
+ originalEvent: FocusEvent;
648
+ }>) => void;
649
+ /** The user submitted the composer (Enter or programmatic submit). */
650
+ onSubmit?: (event: CustomEvent<{
651
+ doc: ({
652
+ type: "text";
653
+ text: string;
654
+ } | {
655
+ type: "entity";
656
+ entity: {
657
+ kind: string;
658
+ id: string;
659
+ label: string;
660
+ icon?: undefined | string;
661
+ promptText?: undefined | string;
662
+ data?: undefined | Record<string, unknown>;
663
+ };
664
+ })[];
665
+ text: string;
666
+ entities: {
667
+ kind: string;
668
+ id: string;
669
+ label: string;
670
+ icon?: undefined | string;
671
+ promptText?: undefined | string;
672
+ data?: undefined | Record<string, unknown>;
673
+ }[];
674
+ }>) => void;
675
+ /** A trigger character was detected at the caret (e.g. `/` or `@`). */
676
+ onTrigger?: (event: CustomEvent<{
677
+ char: string;
678
+ query: string;
679
+ rect: DOMRect;
680
+ }>) => void;
681
+ /** The active trigger was dismissed (Escape, space, or outside click). */
682
+ onTriggerClose?: (event: CustomEvent<Record<string, never>>) => void;
683
+ /** The content changed (fires on every input event). */
684
+ onValueChange?: (event: CustomEvent<{
685
+ doc: ({
686
+ type: "text";
687
+ text: string;
688
+ } | {
689
+ type: "entity";
690
+ entity: {
691
+ kind: string;
692
+ id: string;
693
+ label: string;
694
+ icon?: undefined | string;
695
+ promptText?: undefined | string;
696
+ data?: undefined | Record<string, unknown>;
697
+ };
698
+ })[];
699
+ text: string;
700
+ entities: {
701
+ kind: string;
702
+ id: string;
703
+ label: string;
704
+ icon?: undefined | string;
705
+ promptText?: undefined | string;
706
+ data?: undefined | Record<string, unknown>;
707
+ }[];
708
+ }>) => void;
709
+ }
710
+ export declare const Composer: import('react').ForwardRefExoticComponent<ComposerProps & import('react').RefAttributes<HTMLElement>>;
320
711
  export interface ConfirmProps extends WebComponentProps {
321
712
  /** 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. */
322
713
  data?: Record<string, unknown>;
@@ -382,19 +773,60 @@ export interface ConversationsProps extends WebComponentProps {
382
773
  messageCount: number;
383
774
  lastMessageAt: string;
384
775
  updatedAt: string;
776
+ trailing?: undefined | string;
385
777
  }[];
386
778
  /** The id of the currently-open conversation, highlighted in the list. */
387
779
  activeId?: string;
780
+ /** Controlled collapsed state. Set as a JS property (`el.collapsed = true`) to drive the rail from your app, updating it in response to `kai-collapse-toggle`. Omit for uncontrolled (the element manages it). Collapsed shrinks the rail to a floating reopen button. */
781
+ collapsed?: boolean;
782
+ /** Initial collapsed state when uncontrolled (default false). Use the `default-collapsed` attribute to start collapsed in plain HTML. */
783
+ defaultCollapsed?: boolean;
784
+ /** The rail was collapsed or expanded (via the toggle, the reopen button, or a `collapse()`/`expand()`/`toggle()` call). */
785
+ onCollapseToggle?: (event: CustomEvent<{
786
+ collapsed: boolean;
787
+ }>) => void;
388
788
  /** A conversation was selected. */
389
789
  onConversationSelect?: (event: CustomEvent<{
390
790
  id: string;
391
791
  }>) => void;
392
792
  /** The "New chat" button was clicked. */
393
793
  onNewChat?: (event: CustomEvent<Record<string, never>>) => void;
794
+ /** The built-in search box query changed (typing, or a programmatic `clear()` which fires it with `''`). Lets a consumer mirror or server-side the filter. */
795
+ onSearch?: (event: CustomEvent<{
796
+ query: string;
797
+ }>) => void;
394
798
  /** The sidebar toggle was clicked. */
395
799
  onToggleSidebar?: (event: CustomEvent<Record<string, never>>) => void;
396
800
  }
397
801
  export declare const Conversations: import('react').ForwardRefExoticComponent<ConversationsProps & import('react').RefAttributes<HTMLElement>>;
802
+ export interface DialogProps extends WebComponentProps {
803
+ /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute; the element still self-manages on Escape/backdrop). Set `el.open = true`, or `<kai-dialog open>`; listen for `kai-open-change`. */
804
+ open?: boolean;
805
+ /** Initial open state on mount (uncontrolled seed). */
806
+ defaultOpen?: boolean;
807
+ /** The dialog opened or closed (Escape, backdrop click, a driven `open`, or a method). */
808
+ onOpenChange?: (event: CustomEvent<{
809
+ open: boolean;
810
+ }>) => void;
811
+ }
812
+ export declare const Dialog: import('react').ForwardRefExoticComponent<DialogProps & import('react').RefAttributes<HTMLElement>>;
813
+ export interface EditableLabelProps extends WebComponentProps {
814
+ /** The label text — settable and reflected to the `value` attribute. Read `el.value` for live state. */
815
+ value?: string;
816
+ /** Controlled edit state. `el.editing = true` opens the field; reflected to the `editing` attribute. */
817
+ editing?: boolean;
818
+ /** Placeholder shown while editing / when the value is empty. */
819
+ placeholder?: string;
820
+ /** Disable entering edit mode. */
821
+ disabled?: boolean;
822
+ /** Edit was cancelled (Esc); the text is restored. */
823
+ onCancel?: (event: CustomEvent<Record<string, never>>) => void;
824
+ /** Committed a changed value (Enter / blur). */
825
+ onRename?: (event: CustomEvent<{
826
+ value: string;
827
+ }>) => void;
828
+ }
829
+ export declare const EditableLabel: import('react').ForwardRefExoticComponent<EditableLabelProps & import('react').RefAttributes<HTMLElement>>;
398
830
  export interface EmbedProps extends WebComponentProps {
399
831
  /** Stable card id correlating every emitted event. Set as an attribute or property. */
400
832
  cardId?: string;
@@ -447,18 +879,23 @@ export interface FeedbackBarProps extends WebComponentProps {
447
879
  }
448
880
  export declare const FeedbackBar: import('react').ForwardRefExoticComponent<FeedbackBarProps & import('react').RefAttributes<HTMLElement>>;
449
881
  export interface FileTreeProps extends WebComponentProps {
450
- /** The files to render. Set as a JS property (array of `{ path, url?, code?, language?, type? }`). */
882
+ /** The files to render. Set as a JS property (array of `{ path, url?, code?, language?, type?, additions?, deletions?, status? }`). */
451
883
  files: {
452
884
  path: string;
453
885
  url?: undefined | string;
454
886
  code?: undefined | string;
455
887
  language?: undefined | string;
456
888
  type?: undefined | "html" | "pdf" | "image" | "other";
889
+ additions?: undefined | number;
890
+ deletions?: undefined | number;
891
+ status?: undefined | "added" | "modified" | "deleted" | "renamed" | "untracked";
457
892
  }[];
458
893
  /** Selected file path — highlighted in the tree. */
459
894
  activeFile?: string;
460
895
  /** Folder paths expanded initially. Omit to start with all folders open. */
461
896
  defaultExpanded?: string[];
897
+ /** Show a changed-files summary header (file count + summed `+/-` + Collapse-all). Attribute: `summary`. Off by default. */
898
+ summary?: boolean;
462
899
  /** Fired when a file is selected. `detail.path` = the file's path. */
463
900
  onSelect?: (event: CustomEvent<{
464
901
  path: string;
@@ -489,8 +926,45 @@ export interface FormProps extends WebComponentProps {
489
926
  heading?: string;
490
927
  /** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'submit', data:{…} }`. */
491
928
  resolution?: Record<string, unknown>;
929
+ /** Controlled field values (JS property). When set, it wins over local edits. */
930
+ values?: Record<string, unknown>;
931
+ /** Initial values overlaying the schema defaults (uncontrolled seed; JS property). */
932
+ defaultValues?: Record<string, unknown>;
933
+ /** Disable all fields + submit. Attribute: `disabled`. */
934
+ disabled?: boolean;
935
+ /** The form's values changed on input — current coerced values + validity. */
936
+ onValuesChange?: (event: CustomEvent<{
937
+ values: Record<string, unknown>;
938
+ valid: boolean;
939
+ }>) => void;
492
940
  }
493
941
  export declare const Form: import('react').ForwardRefExoticComponent<FormProps & import('react').RefAttributes<HTMLElement>>;
942
+ export interface HoverCardProps extends WebComponentProps {
943
+ /** Delay (ms) before the card opens on hover. Defaults to 0 (focus opens it immediately too). */
944
+ openDelay?: number;
945
+ /** Delay (ms) before it closes after the pointer leaves. Defaults to 300. */
946
+ closeDelay?: number;
947
+ /** Preferred placement: `'top' | 'bottom' | 'left' | 'right'` (+ optional `-start`/`-end`). Defaults to `'bottom'`; flips to stay in view. */
948
+ placement?: string;
949
+ /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute, the element still self-manages on hover). Set `el.open = true`, or `<kai-hover-card open>`; listen for `kai-open-change`. */
950
+ open?: boolean;
951
+ /** Initial open state on mount (uncontrolled seed). */
952
+ defaultOpen?: boolean;
953
+ /** Suppress the hover behavior entirely without unmounting. */
954
+ disabled?: boolean;
955
+ /** The card opened or closed (by hover/focus, outside-click, or a method). */
956
+ onOpenChange?: (event: CustomEvent<{
957
+ open: boolean;
958
+ }>) => void;
959
+ }
960
+ export declare const HoverCard: import('react').ForwardRefExoticComponent<HoverCardProps & import('react').RefAttributes<HTMLElement>>;
961
+ export interface IconProps extends WebComponentProps {
962
+ /** A curated icon name (e.g. `"mic"`, `"globe"`), an image URL/data-URI, or plain text. */
963
+ name?: string;
964
+ /** Size token: `sm` | `md` (default) | `lg`. */
965
+ size?: "sm" | "md" | "lg";
966
+ }
967
+ export declare const Icon: import('react').ForwardRefExoticComponent<IconProps & import('react').RefAttributes<HTMLElement>>;
494
968
  export interface ImageProps extends WebComponentProps {
495
969
  /** Base64-encoded image data (pair with `media-type`). */
496
970
  base64?: string;
@@ -502,6 +976,54 @@ export interface ImageProps extends WebComponentProps {
502
976
  mediaType?: string;
503
977
  }
504
978
  export declare const Image: import('react').ForwardRefExoticComponent<ImageProps & import('react').RefAttributes<HTMLElement>>;
979
+ export interface InputProps extends WebComponentProps {
980
+ /** Native input type: `text` (default) · `email` · `url` · `search` · `tel` · `password` · `number`. Single-line only. */
981
+ type?: string;
982
+ /** 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. */
983
+ value?: string;
984
+ /** Placeholder shown when empty. */
985
+ placeholder?: string;
986
+ /** Field label, linked to the input. */
987
+ label?: string;
988
+ /** Helper text below the control. */
989
+ hint?: string;
990
+ /** Error text; flips the field invalid (`aria-invalid` + destructive border). */
991
+ error?: string;
992
+ /** Control density: `sm` or `md`. Defaults to `md`. */
993
+ size?: "sm" | "md";
994
+ /** Disable interaction. */
995
+ disabled?: boolean;
996
+ /** Make the input read-only. */
997
+ readonly?: boolean;
998
+ /** Mark the input required. */
999
+ required?: boolean;
1000
+ /** Force the invalid state without an `error` string. */
1001
+ invalid?: boolean;
1002
+ /** Form-control name. */
1003
+ name?: string;
1004
+ /** Autofill hint forwarded to the inner input (e.g. `email`, `current-password`). */
1005
+ autocomplete?: string;
1006
+ /** Virtual-keyboard hint forwarded to the inner input (e.g. `numeric`, `email`). */
1007
+ inputmode?: string;
1008
+ /** The value was committed (blur). */
1009
+ onChange?: (event: CustomEvent<{
1010
+ value: string;
1011
+ }>) => void;
1012
+ /** The value changed per keystroke. */
1013
+ onInput?: (event: CustomEvent<{
1014
+ value: string;
1015
+ }>) => void;
1016
+ }
1017
+ export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLElement>>;
1018
+ export interface KbdProps extends WebComponentProps {
1019
+ /** 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. */
1020
+ keys?: string;
1021
+ /** `mac` uses ⌘/⌥, `other` uses Ctrl. `auto` (default) sniffs the OS. */
1022
+ platform?: "other" | "auto" | "mac";
1023
+ /** Cap size: `sm` or `md`. Defaults to `md`. */
1024
+ size?: "sm" | "md";
1025
+ }
1026
+ export declare const Kbd: import('react').ForwardRefExoticComponent<KbdProps & import('react').RefAttributes<HTMLElement>>;
505
1027
  export interface LinkPreviewProps extends WebComponentProps {
506
1028
  /** Stable card id correlating every emitted event. Set as an attribute or property. */
507
1029
  cardId?: string;
@@ -522,7 +1044,7 @@ export interface LoaderProps extends WebComponentProps {
522
1044
  /** The animation style: `'circular' | 'classic' | 'pulse' | 'pulse-dot' | 'dots' | 'typing' | 'wave' | 'bars' | 'terminal' | 'text-blink' | 'text-shimmer' | 'loading-dots'`. Defaults to `'circular'`. */
523
1045
  variant?: "circular" | "classic" | "pulse" | "pulse-dot" | "dots" | "typing" | "wave" | "bars" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
524
1046
  /** Loader size: `'sm' | 'md' | 'lg'`. Defaults to `'md'`. */
525
- size?: "sm" | "lg" | "md";
1047
+ size?: "sm" | "md" | "lg";
526
1048
  /** Label for the text-based variants. */
527
1049
  text?: string;
528
1050
  }
@@ -531,13 +1053,55 @@ export interface MarkdownProps extends WebComponentProps {
531
1053
  /** The markdown source to render. */
532
1054
  content: string;
533
1055
  /** Text/markdown sizing. */
534
- proseSize?: "xs" | "sm" | "base" | "lg";
1056
+ proseSize?: "sm" | "lg" | "xs" | "base";
535
1057
  /** Shiki theme for fenced code blocks. */
536
1058
  codeTheme?: string;
537
1059
  /** Disable syntax highlighting (no Shiki loads). */
538
1060
  codeHighlight?: boolean;
539
1061
  }
540
1062
  export declare const Markdown: import('react').ForwardRefExoticComponent<MarkdownProps & import('react').RefAttributes<HTMLElement>>;
1063
+ export interface MenuProps extends WebComponentProps {
1064
+ /** Tree of menu items. Set as a JS property — not an HTML attribute. */
1065
+ items?: {
1066
+ id?: string;
1067
+ label?: string;
1068
+ icon?: string;
1069
+ shortcut?: string;
1070
+ checked?: boolean;
1071
+ radioGroup?: string;
1072
+ disabled?: boolean;
1073
+ separator?: boolean;
1074
+ heading?: boolean;
1075
+ items?: Record<string, unknown>[];
1076
+ }[];
1077
+ /** Optional placement hint (unused by the underlying Dropdown which always positions bottom-start, kept for future extension). */
1078
+ placement?: string;
1079
+ /** 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. */
1080
+ triggerIcon?: string;
1081
+ /** Built-in trigger: a text label (e.g. `"High"`). */
1082
+ triggerLabel?: string;
1083
+ /** Built-in trigger: a trailing icon (e.g. `"chevron-down"` for a select look). */
1084
+ triggerIconTrailing?: string;
1085
+ /** Accessible name for an icon-only trigger (no visible label). */
1086
+ label?: string;
1087
+ /** 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`. */
1088
+ open?: boolean;
1089
+ /** Initial open state on mount (uncontrolled seed). */
1090
+ defaultOpen?: boolean;
1091
+ /** Disable the trigger — click/keyboard and `show()` no longer open the menu. */
1092
+ disabled?: boolean;
1093
+ /** The menu opened or closed (by click, keyboard, Escape, outside-click, or a method). */
1094
+ onOpenChange?: (event: CustomEvent<{
1095
+ open: boolean;
1096
+ }>) => void;
1097
+ /** 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. */
1098
+ onSelect?: (event: CustomEvent<{
1099
+ id: string;
1100
+ checked?: undefined | boolean;
1101
+ radioGroup?: undefined | string;
1102
+ }>) => void;
1103
+ }
1104
+ export declare const Menu: import('react').ForwardRefExoticComponent<MenuProps & import('react').RefAttributes<HTMLElement>>;
541
1105
  export interface MessageProps extends WebComponentProps {
542
1106
  /** The full message object. Set as a JS property. */
543
1107
  message?: {
@@ -575,6 +1139,7 @@ export interface MessageProps extends WebComponentProps {
575
1139
  fallback?: string;
576
1140
  alt?: string;
577
1141
  };
1142
+ feedback?: "like" | "dislike";
578
1143
  };
579
1144
  /** Convenience for simple cases when not passing a `message` object. */
580
1145
  role?: "user" | "assistant";
@@ -583,7 +1148,7 @@ export interface MessageProps extends WebComponentProps {
583
1148
  /** Force markdown on/off. Defaults to on for assistant, off for user. */
584
1149
  markdown?: boolean;
585
1150
  /** Text/markdown sizing for the message body. */
586
- proseSize?: "xs" | "sm" | "base" | "lg";
1151
+ proseSize?: "sm" | "lg" | "xs" | "base";
587
1152
  /** Shiki theme name used for fenced code blocks in the content. */
588
1153
  codeTheme?: string;
589
1154
  /** Disable syntax highlighting for code blocks (no Shiki loads). */
@@ -594,10 +1159,13 @@ export interface MessageProps extends WebComponentProps {
594
1159
  avatarSrc?: string;
595
1160
  /** Convenience avatar fallback text (used when `message.avatar` is not set). */
596
1161
  avatarFallback?: string;
597
- /** An action button was clicked. `action` is the built-in name or custom id. */
1162
+ /** 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). */
1163
+ avatar?: string;
1164
+ /** 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. */
598
1165
  onMessageAction?: (event: CustomEvent<{
599
1166
  messageId: string;
600
1167
  action: string;
1168
+ state?: undefined | "on" | "off";
601
1169
  }>) => void;
602
1170
  }
603
1171
  export declare const Message: import('react').ForwardRefExoticComponent<MessageProps & import('react').RefAttributes<HTMLElement>>;
@@ -612,28 +1180,192 @@ export interface ModelSwitcherProps extends WebComponentProps {
612
1180
  }[];
613
1181
  /** The currently-selected model id. Defaults to the first model. */
614
1182
  currentModel?: string;
1183
+ /** 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-model-switcher open>`; listen for `kai-open-change`. */
1184
+ open?: boolean;
1185
+ /** Initial open state on mount (uncontrolled seed). */
1186
+ defaultOpen?: boolean;
1187
+ /** Disable the trigger — click/keyboard and `show()` no longer open the dropdown. */
1188
+ disabled?: boolean;
615
1189
  /** A model was selected. */
616
1190
  onModelChange?: (event: CustomEvent<{
617
1191
  modelId: string;
618
1192
  }>) => void;
1193
+ /** The model dropdown opened or closed (by click, keyboard, Escape, outside-click, or a method). */
1194
+ onOpenChange?: (event: CustomEvent<{
1195
+ open: boolean;
1196
+ }>) => void;
619
1197
  }
620
1198
  export declare const ModelSwitcher: import('react').ForwardRefExoticComponent<ModelSwitcherProps & import('react').RefAttributes<HTMLElement>>;
1199
+ export interface NavProps extends WebComponentProps {
1200
+ /** The nav items. Set as a JS property (array, not an attribute). Each item may carry `children` (a collapsible group), a `status` dot, and trailing `meta` text. */
1201
+ items?: {
1202
+ id: string;
1203
+ label?: string;
1204
+ icon?: string;
1205
+ badge?: string;
1206
+ trailing?: string;
1207
+ disabled?: boolean;
1208
+ children?: Record<string, unknown>[];
1209
+ status?: {
1210
+ tone: "error" | "primary" | "info" | "success" | "warning" | "neutral";
1211
+ label?: string;
1212
+ pulse?: boolean;
1213
+ };
1214
+ meta?: string;
1215
+ action?: {
1216
+ icon: string;
1217
+ label: string;
1218
+ };
1219
+ closable?: boolean;
1220
+ }[];
1221
+ /** Active item id (controlled). */
1222
+ value?: string;
1223
+ /** Initial active id when uncontrolled. */
1224
+ defaultValue?: string;
1225
+ /** Ids of group items collapsed on first render (groups default to expanded). Set as a JS property (array). */
1226
+ defaultCollapsed?: string[];
1227
+ /** A row's trailing `action` button was activated (not a select). `value` is the item id; `action` echoes the item's `{ icon, label }`. */
1228
+ onNavItemAction?: (event: CustomEvent<{
1229
+ value: string;
1230
+ action?: undefined | {
1231
+ icon: string;
1232
+ label: string;
1233
+ };
1234
+ }>) => void;
1235
+ /** A `closable` row's trailing close button was activated (not a select). `value` is the item id. */
1236
+ onNavItemClose?: (event: CustomEvent<{
1237
+ value: string;
1238
+ }>) => void;
1239
+ /** A nav item was activated. */
1240
+ onNavSelect?: (event: CustomEvent<{
1241
+ id: string;
1242
+ }>) => void;
1243
+ }
1244
+ export declare const Nav: import('react').ForwardRefExoticComponent<NavProps & import('react').RefAttributes<HTMLElement>>;
1245
+ export interface NoticeProps extends WebComponentProps {
1246
+ /** `neutral` (default) · `info` · `warning` · `error` · `success`. Drives the leading icon's color and the a11y role (`alert` for errors, else `status`). */
1247
+ severity?: "error" | "info" | "success" | "warning" | "neutral";
1248
+ /** Leading icon: omit for the severity default, `"none"` to hide it, or a named icon to override. */
1249
+ icon?: string;
1250
+ /** Show a dismiss (×) that hides the notice and emits `kai-dismiss`. */
1251
+ dismissible?: boolean;
1252
+ /** The notice was dismissed via its × (it also hides itself). */
1253
+ onDismiss?: (event: CustomEvent) => void;
1254
+ }
1255
+ export declare const Notice: import('react').ForwardRefExoticComponent<NoticeProps & import('react').RefAttributes<HTMLElement>>;
1256
+ export interface PaneProps extends WebComponentProps {
1257
+ /** The pane title (the agent / window name). Named `headline` because `title` collides with the global `HTMLElement.title` attribute (it throws at registration). Attribute: `headline`. */
1258
+ headline?: string;
1259
+ /** A role / label shown under the title (e.g. "Reviewer", "claude-sonnet"). Attribute: `subtitle`. */
1260
+ subtitle?: string;
1261
+ /** Show the restore glyph instead of maximize, and signal the maximized view-state. Drive it yourself in response to `kai-maximize`. Attribute: `maximized`. */
1262
+ maximized?: boolean;
1263
+ /** Highlight the frame with a ring/border to mark the ACTIVE pane. Attribute: `focused`. */
1264
+ focused?: boolean;
1265
+ /** Show a split-pane window control that fires `kai-split`. Off by default. Attribute: `show-split`. */
1266
+ showSplit?: boolean;
1267
+ /** Show a dock-to-side window control that fires `kai-dock`. Off by default. Attribute: `show-dock`. */
1268
+ showDock?: boolean;
1269
+ /** A tone-colored status dot (+ optional label) in the header. An object `{ tone, label?, pulse? }` set as a JS PROPERTY (not an attribute). */
1270
+ status?: {
1271
+ tone: "working" | "idle" | "done" | "error" | "blocked";
1272
+ label?: string;
1273
+ pulse?: boolean;
1274
+ };
1275
+ /** The close (×) control was clicked. */
1276
+ onClose?: (event: CustomEvent) => void;
1277
+ /** The dock control was clicked (only present when `show-dock`). */
1278
+ onDock?: (event: CustomEvent) => void;
1279
+ /** The maximize/restore control was clicked. `detail.maximized` is the intended NEXT state — drive the `maximized` prop yourself from it. */
1280
+ onMaximize?: (event: CustomEvent<{
1281
+ maximized: boolean;
1282
+ }>) => void;
1283
+ /** The split control was clicked (only present when `show-split`). */
1284
+ onSplit?: (event: CustomEvent) => void;
1285
+ }
1286
+ export declare const Pane: import('react').ForwardRefExoticComponent<PaneProps & import('react').RefAttributes<HTMLElement>>;
1287
+ export interface PaneGroupProps extends WebComponentProps {
1288
+ /** The tabs to render. An array of `{ id, name, status?, needsAttention?, number? }` set as a JS PROPERTY (not an HTML attribute). */
1289
+ tabs?: {
1290
+ id: string;
1291
+ name: string;
1292
+ status?: {
1293
+ tone: "working" | "idle" | "done" | "error" | "blocked";
1294
+ label?: string;
1295
+ pulse?: boolean;
1296
+ };
1297
+ needsAttention?: boolean;
1298
+ number?: number;
1299
+ }[];
1300
+ /** The active tab id (controlled, and reflected to the `active` ATTRIBUTE so `::part`/`[active]` selectors and the per-tab named slot follow it). Set it as the `active` attribute or drive it from `kai-tab-change`; omit for uncontrolled (the first tab). */
1301
+ active?: string;
1302
+ /** Highlight the frame as the ACTIVE group in a multi-group layout. Attribute: `focused`. */
1303
+ focused?: boolean;
1304
+ /** A tab was selected (click, Enter/Space, or arrow-key move). `detail.id` is the tab's id. */
1305
+ onTabChange?: (event: CustomEvent<{
1306
+ id: string;
1307
+ }>) => void;
1308
+ /** A tab's close (×) was clicked. Drop the tab from `tabs` yourself. */
1309
+ onTabClose?: (event: CustomEvent<{
1310
+ id: string;
1311
+ }>) => void;
1312
+ /** A tab's "…" overflow was clicked. Open your own menu from `detail.id`. */
1313
+ onTabMenu?: (event: CustomEvent<{
1314
+ id: string;
1315
+ }>) => void;
1316
+ }
1317
+ export declare const PaneGroup: import('react').ForwardRefExoticComponent<PaneGroupProps & import('react').RefAttributes<HTMLElement>>;
621
1318
  export interface PopoverProps extends WebComponentProps {
622
1319
  /** Floating placement relative to the trigger (floating-ui placement). */
623
1320
  placement?: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
624
1321
  /** Gap in px between the trigger and the panel. */
625
1322
  gutter?: number;
626
- /** Controlled open state. Set as a JS property (`el.open = true`) to drive the popover from your app; omit for the default click-to-toggle behaviour. */
1323
+ /** 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`. */
627
1324
  open?: boolean;
628
- /** The popover wants to open or close (click, Escape, or outside-click). */
1325
+ /** Initial open state on mount (uncontrolled seed). */
1326
+ defaultOpen?: boolean;
1327
+ /** Turn the popover off while keeping the trigger mounted (clicks and `show()` no longer open it). */
1328
+ disabled?: boolean;
1329
+ /** The popover opened or closed (click, Escape, outside-click, or a method). */
629
1330
  onOpenChange?: (event: CustomEvent<{
630
1331
  open: boolean;
631
1332
  }>) => void;
632
1333
  }
633
1334
  export declare const Popover: import('react').ForwardRefExoticComponent<PopoverProps & import('react').RefAttributes<HTMLElement>>;
1335
+ export interface ProgressBarProps extends WebComponentProps {
1336
+ /** Current progress value (0..max). Attribute: `value`. */
1337
+ value?: number;
1338
+ /** The value `value` runs to (default 100). Attribute: `max`. */
1339
+ max?: number;
1340
+ /** Optional caption above the track. Attribute: `label`. */
1341
+ label?: string;
1342
+ /** Fill color: `primary` (default), `success`, `warning`, `error`, `info`. Attribute: `tone`. */
1343
+ tone?: string;
1344
+ }
1345
+ export declare const ProgressBar: import('react').ForwardRefExoticComponent<ProgressBarProps & import('react').RefAttributes<HTMLElement>>;
1346
+ export interface PromptDockProps extends WebComponentProps {
1347
+ /** 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`. */
1348
+ frame?: "none" | "inset" | "edge";
1349
+ /** 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`. */
1350
+ appearance?: "outlined" | "filled" | "plain" | "soft";
1351
+ }
1352
+ export declare const PromptDock: import('react').ForwardRefExoticComponent<PromptDockProps & import('react').RefAttributes<HTMLElement>>;
634
1353
  export interface PromptInputProps extends WebComponentProps {
635
- /** Controlled value of the input. When set, the host owns the text and must update it on `kai-value-change`; leave unset for uncontrolled behavior. */
636
- value?: string;
1354
+ /** Value of the input, as a JS property. A **string** is the controlled text mirror (the host owns it and updates on `kai-value-change`). A **ComposerDoc** (array of text/entity segments) is a one-time **seed** that pre-populates pills (skills/agents/plugins); the user then edits freely. Leave unset for uncontrolled behavior. `kai-submit`/`kai-value-change` always emit `value` as the flattened string (back-compat) plus the structured `doc` + `entities`. */
1355
+ value?: string | ({
1356
+ type: "text";
1357
+ text: string;
1358
+ } | {
1359
+ type: "entity";
1360
+ entity: {
1361
+ kind: string;
1362
+ id: string;
1363
+ label: string;
1364
+ icon?: string;
1365
+ promptText?: string;
1366
+ data?: Record<string, unknown>;
1367
+ };
1368
+ })[];
637
1369
  /** Placeholder text shown in the empty input. */
638
1370
  placeholder?: string;
639
1371
  /** Disable the input and submit button entirely (non-interactive). */
@@ -644,23 +1376,16 @@ export interface PromptInputProps extends WebComponentProps {
644
1376
  suggestions?: string[];
645
1377
  /** What clicking a suggestion does: `'submit'` (default) sends it immediately as if typed and submitted; `'fill'` just places it in the input. */
646
1378
  suggestionMode?: "submit" | "fill";
647
- /** Slash commands — when set, typing `/` opens the command palette. Set as a JS property. */
648
- slashCommands?: {
649
- id: string;
650
- label: string;
651
- description?: string;
652
- category?: string;
653
- }[];
654
- /** Command ids to highlight as active. */
655
- slashActiveIds?: string[];
656
- /** Single-line palette rows. */
657
- slashCompact?: boolean;
658
1379
  /** Show a Search (Globe) button in the left toolbar; clicking it fires a `search` event. */
659
1380
  search?: boolean;
660
1381
  /** Show a Voice (Mic) button in the left toolbar; clicking it fires a `voice` event. */
661
1382
  voice?: boolean;
662
1383
  /** 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`. */
663
1384
  stoppable?: boolean;
1385
+ /** 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. */
1386
+ submit?: "always" | "auto";
1387
+ /** 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`. */
1388
+ attach?: boolean;
664
1389
  /** Attachments to seed the input with (so a consumer can pre-populate staged files without an upload). Set as a JS property; the element then manages its own attachment state from there (add via the paperclip, remove per chip). */
665
1390
  attachments?: {
666
1391
  id: string;
@@ -670,22 +1395,63 @@ export interface PromptInputProps extends WebComponentProps {
670
1395
  url?: string;
671
1396
  title?: string;
672
1397
  }[];
673
- /** The Search (Globe) toolbar button was clicked. */
674
- onSearch?: (event: CustomEvent<Record<string, never>>) => void;
675
- /** A slash command was chosen from the palette. */
676
- onSlashSelect?: (event: CustomEvent<{
677
- command: {
1398
+ /** 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. */
1399
+ triggers?: {
1400
+ char: string;
1401
+ kind: string;
1402
+ items?: {
678
1403
  id: string;
679
1404
  label: string;
680
- description?: undefined | string;
681
- category?: undefined | string;
682
- };
1405
+ icon?: string;
1406
+ description?: string;
1407
+ group?: string;
1408
+ kind?: string;
1409
+ promptText?: string;
1410
+ data?: Record<string, unknown>;
1411
+ }[];
1412
+ }[];
1413
+ /** 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. */
1414
+ kindIcons?: Record<string, string>;
1415
+ /** 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). */
1416
+ onAttachmentsChange?: (event: CustomEvent<{
1417
+ attachments: {
1418
+ id: string;
1419
+ type: "file" | "source-document";
1420
+ filename?: undefined | string;
1421
+ mediaType?: undefined | string;
1422
+ url?: undefined | string;
1423
+ title?: undefined | string;
1424
+ }[];
683
1425
  }>) => void;
1426
+ /** The Search (Globe) toolbar button was clicked. */
1427
+ onSearch?: (event: CustomEvent<Record<string, never>>) => void;
684
1428
  /** The Stop button was clicked while `stoppable` and `loading` are both true. */
685
1429
  onStop?: (event: CustomEvent<Record<string, never>>) => void;
686
- /** The user submitted the prompt (Enter or send button) with its attachments. */
1430
+ /** The user submitted the prompt (Enter or send button). `value` is the flattened text (back-compat); `doc` is the structured document and `entities` the inserted pills (skills/agents) for downstream expansion. */
687
1431
  onSubmit?: (event: CustomEvent<{
688
1432
  value: string;
1433
+ doc: ({
1434
+ type: "text";
1435
+ text: string;
1436
+ } | {
1437
+ type: "entity";
1438
+ entity: {
1439
+ kind: string;
1440
+ id: string;
1441
+ label: string;
1442
+ icon?: undefined | string;
1443
+ promptText?: undefined | string;
1444
+ data?: undefined | Record<string, unknown>;
1445
+ };
1446
+ })[];
1447
+ entities: {
1448
+ kind: string;
1449
+ id: string;
1450
+ label: string;
1451
+ icon?: undefined | string;
1452
+ promptText?: undefined | string;
1453
+ data?: undefined | Record<string, unknown>;
1454
+ }[];
689
1455
  attachments: {
690
1456
  id: string;
691
1457
  type: "file" | "source-document";
@@ -703,9 +1469,31 @@ export interface PromptInputProps extends WebComponentProps {
703
1469
  onToolbarAction?: (event: CustomEvent<{
704
1470
  action: string;
705
1471
  }>) => void;
706
- /** The input text changed (fires on every keystroke). */
1472
+ /** The input changed (fires on every edit). Carries the flattened `value` plus the structured `doc` + `entities`. */
707
1473
  onValueChange?: (event: CustomEvent<{
708
1474
  value: string;
1475
+ doc: ({
1476
+ type: "text";
1477
+ text: string;
1478
+ } | {
1479
+ type: "entity";
1480
+ entity: {
1481
+ kind: string;
1482
+ id: string;
1483
+ label: string;
1484
+ icon?: undefined | string;
1485
+ promptText?: undefined | string;
1486
+ data?: undefined | Record<string, unknown>;
1487
+ };
1488
+ })[];
1489
+ entities: {
1490
+ kind: string;
1491
+ id: string;
1492
+ label: string;
1493
+ icon?: undefined | string;
1494
+ promptText?: undefined | string;
1495
+ data?: undefined | Record<string, unknown>;
1496
+ }[];
709
1497
  }>) => void;
710
1498
  /** The Voice (Mic) toolbar button was clicked. */
711
1499
  onVoice?: (event: CustomEvent<Record<string, never>>) => void;
@@ -716,13 +1504,17 @@ export interface ReasoningProps extends WebComponentProps {
716
1504
  text: string;
717
1505
  /** Trigger label. */
718
1506
  label?: string;
719
- /** Controlled open state set as a property (`el.open = true`). Omit for uncontrolled (the trigger toggles it). */
1507
+ /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute; the element still self-manages on trigger click + while streaming). Set `el.open = true`; listen for `kai-open-change`. */
720
1508
  open?: boolean;
1509
+ /** Initial open state on mount (uncontrolled seed). */
1510
+ defaultOpen?: boolean;
721
1511
  /** While true, auto-expands (and re-collapses when it flips false). */
722
1512
  streaming?: boolean;
723
1513
  /** Render `text` as markdown. */
724
1514
  markdown?: boolean;
725
- /** Open state changed (via the trigger or streaming auto-open). */
1515
+ /** Gate the disclosure trigger — programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
1516
+ disabled?: boolean;
1517
+ /** The reasoning block expanded or collapsed (via the trigger, streaming auto-open, or a method). */
726
1518
  onOpenChange?: (event: CustomEvent<{
727
1519
  open: boolean;
728
1520
  }>) => void;
@@ -741,7 +1533,7 @@ export interface RemoteProps extends WebComponentProps {
741
1533
  export declare const Remote: import('react').ForwardRefExoticComponent<RemoteProps & import('react').RefAttributes<HTMLElement>>;
742
1534
  export interface ResizableProps extends WebComponentProps {
743
1535
  /** Layout axis: `horizontal` (row, default) or `vertical` (column). */
744
- orientation?: "horizontal" | "vertical";
1536
+ orientation?: "vertical" | "horizontal";
745
1537
  /** Which item index is maximized (null = none). Declarative source of truth. */
746
1538
  maximizedIndex?: null | number;
747
1539
  /** Fired on drag-end / keyboard resize / visibility change. `detail.sizes` = panel sizes in percent. */
@@ -766,6 +1558,8 @@ export interface ResizableItemProps extends WebComponentProps {
766
1558
  locked?: boolean;
767
1559
  /** Hide this panel; its divider is dropped and the rest reflow. */
768
1560
  hidden?: boolean;
1561
+ /** 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. */
1562
+ collapsed?: boolean;
769
1563
  onChange?: (event: CustomEvent<unknown>) => void;
770
1564
  onMaximizeChange?: (event: CustomEvent<unknown>) => void;
771
1565
  }
@@ -790,6 +1584,16 @@ export interface ScopePickerProps extends WebComponentProps {
790
1584
  availableTags: string[];
791
1585
  /** The label shown on the trigger for the active scope. */
792
1586
  currentLabel?: string;
1587
+ /** 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`. */
1588
+ open?: boolean;
1589
+ /** Initial open state on mount (uncontrolled seed). */
1590
+ defaultOpen?: boolean;
1591
+ /** Disable the trigger — click/keyboard and `show()` no longer open the dropdown. */
1592
+ disabled?: boolean;
1593
+ /** The scope dropdown opened or closed (by click, keyboard, Escape, outside-click, or a method). */
1594
+ onOpenChange?: (event: CustomEvent<{
1595
+ open: boolean;
1596
+ }>) => void;
793
1597
  /** A scope was chosen (`undefined` filters = "All Content"). */
794
1598
  onScopeChange?: (event: CustomEvent<{
795
1599
  filters: undefined | {
@@ -804,17 +1608,115 @@ export interface ScopePickerProps extends WebComponentProps {
804
1608
  }>) => void;
805
1609
  }
806
1610
  export declare const ScopePicker: import('react').ForwardRefExoticComponent<ScopePickerProps & import('react').RefAttributes<HTMLElement>>;
1611
+ export interface ScreenProps extends WebComponentProps {
1612
+ /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute; the element still self-manages). Set `el.open = true`, or `<kai-screen open>`; listen for `kai-open-change`. */
1613
+ open?: boolean;
1614
+ /** Initial open state on mount (uncontrolled seed). */
1615
+ defaultOpen?: boolean;
1616
+ /** Header title text. A projected `title` slot overrides it. (Named `headline` because `title` collides with the global `HTMLElement.title` attribute.) */
1617
+ headline?: string;
1618
+ /** Show the back button (default true). */
1619
+ back?: boolean;
1620
+ /** Opt out of marking sibling elements inert/aria-hidden while open (for unusual layouts). */
1621
+ noInert?: boolean;
1622
+ /** Back navigation intent: the back button or Escape. The consumer flips their own routing in response (the screen knows nothing about the trigger). */
1623
+ onBack?: (event: CustomEvent<Record<string, never>>) => void;
1624
+ /** The screen opened or closed (a method, `Escape` close, or driven `open`). */
1625
+ onOpenChange?: (event: CustomEvent<{
1626
+ open: boolean;
1627
+ }>) => void;
1628
+ }
1629
+ export declare const Screen: import('react').ForwardRefExoticComponent<ScreenProps & import('react').RefAttributes<HTMLElement>>;
1630
+ export interface ScrollAreaProps extends WebComponentProps {
1631
+ /** Which axis scrolls. `vertical` (default) · `horizontal` · `both`. The cross axis is clamped so content can't overflow it. */
1632
+ orientation?: "vertical" | "horizontal" | "both";
1633
+ }
1634
+ export declare const ScrollArea: import('react').ForwardRefExoticComponent<ScrollAreaProps & import('react').RefAttributes<HTMLElement>>;
807
1635
  export interface ScrollButtonProps extends WebComponentProps {
808
1636
  /** 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="...">`. */
809
1637
  for?: string;
810
1638
  /** Button visual variant: `'outline' | 'ghost' | 'default'`. Defaults to `'outline'`. */
811
- variant?: "ghost" | "default" | "outline";
1639
+ variant?: "default" | "ghost" | "outline";
812
1640
  /** Button size token. Defaults to `'icon'` (square). */
813
- size?: "sm" | "lg" | "md" | "icon" | "icon-sm";
1641
+ size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
814
1642
  /** Emitted when the user clicks the button and `scrollToBottom()` is called. Carries no detail — consumers use it to know a manual scroll occurred. */
815
1643
  onScroll?: (event: CustomEvent) => void;
816
1644
  }
817
1645
  export declare const ScrollButton: import('react').ForwardRefExoticComponent<ScrollButtonProps & import('react').RefAttributes<HTMLElement>>;
1646
+ export interface SearchProps extends WebComponentProps {
1647
+ /** Controlled query — settable and reflected to the `value` attribute. Read `el.value` for live state. */
1648
+ value?: string;
1649
+ /** Placeholder. Defaults to `Search…`. */
1650
+ placeholder?: string;
1651
+ /** Leading icon-NAME string (a curated name, URL, or text), resolved to a glyph the same way `kai-button`'s `icon` is. Defaults to `search`. */
1652
+ icon?: string;
1653
+ /** Debounce window for `kai-search`, in ms. Defaults to `200`. */
1654
+ debounce?: number;
1655
+ /** Show a spinner in place of the leading icon while results load. */
1656
+ loading?: boolean;
1657
+ /** Optional shortcut hint shown (as a `kai-kbd`) while the field is empty, e.g. `Mod+K`. Display only; it does not bind the key. */
1658
+ shortcut?: string;
1659
+ /** The field committed (blur). */
1660
+ onChange?: (event: CustomEvent<{
1661
+ value: string;
1662
+ }>) => void;
1663
+ /** The query changed (debounced live, and on clear). */
1664
+ onSearch?: (event: CustomEvent<{
1665
+ value: string;
1666
+ }>) => void;
1667
+ /** Enter was pressed. */
1668
+ onSubmit?: (event: CustomEvent<{
1669
+ value: string;
1670
+ }>) => void;
1671
+ }
1672
+ export declare const Search: import('react').ForwardRefExoticComponent<SearchProps & import('react').RefAttributes<HTMLElement>>;
1673
+ export interface SegmentedProps extends WebComponentProps {
1674
+ /** The selectable segments, left to right. Set as a JS property (array). */
1675
+ options: {
1676
+ value: string;
1677
+ label: string;
1678
+ icon?: undefined | string;
1679
+ }[];
1680
+ /** 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. */
1681
+ value?: string;
1682
+ /** Control density: `sm` or `md`. Defaults to `md`. */
1683
+ size?: "sm" | "md";
1684
+ /** A segment was chosen. */
1685
+ onChange?: (event: CustomEvent<{
1686
+ value: string;
1687
+ }>) => void;
1688
+ }
1689
+ export declare const Segmented: import('react').ForwardRefExoticComponent<SegmentedProps & import('react').RefAttributes<HTMLElement>>;
1690
+ export interface SeparatorProps extends WebComponentProps {
1691
+ /** `horizontal` (default, block + full-width) or `vertical` (a rule inside a flex/grid row — it stretches to the row height). */
1692
+ orientation?: "vertical" | "horizontal";
1693
+ }
1694
+ export declare const Separator: import('react').ForwardRefExoticComponent<SeparatorProps & import('react').RefAttributes<HTMLElement>>;
1695
+ export interface SettingItemProps extends WebComponentProps {
1696
+ /** Row label (primary text). Attribute: `label`. */
1697
+ label?: string;
1698
+ /** Optional secondary description under the label. Attribute: `description`. */
1699
+ description?: string;
1700
+ }
1701
+ export declare const SettingItem: import('react').ForwardRefExoticComponent<SettingItemProps & import('react').RefAttributes<HTMLElement>>;
1702
+ export interface SettingsGroupProps extends WebComponentProps {
1703
+ /** Small section heading shown above the card. Attribute: `heading`. */
1704
+ heading?: string;
1705
+ /** Optional muted description under the heading. Attribute: `description`. */
1706
+ description?: string;
1707
+ }
1708
+ export declare const SettingsGroup: import('react').ForwardRefExoticComponent<SettingsGroupProps & import('react').RefAttributes<HTMLElement>>;
1709
+ export interface SkeletonProps extends WebComponentProps {
1710
+ /** `text` (one or more lines), `rect` (a block), or `circle` (round). Defaults to `text`. */
1711
+ variant?: "text" | "rect" | "circle";
1712
+ /** CSS width (e.g. `'12rem'`, `'60%'`). Defaults to full width (responsive); for `circle` it is the diameter. */
1713
+ width?: string;
1714
+ /** CSS height. Defaults per variant (a text line height; circle = width). */
1715
+ height?: string;
1716
+ /** `text` only: number of lines; the last is shorter. Defaults to 1. */
1717
+ lines?: number;
1718
+ }
1719
+ export declare const Skeleton: import('react').ForwardRefExoticComponent<SkeletonProps & import('react').RefAttributes<HTMLElement>>;
818
1720
  export interface SkillsProps extends WebComponentProps {
819
1721
  /** The active skills to badge. Set as a JS property. */
820
1722
  skills: {
@@ -851,16 +1753,30 @@ export interface SourcesProps extends WebComponentProps {
851
1753
  numbered?: boolean;
852
1754
  }
853
1755
  export declare const Sources: import('react').ForwardRefExoticComponent<SourcesProps & import('react').RefAttributes<HTMLElement>>;
1756
+ export interface StatusProps extends WebComponentProps {
1757
+ /** Presence/notification state → color. `new` (default) maps to the blue hue. */
1758
+ status?: "new" | "online" | "busy" | "away" | "offline";
1759
+ /** Animated ping ring (off by default; respects prefers-reduced-motion). */
1760
+ pulse?: boolean;
1761
+ /** Accessible name. Without it the dot is decorative. */
1762
+ label?: string;
1763
+ /** `sm` (default) or `md`. */
1764
+ size?: "sm" | "md";
1765
+ }
1766
+ export declare const Status: import('react').ForwardRefExoticComponent<StatusProps & import('react').RefAttributes<HTMLElement>>;
854
1767
  export interface SuggestionsProps extends WebComponentProps {
855
1768
  /** The suggestions. Strings, or `{ label, value }` when the displayed text and the emitted value differ. Set as a JS property. */
856
1769
  suggestions: (string | {
857
1770
  label: string;
858
1771
  value?: undefined | string;
1772
+ icon?: undefined | string;
859
1773
  })[];
860
1774
  /** Chip style: `'outline'` (default), `'ghost'`, or `'default'` (filled). */
861
- variant?: "ghost" | "default" | "outline";
862
- /** Size preset for each chip. Defaults to the pill default (`'lg'`); pass `'sm'` for smaller pills (or `'md'`). */
863
- size?: "sm" | "lg" | "md" | "icon" | "icon-sm";
1775
+ variant?: "default" | "ghost" | "outline";
1776
+ /** Row height for `layout="list"`: `'md'` (default) or `'lg'` for taller rows. Chips are unaffected. */
1777
+ size?: "md" | "lg";
1778
+ /** 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. */
1779
+ layout?: "list" | "chips";
864
1780
  /** Full-width left-aligned rows instead of pills. */
865
1781
  block?: boolean;
866
1782
  /** Substring to highlight within each suggestion. */
@@ -872,18 +1788,48 @@ export interface SuggestionsProps extends WebComponentProps {
872
1788
  }
873
1789
  export declare const Suggestions: import('react').ForwardRefExoticComponent<SuggestionsProps & import('react').RefAttributes<HTMLElement>>;
874
1790
  export interface SwitchProps extends WebComponentProps {
875
- /** Initial checked state. Bare attribute (`<kai-switch checked>`) turns it on. */
1791
+ /** 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. */
876
1792
  checked?: boolean;
1793
+ /** Initial checked state on mount (uncontrolled seed). Bare attribute (`<kai-switch default-checked>`) turns it on. */
1794
+ defaultChecked?: boolean;
877
1795
  /** Disable interaction. */
878
1796
  disabled?: boolean;
879
1797
  /** Accessible label. */
880
1798
  label?: string;
1799
+ /** Form-control name (paired with `value`). */
1800
+ name?: string;
1801
+ /** Submitted value when checked (paired with `name`). Defaults to `'on'`. */
1802
+ value?: string;
881
1803
  /** The toggle changed. */
882
1804
  onChange?: (event: CustomEvent<{
883
1805
  checked: boolean;
884
1806
  }>) => void;
885
1807
  }
886
1808
  export declare const Switch: import('react').ForwardRefExoticComponent<SwitchProps & import('react').RefAttributes<HTMLElement>>;
1809
+ export interface TabsProps extends WebComponentProps {
1810
+ /** Tabs to render. Set as a JS property, not an HTML attribute. */
1811
+ items?: {
1812
+ id: string;
1813
+ label?: string;
1814
+ icon?: string;
1815
+ disabled?: boolean;
1816
+ }[];
1817
+ /** Controlled selected id. Set as a JS property (or the `value` attribute); drive it from your app in response to `kai-tab-change`. Omit for uncontrolled. */
1818
+ value?: string;
1819
+ /** Initial selected id when uncontrolled (use the `default-value` attribute in plain HTML). */
1820
+ defaultValue?: string;
1821
+ /** `segmented` (default, a pill group) or `underline` (an underlined row). */
1822
+ variant?: "segmented" | "underline";
1823
+ /** Stretch the strip to full width, each tab sharing the space equally. */
1824
+ block?: boolean;
1825
+ /** Disable the whole strip. */
1826
+ disabled?: boolean;
1827
+ /** A tab was selected (click, Enter/Space, or arrow-key move). `value` is the item's id. */
1828
+ onTabChange?: (event: CustomEvent<{
1829
+ value: string;
1830
+ }>) => void;
1831
+ }
1832
+ export declare const Tabs: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLElement>>;
887
1833
  export interface TasksProps extends WebComponentProps {
888
1834
  /** 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. */
889
1835
  data?: Record<string, unknown>;
@@ -893,6 +1839,18 @@ export interface TasksProps extends WebComponentProps {
893
1839
  heading?: string;
894
1840
  /** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'submit', data:{ selected:[…] } }`. */
895
1841
  resolution?: Record<string, unknown>;
1842
+ /** Controlled selection (task ids; JS property). When set, it wins over local state. */
1843
+ value?: string[];
1844
+ /** Uncontrolled initial selection (task ids; JS property), overlaying per-task `checked`. */
1845
+ defaultValue?: string[];
1846
+ /** Freeze the whole list + Confirm. Attribute: `disabled`. */
1847
+ disabled?: boolean;
1848
+ /** 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`. */
1849
+ readonly?: boolean;
1850
+ /** The selection changed on a toggle — the selected ids in input order. */
1851
+ onValueChange?: (event: CustomEvent<{
1852
+ value: string[];
1853
+ }>) => void;
896
1854
  }
897
1855
  export declare const Tasks: import('react').ForwardRefExoticComponent<TasksProps & import('react').RefAttributes<HTMLElement>>;
898
1856
  export interface TextShimmerProps extends WebComponentProps {
@@ -917,6 +1875,47 @@ export interface ThinkingBarProps extends WebComponentProps {
917
1875
  onStop?: (event: CustomEvent) => void;
918
1876
  }
919
1877
  export declare const ThinkingBar: import('react').ForwardRefExoticComponent<ThinkingBarProps & import('react').RefAttributes<HTMLElement>>;
1878
+ export interface ToastRegionProps extends WebComponentProps {
1879
+ /** The toasts to render. Newest is shown on top. Set as a JS property (array); pass a new array reference to update. */
1880
+ toasts: {
1881
+ id: string;
1882
+ message: string;
1883
+ variant?: undefined | "error" | "info" | "success" | "warning" | "neutral";
1884
+ appearance?: undefined | "pill" | "card";
1885
+ inverse?: undefined | boolean;
1886
+ description?: undefined | string;
1887
+ action?: undefined | {
1888
+ label: string;
1889
+ onAction: () => void | false;
1890
+ };
1891
+ duration?: undefined | number;
1892
+ dismissible?: undefined | boolean;
1893
+ target?: undefined | HTMLElement;
1894
+ }[];
1895
+ /** Stack anchor: `'top-center'` (default), `'top-right'`, `'bottom-center'`, … */
1896
+ position?: "top-center" | "top-right" | "top-left" | "bottom-center" | "bottom-right" | "bottom-left";
1897
+ /** Max simultaneously-visible toasts; the rest queue. Defaults to `3`. */
1898
+ max?: number;
1899
+ /** Stacking: 'expanded' (default, full column) | 'collapsed' (Sonner-style pile that expands on hover/focus). Attribute: stack. */
1900
+ stack?: "expanded" | "collapsed";
1901
+ /** Default appearance for this region's toasts: `'pill'` (default, compact) | `'card'` (richer, with a description line). A per-toast `appearance` wins. Attribute: `appearance`. */
1902
+ appearance?: "pill" | "card";
1903
+ /** Default high-contrast inverse treatment for this region's toasts. A per-toast `inverse` wins. Off by default. Attribute: `inverse`. */
1904
+ inverse?: boolean;
1905
+ /** Container element to anchor this region to (JS property). Set by the store for a scoped region; unset = the global viewport region. */
1906
+ target?: HTMLElement;
1907
+ /** A toast's action button was pressed. */
1908
+ onAction?: (event: CustomEvent<{
1909
+ id: string;
1910
+ label: string;
1911
+ }>) => void;
1912
+ /** A toast left the stack. `reason` is `'timeout' | 'close' | 'action'`. */
1913
+ onDismiss?: (event: CustomEvent<{
1914
+ id: string;
1915
+ reason: "action" | "timeout" | "close";
1916
+ }>) => void;
1917
+ }
1918
+ export declare const ToastRegion: import('react').ForwardRefExoticComponent<ToastRegionProps & import('react').RefAttributes<HTMLElement>>;
920
1919
  export interface ToolProps extends WebComponentProps {
921
1920
  /** The tool-call to display. Set as a JS property. */
922
1921
  tool?: {
@@ -927,25 +1926,85 @@ export interface ToolProps extends WebComponentProps {
927
1926
  toolCallId?: string;
928
1927
  errorText?: string;
929
1928
  };
930
- /** Start expanded. */
1929
+ /** 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`. */
931
1930
  open?: boolean;
1931
+ /** Initial open state on mount (uncontrolled seed). */
1932
+ defaultOpen?: boolean;
1933
+ /** Gate the disclosure trigger — programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
1934
+ disabled?: boolean;
1935
+ /** The panel expanded or collapsed (by trigger click or a method). */
1936
+ onOpenChange?: (event: CustomEvent<{
1937
+ open: boolean;
1938
+ }>) => void;
932
1939
  }
933
1940
  export declare const Tool: import('react').ForwardRefExoticComponent<ToolProps & import('react').RefAttributes<HTMLElement>>;
1941
+ export interface TooltipProps extends WebComponentProps {
1942
+ /** The hint text shown on hover/focus of the slotted trigger. */
1943
+ content?: string;
1944
+ /** Delay (ms) before the tooltip appears on hover. Defaults to 600. Focus shows it immediately regardless. */
1945
+ openDelay?: number;
1946
+ /** Delay (ms) before it hides after the pointer leaves. Defaults to 0 (hides immediately). */
1947
+ closeDelay?: number;
1948
+ /** Preferred placement: `'top' | 'bottom' | 'left' | 'right'` (+ optional `-start`/`-end`). Defaults to `'top'`; flips to stay in view. */
1949
+ placement?: string;
1950
+ /** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute, the element still self-manages on hover/focus). Set `el.open = true`, or `<kai-tooltip open>`; listen for `kai-open-change`. */
1951
+ open?: boolean;
1952
+ /** Initial open state on mount (uncontrolled seed). */
1953
+ defaultOpen?: boolean;
1954
+ /** Turn the tooltip off while keeping the trigger mounted (hover/focus and `show()` no longer open it). */
1955
+ disabled?: boolean;
1956
+ /** The tooltip opened or closed (by hover/focus, outside-click, or a method). */
1957
+ onOpenChange?: (event: CustomEvent<{
1958
+ open: boolean;
1959
+ }>) => void;
1960
+ }
1961
+ export declare const Tooltip: import('react').ForwardRefExoticComponent<TooltipProps & import('react').RefAttributes<HTMLElement>>;
934
1962
  export interface VoiceInputProps extends WebComponentProps {
935
1963
  /** 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. */
936
1964
  transcribe?: (audio: Blob) => Promise<string>;
937
1965
  /** Disable the mic button (non-interactive). */
938
1966
  disabled?: boolean;
939
- /** Raw audio captured (before transcription) for hosts that prefer to handle transcription themselves instead of via the `transcribe` property. */
1967
+ /** BCP-47 language tag for the native `SpeechRecognition` path (e.g. `en-US`). Attribute: `recognition-lang` (the plain `lang` attribute is reserved by `HTMLElement` and can't be a custom-element property). No effect when `transcribe` is set or the browser lacks SpeechRecognition. */
1968
+ recognitionLang?: string;
1969
+ /** Emit live partial transcripts (`kai-transcript-interim`) during native recognition. Attribute: `interim`. No-op on the transcribe/fallback paths. */
1970
+ interim?: boolean;
1971
+ /** 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). */
940
1972
  onAudioCaptured?: (event: CustomEvent<{
941
1973
  blob: Blob;
942
1974
  }>) => void;
943
- /** Transcription completed (the `transcribe` property resolved). */
1975
+ /** 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. */
1976
+ onRecordingChange?: (event: CustomEvent<{
1977
+ recording: boolean;
1978
+ }>) => void;
1979
+ /** Live partial transcript during native recognition (only when `interim` is set). Fires repeatedly before the final `kai-transcription`. */
1980
+ onTranscriptInterim?: (event: CustomEvent<{
1981
+ text: string;
1982
+ }>) => void;
1983
+ /** Final transcript — the `transcribe` property resolved, OR native `SpeechRecognition` produced final text (no `transcribe` set). */
944
1984
  onTranscription?: (event: CustomEvent<{
945
1985
  text: string;
946
1986
  }>) => void;
947
1987
  }
948
1988
  export declare const VoiceInput: import('react').ForwardRefExoticComponent<VoiceInputProps & import('react').RefAttributes<HTMLElement>>;
1989
+ export interface VoiceOutputProps extends WebComponentProps {
1990
+ /** The utterance to read aloud. */
1991
+ text?: string;
1992
+ /** Speak automatically when `text` is set/changed. */
1993
+ autoplay?: boolean;
1994
+ /** 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. */
1995
+ synthesize?: (text: string) => Promise<Blob>;
1996
+ /** Disable the button (non-interactive). */
1997
+ disabled?: boolean;
1998
+ /** Playback started or stopped — drive your own UI in sync. Fires on real transitions only (manual click and programmatic speak()/stop()), never on mount. */
1999
+ onSpeakingChange?: (event: CustomEvent<{
2000
+ speaking: boolean;
2001
+ }>) => void;
2002
+ /** The model path (`synthesize`) resolved audio — the raw `Blob` before playback. */
2003
+ onSynthesized?: (event: CustomEvent<{
2004
+ blob: Blob;
2005
+ }>) => void;
2006
+ }
2007
+ export declare const VoiceOutput: import('react').ForwardRefExoticComponent<VoiceOutputProps & import('react').RefAttributes<HTMLElement>>;
949
2008
  export interface WorkspaceProps extends WebComponentProps {
950
2009
  /** Pre-bucketed conversation groups for the sidebar. Set as a JS property. */
951
2010
  groups: {
@@ -977,6 +2036,7 @@ export interface WorkspaceProps extends WebComponentProps {
977
2036
  messageCount: number;
978
2037
  lastMessageAt: string;
979
2038
  updatedAt: string;
2039
+ trailing?: undefined | string;
980
2040
  }[];
981
2041
  /** Id of the open conversation, highlighted in the sidebar. */
982
2042
  activeId?: string;
@@ -1016,13 +2076,14 @@ export interface WorkspaceProps extends WebComponentProps {
1016
2076
  fallback?: undefined | string;
1017
2077
  alt?: undefined | string;
1018
2078
  };
2079
+ feedback?: undefined | "like" | "dislike";
1019
2080
  }[];
1020
2081
  value?: string;
1021
2082
  placeholder?: string;
1022
2083
  loading?: boolean;
1023
2084
  suggestions?: string[];
1024
2085
  suggestionMode?: "submit" | "fill";
1025
- proseSize?: "xs" | "sm" | "base" | "lg";
2086
+ proseSize?: "sm" | "lg" | "xs" | "base";
1026
2087
  codeTheme?: string;
1027
2088
  codeHighlight?: boolean;
1028
2089
  chatTitle?: string;
@@ -1044,17 +2105,26 @@ export interface WorkspaceProps extends WebComponentProps {
1044
2105
  scrollButton?: boolean;
1045
2106
  search?: boolean;
1046
2107
  voice?: boolean;
1047
- slashCommands?: {
1048
- id: string;
1049
- label: string;
1050
- description?: string;
1051
- category?: string;
2108
+ /** Rich entity triggers (`/` skills, `@` agents/plugins) forwarded to the input. */
2109
+ triggers?: {
2110
+ char: string;
2111
+ kind: string;
2112
+ items?: {
2113
+ id: string;
2114
+ label: string;
2115
+ icon?: string;
2116
+ description?: string;
2117
+ group?: string;
2118
+ kind?: string;
2119
+ promptText?: string;
2120
+ data?: Record<string, unknown>;
2121
+ }[];
1052
2122
  }[];
1053
- slashActiveIds?: string[];
1054
- slashCompact?: boolean;
1055
- /** Sidebar default width as a percent of the workspace (default 22). */
2123
+ /** Default icon per entity kind (kind → image src) forwarded to the input. */
2124
+ kindIcons?: Record<string, string>;
2125
+ /** Sidebar default width as a percent of the workspace (default 26). */
1056
2126
  sidebarWidth?: number;
1057
- /** Sidebar min width in px (default 200). */
2127
+ /** Sidebar min width in px (default 240). */
1058
2128
  sidebarMinWidth?: number;
1059
2129
  /** Sidebar max width in px (default 420). */
1060
2130
  sidebarMaxWidth?: number;
@@ -1062,14 +2132,21 @@ export interface WorkspaceProps extends WebComponentProps {
1062
2132
  sidebarCollapsed?: boolean;
1063
2133
  /** Initial collapsed state when uncontrolled (default false). Use the `default-sidebar-collapsed` attribute to start collapsed in plain HTML. */
1064
2134
  defaultSidebarCollapsed?: boolean;
2135
+ /** Auto-collapse the rail when the workspace's own width drops below this many px, and re-expand when it grows back above. Uncontrolled only (it never fights an app-driven `sidebarCollapsed`); omit to disable. Fires `kai-sidebar-toggle`. Attribute: `collapse-below`. */
2136
+ collapseBelow?: number;
2137
+ /** Render Recents as dense single-line rows (a leading dot + title, no count). */
2138
+ compact?: boolean;
2139
+ /** 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`. */
2140
+ noConversations?: boolean;
1065
2141
  /** A conversation was selected in the sidebar. */
1066
2142
  onConversationSelect?: (event: CustomEvent<{
1067
2143
  id: string;
1068
2144
  }>) => void;
1069
- /** An action button on a message was clicked. */
2145
+ /** An action button on a message was clicked. `state` is present only for the toggleable feedback votes: `'on'` when a like/dislike is set, `'off'` when re-tapped to clear. */
1070
2146
  onMessageAction?: (event: CustomEvent<{
1071
2147
  messageId: string;
1072
2148
  action: string;
2149
+ state?: undefined | "on" | "off";
1073
2150
  }>) => void;
1074
2151
  /** The header model switcher changed. */
1075
2152
  onModelChange?: (event: CustomEvent<{
@@ -1083,15 +2160,6 @@ export interface WorkspaceProps extends WebComponentProps {
1083
2160
  onSidebarToggle?: (event: CustomEvent<{
1084
2161
  collapsed: boolean;
1085
2162
  }>) => void;
1086
- /** A slash command was chosen from the palette. */
1087
- onSlashSelect?: (event: CustomEvent<{
1088
- command: {
1089
- id: string;
1090
- label: string;
1091
- description?: undefined | string;
1092
- category?: undefined | string;
1093
- };
1094
- }>) => void;
1095
2163
  /** User submitted a message. */
1096
2164
  onSubmit?: (event: CustomEvent<{
1097
2165
  value: string;