@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.
- package/README.md +25 -6
- package/bin/mcp.js +16 -3
- package/bin/route.js +23 -0
- package/bin/route.test.js +58 -0
- package/dist/{elements/chunks/Icon--Y8vsFal.js → Icon-DObhsRtm.js} +1 -1
- package/dist/action-icons-CcgNN2oT.js +1 -0
- package/dist/arrow-down-CjRU3JgV.js +1 -0
- package/dist/arrow-left-Bnpb1UEW.js +1 -0
- package/dist/artifact-Bwt7OgcR.js +1 -0
- package/dist/assets/dev-5XzXYR21.js +91 -0
- package/dist/attachments-Qr4kg-2b.js +1 -0
- package/dist/{elements/chunks/audio-visualizer-D7lB6mvR.js → audio-visualizer-DToYdfSc.js} +1 -1
- package/dist/badge-CdEu_jn2.js +1 -0
- package/dist/bash-InADTalH.js +1 -6
- package/dist/bell-DQAAOpDz.js +1 -0
- package/dist/{elements/chunks/button-flUbeufF.js → button-DkuOnGLy.js} +1 -1
- package/dist/card-renderer-Jx70m6_l.js +1 -0
- package/dist/card-routing-0YidER_3.js +1 -0
- package/dist/check-njkVdZu2.js +1 -0
- package/dist/checkbox-D7iRB3nL.js +1 -0
- package/dist/checkbox-group-B2_rpoPM.js +1 -0
- package/dist/chevron-down-B72s6PXR.js +1 -0
- package/dist/chevron-right-BatuHzUm.js +1 -0
- package/dist/choice-card-m0BYqqOK.js +1 -0
- package/dist/circle-check-B62pODB3.js +1 -0
- package/dist/circle-x-BPG0iPst.js +1 -0
- package/dist/circle-zx0ByzY9.js +1 -0
- package/dist/{elements/chunks/cn-CU7UAWzk.js → cn-DN5AWfiS.js} +1 -1
- package/dist/code-block-ClMLKb7C.js +1 -0
- package/dist/{elements/chunks/collapsible-BzbXpPzr.js → collapsible-B4DlWicL.js} +1 -1
- package/dist/components/attachment-types.d.ts +7 -0
- package/dist/components/audio-visualizer/fit-scale.d.ts +1 -1
- package/dist/components/card-renderer.d.ts +13 -0
- package/dist/components/card.d.ts +4 -0
- package/dist/components/chat-thread.d.ts +135 -2
- package/dist/components/conversation-item.d.ts +35 -7
- package/dist/components/conversation-list.d.ts +17 -5
- package/dist/components/conversation-panel.d.ts +29 -0
- package/dist/components/form-widgets.d.ts +67 -2
- package/dist/components/form.d.ts +48 -1
- package/dist/components/home-panel.d.ts +34 -0
- package/dist/components/message.d.ts +25 -3
- package/dist/components/reasoning.d.ts +6 -0
- package/dist/components/scroll-button.d.ts +11 -0
- package/dist/components/thread.d.ts +5 -0
- package/dist/components/tool-types.d.ts +9 -0
- package/dist/components/widget-tab-bar.d.ts +16 -0
- package/dist/composer-sQ0HcvyG.js +106 -0
- package/dist/confirm-card-rQWDQsnC.js +1 -0
- package/dist/construct-cli.es.js +1337 -0
- package/dist/{elements/chunks/context-VLIL3sJ-.js → context-0kg4ZX1J.js} +1 -1
- package/dist/controllable-CnGpMF6r.js +1 -0
- package/dist/conversation-item-BxwQLaFJ.js +1 -0
- package/dist/conversation-list-BCfGN1JU.js +1 -0
- package/dist/copy-n9u9rqpi.js +1 -0
- package/dist/core-AYMC6_lb.js +12 -5874
- package/dist/{create-tween-BFT6c-Y8.js → create-tween-C-q-JCM-.js} +1 -1
- package/dist/{create-tween-CJNlzoaO.js → create-tween-CRrJXxBd.js} +1 -1
- package/dist/{create-tween-CQED4T0g.js → create-tween-DZ3RRDHD.js} +1 -1
- package/dist/{elements/chunks/create-tween-c4Z8TDYz.js → create-tween-uPkArjIG.js} +2 -2
- package/dist/css-M7EaDHN_.js +1 -6
- package/dist/custom-elements.json +1433 -202
- package/dist/default-input-CaMrJkgH.js +1 -0
- package/dist/define-By-uL588.js +1 -0
- package/dist/define.d.ts +4 -0
- package/dist/define.js +510 -0
- package/dist/define.server.d.ts +5 -0
- package/dist/define.server.js +506 -0
- package/dist/{elements/chunks/disclosure-CcNbyLy0.js → disclosure-WUImBbDv.js} +1 -1
- package/dist/{elements/chunks/dropdown-BgWTthUx.js → dropdown-wZVeJOMd.js} +1 -1
- package/dist/elements/agent-card.js +1 -1
- package/dist/elements/artifact.js +1 -1
- package/dist/elements/attachments.js +1 -1
- package/dist/elements/audio-visualizer.js +1 -1
- package/dist/elements/autoloader.js +1 -1
- package/dist/elements/avatar.js +1 -1
- package/dist/elements/badge.js +1 -1
- package/dist/elements/button.js +1 -1
- package/dist/elements/card.js +1 -1
- package/dist/elements/cards.js +1 -1
- package/dist/elements/chain-of-thought.js +1 -1
- package/dist/elements/chat-scope-picker.js +1 -1
- package/dist/elements/chat-workspace.js +1 -1
- package/dist/elements/chat.js +1 -1
- package/dist/elements/checkbox-group.d.ts +1 -0
- package/dist/elements/checkbox-group.js +1 -0
- package/dist/elements/checkbox.d.ts +1 -0
- package/dist/elements/checkbox.js +1 -0
- package/dist/elements/checkpoint.js +1 -1
- package/dist/elements/choice.js +1 -1
- package/dist/elements/coachmark.js +1 -1
- package/dist/elements/code-block.js +1 -1
- package/dist/elements/command.js +1 -1
- package/dist/elements/compare.js +1 -1
- package/dist/elements/composer.js +1 -1
- package/dist/elements/confirm-card.js +1 -1
- package/dist/elements/context-meter.js +1 -1
- package/dist/elements/conversation-item.js +1 -1
- package/dist/elements/conversation-list.js +1 -1
- package/dist/elements/define-entry.d.ts +12 -0
- package/dist/elements/dialog.js +1 -1
- package/dist/elements/dock.js +102 -8
- package/dist/elements/dropdown.js +1 -1
- package/dist/elements/editable-label.js +1 -1
- package/dist/elements/element-data-types.d.ts +37 -0
- package/dist/elements/embed.js +1 -1
- package/dist/elements/empty.js +1 -1
- package/dist/elements/feedback-bar.js +1 -1
- package/dist/elements/file-tree.js +1 -1
- package/dist/elements/file-upload.js +1 -1
- package/dist/elements/form.js +1 -1
- package/dist/elements/hover-card.js +1 -1
- package/dist/elements/icon.js +1 -1
- package/dist/elements/image.js +1 -1
- package/dist/elements/input.js +1 -1
- package/dist/elements/kbd.js +1 -1
- package/dist/elements/link-preview.js +1 -1
- package/dist/elements/loader.js +1 -1
- package/dist/elements/markdown.js +1 -1
- package/dist/elements/menu.js +1 -1
- package/dist/elements/message-skills.js +1 -1
- package/dist/elements/message.js +1 -1
- package/dist/elements/model-switcher.js +1 -1
- package/dist/elements/nav.js +1 -1
- package/dist/elements/notice.js +1 -1
- package/dist/elements/pane-grid.d.ts +1 -0
- package/dist/elements/pane-grid.js +1 -0
- package/dist/elements/pane-group.js +1 -1
- package/dist/elements/pane.js +1 -1
- package/dist/elements/popover.js +1 -1
- package/dist/elements/progress-bar.js +1 -1
- package/dist/elements/prompt-dock.js +1 -1
- package/dist/elements/prompt-input.js +1 -1
- package/dist/elements/prompt-suggestions.js +1 -1
- package/dist/elements/radio-group.d.ts +1 -0
- package/dist/elements/radio-group.js +1 -0
- package/dist/elements/reasoning.js +1 -1
- package/dist/elements/remote.js +1 -1
- package/dist/elements/resizable.js +1 -1
- package/dist/elements/response-stream.js +2 -2
- package/dist/elements/screen.js +1 -1
- package/dist/elements/scroll-area.js +1 -1
- package/dist/elements/scroll-button.js +1 -1
- package/dist/elements/search.js +1 -1
- package/dist/elements/segmented.js +1 -1
- package/dist/elements/select.d.ts +1 -0
- package/dist/elements/select.js +1 -0
- package/dist/elements/separator.js +1 -1
- package/dist/elements/setting-item.js +1 -1
- package/dist/elements/settings-group.js +1 -1
- package/dist/elements/skeleton.js +1 -1
- package/dist/elements/slider.d.ts +1 -0
- package/dist/elements/slider.js +1 -0
- package/dist/elements/slots.d.ts +1 -1
- package/dist/elements/source.js +1 -1
- package/dist/elements/status.js +1 -1
- package/dist/elements/switch.js +1 -1
- package/dist/elements/tabs.js +1 -1
- package/dist/elements/tasks.js +1 -1
- package/dist/elements/text-shimmer.js +1 -1
- package/dist/elements/thinking-bar.js +1 -1
- package/dist/elements/thread.js +1 -1
- package/dist/elements/toast.js +1 -1
- package/dist/elements/tool.js +1 -1
- package/dist/elements/tooltip.js +1 -1
- package/dist/elements/voice-input.js +1 -1
- package/dist/elements/voice-output.js +1 -1
- package/dist/elements.d.ts +380 -26
- package/dist/{elements/chunks/ellipsis-7gU33mL2.js → ellipsis-CbOpJnU3.js} +1 -1
- package/dist/embed-CrfjkbUG.js +1 -0
- package/dist/engine-javascript-vq0WuIJl.js +14 -2516
- package/dist/{elements/chunks/external-link-CSOEsNlx.js → external-link-ByXAwBBQ.js} +1 -1
- package/dist/file-text-DMib2qwt.js +1 -0
- package/dist/{elements/chunks/file-tree-zvB2i7P9.js → file-tree-CJqM2aP7.js} +1 -1
- package/dist/folder-_BAb929C.js +1 -0
- package/dist/form-DSZgZQZk.js +1 -0
- package/dist/github-dark-dimmed-DUshB20C.js +1 -4
- package/dist/github-light-JYsPkUQd.js +1 -4
- package/dist/hover-card-BQbul9eq.js +1 -0
- package/dist/html-CPZ3oZQ7.js +1 -10
- package/dist/icon-CdcfRhYI.js +1 -0
- package/dist/{elements/chunks/index-BCRhi84a.js → index-xu_pdcPi.js} +1 -1
- package/dist/index.d.ts +4 -2
- package/dist/index.js +7474 -5857
- package/dist/index.server.js +5965 -4762
- package/dist/info-DsFjGuI_.js +1 -0
- package/dist/input-DKbmkMos.js +1 -0
- package/dist/javascript-C25yR2R2.js +1 -6
- package/dist/json-DxJze_jm.js +1 -6
- package/dist/kai.es.js +1 -1
- package/dist/kbd-PvdGhX4s.js +1 -0
- package/dist/{elements/chunks/link-preview-OQ9IEq0f.js → link-preview-DbM1866N.js} +1 -1
- package/dist/link-zF8PzWfF.js +1 -0
- package/dist/loader-BM4CEz4G.js +1 -0
- package/dist/{elements/chunks/markdown-DgBFaGAz.js → markdown-LMvmAyBk.js} +7 -7
- package/dist/mcp.es.js +1361 -81
- package/dist/message-BSsgvHvf.js +1 -0
- package/dist/message-BYZECyek.js +1 -0
- package/dist/message-circle-DruwObfX.js +1 -0
- package/dist/message-square-BG6q6mlm.js +1 -0
- package/dist/{elements/chunks/minimize-2-DPIUKTrT.js → minimize-2-BQRoBV1V.js} +1 -1
- package/dist/{elements/chunks/model-switcher-DsT8tFB0.js → model-switcher-CMpCOYcB.js} +1 -1
- package/dist/{elements/chunks/overlay-DuiwdXjm.js → overlay-Cb-MkyDa.js} +1 -1
- package/dist/panel-right-i8warFxT.js +1 -0
- package/dist/paperclip-ByY3UVO6.js +1 -0
- package/dist/play-BvKKq3fX.js +1 -0
- package/dist/primitives/card-data-types.d.ts +49 -0
- package/dist/primitives/card-routing.d.ts +1 -33
- package/dist/primitives/card-validate.d.ts +2 -2
- package/dist/primitives/chat-config.d.ts +29 -2
- package/dist/primitives/conversation-store.d.ts +54 -0
- package/dist/primitives/field-mask.d.ts +96 -0
- package/dist/primitives/field-semantics.d.ts +36 -0
- package/dist/primitives/input-mask.d.ts +46 -0
- package/dist/primitives/url-scheme-policy.d.ts +34 -0
- package/dist/primitives/use-resize-observer.d.ts +2 -2
- package/dist/progress-bar-jVAHvMUf.js +1 -0
- package/dist/prompt-suggestion-CD-qtNgC.js +1 -0
- package/dist/radio-BsoBMhkF.js +1 -0
- package/dist/react/index.d.ts +586 -19
- package/dist/react.js +223 -187
- package/dist/reasoning-4kBPtlTx.js +1 -0
- package/dist/register-impl-B1hLkrI8.js +424 -0
- package/dist/{elements/chunks/resizable-D181b4fM.js → resizable-uPmY9VY-.js} +1 -1
- package/dist/rotate-ccw-B2xn93py.js +1 -0
- package/dist/rotate-cw-CMVLoCyH.js +1 -0
- package/dist/schemas/form.schema.json +21 -1
- package/dist/schemas/tool-defs.d.ts +11 -1
- package/dist/schemas.js +81 -81
- package/dist/scroll-area-BqLUo8ZZ.js +1 -0
- package/dist/scroll-button-DslXiJyL.js +1 -0
- package/dist/select-2cLRtPGT.js +1 -0
- package/dist/{elements/chunks/separator-CeJHQqLW.js → separator-BWQtNJcM.js} +1 -1
- package/dist/{elements/chunks/settings-CqaHgJF9.js → settings-BBR63jLg.js} +1 -1
- package/dist/{elements/chunks/settings-group-CjqjLCOn.js → settings-group-B2ciy-Iw.js} +1 -1
- package/dist/{elements/chunks/skeleton-D8akBnKS.js → skeleton-CkHI-HgC.js} +1 -1
- package/dist/slider-DDR9U-i0.js +1 -0
- package/dist/{solid-BtdqNZI7.js → solid-BzCFdL25.js} +9771 -7594
- package/dist/{solid-CnavwBye.js → solid-DruVOXnf.js} +7893 -6183
- package/dist/solid.d.ts +16 -2
- package/dist/solid.js +256 -243
- package/dist/solid.server.js +256 -243
- package/dist/source-GEnFF528.js +1 -0
- package/dist/star-CilHq8GP.js +1 -0
- package/dist/state/index.d.ts +1 -1
- package/dist/state/mock.d.ts +32 -2
- package/dist/state.js +133 -108
- package/dist/store-Ciyk6eZG.js +1 -0
- package/dist/svelte--5p79yCD.js +1 -15
- package/dist/switch-KkeQIbuH.js +1 -0
- package/dist/tasks-card-BrN4bggJ.js +1 -0
- package/dist/text-shimmer-Dcj1MHuq.js +1 -0
- package/dist/textarea-Dpvbngbg.js +1 -0
- package/dist/theme.tokens.css +110 -13
- package/dist/{elements/chunks/thumbs-up-DX2Ijk3H.js → thumbs-up-CsT9Wzb9.js} +1 -1
- package/dist/toast-store-tgK6MuMv.js +1 -0
- package/dist/{elements/chunks/tool-DKQ2D1DP.js → tool-DzUjIBT8.js} +1 -1
- package/dist/{elements/chunks/tooltip-B0G99y8w.js → tooltip-Bkkg_4t0.js} +1 -1
- package/dist/trash-2-jBKxjGGQ.js +1 -0
- package/dist/{elements/chunks/triangle-alert-F9cyUEyy.js → triangle-alert-DlQ68ppf.js} +1 -1
- package/dist/tsx-B8rCNbgL.js +1 -6
- package/dist/types.d.ts +48 -3
- package/dist/typescript-RycA9KXf.js +1 -6
- package/dist/ui/checkbox-group.d.ts +83 -0
- package/dist/ui/checkbox.d.ts +40 -0
- package/dist/ui/dock.d.ts +51 -0
- package/dist/ui/icon.d.ts +3 -0
- package/dist/ui/input.d.ts +48 -2
- package/dist/ui/radio.d.ts +85 -0
- package/dist/ui/select.d.ts +71 -0
- package/dist/ui/slider.d.ts +65 -0
- package/dist/ui/switch.d.ts +9 -2
- package/dist/upload-TcAHXv9W.js +1 -0
- package/dist/url-scheme-policy-DR5DgvkM.js +1 -0
- package/dist/use-card-resolution-DaZqAdWf.js +1 -0
- package/dist/{elements/chunks/variant-aurora-qt6Zct8M.js → variant-aurora-BhLuYxJR.js} +1 -1
- package/dist/{variant-aurora-B8II3-I1.js → variant-aurora-CNmfHhcx.js} +2 -2
- package/dist/{variant-aurora-CMNWOSJR.js → variant-aurora-D6GsdTPA.js} +2 -2
- package/dist/{variant-aurora-CcuDMWwQ.js → variant-aurora-DbW_OWL2.js} +1 -1
- package/dist/{elements/chunks/variant-custom-tJp22_BQ.js → variant-custom-BRvaNHSi.js} +1 -1
- package/dist/{variant-custom-L16JLLZy.js → variant-custom-BvYHR62b.js} +1 -1
- package/dist/{variant-custom-BdvYC7af.js → variant-custom-DMTrEO5w.js} +2 -2
- package/dist/{variant-custom-C714mqKl.js → variant-custom-DV2x254s.js} +2 -2
- package/dist/{variant-wave-ecwykeyL.js → variant-wave-BNMGrDfj.js} +2 -2
- package/dist/{variant-wave-2S4La2Ka.js → variant-wave-BpDd8t3Z.js} +1 -1
- package/dist/{variant-wave-D7ruiA1W.js → variant-wave-CyBueXj9.js} +2 -2
- package/dist/{elements/chunks/variant-wave-CaQ5ti39.js → variant-wave-sp-qwsdI.js} +1 -1
- package/dist/vue-BmIZj4XD.js +1 -33
- package/dist/x-Z5UntkIJ.js +1 -0
- package/frameworks/react/index.tsx +210 -22
- package/llms-full.txt +1184 -22
- package/llms.txt +6 -3
- package/package.json +17 -4
- package/src/agent-tooling/README.md +192 -0
- package/src/agent-tooling/catalog/invariants.ts +3 -3
- package/src/agent-tooling/catalog/surfaces.ts +72 -0
- package/src/agent-tooling/construct/cli-entry.ts +8 -0
- package/src/agent-tooling/construct/cli.ts +147 -0
- package/src/agent-tooling/construct/codegen.ts +1635 -0
- package/src/agent-tooling/construct/construct.v1.schema.json +319 -0
- package/src/agent-tooling/construct/dev.ts +148 -0
- package/src/agent-tooling/construct/fixtures/demo-widget.construct.json +7 -0
- package/src/agent-tooling/construct/fixtures/ops-console.construct.json +44 -0
- package/src/agent-tooling/construct/fixtures/owner-widget.construct.json +32 -0
- package/src/agent-tooling/construct/schema.ts +452 -0
- package/src/agent-tooling/mcp/server.ts +2 -1
- package/src/agent-tooling/mcp/tools/construct.ts +130 -0
- package/src/agent-tooling/mcp/tools/debug.ts +126 -4
- package/src/agent-tooling/mcp/tools/reference.ts +104 -3
- package/src/agent-tooling/recipes/composed-thread.ts +714 -0
- package/src/agent-tooling/recipes/index.ts +22 -0
- package/src/agent-tooling/recipes/types.ts +32 -0
- package/src/agent-tooling/registry.ts +5 -0
- package/src/components/attachment-types.ts +7 -0
- package/src/components/audio-visualizer/fit-scale.ts +1 -1
- package/src/components/card-renderer.tsx +39 -8
- package/src/components/card.tsx +10 -2
- package/src/components/chat-scope-picker.tsx +2 -2
- package/src/components/chat-thread.tsx +602 -43
- package/src/components/choice-card.tsx +102 -37
- package/src/components/coachmark.tsx +1 -1
- package/src/components/code-block.tsx +2 -2
- package/src/components/composer.tsx +89 -15
- package/src/components/confirm-card.tsx +20 -4
- package/src/components/conversation-item.tsx +56 -9
- package/src/components/conversation-list.tsx +25 -10
- package/src/components/conversation-panel.tsx +118 -0
- package/src/components/empty.tsx +14 -3
- package/src/components/file-tree.tsx +5 -1
- package/src/components/form-widgets.tsx +257 -195
- package/src/components/form.tsx +297 -9
- package/src/components/home-panel.tsx +159 -0
- package/src/components/loader.tsx +12 -5
- package/src/components/message-skills.tsx +1 -1
- package/src/components/message.tsx +71 -11
- package/src/components/prompt-input.tsx +7 -1
- package/src/components/prompt-suggestion.tsx +4 -1
- package/src/components/reasoning.tsx +30 -3
- package/src/components/response-compare.tsx +2 -2
- package/src/components/scroll-button.tsx +56 -4
- package/src/components/source.tsx +6 -1
- package/src/components/tasks-card.tsx +58 -16
- package/src/components/thread.tsx +10 -1
- package/src/components/toast.tsx +1 -1
- package/src/components/tool-types.ts +9 -0
- package/src/components/widget-tab-bar.tsx +73 -0
- package/src/elements/attachments.tsx +3 -1
- package/src/elements/chat-workspace.tsx +1 -1
- package/src/elements/chat.tsx +115 -5
- package/src/elements/checkbox-group.tsx +164 -0
- package/src/elements/checkbox.tsx +134 -0
- package/src/elements/compiled.css +1 -1
- package/src/elements/composer.tsx +12 -1
- package/src/elements/conversation-item.tsx +62 -22
- package/src/elements/conversation-list.tsx +2 -2
- package/src/elements/define-entry.ts +12 -0
- package/src/elements/dock.tsx +11 -0
- package/src/elements/element-data-types.ts +40 -0
- package/src/elements/element-manifest.json +24 -0
- package/src/elements/element-meta.json +767 -34
- package/src/elements/element-nonscalar.json +17 -0
- package/src/elements/element-types.d.ts +380 -26
- package/src/elements/feedback-bar.tsx +5 -0
- package/src/elements/icon-names.json +29 -0
- package/src/elements/input.tsx +312 -23
- package/src/elements/message.tsx +2 -0
- package/src/elements/pane-grid.tsx +111 -0
- package/src/elements/prompt-input.tsx +8 -2
- package/src/elements/radio-group.tsx +129 -0
- package/src/elements/register-impl.ts +6 -0
- package/src/elements/scroll-button.tsx +54 -6
- package/src/elements/select.tsx +165 -0
- package/src/elements/slider.tsx +171 -0
- package/src/elements/slots.ts +1 -1
- package/src/elements/styles.css +89 -3
- package/src/elements/thread.tsx +2 -0
- package/src/elements/toast.tsx +14 -1
- package/src/index.ts +5 -2
- package/src/primitives/card-data-types.ts +49 -0
- package/src/primitives/card-host.tsx +4 -2
- package/src/primitives/card-routing.ts +7 -56
- package/src/primitives/card-schemas/form.schema.json +21 -1
- package/src/primitives/card-validate.ts +10 -2
- package/src/primitives/chat-config.tsx +33 -6
- package/src/primitives/conversation-store.ts +248 -0
- package/src/primitives/field-mask.ts +256 -0
- package/src/primitives/field-semantics.ts +115 -0
- package/src/primitives/input-mask.ts +853 -0
- package/src/primitives/toast-store.ts +66 -4
- package/src/primitives/url-scheme-policy.ts +70 -0
- package/src/primitives/use-resize-observer.ts +2 -2
- package/src/schemas/tool-defs.ts +12 -2
- package/src/solid.ts +20 -2
- package/src/state/index.ts +1 -1
- package/src/state/mock.ts +92 -6
- package/src/types.ts +45 -3
- package/src/ui/agent-card.tsx +2 -2
- package/src/ui/avatar.tsx +1 -1
- package/src/ui/checkbox-group.tsx +153 -0
- package/src/ui/checkbox.tsx +63 -0
- package/src/ui/dock.tsx +192 -7
- package/src/ui/icon.tsx +53 -0
- package/src/ui/input.tsx +249 -9
- package/src/ui/kbd.tsx +1 -1
- package/src/ui/nav.tsx +1 -1
- package/src/ui/pane-group.tsx +2 -2
- package/src/ui/radio.tsx +150 -0
- package/src/ui/select.tsx +168 -0
- package/src/ui/slider.tsx +178 -0
- package/src/ui/switch.tsx +49 -18
- package/src/utils/cn.ts +11 -5
- package/theme.css +112 -13
- package/dist/elements/chunks/action-icons-D9u3OzYW.js +0 -1
- package/dist/elements/chunks/arrow-left-CVh1TeN7.js +0 -1
- package/dist/elements/chunks/artifact-BkYcfIlZ.js +0 -1
- package/dist/elements/chunks/attachments-DwfNlubq.js +0 -1
- package/dist/elements/chunks/badge-Q0-Cmwzz.js +0 -1
- package/dist/elements/chunks/bash-InADTalH.js +0 -1
- package/dist/elements/chunks/card-renderer-3Dyl-FpN.js +0 -1
- package/dist/elements/chunks/card-routing-BK09BdmL.js +0 -1
- package/dist/elements/chunks/check-B5kBPKeo.js +0 -1
- package/dist/elements/chunks/chevron-down-DZ1GS39h.js +0 -1
- package/dist/elements/chunks/chevron-right-CvP7OUd2.js +0 -1
- package/dist/elements/chunks/choice-card-D4QUIOWZ.js +0 -1
- package/dist/elements/chunks/circle-CDf9g6MQ.js +0 -1
- package/dist/elements/chunks/circle-check-CA47Nqbz.js +0 -1
- package/dist/elements/chunks/circle-x-CJ_HVbC8.js +0 -1
- package/dist/elements/chunks/code-block-BdLiTitd.js +0 -1
- package/dist/elements/chunks/composer-Byve-n8K.js +0 -69
- package/dist/elements/chunks/confirm-card-B0flE3MN.js +0 -1
- package/dist/elements/chunks/controllable-DTwTIlwp.js +0 -1
- package/dist/elements/chunks/conversation-item-BDztezOG.js +0 -1
- package/dist/elements/chunks/copy-Nf-kqxXH.js +0 -1
- package/dist/elements/chunks/core-AYMC6_lb.js +0 -12
- package/dist/elements/chunks/css-M7EaDHN_.js +0 -1
- package/dist/elements/chunks/default-input-C2iLFq0b.js +0 -1
- package/dist/elements/chunks/define-wjHR1MkU.js +0 -1
- package/dist/elements/chunks/download-C4V7tBdb.js +0 -1
- package/dist/elements/chunks/embed-D3KewsIJ.js +0 -1
- package/dist/elements/chunks/engine-javascript-vq0WuIJl.js +0 -141
- package/dist/elements/chunks/file-text-D1G8khle.js +0 -1
- package/dist/elements/chunks/folder-WW2LGLid.js +0 -1
- package/dist/elements/chunks/form-CQirdC4W.js +0 -1
- package/dist/elements/chunks/github-dark-dimmed-DUshB20C.js +0 -1
- package/dist/elements/chunks/github-light-JYsPkUQd.js +0 -1
- package/dist/elements/chunks/hover-card-CJJkfHTK.js +0 -1
- package/dist/elements/chunks/html-CPZ3oZQ7.js +0 -1
- package/dist/elements/chunks/icon-Cfgmf4fa.js +0 -1
- package/dist/elements/chunks/info-DX3YMOt6.js +0 -1
- package/dist/elements/chunks/input-BtW9U6Sq.js +0 -1
- package/dist/elements/chunks/javascript-C25yR2R2.js +0 -1
- package/dist/elements/chunks/json-DxJze_jm.js +0 -1
- package/dist/elements/chunks/kbd-LGXwuT_V.js +0 -1
- package/dist/elements/chunks/link-2My69BqT.js +0 -1
- package/dist/elements/chunks/loader-iOxc_Tu-.js +0 -1
- package/dist/elements/chunks/message-VMZohrXx.js +0 -1
- package/dist/elements/chunks/message-circle-CpXMM-_n.js +0 -1
- package/dist/elements/chunks/message-square-DxcWtETQ.js +0 -1
- package/dist/elements/chunks/message-tZmV2A3p.js +0 -1
- package/dist/elements/chunks/paperclip-CRZVp4z_.js +0 -1
- package/dist/elements/chunks/progress-bar-DNy66e_E.js +0 -1
- package/dist/elements/chunks/prompt-suggestion-Bn64Nl7L.js +0 -1
- package/dist/elements/chunks/reasoning-Emn9N4-T.js +0 -1
- package/dist/elements/chunks/rotate-cw-CPWe37D9.js +0 -1
- package/dist/elements/chunks/scroll-area-ClZkZxIk.js +0 -1
- package/dist/elements/chunks/scroll-button-DPE-t3x_.js +0 -1
- package/dist/elements/chunks/share-CyfnNEqp.js +0 -1
- package/dist/elements/chunks/source-UWCvmVak.js +0 -1
- package/dist/elements/chunks/star-DoHFAikQ.js +0 -1
- package/dist/elements/chunks/store-Cjq0qwYN.js +0 -1
- package/dist/elements/chunks/svelte--5p79yCD.js +0 -1
- package/dist/elements/chunks/tasks-card-CmZ5xh6v.js +0 -1
- package/dist/elements/chunks/text-shimmer-DYn09zrz.js +0 -1
- package/dist/elements/chunks/textarea-skiGHURM.js +0 -1
- package/dist/elements/chunks/toast-store-CFnQpThX.js +0 -1
- package/dist/elements/chunks/tsx-B8rCNbgL.js +0 -1
- package/dist/elements/chunks/typescript-RycA9KXf.js +0 -1
- package/dist/elements/chunks/use-card-resolution-DoA2f_EU.js +0 -1
- package/dist/elements/chunks/vue-BmIZj4XD.js +0 -1
- package/dist/elements/chunks/x-B6UnOiLw.js +0 -1
- package/dist/llms/llms-full.txt +0 -2949
- package/dist/llms/llms.txt +0 -156
- package/dist/register-impl-DpE7icIb.js +0 -293
- package/dist/ui/stat.d.ts +0 -16
- package/src/ui/stat.tsx +0 -41
- /package/dist/{elements/chunks/card-tags-D8lZ-C_U.js → card-tags-D8lZ-C_U.js} +0 -0
- /package/dist/{elements/chunks/link-preview-DNILK391.js → link-preview-DNILK391.js} +0 -0
- /package/dist/{elements/chunks/slots-DaNjX0rc.js → slots-DaNjX0rc.js} +0 -0
package/dist/react/index.d.ts
CHANGED
|
@@ -92,7 +92,7 @@ export interface ArtifactProps extends WebComponentProps {
|
|
|
92
92
|
}
|
|
93
93
|
export declare const Artifact: import('react').ForwardRefExoticComponent<ArtifactProps & import('react').RefAttributes<HTMLElement>>;
|
|
94
94
|
export interface AttachmentsProps extends WebComponentProps {
|
|
95
|
-
/** The attachments to render. Omit (or pass an empty array) for the empty state, which shows `emptyText` if set and nothing otherwise. Set as a JS property (array). */
|
|
95
|
+
/** The attachments to render. Omit (or pass an empty array) for the empty state, which shows `emptyText` if set and nothing otherwise. Set as a JS property (array). Each item's `url` must be a `data:` URI or an https URL, never `URL.createObjectURL`: a `blob:` URL previews here but the wire encoders (`toOpenAIMessages`/`toAnthropicMessages`) refuse it. */
|
|
96
96
|
items?: {
|
|
97
97
|
id: string;
|
|
98
98
|
type: "file" | "source-document";
|
|
@@ -255,17 +255,17 @@ export interface CardsProps extends WebComponentProps {
|
|
|
255
255
|
schemas?: Record<string, object>;
|
|
256
256
|
/** Optional CardPolicy handling child events. Property: `el.policy`. */
|
|
257
257
|
policy?: {
|
|
258
|
-
onSubmit?: (cardId: string, data: unknown) => void;
|
|
259
|
-
onAction?: (cardId: string, action: string, payload?: unknown) => void;
|
|
260
|
-
onSendPrompt?: (text: string, opts: {
|
|
258
|
+
onSubmit?: ((cardId: string, data: unknown) => void);
|
|
259
|
+
onAction?: ((cardId: string, action: string, payload?: unknown) => void);
|
|
260
|
+
onSendPrompt?: ((text: string, opts: {
|
|
261
261
|
mode: "compose" | "send";
|
|
262
262
|
context?: unknown;
|
|
263
|
-
}) => void;
|
|
264
|
-
onOpen?: (url: string, target: "tab" | "artifact") => void;
|
|
265
|
-
onState?: (cardId: string, patch: unknown) => void;
|
|
266
|
-
onDismiss?: (cardId: string) => void;
|
|
267
|
-
onReopen?: (cardId: string) => void;
|
|
268
|
-
onError?: (cardId: string, message: string) => void;
|
|
263
|
+
}) => void);
|
|
264
|
+
onOpen?: ((url: string, target: "tab" | "artifact") => void);
|
|
265
|
+
onState?: ((cardId: string, patch: unknown) => void);
|
|
266
|
+
onDismiss?: ((cardId: string) => void);
|
|
267
|
+
onReopen?: ((cardId: string) => void);
|
|
268
|
+
onError?: ((cardId: string, message: string) => void);
|
|
269
269
|
maxSendPromptMode?: "compose" | "send";
|
|
270
270
|
};
|
|
271
271
|
/** Validate each envelope's `data` against the schema for its type before rendering it, using a built-in's own schema or yours from `schemas`. Default `true`; set `validate-cards="false"` (or `el.validateCards = false`) to opt out. A hard failure (wrong type, a missing required field) renders a diagnostic naming the field instead of the card; a soft failure (bounds) renders the card unchanged. Both emit a contract `error` event. On in production too: a model emitting a bad shape is a production failure mode, so stripping the check there would hide it from exactly the person who needs to see it. */
|
|
@@ -344,6 +344,10 @@ export interface ChatProps extends WebComponentProps {
|
|
|
344
344
|
codeTheme?: string;
|
|
345
345
|
/** Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true. */
|
|
346
346
|
codeHighlight?: boolean;
|
|
347
|
+
/** How `reasoning` parts render across the thread. `'full'` (default) is the current collapsible-disclosure behavior; `'compact'` shows only a shimmer loader while a reasoning part streams and nothing once it settles (no expandable detail); `'off'` renders reasoning parts not at all. Forwarded to every `MessageBody` as `reasoningMode`. */
|
|
348
|
+
reasoning?: "full" | "compact" | "off";
|
|
349
|
+
/** Seeds the reasoning disclosure open AND keeps it tracking the stream (open while streaming, closes when it settles): the pre-Task-19f `full` behavior. Default false/absent: the panel starts closed (just the "Thinking" shimmer chip) and only opens on click, the current default (owner ruling, 2026-08-26). Meaningless when `reasoning` is `'compact'` or `'off'`. Forwarded to every `MessageBody` as `reasoningDefaultOpen`. */
|
|
350
|
+
reasoningOpen?: boolean;
|
|
347
351
|
/** Optional header title shown on the left of the header. */
|
|
348
352
|
chatTitle?: string;
|
|
349
353
|
/** Optional model list. When set (>1 model) a ModelSwitcher is shown in the header and a `kai-model-change` event fires on selection. */
|
|
@@ -382,6 +386,8 @@ export interface ChatProps extends WebComponentProps {
|
|
|
382
386
|
composerActions?: boolean;
|
|
383
387
|
/** INJECT: footer row below the composer (disclaimers, token meter, …). */
|
|
384
388
|
footer?: boolean;
|
|
389
|
+
/** When `false`, hides the built-in paperclip attach button. Defaults to `true` (undeclared keeps today's behavior: attach visible), matching `DefaultPromptInput`'s own default: only an explicit `false` hides it. */
|
|
390
|
+
attach?: boolean;
|
|
385
391
|
/** Show a web-search (Globe) button in the input toolbar; calls `onWebSearch`. */
|
|
386
392
|
webSearch?: boolean;
|
|
387
393
|
/** Show a Voice (Mic) button in the input toolbar; fires a `voice` event. */
|
|
@@ -523,6 +529,274 @@ export interface ChatProps extends WebComponentProps {
|
|
|
523
529
|
cardTypes?: Record<string, string>;
|
|
524
530
|
/** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `cardTypes`, which says what DRAWS a card while this says what a VALID one looks like. An OBJECT, so it is a JS property only: `el.cardSchemas = { 'pricing-table': pricingSchema }`, never an attribute. `createCardRegistry(...).validationSchemas` is exactly this shape. Without it the kit validates its own seven built-ins and leaves your own card type, the one your app actually cares about, as the only unchecked thing on screen. A schema here WINS over a built-in of the same name. Typed `Record<string, object>` rather than `Record<string, JsonSchema>` deliberately: an imported `.json` schema widens `"type"` to `string`, and an authored one carries `$schema`/`title`/`description`/`additionalProperties`, so the tighter type would reject both of the normal ways to supply one. */
|
|
525
531
|
cardSchemas?: Record<string, object>;
|
|
532
|
+
/** Turns on the prior-conversations list (a list-toggle button in the header, plus a second list view sharing the panel, C-1). Attribute- settable like every other boolean flag on this element: `<kai-chat conversations>`. Requires `store`. A row select, "new conversation," or the visitor's mount-time auto-restore all deliver their messages the same way: listen for `kai-conversation-load` and set `el.messages` from `event.detail.messages` (a fresh array): this element does not update `messages` for you. Set with no `store`, the underlying `ChatThread` decides loudly (one console.error) and stays visually off; this facade always supplies its own internal load handler (the `kai-conversation-load` dispatch below), so the second ChatThread guard, missing `onConversationLoad`, never trips here, even for a consumer who never listens for the event. Default false. */
|
|
533
|
+
conversations?: boolean;
|
|
534
|
+
/** The adapter this thread persists conversations through: an object of three functions (`list`/`load`/`save`; `ConversationStore`, exported from `@kitn.ai/ui`'s `primitives/conversation-store`). A JS PROPERTY ONLY: `el.store = myAdapter`. It can never be an attribute, since a function-bearing object has no HTML string form, the same reasoning that keeps `messages`/`cardSchemas` property-only (the kai- contract: array/object props are JS properties, never attributes). Two built-ins ship: `localStorageStore(name, userId?)` and `fetchStore(url, userId?)`. */
|
|
535
|
+
store?: {
|
|
536
|
+
list: () => Promise<{
|
|
537
|
+
id: string;
|
|
538
|
+
title: string;
|
|
539
|
+
groupId?: string;
|
|
540
|
+
scope?: {
|
|
541
|
+
type: "document" | "collection";
|
|
542
|
+
documentId?: string;
|
|
543
|
+
filters?: {
|
|
544
|
+
tags?: string[];
|
|
545
|
+
authors?: string[];
|
|
546
|
+
contentType?: "transcript" | "markdown";
|
|
547
|
+
dateRange?: {
|
|
548
|
+
from: string;
|
|
549
|
+
to: string;
|
|
550
|
+
};
|
|
551
|
+
};
|
|
552
|
+
};
|
|
553
|
+
messageCount: number;
|
|
554
|
+
lastMessageAt?: string;
|
|
555
|
+
updatedAt: string;
|
|
556
|
+
trailing?: string;
|
|
557
|
+
lastReadAt?: string;
|
|
558
|
+
}[]>;
|
|
559
|
+
load: (id: string) => Promise<{
|
|
560
|
+
id: string;
|
|
561
|
+
role: "user" | "assistant";
|
|
562
|
+
parts: ({
|
|
563
|
+
type: "text";
|
|
564
|
+
text: string;
|
|
565
|
+
raw?: {
|
|
566
|
+
source: string;
|
|
567
|
+
payload: unknown;
|
|
568
|
+
};
|
|
569
|
+
} | {
|
|
570
|
+
type: "reasoning";
|
|
571
|
+
text: string;
|
|
572
|
+
label?: string;
|
|
573
|
+
index?: number;
|
|
574
|
+
streamId?: string;
|
|
575
|
+
signature?: string;
|
|
576
|
+
raw?: {
|
|
577
|
+
source: string;
|
|
578
|
+
payload: unknown;
|
|
579
|
+
};
|
|
580
|
+
} | {
|
|
581
|
+
type: "tool";
|
|
582
|
+
tool: {
|
|
583
|
+
type: string;
|
|
584
|
+
kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
|
|
585
|
+
state: "input-streaming" | "input-available" | "output-available" | "output-error";
|
|
586
|
+
input?: Record<string, unknown>;
|
|
587
|
+
rawInput?: string;
|
|
588
|
+
output?: Record<string, unknown>;
|
|
589
|
+
toolCallId?: string;
|
|
590
|
+
errorText?: string;
|
|
591
|
+
raw?: {
|
|
592
|
+
source: string;
|
|
593
|
+
payload: unknown;
|
|
594
|
+
};
|
|
595
|
+
};
|
|
596
|
+
raw?: {
|
|
597
|
+
source: string;
|
|
598
|
+
payload: unknown;
|
|
599
|
+
};
|
|
600
|
+
} | {
|
|
601
|
+
type: "card";
|
|
602
|
+
envelope: {
|
|
603
|
+
type: string;
|
|
604
|
+
id: string;
|
|
605
|
+
data: unknown;
|
|
606
|
+
title?: string;
|
|
607
|
+
resolution?: {
|
|
608
|
+
kind: "action";
|
|
609
|
+
action: string;
|
|
610
|
+
payload?: unknown;
|
|
611
|
+
at?: string;
|
|
612
|
+
} | {
|
|
613
|
+
kind: "submit";
|
|
614
|
+
data: unknown;
|
|
615
|
+
at?: string;
|
|
616
|
+
} | {
|
|
617
|
+
kind: "dismissed";
|
|
618
|
+
at?: string;
|
|
619
|
+
} | {
|
|
620
|
+
kind: "expired";
|
|
621
|
+
reason?: string;
|
|
622
|
+
at?: string;
|
|
623
|
+
};
|
|
624
|
+
};
|
|
625
|
+
raw?: {
|
|
626
|
+
source: string;
|
|
627
|
+
payload: unknown;
|
|
628
|
+
};
|
|
629
|
+
} | {
|
|
630
|
+
type: "source";
|
|
631
|
+
source: {
|
|
632
|
+
id?: string;
|
|
633
|
+
url?: string;
|
|
634
|
+
title?: string;
|
|
635
|
+
snippet?: string;
|
|
636
|
+
index?: number;
|
|
637
|
+
};
|
|
638
|
+
raw?: {
|
|
639
|
+
source: string;
|
|
640
|
+
payload: unknown;
|
|
641
|
+
};
|
|
642
|
+
} | {
|
|
643
|
+
type: "file";
|
|
644
|
+
attachment: {
|
|
645
|
+
id: string;
|
|
646
|
+
type: "file" | "source-document";
|
|
647
|
+
filename?: string;
|
|
648
|
+
mediaType?: string;
|
|
649
|
+
url?: string;
|
|
650
|
+
title?: string;
|
|
651
|
+
};
|
|
652
|
+
raw?: {
|
|
653
|
+
source: string;
|
|
654
|
+
payload: unknown;
|
|
655
|
+
};
|
|
656
|
+
})[];
|
|
657
|
+
actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
|
|
658
|
+
id: string;
|
|
659
|
+
label: string;
|
|
660
|
+
icon?: string;
|
|
661
|
+
tooltip?: string;
|
|
662
|
+
})[];
|
|
663
|
+
avatar?: {
|
|
664
|
+
src?: string;
|
|
665
|
+
fallback?: string;
|
|
666
|
+
alt?: string;
|
|
667
|
+
};
|
|
668
|
+
feedback?: "like" | "dislike";
|
|
669
|
+
}[]>;
|
|
670
|
+
save: (id: string, messages: {
|
|
671
|
+
id: string;
|
|
672
|
+
role: "user" | "assistant";
|
|
673
|
+
parts: ({
|
|
674
|
+
type: "text";
|
|
675
|
+
text: string;
|
|
676
|
+
raw?: {
|
|
677
|
+
source: string;
|
|
678
|
+
payload: unknown;
|
|
679
|
+
};
|
|
680
|
+
} | {
|
|
681
|
+
type: "reasoning";
|
|
682
|
+
text: string;
|
|
683
|
+
label?: string;
|
|
684
|
+
index?: number;
|
|
685
|
+
streamId?: string;
|
|
686
|
+
signature?: string;
|
|
687
|
+
raw?: {
|
|
688
|
+
source: string;
|
|
689
|
+
payload: unknown;
|
|
690
|
+
};
|
|
691
|
+
} | {
|
|
692
|
+
type: "tool";
|
|
693
|
+
tool: {
|
|
694
|
+
type: string;
|
|
695
|
+
kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
|
|
696
|
+
state: "input-streaming" | "input-available" | "output-available" | "output-error";
|
|
697
|
+
input?: Record<string, unknown>;
|
|
698
|
+
rawInput?: string;
|
|
699
|
+
output?: Record<string, unknown>;
|
|
700
|
+
toolCallId?: string;
|
|
701
|
+
errorText?: string;
|
|
702
|
+
raw?: {
|
|
703
|
+
source: string;
|
|
704
|
+
payload: unknown;
|
|
705
|
+
};
|
|
706
|
+
};
|
|
707
|
+
raw?: {
|
|
708
|
+
source: string;
|
|
709
|
+
payload: unknown;
|
|
710
|
+
};
|
|
711
|
+
} | {
|
|
712
|
+
type: "card";
|
|
713
|
+
envelope: {
|
|
714
|
+
type: string;
|
|
715
|
+
id: string;
|
|
716
|
+
data: unknown;
|
|
717
|
+
title?: string;
|
|
718
|
+
resolution?: {
|
|
719
|
+
kind: "action";
|
|
720
|
+
action: string;
|
|
721
|
+
payload?: unknown;
|
|
722
|
+
at?: string;
|
|
723
|
+
} | {
|
|
724
|
+
kind: "submit";
|
|
725
|
+
data: unknown;
|
|
726
|
+
at?: string;
|
|
727
|
+
} | {
|
|
728
|
+
kind: "dismissed";
|
|
729
|
+
at?: string;
|
|
730
|
+
} | {
|
|
731
|
+
kind: "expired";
|
|
732
|
+
reason?: string;
|
|
733
|
+
at?: string;
|
|
734
|
+
};
|
|
735
|
+
};
|
|
736
|
+
raw?: {
|
|
737
|
+
source: string;
|
|
738
|
+
payload: unknown;
|
|
739
|
+
};
|
|
740
|
+
} | {
|
|
741
|
+
type: "source";
|
|
742
|
+
source: {
|
|
743
|
+
id?: string;
|
|
744
|
+
url?: string;
|
|
745
|
+
title?: string;
|
|
746
|
+
snippet?: string;
|
|
747
|
+
index?: number;
|
|
748
|
+
};
|
|
749
|
+
raw?: {
|
|
750
|
+
source: string;
|
|
751
|
+
payload: unknown;
|
|
752
|
+
};
|
|
753
|
+
} | {
|
|
754
|
+
type: "file";
|
|
755
|
+
attachment: {
|
|
756
|
+
id: string;
|
|
757
|
+
type: "file" | "source-document";
|
|
758
|
+
filename?: string;
|
|
759
|
+
mediaType?: string;
|
|
760
|
+
url?: string;
|
|
761
|
+
title?: string;
|
|
762
|
+
};
|
|
763
|
+
raw?: {
|
|
764
|
+
source: string;
|
|
765
|
+
payload: unknown;
|
|
766
|
+
};
|
|
767
|
+
})[];
|
|
768
|
+
actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
|
|
769
|
+
id: string;
|
|
770
|
+
label: string;
|
|
771
|
+
icon?: string;
|
|
772
|
+
tooltip?: string;
|
|
773
|
+
})[];
|
|
774
|
+
avatar?: {
|
|
775
|
+
src?: string;
|
|
776
|
+
fallback?: string;
|
|
777
|
+
alt?: string;
|
|
778
|
+
};
|
|
779
|
+
feedback?: "like" | "dislike";
|
|
780
|
+
}[]) => Promise<void>;
|
|
781
|
+
markRead?: ((id: string) => Promise<void>);
|
|
782
|
+
};
|
|
783
|
+
/** Turns on the widget home screen (Intercom-pattern): the panel boots into a `home` view, with a greeting, most-recent-conversation card, a "new conversation" CTA, and host-defined links, plus a Home/Messages tab bar for switching back to the thread. An OBJECT, so it is a JS property only: `el.home = { greeting: { title: 'Hey' }, links: [...] }`, never an attribute (the kai- contract: array/object props are JS properties). A `links` entry with no `href` fires `kai-home-link` with that entry when tapped, rather than navigating; one WITH `href` opens it directly (only when the URL passes the kit's own scheme allowlist). Omit for the no-home widget (chat view only, unchanged). */
|
|
784
|
+
home?: {
|
|
785
|
+
greeting?: {
|
|
786
|
+
title?: string;
|
|
787
|
+
subtitle?: string;
|
|
788
|
+
};
|
|
789
|
+
recentConversation?: boolean;
|
|
790
|
+
newConversation?: {
|
|
791
|
+
label?: string;
|
|
792
|
+
};
|
|
793
|
+
links?: {
|
|
794
|
+
label: string;
|
|
795
|
+
href?: string;
|
|
796
|
+
description?: string;
|
|
797
|
+
icon?: string;
|
|
798
|
+
}[];
|
|
799
|
+
};
|
|
526
800
|
/** The staged attachments changed (file added or removed). Carries the full current list so a consumer can react in real time. */
|
|
527
801
|
onAttachmentsChange?: (event: CustomEvent<{
|
|
528
802
|
attachments: {
|
|
@@ -542,6 +816,130 @@ export interface ChatProps extends WebComponentProps {
|
|
|
542
816
|
reason: "filtered" | "unsupported";
|
|
543
817
|
}[];
|
|
544
818
|
}>) => void;
|
|
819
|
+
/** A conversation's history loaded: a row tap in the list, "new conversation," or the visitor's own mount-time auto-restore of their most recent thread (only fires when `conversations` is on and a `store` is set). `detail.id` is that conversation's id, `undefined` for the "new conversation" case (no id exists until the first message mints one, C-6). Set `el.messages = event.detail.messages` (already a fresh array) to actually render it, since this element does not do that for you; `messages` stays your own state like everywhere else on this element. */
|
|
820
|
+
onConversationLoad?: (event: CustomEvent<{
|
|
821
|
+
id: string | undefined;
|
|
822
|
+
messages: {
|
|
823
|
+
id: string;
|
|
824
|
+
role: "user" | "assistant";
|
|
825
|
+
parts: ({
|
|
826
|
+
type: "text";
|
|
827
|
+
text: string;
|
|
828
|
+
raw?: undefined | {
|
|
829
|
+
source: string;
|
|
830
|
+
payload: unknown;
|
|
831
|
+
};
|
|
832
|
+
} | {
|
|
833
|
+
type: "reasoning";
|
|
834
|
+
text: string;
|
|
835
|
+
label?: undefined | string;
|
|
836
|
+
index?: undefined | number;
|
|
837
|
+
streamId?: undefined | string;
|
|
838
|
+
signature?: undefined | string;
|
|
839
|
+
raw?: undefined | {
|
|
840
|
+
source: string;
|
|
841
|
+
payload: unknown;
|
|
842
|
+
};
|
|
843
|
+
} | {
|
|
844
|
+
type: "tool";
|
|
845
|
+
tool: {
|
|
846
|
+
type: string;
|
|
847
|
+
kind?: undefined | "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
|
|
848
|
+
state: "input-streaming" | "input-available" | "output-available" | "output-error";
|
|
849
|
+
input?: undefined | Record<string, unknown>;
|
|
850
|
+
rawInput?: undefined | string;
|
|
851
|
+
output?: undefined | Record<string, unknown>;
|
|
852
|
+
toolCallId?: undefined | string;
|
|
853
|
+
errorText?: undefined | string;
|
|
854
|
+
raw?: undefined | {
|
|
855
|
+
source: string;
|
|
856
|
+
payload: unknown;
|
|
857
|
+
};
|
|
858
|
+
};
|
|
859
|
+
raw?: undefined | {
|
|
860
|
+
source: string;
|
|
861
|
+
payload: unknown;
|
|
862
|
+
};
|
|
863
|
+
} | {
|
|
864
|
+
type: "card";
|
|
865
|
+
envelope: {
|
|
866
|
+
type: string;
|
|
867
|
+
id: string;
|
|
868
|
+
data: unknown;
|
|
869
|
+
title?: undefined | string;
|
|
870
|
+
resolution?: undefined | {
|
|
871
|
+
kind: "action";
|
|
872
|
+
action: string;
|
|
873
|
+
payload?: unknown;
|
|
874
|
+
at?: undefined | string;
|
|
875
|
+
} | {
|
|
876
|
+
kind: "submit";
|
|
877
|
+
data: unknown;
|
|
878
|
+
at?: undefined | string;
|
|
879
|
+
} | {
|
|
880
|
+
kind: "dismissed";
|
|
881
|
+
at?: undefined | string;
|
|
882
|
+
} | {
|
|
883
|
+
kind: "expired";
|
|
884
|
+
reason?: undefined | string;
|
|
885
|
+
at?: undefined | string;
|
|
886
|
+
};
|
|
887
|
+
};
|
|
888
|
+
raw?: undefined | {
|
|
889
|
+
source: string;
|
|
890
|
+
payload: unknown;
|
|
891
|
+
};
|
|
892
|
+
} | {
|
|
893
|
+
type: "source";
|
|
894
|
+
source: {
|
|
895
|
+
id?: undefined | string;
|
|
896
|
+
url?: undefined | string;
|
|
897
|
+
title?: undefined | string;
|
|
898
|
+
snippet?: undefined | string;
|
|
899
|
+
index?: undefined | number;
|
|
900
|
+
};
|
|
901
|
+
raw?: undefined | {
|
|
902
|
+
source: string;
|
|
903
|
+
payload: unknown;
|
|
904
|
+
};
|
|
905
|
+
} | {
|
|
906
|
+
type: "file";
|
|
907
|
+
attachment: {
|
|
908
|
+
id: string;
|
|
909
|
+
type: "file" | "source-document";
|
|
910
|
+
filename?: undefined | string;
|
|
911
|
+
mediaType?: undefined | string;
|
|
912
|
+
url?: undefined | string;
|
|
913
|
+
title?: undefined | string;
|
|
914
|
+
};
|
|
915
|
+
raw?: undefined | {
|
|
916
|
+
source: string;
|
|
917
|
+
payload: unknown;
|
|
918
|
+
};
|
|
919
|
+
})[];
|
|
920
|
+
actions?: undefined | ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
|
|
921
|
+
id: string;
|
|
922
|
+
label: string;
|
|
923
|
+
icon?: undefined | string;
|
|
924
|
+
tooltip?: undefined | string;
|
|
925
|
+
})[];
|
|
926
|
+
avatar?: undefined | {
|
|
927
|
+
src?: undefined | string;
|
|
928
|
+
fallback?: undefined | string;
|
|
929
|
+
alt?: undefined | string;
|
|
930
|
+
};
|
|
931
|
+
feedback?: undefined | "like" | "dislike";
|
|
932
|
+
}[];
|
|
933
|
+
}>) => void;
|
|
934
|
+
/** A `home.links` entry with no `href` was activated (tapped/clicked/Enter). Meaningful only when `home` is set. */
|
|
935
|
+
onHomeLink?: (event: CustomEvent<{
|
|
936
|
+
entry: {
|
|
937
|
+
label: string;
|
|
938
|
+
href?: undefined | string;
|
|
939
|
+
description?: undefined | string;
|
|
940
|
+
icon?: undefined | string;
|
|
941
|
+
};
|
|
942
|
+
}>) => void;
|
|
545
943
|
/** An action button on a message was clicked. `action` is the built-in name or custom id. `state` is present only for the toggleable feedback votes: `'on'` when a like/dislike is set, `'off'` when re-tapped to clear. */
|
|
546
944
|
onMessageAction?: (event: CustomEvent<{
|
|
547
945
|
messageId: string;
|
|
@@ -578,6 +976,52 @@ export interface ChatProps extends WebComponentProps {
|
|
|
578
976
|
onWebSearch?: (event: CustomEvent<Record<string, never>>) => void;
|
|
579
977
|
}
|
|
580
978
|
export declare const Chat: import('react').ForwardRefExoticComponent<ChatProps & import('react').RefAttributes<HTMLElement>>;
|
|
979
|
+
export interface CheckboxProps extends WebComponentProps {
|
|
980
|
+
/** Controlled checked state. Settable and reflected to the `checked` attribute. `el.checked = true` (or `<kai-checkbox checked>`) drives it; ticking the box updates it and fires `kai-change`. Read `el.checked` for live state. */
|
|
981
|
+
checked?: boolean;
|
|
982
|
+
/** Initial checked state on mount (uncontrolled seed). Bare attribute (`<kai-checkbox default-checked>`) turns it on. */
|
|
983
|
+
defaultChecked?: boolean;
|
|
984
|
+
/** The mixed state, for a parent box whose children are partly ticked. Visual plus an accessibility hint: the box still reports `checked === false`. */
|
|
985
|
+
indeterminate?: boolean;
|
|
986
|
+
/** Disable interaction. */
|
|
987
|
+
disabled?: boolean;
|
|
988
|
+
/** Set the native `required` attribute, and nothing more. Whether an unticked box is an error is the application's rule, not the kit's. */
|
|
989
|
+
required?: boolean;
|
|
990
|
+
/** Accessible label. The visible text beside the box is the consumer's to render. */
|
|
991
|
+
label?: string;
|
|
992
|
+
/** Form-control name (paired with `value`). */
|
|
993
|
+
name?: string;
|
|
994
|
+
/** Submitted value when checked (paired with `name`). Defaults to `'on'`. */
|
|
995
|
+
value?: string;
|
|
996
|
+
/** The box was ticked or unticked. */
|
|
997
|
+
onChange?: (event: CustomEvent<{
|
|
998
|
+
checked: boolean;
|
|
999
|
+
}>) => void;
|
|
1000
|
+
}
|
|
1001
|
+
export declare const Checkbox: import('react').ForwardRefExoticComponent<CheckboxProps & import('react').RefAttributes<HTMLElement>>;
|
|
1002
|
+
export interface CheckboxGroupProps extends WebComponentProps {
|
|
1003
|
+
/** The choices, top to bottom. Set as a JS PROPERTY (array), never an attribute. Rendered in full: the kit never truncates, re-orders or de-duplicates them. */
|
|
1004
|
+
options: {
|
|
1005
|
+
value: string;
|
|
1006
|
+
label: string;
|
|
1007
|
+
description?: undefined | string;
|
|
1008
|
+
disabled?: undefined | boolean;
|
|
1009
|
+
}[];
|
|
1010
|
+
/** The FIRST selected value. Settable and reflected to the `value` attribute, so `:host([value])` and `el.value` see live state, and a seed can be written in markup. Writing it makes that the whole selection; to read or drive the rest, use `el.values`. */
|
|
1011
|
+
value?: string;
|
|
1012
|
+
/** The shared form-control name every box carries, so `FormData.getAll(name)` reads the whole selection back under one key. NO DEFAULT, unlike `<kai-radio-group>`. A radio set needs a shared `name` for the browser to make it exclusive and arrow-navigable, so one is generated when none is given; checkboxes are independent controls and behave correctly with no name at all. Generating one here would submit the selection under a random key, which is worse than submitting nothing. The element is NOT form-associated (no `ElementInternals`, no `setFormValue()`), the same known gap `<kai-input>` records: the boxes live in a shadow root, so a surrounding `<form>` collects nothing from them whether or not `name` is set. Read `el.values`. The name still lands on every inner input, so it is right the day form association arrives. */
|
|
1013
|
+
name?: string;
|
|
1014
|
+
/** Disable every row. Individual rows carry their own `disabled`. */
|
|
1015
|
+
disabled?: boolean;
|
|
1016
|
+
/** Accessible name for the group. */
|
|
1017
|
+
label?: string;
|
|
1018
|
+
/** A row was ticked or unticked. `values` is the whole selection after the change, which is what a multi-select control needs; `value` is the first of them (empty when nothing is selected). Both are always present, so neither shape silently loses the other. This is `<kai-select>`'s detail, deliberately. */
|
|
1019
|
+
onChange?: (event: CustomEvent<{
|
|
1020
|
+
value: string;
|
|
1021
|
+
values: string[];
|
|
1022
|
+
}>) => void;
|
|
1023
|
+
}
|
|
1024
|
+
export declare const CheckboxGroup: import('react').ForwardRefExoticComponent<CheckboxGroupProps & import('react').RefAttributes<HTMLElement>>;
|
|
581
1025
|
export interface CheckpointProps extends WebComponentProps {
|
|
582
1026
|
/** Optional text beside the icon. */
|
|
583
1027
|
label?: string;
|
|
@@ -811,7 +1255,7 @@ export interface ComposerProps extends WebComponentProps {
|
|
|
811
1255
|
onFocus?: (event: CustomEvent<{
|
|
812
1256
|
originalEvent: FocusEvent;
|
|
813
1257
|
}>) => void;
|
|
814
|
-
/** The user submitted the composer (Enter or programmatic submit). */
|
|
1258
|
+
/** The user submitted the composer (Enter or programmatic submit). Note the detail carries no `attachments`; `<kai-composer>` is the bare editing surface: no send button, toolbar, or attachments. For a drop-in composer row with all three, reach for `<kai-prompt-input>`, which is built on this. */
|
|
815
1259
|
onSubmit?: (event: CustomEvent<{
|
|
816
1260
|
doc: ({
|
|
817
1261
|
type: "text";
|
|
@@ -920,12 +1364,16 @@ export interface ContextProps extends WebComponentProps {
|
|
|
920
1364
|
}
|
|
921
1365
|
export declare const Context: import('react').ForwardRefExoticComponent<ContextProps & import('react').RefAttributes<HTMLElement>>;
|
|
922
1366
|
export interface ConversationItemProps extends WebComponentProps {
|
|
923
|
-
/** The row's identity
|
|
1367
|
+
/** The row's identity: the `conversation-id` attribute (host `id` is the fallback). Inside `<kai-conversations>` it is handed to the container's selection contract (`kai-conversation-select`); standalone it is the `id` in this element's own `kai-select` detail. */
|
|
924
1368
|
conversationId?: string;
|
|
925
|
-
/** Selected state. Reflected as `aria-current` on the row body and a `data-active` styling hook on the row; the container drives it from its `activeId
|
|
1369
|
+
/** Selected state. Reflected as `aria-current` on the row body and a `data-active` styling hook on the row; inside a container the container drives it from its `activeId`, standalone you set it yourself. */
|
|
926
1370
|
active?: boolean;
|
|
927
1371
|
/** Dense single-line row padding. */
|
|
928
1372
|
compact?: boolean;
|
|
1373
|
+
/** STANDALONE activation only: the row was activated (click, Enter or Space on its body) while the item is NOT a direct child of `<kai-conversations>`. `id` is the row's identity: the `conversation-id` attribute, else the host `id`. Inside a container this never fires: activation surfaces once, as `kai-conversation-select` on the container. */
|
|
1374
|
+
onSelect?: (event: CustomEvent<{
|
|
1375
|
+
id: string;
|
|
1376
|
+
}>) => void;
|
|
929
1377
|
}
|
|
930
1378
|
export declare const ConversationItem: import('react').ForwardRefExoticComponent<ConversationItemProps & import('react').RefAttributes<HTMLElement>>;
|
|
931
1379
|
export interface ConversationsProps extends WebComponentProps {
|
|
@@ -960,6 +1408,7 @@ export interface ConversationsProps extends WebComponentProps {
|
|
|
960
1408
|
lastMessageAt?: string;
|
|
961
1409
|
updatedAt: string;
|
|
962
1410
|
trailing?: string;
|
|
1411
|
+
lastReadAt?: string;
|
|
963
1412
|
}[];
|
|
964
1413
|
/** The id of the currently-open conversation, highlighted in the list. */
|
|
965
1414
|
activeId?: string;
|
|
@@ -1017,6 +1466,8 @@ export interface DockProps extends WebComponentProps {
|
|
|
1017
1466
|
unread?: boolean;
|
|
1018
1467
|
/** Disable the launcher; `show()` and `toggle()` are gated on it. */
|
|
1019
1468
|
disabled?: boolean;
|
|
1469
|
+
/** Suppress the dock's own built-in mobile close X. Set this when your slotted panel content supplies its own close affordance (e.g. a `<kai-chat slot="header-end">` close button), otherwise the two stack. TRADEOFF: the mobile panel reserves a padding band above its content so the built-in X never paints over slotted content; that band stays reserved unless you set this true, so only set it once your own control is actually in place. Attribute: `hide-close`. */
|
|
1470
|
+
hideClose?: boolean;
|
|
1020
1471
|
/** Where focus lands on open: `content` (default, the first element you slotted), `panel`, or `none`. Attribute: `focus-on-open`. */
|
|
1021
1472
|
focusOnOpen?: "content" | "panel" | "none";
|
|
1022
1473
|
/** The dock opened or closed (the launcher, Escape, a driven `open`, or a method). */
|
|
@@ -1185,6 +1636,9 @@ export interface FormProps extends WebComponentProps {
|
|
|
1185
1636
|
"x-kai-widget"?: "textarea" | "slider" | "rating" | "radio" | "select" | "checkbox" | "password" | "switch";
|
|
1186
1637
|
"x-kai-placeholder"?: string;
|
|
1187
1638
|
"x-kai-step"?: number;
|
|
1639
|
+
"x-kai-format"?: "tel" | "ssn" | "credit-card" | "custom";
|
|
1640
|
+
"x-kai-mask"?: string;
|
|
1641
|
+
"x-kai-mask-guide"?: string;
|
|
1188
1642
|
}>;
|
|
1189
1643
|
"x-kai-order"?: string[];
|
|
1190
1644
|
"x-kai-inlineMax"?: number;
|
|
@@ -1255,7 +1709,7 @@ export declare const Image: import('react').ForwardRefExoticComponent<ImageProps
|
|
|
1255
1709
|
export interface InputProps extends WebComponentProps {
|
|
1256
1710
|
/** Native input type: `text` (default) · `email` · `url` · `search` · `tel` · `password` · `number`. Single-line only. */
|
|
1257
1711
|
type?: string;
|
|
1258
|
-
/** Controlled value
|
|
1712
|
+
/** Controlled value, and always the CANONICAL one when a mask is active: digits for `tel` / `ssn` / `credit-card`, the formatted text for `custom`. Settable and reflected to the `value` attribute. `el.value = '5551234567'` drives it (no event) and is re-fitted to the mask on the way in, so the field shows `555-123-4567`. Read `el.value` for live state; the formatted text rides along on every `kai-input` / `kai-change` detail as `formattedValue`. */
|
|
1259
1713
|
value?: string;
|
|
1260
1714
|
/** Placeholder shown when empty. */
|
|
1261
1715
|
placeholder?: string;
|
|
@@ -1281,13 +1735,30 @@ export interface InputProps extends WebComponentProps {
|
|
|
1281
1735
|
autocomplete?: string;
|
|
1282
1736
|
/** Virtual-keyboard hint forwarded to the inner input (e.g. `numeric`, `email`). */
|
|
1283
1737
|
inputmode?: string;
|
|
1284
|
-
/** The
|
|
1738
|
+
/** Mask pattern: `#` a digit, `@` a letter or digit, `*` an obscurable letter or digit, and every other character a positional literal (`@@@-####` → `CHG-4821`). The literal `default` is the opt-in sentinel: it resolves to the default format of `semantic` (`tel` → `###-###-####`). A bare `semantic` never starts masking on its own, so an opt-in token is what turns tier 2 on. */
|
|
1739
|
+
format?: string;
|
|
1740
|
+
/** Placeholder guide shown at unfilled positions, aligned position for position with `format`: `mm/dd/yyyy` against `##/##/####`. Spaces are a valid guide character, so a guide of blanks and separators is how a phone field shows its shape without showing letters. Without a guide the field shows only up to the last typed character. A guide is a visual aid, never an accessible name: keep the `hint` text as well. */
|
|
1741
|
+
guide?: string;
|
|
1742
|
+
/** Semantic field type: `tel` · `ssn` · `credit-card` · `custom`. On its own it sets `inputmode` / `autocomplete` / `spellcheck` / `autocorrect` / `autocapitalize` and decides the canonical value; it never starts masking by itself. */
|
|
1743
|
+
semantic?: "credit-card" | "custom" | "ssn" | "tel";
|
|
1744
|
+
/** Case folding applied to typed and pasted text: `preserve` (default) · `upper` · `lower`. Attribute: `case-mode`. */
|
|
1745
|
+
caseMode?: "preserve" | "upper" | "lower";
|
|
1746
|
+
/** What a copy or cut of a masked field puts on the clipboard: `canonical` (default) · `formatted` · `obscured` · `blocked`. Attribute: `copy-policy`. */
|
|
1747
|
+
copyPolicy?: "formatted" | "canonical" | "obscured" | "blocked";
|
|
1748
|
+
/** The value was committed (blur). Same detail shape as `kai-input`. */
|
|
1285
1749
|
onChange?: (event: CustomEvent<{
|
|
1286
1750
|
value: string;
|
|
1751
|
+
formattedValue: string;
|
|
1287
1752
|
}>) => void;
|
|
1288
|
-
/** The value changed per keystroke. */
|
|
1753
|
+
/** The value changed per keystroke. `value` is the canonical value (what a backend wants); `formattedValue` is the text on screen. With no mask the two are equal. */
|
|
1289
1754
|
onInput?: (event: CustomEvent<{
|
|
1290
1755
|
value: string;
|
|
1756
|
+
formattedValue: string;
|
|
1757
|
+
}>) => void;
|
|
1758
|
+
/** A mask refused, or partly refused, some content. The reasons are `full` (no free position left), `wrong-class` (a letter into a digit position), `over-capacity` (a paste longer than the mask holds; what fits was kept), and `format-change-clipped` (the `format` changed under a value that no longer fits). `data` is the content that was refused. The first three are USER-INPUT errors, and are the ones worth announcing in a polite live region. `format-change-clipped` is not one: it follows the app changing its own configuration, so it reports and nothing more. None of the four touches validity, so `invalid` and `error` stay the consumer decision. */
|
|
1759
|
+
onInputRejected?: (event: CustomEvent<{
|
|
1760
|
+
reason: "full" | "wrong-class" | "over-capacity" | "format-change-clipped";
|
|
1761
|
+
data: string;
|
|
1291
1762
|
}>) => void;
|
|
1292
1763
|
}
|
|
1293
1764
|
export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -1638,6 +2109,19 @@ export interface PaneProps extends WebComponentProps {
|
|
|
1638
2109
|
onSplit?: (event: CustomEvent) => void;
|
|
1639
2110
|
}
|
|
1640
2111
|
export declare const Pane: import('react').ForwardRefExoticComponent<PaneProps & import('react').RefAttributes<HTMLElement>>;
|
|
2112
|
+
export interface PaneGridProps extends WebComponentProps {
|
|
2113
|
+
/** Minimum width of every pane, in px, before columns drop / the grid scrolls. Defaults to `280`. Attribute: `min-pane-width`. */
|
|
2114
|
+
minPaneWidth?: number;
|
|
2115
|
+
/** Minimum height of every pane, in px, before the grid scrolls vertically. Defaults to `200`. Attribute: `min-pane-height`. */
|
|
2116
|
+
minPaneHeight?: number;
|
|
2117
|
+
/** Column cap when the container is wide (default `3`). Attribute: `max-columns`. */
|
|
2118
|
+
maxColumns?: number;
|
|
2119
|
+
/** Gap between panes, any CSS length. Defaults to the kit gap (`var(--kai-pane-grid-gap, 0.5rem)`). Attribute: `gap`. */
|
|
2120
|
+
gap?: string;
|
|
2121
|
+
/** When set to a valid child index, render ONLY that pane full-bleed: a simple maximize hook the consumer drives (pair it with `<kai-pane>`'s `kai-maximize` event). Clear it (or point out of range) for the full tiled grid. Attribute: `maximized-index`. */
|
|
2122
|
+
maximizedIndex?: number | null;
|
|
2123
|
+
}
|
|
2124
|
+
export declare const PaneGrid: import('react').ForwardRefExoticComponent<PaneGridProps & import('react').RefAttributes<HTMLElement>>;
|
|
1641
2125
|
export interface PaneGroupProps extends WebComponentProps {
|
|
1642
2126
|
/** The tabs to render. An array of `{ id, name, status?, needsAttention?, number? }` set as a JS PROPERTY (not an HTML attribute). */
|
|
1643
2127
|
tabs?: {
|
|
@@ -1740,7 +2224,7 @@ export interface PromptInputProps extends WebComponentProps {
|
|
|
1740
2224
|
submit?: "always" | "auto";
|
|
1741
2225
|
/** When `false`, hides the built-in paperclip attach button even though the element otherwise supports attachments. Use this when a `+` menu in `toolbar-start` already exposes "Add files", to avoid a duplicate control. Defaults to `true`. */
|
|
1742
2226
|
attach?: boolean;
|
|
1743
|
-
/** Attachments to seed the input with (so a consumer can pre-populate staged files without an upload). Set as a JS property; the element then manages its own attachment state from there (add via the paperclip, remove per chip). */
|
|
2227
|
+
/** Attachments to seed the input with (so a consumer can pre-populate staged files without an upload). Set as a JS property; the element then manages its own attachment state from there (add via the paperclip, remove per chip). Each item's `url` must be a `data:` URI or an https URL, never `URL.createObjectURL`: a `blob:` URL previews perfectly and is meaningless outside this tab, so `toOpenAIMessages`/`toAnthropicMessages` refuse it. (The built-in paperclip already stages files as `data:` URIs.) */
|
|
1744
2228
|
attachments?: {
|
|
1745
2229
|
id: string;
|
|
1746
2230
|
type: "file" | "source-document";
|
|
@@ -1779,7 +2263,7 @@ export interface PromptInputProps extends WebComponentProps {
|
|
|
1779
2263
|
}>) => void;
|
|
1780
2264
|
/** The Stop button was clicked while `stoppable` and `loading` are both true. */
|
|
1781
2265
|
onStop?: (event: CustomEvent<Record<string, never>>) => void;
|
|
1782
|
-
/** The user submitted the prompt (Enter or send button). `value` is the flattened text (back-compat); `doc` is the structured document and `entities` the inserted pills (skills/agents) for downstream expansion. */
|
|
2266
|
+
/** The user submitted the prompt (Enter or send button). `value` is the flattened text (back-compat); `doc` is the structured document and `entities` the inserted pills (skills/agents) for downstream expansion. `<kai-prompt-input>` is the batteries-included composer row (send button, toolbar, attachment staging) built on `<kai-composer>`, the bare editor. */
|
|
1783
2267
|
onSubmit?: (event: CustomEvent<{
|
|
1784
2268
|
value: string;
|
|
1785
2269
|
doc: ({
|
|
@@ -1853,6 +2337,28 @@ export interface PromptInputProps extends WebComponentProps {
|
|
|
1853
2337
|
onWebSearch?: (event: CustomEvent<Record<string, never>>) => void;
|
|
1854
2338
|
}
|
|
1855
2339
|
export declare const PromptInput: import('react').ForwardRefExoticComponent<PromptInputProps & import('react').RefAttributes<HTMLElement>>;
|
|
2340
|
+
export interface RadioGroupProps extends WebComponentProps {
|
|
2341
|
+
/** The choices, top to bottom. Set as a JS PROPERTY (array), never an attribute. */
|
|
2342
|
+
options: {
|
|
2343
|
+
value: string;
|
|
2344
|
+
label: string;
|
|
2345
|
+
description?: undefined | string;
|
|
2346
|
+
disabled?: undefined | boolean;
|
|
2347
|
+
}[];
|
|
2348
|
+
/** Controlled selected `value`. Settable and reflected to the `value` attribute. `el.value = 'degraded'` drives it; choosing a row updates it and fires `kai-change`. Read `el.value` for live state. */
|
|
2349
|
+
value?: string;
|
|
2350
|
+
/** Shared form-control name for every radio in the group. Defaults to a generated id, so the group is exclusive and keyboard-navigable even when nothing is submitted. */
|
|
2351
|
+
name?: string;
|
|
2352
|
+
/** Disable every row. Individual rows carry their own `disabled`. */
|
|
2353
|
+
disabled?: boolean;
|
|
2354
|
+
/** Accessible name for the group. */
|
|
2355
|
+
label?: string;
|
|
2356
|
+
/** A row was chosen. */
|
|
2357
|
+
onChange?: (event: CustomEvent<{
|
|
2358
|
+
value: string;
|
|
2359
|
+
}>) => void;
|
|
2360
|
+
}
|
|
2361
|
+
export declare const RadioGroup: import('react').ForwardRefExoticComponent<RadioGroupProps & import('react').RefAttributes<HTMLElement>>;
|
|
1856
2362
|
export interface ReasoningProps extends WebComponentProps {
|
|
1857
2363
|
/** The reasoning text to display. */
|
|
1858
2364
|
text: string;
|
|
@@ -2000,6 +2506,10 @@ export interface ScrollButtonProps extends WebComponentProps {
|
|
|
2000
2506
|
variant?: "outline" | "ghost" | "default";
|
|
2001
2507
|
/** Button size token. Defaults to `'icon'` (square). */
|
|
2002
2508
|
size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
|
|
2509
|
+
/** The button's accessible name. It is announced whether or not the label is visible, so the text is always localisable. Defaults to `'Scroll to bottom'`. */
|
|
2510
|
+
label?: string;
|
|
2511
|
+
/** Also render `label` visibly beside the icon. Defaults to `false`, which is the icon-only button. When the text is visible it IS the accessible name, so nothing gets announced twice. */
|
|
2512
|
+
showLabel?: boolean;
|
|
2003
2513
|
/** Emitted when the user clicks the button and `scrollToBottom()` is called. Carries no detail; consumers use it to know a manual scroll occurred. */
|
|
2004
2514
|
onScroll?: (event: CustomEvent) => void;
|
|
2005
2515
|
}
|
|
@@ -2048,6 +2558,36 @@ export interface SegmentedProps extends WebComponentProps {
|
|
|
2048
2558
|
}>) => void;
|
|
2049
2559
|
}
|
|
2050
2560
|
export declare const Segmented: import('react').ForwardRefExoticComponent<SegmentedProps & import('react').RefAttributes<HTMLElement>>;
|
|
2561
|
+
export interface SelectProps extends WebComponentProps {
|
|
2562
|
+
/** The choices, in display order. Set as a JS PROPERTY (array), never an attribute. Rendered in full: the kit never truncates, re-orders or de-duplicates them. */
|
|
2563
|
+
options: {
|
|
2564
|
+
value: string;
|
|
2565
|
+
label?: undefined | string;
|
|
2566
|
+
disabled?: undefined | boolean;
|
|
2567
|
+
}[];
|
|
2568
|
+
/** Controlled selected value. Settable and reflected to the `value` attribute. `el.value = 'high'` drives it; choosing an option updates it and fires `kai-change`. Read `el.value` for live state; for a `multiple` select read `el.values` instead. */
|
|
2569
|
+
value?: string;
|
|
2570
|
+
/** Text for a leading, disabled, empty option: the "nothing chosen yet" row. Omitted means no such row at all; there is no default wording, because inventing one would put words in your UI. */
|
|
2571
|
+
placeholder?: string;
|
|
2572
|
+
/** Allow more than one selection. Turns the control into the platform's list box, so the kit's chevron is not drawn. */
|
|
2573
|
+
multiple?: boolean;
|
|
2574
|
+
/** Force the invalid (destructive-border) state. */
|
|
2575
|
+
invalid?: boolean;
|
|
2576
|
+
/** Disable interaction. */
|
|
2577
|
+
disabled?: boolean;
|
|
2578
|
+
/** Set the native `required` attribute, and nothing more. Whether an empty select is an error is the application's rule, not the kit's. */
|
|
2579
|
+
required?: boolean;
|
|
2580
|
+
/** Accessible label for the control. */
|
|
2581
|
+
label?: string;
|
|
2582
|
+
/** Form-control name, for a native form submit. */
|
|
2583
|
+
name?: string;
|
|
2584
|
+
/** A choice was made. `value` is the first selected option (empty when nothing is selected); `values` is every selected option, which is what a `multiple` select needs. Both are always present, so neither shape silently loses the other. */
|
|
2585
|
+
onChange?: (event: CustomEvent<{
|
|
2586
|
+
value: string;
|
|
2587
|
+
values: string[];
|
|
2588
|
+
}>) => void;
|
|
2589
|
+
}
|
|
2590
|
+
export declare const Select: import('react').ForwardRefExoticComponent<SelectProps & import('react').RefAttributes<HTMLElement>>;
|
|
2051
2591
|
export interface SeparatorProps extends WebComponentProps {
|
|
2052
2592
|
/** `horizontal` (default, block + full-width) or `vertical` (a rule inside a flex/grid row, stretching to the row height). */
|
|
2053
2593
|
orientation?: "horizontal" | "vertical";
|
|
@@ -2086,6 +2626,33 @@ export interface SkillsProps extends WebComponentProps {
|
|
|
2086
2626
|
}[];
|
|
2087
2627
|
}
|
|
2088
2628
|
export declare const Skills: import('react').ForwardRefExoticComponent<SkillsProps & import('react').RefAttributes<HTMLElement>>;
|
|
2629
|
+
export interface SliderProps extends WebComponentProps {
|
|
2630
|
+
/** Lowest selectable value. Required: a range with no bounds is a guess, and the guess belongs to whoever knows what the number means. */
|
|
2631
|
+
min?: number;
|
|
2632
|
+
/** Highest selectable value. Required, for the same reason as `min`. */
|
|
2633
|
+
max?: number;
|
|
2634
|
+
/** Granularity. Omitted means the native default of 1; `any` means continuous. */
|
|
2635
|
+
step?: number | "any";
|
|
2636
|
+
/** Controlled value. Settable and reflected to the `value` attribute. `el.value = 40` drives it; dragging updates it and fires `kai-input` per step, `kai-change` on release. Read `el.value` for live state. */
|
|
2637
|
+
value?: number;
|
|
2638
|
+
/** Disable interaction. */
|
|
2639
|
+
disabled?: boolean;
|
|
2640
|
+
/** Accessible label for the slider. */
|
|
2641
|
+
label?: string;
|
|
2642
|
+
/** Form-control name, for a native form submit. */
|
|
2643
|
+
name?: string;
|
|
2644
|
+
/** Show the current value beside the track. Off by default. Two ways in, because one of them is not a scalar. As a bare ATTRIBUTE (`<kai-slider value-label>`) it renders the raw number. As a JS PROPERTY it also accepts a formatter function (`el.valueLabel = (v) => v + '%'`), for a slider that is not counting bare numbers. A function cannot survive an attribute, so that half is property-only. The readout is hidden from assistive tech: the slider already reports the same number, and an exposed copy would be announced twice. */
|
|
2645
|
+
valueLabel?: boolean | ((value: number) => string);
|
|
2646
|
+
/** The value was committed: pointer released, or a key press finished. */
|
|
2647
|
+
onChange?: (event: CustomEvent<{
|
|
2648
|
+
value: number;
|
|
2649
|
+
}>) => void;
|
|
2650
|
+
/** The thumb moved. Fires per step during a drag or a key press. */
|
|
2651
|
+
onInput?: (event: CustomEvent<{
|
|
2652
|
+
value: number;
|
|
2653
|
+
}>) => void;
|
|
2654
|
+
}
|
|
2655
|
+
export declare const Slider: import('react').ForwardRefExoticComponent<SliderProps & import('react').RefAttributes<HTMLElement>>;
|
|
2089
2656
|
export interface SourceProps extends WebComponentProps {
|
|
2090
2657
|
/** The URL this citation links to (the domain also seeds the default label/favicon). */
|
|
2091
2658
|
href?: string;
|
|
@@ -2392,7 +2959,7 @@ export interface ThreadProps extends WebComponentProps {
|
|
|
2392
2959
|
}
|
|
2393
2960
|
export declare const Thread: import('react').ForwardRefExoticComponent<ThreadProps & import('react').RefAttributes<HTMLElement>>;
|
|
2394
2961
|
export interface ToastRegionProps extends WebComponentProps {
|
|
2395
|
-
/** The toasts to render. Newest is shown on top. Set as a JS property (array); pass a new array reference to update. Omit for an empty region, which is the normal resting state and how the imperative `toast()` API starts. */
|
|
2962
|
+
/** The toasts to render. Newest is shown on top. Set as a JS property (array); pass a new array reference to update. Omit for an empty region, which is the normal resting state and how the imperative `toast()` API starts. Note the handover: the first `toast()` call ADOPTS a region you placed in markup (no second region mounts) and binds the imperative store to this property, replacing any array you set. Drive a region as data OR via `toast()`, not both at once. */
|
|
2396
2963
|
toasts?: {
|
|
2397
2964
|
id: string;
|
|
2398
2965
|
message: string;
|