@kitn.ai/ui 0.26.0 → 0.28.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 (488) hide show
  1. package/README.md +25 -6
  2. package/bin/mcp.js +16 -3
  3. package/bin/route.js +23 -0
  4. package/bin/route.test.js +58 -0
  5. package/dist/{elements/chunks/Icon--Y8vsFal.js → Icon-DObhsRtm.js} +1 -1
  6. package/dist/action-icons-CcgNN2oT.js +1 -0
  7. package/dist/arrow-down-CjRU3JgV.js +1 -0
  8. package/dist/arrow-left-Bnpb1UEW.js +1 -0
  9. package/dist/artifact-Bwt7OgcR.js +1 -0
  10. package/dist/assets/dev-5XzXYR21.js +91 -0
  11. package/dist/attachments-Qr4kg-2b.js +1 -0
  12. package/dist/{elements/chunks/audio-visualizer-D7lB6mvR.js → audio-visualizer-DToYdfSc.js} +1 -1
  13. package/dist/badge-CdEu_jn2.js +1 -0
  14. package/dist/bash-InADTalH.js +1 -6
  15. package/dist/bell-DQAAOpDz.js +1 -0
  16. package/dist/{elements/chunks/button-flUbeufF.js → button-DkuOnGLy.js} +1 -1
  17. package/dist/card-renderer-Jx70m6_l.js +1 -0
  18. package/dist/card-routing-0YidER_3.js +1 -0
  19. package/dist/check-njkVdZu2.js +1 -0
  20. package/dist/checkbox-D7iRB3nL.js +1 -0
  21. package/dist/checkbox-group-B2_rpoPM.js +1 -0
  22. package/dist/chevron-down-B72s6PXR.js +1 -0
  23. package/dist/chevron-right-BatuHzUm.js +1 -0
  24. package/dist/choice-card-m0BYqqOK.js +1 -0
  25. package/dist/circle-check-B62pODB3.js +1 -0
  26. package/dist/circle-x-BPG0iPst.js +1 -0
  27. package/dist/circle-zx0ByzY9.js +1 -0
  28. package/dist/{elements/chunks/cn-CU7UAWzk.js → cn-DN5AWfiS.js} +1 -1
  29. package/dist/code-block-ClMLKb7C.js +1 -0
  30. package/dist/{elements/chunks/collapsible-BzbXpPzr.js → collapsible-B4DlWicL.js} +1 -1
  31. package/dist/components/attachment-types.d.ts +7 -0
  32. package/dist/components/audio-visualizer/fit-scale.d.ts +1 -1
  33. package/dist/components/card-renderer.d.ts +13 -0
  34. package/dist/components/card.d.ts +4 -0
  35. package/dist/components/chat-thread.d.ts +135 -2
  36. package/dist/components/conversation-item.d.ts +35 -7
  37. package/dist/components/conversation-list.d.ts +17 -5
  38. package/dist/components/conversation-panel.d.ts +29 -0
  39. package/dist/components/form-widgets.d.ts +67 -2
  40. package/dist/components/form.d.ts +48 -1
  41. package/dist/components/home-panel.d.ts +34 -0
  42. package/dist/components/message.d.ts +25 -3
  43. package/dist/components/reasoning.d.ts +6 -0
  44. package/dist/components/scroll-button.d.ts +11 -0
  45. package/dist/components/thread.d.ts +5 -0
  46. package/dist/components/tool-types.d.ts +9 -0
  47. package/dist/components/widget-tab-bar.d.ts +16 -0
  48. package/dist/composer-sQ0HcvyG.js +106 -0
  49. package/dist/confirm-card-rQWDQsnC.js +1 -0
  50. package/dist/construct-cli.es.js +1337 -0
  51. package/dist/{elements/chunks/context-VLIL3sJ-.js → context-0kg4ZX1J.js} +1 -1
  52. package/dist/controllable-CnGpMF6r.js +1 -0
  53. package/dist/conversation-item-BxwQLaFJ.js +1 -0
  54. package/dist/conversation-list-BCfGN1JU.js +1 -0
  55. package/dist/copy-n9u9rqpi.js +1 -0
  56. package/dist/core-AYMC6_lb.js +12 -5874
  57. package/dist/{create-tween-BFT6c-Y8.js → create-tween-C-q-JCM-.js} +1 -1
  58. package/dist/{create-tween-CJNlzoaO.js → create-tween-CRrJXxBd.js} +1 -1
  59. package/dist/{create-tween-CQED4T0g.js → create-tween-DZ3RRDHD.js} +1 -1
  60. package/dist/{elements/chunks/create-tween-c4Z8TDYz.js → create-tween-uPkArjIG.js} +2 -2
  61. package/dist/css-M7EaDHN_.js +1 -6
  62. package/dist/custom-elements.json +1433 -202
  63. package/dist/default-input-CaMrJkgH.js +1 -0
  64. package/dist/define-By-uL588.js +1 -0
  65. package/dist/define.d.ts +4 -0
  66. package/dist/define.js +510 -0
  67. package/dist/define.server.d.ts +5 -0
  68. package/dist/define.server.js +506 -0
  69. package/dist/{elements/chunks/disclosure-CcNbyLy0.js → disclosure-WUImBbDv.js} +1 -1
  70. package/dist/{elements/chunks/dropdown-BgWTthUx.js → dropdown-wZVeJOMd.js} +1 -1
  71. package/dist/elements/agent-card.js +1 -1
  72. package/dist/elements/artifact.js +1 -1
  73. package/dist/elements/attachments.js +1 -1
  74. package/dist/elements/audio-visualizer.js +1 -1
  75. package/dist/elements/autoloader.js +1 -1
  76. package/dist/elements/avatar.js +1 -1
  77. package/dist/elements/badge.js +1 -1
  78. package/dist/elements/button.js +1 -1
  79. package/dist/elements/card.js +1 -1
  80. package/dist/elements/cards.js +1 -1
  81. package/dist/elements/chain-of-thought.js +1 -1
  82. package/dist/elements/chat-scope-picker.js +1 -1
  83. package/dist/elements/chat-workspace.js +1 -1
  84. package/dist/elements/chat.js +1 -1
  85. package/dist/elements/checkbox-group.d.ts +1 -0
  86. package/dist/elements/checkbox-group.js +1 -0
  87. package/dist/elements/checkbox.d.ts +1 -0
  88. package/dist/elements/checkbox.js +1 -0
  89. package/dist/elements/checkpoint.js +1 -1
  90. package/dist/elements/choice.js +1 -1
  91. package/dist/elements/coachmark.js +1 -1
  92. package/dist/elements/code-block.js +1 -1
  93. package/dist/elements/command.js +1 -1
  94. package/dist/elements/compare.js +1 -1
  95. package/dist/elements/composer.js +1 -1
  96. package/dist/elements/confirm-card.js +1 -1
  97. package/dist/elements/context-meter.js +1 -1
  98. package/dist/elements/conversation-item.js +1 -1
  99. package/dist/elements/conversation-list.js +1 -1
  100. package/dist/elements/define-entry.d.ts +12 -0
  101. package/dist/elements/dialog.js +1 -1
  102. package/dist/elements/dock.js +102 -8
  103. package/dist/elements/dropdown.js +1 -1
  104. package/dist/elements/editable-label.js +1 -1
  105. package/dist/elements/element-data-types.d.ts +37 -0
  106. package/dist/elements/embed.js +1 -1
  107. package/dist/elements/empty.js +1 -1
  108. package/dist/elements/feedback-bar.js +1 -1
  109. package/dist/elements/file-tree.js +1 -1
  110. package/dist/elements/file-upload.js +1 -1
  111. package/dist/elements/form.js +1 -1
  112. package/dist/elements/hover-card.js +1 -1
  113. package/dist/elements/icon.js +1 -1
  114. package/dist/elements/image.js +1 -1
  115. package/dist/elements/input.js +1 -1
  116. package/dist/elements/kbd.js +1 -1
  117. package/dist/elements/link-preview.js +1 -1
  118. package/dist/elements/loader.js +1 -1
  119. package/dist/elements/markdown.js +1 -1
  120. package/dist/elements/menu.js +1 -1
  121. package/dist/elements/message-skills.js +1 -1
  122. package/dist/elements/message.js +1 -1
  123. package/dist/elements/model-switcher.js +1 -1
  124. package/dist/elements/nav.js +1 -1
  125. package/dist/elements/notice.js +1 -1
  126. package/dist/elements/pane-grid.d.ts +1 -0
  127. package/dist/elements/pane-grid.js +1 -0
  128. package/dist/elements/pane-group.js +1 -1
  129. package/dist/elements/pane.js +1 -1
  130. package/dist/elements/popover.js +1 -1
  131. package/dist/elements/progress-bar.js +1 -1
  132. package/dist/elements/prompt-dock.js +1 -1
  133. package/dist/elements/prompt-input.js +1 -1
  134. package/dist/elements/prompt-suggestions.js +1 -1
  135. package/dist/elements/radio-group.d.ts +1 -0
  136. package/dist/elements/radio-group.js +1 -0
  137. package/dist/elements/reasoning.js +1 -1
  138. package/dist/elements/remote.js +1 -1
  139. package/dist/elements/resizable.js +1 -1
  140. package/dist/elements/response-stream.js +2 -2
  141. package/dist/elements/screen.js +1 -1
  142. package/dist/elements/scroll-area.js +1 -1
  143. package/dist/elements/scroll-button.js +1 -1
  144. package/dist/elements/search.js +1 -1
  145. package/dist/elements/segmented.js +1 -1
  146. package/dist/elements/select.d.ts +1 -0
  147. package/dist/elements/select.js +1 -0
  148. package/dist/elements/separator.js +1 -1
  149. package/dist/elements/setting-item.js +1 -1
  150. package/dist/elements/settings-group.js +1 -1
  151. package/dist/elements/skeleton.js +1 -1
  152. package/dist/elements/slider.d.ts +1 -0
  153. package/dist/elements/slider.js +1 -0
  154. package/dist/elements/slots.d.ts +1 -1
  155. package/dist/elements/source.js +1 -1
  156. package/dist/elements/status.js +1 -1
  157. package/dist/elements/switch.js +1 -1
  158. package/dist/elements/tabs.js +1 -1
  159. package/dist/elements/tasks.js +1 -1
  160. package/dist/elements/text-shimmer.js +1 -1
  161. package/dist/elements/thinking-bar.js +1 -1
  162. package/dist/elements/thread.js +1 -1
  163. package/dist/elements/toast.js +1 -1
  164. package/dist/elements/tool.js +1 -1
  165. package/dist/elements/tooltip.js +1 -1
  166. package/dist/elements/voice-input.js +1 -1
  167. package/dist/elements/voice-output.js +1 -1
  168. package/dist/elements.d.ts +380 -26
  169. package/dist/{elements/chunks/ellipsis-7gU33mL2.js → ellipsis-CbOpJnU3.js} +1 -1
  170. package/dist/embed-CrfjkbUG.js +1 -0
  171. package/dist/engine-javascript-vq0WuIJl.js +14 -2516
  172. package/dist/{elements/chunks/external-link-CSOEsNlx.js → external-link-ByXAwBBQ.js} +1 -1
  173. package/dist/file-text-DMib2qwt.js +1 -0
  174. package/dist/{elements/chunks/file-tree-zvB2i7P9.js → file-tree-CJqM2aP7.js} +1 -1
  175. package/dist/folder-_BAb929C.js +1 -0
  176. package/dist/form-DSZgZQZk.js +1 -0
  177. package/dist/github-dark-dimmed-DUshB20C.js +1 -4
  178. package/dist/github-light-JYsPkUQd.js +1 -4
  179. package/dist/hover-card-BQbul9eq.js +1 -0
  180. package/dist/html-CPZ3oZQ7.js +1 -10
  181. package/dist/icon-CdcfRhYI.js +1 -0
  182. package/dist/{elements/chunks/index-BCRhi84a.js → index-xu_pdcPi.js} +1 -1
  183. package/dist/index.d.ts +4 -2
  184. package/dist/index.js +7474 -5857
  185. package/dist/index.server.js +5965 -4762
  186. package/dist/info-DsFjGuI_.js +1 -0
  187. package/dist/input-DKbmkMos.js +1 -0
  188. package/dist/javascript-C25yR2R2.js +1 -6
  189. package/dist/json-DxJze_jm.js +1 -6
  190. package/dist/kai.es.js +1 -1
  191. package/dist/kbd-PvdGhX4s.js +1 -0
  192. package/dist/{elements/chunks/link-preview-OQ9IEq0f.js → link-preview-DbM1866N.js} +1 -1
  193. package/dist/link-zF8PzWfF.js +1 -0
  194. package/dist/loader-BM4CEz4G.js +1 -0
  195. package/dist/{elements/chunks/markdown-DgBFaGAz.js → markdown-LMvmAyBk.js} +7 -7
  196. package/dist/mcp.es.js +1361 -81
  197. package/dist/message-BSsgvHvf.js +1 -0
  198. package/dist/message-BYZECyek.js +1 -0
  199. package/dist/message-circle-DruwObfX.js +1 -0
  200. package/dist/message-square-BG6q6mlm.js +1 -0
  201. package/dist/{elements/chunks/minimize-2-DPIUKTrT.js → minimize-2-BQRoBV1V.js} +1 -1
  202. package/dist/{elements/chunks/model-switcher-DsT8tFB0.js → model-switcher-CMpCOYcB.js} +1 -1
  203. package/dist/{elements/chunks/overlay-DuiwdXjm.js → overlay-Cb-MkyDa.js} +1 -1
  204. package/dist/panel-right-i8warFxT.js +1 -0
  205. package/dist/paperclip-ByY3UVO6.js +1 -0
  206. package/dist/play-BvKKq3fX.js +1 -0
  207. package/dist/primitives/card-data-types.d.ts +49 -0
  208. package/dist/primitives/card-routing.d.ts +1 -33
  209. package/dist/primitives/card-validate.d.ts +2 -2
  210. package/dist/primitives/chat-config.d.ts +29 -2
  211. package/dist/primitives/conversation-store.d.ts +54 -0
  212. package/dist/primitives/field-mask.d.ts +96 -0
  213. package/dist/primitives/field-semantics.d.ts +36 -0
  214. package/dist/primitives/input-mask.d.ts +46 -0
  215. package/dist/primitives/url-scheme-policy.d.ts +34 -0
  216. package/dist/primitives/use-resize-observer.d.ts +2 -2
  217. package/dist/progress-bar-jVAHvMUf.js +1 -0
  218. package/dist/prompt-suggestion-CD-qtNgC.js +1 -0
  219. package/dist/radio-BsoBMhkF.js +1 -0
  220. package/dist/react/index.d.ts +586 -19
  221. package/dist/react.js +223 -187
  222. package/dist/reasoning-4kBPtlTx.js +1 -0
  223. package/dist/register-impl-B1hLkrI8.js +424 -0
  224. package/dist/{elements/chunks/resizable-D181b4fM.js → resizable-uPmY9VY-.js} +1 -1
  225. package/dist/rotate-ccw-B2xn93py.js +1 -0
  226. package/dist/rotate-cw-CMVLoCyH.js +1 -0
  227. package/dist/schemas/form.schema.json +21 -1
  228. package/dist/schemas/tool-defs.d.ts +11 -1
  229. package/dist/schemas.js +81 -81
  230. package/dist/scroll-area-BqLUo8ZZ.js +1 -0
  231. package/dist/scroll-button-DslXiJyL.js +1 -0
  232. package/dist/select-2cLRtPGT.js +1 -0
  233. package/dist/{elements/chunks/separator-CeJHQqLW.js → separator-BWQtNJcM.js} +1 -1
  234. package/dist/{elements/chunks/settings-CqaHgJF9.js → settings-BBR63jLg.js} +1 -1
  235. package/dist/{elements/chunks/settings-group-CjqjLCOn.js → settings-group-B2ciy-Iw.js} +1 -1
  236. package/dist/{elements/chunks/skeleton-D8akBnKS.js → skeleton-CkHI-HgC.js} +1 -1
  237. package/dist/slider-DDR9U-i0.js +1 -0
  238. package/dist/{solid-BtdqNZI7.js → solid-BzCFdL25.js} +9771 -7594
  239. package/dist/{solid-CnavwBye.js → solid-DruVOXnf.js} +7893 -6183
  240. package/dist/solid.d.ts +16 -2
  241. package/dist/solid.js +256 -243
  242. package/dist/solid.server.js +256 -243
  243. package/dist/source-GEnFF528.js +1 -0
  244. package/dist/star-CilHq8GP.js +1 -0
  245. package/dist/state/index.d.ts +1 -1
  246. package/dist/state/mock.d.ts +32 -2
  247. package/dist/state.js +133 -108
  248. package/dist/store-Ciyk6eZG.js +1 -0
  249. package/dist/svelte--5p79yCD.js +1 -15
  250. package/dist/switch-KkeQIbuH.js +1 -0
  251. package/dist/tasks-card-BrN4bggJ.js +1 -0
  252. package/dist/text-shimmer-Dcj1MHuq.js +1 -0
  253. package/dist/textarea-Dpvbngbg.js +1 -0
  254. package/dist/theme.tokens.css +110 -13
  255. package/dist/{elements/chunks/thumbs-up-DX2Ijk3H.js → thumbs-up-CsT9Wzb9.js} +1 -1
  256. package/dist/toast-store-tgK6MuMv.js +1 -0
  257. package/dist/{elements/chunks/tool-DKQ2D1DP.js → tool-DzUjIBT8.js} +1 -1
  258. package/dist/{elements/chunks/tooltip-B0G99y8w.js → tooltip-Bkkg_4t0.js} +1 -1
  259. package/dist/trash-2-jBKxjGGQ.js +1 -0
  260. package/dist/{elements/chunks/triangle-alert-F9cyUEyy.js → triangle-alert-DlQ68ppf.js} +1 -1
  261. package/dist/tsx-B8rCNbgL.js +1 -6
  262. package/dist/types.d.ts +48 -3
  263. package/dist/typescript-RycA9KXf.js +1 -6
  264. package/dist/ui/checkbox-group.d.ts +83 -0
  265. package/dist/ui/checkbox.d.ts +40 -0
  266. package/dist/ui/dock.d.ts +51 -0
  267. package/dist/ui/icon.d.ts +3 -0
  268. package/dist/ui/input.d.ts +48 -2
  269. package/dist/ui/radio.d.ts +85 -0
  270. package/dist/ui/select.d.ts +71 -0
  271. package/dist/ui/slider.d.ts +65 -0
  272. package/dist/ui/switch.d.ts +9 -2
  273. package/dist/upload-TcAHXv9W.js +1 -0
  274. package/dist/url-scheme-policy-DR5DgvkM.js +1 -0
  275. package/dist/use-card-resolution-DaZqAdWf.js +1 -0
  276. package/dist/{elements/chunks/variant-aurora-qt6Zct8M.js → variant-aurora-BhLuYxJR.js} +1 -1
  277. package/dist/{variant-aurora-B8II3-I1.js → variant-aurora-CNmfHhcx.js} +2 -2
  278. package/dist/{variant-aurora-CMNWOSJR.js → variant-aurora-D6GsdTPA.js} +2 -2
  279. package/dist/{variant-aurora-CcuDMWwQ.js → variant-aurora-DbW_OWL2.js} +1 -1
  280. package/dist/{elements/chunks/variant-custom-tJp22_BQ.js → variant-custom-BRvaNHSi.js} +1 -1
  281. package/dist/{variant-custom-L16JLLZy.js → variant-custom-BvYHR62b.js} +1 -1
  282. package/dist/{variant-custom-BdvYC7af.js → variant-custom-DMTrEO5w.js} +2 -2
  283. package/dist/{variant-custom-C714mqKl.js → variant-custom-DV2x254s.js} +2 -2
  284. package/dist/{variant-wave-ecwykeyL.js → variant-wave-BNMGrDfj.js} +2 -2
  285. package/dist/{variant-wave-2S4La2Ka.js → variant-wave-BpDd8t3Z.js} +1 -1
  286. package/dist/{variant-wave-D7ruiA1W.js → variant-wave-CyBueXj9.js} +2 -2
  287. package/dist/{elements/chunks/variant-wave-CaQ5ti39.js → variant-wave-sp-qwsdI.js} +1 -1
  288. package/dist/vue-BmIZj4XD.js +1 -33
  289. package/dist/x-Z5UntkIJ.js +1 -0
  290. package/frameworks/react/index.tsx +210 -22
  291. package/llms-full.txt +1184 -22
  292. package/llms.txt +6 -3
  293. package/package.json +17 -4
  294. package/src/agent-tooling/README.md +192 -0
  295. package/src/agent-tooling/catalog/invariants.ts +3 -3
  296. package/src/agent-tooling/catalog/surfaces.ts +72 -0
  297. package/src/agent-tooling/construct/cli-entry.ts +8 -0
  298. package/src/agent-tooling/construct/cli.ts +147 -0
  299. package/src/agent-tooling/construct/codegen.ts +1635 -0
  300. package/src/agent-tooling/construct/construct.v1.schema.json +319 -0
  301. package/src/agent-tooling/construct/dev.ts +148 -0
  302. package/src/agent-tooling/construct/fixtures/demo-widget.construct.json +7 -0
  303. package/src/agent-tooling/construct/fixtures/ops-console.construct.json +44 -0
  304. package/src/agent-tooling/construct/fixtures/owner-widget.construct.json +32 -0
  305. package/src/agent-tooling/construct/schema.ts +452 -0
  306. package/src/agent-tooling/mcp/server.ts +2 -1
  307. package/src/agent-tooling/mcp/tools/construct.ts +130 -0
  308. package/src/agent-tooling/mcp/tools/debug.ts +126 -4
  309. package/src/agent-tooling/mcp/tools/reference.ts +104 -3
  310. package/src/agent-tooling/recipes/composed-thread.ts +714 -0
  311. package/src/agent-tooling/recipes/index.ts +22 -0
  312. package/src/agent-tooling/recipes/types.ts +32 -0
  313. package/src/agent-tooling/registry.ts +5 -0
  314. package/src/components/attachment-types.ts +7 -0
  315. package/src/components/audio-visualizer/fit-scale.ts +1 -1
  316. package/src/components/card-renderer.tsx +39 -8
  317. package/src/components/card.tsx +10 -2
  318. package/src/components/chat-scope-picker.tsx +2 -2
  319. package/src/components/chat-thread.tsx +602 -43
  320. package/src/components/choice-card.tsx +102 -37
  321. package/src/components/coachmark.tsx +1 -1
  322. package/src/components/code-block.tsx +2 -2
  323. package/src/components/composer.tsx +89 -15
  324. package/src/components/confirm-card.tsx +20 -4
  325. package/src/components/conversation-item.tsx +56 -9
  326. package/src/components/conversation-list.tsx +25 -10
  327. package/src/components/conversation-panel.tsx +118 -0
  328. package/src/components/empty.tsx +14 -3
  329. package/src/components/file-tree.tsx +5 -1
  330. package/src/components/form-widgets.tsx +257 -195
  331. package/src/components/form.tsx +297 -9
  332. package/src/components/home-panel.tsx +159 -0
  333. package/src/components/loader.tsx +12 -5
  334. package/src/components/message-skills.tsx +1 -1
  335. package/src/components/message.tsx +71 -11
  336. package/src/components/prompt-input.tsx +7 -1
  337. package/src/components/prompt-suggestion.tsx +4 -1
  338. package/src/components/reasoning.tsx +30 -3
  339. package/src/components/response-compare.tsx +2 -2
  340. package/src/components/scroll-button.tsx +56 -4
  341. package/src/components/source.tsx +6 -1
  342. package/src/components/tasks-card.tsx +58 -16
  343. package/src/components/thread.tsx +10 -1
  344. package/src/components/toast.tsx +1 -1
  345. package/src/components/tool-types.ts +9 -0
  346. package/src/components/widget-tab-bar.tsx +73 -0
  347. package/src/elements/attachments.tsx +3 -1
  348. package/src/elements/chat-workspace.tsx +1 -1
  349. package/src/elements/chat.tsx +115 -5
  350. package/src/elements/checkbox-group.tsx +164 -0
  351. package/src/elements/checkbox.tsx +134 -0
  352. package/src/elements/compiled.css +1 -1
  353. package/src/elements/composer.tsx +12 -1
  354. package/src/elements/conversation-item.tsx +62 -22
  355. package/src/elements/conversation-list.tsx +2 -2
  356. package/src/elements/define-entry.ts +12 -0
  357. package/src/elements/dock.tsx +11 -0
  358. package/src/elements/element-data-types.ts +40 -0
  359. package/src/elements/element-manifest.json +24 -0
  360. package/src/elements/element-meta.json +767 -34
  361. package/src/elements/element-nonscalar.json +17 -0
  362. package/src/elements/element-types.d.ts +380 -26
  363. package/src/elements/feedback-bar.tsx +5 -0
  364. package/src/elements/icon-names.json +29 -0
  365. package/src/elements/input.tsx +312 -23
  366. package/src/elements/message.tsx +2 -0
  367. package/src/elements/pane-grid.tsx +111 -0
  368. package/src/elements/prompt-input.tsx +8 -2
  369. package/src/elements/radio-group.tsx +129 -0
  370. package/src/elements/register-impl.ts +6 -0
  371. package/src/elements/scroll-button.tsx +54 -6
  372. package/src/elements/select.tsx +165 -0
  373. package/src/elements/slider.tsx +171 -0
  374. package/src/elements/slots.ts +1 -1
  375. package/src/elements/styles.css +89 -3
  376. package/src/elements/thread.tsx +2 -0
  377. package/src/elements/toast.tsx +14 -1
  378. package/src/index.ts +5 -2
  379. package/src/primitives/card-data-types.ts +49 -0
  380. package/src/primitives/card-host.tsx +4 -2
  381. package/src/primitives/card-routing.ts +7 -56
  382. package/src/primitives/card-schemas/form.schema.json +21 -1
  383. package/src/primitives/card-validate.ts +10 -2
  384. package/src/primitives/chat-config.tsx +33 -6
  385. package/src/primitives/conversation-store.ts +248 -0
  386. package/src/primitives/field-mask.ts +256 -0
  387. package/src/primitives/field-semantics.ts +115 -0
  388. package/src/primitives/input-mask.ts +853 -0
  389. package/src/primitives/toast-store.ts +66 -4
  390. package/src/primitives/url-scheme-policy.ts +70 -0
  391. package/src/primitives/use-resize-observer.ts +2 -2
  392. package/src/schemas/tool-defs.ts +12 -2
  393. package/src/solid.ts +20 -2
  394. package/src/state/index.ts +1 -1
  395. package/src/state/mock.ts +92 -6
  396. package/src/types.ts +45 -3
  397. package/src/ui/agent-card.tsx +2 -2
  398. package/src/ui/avatar.tsx +1 -1
  399. package/src/ui/checkbox-group.tsx +153 -0
  400. package/src/ui/checkbox.tsx +63 -0
  401. package/src/ui/dock.tsx +192 -7
  402. package/src/ui/icon.tsx +53 -0
  403. package/src/ui/input.tsx +249 -9
  404. package/src/ui/kbd.tsx +1 -1
  405. package/src/ui/nav.tsx +1 -1
  406. package/src/ui/pane-group.tsx +2 -2
  407. package/src/ui/radio.tsx +150 -0
  408. package/src/ui/select.tsx +168 -0
  409. package/src/ui/slider.tsx +178 -0
  410. package/src/ui/switch.tsx +49 -18
  411. package/src/utils/cn.ts +11 -5
  412. package/theme.css +112 -13
  413. package/dist/elements/chunks/action-icons-D9u3OzYW.js +0 -1
  414. package/dist/elements/chunks/arrow-left-CVh1TeN7.js +0 -1
  415. package/dist/elements/chunks/artifact-BkYcfIlZ.js +0 -1
  416. package/dist/elements/chunks/attachments-DwfNlubq.js +0 -1
  417. package/dist/elements/chunks/badge-Q0-Cmwzz.js +0 -1
  418. package/dist/elements/chunks/bash-InADTalH.js +0 -1
  419. package/dist/elements/chunks/card-renderer-3Dyl-FpN.js +0 -1
  420. package/dist/elements/chunks/card-routing-BK09BdmL.js +0 -1
  421. package/dist/elements/chunks/check-B5kBPKeo.js +0 -1
  422. package/dist/elements/chunks/chevron-down-DZ1GS39h.js +0 -1
  423. package/dist/elements/chunks/chevron-right-CvP7OUd2.js +0 -1
  424. package/dist/elements/chunks/choice-card-D4QUIOWZ.js +0 -1
  425. package/dist/elements/chunks/circle-CDf9g6MQ.js +0 -1
  426. package/dist/elements/chunks/circle-check-CA47Nqbz.js +0 -1
  427. package/dist/elements/chunks/circle-x-CJ_HVbC8.js +0 -1
  428. package/dist/elements/chunks/code-block-BdLiTitd.js +0 -1
  429. package/dist/elements/chunks/composer-Byve-n8K.js +0 -69
  430. package/dist/elements/chunks/confirm-card-B0flE3MN.js +0 -1
  431. package/dist/elements/chunks/controllable-DTwTIlwp.js +0 -1
  432. package/dist/elements/chunks/conversation-item-BDztezOG.js +0 -1
  433. package/dist/elements/chunks/copy-Nf-kqxXH.js +0 -1
  434. package/dist/elements/chunks/core-AYMC6_lb.js +0 -12
  435. package/dist/elements/chunks/css-M7EaDHN_.js +0 -1
  436. package/dist/elements/chunks/default-input-C2iLFq0b.js +0 -1
  437. package/dist/elements/chunks/define-wjHR1MkU.js +0 -1
  438. package/dist/elements/chunks/download-C4V7tBdb.js +0 -1
  439. package/dist/elements/chunks/embed-D3KewsIJ.js +0 -1
  440. package/dist/elements/chunks/engine-javascript-vq0WuIJl.js +0 -141
  441. package/dist/elements/chunks/file-text-D1G8khle.js +0 -1
  442. package/dist/elements/chunks/folder-WW2LGLid.js +0 -1
  443. package/dist/elements/chunks/form-CQirdC4W.js +0 -1
  444. package/dist/elements/chunks/github-dark-dimmed-DUshB20C.js +0 -1
  445. package/dist/elements/chunks/github-light-JYsPkUQd.js +0 -1
  446. package/dist/elements/chunks/hover-card-CJJkfHTK.js +0 -1
  447. package/dist/elements/chunks/html-CPZ3oZQ7.js +0 -1
  448. package/dist/elements/chunks/icon-Cfgmf4fa.js +0 -1
  449. package/dist/elements/chunks/info-DX3YMOt6.js +0 -1
  450. package/dist/elements/chunks/input-BtW9U6Sq.js +0 -1
  451. package/dist/elements/chunks/javascript-C25yR2R2.js +0 -1
  452. package/dist/elements/chunks/json-DxJze_jm.js +0 -1
  453. package/dist/elements/chunks/kbd-LGXwuT_V.js +0 -1
  454. package/dist/elements/chunks/link-2My69BqT.js +0 -1
  455. package/dist/elements/chunks/loader-iOxc_Tu-.js +0 -1
  456. package/dist/elements/chunks/message-VMZohrXx.js +0 -1
  457. package/dist/elements/chunks/message-circle-CpXMM-_n.js +0 -1
  458. package/dist/elements/chunks/message-square-DxcWtETQ.js +0 -1
  459. package/dist/elements/chunks/message-tZmV2A3p.js +0 -1
  460. package/dist/elements/chunks/paperclip-CRZVp4z_.js +0 -1
  461. package/dist/elements/chunks/progress-bar-DNy66e_E.js +0 -1
  462. package/dist/elements/chunks/prompt-suggestion-Bn64Nl7L.js +0 -1
  463. package/dist/elements/chunks/reasoning-Emn9N4-T.js +0 -1
  464. package/dist/elements/chunks/rotate-cw-CPWe37D9.js +0 -1
  465. package/dist/elements/chunks/scroll-area-ClZkZxIk.js +0 -1
  466. package/dist/elements/chunks/scroll-button-DPE-t3x_.js +0 -1
  467. package/dist/elements/chunks/share-CyfnNEqp.js +0 -1
  468. package/dist/elements/chunks/source-UWCvmVak.js +0 -1
  469. package/dist/elements/chunks/star-DoHFAikQ.js +0 -1
  470. package/dist/elements/chunks/store-Cjq0qwYN.js +0 -1
  471. package/dist/elements/chunks/svelte--5p79yCD.js +0 -1
  472. package/dist/elements/chunks/tasks-card-CmZ5xh6v.js +0 -1
  473. package/dist/elements/chunks/text-shimmer-DYn09zrz.js +0 -1
  474. package/dist/elements/chunks/textarea-skiGHURM.js +0 -1
  475. package/dist/elements/chunks/toast-store-CFnQpThX.js +0 -1
  476. package/dist/elements/chunks/tsx-B8rCNbgL.js +0 -1
  477. package/dist/elements/chunks/typescript-RycA9KXf.js +0 -1
  478. package/dist/elements/chunks/use-card-resolution-DoA2f_EU.js +0 -1
  479. package/dist/elements/chunks/vue-BmIZj4XD.js +0 -1
  480. package/dist/elements/chunks/x-B6UnOiLw.js +0 -1
  481. package/dist/llms/llms-full.txt +0 -2949
  482. package/dist/llms/llms.txt +0 -156
  483. package/dist/register-impl-DpE7icIb.js +0 -293
  484. package/dist/ui/stat.d.ts +0 -16
  485. package/src/ui/stat.tsx +0 -41
  486. /package/dist/{elements/chunks/card-tags-D8lZ-C_U.js → card-tags-D8lZ-C_U.js} +0 -0
  487. /package/dist/{elements/chunks/link-preview-DNILK391.js → link-preview-DNILK391.js} +0 -0
  488. /package/dist/{elements/chunks/slots-DaNjX0rc.js → slots-DaNjX0rc.js} +0 -0
@@ -2,7 +2,7 @@
2
2
  * Composition slots for `kai-*` elements. A slot is a named region a consumer
3
3
  * fills with their own markup. This registry is the SINGLE SOURCE OF TRUTH:
4
4
  * the facade derives its detection from it (and, later, docs are generated
5
- * from it). See docs/superpowers/specs/2026-06-23-kai-chat-composition-seams-design.md.
5
+ * from it).
6
6
  */
7
7
  /** `inject` = additive (the built-in region still renders, your markup is added
8
8
  * in). `replace` = your markup stands in for the whole region — you own that
@@ -1 +1 @@
1
- import{f as o,c as t,S as v,g as p,o as w,h as m,F,j as A,t as S}from"./chunks/define-wjHR1MkU.js";import{a,b as c,c as l,S as k}from"./chunks/source-UWCvmVak.js";var y=S("<style>:host{display:inline-flex}");o("kai-source",{href:"",label:void 0,headline:"",description:"",showFavicon:!1},(e,{flag:n})=>[y(),t(v,{get when(){return e.href},get children(){return t(a,{get href(){return e.href},get children(){return[t(c,{get label(){return e.label},get showFavicon(){return n("showFavicon")}}),t(l,{get title(){return e.headline??""},get description(){return e.description??""}})]}})}})]);function u(e){return{href:e.getAttribute("href")??"",label:e.getAttribute("label")??void 0,title:e.getAttribute("headline")??void 0,description:e.getAttribute("description")??void 0,showFavicon:e.hasAttribute("show-favicon")&&e.getAttribute("show-favicon")!=="false"}}o("kai-sources",{sources:[],showFavicon:!1,numbered:!1},(e,{element:n,flag:s})=>{const[h,d]=p([]);w(()=>{const r=()=>{const f=[...n.querySelectorAll("kai-source")];d(f.map(u))};r();const i=new MutationObserver(r);i.observe(n,{childList:!0,attributes:!0,subtree:!0}),m(()=>i.disconnect())});const g=()=>[...e.sources??[],...h()],b=()=>s("numbered");return t(k,{get children(){return t(F,{get each(){return g()},children:(r,i)=>t(a,{get href(){return r.href},get children(){return[t(c,{get label(){return A(()=>!!b())()?i()+1:r.label},get showFavicon(){return r.showFavicon??s("showFavicon")}}),t(l,{get title(){return r.title??""},get description(){return r.description??""}})]}})})}})});export{u as parseKaiSourceElement};
1
+ import{f as o,c as t,S as v,g as p,o as w,h as m,F,m as A,t as S}from"../define-By-uL588.js";import{a,b as c,c as l,S as k}from"../source-GEnFF528.js";var y=S("<style>:host{display:inline-flex}");o("kai-source",{href:"",label:void 0,headline:"",description:"",showFavicon:!1},(e,{flag:n})=>[y(),t(v,{get when(){return e.href},get children(){return t(a,{get href(){return e.href},get children(){return[t(c,{get label(){return e.label},get showFavicon(){return n("showFavicon")}}),t(l,{get title(){return e.headline??""},get description(){return e.description??""}})]}})}})]);function u(e){return{href:e.getAttribute("href")??"",label:e.getAttribute("label")??void 0,title:e.getAttribute("headline")??void 0,description:e.getAttribute("description")??void 0,showFavicon:e.hasAttribute("show-favicon")&&e.getAttribute("show-favicon")!=="false"}}o("kai-sources",{sources:[],showFavicon:!1,numbered:!1},(e,{element:n,flag:s})=>{const[h,d]=p([]);w(()=>{const r=()=>{const f=[...n.querySelectorAll("kai-source")];d(f.map(u))};r();const i=new MutationObserver(r);i.observe(n,{childList:!0,attributes:!0,subtree:!0}),m(()=>i.disconnect())});const g=()=>[...e.sources??[],...h()],b=()=>s("numbered");return t(k,{get children(){return t(F,{get each(){return g()},children:(r,i)=>t(a,{get href(){return r.href},get children(){return[t(c,{get label(){return A(()=>!!b())()?i()+1:r.label},get showFavicon(){return r.showFavicon??s("showFavicon")}}),t(l,{get title(){return r.title??""},get description(){return r.description??""}})]}})})}})});export{u as parseKaiSourceElement};
@@ -1 +1 @@
1
- import{s as h,i as w,c as g,a as m,b as p,S as z,q as y,m as x,d as l,t as r,f as k}from"./chunks/define-wjHR1MkU.js";import{c as i}from"./chunks/cn-CU7UAWzk.js";var C=r("<span aria-hidden=true>"),S=r("<span><span>");const v={new:"bg-tool-blue",online:"bg-tool-green",busy:"bg-tool-red",away:"bg-tool-amber",offline:"bg-muted-foreground"},q={sm:"size-2",md:"size-2.5"};function A(t){const[s,c]=h(t,["status","size","pulse","label","class"]),n=()=>s.status??"new";return(()=>{var a=S(),o=a.firstChild;return w(a,g(z,{get when(){return s.pulse},get children(){var e=C();return m(()=>p(e,i("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75 motion-reduce:hidden",v[n()]))),e}}),o),y(o,x(c,{get class(){return i("relative inline-block rounded-full",v[n()],q[s.size??"sm"])}}),!1,!1),m(e=>{var u=i("relative inline-flex",s.class),d=s.label?"status":void 0,b=s.label,f=s.label?void 0:"true";return u!==e.e&&p(a,e.e=u),d!==e.t&&l(a,"role",e.t=d),b!==e.a&&l(a,"aria-label",e.a=b),f!==e.o&&l(a,"aria-hidden",e.o=f),e},{e:void 0,t:void 0,a:void 0,o:void 0}),a})()}var _=r("<style>:host{display:inline-flex}");k("kai-status",{status:"new",pulse:!1,label:void 0,size:"sm"},(t,{flag:s})=>[_(),g(A,{get status(){return t.status??"new"},get size(){return t.size??"sm"},get pulse(){return s("pulse")},get label(){return t.label},part:"dot"})]);
1
+ import{s as h,i as w,c as g,a as p,b as v,S as z,p as y,q as x,d as l,t as r,f as k}from"../define-By-uL588.js";import{c as i}from"../cn-DN5AWfiS.js";var C=r("<span aria-hidden=true>"),S=r("<span><span>");const m={new:"bg-tool-blue",online:"bg-tool-green",busy:"bg-tool-red",away:"bg-tool-amber",offline:"bg-muted-foreground"},q={sm:"size-2",md:"size-2.5"};function A(t){const[s,c]=h(t,["status","size","pulse","label","class"]),n=()=>s.status??"new";return(()=>{var a=S(),o=a.firstChild;return w(a,g(z,{get when(){return s.pulse},get children(){var e=C();return p(()=>v(e,i("absolute inline-flex h-full w-full animate-ping rounded-full opacity-75 motion-reduce:hidden",m[n()]))),e}}),o),y(o,x(c,{get class(){return i("relative inline-block rounded-full",m[n()],q[s.size??"sm"])}}),!1,!1),p(e=>{var u=i("relative inline-flex",s.class),d=s.label?"status":void 0,b=s.label,f=s.label?void 0:"true";return u!==e.e&&v(a,e.e=u),d!==e.t&&l(a,"role",e.t=d),b!==e.a&&l(a,"aria-label",e.a=b),f!==e.o&&l(a,"aria-hidden",e.o=f),e},{e:void 0,t:void 0,a:void 0,o:void 0}),a})()}var _=r("<style>:host{display:inline-flex}");k("kai-status",{status:"new",pulse:!1,label:void 0,size:"sm"},(t,{flag:s})=>[_(),g(A,{get status(){return t.status??"new"},get size(){return t.size??"sm"},get pulse(){return s("pulse")},get label(){return t.label},part:"dot"})]);
@@ -1 +1 @@
1
- import{g as p,j as m,a as b,d as v,u as C,b as w,t as y,e as A,f as $,z as f,k as R,c as j}from"./chunks/define-wjHR1MkU.js";import{c as x}from"./chunks/cn-CU7UAWzk.js";var E=y("<button type=button role=switch><span>"),q=y('<input type=checkbox aria-hidden=true tabindex=-1 style="position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap">');function O(i){const[h,d]=p(i.defaultChecked??!1),c=()=>i.checked!==void 0,n=()=>c()?!!i.checked:h(),u=()=>{var e;if(i.disabled)return;const o=!n();c()||d(o),(e=i.onChange)==null||e.call(i,o)};return[m(()=>m(()=>i.name!=null)()&&(()=>{var e=q();return e.addEventListener("change",()=>{}),b(o=>{var l=i.name,t=i.disabled;return l!==o.e&&v(e,"name",o.e=l),t!==o.t&&(e.disabled=o.t=t),o},{e:void 0,t:void 0}),b(()=>e.value=i.value??"on"),b(()=>e.checked=n()),e})()),(()=>{var e=E(),o=e.firstChild;e.$$keydown=t=>{(t.key===" "||t.key==="Enter")&&(t.preventDefault(),u())},e.$$click=u;var l=i.buttonRef;return typeof l=="function"?C(l,e):i.buttonRef=e,b(t=>{var r=n(),a=i.label,s=i.disabled,g=x("relative inline-flex h-5 w-9 shrink-0 cursor-pointer items-center rounded-full transition-colors","focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-background","disabled:cursor-not-allowed disabled:opacity-50",n()?"bg-primary":"bg-muted",i.class),k=x("inline-block h-4 w-4 rounded-full shadow transition-transform",n()?"translate-x-[1.125rem] bg-primary-foreground":"translate-x-0.5 bg-white");return r!==t.e&&v(e,"aria-checked",t.e=r),a!==t.t&&v(e,"aria-label",t.t=a),s!==t.a&&(e.disabled=t.a=s),g!==t.o&&w(e,t.o=g),k!==t.i&&w(o,t.i=k),t},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e})()]}A(["click","keydown"]),$("kai-switch",{checked:void 0,defaultChecked:void 0,disabled:void 0,label:void 0,name:void 0,value:void 0},(i,h)=>{const{element:d,dispatch:c,flag:n,expose:u}=h,[e,o]=p(n("defaultChecked")||n("checked")),l=r=>r===!0?!0:r===!1?!1:d.hasAttribute("checked")&&d.getAttribute("checked")!=="false",t=r=>{n("disabled")||f(e)!==r&&(o(r),c("kai-change",{checked:r}))};return Object.defineProperty(d,"checked",{get:()=>e(),set:r=>{const a=l(r);f(e)!==a&&o(a)},configurable:!0,enumerable:!0}),R(()=>{const r=e();r!==d.hasAttribute("checked")&&d.toggleAttribute("checked",r)}),u({toggle:()=>t(!f(e)),focus:r=>{var a,s;return(s=(a=d.shadowRoot)==null?void 0:a.querySelector('button[role="switch"]'))==null?void 0:s.focus(r)}}),j(O,{get checked(){return e()},get disabled(){return n("disabled")},get label(){return i.label},get name(){return i.name},get value(){return i.value},onChange:r=>t(r)})});
1
+ import{f as b,g as k,z as o,j as v,c as f}from"../define-By-uL588.js";import{S as m}from"../switch-KkeQIbuH.js";b("kai-switch",{checked:void 0,defaultChecked:void 0,disabled:void 0,label:void 0,name:void 0,value:void 0},(d,n)=>{const{element:t,dispatch:s,flag:r,expose:h}=n,[a,l]=k(r("defaultChecked")||r("checked")),g=e=>e===!0?!0:e===!1?!1:t.hasAttribute("checked")&&t.getAttribute("checked")!=="false",i=e=>{r("disabled")||o(a)!==e&&(l(e),s("kai-change",{checked:e}))};return Object.defineProperty(t,"checked",{get:()=>a(),set:e=>{const c=g(e);o(a)!==c&&l(c)},configurable:!0,enumerable:!0}),v(()=>{const e=a();e!==t.hasAttribute("checked")&&t.toggleAttribute("checked",e)}),h({toggle:()=>i(!o(a)),focus:e=>{var c,u;return(u=(c=t.shadowRoot)==null?void 0:c.querySelector('button[role="switch"]'))==null?void 0:u.focus(e)}}),f(m,{get checked(){return a()},get disabled(){return r("disabled")},get label(){return d.label},get name(){return d.name},get value(){return d.value},onChange:e=>i(e)})});
@@ -1 +1 @@
1
- import{s as E,u as C,q as V,m as j,i as k,c as D,a as z,d as x,b as F,F as H,t as q,e as I,f as L,g as R}from"./chunks/define-wjHR1MkU.js";import{r as S}from"./chunks/icon-Cfgmf4fa.js";import{c as h}from"./chunks/cn-CU7UAWzk.js";var B=q("<div>"),K=q("<button type=button part=tab role=tab>");const N={segmented:"inline-flex items-center gap-1 rounded-lg bg-muted p-1",underline:"inline-flex items-center gap-1 border-b border-border"};function P(l,a){const s="inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";return l==="underline"?h(s,"border-b-2 px-3 py-2 -mb-px",a?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"):h(s,"rounded-md px-3 py-1.5",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground")}function T(l){const[a,s]=E(l,["items","value","variant","block","disabled","onChange","ref","class"]),b=()=>a.items??[],v=()=>a.variant??"segmented",f={},u=()=>b().filter(t=>!t.disabled),o=()=>a.value,c=()=>{var t;return o()!==void 0&&u().some(r=>r.id===o())?o():(t=u()[0])==null?void 0:t.id},n=t=>{var r;a.disabled||t.disabled||t.id!==a.value&&((r=a.onChange)==null||r.call(a,t.id))},g=t=>{const r=f[t];r&&r.focus()},m=(t,r)=>{const i=u();if(i.length===0)return;const d=i.findIndex(p=>p.id===r.id);let e;switch(t.key){case"ArrowRight":case"ArrowDown":e=i[(d+1)%i.length];break;case"ArrowLeft":case"ArrowUp":e=i[(d-1+i.length)%i.length];break;case"Home":e=i[0];break;case"End":e=i[i.length-1];break;case"Enter":case" ":t.preventDefault(),n(r);return;default:return}e&&(t.preventDefault(),n(e),g(e.id))};return(()=>{var t=B();return C(r=>{var i;return(i=a.ref)==null?void 0:i.call(a,r)},t),V(t,j(s,{role:"tablist",part:"tablist",get"aria-disabled"(){return a.disabled?"true":void 0},get class(){return h(N[v()],a.block&&"flex w-full",a.class)}}),!1,!0),k(t,D(H,{get each(){return b()},children:r=>{const i=()=>r.id===o();return(()=>{var d=K();return d.$$keydown=e=>m(e,r),d.$$click=()=>n(r),C(e=>{f[r.id]=e},d),k(d,()=>S(r.icon,{class:"size-4 shrink-0"}),null),k(d,()=>r.label,null),z(e=>{var p=i()?"":void 0,w=i()?"true":"false",y=r.id===c()?0:-1,A=a.disabled||r.disabled,$=h(P(v(),i()),a.block&&"flex-1 justify-center");return p!==e.e&&x(d,"data-active",e.e=p),w!==e.t&&x(d,"aria-selected",e.t=w),y!==e.a&&x(d,"tabindex",e.a=y),A!==e.o&&(d.disabled=e.o=A),$!==e.i&&F(d,e.i=$),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),d})()}})),t})()}I(["click","keydown"]),L("kai-tabs",{items:void 0,value:void 0,defaultValue:void 0,variant:"segmented",block:void 0,disabled:void 0},(l,{dispatch:a,flag:s,expose:b})=>{const[v,f]=R(l.defaultValue),u=()=>l.value??v(),o=n=>{f(n),a("kai-tab-change",{value:n})};let c;return b({select:n=>{var g;const m=(g=l.items)==null?void 0:g.find(t=>t.id===n);!m||m.disabled||s("disabled")||o(n)},focus:()=>{var n;(n=c?.querySelector('[role="tab"][tabindex="0"]:not([disabled])'))==null||n.focus()}}),D(T,{get items(){return l.items},get value(){return u()},get variant(){return l.variant??"segmented"},get block(){return s("block")},get disabled(){return s("disabled")},onChange:o,ref:n=>c=n})});
1
+ import{s as E,u as C,p as V,q as j,i as k,c as D,a as z,d as x,b as F,F as H,t as q,e as I,f as L,g as R}from"../define-By-uL588.js";import{r as S}from"../icon-CdcfRhYI.js";import{c as h}from"../cn-DN5AWfiS.js";var B=q("<div>"),K=q("<button type=button part=tab role=tab>");const N={segmented:"inline-flex items-center gap-1 rounded-lg bg-muted p-1",underline:"inline-flex items-center gap-1 border-b border-border"};function P(l,a){const s="inline-flex items-center gap-1.5 whitespace-nowrap text-sm font-medium transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring disabled:pointer-events-none disabled:opacity-50";return l==="underline"?h(s,"border-b-2 px-3 py-2 -mb-px",a?"border-primary text-foreground":"border-transparent text-muted-foreground hover:text-foreground"):h(s,"rounded-md px-3 py-1.5",a?"bg-background text-foreground shadow-sm":"text-muted-foreground hover:text-foreground")}function T(l){const[a,s]=E(l,["items","value","variant","block","disabled","onChange","ref","class"]),b=()=>a.items??[],v=()=>a.variant??"segmented",f={},u=()=>b().filter(t=>!t.disabled),o=()=>a.value,c=()=>{var t;return o()!==void 0&&u().some(r=>r.id===o())?o():(t=u()[0])==null?void 0:t.id},n=t=>{var r;a.disabled||t.disabled||t.id!==a.value&&((r=a.onChange)==null||r.call(a,t.id))},g=t=>{const r=f[t];r&&r.focus()},m=(t,r)=>{const i=u();if(i.length===0)return;const d=i.findIndex(p=>p.id===r.id);let e;switch(t.key){case"ArrowRight":case"ArrowDown":e=i[(d+1)%i.length];break;case"ArrowLeft":case"ArrowUp":e=i[(d-1+i.length)%i.length];break;case"Home":e=i[0];break;case"End":e=i[i.length-1];break;case"Enter":case" ":t.preventDefault(),n(r);return;default:return}e&&(t.preventDefault(),n(e),g(e.id))};return(()=>{var t=B();return C(r=>{var i;return(i=a.ref)==null?void 0:i.call(a,r)},t),V(t,j(s,{role:"tablist",part:"tablist",get"aria-disabled"(){return a.disabled?"true":void 0},get class(){return h(N[v()],a.block&&"flex w-full",a.class)}}),!1,!0),k(t,D(H,{get each(){return b()},children:r=>{const i=()=>r.id===o();return(()=>{var d=K();return d.$$keydown=e=>m(e,r),d.$$click=()=>n(r),C(e=>{f[r.id]=e},d),k(d,()=>S(r.icon,{class:"size-4 shrink-0"}),null),k(d,()=>r.label,null),z(e=>{var p=i()?"":void 0,w=i()?"true":"false",y=r.id===c()?0:-1,A=a.disabled||r.disabled,$=h(P(v(),i()),a.block&&"flex-1 justify-center");return p!==e.e&&x(d,"data-active",e.e=p),w!==e.t&&x(d,"aria-selected",e.t=w),y!==e.a&&x(d,"tabindex",e.a=y),A!==e.o&&(d.disabled=e.o=A),$!==e.i&&F(d,e.i=$),e},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),d})()}})),t})()}I(["click","keydown"]),L("kai-tabs",{items:void 0,value:void 0,defaultValue:void 0,variant:"segmented",block:void 0,disabled:void 0},(l,{dispatch:a,flag:s,expose:b})=>{const[v,f]=R(l.defaultValue),u=()=>l.value??v(),o=n=>{f(n),a("kai-tab-change",{value:n})};let c;return b({select:n=>{var g;const m=(g=l.items)==null?void 0:g.find(t=>t.id===n);!m||m.disabled||s("disabled")||o(n)},focus:()=>{var n;(n=c?.querySelector('[role="tab"][tabindex="0"]:not([disabled])'))==null||n.focus()}}),D(T,{get items(){return l.items},get value(){return u()},get variant(){return l.variant??"segmented"},get block(){return s("block")},get disabled(){return s("disabled")},onChange:o,ref:n=>c=n})});
@@ -1 +1 @@
1
- import{f as i,c as u}from"./chunks/define-wjHR1MkU.js";import{T as s}from"./chunks/tasks-card-CmZ5xh6v.js";i("kai-tasks",{data:void 0,cardId:void 0,heading:void 0,resolution:void 0,value:void 0,defaultValue:void 0,disabled:!1,readonly:!1},(a,{element:t,dispatch:o,flag:d,expose:r})=>{let e;return r({select:l=>e?.select(l),toggle:(l,n)=>e?.toggle(l,n),send:()=>e?.send(),focus:l=>e?.focus(l),dismiss:()=>e?.dismiss(),reopen:()=>e?.reopen()}),u(s,{get data(){return a.data},get cardId(){return a.cardId??(t.id||"kai-tasks")},get heading(){return a.heading},get resolution(){return a.resolution},get value(){return a.value},get defaultValue(){return a.defaultValue},get disabled(){return d("disabled")},get readonly(){return d("readonly")},onValueChange:l=>o("kai-value-change",l),controllerRef:l=>e=l,hostElement:t})});
1
+ import{f as i,c as u}from"../define-By-uL588.js";import{T as s}from"../tasks-card-BrN4bggJ.js";i("kai-tasks",{data:void 0,cardId:void 0,heading:void 0,resolution:void 0,value:void 0,defaultValue:void 0,disabled:!1,readonly:!1},(a,{element:t,dispatch:o,flag:d,expose:r})=>{let e;return r({select:l=>e?.select(l),toggle:(l,n)=>e?.toggle(l,n),send:()=>e?.send(),focus:l=>e?.focus(l),dismiss:()=>e?.dismiss(),reopen:()=>e?.reopen()}),u(s,{get data(){return a.data},get cardId(){return a.cardId??(t.id||"kai-tasks")},get heading(){return a.heading},get resolution(){return a.resolution},get value(){return a.value},get defaultValue(){return a.defaultValue},get disabled(){return d("disabled")},get readonly(){return d("readonly")},onValueChange:l=>o("kai-value-change",l),controllerRef:l=>e=l,hostElement:t})});
@@ -1 +1 @@
1
- import{f as r,c as a}from"./chunks/define-wjHR1MkU.js";import{T as e}from"./chunks/text-shimmer-DYn09zrz.js";r("kai-text-shimmer",{text:"",as:"span",duration:4,spread:20},t=>a(e,{get as(){return t.as},get duration(){return t.duration},get spread(){return t.spread},class:"text-body",get children(){return t.text}}));
1
+ import{f as r,c as a}from"../define-By-uL588.js";import{T as e}from"../text-shimmer-Dcj1MHuq.js";r("kai-text-shimmer",{text:"",as:"span",duration:4,spread:20},t=>a(e,{get as(){return t.as},get duration(){return t.duration},get spread(){return t.spread},class:"text-body",get children(){return t.text}}));
@@ -1 +1 @@
1
- import{s as d,i as o,c as r,y as u,S as c,a as b,b as f,t as i,e as g,f as m}from"./chunks/define-wjHR1MkU.js";import{c as x}from"./chunks/cn-CU7UAWzk.js";import{T as p}from"./chunks/text-shimmer-DYn09zrz.js";import{c as h}from"./chunks/chevron-right-CvP7OUd2.js";var k=i('<button type=button class="flex items-center gap-1 text-sm transition-opacity hover:opacity-80">'),v=i('<button type=button class="text-muted-foreground hover:text-foreground border-muted-foreground/50 hover:border-foreground border-b border-dotted text-sm transition-colors">'),w=i("<div>");function y(n){const[t]=d(n,["class","text","onStop","stopLabel","onClick"]),s=()=>t.text??"Thinking",l=()=>t.stopLabel??"Answer now";return(()=>{var a=w();return o(a,r(c,{get when(){return t.onClick},get fallback(){return r(p,{class:"cursor-default text-sm font-medium",get children(){return s()}})},get children(){var e=k();return u(e,"click",t.onClick,!0),o(e,r(p,{class:"text-sm font-medium",get children(){return s()}}),null),o(e,r(h,{class:"text-muted-foreground size-4"}),null),e}}),null),o(a,r(c,{get when(){return t.onStop},get children(){var e=v();return u(e,"click",t.onStop,!0),o(e,l),e}}),null),b(()=>f(a,x("flex w-full items-center justify-between",t.class))),a})()}g(["click"]),m("kai-thinking-bar",{text:"Thinking",stoppable:!1,stopLabel:"Answer now"},(n,{dispatch:t,flag:s,reflectFlag:l})=>(l("stoppable"),r(y,{get text(){return n.text},get stopLabel(){return n.stopLabel},get onStop(){return s("stoppable")?()=>t("kai-stop"):void 0}})));
1
+ import{s as d,i as o,c as r,y as u,S as c,a as b,b as f,t as i,e as g,f as m}from"../define-By-uL588.js";import{c as x}from"../cn-DN5AWfiS.js";import{T as p}from"../text-shimmer-Dcj1MHuq.js";import{c as h}from"../chevron-right-BatuHzUm.js";var k=i('<button type=button class="flex items-center gap-1 text-sm transition-opacity hover:opacity-80">'),v=i('<button type=button class="text-muted-foreground hover:text-foreground border-muted-foreground/50 hover:border-foreground border-b border-dotted text-sm transition-colors">'),w=i("<div>");function y(n){const[t]=d(n,["class","text","onStop","stopLabel","onClick"]),s=()=>t.text??"Thinking",l=()=>t.stopLabel??"Answer now";return(()=>{var a=w();return o(a,r(c,{get when(){return t.onClick},get fallback(){return r(p,{class:"cursor-default text-sm font-medium",get children(){return s()}})},get children(){var e=k();return u(e,"click",t.onClick,!0),o(e,r(p,{class:"text-sm font-medium",get children(){return s()}}),null),o(e,r(h,{class:"text-muted-foreground size-4"}),null),e}}),null),o(a,r(c,{get when(){return t.onStop},get children(){var e=v();return u(e,"click",t.onStop,!0),o(e,l),e}}),null),b(()=>f(a,x("flex w-full items-center justify-between",t.class))),a})()}g(["click"]),m("kai-thinking-bar",{text:"Thinking",stoppable:!1,stopLabel:"Answer now"},(n,{dispatch:t,flag:s,reflectFlag:l})=>(l("stoppable"),r(y,{get text(){return n.text},get stopLabel(){return n.stopLabel},get onStop(){return s("stoppable")?()=>t("kai-stop"):void 0}})));
@@ -1 +1 @@
1
- import{A as B,l as M,o as w,c as r,u as R,i as h,S as o,F as H,a as T,b as k,C as z,t as c,f as A,g as $,h as j,j as C,v as F}from"./chunks/define-wjHR1MkU.js";import{r as L,T as q}from"./chunks/slots-DaNjX0rc.js";import{C as N,a as O,b as U,S as _}from"./chunks/scroll-button-DPE-t3x_.js";import{M as D,a as x,b as E}from"./chunks/message-tZmV2A3p.js";import{c as G,a as I,b as J}from"./chunks/message-VMZohrXx.js";import{L as K}from"./chunks/loader-iOxc_Tu-.js";var P=c('<div class="flex min-h-[10rem] flex-1 flex-col items-center justify-center gap-1 py-12 text-center"><p class="text-sm font-medium text-foreground">No messages yet</p><p class="text-xs text-muted-foreground">Messages will appear here as the conversation starts.'),Q=c('<div class="rounded-lg px-1 py-2">'),V=c('<div class="absolute bottom-4 left-1/2 flex w-full max-w-3xl -translate-x-1/2 justify-center px-5">'),S=c("<div>");function W(){return P()}function X(e){const d=B(),m=()=>e.actionsReveal==="hover"?"hover":"always";let n;const i=G({emit:a=>{var t;return(t=e.onMessageAction)==null?void 0:t.call(e,a)},target:()=>n}),g=()=>e.scrollButton!==!1,p=()=>e.messages.length===0&&!e.loading,v=M(()=>e.messages.map(a=>a.id));return w(()=>{var a;(a=e.controllerRef)==null||a.call(e,{scrollToBottom:t=>{const l=n?.querySelector(".overflow-y-auto");l?.scrollTo({top:l.scrollHeight,behavior:t??"smooth"})}})}),r(z,{get proseSize(){return e.proseSize},get codeTheme(){return e.codeTheme},get codeHighlight(){return e.codeHighlight!==!1},get portalMount(){return d.portalMount()},get children(){var a=S();return R(t=>n=t,a),h(a,r(N,{class:"h-full px-4 py-3",get children(){return[r(O,{class:"mx-auto w-full max-w-3xl space-y-4",get children(){return[r(o,{get when(){return p()},get children(){return r(o,{get when(){return e.empty},get fallback(){return r(W,{})},get children(){return e.empty}})}}),r(H,{get each(){return v()},children:(t,l)=>r(o,{get when(){return e.messages[l()]},children:s=>{const y=r(D,{get parts(){return s().parts},get cardTypes(){return e.cardTypes},get cardSchemas(){return e.cardSchemas},get isUser(){return s().role==="user"},get markdown(){return s().role==="assistant"},get actions(){return s().actions},get actionsReveal(){return m()},get activeFeedback(){return i.resolveFeedback(s())},get copied(){return i.isCopied(s().id)},onAction:u=>i.handleAction(s(),u)}),b=()=>m()==="hover"?"group ":"";return r(o,{get when(){return s().avatar},get fallback(){return r(x,{get role(){return s().role},get class(){return`${b()}${s().role==="user"?"flex-col items-end":"flex-col items-start"}`},children:y})},children:u=>r(x,{get role(){return s().role},get class(){return b()},get children(){return[r(E,{get src(){return u().src??""},get alt(){return u().alt??""},get fallback(){return u().fallback}}),(()=>{var f=S();return h(f,y),T(()=>k(f,`flex min-w-0 flex-1 flex-col ${s().role==="user"?"items-end":"items-start"}`)),f})()]}})})}})}),r(o,{get when(){return e.loading},get children(){return r(x,{class:"flex-col items-start",get children(){var t=Q();return h(t,r(K,{variant:"typing"})),t}})}}),r(U,{})]}}),r(o,{get when(){return g()},get children(){var t=V();return h(t,r(_,{class:"shadow-sm"})),t}})]}})),T(()=>k(a,`relative flex h-full min-h-0 flex-col bg-background ${e.class??""}`)),a}})}var Y=c("<style>:host{display:block;height:100%}"),Z=c("<slot name=empty>");A("kai-thread",{messages:void 0,loading:!1,proseSize:"sm",codeTheme:"github-dark-dimmed",codeHighlight:!0,actionsReveal:"always",scrollButton:!0,class:void 0,cardTypes:void 0,cardSchemas:void 0},(e,{element:d,dispatch:m,flag:n,expose:i})=>{let g;const p=J("kai-thread"),[v,a]=$({});return w(()=>{const t=()=>a(L(d,q));t();const l=new MutationObserver(t);l.observe(d,{childList:!0}),j(()=>l.disconnect())}),i({scrollToBottom:t=>g?.scrollToBottom(t)}),[Y(),r(X,{get class(){return e.class},get messages(){return p(e.messages)},get loading(){return n("loading")},get proseSize(){return e.proseSize},get codeTheme(){return e.codeTheme},get codeHighlight(){return n("codeHighlight")},get actionsReveal(){return e.actionsReveal},get scrollButton(){return e.scrollButton!==!1},get cardTypes(){return I(e.cardTypes,e.theme)},get cardSchemas(){return e.cardSchemas},get empty(){return C(()=>!!v().empty)()?(()=>{var t=Z();return t._$owner=F(),t})():void 0},onMessageAction:t=>m("kai-message-action",t),controllerRef:t=>g=t})]});
1
+ import{A as H,k as B,o as w,c as r,u as M,i as h,S as l,F as R,a as T,b as k,C as z,t as c,f as A,g as $,h as C,m as E,v as F}from"../define-By-uL588.js";import{r as j,T as L}from"../slots-DaNjX0rc.js";import{C as q,a as N,b as O,S as U}from"../scroll-button-DslXiJyL.js";import{M as _,a as x,b as D}from"../message-BYZECyek.js";import{c as G,a as I,b as J}from"../message-BSsgvHvf.js";import{L as K}from"../loader-BM4CEz4G.js";var P=c('<div class="flex min-h-[10rem] flex-1 flex-col items-center justify-center gap-1 py-12 text-center"><p class="text-sm font-medium text-foreground">No messages yet</p><p class="text-xs text-muted-foreground">Messages will appear here as the conversation starts.'),Q=c('<div class="rounded-lg px-1 py-2">'),V=c('<div class="absolute bottom-4 left-1/2 flex w-full max-w-3xl -translate-x-1/2 justify-center px-5">'),S=c("<div>");function W(){return P()}function X(e){const i=H(),m=()=>e.actionsReveal==="hover"?"hover":"always";let o;const u=G({emit:a=>{var t;return(t=e.onMessageAction)==null?void 0:t.call(e,a)},target:()=>o}),g=()=>e.scrollButton!==!1,p=()=>e.messages.length===0&&!e.loading,v=B(()=>e.messages.map(a=>a.id));return w(()=>{var a;(a=e.controllerRef)==null||a.call(e,{scrollToBottom:t=>{const n=o?.querySelector(".overflow-y-auto");n?.scrollTo({top:n.scrollHeight,behavior:t??"smooth"})}})}),r(z,{get proseSize(){return e.proseSize},get codeTheme(){return e.codeTheme},get codeHighlight(){return e.codeHighlight!==!1},get portalMount(){return i.portalMount()},get children(){var a=S();return M(t=>o=t,a),h(a,r(q,{class:"h-full px-4 py-3",get children(){return[r(N,{class:"mx-auto w-full max-w-3xl space-y-4",get children(){return[r(l,{get when(){return p()},get children(){return r(l,{get when(){return e.empty},get fallback(){return r(W,{})},get children(){return e.empty}})}}),r(R,{get each(){return v()},children:(t,n)=>r(l,{get when(){return e.messages[n()]},children:s=>{const y=r(_,{get parts(){return s().parts},get cardTypes(){return e.cardTypes},get cardSchemas(){return e.cardSchemas},get cardHostElement(){return e.cardHostElement},get isUser(){return s().role==="user"},get markdown(){return s().role==="assistant"},get actions(){return s().actions},get actionsReveal(){return m()},get activeFeedback(){return u.resolveFeedback(s())},get copied(){return u.isCopied(s().id)},onAction:d=>u.handleAction(s(),d)}),b=()=>m()==="hover"?"group ":"";return r(l,{get when(){return s().avatar},get fallback(){return r(x,{get role(){return s().role},get class(){return`${b()}${s().role==="user"?"flex-col items-end":"flex-col items-start"}`},children:y})},children:d=>r(x,{get role(){return s().role},get class(){return b()},get children(){return[r(D,{get src(){return d().src??""},get alt(){return d().alt??""},get fallback(){return d().fallback}}),(()=>{var f=S();return h(f,y),T(()=>k(f,`flex min-w-0 flex-1 flex-col ${s().role==="user"?"items-end":"items-start"}`)),f})()]}})})}})}),r(l,{get when(){return e.loading},get children(){return r(x,{class:"flex-col items-start",get children(){var t=Q();return h(t,r(K,{variant:"typing"})),t}})}}),r(O,{})]}}),r(l,{get when(){return g()},get children(){var t=V();return h(t,r(U,{})),t}})]}})),T(()=>k(a,`relative flex h-full min-h-0 flex-col bg-background ${e.class??""}`)),a}})}var Y=c("<style>:host{display:block;height:100%}"),Z=c("<slot name=empty>");A("kai-thread",{messages:void 0,loading:!1,proseSize:"sm",codeTheme:"github-dark-dimmed",codeHighlight:!0,actionsReveal:"always",scrollButton:!0,class:void 0,cardTypes:void 0,cardSchemas:void 0},(e,{element:i,dispatch:m,flag:o,expose:u})=>{let g;const p=J("kai-thread"),[v,a]=$({});return w(()=>{const t=()=>a(j(i,L));t();const n=new MutationObserver(t);n.observe(i,{childList:!0}),C(()=>n.disconnect())}),u({scrollToBottom:t=>g?.scrollToBottom(t)}),[Y(),r(X,{get class(){return e.class},get messages(){return p(e.messages)},get loading(){return o("loading")},get proseSize(){return e.proseSize},get codeTheme(){return e.codeTheme},get codeHighlight(){return o("codeHighlight")},get actionsReveal(){return e.actionsReveal},get scrollButton(){return e.scrollButton!==!1},get cardTypes(){return I(e.cardTypes,e.theme)},get cardSchemas(){return e.cardSchemas},cardHostElement:i,get empty(){return E(()=>!!v().empty)()?(()=>{var t=Z();return t._$owner=F(),t})():void 0},onMessageAction:t=>m("kai-message-action",t),controllerRef:t=>g=t})]});
@@ -1 +1 @@
1
- import{g as y,l as Q,k as G,h as H,c as i,i as h,F as U,u as V,a as z,d as R,b as L,n as q,p as Z,S as b,t as D,x as ee,e as ie,f as ae}from"./chunks/define-wjHR1MkU.js";import{c as g}from"./chunks/cn-CU7UAWzk.js";import{c as se}from"./chunks/overlay-DuiwdXjm.js";import{r as te,t as de}from"./chunks/toast-store-CFnQpThX.js";import{c as le}from"./chunks/check-B5kBPKeo.js";import{c as ce}from"./chunks/circle-x-CJ_HVbC8.js";import{i as ue}from"./chunks/info-DX3YMOt6.js";import{t as me}from"./chunks/triangle-alert-F9cyUEyy.js";import{x as pe}from"./chunks/x-B6UnOiLw.js";var ve=D("<button type=button>"),fe=D("<button type=button aria-label=Dismiss>"),J=D("<div>"),ge=D('<div class="min-w-0 flex-1"><div class="font-medium leading-snug">'),he=D('<span class="min-w-0 flex-1 truncate">'),xe=D('<div role=region aria-label=Notifications aria-live=polite data-stack=collapsed style="z-index:var(--kai-toast-z, 100)"><div class="pointer-events-auto relative transition-[height] duration-200 ease-out"style="min-width:16rem;max-width:min(30rem, calc(100vw - 2rem))">'),be=D('<div role=region aria-label=Notifications aria-live=polite data-stack=expanded style="z-index:var(--kai-toast-z, 100)">');function we(){var t,c;const[u,f]=y(typeof window<"u"&&((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)===!0);if(typeof window<"u"&&window.matchMedia){const m=window.matchMedia("(prefers-reduced-motion: reduce)"),l=()=>f(m.matches);(c=m.addEventListener)==null||c.call(m,"change",l),H(()=>{var d;return(d=m.removeEventListener)==null?void 0:d.call(m,"change",l)})}return u}function re(t){const[c,u]=y(!0),f=se(c),m=()=>t.item.variant??"neutral",l=()=>t.item.dismissible!==!1,d=()=>t.item.appearance??t.appearance??"pill",v=()=>t.item.inverse??t.inverse??!1,I=()=>v()?"bg-foreground text-background border-transparent":"bg-popover text-popover-foreground border-border",Y=()=>v()?"text-background/70":"text-muted-foreground",E=()=>v()?"text-background hover:text-background/80":"text-primary hover:text-primary/80",S=()=>v()?"text-background/70 hover:text-background":"text-muted-foreground hover:text-foreground";let A=te(t.item),T=0,k,$="timeout";const w=()=>{k!==void 0&&(clearTimeout(k),k=void 0)},N=()=>{w(),!(A<=0)&&(T=Date.now(),k=setTimeout(()=>{$="timeout",u(!1)},A))},K=()=>{k!==void 0&&(w(),A-=Date.now()-T)},[P,X]=y(!1),B=()=>t.paused===!0||P();G(ee(()=>te(t.item),e=>{A=e,B()?w():N()})),G(ee(B,e=>{e?K():N()},{defer:!0})),H(w),G(()=>{!f.present()&&!c()&&t.onDismiss($)});const _=()=>{w(),$="close",u(!1)},M=()=>{var e;const o=t.item.action;o&&((e=t.onAction)==null||e.call(t,o.label),o.onAction()===!1||(w(),$="action",u(!1)))},x=()=>d()==="card"?"mt-0.5":void 0,F=()=>[i(b,{get when(){return m()==="success"},get children(){return i(le,{get class(){return g("size-4 shrink-0 text-emerald-500",x())}})}}),i(b,{get when(){return m()==="warning"},get children(){return i(me,{get class(){return g("size-4 shrink-0 text-warning",x())}})}}),i(b,{get when(){return m()==="error"},get children(){return i(ce,{get class(){return g("size-4 shrink-0 text-destructive",x())}})}}),i(b,{get when(){return m()==="info"},get children(){return i(ue,{get class(){return g("size-4 shrink-0 text-info",x())}})}})],n=e=>i(b,{get when(){return t.item.action},children:o=>(()=>{var r=ve();return r.$$click=M,h(r,()=>o().label),z(()=>L(r,g(d()==="card"?g("inline-flex shrink-0 items-center rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",v()?"border-background/30 text-background hover:bg-background/10":"border-border text-foreground hover:bg-accent"):g("shrink-0 rounded-md text-sm font-medium underline-offset-2 hover:underline",E()),e.class))),r})()}),a=()=>i(b,{get when(){return l()},get children(){var e=fe();return e.$$click=_,h(e,i(pe,{class:"size-3.5"})),z(()=>L(e,g("-mr-1 flex size-5 shrink-0 items-center justify-center rounded-md transition-colors",S()))),e}});return i(b,{get when(){return f.present()},get children(){var e=J();e.addEventListener("pointerleave",()=>X(!1)),e.addEventListener("pointerenter",()=>X(!0));var o=f.setRef;return typeof o=="function"?V(o,e):f.setRef=e,h(e,i(F,{}),null),h(e,i(b,{get when(){return d()==="card"},get fallback(){return[(()=>{var r=he();return h(r,()=>t.item.message),r})(),i(n,{}),i(a,{})]},get children(){return[(()=>{var r=ge(),s=r.firstChild;return h(s,()=>t.item.message),h(r,i(b,{get when(){return t.item.description},get children(){var p=J();return h(p,()=>t.item.description),z(()=>L(p,g("mt-1 line-clamp-2 text-xs leading-snug",Y()))),p}}),null),h(r,i(n,{class:"mt-2"}),null),r})(),i(a,{})]}}),null),z(r=>{var s=m()==="error"?"alert":"status",p=d(),j=v()?"":void 0,C=f.state()==="closed"?"":void 0,O=g("pointer-events-auto border text-sm shadow-lg",I(),"animate-in fade-in-0 slide-in-from-top-4","data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:slide-out-to-top-2",d()==="card"?"flex min-w-[24rem] items-start gap-3 rounded-xl p-4 shadow-xl":"flex items-center gap-3 rounded-full px-4 py-2.5");return s!==r.e&&R(e,"role",r.e=s),p!==r.t&&R(e,"data-appearance",r.t=p),j!==r.a&&R(e,"data-inverse",r.a=j),C!==r.o&&R(e,"data-closed",r.o=C),O!==r.i&&L(e,r.i=O),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e}})}const ne={"top-center":"top-4 left-1/2 -translate-x-1/2 items-center","top-right":"top-4 right-4 items-end","top-left":"top-4 left-4 items-start","bottom-center":"bottom-4 left-1/2 -translate-x-1/2 items-center flex-col-reverse","bottom-right":"bottom-4 right-4 items-end flex-col-reverse","bottom-left":"bottom-4 left-4 items-start flex-col-reverse"},ke={"top-center":"items-center","top-left":"items-start","top-right":"items-end","bottom-center":"items-center flex-col-reverse","bottom-left":"items-start flex-col-reverse","bottom-right":"items-end flex-col-reverse"},W=12;function oe(t,c){const u=c.left+c.width/2,f=c.top+W,m=c.bottom-W,l=c.left+W,d=c.right-W,v=`${Math.max(0,c.width-W*2)}px`;switch(t){case"top-left":return{top:`${f}px`,left:`${l}px`,transform:"none","max-width":v};case"top-right":return{top:`${f}px`,left:`${d}px`,transform:"translateX(-100%)","max-width":v};case"bottom-center":return{top:`${m}px`,left:`${u}px`,transform:"translate(-50%, -100%)","max-width":v};case"bottom-left":return{top:`${m}px`,left:`${l}px`,transform:"translateY(-100%)","max-width":v};case"bottom-right":return{top:`${m}px`,left:`${d}px`,transform:"translate(-100%, -100%)","max-width":v};default:return{top:`${f}px`,left:`${u}px`,transform:"translateX(-50%)","max-width":v}}}function $e(t){const c=()=>t.max??3,u=()=>t.position??"top-center",f=()=>t.stack??"expanded",m=we(),l=()=>f()==="collapsed"&&!m(),[d,v]=y(!1),[I,Y]=y(!1),E=()=>d()||I(),S=20,A=.05,T=48,k=8,$=()=>u().startsWith("bottom"),w=()=>$()?-1:1,[N,K]=y(T),P=n=>{if(!n||typeof window>"u")return;const a=()=>{const o=n.offsetHeight;o&&K(o)};if(a(),typeof ResizeObserver>"u")return;const e=new ResizeObserver(a);e.observe(n),H(()=>e.disconnect())},X=n=>E()?`translateY(${w()*(N()+k)*n}px) scale(1)`:`translateY(${w()*S*n}px) scale(${1-A*n})`,B=()=>{const n=M().length;return n?E()?n*N()+(n-1)*k:N()+(n-1)*S:0},_=Q(()=>[...(t.toasts??[]).filter(n=>(n.target??void 0)===t.target)].reverse()),M=Q(()=>_().slice(0,c())),[x,F]=y(null);return G(()=>{const n=t.target;if(!n||typeof window>"u"){F(null);return}const a=window,e=()=>{const r=n.getBoundingClientRect();F({top:r.top,left:r.left,right:r.right,bottom:r.bottom,width:r.width})};e();const o=new ResizeObserver(e);o.observe(n),a.addEventListener("scroll",e,!0),a.addEventListener("resize",e),H(()=>{o.disconnect(),a.removeEventListener("scroll",e,!0),a.removeEventListener("resize",e)})}),i(b,{get when(){return l()},get fallback(){return(()=>{var n=be();return h(n,i(U,{get each(){return M()},children:a=>i(re,{item:a,get appearance(){return t.appearance},get inverse(){return t.inverse},onDismiss:e=>{var o;return(o=t.onDismiss)==null?void 0:o.call(t,a.id,e)},onAction:e=>{var o;return(o=t.onAction)==null?void 0:o.call(t,a.id,e)}})})),z(a=>{var e=g("pointer-events-none fixed flex flex-col gap-2",x()?ke[u()]:g("max-w-[min(30rem,calc(100vw-2rem))]",ne[u()])),o={...x()?oe(u(),x()):void 0};return e!==a.e&&L(n,a.e=e),a.t=Z(n,o,a.t),a},{e:void 0,t:void 0}),n})()},get children(){var n=xe(),a=n.firstChild;return n.$$focusout=()=>Y(!1),n.$$focusin=()=>Y(!0),n.addEventListener("pointerleave",()=>v(!1)),n.addEventListener("pointerenter",()=>v(!0)),h(a,i(U,{get each(){return M()},children:(e,o)=>(()=>{var r=J();return V(s=>{o()===0&&P(s)},r),h(r,i(re,{item:e,get paused(){return E()},get appearance(){return t.appearance},get inverse(){return t.inverse},onDismiss:s=>{var p;return(p=t.onDismiss)==null?void 0:p.call(t,e.id,s)},onAction:s=>{var p;return(p=t.onAction)==null?void 0:p.call(t,e.id,s)}})),z(s=>{var p=o(),j=g("absolute inset-x-0 flex transition-[transform,opacity] duration-200 ease-out",$()?"bottom-0 origin-bottom":"top-0 origin-top",u().endsWith("right")?"justify-end":u().endsWith("left")?"justify-start":"justify-center"),C=String(c()-o()),O=X(o());return p!==s.e&&R(r,"data-depth",s.e=p),j!==s.t&&L(r,s.t=j),C!==s.a&&q(r,"z-index",s.a=C),O!==s.o&&q(r,"transform",s.o=O),s},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()})),z(e=>{var o=E()?"":void 0,r=g("pointer-events-none fixed",!x()&&ne[u()]),s={...x()?oe(u(),x()):void 0},p=`${B()}px`;return o!==e.e&&R(n,"data-expanded",e.e=o),r!==e.t&&L(n,e.t=r),e.a=Z(n,s,e.a),p!==e.o&&q(a,"height",e.o=p),e},{e:void 0,t:void 0,a:void 0,o:void 0}),n}})}ie(["click","focusin","focusout"]),ae("kai-toast-region",{toasts:[],position:"top-center",max:3,stack:"expanded",appearance:"pill",inverse:!1,target:void 0},(t,{dispatch:c,flag:u})=>{const f=()=>{const l=t.max,d=typeof l=="string"?parseInt(l,10):l;return typeof d=="number"&&!Number.isNaN(d)?d:3},m=l=>{de.dismiss(l)};return i($e,{get toasts(){return t.toasts??[]},get position(){return t.position},get max(){return f()},get stack(){return t.stack},get appearance(){return t.appearance},get inverse(){return u("inverse")},get target(){return t.target},onDismiss:(l,d)=>{m(l),c("kai-dismiss",{id:l,reason:d})},onAction:(l,d)=>c("kai-action",{id:l,label:d})})});
1
+ import{g as y,k as Q,j as G,h as H,c as i,i as h,F as U,u as V,a as z,d as N,b as L,l as q,n as Z,S as b,t as D,x as ee,e as ie,f as ae}from"../define-By-uL588.js";import{c as g}from"../cn-DN5AWfiS.js";import{c as se}from"../overlay-Cb-MkyDa.js";import{r as te,t as de}from"../toast-store-tgK6MuMv.js";import{c as le}from"../check-njkVdZu2.js";import{c as ce}from"../circle-x-BPG0iPst.js";import{i as ue}from"../info-DsFjGuI_.js";import{t as me}from"../triangle-alert-DlQ68ppf.js";import{x as pe}from"../x-Z5UntkIJ.js";var ve=D("<button type=button>"),fe=D("<button type=button aria-label=Dismiss>"),J=D("<div>"),ge=D('<div class="min-w-0 flex-1"><div class="font-medium leading-snug">'),he=D('<span class="min-w-0 flex-1 truncate">'),xe=D('<div role=region aria-label=Notifications aria-live=polite data-stack=collapsed style="z-index:var(--kai-toast-z, 100)"><div class="pointer-events-auto relative transition-[height] duration-200 ease-out"style="min-width:16rem;max-width:min(30rem, calc(100vw - 2rem))">'),be=D('<div role=region aria-label=Notifications aria-live=polite data-stack=expanded style="z-index:var(--kai-toast-z, 100)">');function we(){var t,c;const[u,f]=y(typeof window<"u"&&((t=window.matchMedia)==null?void 0:t.call(window,"(prefers-reduced-motion: reduce)").matches)===!0);if(typeof window<"u"&&window.matchMedia){const m=window.matchMedia("(prefers-reduced-motion: reduce)"),l=()=>f(m.matches);(c=m.addEventListener)==null||c.call(m,"change",l),H(()=>{var d;return(d=m.removeEventListener)==null?void 0:d.call(m,"change",l)})}return u}function re(t){const[c,u]=y(!0),f=se(c),m=()=>t.item.variant??"neutral",l=()=>t.item.dismissible!==!1,d=()=>t.item.appearance??t.appearance??"pill",v=()=>t.item.inverse??t.inverse??!1,I=()=>v()?"bg-foreground text-background border-transparent":"bg-popover text-popover-foreground border-border",Y=()=>v()?"text-background/70":"text-muted-foreground",E=()=>v()?"text-background hover:text-background/80":"text-primary hover:text-primary/80",S=()=>v()?"text-background/70 hover:text-background":"text-muted-foreground hover:text-foreground";let A=te(t.item),T=0,k,$="timeout";const w=()=>{k!==void 0&&(clearTimeout(k),k=void 0)},j=()=>{w(),!(A<=0)&&(T=Date.now(),k=setTimeout(()=>{$="timeout",u(!1)},A))},K=()=>{k!==void 0&&(w(),A-=Date.now()-T)},[P,X]=y(!1),F=()=>t.paused===!0||P();G(ee(()=>te(t.item),e=>{A=e,F()?w():j()})),G(ee(F,e=>{e?K():j()},{defer:!0})),H(w),G(()=>{!f.present()&&!c()&&t.onDismiss($)});const _=()=>{w(),$="close",u(!1)},R=()=>{var e;const o=t.item.action;o&&((e=t.onAction)==null||e.call(t,o.label),o.onAction()===!1||(w(),$="action",u(!1)))},x=()=>d()==="card"?"mt-0.5":void 0,B=()=>[i(b,{get when(){return m()==="success"},get children(){return i(le,{get class(){return g("size-4 shrink-0 text-emerald-500",x())}})}}),i(b,{get when(){return m()==="warning"},get children(){return i(me,{get class(){return g("size-4 shrink-0 text-warning",x())}})}}),i(b,{get when(){return m()==="error"},get children(){return i(ce,{get class(){return g("size-4 shrink-0 text-destructive",x())}})}}),i(b,{get when(){return m()==="info"},get children(){return i(ue,{get class(){return g("size-4 shrink-0 text-info",x())}})}})],n=e=>i(b,{get when(){return t.item.action},children:o=>(()=>{var r=ve();return r.$$click=R,h(r,()=>o().label),z(()=>L(r,g(d()==="card"?g("inline-flex shrink-0 items-center rounded-md border px-2.5 py-1 text-xs font-medium transition-colors",v()?"border-background/30 text-background hover:bg-background/10":"border-border text-foreground hover:bg-accent"):g("shrink-0 rounded-md text-sm font-medium underline-offset-2 hover:underline",E()),e.class))),r})()}),a=()=>i(b,{get when(){return l()},get children(){var e=fe();return e.$$click=_,h(e,i(pe,{class:"size-3.5"})),z(()=>L(e,g("-mr-1 flex size-5 shrink-0 items-center justify-center rounded-md transition-colors",S()))),e}});return i(b,{get when(){return f.present()},get children(){var e=J();e.addEventListener("pointerleave",()=>X(!1)),e.addEventListener("pointerenter",()=>X(!0));var o=f.setRef;return typeof o=="function"?V(o,e):f.setRef=e,h(e,i(B,{}),null),h(e,i(b,{get when(){return d()==="card"},get fallback(){return[(()=>{var r=he();return h(r,()=>t.item.message),r})(),i(n,{}),i(a,{})]},get children(){return[(()=>{var r=ge(),s=r.firstChild;return h(s,()=>t.item.message),h(r,i(b,{get when(){return t.item.description},get children(){var p=J();return h(p,()=>t.item.description),z(()=>L(p,g("mt-1 line-clamp-2 text-xs leading-snug",Y()))),p}}),null),h(r,i(n,{class:"mt-2"}),null),r})(),i(a,{})]}}),null),z(r=>{var s=m()==="error"?"alert":"status",p=d(),M=v()?"":void 0,C=f.state()==="closed"?"":void 0,O=g("pointer-events-auto border text-sm shadow-lg",I(),"animate-in fade-in-0 slide-in-from-top-4","data-[closed]:animate-out data-[closed]:fade-out-0 data-[closed]:slide-out-to-top-2",d()==="card"?"flex min-w-[24rem] items-start gap-3 rounded-xl p-4 shadow-xl":"flex items-center gap-3 rounded-full px-4 py-2.5");return s!==r.e&&N(e,"role",r.e=s),p!==r.t&&N(e,"data-appearance",r.t=p),M!==r.a&&N(e,"data-inverse",r.a=M),C!==r.o&&N(e,"data-closed",r.o=C),O!==r.i&&L(e,r.i=O),r},{e:void 0,t:void 0,a:void 0,o:void 0,i:void 0}),e}})}const ne={"top-center":"top-4 left-1/2 -translate-x-1/2 items-center","top-right":"top-4 right-4 items-end","top-left":"top-4 left-4 items-start","bottom-center":"bottom-4 left-1/2 -translate-x-1/2 items-center flex-col-reverse","bottom-right":"bottom-4 right-4 items-end flex-col-reverse","bottom-left":"bottom-4 left-4 items-start flex-col-reverse"},ke={"top-center":"items-center","top-left":"items-start","top-right":"items-end","bottom-center":"items-center flex-col-reverse","bottom-left":"items-start flex-col-reverse","bottom-right":"items-end flex-col-reverse"},W=12;function oe(t,c){const u=c.left+c.width/2,f=c.top+W,m=c.bottom-W,l=c.left+W,d=c.right-W,v=`${Math.max(0,c.width-W*2)}px`;switch(t){case"top-left":return{top:`${f}px`,left:`${l}px`,transform:"none","max-width":v};case"top-right":return{top:`${f}px`,left:`${d}px`,transform:"translateX(-100%)","max-width":v};case"bottom-center":return{top:`${m}px`,left:`${u}px`,transform:"translate(-50%, -100%)","max-width":v};case"bottom-left":return{top:`${m}px`,left:`${l}px`,transform:"translateY(-100%)","max-width":v};case"bottom-right":return{top:`${m}px`,left:`${d}px`,transform:"translate(-100%, -100%)","max-width":v};default:return{top:`${f}px`,left:`${u}px`,transform:"translateX(-50%)","max-width":v}}}function $e(t){const c=()=>t.max??3,u=()=>t.position??"top-center",f=()=>t.stack??"expanded",m=we(),l=()=>f()==="collapsed"&&!m(),[d,v]=y(!1),[I,Y]=y(!1),E=()=>d()||I(),S=20,A=.05,T=48,k=8,$=()=>u().startsWith("bottom"),w=()=>$()?-1:1,[j,K]=y(T),P=n=>{if(!n||typeof window>"u")return;const a=()=>{const o=n.offsetHeight;o&&K(o)};if(a(),typeof ResizeObserver>"u")return;const e=new ResizeObserver(a);e.observe(n),H(()=>e.disconnect())},X=n=>E()?`translateY(${w()*(j()+k)*n}px) scale(1)`:`translateY(${w()*S*n}px) scale(${1-A*n})`,F=()=>{const n=R().length;return n?E()?n*j()+(n-1)*k:j()+(n-1)*S:0},_=Q(()=>[...(t.toasts??[]).filter(n=>(n.target??void 0)===t.target)].reverse()),R=Q(()=>_().slice(0,c())),[x,B]=y(null);return G(()=>{const n=t.target;if(!n||typeof window>"u"){B(null);return}const a=window,e=()=>{const r=n.getBoundingClientRect();B({top:r.top,left:r.left,right:r.right,bottom:r.bottom,width:r.width})};e();const o=new ResizeObserver(e);o.observe(n),a.addEventListener("scroll",e,!0),a.addEventListener("resize",e),H(()=>{o.disconnect(),a.removeEventListener("scroll",e,!0),a.removeEventListener("resize",e)})}),i(b,{get when(){return l()},get fallback(){return(()=>{var n=be();return h(n,i(U,{get each(){return R()},children:a=>i(re,{item:a,get appearance(){return t.appearance},get inverse(){return t.inverse},onDismiss:e=>{var o;return(o=t.onDismiss)==null?void 0:o.call(t,a.id,e)},onAction:e=>{var o;return(o=t.onAction)==null?void 0:o.call(t,a.id,e)}})})),z(a=>{var e=g("pointer-events-none fixed flex flex-col gap-2",x()?ke[u()]:g("max-w-[min(30rem,calc(100vw-2rem))]",ne[u()])),o={...x()?oe(u(),x()):void 0};return e!==a.e&&L(n,a.e=e),a.t=Z(n,o,a.t),a},{e:void 0,t:void 0}),n})()},get children(){var n=xe(),a=n.firstChild;return n.$$focusout=()=>Y(!1),n.$$focusin=()=>Y(!0),n.addEventListener("pointerleave",()=>v(!1)),n.addEventListener("pointerenter",()=>v(!0)),h(a,i(U,{get each(){return R()},children:(e,o)=>(()=>{var r=J();return V(s=>{o()===0&&P(s)},r),h(r,i(re,{item:e,get paused(){return E()},get appearance(){return t.appearance},get inverse(){return t.inverse},onDismiss:s=>{var p;return(p=t.onDismiss)==null?void 0:p.call(t,e.id,s)},onAction:s=>{var p;return(p=t.onAction)==null?void 0:p.call(t,e.id,s)}})),z(s=>{var p=o(),M=g("absolute inset-x-0 flex transition-[transform,opacity] duration-200 ease-out",$()?"bottom-0 origin-bottom":"top-0 origin-top",u().endsWith("right")?"justify-end":u().endsWith("left")?"justify-start":"justify-center"),C=String(c()-o()),O=X(o());return p!==s.e&&N(r,"data-depth",s.e=p),M!==s.t&&L(r,s.t=M),C!==s.a&&q(r,"z-index",s.a=C),O!==s.o&&q(r,"transform",s.o=O),s},{e:void 0,t:void 0,a:void 0,o:void 0}),r})()})),z(e=>{var o=E()?"":void 0,r=g("pointer-events-none fixed",!x()&&ne[u()]),s={...x()?oe(u(),x()):void 0},p=`${F()}px`;return o!==e.e&&N(n,"data-expanded",e.e=o),r!==e.t&&L(n,e.t=r),e.a=Z(n,s,e.a),p!==e.o&&q(a,"height",e.o=p),e},{e:void 0,t:void 0,a:void 0,o:void 0}),n}})}ie(["click","focusin","focusout"]),ae("kai-toast-region",{toasts:[],position:"top-center",max:3,stack:"expanded",appearance:"pill",inverse:!1,target:void 0},(t,{dispatch:c,flag:u})=>{const f=()=>{const l=t.max,d=typeof l=="string"?parseInt(l,10):l;return typeof d=="number"&&!Number.isNaN(d)?d:3},m=l=>{de.dismiss(l)};return i($e,{get toasts(){return t.toasts??[]},get position(){return t.position},get max(){return f()},get stack(){return t.stack},get appearance(){return t.appearance},get inverse(){return u("inverse")},get target(){return t.target},onDismiss:(l,d)=>{m(l),c("kai-dismiss",{id:l,reason:d})},onAction:(l,d)=>c("kai-action",{id:l,label:d})})});
@@ -1 +1 @@
1
- import{f as i,g as s,c as r,S as f}from"./chunks/define-wjHR1MkU.js";import{T as u}from"./chunks/tool-DKQ2D1DP.js";import{w as g}from"./chunks/disclosure-CcNbyLy0.js";i("kai-tool",{tool:void 0,open:void 0,defaultOpen:void 0,disabled:void 0},(e,t)=>{const{flag:o,reflectFlag:l}=t,[a,d]=s();return g(t,a,()=>e.open),l("disabled"),r(f,{get when(){return e.tool},get children(){return r(u,{get toolPart(){return e.tool},get defaultOpen(){return o("defaultOpen")},get disabled(){return o("disabled")},controllerRef:n=>d(n)})}})});
1
+ import{f as i,g as s,c as r,S as f}from"../define-By-uL588.js";import{T as u}from"../tool-DzUjIBT8.js";import{w as g}from"../disclosure-WUImBbDv.js";i("kai-tool",{tool:void 0,open:void 0,defaultOpen:void 0,disabled:void 0},(e,t)=>{const{flag:o,reflectFlag:l}=t,[a,d]=s();return g(t,a,()=>e.open),l("disabled"),r(f,{get when(){return e.tool},get children(){return r(u,{get toolPart(){return e.tool},get defaultOpen(){return o("defaultOpen")},get disabled(){return o("disabled")},controllerRef:n=>d(n)})}})});
@@ -1 +1 @@
1
- import{f as i,c as d,v as s,j as r,t as a}from"./chunks/define-wjHR1MkU.js";import{T as p}from"./chunks/tooltip-B0G99y8w.js";import{w as u}from"./chunks/disclosure-CcNbyLy0.js";var c=a("<style>:host{display:inline-flex}"),m=a("<slot>");i("kai-tooltip",{content:"",openDelay:void 0,closeDelay:void 0,placement:void 0,open:void 0,defaultOpen:void 0,disabled:void 0},(e,o)=>{const{flag:l}=o;let n;return u(o,()=>n,()=>e.open),[c(),d(p,{get content(){return e.content??""},get openDelay(){return r(()=>e.openDelay!=null)()?Number(e.openDelay):void 0},get closeDelay(){return r(()=>e.closeDelay!=null)()?Number(e.closeDelay):void 0},get placement(){return e.placement??void 0},get defaultOpen(){return l("defaultOpen")},get disabled(){return l("disabled")},controllerRef:t=>n=t,get children(){var t=m();return t._$owner=s(),t}})]});
1
+ import{f as i,c as d,v as s,m as r,t as a}from"../define-By-uL588.js";import{T as p}from"../tooltip-Bkkg_4t0.js";import{w as u}from"../disclosure-WUImBbDv.js";var c=a("<style>:host{display:inline-flex}"),m=a("<slot>");i("kai-tooltip",{content:"",openDelay:void 0,closeDelay:void 0,placement:void 0,open:void 0,defaultOpen:void 0,disabled:void 0},(e,o)=>{const{flag:l}=o;let n;return u(o,()=>n,()=>e.open),[c(),d(p,{get content(){return e.content??""},get openDelay(){return r(()=>e.openDelay!=null)()?Number(e.openDelay):void 0},get closeDelay(){return r(()=>e.closeDelay!=null)()?Number(e.closeDelay):void 0},get placement(){return e.placement??void 0},get defaultOpen(){return l("defaultOpen")},get disabled(){return l("disabled")},controllerRef:t=>n=t,get children(){var t=m();return t._$owner=s(),t}})]});
@@ -1 +1 @@
1
- import{g as x,h as B,s as V,k as D,x as U,i as j,c as h,F as $,n as q,S as C,j as z,a as A,b as G,t as T,f as H}from"./chunks/define-wjHR1MkU.js";import{c as L}from"./chunks/cn-CU7UAWzk.js";import{B as J}from"./chunks/button-flUbeufF.js";import{T as K}from"./chunks/tooltip-B0G99y8w.js";function N(r={}){const s=r.mimeType??"audio/webm;codecs=opus",[c,m]=x(!1),[l,e]=x(null),[t,u]=x();let a,v=[],f;async function o(){e(null),v=[];try{const n=await navigator.mediaDevices.getUserMedia({audio:!0});return u(n),a=new MediaRecorder(n,{mimeType:s}),a.ondataavailable=i=>{i.data.size>0&&v.push(i.data)},a.onstop=()=>{const i=new Blob(v,{type:s});n.getTracks().forEach(d=>d.stop()),u(void 0),m(!1),f?.(i)},a.start(),m(!0),new Promise(i=>{f=i})}catch(n){const i=t();throw i&&(i.getTracks().forEach(d=>d.stop()),u(void 0)),e(n instanceof Error?n.message:"Microphone access denied"),m(!1),n}}function y(){a&&a.state==="recording"&&a.stop()}return B(()=>y()),{isRecording:c,error:l,stream:t,start:o,stop:y}}function P(){if(typeof window>"u")return;const r=window;return r.SpeechRecognition??r.webkitSpeechRecognition}function O(r={}){const[s,c]=x(!1),[m,l]=x(null),e=P()!==void 0;let t,u,a="";function v(o={}){l(null),a="";const y=P();if(!y){const n="SpeechRecognition is not supported in this browser";return l(n),Promise.reject(new Error(n))}try{return t=new y,o.lang&&(t.lang=o.lang),t.interimResults=r.interim===!0,t.continuous=!1,t.onresult=n=>{var i;let d="";for(let w=n.resultIndex;w<n.results.length;w++){const E=n.results[w],R=((i=E[0])==null?void 0:i.transcript)??"";E.isFinal?a+=R:d+=R}d&&o.onInterim&&o.onInterim(d)},t.onerror=n=>{var i;const d=n.error??"unknown",w=`Speech recognition error: ${d}`;l(w),(i=o.onError)==null||i.call(o,d,w)},t.onend=()=>{c(!1),u?.(a),t=void 0},t.start(),c(!0),new Promise(n=>{u=n})}catch(n){throw l(n instanceof Error?n.message:"Speech recognition failed to start"),c(!1),n}}function f(){t&&s()&&t.stop()}return B(()=>{t&&t.abort()}),{isSupported:e,isListening:s,error:m,start:v,stop:f}}var Q=T('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3z"></path><path d="M19 10v2a7 7 0 01-14 0v-2"></path><line x1=12 y1=19 x2=12 y2=23></line><line x1=8 y1=23 x2=16 y2=23>'),W=T('<svg width=14 height=14 viewBox="0 0 24 24"fill=currentColor><rect x=4 y=4 width=16 height=16 rx=2>'),X=T('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 class=animate-spin><path d="M21 12a9 9 0 11-6.219-8.56">'),Y=T("<div>"),Z=T('<div class="absolute inset-0 animate-ping rounded-full border-2 border-red-400/30"style=animation-duration:2s>');function _(r){var s;const[c]=V(r,["onTranscribe","onTranscription","disabled","class"]),{isRecording:m,start:l,stop:e}=N(),t=O({interim:r.interim}),[u,a]=x(!1),v=()=>!r.hasTranscribe&&t.isSupported,f=()=>u()?"Transcribing...":o()?"Stop recording":"Voice input",o=()=>v()?t.isListening():m();async function y(){var g,p;let k=!1;try{const b=await t.start({lang:r.lang,onInterim:r.interim?I=>{var S;return(S=r.onInterim)==null?void 0:S.call(r,I)}:void 0,onError:(I,S)=>{var M;k=!0,(M=r.onError)==null||M.call(r,{source:"recognition",error:I,message:S})}});b.trim()?c.onTranscription(b.trim()):k||(g=r.onError)==null||g.call(r,{source:"recognition",error:"no-result",message:"Speech recognition ended without capturing any text"})}catch(b){k||(p=r.onError)==null||p.call(r,{source:"recognition",error:b instanceof Error?b.name:"unknown",message:b instanceof Error?b.message:String(b)})}}async function n(){try{const g=await l();a(!0);try{const p=await c.onTranscribe(g);p.trim()&&c.onTranscription(p.trim())}finally{a(!1)}}catch{a(!1)}}function i(){v()?y():n()}function d(){v()?t.stop():e()}async function w(){o()?d():i()}D(U(o,g=>{var p;(p=r.onRecordingChange)==null||p.call(r,g)},{defer:!0})),(s=r.controllerRef)==null||s.call(r,{start:()=>{o()||i()},stop:()=>d()});const E=()=>Q(),R=()=>W(),F=()=>X();return(()=>{var g=Y();return j(g,h(C,{get when(){return o()},get children(){return h($,{each:[0,1,2],children:p=>(()=>{var k=Z();return q(k,"animation-delay",`${p*.3}s`),k})()})}}),null),j(g,h(K,{get content(){return f()},get children(){return h(J,{variant:"ghost",size:"icon-sm",get"aria-label"(){return f()},onClick:w,get disabled(){return c.disabled||u()},get class(){return L("relative z-10 rounded-full transition-all duration-300",o()&&"bg-destructive text-white hover:bg-destructive/80")},get children(){return[h(C,{get when(){return u()},get children(){return h(F,{})}}),h(C,{get when(){return z(()=>!u())()&&o()},get children(){return h(R,{})}}),h(C,{get when(){return z(()=>!u())()&&!o()},get children(){return h(E,{})}})]}})}}),null),A(()=>G(g,L("relative inline-flex items-center justify-center",c.class))),g})()}H("kai-voice-input",{transcribe:void 0,disabled:!1,recognitionLang:void 0,interim:!1},(r,{dispatch:s,flag:c,expose:m})=>{let l;return m({start:()=>l?.start(),stop:()=>l?.stop()}),h(_,{get disabled(){return c("disabled")},get hasTranscribe(){return typeof r.transcribe=="function"},get lang(){return r.recognitionLang},get interim(){return c("interim")},onTranscribe:async e=>(s("kai-audio-captured",{blob:e}),r.transcribe?r.transcribe(e):""),onTranscription:e=>s("kai-transcription",{text:e}),onInterim:e=>s("kai-transcript-interim",{text:e}),onRecordingChange:e=>s("kai-recording-change",{recording:e}),onError:e=>s("kai-voice-error",e),controllerRef:e=>l=e})});
1
+ import{g as x,h as B,s as V,j as D,x as U,i as j,c as h,F as $,l as q,S as C,m as z,a as A,b as G,t as T,f as H}from"../define-By-uL588.js";import{c as L}from"../cn-DN5AWfiS.js";import{B as J}from"../button-DkuOnGLy.js";import{T as K}from"../tooltip-Bkkg_4t0.js";function N(r={}){const s=r.mimeType??"audio/webm;codecs=opus",[c,m]=x(!1),[l,e]=x(null),[t,u]=x();let a,v=[],f;async function o(){e(null),v=[];try{const n=await navigator.mediaDevices.getUserMedia({audio:!0});return u(n),a=new MediaRecorder(n,{mimeType:s}),a.ondataavailable=i=>{i.data.size>0&&v.push(i.data)},a.onstop=()=>{const i=new Blob(v,{type:s});n.getTracks().forEach(d=>d.stop()),u(void 0),m(!1),f?.(i)},a.start(),m(!0),new Promise(i=>{f=i})}catch(n){const i=t();throw i&&(i.getTracks().forEach(d=>d.stop()),u(void 0)),e(n instanceof Error?n.message:"Microphone access denied"),m(!1),n}}function y(){a&&a.state==="recording"&&a.stop()}return B(()=>y()),{isRecording:c,error:l,stream:t,start:o,stop:y}}function P(){if(typeof window>"u")return;const r=window;return r.SpeechRecognition??r.webkitSpeechRecognition}function O(r={}){const[s,c]=x(!1),[m,l]=x(null),e=P()!==void 0;let t,u,a="";function v(o={}){l(null),a="";const y=P();if(!y){const n="SpeechRecognition is not supported in this browser";return l(n),Promise.reject(new Error(n))}try{return t=new y,o.lang&&(t.lang=o.lang),t.interimResults=r.interim===!0,t.continuous=!1,t.onresult=n=>{var i;let d="";for(let w=n.resultIndex;w<n.results.length;w++){const E=n.results[w],R=((i=E[0])==null?void 0:i.transcript)??"";E.isFinal?a+=R:d+=R}d&&o.onInterim&&o.onInterim(d)},t.onerror=n=>{var i;const d=n.error??"unknown",w=`Speech recognition error: ${d}`;l(w),(i=o.onError)==null||i.call(o,d,w)},t.onend=()=>{c(!1),u?.(a),t=void 0},t.start(),c(!0),new Promise(n=>{u=n})}catch(n){throw l(n instanceof Error?n.message:"Speech recognition failed to start"),c(!1),n}}function f(){t&&s()&&t.stop()}return B(()=>{t&&t.abort()}),{isSupported:e,isListening:s,error:m,start:v,stop:f}}var Q=T('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><path d="M12 1a3 3 0 00-3 3v8a3 3 0 006 0V4a3 3 0 00-3-3z"></path><path d="M19 10v2a7 7 0 01-14 0v-2"></path><line x1=12 y1=19 x2=12 y2=23></line><line x1=8 y1=23 x2=16 y2=23>'),W=T('<svg width=14 height=14 viewBox="0 0 24 24"fill=currentColor><rect x=4 y=4 width=16 height=16 rx=2>'),X=T('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 class=animate-spin><path d="M21 12a9 9 0 11-6.219-8.56">'),Y=T("<div>"),Z=T('<div class="absolute inset-0 animate-ping rounded-full border-2 border-red-400/30"style=animation-duration:2s>');function _(r){var s;const[c]=V(r,["onTranscribe","onTranscription","disabled","class"]),{isRecording:m,start:l,stop:e}=N(),t=O({interim:r.interim}),[u,a]=x(!1),v=()=>!r.hasTranscribe&&t.isSupported,f=()=>u()?"Transcribing...":o()?"Stop recording":"Voice input",o=()=>v()?t.isListening():m();async function y(){var g,p;let k=!1;try{const b=await t.start({lang:r.lang,onInterim:r.interim?I=>{var S;return(S=r.onInterim)==null?void 0:S.call(r,I)}:void 0,onError:(I,S)=>{var M;k=!0,(M=r.onError)==null||M.call(r,{source:"recognition",error:I,message:S})}});b.trim()?c.onTranscription(b.trim()):k||(g=r.onError)==null||g.call(r,{source:"recognition",error:"no-result",message:"Speech recognition ended without capturing any text"})}catch(b){k||(p=r.onError)==null||p.call(r,{source:"recognition",error:b instanceof Error?b.name:"unknown",message:b instanceof Error?b.message:String(b)})}}async function n(){try{const g=await l();a(!0);try{const p=await c.onTranscribe(g);p.trim()&&c.onTranscription(p.trim())}finally{a(!1)}}catch{a(!1)}}function i(){v()?y():n()}function d(){v()?t.stop():e()}async function w(){o()?d():i()}D(U(o,g=>{var p;(p=r.onRecordingChange)==null||p.call(r,g)},{defer:!0})),(s=r.controllerRef)==null||s.call(r,{start:()=>{o()||i()},stop:()=>d()});const E=()=>Q(),R=()=>W(),F=()=>X();return(()=>{var g=Y();return j(g,h(C,{get when(){return o()},get children(){return h($,{each:[0,1,2],children:p=>(()=>{var k=Z();return q(k,"animation-delay",`${p*.3}s`),k})()})}}),null),j(g,h(K,{get content(){return f()},get children(){return h(J,{variant:"ghost",size:"icon-sm",get"aria-label"(){return f()},onClick:w,get disabled(){return c.disabled||u()},get class(){return L("relative z-10 rounded-full transition-all duration-300",o()&&"bg-destructive text-white hover:bg-destructive/80")},get children(){return[h(C,{get when(){return u()},get children(){return h(F,{})}}),h(C,{get when(){return z(()=>!u())()&&o()},get children(){return h(R,{})}}),h(C,{get when(){return z(()=>!u())()&&!o()},get children(){return h(E,{})}})]}})}}),null),A(()=>G(g,L("relative inline-flex items-center justify-center",c.class))),g})()}H("kai-voice-input",{transcribe:void 0,disabled:!1,recognitionLang:void 0,interim:!1},(r,{dispatch:s,flag:c,expose:m})=>{let l;return m({start:()=>l?.start(),stop:()=>l?.stop()}),h(_,{get disabled(){return c("disabled")},get hasTranscribe(){return typeof r.transcribe=="function"},get lang(){return r.recognitionLang},get interim(){return c("interim")},onTranscribe:async e=>(s("kai-audio-captured",{blob:e}),r.transcribe?r.transcribe(e):""),onTranscription:e=>s("kai-transcription",{text:e}),onInterim:e=>s("kai-transcript-interim",{text:e}),onRecordingChange:e=>s("kai-recording-change",{recording:e}),onError:e=>s("kai-voice-error",e),controllerRef:e=>l=e})});
@@ -1 +1 @@
1
- import{s as $,g as z,k as x,x as b,h as q,i as D,c as a,S as w,j as R,a as F,b as G,t as y,f as H}from"./chunks/define-wjHR1MkU.js";import{c as C}from"./chunks/cn-CU7UAWzk.js";import{B as I}from"./chunks/button-flUbeufF.js";import{T as J}from"./chunks/tooltip-B0G99y8w.js";var K=y('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07">'),N=y('<svg width=14 height=14 viewBox="0 0 24 24"fill=currentColor><rect x=4 y=4 width=16 height=16 rx=2>'),P=y('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 class=animate-spin><path d="M21 12a9 9 0 11-6.219-8.56">'),V=y("<div>");function p(){return typeof window<"u"&&"speechSynthesis"in window}function W(e){var c;const[i]=$(e,["text","disabled","class"]),[l,n]=z(!1),[t,v]=z(!1);let r,h,d;const E=()=>!!e.onSynthesize||p(),S=()=>t()?"Synthesizing...":l()?"Stop":"Read aloud";function k(){h&&(URL.revokeObjectURL(h),h=void 0)}function j(){!p()||!i.text||(window.speechSynthesis.cancel(),d=new SpeechSynthesisUtterance(i.text),d.onstart=()=>n(!0),d.onend=()=>n(!1),d.onerror=s=>{var u;n(!1);const o=s?.error??"unknown";o==="canceled"||o==="interrupted"||(u=e.onError)==null||u.call(e,{source:"synthesis",error:o,message:`Speech synthesis error: ${o}`})},window.speechSynthesis.speak(d))}async function U(){var s,u;if(!(!e.onSynthesize||!i.text)){v(!0);try{const o=await e.onSynthesize(i.text);(s=e.onSynthesized)==null||s.call(e,o),k(),h=URL.createObjectURL(o),r??(r=new Audio),r.src=h,r.onended=()=>n(!1),r.onerror=()=>{var m;n(!1),(m=e.onError)==null||m.call(e,{source:"synthesis",error:"playback-failed",message:"The synthesized audio failed to play"})},await r.play(),n(!0)}catch(o){n(!1),(u=e.onError)==null||u.call(e,{source:"synthesis",error:o instanceof Error?o.name:"unknown",message:o instanceof Error?o.message:String(o)})}finally{v(!1)}}}function g(){e.onSynthesize?U():j()}function f(){e.onSynthesize?r&&(r.pause(),r.currentTime=0):p()&&window.speechSynthesis.cancel(),n(!1)}function B(){e.onSynthesize?r?.pause():p()&&window.speechSynthesis.pause()}function L(){e.onSynthesize?r?.play():p()&&window.speechSynthesis.resume()}function M(){l()?f():g()}x(b(l,s=>{var u;(u=e.onSpeakingChange)==null||u.call(e,s)},{defer:!0})),x(b(()=>i.text,s=>{e.autoplay&&s&&g()},{defer:!0})),(c=e.controllerRef)==null||c.call(e,{speak:g,pause:B,resume:L,stop:f}),q(()=>{f(),k()});const T=()=>K(),O=()=>N(),A=()=>P();return(()=>{var s=V();return D(s,a(J,{get content(){return S()},get children(){return a(I,{part:"button",variant:"ghost",size:"icon-sm",get"aria-label"(){return S()},get"aria-pressed"(){return l()},onClick:M,get disabled(){return i.disabled||!E()||t()},get class(){return C("relative z-10 rounded-full transition-all duration-300")},get children(){return[a(w,{get when(){return t()},get children(){return a(A,{})}}),a(w,{get when(){return R(()=>!t())()&&l()},get children(){return a(O,{})}}),a(w,{get when(){return R(()=>!t())()&&!l()},get children(){return a(T,{})}})]}})}})),F(()=>G(s,C("relative inline-flex items-center justify-center",i.class))),s})()}H("kai-voice-output",{text:"",autoplay:!1,synthesize:void 0,disabled:!1},(e,{dispatch:c,flag:i,expose:l})=>{let n;return l({speak:()=>n?.speak(),pause:()=>n?.pause(),resume:()=>n?.resume(),stop:()=>n?.stop()}),a(W,{get text(){return e.text??""},get autoplay(){return i("autoplay")},get disabled(){return i("disabled")},get onSynthesize(){return e.synthesize?t=>e.synthesize(t):void 0},onSpeakingChange:t=>c("kai-speaking-change",{speaking:t}),onSynthesized:t=>c("kai-synthesized",{blob:t}),onError:t=>c("kai-voice-error",t),controllerRef:t=>n=t})});
1
+ import{s as $,g as z,j as x,x as b,h as q,i as D,c as a,S as w,m as R,a as F,b as G,t as y,f as H}from"../define-By-uL588.js";import{c as C}from"../cn-DN5AWfiS.js";import{B as I}from"../button-DkuOnGLy.js";import{T as J}from"../tooltip-Bkkg_4t0.js";var K=y('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 stroke-linecap=round stroke-linejoin=round><polygon points="11 5 6 9 2 9 2 15 6 15 11 19 11 5"></polygon><path d="M19.07 4.93a10 10 0 010 14.14M15.54 8.46a5 5 0 010 7.07">'),N=y('<svg width=14 height=14 viewBox="0 0 24 24"fill=currentColor><rect x=4 y=4 width=16 height=16 rx=2>'),P=y('<svg width=16 height=16 viewBox="0 0 24 24"fill=none stroke=currentColor stroke-width=2 class=animate-spin><path d="M21 12a9 9 0 11-6.219-8.56">'),V=y("<div>");function p(){return typeof window<"u"&&"speechSynthesis"in window}function W(e){var c;const[i]=$(e,["text","disabled","class"]),[l,n]=z(!1),[t,v]=z(!1);let r,h,d;const E=()=>!!e.onSynthesize||p(),S=()=>t()?"Synthesizing...":l()?"Stop":"Read aloud";function k(){h&&(URL.revokeObjectURL(h),h=void 0)}function j(){!p()||!i.text||(window.speechSynthesis.cancel(),d=new SpeechSynthesisUtterance(i.text),d.onstart=()=>n(!0),d.onend=()=>n(!1),d.onerror=s=>{var u;n(!1);const o=s?.error??"unknown";o==="canceled"||o==="interrupted"||(u=e.onError)==null||u.call(e,{source:"synthesis",error:o,message:`Speech synthesis error: ${o}`})},window.speechSynthesis.speak(d))}async function U(){var s,u;if(!(!e.onSynthesize||!i.text)){v(!0);try{const o=await e.onSynthesize(i.text);(s=e.onSynthesized)==null||s.call(e,o),k(),h=URL.createObjectURL(o),r??(r=new Audio),r.src=h,r.onended=()=>n(!1),r.onerror=()=>{var m;n(!1),(m=e.onError)==null||m.call(e,{source:"synthesis",error:"playback-failed",message:"The synthesized audio failed to play"})},await r.play(),n(!0)}catch(o){n(!1),(u=e.onError)==null||u.call(e,{source:"synthesis",error:o instanceof Error?o.name:"unknown",message:o instanceof Error?o.message:String(o)})}finally{v(!1)}}}function g(){e.onSynthesize?U():j()}function f(){e.onSynthesize?r&&(r.pause(),r.currentTime=0):p()&&window.speechSynthesis.cancel(),n(!1)}function B(){e.onSynthesize?r?.pause():p()&&window.speechSynthesis.pause()}function L(){e.onSynthesize?r?.play():p()&&window.speechSynthesis.resume()}function M(){l()?f():g()}x(b(l,s=>{var u;(u=e.onSpeakingChange)==null||u.call(e,s)},{defer:!0})),x(b(()=>i.text,s=>{e.autoplay&&s&&g()},{defer:!0})),(c=e.controllerRef)==null||c.call(e,{speak:g,pause:B,resume:L,stop:f}),q(()=>{f(),k()});const T=()=>K(),O=()=>N(),A=()=>P();return(()=>{var s=V();return D(s,a(J,{get content(){return S()},get children(){return a(I,{part:"button",variant:"ghost",size:"icon-sm",get"aria-label"(){return S()},get"aria-pressed"(){return l()},onClick:M,get disabled(){return i.disabled||!E()||t()},get class(){return C("relative z-10 rounded-full transition-all duration-300")},get children(){return[a(w,{get when(){return t()},get children(){return a(A,{})}}),a(w,{get when(){return R(()=>!t())()&&l()},get children(){return a(O,{})}}),a(w,{get when(){return R(()=>!t())()&&!l()},get children(){return a(T,{})}})]}})}})),F(()=>G(s,C("relative inline-flex items-center justify-center",i.class))),s})()}H("kai-voice-output",{text:"",autoplay:!1,synthesize:void 0,disabled:!1},(e,{dispatch:c,flag:i,expose:l})=>{let n;return l({speak:()=>n?.speak(),pause:()=>n?.pause(),resume:()=>n?.resume(),stop:()=>n?.stop()}),a(W,{get text(){return e.text??""},get autoplay(){return i("autoplay")},get disabled(){return i("disabled")},get onSynthesize(){return e.synthesize?t=>e.synthesize(t):void 0},onSpeakingChange:t=>c("kai-speaking-change",{speaking:t}),onSynthesized:t=>c("kai-synthesized",{blob:t}),onError:t=>c("kai-voice-error",t),controllerRef:t=>n=t})});