@kitn.ai/ui 0.20.1 → 0.21.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 +44 -45
- package/dist/components/artifact-card.d.ts +51 -0
- package/dist/components/artifact.d.ts +1 -1
- package/dist/components/attachments.d.ts +2 -2
- package/dist/components/audio-visualizer/index.d.ts +3 -3
- package/dist/components/audio-visualizer/labs/lab-choreography.d.ts +59 -0
- package/dist/components/audio-visualizer/labs/lab-shaders.d.ts +22 -0
- package/dist/components/audio-visualizer/labs/lab-visualizer.d.ts +18 -0
- package/dist/components/audio-visualizer/variant-aurora.d.ts +2 -2
- package/dist/components/audio-visualizer/variant-bar.d.ts +2 -2
- package/dist/components/audio-visualizer/variant-custom.d.ts +2 -2
- package/dist/components/audio-visualizer/variant-grid.d.ts +1 -1
- package/dist/components/audio-visualizer/variant-radial.d.ts +1 -1
- package/dist/components/audio-visualizer/variant-wave.d.ts +1 -1
- package/dist/components/card-fallback.d.ts +12 -2
- package/dist/components/card-renderer.d.ts +63 -2
- package/dist/components/chat-container.d.ts +3 -0
- package/dist/components/chat-scope-picker.d.ts +2 -2
- package/dist/components/chat-thread.d.ts +68 -18
- package/dist/components/choice-card.d.ts +3 -28
- package/dist/components/composer-dom.d.ts +1 -1
- package/dist/components/composer-highlight.d.ts +1 -1
- package/dist/components/composer-history.d.ts +1 -1
- package/dist/components/composer.d.ts +1 -1
- package/dist/components/confirm-card.d.ts +3 -18
- package/dist/components/context.d.ts +8 -4
- package/dist/components/conversation-item.d.ts +1 -1
- package/dist/components/conversation-list.d.ts +4 -3
- package/dist/components/embed.d.ts +3 -3
- package/dist/components/file-tree.d.ts +11 -22
- package/dist/components/form-widgets.d.ts +1 -1
- package/dist/components/form.d.ts +3 -44
- package/dist/components/link-preview.d.ts +3 -3
- package/dist/components/loader.d.ts +30 -48
- package/dist/components/message-skills.d.ts +4 -0
- package/dist/components/message.d.ts +84 -21
- package/dist/components/model-switcher.d.ts +2 -2
- package/dist/components/prompt-input.d.ts +2 -2
- package/dist/components/response-compare-types.d.ts +11 -2
- package/dist/components/response-compare.d.ts +3 -3
- package/dist/components/source.d.ts +12 -3
- package/dist/components/tasks-card.d.ts +3 -31
- package/dist/components/thread.d.ts +17 -5
- package/dist/components/toast.d.ts +2 -2
- package/dist/components/tool-classify.d.ts +8 -0
- package/dist/components/tool-types.d.ts +29 -1
- package/dist/components/tool.d.ts +3 -3
- package/dist/components/use-card-resolution.d.ts +1 -1
- package/dist/create-tween-D3Y5qiij.js +338 -0
- package/dist/create-tween-DGKY1FDY.js +341 -0
- package/dist/create-tween-paho5Rh-.js +7 -0
- package/dist/custom-elements.json +1681 -454
- 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/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-types.d.ts +70 -10
- package/dist/elements/chat-workspace.js +1 -1
- package/dist/elements/chat.js +1 -1
- package/dist/elements/checkpoint.js +1 -1
- package/dist/elements/choice.js +1 -1
- package/dist/elements/chunks/{Icon-Tj58ES_d.js → Icon-C-2LvGDG.js} +1 -1
- package/dist/elements/chunks/{action-icons-ns1Fnedj.js → action-icons-CaYoImEk.js} +1 -1
- package/dist/elements/chunks/arrow-left-Bb46H7w9.js +1 -0
- package/dist/elements/chunks/artifact-BBIscOxJ.js +1 -0
- package/dist/elements/chunks/{attachments-mCB5F1Fq.js → attachments-BB56zoji.js} +1 -1
- package/dist/elements/chunks/audio-visualizer-BxOx4THz.js +1 -0
- package/dist/elements/chunks/{badge-B4Zuajl2.js → badge-SxLSZ19R.js} +1 -1
- package/dist/elements/chunks/{button-ZWNif3--.js → button-CmkUkz6c.js} +1 -1
- package/dist/elements/chunks/card-renderer-Db4ffkWv.js +1 -0
- package/dist/elements/chunks/card-tags-D8lZ-C_U.js +1 -0
- package/dist/elements/chunks/chat-thread-B3Ks-cKr.js +1 -0
- package/dist/elements/chunks/check-C8desc_h.js +1 -0
- package/dist/elements/chunks/chevron-down-DKtc2HNB.js +1 -0
- package/dist/elements/chunks/chevron-right-Dw4GPhwL.js +1 -0
- package/dist/elements/chunks/choice-card-Q9cYYDyM.js +1 -0
- package/dist/elements/chunks/circle-BeokBsvB.js +1 -0
- package/dist/elements/chunks/circle-check-wJSqt859.js +1 -0
- package/dist/elements/chunks/{circle-x-B7faJFlY.js → circle-x-D0MEfxOM.js} +1 -1
- package/dist/elements/chunks/code-block-C8VzAraE.js +1 -0
- package/dist/elements/chunks/{collapsible-DM1Ckd4e.js → collapsible-Cvj61obE.js} +1 -1
- package/dist/elements/chunks/{composer-BguS0QL_.js → composer-D86ztyL0.js} +2 -2
- package/dist/elements/chunks/confirm-card-BdyDAGLw.js +1 -0
- package/dist/elements/chunks/context-WHDl-xSx.js +1 -0
- package/dist/elements/chunks/conversation-list-CdR14_Y4.js +1 -0
- package/dist/elements/chunks/create-tween-C_A_B638.js +7 -0
- package/dist/elements/chunks/{default-input-Cqqilg9t.js → default-input-CSZqUM81.js} +1 -1
- package/dist/elements/chunks/define-BzPnNsXg.js +1 -0
- package/dist/elements/chunks/{disclosure-CIZ5c8nO.js → disclosure-DVKsoc1F.js} +1 -1
- package/dist/elements/chunks/{download-Dsbg3ste.js → download-BjA54IMJ.js} +1 -1
- package/dist/elements/chunks/{dropdown-BDd1-Zgi.js → dropdown-BjVVHWXH.js} +1 -1
- package/dist/elements/chunks/{ellipsis-Dw6qrss-.js → ellipsis-BNedmqfi.js} +1 -1
- package/dist/elements/chunks/embed-DQsl4XEq.js +1 -0
- package/dist/elements/chunks/{external-link-Vt74zAoL.js → external-link-Di-dw2CU.js} +1 -1
- package/dist/elements/chunks/{file-text-CZrZF6_v.js → file-text-B3sAODCV.js} +1 -1
- package/dist/elements/chunks/{file-tree-DF4okKyo.js → file-tree-Dgto-bMn.js} +1 -1
- package/dist/elements/chunks/{folder-glP5rha4.js → folder-D6rMadFV.js} +1 -1
- package/dist/elements/chunks/form-CILxvhQ7.js +1 -0
- package/dist/elements/chunks/hover-card-BtiF4XiU.js +1 -0
- package/dist/elements/chunks/{icon-BLb8beoi.js → icon-DKkmze3y.js} +1 -1
- package/dist/elements/chunks/{info-CIsv92JK.js → info-CWRjZkuy.js} +1 -1
- package/dist/elements/chunks/{input-Dds1kFyt.js → input--QJBK6BA.js} +1 -1
- package/dist/elements/chunks/{kbd-De_xbgi9.js → kbd-C3zuKh8R.js} +1 -1
- package/dist/elements/chunks/{link-i4r_k7z4.js → link-BL5JA7Q0.js} +1 -1
- package/dist/elements/chunks/link-preview-CU37bbXh.js +1 -0
- package/dist/elements/chunks/{loader-BmQH4s3V.js → loader-XmpyxyRH.js} +1 -1
- package/dist/elements/chunks/{markdown-Zi21WhUz.js → markdown-3Gv5UZ_o.js} +1 -1
- package/dist/elements/chunks/message-CnBA2OUt.js +1 -0
- package/dist/elements/chunks/message-X5NZbq-W.js +1 -0
- package/dist/elements/chunks/message-square-CnpAm_P0.js +1 -0
- package/dist/elements/chunks/{minimize-2--ifeCGrl.js → minimize-2-DwyrUTcM.js} +1 -1
- package/dist/elements/chunks/{model-switcher-B94YAKsM.js → model-switcher-CclaJEHt.js} +1 -1
- package/dist/elements/chunks/{overlay-kD8dwRv_.js → overlay-Cepd-KcS.js} +1 -1
- package/dist/elements/chunks/{paperclip-q21dYOSK.js → paperclip-CdwKjrlu.js} +1 -1
- package/dist/elements/chunks/{progress-bar-BrAIIaaJ.js → progress-bar-DMVXBD3b.js} +1 -1
- package/dist/elements/chunks/{prompt-suggestion-Bjn2K-fR.js → prompt-suggestion-Di_WZE_5.js} +1 -1
- package/dist/elements/chunks/reasoning-D0jMch5u.js +1 -0
- package/dist/elements/chunks/{resizable-Dp4JExql.js → resizable-1znbL1Gv.js} +1 -1
- package/dist/elements/chunks/{rotate-cw-CFWWkpj2.js → rotate-cw-DVhhgx8n.js} +1 -1
- package/dist/elements/chunks/{scroll-area-Bb0kHH1j.js → scroll-area-Bs4bFS1P.js} +1 -1
- package/dist/elements/chunks/scroll-button-Bet5NLc4.js +1 -0
- package/dist/elements/chunks/{separator-9kRgr1X9.js → separator-C5Gh8qGC.js} +1 -1
- package/dist/elements/chunks/{settings-B8lmec4D.js → settings-5vmEFg0K.js} +1 -1
- package/dist/elements/chunks/{settings-group-I0hEuXiN.js → settings-group-BWLB38kz.js} +1 -1
- package/dist/elements/chunks/{share-C3lTiYGt.js → share-BZ3G_DaB.js} +1 -1
- package/dist/elements/chunks/skeleton-DafPJQTp.js +1 -0
- package/dist/elements/chunks/slots-CIw9RlAe.js +1 -0
- package/dist/elements/chunks/source-D_qj_6uJ.js +1 -0
- package/dist/elements/chunks/{star-CSJtGxgv.js → star-Cuv7j2IE.js} +1 -1
- package/dist/elements/chunks/{store-CHyW95TP.js → store-C1StPHfW.js} +1 -1
- package/dist/elements/chunks/tasks-card-EyoBZfpA.js +1 -0
- package/dist/elements/chunks/{text-shimmer-Cn9TmNpI.js → text-shimmer-D9gRSh34.js} +1 -1
- package/dist/elements/chunks/textarea-DuhtHfcm.js +1 -0
- package/dist/elements/chunks/{thumbs-up-PNVVThEF.js → thumbs-up-B9hwv43w.js} +1 -1
- package/dist/elements/chunks/{toast-store-DKbQn3Wn.js → toast-store-Bm3DUEDe.js} +1 -1
- package/dist/elements/chunks/{tool-DjTRpIpl.js → tool-CDtW7L0z.js} +1 -1
- package/dist/elements/chunks/tooltip-eB226mGK.js +1 -0
- package/dist/elements/chunks/{triangle-alert-DsHTHCPm.js → triangle-alert-C1SNzTqK.js} +1 -1
- package/dist/elements/chunks/use-card-resolution-YZh2MvI5.js +1 -0
- package/dist/elements/chunks/{variant-aurora-Dc4nQUia.js → variant-aurora-Cj1F7D0l.js} +2 -2
- package/dist/elements/chunks/{variant-custom-y_3kVQhS.js → variant-custom-T9gpt7QE.js} +1 -1
- package/dist/elements/chunks/{variant-wave-D5OR1-9Z.js → variant-wave-CxU9z-TE.js} +2 -2
- package/dist/elements/chunks/{video-B7vmenoC.js → video-CK4R7Rus.js} +1 -1
- package/dist/elements/chunks/x-D1qx0aLd.js +1 -0
- 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-list.js +1 -1
- package/dist/elements/default-input.d.ts +7 -7
- package/dist/elements/define.d.ts +1 -0
- package/dist/elements/dialog.js +1 -1
- package/dist/elements/disclosure.d.ts +1 -1
- package/dist/elements/editable-label.js +1 -1
- package/dist/elements/element-data-types.d.ts +107 -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-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/reasoning.js +1 -1
- package/dist/elements/register.d.ts +8 -6
- 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/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/slots.d.ts +16 -0
- 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/validate-messages.d.ts +25 -0
- package/dist/elements/voice-input.js +1 -1
- package/dist/elements/voice-output.js +1 -1
- package/dist/elements.d.ts +2725 -214
- package/dist/index.d.ts +163 -125
- package/dist/index.js +6336 -5802
- package/dist/index.server.d.ts +5 -0
- package/dist/index.server.js +5446 -4937
- package/dist/kai-provider.es.d.ts +5 -0
- package/dist/kai-provider.es.js +79 -77
- package/dist/kai.es.d.ts +5 -0
- package/dist/kai.es.js +1 -1
- package/dist/llms/llms-full.txt +762 -148
- package/dist/llms/llms.txt +57 -5
- package/dist/mcp.es.js +4010 -770
- package/dist/primitives/card-component-types.d.ts +11 -0
- package/dist/primitives/card-data-types.d.ts +196 -0
- package/dist/primitives/card-host.d.ts +1 -1
- package/dist/primitives/card-recovery.d.ts +3 -3
- package/dist/primitives/card-registry.d.ts +4 -14
- package/dist/primitives/card-resolution.d.ts +1 -1
- package/dist/primitives/card-routing.d.ts +1 -1
- package/dist/primitives/card-tags.d.ts +11 -0
- package/dist/primitives/card-validate-cards.d.ts +57 -0
- package/dist/primitives/card-validate-generator.testlib.d.ts +20 -0
- package/dist/primitives/card-validate-schemas.d.ts +17 -0
- package/dist/primitives/card-validate.d.ts +24 -0
- package/dist/primitives/create-kai-chat.d.ts +3 -3
- package/dist/primitives/embed-providers.d.ts +1 -1
- package/dist/primitives/link-preview.d.ts +1 -1
- package/dist/primitives/message-feedback.d.ts +2 -2
- package/dist/primitives/toast-store.d.ts +1 -1
- package/dist/react/index.d.ts +717 -299
- package/dist/react/use-kai-chat.d.ts +8 -4
- package/dist/react.d.ts +5 -0
- package/dist/react.js +417 -316
- package/dist/register-impl-bzrZ44ft.js +145 -0
- package/dist/remote/host-embed.d.ts +1 -1
- package/dist/remote/index.d.ts +2 -2
- package/dist/remote/provider-runtime.d.ts +2 -2
- package/dist/remote/provider.d.ts +2 -2
- package/dist/remote/validate.d.ts +1 -1
- package/dist/remote/wire.d.ts +1 -1
- package/dist/schemas/artifact.schema.json +92 -0
- package/dist/schemas/embed.schema.json +0 -2
- package/dist/schemas/from-tool-call.d.ts +48 -0
- package/dist/schemas/index.d.ts +48 -0
- package/dist/schemas/link.schema.json +0 -2
- package/dist/schemas/provider-subsets.d.ts +136 -0
- package/dist/schemas/registry.d.ts +140 -0
- package/dist/schemas/tool-defs.d.ts +121 -0
- package/dist/schemas.d.ts +5 -0
- package/dist/schemas.js +717 -0
- package/dist/solid-BCJUQqwS.js +22750 -0
- package/dist/solid-BdENBcEq.js +20108 -0
- package/dist/solid.d.ts +66 -0
- package/dist/solid.js +261 -0
- package/dist/solid.server.d.ts +5 -0
- package/dist/solid.server.js +261 -0
- package/dist/state/index.d.ts +14 -4
- package/dist/state/messages.d.ts +8 -3
- package/dist/state/mock.d.ts +46 -0
- package/dist/state/parts.d.ts +85 -0
- package/dist/state/stream.d.ts +15 -9
- package/dist/state.d.ts +5 -0
- package/dist/state.js +253 -84
- package/dist/ui/action-icons.d.ts +1 -1
- package/dist/ui/collapsible.d.ts +11 -6
- package/dist/ui/dropdown.d.ts +47 -42
- package/dist/ui/pane-group.d.ts +1 -1
- package/dist/variant-aurora-1wMcXRUS.js +381 -0
- package/dist/variant-aurora-BKHHiOgL.js +391 -0
- package/dist/{variant-aurora-DVtGqVH6.js → variant-aurora-DOb_o4pC.js} +1 -1
- package/dist/{variant-custom-Dif-IV4u.js → variant-custom-CJGB0Kbw.js} +1 -1
- package/dist/variant-custom-Co0CkXJF.js +200 -0
- package/dist/variant-custom-DWSSgmd2.js +170 -0
- package/dist/variant-wave-C3-45cL6.js +218 -0
- package/dist/{variant-wave-DbfNdvSi.js → variant-wave-CEODq-9q.js} +1 -1
- package/dist/variant-wave-jdXBnCUZ.js +208 -0
- package/dist/wire/chunk.d.ts +171 -0
- package/dist/wire/consume.d.ts +26 -0
- package/dist/wire/encode.d.ts +148 -0
- package/dist/wire/formats/anthropic.d.ts +2 -0
- package/dist/wire/formats/openai.d.ts +5 -0
- package/dist/wire/index.d.ts +14 -0
- package/dist/wire/read.d.ts +26 -0
- package/dist/wire/sink-helpers.d.ts +21 -0
- package/dist/wire/sse.d.ts +33 -0
- package/dist/wire.d.ts +5 -53
- package/dist/wire.js +898 -0
- package/frameworks/react/index.tsx +183 -154
- package/frameworks/react/runtime.tsx +21 -1
- package/frameworks/react/use-kai-chat.tsx +11 -1
- package/llms-full.txt +762 -148
- package/llms.txt +57 -5
- package/package.json +61 -8
- package/src/agent-tooling/archetypes.ts +96 -0
- package/src/agent-tooling/integrations/anthropic.ts +412 -0
- package/src/agent-tooling/integrations/cloudflare.ts +136 -52
- package/src/agent-tooling/integrations/langgraph.ts +67 -13
- package/src/agent-tooling/integrations/mastra.ts +120 -12
- package/src/agent-tooling/integrations/mock.ts +43 -8
- package/src/agent-tooling/integrations/ollama.ts +61 -24
- package/src/agent-tooling/integrations/openai.ts +87 -0
- package/src/agent-tooling/integrations/openrouter.ts +56 -8
- package/src/agent-tooling/integrations/pi.ts +79 -23
- package/src/agent-tooling/integrations/pydantic-ai.ts +24 -2
- package/src/agent-tooling/integrations/vercel-ai-sdk.ts +84 -13
- package/src/agent-tooling/mcp/manifest.ts +206 -25
- package/src/agent-tooling/mcp/tools/debug.ts +13 -7
- package/src/agent-tooling/mcp/tools/reference.ts +285 -6
- package/src/agent-tooling/mcp/tools/scaffold.ts +3345 -675
- package/src/agent-tooling/registry.ts +17 -0
- package/src/agent-tooling/types.ts +229 -1
- package/src/components/artifact-card.tsx +120 -0
- package/src/components/audio-visualizer/index.tsx +9 -0
- package/src/components/audio-visualizer/labs/lab-choreography.ts +187 -0
- package/src/components/audio-visualizer/labs/lab-shaders.ts +363 -0
- package/src/components/audio-visualizer/labs/lab-visualizer.tsx +102 -0
- package/src/components/audio-visualizer/shader-canvas.tsx +31 -1
- package/src/components/card-fallback.tsx +42 -10
- package/src/components/card-renderer.tsx +146 -9
- package/src/components/chat-container.tsx +4 -0
- package/src/components/chat-thread.tsx +118 -51
- package/src/components/choice-card.tsx +17 -29
- package/src/components/composer.tsx +12 -2
- package/src/components/confirm-card.tsx +24 -20
- package/src/components/context.tsx +12 -4
- package/src/components/conversation-list.tsx +18 -2
- package/src/components/file-tree.tsx +11 -22
- package/src/components/file-upload.tsx +14 -8
- package/src/components/form.tsx +14 -47
- package/src/components/loader.tsx +39 -12
- package/src/components/message-skills.tsx +4 -0
- package/src/components/message.tsx +294 -46
- package/src/components/reasoning.tsx +92 -5
- package/src/components/response-compare-types.ts +25 -0
- package/src/components/response-compare.tsx +4 -9
- package/src/components/source.tsx +50 -24
- package/src/components/tasks-card.tsx +10 -33
- package/src/components/thread.tsx +84 -42
- package/src/components/toast.tsx +11 -5
- package/src/components/tool-classify.ts +26 -0
- package/src/components/tool-types.ts +31 -1
- package/src/elements/agent-card.tsx +11 -11
- package/src/elements/artifact.tsx +15 -7
- package/src/elements/attachments.tsx +6 -4
- package/src/elements/avatar.tsx +1 -1
- package/src/elements/button.tsx +3 -3
- package/src/elements/card.tsx +2 -2
- package/src/elements/cards.tsx +109 -14
- package/src/elements/chain-of-thought.tsx +14 -10
- package/src/elements/chat-scope-picker.tsx +9 -7
- package/src/elements/chat-types.ts +59 -6
- package/src/elements/chat-workspace.tsx +50 -9
- package/src/elements/chat.tsx +64 -3
- package/src/elements/choice.tsx +8 -8
- package/src/elements/coachmark.tsx +1 -1
- package/src/elements/command.tsx +8 -23
- package/src/elements/compare.tsx +7 -6
- package/src/elements/compiled.css +1 -1
- package/src/elements/composer.tsx +8 -8
- package/src/elements/confirm-card.tsx +9 -9
- package/src/elements/context-meter.tsx +4 -18
- package/src/elements/conversation-list.tsx +14 -9
- package/src/elements/default-input.tsx +3 -3
- package/src/elements/define.tsx +178 -43
- package/src/elements/editable-label.tsx +17 -2
- package/src/elements/element-data-types.ts +112 -0
- package/src/elements/element-meta.json +1596 -304
- package/src/elements/element-types.d.ts +2636 -211
- package/src/elements/feedback-bar.tsx +1 -1
- package/src/elements/file-tree.tsx +1 -1
- package/src/elements/file-upload.tsx +1 -1
- package/src/elements/form.tsx +14 -6
- package/src/elements/input.tsx +1 -1
- package/src/elements/kbd.tsx +1 -1
- package/src/elements/menu.tsx +10 -29
- package/src/elements/message-skills.tsx +7 -9
- package/src/elements/message.tsx +200 -32
- package/src/elements/model-switcher.tsx +5 -3
- package/src/elements/pane.tsx +1 -1
- package/src/elements/prompt-dock.tsx +8 -8
- package/src/elements/prompt-input.tsx +10 -10
- package/src/elements/prompt-suggestions.tsx +7 -4
- package/src/elements/reasoning.tsx +1 -1
- package/src/elements/register.ts +9 -0
- package/src/elements/resizable.globals.d.ts +36 -0
- package/src/elements/resizable.tsx +24 -13
- package/src/elements/response-stream.tsx +1 -1
- package/src/elements/scroll-button.tsx +1 -1
- package/src/elements/search.tsx +6 -1
- package/src/elements/segmented.tsx +5 -11
- package/src/elements/separator.tsx +1 -1
- package/src/elements/slots.ts +57 -24
- package/src/elements/source.tsx +21 -22
- package/src/elements/switch.tsx +3 -3
- package/src/elements/tasks.tsx +5 -4
- package/src/elements/thread.tsx +36 -4
- package/src/elements/toast.tsx +3 -2
- package/src/elements/tool.tsx +1 -1
- package/src/elements/validate-messages.ts +76 -0
- package/src/elements/voice-input.tsx +7 -7
- package/src/elements/voice-output.tsx +4 -4
- package/src/index.ts +141 -6
- package/src/primitives/card-component-types.ts +63 -0
- package/src/primitives/card-data-types.ts +312 -0
- package/src/primitives/card-recovery.ts +13 -2
- package/src/primitives/card-registry.tsx +34 -23
- package/src/primitives/card-schemas/artifact.schema.json +92 -0
- package/src/primitives/card-schemas/embed.schema.json +0 -2
- package/src/primitives/card-schemas/link.schema.json +0 -2
- package/src/primitives/card-tags.ts +61 -0
- package/src/primitives/card-validate-cards.ts +255 -0
- package/src/primitives/card-validate-generator.testlib.ts +38 -0
- package/src/primitives/card-validate-schemas.ts +58 -0
- package/src/primitives/card-validate.ts +48 -20
- package/src/primitives/create-tween.ts +54 -2
- package/src/primitives/message-feedback.ts +3 -2
- package/src/primitives/use-audio-analysis.ts +20 -1
- package/src/primitives/use-sequencer.ts +20 -1
- package/src/schemas/from-tool-call.ts +151 -0
- package/src/schemas/index.ts +340 -0
- package/src/schemas/provider-subsets.ts +538 -0
- package/src/schemas/registry.ts +355 -0
- package/src/schemas/tool-defs.ts +492 -0
- package/src/solid.ts +150 -0
- package/src/state/index.ts +27 -1
- package/src/state/messages.ts +21 -4
- package/src/state/mock.ts +211 -0
- package/src/state/parts.ts +295 -0
- package/src/state/stream.ts +56 -58
- package/src/ui/collapsible.tsx +17 -5
- package/src/ui/dropdown.tsx +46 -12
- package/src/ui/overlay.tsx +10 -4
- package/src/wire/chunk.ts +201 -0
- package/src/wire/consume.ts +440 -0
- package/src/wire/encode.ts +474 -0
- package/src/wire/formats/anthropic.ts +267 -0
- package/src/wire/formats/openai.ts +187 -0
- package/src/wire/index.ts +52 -0
- package/src/wire/read.ts +152 -0
- package/src/wire/sink-helpers.ts +50 -0
- package/src/wire/sse.ts +140 -0
- package/dist/create-tween-hvpmSuwW.js +0 -7
- package/dist/elements/chunks/arrow-left-DQocUFvy.js +0 -1
- package/dist/elements/chunks/audio-visualizer-BqNy7dfm.js +0 -1
- package/dist/elements/chunks/card-BkHbp4BA.js +0 -1
- package/dist/elements/chunks/chat-thread-CkRN6pZ7.js +0 -1
- package/dist/elements/chunks/check-B9-gn6SS.js +0 -1
- package/dist/elements/chunks/chevron-down-BNsxc2hk.js +0 -1
- package/dist/elements/chunks/chevron-right-Hv00StBO.js +0 -1
- package/dist/elements/chunks/circle-0e3KJTDr.js +0 -1
- package/dist/elements/chunks/circle-check-BNAS0JEy.js +0 -1
- package/dist/elements/chunks/code-block-BFUHn6Va.js +0 -1
- package/dist/elements/chunks/context-Cb7k4F-v.js +0 -1
- package/dist/elements/chunks/conversation-list-CvoAkWhN.js +0 -1
- package/dist/elements/chunks/create-tween-oVvAIG8r.js +0 -7
- package/dist/elements/chunks/define-D1din7Ld.js +0 -1
- package/dist/elements/chunks/hover-card-Cmm6Q53m.js +0 -1
- package/dist/elements/chunks/message-BqyXDN3-.js +0 -1
- package/dist/elements/chunks/message-feedback-Djr3z6Yb.js +0 -1
- package/dist/elements/chunks/message-square-vFAgbDaX.js +0 -1
- package/dist/elements/chunks/reasoning-DTpCGtnY.js +0 -1
- package/dist/elements/chunks/scroll-button-B0cH5fXf.js +0 -1
- package/dist/elements/chunks/skeleton-DSXW5Yya.js +0 -1
- package/dist/elements/chunks/slots--V19HwUb.js +0 -1
- package/dist/elements/chunks/textarea-CUwqAX0G.js +0 -1
- package/dist/elements/chunks/tooltip-CgBZCVKp.js +0 -1
- package/dist/elements/chunks/use-card-resolution-BSu_XHjH.js +0 -1
- package/dist/elements/chunks/x-GRUeeQFT.js +0 -1
- package/dist/host-embed.d.ts +0 -33
- package/dist/kai-provider.d.ts +0 -2
- package/dist/origin.d.ts +0 -5
- package/dist/provider-runtime.d.ts +0 -27
- package/dist/register-impl-DQyejdfb.js +0 -145
- package/dist/validate.d.ts +0 -4
- package/dist/version.d.ts +0 -4
- package/src/components/component-meta.json +0 -4550
- package/src/elements/card-media.jpg +0 -0
- package/src/elements/resizable.d.ts +0 -27
- package/src/elements/video-poster.jpg +0 -0
package/dist/react/index.d.ts
CHANGED
|
@@ -1,22 +1,23 @@
|
|
|
1
|
-
import { registerAll, WebComponentProps } from './runtime';
|
|
1
|
+
import { registerAll, WebComponentProps } from './runtime.js';
|
|
2
2
|
export { registerAll };
|
|
3
|
-
export { useKaiChat } from './use-kai-chat';
|
|
4
|
-
export type { UseKaiChatOptions, KaiChatController
|
|
5
|
-
export {
|
|
3
|
+
export { useKaiChat } from './use-kai-chat.js';
|
|
4
|
+
export type { UseKaiChatOptions, KaiChatController } from './use-kai-chat.js';
|
|
5
|
+
export type { ChatMessage, ChatMessageAction, CustomAction, AvatarData, FeedbackVote, MessagePart, MessageSource, RawOrigin, ToolPart, ToolKind, CardEnvelope, AttachmentData, } from './use-kai-chat.js';
|
|
6
|
+
export { useVoiceInput } from './use-voice-input.js';
|
|
6
7
|
export interface AgentCardProps extends WebComponentProps {
|
|
7
|
-
/** The agent's name
|
|
8
|
+
/** The agent's name, the primary label. Attribute: `name`. */
|
|
8
9
|
name?: string;
|
|
9
10
|
/** Selected / focused state: highlighted border + surface. Attribute: `active`. */
|
|
10
11
|
active?: boolean;
|
|
11
|
-
/** Raise a prominent "Needs you" pill plus a glowing amber edge
|
|
12
|
+
/** Raise a prominent "Needs you" pill plus a glowing amber edge. This is the attention-routing signal that pulls focus to this agent. Attribute: `needs-attention`. */
|
|
12
13
|
needsAttention?: boolean;
|
|
13
|
-
/** Run status
|
|
14
|
+
/** Run status. A JS PROPERTY (object), not an attribute. Shape: `{ tone, label?, pulse? }`, where `tone` is one of `working` | `idle` | `done` | `error` | `blocked` (maps to the kit's tool hues), `label` is an optional short string beside the dot, and `pulse` animates the dot. Set it with `el.status = { tone: 'working', label: 'Working', pulse: true }`. */
|
|
14
15
|
status?: {
|
|
15
16
|
tone: "working" | "idle" | "done" | "error" | "blocked";
|
|
16
17
|
label?: string;
|
|
17
18
|
pulse?: boolean;
|
|
18
19
|
};
|
|
19
|
-
/** The card was activated
|
|
20
|
+
/** The card was activated by a click, or by Enter / Space while focused. Promote this agent back to focus. */
|
|
20
21
|
onActivate?: (event: CustomEvent) => void;
|
|
21
22
|
/** The trailing "..." kebab was clicked. The consumer opens its own menu; the card only surfaces the affordance (the click does not also activate the card). */
|
|
22
23
|
onMenu?: (event: CustomEvent) => void;
|
|
@@ -25,22 +26,22 @@ export declare const AgentCard: import('react').ForwardRefExoticComponent<AgentC
|
|
|
25
26
|
export interface ArtifactProps extends WebComponentProps {
|
|
26
27
|
/** URL the preview iframe frames. Consumer-controlled. */
|
|
27
28
|
src?: string;
|
|
28
|
-
/** Files for the Code tab tree + each file's preview `url`. Set as a JS property (array). */
|
|
29
|
-
files
|
|
29
|
+
/** Files for the Code tab tree + each file's preview `url`. Omit for a preview-only artifact (the Code tab then has nothing to show; pair it with `no-tabs` to hide the toggle). Set as a JS property (array). */
|
|
30
|
+
files?: {
|
|
30
31
|
path: string;
|
|
31
|
-
url?:
|
|
32
|
-
code?:
|
|
33
|
-
language?:
|
|
34
|
-
type?:
|
|
35
|
-
additions?:
|
|
36
|
-
deletions?:
|
|
37
|
-
status?:
|
|
32
|
+
url?: string;
|
|
33
|
+
code?: string;
|
|
34
|
+
language?: string;
|
|
35
|
+
type?: "html" | "pdf" | "image" | "other";
|
|
36
|
+
additions?: number;
|
|
37
|
+
deletions?: number;
|
|
38
|
+
status?: "added" | "modified" | "deleted" | "renamed" | "untracked";
|
|
38
39
|
}[];
|
|
39
40
|
/** Controlled active tab: `preview` or `code`. When set, the artifact follows it (re-asserted on change). Leave unset for an uncontrolled tab (see `defaultTab`). */
|
|
40
41
|
tab?: "preview" | "code";
|
|
41
42
|
/** Uncontrolled INITIAL tab (used only when `tab` is unset). Default `preview`. Seeds the starting tab; the user can then switch freely without the consumer re-asserting a controlled `tab`. */
|
|
42
43
|
defaultTab?: "preview" | "code";
|
|
43
|
-
/** Selected file path
|
|
44
|
+
/** Selected file path. Syncs the tree highlight, Code source, and preview. */
|
|
44
45
|
activeFile?: string;
|
|
45
46
|
/** iframe `sandbox` override. Secure default `allow-scripts allow-forms` (NOT `allow-same-origin`). */
|
|
46
47
|
sandbox?: string;
|
|
@@ -76,6 +77,10 @@ export interface ArtifactProps extends WebComponentProps {
|
|
|
76
77
|
onMaximizeChange?: (event: CustomEvent<{
|
|
77
78
|
maximized: boolean;
|
|
78
79
|
}>) => void;
|
|
80
|
+
/** The maximize PROTOCOL intent, raised as a raw bubbling + composed CustomEvent (not through `dispatch`) so an enclosing `<kai-resizable>` can catch it and maximize the containing panel. Declared here so it is typed and reaches the generated API. Listen for it to drive maximize from your own chrome, or re-emit it to trigger one. */
|
|
81
|
+
onMaximizeIntent?: (event: CustomEvent<{
|
|
82
|
+
requested: boolean;
|
|
83
|
+
}>) => void;
|
|
79
84
|
/** Fired when the preview navigates. `detail.url` = the new location. */
|
|
80
85
|
onNavigate?: (event: CustomEvent<{
|
|
81
86
|
url: string;
|
|
@@ -87,14 +92,14 @@ export interface ArtifactProps extends WebComponentProps {
|
|
|
87
92
|
}
|
|
88
93
|
export declare const Artifact: import('react').ForwardRefExoticComponent<ArtifactProps & import('react').RefAttributes<HTMLElement>>;
|
|
89
94
|
export interface AttachmentsProps extends WebComponentProps {
|
|
90
|
-
/** The attachments to render. Set as a JS property (array). */
|
|
91
|
-
items
|
|
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). */
|
|
96
|
+
items?: {
|
|
92
97
|
id: string;
|
|
93
98
|
type: "file" | "source-document";
|
|
94
|
-
filename?:
|
|
95
|
-
mediaType?:
|
|
96
|
-
url?:
|
|
97
|
-
title?:
|
|
99
|
+
filename?: string;
|
|
100
|
+
mediaType?: string;
|
|
101
|
+
url?: string;
|
|
102
|
+
title?: string;
|
|
98
103
|
}[];
|
|
99
104
|
/** Layout: `grid` = visual tiles, `inline` = icon + label chips, `list` = rows. */
|
|
100
105
|
variant?: "grid" | "inline" | "list";
|
|
@@ -158,7 +163,7 @@ export interface AvatarProps extends WebComponentProps {
|
|
|
158
163
|
src?: string;
|
|
159
164
|
/** Alt text for the image. Defaults to `fallback`. */
|
|
160
165
|
alt?: string;
|
|
161
|
-
/** Short text shown when there's no image
|
|
166
|
+
/** Short text shown when there's no image, usually initials (e.g. "JD", "AI"). */
|
|
162
167
|
fallback?: string;
|
|
163
168
|
/** Size token: `sm` | `md` (default) | `lg`. */
|
|
164
169
|
size?: "sm" | "md" | "lg";
|
|
@@ -170,7 +175,7 @@ export interface BadgeProps extends WebComponentProps {
|
|
|
170
175
|
}
|
|
171
176
|
export declare const Badge: import('react').ForwardRefExoticComponent<BadgeProps & import('react').RefAttributes<HTMLElement>>;
|
|
172
177
|
export interface ButtonProps extends WebComponentProps {
|
|
173
|
-
/** Visual style. `default` (filled), `subtle` (muted text, hover tint
|
|
178
|
+
/** Visual style. `default` (filled), `subtle` (muted text, hover tint, the toolbar icon look), `ghost` (transparent, hover fill), `outline`, or `destructive`. Defaults to `default`. */
|
|
174
179
|
variant?: "default" | "subtle" | "ghost" | "outline" | "destructive";
|
|
175
180
|
/** Size token. `icon` / `icon-sm` are square (for icon-only buttons); `sm` / `md` / `lg` size text buttons. Defaults to `md`. */
|
|
176
181
|
size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
|
|
@@ -182,7 +187,7 @@ export interface ButtonProps extends WebComponentProps {
|
|
|
182
187
|
label?: string;
|
|
183
188
|
/** Disable the button (non-interactive, dimmed). */
|
|
184
189
|
disabled?: boolean;
|
|
185
|
-
/** Stretch the button to the full width of its container (a block button)
|
|
190
|
+
/** Stretch the button to the full width of its container (a block button), e.g. a card CTA or a stacked action. Attribute: `full`. */
|
|
186
191
|
full?: boolean;
|
|
187
192
|
/** Justify the button's content: `start`, `center` (default), or `end`. Combine with `full` for a full-width, left-aligned button. */
|
|
188
193
|
align?: "start" | "center" | "end";
|
|
@@ -195,7 +200,7 @@ export declare const Button: import('react').ForwardRefExoticComponent<ButtonPro
|
|
|
195
200
|
export interface CardProps extends WebComponentProps {
|
|
196
201
|
/** Surface treatment: `outlined` (default) | `filled` | `plain` | `accent`. Attribute: `appearance`. */
|
|
197
202
|
appearance?: "outlined" | "filled" | "plain" | "accent";
|
|
198
|
-
/** `vertical` (default, media on top) | `horizontal` (media at the start) | `responsive` (horizontal when the card's container is wide enough, else vertical
|
|
203
|
+
/** `vertical` (default, media on top) | `horizontal` (media at the start) | `responsive` (horizontal when the card's container is wide enough, else vertical, via a container query on the card's own width). Attribute: `orientation`. */
|
|
199
204
|
orientation?: "vertical" | "horizontal" | "responsive";
|
|
200
205
|
/** The card width below which a `responsive` card collapses to vertical and the footer actions stack. A CSS length; default `28rem`. Attribute: `collapse`. */
|
|
201
206
|
collapse?: string;
|
|
@@ -244,6 +249,8 @@ export interface CardsProps extends WebComponentProps {
|
|
|
244
249
|
}[];
|
|
245
250
|
/** Optional type→tag overrides/additions (merged over the built-ins). Property: `el.types`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
|
|
246
251
|
types?: Record<string, string>;
|
|
252
|
+
/** JSON Schemas for the card types this app renders, keyed by envelope type. The companion of `types`, 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.schemas = { '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, matching `mergeCardTags`, where your entry is spread over ours. 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. See `CardSchemaMap` in components/card-renderer.tsx. */
|
|
253
|
+
schemas?: Record<string, object>;
|
|
247
254
|
/** Optional CardPolicy handling child events. Property: `el.policy`. */
|
|
248
255
|
policy?: {
|
|
249
256
|
onSubmit?: (cardId: string, data: unknown) => void;
|
|
@@ -259,7 +266,9 @@ export interface CardsProps extends WebComponentProps {
|
|
|
259
266
|
onError?: (cardId: string, message: string) => void;
|
|
260
267
|
maxSendPromptMode?: "compose" | "send";
|
|
261
268
|
};
|
|
262
|
-
/**
|
|
269
|
+
/** 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. */
|
|
270
|
+
validateCards?: boolean;
|
|
271
|
+
/** A child card transitioned to a resolved/deferred state (an action was chosen, a form/tasks submission landed, or it was dismissed). Re-emitted off the host as a non-bubbling convenience event so a consumer can observe resolution centrally without diffing the cards array. `detail` = `{ cardId, resolution }`. (A `reopen` un-resolves a card and has no `CardResolution`, so it does NOT fire this; observe reopen via the underlying bubbling `kai-card` event.) */
|
|
263
272
|
onCardResolved?: (event: CustomEvent<{
|
|
264
273
|
cardId: string;
|
|
265
274
|
resolution: {
|
|
@@ -283,63 +292,27 @@ export interface CardsProps extends WebComponentProps {
|
|
|
283
292
|
}
|
|
284
293
|
export declare const Cards: import('react').ForwardRefExoticComponent<CardsProps & import('react').RefAttributes<HTMLElement>>;
|
|
285
294
|
export interface ChainOfThoughtProps extends WebComponentProps {
|
|
286
|
-
/** The reasoning steps. Set as a JS property. Compound sub-parts collapse to this one data model (Route 1). Each `{ label, content?, id? }`. */
|
|
287
|
-
steps
|
|
295
|
+
/** The reasoning steps. Set as a JS property. Compound sub-parts collapse to this one data model (Route 1). Each `{ label, content?, id? }`. Omit to supply the steps as `<kai-step>` light-DOM children instead; when both are present the property's steps come first. */
|
|
296
|
+
steps?: {
|
|
288
297
|
label: string;
|
|
289
|
-
content?:
|
|
290
|
-
id?:
|
|
298
|
+
content?: string;
|
|
299
|
+
id?: string;
|
|
291
300
|
}[];
|
|
292
|
-
/** Open mode: `'multiple'` (default
|
|
301
|
+
/** Open mode: `'multiple'` (default, any number of steps open at once) or `'single'` (at most one open; opening a step closes the others). */
|
|
293
302
|
type?: "single" | "multiple";
|
|
294
303
|
/** Controlled open step key(s). When set, it WINS over user interaction (the consumer owns the open set). String in `single` mode, string[] in `multiple` mode. Set as a JS property. */
|
|
295
304
|
value?: string | string[];
|
|
296
|
-
/** Uncontrolled INITIAL open step key(s)
|
|
305
|
+
/** Uncontrolled INITIAL open step key(s), seeding which steps render expanded. Ignored once `value` is provided. Set as a JS property. */
|
|
297
306
|
defaultValue?: string | string[];
|
|
298
|
-
/** The open set changed
|
|
307
|
+
/** The open set changed, by user click OR an expand()/collapse()/toggle() call. `value` is a string in `single` mode, a string[] in `multiple` mode. (Maps Radix Accordion's onValueChange.) */
|
|
299
308
|
onValueChange?: (event: CustomEvent<{
|
|
300
309
|
value: string | string[];
|
|
301
310
|
}>) => void;
|
|
302
311
|
}
|
|
303
312
|
export declare const ChainOfThought: import('react').ForwardRefExoticComponent<ChainOfThoughtProps & import('react').RefAttributes<HTMLElement>>;
|
|
304
313
|
export interface ChatProps extends WebComponentProps {
|
|
305
|
-
/**
|
|
306
|
-
|
|
307
|
-
id: string;
|
|
308
|
-
role: "user" | "assistant";
|
|
309
|
-
content: string;
|
|
310
|
-
reasoning?: undefined | {
|
|
311
|
-
text: string;
|
|
312
|
-
label?: undefined | string;
|
|
313
|
-
};
|
|
314
|
-
tools?: undefined | {
|
|
315
|
-
type: string;
|
|
316
|
-
state: "input-streaming" | "input-available" | "output-available" | "output-error";
|
|
317
|
-
input?: undefined | Record<string, unknown>;
|
|
318
|
-
output?: undefined | Record<string, unknown>;
|
|
319
|
-
toolCallId?: undefined | string;
|
|
320
|
-
errorText?: undefined | string;
|
|
321
|
-
}[];
|
|
322
|
-
attachments?: undefined | {
|
|
323
|
-
id: string;
|
|
324
|
-
type: "file" | "source-document";
|
|
325
|
-
filename?: undefined | string;
|
|
326
|
-
mediaType?: undefined | string;
|
|
327
|
-
url?: undefined | string;
|
|
328
|
-
title?: undefined | string;
|
|
329
|
-
}[];
|
|
330
|
-
actions?: undefined | ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
|
|
331
|
-
id: string;
|
|
332
|
-
label: string;
|
|
333
|
-
icon?: undefined | string;
|
|
334
|
-
tooltip?: undefined | string;
|
|
335
|
-
})[];
|
|
336
|
-
avatar?: undefined | {
|
|
337
|
-
src?: undefined | string;
|
|
338
|
-
fallback?: undefined | string;
|
|
339
|
-
alt?: undefined | string;
|
|
340
|
-
};
|
|
341
|
-
feedback?: undefined | "like" | "dislike";
|
|
342
|
-
}[];
|
|
314
|
+
/** Show a Search (Globe) button in the input toolbar; fires a `search` event. */
|
|
315
|
+
search?: boolean;
|
|
343
316
|
/** Value of the input. A **string** is controlled (the host owns the text and updates it on `kai-value-change`). A **ComposerDoc** is a one-time seed that pre-populates pills; the user then edits freely. Leave unset for uncontrolled. */
|
|
344
317
|
value?: string | ({
|
|
345
318
|
type: "text";
|
|
@@ -366,7 +339,7 @@ export interface ChatProps extends WebComponentProps {
|
|
|
366
339
|
/** Keep suggestions visible after the conversation starts. By default suggestions are conversation starters and hide once `messages` is non-empty; set this to keep them always shown. Default false. */
|
|
367
340
|
persistSuggestions?: boolean;
|
|
368
341
|
/** Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`. */
|
|
369
|
-
proseSize?: "
|
|
342
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
370
343
|
/** Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`). */
|
|
371
344
|
codeTheme?: string;
|
|
372
345
|
/** Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true. */
|
|
@@ -393,27 +366,25 @@ export interface ChatProps extends WebComponentProps {
|
|
|
393
366
|
};
|
|
394
367
|
/** Show the scroll-to-bottom button inside the scroll area. Default true. */
|
|
395
368
|
scrollButton?: boolean;
|
|
396
|
-
/** Whether the host has `slot="header-start"` content (left of the title)
|
|
369
|
+
/** Whether the host has `slot="header-start"` content (left of the title). Set by the `<kai-chat>` facade so a custom control forces the header open. */
|
|
397
370
|
headerStart?: boolean;
|
|
398
371
|
/** Whether the host has `slot="header-end"` content (right of the controls). */
|
|
399
372
|
headerEnd?: boolean;
|
|
400
|
-
/** REPLACE
|
|
373
|
+
/** REPLACE: full custom header in place of the built-in title/model/context bar. */
|
|
401
374
|
headerFull?: boolean;
|
|
402
|
-
/** INJECT
|
|
375
|
+
/** INJECT: left sidebar column (e.g. a conversation list / your own nav). */
|
|
403
376
|
sidebar?: boolean;
|
|
404
|
-
/** REPLACE
|
|
377
|
+
/** REPLACE: custom zero-state rendered in the message area while the thread is empty (replaces the empty message list only; the composer and its suggestions still render). */
|
|
405
378
|
empty?: boolean;
|
|
406
|
-
/** REPLACE
|
|
379
|
+
/** REPLACE: full custom composer in place of the built-in prompt input. The projected content wires its own submit (the data-flow boundary). */
|
|
407
380
|
composer?: boolean;
|
|
408
|
-
/** INJECT
|
|
381
|
+
/** INJECT: accessory row just above the composer (e.g. extra actions). */
|
|
409
382
|
composerActions?: boolean;
|
|
410
|
-
/** INJECT
|
|
383
|
+
/** INJECT: footer row below the composer (disclaimers, token meter, …). */
|
|
411
384
|
footer?: boolean;
|
|
412
|
-
/** Show a Search (Globe) button in the input toolbar; fires a `search` event. */
|
|
413
|
-
search?: boolean;
|
|
414
385
|
/** Show a Voice (Mic) button in the input toolbar; fires a `voice` event. */
|
|
415
386
|
voice?: boolean;
|
|
416
|
-
/** Rich entity triggers
|
|
387
|
+
/** Rich entity triggers. Each `{ char, kind, items }` opens a caret-anchored menu that inserts an atomic pill (`/` skills, `@` agents/plugins). Set as a JS property; forwarded to the input. */
|
|
417
388
|
triggers?: {
|
|
418
389
|
char: string;
|
|
419
390
|
kind: string;
|
|
@@ -432,6 +403,122 @@ export interface ChatProps extends WebComponentProps {
|
|
|
432
403
|
kindIcons?: Record<string, string>;
|
|
433
404
|
/** Whether each message's action bar is always visible (`'always'`, default) or only revealed on hover of that message row (`'hover'`). */
|
|
434
405
|
actionsReveal?: "always" | "hover";
|
|
406
|
+
/** The full message thread to render, newest last. Each entry carries its role, ordered `parts`, and optional actions/avatar/feedback. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). Omit for an empty thread. Re-declared here (rather than inherited from `ChatThreadProps`) because the ELEMENT registers a `[]` default and renders the empty state without it, while the SolidJS `<ChatThread>` component still requires it. The facade hands it a validated array either way. Matches `<kai-thread>`. */
|
|
407
|
+
messages?: {
|
|
408
|
+
id: string;
|
|
409
|
+
role: "user" | "assistant";
|
|
410
|
+
parts: ({
|
|
411
|
+
type: "text";
|
|
412
|
+
text: string;
|
|
413
|
+
raw?: {
|
|
414
|
+
source: string;
|
|
415
|
+
payload: unknown;
|
|
416
|
+
};
|
|
417
|
+
} | {
|
|
418
|
+
type: "reasoning";
|
|
419
|
+
text: string;
|
|
420
|
+
label?: string;
|
|
421
|
+
index?: number;
|
|
422
|
+
streamId?: string;
|
|
423
|
+
signature?: string;
|
|
424
|
+
raw?: {
|
|
425
|
+
source: string;
|
|
426
|
+
payload: unknown;
|
|
427
|
+
};
|
|
428
|
+
} | {
|
|
429
|
+
type: "tool";
|
|
430
|
+
tool: {
|
|
431
|
+
type: string;
|
|
432
|
+
kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
|
|
433
|
+
state: "input-streaming" | "input-available" | "output-available" | "output-error";
|
|
434
|
+
input?: Record<string, unknown>;
|
|
435
|
+
rawInput?: string;
|
|
436
|
+
output?: Record<string, unknown>;
|
|
437
|
+
toolCallId?: string;
|
|
438
|
+
errorText?: string;
|
|
439
|
+
raw?: {
|
|
440
|
+
source: string;
|
|
441
|
+
payload: unknown;
|
|
442
|
+
};
|
|
443
|
+
};
|
|
444
|
+
raw?: {
|
|
445
|
+
source: string;
|
|
446
|
+
payload: unknown;
|
|
447
|
+
};
|
|
448
|
+
} | {
|
|
449
|
+
type: "card";
|
|
450
|
+
envelope: {
|
|
451
|
+
type: string;
|
|
452
|
+
id: string;
|
|
453
|
+
data: unknown;
|
|
454
|
+
title?: string;
|
|
455
|
+
resolution?: {
|
|
456
|
+
kind: "action";
|
|
457
|
+
action: string;
|
|
458
|
+
payload?: unknown;
|
|
459
|
+
at?: string;
|
|
460
|
+
} | {
|
|
461
|
+
kind: "submit";
|
|
462
|
+
data: unknown;
|
|
463
|
+
at?: string;
|
|
464
|
+
} | {
|
|
465
|
+
kind: "dismissed";
|
|
466
|
+
at?: string;
|
|
467
|
+
} | {
|
|
468
|
+
kind: "expired";
|
|
469
|
+
reason?: string;
|
|
470
|
+
at?: string;
|
|
471
|
+
};
|
|
472
|
+
};
|
|
473
|
+
raw?: {
|
|
474
|
+
source: string;
|
|
475
|
+
payload: unknown;
|
|
476
|
+
};
|
|
477
|
+
} | {
|
|
478
|
+
type: "source";
|
|
479
|
+
source: {
|
|
480
|
+
id?: string;
|
|
481
|
+
url?: string;
|
|
482
|
+
title?: string;
|
|
483
|
+
snippet?: string;
|
|
484
|
+
index?: number;
|
|
485
|
+
};
|
|
486
|
+
raw?: {
|
|
487
|
+
source: string;
|
|
488
|
+
payload: unknown;
|
|
489
|
+
};
|
|
490
|
+
} | {
|
|
491
|
+
type: "file";
|
|
492
|
+
attachment: {
|
|
493
|
+
id: string;
|
|
494
|
+
type: "file" | "source-document";
|
|
495
|
+
filename?: string;
|
|
496
|
+
mediaType?: string;
|
|
497
|
+
url?: string;
|
|
498
|
+
title?: string;
|
|
499
|
+
};
|
|
500
|
+
raw?: {
|
|
501
|
+
source: string;
|
|
502
|
+
payload: unknown;
|
|
503
|
+
};
|
|
504
|
+
})[];
|
|
505
|
+
actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
|
|
506
|
+
id: string;
|
|
507
|
+
label: string;
|
|
508
|
+
icon?: string;
|
|
509
|
+
tooltip?: string;
|
|
510
|
+
})[];
|
|
511
|
+
avatar?: {
|
|
512
|
+
src?: string;
|
|
513
|
+
fallback?: string;
|
|
514
|
+
alt?: string;
|
|
515
|
+
};
|
|
516
|
+
feedback?: "like" | "dislike";
|
|
517
|
+
}[];
|
|
518
|
+
/** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
|
|
519
|
+
cardTypes?: Record<string, string>;
|
|
520
|
+
/** 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. */
|
|
521
|
+
cardSchemas?: Record<string, object>;
|
|
435
522
|
/** The staged attachments changed (file added or removed). Carries the full current list so a consumer can react in real time. */
|
|
436
523
|
onAttachmentsChange?: (event: CustomEvent<{
|
|
437
524
|
attachments: {
|
|
@@ -485,7 +572,7 @@ export interface CheckpointProps extends WebComponentProps {
|
|
|
485
572
|
/** Tooltip on hover. */
|
|
486
573
|
tooltip?: string;
|
|
487
574
|
/** Visual button style. */
|
|
488
|
-
variant?: "
|
|
575
|
+
variant?: "ghost" | "default" | "outline";
|
|
489
576
|
/** Button size (use an `icon*` size for an icon-only checkpoint). */
|
|
490
577
|
size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
|
|
491
578
|
/** The checkpoint was clicked. */
|
|
@@ -494,14 +581,36 @@ export interface CheckpointProps extends WebComponentProps {
|
|
|
494
581
|
export declare const Checkpoint: import('react').ForwardRefExoticComponent<CheckpointProps & import('react').RefAttributes<HTMLElement>>;
|
|
495
582
|
export interface ChoiceProps extends WebComponentProps {
|
|
496
583
|
/** The choice definition (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { prompt, options:[…], allowOther?, submitLabel? }`. Import `ChoiceCardData` from `@kitn.ai/ui` for the full shape. */
|
|
497
|
-
data?:
|
|
584
|
+
data?: {
|
|
585
|
+
prompt?: string;
|
|
586
|
+
options: {
|
|
587
|
+
id: string;
|
|
588
|
+
label: string;
|
|
589
|
+
description?: string;
|
|
590
|
+
media?: {
|
|
591
|
+
image?: string;
|
|
592
|
+
imageAlt?: string;
|
|
593
|
+
icon?: string;
|
|
594
|
+
};
|
|
595
|
+
meta?: string;
|
|
596
|
+
recommended?: boolean;
|
|
597
|
+
disabled?: boolean;
|
|
598
|
+
payload?: unknown;
|
|
599
|
+
}[];
|
|
600
|
+
allowOther?: boolean | {
|
|
601
|
+
label?: string;
|
|
602
|
+
placeholder?: string;
|
|
603
|
+
};
|
|
604
|
+
submitLabel?: string;
|
|
605
|
+
dismissible?: boolean;
|
|
606
|
+
};
|
|
498
607
|
/** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
|
|
499
608
|
cardId?: string;
|
|
500
609
|
/** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
|
|
501
610
|
heading?: string;
|
|
502
611
|
/** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'action', action:'…' }`. */
|
|
503
612
|
resolution?: Record<string, unknown>;
|
|
504
|
-
/** Controlled selection
|
|
613
|
+
/** Controlled selection: the selected option id. When set, the consumer owns the current pick (RadioGroup `value`). Attribute: `value`. */
|
|
505
614
|
value?: string;
|
|
506
615
|
/** Option id to pre-select on mount (uncontrolled seed). Attribute: `default-value`. */
|
|
507
616
|
defaultValue?: string;
|
|
@@ -524,8 +633,8 @@ export interface CoachmarkProps extends WebComponentProps {
|
|
|
524
633
|
badge?: string;
|
|
525
634
|
/** Floating placement relative to the anchor (default `bottom`). */
|
|
526
635
|
placement?: string;
|
|
527
|
-
/** Color tone: `primary` (default, theme accent), `info` (blue), `success` (green), `warning` (amber), or `error` (red)
|
|
528
|
-
tone?: "
|
|
636
|
+
/** Color tone: `primary` (default, theme accent), `info` (blue), `success` (green), `warning` (amber), or `error` (red), reusing the kit's tool hues. */
|
|
637
|
+
tone?: "primary" | "info" | "success" | "warning" | "error";
|
|
529
638
|
/** Render the arrow that points at the anchor (default `true`). Set `arrow="false"` for a plain bubble with no pointer. */
|
|
530
639
|
arrow?: boolean;
|
|
531
640
|
/** The × dismiss button was pressed. The consumer records that this hint was seen so it won't show again. */
|
|
@@ -546,11 +655,11 @@ export interface CodeBlockProps extends WebComponentProps {
|
|
|
546
655
|
/** Disable syntax highlighting (renders plain text, no Shiki). */
|
|
547
656
|
codeHighlight?: boolean;
|
|
548
657
|
/** Code text sizing. */
|
|
549
|
-
proseSize?: "
|
|
658
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
550
659
|
}
|
|
551
660
|
export declare const CodeBlock: import('react').ForwardRefExoticComponent<CodeBlockProps & import('react').RefAttributes<HTMLElement>>;
|
|
552
661
|
export interface CommandProps extends WebComponentProps {
|
|
553
|
-
/** Flat list of items. Set as a JS property
|
|
662
|
+
/** Flat list of items. Set as a JS property, not an HTML attribute. */
|
|
554
663
|
items?: {
|
|
555
664
|
id: string;
|
|
556
665
|
label: string;
|
|
@@ -563,9 +672,9 @@ export interface CommandProps extends WebComponentProps {
|
|
|
563
672
|
placeholder?: string;
|
|
564
673
|
/** Label shown when no items match the current query. */
|
|
565
674
|
emptyLabel?: string;
|
|
566
|
-
/** Fired when the highlighted/active item changes
|
|
675
|
+
/** Fired when the highlighted/active item changes, via Arrow keys or when filtering re-clamps the active row. `id` is the newly active item's id, or `undefined` when no item is active (e.g. the filtered list is empty). Lets a host preview the active item without committing a selection. */
|
|
567
676
|
onActiveChange?: (event: CustomEvent<{
|
|
568
|
-
id:
|
|
677
|
+
id: string | undefined;
|
|
569
678
|
}>) => void;
|
|
570
679
|
/** Fired on every keystroke in the search input. */
|
|
571
680
|
onQueryChange?: (event: CustomEvent<{
|
|
@@ -584,10 +693,10 @@ export interface CompareProps extends WebComponentProps {
|
|
|
584
693
|
compareId?: string;
|
|
585
694
|
/** Re-hydrate / control the user's pick. Set as a JS PROPERTY: `el.selection = { chosenId, rejectedIds }`. Renders the collapsed winner. */
|
|
586
695
|
selection?: Record<string, unknown>;
|
|
587
|
-
/** Layout: `'auto'` (default
|
|
696
|
+
/** Layout: `'auto'` (default, columns when wide, tabs when narrow, by CONTAINER width) | `'columns'` (side-by-side) | `'tabs'` (pills to switch). Attribute: `layout`. */
|
|
588
697
|
layout?: "auto" | "columns" | "tabs";
|
|
589
698
|
/** Prose/text size for the rendered candidates. Attribute: `prose-size`. */
|
|
590
|
-
proseSize?: "
|
|
699
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
591
700
|
/** Shiki theme for code blocks in the candidates. Attribute: `code-theme`. */
|
|
592
701
|
codeTheme?: string;
|
|
593
702
|
/** Whether code blocks are syntax-highlighted. Attribute: `code-highlight`. */
|
|
@@ -610,7 +719,7 @@ export interface CompareProps extends WebComponentProps {
|
|
|
610
719
|
}
|
|
611
720
|
export declare const Compare: import('react').ForwardRefExoticComponent<CompareProps & import('react').RefAttributes<HTMLElement>>;
|
|
612
721
|
export interface ComposerProps extends WebComponentProps {
|
|
613
|
-
/** Controlled value
|
|
722
|
+
/** Controlled value: a string or a full ComposerDoc (set as JS property). */
|
|
614
723
|
value?: string | ({
|
|
615
724
|
type: "text";
|
|
616
725
|
text: string;
|
|
@@ -632,10 +741,10 @@ export interface ComposerProps extends WebComponentProps {
|
|
|
632
741
|
/** Show a loading/streaming state and block submit. */
|
|
633
742
|
loading?: boolean;
|
|
634
743
|
/** Maximum height in px before the content scrolls. Default 240. */
|
|
635
|
-
maxHeight?:
|
|
744
|
+
maxHeight?: number | string;
|
|
636
745
|
/** Whether pressing Enter (without Shift) submits. Default true. */
|
|
637
746
|
submitOnEnter?: boolean;
|
|
638
|
-
/** Trigger definitions
|
|
747
|
+
/** Trigger definitions. Set as a JS property. */
|
|
639
748
|
triggers?: {
|
|
640
749
|
char: string;
|
|
641
750
|
kind: string;
|
|
@@ -650,7 +759,7 @@ export interface ComposerProps extends WebComponentProps {
|
|
|
650
759
|
data?: Record<string, unknown>;
|
|
651
760
|
}[];
|
|
652
761
|
}[];
|
|
653
|
-
/** Keyword highlight rules
|
|
762
|
+
/** Keyword highlight rules. Set as a JS property. */
|
|
654
763
|
highlights?: (string | {
|
|
655
764
|
pattern: string;
|
|
656
765
|
flags?: string;
|
|
@@ -684,7 +793,7 @@ export interface ComposerProps extends WebComponentProps {
|
|
|
684
793
|
data?: undefined | Record<string, unknown>;
|
|
685
794
|
};
|
|
686
795
|
}>) => void;
|
|
687
|
-
/** The composer gained focus. `focus`/`blur` are NOT composed natively, so they don't escape the shadow root
|
|
796
|
+
/** The composer gained focus. `focus`/`blur` are NOT composed natively, so they don't escape the shadow root; these re-expose them on the host. (For `keydown`/`paste`/`focusin`/`focusout`, listen NATIVELY on `<kai-composer>`: they're composed and already cross the shadow boundary.) */
|
|
688
797
|
onFocus?: (event: CustomEvent<{
|
|
689
798
|
originalEvent: FocusEvent;
|
|
690
799
|
}>) => void;
|
|
@@ -752,12 +861,24 @@ export interface ComposerProps extends WebComponentProps {
|
|
|
752
861
|
export declare const Composer: import('react').ForwardRefExoticComponent<ComposerProps & import('react').RefAttributes<HTMLElement>>;
|
|
753
862
|
export interface ConfirmProps extends WebComponentProps {
|
|
754
863
|
/** The confirm definition (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { body, tone, actions:[…] }`. Import `ConfirmCardData` from `@kitn.ai/ui` for the full shape. */
|
|
755
|
-
data?:
|
|
864
|
+
data?: {
|
|
865
|
+
heading?: string;
|
|
866
|
+
body?: string;
|
|
867
|
+
tone?: "default" | "warning" | "danger";
|
|
868
|
+
actions: {
|
|
869
|
+
id: string;
|
|
870
|
+
label: string;
|
|
871
|
+
style?: "primary" | "default" | "destructive";
|
|
872
|
+
payload?: unknown;
|
|
873
|
+
default?: boolean;
|
|
874
|
+
}[];
|
|
875
|
+
dismissible?: boolean;
|
|
876
|
+
};
|
|
756
877
|
/** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
|
|
757
878
|
cardId?: string;
|
|
758
879
|
/** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
|
|
759
880
|
heading?: string;
|
|
760
|
-
/** Focus the default action on mount (off by default
|
|
881
|
+
/** Focus the default action on mount (off by default, so nothing steals focus). Attribute: `autofocus`. */
|
|
761
882
|
autofocus?: boolean;
|
|
762
883
|
/** Set when the user resolved this card; renders the read-only view. Property: `el.resolution = { kind:'action', action:'…' }`. */
|
|
763
884
|
resolution?: Record<string, unknown>;
|
|
@@ -785,28 +906,28 @@ export interface ContextProps extends WebComponentProps {
|
|
|
785
906
|
}
|
|
786
907
|
export declare const Context: import('react').ForwardRefExoticComponent<ContextProps & import('react').RefAttributes<HTMLElement>>;
|
|
787
908
|
export interface ConversationsProps extends WebComponentProps {
|
|
788
|
-
/**
|
|
789
|
-
groups
|
|
909
|
+
/** The list's section headers (`{ id, name, sortOrder, createdAt }`), rendered in array order. A group carries no conversations of its own; it is matched against `conversations` by id, so the two props are complementary rather than alternatives. Omit for an ungrouped list. Set as a JS property. */
|
|
910
|
+
groups?: {
|
|
790
911
|
id: string;
|
|
791
|
-
userId?:
|
|
792
|
-
teamId?:
|
|
912
|
+
userId?: string;
|
|
913
|
+
teamId?: string;
|
|
793
914
|
name: string;
|
|
794
915
|
sortOrder: number;
|
|
795
916
|
createdAt: string;
|
|
796
917
|
}[];
|
|
797
|
-
/**
|
|
798
|
-
conversations
|
|
918
|
+
/** Every conversation the list renders, flat. Each one is filed under the group whose `id` equals its `groupId`; one with no `groupId`, or with a `groupId` matching no entry in `groups`, falls into a trailing "Ungrouped" section, so nothing you pass in is ever dropped. There is no recency bucketing. Set as a JS property. Omit to supply them as `<kai-conversation>` light-DOM children instead, or for the empty state. */
|
|
919
|
+
conversations?: {
|
|
799
920
|
id: string;
|
|
800
921
|
title: string;
|
|
801
|
-
groupId?:
|
|
922
|
+
groupId?: string;
|
|
802
923
|
scope: {
|
|
803
924
|
type: "document" | "collection";
|
|
804
|
-
documentId?:
|
|
805
|
-
filters?:
|
|
806
|
-
tags?:
|
|
807
|
-
authors?:
|
|
808
|
-
contentType?:
|
|
809
|
-
dateRange?:
|
|
925
|
+
documentId?: string;
|
|
926
|
+
filters?: {
|
|
927
|
+
tags?: string[];
|
|
928
|
+
authors?: string[];
|
|
929
|
+
contentType?: "transcript" | "markdown";
|
|
930
|
+
dateRange?: {
|
|
810
931
|
from: string;
|
|
811
932
|
to: string;
|
|
812
933
|
};
|
|
@@ -815,7 +936,7 @@ export interface ConversationsProps extends WebComponentProps {
|
|
|
815
936
|
messageCount: number;
|
|
816
937
|
lastMessageAt: string;
|
|
817
938
|
updatedAt: string;
|
|
818
|
-
trailing?:
|
|
939
|
+
trailing?: string;
|
|
819
940
|
}[];
|
|
820
941
|
/** The id of the currently-open conversation, highlighted in the list. */
|
|
821
942
|
activeId?: string;
|
|
@@ -853,7 +974,7 @@ export interface DialogProps extends WebComponentProps {
|
|
|
853
974
|
}
|
|
854
975
|
export declare const Dialog: import('react').ForwardRefExoticComponent<DialogProps & import('react').RefAttributes<HTMLElement>>;
|
|
855
976
|
export interface EditableLabelProps extends WebComponentProps {
|
|
856
|
-
/** The label text
|
|
977
|
+
/** The label text. Settable and reflected to the `value` attribute. Read `el.value` for live state. */
|
|
857
978
|
value?: string;
|
|
858
979
|
/** Controlled edit state. `el.editing = true` opens the field; reflected to the `editing` attribute. */
|
|
859
980
|
editing?: boolean;
|
|
@@ -892,7 +1013,7 @@ export interface EmptyProps extends WebComponentProps {
|
|
|
892
1013
|
}
|
|
893
1014
|
export declare const Empty: import('react').ForwardRefExoticComponent<EmptyProps & import('react').RefAttributes<HTMLElement>>;
|
|
894
1015
|
export interface FeedbackBarProps extends WebComponentProps {
|
|
895
|
-
/** The banner label (e.g. "Was this helpful?"). Attribute: `bar-title` (`title` is avoided
|
|
1016
|
+
/** The banner label (e.g. "Was this helpful?"). Attribute: `bar-title` (`title` is avoided because it is a global HTML attribute). */
|
|
896
1017
|
barTitle?: string;
|
|
897
1018
|
/** When set, a not-helpful vote opens an optional detail form before the thank-you confirmation. Attribute: `collect-detail`. */
|
|
898
1019
|
collectDetail?: boolean;
|
|
@@ -932,7 +1053,7 @@ export interface FileTreeProps extends WebComponentProps {
|
|
|
932
1053
|
deletions?: undefined | number;
|
|
933
1054
|
status?: undefined | "added" | "modified" | "deleted" | "renamed" | "untracked";
|
|
934
1055
|
}[];
|
|
935
|
-
/** Selected file path
|
|
1056
|
+
/** Selected file path, highlighted in the tree. */
|
|
936
1057
|
activeFile?: string;
|
|
937
1058
|
/** Folder paths expanded initially. Omit to start with all folders open. */
|
|
938
1059
|
defaultExpanded?: string[];
|
|
@@ -949,7 +1070,7 @@ export interface FileUploadProps extends WebComponentProps {
|
|
|
949
1070
|
multiple?: boolean;
|
|
950
1071
|
/** `accept` attribute for the file picker (e.g. `image/*`). */
|
|
951
1072
|
accept?: string;
|
|
952
|
-
/** Disable the dropzone
|
|
1073
|
+
/** Disable the dropzone: no clicking, no drag-and-drop. */
|
|
953
1074
|
disabled?: boolean;
|
|
954
1075
|
/** Default dropzone label (overridable via the default slot). */
|
|
955
1076
|
label?: string;
|
|
@@ -960,8 +1081,46 @@ export interface FileUploadProps extends WebComponentProps {
|
|
|
960
1081
|
}
|
|
961
1082
|
export declare const FileUpload: import('react').ForwardRefExoticComponent<FileUploadProps & import('react').RefAttributes<HTMLElement>>;
|
|
962
1083
|
export interface FormProps extends WebComponentProps {
|
|
963
|
-
/** The form definition
|
|
964
|
-
data?:
|
|
1084
|
+
/** The form definition: a JSON Schema (`type:'object'`) + `x-kai-*` UI hints (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { type:'object', properties:{…} }`. Import the `FormDefinition` type from `@kitn.ai/ui` for the full shape. It IS self-referential (`FormField.properties` is another `FormField` map), and the generated `element-types.d.ts` inlines every named type, so the shipped declaration bottoms out in a `Record<string, unknown>` placeholder one level down rather than carrying the recursion. That is why `FormDefinition` is a `type` alias: an interface gets no implicit index signature, so it would not be assignable to that placeholder. */
|
|
1085
|
+
data?: {
|
|
1086
|
+
type: "object";
|
|
1087
|
+
title?: string;
|
|
1088
|
+
description?: string;
|
|
1089
|
+
required?: string[];
|
|
1090
|
+
properties: Record<string, {
|
|
1091
|
+
type: "string" | "number" | "integer" | "boolean" | "array" | "object";
|
|
1092
|
+
title?: string;
|
|
1093
|
+
description?: string;
|
|
1094
|
+
default?: unknown;
|
|
1095
|
+
enum?: unknown[];
|
|
1096
|
+
format?: "email" | "uri" | "url" | "date" | "date-time" | "time";
|
|
1097
|
+
minimum?: number;
|
|
1098
|
+
maximum?: number;
|
|
1099
|
+
minLength?: number;
|
|
1100
|
+
maxLength?: number;
|
|
1101
|
+
pattern?: string;
|
|
1102
|
+
minItems?: number;
|
|
1103
|
+
maxItems?: number;
|
|
1104
|
+
items?: Record<string, unknown> | {
|
|
1105
|
+
enum: unknown[];
|
|
1106
|
+
};
|
|
1107
|
+
properties?: Record<string, Record<string, unknown>>;
|
|
1108
|
+
required?: string[];
|
|
1109
|
+
readOnly?: boolean;
|
|
1110
|
+
"x-kai-widget"?: "textarea" | "slider" | "rating" | "radio" | "select" | "checkbox" | "password" | "switch";
|
|
1111
|
+
"x-kai-placeholder"?: string;
|
|
1112
|
+
"x-kai-step"?: number;
|
|
1113
|
+
}>;
|
|
1114
|
+
"x-kai-order"?: string[];
|
|
1115
|
+
"x-kai-inlineMax"?: number;
|
|
1116
|
+
"x-kai-submitLabel"?: string;
|
|
1117
|
+
"x-kai-dismissible"?: boolean;
|
|
1118
|
+
"x-kai-actions"?: {
|
|
1119
|
+
id: string;
|
|
1120
|
+
label: string;
|
|
1121
|
+
variant?: "default" | "ghost" | "outline";
|
|
1122
|
+
}[];
|
|
1123
|
+
};
|
|
965
1124
|
/** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
|
|
966
1125
|
cardId?: string;
|
|
967
1126
|
/** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
|
|
@@ -974,7 +1133,7 @@ export interface FormProps extends WebComponentProps {
|
|
|
974
1133
|
defaultValues?: Record<string, unknown>;
|
|
975
1134
|
/** Disable all fields + submit. Attribute: `disabled`. */
|
|
976
1135
|
disabled?: boolean;
|
|
977
|
-
/** The form's values changed on input
|
|
1136
|
+
/** The form's values changed on input. Carries the current coerced values + validity. */
|
|
978
1137
|
onValuesChange?: (event: CustomEvent<{
|
|
979
1138
|
values: Record<string, unknown>;
|
|
980
1139
|
valid: boolean;
|
|
@@ -1021,7 +1180,7 @@ export declare const Image: import('react').ForwardRefExoticComponent<ImageProps
|
|
|
1021
1180
|
export interface InputProps extends WebComponentProps {
|
|
1022
1181
|
/** Native input type: `text` (default) · `email` · `url` · `search` · `tel` · `password` · `number`. Single-line only. */
|
|
1023
1182
|
type?: string;
|
|
1024
|
-
/** Controlled value
|
|
1183
|
+
/** Controlled value. Settable and reflected to the `value` attribute. `el.value = 'hi'` drives it (no event); typing updates it and fires `kai-input`. Read `el.value` for live state. */
|
|
1025
1184
|
value?: string;
|
|
1026
1185
|
/** Placeholder shown when empty. */
|
|
1027
1186
|
placeholder?: string;
|
|
@@ -1058,10 +1217,10 @@ export interface InputProps extends WebComponentProps {
|
|
|
1058
1217
|
}
|
|
1059
1218
|
export declare const Input: import('react').ForwardRefExoticComponent<InputProps & import('react').RefAttributes<HTMLElement>>;
|
|
1060
1219
|
export interface KbdProps extends WebComponentProps {
|
|
1061
|
-
/** Shortcut spec
|
|
1220
|
+
/** Shortcut spec: tokens joined by `+` (e.g. `Mod+Shift+K`). Omit it to show default-slot content instead. Display only; the element does not bind keys. */
|
|
1062
1221
|
keys?: string;
|
|
1063
1222
|
/** `mac` uses ⌘/⌥, `other` uses Ctrl. `auto` (default) sniffs the OS. */
|
|
1064
|
-
platform?: "
|
|
1223
|
+
platform?: "auto" | "mac" | "other";
|
|
1065
1224
|
/** Cap size: `sm` or `md`. Defaults to `md`. */
|
|
1066
1225
|
size?: "sm" | "md";
|
|
1067
1226
|
}
|
|
@@ -1095,7 +1254,7 @@ export interface MarkdownProps extends WebComponentProps {
|
|
|
1095
1254
|
/** The markdown source to render. */
|
|
1096
1255
|
content: string;
|
|
1097
1256
|
/** Text/markdown sizing. */
|
|
1098
|
-
proseSize?: "
|
|
1257
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
1099
1258
|
/** Shiki theme for fenced code blocks. */
|
|
1100
1259
|
codeTheme?: string;
|
|
1101
1260
|
/** Disable syntax highlighting (no Shiki loads). */
|
|
@@ -1103,7 +1262,7 @@ export interface MarkdownProps extends WebComponentProps {
|
|
|
1103
1262
|
}
|
|
1104
1263
|
export declare const Markdown: import('react').ForwardRefExoticComponent<MarkdownProps & import('react').RefAttributes<HTMLElement>>;
|
|
1105
1264
|
export interface MenuProps extends WebComponentProps {
|
|
1106
|
-
/** Tree of menu items. Set as a JS property
|
|
1265
|
+
/** Tree of menu items. Set as a JS property, not an HTML attribute. */
|
|
1107
1266
|
items?: {
|
|
1108
1267
|
id?: string;
|
|
1109
1268
|
label?: string;
|
|
@@ -1118,7 +1277,7 @@ export interface MenuProps extends WebComponentProps {
|
|
|
1118
1277
|
}[];
|
|
1119
1278
|
/** Optional placement hint (unused by the underlying Dropdown which always positions bottom-start, kept for future extension). */
|
|
1120
1279
|
placement?: string;
|
|
1121
|
-
/** Built-in trigger: leading icon (a named icon like `"plus"`, an image URL/data-URI, or text). Use this instead of slotting `slot="trigger"` for the common case
|
|
1280
|
+
/** Built-in trigger: leading icon (a named icon like `"plus"`, an image URL/data-URI, or text). Use this instead of slotting `slot="trigger"` for the common case; a slotted trigger overrides it. */
|
|
1122
1281
|
triggerIcon?: string;
|
|
1123
1282
|
/** Built-in trigger: a text label (e.g. `"High"`). */
|
|
1124
1283
|
triggerLabel?: string;
|
|
@@ -1130,13 +1289,13 @@ export interface MenuProps extends WebComponentProps {
|
|
|
1130
1289
|
open?: boolean;
|
|
1131
1290
|
/** Initial open state on mount (uncontrolled seed). */
|
|
1132
1291
|
defaultOpen?: boolean;
|
|
1133
|
-
/** Disable the trigger
|
|
1292
|
+
/** Disable the trigger: click/keyboard and `show()` no longer open the menu. */
|
|
1134
1293
|
disabled?: boolean;
|
|
1135
1294
|
/** The menu opened or closed (by click, keyboard, Escape, outside-click, or a method). */
|
|
1136
1295
|
onOpenChange?: (event: CustomEvent<{
|
|
1137
1296
|
open: boolean;
|
|
1138
1297
|
}>) => void;
|
|
1139
|
-
/** Fired when the user selects a leaf item. - Plain items: `{ id }`. - Checkbox items: `{ id, checked }` where `checked` is the NEW state. - Radio items: `{ id, radioGroup }
|
|
1298
|
+
/** Fired when the user selects a leaf item. - Plain items: `{ id }`. - Checkbox items: `{ id, checked }` where `checked` is the NEW state. - Radio items: `{ id, radioGroup }`, where the consumer marks `id` as the selected one in `radioGroup` and clears the others. */
|
|
1140
1299
|
onSelect?: (event: CustomEvent<{
|
|
1141
1300
|
id: string;
|
|
1142
1301
|
checked?: undefined | boolean;
|
|
@@ -1149,27 +1308,101 @@ export interface MessageProps extends WebComponentProps {
|
|
|
1149
1308
|
message?: {
|
|
1150
1309
|
id: string;
|
|
1151
1310
|
role: "user" | "assistant";
|
|
1152
|
-
|
|
1153
|
-
|
|
1311
|
+
parts: ({
|
|
1312
|
+
type: "text";
|
|
1313
|
+
text: string;
|
|
1314
|
+
raw?: {
|
|
1315
|
+
source: string;
|
|
1316
|
+
payload: unknown;
|
|
1317
|
+
};
|
|
1318
|
+
} | {
|
|
1319
|
+
type: "reasoning";
|
|
1154
1320
|
text: string;
|
|
1155
1321
|
label?: string;
|
|
1156
|
-
|
|
1157
|
-
|
|
1158
|
-
|
|
1159
|
-
|
|
1160
|
-
|
|
1161
|
-
|
|
1162
|
-
|
|
1163
|
-
|
|
1164
|
-
|
|
1165
|
-
|
|
1166
|
-
|
|
1167
|
-
|
|
1168
|
-
|
|
1169
|
-
|
|
1170
|
-
|
|
1171
|
-
|
|
1172
|
-
|
|
1322
|
+
index?: number;
|
|
1323
|
+
streamId?: string;
|
|
1324
|
+
signature?: string;
|
|
1325
|
+
raw?: {
|
|
1326
|
+
source: string;
|
|
1327
|
+
payload: unknown;
|
|
1328
|
+
};
|
|
1329
|
+
} | {
|
|
1330
|
+
type: "tool";
|
|
1331
|
+
tool: {
|
|
1332
|
+
type: string;
|
|
1333
|
+
kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
|
|
1334
|
+
state: "input-streaming" | "input-available" | "output-available" | "output-error";
|
|
1335
|
+
input?: Record<string, unknown>;
|
|
1336
|
+
rawInput?: string;
|
|
1337
|
+
output?: Record<string, unknown>;
|
|
1338
|
+
toolCallId?: string;
|
|
1339
|
+
errorText?: string;
|
|
1340
|
+
raw?: {
|
|
1341
|
+
source: string;
|
|
1342
|
+
payload: unknown;
|
|
1343
|
+
};
|
|
1344
|
+
};
|
|
1345
|
+
raw?: {
|
|
1346
|
+
source: string;
|
|
1347
|
+
payload: unknown;
|
|
1348
|
+
};
|
|
1349
|
+
} | {
|
|
1350
|
+
type: "card";
|
|
1351
|
+
envelope: {
|
|
1352
|
+
type: string;
|
|
1353
|
+
id: string;
|
|
1354
|
+
data: unknown;
|
|
1355
|
+
title?: string;
|
|
1356
|
+
resolution?: {
|
|
1357
|
+
kind: "action";
|
|
1358
|
+
action: string;
|
|
1359
|
+
payload?: unknown;
|
|
1360
|
+
at?: string;
|
|
1361
|
+
} | {
|
|
1362
|
+
kind: "submit";
|
|
1363
|
+
data: unknown;
|
|
1364
|
+
at?: string;
|
|
1365
|
+
} | {
|
|
1366
|
+
kind: "dismissed";
|
|
1367
|
+
at?: string;
|
|
1368
|
+
} | {
|
|
1369
|
+
kind: "expired";
|
|
1370
|
+
reason?: string;
|
|
1371
|
+
at?: string;
|
|
1372
|
+
};
|
|
1373
|
+
};
|
|
1374
|
+
raw?: {
|
|
1375
|
+
source: string;
|
|
1376
|
+
payload: unknown;
|
|
1377
|
+
};
|
|
1378
|
+
} | {
|
|
1379
|
+
type: "source";
|
|
1380
|
+
source: {
|
|
1381
|
+
id?: string;
|
|
1382
|
+
url?: string;
|
|
1383
|
+
title?: string;
|
|
1384
|
+
snippet?: string;
|
|
1385
|
+
index?: number;
|
|
1386
|
+
};
|
|
1387
|
+
raw?: {
|
|
1388
|
+
source: string;
|
|
1389
|
+
payload: unknown;
|
|
1390
|
+
};
|
|
1391
|
+
} | {
|
|
1392
|
+
type: "file";
|
|
1393
|
+
attachment: {
|
|
1394
|
+
id: string;
|
|
1395
|
+
type: "file" | "source-document";
|
|
1396
|
+
filename?: string;
|
|
1397
|
+
mediaType?: string;
|
|
1398
|
+
url?: string;
|
|
1399
|
+
title?: string;
|
|
1400
|
+
};
|
|
1401
|
+
raw?: {
|
|
1402
|
+
source: string;
|
|
1403
|
+
payload: unknown;
|
|
1404
|
+
};
|
|
1405
|
+
})[];
|
|
1173
1406
|
actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
|
|
1174
1407
|
id: string;
|
|
1175
1408
|
label: string;
|
|
@@ -1183,14 +1416,12 @@ export interface MessageProps extends WebComponentProps {
|
|
|
1183
1416
|
};
|
|
1184
1417
|
feedback?: "like" | "dislike";
|
|
1185
1418
|
};
|
|
1186
|
-
/** Convenience for simple cases when not passing a `message` object. */
|
|
1419
|
+
/** Who is speaking: `'user'` or `'assistant'`. Convenience for simple cases when not passing a `message` object. This is the SEMANTIC role of the message, not an ARIA role. The name collides with the global ARIA `role` attribute, which is why the facade lifts it off the host (see `liftRoleOffHost`). Neither speaker is a valid ARIA role, so a `role="user"` left on `<kai-message>` is a CRITICAL axe `aria-roles` violation. The accessible role lives on the row inside the shadow root instead: `role="article"` plus an `aria-label` naming the speaker, matching the SolidJS `<Message>` component. */
|
|
1187
1420
|
role?: "user" | "assistant";
|
|
1188
|
-
/** Convenience content (used when `message` is not set). */
|
|
1189
|
-
content?: string;
|
|
1190
1421
|
/** Force markdown on/off. Defaults to on for assistant, off for user. */
|
|
1191
1422
|
markdown?: boolean;
|
|
1192
1423
|
/** Text/markdown sizing for the message body. */
|
|
1193
|
-
proseSize?: "
|
|
1424
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
1194
1425
|
/** Shiki theme name used for fenced code blocks in the content. */
|
|
1195
1426
|
codeTheme?: string;
|
|
1196
1427
|
/** Disable syntax highlighting for code blocks (no Shiki loads). */
|
|
@@ -1203,6 +1434,10 @@ export interface MessageProps extends WebComponentProps {
|
|
|
1203
1434
|
avatarFallback?: string;
|
|
1204
1435
|
/** Avatar rail mode. `'none'` omits the avatar rail entirely so the body spans the full row (predictable layout when you never show avatars). Any other value keeps the default behaviour: the built-in avatar when one resolves, or your `slot="avatar"` content when projected (which REPLACES the built-in). */
|
|
1205
1436
|
avatar?: string;
|
|
1437
|
+
/** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
|
|
1438
|
+
cardTypes?: Record<string, string>;
|
|
1439
|
+
/** 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. */
|
|
1440
|
+
cardSchemas?: Record<string, object>;
|
|
1206
1441
|
/** An action button 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. */
|
|
1207
1442
|
onMessageAction?: (event: CustomEvent<{
|
|
1208
1443
|
messageId: string;
|
|
@@ -1212,13 +1447,13 @@ export interface MessageProps extends WebComponentProps {
|
|
|
1212
1447
|
}
|
|
1213
1448
|
export declare const Message: import('react').ForwardRefExoticComponent<MessageProps & import('react').RefAttributes<HTMLElement>>;
|
|
1214
1449
|
export interface ModelSwitcherProps extends WebComponentProps {
|
|
1215
|
-
/** The selectable models. Set as a JS property (array). */
|
|
1216
|
-
models
|
|
1450
|
+
/** The selectable models. Set as a JS property (array). Omit to supply them as `<kai-model>` light-DOM children instead; when both are present the property's models come first. */
|
|
1451
|
+
models?: {
|
|
1217
1452
|
id: string;
|
|
1218
1453
|
name: string;
|
|
1219
|
-
provider?:
|
|
1220
|
-
description?:
|
|
1221
|
-
group?:
|
|
1454
|
+
provider?: string;
|
|
1455
|
+
description?: string;
|
|
1456
|
+
group?: string;
|
|
1222
1457
|
}[];
|
|
1223
1458
|
/** The currently-selected model id. Defaults to the first model. */
|
|
1224
1459
|
currentModel?: string;
|
|
@@ -1226,7 +1461,7 @@ export interface ModelSwitcherProps extends WebComponentProps {
|
|
|
1226
1461
|
open?: boolean;
|
|
1227
1462
|
/** Initial open state on mount (uncontrolled seed). */
|
|
1228
1463
|
defaultOpen?: boolean;
|
|
1229
|
-
/** Disable the trigger
|
|
1464
|
+
/** Disable the trigger: click/keyboard and `show()` no longer open the dropdown. */
|
|
1230
1465
|
disabled?: boolean;
|
|
1231
1466
|
/** A model was selected. */
|
|
1232
1467
|
onModelChange?: (event: CustomEvent<{
|
|
@@ -1249,7 +1484,7 @@ export interface NavProps extends WebComponentProps {
|
|
|
1249
1484
|
disabled?: boolean;
|
|
1250
1485
|
children?: Record<string, unknown>[];
|
|
1251
1486
|
status?: {
|
|
1252
|
-
tone: "
|
|
1487
|
+
tone: "primary" | "info" | "success" | "warning" | "error" | "neutral";
|
|
1253
1488
|
label?: string;
|
|
1254
1489
|
pulse?: boolean;
|
|
1255
1490
|
};
|
|
@@ -1286,7 +1521,7 @@ export interface NavProps extends WebComponentProps {
|
|
|
1286
1521
|
export declare const Nav: import('react').ForwardRefExoticComponent<NavProps & import('react').RefAttributes<HTMLElement>>;
|
|
1287
1522
|
export interface NoticeProps extends WebComponentProps {
|
|
1288
1523
|
/** `neutral` (default) · `info` · `warning` · `error` · `success`. Drives the leading icon's color and the a11y role (`alert` for errors, else `status`). */
|
|
1289
|
-
severity?: "
|
|
1524
|
+
severity?: "neutral" | "info" | "warning" | "error" | "success";
|
|
1290
1525
|
/** Leading icon: omit for the severity default, `"none"` to hide it, or a named icon to override. */
|
|
1291
1526
|
icon?: string;
|
|
1292
1527
|
/** Show a dismiss (×) that hides the notice and emits `kai-dismiss`. */
|
|
@@ -1318,7 +1553,7 @@ export interface PaneProps extends WebComponentProps {
|
|
|
1318
1553
|
onClose?: (event: CustomEvent) => void;
|
|
1319
1554
|
/** The dock control was clicked (only present when `show-dock`). */
|
|
1320
1555
|
onDock?: (event: CustomEvent) => void;
|
|
1321
|
-
/** The maximize/restore control was clicked. `detail.maximized` is the intended NEXT state
|
|
1556
|
+
/** The maximize/restore control was clicked. `detail.maximized` is the intended NEXT state. Drive the `maximized` prop yourself from it. */
|
|
1322
1557
|
onMaximize?: (event: CustomEvent<{
|
|
1323
1558
|
maximized: boolean;
|
|
1324
1559
|
}>) => void;
|
|
@@ -1359,7 +1594,7 @@ export interface PaneGroupProps extends WebComponentProps {
|
|
|
1359
1594
|
export declare const PaneGroup: import('react').ForwardRefExoticComponent<PaneGroupProps & import('react').RefAttributes<HTMLElement>>;
|
|
1360
1595
|
export interface PopoverProps extends WebComponentProps {
|
|
1361
1596
|
/** Floating placement relative to the trigger (floating-ui placement). */
|
|
1362
|
-
placement?: "top" | "right" | "bottom" | "left" | "
|
|
1597
|
+
placement?: "top" | "right" | "bottom" | "left" | "bottom-end" | "bottom-start" | "left-end" | "left-start" | "right-end" | "right-start" | "top-end" | "top-start";
|
|
1363
1598
|
/** Gap in px between the trigger and the panel. */
|
|
1364
1599
|
gutter?: number;
|
|
1365
1600
|
/** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute, the element still self-manages on click). Set `el.open = true`, or `<kai-popover open>`; listen for `kai-open-change`. */
|
|
@@ -1386,10 +1621,10 @@ export interface ProgressBarProps extends WebComponentProps {
|
|
|
1386
1621
|
}
|
|
1387
1622
|
export declare const ProgressBar: import('react').ForwardRefExoticComponent<ProgressBarProps & import('react').RefAttributes<HTMLElement>>;
|
|
1388
1623
|
export interface PromptDockProps extends WebComponentProps {
|
|
1389
|
-
/** How the tray frames the input
|
|
1390
|
-
frame?: "
|
|
1391
|
-
/** How the tray surface looks
|
|
1392
|
-
appearance?: "
|
|
1624
|
+
/** How the tray frames the input, the SPATIAL inset axis: `inset` (default, the classic recessed frame on every side) | `edge` (top/bottom inset only; the input sits flush left/right so the lips span the full width) | `none` (no inset; the lips attach directly as a plain stack). Attribute: `frame`. */
|
|
1625
|
+
frame?: "inset" | "edge" | "none";
|
|
1626
|
+
/** How the tray surface looks, the VISUAL axis orthogonal to `frame`: `soft` (default, sunken surface + border + radius) | `outlined` (transparent + border + radius) | `filled` (sunken, no border, + radius) | `plain` (bare). Attribute: `appearance`. */
|
|
1627
|
+
appearance?: "soft" | "outlined" | "filled" | "plain";
|
|
1393
1628
|
}
|
|
1394
1629
|
export declare const PromptDock: import('react').ForwardRefExoticComponent<PromptDockProps & import('react').RefAttributes<HTMLElement>>;
|
|
1395
1630
|
export interface PromptInputProps extends WebComponentProps {
|
|
@@ -1424,7 +1659,7 @@ export interface PromptInputProps extends WebComponentProps {
|
|
|
1424
1659
|
voice?: boolean;
|
|
1425
1660
|
/** When set and `loading` is true, the send button is replaced by a Stop button (square icon, "Stop" aria-label). Clicking it fires `kai-stop`. */
|
|
1426
1661
|
stoppable?: boolean;
|
|
1427
|
-
/** Send-button visibility. `'always'` (default) always shows it; `'auto'` shows it only when there's text/attachments (an empty composer hides it
|
|
1662
|
+
/** Send-button visibility. `'always'` (default) always shows it; `'auto'` shows it only when there's text/attachments (an empty composer hides it, though Enter still submits). To hide it entirely (Enter-only), it's pure CSS: `::part(send){display:none}`, no prop needed. Restyle via `::part(send)`. The Stop button (`stoppable` + `loading`) is unaffected. */
|
|
1428
1663
|
submit?: "always" | "auto";
|
|
1429
1664
|
/** 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`. */
|
|
1430
1665
|
attach?: boolean;
|
|
@@ -1437,7 +1672,7 @@ export interface PromptInputProps extends WebComponentProps {
|
|
|
1437
1672
|
url?: string;
|
|
1438
1673
|
title?: string;
|
|
1439
1674
|
}[];
|
|
1440
|
-
/** Rich entity triggers
|
|
1675
|
+
/** Rich entity triggers. Each `{ char, kind, items }` opens a caret-anchored menu that inserts an atomic pill. Convention: `/` → skills, `@` → agents (plugins are the grouping/provenance of those items). Set as a JS property. */
|
|
1441
1676
|
triggers?: {
|
|
1442
1677
|
char: string;
|
|
1443
1678
|
kind: string;
|
|
@@ -1454,7 +1689,7 @@ export interface PromptInputProps extends WebComponentProps {
|
|
|
1454
1689
|
}[];
|
|
1455
1690
|
/** Default icon per entity kind (kind → image URL/data-URI) for pills/menu items without their own `icon`. Overrides the built-in agent/plugin glyphs. JS property. */
|
|
1456
1691
|
kindIcons?: Record<string, string>;
|
|
1457
|
-
/** The staged attachments changed
|
|
1692
|
+
/** The staged attachments changed: a file was added (via the paperclip) or removed (per-chip ×). Carries the full current list so a consumer can react in real time (validate, show upload progress, toggle the send button). */
|
|
1458
1693
|
onAttachmentsChange?: (event: CustomEvent<{
|
|
1459
1694
|
attachments: {
|
|
1460
1695
|
id: string;
|
|
@@ -1554,7 +1789,7 @@ export interface ReasoningProps extends WebComponentProps {
|
|
|
1554
1789
|
streaming?: boolean;
|
|
1555
1790
|
/** Render `text` as markdown. */
|
|
1556
1791
|
markdown?: boolean;
|
|
1557
|
-
/** Gate the disclosure trigger
|
|
1792
|
+
/** Gate the disclosure trigger: programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
|
|
1558
1793
|
disabled?: boolean;
|
|
1559
1794
|
/** The reasoning block expanded or collapsed (via the trigger, streaming auto-open, or a method). */
|
|
1560
1795
|
onOpenChange?: (event: CustomEvent<{
|
|
@@ -1575,11 +1810,11 @@ export interface RemoteProps extends WebComponentProps {
|
|
|
1575
1810
|
export declare const Remote: import('react').ForwardRefExoticComponent<RemoteProps & import('react').RefAttributes<HTMLElement>>;
|
|
1576
1811
|
export interface ResizableProps extends WebComponentProps {
|
|
1577
1812
|
/** Layout axis: `horizontal` (row, default) or `vertical` (column). */
|
|
1578
|
-
orientation?: "
|
|
1813
|
+
orientation?: "horizontal" | "vertical";
|
|
1579
1814
|
/** Which item index is maximized (null = none). Declarative source of truth. */
|
|
1580
|
-
maximizedIndex?:
|
|
1581
|
-
/** Divider affordance drawn inside each draggable handle's 8px grab zone: - `line` (default)
|
|
1582
|
-
handle?: "
|
|
1815
|
+
maximizedIndex?: number | null;
|
|
1816
|
+
/** Divider affordance drawn inside each draggable handle's 8px grab zone: - `line` (default): a 1px hairline, transparent at rest, tinting on hover/drag. - `grip`: a dotted grip handle. - `none`: no visible divider, just the invisible hit-area. The full grab zone and keyboard/ARIA behavior are identical for all three. */
|
|
1817
|
+
handle?: "line" | "grip" | "none";
|
|
1583
1818
|
/** Fired on drag-end / keyboard resize / visibility change. `detail.sizes` = panel sizes in percent. */
|
|
1584
1819
|
onChange?: (event: CustomEvent<{
|
|
1585
1820
|
sizes: number[];
|
|
@@ -1587,7 +1822,11 @@ export interface ResizableProps extends WebComponentProps {
|
|
|
1587
1822
|
/** Observe layout maximize state. */
|
|
1588
1823
|
onMaximizeChange?: (event: CustomEvent<{
|
|
1589
1824
|
maximized: boolean;
|
|
1590
|
-
index:
|
|
1825
|
+
index: number | null;
|
|
1826
|
+
}>) => void;
|
|
1827
|
+
/** Authoritative maximize state, dispatched as a raw composed CustomEvent (not through `dispatch`) onto the affected `<kai-resizable-item>` and, on restore, onto the group host. A nested element (e.g. `<kai-artifact>`) listens for it to reconcile its own toggle. */
|
|
1828
|
+
onMaximizeState?: (event: CustomEvent<{
|
|
1829
|
+
maximized: boolean;
|
|
1591
1830
|
}>) => void;
|
|
1592
1831
|
}
|
|
1593
1832
|
export declare const Resizable: import('react').ForwardRefExoticComponent<ResizableProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -1602,14 +1841,15 @@ export interface ResizableItemProps extends WebComponentProps {
|
|
|
1602
1841
|
locked?: boolean;
|
|
1603
1842
|
/** Hide this panel; its divider is dropped and the rest reflow. */
|
|
1604
1843
|
hidden?: boolean;
|
|
1605
|
-
/** Collapse this panel
|
|
1844
|
+
/** Collapse this panel. Same layout effect as `hidden` (divider dropped, the rest reflow), but it WORKS as a bare boolean from framework JSX. A plain `<kai-resizable-item collapsed>` in React/Solid/Vue/Svelte collapses the panel at the first render; `hidden` does not, because a JSX boolean sets neither the `hidden` attribute nor the IDL property on a custom element, so the parent never sees it. The facade reflects `collapsed` to a `collapsed` attribute the parent reads. Prefer this over `hidden` for declarative collapse. */
|
|
1606
1845
|
collapsed?: boolean;
|
|
1607
1846
|
onChange?: (event: CustomEvent<unknown>) => void;
|
|
1608
1847
|
onMaximizeChange?: (event: CustomEvent<unknown>) => void;
|
|
1848
|
+
onMaximizeState?: (event: CustomEvent<unknown>) => void;
|
|
1609
1849
|
}
|
|
1610
1850
|
export declare const ResizableItem: import('react').ForwardRefExoticComponent<ResizableItemProps & import('react').RefAttributes<HTMLElement>>;
|
|
1611
1851
|
export interface ResponseStreamProps extends WebComponentProps {
|
|
1612
|
-
/** Text to stream. A string, or an `AsyncIterable<string>` (set as a JS property
|
|
1852
|
+
/** Text to stream. A string, or an `AsyncIterable<string>` (set as a JS property, since async iterables can't be HTML attributes). */
|
|
1613
1853
|
text?: string | AsyncIterable<string>;
|
|
1614
1854
|
/** Reveal animation. */
|
|
1615
1855
|
mode?: "typewriter" | "fade";
|
|
@@ -1622,17 +1862,17 @@ export interface ResponseStreamProps extends WebComponentProps {
|
|
|
1622
1862
|
}
|
|
1623
1863
|
export declare const ResponseStream: import('react').ForwardRefExoticComponent<ResponseStreamProps & import('react').RefAttributes<HTMLElement>>;
|
|
1624
1864
|
export interface ScopePickerProps extends WebComponentProps {
|
|
1625
|
-
/** Authors to offer as scope filters. Set as a JS property. */
|
|
1626
|
-
availableAuthors
|
|
1627
|
-
/** Tags to offer as scope filters. Set as a JS property. */
|
|
1628
|
-
availableTags
|
|
1865
|
+
/** Authors to offer as scope filters. Omit to drop the Authors section (for a tag-only picker). Set as a JS property. */
|
|
1866
|
+
availableAuthors?: string[];
|
|
1867
|
+
/** Tags to offer as scope filters. Omit to drop the Tags section (for an author-only picker). Set as a JS property. */
|
|
1868
|
+
availableTags?: string[];
|
|
1629
1869
|
/** The label shown on the trigger for the active scope. */
|
|
1630
1870
|
currentLabel?: string;
|
|
1631
1871
|
/** Drive/observe the dropdown's open state (Shoelace-style: settable + reflected to the `open` attribute, the dropdown still self-manages on click/keyboard). Set `el.open = true`, or `<kai-scope-picker open>`; listen for `kai-open-change`. */
|
|
1632
1872
|
open?: boolean;
|
|
1633
1873
|
/** Initial open state on mount (uncontrolled seed). */
|
|
1634
1874
|
defaultOpen?: boolean;
|
|
1635
|
-
/** Disable the trigger
|
|
1875
|
+
/** Disable the trigger: click/keyboard and `show()` no longer open the dropdown. */
|
|
1636
1876
|
disabled?: boolean;
|
|
1637
1877
|
/** The scope dropdown opened or closed (by click, keyboard, Escape, outside-click, or a method). */
|
|
1638
1878
|
onOpenChange?: (event: CustomEvent<{
|
|
@@ -1640,7 +1880,7 @@ export interface ScopePickerProps extends WebComponentProps {
|
|
|
1640
1880
|
}>) => void;
|
|
1641
1881
|
/** A scope was chosen (`undefined` filters = "All Content"). */
|
|
1642
1882
|
onScopeChange?: (event: CustomEvent<{
|
|
1643
|
-
filters:
|
|
1883
|
+
filters: {
|
|
1644
1884
|
tags?: undefined | string[];
|
|
1645
1885
|
authors?: undefined | string[];
|
|
1646
1886
|
contentType?: undefined | "transcript" | "markdown";
|
|
@@ -1648,7 +1888,7 @@ export interface ScopePickerProps extends WebComponentProps {
|
|
|
1648
1888
|
from: string;
|
|
1649
1889
|
to: string;
|
|
1650
1890
|
};
|
|
1651
|
-
};
|
|
1891
|
+
} | undefined;
|
|
1652
1892
|
}>) => void;
|
|
1653
1893
|
}
|
|
1654
1894
|
export declare const ScopePicker: import('react').ForwardRefExoticComponent<ScopePickerProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -1680,15 +1920,15 @@ export interface ScrollButtonProps extends WebComponentProps {
|
|
|
1680
1920
|
/** CSS id of the scroll container to control. When omitted the element walks up the DOM (outside its own shadow root) to find the nearest scrollable ancestor. Mirrors the `for` convention of `<label for="...">`. */
|
|
1681
1921
|
for?: string;
|
|
1682
1922
|
/** Button visual variant: `'outline' | 'ghost' | 'default'`. Defaults to `'outline'`. */
|
|
1683
|
-
variant?: "
|
|
1923
|
+
variant?: "outline" | "ghost" | "default";
|
|
1684
1924
|
/** Button size token. Defaults to `'icon'` (square). */
|
|
1685
1925
|
size?: "sm" | "md" | "lg" | "icon" | "icon-sm";
|
|
1686
|
-
/** Emitted when the user clicks the button and `scrollToBottom()` is called. Carries no detail
|
|
1926
|
+
/** Emitted when the user clicks the button and `scrollToBottom()` is called. Carries no detail; consumers use it to know a manual scroll occurred. */
|
|
1687
1927
|
onScroll?: (event: CustomEvent) => void;
|
|
1688
1928
|
}
|
|
1689
1929
|
export declare const ScrollButton: import('react').ForwardRefExoticComponent<ScrollButtonProps & import('react').RefAttributes<HTMLElement>>;
|
|
1690
1930
|
export interface SearchProps extends WebComponentProps {
|
|
1691
|
-
/** Controlled query
|
|
1931
|
+
/** Controlled query. Settable and reflected to the `value` attribute. Read `el.value` for live state. */
|
|
1692
1932
|
value?: string;
|
|
1693
1933
|
/** Placeholder. Defaults to `Search…`. */
|
|
1694
1934
|
placeholder?: string;
|
|
@@ -1721,7 +1961,7 @@ export interface SegmentedProps extends WebComponentProps {
|
|
|
1721
1961
|
label: string;
|
|
1722
1962
|
icon?: undefined | string;
|
|
1723
1963
|
}[];
|
|
1724
|
-
/** Controlled selected `value
|
|
1964
|
+
/** Controlled selected `value`. Settable and reflected to the `value` attribute. `el.value = 'preview'` drives it; choosing a segment updates it and fires `kai-change`. Read `el.value` for live state. */
|
|
1725
1965
|
value?: string;
|
|
1726
1966
|
/** Control density: `sm` or `md`. Defaults to `md`. */
|
|
1727
1967
|
size?: "sm" | "md";
|
|
@@ -1732,8 +1972,8 @@ export interface SegmentedProps extends WebComponentProps {
|
|
|
1732
1972
|
}
|
|
1733
1973
|
export declare const Segmented: import('react').ForwardRefExoticComponent<SegmentedProps & import('react').RefAttributes<HTMLElement>>;
|
|
1734
1974
|
export interface SeparatorProps extends WebComponentProps {
|
|
1735
|
-
/** `horizontal` (default, block + full-width) or `vertical` (a rule inside a flex/grid row
|
|
1736
|
-
orientation?: "
|
|
1975
|
+
/** `horizontal` (default, block + full-width) or `vertical` (a rule inside a flex/grid row, stretching to the row height). */
|
|
1976
|
+
orientation?: "horizontal" | "vertical";
|
|
1737
1977
|
}
|
|
1738
1978
|
export declare const Separator: import('react').ForwardRefExoticComponent<SeparatorProps & import('react').RefAttributes<HTMLElement>>;
|
|
1739
1979
|
export interface SettingItemProps extends WebComponentProps {
|
|
@@ -1762,8 +2002,8 @@ export interface SkeletonProps extends WebComponentProps {
|
|
|
1762
2002
|
}
|
|
1763
2003
|
export declare const Skeleton: import('react').ForwardRefExoticComponent<SkeletonProps & import('react').RefAttributes<HTMLElement>>;
|
|
1764
2004
|
export interface SkillsProps extends WebComponentProps {
|
|
1765
|
-
/** The active skills to badge. Set as a JS property. */
|
|
1766
|
-
skills
|
|
2005
|
+
/** The active skills to badge. Set as a JS property. Omit to supply them as `<kai-skill>` light-DOM children instead; when both are present the property's skills come first. Nothing renders when there are none. */
|
|
2006
|
+
skills?: {
|
|
1767
2007
|
id: string;
|
|
1768
2008
|
name: string;
|
|
1769
2009
|
}[];
|
|
@@ -1774,7 +2014,7 @@ export interface SourceProps extends WebComponentProps {
|
|
|
1774
2014
|
href?: string;
|
|
1775
2015
|
/** Trigger label (defaults to the domain). */
|
|
1776
2016
|
label?: string;
|
|
1777
|
-
/** Hover-card headline. Attribute: `headline` (`title` is avoided
|
|
2017
|
+
/** Hover-card headline. Attribute: `headline` (`title` is avoided because it is a global HTML attribute that reflects in a CE constructor and breaks it). */
|
|
1778
2018
|
headline?: string;
|
|
1779
2019
|
/** Hover-card body text describing the source. */
|
|
1780
2020
|
description?: string;
|
|
@@ -1783,17 +2023,17 @@ export interface SourceProps extends WebComponentProps {
|
|
|
1783
2023
|
}
|
|
1784
2024
|
export declare const Source: import('react').ForwardRefExoticComponent<SourceProps & import('react').RefAttributes<HTMLElement>>;
|
|
1785
2025
|
export interface SourcesProps extends WebComponentProps {
|
|
1786
|
-
/** The sources to render. Set as a JS property. */
|
|
1787
|
-
sources
|
|
2026
|
+
/** The sources to render. Set as a JS property. Omit to supply them as `<kai-source>` light-DOM children instead; when both are present the property's sources come first. */
|
|
2027
|
+
sources?: {
|
|
1788
2028
|
href: string;
|
|
1789
|
-
title?:
|
|
1790
|
-
description?:
|
|
1791
|
-
label?:
|
|
1792
|
-
showFavicon?:
|
|
2029
|
+
title?: string;
|
|
2030
|
+
description?: string;
|
|
2031
|
+
label?: string;
|
|
2032
|
+
showFavicon?: boolean;
|
|
1793
2033
|
}[];
|
|
1794
2034
|
/** Show favicons on all items (per-item `showFavicon` overrides). */
|
|
1795
2035
|
showFavicon?: boolean;
|
|
1796
|
-
/** When true, each citation chip is labelled with its 1-based index in the merged (prop + declarative-children) list (`[1]`, `[2]`, …) instead of the per-item `label` or domain fallback. HTML attribute: `numbered` (boolean
|
|
2036
|
+
/** When true, each citation chip is labelled with its 1-based index in the merged (prop + declarative-children) list (`[1]`, `[2]`, …) instead of the per-item `label` or domain fallback. HTML attribute: `numbered` (boolean: a bare attribute or `numbered="true"`). JS property: `el.numbered = true`. */
|
|
1797
2037
|
numbered?: boolean;
|
|
1798
2038
|
}
|
|
1799
2039
|
export declare const Sources: import('react').ForwardRefExoticComponent<SourcesProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -1809,18 +2049,18 @@ export interface StatusProps extends WebComponentProps {
|
|
|
1809
2049
|
}
|
|
1810
2050
|
export declare const Status: import('react').ForwardRefExoticComponent<StatusProps & import('react').RefAttributes<HTMLElement>>;
|
|
1811
2051
|
export interface SuggestionsProps extends WebComponentProps {
|
|
1812
|
-
/** The suggestions. Strings, or `{ label, value }` when the displayed text and the emitted value differ. Set as a JS property. */
|
|
1813
|
-
suggestions
|
|
2052
|
+
/** The suggestions. Strings, or `{ label, value }` when the displayed text and the emitted value differ. Set as a JS property. Omit to supply them as `<kai-suggestion>` light-DOM children instead; when both are present the property's suggestions come first. */
|
|
2053
|
+
suggestions?: (string | {
|
|
1814
2054
|
label: string;
|
|
1815
|
-
value?:
|
|
1816
|
-
icon?:
|
|
2055
|
+
value?: string;
|
|
2056
|
+
icon?: string;
|
|
1817
2057
|
})[];
|
|
1818
2058
|
/** Chip style: `'outline'` (default), `'ghost'`, or `'default'` (filled). */
|
|
1819
|
-
variant?: "
|
|
2059
|
+
variant?: "outline" | "ghost" | "default";
|
|
1820
2060
|
/** Row height for `layout="list"`: `'md'` (default) or `'lg'` for taller rows. Chips are unaffected. */
|
|
1821
2061
|
size?: "md" | "lg";
|
|
1822
|
-
/** Layout: `'chips'` (default) renders a wrapping row of rounded pills; `'list'` renders a vertical, full-width "Ideas for you" list
|
|
1823
|
-
layout?: "
|
|
2062
|
+
/** Layout: `'chips'` (default) renders a wrapping row of rounded pills; `'list'` renders a vertical, full-width "Ideas for you" list where each row is left-aligned with a leading `icon`, a label, and a hover background. */
|
|
2063
|
+
layout?: "chips" | "list";
|
|
1824
2064
|
/** Full-width left-aligned rows instead of pills. */
|
|
1825
2065
|
block?: boolean;
|
|
1826
2066
|
/** Substring to highlight within each suggestion. */
|
|
@@ -1832,7 +2072,7 @@ export interface SuggestionsProps extends WebComponentProps {
|
|
|
1832
2072
|
}
|
|
1833
2073
|
export declare const Suggestions: import('react').ForwardRefExoticComponent<SuggestionsProps & import('react').RefAttributes<HTMLElement>>;
|
|
1834
2074
|
export interface SwitchProps extends WebComponentProps {
|
|
1835
|
-
/** Controlled checked state
|
|
2075
|
+
/** Controlled checked state. Settable and reflected to the `checked` attribute. `el.checked = true` (or `<kai-switch checked>`) drives it; the toggle UI updates it and fires `kai-change`. Read `el.checked` for live state. */
|
|
1836
2076
|
checked?: boolean;
|
|
1837
2077
|
/** Initial checked state on mount (uncontrolled seed). Bare attribute (`<kai-switch default-checked>`) turns it on. */
|
|
1838
2078
|
defaultChecked?: boolean;
|
|
@@ -1876,7 +2116,23 @@ export interface TabsProps extends WebComponentProps {
|
|
|
1876
2116
|
export declare const Tabs: import('react').ForwardRefExoticComponent<TabsProps & import('react').RefAttributes<HTMLElement>>;
|
|
1877
2117
|
export interface TasksProps extends WebComponentProps {
|
|
1878
2118
|
/** The tasks definition (the CardEnvelope.data). Set as a JS PROPERTY: `el.data = { tasks:[…], selectAll, confirmLabel, … }`. Import `TasksCardData` from `@kitn.ai/ui` for the full shape. */
|
|
1879
|
-
data?:
|
|
2119
|
+
data?: {
|
|
2120
|
+
mode?: "select" | "progress";
|
|
2121
|
+
heading?: string;
|
|
2122
|
+
tasks: {
|
|
2123
|
+
id: string;
|
|
2124
|
+
label: string;
|
|
2125
|
+
description?: string;
|
|
2126
|
+
checked?: boolean;
|
|
2127
|
+
disabled?: boolean;
|
|
2128
|
+
}[];
|
|
2129
|
+
selectAll?: boolean;
|
|
2130
|
+
confirmLabel?: string;
|
|
2131
|
+
allowEmpty?: boolean;
|
|
2132
|
+
min?: number;
|
|
2133
|
+
max?: number;
|
|
2134
|
+
dismissible?: boolean;
|
|
2135
|
+
};
|
|
1880
2136
|
/** Stable card id correlating every emitted CardEvent. Attribute: `card-id`. */
|
|
1881
2137
|
cardId?: string;
|
|
1882
2138
|
/** Heading rendered in the card chrome (= CardEnvelope.title). Attribute: `heading`. */
|
|
@@ -1891,7 +2147,7 @@ export interface TasksProps extends WebComponentProps {
|
|
|
1891
2147
|
disabled?: boolean;
|
|
1892
2148
|
/** Display-only: rows can't be toggled and show the default cursor (no pointer, hover, or focus affordances). Keeps the look as-is. Attribute: `readonly`. */
|
|
1893
2149
|
readonly?: boolean;
|
|
1894
|
-
/** The selection changed on a toggle
|
|
2150
|
+
/** The selection changed on a toggle. Carries the selected ids in input order. */
|
|
1895
2151
|
onValueChange?: (event: CustomEvent<{
|
|
1896
2152
|
value: string[];
|
|
1897
2153
|
}>) => void;
|
|
@@ -1920,31 +2176,105 @@ export interface ThinkingBarProps extends WebComponentProps {
|
|
|
1920
2176
|
}
|
|
1921
2177
|
export declare const ThinkingBar: import('react').ForwardRefExoticComponent<ThinkingBarProps & import('react').RefAttributes<HTMLElement>>;
|
|
1922
2178
|
export interface ThreadProps extends WebComponentProps {
|
|
1923
|
-
/** The full message thread to render, newest last. Each entry carries its role,
|
|
2179
|
+
/** The full message thread to render, newest last. Each entry carries its role, ordered `parts`, and optional actions/avatar/feedback. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). */
|
|
1924
2180
|
messages?: {
|
|
1925
2181
|
id: string;
|
|
1926
2182
|
role: "user" | "assistant";
|
|
1927
|
-
|
|
1928
|
-
|
|
2183
|
+
parts: ({
|
|
2184
|
+
type: "text";
|
|
2185
|
+
text: string;
|
|
2186
|
+
raw?: {
|
|
2187
|
+
source: string;
|
|
2188
|
+
payload: unknown;
|
|
2189
|
+
};
|
|
2190
|
+
} | {
|
|
2191
|
+
type: "reasoning";
|
|
1929
2192
|
text: string;
|
|
1930
2193
|
label?: string;
|
|
1931
|
-
|
|
1932
|
-
|
|
1933
|
-
|
|
1934
|
-
|
|
1935
|
-
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1940
|
-
|
|
1941
|
-
|
|
1942
|
-
|
|
1943
|
-
|
|
1944
|
-
|
|
1945
|
-
|
|
1946
|
-
|
|
1947
|
-
|
|
2194
|
+
index?: number;
|
|
2195
|
+
streamId?: string;
|
|
2196
|
+
signature?: string;
|
|
2197
|
+
raw?: {
|
|
2198
|
+
source: string;
|
|
2199
|
+
payload: unknown;
|
|
2200
|
+
};
|
|
2201
|
+
} | {
|
|
2202
|
+
type: "tool";
|
|
2203
|
+
tool: {
|
|
2204
|
+
type: string;
|
|
2205
|
+
kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
|
|
2206
|
+
state: "input-streaming" | "input-available" | "output-available" | "output-error";
|
|
2207
|
+
input?: Record<string, unknown>;
|
|
2208
|
+
rawInput?: string;
|
|
2209
|
+
output?: Record<string, unknown>;
|
|
2210
|
+
toolCallId?: string;
|
|
2211
|
+
errorText?: string;
|
|
2212
|
+
raw?: {
|
|
2213
|
+
source: string;
|
|
2214
|
+
payload: unknown;
|
|
2215
|
+
};
|
|
2216
|
+
};
|
|
2217
|
+
raw?: {
|
|
2218
|
+
source: string;
|
|
2219
|
+
payload: unknown;
|
|
2220
|
+
};
|
|
2221
|
+
} | {
|
|
2222
|
+
type: "card";
|
|
2223
|
+
envelope: {
|
|
2224
|
+
type: string;
|
|
2225
|
+
id: string;
|
|
2226
|
+
data: unknown;
|
|
2227
|
+
title?: string;
|
|
2228
|
+
resolution?: {
|
|
2229
|
+
kind: "action";
|
|
2230
|
+
action: string;
|
|
2231
|
+
payload?: unknown;
|
|
2232
|
+
at?: string;
|
|
2233
|
+
} | {
|
|
2234
|
+
kind: "submit";
|
|
2235
|
+
data: unknown;
|
|
2236
|
+
at?: string;
|
|
2237
|
+
} | {
|
|
2238
|
+
kind: "dismissed";
|
|
2239
|
+
at?: string;
|
|
2240
|
+
} | {
|
|
2241
|
+
kind: "expired";
|
|
2242
|
+
reason?: string;
|
|
2243
|
+
at?: string;
|
|
2244
|
+
};
|
|
2245
|
+
};
|
|
2246
|
+
raw?: {
|
|
2247
|
+
source: string;
|
|
2248
|
+
payload: unknown;
|
|
2249
|
+
};
|
|
2250
|
+
} | {
|
|
2251
|
+
type: "source";
|
|
2252
|
+
source: {
|
|
2253
|
+
id?: string;
|
|
2254
|
+
url?: string;
|
|
2255
|
+
title?: string;
|
|
2256
|
+
snippet?: string;
|
|
2257
|
+
index?: number;
|
|
2258
|
+
};
|
|
2259
|
+
raw?: {
|
|
2260
|
+
source: string;
|
|
2261
|
+
payload: unknown;
|
|
2262
|
+
};
|
|
2263
|
+
} | {
|
|
2264
|
+
type: "file";
|
|
2265
|
+
attachment: {
|
|
2266
|
+
id: string;
|
|
2267
|
+
type: "file" | "source-document";
|
|
2268
|
+
filename?: string;
|
|
2269
|
+
mediaType?: string;
|
|
2270
|
+
url?: string;
|
|
2271
|
+
title?: string;
|
|
2272
|
+
};
|
|
2273
|
+
raw?: {
|
|
2274
|
+
source: string;
|
|
2275
|
+
payload: unknown;
|
|
2276
|
+
};
|
|
2277
|
+
})[];
|
|
1948
2278
|
actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
|
|
1949
2279
|
id: string;
|
|
1950
2280
|
label: string;
|
|
@@ -1958,10 +2288,10 @@ export interface ThreadProps extends WebComponentProps {
|
|
|
1958
2288
|
};
|
|
1959
2289
|
feedback?: "like" | "dislike";
|
|
1960
2290
|
}[];
|
|
1961
|
-
/** Show a typing indicator on the pending assistant turn
|
|
2291
|
+
/** Show a typing indicator on the pending assistant turn. Set it while awaiting the assistant's reply. */
|
|
1962
2292
|
loading?: boolean;
|
|
1963
2293
|
/** Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`. */
|
|
1964
|
-
proseSize?: "
|
|
2294
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
1965
2295
|
/** Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`). */
|
|
1966
2296
|
codeTheme?: string;
|
|
1967
2297
|
/** Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true. */
|
|
@@ -1972,6 +2302,10 @@ export interface ThreadProps extends WebComponentProps {
|
|
|
1972
2302
|
scrollButton?: boolean;
|
|
1973
2303
|
/** Extra classes applied to the thread's inner root. */
|
|
1974
2304
|
class?: string;
|
|
2305
|
+
/** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
|
|
2306
|
+
cardTypes?: Record<string, string>;
|
|
2307
|
+
/** 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. */
|
|
2308
|
+
cardSchemas?: Record<string, object>;
|
|
1975
2309
|
/** A message's action button was clicked. `action` is the built-in name (`copy` / `like` / `dislike` / `regenerate` / `edit`) or a custom id. `state` is present only for the toggleable feedback votes: `'on'` when a like/dislike is set, `'off'` when re-tapped to clear. */
|
|
1976
2310
|
onMessageAction?: (event: CustomEvent<{
|
|
1977
2311
|
messageId: string;
|
|
@@ -1981,21 +2315,21 @@ export interface ThreadProps extends WebComponentProps {
|
|
|
1981
2315
|
}
|
|
1982
2316
|
export declare const Thread: import('react').ForwardRefExoticComponent<ThreadProps & import('react').RefAttributes<HTMLElement>>;
|
|
1983
2317
|
export interface ToastRegionProps extends WebComponentProps {
|
|
1984
|
-
/** The toasts to render. Newest is shown on top. Set as a JS property (array); pass a new array reference to update. */
|
|
1985
|
-
toasts
|
|
2318
|
+
/** 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. */
|
|
2319
|
+
toasts?: {
|
|
1986
2320
|
id: string;
|
|
1987
2321
|
message: string;
|
|
1988
|
-
variant?:
|
|
1989
|
-
appearance?:
|
|
1990
|
-
inverse?:
|
|
1991
|
-
description?:
|
|
1992
|
-
action?:
|
|
2322
|
+
variant?: "neutral" | "success" | "warning" | "error" | "info";
|
|
2323
|
+
appearance?: "pill" | "card";
|
|
2324
|
+
inverse?: boolean;
|
|
2325
|
+
description?: string;
|
|
2326
|
+
action?: {
|
|
1993
2327
|
label: string;
|
|
1994
2328
|
onAction: () => void | false;
|
|
1995
2329
|
};
|
|
1996
|
-
duration?:
|
|
1997
|
-
dismissible?:
|
|
1998
|
-
target?:
|
|
2330
|
+
duration?: number;
|
|
2331
|
+
dismissible?: boolean;
|
|
2332
|
+
target?: HTMLElement;
|
|
1999
2333
|
}[];
|
|
2000
2334
|
/** Stack anchor: `'top-center'` (default), `'top-right'`, `'bottom-center'`, … */
|
|
2001
2335
|
position?: "top-center" | "top-right" | "top-left" | "bottom-center" | "bottom-right" | "bottom-left";
|
|
@@ -2017,7 +2351,7 @@ export interface ToastRegionProps extends WebComponentProps {
|
|
|
2017
2351
|
/** A toast left the stack. `reason` is `'timeout' | 'close' | 'action'`. */
|
|
2018
2352
|
onDismiss?: (event: CustomEvent<{
|
|
2019
2353
|
id: string;
|
|
2020
|
-
reason: "
|
|
2354
|
+
reason: "timeout" | "close" | "action";
|
|
2021
2355
|
}>) => void;
|
|
2022
2356
|
}
|
|
2023
2357
|
export declare const ToastRegion: import('react').ForwardRefExoticComponent<ToastRegionProps & import('react').RefAttributes<HTMLElement>>;
|
|
@@ -2025,17 +2359,23 @@ export interface ToolProps extends WebComponentProps {
|
|
|
2025
2359
|
/** The tool-call to display. Set as a JS property. */
|
|
2026
2360
|
tool?: {
|
|
2027
2361
|
type: string;
|
|
2362
|
+
kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
|
|
2028
2363
|
state: "input-streaming" | "input-available" | "output-available" | "output-error";
|
|
2029
2364
|
input?: Record<string, unknown>;
|
|
2365
|
+
rawInput?: string;
|
|
2030
2366
|
output?: Record<string, unknown>;
|
|
2031
2367
|
toolCallId?: string;
|
|
2032
2368
|
errorText?: string;
|
|
2369
|
+
raw?: {
|
|
2370
|
+
source: string;
|
|
2371
|
+
payload: unknown;
|
|
2372
|
+
};
|
|
2033
2373
|
};
|
|
2034
2374
|
/** Drive/observe open state (Shoelace-style: settable + reflected to the `open` attribute; the element still self-manages on trigger click). Set `el.open = true`, or `<kai-tool open>`; listen for `kai-open-change`. */
|
|
2035
2375
|
open?: boolean;
|
|
2036
2376
|
/** Initial open state on mount (uncontrolled seed). */
|
|
2037
2377
|
defaultOpen?: boolean;
|
|
2038
|
-
/** Gate the disclosure trigger
|
|
2378
|
+
/** Gate the disclosure trigger: programmatic `show()/hide()/toggle()` still work, but the trigger click no longer toggles. */
|
|
2039
2379
|
disabled?: boolean;
|
|
2040
2380
|
/** The panel expanded or collapsed (by trigger click or a method). */
|
|
2041
2381
|
onOpenChange?: (event: CustomEvent<{
|
|
@@ -2065,7 +2405,7 @@ export interface TooltipProps extends WebComponentProps {
|
|
|
2065
2405
|
}
|
|
2066
2406
|
export declare const Tooltip: import('react').ForwardRefExoticComponent<TooltipProps & import('react').RefAttributes<HTMLElement>>;
|
|
2067
2407
|
export interface VoiceInputProps extends WebComponentProps {
|
|
2068
|
-
/** Transcriber the host supplies
|
|
2408
|
+
/** Transcriber the host supplies: records audio, returns the text. This is a **function-valued property** (`el.transcribe = async blob => '...'`) because a value-returning callback can't be modelled as a fire-and-forget event. */
|
|
2069
2409
|
transcribe?: (audio: Blob) => Promise<string>;
|
|
2070
2410
|
/** Disable the mic button (non-interactive). */
|
|
2071
2411
|
disabled?: boolean;
|
|
@@ -2073,11 +2413,11 @@ export interface VoiceInputProps extends WebComponentProps {
|
|
|
2073
2413
|
recognitionLang?: string;
|
|
2074
2414
|
/** Emit live partial transcripts (`kai-transcript-interim`) during native recognition. Attribute: `interim`. No-op on the transcribe/fallback paths. */
|
|
2075
2415
|
interim?: boolean;
|
|
2076
|
-
/** Raw audio captured (before transcription)
|
|
2416
|
+
/** Raw audio captured (before transcription), for hosts that prefer to handle transcription themselves instead of via the `transcribe` property. Also the unsupported-fallback signal: no `transcribe`, no SpeechRecognition, so only the blob is produced (no text). */
|
|
2077
2417
|
onAudioCaptured?: (event: CustomEvent<{
|
|
2078
2418
|
blob: Blob;
|
|
2079
2419
|
}>) => void;
|
|
2080
|
-
/** Recording started or stopped
|
|
2420
|
+
/** Recording started or stopped. Lets the host drive its own UI (waveform, push-to-talk indicator) in sync with the mic. Fires on real transitions only (manual click and programmatic start()/stop()), never on mount. */
|
|
2081
2421
|
onRecordingChange?: (event: CustomEvent<{
|
|
2082
2422
|
recording: boolean;
|
|
2083
2423
|
}>) => void;
|
|
@@ -2085,7 +2425,7 @@ export interface VoiceInputProps extends WebComponentProps {
|
|
|
2085
2425
|
onTranscriptInterim?: (event: CustomEvent<{
|
|
2086
2426
|
text: string;
|
|
2087
2427
|
}>) => void;
|
|
2088
|
-
/** Final transcript
|
|
2428
|
+
/** Final transcript: the `transcribe` property resolved, OR native `SpeechRecognition` produced final text (no `transcribe` set). */
|
|
2089
2429
|
onTranscription?: (event: CustomEvent<{
|
|
2090
2430
|
text: string;
|
|
2091
2431
|
}>) => void;
|
|
@@ -2096,43 +2436,43 @@ export interface VoiceOutputProps extends WebComponentProps {
|
|
|
2096
2436
|
text?: string;
|
|
2097
2437
|
/** Speak automatically when `text` is set/changed. */
|
|
2098
2438
|
autoplay?: boolean;
|
|
2099
|
-
/** TTS model seam the host supplies
|
|
2439
|
+
/** TTS model seam the host supplies: given text, returns an audio `Blob` to play. This is a **function-valued property** (`el.synthesize = async text => blob`); when set, the native `speechSynthesis` path is bypassed. Mirrors `<kai-voice-input>`'s `transcribe`. A value-returning callback can't be modelled as a fire-and-forget event, hence a property. */
|
|
2100
2440
|
synthesize?: (text: string) => Promise<Blob>;
|
|
2101
2441
|
/** Disable the button (non-interactive). */
|
|
2102
2442
|
disabled?: boolean;
|
|
2103
|
-
/** Playback started or stopped
|
|
2443
|
+
/** Playback started or stopped. Drive your own UI in sync. Fires on real transitions only (manual click and programmatic speak()/stop()), never on mount. */
|
|
2104
2444
|
onSpeakingChange?: (event: CustomEvent<{
|
|
2105
2445
|
speaking: boolean;
|
|
2106
2446
|
}>) => void;
|
|
2107
|
-
/** The model path (`synthesize`) resolved audio
|
|
2447
|
+
/** The model path (`synthesize`) resolved audio: the raw `Blob` before playback. */
|
|
2108
2448
|
onSynthesized?: (event: CustomEvent<{
|
|
2109
2449
|
blob: Blob;
|
|
2110
2450
|
}>) => void;
|
|
2111
2451
|
}
|
|
2112
2452
|
export declare const VoiceOutput: import('react').ForwardRefExoticComponent<VoiceOutputProps & import('react').RefAttributes<HTMLElement>>;
|
|
2113
2453
|
export interface WorkspaceProps extends WebComponentProps {
|
|
2114
|
-
/**
|
|
2115
|
-
groups
|
|
2454
|
+
/** The sidebar's section headers, rendered in array order. A group carries no conversations of its own; it is matched against `conversations` by id, so the two props are complementary rather than alternatives. Omit for an ungrouped sidebar. Set as a JS property. */
|
|
2455
|
+
groups?: {
|
|
2116
2456
|
id: string;
|
|
2117
|
-
userId?:
|
|
2118
|
-
teamId?:
|
|
2457
|
+
userId?: string;
|
|
2458
|
+
teamId?: string;
|
|
2119
2459
|
name: string;
|
|
2120
2460
|
sortOrder: number;
|
|
2121
2461
|
createdAt: string;
|
|
2122
2462
|
}[];
|
|
2123
|
-
/**
|
|
2124
|
-
conversations
|
|
2463
|
+
/** Every conversation in the sidebar, flat. Each one is filed under the group whose `id` equals its `groupId`; one with no `groupId`, or with a `groupId` matching no entry in `groups`, falls into a trailing ungrouped section (headerless when `compact`), so nothing you pass in is ever dropped. There is no recency bucketing. Set as a JS property. Omit for an empty sidebar, or when `no-conversations` replaces the built-in list with your own `sidebar-header` content. */
|
|
2464
|
+
conversations?: {
|
|
2125
2465
|
id: string;
|
|
2126
2466
|
title: string;
|
|
2127
|
-
groupId?:
|
|
2467
|
+
groupId?: string;
|
|
2128
2468
|
scope: {
|
|
2129
2469
|
type: "document" | "collection";
|
|
2130
|
-
documentId?:
|
|
2131
|
-
filters?:
|
|
2132
|
-
tags?:
|
|
2133
|
-
authors?:
|
|
2134
|
-
contentType?:
|
|
2135
|
-
dateRange?:
|
|
2470
|
+
documentId?: string;
|
|
2471
|
+
filters?: {
|
|
2472
|
+
tags?: string[];
|
|
2473
|
+
authors?: string[];
|
|
2474
|
+
contentType?: "transcript" | "markdown";
|
|
2475
|
+
dateRange?: {
|
|
2136
2476
|
from: string;
|
|
2137
2477
|
to: string;
|
|
2138
2478
|
};
|
|
@@ -2141,54 +2481,128 @@ export interface WorkspaceProps extends WebComponentProps {
|
|
|
2141
2481
|
messageCount: number;
|
|
2142
2482
|
lastMessageAt: string;
|
|
2143
2483
|
updatedAt: string;
|
|
2144
|
-
trailing?:
|
|
2484
|
+
trailing?: string;
|
|
2145
2485
|
}[];
|
|
2146
2486
|
/** Id of the open conversation, highlighted in the sidebar. */
|
|
2147
2487
|
activeId?: string;
|
|
2148
|
-
/** The active conversation's message thread, newest last. Set as a JS property. */
|
|
2149
|
-
messages
|
|
2488
|
+
/** The active conversation's message thread, newest last. Set as a JS property (`el.messages = [...]`); a NEW array reference per streaming chunk re-renders (mutating in place does not). Omit for an empty thread. */
|
|
2489
|
+
messages?: {
|
|
2150
2490
|
id: string;
|
|
2151
2491
|
role: "user" | "assistant";
|
|
2152
|
-
|
|
2153
|
-
|
|
2492
|
+
parts: ({
|
|
2493
|
+
type: "text";
|
|
2154
2494
|
text: string;
|
|
2155
|
-
|
|
2156
|
-
|
|
2157
|
-
|
|
2158
|
-
|
|
2159
|
-
|
|
2160
|
-
|
|
2161
|
-
|
|
2162
|
-
|
|
2163
|
-
|
|
2164
|
-
|
|
2165
|
-
|
|
2166
|
-
|
|
2167
|
-
|
|
2168
|
-
|
|
2169
|
-
|
|
2170
|
-
|
|
2171
|
-
|
|
2172
|
-
|
|
2173
|
-
|
|
2495
|
+
raw?: {
|
|
2496
|
+
source: string;
|
|
2497
|
+
payload: unknown;
|
|
2498
|
+
};
|
|
2499
|
+
} | {
|
|
2500
|
+
type: "reasoning";
|
|
2501
|
+
text: string;
|
|
2502
|
+
label?: string;
|
|
2503
|
+
index?: number;
|
|
2504
|
+
streamId?: string;
|
|
2505
|
+
signature?: string;
|
|
2506
|
+
raw?: {
|
|
2507
|
+
source: string;
|
|
2508
|
+
payload: unknown;
|
|
2509
|
+
};
|
|
2510
|
+
} | {
|
|
2511
|
+
type: "tool";
|
|
2512
|
+
tool: {
|
|
2513
|
+
type: string;
|
|
2514
|
+
kind?: "command" | "file-change" | "search" | "fetch" | "mcp" | "image" | "generic";
|
|
2515
|
+
state: "input-streaming" | "input-available" | "output-available" | "output-error";
|
|
2516
|
+
input?: Record<string, unknown>;
|
|
2517
|
+
rawInput?: string;
|
|
2518
|
+
output?: Record<string, unknown>;
|
|
2519
|
+
toolCallId?: string;
|
|
2520
|
+
errorText?: string;
|
|
2521
|
+
raw?: {
|
|
2522
|
+
source: string;
|
|
2523
|
+
payload: unknown;
|
|
2524
|
+
};
|
|
2525
|
+
};
|
|
2526
|
+
raw?: {
|
|
2527
|
+
source: string;
|
|
2528
|
+
payload: unknown;
|
|
2529
|
+
};
|
|
2530
|
+
} | {
|
|
2531
|
+
type: "card";
|
|
2532
|
+
envelope: {
|
|
2533
|
+
type: string;
|
|
2534
|
+
id: string;
|
|
2535
|
+
data: unknown;
|
|
2536
|
+
title?: string;
|
|
2537
|
+
resolution?: {
|
|
2538
|
+
kind: "action";
|
|
2539
|
+
action: string;
|
|
2540
|
+
payload?: unknown;
|
|
2541
|
+
at?: string;
|
|
2542
|
+
} | {
|
|
2543
|
+
kind: "submit";
|
|
2544
|
+
data: unknown;
|
|
2545
|
+
at?: string;
|
|
2546
|
+
} | {
|
|
2547
|
+
kind: "dismissed";
|
|
2548
|
+
at?: string;
|
|
2549
|
+
} | {
|
|
2550
|
+
kind: "expired";
|
|
2551
|
+
reason?: string;
|
|
2552
|
+
at?: string;
|
|
2553
|
+
};
|
|
2554
|
+
};
|
|
2555
|
+
raw?: {
|
|
2556
|
+
source: string;
|
|
2557
|
+
payload: unknown;
|
|
2558
|
+
};
|
|
2559
|
+
} | {
|
|
2560
|
+
type: "source";
|
|
2561
|
+
source: {
|
|
2562
|
+
id?: string;
|
|
2563
|
+
url?: string;
|
|
2564
|
+
title?: string;
|
|
2565
|
+
snippet?: string;
|
|
2566
|
+
index?: number;
|
|
2567
|
+
};
|
|
2568
|
+
raw?: {
|
|
2569
|
+
source: string;
|
|
2570
|
+
payload: unknown;
|
|
2571
|
+
};
|
|
2572
|
+
} | {
|
|
2573
|
+
type: "file";
|
|
2574
|
+
attachment: {
|
|
2575
|
+
id: string;
|
|
2576
|
+
type: "file" | "source-document";
|
|
2577
|
+
filename?: string;
|
|
2578
|
+
mediaType?: string;
|
|
2579
|
+
url?: string;
|
|
2580
|
+
title?: string;
|
|
2581
|
+
};
|
|
2582
|
+
raw?: {
|
|
2583
|
+
source: string;
|
|
2584
|
+
payload: unknown;
|
|
2585
|
+
};
|
|
2586
|
+
})[];
|
|
2587
|
+
actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit" | {
|
|
2174
2588
|
id: string;
|
|
2175
2589
|
label: string;
|
|
2176
|
-
icon?:
|
|
2177
|
-
tooltip?:
|
|
2590
|
+
icon?: string;
|
|
2591
|
+
tooltip?: string;
|
|
2178
2592
|
})[];
|
|
2179
|
-
avatar?:
|
|
2180
|
-
src?:
|
|
2181
|
-
fallback?:
|
|
2182
|
-
alt?:
|
|
2593
|
+
avatar?: {
|
|
2594
|
+
src?: string;
|
|
2595
|
+
fallback?: string;
|
|
2596
|
+
alt?: string;
|
|
2183
2597
|
};
|
|
2184
|
-
feedback?:
|
|
2598
|
+
feedback?: "like" | "dislike";
|
|
2185
2599
|
}[];
|
|
2186
2600
|
value?: string;
|
|
2187
2601
|
placeholder?: string;
|
|
2188
2602
|
loading?: boolean;
|
|
2189
2603
|
suggestions?: string[];
|
|
2190
2604
|
suggestionMode?: "submit" | "fill";
|
|
2191
|
-
proseSize?: "
|
|
2605
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
2192
2606
|
codeTheme?: string;
|
|
2193
2607
|
codeHighlight?: boolean;
|
|
2194
2608
|
chatTitle?: string;
|
|
@@ -2243,6 +2657,10 @@ export interface WorkspaceProps extends WebComponentProps {
|
|
|
2243
2657
|
compact?: boolean;
|
|
2244
2658
|
/** Suppress the built-in ConversationList so the `sidebar-header` slot owns the whole rail flex region (for apps that supply their own rail nav). Default false. Attribute: `no-conversations`. */
|
|
2245
2659
|
noConversations?: boolean;
|
|
2660
|
+
/** Optional card type -> custom-element tag overrides/additions for `card` parts (merged over the built-ins). Property: `el.cardTypes`. Typed as a plain string map (not the `CardTagMap` alias) so the generated React wrapper inlines it instead of emitting an unresolved named type. */
|
|
2661
|
+
cardTypes?: Record<string, string>;
|
|
2662
|
+
/** 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. */
|
|
2663
|
+
cardSchemas?: Record<string, object>;
|
|
2246
2664
|
/** A conversation was selected in the sidebar. */
|
|
2247
2665
|
onConversationSelect?: (event: CustomEvent<{
|
|
2248
2666
|
id: string;
|