@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
@@ -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,77 @@
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: a `role="group"` ("Open panes") strip of real `<button>` tab
70
+ * activators (NOT `role="tab"`, so the strip can legally own the per-tab menu/close
71
+ * buttons) with roving tabindex + Arrow/Home/End navigation; the active activator is
72
+ * marked `aria-current="true"`, and the body is the `role="tabpanel"`. Colors are all
73
+ * token-backed (surface / border / ring / tool-*), so it reads in light and dark.
74
+ * The strip, each tab, and the body are exposed via `::part(tabs|tab|body)` for
75
+ * the `kai-pane-group` facade. Give the group a bounded height for the body scroll.
76
+ */
77
+ 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;
@@ -0,0 +1,96 @@
1
+ import { JSX } from 'solid-js';
2
+ /** How the tray frames the input — the SPATIAL axis (padding/inset only).
3
+ * Orthogonal to {@link PromptDockAppearance}, which controls the surface.
4
+ * - `inset` (default) — uniform inset frames the input on ALL edges (the classic look).
5
+ * - `edge` — top/bottom inset only; the input sits FLUSH left/right so the lips span
6
+ * the full width.
7
+ * - `none` — no inset at all; the lips attach directly to the input as a plain stack. */
8
+ export type PromptDockFrame = 'inset' | 'edge' | 'none';
9
+ /** How the tray surface looks — the VISUAL axis (background / border / radius only).
10
+ * Orthogonal to {@link PromptDockFrame}, which controls the spatial inset. Works like
11
+ * a button variant.
12
+ * - `soft` (default) — sunken surface + border + radius (the classic look).
13
+ * - `outlined` — transparent surface + border + radius.
14
+ * - `filled` — sunken surface, no border, + radius.
15
+ * - `plain` — transparent surface, no border, no radius (truly bare). */
16
+ export type PromptDockAppearance = 'soft' | 'outlined' | 'filled' | 'plain';
17
+ export interface PromptDockProps {
18
+ /** Optional content for the recessed band ABOVE the input (a notice, a hint).
19
+ * When omitted, no top lip renders and only the input shows. */
20
+ top?: JSX.Element;
21
+ /** Optional content for the recessed band BELOW the input (a mode / control row).
22
+ * When omitted, no bottom lip renders. */
23
+ bottom?: JSX.Element;
24
+ /** Extra classes for the TOP lip wrapper, merged over the default band styling.
25
+ * Use this to give the top region its own surface (e.g. a tinted notice) without
26
+ * affecting the bottom. The eventual `kai-prompt-dock` element will expose the
27
+ * same region via `::part(top)`. */
28
+ topClass?: string;
29
+ /** Extra classes for the BOTTOM lip wrapper, merged over the default band styling.
30
+ * The eventual `kai-prompt-dock` element will expose this region via
31
+ * `::part(bottom)`. */
32
+ bottomClass?: string;
33
+ /** How the tray frames the input — the SPATIAL inset only. Defaults to `'inset'`
34
+ * (the classic recessed look), so existing consumers are unaffected.
35
+ * See {@link PromptDockFrame}. */
36
+ frame?: PromptDockFrame;
37
+ /** How the tray surface looks — the VISUAL axis (background / border / radius),
38
+ * orthogonal to `frame`. Defaults to `'soft'` (the classic look), so existing
39
+ * consumers are unaffected. See {@link PromptDockAppearance}. */
40
+ appearance?: PromptDockAppearance;
41
+ /** The prompt input - the raised card that floats on the tray. */
42
+ children: JSX.Element;
43
+ /** Extra classes for the outer tray. */
44
+ class?: string;
45
+ }
46
+ /**
47
+ * PromptDock - a recessed tray that frames a prompt input and can extend with
48
+ * optional "lip" regions above and/or below it.
49
+ *
50
+ * The model: the input stays the prominent, fully-rounded RAISED card; the lips
51
+ * sit in a slightly darker, RECESSED band tucked above and/or below it, sharing
52
+ * the tray's outer rounding so the whole thing reads as one cohesive control.
53
+ * When nothing is slotted top or bottom, only the input shows: no visible lip.
54
+ *
55
+ * Styling splits into two ORTHOGONAL axes so the spatial framing and the surface
56
+ * can be set independently (like a button's size vs. its variant):
57
+ *
58
+ * `frame` - the SPATIAL inset (padding only):
59
+ * - `inset` (default) - a small, uniform inset frames the input on EVERY side
60
+ * (the tray padding plus the flex gap give a ~6px frame). The classic look.
61
+ * - `edge` - top/bottom inset only; the input is FLUSH on the left / right so the
62
+ * lips span the full width. Matches the Claude Code / Codex references, where the
63
+ * lip is a top/bottom phenomenon.
64
+ * - `none` - no inset at all; the lips attach directly to the input as a plain
65
+ * vertical stack. The lips keep their own internal padding so content still has
66
+ * breathing room.
67
+ *
68
+ * `appearance` - the SURFACE (background / border / radius):
69
+ * - `soft` (default) - sunken surface + border + radius (the classic look).
70
+ * - `outlined` - transparent surface + border + radius.
71
+ * - `filled` - sunken surface, no border, + radius.
72
+ * - `plain` - transparent surface, no border, no radius (truly bare).
73
+ *
74
+ * The two are independent: e.g. `frame="none" appearance="plain"` is a bare stack,
75
+ * while `frame="inset" appearance="outlined"` keeps the inset but drops the fill.
76
+ *
77
+ * Surface, border, radius and inset come from four CSS custom-property TOKENS, so
78
+ * a consumer can fine-tune the chrome without touching internals (override the var
79
+ * from outside; the variant chooses the structure). Each is referenced with a
80
+ * fallback so it resolves stand-alone:
81
+ * - `--kai-prompt-dock-surface` - tray background (default `var(--color-surface-sunken)`)
82
+ * - `--kai-prompt-dock-border` - tray border color (default `var(--color-border)`)
83
+ * - `--kai-prompt-dock-radius` - outer radius (default `1.25rem`)
84
+ * - `--kai-prompt-dock-inset` - frame thickness around the input (default `0.375rem`)
85
+ *
86
+ * Colors default to the surface tokens (surface-sunken for the tray and lips; the
87
+ * input brings its own raised bg-surface), so it reads correctly in both light and
88
+ * dark themes without hardcoded colors. The top and bottom lips are independently
89
+ * styleable via `topClass` / `bottomClass` (e.g. a tinted notice up top over a
90
+ * neutral control row below).
91
+ *
92
+ * The eventual `kai-prompt-dock` element will expose the same three regions via
93
+ * `::part(tray)` / `::part(top)` / `::part(bottom)`; the primitive's equivalent
94
+ * hooks are the `class` / `topClass` / `bottomClass` props.
95
+ */
96
+ export declare function PromptDock(props: PromptDockProps): JSX.Element;
@@ -20,6 +20,18 @@ export declare function normalizeSize(value: SizeValue | undefined): string | un
20
20
  * Returns `undefined` when the value is unset.
21
21
  */
22
22
  export declare function resolveToPx(value: SizeValue | undefined, containerPx: number): number | undefined;
23
+ /**
24
+ * Build a panel's INITIAL `flex-basis`, clamped into its `[min, max]` bounds so
25
+ * it never PAINTS past its max (or below its min). The drag handler already
26
+ * clamps, but only once a drag begins — without this, a percentage default on a
27
+ * wide container (e.g. `40%` against a `480px` max) renders wider than max and
28
+ * then SNAPS to max on the first resize. Uses CSS `clamp()`/`min()`/`max()` so
29
+ * the bound is enforced at layout time against the live container size, with
30
+ * MIXED units (a `%` default vs a `px` max) resolving correctly — no JS measure.
31
+ * `basis`/`min`/`max` are already-normalized CSS lengths (see `normalizeSize`);
32
+ * an undefined `basis` stays undefined → the caller falls back to flexible.
33
+ */
34
+ export declare function clampBasis(basis: string | undefined, min: string | undefined, max: string | undefined): string | undefined;
23
35
  export interface ResizablePanelGroupProps extends JSX.HTMLAttributes<HTMLDivElement> {
24
36
  orientation?: Orientation;
25
37
  children: JSX.Element;
@@ -1,5 +1,9 @@
1
1
  import { JSX } from 'solid-js';
2
+ export type ScrollOrientation = 'vertical' | 'horizontal' | 'both';
2
3
  export interface ScrollAreaProps extends JSX.HTMLAttributes<HTMLDivElement> {
3
4
  children: JSX.Element;
5
+ /** Which axis scrolls. `vertical` (default) · `horizontal` · `both`. The cross
6
+ * axis is clamped to `hidden` so content can't overflow it. */
7
+ orientation?: ScrollOrientation;
4
8
  }
5
9
  export declare function ScrollArea(props: ScrollAreaProps): JSX.Element;