@kitn.ai/ui 0.25.2 → 0.27.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 +17 -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-b5A8hlHs.js → Icon-BnFKqqtY.js} +1 -1
- package/dist/action-icons-CBskfBMz.js +1 -0
- package/dist/arrow-down-Br0qtpsz.js +1 -0
- package/dist/arrow-left-Dj7xgE12.js +1 -0
- package/dist/artifact-CvXEm1lS.js +1 -0
- package/dist/assets/dev-5XzXYR21.js +91 -0
- package/dist/attachments-C43ZegEq.js +1 -0
- package/dist/audio-visualizer-B-79y1Tj.js +1 -0
- package/dist/badge-BpUbq8c0.js +1 -0
- package/dist/bash-InADTalH.js +1 -6
- package/dist/bell-sn17Ip9v.js +1 -0
- package/dist/{elements/chunks/button-B9okqG73.js → button-BH6rN0U-.js} +1 -1
- package/dist/card-renderer-Cb1gQmth.js +1 -0
- package/dist/card-routing-DifQgS7n.js +1 -0
- package/dist/check-DPeeMUYx.js +1 -0
- package/dist/checkbox-Dc9Yov_B.js +1 -0
- package/dist/checkbox-group-B1kDLLYk.js +1 -0
- package/dist/chevron-down-CHSWk7ZT.js +1 -0
- package/dist/chevron-right-B7l_fMgx.js +1 -0
- package/dist/choice-card-BT3c1S8g.js +1 -0
- package/dist/circle-Bb0yOpqM.js +1 -0
- package/dist/circle-check-BGZpCiz7.js +1 -0
- package/dist/circle-x-wobWkoSx.js +1 -0
- package/dist/{elements/chunks/cn-CU7UAWzk.js → cn-DN5AWfiS.js} +1 -1
- package/dist/code-block-CUQ5mtv0.js +1 -0
- package/dist/collapsible-CPJbf6FM.js +1 -0
- package/dist/components/attachment-types.d.ts +53 -1
- package/dist/components/attachments.d.ts +31 -0
- package/dist/components/audio-visualizer/fit-scale.d.ts +50 -0
- package/dist/components/audio-visualizer/index.d.ts +15 -1
- package/dist/components/audio-visualizer/variant-bar.d.ts +24 -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 +49 -42
- package/dist/components/code-block.d.ts +22 -0
- package/dist/components/conversation-item.d.ts +66 -1
- package/dist/components/conversation-list.d.ts +77 -0
- package/dist/components/form-widgets.d.ts +67 -2
- package/dist/components/form.d.ts +89 -0
- package/dist/components/message.d.ts +29 -0
- 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/toast.d.ts +2 -1
- package/dist/components/tool-types.d.ts +9 -0
- package/dist/components/voice-input.d.ts +8 -0
- package/dist/components/voice-output.d.ts +12 -1
- package/dist/components/workspace-shell.d.ts +87 -0
- package/dist/composer-CjngLzal.js +106 -0
- package/dist/confirm-card-DCx_A4bU.js +1 -0
- package/dist/construct-cli.es.js +1169 -0
- package/dist/context-BY8V-Nlp.js +1 -0
- package/dist/controllable-D43BKmtX.js +1 -0
- package/dist/conversation-list-D4lLU_yS.js +1 -0
- package/dist/copy-B6DO4PqB.js +1 -0
- package/dist/core-AYMC6_lb.js +12 -5874
- package/dist/{create-tween-CUzOlaMS.js → create-tween-BPzaefTp.js} +1 -1
- package/dist/{create-tween-B5Y4Im8G.js → create-tween-CnMHviKB.js} +1 -1
- package/dist/{create-tween-4z1XYLkR.js → create-tween-D1aiGZZh.js} +1 -1
- package/dist/{elements/chunks/create-tween-CUrM6D_o.js → create-tween-DUSQUKpr.js} +2 -2
- package/dist/css-M7EaDHN_.js +1 -6
- package/dist/custom-elements.json +3468 -1927
- package/dist/default-input-CucQEOqH.js +1 -0
- package/dist/define-CGGX-7Vg.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/diagnostics/hook.d.ts +81 -0
- package/dist/diagnostics/index.d.ts +7 -0
- package/dist/diagnostics/report-request.d.ts +61 -0
- package/dist/diagnostics.d.ts +5 -0
- package/dist/diagnostics.js +209 -0
- package/dist/disclosure-CbLtajUQ.js +1 -0
- package/dist/dropdown-BwhViJFd.js +1 -0
- 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.d.ts +1 -0
- package/dist/elements/conversation-item.js +1 -0
- package/dist/elements/conversation-list.js +1 -1
- package/dist/elements/default-input.d.ts +3 -3
- package/dist/elements/define-entry.d.ts +12 -0
- package/dist/elements/define.d.ts +27 -0
- package/dist/elements/diagnostic-events.d.ts +74 -0
- package/dist/elements/dialog.js +1 -1
- package/dist/elements/dock.d.ts +1 -0
- package/dist/elements/dock.js +243 -0
- package/dist/elements/dropdown.d.ts +1 -0
- package/dist/elements/dropdown.js +1 -0
- package/dist/elements/editable-label.js +1 -1
- package/dist/elements/element-data-types.d.ts +37 -0
- package/dist/elements/element-diagnostics.d.ts +81 -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/register.d.ts +2 -0
- package/dist/elements/remote.js +1 -1
- package/dist/elements/resizable.js +1 -1
- package/dist/elements/response-stream.js +3 -3
- 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 +36 -4
- 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 +589 -167
- package/dist/{elements/chunks/ellipsis-CVxqfsDZ.js → ellipsis-DFr4Vqr3.js} +1 -1
- package/dist/embed-5s_vU4J0.js +1 -0
- package/dist/engine-javascript-vq0WuIJl.js +14 -2516
- package/dist/{elements/chunks/external-link-DG2sRdQL.js → external-link-u9d85ORQ.js} +1 -1
- package/dist/file-text-CX7_x42o.js +1 -0
- package/dist/{elements/chunks/file-tree-yGWNK0Js.js → file-tree-D3kBjXI5.js} +1 -1
- package/dist/folder-V-YdIL8f.js +1 -0
- package/dist/form-BRNUMCN2.js +1 -0
- package/dist/github-dark-dimmed-DUshB20C.js +1 -4
- package/dist/github-light-JYsPkUQd.js +1 -4
- package/dist/hover-card-DaeiYrTA.js +1 -0
- package/dist/html-CPZ3oZQ7.js +1 -10
- package/dist/icon-BpixdZNq.js +1 -0
- package/dist/{elements/chunks/index-BCRhi84a.js → index-xu_pdcPi.js} +1 -1
- package/dist/index.d.ts +3 -1
- package/dist/index.js +8473 -6470
- package/dist/index.server.js +6495 -4958
- package/dist/info-8mFsIjS3.js +1 -0
- package/dist/input-d1Yuu-hz.js +1 -0
- package/dist/javascript-C25yR2R2.js +1 -6
- package/dist/json-DxJze_jm.js +1 -6
- package/dist/kai-provider.es.js +40 -40
- package/dist/kai.es.js +1 -1
- package/dist/kbd-961zMPFB.js +1 -0
- package/dist/link-DlZZBGaR.js +1 -0
- package/dist/{elements/chunks/link-preview-Cf5KOP-i.js → link-preview-DIIbV2Sd.js} +1 -1
- package/dist/loader-YQszHFaW.js +1 -0
- package/dist/{elements/chunks/markdown-DbozyYqa.js → markdown-CVk1MPsj.js} +1 -1
- package/dist/mcp.es.js +3873 -544
- package/dist/message-CwKVEdZg.js +1 -0
- package/dist/message-DS8lzHc1.js +1 -0
- package/dist/message-circle-Xf8Q-vZp.js +1 -0
- package/dist/message-square-Cxnwgkns.js +1 -0
- package/dist/{elements/chunks/minimize-2-SegJ_oku.js → minimize-2-UEZmP2QT.js} +1 -1
- package/dist/{elements/chunks/model-switcher-D7JrFFHp.js → model-switcher-Kk1jEQ5t.js} +1 -1
- package/dist/{elements/chunks/overlay-CV7z2YuX.js → overlay-C1od6LOz.js} +1 -1
- package/dist/panel-right-ryET0yyn.js +1 -0
- package/dist/paperclip-BDNoZFJP.js +1 -0
- package/dist/play-OFIvYXUQ.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/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 +23 -0
- package/dist/primitives/use-speech-recognition.d.ts +8 -0
- package/dist/primitives/use-text-stream.d.ts +5 -0
- package/dist/progress-bar-BvYX0aoy.js +1 -0
- package/dist/prompt-suggestion-BRFu2lcu.js +1 -0
- package/dist/radio-DcL23cNJ.js +1 -0
- package/dist/react/index.d.ts +306 -283
- package/dist/react.js +309 -247
- package/dist/reasoning-Cackq4Rh.js +1 -0
- package/dist/register-impl-C7rENvPK.js +424 -0
- package/dist/{elements/chunks/resizable-Dpzjlvp4.js → resizable-Cp9HUYih.js} +1 -1
- package/dist/rotate-ccw-0DLRDHH5.js +1 -0
- package/dist/rotate-cw-DOB9IGcU.js +1 -0
- package/dist/schemas/form.schema.json +21 -1
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/tool-defs.d.ts +45 -0
- package/dist/schemas.js +398 -305
- package/dist/scroll-area-emVmWP4K.js +1 -0
- package/dist/scroll-button-CeP_gv1x.js +1 -0
- package/dist/select-CWmu00tS.js +1 -0
- package/dist/{elements/chunks/separator-DH2r_ZSZ.js → separator-CE6vly6z.js} +1 -1
- package/dist/{elements/chunks/settings-BFMOd6yB.js → settings-CE-78SvZ.js} +1 -1
- package/dist/{elements/chunks/settings-group-B3VZKIcz.js → settings-group-ZFWNxFQR.js} +1 -1
- package/dist/{elements/chunks/skeleton-N8BuWYmf.js → skeleton-BebdP4mf.js} +1 -1
- package/dist/slider-BAKRYUlz.js +1 -0
- package/dist/slots-DaNjX0rc.js +1 -0
- package/dist/{solid-BMuDmFo_.js → solid-BE5ui6sy.js} +10672 -8116
- package/dist/{solid-CGYNdLRR.js → solid-DFhsce3O.js} +8137 -6056
- package/dist/solid.d.ts +15 -0
- package/dist/solid.js +248 -235
- package/dist/solid.server.js +248 -235
- package/dist/source-B0FlguSx.js +1 -0
- package/dist/star-CBMZvLuN.js +1 -0
- package/dist/state/index.d.ts +5 -1
- package/dist/state/mock.d.ts +32 -2
- package/dist/state/persistence.d.ts +51 -0
- package/dist/state/stream.d.ts +50 -0
- package/dist/state/threads.d.ts +71 -0
- package/dist/state.js +297 -172
- package/dist/store-7eoadydQ.js +1 -0
- package/dist/svelte--5p79yCD.js +1 -15
- package/dist/switch-CViARZCy.js +1 -0
- package/dist/tasks-card-MjCcOhR_.js +1 -0
- package/dist/text-shimmer-DKlwRF2G.js +1 -0
- package/dist/textarea-3ay2Me2-.js +1 -0
- package/dist/theme.tokens.css +82 -13
- package/dist/{elements/chunks/thumbs-up-DQe0hvkZ.js → thumbs-up-DQcu2HMO.js} +1 -1
- package/dist/toast-store-C6yKOhbk.js +1 -0
- package/dist/{elements/chunks/tool-C1YtxwPu.js → tool-BCYNlfKy.js} +1 -1
- package/dist/{elements/chunks/tooltip-BqwnFWhn.js → tooltip-05zI4hjs.js} +1 -1
- package/dist/trash-2-BR1RxGky.js +1 -0
- package/dist/{elements/chunks/triangle-alert-B6or7F5u.js → triangle-alert-DHohDOCy.js} +1 -1
- package/dist/tsx-B8rCNbgL.js +1 -6
- package/dist/types.d.ts +4 -2
- 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 +131 -0
- package/dist/ui/hover-card.d.ts +44 -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-BbGW6A_u.js +1 -0
- package/dist/url-scheme-policy-DHpoTJwB.js +1 -0
- package/dist/use-card-resolution-CJW4grFa.js +1 -0
- package/dist/{variant-aurora-DwSOfraQ.js → variant-aurora-BUOVgPOB.js} +27 -27
- package/dist/{variant-aurora-wKvAQ5wp.js → variant-aurora-CUsUJvFI.js} +28 -28
- package/dist/{variant-aurora-XEkPT0_z.js → variant-aurora-CW2i4bfr.js} +2 -2
- package/dist/{elements/chunks/variant-aurora-QXTZPyST.js → variant-aurora-xiMPty8f.js} +2 -2
- package/dist/variant-custom-BQtOnmeO.js +1 -0
- package/dist/{variant-custom-BhS9wIpU.js → variant-custom-CAm9L-E5.js} +65 -65
- package/dist/{variant-custom-eFIg2XWQ.js → variant-custom-CAnzzppW.js} +40 -40
- package/dist/variant-custom-D91HjAKz.js +1 -0
- package/dist/{variant-wave-CUWGx9Bn.js → variant-wave-Ca1Ls4_y.js} +21 -21
- package/dist/{variant-wave-CbVsmgwT.js → variant-wave-CxX39DKd.js} +25 -25
- package/dist/{variant-wave-BwzrHD1s.js → variant-wave-DYyzIIZv.js} +2 -2
- package/dist/{elements/chunks/variant-wave-DDCwhLas.js → variant-wave-uY5crU_K.js} +2 -2
- package/dist/vue-BmIZj4XD.js +1 -33
- package/dist/wire/chunk.d.ts +47 -0
- package/dist/wire/diagnostics.d.ts +575 -0
- package/dist/wire/encode-probe.d.ts +70 -0
- package/dist/wire/encode.d.ts +24 -0
- package/dist/wire/index.d.ts +2 -0
- package/dist/wire/sse.d.ts +10 -2
- package/dist/wire.js +917 -480
- package/dist/x-C5m1JFgi.js +1 -0
- package/frameworks/react/index.tsx +325 -108
- package/llms-full.txt +1354 -82
- package/llms.txt +6 -3
- package/package.json +39 -6
- package/src/agent-tooling/archetypes.ts +41 -9
- package/src/agent-tooling/catalog/README.md +676 -0
- package/src/agent-tooling/catalog/catalog-types.ts +231 -0
- package/src/agent-tooling/catalog/fabrications.ts +96 -0
- package/src/agent-tooling/catalog/invariants.ts +284 -0
- package/src/agent-tooling/catalog/labs-titles.ts +114 -0
- package/src/agent-tooling/catalog/scenarios.ts +87 -0
- package/src/agent-tooling/catalog/surfaces.ts +347 -0
- package/src/agent-tooling/construct/cli-entry.ts +8 -0
- package/src/agent-tooling/construct/cli.ts +131 -0
- package/src/agent-tooling/construct/codegen.ts +1353 -0
- package/src/agent-tooling/construct/construct.v1.schema.json +250 -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 +23 -0
- package/src/agent-tooling/construct/schema.ts +371 -0
- package/src/agent-tooling/integrations/anthropic.ts +7 -1
- package/src/agent-tooling/integrations/cloudflare.ts +43 -2
- package/src/agent-tooling/integrations/langgraph.ts +7 -1
- package/src/agent-tooling/integrations/mastra.ts +7 -1
- package/src/agent-tooling/integrations/mock.ts +92 -17
- package/src/agent-tooling/integrations/ollama.ts +7 -1
- package/src/agent-tooling/integrations/openai.ts +7 -1
- package/src/agent-tooling/integrations/openrouter.ts +7 -1
- package/src/agent-tooling/integrations/pi.ts +56 -1
- package/src/agent-tooling/integrations/vercel-ai-sdk.ts +7 -1
- package/src/agent-tooling/mcp/css-raw.d.ts +12 -0
- package/src/agent-tooling/mcp/manifest.ts +100 -1
- package/src/agent-tooling/mcp/server.ts +63 -6
- 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 +542 -5
- package/src/agent-tooling/mcp/tools/scaffold.ts +1834 -307
- package/src/agent-tooling/mcp/tools/theme.ts +146 -30
- package/src/agent-tooling/mcp/validate-args.ts +141 -0
- 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 +24 -7
- package/src/agent-tooling/route-emit.ts +26 -2
- package/src/components/attachment-types.ts +54 -1
- package/src/components/attachments.tsx +169 -22
- package/src/components/audio-visualizer/fit-scale.ts +112 -0
- package/src/components/audio-visualizer/index.tsx +80 -3
- package/src/components/audio-visualizer/variant-aurora.tsx +10 -4
- package/src/components/audio-visualizer/variant-bar.tsx +38 -6
- package/src/components/audio-visualizer/variant-custom.tsx +8 -2
- package/src/components/audio-visualizer/variant-grid.tsx +16 -11
- package/src/components/audio-visualizer/variant-radial.tsx +15 -10
- package/src/components/audio-visualizer/variant-wave.tsx +7 -2
- package/src/components/card-renderer.tsx +39 -8
- package/src/components/card.tsx +10 -2
- package/src/components/chat-container.tsx +4 -1
- package/src/components/chat-scope-picker.tsx +2 -2
- package/src/components/chat-thread.tsx +105 -13
- package/src/components/choice-card.tsx +102 -37
- package/src/components/coachmark.tsx +1 -1
- package/src/components/code-block.tsx +81 -5
- package/src/components/composer.tsx +89 -8
- package/src/components/confirm-card.tsx +20 -4
- package/src/components/conversation-item.tsx +138 -4
- package/src/components/conversation-list.tsx +230 -15
- package/src/components/embed.tsx +4 -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 +336 -21
- package/src/components/loader.tsx +12 -5
- package/src/components/message-skills.tsx +1 -1
- package/src/components/message.tsx +142 -12
- 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/response-stream.tsx +13 -7
- package/src/components/screen.tsx +5 -0
- package/src/components/scroll-button.tsx +63 -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 +11 -5
- package/src/components/tool-types.ts +9 -0
- package/src/components/voice-input.tsx +35 -3
- package/src/components/voice-output.tsx +46 -6
- package/src/components/workspace-shell.tsx +285 -0
- package/src/diagnostics/hook.ts +352 -0
- package/src/diagnostics/index.ts +82 -0
- package/src/diagnostics/report-request.ts +296 -0
- package/src/elements/attachments.tsx +9 -8
- package/src/elements/audio-visualizer.tsx +48 -4
- package/src/elements/chat-workspace.tsx +159 -287
- package/src/elements/chat.tsx +31 -10
- package/src/elements/checkbox-group.tsx +164 -0
- package/src/elements/checkbox.tsx +134 -0
- package/src/elements/code-block.tsx +19 -1
- package/src/elements/command.tsx +4 -1
- package/src/elements/compiled.css +1 -1
- package/src/elements/composer.tsx +12 -1
- package/src/elements/conversation-item.tsx +120 -0
- package/src/elements/conversation-list.tsx +60 -11
- package/src/elements/default-input.tsx +5 -5
- package/src/elements/define-entry.ts +12 -0
- package/src/elements/define.tsx +168 -8
- package/src/elements/diagnostic-events.ts +114 -0
- package/src/elements/dialog.tsx +47 -0
- package/src/elements/disclosure.ts +34 -12
- package/src/elements/dock.tsx +215 -0
- package/src/elements/dropdown.tsx +123 -0
- package/src/elements/element-data-types.ts +40 -0
- package/src/elements/element-diagnostics.ts +392 -0
- package/src/elements/element-manifest.json +36 -0
- package/src/elements/element-meta.json +1483 -560
- package/src/elements/element-nonscalar.json +185 -0
- package/src/elements/element-types.d.ts +589 -167
- 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/menu.tsx +13 -0
- package/src/elements/message.tsx +2 -0
- package/src/elements/pane-grid.tsx +111 -0
- package/src/elements/prompt-dock.tsx +2 -1
- package/src/elements/prompt-input.tsx +16 -10
- package/src/elements/radio-group.tsx +129 -0
- package/src/elements/register-impl.ts +52 -0
- package/src/elements/register.ts +28 -0
- package/src/elements/resizable.tsx +52 -25
- package/src/elements/scroll-button.tsx +59 -6
- package/src/elements/select.tsx +165 -0
- package/src/elements/slider.tsx +171 -0
- package/src/elements/slots.ts +108 -13
- package/src/elements/styles.css +119 -9
- package/src/elements/thinking-bar.tsx +16 -7
- package/src/elements/thread.tsx +2 -0
- package/src/elements/toast.tsx +17 -1
- package/src/elements/tool.tsx +26 -5
- package/src/elements/voice-input.tsx +11 -2
- package/src/elements/voice-output.tsx +16 -3
- package/src/index.ts +4 -1
- 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/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 +33 -0
- package/src/primitives/use-speech-recognition.ts +12 -1
- package/src/primitives/use-stick-to-bottom.ts +34 -2
- package/src/primitives/use-text-stream.ts +33 -2
- package/src/remote/provider-runtime.ts +6 -3
- package/src/schemas/index.ts +1 -0
- package/src/schemas/tool-defs.ts +307 -6
- package/src/solid.ts +15 -0
- package/src/state/index.ts +13 -1
- package/src/state/mock.ts +92 -6
- package/src/state/persistence.ts +180 -0
- package/src/state/stream.ts +71 -4
- package/src/state/threads.ts +142 -0
- package/src/types.ts +4 -2
- 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/dialog.tsx +6 -0
- package/src/ui/dock.tsx +584 -0
- package/src/ui/dropdown.tsx +67 -23
- package/src/ui/hover-card.tsx +156 -6
- package/src/ui/icon.tsx +53 -0
- package/src/ui/input.tsx +275 -16
- 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/resizable.tsx +11 -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/src/wire/chunk.ts +47 -0
- package/src/wire/consume.ts +185 -26
- package/src/wire/diagnostics.ts +727 -0
- package/src/wire/encode-probe.ts +214 -0
- package/src/wire/encode.ts +267 -14
- package/src/wire/formats/anthropic.ts +8 -1
- package/src/wire/formats/openai.ts +5 -0
- package/src/wire/index.ts +22 -0
- package/src/wire/read.ts +250 -6
- package/src/wire/sse.ts +16 -3
- package/theme.css +84 -13
- package/dist/elements/chunks/action-icons-DW9muWrY.js +0 -1
- package/dist/elements/chunks/arrow-left-iJVnQmxA.js +0 -1
- package/dist/elements/chunks/artifact-BSuPYFHY.js +0 -1
- package/dist/elements/chunks/attachments-CL6TaqIb.js +0 -1
- package/dist/elements/chunks/audio-visualizer-BuUqQmaO.js +0 -1
- package/dist/elements/chunks/badge-TIMiJFKc.js +0 -1
- package/dist/elements/chunks/bash-InADTalH.js +0 -1
- package/dist/elements/chunks/card-renderer-CSoTL_e1.js +0 -1
- package/dist/elements/chunks/card-routing-BK09BdmL.js +0 -1
- package/dist/elements/chunks/chat-thread-DxoKaStk.js +0 -1
- package/dist/elements/chunks/check-MdLzbxrm.js +0 -1
- package/dist/elements/chunks/chevron-down-MK7IzDqe.js +0 -1
- package/dist/elements/chunks/chevron-right-C5jXhmtV.js +0 -1
- package/dist/elements/chunks/choice-card-CGMc3kek.js +0 -1
- package/dist/elements/chunks/circle-BG7VkPep.js +0 -1
- package/dist/elements/chunks/circle-check-GqvO2UBs.js +0 -1
- package/dist/elements/chunks/circle-x-mhH7pOK2.js +0 -1
- package/dist/elements/chunks/code-block-ClhQO9RW.js +0 -1
- package/dist/elements/chunks/collapsible-DBcBkFPh.js +0 -1
- package/dist/elements/chunks/composer-CZZmtYOT.js +0 -69
- package/dist/elements/chunks/confirm-card-BWjf2-xo.js +0 -1
- package/dist/elements/chunks/context-hKjNqiyQ.js +0 -1
- package/dist/elements/chunks/conversation-list-CsGJjSKG.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-B1Mem5wu.js +0 -1
- package/dist/elements/chunks/define-B_tXMYRm.js +0 -1
- package/dist/elements/chunks/disclosure-DAoYOKew.js +0 -1
- package/dist/elements/chunks/download-DnCyWFJE.js +0 -1
- package/dist/elements/chunks/dropdown-CmNna5lT.js +0 -1
- package/dist/elements/chunks/embed-CjAD2jSi.js +0 -1
- package/dist/elements/chunks/engine-javascript-vq0WuIJl.js +0 -141
- package/dist/elements/chunks/file-text-D0J9F6M7.js +0 -1
- package/dist/elements/chunks/folder-NV1pi_ud.js +0 -1
- package/dist/elements/chunks/form-Cp8Y00Wn.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-6KtXpLwT.js +0 -1
- package/dist/elements/chunks/html-CPZ3oZQ7.js +0 -1
- package/dist/elements/chunks/icon-97R8SR2p.js +0 -1
- package/dist/elements/chunks/info-C8r5Q6cc.js +0 -1
- package/dist/elements/chunks/input-DrseEjhp.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-OGJDUT-O.js +0 -1
- package/dist/elements/chunks/link-BdsfLB7b.js +0 -1
- package/dist/elements/chunks/loader-B5QzK_8_.js +0 -1
- package/dist/elements/chunks/message-CE4k-qaj.js +0 -1
- package/dist/elements/chunks/message-DtXKPqiR.js +0 -1
- package/dist/elements/chunks/message-square-C9ovmtOo.js +0 -1
- package/dist/elements/chunks/paperclip-Bg0ITU3b.js +0 -1
- package/dist/elements/chunks/progress-bar-D1_rzt6N.js +0 -1
- package/dist/elements/chunks/prompt-suggestion-D5Sm8xF1.js +0 -1
- package/dist/elements/chunks/reasoning-BrxQfpfI.js +0 -1
- package/dist/elements/chunks/rotate-cw-DzVDJOA1.js +0 -1
- package/dist/elements/chunks/scroll-area-93A1bbeG.js +0 -1
- package/dist/elements/chunks/scroll-button-CrTo7wm4.js +0 -1
- package/dist/elements/chunks/share-DgNbkJKY.js +0 -1
- package/dist/elements/chunks/slots-CIw9RlAe.js +0 -1
- package/dist/elements/chunks/source-w9V0NnBn.js +0 -1
- package/dist/elements/chunks/star-DHvACxtm.js +0 -1
- package/dist/elements/chunks/store-HIPGhNz9.js +0 -1
- package/dist/elements/chunks/svelte--5p79yCD.js +0 -1
- package/dist/elements/chunks/tasks-card-lPxoodlA.js +0 -1
- package/dist/elements/chunks/text-shimmer-BY_rI3s5.js +0 -1
- package/dist/elements/chunks/textarea-DPfuhswM.js +0 -1
- package/dist/elements/chunks/toast-store-VUZZBhzH.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-DJg32jGH.js +0 -1
- package/dist/elements/chunks/variant-custom-D5ZlmziF.js +0 -1
- package/dist/elements/chunks/video-Bb86fVYI.js +0 -1
- package/dist/elements/chunks/vue-BmIZj4XD.js +0 -1
- package/dist/elements/chunks/x-BOhjBeOd.js +0 -1
- package/dist/llms/llms-full.txt +0 -2834
- package/dist/llms/llms.txt +0 -156
- package/dist/primitives/card-validate-generator.testlib.d.ts +0 -20
- package/dist/register-impl-DGmGzrEM.js +0 -145
- package/dist/ui/stat.d.ts +0 -16
- package/dist/variant-custom-MkTNTycd.js +0 -1
- package/src/primitives/card-validate-generator.testlib.ts +0 -38
- 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
|
@@ -1,6 +1,28 @@
|
|
|
1
1
|
import { JSX } from 'solid-js';
|
|
2
2
|
export interface CodeBlockProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
3
3
|
children?: JSX.Element;
|
|
4
|
+
/**
|
|
5
|
+
* Render a copy button in a header row above the code.
|
|
6
|
+
*
|
|
7
|
+
* DEFAULT OFF, and deliberately. This component is shared by three surfaces —
|
|
8
|
+
* `markdown.tsx` (every fenced block in every assistant message), `artifact.tsx`
|
|
9
|
+
* (the code panel), and the `<kai-code-block>` facade — and only the ELEMENT is
|
|
10
|
+
* documented as shipping a copy button. Defaulting on would add one to every code
|
|
11
|
+
* block in every message, a kit-wide visible change. The facade opts in; the other
|
|
12
|
+
* two are untouched, which `tests/elements/code-block.test.tsx` pins both
|
|
13
|
+
* behaviourally and at the call sites.
|
|
14
|
+
*/
|
|
15
|
+
copy?: boolean;
|
|
16
|
+
/**
|
|
17
|
+
* The exact text the copy button puts on the clipboard.
|
|
18
|
+
*
|
|
19
|
+
* Named for what it DOES rather than what it holds, because the distinction is the
|
|
20
|
+
* whole contract: by the time the button is clicked the source has been through
|
|
21
|
+
* Shiki, so anything read back out of the DOM is either `<span>`-laden HTML or a
|
|
22
|
+
* `textContent` reconstruction — and the reconstruction is where tabs, blank lines
|
|
23
|
+
* and trailing newlines quietly change. This prop never goes near the highlighter.
|
|
24
|
+
*/
|
|
25
|
+
copyText?: string;
|
|
4
26
|
}
|
|
5
27
|
declare function CodeBlock(props: CodeBlockProps): JSX.Element;
|
|
6
28
|
export interface CodeBlockCodeProps extends JSX.HTMLAttributes<HTMLDivElement> {
|
|
@@ -1,3 +1,4 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
1
2
|
import { ConversationSummary } from '../types.js';
|
|
2
3
|
export interface ConversationItemProps {
|
|
3
4
|
conversation: ConversationSummary;
|
|
@@ -14,4 +15,68 @@ export interface ConversationItemProps {
|
|
|
14
15
|
* ticking clock. Returns '' for a missing or unparseable date.
|
|
15
16
|
*/
|
|
16
17
|
export declare function relativeTimeShort(iso?: string, now?: number): string;
|
|
17
|
-
|
|
18
|
+
/**
|
|
19
|
+
* The slotted-item shape rendered by `<kai-conversation-item>` — the composed
|
|
20
|
+
* row of the consumer-owned loop. Distinct from the
|
|
21
|
+
* data-mode `ConversationItem` above, which batteries mode keeps rendering
|
|
22
|
+
* unchanged: this one takes REGIONS, not a `ConversationSummary`.
|
|
23
|
+
*
|
|
24
|
+
* Regions map 1:1 to the element's slots: `children` = the default slot (the
|
|
25
|
+
* title), plus `leading`, `meta`, and `menu`. The `menu` region takes the
|
|
26
|
+
* consumer's OWN popover (rename / fork / archive live there); the component
|
|
27
|
+
* provides only the region plus focus and ARIA plumbing, never a declarative
|
|
28
|
+
* actions prop. Activation has two modes: inside `<kai-conversations>` it
|
|
29
|
+
* lives in the CONTAINER (`createConversationItemsController` in
|
|
30
|
+
* conversation-list.tsx — this row renders no handler and the
|
|
31
|
+
* `data-kai-item-menu` marker on the menu region is what the container's
|
|
32
|
+
* activation guard keys off so a click in the consumer's menu never also
|
|
33
|
+
* selects the row); STANDALONE, `onActivate` makes the row body
|
|
34
|
+
* its own tabbable button-role control — click / Enter / Space — with the menu
|
|
35
|
+
* still outside the control as the body's sibling.
|
|
36
|
+
*
|
|
37
|
+
* ARIA contract for direct Solid use: the row renders `role="listitem"` holding
|
|
38
|
+
* a `role="button"` body (`aria-current` marks the active row, the same dialect
|
|
39
|
+
* as the batteries-mode row above) with the menu as the body's tabbable SIBLING
|
|
40
|
+
* (axe `nested-interactive` bans focusable descendants of
|
|
41
|
+
* a control, and `aria-required-children` outlaws non-option content anywhere
|
|
42
|
+
* inside a listbox, which is why the vocabulary is not listbox/option). Render
|
|
43
|
+
* your loop's rows inside a `role="list"` ancestor; element mode has no such
|
|
44
|
+
* burden: `<kai-conversations>`' items region provides it for slotted items.
|
|
45
|
+
*/
|
|
46
|
+
export interface SlottedConversationItemProps {
|
|
47
|
+
/** The row's identity, handed to the container's selection contract. In the
|
|
48
|
+
* element this is the `conversation-id` attribute (host `id` is the fallback). */
|
|
49
|
+
conversationId?: string;
|
|
50
|
+
/** Selected state. Reflected as `aria-current` on the row body and a
|
|
51
|
+
* `data-active` styling hook on the row; the container drives it from its
|
|
52
|
+
* `activeId`. */
|
|
53
|
+
active?: boolean;
|
|
54
|
+
/** Dense single-line row padding. */
|
|
55
|
+
compact?: boolean;
|
|
56
|
+
/** Leading region before the title (an icon or avatar). */
|
|
57
|
+
leading?: JSX.Element;
|
|
58
|
+
/** Meta region under the title (a timestamp or status line). */
|
|
59
|
+
meta?: JSX.Element;
|
|
60
|
+
/** Your own row menu (a popover trigger). Never selects the row. */
|
|
61
|
+
menu?: JSX.Element;
|
|
62
|
+
/** The title (the element's default slot). */
|
|
63
|
+
children?: JSX.Element;
|
|
64
|
+
/** Set when the element HOST carries the row-group semantics: the inner row
|
|
65
|
+
* then renders `role="presentation"` so the accessibility tree sees one
|
|
66
|
+
* group (the host), never two. The `kai-conversation-item` facade sets it;
|
|
67
|
+
* Solid consumers rendering the component directly leave it off and the row
|
|
68
|
+
* itself is the group. */
|
|
69
|
+
hostSemantics?: boolean;
|
|
70
|
+
/** STANDALONE activation: when set, the row body is itself the
|
|
71
|
+
* activation control — `tabindex="0"` on the `role="button"` body, and
|
|
72
|
+
* click / Enter / Space call this. The menu region never triggers it (it is
|
|
73
|
+
* the body's sibling, outside the control). Inside `<kai-conversations>`
|
|
74
|
+
* leave it UNSET: the container's controller owns activation (its delegated
|
|
75
|
+
* click/keydown → `kai-conversation-select`) plus roving tabindex, and a
|
|
76
|
+
* handler here would double-fire. The `kai-conversation-item` facade passes
|
|
77
|
+
* it only when the item is standalone. */
|
|
78
|
+
onActivate?: () => void;
|
|
79
|
+
class?: string;
|
|
80
|
+
}
|
|
81
|
+
export declare function SlottedConversationItem(props: SlottedConversationItemProps): JSX.Element;
|
|
82
|
+
export declare function ConversationItem(props: ConversationItemProps): JSX.Element;
|
|
@@ -13,6 +13,69 @@ export interface CollapsedRailProps {
|
|
|
13
13
|
class?: string;
|
|
14
14
|
}
|
|
15
15
|
export declare function CollapsedRail(props: CollapsedRailProps): JSX.Element;
|
|
16
|
+
/** Read a conversation item's identity the way the container does: the
|
|
17
|
+
* `conversationId` property, else the `conversation-id` attribute, else the
|
|
18
|
+
* host `id`. The property is what a framework loop sets; the attributes are
|
|
19
|
+
* the plain-HTML spellings (host `id` matches the `<kai-conversation>`
|
|
20
|
+
* data-carrier precedent). */
|
|
21
|
+
export declare function readConversationItemId(el: Element): string;
|
|
22
|
+
/** Whether a `<kai-conversation-item>` is STANDALONE — outside the management
|
|
23
|
+
* of a `<kai-conversations>` container — and therefore activates ITSELF:
|
|
24
|
+
* the facade makes its row body a
|
|
25
|
+
* tabbable button and fires `kai-select` on click / Enter / Space. Derived
|
|
26
|
+
* from the container's own membership rule, not from mere ancestry: item mode
|
|
27
|
+
* queries `:scope > kai-conversation-item` (direct children only), so an item
|
|
28
|
+
* wrapped in another element inside a container is standalone too — the
|
|
29
|
+
* container's controller never stamps or activates it. Inside a container
|
|
30
|
+
* (a direct child), the parent-item contract is the ONLY activation
|
|
31
|
+
* path: the container dispatches `kai-conversation-select` and owns roving
|
|
32
|
+
* tabindex, and the item fires nothing of its own. */
|
|
33
|
+
export declare function isStandaloneConversationItem(el: Element): boolean;
|
|
34
|
+
export interface ConversationItemsControllerOptions {
|
|
35
|
+
/** The current slotted item hosts, in DOM order. */
|
|
36
|
+
getItems: () => HTMLElement[];
|
|
37
|
+
/** The container's active conversation id. */
|
|
38
|
+
getActiveId: () => string | undefined;
|
|
39
|
+
/** Item activation (click / Enter / Space). Surfaces as
|
|
40
|
+
* `kai-conversation-select` on the element. */
|
|
41
|
+
onSelect: (id: string) => void;
|
|
42
|
+
}
|
|
43
|
+
export interface ConversationItemsController {
|
|
44
|
+
/** Re-derive the ARIA/roving-tabindex bookkeeping over the current items.
|
|
45
|
+
* Call on slotchange / child mutation and whenever `activeId` changes. */
|
|
46
|
+
sync(): void;
|
|
47
|
+
/** The container's items-region click handler (composed-path aware). */
|
|
48
|
+
handleClick(e: MouseEvent): void;
|
|
49
|
+
/** The container's items-region keydown handler (arrows, Home/End,
|
|
50
|
+
* Enter/Space). */
|
|
51
|
+
handleKeyDown(e: KeyboardEvent): void;
|
|
52
|
+
}
|
|
53
|
+
/**
|
|
54
|
+
* The parent-item contract of item mode, as a pure-DOM
|
|
55
|
+
* controller so it is host-agnostic: the `kai-conversations` facade wires it over
|
|
56
|
+
* its slotted `kai-conversation-item` children, and the jsdom contract tests
|
|
57
|
+
* drive it over plain nodes. Solid context cannot cross the element boundary
|
|
58
|
+
* (each facade is its own Solid root), so the channel is DOM traversal by
|
|
59
|
+
* construction:
|
|
60
|
+
*
|
|
61
|
+
* - selection flows container to item — exactly one item's BODY node (the
|
|
62
|
+
* shadow body of a `kai-conversation-item`, else the node itself; see
|
|
63
|
+
* `bodyOf`) is `aria-current="true"`, plus the `active` property on the
|
|
64
|
+
* host for the item's own styling hook;
|
|
65
|
+
* - `role="button"` is ensured on each item's body node (an authored role is
|
|
66
|
+
* left alone);
|
|
67
|
+
* - roving tabindex — exactly one body node `tabindex="0"` (the active
|
|
68
|
+
* item's, else the first's), the rest `-1`, re-derived on every `sync()`;
|
|
69
|
+
* menu content keeps its natural tab order (it is the body's SIBLING, not a
|
|
70
|
+
* descendant);
|
|
71
|
+
* - activation (click / Enter / Space) calls `onSelect` with the item's id, and
|
|
72
|
+
* is SUPPRESSED when the composed path crosses the item's `menu` region
|
|
73
|
+
* (light-DOM `slot="menu"` content or the shadow `data-kai-item-menu`
|
|
74
|
+
* wrapper), so the consumer's own popover never also selects the row;
|
|
75
|
+
* - ArrowUp/ArrowDown/Home/End move focus item-to-item, tabindex following the
|
|
76
|
+
* focused item.
|
|
77
|
+
*/
|
|
78
|
+
export declare function createConversationItemsController(opts: ConversationItemsControllerOptions): ConversationItemsController;
|
|
16
79
|
export interface ConversationListProps {
|
|
17
80
|
groups: ConversationGroup[];
|
|
18
81
|
conversations: ConversationSummary[];
|
|
@@ -34,6 +97,20 @@ export interface ConversationListProps {
|
|
|
34
97
|
/** Receive the imperative controller once mounted. The `kai-conversations`
|
|
35
98
|
* facade uses it to focus / clear the internal search input. */
|
|
36
99
|
controllerRef?: (controller: ConversationListController) => void;
|
|
100
|
+
/** Item mode: your OWN rows, rendered inside a list region in place of the
|
|
101
|
+
* data rows. When set, the built-in search
|
|
102
|
+
* filter, grouping and empty/no-match states do not apply — the consumer's
|
|
103
|
+
* loop owns them — while the chrome (header, search box, new-chat, footer)
|
|
104
|
+
* still renders and `onSearchChange` still reports queries. The
|
|
105
|
+
* `kai-conversations` facade passes its default `<slot>` here when it detects
|
|
106
|
+
* `kai-conversation-item` children. */
|
|
107
|
+
items?: JSX.Element;
|
|
108
|
+
/** Keydown handler for the item-mode list region (the facade wires
|
|
109
|
+
* `createConversationItemsController.handleKeyDown`). */
|
|
110
|
+
itemsKeyDown?: (e: KeyboardEvent) => void;
|
|
111
|
+
/** Click handler for the item-mode list region (the facade wires
|
|
112
|
+
* `createConversationItemsController.handleClick`). */
|
|
113
|
+
itemsClick?: (e: MouseEvent) => void;
|
|
37
114
|
class?: string;
|
|
38
115
|
}
|
|
39
116
|
/** Imperative handle exposed via `controllerRef` — surfaces the internal search
|
|
@@ -1,16 +1,37 @@
|
|
|
1
1
|
import { JSX } from 'solid-js';
|
|
2
|
-
import { FormField } from './form.js';
|
|
2
|
+
import { FieldMaskHint, FormField } from './form.js';
|
|
3
3
|
/** The shared prop shape every leaf widget receives from FieldRow. */
|
|
4
4
|
export interface WidgetProps {
|
|
5
5
|
id: string;
|
|
6
6
|
value: unknown;
|
|
7
7
|
field: FormField;
|
|
8
|
+
/**
|
|
9
|
+
* The field's resolved format hints, or an empty resolution.
|
|
10
|
+
*
|
|
11
|
+
* RESOLVED IN `FieldRow`, not here. The row already has to resolve them to render
|
|
12
|
+
* the format hint text and put its id in `aria-describedby`, and resolving the same
|
|
13
|
+
* untrusted `x-kai-*` keys a second time in the widget would warn twice about the
|
|
14
|
+
* same bad hint and could disagree with what the row said out loud.
|
|
15
|
+
*/
|
|
16
|
+
mask?: FieldMaskHint;
|
|
8
17
|
disabled: boolean;
|
|
9
18
|
placeholder?: string;
|
|
10
19
|
required: boolean;
|
|
11
20
|
invalid: boolean;
|
|
12
21
|
describedBy?: string;
|
|
13
22
|
label: string;
|
|
23
|
+
/**
|
|
24
|
+
* The id of the row's VISIBLE label element, for widgets whose control is a group
|
|
25
|
+
* rather than one labelable input.
|
|
26
|
+
*
|
|
27
|
+
* `FieldRow` used to suppress its `<label>` for those kinds and each widget named
|
|
28
|
+
* itself with `aria-label={props.label}`, which is a name only a screen reader can
|
|
29
|
+
* reach: "Severity", "Environments" and "Tags" were announced and invisible. The row
|
|
30
|
+
* now always renders the text and hands its id down here, so one string names the
|
|
31
|
+
* group and everybody can see it. Absent means the widget is on its own (a bare
|
|
32
|
+
* widget rendered outside `FieldRow`), so `aria-label` stays the fallback.
|
|
33
|
+
*/
|
|
34
|
+
labelledBy?: string;
|
|
14
35
|
onInput: (value: unknown) => void;
|
|
15
36
|
onBlur: () => void;
|
|
16
37
|
}
|
|
@@ -22,10 +43,54 @@ export declare function TextareaWidget(props: WidgetProps): JSX.Element;
|
|
|
22
43
|
export declare function NumberWidget(props: WidgetProps): JSX.Element;
|
|
23
44
|
export declare function SliderWidget(props: WidgetProps): JSX.Element;
|
|
24
45
|
export declare function RatingWidget(props: WidgetProps): JSX.Element;
|
|
46
|
+
/**
|
|
47
|
+
* The boolean field's switch IS `ui/switch.tsx` — it is not a lookalike.
|
|
48
|
+
*
|
|
49
|
+
* This used to hand-roll its own `<button role="switch">` at 44×24 while
|
|
50
|
+
* `<kai-switch>` shipped the same control at 36×20, so a consumer putting the two
|
|
51
|
+
* side by side saw two different switches; and its thumb used `bg-background`,
|
|
52
|
+
* re-introducing in the copy the dark-mode disappearing-thumb bug that
|
|
53
|
+
* `ui/switch.tsx:80` carries a comment about having fixed. Delegating removes both.
|
|
54
|
+
* The size convergence (44×24 → 36×20) is visible inside `kai-form` and intended.
|
|
55
|
+
*
|
|
56
|
+
* The four form-only hooks — `id`, `data-control` and the `aria-required` /
|
|
57
|
+
* `aria-invalid` / `aria-describedby` trio — are ordinary props now (plan decision
|
|
58
|
+
* D-7). They used to be stamped onto the button through `buttonRef` + a
|
|
59
|
+
* `createEffect`, which worked but meant this widget reached into the primitive's
|
|
60
|
+
* DOM to make `form.focusField()` land. `Switch` forwards anything it does not own
|
|
61
|
+
* to its inner button, exactly like `Checkbox` and `Radio` forward to their inputs,
|
|
62
|
+
* so all four ride the same path every other widget's hooks do.
|
|
63
|
+
*/
|
|
25
64
|
export declare function SwitchWidget(props: WidgetProps): JSX.Element;
|
|
26
65
|
export declare function CheckboxWidget(props: WidgetProps): JSX.Element;
|
|
27
66
|
export declare function RadioGroupWidget(props: WidgetProps): JSX.Element;
|
|
28
67
|
export declare function SelectWidget(props: WidgetProps): JSX.Element;
|
|
29
|
-
|
|
68
|
+
/**
|
|
69
|
+
* An array field whose items are an `enum`, as a list of checkboxes.
|
|
70
|
+
*
|
|
71
|
+
* The bordered/divided row chrome, the `role="group"` wrapper and the rows themselves
|
|
72
|
+
* live in `ui/checkbox-group.tsx` now — this widget only turns a JSON-Schema
|
|
73
|
+
* `items.enum` into options and owns the array in and out. It used to hand-roll the
|
|
74
|
+
* identical chrome beside `RadioGroup`, which already owned it.
|
|
75
|
+
*
|
|
76
|
+
* The emitted array holds the SCHEMA's values, not their string forms, so a numeric
|
|
77
|
+
* or boolean enum survives a round trip.
|
|
78
|
+
*/
|
|
79
|
+
export declare function CheckboxGroupWidget(props: WidgetProps & {
|
|
80
|
+
class?: string;
|
|
81
|
+
}): JSX.Element;
|
|
82
|
+
/**
|
|
83
|
+
* The LONG version of `checkbox-group`: an array-of-enum field whose option list is
|
|
84
|
+
* over the row's `inlineMax`.
|
|
85
|
+
*
|
|
86
|
+
* This was a `<select multiple>` until decision D-3 was ruled. `<select multiple>` is a
|
|
87
|
+
* poor control on every platform — the multi-select affordance is invisible, discovering
|
|
88
|
+
* it means knowing to ctrl/cmd-click, and there is no touch story at all. It is the same
|
|
89
|
+
* control as `checkbox-group`, so it renders as one, with a scroll cap because the only
|
|
90
|
+
* thing that made a long list bearable in a chat card was the select's fixed-height box.
|
|
91
|
+
*
|
|
92
|
+
* The scroll cap is a presentation decision (how a long list fits), not a limit: every
|
|
93
|
+
* option is rendered, nothing is truncated or dropped.
|
|
94
|
+
*/
|
|
30
95
|
export declare function MultiSelectWidget(props: WidgetProps): JSX.Element;
|
|
31
96
|
export declare function TagListWidget(props: WidgetProps): JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import { JSX } from 'solid-js';
|
|
2
2
|
import { CardHost, CardResolution } from '../primitives/card-contract.js';
|
|
3
|
+
import { FieldSemanticType } from '../primitives/field-semantics.js';
|
|
3
4
|
import { FormDefinition, FormField } from '../primitives/card-data-types.js';
|
|
4
5
|
export type { FormCardEnvelope, FormDefinition, FormField, } from '../primitives/card-data-types.js';
|
|
5
6
|
/** The internal widget identifiers `widgetFor` resolves to. */
|
|
@@ -8,6 +9,49 @@ export declare const DEFAULT_INLINE_MAX = 4;
|
|
|
8
9
|
/** Resolve the widget for a field. An explicit valid `x-kai-widget` always wins;
|
|
9
10
|
* otherwise the type/format/enum/constraint combination selects the widget. */
|
|
10
11
|
export declare function widgetFor(field: FormField, inlineMax: number): WidgetKind;
|
|
12
|
+
/**
|
|
13
|
+
* What one field's `x-kai-*` format hints resolve to.
|
|
14
|
+
*
|
|
15
|
+
* The three props on the left are `Input`'s masking surface verbatim;
|
|
16
|
+
* `hint` is the TEXT statement of the expected format, which `FieldRow` renders and
|
|
17
|
+
* links through its EXISTING `aria-describedby` chain (no third channel).
|
|
18
|
+
* Every field is `undefined` when the field carries no hints, which is what "byte for
|
|
19
|
+
* byte the behavior of today" means here.
|
|
20
|
+
*/
|
|
21
|
+
export interface FieldMaskHint {
|
|
22
|
+
/** The compiled-clean mask pattern handed to `Input`'s `format`. */
|
|
23
|
+
format?: string;
|
|
24
|
+
/** An explicit, aligned display guide. Absent = the pattern derives its own. */
|
|
25
|
+
guide?: string;
|
|
26
|
+
/** The tier-1 semantic type: `inputmode`, `autocomplete`, and the canonical form. */
|
|
27
|
+
semantic?: FieldSemanticType;
|
|
28
|
+
/** The expected format, stated in text for the description chain. */
|
|
29
|
+
hint?: string;
|
|
30
|
+
/**
|
|
31
|
+
* Everything that was ignored and why, as DATA rather than as a side effect.
|
|
32
|
+
*
|
|
33
|
+
* Resolution runs inside a memo on a render path, so it must never throw and must
|
|
34
|
+
* not warn twice for the same reason on a re-render. Returning the messages lets
|
|
35
|
+
* `FieldRow` own the once-per-row discipline and lets the pure tests assert the
|
|
36
|
+
* wording without a console spy.
|
|
37
|
+
*/
|
|
38
|
+
warnings: string[];
|
|
39
|
+
}
|
|
40
|
+
/** The resolution of a field with no format hints: shared, frozen, and the default
|
|
41
|
+
* every non-text widget carries so the prop bag has one shape. */
|
|
42
|
+
export declare const EMPTY_MASK_HINT: FieldMaskHint;
|
|
43
|
+
/**
|
|
44
|
+
* Resolve a field's `x-kai-format` / `x-kai-mask` / `x-kai-mask-guide` into the
|
|
45
|
+
* masking props `Input` takes, or into nothing at all.
|
|
46
|
+
*
|
|
47
|
+
* EVERY INPUT HERE IS MODEL OUTPUT and therefore untrusted. The hints are
|
|
48
|
+
* display-only — they produce text and caret positions, never HTML, a URL or an
|
|
49
|
+
* attribute on a navigable element — so this is about denial of service and
|
|
50
|
+
* confusion, not injection: an unknown token, a pattern the engine refuses and a
|
|
51
|
+
* misaligned guide each degrade to the largest thing that still works, and say so.
|
|
52
|
+
* A THROW here would take out the whole card, including the fields that were fine.
|
|
53
|
+
*/
|
|
54
|
+
export declare function resolveFieldMask(field: FormField, fieldKey?: string): FieldMaskHint;
|
|
11
55
|
/** Humanize a camelCase / snake_case property key into a label. */
|
|
12
56
|
export declare function humanize(key: string): string;
|
|
13
57
|
/** Field order: `x-kai-order` (filtered to known keys, missing appended) if
|
|
@@ -94,3 +138,48 @@ export interface FormProps {
|
|
|
94
138
|
* `kai-card` CustomEvent.
|
|
95
139
|
*/
|
|
96
140
|
export declare function Form(props: FormProps): JSX.Element;
|
|
141
|
+
interface FieldRowProps {
|
|
142
|
+
fieldKey: string;
|
|
143
|
+
field: FormField;
|
|
144
|
+
required: boolean;
|
|
145
|
+
inlineMax: number;
|
|
146
|
+
value: () => unknown;
|
|
147
|
+
error: () => string | undefined;
|
|
148
|
+
disabled: boolean;
|
|
149
|
+
onInput: (value: unknown) => void;
|
|
150
|
+
onBlur: () => void;
|
|
151
|
+
}
|
|
152
|
+
/**
|
|
153
|
+
* The widget prop bag for one field row. **Internal** — exported only so the
|
|
154
|
+
* subscription contract can be pinned directly
|
|
155
|
+
* (`tests/components/form-field-subscriptions.test.tsx`); it is not re-exported
|
|
156
|
+
* from the package.
|
|
157
|
+
*
|
|
158
|
+
* GETTERS, NOT AN OBJECT FACTORY, and this is the whole point (K-D12b). The
|
|
159
|
+
* factory read `props.value()` alongside everything else and rebuilt the bag on
|
|
160
|
+
* every call, so a reader of ANY prop — `invalid`, say — subscribed to `value`
|
|
161
|
+
* too and re-ran on every keystroke. Combined with the `<input>` being rebuilt
|
|
162
|
+
* when its class expression re-ran (K-D12a), that is what made typing into a
|
|
163
|
+
* `kai-form` text field lose focus after each character.
|
|
164
|
+
*
|
|
165
|
+
* One stable object with one getter per prop: each reader tracks exactly the
|
|
166
|
+
* signal behind the prop it read. The object identity is constant, so the
|
|
167
|
+
* `WidgetSwitch` prop below never changes either.
|
|
168
|
+
*/
|
|
169
|
+
export declare function fieldCommon(props: FieldRowProps, id: string, placeholder: () => string | undefined, label: () => string, describedBy?: () => string | undefined, mask?: () => FieldMaskHint, labelledBy?: () => string | undefined): ReturnType<FieldRowCommon>;
|
|
170
|
+
type FieldRowCommon = () => {
|
|
171
|
+
id: string;
|
|
172
|
+
value: unknown;
|
|
173
|
+
mask: FieldMaskHint;
|
|
174
|
+
field: FormField;
|
|
175
|
+
disabled: boolean;
|
|
176
|
+
placeholder?: string;
|
|
177
|
+
required: boolean;
|
|
178
|
+
invalid: boolean;
|
|
179
|
+
describedBy?: string;
|
|
180
|
+
label: string;
|
|
181
|
+
/** The id of the row's visible <label>, for widgets that name a GROUP. */
|
|
182
|
+
labelledBy?: string;
|
|
183
|
+
onInput: (v: unknown) => void;
|
|
184
|
+
onBlur: () => void;
|
|
185
|
+
};
|
|
@@ -105,6 +105,12 @@ export interface MessageBodyProps {
|
|
|
105
105
|
* the kit checks its own seven built-ins and leaves your own card type
|
|
106
106
|
* unvalidated. A schema here WINS over a built-in of the same name. */
|
|
107
107
|
cardSchemas?: CardSchemaMap;
|
|
108
|
+
/** The custom-element host node to emit card events off when no `CardProvider`
|
|
109
|
+
* is above this body, forwarded to `CardRenderer` as `hostElement`. The
|
|
110
|
+
* `<kai-chat>`/`<kai-message>`/`<kai-thread>` facades pass their own element,
|
|
111
|
+
* so a `card` part's events leave as the bubbling `kai-card` CustomEvent
|
|
112
|
+
* instead of being silently discarded. */
|
|
113
|
+
cardHostElement?: HTMLElement;
|
|
108
114
|
/** Whether this is a user message (right-aligned bubble) vs an assistant
|
|
109
115
|
* message (full-width transparent). */
|
|
110
116
|
isUser: boolean;
|
|
@@ -123,6 +129,29 @@ export interface MessageBodyProps {
|
|
|
123
129
|
activeFeedback?: FeedbackVote;
|
|
124
130
|
/** When true, the copy button shows its "copied" check icon. */
|
|
125
131
|
copied?: boolean;
|
|
132
|
+
/** Whether this message is the one currently streaming. Forwarded to each
|
|
133
|
+
* reasoning part's `<Reasoning>` so the disclosure auto-opens while the
|
|
134
|
+
* model is thinking and settles back once the stream ends. Without it the
|
|
135
|
+
* user watches a static collapsed "Reasoning" label for the whole thinking
|
|
136
|
+
* window. The caller owns the definition of "streaming" — for
|
|
137
|
+
* `ChatThread` that is `loading` + being the last assistant message. */
|
|
138
|
+
isStreaming?: boolean;
|
|
139
|
+
/** How a `reasoning` part renders. `'full'` (default) is the current
|
|
140
|
+
* behavior: the collapsible `<Reasoning>` disclosure, with the "Thinking…"
|
|
141
|
+
* shimmer on its trigger while `isStreaming`. `'compact'` drops the
|
|
142
|
+
* disclosure entirely and shows only a shimmer loader while the part is
|
|
143
|
+
* streaming — nothing once it settles, so there is no expandable detail to
|
|
144
|
+
* open. `'off'` renders the part not at all, in either state. Kit-decides-
|
|
145
|
+
* HOW: this is a display-mode fact about the medium, not a per-message
|
|
146
|
+
* toggle, so it applies uniformly to every reasoning part in the body. */
|
|
147
|
+
reasoningMode?: 'full' | 'compact' | 'off';
|
|
148
|
+
/** Seeds the reasoning disclosure open AND keeps it tracking the stream
|
|
149
|
+
* (open while streaming, closes when it settles): the pre-Task-19f `full`
|
|
150
|
+
* behavior. Default false/absent: the panel starts closed (just the
|
|
151
|
+
* "Thinking" shimmer chip) and only opens on click, the current default
|
|
152
|
+
* (owner ruling, 2026-08-26). Meaningless when `reasoningMode` is
|
|
153
|
+
* `'compact'`/`'off'` (no disclosure exists to open). */
|
|
154
|
+
reasoningDefaultOpen?: boolean;
|
|
126
155
|
/** INJECT slot projected at the TOP of the body — above the reasoning / tools /
|
|
127
156
|
* content. A per-message header: a model-name label, a role + timestamp line.
|
|
128
157
|
* In the `<kai-message>` shadow this is `<slot name="before-body" />`. */
|
|
@@ -18,6 +18,12 @@ export interface ReasoningProps {
|
|
|
18
18
|
disabled?: boolean;
|
|
19
19
|
/** Receive the open controller (open accessor + setOpen) once mounted. */
|
|
20
20
|
controllerRef?: (api: ReasoningController) => void;
|
|
21
|
+
/** Keep auto-opening while streaming and auto-closing when it settles (the
|
|
22
|
+
* pre-Task-19f `full` behavior). Default false: the panel starts per
|
|
23
|
+
* `defaultOpen` and stays exactly where the user leaves it — streaming only
|
|
24
|
+
* changes the trigger's label (shimmer), never the open state, matching the
|
|
25
|
+
* "closed chip, expand on click" default (owner ruling, 2026-08-26). */
|
|
26
|
+
openOnStream?: boolean;
|
|
21
27
|
}
|
|
22
28
|
declare function Reasoning(props: ReasoningProps): JSX.Element;
|
|
23
29
|
export interface ReasoningTriggerProps extends JSX.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
@@ -2,6 +2,17 @@ export interface ScrollButtonProps {
|
|
|
2
2
|
class?: string;
|
|
3
3
|
variant?: 'outline' | 'ghost' | 'default';
|
|
4
4
|
size?: 'sm' | 'md' | 'lg' | 'icon' | 'icon-sm';
|
|
5
|
+
/**
|
|
6
|
+
* The button's accessible name. Used whether or not the label is visible, so
|
|
7
|
+
* the announced text is always localisable. Defaults to `"Scroll to bottom"`.
|
|
8
|
+
*/
|
|
9
|
+
label?: string;
|
|
10
|
+
/**
|
|
11
|
+
* Also render `label` visibly beside the icon. Defaults to `false` (icon
|
|
12
|
+
* only). When it is visible the text IS the accessible name, so nothing is
|
|
13
|
+
* announced twice.
|
|
14
|
+
*/
|
|
15
|
+
showLabel?: boolean;
|
|
5
16
|
}
|
|
6
17
|
declare function ScrollButton(props: ScrollButtonProps): import("solid-js").JSX.Element;
|
|
7
18
|
export { ScrollButton };
|
|
@@ -27,6 +27,11 @@ export interface ThreadProps {
|
|
|
27
27
|
* the kit checks its own seven built-ins and leaves your own card type
|
|
28
28
|
* unvalidated. A schema here WINS over a built-in of the same name. */
|
|
29
29
|
cardSchemas?: CardSchemaMap;
|
|
30
|
+
/** The custom-element host node to emit card events off when no `CardProvider`
|
|
31
|
+
* is present, forwarded through `MessageBody` to `CardRenderer`. The
|
|
32
|
+
* element facades pass their own host element so card events leave as the
|
|
33
|
+
* bubbling `kai-card` CustomEvent. */
|
|
34
|
+
cardHostElement?: HTMLElement;
|
|
30
35
|
/** Show a typing indicator on the pending assistant turn — use while awaiting
|
|
31
36
|
* the assistant's reply. */
|
|
32
37
|
loading?: boolean;
|
|
@@ -53,6 +53,7 @@ export declare function Toast(props: ToastProps): import("solid-js").JSX.Element
|
|
|
53
53
|
* Renders a stack of toasts at a viewport edge. Caps the visible count at `max`
|
|
54
54
|
* (newest on top); overflow waits in a queue and is promoted as visible toasts
|
|
55
55
|
* leave. `aria-live=polite` / `role=region` so screen readers announce new
|
|
56
|
-
* toasts without stealing focus.
|
|
56
|
+
* toasts without stealing focus. Your app chrome must stay below the toast
|
|
57
|
+
* layer; set `--kai-toast-z` (default 100) on the host to move the layer.
|
|
57
58
|
*/
|
|
58
59
|
export declare function ToastRegion(props: ToastRegionProps): import("solid-js").JSX.Element;
|
|
@@ -23,6 +23,15 @@ export interface ToolPart {
|
|
|
23
23
|
type: string;
|
|
24
24
|
/** Semantic classification for rendering. Derive with classifyTool(type). */
|
|
25
25
|
kind?: ToolKind;
|
|
26
|
+
/** The call's lifecycle. A provider stream (real or `createMockResponder`)
|
|
27
|
+
* only ever ANNOUNCES a call: arguments stream in (`input-streaming`), then
|
|
28
|
+
* the part parks at `input-available` — and stays there. The kit parses and
|
|
29
|
+
* renders the call; EXECUTING it and answering is the host's side of the
|
|
30
|
+
* seam: after the read settles, run the tool and patch the part forward with
|
|
31
|
+
* `stream.upsertTool(id, { state: 'output-available', output })` (or
|
|
32
|
+
* `upsertToolPart`), or `output-error` + `errorText` on failure. The one
|
|
33
|
+
* exception is a call the provider ran itself (`raw` carries the result and
|
|
34
|
+
* the wire sets `output` directly) — never re-execute those. */
|
|
26
35
|
state: 'input-streaming' | 'input-available' | 'output-available' | 'output-error';
|
|
27
36
|
/** Last VALID parsed snapshot, fingerprint-deduped. The primary channel: this is
|
|
28
37
|
* what the kit renders. */
|
|
@@ -30,5 +30,13 @@ export interface VoiceInputProps {
|
|
|
30
30
|
/** Receive the imperative controller once mounted. The `<kai-voice-input>`
|
|
31
31
|
* facade forwards these as element methods (start/stop). */
|
|
32
32
|
controllerRef?: (controller: VoiceInputController) => void;
|
|
33
|
+
/** A recognition session failed or produced nothing. `error` is the platform
|
|
34
|
+
* error code, the thrown exception's name, or `no-result` when the session
|
|
35
|
+
* ended with no error and no text. The facade maps this to kai-voice-error. */
|
|
36
|
+
onError?: (detail: {
|
|
37
|
+
source: 'recognition';
|
|
38
|
+
error: string;
|
|
39
|
+
message: string;
|
|
40
|
+
}) => void;
|
|
33
41
|
}
|
|
34
42
|
export declare function VoiceInput(props: VoiceInputProps): import("solid-js").JSX.Element;
|
|
@@ -20,8 +20,19 @@ export interface VoiceOutputProps {
|
|
|
20
20
|
/** TTS model seam: given text, return an audio Blob to play. When set, the
|
|
21
21
|
* native speechSynthesis path is bypassed. Mirrors VoiceInput's `onTranscribe`. */
|
|
22
22
|
onSynthesize?: (text: string) => Promise<Blob>;
|
|
23
|
-
/** Fires whenever playback starts or stops.
|
|
23
|
+
/** Fires whenever playback starts or stops. `speaking: true` means audio has
|
|
24
|
+
* actually started (utterance.onstart on the native path; audio.play()
|
|
25
|
+
* resolving on the model path), not that speak() was called. */
|
|
24
26
|
onSpeakingChange?: (speaking: boolean) => void;
|
|
27
|
+
/** Synthesis failed: a native utterance error, a rejecting `onSynthesize`, or
|
|
28
|
+
* audio playback failing to start. `error` is the platform error code or the
|
|
29
|
+
* exception's name. Deliberate cancellation (stop(), a new speak()) is not a
|
|
30
|
+
* failure and does not fire. The facade maps this to kai-voice-error. */
|
|
31
|
+
onError?: (detail: {
|
|
32
|
+
source: 'synthesis';
|
|
33
|
+
error: string;
|
|
34
|
+
message: string;
|
|
35
|
+
}) => void;
|
|
25
36
|
/** Fires once the model path resolves audio (model path only). */
|
|
26
37
|
onSynthesized?: (blob: Blob) => void;
|
|
27
38
|
disabled?: boolean;
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { JSX } from 'solid-js';
|
|
2
|
+
/** The two aside columns of the shell, named logically (`start` follows the
|
|
3
|
+
* writing direction; on an RTL page it is the right column). */
|
|
4
|
+
export type WorkspaceAsideSide = 'start' | 'end';
|
|
5
|
+
/** Detail of an aside collapse/expand, however it happened (a method, the
|
|
6
|
+
* breakpoint, the drawer's Escape). */
|
|
7
|
+
export interface WorkspaceAsideToggleDetail {
|
|
8
|
+
side: WorkspaceAsideSide;
|
|
9
|
+
collapsed: boolean;
|
|
10
|
+
}
|
|
11
|
+
/** Detail of an aside resize (fires per drag step, keyboard nudge, or a handle double-click reset), width in px. */
|
|
12
|
+
export interface WorkspaceAsideResizeDetail {
|
|
13
|
+
side: WorkspaceAsideSide;
|
|
14
|
+
width: number;
|
|
15
|
+
}
|
|
16
|
+
/** Imperative surface exposed through `controllerRef` (the facade forwards it
|
|
17
|
+
* as element methods). */
|
|
18
|
+
export interface WorkspaceShellController {
|
|
19
|
+
/** Collapse/expand one aside (reports through onAsideToggle). */
|
|
20
|
+
toggleAside(side: WorkspaceAsideSide): void;
|
|
21
|
+
/** Force one aside collapsed (reports through onAsideToggle). */
|
|
22
|
+
collapseAside(side: WorkspaceAsideSide): void;
|
|
23
|
+
/** Force one aside expanded (reports through onAsideToggle). */
|
|
24
|
+
expandAside(side: WorkspaceAsideSide): void;
|
|
25
|
+
}
|
|
26
|
+
export interface WorkspaceShellProps {
|
|
27
|
+
/** Header band content. The region renders only when this is provided. */
|
|
28
|
+
header?: JSX.Element;
|
|
29
|
+
/** Start aside content (the inline-start column: a rail, a nav, a file tree).
|
|
30
|
+
* The region renders only when this is provided. */
|
|
31
|
+
start?: JSX.Element;
|
|
32
|
+
/** End aside content (the inline-end column: inspector, notes, preview).
|
|
33
|
+
* The region renders only when this is provided. */
|
|
34
|
+
end?: JSX.Element;
|
|
35
|
+
/** Footer band content. The region renders only when this is provided. */
|
|
36
|
+
footer?: JSX.Element;
|
|
37
|
+
/** Main region content. Always rendered. */
|
|
38
|
+
children?: JSX.Element;
|
|
39
|
+
/** Controlled collapsed state of the start aside. Omit for uncontrolled. */
|
|
40
|
+
startCollapsed?: boolean;
|
|
41
|
+
/** Initial collapsed state of the start aside when uncontrolled (default false). */
|
|
42
|
+
defaultStartCollapsed?: boolean;
|
|
43
|
+
/** Controlled collapsed state of the end aside. Omit for uncontrolled. */
|
|
44
|
+
endCollapsed?: boolean;
|
|
45
|
+
/** Initial collapsed state of the end aside when uncontrolled (default false). */
|
|
46
|
+
defaultEndCollapsed?: boolean;
|
|
47
|
+
/** Start aside default width in px (default 280). */
|
|
48
|
+
startWidth?: number;
|
|
49
|
+
/** Start aside minimum width in px during resize (default 200). */
|
|
50
|
+
startMinWidth?: number;
|
|
51
|
+
/** Start aside maximum width in px during resize (default 480). */
|
|
52
|
+
startMaxWidth?: number;
|
|
53
|
+
/** End aside default width in px (default 320). */
|
|
54
|
+
endWidth?: number;
|
|
55
|
+
/** End aside minimum width in px during resize (default 200). */
|
|
56
|
+
endMinWidth?: number;
|
|
57
|
+
/** End aside maximum width in px during resize (default 480). */
|
|
58
|
+
endMaxWidth?: number;
|
|
59
|
+
/** Auto-collapse both asides when the shell's own width drops below this many
|
|
60
|
+
* px, and re-expand when it grows back above. Applies to uncontrolled asides
|
|
61
|
+
* only (it never fights an app-driven collapsed prop); omit to disable. */
|
|
62
|
+
collapseBelow?: number;
|
|
63
|
+
/** Below this shell width in px, an expanded aside renders as an overlay
|
|
64
|
+
* drawer over the main region instead of a column beside it. Escape inside
|
|
65
|
+
* the drawer closes it and returns focus to the element focused before it
|
|
66
|
+
* opened. Omit to disable. */
|
|
67
|
+
drawerBelow?: number;
|
|
68
|
+
/** Density hint. Reflected as a `data-compact` hook on the root (and as the
|
|
69
|
+
* `compact` attribute on the element) for your CSS and slotted content; the
|
|
70
|
+
* shell itself keeps no other opinion about density. */
|
|
71
|
+
compact?: boolean;
|
|
72
|
+
/** An aside collapsed or expanded (any path: method, breakpoint, drawer Escape). */
|
|
73
|
+
onAsideToggle?: (detail: WorkspaceAsideToggleDetail) => void;
|
|
74
|
+
/** The aside was resized (fires per drag step, keyboard nudge, or a handle double-click reset), width in px. */
|
|
75
|
+
onAsideResize?: (detail: WorkspaceAsideResizeDetail) => void;
|
|
76
|
+
/** Receives the imperative controller once on mount. */
|
|
77
|
+
controllerRef?: (controller: WorkspaceShellController) => void;
|
|
78
|
+
class?: string;
|
|
79
|
+
}
|
|
80
|
+
/**
|
|
81
|
+
* The chat-agnostic workspace layout shell: five regions (header · start aside ·
|
|
82
|
+
* main · end aside · footer) with resize handles between the columns, per-aside
|
|
83
|
+
* controlled/uncontrolled collapse, collapse-below-breakpoint, and a mobile
|
|
84
|
+
* drawer mode for the asides. It knows nothing about chat: a file tree in
|
|
85
|
+
* `start` is as valid as a conversation rail.
|
|
86
|
+
*/
|
|
87
|
+
export declare function WorkspaceShell(props: WorkspaceShellProps): JSX.Element;
|