@kitnai/chat 0.3.1 → 0.5.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 +35 -5
- package/dist/custom-elements.json +2969 -0
- package/dist/kitn-chat.es.js +52 -39
- package/dist/llms/llms-full.txt +718 -0
- package/dist/llms/llms.txt +104 -0
- package/dist/theme.tokens.css +137 -0
- package/frameworks/react/index.tsx +584 -0
- package/frameworks/react/runtime.tsx +94 -0
- package/llms-full.txt +718 -0
- package/llms.txt +104 -0
- package/package.json +53 -6
- package/src/components/attachments.tsx +4 -2
- package/src/components/chain-of-thought.tsx +1 -1
- package/src/components/chat-scope-picker.tsx +2 -2
- package/src/components/chat-thread.tsx +217 -0
- package/src/components/checkpoint.tsx +7 -3
- package/src/components/context.tsx +14 -18
- package/src/components/conversation-item.tsx +1 -1
- package/src/components/conversation-list.tsx +5 -4
- package/src/components/message-skills.tsx +1 -1
- package/src/components/message.tsx +1 -0
- package/src/components/model-switcher.tsx +3 -3
- package/src/components/prompt-input.tsx +20 -2
- package/src/components/reasoning.tsx +2 -2
- package/src/components/scroll-button.tsx +1 -0
- package/src/components/slash-command.tsx +17 -8
- package/src/components/source.tsx +2 -2
- package/src/components/thinking-bar.tsx +2 -2
- package/src/components/tool.tsx +17 -6
- package/src/components/voice-input.tsx +5 -1
- package/src/elements/attachments.tsx +132 -0
- package/src/elements/chain-of-thought.tsx +45 -0
- package/src/elements/chat-scope-picker.tsx +36 -0
- package/src/elements/chat-workspace.tsx +122 -0
- package/src/elements/chat.tsx +31 -228
- package/src/elements/checkpoint.tsx +43 -0
- package/src/elements/code-block.tsx +42 -0
- package/src/elements/compiled.css +1 -1
- package/src/elements/context-meter.tsx +71 -0
- package/src/elements/conversation-list.tsx +6 -0
- package/src/elements/default-input.tsx +22 -1
- package/src/elements/define.tsx +98 -12
- package/src/elements/element-types.d.ts +444 -0
- package/src/elements/empty.tsx +29 -0
- package/src/elements/feedback-bar.tsx +33 -0
- package/src/elements/file-upload.tsx +44 -0
- package/src/elements/image.tsx +32 -0
- package/src/elements/kitn-attachments.stories.tsx +181 -0
- package/src/elements/kitn-chain-of-thought.stories.tsx +75 -0
- package/src/elements/kitn-chat-scope-picker.stories.tsx +72 -0
- package/src/elements/kitn-chat-workspace.stories.tsx +195 -0
- package/src/elements/kitn-checkpoint.stories.tsx +71 -0
- package/src/elements/kitn-code-block.stories.tsx +82 -0
- package/src/elements/kitn-context-meter.stories.tsx +85 -0
- package/src/elements/kitn-empty.stories.tsx +110 -0
- package/src/elements/kitn-feedback-bar.stories.tsx +73 -0
- package/src/elements/kitn-file-upload.stories.tsx +81 -0
- package/src/elements/kitn-image.stories.tsx +70 -0
- package/src/elements/kitn-loader.stories.tsx +87 -0
- package/src/elements/kitn-markdown.stories.tsx +75 -0
- package/src/elements/kitn-message-skills.stories.tsx +74 -0
- package/src/elements/kitn-message.stories.tsx +105 -0
- package/src/elements/kitn-model-switcher.stories.tsx +80 -0
- package/src/elements/kitn-prompt-input.stories.tsx +74 -16
- package/src/elements/kitn-prompt-suggestions.stories.tsx +157 -0
- package/src/elements/kitn-reasoning.stories.tsx +76 -0
- package/src/elements/kitn-response-stream.stories.tsx +79 -0
- package/src/elements/kitn-source-list.stories.tsx +77 -0
- package/src/elements/kitn-source.stories.tsx +87 -0
- package/src/elements/kitn-text-shimmer.stories.tsx +63 -0
- package/src/elements/kitn-thinking-bar.stories.tsx +72 -0
- package/src/elements/kitn-tool.stories.tsx +88 -0
- package/src/elements/kitn-voice-input.stories.tsx +87 -0
- package/src/elements/loader.tsx +25 -0
- package/src/elements/markdown.tsx +38 -0
- package/src/elements/message-skills.tsx +22 -0
- package/src/elements/message.tsx +125 -0
- package/src/elements/model-switcher.tsx +35 -0
- package/src/elements/prompt-input.tsx +83 -7
- package/src/elements/prompt-suggestions.tsx +58 -0
- package/src/elements/reasoning.tsx +50 -0
- package/src/elements/register.ts +32 -0
- package/src/elements/response-stream.tsx +40 -0
- package/src/elements/source.tsx +67 -0
- package/src/elements/styles.css +14 -0
- package/src/elements/text-shimmer.tsx +28 -0
- package/src/elements/thinking-bar.tsx +34 -0
- package/src/elements/tool.tsx +23 -0
- package/src/elements/voice-input.tsx +41 -0
- package/src/index.ts +0 -1
- package/src/primitives/chat-config.tsx +3 -3
- package/src/stories/docs/Accessibility.mdx +119 -0
- package/src/stories/docs/ForAIAgents.mdx +93 -0
- package/src/stories/docs/GettingStarted.mdx +2 -2
- package/src/stories/docs/Installation.mdx +29 -2
- package/src/stories/docs/Integrations.mdx +417 -15
- package/src/stories/docs/Introduction.mdx +17 -8
- package/src/stories/docs/Theming.mdx +1 -1
- package/src/stories/pattern-centered-conversation.stories.tsx +93 -0
- package/src/stories/pattern-docked-widget.stories.tsx +93 -0
- package/src/stories/pattern-empty-state.stories.tsx +76 -0
- package/src/stories/typography.stories.tsx +78 -0
- package/src/ui/button.tsx +1 -1
- package/src/ui/collapsible.stories.tsx +70 -0
- package/src/ui/collapsible.tsx +119 -8
- package/src/ui/dropdown.stories.tsx +60 -0
- package/src/ui/dropdown.tsx +177 -12
- package/src/ui/hover-card.stories.tsx +78 -0
- package/src/ui/hover-card.tsx +147 -26
- package/src/ui/overlay.stories.tsx +115 -0
- package/src/ui/overlay.tsx +151 -0
- package/src/ui/scroll-area.stories.tsx +51 -0
- package/src/ui/textarea.stories.tsx +77 -0
- package/src/ui/textarea.tsx +1 -1
- package/src/ui/tooltip.stories.tsx +1 -1
- package/src/ui/tooltip.tsx +59 -13
- package/src/utils/cn.ts +19 -1
- package/theme.css +76 -43
- package/src/ui/dialog.tsx +0 -21
|
@@ -0,0 +1,584 @@
|
|
|
1
|
+
// AUTO-GENERATED by scripts/gen-element-api.mjs — do not edit by hand.
|
|
2
|
+
// Typed React wrappers for every kitn custom element. Usage:
|
|
3
|
+
// import { KitnMessage } from '@kitnai/chat/react';
|
|
4
|
+
// <KitnMessage message={msg} onMessageaction={(e) => …} />
|
|
5
|
+
import { createKitnComponent, type KitnBaseProps } from './runtime';
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
export interface KitnAttachmentsProps extends KitnBaseProps {
|
|
9
|
+
/** The attachments to render. Set as a JS property (array). */
|
|
10
|
+
items: { id: string; type: "file" | "source-document"; filename?: undefined | string; mediaType?: undefined | string; url?: undefined | string; title?: undefined | string }[];
|
|
11
|
+
/** Layout: `grid` = visual tiles, `inline` = icon + label chips, `list` = rows. */
|
|
12
|
+
variant?: "grid" | "inline" | "list";
|
|
13
|
+
/** Wrap each item in a hover card that previews its details. */
|
|
14
|
+
hoverCard?: boolean;
|
|
15
|
+
/** Show a remove button per item; clicking it fires a `remove` event. */
|
|
16
|
+
removable?: boolean;
|
|
17
|
+
/** Also show the media type beneath the filename (non-grid variants). */
|
|
18
|
+
showMediaType?: boolean;
|
|
19
|
+
/** Text shown when `items` is empty. */
|
|
20
|
+
emptyText?: string;
|
|
21
|
+
/** A remove button was clicked. */
|
|
22
|
+
onRemove?: (event: CustomEvent<{ id: string }>) => void;
|
|
23
|
+
}
|
|
24
|
+
|
|
25
|
+
export const KitnAttachments = createKitnComponent<KitnAttachmentsProps>(
|
|
26
|
+
'kitn-attachments',
|
|
27
|
+
["theme","items","variant","hoverCard","removable","showMediaType","emptyText"],
|
|
28
|
+
{ onRemove: 'remove' },
|
|
29
|
+
);
|
|
30
|
+
|
|
31
|
+
export interface KitnChainOfThoughtProps extends KitnBaseProps {
|
|
32
|
+
/** The reasoning steps. Set as a JS property. Compound sub-parts collapse to this one data model (Route 1). */
|
|
33
|
+
steps: { label: string; content?: undefined | string }[];
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
export const KitnChainOfThought = createKitnComponent<KitnChainOfThoughtProps>(
|
|
37
|
+
'kitn-chain-of-thought',
|
|
38
|
+
["theme","steps"],
|
|
39
|
+
{ },
|
|
40
|
+
);
|
|
41
|
+
|
|
42
|
+
export interface KitnChatProps extends KitnBaseProps {
|
|
43
|
+
/** The full message thread to render, newest last. Each entry carries its role, content, and optional reasoning/tools/attachments/actions. Set as a JS property (`el.messages = [...]`). */
|
|
44
|
+
messages: { id: string; role: "user" | "assistant"; content: string; reasoning?: undefined | { text: string; label?: undefined | string }; tools?: undefined | { type: string; state: "input-streaming" | "input-available" | "output-available" | "output-error"; input?: undefined | Record<string, unknown>; output?: undefined | Record<string, unknown>; toolCallId?: undefined | string; errorText?: undefined | string }[]; attachments?: undefined | { id: string; type: "file" | "source-document"; filename?: undefined | string; mediaType?: undefined | string; url?: undefined | string; title?: undefined | string }[]; actions?: undefined | ("copy" | "like" | "dislike" | "regenerate" | "edit")[] }[];
|
|
45
|
+
/** Controlled value of the input. When set, the host owns the input text and must update it on `valuechange`; leave unset for uncontrolled behavior. */
|
|
46
|
+
value?: string;
|
|
47
|
+
/** Placeholder text shown in the empty input. */
|
|
48
|
+
placeholder?: string;
|
|
49
|
+
/** When true, shows the loading/streaming state and disables submit (use while awaiting the assistant's reply). */
|
|
50
|
+
loading?: boolean;
|
|
51
|
+
/** Starter prompts shown above the input when the thread is empty. Clicking one follows `suggestionMode`. Set as a JS property. */
|
|
52
|
+
suggestions?: string[];
|
|
53
|
+
/** What clicking a suggestion does: `'submit'` (default) sends it immediately as if typed and submitted; `'fill'` just places it in the input. */
|
|
54
|
+
suggestionMode?: "submit" | "fill";
|
|
55
|
+
/** Body/prose font scale for rendered markdown (`'xs' | 'sm' | 'base' | 'lg'`). Defaults to `'sm'`. */
|
|
56
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
57
|
+
/** Shiki theme name for syntax-highlighted code blocks (e.g. `'github-dark-dimmed'`). */
|
|
58
|
+
codeTheme?: string;
|
|
59
|
+
/** Enable Shiki syntax highlighting in code blocks. Turn off to render plain `<pre>` blocks (lighter, no highlighter load). Default true. */
|
|
60
|
+
codeHighlight?: boolean;
|
|
61
|
+
/** Optional header title shown on the left of the header. */
|
|
62
|
+
chatTitle?: string;
|
|
63
|
+
/** Optional model list. When set (>1 model) a ModelSwitcher is shown in the header and a `modelchange` event fires on selection. */
|
|
64
|
+
models?: { id: string; name: string; provider?: string }[];
|
|
65
|
+
/** The currently selected model id (pairs with `models`). */
|
|
66
|
+
currentModel?: string;
|
|
67
|
+
/** Optional context-window token usage. When set, a Context token meter is shown in the header. */
|
|
68
|
+
context?: { usedTokens: number; maxTokens: number; inputTokens?: number; outputTokens?: number; estimatedCost?: number };
|
|
69
|
+
/** Show the scroll-to-bottom button inside the scroll area. Default true. */
|
|
70
|
+
scrollButton?: boolean;
|
|
71
|
+
/** Show a Search (Globe) button in the input toolbar; fires a `search` event. */
|
|
72
|
+
search?: boolean;
|
|
73
|
+
/** Show a Voice (Mic) button in the input toolbar; fires a `voice` event. */
|
|
74
|
+
voice?: boolean;
|
|
75
|
+
/** Slash commands — when set, typing `/` in the input opens the command palette and fires `slashselect`. Set as a JS property. */
|
|
76
|
+
slashCommands?: { id: string; label: string; description?: string; category?: string }[];
|
|
77
|
+
/** Command ids to highlight as active in the palette. */
|
|
78
|
+
slashActiveIds?: string[];
|
|
79
|
+
/** Single-line palette rows. */
|
|
80
|
+
slashCompact?: boolean;
|
|
81
|
+
onMessageaction?: (event: CustomEvent<unknown>) => void;
|
|
82
|
+
onModelchange?: (event: CustomEvent<unknown>) => void;
|
|
83
|
+
onSearch?: (event: CustomEvent<unknown>) => void;
|
|
84
|
+
onSlashselect?: (event: CustomEvent<unknown>) => void;
|
|
85
|
+
onSubmit?: (event: CustomEvent<unknown>) => void;
|
|
86
|
+
onSuggestionclick?: (event: CustomEvent<unknown>) => void;
|
|
87
|
+
onValuechange?: (event: CustomEvent<unknown>) => void;
|
|
88
|
+
onVoice?: (event: CustomEvent<unknown>) => void;
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
export const KitnChat = createKitnComponent<KitnChatProps>(
|
|
92
|
+
'kitn-chat',
|
|
93
|
+
["theme","messages","value","placeholder","loading","suggestions","suggestionMode","proseSize","codeTheme","codeHighlight","chatTitle","models","currentModel","context","scrollButton","search","voice","slashCommands","slashActiveIds","slashCompact"],
|
|
94
|
+
{ onMessageaction: 'messageaction', onModelchange: 'modelchange', onSearch: 'search', onSlashselect: 'slashselect', onSubmit: 'submit', onSuggestionclick: 'suggestionclick', onValuechange: 'valuechange', onVoice: 'voice' },
|
|
95
|
+
);
|
|
96
|
+
|
|
97
|
+
export interface KitnChatScopePickerProps extends KitnBaseProps {
|
|
98
|
+
/** Authors to offer as scope filters. Set as a JS property. */
|
|
99
|
+
availableAuthors: string[];
|
|
100
|
+
/** Tags to offer as scope filters. Set as a JS property. */
|
|
101
|
+
availableTags: string[];
|
|
102
|
+
/** The label shown on the trigger for the active scope. */
|
|
103
|
+
currentLabel?: string;
|
|
104
|
+
/** A scope was chosen (`undefined` filters = "All Content"). */
|
|
105
|
+
onScopechange?: (event: CustomEvent<{ filters: undefined | { tags?: undefined | string[]; authors?: undefined | string[]; contentType?: undefined | "transcript" | "markdown"; dateRange?: undefined | { from: string; to: string } } }>) => void;
|
|
106
|
+
}
|
|
107
|
+
|
|
108
|
+
export const KitnChatScopePicker = createKitnComponent<KitnChatScopePickerProps>(
|
|
109
|
+
'kitn-chat-scope-picker',
|
|
110
|
+
["theme","availableAuthors","availableTags","currentLabel"],
|
|
111
|
+
{ onScopechange: 'scopechange' },
|
|
112
|
+
);
|
|
113
|
+
|
|
114
|
+
export interface KitnChatWorkspaceProps extends KitnBaseProps {
|
|
115
|
+
/** Pre-bucketed conversation groups for the sidebar. Set as a JS property. */
|
|
116
|
+
groups: { id: string; userId?: undefined | string; teamId?: undefined | string; name: string; sortOrder: number; createdAt: string }[];
|
|
117
|
+
/** Flat conversation list (auto-bucketed if `groups` is empty). Set as a JS property. */
|
|
118
|
+
conversations: { id: string; title: string; groupId?: undefined | string; scope: { type: "document" | "collection"; documentId?: undefined | string; filters?: undefined | { tags?: undefined | string[]; authors?: undefined | string[]; contentType?: undefined | "transcript" | "markdown"; dateRange?: undefined | { from: string; to: string } } }; messageCount: number; lastMessageAt: string; updatedAt: string }[];
|
|
119
|
+
/** Id of the open conversation, highlighted in the sidebar. */
|
|
120
|
+
activeId?: string;
|
|
121
|
+
/** The active conversation's message thread, newest last. Set as a JS property. */
|
|
122
|
+
messages: { id: string; role: "user" | "assistant"; content: string; reasoning?: undefined | { text: string; label?: undefined | string }; tools?: undefined | { type: string; state: "input-streaming" | "input-available" | "output-available" | "output-error"; input?: undefined | Record<string, unknown>; output?: undefined | Record<string, unknown>; toolCallId?: undefined | string; errorText?: undefined | string }[]; attachments?: undefined | { id: string; type: "file" | "source-document"; filename?: undefined | string; mediaType?: undefined | string; url?: undefined | string; title?: undefined | string }[]; actions?: undefined | ("copy" | "like" | "dislike" | "regenerate" | "edit")[] }[];
|
|
123
|
+
value?: string;
|
|
124
|
+
placeholder?: string;
|
|
125
|
+
loading?: boolean;
|
|
126
|
+
suggestions?: string[];
|
|
127
|
+
suggestionMode?: "submit" | "fill";
|
|
128
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
129
|
+
codeTheme?: string;
|
|
130
|
+
codeHighlight?: boolean;
|
|
131
|
+
chatTitle?: string;
|
|
132
|
+
models?: { id: string; name: string; provider?: string }[];
|
|
133
|
+
currentModel?: string;
|
|
134
|
+
context?: { usedTokens: number; maxTokens: number; inputTokens?: number; outputTokens?: number; estimatedCost?: number };
|
|
135
|
+
scrollButton?: boolean;
|
|
136
|
+
search?: boolean;
|
|
137
|
+
voice?: boolean;
|
|
138
|
+
slashCommands?: { id: string; label: string; description?: string; category?: string }[];
|
|
139
|
+
slashActiveIds?: string[];
|
|
140
|
+
slashCompact?: boolean;
|
|
141
|
+
/** Sidebar default width as a percent of the workspace (default 22). */
|
|
142
|
+
sidebarWidth?: number;
|
|
143
|
+
/** Sidebar min width in px (default 200). */
|
|
144
|
+
sidebarMinWidth?: number;
|
|
145
|
+
/** Sidebar max width in px (default 420). */
|
|
146
|
+
sidebarMaxWidth?: number;
|
|
147
|
+
/** Initial collapsed state of the sidebar (default false). */
|
|
148
|
+
sidebarCollapsed?: boolean;
|
|
149
|
+
onConversationselect?: (event: CustomEvent<unknown>) => void;
|
|
150
|
+
onMessageaction?: (event: CustomEvent<unknown>) => void;
|
|
151
|
+
onModelchange?: (event: CustomEvent<unknown>) => void;
|
|
152
|
+
onNewchat?: (event: CustomEvent<unknown>) => void;
|
|
153
|
+
onSearch?: (event: CustomEvent<unknown>) => void;
|
|
154
|
+
onSidebartoggle?: (event: CustomEvent<unknown>) => void;
|
|
155
|
+
onSlashselect?: (event: CustomEvent<unknown>) => void;
|
|
156
|
+
onSubmit?: (event: CustomEvent<unknown>) => void;
|
|
157
|
+
onSuggestionclick?: (event: CustomEvent<unknown>) => void;
|
|
158
|
+
onValuechange?: (event: CustomEvent<unknown>) => void;
|
|
159
|
+
onVoice?: (event: CustomEvent<unknown>) => void;
|
|
160
|
+
}
|
|
161
|
+
|
|
162
|
+
export const KitnChatWorkspace = createKitnComponent<KitnChatWorkspaceProps>(
|
|
163
|
+
'kitn-chat-workspace',
|
|
164
|
+
["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"],
|
|
165
|
+
{ onConversationselect: 'conversationselect', onMessageaction: 'messageaction', onModelchange: 'modelchange', onNewchat: 'newchat', onSearch: 'search', onSidebartoggle: 'sidebartoggle', onSlashselect: 'slashselect', onSubmit: 'submit', onSuggestionclick: 'suggestionclick', onValuechange: 'valuechange', onVoice: 'voice' },
|
|
166
|
+
);
|
|
167
|
+
|
|
168
|
+
export interface KitnCheckpointProps extends KitnBaseProps {
|
|
169
|
+
/** Optional text beside the icon. */
|
|
170
|
+
label?: string;
|
|
171
|
+
/** Tooltip on hover. */
|
|
172
|
+
tooltip?: string;
|
|
173
|
+
/** Visual button style. */
|
|
174
|
+
variant?: "ghost" | "default" | "outline";
|
|
175
|
+
/** Button size (use an `icon*` size for an icon-only checkpoint). */
|
|
176
|
+
size?: "sm" | "lg" | "md" | "icon" | "icon-sm";
|
|
177
|
+
/** The checkpoint was clicked. */
|
|
178
|
+
onSelect?: (event: CustomEvent) => void;
|
|
179
|
+
}
|
|
180
|
+
|
|
181
|
+
export const KitnCheckpoint = createKitnComponent<KitnCheckpointProps>(
|
|
182
|
+
'kitn-checkpoint',
|
|
183
|
+
["theme","label","tooltip","variant","size"],
|
|
184
|
+
{ onSelect: 'select' },
|
|
185
|
+
);
|
|
186
|
+
|
|
187
|
+
export interface KitnCodeBlockProps extends KitnBaseProps {
|
|
188
|
+
/** The source code to render. */
|
|
189
|
+
code: string;
|
|
190
|
+
/** Language grammar (e.g. `js`, `python`). Defaults to `tsx`. */
|
|
191
|
+
language?: string;
|
|
192
|
+
/** Shiki theme name. */
|
|
193
|
+
codeTheme?: string;
|
|
194
|
+
/** Disable syntax highlighting (renders plain text, no Shiki). */
|
|
195
|
+
codeHighlight?: boolean;
|
|
196
|
+
/** Code text sizing. */
|
|
197
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
198
|
+
}
|
|
199
|
+
|
|
200
|
+
export const KitnCodeBlock = createKitnComponent<KitnCodeBlockProps>(
|
|
201
|
+
'kitn-code-block',
|
|
202
|
+
["theme","code","language","codeTheme","codeHighlight","proseSize"],
|
|
203
|
+
{ },
|
|
204
|
+
);
|
|
205
|
+
|
|
206
|
+
export interface KitnContextMeterProps extends KitnBaseProps {
|
|
207
|
+
/** Token-usage data. Set as a JS property. */
|
|
208
|
+
context?: { usedTokens: number; maxTokens: number; inputTokens?: number; outputTokens?: number; reasoningTokens?: number; cacheTokens?: number; estimatedCost?: number };
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export const KitnContextMeter = createKitnComponent<KitnContextMeterProps>(
|
|
212
|
+
'kitn-context-meter',
|
|
213
|
+
["theme","context"],
|
|
214
|
+
{ },
|
|
215
|
+
);
|
|
216
|
+
|
|
217
|
+
export interface KitnConversationListProps extends KitnBaseProps {
|
|
218
|
+
/** Pre-bucketed conversation groups (e.g. "Today", "Yesterday"), each with its own conversations. Use this when you want to control the grouping/headers yourself; otherwise pass a flat `conversations` array. Set as a JS property. */
|
|
219
|
+
groups: { id: string; userId?: undefined | string; teamId?: undefined | string; name: string; sortOrder: number; createdAt: string }[];
|
|
220
|
+
/** A flat list of conversation summaries; the component buckets them by recency for you. Ignored when `groups` is provided. Set as a JS property. */
|
|
221
|
+
conversations: { id: string; title: string; groupId?: undefined | string; scope: { type: "document" | "collection"; documentId?: undefined | string; filters?: undefined | { tags?: undefined | string[]; authors?: undefined | string[]; contentType?: undefined | "transcript" | "markdown"; dateRange?: undefined | { from: string; to: string } } }; messageCount: number; lastMessageAt: string; updatedAt: string }[];
|
|
222
|
+
/** The id of the currently-open conversation, highlighted in the list. */
|
|
223
|
+
activeId?: string;
|
|
224
|
+
onNewchat?: (event: CustomEvent<unknown>) => void;
|
|
225
|
+
onSelect?: (event: CustomEvent<unknown>) => void;
|
|
226
|
+
onTogglesidebar?: (event: CustomEvent<unknown>) => void;
|
|
227
|
+
}
|
|
228
|
+
|
|
229
|
+
export const KitnConversationList = createKitnComponent<KitnConversationListProps>(
|
|
230
|
+
'kitn-conversation-list',
|
|
231
|
+
["theme","groups","conversations","activeId"],
|
|
232
|
+
{ onNewchat: 'newchat', onSelect: 'select', onTogglesidebar: 'togglesidebar' },
|
|
233
|
+
);
|
|
234
|
+
|
|
235
|
+
export interface KitnEmptyProps extends KitnBaseProps {
|
|
236
|
+
/** Title text. Attribute: `empty-title` (`title` is a global HTML attribute). */
|
|
237
|
+
emptyTitle?: string;
|
|
238
|
+
/** Description text. */
|
|
239
|
+
description?: string;
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
export const KitnEmpty = createKitnComponent<KitnEmptyProps>(
|
|
243
|
+
'kitn-empty',
|
|
244
|
+
["theme","emptyTitle","description"],
|
|
245
|
+
{ },
|
|
246
|
+
);
|
|
247
|
+
|
|
248
|
+
export interface KitnFeedbackBarProps extends KitnBaseProps {
|
|
249
|
+
/** The banner label (e.g. "Was this helpful?"). Attribute: `bar-title` (`title` is avoided — it's a global HTML attribute). */
|
|
250
|
+
barTitle?: string;
|
|
251
|
+
/** The user dismissed the banner. */
|
|
252
|
+
onClose?: (event: CustomEvent) => void;
|
|
253
|
+
/** The user clicked thumbs-up. */
|
|
254
|
+
onHelpful?: (event: CustomEvent) => void;
|
|
255
|
+
/** The user clicked thumbs-down. */
|
|
256
|
+
onNothelpful?: (event: CustomEvent) => void;
|
|
257
|
+
}
|
|
258
|
+
|
|
259
|
+
export const KitnFeedbackBar = createKitnComponent<KitnFeedbackBarProps>(
|
|
260
|
+
'kitn-feedback-bar',
|
|
261
|
+
["theme","barTitle"],
|
|
262
|
+
{ onClose: 'close', onHelpful: 'helpful', onNothelpful: 'nothelpful' },
|
|
263
|
+
);
|
|
264
|
+
|
|
265
|
+
export interface KitnFileUploadProps extends KitnBaseProps {
|
|
266
|
+
/** Allow selecting multiple files (default true). */
|
|
267
|
+
multiple?: boolean;
|
|
268
|
+
/** `accept` attribute for the file picker (e.g. `image/*`). */
|
|
269
|
+
accept?: string;
|
|
270
|
+
/** Disable the dropzone — no clicking, no drag-and-drop. */
|
|
271
|
+
disabled?: boolean;
|
|
272
|
+
/** Default dropzone label (overridable via the default slot). */
|
|
273
|
+
label?: string;
|
|
274
|
+
/** Files were picked or dropped. */
|
|
275
|
+
onFilesadded?: (event: CustomEvent<{ files: File[] }>) => void;
|
|
276
|
+
}
|
|
277
|
+
|
|
278
|
+
export const KitnFileUpload = createKitnComponent<KitnFileUploadProps>(
|
|
279
|
+
'kitn-file-upload',
|
|
280
|
+
["theme","multiple","accept","disabled","label"],
|
|
281
|
+
{ onFilesadded: 'filesadded' },
|
|
282
|
+
);
|
|
283
|
+
|
|
284
|
+
export interface KitnImageProps extends KitnBaseProps {
|
|
285
|
+
/** Base64-encoded image data (pair with `media-type`). */
|
|
286
|
+
base64?: string;
|
|
287
|
+
/** Raw image bytes (set as a JS property). */
|
|
288
|
+
bytes?: Uint8Array;
|
|
289
|
+
/** Alt text. */
|
|
290
|
+
alt?: string;
|
|
291
|
+
/** MIME type (default `image/png`). */
|
|
292
|
+
mediaType?: string;
|
|
293
|
+
}
|
|
294
|
+
|
|
295
|
+
export const KitnImage = createKitnComponent<KitnImageProps>(
|
|
296
|
+
'kitn-image',
|
|
297
|
+
["theme","base64","bytes","alt","mediaType"],
|
|
298
|
+
{ },
|
|
299
|
+
);
|
|
300
|
+
|
|
301
|
+
export interface KitnLoaderProps extends KitnBaseProps {
|
|
302
|
+
/** The animation style: `'circular' | 'classic' | 'pulse' | 'pulse-dot' | 'dots' | 'typing' | 'wave' | 'bars' | 'terminal' | 'text-blink' | 'text-shimmer' | 'loading-dots'`. Defaults to `'circular'`. */
|
|
303
|
+
variant?: "circular" | "classic" | "pulse" | "pulse-dot" | "dots" | "typing" | "wave" | "bars" | "terminal" | "text-blink" | "text-shimmer" | "loading-dots";
|
|
304
|
+
/** Loader size: `'sm' | 'md' | 'lg'`. Defaults to `'md'`. */
|
|
305
|
+
size?: "sm" | "lg" | "md";
|
|
306
|
+
/** Label for the text-based variants. */
|
|
307
|
+
text?: string;
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
export const KitnLoader = createKitnComponent<KitnLoaderProps>(
|
|
311
|
+
'kitn-loader',
|
|
312
|
+
["theme","variant","size","text"],
|
|
313
|
+
{ },
|
|
314
|
+
);
|
|
315
|
+
|
|
316
|
+
export interface KitnMarkdownProps extends KitnBaseProps {
|
|
317
|
+
/** The markdown source to render. */
|
|
318
|
+
content: string;
|
|
319
|
+
/** Text/markdown sizing. */
|
|
320
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
321
|
+
/** Shiki theme for fenced code blocks. */
|
|
322
|
+
codeTheme?: string;
|
|
323
|
+
/** Disable syntax highlighting (no Shiki loads). */
|
|
324
|
+
codeHighlight?: boolean;
|
|
325
|
+
}
|
|
326
|
+
|
|
327
|
+
export const KitnMarkdown = createKitnComponent<KitnMarkdownProps>(
|
|
328
|
+
'kitn-markdown',
|
|
329
|
+
["theme","content","proseSize","codeTheme","codeHighlight"],
|
|
330
|
+
{ },
|
|
331
|
+
);
|
|
332
|
+
|
|
333
|
+
export interface KitnMessageProps extends KitnBaseProps {
|
|
334
|
+
/** The full message object. Set as a JS property. */
|
|
335
|
+
message?: { id: string; role: "user" | "assistant"; content: string; reasoning?: { text: string; label?: string }; tools?: { type: string; state: "input-streaming" | "input-available" | "output-available" | "output-error"; input?: Record<string, unknown>; output?: Record<string, unknown>; toolCallId?: string; errorText?: string }[]; attachments?: { id: string; type: "file" | "source-document"; filename?: string; mediaType?: string; url?: string; title?: string }[]; actions?: ("copy" | "like" | "dislike" | "regenerate" | "edit")[] };
|
|
336
|
+
/** Convenience for simple cases when not passing a `message` object. */
|
|
337
|
+
role?: "user" | "assistant";
|
|
338
|
+
/** Convenience content (used when `message` is not set). */
|
|
339
|
+
content?: string;
|
|
340
|
+
/** Force markdown on/off. Defaults to on for assistant, off for user. */
|
|
341
|
+
markdown?: boolean;
|
|
342
|
+
/** Text/markdown sizing for the message body. */
|
|
343
|
+
proseSize?: "xs" | "sm" | "base" | "lg";
|
|
344
|
+
/** Shiki theme name used for fenced code blocks in the content. */
|
|
345
|
+
codeTheme?: string;
|
|
346
|
+
/** Disable syntax highlighting for code blocks (no Shiki loads). */
|
|
347
|
+
codeHighlight?: boolean;
|
|
348
|
+
/** An action button was clicked. */
|
|
349
|
+
onMessageaction?: (event: CustomEvent<{ messageId: string; action: "copy" | "like" | "dislike" | "regenerate" | "edit" }>) => void;
|
|
350
|
+
}
|
|
351
|
+
|
|
352
|
+
export const KitnMessage = createKitnComponent<KitnMessageProps>(
|
|
353
|
+
'kitn-message',
|
|
354
|
+
["theme","message","role","content","markdown","proseSize","codeTheme","codeHighlight"],
|
|
355
|
+
{ onMessageaction: 'messageaction' },
|
|
356
|
+
);
|
|
357
|
+
|
|
358
|
+
export interface KitnMessageSkillsProps extends KitnBaseProps {
|
|
359
|
+
/** The active skills to badge. Set as a JS property. */
|
|
360
|
+
skills: { id: string; name: string }[];
|
|
361
|
+
}
|
|
362
|
+
|
|
363
|
+
export const KitnMessageSkills = createKitnComponent<KitnMessageSkillsProps>(
|
|
364
|
+
'kitn-message-skills',
|
|
365
|
+
["theme","skills"],
|
|
366
|
+
{ },
|
|
367
|
+
);
|
|
368
|
+
|
|
369
|
+
export interface KitnModelSwitcherProps extends KitnBaseProps {
|
|
370
|
+
/** The selectable models. Set as a JS property (array). */
|
|
371
|
+
models: { id: string; name: string; provider?: undefined | string }[];
|
|
372
|
+
/** The currently-selected model id. Defaults to the first model. */
|
|
373
|
+
currentModel?: string;
|
|
374
|
+
/** A model was selected. */
|
|
375
|
+
onModelchange?: (event: CustomEvent<{ modelId: string }>) => void;
|
|
376
|
+
}
|
|
377
|
+
|
|
378
|
+
export const KitnModelSwitcher = createKitnComponent<KitnModelSwitcherProps>(
|
|
379
|
+
'kitn-model-switcher',
|
|
380
|
+
["theme","models","currentModel"],
|
|
381
|
+
{ onModelchange: 'modelchange' },
|
|
382
|
+
);
|
|
383
|
+
|
|
384
|
+
export interface KitnPromptInputProps extends KitnBaseProps {
|
|
385
|
+
/** Controlled value of the input. When set, the host owns the text and must update it on `valuechange`; leave unset for uncontrolled behavior. */
|
|
386
|
+
value?: string;
|
|
387
|
+
/** Placeholder text shown in the empty input. */
|
|
388
|
+
placeholder?: string;
|
|
389
|
+
/** Disable the input and submit button entirely (non-interactive). */
|
|
390
|
+
disabled?: boolean;
|
|
391
|
+
/** Show the loading/streaming state and block submit (use while awaiting a reply). */
|
|
392
|
+
loading?: boolean;
|
|
393
|
+
/** Starter prompts shown above the input. Clicking one follows `suggestionMode`. Set as a JS property. */
|
|
394
|
+
suggestions?: string[];
|
|
395
|
+
/** What clicking a suggestion does: `'submit'` (default) sends it immediately as if typed and submitted; `'fill'` just places it in the input. */
|
|
396
|
+
suggestionMode?: "submit" | "fill";
|
|
397
|
+
/** Slash commands — when set, typing `/` opens the command palette. Set as a JS property. */
|
|
398
|
+
slashCommands?: { id: string; label: string; description?: string; category?: string }[];
|
|
399
|
+
/** Command ids to highlight as active. */
|
|
400
|
+
slashActiveIds?: string[];
|
|
401
|
+
/** Single-line palette rows. */
|
|
402
|
+
slashCompact?: boolean;
|
|
403
|
+
/** Show a Search (Globe) button in the left toolbar; clicking it fires a `search` event. */
|
|
404
|
+
search?: boolean;
|
|
405
|
+
/** Show a Voice (Mic) button in the left toolbar; clicking it fires a `voice` event. */
|
|
406
|
+
voice?: boolean;
|
|
407
|
+
/** Attachments to seed the input with (so a consumer can pre-populate staged files without an upload). Set as a JS property; the element then manages its own attachment state from there (add via the paperclip, remove per chip). */
|
|
408
|
+
attachments?: { id: string; type: "file" | "source-document"; filename?: string; mediaType?: string; url?: string; title?: string }[];
|
|
409
|
+
/** The Search (Globe) toolbar button was clicked. */
|
|
410
|
+
onSearch?: (event: CustomEvent<undefined>) => void;
|
|
411
|
+
/** A slash command was chosen from the palette. */
|
|
412
|
+
onSlashselect?: (event: CustomEvent<{ command: { id: string; label: string; description?: undefined | string; category?: undefined | string } }>) => void;
|
|
413
|
+
/** The user submitted the prompt (Enter or send button) with its attachments. */
|
|
414
|
+
onSubmit?: (event: CustomEvent<{ value: string; attachments: { id: string; type: "file" | "source-document"; filename?: undefined | string; mediaType?: undefined | string; url?: undefined | string; title?: undefined | string }[] }>) => void;
|
|
415
|
+
/** A suggestion was clicked while `suggestion-mode="fill"`. */
|
|
416
|
+
onSuggestionclick?: (event: CustomEvent<{ value: string }>) => void;
|
|
417
|
+
/** The input text changed (fires on every keystroke). */
|
|
418
|
+
onValuechange?: (event: CustomEvent<{ value: string }>) => void;
|
|
419
|
+
/** The Voice (Mic) toolbar button was clicked. */
|
|
420
|
+
onVoice?: (event: CustomEvent<undefined>) => void;
|
|
421
|
+
}
|
|
422
|
+
|
|
423
|
+
export const KitnPromptInput = createKitnComponent<KitnPromptInputProps>(
|
|
424
|
+
'kitn-prompt-input',
|
|
425
|
+
["theme","value","placeholder","disabled","loading","suggestions","suggestionMode","slashCommands","slashActiveIds","slashCompact","search","voice","attachments"],
|
|
426
|
+
{ onSearch: 'search', onSlashselect: 'slashselect', onSubmit: 'submit', onSuggestionclick: 'suggestionclick', onValuechange: 'valuechange', onVoice: 'voice' },
|
|
427
|
+
);
|
|
428
|
+
|
|
429
|
+
export interface KitnPromptSuggestionsProps extends KitnBaseProps {
|
|
430
|
+
/** The suggestions. Strings, or `{ label, value }` when the displayed text and the emitted value differ. Set as a JS property. */
|
|
431
|
+
suggestions: (string | { label: string; value?: undefined | string })[];
|
|
432
|
+
/** Chip style: `'outline'` (default), `'ghost'`, or `'default'` (filled). */
|
|
433
|
+
variant?: "ghost" | "default" | "outline";
|
|
434
|
+
/** Size preset for each chip. Defaults to the pill default (`'lg'`); pass `'sm'` for smaller pills (or `'md'`). */
|
|
435
|
+
size?: "sm" | "lg" | "md" | "icon" | "icon-sm";
|
|
436
|
+
/** Full-width left-aligned rows instead of pills. */
|
|
437
|
+
block?: boolean;
|
|
438
|
+
/** Substring to highlight within each suggestion. */
|
|
439
|
+
highlight?: string;
|
|
440
|
+
/** A suggestion was clicked. */
|
|
441
|
+
onSelect?: (event: CustomEvent<{ value: string }>) => void;
|
|
442
|
+
}
|
|
443
|
+
|
|
444
|
+
export const KitnPromptSuggestions = createKitnComponent<KitnPromptSuggestionsProps>(
|
|
445
|
+
'kitn-prompt-suggestions',
|
|
446
|
+
["theme","suggestions","variant","size","block","highlight"],
|
|
447
|
+
{ onSelect: 'select' },
|
|
448
|
+
);
|
|
449
|
+
|
|
450
|
+
export interface KitnReasoningProps extends KitnBaseProps {
|
|
451
|
+
/** The reasoning text to display. */
|
|
452
|
+
text: string;
|
|
453
|
+
/** Trigger label. */
|
|
454
|
+
label?: string;
|
|
455
|
+
/** Controlled open state — set as a property (`el.open = true`). Omit for uncontrolled (the trigger toggles it). */
|
|
456
|
+
open?: boolean;
|
|
457
|
+
/** While true, auto-expands (and re-collapses when it flips false). */
|
|
458
|
+
streaming?: boolean;
|
|
459
|
+
/** Render `text` as markdown. */
|
|
460
|
+
markdown?: boolean;
|
|
461
|
+
/** Open state changed (via the trigger or streaming auto-open). */
|
|
462
|
+
onOpenchange?: (event: CustomEvent<{ open: boolean }>) => void;
|
|
463
|
+
}
|
|
464
|
+
|
|
465
|
+
export const KitnReasoning = createKitnComponent<KitnReasoningProps>(
|
|
466
|
+
'kitn-reasoning',
|
|
467
|
+
["theme","text","label","open","streaming","markdown"],
|
|
468
|
+
{ onOpenchange: 'openchange' },
|
|
469
|
+
);
|
|
470
|
+
|
|
471
|
+
export interface KitnResponseStreamProps extends KitnBaseProps {
|
|
472
|
+
/** Text to stream. A string, or an `AsyncIterable<string>` (set as a JS property — async iterables can't be HTML attributes). */
|
|
473
|
+
text?: string | AsyncIterable<string>;
|
|
474
|
+
/** Reveal animation. */
|
|
475
|
+
mode?: "typewriter" | "fade";
|
|
476
|
+
/** Characters/segments per tick. */
|
|
477
|
+
speed?: number;
|
|
478
|
+
/** Element tag to render as. */
|
|
479
|
+
as?: string;
|
|
480
|
+
/** Streaming finished. */
|
|
481
|
+
onComplete?: (event: CustomEvent) => void;
|
|
482
|
+
}
|
|
483
|
+
|
|
484
|
+
export const KitnResponseStream = createKitnComponent<KitnResponseStreamProps>(
|
|
485
|
+
'kitn-response-stream',
|
|
486
|
+
["theme","text","mode","speed","as"],
|
|
487
|
+
{ onComplete: 'complete' },
|
|
488
|
+
);
|
|
489
|
+
|
|
490
|
+
export interface KitnSourceProps extends KitnBaseProps {
|
|
491
|
+
/** The URL this citation links to (the domain also seeds the default label/favicon). */
|
|
492
|
+
href?: string;
|
|
493
|
+
/** Trigger label (defaults to the domain). */
|
|
494
|
+
label?: string;
|
|
495
|
+
/** Hover-card headline. Attribute: `headline` (`title` is avoided — it's a global HTML attribute that reflects in a CE constructor and breaks it). */
|
|
496
|
+
headline?: string;
|
|
497
|
+
/** Hover-card body text describing the source. */
|
|
498
|
+
description?: string;
|
|
499
|
+
/** Show the source's favicon next to the trigger label. */
|
|
500
|
+
showFavicon?: boolean;
|
|
501
|
+
}
|
|
502
|
+
|
|
503
|
+
export const KitnSource = createKitnComponent<KitnSourceProps>(
|
|
504
|
+
'kitn-source',
|
|
505
|
+
["theme","href","label","headline","description","showFavicon"],
|
|
506
|
+
{ },
|
|
507
|
+
);
|
|
508
|
+
|
|
509
|
+
export interface KitnSourceListProps extends KitnBaseProps {
|
|
510
|
+
/** The sources to render. Set as a JS property. */
|
|
511
|
+
sources: { href: string; title?: undefined | string; description?: undefined | string; label?: undefined | string; showFavicon?: undefined | boolean }[];
|
|
512
|
+
/** Show favicons on all items (per-item `showFavicon` overrides). */
|
|
513
|
+
showFavicon?: boolean;
|
|
514
|
+
}
|
|
515
|
+
|
|
516
|
+
export const KitnSourceList = createKitnComponent<KitnSourceListProps>(
|
|
517
|
+
'kitn-source-list',
|
|
518
|
+
["theme","sources","showFavicon"],
|
|
519
|
+
{ },
|
|
520
|
+
);
|
|
521
|
+
|
|
522
|
+
export interface KitnTextShimmerProps extends KitnBaseProps {
|
|
523
|
+
/** The text to shimmer. */
|
|
524
|
+
text?: string;
|
|
525
|
+
/** Element tag to render as (default `span`). */
|
|
526
|
+
as?: string;
|
|
527
|
+
/** Animation duration in seconds. */
|
|
528
|
+
duration?: number;
|
|
529
|
+
/** Gradient spread (5–45). */
|
|
530
|
+
spread?: number;
|
|
531
|
+
}
|
|
532
|
+
|
|
533
|
+
export const KitnTextShimmer = createKitnComponent<KitnTextShimmerProps>(
|
|
534
|
+
'kitn-text-shimmer',
|
|
535
|
+
["theme","text","as","duration","spread"],
|
|
536
|
+
{ },
|
|
537
|
+
);
|
|
538
|
+
|
|
539
|
+
export interface KitnThinkingBarProps extends KitnBaseProps {
|
|
540
|
+
/** The shimmering label, e.g. "Thinking…". */
|
|
541
|
+
text?: string;
|
|
542
|
+
/** When true, show a "stop" affordance that fires a `stop` event. */
|
|
543
|
+
stoppable?: boolean;
|
|
544
|
+
/** Label for the stop affordance. */
|
|
545
|
+
stopLabel?: string;
|
|
546
|
+
/** The "stop / answer now" affordance was clicked. */
|
|
547
|
+
onStop?: (event: CustomEvent) => void;
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
export const KitnThinkingBar = createKitnComponent<KitnThinkingBarProps>(
|
|
551
|
+
'kitn-thinking-bar',
|
|
552
|
+
["theme","text","stoppable","stopLabel"],
|
|
553
|
+
{ onStop: 'stop' },
|
|
554
|
+
);
|
|
555
|
+
|
|
556
|
+
export interface KitnToolProps extends KitnBaseProps {
|
|
557
|
+
/** The tool-call to display. Set as a JS property. */
|
|
558
|
+
tool?: { type: string; state: "input-streaming" | "input-available" | "output-available" | "output-error"; input?: Record<string, unknown>; output?: Record<string, unknown>; toolCallId?: string; errorText?: string };
|
|
559
|
+
/** Start expanded. */
|
|
560
|
+
open?: boolean;
|
|
561
|
+
}
|
|
562
|
+
|
|
563
|
+
export const KitnTool = createKitnComponent<KitnToolProps>(
|
|
564
|
+
'kitn-tool',
|
|
565
|
+
["theme","tool","open"],
|
|
566
|
+
{ },
|
|
567
|
+
);
|
|
568
|
+
|
|
569
|
+
export interface KitnVoiceInputProps extends KitnBaseProps {
|
|
570
|
+
/** 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. */
|
|
571
|
+
transcribe?: (audio: Blob) => Promise<string>;
|
|
572
|
+
/** Disable the mic button (non-interactive). */
|
|
573
|
+
disabled?: boolean;
|
|
574
|
+
/** Raw audio captured (before transcription) — for hosts that prefer to handle transcription themselves instead of via the `transcribe` property. */
|
|
575
|
+
onAudiocaptured?: (event: CustomEvent<{ blob: Blob }>) => void;
|
|
576
|
+
/** Transcription completed (the `transcribe` property resolved). */
|
|
577
|
+
onTranscription?: (event: CustomEvent<{ text: string }>) => void;
|
|
578
|
+
}
|
|
579
|
+
|
|
580
|
+
export const KitnVoiceInput = createKitnComponent<KitnVoiceInputProps>(
|
|
581
|
+
'kitn-voice-input',
|
|
582
|
+
["theme","transcribe","disabled"],
|
|
583
|
+
{ onAudiocaptured: 'audiocaptured', onTranscription: 'transcription' },
|
|
584
|
+
);
|