@kitn.ai/ui 0.15.0 → 0.16.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 +9 -0
- package/bin/mcp.js +22 -0
- package/dist/bash-InADTalH.js +6 -1
- package/dist/components/artifact.d.ts +58 -0
- package/dist/components/attachments.d.ts +67 -0
- package/dist/components/card-fallback.d.ts +10 -0
- package/dist/components/card-renderer.d.ts +13 -0
- package/dist/components/card.d.ts +28 -0
- package/dist/components/chain-of-thought.d.ts +29 -0
- package/dist/components/chat-container.d.ts +19 -0
- package/dist/components/chat-scope-picker.d.ts +9 -0
- package/dist/components/chat-thread.d.ts +93 -0
- package/dist/components/checkpoint.d.ts +20 -0
- package/dist/components/choice-card.d.ts +77 -0
- package/dist/components/code-block.d.ts +16 -0
- package/dist/components/confirm-card.d.ts +57 -0
- package/dist/components/context.d.ts +65 -0
- package/dist/components/conversation-item.d.ts +8 -0
- package/dist/components/conversation-list.d.ts +11 -0
- package/dist/components/embed.d.ts +21 -0
- package/dist/components/empty.d.ts +43 -0
- package/dist/components/feedback-bar.d.ts +45 -0
- package/dist/components/file-tree.d.ts +57 -0
- package/dist/components/file-upload.d.ts +16 -0
- package/dist/components/form-widgets.d.ts +31 -0
- package/dist/components/form.d.ts +103 -0
- package/dist/components/image.d.ts +12 -0
- package/dist/components/link-preview.d.ts +23 -0
- package/dist/components/loader.d.ts +60 -0
- package/dist/components/markdown.d.ts +8 -0
- package/dist/components/message-skills.d.ts +15 -0
- package/dist/components/message.d.ts +54 -0
- package/dist/components/model-switcher.d.ts +8 -0
- package/dist/components/prompt-input.d.ts +38 -0
- package/dist/components/prompt-suggestion.d.ts +13 -0
- package/dist/components/reasoning.d.ts +20 -0
- package/dist/components/response-stream.d.ts +14 -0
- package/dist/components/scroll-button.d.ts +7 -0
- package/dist/components/slash-command.d.ts +15 -0
- package/dist/components/source.d.ts +23 -0
- package/dist/components/tasks-card.d.ts +71 -0
- package/dist/components/text-shimmer.d.ts +9 -0
- package/dist/components/thinking-bar.d.ts +10 -0
- package/dist/components/tool.d.ts +16 -0
- package/dist/components/use-card-resolution.d.ts +12 -0
- package/dist/components/voice-input.d.ts +7 -0
- package/dist/core-AYMC6_lb.js +5874 -12
- package/dist/css-M7EaDHN_.js +6 -1
- package/dist/elements/artifact.d.ts +1 -0
- package/dist/elements/attachments.d.ts +1 -0
- package/dist/elements/card.d.ts +1 -0
- package/dist/elements/cards.d.ts +0 -0
- package/dist/elements/chain-of-thought.d.ts +13 -0
- package/dist/elements/chat-scope-picker.d.ts +1 -0
- package/dist/elements/chat-types.d.ts +41 -0
- package/dist/elements/chat-workspace.d.ts +1 -0
- package/dist/elements/chat.d.ts +1 -0
- package/dist/elements/checkpoint.d.ts +1 -0
- package/dist/elements/choice.d.ts +1 -0
- package/dist/elements/code-block.d.ts +1 -0
- package/dist/elements/confirm-card.d.ts +1 -0
- package/dist/elements/context-meter.d.ts +1 -0
- package/dist/elements/conversation-list.d.ts +11 -0
- package/dist/elements/css.d.ts +1 -0
- package/dist/elements/default-input.d.ts +40 -0
- package/dist/elements/define.d.ts +42 -0
- package/dist/elements/embed.d.ts +1 -0
- package/dist/elements/empty.d.ts +1 -0
- package/dist/elements/feedback-bar.d.ts +1 -0
- package/dist/elements/file-tree.d.ts +1 -0
- package/dist/elements/file-upload.d.ts +1 -0
- package/dist/elements/form.d.ts +1 -0
- package/dist/elements/image.d.ts +1 -0
- package/dist/elements/link-preview.d.ts +1 -0
- package/dist/elements/loader.d.ts +1 -0
- package/dist/elements/markdown.d.ts +1 -0
- package/dist/elements/message-skills.d.ts +17 -0
- package/dist/elements/message.d.ts +1 -0
- package/dist/elements/model-switcher.d.ts +11 -0
- package/dist/elements/popover.d.ts +1 -0
- package/dist/elements/prompt-input.d.ts +9 -0
- package/dist/elements/prompt-suggestions.d.ts +7 -0
- package/dist/elements/reasoning.d.ts +1 -0
- package/dist/elements/register-impl.d.ts +0 -0
- package/dist/elements/register.d.ts +3 -0
- package/dist/elements/remote.d.ts +1 -0
- package/dist/elements/resizable.d.ts +17 -0
- package/dist/elements/response-stream.d.ts +1 -0
- package/dist/elements/scroll-button.d.ts +1 -0
- package/dist/elements/source.d.ts +18 -0
- package/dist/elements/switch.d.ts +1 -0
- package/dist/elements/tasks.d.ts +1 -0
- package/dist/elements/text-shimmer.d.ts +1 -0
- package/dist/elements/thinking-bar.d.ts +1 -0
- package/dist/elements/tool.d.ts +1 -0
- package/dist/elements/voice-input.d.ts +1 -0
- package/dist/elements.d.ts +732 -0
- package/dist/engine-javascript-vq0WuIJl.js +2516 -14
- package/dist/github-dark-dimmed-DUshB20C.js +4 -1
- package/dist/github-light-JYsPkUQd.js +4 -1
- package/dist/html-CPZ3oZQ7.js +10 -1
- package/dist/index.d.ts +112 -2
- package/dist/index.js +13551 -0
- package/dist/javascript-C25yR2R2.js +6 -1
- package/dist/json-DxJze_jm.js +6 -1
- package/dist/kitn-chat.es.js +1 -77
- package/dist/llms/llms-full.txt +1 -1
- package/dist/llms/llms.txt +1 -1
- package/dist/mcp.es.js +2140 -0
- package/dist/primitives/card-contract.d.ts +103 -0
- package/dist/primitives/card-host.d.ts +12 -0
- package/dist/primitives/card-registry.d.ts +17 -0
- package/dist/primitives/card-resolution.d.ts +8 -0
- package/dist/primitives/card-routing.d.ts +12 -0
- package/dist/primitives/card-validate.d.ts +25 -0
- package/dist/primitives/chat-config.d.ts +31 -0
- package/dist/primitives/controllable.d.ts +13 -0
- package/dist/primitives/embed-providers.d.ts +65 -0
- package/dist/primitives/highlighter.d.ts +23 -0
- package/dist/primitives/link-preview.d.ts +47 -0
- package/dist/primitives/pdf-preview.d.ts +50 -0
- package/dist/primitives/use-auto-resize.d.ts +8 -0
- package/dist/primitives/use-resize-observer.d.ts +1 -0
- package/dist/primitives/use-stick-to-bottom.d.ts +5 -0
- package/dist/primitives/use-text-stream.d.ts +19 -0
- package/dist/primitives/use-voice-recorder.d.ts +9 -0
- package/dist/react/index.d.ts +1118 -0
- package/dist/react/runtime.d.ts +15 -0
- package/dist/react.js +265 -0
- package/dist/register-impl-wCsFPoh9.js +77 -0
- package/dist/register-ujhr1nBS.js +1 -0
- package/dist/remote/host-embed.d.ts +33 -0
- package/dist/remote/index.d.ts +2 -0
- package/dist/remote/origin.d.ts +5 -0
- package/dist/remote/provider-runtime.d.ts +27 -0
- package/dist/remote/provider.d.ts +2 -0
- package/dist/remote/validate.d.ts +4 -0
- package/dist/remote/version.d.ts +4 -0
- package/dist/remote/wire.d.ts +53 -0
- package/dist/svelte--5p79yCD.js +15 -1
- package/dist/tsx-B8rCNbgL.js +6 -1
- package/dist/types.d.ts +42 -0
- package/dist/typescript-RycA9KXf.js +6 -1
- package/dist/ui/action-icons.d.ts +11 -0
- package/dist/ui/avatar.d.ts +8 -0
- package/dist/ui/badge.d.ts +9 -0
- package/dist/ui/button.d.ts +10 -0
- package/dist/ui/collapsible.d.ts +27 -0
- package/dist/ui/dropdown.d.ts +20 -0
- package/dist/ui/hover-card.d.ts +28 -0
- package/dist/ui/overlay.d.ts +67 -0
- package/dist/ui/popover.d.ts +32 -0
- package/dist/ui/resizable.d.ts +76 -0
- package/dist/ui/scroll-area.d.ts +5 -0
- package/dist/ui/separator.d.ts +5 -0
- package/dist/ui/skeleton.d.ts +5 -0
- package/dist/ui/switch.d.ts +19 -0
- package/dist/ui/textarea.d.ts +6 -0
- package/dist/ui/tooltip.d.ts +8 -0
- package/dist/utils/cn.d.ts +2 -0
- package/dist/vue-BmIZj4XD.js +33 -1
- package/frameworks/react/index.tsx +4 -0
- package/frameworks/react/runtime.tsx +16 -2
- package/llms-full.txt +1 -1
- package/llms.txt +1 -1
- package/package.json +29 -11
- package/src/agent-tooling/archetypes.ts +46 -0
- package/src/agent-tooling/integrations/cloudflare.ts +88 -0
- package/src/agent-tooling/integrations/langgraph.ts +60 -0
- package/src/agent-tooling/integrations/mastra.ts +27 -0
- package/src/agent-tooling/integrations/mock.ts +34 -0
- package/src/agent-tooling/integrations/ollama.ts +47 -0
- package/src/agent-tooling/integrations/openrouter.ts +26 -0
- package/src/agent-tooling/integrations/pi.ts +40 -0
- package/src/agent-tooling/integrations/pydantic-ai.ts +52 -0
- package/src/agent-tooling/integrations/vercel-ai-sdk.ts +44 -0
- package/src/agent-tooling/mcp/manifest.ts +128 -0
- package/src/agent-tooling/mcp/server.ts +59 -0
- package/src/agent-tooling/mcp/stdio.ts +18 -0
- package/src/agent-tooling/mcp/tools/debug.ts +305 -0
- package/src/agent-tooling/mcp/tools/reference.ts +132 -0
- package/src/agent-tooling/mcp/tools/scaffold.ts +1627 -0
- package/src/agent-tooling/mcp/tools/theme.ts +340 -0
- package/src/agent-tooling/mcp/tools/types.ts +14 -0
- package/src/agent-tooling/registry.ts +41 -0
- package/src/agent-tooling/types.ts +30 -0
- package/src/elements/compiled.css +1 -1
- package/src/elements/define.tsx +7 -1
- package/src/elements/element-types.d.ts +2 -1
- package/src/elements/register-impl.ts +55 -0
- package/src/elements/register.ts +17 -51
- package/theme.css +4 -2
- package/src/components/artifact.stories.tsx +0 -138
- package/src/components/attachments.stories.tsx +0 -303
- package/src/components/attachments.test.tsx +0 -64
- package/src/components/chain-of-thought.stories.tsx +0 -211
- package/src/components/chat-container.stories.tsx +0 -187
- package/src/components/chat-thread.test.tsx +0 -58
- package/src/components/checkpoint.stories.tsx +0 -102
- package/src/components/code-block.stories.tsx +0 -150
- package/src/components/confirm-card.stories.tsx +0 -74
- package/src/components/context.stories.tsx +0 -229
- package/src/components/context.test.tsx +0 -133
- package/src/components/conversation-item.stories.tsx +0 -125
- package/src/components/conversation-list.stories.tsx +0 -133
- package/src/components/default-input.test.tsx +0 -111
- package/src/components/empty.stories.tsx +0 -434
- package/src/components/feedback-bar.stories.tsx +0 -138
- package/src/components/feedback-bar.test.tsx +0 -103
- package/src/components/file-tree.stories.tsx +0 -73
- package/src/components/file-upload.stories.tsx +0 -156
- package/src/components/image.stories.tsx +0 -89
- package/src/components/loader.stories.tsx +0 -181
- package/src/components/markdown.stories.tsx +0 -180
- package/src/components/message-action-bar.test.tsx +0 -128
- package/src/components/message-narrow.stories.tsx +0 -329
- package/src/components/message-skills.stories.tsx +0 -211
- package/src/components/message.stories.tsx +0 -281
- package/src/components/model-switcher.stories.tsx +0 -123
- package/src/components/model-switcher.test.tsx +0 -65
- package/src/components/prompt-input.stories.tsx +0 -222
- package/src/components/prompt-suggestion.stories.tsx +0 -142
- package/src/components/reasoning.stories.tsx +0 -140
- package/src/components/resizable.test.tsx +0 -226
- package/src/components/scroll-button.stories.tsx +0 -100
- package/src/components/slash-command.stories.tsx +0 -163
- package/src/components/source-list.test.tsx +0 -152
- package/src/components/source.stories.tsx +0 -124
- package/src/components/tasks-card.stories.tsx +0 -78
- package/src/components/text-shimmer.stories.tsx +0 -87
- package/src/components/thinking-bar.stories.tsx +0 -87
- package/src/components/tool.stories.tsx +0 -153
- package/src/components/voice-input.stories.tsx +0 -83
- package/src/elements/artifact.stories.tsx +0 -506
- package/src/elements/attachments.stories.tsx +0 -190
- package/src/elements/card.stories.tsx +0 -113
- package/src/elements/cards.stories.tsx +0 -59
- package/src/elements/catalog.stories.tsx +0 -491
- package/src/elements/chain-of-thought.declarative.test.tsx +0 -153
- package/src/elements/chain-of-thought.stories.tsx +0 -113
- package/src/elements/chat-scope-picker.stories.tsx +0 -73
- package/src/elements/chat-workspace.stories.tsx +0 -288
- package/src/elements/chat.stories.tsx +0 -151
- package/src/elements/checkpoint.stories.tsx +0 -72
- package/src/elements/choice.stories.tsx +0 -240
- package/src/elements/code-block.stories.tsx +0 -83
- package/src/elements/composed-shell.stories.tsx +0 -316
- package/src/elements/confirm-card.stories.tsx +0 -227
- package/src/elements/context-meter.stories.tsx +0 -151
- package/src/elements/conversation-list.declarative.test.tsx +0 -137
- package/src/elements/conversation-list.stories.tsx +0 -243
- package/src/elements/embed.stories.tsx +0 -213
- package/src/elements/empty.stories.tsx +0 -111
- package/src/elements/feedback-bar.stories.tsx +0 -114
- package/src/elements/file-tree.stories.tsx +0 -134
- package/src/elements/file-upload.stories.tsx +0 -82
- package/src/elements/form.stories.tsx +0 -248
- package/src/elements/image.stories.tsx +0 -71
- package/src/elements/link-preview.stories.tsx +0 -209
- package/src/elements/loader.stories.tsx +0 -88
- package/src/elements/markdown.stories.tsx +0 -76
- package/src/elements/message-skills.declarative.test.tsx +0 -104
- package/src/elements/message-skills.stories.tsx +0 -114
- package/src/elements/message.stories.tsx +0 -218
- package/src/elements/model-switcher.declarative.test.tsx +0 -130
- package/src/elements/model-switcher.stories.tsx +0 -198
- package/src/elements/popover.stories.tsx +0 -80
- package/src/elements/prompt-input-slash-command.test.tsx +0 -128
- package/src/elements/prompt-input-stoppable.test.tsx +0 -88
- package/src/elements/prompt-input-toolbar-actions.test.tsx +0 -120
- package/src/elements/prompt-input.stories.tsx +0 -331
- package/src/elements/prompt-suggestions.declarative.test.tsx +0 -164
- package/src/elements/prompt-suggestions.stories.tsx +0 -213
- package/src/elements/reasoning.stories.tsx +0 -77
- package/src/elements/remote.stories.tsx +0 -314
- package/src/elements/resizable.stories.tsx +0 -426
- package/src/elements/response-stream.stories.tsx +0 -79
- package/src/elements/scroll-button.stories.tsx +0 -202
- package/src/elements/scroll-button.test.tsx +0 -148
- package/src/elements/source-list.stories.tsx +0 -143
- package/src/elements/source.stories.tsx +0 -88
- package/src/elements/switch.stories.tsx +0 -56
- package/src/elements/tasks.stories.tsx +0 -237
- package/src/elements/text-shimmer.stories.tsx +0 -64
- package/src/elements/thinking-bar.stories.tsx +0 -72
- package/src/elements/tool.stories.tsx +0 -89
- package/src/elements/voice-input.stories.tsx +0 -88
- package/src/primitives/controllable.test.ts +0 -47
- package/src/stories/chat-panel-layout.stories.tsx +0 -145
- package/src/stories/chat-scene.tsx +0 -571
- package/src/stories/checkpoint-restore.stories.tsx +0 -256
- package/src/stories/context-usage.stories.tsx +0 -212
- package/src/stories/conversation-with-reasoning.stories.tsx +0 -182
- package/src/stories/conversation-with-sources.stories.tsx +0 -471
- package/src/stories/docs/Accessibility.mdx +0 -119
- package/src/stories/docs/ChildElements.mdx +0 -269
- package/src/stories/docs/ForAIAgents.mdx +0 -162
- package/src/stories/docs/GettingStarted.mdx +0 -65
- package/src/stories/docs/Installation.mdx +0 -83
- package/src/stories/docs/Introduction.mdx +0 -50
- package/src/stories/docs/SolidJsAdvanced.mdx +0 -17
- package/src/stories/docs/Theming.mdx +0 -85
- package/src/stories/docs/element-controls.ts +0 -121
- package/src/stories/docs/frameworks/Angular.mdx +0 -245
- package/src/stories/docs/frameworks/Html.mdx +0 -227
- package/src/stories/docs/frameworks/Overview.mdx +0 -47
- package/src/stories/docs/frameworks/React.mdx +0 -227
- package/src/stories/docs/frameworks/Solid.mdx +0 -173
- package/src/stories/docs/frameworks/Svelte.mdx +0 -194
- package/src/stories/docs/frameworks/Vue.mdx +0 -238
- package/src/stories/docs/generative-ui-overview.mdx +0 -186
- package/src/stories/docs/recipes/SpeechToText.mdx +0 -7
- package/src/stories/docs/recipes/Streaming.mdx +0 -68
- package/src/stories/docs/recipes/TextToSpeech.mdx +0 -35
- package/src/stories/docs/theme-editor/canvas.tsx +0 -32
- package/src/stories/docs/theme-editor/inspector.tsx +0 -66
- package/src/stories/docs/theme-editor/presets.test.ts +0 -32
- package/src/stories/docs/theme-editor/presets.ts +0 -64
- package/src/stories/docs/theme-editor/theme-css.test.ts +0 -19
- package/src/stories/docs/theme-editor/theme-css.ts +0 -15
- package/src/stories/docs/theme-editor/theme-editor.tsx +0 -146
- package/src/stories/docs/theme-tokens.tsx +0 -174
- package/src/stories/examples/ChoosingComponents.mdx +0 -106
- package/src/stories/examples/sample-data.ts +0 -79
- package/src/stories/examples/usage/checkpoint-restore.ts +0 -156
- package/src/stories/examples/usage/context-usage.ts +0 -591
- package/src/stories/examples/usage/conversation-with-reasoning.ts +0 -224
- package/src/stories/examples/usage/conversation-with-sources.ts +0 -589
- package/src/stories/examples/usage/empty-state.ts +0 -144
- package/src/stories/examples/usage/full-chat-app.ts +0 -277
- package/src/stories/examples/usage/index.ts +0 -63
- package/src/stories/examples/usage/message-actions.ts +0 -704
- package/src/stories/examples/usage/pattern-centered-conversation.ts +0 -446
- package/src/stories/examples/usage/pattern-chat-panel-layout.ts +0 -442
- package/src/stories/examples/usage/pattern-docked-widget.ts +0 -479
- package/src/stories/examples/usage/prompt-input-variants.ts +0 -1356
- package/src/stories/examples/usage/streaming-response.ts +0 -687
- package/src/stories/examples/usage/types.ts +0 -33
- package/src/stories/full-chat.stories.tsx +0 -18
- package/src/stories/message-actions.stories.tsx +0 -230
- package/src/stories/pattern-centered-conversation.stories.tsx +0 -93
- package/src/stories/pattern-docked-widget.stories.tsx +0 -93
- package/src/stories/pattern-empty-state.stories.tsx +0 -76
- package/src/stories/prompt-input-variants.stories.tsx +0 -456
- package/src/stories/streaming-response.stories.tsx +0 -438
- package/src/stories/theme-editor.stories.tsx +0 -16
- package/src/stories/token-reference.stories.tsx +0 -18
- package/src/stories/typography.stories.tsx +0 -78
- package/src/ui/avatar.stories.tsx +0 -103
- package/src/ui/badge.stories.tsx +0 -86
- package/src/ui/button.stories.tsx +0 -145
- package/src/ui/collapsible.stories.tsx +0 -69
- package/src/ui/dropdown.stories.tsx +0 -59
- package/src/ui/hover-card.stories.tsx +0 -77
- package/src/ui/hover-card.test.tsx +0 -30
- package/src/ui/overlay.stories.tsx +0 -115
- package/src/ui/popover.stories.tsx +0 -81
- package/src/ui/popover.test.tsx +0 -99
- package/src/ui/resizable.stories.tsx +0 -236
- package/src/ui/scroll-area.stories.tsx +0 -50
- package/src/ui/separator.stories.tsx +0 -81
- package/src/ui/skeleton.stories.tsx +0 -337
- package/src/ui/switch.stories.tsx +0 -51
- package/src/ui/switch.test.tsx +0 -59
- package/src/ui/textarea.stories.tsx +0 -76
- package/src/ui/tooltip.stories.tsx +0 -74
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { CSSProperties, ForwardRefExoticComponent, PropsWithoutRef, ReactNode, RefAttributes } from 'react';
|
|
2
|
+
export interface WebComponentProps {
|
|
3
|
+
/** Color mode (`auto` follows prefers-color-scheme). */
|
|
4
|
+
theme?: 'light' | 'dark' | 'auto';
|
|
5
|
+
className?: string;
|
|
6
|
+
style?: CSSProperties;
|
|
7
|
+
id?: string;
|
|
8
|
+
/** Light-DOM children passed through to the element (slots). */
|
|
9
|
+
children?: ReactNode;
|
|
10
|
+
}
|
|
11
|
+
export declare function createWebComponent<P extends WebComponentProps>(tagName: string,
|
|
12
|
+
/** DOM-property names to assign from props (incl. `theme`). */
|
|
13
|
+
propNames: readonly string[],
|
|
14
|
+
/** Map of React handler prop → DOM event name, e.g. `{ onMessageAction: 'kai-message-action' }`. */
|
|
15
|
+
eventMap: Record<string, string>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<HTMLElement>>;
|
package/dist/react.js
ADDED
|
@@ -0,0 +1,265 @@
|
|
|
1
|
+
import "@kitn.ai/ui/elements";
|
|
2
|
+
import { forwardRef as C, useRef as k, useImperativeHandle as S, useLayoutEffect as g, createElement as T } from "react";
|
|
3
|
+
function e(n, p, l) {
|
|
4
|
+
const u = Object.entries(l), r = C((b, v) => {
|
|
5
|
+
const s = k(null);
|
|
6
|
+
S(v, () => s.current, []);
|
|
7
|
+
const o = b, h = k({});
|
|
8
|
+
for (const a of Object.keys(l)) h.current[a] = o[a];
|
|
9
|
+
return g(() => {
|
|
10
|
+
const a = s.current;
|
|
11
|
+
if (!a) return;
|
|
12
|
+
const i = () => {
|
|
13
|
+
for (const t of p)
|
|
14
|
+
t in o && o[t] !== void 0 && (a[t] = o[t]);
|
|
15
|
+
};
|
|
16
|
+
i(), typeof customElements < "u" && !customElements.get(n) && customElements.whenDefined(n).then(i);
|
|
17
|
+
}), g(() => {
|
|
18
|
+
const a = s.current;
|
|
19
|
+
if (!a) return;
|
|
20
|
+
const i = [];
|
|
21
|
+
for (const [t, c] of u) {
|
|
22
|
+
const d = (f) => {
|
|
23
|
+
const m = h.current[t];
|
|
24
|
+
typeof m == "function" && m(f);
|
|
25
|
+
};
|
|
26
|
+
a.addEventListener(c, d), i.push([c, d]);
|
|
27
|
+
}
|
|
28
|
+
return () => i.forEach(([t, c]) => a.removeEventListener(t, c));
|
|
29
|
+
}, []), T(
|
|
30
|
+
n,
|
|
31
|
+
{
|
|
32
|
+
ref: s,
|
|
33
|
+
className: o.className,
|
|
34
|
+
style: o.style,
|
|
35
|
+
id: o.id
|
|
36
|
+
},
|
|
37
|
+
// Light-DOM children pass straight through to the element (slots).
|
|
38
|
+
o.children ?? null
|
|
39
|
+
);
|
|
40
|
+
});
|
|
41
|
+
return r.displayName = n, r;
|
|
42
|
+
}
|
|
43
|
+
const M = e(
|
|
44
|
+
"kai-artifact",
|
|
45
|
+
["theme", "src", "files", "tab", "activeFile", "sandbox", "iframeTitle", "maximized", "expandable", "openInTab", "noNav", "noReload", "noHome", "noPathField", "noTabs", "standalone", "readonlyPath"],
|
|
46
|
+
{ onFileSelect: "kai-file-select", onMaximizeChange: "kai-maximize-change", onNavigate: "kai-navigate", onTabChange: "kai-tab-change" }
|
|
47
|
+
), w = e(
|
|
48
|
+
"kai-attachments",
|
|
49
|
+
["theme", "items", "variant", "hoverCard", "removable", "showMediaType", "emptyText"],
|
|
50
|
+
{ onRemove: "kai-remove" }
|
|
51
|
+
), y = e(
|
|
52
|
+
"kai-card",
|
|
53
|
+
["theme", "heading", "description", "errorMessage", "dense"],
|
|
54
|
+
{}
|
|
55
|
+
), I = e(
|
|
56
|
+
"kai-cards",
|
|
57
|
+
["theme", "cards", "types", "policy"],
|
|
58
|
+
{}
|
|
59
|
+
), F = e(
|
|
60
|
+
"kai-chain-of-thought",
|
|
61
|
+
["theme", "steps"],
|
|
62
|
+
{}
|
|
63
|
+
), E = e(
|
|
64
|
+
"kai-chat",
|
|
65
|
+
["theme", "messages", "value", "placeholder", "loading", "suggestions", "suggestionMode", "persistSuggestions", "proseSize", "codeTheme", "codeHighlight", "chatTitle", "models", "currentModel", "context", "scrollButton", "headerStart", "headerEnd", "search", "voice", "slashCommands", "slashActiveIds", "slashCompact", "actionsReveal"],
|
|
66
|
+
{ onMessageAction: "kai-message-action", onModelChange: "kai-model-change", onSearch: "kai-search", onSlashSelect: "kai-slash-select", onSubmit: "kai-submit", onSuggestionClick: "kai-suggestion-click", onValueChange: "kai-value-change", onVoice: "kai-voice" }
|
|
67
|
+
), R = e(
|
|
68
|
+
"kai-checkpoint",
|
|
69
|
+
["theme", "label", "tooltip", "variant", "size"],
|
|
70
|
+
{ onSelect: "kai-select" }
|
|
71
|
+
), A = e(
|
|
72
|
+
"kai-choice",
|
|
73
|
+
["theme", "data", "cardId", "heading", "resolution"],
|
|
74
|
+
{}
|
|
75
|
+
), L = e(
|
|
76
|
+
"kai-code-block",
|
|
77
|
+
["theme", "code", "language", "codeTheme", "codeHighlight", "proseSize"],
|
|
78
|
+
{}
|
|
79
|
+
), P = e(
|
|
80
|
+
"kai-confirm",
|
|
81
|
+
["theme", "data", "cardId", "heading", "autofocus", "resolution"],
|
|
82
|
+
{}
|
|
83
|
+
), H = e(
|
|
84
|
+
"kai-context",
|
|
85
|
+
["theme", "context", "warnThreshold", "dangerThreshold"],
|
|
86
|
+
{ onThresholdChange: "kai-threshold-change" }
|
|
87
|
+
), N = e(
|
|
88
|
+
"kai-conversations",
|
|
89
|
+
["theme", "groups", "conversations", "activeId"],
|
|
90
|
+
{ onConversationSelect: "kai-conversation-select", onNewChat: "kai-new-chat", onToggleSidebar: "kai-toggle-sidebar" }
|
|
91
|
+
), V = e(
|
|
92
|
+
"kai-embed",
|
|
93
|
+
["theme", "cardId", "data"],
|
|
94
|
+
{}
|
|
95
|
+
), B = e(
|
|
96
|
+
"kai-empty",
|
|
97
|
+
["theme", "emptyTitle", "description"],
|
|
98
|
+
{}
|
|
99
|
+
), O = e(
|
|
100
|
+
"kai-feedback-bar",
|
|
101
|
+
["theme", "barTitle", "collectDetail", "categories", "detailTitle", "detailPlaceholder", "submitLabel", "thanksMessage"],
|
|
102
|
+
{ onClose: "kai-close", onFeedback: "kai-feedback", onFeedbackDetail: "kai-feedback-detail" }
|
|
103
|
+
), W = e(
|
|
104
|
+
"kai-file-tree",
|
|
105
|
+
["theme", "files", "activeFile", "defaultExpanded"],
|
|
106
|
+
{ onSelect: "kai-select" }
|
|
107
|
+
), D = e(
|
|
108
|
+
"kai-file-upload",
|
|
109
|
+
["theme", "multiple", "accept", "disabled", "label"],
|
|
110
|
+
{ onFilesAdded: "kai-files-added" }
|
|
111
|
+
), j = e(
|
|
112
|
+
"kai-form",
|
|
113
|
+
["theme", "data", "cardId", "heading", "resolution"],
|
|
114
|
+
{}
|
|
115
|
+
), U = e(
|
|
116
|
+
"kai-image",
|
|
117
|
+
["theme", "base64", "bytes", "alt", "mediaType"],
|
|
118
|
+
{}
|
|
119
|
+
), q = e(
|
|
120
|
+
"kai-link-preview",
|
|
121
|
+
["theme", "cardId", "data"],
|
|
122
|
+
{}
|
|
123
|
+
), G = e(
|
|
124
|
+
"kai-loader",
|
|
125
|
+
["theme", "variant", "size", "text"],
|
|
126
|
+
{}
|
|
127
|
+
), J = e(
|
|
128
|
+
"kai-markdown",
|
|
129
|
+
["theme", "content", "proseSize", "codeTheme", "codeHighlight"],
|
|
130
|
+
{}
|
|
131
|
+
), K = e(
|
|
132
|
+
"kai-message",
|
|
133
|
+
["theme", "message", "role", "content", "markdown", "proseSize", "codeTheme", "codeHighlight", "actionsReveal", "avatarSrc", "avatarFallback"],
|
|
134
|
+
{ onMessageAction: "kai-message-action" }
|
|
135
|
+
), Q = e(
|
|
136
|
+
"kai-model-switcher",
|
|
137
|
+
["theme", "models", "currentModel"],
|
|
138
|
+
{ onModelChange: "kai-model-change" }
|
|
139
|
+
), X = e(
|
|
140
|
+
"kai-popover",
|
|
141
|
+
["theme", "placement", "gutter", "open"],
|
|
142
|
+
{ onOpenChange: "kai-open-change" }
|
|
143
|
+
), Y = e(
|
|
144
|
+
"kai-prompt-input",
|
|
145
|
+
["theme", "value", "placeholder", "disabled", "loading", "suggestions", "suggestionMode", "slashCommands", "slashActiveIds", "slashCompact", "search", "voice", "stoppable", "attachments"],
|
|
146
|
+
{ onSearch: "kai-search", onSlashSelect: "kai-slash-select", onStop: "kai-stop", onSubmit: "kai-submit", onSuggestionClick: "kai-suggestion-click", onToolbarAction: "kai-toolbar-action", onValueChange: "kai-value-change", onVoice: "kai-voice" }
|
|
147
|
+
), Z = e(
|
|
148
|
+
"kai-reasoning",
|
|
149
|
+
["theme", "text", "label", "open", "streaming", "markdown"],
|
|
150
|
+
{ onOpenChange: "kai-open-change" }
|
|
151
|
+
), _ = e(
|
|
152
|
+
"kai-remote",
|
|
153
|
+
["theme", "src", "providerOrigin", "envelope", "policy"],
|
|
154
|
+
{}
|
|
155
|
+
), $ = e(
|
|
156
|
+
"kai-resizable",
|
|
157
|
+
["theme", "orientation", "maximizedIndex"],
|
|
158
|
+
{ onChange: "kai-change", onMaximizeChange: "kai-maximize-change" }
|
|
159
|
+
), ee = e(
|
|
160
|
+
"kai-resizable-item",
|
|
161
|
+
["theme", "size", "min", "max", "locked", "hidden"],
|
|
162
|
+
{ onChange: "kai-change", onMaximizeChange: "kai-maximize-change" }
|
|
163
|
+
), ae = e(
|
|
164
|
+
"kai-response-stream",
|
|
165
|
+
["theme", "text", "mode", "speed", "as"],
|
|
166
|
+
{ onComplete: "kai-complete" }
|
|
167
|
+
), oe = e(
|
|
168
|
+
"kai-scope-picker",
|
|
169
|
+
["theme", "availableAuthors", "availableTags", "currentLabel"],
|
|
170
|
+
{ onScopeChange: "kai-scope-change" }
|
|
171
|
+
), te = e(
|
|
172
|
+
"kai-scroll-button",
|
|
173
|
+
["theme", "for", "variant", "size"],
|
|
174
|
+
{ onScroll: "kai-scroll" }
|
|
175
|
+
), ie = e(
|
|
176
|
+
"kai-skills",
|
|
177
|
+
["theme", "skills"],
|
|
178
|
+
{}
|
|
179
|
+
), ne = e(
|
|
180
|
+
"kai-source",
|
|
181
|
+
["theme", "href", "label", "headline", "description", "showFavicon"],
|
|
182
|
+
{}
|
|
183
|
+
), se = e(
|
|
184
|
+
"kai-sources",
|
|
185
|
+
["theme", "sources", "showFavicon", "numbered"],
|
|
186
|
+
{}
|
|
187
|
+
), ce = e(
|
|
188
|
+
"kai-suggestions",
|
|
189
|
+
["theme", "suggestions", "variant", "size", "block", "highlight"],
|
|
190
|
+
{ onSelect: "kai-select" }
|
|
191
|
+
), le = e(
|
|
192
|
+
"kai-switch",
|
|
193
|
+
["theme", "checked", "disabled", "label"],
|
|
194
|
+
{ onChange: "kai-change" }
|
|
195
|
+
), re = e(
|
|
196
|
+
"kai-tasks",
|
|
197
|
+
["theme", "data", "cardId", "heading", "resolution"],
|
|
198
|
+
{}
|
|
199
|
+
), he = e(
|
|
200
|
+
"kai-text-shimmer",
|
|
201
|
+
["theme", "text", "as", "duration", "spread"],
|
|
202
|
+
{}
|
|
203
|
+
), de = e(
|
|
204
|
+
"kai-thinking-bar",
|
|
205
|
+
["theme", "text", "stoppable", "stopLabel"],
|
|
206
|
+
{ onStop: "kai-stop" }
|
|
207
|
+
), me = e(
|
|
208
|
+
"kai-tool",
|
|
209
|
+
["theme", "tool", "open"],
|
|
210
|
+
{}
|
|
211
|
+
), ke = e(
|
|
212
|
+
"kai-voice-input",
|
|
213
|
+
["theme", "transcribe", "disabled"],
|
|
214
|
+
{ onAudioCaptured: "kai-audio-captured", onTranscription: "kai-transcription" }
|
|
215
|
+
), ge = e(
|
|
216
|
+
"kai-workspace",
|
|
217
|
+
["theme", "groups", "conversations", "activeId", "messages", "value", "placeholder", "loading", "suggestions", "suggestionMode", "proseSize", "codeTheme", "codeHighlight", "chatTitle", "models", "currentModel", "context", "scrollButton", "search", "voice", "slashCommands", "slashActiveIds", "slashCompact", "sidebarWidth", "sidebarMinWidth", "sidebarMaxWidth", "sidebarCollapsed", "defaultSidebarCollapsed"],
|
|
218
|
+
{ onConversationSelect: "kai-conversation-select", onMessageAction: "kai-message-action", onModelChange: "kai-model-change", onNewChat: "kai-new-chat", onSearch: "kai-search", onSidebarToggle: "kai-sidebar-toggle", onSlashSelect: "kai-slash-select", onSubmit: "kai-submit", onSuggestionClick: "kai-suggestion-click", onValueChange: "kai-value-change", onVoice: "kai-voice" }
|
|
219
|
+
);
|
|
220
|
+
export {
|
|
221
|
+
M as Artifact,
|
|
222
|
+
w as Attachments,
|
|
223
|
+
y as Card,
|
|
224
|
+
I as Cards,
|
|
225
|
+
F as ChainOfThought,
|
|
226
|
+
E as Chat,
|
|
227
|
+
R as Checkpoint,
|
|
228
|
+
A as Choice,
|
|
229
|
+
L as CodeBlock,
|
|
230
|
+
P as Confirm,
|
|
231
|
+
H as Context,
|
|
232
|
+
N as Conversations,
|
|
233
|
+
V as Embed,
|
|
234
|
+
B as Empty,
|
|
235
|
+
O as FeedbackBar,
|
|
236
|
+
W as FileTree,
|
|
237
|
+
D as FileUpload,
|
|
238
|
+
j as Form,
|
|
239
|
+
U as Image,
|
|
240
|
+
q as LinkPreview,
|
|
241
|
+
G as Loader,
|
|
242
|
+
J as Markdown,
|
|
243
|
+
K as Message,
|
|
244
|
+
Q as ModelSwitcher,
|
|
245
|
+
X as Popover,
|
|
246
|
+
Y as PromptInput,
|
|
247
|
+
Z as Reasoning,
|
|
248
|
+
_ as Remote,
|
|
249
|
+
$ as Resizable,
|
|
250
|
+
ee as ResizableItem,
|
|
251
|
+
ae as ResponseStream,
|
|
252
|
+
oe as ScopePicker,
|
|
253
|
+
te as ScrollButton,
|
|
254
|
+
ie as Skills,
|
|
255
|
+
ne as Source,
|
|
256
|
+
se as Sources,
|
|
257
|
+
ce as Suggestions,
|
|
258
|
+
le as Switch,
|
|
259
|
+
re as Tasks,
|
|
260
|
+
he as TextShimmer,
|
|
261
|
+
de as ThinkingBar,
|
|
262
|
+
me as Tool,
|
|
263
|
+
ke as VoiceInput,
|
|
264
|
+
ge as Workspace
|
|
265
|
+
};
|