@kitn.ai/ui 0.17.0 → 0.18.1

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 (494) hide show
  1. package/README.md +28 -5
  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 +37 -12
  9. package/dist/components/choice-card.d.ts +26 -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/file-tree.d.ts +15 -0
  19. package/dist/components/form.d.ts +34 -0
  20. package/dist/components/markdown.d.ts +3 -0
  21. package/dist/components/message.d.ts +12 -0
  22. package/dist/components/model-switcher.d.ts +7 -0
  23. package/dist/components/prompt-input.d.ts +13 -4
  24. package/dist/components/prompt-suggestion.d.ts +9 -1
  25. package/dist/components/reasoning.d.ts +14 -1
  26. package/dist/components/response-compare.d.ts +14 -0
  27. package/dist/components/screen.d.ts +46 -0
  28. package/dist/components/tasks-card.d.ts +49 -1
  29. package/dist/components/toast.d.ts +12 -2
  30. package/dist/components/tool-types.d.ts +10 -0
  31. package/dist/components/tool.d.ts +8 -8
  32. package/dist/components/voice-input.d.ts +27 -0
  33. package/dist/components/voice-output.d.ts +33 -0
  34. package/dist/core-C8fzo39E.js +12 -0
  35. package/dist/custom-elements.json +8392 -1860
  36. package/dist/elements/agent-card.d.ts +1 -0
  37. package/dist/elements/agent-card.js +1 -0
  38. package/dist/elements/artifact.js +1 -1
  39. package/dist/elements/attachments.js +1 -1
  40. package/dist/elements/autoloader.js +1 -1
  41. package/dist/elements/avatar.d.ts +1 -0
  42. package/dist/elements/avatar.js +1 -0
  43. package/dist/elements/badge.d.ts +1 -0
  44. package/dist/elements/badge.js +1 -0
  45. package/dist/elements/button.d.ts +1 -0
  46. package/dist/elements/button.js +1 -0
  47. package/dist/elements/card.js +1 -1
  48. package/dist/elements/cards.js +1 -1
  49. package/dist/elements/chain-of-thought.js +1 -1
  50. package/dist/elements/chat-scope-picker.js +1 -1
  51. package/dist/elements/chat-types.d.ts +47 -0
  52. package/dist/elements/chat-workspace.js +1 -1
  53. package/dist/elements/chat.js +1 -1
  54. package/dist/elements/checkpoint.js +1 -1
  55. package/dist/elements/choice.js +1 -1
  56. package/dist/elements/chunks/Icon-C2LTALdM.js +1 -0
  57. package/dist/elements/chunks/action-icons-Dtl8Ox5D.js +1 -0
  58. package/dist/elements/chunks/arrow-left-GbBceGBE.js +1 -0
  59. package/dist/elements/chunks/attachments-DLJcWCDV.js +1 -0
  60. package/dist/elements/chunks/badge-BTNZTODL.js +1 -0
  61. package/dist/elements/chunks/button-DBDZebGr.js +1 -0
  62. package/dist/elements/chunks/card-YfCyI4fH.js +1 -0
  63. package/dist/elements/chunks/chat-thread-Dz2qbzvI.js +1 -0
  64. package/dist/elements/chunks/check-fhmRksq_.js +1 -0
  65. package/dist/elements/chunks/chevron-down-DcRg1aRU.js +1 -0
  66. package/dist/elements/chunks/chevron-right-ChzBcNJ-.js +1 -0
  67. package/dist/elements/chunks/circle-B4fTe9v6.js +1 -0
  68. package/dist/elements/chunks/circle-check-CJV-3Rem.js +1 -0
  69. package/dist/elements/chunks/circle-x-pDtzlghQ.js +1 -0
  70. package/dist/elements/chunks/cn-CU7UAWzk.js +1 -0
  71. package/dist/elements/chunks/code-block-DZ6mz6vs.js +1 -0
  72. package/dist/elements/chunks/collapsible-CWUAShMC.js +1 -0
  73. package/dist/elements/chunks/composer-BZyPU6gD.js +65 -0
  74. package/dist/elements/chunks/context-Cx6eQA_G.js +1 -0
  75. package/dist/elements/chunks/conversation-list-C4xTQSpT.js +1 -0
  76. package/dist/elements/chunks/default-input-BZcwyKcP.js +1 -0
  77. package/dist/elements/chunks/define-CNSKFZCd.js +1 -0
  78. package/dist/elements/chunks/disclosure-BcBs--Jf.js +1 -0
  79. package/dist/elements/chunks/download-BDQwcFav.js +1 -0
  80. package/dist/elements/chunks/dropdown-wgs8xCJZ.js +1 -0
  81. package/dist/elements/chunks/ellipsis-CUiEJ6R1.js +1 -0
  82. package/dist/elements/chunks/external-link-DJUmC7g2.js +1 -0
  83. package/dist/elements/chunks/file-text-DOYfYvrh.js +1 -0
  84. package/dist/elements/chunks/file-tree-DQzNQrbr.js +1 -0
  85. package/dist/elements/chunks/folder-DBDUBANz.js +1 -0
  86. package/dist/elements/chunks/hover-card-BQGdGAQ3.js +1 -0
  87. package/dist/elements/chunks/icon-CAyRqVrg.js +1 -0
  88. package/dist/elements/chunks/{index-CTBEJeo6.js → index-BCRhi84a.js} +1 -1
  89. package/dist/elements/chunks/info-DBQl-m6e.js +1 -0
  90. package/dist/elements/chunks/input-DZD67EvW.js +1 -0
  91. package/dist/elements/chunks/kbd-DbyVrlnU.js +1 -0
  92. package/dist/elements/chunks/link-vko7AttA.js +1 -0
  93. package/dist/elements/chunks/loader-Cg6rO8tQ.js +1 -0
  94. package/dist/elements/chunks/{markdown-CMTGx9r8.js → markdown-n3Xbj3PR.js} +9 -9
  95. package/dist/elements/chunks/message-CgKytiSB.js +1 -0
  96. package/dist/elements/chunks/message-feedback-Ds3-US0e.js +1 -0
  97. package/dist/elements/chunks/message-square-MmRkvc-M.js +1 -0
  98. package/dist/elements/chunks/minimize-2-3kCdE0q3.js +1 -0
  99. package/dist/elements/chunks/model-switcher-BMtXGwLU.js +1 -0
  100. package/dist/elements/chunks/overlay-B1-MBI6h.js +1 -0
  101. package/dist/elements/chunks/paperclip-DDEfmkHc.js +1 -0
  102. package/dist/elements/chunks/progress-bar-Dwbiyv3s.js +1 -0
  103. package/dist/elements/chunks/prompt-suggestion-9lvgFcEa.js +1 -0
  104. package/dist/elements/chunks/reasoning-DzHWsdAJ.js +1 -0
  105. package/dist/elements/chunks/resizable-Bq_eHxUm.js +1 -0
  106. package/dist/elements/chunks/rotate-cw-jpisOdOV.js +1 -0
  107. package/dist/elements/chunks/scroll-area-g5Ze3K6f.js +1 -0
  108. package/dist/elements/chunks/separator-Bmjc5XyX.js +1 -0
  109. package/dist/elements/chunks/settings-Cz1bMJP9.js +1 -0
  110. package/dist/elements/chunks/settings-group-9imY3kRA.js +1 -0
  111. package/dist/elements/chunks/share-BdenF0wQ.js +1 -0
  112. package/dist/elements/chunks/skeleton-Pjc5jiaY.js +1 -0
  113. package/dist/elements/chunks/slots-DkZ-Cmha.js +1 -0
  114. package/dist/elements/chunks/star-DY6z1UUH.js +1 -0
  115. package/dist/elements/chunks/store-th4VyJXM.js +1 -0
  116. package/dist/elements/chunks/text-shimmer-CEi-tlXr.js +1 -0
  117. package/dist/elements/chunks/textarea-CboigarR.js +1 -0
  118. package/dist/elements/chunks/thumbs-up-BR33KLfA.js +1 -0
  119. package/dist/elements/chunks/toast-store-BEMda0fv.js +1 -0
  120. package/dist/elements/chunks/tool-TMued3WO.js +1 -0
  121. package/dist/elements/chunks/tooltip-Cft_Rxiw.js +1 -0
  122. package/dist/elements/chunks/triangle-alert-B07fX3Q8.js +1 -0
  123. package/dist/elements/chunks/use-card-resolution-M36zVciB.js +1 -0
  124. package/dist/elements/chunks/video-MKp3LmNT.js +1 -0
  125. package/dist/elements/chunks/x-Ckwicf6g.js +1 -0
  126. package/dist/elements/coachmark.d.ts +1 -0
  127. package/dist/elements/coachmark.js +1 -0
  128. package/dist/elements/code-block.js +1 -1
  129. package/dist/elements/command.d.ts +1 -0
  130. package/dist/elements/command.js +1 -0
  131. package/dist/elements/compare.js +1 -1
  132. package/dist/elements/composer.d.ts +1 -0
  133. package/dist/elements/composer.js +1 -0
  134. package/dist/elements/confirm-card.js +1 -1
  135. package/dist/elements/context-meter.js +1 -1
  136. package/dist/elements/conversation-list.js +1 -1
  137. package/dist/elements/css.d.ts +1 -0
  138. package/dist/elements/default-input.d.ts +51 -0
  139. package/dist/elements/define.d.ts +53 -0
  140. package/dist/elements/dialog.d.ts +1 -0
  141. package/dist/elements/dialog.js +1 -0
  142. package/dist/elements/disclosure.d.ts +37 -0
  143. package/dist/elements/editable-label.d.ts +1 -0
  144. package/dist/elements/editable-label.js +1 -0
  145. package/dist/elements/embed.js +1 -1
  146. package/dist/elements/empty.js +1 -1
  147. package/dist/elements/feedback-bar.js +1 -1
  148. package/dist/elements/file-tree.js +1 -1
  149. package/dist/elements/file-upload.js +1 -1
  150. package/dist/elements/form.js +1 -1
  151. package/dist/elements/hover-card.d.ts +1 -0
  152. package/dist/elements/hover-card.js +1 -0
  153. package/dist/elements/icon.d.ts +1 -0
  154. package/dist/elements/icon.js +1 -0
  155. package/dist/elements/image.js +1 -1
  156. package/dist/elements/input.d.ts +1 -0
  157. package/dist/elements/input.js +1 -0
  158. package/dist/elements/kbd.d.ts +1 -0
  159. package/dist/elements/kbd.js +1 -0
  160. package/dist/elements/link-preview.js +1 -1
  161. package/dist/elements/loader.js +1 -1
  162. package/dist/elements/markdown.js +1 -1
  163. package/dist/elements/menu.d.ts +1 -0
  164. package/dist/elements/menu.js +1 -0
  165. package/dist/elements/message-skills.js +1 -1
  166. package/dist/elements/message.js +1 -1
  167. package/dist/elements/model-switcher.js +1 -1
  168. package/dist/elements/nav.d.ts +1 -0
  169. package/dist/elements/nav.js +1 -0
  170. package/dist/elements/notice.d.ts +1 -0
  171. package/dist/elements/notice.js +1 -0
  172. package/dist/elements/pane-group.d.ts +1 -0
  173. package/dist/elements/pane-group.js +1 -0
  174. package/dist/elements/pane.d.ts +1 -0
  175. package/dist/elements/pane.js +1 -0
  176. package/dist/elements/popover.js +1 -1
  177. package/dist/elements/progress-bar.d.ts +1 -0
  178. package/dist/elements/progress-bar.js +1 -0
  179. package/dist/elements/prompt-dock.d.ts +1 -0
  180. package/dist/elements/prompt-dock.js +1 -0
  181. package/dist/elements/prompt-input.js +1 -1
  182. package/dist/elements/prompt-suggestions.js +1 -1
  183. package/dist/elements/reasoning.js +1 -1
  184. package/dist/elements/register-impl.d.ts +0 -0
  185. package/dist/elements/register.d.ts +13 -0
  186. package/dist/elements/remote.d.ts +1 -0
  187. package/dist/elements/remote.js +1 -0
  188. package/dist/elements/resizable.js +1 -1
  189. package/dist/elements/response-stream.js +2 -2
  190. package/dist/elements/screen.d.ts +1 -0
  191. package/dist/elements/screen.js +1 -0
  192. package/dist/elements/scroll-area.d.ts +1 -0
  193. package/dist/elements/scroll-area.js +1 -0
  194. package/dist/elements/scroll-button.js +1 -1
  195. package/dist/elements/search.d.ts +1 -0
  196. package/dist/elements/search.js +1 -0
  197. package/dist/elements/segmented.d.ts +1 -0
  198. package/dist/elements/segmented.js +1 -0
  199. package/dist/elements/separator.d.ts +1 -0
  200. package/dist/elements/separator.js +1 -0
  201. package/dist/elements/setting-item.d.ts +1 -0
  202. package/dist/elements/setting-item.js +1 -0
  203. package/dist/elements/settings-group.d.ts +1 -0
  204. package/dist/elements/settings-group.js +1 -0
  205. package/dist/elements/skeleton.d.ts +1 -0
  206. package/dist/elements/skeleton.js +1 -0
  207. package/dist/elements/slots.d.ts +176 -0
  208. package/dist/elements/source.js +1 -1
  209. package/dist/elements/status.d.ts +1 -0
  210. package/dist/elements/status.js +1 -0
  211. package/dist/elements/switch.js +1 -1
  212. package/dist/elements/tabs.d.ts +1 -0
  213. package/dist/elements/tabs.js +1 -0
  214. package/dist/elements/tasks.js +1 -1
  215. package/dist/elements/text-shimmer.js +1 -1
  216. package/dist/elements/thinking-bar.js +1 -1
  217. package/dist/elements/toast.js +1 -1
  218. package/dist/elements/tool.js +1 -1
  219. package/dist/elements/tooltip.d.ts +1 -0
  220. package/dist/elements/tooltip.js +1 -0
  221. package/dist/elements/voice-input.js +1 -1
  222. package/dist/elements/voice-output.d.ts +1 -0
  223. package/dist/elements/voice-output.js +1 -0
  224. package/dist/elements.d.ts +733 -58
  225. package/dist/engine-javascript-C1x7zo1_.js +141 -0
  226. package/dist/index.d.ts +3 -2
  227. package/dist/index.js +8255 -5703
  228. package/dist/kai.es.js +1 -0
  229. package/dist/llms/llms-full.txt +1146 -64
  230. package/dist/llms/llms.txt +4 -4
  231. package/dist/mcp.es.js +62 -7
  232. package/dist/primitives/composer-model.d.ts +22 -0
  233. package/dist/primitives/composer-triggers.d.ts +19 -0
  234. package/dist/primitives/create-kai-chat.d.ts +38 -0
  235. package/dist/primitives/toast-store.d.ts +32 -2
  236. package/dist/primitives/use-speech-recognition.d.ts +26 -0
  237. package/dist/react/index.d.ts +1085 -97
  238. package/dist/react/runtime.d.ts +9 -2
  239. package/dist/react/use-kai-chat.d.ts +41 -0
  240. package/dist/react.js +572 -193
  241. package/dist/register-impl-cKscku5m.js +141 -0
  242. package/dist/schemas/tasks.schema.json +2 -2
  243. package/dist/state/index.d.ts +4 -0
  244. package/dist/state/messages.d.ts +11 -0
  245. package/dist/state/stream.d.ts +22 -0
  246. package/dist/state/suggestions.d.ts +4 -0
  247. package/dist/state.js +117 -0
  248. package/dist/theme.tokens.css +87 -0
  249. package/dist/types.d.ts +4 -0
  250. package/dist/ui/agent-card.d.ts +61 -0
  251. package/dist/ui/button.d.ts +5 -2
  252. package/dist/ui/card.d.ts +61 -0
  253. package/dist/ui/collapsible.d.ts +15 -1
  254. package/dist/ui/command.d.ts +33 -0
  255. package/dist/ui/dialog.d.ts +42 -0
  256. package/dist/ui/dropdown.d.ts +95 -1
  257. package/dist/ui/editable-label.d.ts +26 -0
  258. package/dist/ui/hover-card.d.ts +13 -1
  259. package/dist/ui/icon.d.ts +18 -0
  260. package/dist/ui/input.d.ts +33 -0
  261. package/dist/ui/kbd.d.ts +21 -0
  262. package/dist/ui/nav.d.ts +62 -0
  263. package/dist/ui/notice.d.ts +31 -0
  264. package/dist/ui/overlay.d.ts +12 -0
  265. package/dist/ui/pane-grid.d.ts +58 -0
  266. package/dist/ui/pane-group.d.ts +77 -0
  267. package/dist/ui/pane.d.ts +78 -0
  268. package/dist/ui/popover.d.ts +11 -1
  269. package/dist/ui/progress-bar.d.ts +23 -0
  270. package/dist/ui/prompt-dock.d.ts +96 -0
  271. package/dist/ui/resizable.d.ts +12 -0
  272. package/dist/ui/scroll-area.d.ts +4 -0
  273. package/dist/ui/segmented.d.ts +28 -0
  274. package/dist/ui/settings-group.d.ts +32 -0
  275. package/dist/ui/skeleton.d.ts +12 -0
  276. package/dist/ui/stat.d.ts +16 -0
  277. package/dist/ui/status.d.ts +13 -0
  278. package/dist/ui/switch.d.ts +8 -1
  279. package/dist/ui/tabs.d.ts +35 -0
  280. package/dist/ui/tooltip.d.ts +19 -1
  281. package/frameworks/react/index.tsx +1042 -157
  282. package/frameworks/react/runtime.tsx +30 -1
  283. package/frameworks/react/use-kai-chat.tsx +87 -0
  284. package/llms-full.txt +1146 -64
  285. package/llms.txt +4 -4
  286. package/package.json +31 -10
  287. package/src/agent-tooling/mcp/manifest.ts +14 -0
  288. package/src/agent-tooling/mcp/tools/debug.ts +11 -7
  289. package/src/agent-tooling/mcp/tools/reference.ts +32 -0
  290. package/src/agent-tooling/mcp/tools/scaffold.ts +30 -1
  291. package/src/components/artifact.tsx +98 -13
  292. package/src/components/attachment-types.ts +13 -0
  293. package/src/components/attachments.tsx +4 -14
  294. package/src/components/card.tsx +109 -15
  295. package/src/components/chain-of-thought.tsx +210 -1
  296. package/src/components/chat-scope-picker.tsx +13 -3
  297. package/src/components/chat-thread.tsx +225 -116
  298. package/src/components/choice-card.tsx +103 -11
  299. package/src/components/coachmark.tsx +249 -0
  300. package/src/components/component-meta.json +699 -110
  301. package/src/components/composer-dom.ts +159 -0
  302. package/src/components/composer-highlight.ts +242 -0
  303. package/src/components/composer-history.ts +82 -0
  304. package/src/components/composer.tsx +979 -0
  305. package/src/components/confirm-card.tsx +54 -1
  306. package/src/components/conversation-item.tsx +69 -7
  307. package/src/components/conversation-list.tsx +134 -37
  308. package/src/components/file-tree.tsx +197 -47
  309. package/src/components/form-widgets.tsx +9 -7
  310. package/src/components/form.tsx +140 -17
  311. package/src/components/image.tsx +3 -5
  312. package/src/components/link-preview.tsx +5 -4
  313. package/src/components/markdown.tsx +5 -2
  314. package/src/components/message.tsx +23 -4
  315. package/src/components/model-switcher.tsx +19 -4
  316. package/src/components/prompt-input.tsx +46 -75
  317. package/src/components/prompt-suggestion.tsx +48 -16
  318. package/src/components/reasoning.tsx +29 -6
  319. package/src/components/response-compare.tsx +31 -2
  320. package/src/components/screen.tsx +176 -0
  321. package/src/components/tasks-card.tsx +341 -21
  322. package/src/components/toast.tsx +119 -31
  323. package/src/components/tool-types.ts +10 -0
  324. package/src/components/tool.tsx +22 -16
  325. package/src/components/voice-input.tsx +102 -19
  326. package/src/components/voice-output.tsx +202 -0
  327. package/src/elements/agent-card.tsx +67 -0
  328. package/src/elements/artifact.tsx +53 -4
  329. package/src/elements/attachments.tsx +1 -0
  330. package/src/elements/avatar.tsx +33 -0
  331. package/src/elements/badge.tsx +32 -0
  332. package/src/elements/button.tsx +126 -0
  333. package/src/elements/card-media.jpg +0 -0
  334. package/src/elements/card.tsx +124 -31
  335. package/src/elements/cards.tsx +81 -7
  336. package/src/elements/chain-of-thought.tsx +77 -32
  337. package/src/elements/chat-scope-picker.tsx +35 -8
  338. package/src/elements/chat-types.ts +2 -2
  339. package/src/elements/chat-workspace.tsx +153 -41
  340. package/src/elements/chat.tsx +45 -23
  341. package/src/elements/choice.tsx +71 -19
  342. package/src/elements/coachmark.tsx +90 -0
  343. package/src/elements/command.tsx +209 -0
  344. package/src/elements/compare.tsx +24 -2
  345. package/src/elements/compiled.css +2 -2
  346. package/src/elements/composer.tsx +151 -0
  347. package/src/elements/confirm-card.tsx +36 -11
  348. package/src/elements/conversation-list.tsx +80 -11
  349. package/src/elements/default-input.tsx +75 -53
  350. package/src/elements/define.tsx +87 -7
  351. package/src/elements/dialog.tsx +98 -0
  352. package/src/elements/disclosure.ts +73 -0
  353. package/src/elements/editable-label.tsx +125 -0
  354. package/src/elements/element-manifest.json +129 -1
  355. package/src/elements/element-meta.json +5562 -1336
  356. package/src/elements/element-types.d.ts +732 -57
  357. package/src/elements/file-tree.tsx +12 -2
  358. package/src/elements/file-upload.tsx +1 -1
  359. package/src/elements/form.tsx +54 -11
  360. package/src/elements/hover-card.tsx +80 -0
  361. package/src/elements/icon-names.json +48 -0
  362. package/src/elements/icon.tsx +41 -0
  363. package/src/elements/input.tsx +203 -0
  364. package/src/elements/kbd.tsx +45 -0
  365. package/src/elements/menu.tsx +217 -0
  366. package/src/elements/message.tsx +58 -11
  367. package/src/elements/model-switcher.tsx +27 -1
  368. package/src/elements/nav.tsx +87 -0
  369. package/src/elements/notice.tsx +53 -0
  370. package/src/elements/pane-group.tsx +119 -0
  371. package/src/elements/pane.tsx +129 -0
  372. package/src/elements/popover.tsx +39 -17
  373. package/src/elements/progress-bar.tsx +39 -0
  374. package/src/elements/prompt-dock.tsx +81 -0
  375. package/src/elements/prompt-input.tsx +112 -63
  376. package/src/elements/prompt-suggestions.tsx +25 -9
  377. package/src/elements/reasoning.tsx +30 -9
  378. package/src/elements/register-impl.ts +38 -3
  379. package/src/elements/register.ts +11 -3
  380. package/src/elements/resizable.tsx +48 -11
  381. package/src/elements/screen.tsx +90 -0
  382. package/src/elements/scroll-area.tsx +33 -0
  383. package/src/elements/search.tsx +180 -0
  384. package/src/elements/segmented.tsx +135 -0
  385. package/src/elements/separator.tsx +36 -0
  386. package/src/elements/setting-item.tsx +50 -0
  387. package/src/elements/settings-group.tsx +37 -0
  388. package/src/elements/skeleton.tsx +45 -0
  389. package/src/elements/slots.ts +607 -0
  390. package/src/elements/source.tsx +13 -6
  391. package/src/elements/status.tsx +42 -0
  392. package/src/elements/switch.tsx +89 -14
  393. package/src/elements/tabs.tsx +95 -0
  394. package/src/elements/tasks.tsx +70 -14
  395. package/src/elements/toast.tsx +17 -2
  396. package/src/elements/tool.tsx +43 -9
  397. package/src/elements/tooltip.tsx +85 -0
  398. package/src/elements/video-poster.jpg +0 -0
  399. package/src/elements/voice-input.tsx +66 -16
  400. package/src/elements/voice-output.tsx +69 -0
  401. package/src/index.ts +5 -2
  402. package/src/primitives/card-schemas/tasks.schema.json +2 -2
  403. package/src/primitives/composer-model.ts +49 -0
  404. package/src/primitives/composer-triggers.ts +35 -0
  405. package/src/primitives/create-kai-chat.ts +66 -0
  406. package/src/primitives/toast-store.ts +43 -2
  407. package/src/primitives/use-speech-recognition.ts +135 -0
  408. package/src/state/index.ts +6 -0
  409. package/src/state/messages.ts +36 -0
  410. package/src/state/stream.ts +92 -0
  411. package/src/state/suggestions.ts +9 -0
  412. package/src/types.ts +4 -0
  413. package/src/ui/agent-card.tsx +218 -0
  414. package/src/ui/button.tsx +16 -5
  415. package/src/ui/card.tsx +245 -0
  416. package/src/ui/collapsible.tsx +30 -4
  417. package/src/ui/command.tsx +99 -0
  418. package/src/ui/dialog.tsx +217 -0
  419. package/src/ui/dropdown.tsx +375 -13
  420. package/src/ui/editable-label.tsx +112 -0
  421. package/src/ui/hover-card.tsx +28 -5
  422. package/src/ui/icon.tsx +110 -0
  423. package/src/ui/input.tsx +132 -0
  424. package/src/ui/kbd.tsx +118 -0
  425. package/src/ui/nav.tsx +282 -0
  426. package/src/ui/notice.tsx +84 -0
  427. package/src/ui/overlay.tsx +108 -2
  428. package/src/ui/pane-grid.tsx +117 -0
  429. package/src/ui/pane-group.tsx +291 -0
  430. package/src/ui/pane.tsx +193 -0
  431. package/src/ui/popover.tsx +16 -2
  432. package/src/ui/progress-bar.tsx +83 -0
  433. package/src/ui/prompt-dock.tsx +145 -0
  434. package/src/ui/resizable.tsx +69 -1
  435. package/src/ui/scroll-area.tsx +14 -3
  436. package/src/ui/segmented.tsx +109 -0
  437. package/src/ui/settings-group.tsx +67 -0
  438. package/src/ui/skeleton.tsx +62 -5
  439. package/src/ui/stat.tsx +41 -0
  440. package/src/ui/status.tsx +48 -0
  441. package/src/ui/switch.tsx +49 -23
  442. package/src/ui/tabs.tsx +168 -0
  443. package/src/ui/tooltip.tsx +52 -8
  444. package/theme.css +113 -0
  445. package/dist/components/slash-command.d.ts +0 -15
  446. package/dist/elements/chunks/Icon-D_Zmwmwh.js +0 -1
  447. package/dist/elements/chunks/action-icons-PVfIvcuG.js +0 -1
  448. package/dist/elements/chunks/attachments-Dp6vqtrc.js +0 -1
  449. package/dist/elements/chunks/button-CKyYD9G4.js +0 -1
  450. package/dist/elements/chunks/card-Cjho-PYk.js +0 -1
  451. package/dist/elements/chunks/chat-thread-RT808iPf.js +0 -1
  452. package/dist/elements/chunks/check-CDYaMYrM.js +0 -1
  453. package/dist/elements/chunks/chevron-down-3SBiq8HF.js +0 -1
  454. package/dist/elements/chunks/chevron-right-k2UFlIVK.js +0 -1
  455. package/dist/elements/chunks/cn-Dogu6PbV.js +0 -1
  456. package/dist/elements/chunks/code-block-BYUmfFSd.js +0 -1
  457. package/dist/elements/chunks/collapsible-BiNwdOn6.js +0 -1
  458. package/dist/elements/chunks/context-18g6oi4J.js +0 -1
  459. package/dist/elements/chunks/conversation-list-D9Y0NVdo.js +0 -1
  460. package/dist/elements/chunks/default-input-CSAoYYMd.js +0 -1
  461. package/dist/elements/chunks/download-D8K0Je8r.js +0 -1
  462. package/dist/elements/chunks/dropdown-bUs2iTia.js +0 -1
  463. package/dist/elements/chunks/external-link-6mA0wxab.js +0 -1
  464. package/dist/elements/chunks/file-text-DnaYk3Dm.js +0 -1
  465. package/dist/elements/chunks/file-tree-CgtRLlxK.js +0 -1
  466. package/dist/elements/chunks/hover-card-CIGw62gP.js +0 -1
  467. package/dist/elements/chunks/link-BlGSeoPy.js +0 -1
  468. package/dist/elements/chunks/loader-DvhR4qa0.js +0 -1
  469. package/dist/elements/chunks/message-CDZwXjhL.js +0 -1
  470. package/dist/elements/chunks/message-feedback-CYx81QiA.js +0 -1
  471. package/dist/elements/chunks/model-switcher-O_tUhoOT.js +0 -1
  472. package/dist/elements/chunks/overlay-DydXYMQW.js +0 -1
  473. package/dist/elements/chunks/prompt-suggestion-ldlWV5kd.js +0 -1
  474. package/dist/elements/chunks/reasoning-2PUnHlmr.js +0 -1
  475. package/dist/elements/chunks/resizable-B5WNbSeb.js +0 -1
  476. package/dist/elements/chunks/star-t9tI-P0q.js +0 -1
  477. package/dist/elements/chunks/store-C6rIooZz.js +0 -1
  478. package/dist/elements/chunks/text-shimmer-uh9V_KUh.js +0 -1
  479. package/dist/elements/chunks/textarea-3nm6Ia9U.js +0 -1
  480. package/dist/elements/chunks/thumbs-up-BBtguGld.js +0 -1
  481. package/dist/elements/chunks/toast-store-D8cL3fWl.js +0 -1
  482. package/dist/elements/chunks/tool-GJ3vwp1U.js +0 -1
  483. package/dist/elements/chunks/tooltip-DwKAz4XR.js +0 -1
  484. package/dist/elements/chunks/triangle-alert-Ct1zt2JL.js +0 -1
  485. package/dist/elements/chunks/use-card-resolution-D-_0Alzy.js +0 -1
  486. package/dist/elements/chunks/video-mVYiM99-.js +0 -1
  487. package/dist/elements/chunks/x-CzxL27Ch.js +0 -1
  488. package/dist/kitn-chat.es.js +0 -1
  489. package/dist/register-JyTglR6m.js +0 -1
  490. package/dist/register-impl-C6wlSsts.js +0 -77
  491. package/src/components/slash-command.tsx +0 -232
  492. package/src/elements/framework-usage.json +0 -588
  493. /package/dist/{kitn-chat-provider.d.ts → kai-provider.d.ts} +0 -0
  494. /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 {
@@ -135,14 +217,46 @@ export interface CardsProps extends WebComponentProps {
135
217
  onError?: (cardId: string, message: string) => void;
136
218
  maxSendPromptMode?: "compose" | "send";
137
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;
138
241
  }
139
242
  export declare const Cards: import('react').ForwardRefExoticComponent<CardsProps & import('react').RefAttributes<HTMLElement>>;
140
243
  export interface ChainOfThoughtProps extends WebComponentProps {
141
- /** 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? }`. */
142
245
  steps: {
143
246
  label: string;
144
247
  content?: undefined | string;
248
+ id?: undefined | string;
145
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;
146
260
  }
147
261
  export declare const ChainOfThought: import('react').ForwardRefExoticComponent<ChainOfThoughtProps & import('react').RefAttributes<HTMLElement>>;
148
262
  export interface ChatProps extends WebComponentProps {
@@ -184,8 +298,21 @@ export interface ChatProps extends WebComponentProps {
184
298
  };
185
299
  feedback?: undefined | "like" | "dislike";
186
300
  }[];
187
- /** 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. */
188
- 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
+ })[];
189
316
  /** Placeholder text shown in the empty input. */
190
317
  placeholder?: string;
191
318
  /** When true, shows the loading/streaming state and disables submit (use while awaiting the assistant's reply). */
@@ -197,7 +324,7 @@ export interface ChatProps extends WebComponentProps {
197
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. */
198
325
  persistSuggestions?: boolean;
199
326
  /** Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`. */
200
- proseSize?: "xs" | "sm" | "base" | "lg";
327
+ proseSize?: "sm" | "lg" | "xs" | "base";
201
328
  /** Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`). */
202
329
  codeTheme?: string;
203
330
  /** Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true. */
@@ -228,23 +355,52 @@ export interface ChatProps extends WebComponentProps {
228
355
  headerStart?: boolean;
229
356
  /** Whether the host has `slot="header-end"` content (right of the controls). */
230
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;
231
370
  /** Show a Search (Globe) button in the input toolbar; fires a `search` event. */
232
371
  search?: boolean;
233
372
  /** Show a Voice (Mic) button in the input toolbar; fires a `voice` event. */
234
373
  voice?: boolean;
235
- /** Slash commandswhen set, typing `/` in the input opens the command palette and fires `kai-slash-select`. Set as a JS property. */
236
- slashCommands?: {
237
- id: string;
238
- label: string;
239
- description?: string;
240
- 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
+ }[];
241
388
  }[];
242
- /** Command ids to highlight as active in the palette. */
243
- slashActiveIds?: string[];
244
- /** Single-line palette rows. */
245
- slashCompact?: boolean;
389
+ /** Default icon per entity kind (kind image src) for pills/menu items. */
390
+ kindIcons?: Record<string, string>;
246
391
  /** Whether each message's action bar is always visible (`'always'`, default) or only revealed on hover of that message row (`'hover'`). */
247
392
  actionsReveal?: "always" | "hover";
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;
248
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. */
249
405
  onMessageAction?: (event: CustomEvent<{
250
406
  messageId: string;
@@ -257,15 +413,6 @@ export interface ChatProps extends WebComponentProps {
257
413
  }>) => void;
258
414
  /** The Search button was clicked. */
259
415
  onSearch?: (event: CustomEvent<Record<string, never>>) => void;
260
- /** A slash command was chosen from the palette. */
261
- onSlashSelect?: (event: CustomEvent<{
262
- command: {
263
- id: string;
264
- label: string;
265
- description?: undefined | string;
266
- category?: undefined | string;
267
- };
268
- }>) => void;
269
416
  /** User submitted a message. */
270
417
  onSubmit?: (event: CustomEvent<{
271
418
  value: string;
@@ -296,9 +443,9 @@ export interface CheckpointProps extends WebComponentProps {
296
443
  /** Tooltip on hover. */
297
444
  tooltip?: string;
298
445
  /** Visual button style. */
299
- variant?: "ghost" | "default" | "outline";
446
+ variant?: "default" | "ghost" | "outline";
300
447
  /** Button size (use an `icon*` size for an icon-only checkpoint). */
301
- size?: "sm" | "lg" | "md" | "icon" | "icon-sm";
448
+ size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
302
449
  /** The checkpoint was clicked. */
303
450
  onSelect?: (event: CustomEvent) => void;
304
451
  }
@@ -312,8 +459,41 @@ export interface ChoiceProps extends WebComponentProps {
312
459
  heading?: string;
313
460
  /** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'action', action:'…' }`. */
314
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;
315
472
  }
316
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>>;
317
497
  export interface CodeBlockProps extends WebComponentProps {
318
498
  /** The source code to render. */
319
499
  code: string;
@@ -324,9 +504,37 @@ export interface CodeBlockProps extends WebComponentProps {
324
504
  /** Disable syntax highlighting (renders plain text, no Shiki). */
325
505
  codeHighlight?: boolean;
326
506
  /** Code text sizing. */
327
- proseSize?: "xs" | "sm" | "base" | "lg";
507
+ proseSize?: "sm" | "lg" | "xs" | "base";
328
508
  }
329
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>>;
330
538
  export interface CompareProps extends WebComponentProps {
331
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. */
332
540
  data?: Record<string, unknown>;
@@ -337,7 +545,7 @@ export interface CompareProps extends WebComponentProps {
337
545
  /** Layout: `'auto'` (default — columns when wide, tabs when narrow, by CONTAINER width) | `'columns'` (side-by-side) | `'tabs'` (pills to switch). Attribute: `layout`. */
338
546
  layout?: "auto" | "columns" | "tabs";
339
547
  /** Prose/text size for the rendered candidates. Attribute: `prose-size`. */
340
- proseSize?: "xs" | "sm" | "base" | "lg";
548
+ proseSize?: "sm" | "lg" | "xs" | "base";
341
549
  /** Shiki theme for code blocks in the candidates. Attribute: `code-theme`. */
342
550
  codeTheme?: string;
343
551
  /** Whether code blocks are syntax-highlighted. Attribute: `code-highlight`. */
@@ -359,6 +567,147 @@ export interface CompareProps extends WebComponentProps {
359
567
  }>) => void;
360
568
  }
361
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>>;
362
711
  export interface ConfirmProps extends WebComponentProps {
363
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. */
364
713
  data?: Record<string, unknown>;
@@ -424,19 +773,60 @@ export interface ConversationsProps extends WebComponentProps {
424
773
  messageCount: number;
425
774
  lastMessageAt: string;
426
775
  updatedAt: string;
776
+ trailing?: undefined | string;
427
777
  }[];
428
778
  /** The id of the currently-open conversation, highlighted in the list. */
429
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;
430
788
  /** A conversation was selected. */
431
789
  onConversationSelect?: (event: CustomEvent<{
432
790
  id: string;
433
791
  }>) => void;
434
792
  /** The "New chat" button was clicked. */
435
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;
436
798
  /** The sidebar toggle was clicked. */
437
799
  onToggleSidebar?: (event: CustomEvent<Record<string, never>>) => void;
438
800
  }
439
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>>;
440
830
  export interface EmbedProps extends WebComponentProps {
441
831
  /** Stable card id correlating every emitted event. Set as an attribute or property. */
442
832
  cardId?: string;
@@ -489,18 +879,23 @@ export interface FeedbackBarProps extends WebComponentProps {
489
879
  }
490
880
  export declare const FeedbackBar: import('react').ForwardRefExoticComponent<FeedbackBarProps & import('react').RefAttributes<HTMLElement>>;
491
881
  export interface FileTreeProps extends WebComponentProps {
492
- /** 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? }`). */
493
883
  files: {
494
884
  path: string;
495
885
  url?: undefined | string;
496
886
  code?: undefined | string;
497
887
  language?: undefined | string;
498
888
  type?: undefined | "html" | "pdf" | "image" | "other";
889
+ additions?: undefined | number;
890
+ deletions?: undefined | number;
891
+ status?: undefined | "added" | "modified" | "deleted" | "renamed" | "untracked";
499
892
  }[];
500
893
  /** Selected file path — highlighted in the tree. */
501
894
  activeFile?: string;
502
895
  /** Folder paths expanded initially. Omit to start with all folders open. */
503
896
  defaultExpanded?: string[];
897
+ /** Show a changed-files summary header (file count + summed `+/-` + Collapse-all). Attribute: `summary`. Off by default. */
898
+ summary?: boolean;
504
899
  /** Fired when a file is selected. `detail.path` = the file's path. */
505
900
  onSelect?: (event: CustomEvent<{
506
901
  path: string;
@@ -531,8 +926,45 @@ export interface FormProps extends WebComponentProps {
531
926
  heading?: string;
532
927
  /** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'submit', data:{…} }`. */
533
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;
534
940
  }
535
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>>;
536
968
  export interface ImageProps extends WebComponentProps {
537
969
  /** Base64-encoded image data (pair with `media-type`). */
538
970
  base64?: string;
@@ -544,6 +976,54 @@ export interface ImageProps extends WebComponentProps {
544
976
  mediaType?: string;
545
977
  }
546
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>>;
547
1027
  export interface LinkPreviewProps extends WebComponentProps {
548
1028
  /** Stable card id correlating every emitted event. Set as an attribute or property. */
549
1029
  cardId?: string;
@@ -564,7 +1044,7 @@ export interface LoaderProps extends WebComponentProps {
564
1044
  /** The animation style: `'circular' | 'classic' | 'pulse' | 'pulse-dot' | 'dots' | 'typing' | 'wave' | 'bars' | 'terminal' | 'text-blink' | 'text-shimmer' | 'loading-dots'`. Defaults to `'circular'`. */
565
1045
  variant?: "circular" | "classic" | "pulse" | "pulse-dot" | "dots" | "typing" | "wave" | "bars" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
566
1046
  /** Loader size: `'sm' | 'md' | 'lg'`. Defaults to `'md'`. */
567
- size?: "sm" | "lg" | "md";
1047
+ size?: "sm" | "md" | "lg";
568
1048
  /** Label for the text-based variants. */
569
1049
  text?: string;
570
1050
  }
@@ -573,13 +1053,55 @@ export interface MarkdownProps extends WebComponentProps {
573
1053
  /** The markdown source to render. */
574
1054
  content: string;
575
1055
  /** Text/markdown sizing. */
576
- proseSize?: "xs" | "sm" | "base" | "lg";
1056
+ proseSize?: "sm" | "lg" | "xs" | "base";
577
1057
  /** Shiki theme for fenced code blocks. */
578
1058
  codeTheme?: string;
579
1059
  /** Disable syntax highlighting (no Shiki loads). */
580
1060
  codeHighlight?: boolean;
581
1061
  }
582
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>>;
583
1105
  export interface MessageProps extends WebComponentProps {
584
1106
  /** The full message object. Set as a JS property. */
585
1107
  message?: {
@@ -626,7 +1148,7 @@ export interface MessageProps extends WebComponentProps {
626
1148
  /** Force markdown on/off. Defaults to on for assistant, off for user. */
627
1149
  markdown?: boolean;
628
1150
  /** Text/markdown sizing for the message body. */
629
- proseSize?: "xs" | "sm" | "base" | "lg";
1151
+ proseSize?: "sm" | "lg" | "xs" | "base";
630
1152
  /** Shiki theme name used for fenced code blocks in the content. */
631
1153
  codeTheme?: string;
632
1154
  /** Disable syntax highlighting for code blocks (no Shiki loads). */
@@ -637,6 +1159,8 @@ export interface MessageProps extends WebComponentProps {
637
1159
  avatarSrc?: string;
638
1160
  /** Convenience avatar fallback text (used when `message.avatar` is not set). */
639
1161
  avatarFallback?: string;
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;
640
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. */
641
1165
  onMessageAction?: (event: CustomEvent<{
642
1166
  messageId: string;
@@ -656,28 +1180,192 @@ export interface ModelSwitcherProps extends WebComponentProps {
656
1180
  }[];
657
1181
  /** The currently-selected model id. Defaults to the first model. */
658
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;
659
1189
  /** A model was selected. */
660
1190
  onModelChange?: (event: CustomEvent<{
661
1191
  modelId: string;
662
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;
663
1197
  }
664
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>>;
665
1318
  export interface PopoverProps extends WebComponentProps {
666
1319
  /** Floating placement relative to the trigger (floating-ui placement). */
667
1320
  placement?: "top" | "right" | "bottom" | "left" | "top-start" | "top-end" | "right-start" | "right-end" | "bottom-start" | "bottom-end" | "left-start" | "left-end";
668
1321
  /** Gap in px between the trigger and the panel. */
669
1322
  gutter?: number;
670
- /** 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`. */
671
1324
  open?: boolean;
672
- /** 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). */
673
1330
  onOpenChange?: (event: CustomEvent<{
674
1331
  open: boolean;
675
1332
  }>) => void;
676
1333
  }
677
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>>;
678
1353
  export interface PromptInputProps extends WebComponentProps {
679
- /** 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. */
680
- 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
+ })[];
681
1369
  /** Placeholder text shown in the empty input. */
682
1370
  placeholder?: string;
683
1371
  /** Disable the input and submit button entirely (non-interactive). */
@@ -688,23 +1376,16 @@ export interface PromptInputProps extends WebComponentProps {
688
1376
  suggestions?: string[];
689
1377
  /** What clicking a suggestion does: `'submit'` (default) sends it immediately as if typed and submitted; `'fill'` just places it in the input. */
690
1378
  suggestionMode?: "submit" | "fill";
691
- /** Slash commands — when set, typing `/` opens the command palette. Set as a JS property. */
692
- slashCommands?: {
693
- id: string;
694
- label: string;
695
- description?: string;
696
- category?: string;
697
- }[];
698
- /** Command ids to highlight as active. */
699
- slashActiveIds?: string[];
700
- /** Single-line palette rows. */
701
- slashCompact?: boolean;
702
1379
  /** Show a Search (Globe) button in the left toolbar; clicking it fires a `search` event. */
703
1380
  search?: boolean;
704
1381
  /** Show a Voice (Mic) button in the left toolbar; clicking it fires a `voice` event. */
705
1382
  voice?: boolean;
706
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`. */
707
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;
708
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). */
709
1390
  attachments?: {
710
1391
  id: string;
@@ -714,22 +1395,63 @@ export interface PromptInputProps extends WebComponentProps {
714
1395
  url?: string;
715
1396
  title?: string;
716
1397
  }[];
717
- /** The Search (Globe) toolbar button was clicked. */
718
- onSearch?: (event: CustomEvent<Record<string, never>>) => void;
719
- /** A slash command was chosen from the palette. */
720
- onSlashSelect?: (event: CustomEvent<{
721
- 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?: {
722
1403
  id: string;
723
1404
  label: string;
724
- description?: undefined | string;
725
- category?: undefined | string;
726
- };
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
+ }[];
727
1425
  }>) => void;
1426
+ /** The Search (Globe) toolbar button was clicked. */
1427
+ onSearch?: (event: CustomEvent<Record<string, never>>) => void;
728
1428
  /** The Stop button was clicked while `stoppable` and `loading` are both true. */
729
1429
  onStop?: (event: CustomEvent<Record<string, never>>) => void;
730
- /** 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. */
731
1431
  onSubmit?: (event: CustomEvent<{
732
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
+ }[];
733
1455
  attachments: {
734
1456
  id: string;
735
1457
  type: "file" | "source-document";
@@ -747,9 +1469,31 @@ export interface PromptInputProps extends WebComponentProps {
747
1469
  onToolbarAction?: (event: CustomEvent<{
748
1470
  action: string;
749
1471
  }>) => void;
750
- /** 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`. */
751
1473
  onValueChange?: (event: CustomEvent<{
752
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
+ }[];
753
1497
  }>) => void;
754
1498
  /** The Voice (Mic) toolbar button was clicked. */
755
1499
  onVoice?: (event: CustomEvent<Record<string, never>>) => void;
@@ -760,13 +1504,17 @@ export interface ReasoningProps extends WebComponentProps {
760
1504
  text: string;
761
1505
  /** Trigger label. */
762
1506
  label?: string;
763
- /** 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`. */
764
1508
  open?: boolean;
1509
+ /** Initial open state on mount (uncontrolled seed). */
1510
+ defaultOpen?: boolean;
765
1511
  /** While true, auto-expands (and re-collapses when it flips false). */
766
1512
  streaming?: boolean;
767
1513
  /** Render `text` as markdown. */
768
1514
  markdown?: boolean;
769
- /** 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). */
770
1518
  onOpenChange?: (event: CustomEvent<{
771
1519
  open: boolean;
772
1520
  }>) => void;
@@ -785,7 +1533,7 @@ export interface RemoteProps extends WebComponentProps {
785
1533
  export declare const Remote: import('react').ForwardRefExoticComponent<RemoteProps & import('react').RefAttributes<HTMLElement>>;
786
1534
  export interface ResizableProps extends WebComponentProps {
787
1535
  /** Layout axis: `horizontal` (row, default) or `vertical` (column). */
788
- orientation?: "horizontal" | "vertical";
1536
+ orientation?: "vertical" | "horizontal";
789
1537
  /** Which item index is maximized (null = none). Declarative source of truth. */
790
1538
  maximizedIndex?: null | number;
791
1539
  /** Fired on drag-end / keyboard resize / visibility change. `detail.sizes` = panel sizes in percent. */
@@ -810,6 +1558,8 @@ export interface ResizableItemProps extends WebComponentProps {
810
1558
  locked?: boolean;
811
1559
  /** Hide this panel; its divider is dropped and the rest reflow. */
812
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;
813
1563
  onChange?: (event: CustomEvent<unknown>) => void;
814
1564
  onMaximizeChange?: (event: CustomEvent<unknown>) => void;
815
1565
  }
@@ -834,6 +1584,16 @@ export interface ScopePickerProps extends WebComponentProps {
834
1584
  availableTags: string[];
835
1585
  /** The label shown on the trigger for the active scope. */
836
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;
837
1597
  /** A scope was chosen (`undefined` filters = "All Content"). */
838
1598
  onScopeChange?: (event: CustomEvent<{
839
1599
  filters: undefined | {
@@ -848,17 +1608,115 @@ export interface ScopePickerProps extends WebComponentProps {
848
1608
  }>) => void;
849
1609
  }
850
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>>;
851
1635
  export interface ScrollButtonProps extends WebComponentProps {
852
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="...">`. */
853
1637
  for?: string;
854
1638
  /** Button visual variant: `'outline' | 'ghost' | 'default'`. Defaults to `'outline'`. */
855
- variant?: "ghost" | "default" | "outline";
1639
+ variant?: "default" | "ghost" | "outline";
856
1640
  /** Button size token. Defaults to `'icon'` (square). */
857
- size?: "sm" | "lg" | "md" | "icon" | "icon-sm";
1641
+ size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
858
1642
  /** Emitted when the user clicks the button and `scrollToBottom()` is called. Carries no detail — consumers use it to know a manual scroll occurred. */
859
1643
  onScroll?: (event: CustomEvent) => void;
860
1644
  }
861
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>>;
862
1720
  export interface SkillsProps extends WebComponentProps {
863
1721
  /** The active skills to badge. Set as a JS property. */
864
1722
  skills: {
@@ -895,16 +1753,30 @@ export interface SourcesProps extends WebComponentProps {
895
1753
  numbered?: boolean;
896
1754
  }
897
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>>;
898
1767
  export interface SuggestionsProps extends WebComponentProps {
899
1768
  /** The suggestions. Strings, or `{ label, value }` when the displayed text and the emitted value differ. Set as a JS property. */
900
1769
  suggestions: (string | {
901
1770
  label: string;
902
1771
  value?: undefined | string;
1772
+ icon?: undefined | string;
903
1773
  })[];
904
1774
  /** Chip style: `'outline'` (default), `'ghost'`, or `'default'` (filled). */
905
- variant?: "ghost" | "default" | "outline";
906
- /** Size preset for each chip. Defaults to the pill default (`'lg'`); pass `'sm'` for smaller pills (or `'md'`). */
907
- 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";
908
1780
  /** Full-width left-aligned rows instead of pills. */
909
1781
  block?: boolean;
910
1782
  /** Substring to highlight within each suggestion. */
@@ -916,18 +1788,48 @@ export interface SuggestionsProps extends WebComponentProps {
916
1788
  }
917
1789
  export declare const Suggestions: import('react').ForwardRefExoticComponent<SuggestionsProps & import('react').RefAttributes<HTMLElement>>;
918
1790
  export interface SwitchProps extends WebComponentProps {
919
- /** 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. */
920
1792
  checked?: boolean;
1793
+ /** Initial checked state on mount (uncontrolled seed). Bare attribute (`<kai-switch default-checked>`) turns it on. */
1794
+ defaultChecked?: boolean;
921
1795
  /** Disable interaction. */
922
1796
  disabled?: boolean;
923
1797
  /** Accessible label. */
924
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;
925
1803
  /** The toggle changed. */
926
1804
  onChange?: (event: CustomEvent<{
927
1805
  checked: boolean;
928
1806
  }>) => void;
929
1807
  }
930
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>>;
931
1833
  export interface TasksProps extends WebComponentProps {
932
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. */
933
1835
  data?: Record<string, unknown>;
@@ -937,6 +1839,18 @@ export interface TasksProps extends WebComponentProps {
937
1839
  heading?: string;
938
1840
  /** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'submit', data:{ selected:[…] } }`. */
939
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;
940
1854
  }
941
1855
  export declare const Tasks: import('react').ForwardRefExoticComponent<TasksProps & import('react').RefAttributes<HTMLElement>>;
942
1856
  export interface TextShimmerProps extends WebComponentProps {
@@ -966,7 +1880,10 @@ export interface ToastRegionProps extends WebComponentProps {
966
1880
  toasts: {
967
1881
  id: string;
968
1882
  message: string;
969
- variant?: undefined | "neutral" | "success";
1883
+ variant?: undefined | "error" | "info" | "success" | "warning" | "neutral";
1884
+ appearance?: undefined | "pill" | "card";
1885
+ inverse?: undefined | boolean;
1886
+ description?: undefined | string;
970
1887
  action?: undefined | {
971
1888
  label: string;
972
1889
  onAction: () => void | false;
@@ -981,6 +1898,10 @@ export interface ToastRegionProps extends WebComponentProps {
981
1898
  max?: number;
982
1899
  /** Stacking: 'expanded' (default, full column) | 'collapsed' (Sonner-style pile that expands on hover/focus). Attribute: stack. */
983
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;
984
1905
  /** Container element to anchor this region to (JS property). Set by the store for a scoped region; unset = the global viewport region. */
985
1906
  target?: HTMLElement;
986
1907
  /** A toast's action button was pressed. */
@@ -1005,25 +1926,85 @@ export interface ToolProps extends WebComponentProps {
1005
1926
  toolCallId?: string;
1006
1927
  errorText?: string;
1007
1928
  };
1008
- /** 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`. */
1009
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;
1010
1939
  }
1011
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>>;
1012
1962
  export interface VoiceInputProps extends WebComponentProps {
1013
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. */
1014
1964
  transcribe?: (audio: Blob) => Promise<string>;
1015
1965
  /** Disable the mic button (non-interactive). */
1016
1966
  disabled?: boolean;
1017
- /** 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). */
1018
1972
  onAudioCaptured?: (event: CustomEvent<{
1019
1973
  blob: Blob;
1020
1974
  }>) => void;
1021
- /** 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). */
1022
1984
  onTranscription?: (event: CustomEvent<{
1023
1985
  text: string;
1024
1986
  }>) => void;
1025
1987
  }
1026
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>>;
1027
2008
  export interface WorkspaceProps extends WebComponentProps {
1028
2009
  /** Pre-bucketed conversation groups for the sidebar. Set as a JS property. */
1029
2010
  groups: {
@@ -1055,6 +2036,7 @@ export interface WorkspaceProps extends WebComponentProps {
1055
2036
  messageCount: number;
1056
2037
  lastMessageAt: string;
1057
2038
  updatedAt: string;
2039
+ trailing?: undefined | string;
1058
2040
  }[];
1059
2041
  /** Id of the open conversation, highlighted in the sidebar. */
1060
2042
  activeId?: string;
@@ -1101,7 +2083,7 @@ export interface WorkspaceProps extends WebComponentProps {
1101
2083
  loading?: boolean;
1102
2084
  suggestions?: string[];
1103
2085
  suggestionMode?: "submit" | "fill";
1104
- proseSize?: "xs" | "sm" | "base" | "lg";
2086
+ proseSize?: "sm" | "lg" | "xs" | "base";
1105
2087
  codeTheme?: string;
1106
2088
  codeHighlight?: boolean;
1107
2089
  chatTitle?: string;
@@ -1123,17 +2105,26 @@ export interface WorkspaceProps extends WebComponentProps {
1123
2105
  scrollButton?: boolean;
1124
2106
  search?: boolean;
1125
2107
  voice?: boolean;
1126
- slashCommands?: {
1127
- id: string;
1128
- label: string;
1129
- description?: string;
1130
- 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
+ }[];
1131
2122
  }[];
1132
- slashActiveIds?: string[];
1133
- slashCompact?: boolean;
1134
- /** 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). */
1135
2126
  sidebarWidth?: number;
1136
- /** Sidebar min width in px (default 200). */
2127
+ /** Sidebar min width in px (default 240). */
1137
2128
  sidebarMinWidth?: number;
1138
2129
  /** Sidebar max width in px (default 420). */
1139
2130
  sidebarMaxWidth?: number;
@@ -1141,6 +2132,12 @@ export interface WorkspaceProps extends WebComponentProps {
1141
2132
  sidebarCollapsed?: boolean;
1142
2133
  /** Initial collapsed state when uncontrolled (default false). Use the `default-sidebar-collapsed` attribute to start collapsed in plain HTML. */
1143
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;
1144
2141
  /** A conversation was selected in the sidebar. */
1145
2142
  onConversationSelect?: (event: CustomEvent<{
1146
2143
  id: string;
@@ -1163,15 +2160,6 @@ export interface WorkspaceProps extends WebComponentProps {
1163
2160
  onSidebarToggle?: (event: CustomEvent<{
1164
2161
  collapsed: boolean;
1165
2162
  }>) => void;
1166
- /** A slash command was chosen from the palette. */
1167
- onSlashSelect?: (event: CustomEvent<{
1168
- command: {
1169
- id: string;
1170
- label: string;
1171
- description?: undefined | string;
1172
- category?: undefined | string;
1173
- };
1174
- }>) => void;
1175
2163
  /** User submitted a message. */
1176
2164
  onSubmit?: (event: CustomEvent<{
1177
2165
  value: string;