@kitn.ai/ui 0.16.0 → 0.18.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (493) hide show
  1. package/README.md +55 -17
  2. package/dist/components/artifact.d.ts +39 -1
  3. package/dist/components/attachment-types.d.ts +12 -0
  4. package/dist/components/attachments.d.ts +2 -10
  5. package/dist/components/card.d.ts +27 -0
  6. package/dist/components/chain-of-thought.d.ts +78 -2
  7. package/dist/components/chat-scope-picker.d.ts +7 -0
  8. package/dist/components/chat-thread.d.ts +39 -16
  9. package/dist/components/choice-card.d.ts +27 -0
  10. package/dist/components/coachmark.d.ts +49 -0
  11. package/dist/components/composer-dom.d.ts +35 -0
  12. package/dist/components/composer-highlight.d.ts +48 -0
  13. package/dist/components/composer-history.d.ts +34 -0
  14. package/dist/components/composer.d.ts +86 -0
  15. package/dist/components/confirm-card.d.ts +17 -0
  16. package/dist/components/conversation-item.d.ts +9 -0
  17. package/dist/components/conversation-list.d.ts +36 -1
  18. package/dist/components/dismissed-stub.d.ts +22 -0
  19. package/dist/components/file-tree.d.ts +15 -0
  20. package/dist/components/form.d.ts +34 -0
  21. package/dist/components/markdown.d.ts +3 -0
  22. package/dist/components/message.d.ts +71 -2
  23. package/dist/components/model-switcher.d.ts +7 -0
  24. package/dist/components/prompt-input.d.ts +13 -4
  25. package/dist/components/prompt-suggestion.d.ts +9 -1
  26. package/dist/components/reasoning.d.ts +14 -1
  27. package/dist/components/response-compare-types.d.ts +66 -0
  28. package/dist/components/response-compare.d.ts +65 -0
  29. package/dist/components/screen.d.ts +46 -0
  30. package/dist/components/tasks-card.d.ts +50 -1
  31. package/dist/components/toast.d.ts +58 -0
  32. package/dist/components/tool-types.d.ts +10 -0
  33. package/dist/components/tool.d.ts +8 -8
  34. package/dist/components/use-card-resolution.d.ts +10 -6
  35. package/dist/components/voice-input.d.ts +27 -0
  36. package/dist/components/voice-output.d.ts +33 -0
  37. package/dist/core-C8fzo39E.js +12 -0
  38. package/dist/custom-elements.json +8472 -1691
  39. package/dist/elements/agent-card.d.ts +1 -0
  40. package/dist/elements/agent-card.js +1 -0
  41. package/dist/elements/artifact.js +1 -0
  42. package/dist/elements/attachments.js +1 -0
  43. package/dist/elements/autoloader.d.ts +2 -0
  44. package/dist/elements/autoloader.js +1 -0
  45. package/dist/elements/avatar.d.ts +1 -0
  46. package/dist/elements/avatar.js +1 -0
  47. package/dist/elements/badge.d.ts +1 -0
  48. package/dist/elements/badge.js +1 -0
  49. package/dist/elements/button.d.ts +1 -0
  50. package/dist/elements/button.js +1 -0
  51. package/dist/elements/card.js +1 -0
  52. package/dist/elements/cards.d.ts +1 -0
  53. package/dist/elements/cards.js +1 -0
  54. package/dist/elements/chain-of-thought.d.ts +0 -12
  55. package/dist/elements/chain-of-thought.js +1 -0
  56. package/dist/elements/chat-scope-picker.js +1 -0
  57. package/dist/elements/chat-types.d.ts +8 -2
  58. package/dist/elements/chat-workspace.js +1 -0
  59. package/dist/elements/chat.js +1 -0
  60. package/dist/elements/checkpoint.js +1 -0
  61. package/dist/elements/choice.js +1 -0
  62. package/dist/elements/chunks/Icon-DLLBeLG5.js +1 -0
  63. package/dist/elements/chunks/action-icons-UB4V5FNq.js +1 -0
  64. package/dist/elements/chunks/arrow-left-C-gwlUmx.js +1 -0
  65. package/dist/elements/chunks/attachments-CgbErf1r.js +1 -0
  66. package/dist/elements/chunks/badge-DTQpgB6N.js +1 -0
  67. package/dist/elements/chunks/bash-InADTalH.js +1 -0
  68. package/dist/elements/chunks/button-XDUM6lXs.js +1 -0
  69. package/dist/elements/chunks/card-CBlFZ-7I.js +1 -0
  70. package/dist/elements/chunks/card-routing-C986KuUA.js +1 -0
  71. package/dist/elements/chunks/chat-thread-BIhmqwNL.js +1 -0
  72. package/dist/elements/chunks/check-hGUoVIKb.js +1 -0
  73. package/dist/elements/chunks/chevron-down-DDoaSUtO.js +1 -0
  74. package/dist/elements/chunks/chevron-right-CdGEUakB.js +1 -0
  75. package/dist/elements/chunks/circle-BKAZdmzb.js +1 -0
  76. package/dist/elements/chunks/circle-check-CmYG-y3I.js +1 -0
  77. package/dist/elements/chunks/circle-x-DewgAEym.js +1 -0
  78. package/dist/elements/chunks/cn-CU7UAWzk.js +1 -0
  79. package/dist/elements/chunks/code-block-DedwxwFI.js +1 -0
  80. package/dist/elements/chunks/collapsible-FfgmTHtM.js +1 -0
  81. package/dist/elements/chunks/composer-Cfbw5HKT.js +65 -0
  82. package/dist/elements/chunks/context-DwJmxlRE.js +1 -0
  83. package/dist/elements/chunks/conversation-list-DsCQMfPq.js +1 -0
  84. package/dist/elements/chunks/core-AYMC6_lb.js +12 -0
  85. package/dist/elements/chunks/css-M7EaDHN_.js +1 -0
  86. package/dist/elements/chunks/default-input-BuqsoENC.js +1 -0
  87. package/dist/elements/chunks/define-rGsaWsLL.js +1 -0
  88. package/dist/elements/chunks/disclosure-CwoAkpMH.js +1 -0
  89. package/dist/elements/chunks/download-DJ06G3Bz.js +1 -0
  90. package/dist/elements/chunks/dropdown-BFg8ri_R.js +1 -0
  91. package/dist/elements/chunks/ellipsis-dlN6YvGw.js +1 -0
  92. package/dist/elements/chunks/engine-javascript-vq0WuIJl.js +141 -0
  93. package/dist/elements/chunks/external-link-DBX2lc_R.js +1 -0
  94. package/dist/elements/chunks/file-text-HfwUx4F9.js +1 -0
  95. package/dist/elements/chunks/file-tree-C6Toj71u.js +1 -0
  96. package/dist/elements/chunks/folder-MYuqa9Xp.js +1 -0
  97. package/dist/elements/chunks/github-dark-dimmed-DUshB20C.js +1 -0
  98. package/dist/elements/chunks/github-light-JYsPkUQd.js +1 -0
  99. package/dist/elements/chunks/hover-card-gE7iyXdW.js +1 -0
  100. package/dist/elements/chunks/html-CPZ3oZQ7.js +1 -0
  101. package/dist/elements/chunks/icon-Vqz4ivrY.js +1 -0
  102. package/dist/elements/chunks/index-BCRhi84a.js +1 -0
  103. package/dist/elements/chunks/info-B_toFS0l.js +1 -0
  104. package/dist/elements/chunks/input-gzbHYZvQ.js +1 -0
  105. package/dist/elements/chunks/javascript-C25yR2R2.js +1 -0
  106. package/dist/elements/chunks/json-DxJze_jm.js +1 -0
  107. package/dist/elements/chunks/kbd-n49c4KZm.js +1 -0
  108. package/dist/elements/chunks/link-CKPs9yM0.js +1 -0
  109. package/dist/elements/chunks/loader-q6MamGus.js +1 -0
  110. package/dist/elements/chunks/markdown-DBrcqq4S.js +64 -0
  111. package/dist/elements/chunks/message-CTqaYI0s.js +1 -0
  112. package/dist/elements/chunks/message-feedback-Cvzm03w0.js +1 -0
  113. package/dist/elements/chunks/message-square-CUg9eRCi.js +1 -0
  114. package/dist/elements/chunks/minimize-2-l2klxP6K.js +1 -0
  115. package/dist/elements/chunks/model-switcher-CmyjiHO1.js +1 -0
  116. package/dist/elements/chunks/overlay-C8sOYqjT.js +1 -0
  117. package/dist/elements/chunks/paperclip-42Ia7xHD.js +1 -0
  118. package/dist/elements/chunks/progress-bar-tzKMWAwO.js +1 -0
  119. package/dist/elements/chunks/prompt-suggestion-D3F6vP_A.js +1 -0
  120. package/dist/elements/chunks/reasoning-BJNmmyov.js +1 -0
  121. package/dist/elements/chunks/resizable-BRsk19qI.js +1 -0
  122. package/dist/elements/chunks/rotate-cw-BgcggLHC.js +1 -0
  123. package/dist/elements/chunks/scroll-area-CgGbFFbT.js +1 -0
  124. package/dist/elements/chunks/separator-8hM4GdHE.js +1 -0
  125. package/dist/elements/chunks/settings-CaUIYOg-.js +1 -0
  126. package/dist/elements/chunks/settings-group-CYjOVIZQ.js +1 -0
  127. package/dist/elements/chunks/share-BTYM3Ddt.js +1 -0
  128. package/dist/elements/chunks/skeleton-DsTYrPUe.js +1 -0
  129. package/dist/elements/chunks/slots-DkZ-Cmha.js +1 -0
  130. package/dist/elements/chunks/star-9R3LBQ9n.js +1 -0
  131. package/dist/elements/chunks/store-CYl5Y0_u.js +1 -0
  132. package/dist/elements/chunks/svelte--5p79yCD.js +1 -0
  133. package/dist/elements/chunks/text-shimmer-CaYGv8Se.js +1 -0
  134. package/dist/elements/chunks/textarea-NEr2SLcD.js +1 -0
  135. package/dist/elements/chunks/thumbs-up-DZYZkFfc.js +1 -0
  136. package/dist/elements/chunks/toast-store-ClxVZRcc.js +1 -0
  137. package/dist/elements/chunks/tool-CHZOmoe9.js +1 -0
  138. package/dist/elements/chunks/tooltip-WpHElELC.js +1 -0
  139. package/dist/elements/chunks/triangle-alert-BlS80PUg.js +1 -0
  140. package/dist/elements/chunks/tsx-B8rCNbgL.js +1 -0
  141. package/dist/elements/chunks/typescript-RycA9KXf.js +1 -0
  142. package/dist/elements/chunks/use-card-resolution-VSVoxDeJ.js +1 -0
  143. package/dist/elements/chunks/video-DxTPZqT8.js +1 -0
  144. package/dist/elements/chunks/vue-BmIZj4XD.js +1 -0
  145. package/dist/elements/chunks/x-C1qtndxn.js +1 -0
  146. package/dist/elements/coachmark.d.ts +1 -0
  147. package/dist/elements/coachmark.js +1 -0
  148. package/dist/elements/code-block.js +1 -0
  149. package/dist/elements/command.d.ts +1 -0
  150. package/dist/elements/command.js +1 -0
  151. package/dist/elements/compare.d.ts +1 -0
  152. package/dist/elements/compare.js +1 -0
  153. package/dist/elements/composer.d.ts +1 -0
  154. package/dist/elements/composer.js +1 -0
  155. package/dist/elements/confirm-card.js +1 -0
  156. package/dist/elements/context-meter.js +1 -0
  157. package/dist/elements/conversation-list.d.ts +1 -11
  158. package/dist/elements/conversation-list.js +1 -0
  159. package/dist/elements/default-input.d.ts +20 -9
  160. package/dist/elements/define.d.ts +11 -0
  161. package/dist/elements/dialog.d.ts +1 -0
  162. package/dist/elements/dialog.js +1 -0
  163. package/dist/elements/disclosure.d.ts +37 -0
  164. package/dist/elements/editable-label.d.ts +1 -0
  165. package/dist/elements/editable-label.js +1 -0
  166. package/dist/elements/embed.js +1 -0
  167. package/dist/elements/empty.js +1 -0
  168. package/dist/elements/feedback-bar.js +1 -0
  169. package/dist/elements/file-tree.js +1 -0
  170. package/dist/elements/file-upload.js +1 -0
  171. package/dist/elements/form.js +1 -0
  172. package/dist/elements/hover-card.d.ts +1 -0
  173. package/dist/elements/hover-card.js +1 -0
  174. package/dist/elements/icon.d.ts +1 -0
  175. package/dist/elements/icon.js +1 -0
  176. package/dist/elements/image.js +1 -0
  177. package/dist/elements/input.d.ts +1 -0
  178. package/dist/elements/input.js +1 -0
  179. package/dist/elements/kbd.d.ts +1 -0
  180. package/dist/elements/kbd.js +1 -0
  181. package/dist/elements/link-preview.js +1 -0
  182. package/dist/elements/loader.js +1 -0
  183. package/dist/elements/markdown.js +1 -0
  184. package/dist/elements/menu.d.ts +1 -0
  185. package/dist/elements/menu.js +1 -0
  186. package/dist/elements/message-skills.d.ts +0 -16
  187. package/dist/elements/message-skills.js +1 -0
  188. package/dist/elements/message.js +1 -0
  189. package/dist/elements/model-switcher.d.ts +1 -11
  190. package/dist/elements/model-switcher.js +1 -0
  191. package/dist/elements/nav.d.ts +1 -0
  192. package/dist/elements/nav.js +1 -0
  193. package/dist/elements/notice.d.ts +1 -0
  194. package/dist/elements/notice.js +1 -0
  195. package/dist/elements/pane-group.d.ts +1 -0
  196. package/dist/elements/pane-group.js +1 -0
  197. package/dist/elements/pane.d.ts +1 -0
  198. package/dist/elements/pane.js +1 -0
  199. package/dist/elements/popover.js +1 -0
  200. package/dist/elements/progress-bar.d.ts +1 -0
  201. package/dist/elements/progress-bar.js +1 -0
  202. package/dist/elements/prompt-dock.d.ts +1 -0
  203. package/dist/elements/prompt-dock.js +1 -0
  204. package/dist/elements/prompt-input.d.ts +1 -9
  205. package/dist/elements/prompt-input.js +1 -0
  206. package/dist/elements/prompt-suggestions.d.ts +0 -6
  207. package/dist/elements/prompt-suggestions.js +1 -0
  208. package/dist/elements/reasoning.js +1 -0
  209. package/dist/elements/register.d.ts +10 -0
  210. package/dist/elements/remote.js +1 -0
  211. package/dist/elements/resizable.d.ts +1 -17
  212. package/dist/elements/resizable.js +1 -0
  213. package/dist/elements/response-stream.js +14 -0
  214. package/dist/elements/screen.d.ts +1 -0
  215. package/dist/elements/screen.js +1 -0
  216. package/dist/elements/scroll-area.d.ts +1 -0
  217. package/dist/elements/scroll-area.js +1 -0
  218. package/dist/elements/scroll-button.js +1 -0
  219. package/dist/elements/search.d.ts +1 -0
  220. package/dist/elements/search.js +1 -0
  221. package/dist/elements/segmented.d.ts +1 -0
  222. package/dist/elements/segmented.js +1 -0
  223. package/dist/elements/separator.d.ts +1 -0
  224. package/dist/elements/separator.js +1 -0
  225. package/dist/elements/setting-item.d.ts +1 -0
  226. package/dist/elements/setting-item.js +1 -0
  227. package/dist/elements/settings-group.d.ts +1 -0
  228. package/dist/elements/settings-group.js +1 -0
  229. package/dist/elements/skeleton.d.ts +1 -0
  230. package/dist/elements/skeleton.js +1 -0
  231. package/dist/elements/slots.d.ts +176 -0
  232. package/dist/elements/source.d.ts +0 -17
  233. package/dist/elements/source.js +1 -0
  234. package/dist/elements/status.d.ts +1 -0
  235. package/dist/elements/status.js +1 -0
  236. package/dist/elements/switch.js +1 -0
  237. package/dist/elements/tabs.d.ts +1 -0
  238. package/dist/elements/tabs.js +1 -0
  239. package/dist/elements/tasks.js +1 -0
  240. package/dist/elements/text-shimmer.js +1 -0
  241. package/dist/elements/thinking-bar.js +1 -0
  242. package/dist/elements/toast.d.ts +1 -0
  243. package/dist/elements/toast.js +1 -0
  244. package/dist/elements/tool.js +1 -0
  245. package/dist/elements/tooltip.d.ts +1 -0
  246. package/dist/elements/tooltip.js +1 -0
  247. package/dist/elements/voice-input.js +1 -0
  248. package/dist/elements/voice-output.d.ts +1 -0
  249. package/dist/elements/voice-output.js +1 -0
  250. package/dist/elements.d.ts +772 -61
  251. package/dist/engine-javascript-C1x7zo1_.js +141 -0
  252. package/dist/index.d.ts +15 -2
  253. package/dist/index.js +14405 -9810
  254. package/dist/kai.es.js +1 -0
  255. package/dist/llms/llms-full.txt +1234 -107
  256. package/dist/llms/llms.txt +4 -4
  257. package/dist/mcp.es.js +217 -6
  258. package/dist/primitives/card-contract.d.ts +20 -4
  259. package/dist/primitives/card-recovery.d.ts +55 -0
  260. package/dist/primitives/composer-model.d.ts +22 -0
  261. package/dist/primitives/composer-triggers.d.ts +19 -0
  262. package/dist/primitives/create-kai-chat.d.ts +38 -0
  263. package/dist/primitives/message-feedback.d.ts +35 -0
  264. package/dist/primitives/toast-store.d.ts +118 -0
  265. package/dist/primitives/use-speech-recognition.d.ts +26 -0
  266. package/dist/react/index.d.ts +1166 -98
  267. package/dist/react/runtime.d.ts +9 -2
  268. package/dist/react/use-kai-chat.d.ts +41 -0
  269. package/dist/react.js +575 -186
  270. package/dist/register-impl-CYWGkgbI.js +141 -0
  271. package/dist/schemas/choice.schema.json +5 -0
  272. package/dist/schemas/tasks.schema.json +7 -2
  273. package/dist/state/index.d.ts +4 -0
  274. package/dist/state/messages.d.ts +11 -0
  275. package/dist/state/stream.d.ts +22 -0
  276. package/dist/state/suggestions.d.ts +4 -0
  277. package/dist/state.js +117 -0
  278. package/dist/theme.tokens.css +87 -0
  279. package/dist/types.d.ts +4 -0
  280. package/dist/ui/agent-card.d.ts +61 -0
  281. package/dist/ui/button.d.ts +5 -2
  282. package/dist/ui/card.d.ts +61 -0
  283. package/dist/ui/collapsible.d.ts +15 -1
  284. package/dist/ui/command.d.ts +33 -0
  285. package/dist/ui/dialog.d.ts +42 -0
  286. package/dist/ui/dropdown.d.ts +95 -1
  287. package/dist/ui/editable-label.d.ts +26 -0
  288. package/dist/ui/hover-card.d.ts +13 -1
  289. package/dist/ui/icon.d.ts +18 -0
  290. package/dist/ui/input.d.ts +33 -0
  291. package/dist/ui/kbd.d.ts +21 -0
  292. package/dist/ui/nav.d.ts +62 -0
  293. package/dist/ui/notice.d.ts +31 -0
  294. package/dist/ui/overlay.d.ts +12 -0
  295. package/dist/ui/pane-grid.d.ts +58 -0
  296. package/dist/ui/pane-group.d.ts +75 -0
  297. package/dist/ui/pane.d.ts +78 -0
  298. package/dist/ui/popover.d.ts +11 -1
  299. package/dist/ui/progress-bar.d.ts +23 -0
  300. package/dist/ui/prompt-dock.d.ts +96 -0
  301. package/dist/ui/resizable.d.ts +12 -0
  302. package/dist/ui/scroll-area.d.ts +4 -0
  303. package/dist/ui/segmented.d.ts +28 -0
  304. package/dist/ui/settings-group.d.ts +32 -0
  305. package/dist/ui/skeleton.d.ts +12 -0
  306. package/dist/ui/stat.d.ts +16 -0
  307. package/dist/ui/status.d.ts +13 -0
  308. package/dist/ui/switch.d.ts +8 -1
  309. package/dist/ui/tabs.d.ts +35 -0
  310. package/dist/ui/tooltip.d.ts +20 -1
  311. package/frameworks/react/index.tsx +1100 -163
  312. package/frameworks/react/runtime.tsx +30 -1
  313. package/frameworks/react/use-kai-chat.tsx +87 -0
  314. package/llms-full.txt +1234 -107
  315. package/llms.txt +4 -4
  316. package/package.json +36 -12
  317. package/src/agent-tooling/mcp/manifest.ts +14 -0
  318. package/src/agent-tooling/mcp/tools/debug.ts +194 -6
  319. package/src/agent-tooling/mcp/tools/reference.ts +32 -0
  320. package/src/agent-tooling/mcp/tools/scaffold.ts +162 -1
  321. package/src/components/artifact.tsx +98 -13
  322. package/src/components/attachment-types.ts +13 -0
  323. package/src/components/attachments.tsx +4 -14
  324. package/src/components/card.tsx +109 -15
  325. package/src/components/chain-of-thought.tsx +210 -1
  326. package/src/components/chat-scope-picker.tsx +13 -3
  327. package/src/components/chat-thread.tsx +238 -137
  328. package/src/components/choice-card.tsx +136 -15
  329. package/src/components/coachmark.tsx +245 -0
  330. package/src/components/component-meta.json +921 -108
  331. package/src/components/composer-dom.ts +159 -0
  332. package/src/components/composer-highlight.ts +242 -0
  333. package/src/components/composer-history.ts +82 -0
  334. package/src/components/composer.tsx +979 -0
  335. package/src/components/confirm-card.tsx +69 -2
  336. package/src/components/conversation-item.tsx +69 -7
  337. package/src/components/conversation-list.tsx +134 -37
  338. package/src/components/dismissed-stub.tsx +80 -0
  339. package/src/components/file-tree.tsx +197 -47
  340. package/src/components/form-widgets.tsx +9 -7
  341. package/src/components/form.tsx +161 -20
  342. package/src/components/image.tsx +3 -5
  343. package/src/components/link-preview.tsx +5 -4
  344. package/src/components/markdown.tsx +5 -2
  345. package/src/components/message.tsx +174 -14
  346. package/src/components/model-switcher.tsx +19 -4
  347. package/src/components/prompt-input.tsx +46 -75
  348. package/src/components/prompt-suggestion.tsx +48 -16
  349. package/src/components/reasoning.tsx +29 -6
  350. package/src/components/response-compare-types.ts +127 -0
  351. package/src/components/response-compare.tsx +460 -0
  352. package/src/components/screen.tsx +176 -0
  353. package/src/components/tasks-card.tsx +374 -23
  354. package/src/components/toast.tsx +486 -0
  355. package/src/components/tool-types.ts +10 -0
  356. package/src/components/tool.tsx +22 -16
  357. package/src/components/use-card-resolution.ts +24 -8
  358. package/src/components/voice-input.tsx +102 -19
  359. package/src/components/voice-output.tsx +202 -0
  360. package/src/elements/agent-card.tsx +67 -0
  361. package/src/elements/artifact.tsx +53 -4
  362. package/src/elements/attachments.tsx +1 -0
  363. package/src/elements/autoloader.ts +89 -0
  364. package/src/elements/avatar.tsx +33 -0
  365. package/src/elements/badge.tsx +32 -0
  366. package/src/elements/button.tsx +126 -0
  367. package/src/elements/card-media.jpg +0 -0
  368. package/src/elements/card.tsx +124 -31
  369. package/src/elements/cards.tsx +81 -7
  370. package/src/elements/chain-of-thought.tsx +77 -32
  371. package/src/elements/chat-scope-picker.tsx +35 -8
  372. package/src/elements/chat-types.ts +9 -2
  373. package/src/elements/chat-workspace.tsx +157 -43
  374. package/src/elements/chat.tsx +49 -25
  375. package/src/elements/choice.tsx +71 -19
  376. package/src/elements/coachmark.tsx +90 -0
  377. package/src/elements/command.tsx +209 -0
  378. package/src/elements/compare.tsx +110 -0
  379. package/src/elements/compiled.css +1 -1
  380. package/src/elements/composer.tsx +151 -0
  381. package/src/elements/confirm-card.tsx +36 -11
  382. package/src/elements/conversation-list.tsx +80 -11
  383. package/src/elements/default-input.tsx +75 -53
  384. package/src/elements/define.tsx +47 -6
  385. package/src/elements/dialog.tsx +98 -0
  386. package/src/elements/disclosure.ts +73 -0
  387. package/src/elements/editable-label.tsx +125 -0
  388. package/src/elements/element-manifest.json +310 -0
  389. package/src/elements/element-meta.json +5954 -1605
  390. package/src/elements/element-types.d.ts +771 -60
  391. package/src/elements/file-tree.tsx +12 -2
  392. package/src/elements/file-upload.tsx +1 -1
  393. package/src/elements/form.tsx +54 -11
  394. package/src/elements/hover-card.tsx +80 -0
  395. package/src/elements/icon-names.json +48 -0
  396. package/src/elements/icon.tsx +41 -0
  397. package/src/elements/input.tsx +203 -0
  398. package/src/elements/kbd.tsx +45 -0
  399. package/src/elements/menu.tsx +217 -0
  400. package/src/elements/message.tsx +84 -55
  401. package/src/elements/model-switcher.tsx +27 -1
  402. package/src/elements/nav.tsx +87 -0
  403. package/src/elements/notice.tsx +53 -0
  404. package/src/elements/pane-group.tsx +119 -0
  405. package/src/elements/pane.tsx +129 -0
  406. package/src/elements/popover.tsx +39 -17
  407. package/src/elements/progress-bar.tsx +39 -0
  408. package/src/elements/prompt-dock.tsx +81 -0
  409. package/src/elements/prompt-input.tsx +112 -63
  410. package/src/elements/prompt-suggestions.tsx +25 -9
  411. package/src/elements/reasoning.tsx +30 -9
  412. package/src/elements/register-impl.ts +41 -3
  413. package/src/elements/register.ts +20 -3
  414. package/src/elements/remote.tsx +4 -0
  415. package/src/elements/resizable.tsx +48 -11
  416. package/src/elements/screen.tsx +90 -0
  417. package/src/elements/scroll-area.tsx +33 -0
  418. package/src/elements/search.tsx +180 -0
  419. package/src/elements/segmented.tsx +135 -0
  420. package/src/elements/separator.tsx +36 -0
  421. package/src/elements/setting-item.tsx +50 -0
  422. package/src/elements/settings-group.tsx +37 -0
  423. package/src/elements/skeleton.tsx +45 -0
  424. package/src/elements/slots.ts +607 -0
  425. package/src/elements/source.tsx +13 -6
  426. package/src/elements/status.tsx +42 -0
  427. package/src/elements/styles.css +19 -0
  428. package/src/elements/switch.tsx +89 -14
  429. package/src/elements/tabs.tsx +95 -0
  430. package/src/elements/tasks.tsx +70 -14
  431. package/src/elements/toast.tsx +89 -0
  432. package/src/elements/tool.tsx +43 -9
  433. package/src/elements/tooltip.tsx +85 -0
  434. package/src/elements/video-poster.jpg +0 -0
  435. package/src/elements/voice-input.tsx +66 -16
  436. package/src/elements/voice-output.tsx +69 -0
  437. package/src/index.ts +35 -2
  438. package/src/primitives/card-contract.ts +14 -5
  439. package/src/primitives/card-recovery.ts +149 -0
  440. package/src/primitives/card-routing.ts +3 -0
  441. package/src/primitives/card-schemas/choice.schema.json +5 -0
  442. package/src/primitives/card-schemas/tasks.schema.json +7 -2
  443. package/src/primitives/composer-model.ts +49 -0
  444. package/src/primitives/composer-triggers.ts +35 -0
  445. package/src/primitives/create-kai-chat.ts +66 -0
  446. package/src/primitives/message-feedback.ts +123 -0
  447. package/src/primitives/toast-store.ts +276 -0
  448. package/src/primitives/use-speech-recognition.ts +135 -0
  449. package/src/state/index.ts +6 -0
  450. package/src/state/messages.ts +36 -0
  451. package/src/state/stream.ts +92 -0
  452. package/src/state/suggestions.ts +9 -0
  453. package/src/types.ts +4 -0
  454. package/src/ui/agent-card.tsx +212 -0
  455. package/src/ui/button.tsx +16 -5
  456. package/src/ui/card.tsx +245 -0
  457. package/src/ui/collapsible.tsx +30 -4
  458. package/src/ui/command.tsx +99 -0
  459. package/src/ui/dialog.tsx +217 -0
  460. package/src/ui/dropdown.tsx +375 -13
  461. package/src/ui/editable-label.tsx +112 -0
  462. package/src/ui/hover-card.tsx +28 -5
  463. package/src/ui/icon.tsx +110 -0
  464. package/src/ui/input.tsx +132 -0
  465. package/src/ui/kbd.tsx +118 -0
  466. package/src/ui/nav.tsx +282 -0
  467. package/src/ui/notice.tsx +84 -0
  468. package/src/ui/overlay.tsx +108 -2
  469. package/src/ui/pane-grid.tsx +116 -0
  470. package/src/ui/pane-group.tsx +280 -0
  471. package/src/ui/pane.tsx +193 -0
  472. package/src/ui/popover.tsx +16 -2
  473. package/src/ui/progress-bar.tsx +83 -0
  474. package/src/ui/prompt-dock.tsx +145 -0
  475. package/src/ui/resizable.tsx +69 -1
  476. package/src/ui/scroll-area.tsx +14 -3
  477. package/src/ui/segmented.tsx +109 -0
  478. package/src/ui/settings-group.tsx +67 -0
  479. package/src/ui/skeleton.tsx +62 -5
  480. package/src/ui/stat.tsx +41 -0
  481. package/src/ui/status.tsx +48 -0
  482. package/src/ui/switch.tsx +49 -23
  483. package/src/ui/tabs.tsx +168 -0
  484. package/src/ui/tooltip.tsx +57 -7
  485. package/theme.css +113 -0
  486. package/dist/components/slash-command.d.ts +0 -15
  487. package/dist/kitn-chat.es.js +0 -1
  488. package/dist/register-impl-wCsFPoh9.js +0 -77
  489. package/dist/register-ujhr1nBS.js +0 -1
  490. package/src/components/slash-command.tsx +0 -232
  491. package/src/elements/framework-usage.json +0 -563
  492. /package/dist/{kitn-chat-provider.d.ts → kai-provider.d.ts} +0 -0
  493. /package/dist/{kitn-chat-provider.es.js → kai-provider.es.js} +0 -0
@@ -1,7 +1,19 @@
1
- import { JSX } from 'solid-js';
1
+ import { JSX, Accessor } from 'solid-js';
2
2
  import { AsTag } from './overlay';
3
+ /** Imperative open controller, handed to a parent (e.g. the kai-menu facade) via
4
+ * `controllerRef` so it can drive/observe the Dropdown's open state. */
5
+ export interface DropdownController {
6
+ open: Accessor<boolean>;
7
+ setOpen: (v: boolean) => void;
8
+ }
3
9
  export declare function Dropdown(props: {
4
10
  children: JSX.Element;
11
+ /** Initial open state (uncontrolled seed). */
12
+ defaultOpen?: boolean;
13
+ /** When true, the trigger never opens the menu. */
14
+ disabled?: boolean;
15
+ /** Receive the open controller (open accessor + setOpen) once mounted. */
16
+ controllerRef?: (api: DropdownController) => void;
5
17
  }): JSX.Element;
6
18
  export declare function DropdownTrigger(props: {
7
19
  as?: AsTag;
@@ -17,4 +29,86 @@ export declare function DropdownItem(props: {
17
29
  children: JSX.Element;
18
30
  class?: string;
19
31
  onSelect?: () => void;
32
+ disabled?: boolean;
33
+ }): JSX.Element;
34
+ /**
35
+ * A thin, non-interactive divider between groups of items.
36
+ * a11y: `role="separator"` — exposed to AT as a group boundary; not in the
37
+ * roving-focus tab order (the `[role="menuitem"]` query skips it).
38
+ */
39
+ export declare function DropdownSeparator(props: {
40
+ class?: string;
41
+ }): JSX.Element;
42
+ /**
43
+ * A non-interactive section header.
44
+ * a11y: a plain muted label — NOT a menuitem and NOT focusable, so roving focus
45
+ * skips it; it labels the items that follow visually only (`select-none`).
46
+ */
47
+ export declare function DropdownLabel(props: {
48
+ children: JSX.Element;
49
+ class?: string;
50
+ }): JSX.Element;
51
+ /**
52
+ * A togglable menu item.
53
+ * a11y: `role="menuitemcheckbox"` + `aria-checked`. Activating fires `onSelect`
54
+ * but KEEPS THE MENU OPEN (the consumer flips `checked`). The Check sits at the
55
+ * TRAILING edge (toggle-style) so the item's leading content — an icon when
56
+ * present — aligns with the plain items above it instead of being pushed in by a
57
+ * reserved leading check column.
58
+ */
59
+ export declare function DropdownCheckboxItem(props: {
60
+ children: JSX.Element;
61
+ class?: string;
62
+ checked?: boolean;
63
+ onSelect?: () => void;
64
+ disabled?: boolean;
65
+ }): JSX.Element;
66
+ /**
67
+ * A single-select (radio) menu item.
68
+ * a11y: `role="menuitemradio"` + `aria-checked`. Behaves like the checkbox item —
69
+ * activating fires `onSelect` but KEEPS THE MENU OPEN (the consumer moves the
70
+ * selection within the group). The Check sits at the TRAILING edge so leading
71
+ * content aligns with plain items. Group membership is the consumer's concern;
72
+ * this primitive just renders the selected state and reports the click.
73
+ */
74
+ export declare function DropdownRadioItem(props: {
75
+ children: JSX.Element;
76
+ class?: string;
77
+ checked?: boolean;
78
+ onSelect?: () => void;
79
+ disabled?: boolean;
80
+ }): JSX.Element;
81
+ /**
82
+ * A nested menu group. Mirrors the `Dropdown` context shape with its own open
83
+ * signal + trigger/content refs, plus a small close-delay so a pointer can cross
84
+ * the gap from the trigger to the submenu without it snapping shut.
85
+ *
86
+ * The submenu is tied to its PARENT open state: when the parent menu closes
87
+ * (Escape/outside-click/select), `useDismiss` on the parent unmounts the whole
88
+ * content tree, which tears this provider down and drops the sub with it.
89
+ */
90
+ export declare function DropdownSub(props: {
91
+ children: JSX.Element;
92
+ }): JSX.Element;
93
+ /**
94
+ * The item that opens a submenu.
95
+ * a11y: `role="menuitem"` + `aria-haspopup="menu"` + `aria-expanded`, trailing
96
+ * ChevronRight. Opens on pointerenter, click, ArrowRight, and Enter/Space;
97
+ * keyboard-open also moves focus into the sub's first item. ArrowRight/Enter are
98
+ * swallowed so the parent menu doesn't also act on them.
99
+ */
100
+ export declare function DropdownSubTrigger(props: {
101
+ children: JSX.Element;
102
+ class?: string;
103
+ }): JSX.Element;
104
+ /**
105
+ * The submenu surface — same portal/positioning/roving-focus core as
106
+ * DropdownContent, anchored `right-start` off its trigger.
107
+ * a11y: ArrowLeft and Escape close the sub and RETURN FOCUS to the trigger;
108
+ * ArrowUp/Down/Home/End rove within; typeahead included (matches DropdownContent).
109
+ * Keyboard-open focuses the first item.
110
+ */
111
+ export declare function DropdownSubContent(props: {
112
+ children: JSX.Element;
113
+ class?: string;
20
114
  }): JSX.Element;
@@ -0,0 +1,26 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface EditableLabelProps {
3
+ /** The label text. */
4
+ value: string;
5
+ /** Controlled edit state. When it flips true the field opens; double-click and
6
+ * the host's `edit()` open it too. */
7
+ editing?: boolean;
8
+ /** Placeholder shown while editing (and as muted text when the value is empty). */
9
+ placeholder?: string;
10
+ /** Disable entering edit mode. */
11
+ disabled?: boolean;
12
+ /** Fires on commit (Enter / blur) with the new value — ONLY when it changed. */
13
+ onRename?: (value: string) => void;
14
+ /** Fires on Esc (cancel); the text is restored. */
15
+ onCancel?: () => void;
16
+ class?: string;
17
+ }
18
+ /**
19
+ * `EditableLabel`: inline rename. Shows `value` as text; double-click (or the
20
+ * `editing` prop, or a host `edit()`) swaps in an autofocused `Input` with the
21
+ * text pre-selected. Enter or blur commits (fires `onRename` only when the value
22
+ * changed); Esc cancels (fires `onCancel`, restores the text). Both exit editing.
23
+ *
24
+ * Parts: `text` (the read view), `input` (the field while editing).
25
+ */
26
+ export declare function EditableLabel(props: EditableLabelProps): JSX.Element;
@@ -1,9 +1,21 @@
1
- import { JSX } from 'solid-js';
1
+ import { JSX, Accessor } from 'solid-js';
2
2
  import { Placement } from '@floating-ui/dom';
3
+ /** Imperative open controller, handed to a parent (e.g. the kai-hover-card facade)
4
+ * via `controllerRef` so it can drive/observe open state. */
5
+ export interface HoverCardController {
6
+ open: Accessor<boolean>;
7
+ setOpen: (v: boolean) => void;
8
+ }
3
9
  export interface HoverCardRootProps {
4
10
  children: JSX.Element;
5
11
  openDelay?: number;
6
12
  closeDelay?: number;
13
+ /** Initial open state (uncontrolled seed). */
14
+ defaultOpen?: boolean;
15
+ /** When true, hover/focus never opens the card. */
16
+ disabled?: boolean;
17
+ /** Receive the open controller (open accessor + setOpen) once mounted. */
18
+ controllerRef?: (api: HoverCardController) => void;
7
19
  }
8
20
  export declare function HoverCardRoot(props: HoverCardRootProps): JSX.Element;
9
21
  export interface HoverCardTriggerProps {
@@ -0,0 +1,18 @@
1
+ import { JSX } from 'solid-js';
2
+ /** Render an item icon.
3
+ *
4
+ * Resolution order:
5
+ * 1. Known icon name (e.g. `"paperclip"`) → lucide-solid component.
6
+ * 2. URL / absolute path / data-URI → `<img>`.
7
+ * 3. Anything else → `<span>` text fallback.
8
+ * Returns `null` when `icon` is undefined/empty.
9
+ *
10
+ * The img and span branches render different markup, so they accept different
11
+ * class options: `imgClass` for the `<img>`, `spanClass` for the `<span>`.
12
+ * `class` is a shared fallback. Pass `ariaHidden` to mark the span decorative. */
13
+ export declare function renderIcon(icon: string | undefined, opts?: {
14
+ class?: string;
15
+ imgClass?: string;
16
+ spanClass?: string;
17
+ ariaHidden?: boolean;
18
+ }): JSX.Element;
@@ -0,0 +1,33 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface InputProps extends Omit<JSX.InputHTMLAttributes<HTMLInputElement>, 'onInput' | 'onChange' | 'size'> {
3
+ /** Field label rendered above the control and linked via `for`/`id`. */
4
+ label?: string;
5
+ /** Helper text rendered below the control. */
6
+ hint?: string;
7
+ /** Error text; rendered below the control and flips the field invalid. */
8
+ error?: string;
9
+ /** Control density. Defaults to `md`. */
10
+ size?: 'sm' | 'md';
11
+ /** Force the invalid (destructive-border) state without an `error` string. */
12
+ invalid?: boolean;
13
+ /** Leading affix (icon, unit). Rendered inside the field row, before the input. */
14
+ leading?: JSX.Element;
15
+ /** Trailing affix (icon, inline button). Rendered inside the field row, after the input. */
16
+ trailing?: JSX.Element;
17
+ /** Fires per keystroke with the current value. */
18
+ onValueInput?: (value: string) => void;
19
+ /** Fires on commit (blur) with the current value. */
20
+ onValueChange?: (value: string) => void;
21
+ }
22
+ export declare const FIELD_BASE = "w-full rounded-md border border-input bg-background px-3 py-2 text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:opacity-50 disabled:pointer-events-none";
23
+ /**
24
+ * `Input`: the token-themed single-line text field shell. A label/hint/error
25
+ * stack around a field row that holds an optional `leading` affix, the
26
+ * `<input>`, and an optional `trailing` affix. The shared border/background/ring
27
+ * styling lives here (the single field source the form widgets build on).
28
+ *
29
+ * Parts: `field` (the bordered control), `input`, `label`, `hint`.
30
+ * a11y: a generated id links `<label for>`; `invalid`/`error` set `aria-invalid`;
31
+ * the hint/error text is linked via `aria-describedby`.
32
+ */
33
+ export declare function Input(props: InputProps): JSX.Element;
@@ -0,0 +1,21 @@
1
+ import { JSX } from 'solid-js';
2
+ export type KbdPlatform = 'auto' | 'mac' | 'other';
3
+ export interface KbdProps extends JSX.HTMLAttributes<HTMLElement> {
4
+ /** Shortcut spec — tokens joined by `+` (e.g. `Mod+Shift+K`). When omitted,
5
+ * children render verbatim. Display only; `kai-kbd` does not bind keys. */
6
+ keys?: string;
7
+ /** Glyph platform. `mac` uses ⌘/⌥; `other` uses Ctrl. `auto` (default for the
8
+ * facade) sniffs the OS, SSR-safe (falls back to `other` on the server). */
9
+ platform?: KbdPlatform;
10
+ /** Cap size. Defaults to `md`. */
11
+ size?: 'sm' | 'md';
12
+ }
13
+ /**
14
+ * `Kbd`: a keyboard-shortcut display. Splits `keys` on `+`, maps each token to a
15
+ * platform glyph (`Mod` → ⌘ on mac else Ctrl, `Shift` → ⇧, `ArrowUp` → ↑, …) and
16
+ * renders each as an inset `part="key"` cap, with an empty `part="separator"` hook
17
+ * between caps. Token-driven, light + dark. Display only — it does not bind keys.
18
+ *
19
+ * When `keys` is omitted, the children render verbatim (use any custom content).
20
+ */
21
+ export declare function Kbd(props: KbdProps): JSX.Element;
@@ -0,0 +1,62 @@
1
+ import { JSX } from 'solid-js';
2
+ /** Status tone for a nav item's dot. `primary` is the theme accent; the rest use
3
+ * the kit's tool hues (the same colors as kai-status / kai-progress-bar). Generic
4
+ * enough for thread/onboarding states (success = "Completed", info = "Working")
5
+ * and task-run states (neutral = queued, info = running, success = done,
6
+ * error = failed). */
7
+ export type NavStatusTone = 'primary' | 'info' | 'success' | 'warning' | 'error' | 'neutral';
8
+ /** A small colored status indicator on a nav row. The `label` (when set) is folded
9
+ * into the row's accessible name; `pulse` adds an animated ping ring. */
10
+ export interface NavItemStatus {
11
+ tone: NavStatusTone;
12
+ /** Short status word ("Working", "Failed"). Shown as muted text and announced. */
13
+ label?: string;
14
+ /** Animated ping ring (disabled under prefers-reduced-motion). */
15
+ pulse?: boolean;
16
+ }
17
+ export interface KaiNavItem {
18
+ id: string;
19
+ label?: string;
20
+ /** Leading icon: a named icon, an image URL / data-URI, or plain text. */
21
+ icon?: string;
22
+ /** Trailing text pill (e.g. "Beta"). */
23
+ badge?: string;
24
+ /** Trailing icon (a named icon), e.g. an edit/compose affordance. */
25
+ trailing?: string;
26
+ disabled?: boolean;
27
+ /** Nested items. When present, the row becomes a collapsible group: a parent
28
+ * row with a disclosure chevron over an indented child list. Recurses for
29
+ * arbitrary depth (primarily 2 levels, e.g. project -> threads). */
30
+ children?: KaiNavItem[];
31
+ /** A small colored status dot (+ optional label) on the row. */
32
+ status?: NavItemStatus;
33
+ /** Right-aligned muted trailing text (e.g. a relative time, "24d ago").
34
+ * Distinct from `trailing` (a hover icon). */
35
+ meta?: string;
36
+ /** An interactive trailing action button (`icon` is a named icon; `label` is
37
+ * its accessible name). Activating it fires `onItemAction` and does NOT select
38
+ * the row. Distinct from `trailing` (a decorative hover icon, not a button). */
39
+ action?: {
40
+ icon: string;
41
+ label: string;
42
+ };
43
+ /** Render an interactive trailing close (×) button. Activating it fires
44
+ * `onItemClose` and does NOT select the row. */
45
+ closable?: boolean;
46
+ }
47
+ export interface NavProps extends JSX.HTMLAttributes<HTMLElement> {
48
+ items?: KaiNavItem[];
49
+ /** Active item id (drives aria-current + the selected look). */
50
+ value?: string;
51
+ onItemSelect?: (id: string) => void;
52
+ /** A row's trailing `action` button was activated (not a select). */
53
+ onItemAction?: (id: string, action?: {
54
+ icon: string;
55
+ label: string;
56
+ }) => void;
57
+ /** A `closable` row's trailing close button was activated (not a select). */
58
+ onItemClose?: (id: string) => void;
59
+ /** Ids of group items collapsed on first render. Groups default to expanded. */
60
+ defaultCollapsed?: string[];
61
+ }
62
+ export declare function Nav(props: NavProps): JSX.Element;
@@ -0,0 +1,31 @@
1
+ import { JSX } from 'solid-js';
2
+ export type NoticeSeverity = 'neutral' | 'info' | 'warning' | 'error' | 'success';
3
+ /** The default leading icon for a notice: `null` when `icon="none"`, the named
4
+ * icon when one is given, else the severity glyph. Exported so the `kai-notice`
5
+ * facade can use it as the fallback inside a `slot="icon"` escape hatch. */
6
+ export declare function noticeIconNode(severity: NoticeSeverity, icon?: string): JSX.Element;
7
+ export interface NoticeProps {
8
+ severity?: NoticeSeverity;
9
+ /** Leading icon: omit for the severity default, `"none"` to hide it, or a named
10
+ * icon to override. */
11
+ icon?: string;
12
+ /** A custom icon node that replaces the icon region entirely (the `kai-notice`
13
+ * facade passes a `slot="icon"` here, with the default icon as its fallback). */
14
+ iconSlot?: JSX.Element;
15
+ /** Render a dismiss (×) button that hides the notice and calls `onDismiss`. */
16
+ dismissible?: boolean;
17
+ /** Called after the notice is dismissed. */
18
+ onDismiss?: () => void;
19
+ /** The message. */
20
+ children: JSX.Element;
21
+ /** Optional trailing action (e.g. a link). */
22
+ action?: JSX.Element;
23
+ class?: string;
24
+ }
25
+ /**
26
+ * A self-contained inline notice / alert: a leading severity icon, a message, an
27
+ * optional trailing action, and an optional dismiss. Carries the right a11y role
28
+ * (`alert` for errors, `status` otherwise). Placement is the consumer's — this is
29
+ * just the notice box.
30
+ */
31
+ export declare function Notice(props: NoticeProps): JSX.Element;
@@ -29,6 +29,18 @@ export interface UsePositionOptions {
29
29
  placement?: Placement;
30
30
  gutter?: number;
31
31
  arrowEl?: Accessor<HTMLElement | undefined>;
32
+ /**
33
+ * Fired ONCE when the reference (anchor) "goes away" — either removed from the
34
+ * document OR hidden behind an `inert` ancestor (e.g. a modal/takeover that
35
+ * inert-s the background while open). In both cases the anchor is no longer a
36
+ * valid, interactive target, so the caller should close the overlay and unmount
37
+ * its portal instead of leaving it orphaned (floating over an inert background or
38
+ * anchored to a node that no longer exists). Anchored overlays portal OUT of the
39
+ * trigger's subtree, so Solid's onCleanup does not catch an anchor that is
40
+ * removed/inerted independently of the overlay component. Wire this to set the
41
+ * overlay's open state to false.
42
+ */
43
+ onDisconnect?: () => void;
32
44
  }
33
45
  /**
34
46
  * Position `floating` relative to `reference` using fixed strategy + autoUpdate,
@@ -0,0 +1,58 @@
1
+ import { JSX } from 'solid-js';
2
+ export interface PaneGridProps {
3
+ /** The panes - arbitrary N. Each top-level child is one tile in the grid. */
4
+ children: JSX.Element;
5
+ /** Minimum width of every pane, in px, before columns drop / the grid scrolls.
6
+ * Defaults to `280`. */
7
+ minPaneWidth?: number;
8
+ /** Minimum height of every pane, in px, before the grid scrolls vertically.
9
+ * Defaults to `200`. */
10
+ minPaneHeight?: number;
11
+ /** Column cap when the container is wide. Columns fill up to this many, then drop
12
+ * to fewer as the container narrows. Defaults to `3`. */
13
+ maxColumns?: number;
14
+ /** Gap between panes - any CSS length. Defaults to the kit gap
15
+ * (`var(--kai-pane-grid-gap, 0.5rem)`). */
16
+ gap?: string;
17
+ /** When set to a valid child index, render ONLY that pane full-bleed (a single
18
+ * filling cell) - a simple maximize hook the consumer drives. `null`/`undefined`
19
+ * (or an out-of-range index) shows the full tiled grid. */
20
+ maximizedIndex?: number | null;
21
+ /** Extra classes for the grid container. */
22
+ class?: string;
23
+ }
24
+ /**
25
+ * PaneGrid - an N-pane responsive tiling grid with a min-size + scroll floor.
26
+ *
27
+ * Lays an arbitrary number of panes out in a CSS grid that fills up to
28
+ * `maxColumns` columns when wide, then DROPS columns (maxColumns -> ... -> 1) as
29
+ * the container narrows - so panes never squish below their minimums. Once even one
30
+ * column can't hold a pane at `minPaneWidth`, the grid SCROLLS instead of shrinking
31
+ * the panes; rows are kept at least `minPaneHeight` tall the same way. Because new
32
+ * rows stack downward, the overflow is preferentially VERTICAL - horizontal scroll
33
+ * only appears when the container is narrower than a single pane's minimum.
34
+ *
35
+ * This generalizes the hand-rolled center grid from the Split Workspace demo, where
36
+ * `kai-resizable` (capped at 3 panes) couldn't express an arbitrary-N tiled grid.
37
+ *
38
+ * Column track (computed from the props):
39
+ *
40
+ * repeat(auto-fit, minmax(max(<minPaneWidth>px, (100% - <gaps>) / <maxColumns>), 1fr))
41
+ *
42
+ * where `<gaps>` is the total inter-column gap at the cap, `(maxColumns - 1) * gap`.
43
+ * The inner `max()` is the floor: each track is at least `minPaneWidth`, and at most
44
+ * `1fr`; the `(100% - gaps) / maxColumns` term is the per-column width WHEN the cap is
45
+ * filled, so `auto-fit` never packs in more than `maxColumns` columns. As the
46
+ * container shrinks past the point where a column can be `minPaneWidth` wide, a column
47
+ * drops; below one pane's minimum, the `overflow:auto` + `min-w-0`/`min-h-0` container
48
+ * scrolls.
49
+ *
50
+ * Maximize: when `maximizedIndex` points at a child, only that pane renders, in a
51
+ * single `1fr` x `1fr` cell that fills the grid. Restore by clearing the prop.
52
+ *
53
+ * The gap default reads `--kai-pane-grid-gap` (fallback `0.5rem`), so a consumer can
54
+ * retune spacing from outside without passing the prop. Everything is tokenized
55
+ * (surface/border come from whatever the panes use) - no hardcoded colors, so it
56
+ * reads correctly in light and dark.
57
+ */
58
+ export declare function PaneGrid(props: PaneGridProps): JSX.Element;
@@ -0,0 +1,75 @@
1
+ import { JSX } from 'solid-js';
2
+ import { PaneStatusTone } from './pane';
3
+ /** The work state of a tab's agent/process, mapped to the kit's tool / status
4
+ * hues — the SAME vocabulary as {@link './pane'.PaneStatus} and the AgentCard:
5
+ * working = blue, idle = muted, done = green, error = red, blocked = amber. */
6
+ export interface PaneTabStatus {
7
+ /** Which hue the numbered badge takes. */
8
+ tone: PaneStatusTone;
9
+ /** Optional status word shown on the active tab, on hover, and always for a
10
+ * needs-attention / error tab. Without it only the badge color carries state. */
11
+ label?: string;
12
+ /** Animate a ping ring around the badge — for the live `working` state.
13
+ * Respects prefers-reduced-motion. */
14
+ pulse?: boolean;
15
+ }
16
+ /** One tab in a {@link PaneGroup}: an agent/window shown in the strip. */
17
+ export interface PaneTab {
18
+ /** Stable id, emitted as the selected value throughout. */
19
+ id: string;
20
+ /** The tab name (the agent / window title). */
21
+ name: string;
22
+ /** Run status — drives the numbered badge color + the status word. Defaults to
23
+ * an `idle` (muted) badge with no word. */
24
+ status?: PaneTabStatus;
25
+ /** Raise the attention treatment: an amber ring + the status word always shown.
26
+ * The "this one wants you" signal. */
27
+ needsAttention?: boolean;
28
+ /** The keyboard NUMBER shown inside the badge (the ⌥-jump hint). Defaults to the
29
+ * tab's 1-based position in the strip. */
30
+ number?: number;
31
+ }
32
+ export interface PaneGroupProps {
33
+ /** The tabs, left → right. Each is one agent/window in the group. */
34
+ tabs: PaneTab[];
35
+ /** The active tab id. Defaults to the first tab. Drive it from `onTabChange`. */
36
+ active?: string;
37
+ /** A tab was selected (click, Enter/Space, or arrow-key move). */
38
+ onTabChange?: (id: string) => void;
39
+ /** A tab's close (×) was clicked. The consumer drops the tab from `tabs`. */
40
+ onTabClose?: (id: string) => void;
41
+ /** A tab's "…" overflow was clicked. The consumer wires the actual menu; the
42
+ * group only surfaces the affordance. Omit to hide the "…" button. */
43
+ onTabMenu?: (id: string) => void;
44
+ /** Highlight the frame with a ring/border to mark this as the ACTIVE group in a
45
+ * multi-group layout. */
46
+ focused?: boolean;
47
+ /** The active pane's body — the consumer owns it and swaps it on `onTabChange`. */
48
+ children?: JSX.Element;
49
+ /** Extra classes for the outer frame. */
50
+ class?: string;
51
+ }
52
+ /**
53
+ * PaneGroup — an editor group: a TAB STRIP (numbered-status-badge tabs) over a
54
+ * single CONTENT area showing the active tab's pane body. The reusable "one column
55
+ * = a group of agents shown as tabs" primitive from the Multi-Agent Workspace,
56
+ * extracted from the hand-rolled group in the Split Workspace demo.
57
+ *
58
+ * Each tab leads with a small TONE-COLORED NUMBERED BADGE — the color encodes the
59
+ * agent's run status, the digit is its keyboard (⌥-jump) number, unifying status +
60
+ * hint into one element — then the name, then the status WORD (shown on the active
61
+ * tab, on hover, and always for a needs-attention / error tab), an optional "…"
62
+ * overflow, and a close "×". The active tab is highlighted; a needs-attention tab
63
+ * carries an amber ring even when inactive.
64
+ *
65
+ * Composition: the group owns the tab UX; the CONSUMER owns the pane content. It
66
+ * renders `children` as the active pane's body and swaps it in response to
67
+ * `onTabChange`. Selection-only — it never routes content itself.
68
+ *
69
+ * Accessibility: `role="tablist"` strip, `role="tab"` tabs with roving tabindex
70
+ * and Arrow/Home/End navigation, the body as `role="tabpanel"`. Colors are all
71
+ * token-backed (surface / border / ring / tool-*), so it reads in light and dark.
72
+ * The strip, each tab, and the body are exposed via `::part(tabs|tab|body)` for
73
+ * the `kai-pane-group` facade. Give the group a bounded height for the body scroll.
74
+ */
75
+ export declare function PaneGroup(props: PaneGroupProps): JSX.Element;
@@ -0,0 +1,78 @@
1
+ import { JSX } from 'solid-js';
2
+ /** The work state of the pane's agent/process. Drives a tone-colored status dot
3
+ * (and optional label) in the header. */
4
+ export type PaneStatusTone = 'working' | 'idle' | 'done' | 'error' | 'blocked';
5
+ export interface PaneStatus {
6
+ /** The tone — maps to a semantic status hue (see {@link PANE_STATUS_BG}). */
7
+ tone: PaneStatusTone;
8
+ /** Optional text beside the dot (e.g. "Running tests…"). Without it the dot is
9
+ * decorative and only the color carries meaning. */
10
+ label?: string;
11
+ /** Animate a ping ring on the dot — for the live `working` state. Respects
12
+ * prefers-reduced-motion. */
13
+ pulse?: boolean;
14
+ }
15
+ /** tone → status-dot color utility, backed by the kit's tool-* / muted tokens so
16
+ * it reads correctly in BOTH light and dark without hardcoded colors.
17
+ * - `working` → blue (in-flight)
18
+ * - `idle` → neutral muted (waiting)
19
+ * - `done` → green (complete)
20
+ * - `error` → red (failed)
21
+ * - `blocked` → amber (needs input / stalled) */
22
+ export declare const PANE_STATUS_BG: Record<PaneStatusTone, string>;
23
+ export interface PaneProps {
24
+ /** A glyph/avatar shown before the title (an agent icon, a model avatar). */
25
+ leading?: JSX.Element;
26
+ /** The pane title — the agent / window name. */
27
+ title: string;
28
+ /** A role / label shown under the title (e.g. "Reviewer", "claude-sonnet"). */
29
+ subtitle?: string;
30
+ /** A tone-colored status dot (+ optional label) in the header. */
31
+ status?: PaneStatus;
32
+ /** Extra header controls, placed BEFORE the built-in window controls. */
33
+ actions?: JSX.Element;
34
+ /** The pane body — scrolls inside a `min-h-0 flex-1 overflow-y-auto` region. */
35
+ children?: JSX.Element;
36
+ /** A pinned row below the body (e.g. a composer). Stays put while the body scrolls. */
37
+ footer?: JSX.Element;
38
+ /** Highlight the frame with a ring/border to signal the ACTIVE pane. */
39
+ focused?: boolean;
40
+ /** Show the restore glyph (Minimize2) instead of maximize (Maximize2). */
41
+ maximized?: boolean;
42
+ /** Maximize/restore window control. */
43
+ onMaximize?: () => void;
44
+ /** Close window control. */
45
+ onClose?: () => void;
46
+ /** Optional split control — the button only renders when this is provided. */
47
+ onSplit?: () => void;
48
+ /** Optional dock-to-side control — the button only renders when this is provided. */
49
+ onDock?: () => void;
50
+ /** Extra classes for the outer frame. */
51
+ class?: string;
52
+ }
53
+ /**
54
+ * Pane — a reusable framed panel for a multi-agent workspace: a header (leading
55
+ * glyph + title/subtitle + status dot + actions + window controls), a scrolling
56
+ * body, and an optional pinned footer (e.g. a composer). It is the "pane frame"
57
+ * every agent tile otherwise re-hand-rolls.
58
+ *
59
+ * Layout: the outer frame is a column flexbox; the header and footer hold their
60
+ * height (`shrink-0`) while the body takes the rest (`min-h-0 flex-1
61
+ * overflow-y-auto`) so content scrolls INSIDE the pane. Give the pane a bounded
62
+ * height (a fixed parent, or `h-full` inside a grid/flex track) for the scroll to
63
+ * engage; the body imposes no padding so content controls its own.
64
+ *
65
+ * Window controls (right side of the header): maximize/restore (Maximize2 ↔
66
+ * Minimize2, toggled by `maximized`) and close (X) are always present; split
67
+ * (Columns2) and dock (PanelRight) only render when `onSplit` / `onDock` are
68
+ * passed. Each fires its callback prop.
69
+ *
70
+ * States: `focused` paints a ring + accent border to mark the active pane;
71
+ * `maximized` swaps the maximize glyph for restore.
72
+ *
73
+ * Colors come entirely from design tokens (surface / border / ring / tool-*),
74
+ * so it reads correctly in light and dark with no hardcoded values. The header,
75
+ * body, footer, and window-control cluster are exposed via
76
+ * `::part(header|body|footer|controls)` for the `kai-pane` facade.
77
+ */
78
+ export declare function Pane(props: PaneProps): JSX.Element;
@@ -1,5 +1,11 @@
1
- import { JSX } from 'solid-js';
1
+ import { JSX, Accessor } from 'solid-js';
2
2
  import { Placement } from '@floating-ui/dom';
3
+ /** Imperative open controller, handed to a parent (e.g. the kai-popover facade)
4
+ * via `controllerRef` so it can drive/observe open state. */
5
+ export interface PopoverController {
6
+ open: Accessor<boolean>;
7
+ setOpen: (v: boolean) => void;
8
+ }
3
9
  export interface PopoverProps {
4
10
  /** The trigger content (e.g. a button). Clicking it toggles the popover. */
5
11
  trigger: JSX.Element;
@@ -14,8 +20,12 @@ export interface PopoverProps {
14
20
  open?: boolean;
15
21
  /** Initial open state when uncontrolled. */
16
22
  defaultOpen?: boolean;
23
+ /** When true, clicking the trigger never opens the popover. */
24
+ disabled?: boolean;
17
25
  /** Fires whenever the popover wants to open or close. */
18
26
  onOpenChange?: (open: boolean) => void;
27
+ /** Receive the open controller (open accessor + setOpen) once mounted. */
28
+ controllerRef?: (api: PopoverController) => void;
19
29
  /** Extra elements counted as "inside" for outside-click dismissal — e.g. the
20
30
  * custom-element host, so clicks on slotted panel content don't dismiss. */
21
31
  boundary?: () => HTMLElement | undefined;
@@ -0,0 +1,23 @@
1
+ import { JSX } from 'solid-js';
2
+ export type ProgressTone = 'primary' | 'success' | 'warning' | 'error' | 'info';
3
+ /** Fill hue per `tone`. `primary` is the theme accent; the rest use the kit's
4
+ * tool hues (the same colors as kai-status / kai-notice). */
5
+ export declare const TONE_FILL: Record<ProgressTone, string>;
6
+ export interface ProgressBarProps extends JSX.HTMLAttributes<HTMLDivElement> {
7
+ /** Current progress value (0..max). */
8
+ value: number;
9
+ /** The value `value` runs to. Defaults to 100. */
10
+ max?: number;
11
+ /** Optional caption above the track. */
12
+ label?: string;
13
+ /** Fill color. Defaults to `primary`. Override via `::part(fill)` for custom hues. */
14
+ tone?: ProgressTone;
15
+ }
16
+ /**
17
+ * A thin determinate progress bar: a rounded track with a `bg-primary` fill whose
18
+ * width is `value / max`, clamped to 0..100%. Theme-aware (track = `bg-surface-strong`,
19
+ * fill = `bg-primary`). Set `tone` for a semantic fill hue. Restyle via
20
+ * `::part(track)` / `::part(fill)`. The fill width transitions smoothly under
21
+ * `prefers-reduced-motion: no-preference`.
22
+ */
23
+ export declare function ProgressBar(props: ProgressBarProps): JSX.Element;