@kitn.ai/ui 0.25.2 → 0.26.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 +2 -2
- package/dist/components/attachment-types.d.ts +46 -1
- package/dist/components/attachments.d.ts +31 -0
- package/dist/components/audio-visualizer/fit-scale.d.ts +50 -0
- package/dist/components/audio-visualizer/index.d.ts +15 -1
- package/dist/components/audio-visualizer/variant-bar.d.ts +24 -1
- package/dist/components/chat-thread.d.ts +3 -41
- package/dist/components/code-block.d.ts +22 -0
- package/dist/components/conversation-item.d.ts +54 -1
- package/dist/components/conversation-list.d.ts +65 -0
- package/dist/components/form.d.ts +42 -0
- package/dist/components/message.d.ts +7 -0
- package/dist/components/toast.d.ts +2 -1
- package/dist/components/voice-input.d.ts +8 -0
- package/dist/components/voice-output.d.ts +12 -1
- package/dist/components/workspace-shell.d.ts +87 -0
- package/dist/{create-tween-B5Y4Im8G.js → create-tween-BFT6c-Y8.js} +1 -1
- package/dist/{create-tween-4z1XYLkR.js → create-tween-CJNlzoaO.js} +1 -1
- package/dist/{create-tween-CUzOlaMS.js → create-tween-CQED4T0g.js} +1 -1
- package/dist/custom-elements.json +2931 -2572
- package/dist/diagnostics/hook.d.ts +81 -0
- package/dist/diagnostics/index.d.ts +7 -0
- package/dist/diagnostics/report-request.d.ts +61 -0
- package/dist/diagnostics.d.ts +5 -0
- package/dist/diagnostics.js +209 -0
- package/dist/elements/agent-card.js +1 -1
- package/dist/elements/artifact.js +1 -1
- package/dist/elements/attachments.js +1 -1
- package/dist/elements/audio-visualizer.js +1 -1
- package/dist/elements/autoloader.js +1 -1
- package/dist/elements/avatar.js +1 -1
- package/dist/elements/badge.js +1 -1
- package/dist/elements/button.js +1 -1
- package/dist/elements/card.js +1 -1
- package/dist/elements/cards.js +1 -1
- package/dist/elements/chain-of-thought.js +1 -1
- package/dist/elements/chat-scope-picker.js +1 -1
- package/dist/elements/chat-workspace.js +1 -1
- package/dist/elements/chat.js +1 -1
- package/dist/elements/checkpoint.js +1 -1
- package/dist/elements/choice.js +1 -1
- package/dist/elements/chunks/{Icon-b5A8hlHs.js → Icon--Y8vsFal.js} +1 -1
- package/dist/elements/chunks/action-icons-D9u3OzYW.js +1 -0
- package/dist/elements/chunks/arrow-left-CVh1TeN7.js +1 -0
- package/dist/elements/chunks/{artifact-BSuPYFHY.js → artifact-BkYcfIlZ.js} +1 -1
- package/dist/elements/chunks/attachments-DwfNlubq.js +1 -0
- package/dist/elements/chunks/audio-visualizer-D7lB6mvR.js +1 -0
- package/dist/elements/chunks/{badge-TIMiJFKc.js → badge-Q0-Cmwzz.js} +1 -1
- package/dist/elements/chunks/{button-B9okqG73.js → button-flUbeufF.js} +1 -1
- package/dist/elements/chunks/{card-renderer-CSoTL_e1.js → card-renderer-3Dyl-FpN.js} +1 -1
- package/dist/elements/chunks/check-B5kBPKeo.js +1 -0
- package/dist/elements/chunks/chevron-down-DZ1GS39h.js +1 -0
- package/dist/elements/chunks/chevron-right-CvP7OUd2.js +1 -0
- package/dist/elements/chunks/{choice-card-CGMc3kek.js → choice-card-D4QUIOWZ.js} +1 -1
- package/dist/elements/chunks/circle-CDf9g6MQ.js +1 -0
- package/dist/elements/chunks/circle-check-CA47Nqbz.js +1 -0
- package/dist/elements/chunks/{circle-x-mhH7pOK2.js → circle-x-CJ_HVbC8.js} +1 -1
- package/dist/elements/chunks/code-block-BdLiTitd.js +1 -0
- package/dist/elements/chunks/collapsible-BzbXpPzr.js +1 -0
- package/dist/elements/chunks/{composer-CZZmtYOT.js → composer-Byve-n8K.js} +2 -2
- package/dist/elements/chunks/{confirm-card-BWjf2-xo.js → confirm-card-B0flE3MN.js} +1 -1
- package/dist/elements/chunks/context-VLIL3sJ-.js +1 -0
- package/dist/elements/chunks/controllable-DTwTIlwp.js +1 -0
- package/dist/elements/chunks/conversation-item-BDztezOG.js +1 -0
- package/dist/elements/chunks/copy-Nf-kqxXH.js +1 -0
- package/dist/elements/chunks/{create-tween-CUrM6D_o.js → create-tween-c4Z8TDYz.js} +2 -2
- package/dist/elements/chunks/default-input-C2iLFq0b.js +1 -0
- package/dist/elements/chunks/define-wjHR1MkU.js +1 -0
- package/dist/elements/chunks/disclosure-CcNbyLy0.js +1 -0
- package/dist/elements/chunks/{download-DnCyWFJE.js → download-C4V7tBdb.js} +1 -1
- package/dist/elements/chunks/dropdown-BgWTthUx.js +1 -0
- package/dist/elements/chunks/{ellipsis-CVxqfsDZ.js → ellipsis-7gU33mL2.js} +1 -1
- package/dist/elements/chunks/embed-D3KewsIJ.js +1 -0
- package/dist/elements/chunks/{external-link-DG2sRdQL.js → external-link-CSOEsNlx.js} +1 -1
- package/dist/elements/chunks/{file-text-D0J9F6M7.js → file-text-D1G8khle.js} +1 -1
- package/dist/elements/chunks/{file-tree-yGWNK0Js.js → file-tree-zvB2i7P9.js} +1 -1
- package/dist/elements/chunks/{folder-NV1pi_ud.js → folder-WW2LGLid.js} +1 -1
- package/dist/elements/chunks/form-CQirdC4W.js +1 -0
- package/dist/elements/chunks/hover-card-CJJkfHTK.js +1 -0
- package/dist/elements/chunks/icon-Cfgmf4fa.js +1 -0
- package/dist/elements/chunks/{info-C8r5Q6cc.js → info-DX3YMOt6.js} +1 -1
- package/dist/elements/chunks/input-BtW9U6Sq.js +1 -0
- package/dist/elements/chunks/{kbd-OGJDUT-O.js → kbd-LGXwuT_V.js} +1 -1
- package/dist/elements/chunks/{link-BdsfLB7b.js → link-2My69BqT.js} +1 -1
- package/dist/elements/chunks/{link-preview-Cf5KOP-i.js → link-preview-OQ9IEq0f.js} +1 -1
- package/dist/elements/chunks/{loader-B5QzK_8_.js → loader-iOxc_Tu-.js} +1 -1
- package/dist/elements/chunks/{markdown-DbozyYqa.js → markdown-DgBFaGAz.js} +1 -1
- package/dist/elements/chunks/{message-DtXKPqiR.js → message-VMZohrXx.js} +1 -1
- package/dist/elements/chunks/message-circle-CpXMM-_n.js +1 -0
- package/dist/elements/chunks/message-square-DxcWtETQ.js +1 -0
- package/dist/elements/chunks/message-tZmV2A3p.js +1 -0
- package/dist/elements/chunks/{minimize-2-SegJ_oku.js → minimize-2-DPIUKTrT.js} +1 -1
- package/dist/elements/chunks/{model-switcher-D7JrFFHp.js → model-switcher-DsT8tFB0.js} +1 -1
- package/dist/elements/chunks/{overlay-CV7z2YuX.js → overlay-DuiwdXjm.js} +1 -1
- package/dist/elements/chunks/{paperclip-Bg0ITU3b.js → paperclip-CRZVp4z_.js} +1 -1
- package/dist/elements/chunks/{progress-bar-D1_rzt6N.js → progress-bar-DNy66e_E.js} +1 -1
- package/dist/elements/chunks/{prompt-suggestion-D5Sm8xF1.js → prompt-suggestion-Bn64Nl7L.js} +1 -1
- package/dist/elements/chunks/reasoning-Emn9N4-T.js +1 -0
- package/dist/elements/chunks/{resizable-Dpzjlvp4.js → resizable-D181b4fM.js} +1 -1
- package/dist/elements/chunks/{rotate-cw-DzVDJOA1.js → rotate-cw-CPWe37D9.js} +1 -1
- package/dist/elements/chunks/{scroll-area-93A1bbeG.js → scroll-area-ClZkZxIk.js} +1 -1
- package/dist/elements/chunks/scroll-button-DPE-t3x_.js +1 -0
- package/dist/elements/chunks/{separator-DH2r_ZSZ.js → separator-CeJHQqLW.js} +1 -1
- package/dist/elements/chunks/{settings-BFMOd6yB.js → settings-CqaHgJF9.js} +1 -1
- package/dist/elements/chunks/{settings-group-B3VZKIcz.js → settings-group-CjqjLCOn.js} +1 -1
- package/dist/elements/chunks/share-CyfnNEqp.js +1 -0
- package/dist/elements/chunks/{skeleton-N8BuWYmf.js → skeleton-D8akBnKS.js} +1 -1
- package/dist/elements/chunks/slots-DaNjX0rc.js +1 -0
- package/dist/elements/chunks/{source-w9V0NnBn.js → source-UWCvmVak.js} +1 -1
- package/dist/elements/chunks/{star-DHvACxtm.js → star-DoHFAikQ.js} +1 -1
- package/dist/elements/chunks/store-Cjq0qwYN.js +1 -0
- package/dist/elements/chunks/{tasks-card-lPxoodlA.js → tasks-card-CmZ5xh6v.js} +1 -1
- package/dist/elements/chunks/{text-shimmer-BY_rI3s5.js → text-shimmer-DYn09zrz.js} +1 -1
- package/dist/elements/chunks/textarea-skiGHURM.js +1 -0
- package/dist/elements/chunks/{thumbs-up-DQe0hvkZ.js → thumbs-up-DX2Ijk3H.js} +1 -1
- package/dist/elements/chunks/{toast-store-VUZZBhzH.js → toast-store-CFnQpThX.js} +1 -1
- package/dist/elements/chunks/{tool-C1YtxwPu.js → tool-DKQ2D1DP.js} +1 -1
- package/dist/elements/chunks/{tooltip-BqwnFWhn.js → tooltip-B0G99y8w.js} +1 -1
- package/dist/elements/chunks/{triangle-alert-B6or7F5u.js → triangle-alert-F9cyUEyy.js} +1 -1
- package/dist/elements/chunks/{use-card-resolution-DJg32jGH.js → use-card-resolution-DoA2f_EU.js} +1 -1
- package/dist/elements/chunks/{variant-aurora-QXTZPyST.js → variant-aurora-qt6Zct8M.js} +2 -2
- package/dist/elements/chunks/variant-custom-tJp22_BQ.js +1 -0
- package/dist/{variant-wave-BwzrHD1s.js → elements/chunks/variant-wave-CaQ5ti39.js} +2 -2
- package/dist/elements/chunks/x-B6UnOiLw.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-item.d.ts +1 -0
- package/dist/elements/conversation-item.js +1 -0
- package/dist/elements/conversation-list.js +1 -1
- package/dist/elements/default-input.d.ts +3 -3
- package/dist/elements/define.d.ts +27 -0
- package/dist/elements/diagnostic-events.d.ts +74 -0
- package/dist/elements/dialog.js +1 -1
- package/dist/elements/dock.d.ts +1 -0
- package/dist/elements/dock.js +149 -0
- package/dist/elements/dropdown.d.ts +1 -0
- package/dist/elements/dropdown.js +1 -0
- package/dist/elements/editable-label.js +1 -1
- package/dist/elements/element-diagnostics.d.ts +81 -0
- package/dist/elements/embed.js +1 -1
- package/dist/elements/empty.js +1 -1
- package/dist/elements/feedback-bar.js +1 -1
- package/dist/elements/file-tree.js +1 -1
- package/dist/elements/file-upload.js +1 -1
- package/dist/elements/form.js +1 -1
- package/dist/elements/hover-card.js +1 -1
- package/dist/elements/icon.js +1 -1
- package/dist/elements/image.js +1 -1
- package/dist/elements/input.js +1 -1
- package/dist/elements/kbd.js +1 -1
- package/dist/elements/link-preview.js +1 -1
- package/dist/elements/loader.js +1 -1
- package/dist/elements/markdown.js +1 -1
- package/dist/elements/menu.js +1 -1
- package/dist/elements/message-skills.js +1 -1
- package/dist/elements/message.js +1 -1
- package/dist/elements/model-switcher.js +1 -1
- package/dist/elements/nav.js +1 -1
- package/dist/elements/notice.js +1 -1
- package/dist/elements/pane-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 +2 -0
- package/dist/elements/remote.js +1 -1
- package/dist/elements/resizable.js +1 -1
- package/dist/elements/response-stream.js +3 -3
- package/dist/elements/screen.js +1 -1
- package/dist/elements/scroll-area.js +1 -1
- package/dist/elements/scroll-button.js +1 -1
- package/dist/elements/search.js +1 -1
- package/dist/elements/segmented.js +1 -1
- package/dist/elements/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 +35 -3
- package/dist/elements/source.js +1 -1
- package/dist/elements/status.js +1 -1
- package/dist/elements/switch.js +1 -1
- package/dist/elements/tabs.js +1 -1
- package/dist/elements/tasks.js +1 -1
- package/dist/elements/text-shimmer.js +1 -1
- package/dist/elements/thinking-bar.js +1 -1
- package/dist/elements/thread.js +1 -1
- package/dist/elements/toast.js +1 -1
- package/dist/elements/tool.js +1 -1
- package/dist/elements/tooltip.js +1 -1
- package/dist/elements/voice-input.js +1 -1
- package/dist/elements/voice-output.js +1 -1
- package/dist/elements.d.ts +232 -148
- package/dist/index.d.ts +2 -0
- package/dist/index.js +5456 -4931
- package/dist/index.server.js +4142 -3669
- package/dist/kai-provider.es.js +40 -40
- package/dist/kai.es.js +1 -1
- package/dist/llms/llms-full.txt +184 -69
- package/dist/llms/llms.txt +3 -3
- package/dist/mcp.es.js +2669 -546
- package/dist/primitives/use-resize-observer.d.ts +23 -0
- package/dist/primitives/use-speech-recognition.d.ts +8 -0
- package/dist/primitives/use-text-stream.d.ts +5 -0
- package/dist/react/index.d.ts +115 -266
- package/dist/react.js +247 -221
- package/dist/register-impl-DpE7icIb.js +293 -0
- package/dist/schemas/index.d.ts +1 -1
- package/dist/schemas/tool-defs.d.ts +35 -0
- package/dist/schemas.js +403 -310
- package/dist/{solid-BMuDmFo_.js → solid-BtdqNZI7.js} +8435 -7394
- package/dist/{solid-CGYNdLRR.js → solid-CnavwBye.js} +5987 -5035
- package/dist/solid.d.ts +5 -0
- package/dist/solid.js +210 -203
- package/dist/solid.server.js +210 -203
- package/dist/state/index.d.ts +4 -0
- package/dist/state/persistence.d.ts +51 -0
- package/dist/state/stream.d.ts +50 -0
- package/dist/state/threads.d.ts +71 -0
- package/dist/state.js +269 -169
- package/dist/types.d.ts +4 -2
- package/dist/ui/dock.d.ts +109 -0
- package/dist/ui/hover-card.d.ts +44 -0
- package/dist/{variant-aurora-DwSOfraQ.js → variant-aurora-B8II3-I1.js} +27 -27
- package/dist/{variant-aurora-wKvAQ5wp.js → variant-aurora-CMNWOSJR.js} +28 -28
- package/dist/{variant-aurora-XEkPT0_z.js → variant-aurora-CcuDMWwQ.js} +2 -2
- package/dist/{variant-custom-eFIg2XWQ.js → variant-custom-BdvYC7af.js} +40 -40
- package/dist/{variant-custom-BhS9wIpU.js → variant-custom-C714mqKl.js} +65 -65
- package/dist/variant-custom-L16JLLZy.js +1 -0
- package/dist/{elements/chunks/variant-wave-DDCwhLas.js → variant-wave-2S4La2Ka.js} +2 -2
- package/dist/{variant-wave-CbVsmgwT.js → variant-wave-D7ruiA1W.js} +25 -25
- package/dist/{variant-wave-CUWGx9Bn.js → variant-wave-ecwykeyL.js} +21 -21
- package/dist/wire/chunk.d.ts +47 -0
- package/dist/wire/diagnostics.d.ts +575 -0
- package/dist/wire/encode-probe.d.ts +70 -0
- package/dist/wire/encode.d.ts +24 -0
- package/dist/wire/index.d.ts +2 -0
- package/dist/wire/sse.d.ts +10 -2
- package/dist/wire.js +917 -480
- package/frameworks/react/index.tsx +132 -93
- package/llms-full.txt +184 -69
- package/llms.txt +3 -3
- package/package.json +26 -6
- package/src/agent-tooling/archetypes.ts +41 -9
- package/src/agent-tooling/catalog/README.md +676 -0
- package/src/agent-tooling/catalog/catalog-types.ts +231 -0
- package/src/agent-tooling/catalog/fabrications.ts +96 -0
- package/src/agent-tooling/catalog/invariants.ts +284 -0
- package/src/agent-tooling/catalog/labs-titles.ts +114 -0
- package/src/agent-tooling/catalog/scenarios.ts +87 -0
- package/src/agent-tooling/catalog/surfaces.ts +275 -0
- package/src/agent-tooling/integrations/anthropic.ts +7 -1
- package/src/agent-tooling/integrations/cloudflare.ts +43 -2
- package/src/agent-tooling/integrations/langgraph.ts +7 -1
- package/src/agent-tooling/integrations/mastra.ts +7 -1
- package/src/agent-tooling/integrations/mock.ts +92 -17
- package/src/agent-tooling/integrations/ollama.ts +7 -1
- package/src/agent-tooling/integrations/openai.ts +7 -1
- package/src/agent-tooling/integrations/openrouter.ts +7 -1
- package/src/agent-tooling/integrations/pi.ts +56 -1
- package/src/agent-tooling/integrations/vercel-ai-sdk.ts +7 -1
- package/src/agent-tooling/mcp/css-raw.d.ts +12 -0
- package/src/agent-tooling/mcp/manifest.ts +100 -1
- package/src/agent-tooling/mcp/server.ts +61 -5
- package/src/agent-tooling/mcp/tools/reference.ts +440 -4
- package/src/agent-tooling/mcp/tools/scaffold.ts +1834 -307
- package/src/agent-tooling/mcp/tools/theme.ts +146 -30
- package/src/agent-tooling/mcp/validate-args.ts +141 -0
- package/src/agent-tooling/registry.ts +19 -7
- package/src/agent-tooling/route-emit.ts +26 -2
- package/src/components/attachment-types.ts +47 -1
- package/src/components/attachments.tsx +169 -22
- package/src/components/audio-visualizer/fit-scale.ts +112 -0
- package/src/components/audio-visualizer/index.tsx +80 -3
- package/src/components/audio-visualizer/variant-aurora.tsx +10 -4
- package/src/components/audio-visualizer/variant-bar.tsx +38 -6
- package/src/components/audio-visualizer/variant-custom.tsx +8 -2
- package/src/components/audio-visualizer/variant-grid.tsx +16 -11
- package/src/components/audio-visualizer/variant-radial.tsx +15 -10
- package/src/components/audio-visualizer/variant-wave.tsx +7 -2
- package/src/components/chat-container.tsx +4 -1
- package/src/components/chat-thread.tsx +36 -7
- package/src/components/code-block.tsx +79 -3
- package/src/components/composer.tsx +8 -1
- package/src/components/conversation-item.tsx +114 -4
- package/src/components/conversation-list.tsx +212 -12
- package/src/components/embed.tsx +4 -0
- package/src/components/form.tsx +41 -14
- package/src/components/message.tsx +75 -5
- package/src/components/response-stream.tsx +13 -7
- package/src/components/screen.tsx +5 -0
- package/src/components/scroll-button.tsx +7 -0
- package/src/components/toast.tsx +11 -5
- package/src/components/voice-input.tsx +35 -3
- package/src/components/voice-output.tsx +46 -6
- package/src/components/workspace-shell.tsx +285 -0
- package/src/diagnostics/hook.ts +352 -0
- package/src/diagnostics/index.ts +82 -0
- package/src/diagnostics/report-request.ts +296 -0
- package/src/elements/attachments.tsx +6 -7
- package/src/elements/audio-visualizer.tsx +48 -4
- package/src/elements/chat-workspace.tsx +159 -287
- package/src/elements/chat.tsx +12 -9
- package/src/elements/code-block.tsx +19 -1
- package/src/elements/command.tsx +4 -1
- package/src/elements/compiled.css +1 -1
- package/src/elements/conversation-item.tsx +80 -0
- package/src/elements/conversation-list.tsx +60 -11
- package/src/elements/default-input.tsx +5 -5
- package/src/elements/define.tsx +168 -8
- package/src/elements/diagnostic-events.ts +114 -0
- package/src/elements/dialog.tsx +47 -0
- package/src/elements/disclosure.ts +34 -12
- package/src/elements/dock.tsx +204 -0
- package/src/elements/dropdown.tsx +123 -0
- package/src/elements/element-diagnostics.ts +392 -0
- package/src/elements/element-manifest.json +12 -0
- package/src/elements/element-meta.json +672 -439
- package/src/elements/element-nonscalar.json +170 -0
- package/src/elements/element-types.d.ts +232 -148
- package/src/elements/menu.tsx +13 -0
- package/src/elements/prompt-dock.tsx +2 -1
- package/src/elements/prompt-input.tsx +8 -8
- package/src/elements/register-impl.ts +46 -0
- package/src/elements/register.ts +28 -0
- package/src/elements/resizable.tsx +52 -25
- package/src/elements/scroll-button.tsx +5 -0
- package/src/elements/slots.ts +107 -12
- package/src/elements/styles.css +30 -6
- package/src/elements/thinking-bar.tsx +16 -7
- package/src/elements/toast.tsx +3 -0
- package/src/elements/tool.tsx +26 -5
- package/src/elements/voice-input.tsx +11 -2
- package/src/elements/voice-output.tsx +16 -3
- package/src/index.ts +2 -0
- package/src/primitives/use-resize-observer.ts +33 -0
- package/src/primitives/use-speech-recognition.ts +12 -1
- package/src/primitives/use-stick-to-bottom.ts +34 -2
- package/src/primitives/use-text-stream.ts +33 -2
- package/src/remote/provider-runtime.ts +6 -3
- package/src/schemas/index.ts +1 -0
- package/src/schemas/tool-defs.ts +297 -6
- package/src/solid.ts +5 -0
- package/src/state/index.ts +12 -0
- package/src/state/persistence.ts +180 -0
- package/src/state/stream.ts +71 -4
- package/src/state/threads.ts +142 -0
- package/src/types.ts +4 -2
- package/src/ui/dialog.tsx +6 -0
- package/src/ui/dock.tsx +445 -0
- package/src/ui/dropdown.tsx +67 -23
- package/src/ui/hover-card.tsx +156 -6
- package/src/ui/input.tsx +29 -10
- package/src/ui/resizable.tsx +11 -0
- package/src/wire/chunk.ts +47 -0
- package/src/wire/consume.ts +185 -26
- package/src/wire/diagnostics.ts +727 -0
- package/src/wire/encode-probe.ts +214 -0
- package/src/wire/encode.ts +267 -14
- package/src/wire/formats/anthropic.ts +8 -1
- package/src/wire/formats/openai.ts +5 -0
- package/src/wire/index.ts +22 -0
- package/src/wire/read.ts +250 -6
- package/src/wire/sse.ts +16 -3
- package/dist/elements/chunks/action-icons-DW9muWrY.js +0 -1
- package/dist/elements/chunks/arrow-left-iJVnQmxA.js +0 -1
- package/dist/elements/chunks/attachments-CL6TaqIb.js +0 -1
- package/dist/elements/chunks/audio-visualizer-BuUqQmaO.js +0 -1
- package/dist/elements/chunks/chat-thread-DxoKaStk.js +0 -1
- package/dist/elements/chunks/check-MdLzbxrm.js +0 -1
- package/dist/elements/chunks/chevron-down-MK7IzDqe.js +0 -1
- package/dist/elements/chunks/chevron-right-C5jXhmtV.js +0 -1
- package/dist/elements/chunks/circle-BG7VkPep.js +0 -1
- package/dist/elements/chunks/circle-check-GqvO2UBs.js +0 -1
- package/dist/elements/chunks/code-block-ClhQO9RW.js +0 -1
- package/dist/elements/chunks/collapsible-DBcBkFPh.js +0 -1
- package/dist/elements/chunks/context-hKjNqiyQ.js +0 -1
- package/dist/elements/chunks/conversation-list-CsGJjSKG.js +0 -1
- package/dist/elements/chunks/default-input-B1Mem5wu.js +0 -1
- package/dist/elements/chunks/define-B_tXMYRm.js +0 -1
- package/dist/elements/chunks/disclosure-DAoYOKew.js +0 -1
- package/dist/elements/chunks/dropdown-CmNna5lT.js +0 -1
- package/dist/elements/chunks/embed-CjAD2jSi.js +0 -1
- package/dist/elements/chunks/form-Cp8Y00Wn.js +0 -1
- package/dist/elements/chunks/hover-card-6KtXpLwT.js +0 -1
- package/dist/elements/chunks/icon-97R8SR2p.js +0 -1
- package/dist/elements/chunks/input-DrseEjhp.js +0 -1
- package/dist/elements/chunks/message-CE4k-qaj.js +0 -1
- package/dist/elements/chunks/message-square-C9ovmtOo.js +0 -1
- package/dist/elements/chunks/reasoning-BrxQfpfI.js +0 -1
- package/dist/elements/chunks/scroll-button-CrTo7wm4.js +0 -1
- package/dist/elements/chunks/share-DgNbkJKY.js +0 -1
- package/dist/elements/chunks/slots-CIw9RlAe.js +0 -1
- package/dist/elements/chunks/store-HIPGhNz9.js +0 -1
- package/dist/elements/chunks/textarea-DPfuhswM.js +0 -1
- package/dist/elements/chunks/variant-custom-D5ZlmziF.js +0 -1
- package/dist/elements/chunks/video-Bb86fVYI.js +0 -1
- package/dist/elements/chunks/x-BOhjBeOd.js +0 -1
- package/dist/primitives/card-validate-generator.testlib.d.ts +0 -20
- package/dist/register-impl-DGmGzrEM.js +0 -145
- package/dist/variant-custom-MkTNTycd.js +0 -1
- package/src/primitives/card-validate-generator.testlib.ts +0 -38
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as w,q as k,m as y,j as z,i as g,l as q,c as t,S as c,r as R,M as o,F as x,I as L,a as S,d as B,b as T,t as h,y as P,O as D,e as E}from"./define-B_tXMYRm.js";import{T as G}from"./tooltip-BqwnFWhn.js";import{c as u}from"./cn-CU7UAWzk.js";import{M as H}from"./markdown-DbozyYqa.js";import{B as J}from"./button-B9okqG73.js";import{B as K,a as U}from"./action-icons-DW9muWrY.js";import{R as N,a as O,b as Q}from"./reasoning-BrxQfpfI.js";import{T as V}from"./tool-C1YtxwPu.js";import{A as W,a as X,d as Y,e as Z}from"./attachments-CL6TaqIb.js";import{S as _,a as $,b as ee,c as re}from"./source-w9V0NnBn.js";import{a as te}from"./card-renderer-CSoTL_e1.js";import{c as ne}from"./check-MdLzbxrm.js";var ae=h("<div part=row>"),se=h('<img class="h-full w-full object-cover">'),ie=h("<div part=avatar>"),le=h('<div class="flex h-full w-full items-center justify-center bg-muted text-xs font-medium text-muted-foreground">'),C=h("<div>"),ce=h('<span class="px-1 text-xs">'),oe=h('<span><span class="min-w-0 overflow-hidden">');const ue={user:"User message",assistant:"Assistant message",system:"System message"};function de(e){const[r,n]=w(e,["children","class","role"]);return(()=>{var a=ae();return k(a,y({get class(){return u("flex items-start gap-3",r.class)},get"data-role"(){return r.role},get role(){return r.role?"article":void 0},get"aria-label"(){return z(()=>!!r.role)()?ue[r.role]:void 0}},n),!1,!0),g(a,()=>r.children),a})()}function ge(e){return(()=>{var r=ie();return g(r,t(c,{get when(){return e.src},get fallback(){return t(c,{get when(){return e.fallback},get children(){var n=le();return g(n,()=>e.fallback),n}})},get children(){var n=se();return S(a=>{var s=e.src,l=e.alt??"";return s!==a.e&&B(n,"src",a.e=s),l!==a.t&&B(n,"alt",a.t=l),a},{e:void 0,t:void 0}),n}})),S(()=>T(r,u("h-8 w-8 shrink-0 overflow-hidden rounded-full",e.class))),r})()}function he(e){const[r,n]=w(e,["children","markdown","class","part"]),a=P(),s=()=>u("min-w-0 rounded-lg p-2 text-foreground bg-secondary max-w-none break-words whitespace-normal",D(a.proseSize()),r.class);return t(c,{get when(){return r.markdown},get fallback(){return(()=>{var l=C();return k(l,y({get part(){return r.part},get class(){return s()}},n),!1,!0),g(l,()=>r.children),l})()},get children(){return t(H,{get part(){return r.part},get content(){return r.children},get class(){return s()}})}})}function fe(e){const[r,n]=w(e,["children","class"]);return(()=>{var a=C();return k(a,y({get class(){return u("flex items-center gap-0.5 mt-0.5",r.class)}},n),!1,!0),g(a,()=>r.children),a})()}function pe(e){return typeof e=="string"?{id:e,label:K[e],Icon:U(e)}:{id:e.id,label:e.label,Icon:U(e.icon)}}function me(e){return e==="like"||e==="dislike"?e:void 0}function ve(e){return t(fe,{part:"actions",get class(){return u("mt-1 flex gap-0",e.reveal==="hover"&&"opacity-0 transition-opacity group-hover:opacity-100",e.class)},get children(){return t(x,{get each(){return e.actions},children:r=>{const n=pe(r),a=()=>typeof r!="string"&&r.tooltip?r.tooltip:n.label,s=me(r),l=()=>s!==void 0&&e.activeFeedback===s,b=n.id==="copy",m=()=>b&&e.copied===!0,i=()=>t(J,{variant:"ghost",size:"icon-sm",get class(){return u("rounded-full",l()&&"text-primary")},get"data-action"(){return n.id},get"aria-label"(){return z(()=>!!m())()?"Copied":n.label},get"aria-pressed"(){return s!==void 0?l():void 0},onClick:()=>e.onAction(n.id),get children(){return t(c,{get when(){return m()},get fallback(){return t(c,{get when(){return n.Icon},get fallback(){return(()=>{var d=ce();return g(d,()=>n.label),d})()},children:d=>{const f=d();return t(f,{get class(){return u("size-3.5",l()&&"fill-current")}})}})},get children(){return t(ne,{class:"size-3.5 text-emerald-400"})}})}}),j=()=>t(c,{get when(){return n.Icon},get fallback(){return i()},get children(){return t(G,{get content(){return a()},get children(){return i()}})}});return t(c,{when:s!==void 0,get fallback(){return j()},get children(){return(()=>{const d=()=>e.activeFeedback===void 0||e.activeFeedback===s;return(()=>{var f=oe(),M=f.firstChild;return g(M,j),S(p=>{var A=d()?void 0:"",I=u("grid transition-[grid-template-columns,opacity] duration-300 ease-out",d()?"grid-cols-[1fr] opacity-100":"grid-cols-[0fr] opacity-0");return A!==p.e&&B(f,"data-feedback-collapsed",p.e=A),I!==p.t&&T(f,p.t=I),p},{e:void 0,t:void 0}),f})()})()}})}})}})}function be(e){const r=[];for(const n of e){if(n.type==="file"){const a=r[r.length-1];if(a?.kind==="files"){r[r.length-1]={kind:"files",parts:[...a.parts,n]};continue}r.push({kind:"files",parts:[n]});continue}if(n.type==="source"){const a=r[r.length-1];if(a?.kind==="sources"){r[r.length-1]={kind:"sources",parts:[...a.parts,n]};continue}r.push({kind:"sources",parts:[n]});continue}r.push({kind:"single",part:n})}return r}function we(e){if(e.index!==void 0)return e.index;if(!e.url)return e.title||"Source"}function ke(e){return e.title||e.url||"Source"}function F(e,r){return e.kind===r?e:!1}function v(e,r){return e.type===r?e:!1}function ye(e){const r=q(()=>be(e.parts));return[t(c,{get when(){return e.beforeBody},get children(){return e.beforeBody}}),t(L,{get each(){return r()},children:n=>t(R,{fallback:null,get children(){return[t(o,{get when(){return F(n(),"files")},children:a=>t(W,{variant:"inline",get class(){return e.isUser?"mb-2 justify-end":"mb-2"},get children(){return t(x,{get each(){return a().parts},children:s=>t(X,{get data(){return s.attachment},get children(){return[t(Y,{}),t(Z,{})]}})})}})}),t(o,{get when(){return F(n(),"sources")},children:a=>t(_,{part:"citations",get class(){return e.isUser?"justify-end":void 0},get children(){return t(x,{get each(){return a().parts},children:s=>t($,{get href(){return s.source.url},get children(){return[t(ee,{get label(){return we(s.source)}}),t(re,{get title(){return ke(s.source)},get description(){return s.source.snippet??""}})]}})})}})}),t(o,{get when(){return F(n(),"single")},children:a=>{const s=()=>a().part,l=()=>v(s(),"reasoning"),b=()=>{const i=l();return i!==!1&&i.text===""},m=()=>{const i=l();return i!==!1&&i.text!==""&&i};return t(R,{fallback:null,get children(){return[t(o,{get when(){return v(s(),"text")},children:i=>t(he,{part:"bubble content",get markdown(){return e.markdown},get class(){return e.isUser?"bg-muted text-primary max-w-[85%] rounded-2xl px-4 py-2":"bg-transparent p-0"},get children(){return i().text}})}),t(o,{get when(){return b()},children:null}),t(o,{get when(){return m()},children:i=>t(N,{class:"mb-2 w-full",get children(){return[t(O,{get children(){return i().label??"Reasoning"}}),t(Q,{markdown:!0,get children(){return i().text}})]}})}),t(o,{get when(){return v(s(),"tool")},children:i=>t(V,{get toolPart(){return i().tool},class:"mb-2 w-full"})}),t(o,{get when(){return v(s(),"card")},children:i=>t(te,{get envelope(){return i().envelope},get types(){return e.cardTypes},get schemas(){return e.cardSchemas}})})]}})}})]}})}),t(c,{get when(){var n;return(((n=e.actions)==null?void 0:n.length)??0)>0},get children(){return t(ve,{get actions(){return e.actions},get reveal(){return e.actionsReveal==="hover"?"hover":"always"},get activeFeedback(){return e.activeFeedback},get copied(){return e.copied},onAction:n=>{var a;return(a=e.onAction)==null?void 0:a.call(e,n)}})}}),t(c,{get when(){return e.afterBody},get children(){return e.afterBody}})]}E(["click"]);export{ye as M,de as a,ge as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e}from"./Icon-b5A8hlHs.js";import{c as m,m as o}from"./define-B_tXMYRm.js";var r=[["path",{d:"M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z",key:"1lielz"}]],s=a=>m(e,o(a,{name:"MessageSquare",iconNode:r})),i=s;export{i as m};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{s as v,g as w,k as R,w as A,c as f,i as h,a as x,b,v as O,d as k,q as H,m as S,S as I,t as y,z as E,A as M,h as T,e as q}from"./define-B_tXMYRm.js";import{c as m}from"./cn-CU7UAWzk.js";import{M as B}from"./markdown-DbozyYqa.js";import{c as N}from"./chevron-down-MK7IzDqe.js";const P=1;function D(l,r){let t=-1;const s=new ResizeObserver(d=>{var u;const e=((u=d[d.length-1])==null?void 0:u.contentRect.height)??l.getBoundingClientRect().height;(t<0||Math.abs(e-t)>P)&&(t=e,r(e))});return s.observe(l),()=>s.disconnect()}var F=y("<div>"),J=y("<button type=button><span class=text-primary></span><div>"),K=y("<div style=max-height:0px><div>");const $=E();function z(){const l=M($);if(!l)throw new Error("useReasoningContext must be used within a Reasoning provider");return l}function L(l){var r;const[t]=v(l,["children","class","open","defaultOpen","onOpenChange","isStreaming","disabled","controllerRef"]),[s,d]=w(t.defaultOpen??!1),[u,e]=w(!1),a=()=>t.open!==void 0,i=()=>a()?t.open:s(),n=()=>!!t.disabled,o=c=>{var C;i()!==c&&(a()||d(c),(C=t.onOpenChange)==null||C.call(t,c))};R(()=>{const c=t.isStreaming;c&&!u()&&(a()||d(!0),e(!0)),!c&&u()&&(a()||d(!1),e(!1))}),(r=t.controllerRef)==null||r.call(t,{open:i,setOpen:o});const g=A();let p;return f($.Provider,{value:{isOpen:i,onOpenChange:o,disabled:n,contentId:g,registerTrigger:c=>{p=c},trigger:()=>p},get children(){var c=F();return h(c,()=>t.children),x(()=>b(c,t.class)),c}})}function Q(l){const[r,t]=v(l,["children","class","ref"]),{isOpen:s,onOpenChange:d,disabled:u,contentId:e,registerTrigger:a}=z();return(()=>{var i=J(),n=i.firstChild,o=n.nextSibling;return i.$$click=()=>{u()||d(!s())},O(g=>{a(g),typeof r.ref=="function"&&r.ref(g)},i),k(i,"aria-controls",e),H(i,S({get class(){return m("flex cursor-pointer items-center gap-2 text-meta",r.class)},get disabled(){return u()||void 0},get"aria-expanded"(){return s()},get"data-expanded"(){return s()?"":void 0},get"data-closed"(){return s()?void 0:""},get"data-state"(){return s()?"open":"closed"}},t),!1,!0),h(n,()=>r.children),h(o,f(N,{class:"size-4"})),x(()=>b(o,m("transform transition-transform",s()?"rotate-180":""))),i})()}function _(l){const[r,t]=v(l,["children","class","contentClass","markdown"]),{isOpen:s,contentId:d,trigger:u}=z();let e,a;const i=()=>{var n;if(!e)return;const o=e.getRootNode().activeElement;o&&e.contains(o)&&((n=u())==null||n.focus())};return R(()=>{if(!e||!a)return;const n=D(a,()=>{e&&a&&s()&&(e.style.maxHeight=`${a.scrollHeight}px`)});s()?(e.style.maxHeight=`${a.scrollHeight}px`,e.removeAttribute("inert")):(e.style.maxHeight="0px",i(),e.setAttribute("inert","")),T(n)}),(()=>{var n=K(),o=n.firstChild,g=e;typeof g=="function"?O(g,n):e=n,k(n,"id",d),H(n,S({get class(){return m("overflow-hidden transition-[max-height] duration-150 ease-out",r.class)},get"data-state"(){return s()?"open":"closed"}},t),!1,!0);var p=a;return typeof p=="function"?O(p,o):a=o,h(o,f(I,{get when(){return r.markdown},get fallback(){return r.children},get children(){return f(B,{get content(){return r.children}})}})),x(()=>b(o,m("text-muted-foreground text-body",r.contentClass))),n})()}q(["click"]);export{L as R,Q as a,_ as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{c as i}from"./cn-CU7UAWzk.js";import{B}from"./button-B9okqG73.js";import{g as x,h as C,s as u,c as f,v as T,q as m,m as h,i as g,t as d,z as y,A}from"./define-B_tXMYRm.js";import{c as E}from"./chevron-down-MK7IzDqe.js";const H=50;function L(){const[t,o]=x(!0);let r,e=!0;function a(){if(!r)return;const{scrollTop:s,scrollHeight:c,clientHeight:w}=r,v=c-s-w<H;o(v),e=v}function l(s="smooth"){r&&(r.scrollTo({top:r.scrollHeight,behavior:s}),e=!0,o(!0))}function n(){e&&requestAnimationFrame(()=>l("instant"))}function b(s){r=s,s.addEventListener("scroll",a,{passive:!0});const c=new MutationObserver(n);c.observe(s,{childList:!0,subtree:!0,characterData:!0}),C(()=>{s.removeEventListener("scroll",a),c.disconnect()})}return{ref:b,isAtBottom:t,scrollToBottom:l}}var k=d("<div role=log tabindex=0>"),q=d("<div>"),z=d("<div aria-hidden=true>");const p=y();function S(){const t=A(p);if(!t)throw new Error("useChatContainer must be used within ChatContainer");return t}function D(t){const[o,r]=u(t,["children","class"]),{ref:e,isAtBottom:a,scrollToBottom:l}=L();return f(p.Provider,{value:{isAtBottom:a,scrollToBottom:l},get children(){var n=k();return T(e,n),m(n,h({get class(){return i("flex flex-col overflow-y-auto",o.class)}},r),!1,!0),g(n,()=>o.children),n}})}function F(t){const[o,r]=u(t,["children","class"]);return(()=>{var e=q();return m(e,h({get class(){return i("flex w-full flex-col",o.class)}},r),!1,!0),g(e,()=>o.children),e})()}function I(t){const[o,r]=u(t,["class"]);return(()=>{var e=z();return m(e,h({get class(){return i("h-px w-full shrink-0 scroll-mt-4",o.class)}},r),!1,!1),e})()}function M(t){const{isAtBottom:o,scrollToBottom:r}=S();return f(B,{get variant(){return t.variant??"outline"},get size(){return t.size??"sm"},"aria-label":"Scroll to bottom",get class(){return i("h-10 w-10 rounded-full transition-all duration-150 ease-out",o()?"pointer-events-none translate-y-4 scale-95 opacity-0":"translate-y-0 scale-100 opacity-100",t.class)},onClick:()=>r(),get children(){return f(E,{class:"h-5 w-5"})}})}export{D as C,M as S,F as a,I as b};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e}from"./Icon-b5A8hlHs.js";import{c as o,m as y}from"./define-B_tXMYRm.js";var h=[["path",{d:"m19 21-7-4-7 4V5a2 2 0 0 1 2-2h10a2 2 0 0 1 2 2v16z",key:"1fy3hk"}]],i=a=>o(e,y(a,{name:"Bookmark",iconNode:h})),m=i,n=[["rect",{width:"14",height:"14",x:"8",y:"8",rx:"2",ry:"2",key:"17jyea"}],["path",{d:"M4 16c-1.1 0-2-.9-2-2V4c0-1.1.9-2 2-2h10c1.1 0 2 .9 2 2",key:"zix9uf"}]],c=a=>o(e,y(a,{name:"Copy",iconNode:n})),p=c,s=[["path",{d:"M4 15s1-1 4-1 5 2 8 2 4-1 4-1V3s-1 1-4 1-5-2-8-2-4 1-4 1z",key:"i9b6wo"}],["line",{x1:"4",x2:"4",y1:"22",y2:"15",key:"1cm3nv"}]],k=a=>o(e,y(a,{name:"Flag",iconNode:s})),t=k,d=[["path",{d:"M21.174 6.812a1 1 0 0 0-3.986-3.987L3.842 16.174a2 2 0 0 0-.5.83l-1.321 4.352a.5.5 0 0 0 .623.622l4.353-1.32a2 2 0 0 0 .83-.497z",key:"1a8usu"}],["path",{d:"m15 5 4 4",key:"1mk7zo"}]],r=a=>o(e,y(a,{name:"Pencil",iconNode:d})),x=r,l=[["path",{d:"M4 12v8a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-8",key:"1b2hhj"}],["polyline",{points:"16 6 12 2 8 6",key:"m901s6"}],["line",{x1:"12",x2:"12",y1:"2",y2:"15",key:"1p0rca"}]],f=a=>o(e,y(a,{name:"Share",iconNode:l})),v=f;export{m as b,p as c,t as f,x as p,v as s};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
const a=[{name:"header-start",mode:"inject",doc:"Leading header controls, left of the title."},{name:"header-end",mode:"inject",doc:"Trailing header controls."},{name:"header",mode:"replace",part:!0,doc:"Full custom header; replaces the built-in title/model/context bar."},{name:"sidebar",mode:"inject",part:!0,doc:"Left column (your nav / conversation list). Fixed width; use compose-your-own for resizable."},{name:"empty",mode:"replace",doc:"Custom zero-state rendered in the message area while the thread is empty. Replaces the empty message list only; the composer and any suggestions still render."},{name:"composer",mode:"replace",doc:"Full custom composer; you own submit + loading, drive the thread via messages."},{name:"composer-actions",mode:"inject",doc:"Accessory row above the composer."},{name:"footer",mode:"inject",part:!0,doc:"Row below the composer (disclaimers, token meter)."}],n=[{name:"header",mode:"replace",doc:'Full custom title bar; replaces the built-in toggle / "Chats" / New-chat row.'},{name:"empty",mode:"replace",doc:'Custom zero-state shown when there are no conversations; replaces the built-in "No conversations yet".'},{name:"footer",mode:"inject",doc:"A row below the list: account, settings, or usage."}],s=[{name:"before-body",mode:"inject",doc:"A per-message header at the TOP of the body, above reasoning/tools/content: a model-name label, a role + timestamp line."},{name:"after-body",mode:"inject",doc:"A row at the BOTTOM of the body, below the action bar: a citation/sources row, a token-cost/latency line."},{name:"avatar",mode:"replace",part:!0,doc:'Replaces the built-in avatar rail with your own node. Use `avatar="none"` to omit the rail and let the body span the full row.'}],c=[{name:"sidebar-header",mode:"inject",doc:"Top of the conversation rail (brand, a kai-tabs strip)."},{name:"sidebar-footer",mode:"inject",doc:"Bottom of the rail: an upgrade card, a Design trigger, a user-menu cluster."},{name:"main-header",mode:"inject",doc:"Top of the main region (a top-placed banner or a corner action)."},{name:"main",mode:"replace",doc:"Replace the built-in chat thread with your own main view (a home or dashboard screen). Omit to keep the thread."}],d=[{name:"empty",mode:"replace",doc:"Custom zero-state rendered in the message area while the thread is empty; replaces the built-in default."}];function i(t,r=a){const e={};for(const o of r)e[o.name]=!!t.querySelector(`:scope > [slot="${o.name}"]`);return e}export{a as C,s as M,d as T,c as W,n as a,i as r};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{$ as u,J as K,K as P,L as w,g as z}from"./define-B_tXMYRm.js";const h=Symbol("store-raw"),y=Symbol("store-node"),f=Symbol("store-has"),m=Symbol("store-self");function v(t){let r=t[u];if(!r&&(Object.defineProperty(t,u,{value:r=new Proxy(t,J)}),!Array.isArray(t))){const o=Object.keys(t),e=Object.getOwnPropertyDescriptors(t),c=Object.getPrototypeOf(t),n=c!==null&&t!==null&&typeof t=="object"&&!Array.isArray(t)&&c!==Object.prototype;if(n){const i=Object.getOwnPropertyDescriptors(c);o.push(...Object.keys(i)),Object.assign(e,i)}for(let i=0,l=o.length;i<l;i++){const s=o[i];n&&s==="constructor"||e[s].get&&Object.defineProperty(t,s,{configurable:!0,enumerable:e[s].enumerable,get:e[s].get.bind(r)})}}return r}function g(t){let r;return t!=null&&typeof t=="object"&&(t[u]||!(r=Object.getPrototypeOf(t))||r===Object.prototype||Array.isArray(t))}function a(t,r=new Set){let o,e,c,n;if(o=t!=null&&t[h])return o;if(!g(t)||r.has(t))return t;if(Array.isArray(t)){Object.isFrozen(t)?t=t.slice(0):r.add(t);for(let i=0,l=t.length;i<l;i++)c=t[i],(e=a(c,r))!==c&&(t[i]=e)}else{Object.isFrozen(t)?t=Object.assign({},t):r.add(t);const i=Object.keys(t),l=Object.getOwnPropertyDescriptors(t);for(let s=0,d=i.length;s<d;s++)n=i[s],!l[n].get&&(c=t[n],(e=a(c,r))!==c&&(t[n]=e))}return t}function _(t,r){let o=t[r];return o||Object.defineProperty(t,r,{value:o=Object.create(null)}),o}function b(t,r,o){if(t[r])return t[r];const[e,c]=z(o,{equals:!1,internal:!0});return e.$=c,t[r]=e}function F(t,r){const o=Reflect.getOwnPropertyDescriptor(t,r);return!o||o.get||!o.configurable||r===u||r===y||(delete o.value,delete o.writable,o.get=()=>t[u][r]),o}function $(t){w()&&b(_(t,y),m)()}function R(t){return $(t),Reflect.ownKeys(t)}const J={get(t,r,o){if(r===h)return t;if(r===u)return o;if(r===P)return $(t),o;const e=_(t,y),c=e[r];let n=c?c():t[r];if(r===y||r===f||r==="__proto__")return n;if(!c){const i=Object.getOwnPropertyDescriptor(t,r);w()&&(typeof n!="function"||t.hasOwnProperty(r))&&!(i&&i.get)&&(n=b(e,r,n)())}return g(n)?v(n):n},has(t,r){return r===h||r===u||r===P||r===y||r===f||r==="__proto__"?!0:(w()&&b(_(t,f),r)(),r in t)},set(){return!0},deleteProperty(){return!0},ownKeys:R,getOwnPropertyDescriptor:F};function p(t,r,o,e=!1){if(r==="__proto__"||!e&&t[r]===o)return;const c=t[r],n=t.length;o===void 0?(delete t[r],t[f]&&t[f][r]&&c!==void 0&&t[f][r].$()):(t[r]=o,t[f]&&t[f][r]&&c===void 0&&t[f][r].$());let i=_(t,y),l;if((l=b(i,r,c))&&l.$(()=>o),Array.isArray(t)&&t.length!==n){for(let s=t.length;s<n;s++)(l=i[s])&&l.$();(l=b(i,"length",n))&&l.$(t.length)}(l=i[m])&&l.$()}function D(t,r){const o=Object.keys(r);for(let e=0;e<o.length;e+=1){const c=o[e];k(c)||p(t,c,r[c])}}function k(t){return t==="__proto__"||t==="constructor"||t==="prototype"}function L(t,r){if(typeof r=="function"&&(r=r(t)),r=a(r),Array.isArray(r)){if(t===r)return;let o=0,e=r.length;for(;o<e;o++){const c=r[o];t[o]!==c&&p(t,o,c)}p(t,"length",e)}else D(t,r)}function O(t,r,o=[]){let e,c=t;if(r.length>1){e=r.shift();const i=typeof e,l=Array.isArray(t);if(i==="string"&&(e==="__proto__"||r.length>1&&k(e)))return;if(Array.isArray(e)){for(let s=0;s<e.length;s++)O(t,[e[s]].concat(r),o);return}else if(l&&i==="function"){for(let s=0;s<t.length;s++)e(t[s],s)&&O(t,[s].concat(r),o);return}else if(l&&i==="object"){const{from:s=0,to:d=t.length-1,by:x=1}=e;for(let A=s;A<=d;A+=x)O(t,[A].concat(r),o);return}else if(r.length>1){O(t[e],r,[e].concat(o));return}c=t[e],o=[e].concat(o)}let n=r[0];typeof n=="function"&&(n=n(c,o),n===c)||e===void 0&&n==null||(n=a(n),e===void 0||g(c)&&g(n)&&!Array.isArray(n)?D(c,n):p(t,e,n))}function W(...[t,r]){const o=a(t||{}),e=Array.isArray(o),c=v(o);function n(...i){K(()=>{e&&i.length===1?L(o,i[0]):O(o,i)})}return[c,n]}const j=new WeakMap,S={get(t,r){if(r===h)return t;const o=t[r];if(r===u||r===P||r===y||r===f||r==="__proto__")return o;let e;return g(o)?j.get(o)||(j.set(o,e=new Proxy(o,S)),e):o},set(t,r,o){return p(t,r,a(o)),!0},deleteProperty(t,r){return p(t,r,void 0,!0),!0}};function q(t){return r=>{if(g(r)){let o;(o=j.get(r))||j.set(r,o=new Proxy(r,S)),t(o)}return r}}export{W as c,q as p,a as u};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{h as s,s as a,v as u,q as l,m as f,t as g}from"./define-B_tXMYRm.js";import{c as m}from"./cn-CU7UAWzk.js";function c(i={}){let e;function r(){if(!e)return;e.style.height="auto";const t=e.scrollHeight;i.maxHeight&&t>i.maxHeight?(e.style.height=`${i.maxHeight}px`,e.style.overflowY="auto"):(e.style.height=`${t}px`,e.style.overflowY="hidden")}function n(t){e=t,t.addEventListener("input",r),requestAnimationFrame(r),s(()=>t.removeEventListener("input",r))}return{ref:n,resize:r}}var h=g("<textarea rows=1>");function d(i){const[e,r]=a(i,["class","maxHeight","autoResize"]),{ref:n}=c({maxHeight:e.maxHeight});return(()=>{var t=h(),o=e.autoResize!==!1?n:void 0;return typeof o=="function"&&u(o,t),l(t,f({get class(){return m("w-full resize-none rounded-md bg-transparent text-sm text-foreground placeholder:text-muted-foreground focus-visible:outline-none focus-visible:ring-1 focus-visible:ring-ring",e.class)}},r),!1,!1),t})()}export{d as T};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{k as h,l as z,c,S as g,i as w,a as d,d as m,b as p,p as y,t as S}from"./define-B_tXMYRm.js";import{c as x,S as M,h as A,D as N}from"./create-tween-CUrM6D_o.js";import{s as j,C}from"./audio-visualizer-BuUqQmaO.js";var b=S("<div>");const E={"1f":!0,"1i":!0,"1fv":!0,"2f":!0,"3f":!0,"3fv":!0,"4f":!0,"4fv":!0,Matrix2fv:!0,Matrix3fv:!0,Matrix4fv:!0},F=new Set(["1f","1i"]),O={"2f":2,"3f":3,"4f":4,Matrix2fv:4,Matrix3fv:9,Matrix4fv:16};function U(r,e){if(e==null||typeof e!="object")return`uniform "${r}" is not a valid declaration (expected an object with "type" and "value").`;if(E[e.type]!==!0)return`uniform "${r}" has an unrecognized type "${String(e.type)}".`;if(F.has(e.type))return typeof e.value!="number"||!Number.isFinite(e.value)?`uniform "${r}" is declared "${e.type}" (a number) but its value is not a finite number.`:void 0;if(!Array.isArray(e.value)||e.value.some(s=>typeof s!="number"||!Number.isFinite(s)))return`uniform "${r}" is declared "${e.type}" (an array) but its value is not an array of finite numbers.`;const o=O[e.type];if(o!==void 0&&e.value.length!==o)return`uniform "${r}" is declared "${e.type}", which takes exactly ${o} numbers, but its value has ${e.value.length}.`}function $(r,e){const o=r.bands.length?r.bands:[0],s={uColor:{type:"3fv",value:A(r.color)},uIntensity:{type:"1f",value:r.intensity},uSpeed:{type:"1f",value:r.speed},uComplexity:{type:"1f",value:r.complexity},uVolume:{type:"1f",value:r.volume},uBands:{type:"1fv",value:o,arraySize:o.length}};if(!e)return s;for(const[l,v]of Object.entries(e)){const a=U(l,v);if(a)throw new Error(a)}return{...s,...e}}function V(r){const e=x(.3),o=x(1);h(()=>{const a=j(r.state);if(r.state==="speaking")e.to(.3+.7*r.volume,{duration:0});else{const t=r.frozen?{duration:0}:{duration:.5,ease:"easeOut"};e.to(Array.isArray(a.intensity)&&r.frozen?a.intensity[0]:a.intensity,t)}o.to(r.frozen?0:a.speed,{duration:0})});const s=z(()=>{var a;try{return{uniforms:$({color:r.color??N,intensity:e.value(),speed:o.value(),complexity:r.complexity??.5,volume:r.volume,bands:r.bands},(a=r.shader)==null?void 0:a.uniforms)}}catch(t){return{error:t instanceof Error?t.message:String(t)}}});let l=!1;h(()=>{const{error:a}=s();if(!a){l=!1;return}l||(l=!0,console.error(`<kai-audio-visualizer variant="custom">: ${a}`),r.onUnavailable())});const v=()=>({height:`${C[r.size]}px`,"aspect-ratio":"1"});return c(g,{get when(){var a;return(a=r.shader)==null?void 0:a.fragment},get fallback(){return(()=>{var a=b();return d(t=>{var n=r.state,i=r.class,u=v();return n!==t.e&&m(a,"data-kai-state",t.e=n),i!==t.t&&p(a,t.t=i),t.a=y(a,u,t.a),t},{e:void 0,t:void 0,a:void 0}),a})()},children:a=>c(g,{get when(){return s().uniforms},get fallback(){return(()=>{var t=b();return d(n=>{var i=r.state,u=r.class,f=v();return i!==n.e&&m(t,"data-kai-state",n.e=i),u!==n.t&&p(t,n.t=u),n.a=y(t,f,n.a),n},{e:void 0,t:void 0,a:void 0}),t})()},children:t=>(()=>{var n=b();return w(n,c(M,{get fragment(){return a()},get precision(){return r.size==="icon"||r.size==="sm"?"mediump":"highp"},get uniforms(){return t()},get animateWhenNotVisible(){return r.animateWhenNotVisible},onError:i=>{/not available/i.test(i)?console.warn('<kai-audio-visualizer variant="custom">: shader unavailable',i):console.error('<kai-audio-visualizer variant="custom">: shader error',i),r.onUnavailable()}})),d(i=>{var u=r.state,f=r.class,k=v();return u!==i.e&&m(n,"data-kai-state",i.e=u),f!==i.t&&p(n,i.t=f),i.a=y(n,k,i.a),i},{e:void 0,t:void 0,a:void 0}),n})()})})}export{$ as customUniforms,V as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as e}from"./Icon-b5A8hlHs.js";import{c as m,m as o}from"./define-B_tXMYRm.js";var r=[["path",{d:"m16 13 5.223 3.482a.5.5 0 0 0 .777-.416V7.87a.5.5 0 0 0-.752-.432L16 10.5",key:"ftymec"}],["rect",{x:"2",y:"6",width:"14",height:"12",rx:"2",key:"158x01"}]],t=a=>m(e,o(a,{name:"Video",iconNode:r})),i=t;export{i as v};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{I as m}from"./Icon-b5A8hlHs.js";import{c as o,m as r}from"./define-B_tXMYRm.js";var e=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],t=a=>o(m,r(a,{name:"X",iconNode:e})),p=t;export{p as x};
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
/** One keyword the projection could not account for, with where it was found. */
|
|
2
|
-
export interface UnclassifiedKeyword {
|
|
3
|
-
path: string;
|
|
4
|
-
keyword: string;
|
|
5
|
-
}
|
|
6
|
-
export interface CardValidationGenerator {
|
|
7
|
-
CARD_TYPES: string[];
|
|
8
|
-
STRIPPED: Readonly<Record<string, string>>;
|
|
9
|
-
NOT_ENFORCED: Readonly<Record<string, string>>;
|
|
10
|
-
OUT_FILE: string;
|
|
11
|
-
enforcedKeywords(source?: string): Set<string>;
|
|
12
|
-
scanUnclassified(doc: unknown, enforced: Set<string>): UnclassifiedKeyword[];
|
|
13
|
-
projectSchema(doc: unknown, enforced: Set<string>): Record<string, unknown> | undefined;
|
|
14
|
-
build(): {
|
|
15
|
-
enforced: Set<string>;
|
|
16
|
-
projections: Record<string, unknown>;
|
|
17
|
-
source: string;
|
|
18
|
-
};
|
|
19
|
-
}
|
|
20
|
-
export declare function loadGenerator(): Promise<CardValidationGenerator>;
|