@elevenlabs/convai-widget-core 0.5.2 → 0.5.5

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.
Files changed (42) hide show
  1. package/dist/components/Avatar.d.ts +1 -1
  2. package/dist/components/Button.d.ts +3 -2
  3. package/dist/components/CopyButton.d.ts +1 -1
  4. package/dist/components/Flag.d.ts +1 -1
  5. package/dist/components/Icon.d.ts +6 -0
  6. package/dist/components/InOutTransition.d.ts +1 -1
  7. package/dist/components/SizeTransition.d.ts +1 -1
  8. package/dist/components/TextArea.d.ts +1 -1
  9. package/dist/contexts/root-portal.d.ts +1 -1
  10. package/dist/contexts/shadow-host.d.ts +8 -0
  11. package/dist/contexts/widget-config.d.ts +5 -0
  12. package/dist/index.js +5283 -2274
  13. package/dist/markdown/components/CodeBlock.d.ts +7 -0
  14. package/dist/markdown/components/ContentBlock.d.ts +19 -0
  15. package/dist/markdown/components/Image.d.ts +5 -0
  16. package/dist/markdown/components/Table.d.ts +11 -0
  17. package/dist/markdown/components/components.d.ts +2 -0
  18. package/dist/markdown/index.d.ts +12 -0
  19. package/dist/markdown/utils/highlighter.d.ts +11 -0
  20. package/dist/markdown/utils/parse-blocks.d.ts +1 -0
  21. package/dist/markdown/utils/parse-incomplete-markdown.d.ts +1 -0
  22. package/dist/markdown/utils/utils.d.ts +1 -0
  23. package/dist/markdown.dev.d.ts +1 -0
  24. package/dist/mocks/browser.d.ts +94 -7
  25. package/dist/mocks/web-component.d.ts +1 -1
  26. package/dist/types/attributes.d.ts +1 -1
  27. package/dist/types/config.d.ts +7 -0
  28. package/dist/types/languages.d.ts +195 -0
  29. package/dist/utils/cn.d.ts +2 -0
  30. package/dist/version.d.ts +1 -1
  31. package/dist/widget/CompactTrigger.d.ts +1 -1
  32. package/dist/widget/ErrorModal.d.ts +1 -1
  33. package/dist/widget/ExpandableTriggerActions.d.ts +1 -1
  34. package/dist/widget/FeedbackActions.d.ts +1 -1
  35. package/dist/widget/FeedbackPage.d.ts +1 -1
  36. package/dist/widget/FullTrigger.d.ts +1 -1
  37. package/dist/widget/SheetActions.d.ts +1 -1
  38. package/dist/widget/StatusLabel.d.ts +1 -1
  39. package/dist/widget/Transcript.d.ts +1 -1
  40. package/dist/widget/Trigger.d.ts +1 -1
  41. package/dist/widget/TriggerMuteButton.d.ts +1 -1
  42. package/package.json +24 -3
@@ -0,0 +1,7 @@
1
+ import { type HTMLAttributes } from "preact/compat";
2
+ type CodeBlockProps = HTMLAttributes<HTMLDivElement> & {
3
+ code: string;
4
+ language: string;
5
+ };
6
+ export declare const CodeBlock: ({ code, language, className, ...rest }: CodeBlockProps) => import("preact").JSX.Element;
7
+ export {};
@@ -0,0 +1,19 @@
1
+ import type { ComponentChildren } from "preact";
2
+ import type { HTMLAttributes } from "preact/compat";
3
+ type ContentBlockRootProps = HTMLAttributes<HTMLDivElement> & {
4
+ children: ComponentChildren;
5
+ };
6
+ declare function ContentBlockRoot({ children, className, ...props }: ContentBlockRootProps): import("preact").JSX.Element;
7
+ type ContentBlockActionsProps = HTMLAttributes<HTMLDivElement> & {
8
+ children: ComponentChildren;
9
+ };
10
+ declare function ContentBlockActions({ children, className, ...props }: ContentBlockActionsProps): import("preact").JSX.Element;
11
+ type ContentBlockContentProps = HTMLAttributes<HTMLDivElement> & {
12
+ children: ComponentChildren;
13
+ };
14
+ declare function ContentBlockContent({ children, className, ...props }: ContentBlockContentProps): import("preact").JSX.Element;
15
+ export declare const ContentBlock: typeof ContentBlockRoot & {
16
+ Actions: typeof ContentBlockActions;
17
+ Content: typeof ContentBlockContent;
18
+ };
19
+ export {};
@@ -0,0 +1,5 @@
1
+ import type { DetailedHTMLProps, ImgHTMLAttributes } from "react";
2
+ import type { ExtraProps } from "react-markdown";
3
+ type ImageComponentProps = DetailedHTMLProps<ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement> & ExtraProps;
4
+ export declare const ImageComponent: ({ node, className, src, alt, ...props }: ImageComponentProps) => import("preact").JSX.Element | null;
5
+ export {};
@@ -0,0 +1,11 @@
1
+ import { HTMLAttributes } from "preact/compat";
2
+ export declare function useCopyTable({ onCopy, onError, timeout, }?: {
3
+ onCopy?: () => void;
4
+ onError?: (error: Error) => void;
5
+ timeout?: number;
6
+ }): {
7
+ isCopied: import("@preact/signals").Signal<boolean>;
8
+ copyTableData: (event: React.MouseEvent<HTMLButtonElement>) => Promise<void>;
9
+ disabled: boolean;
10
+ };
11
+ export declare const TableComponent: ({ children, className, ...props }: HTMLAttributes<HTMLTableElement>) => import("preact").JSX.Element;
@@ -0,0 +1,2 @@
1
+ import type { Options } from "react-markdown";
2
+ export declare const components: Options["components"];
@@ -0,0 +1,12 @@
1
+ import { type Options } from "react-markdown";
2
+ export { defaultUrlTransform } from "react-markdown";
3
+ export type StreamdownProps = Options & {
4
+ parseIncompleteMarkdown?: boolean;
5
+ className?: string;
6
+ isAnimating?: boolean;
7
+ };
8
+ export type StreamdownRuntimeContextType = {
9
+ isAnimating: boolean;
10
+ };
11
+ export declare const StreamdownRuntimeContext: import("preact").Context<StreamdownRuntimeContextType>;
12
+ export declare const WidgetStreamdown: ({ children, parseIncompleteMarkdown: shouldParseIncompleteMarkdown, components, className, isAnimating, urlTransform, ...props }: StreamdownProps) => import("preact").JSX.Element;
@@ -0,0 +1,11 @@
1
+ import type { LRParser } from "@lezer/lr";
2
+ import type { MarkdownParser } from "@lezer/markdown";
3
+ export type Parser = LRParser | MarkdownParser;
4
+ export declare const ParsersContext: import("preact").Context<Record<string, Parser>>;
5
+ export declare const parserConfig: Record<string, Parser>;
6
+ export declare const languageParser: Record<string, string>;
7
+ export interface CodeProps {
8
+ code: string;
9
+ language?: string;
10
+ }
11
+ export declare const Code: (props: CodeProps) => import("preact").JSX.Element;
@@ -0,0 +1 @@
1
+ export declare const parseMarkdownIntoBlocks: (markdown: string) => string[];
@@ -0,0 +1 @@
1
+ export declare const parseIncompleteMarkdown: (text: string) => string;
@@ -0,0 +1 @@
1
+ export declare const save: (filename: string, content: string | Blob, mimeType: string) => void;
@@ -0,0 +1 @@
1
+ import "preact/debug";
@@ -10,9 +10,10 @@ export declare const AGENTS: {
10
10
  readonly end_feedback?: {
11
11
  type: import("../types/config").FeedbackType;
12
12
  } | null;
13
- readonly language: import("@elevenlabs/client").Language;
14
- readonly supported_language_overrides?: import("@elevenlabs/client").Language[];
13
+ readonly language: import("@elevenlabs/types").ConversationConfigOverrideAgentLanguage;
14
+ readonly supported_language_overrides?: import("@elevenlabs/types").ConversationConfigOverrideAgentLanguage[];
15
15
  readonly terms_html?: string;
16
+ readonly terms_text?: string;
16
17
  readonly terms_key?: string;
17
18
  readonly mic_muting_enabled: boolean;
18
19
  readonly transcript_enabled: boolean;
@@ -21,9 +22,12 @@ export declare const AGENTS: {
21
22
  readonly always_expanded: boolean;
22
23
  readonly text_contents: Partial<import("../types/config").TextContents>;
23
24
  readonly styles?: Partial<import("../types/config").Styles>;
24
- readonly language_presets: Partial<Record<import("@elevenlabs/client").Language, {
25
+ readonly language_presets: Partial<Record<import("@elevenlabs/types").ConversationConfigOverrideAgentLanguage, {
25
26
  text_contents?: Partial<import("../types/config").TextContents>;
26
27
  first_message?: string;
28
+ terms_html?: string;
29
+ terms_text?: string;
30
+ terms_key?: string;
27
31
  }>>;
28
32
  readonly disable_banner: boolean;
29
33
  readonly override_link?: string;
@@ -40,9 +44,10 @@ export declare const AGENTS: {
40
44
  readonly end_feedback?: {
41
45
  type: import("../types/config").FeedbackType;
42
46
  } | null;
43
- readonly language: import("@elevenlabs/client").Language;
44
- readonly supported_language_overrides?: import("@elevenlabs/client").Language[];
47
+ readonly language: import("@elevenlabs/types").ConversationConfigOverrideAgentLanguage;
48
+ readonly supported_language_overrides?: import("@elevenlabs/types").ConversationConfigOverrideAgentLanguage[];
45
49
  readonly terms_html?: string;
50
+ readonly terms_text?: string;
46
51
  readonly terms_key?: string;
47
52
  readonly mic_muting_enabled: boolean;
48
53
  readonly transcript_enabled: boolean;
@@ -51,9 +56,12 @@ export declare const AGENTS: {
51
56
  readonly always_expanded: boolean;
52
57
  readonly text_contents: Partial<import("../types/config").TextContents>;
53
58
  readonly styles?: Partial<import("../types/config").Styles>;
54
- readonly language_presets: Partial<Record<import("@elevenlabs/client").Language, {
59
+ readonly language_presets: Partial<Record<import("@elevenlabs/types").ConversationConfigOverrideAgentLanguage, {
55
60
  text_contents?: Partial<import("../types/config").TextContents>;
56
61
  first_message?: string;
62
+ terms_html?: string;
63
+ terms_text?: string;
64
+ terms_key?: string;
57
65
  }>>;
58
66
  readonly disable_banner: boolean;
59
67
  readonly override_link?: string;
@@ -62,5 +70,84 @@ export declare const AGENTS: {
62
70
  readonly first_message?: string;
63
71
  };
64
72
  readonly fail: WidgetConfig;
73
+ readonly end_call_test: {
74
+ readonly text_only: true;
75
+ readonly transcript_enabled: true;
76
+ readonly text_input_enabled: true;
77
+ readonly first_message: "";
78
+ readonly variant: import("../types/config").Variant;
79
+ readonly placement: import("../types/config").Placement;
80
+ readonly avatar: import("../types/config").AvatarConfig;
81
+ readonly feedback_mode: import("../types/config").FeedbackMode;
82
+ readonly end_feedback?: {
83
+ type: import("../types/config").FeedbackType;
84
+ } | null;
85
+ readonly language: import("@elevenlabs/types").ConversationConfigOverrideAgentLanguage;
86
+ readonly supported_language_overrides?: import("@elevenlabs/types").ConversationConfigOverrideAgentLanguage[];
87
+ readonly terms_html?: string;
88
+ readonly terms_text?: string;
89
+ readonly terms_key?: string;
90
+ readonly mic_muting_enabled: boolean;
91
+ readonly default_expanded: boolean;
92
+ readonly always_expanded: boolean;
93
+ readonly text_contents: Partial<import("../types/config").TextContents>;
94
+ readonly styles?: Partial<import("../types/config").Styles>;
95
+ readonly language_presets: Partial<Record<import("@elevenlabs/types").ConversationConfigOverrideAgentLanguage, {
96
+ text_contents?: Partial<import("../types/config").TextContents>;
97
+ first_message?: string;
98
+ terms_html?: string;
99
+ terms_text?: string;
100
+ terms_key?: string;
101
+ }>>;
102
+ readonly disable_banner: boolean;
103
+ readonly override_link?: string;
104
+ readonly supports_text_only: boolean;
105
+ readonly use_rtc?: boolean;
106
+ };
107
+ readonly localized: {
108
+ readonly terms_html: "<p>Default Terms in English</p>";
109
+ readonly terms_key: "terms_default";
110
+ readonly supported_language_overrides: ["es", "fr"];
111
+ readonly language_presets: {
112
+ readonly es: {
113
+ readonly text_contents: {
114
+ readonly start_chat: "Iniciar una llamada";
115
+ };
116
+ readonly first_message: "¡Hola! ¿Cómo puedo ayudarte?";
117
+ readonly terms_html: "<p>Términos en Español</p>";
118
+ readonly terms_key: "terms_es";
119
+ };
120
+ readonly fr: {
121
+ readonly text_contents: {
122
+ readonly start_chat: "Commencer un appel";
123
+ };
124
+ readonly first_message: "Bonjour! Comment puis-je vous aider?";
125
+ readonly terms_html: "<p>Termes en Français</p>";
126
+ readonly terms_key: "terms_fr";
127
+ };
128
+ };
129
+ readonly variant: import("../types/config").Variant;
130
+ readonly placement: import("../types/config").Placement;
131
+ readonly avatar: import("../types/config").AvatarConfig;
132
+ readonly feedback_mode: import("../types/config").FeedbackMode;
133
+ readonly end_feedback?: {
134
+ type: import("../types/config").FeedbackType;
135
+ } | null;
136
+ readonly language: import("@elevenlabs/types").ConversationConfigOverrideAgentLanguage;
137
+ readonly terms_text?: string;
138
+ readonly mic_muting_enabled: boolean;
139
+ readonly transcript_enabled: boolean;
140
+ readonly text_input_enabled: boolean;
141
+ readonly default_expanded: boolean;
142
+ readonly always_expanded: boolean;
143
+ readonly text_contents: Partial<import("../types/config").TextContents>;
144
+ readonly styles?: Partial<import("../types/config").Styles>;
145
+ readonly disable_banner: boolean;
146
+ readonly override_link?: string;
147
+ readonly text_only: boolean;
148
+ readonly supports_text_only: boolean;
149
+ readonly first_message?: string;
150
+ readonly use_rtc?: boolean;
151
+ };
65
152
  };
66
- export declare const Worker: import("msw/lib/browser").SetupWorker;
153
+ export declare const Worker: import("msw/browser").SetupWorker;
@@ -2,4 +2,4 @@ import type { AGENTS } from "./browser";
2
2
  import { CustomAttributes } from "../types/attributes";
3
3
  export declare function setupWebComponent(attributes: CustomAttributes & {
4
4
  "agent-id": keyof typeof AGENTS;
5
- }): void;
5
+ }): HTMLElement;
@@ -1,5 +1,5 @@
1
1
  export declare function parseBoolAttribute(value: string | undefined): boolean | null;
2
- export declare const CustomAttributeList: readonly ["variant", "placement", "override-config", "avatar-image-url", "avatar-orb-color-1", "avatar-orb-color-2", "agent-id", "signed-url", "terms-key", "server-location", "language", "dynamic-variables", "show-avatar-when-collapsed", "override-prompt", "override-first-message", "override-language", "override-voice-id", "override-text-only", "mic-muting", "transcript", "text-input", "text-contents", "default-expanded", "always-expanded", "user-id", "use-rtc", "collect-feedback"];
2
+ export declare const CustomAttributeList: readonly ["variant", "placement", "override-config", "avatar-image-url", "avatar-orb-color-1", "avatar-orb-color-2", "agent-id", "signed-url", "terms-key", "server-location", "language", "dynamic-variables", "show-avatar-when-collapsed", "override-prompt", "override-first-message", "override-language", "override-voice-id", "override-text-only", "mic-muting", "transcript", "text-input", "text-contents", "default-expanded", "always-expanded", "user-id", "use-rtc", "collect-feedback", "worklet-path-raw-audio-processor", "worklet-path-audio-concat-processor", "worklet-path-libsamplerate"];
3
3
  export type CustomAttributes = {
4
4
  [key in (typeof CustomAttributeList)[number]]?: string;
5
5
  };
@@ -18,6 +18,7 @@ export interface WidgetConfig {
18
18
  language: Language;
19
19
  supported_language_overrides?: Language[];
20
20
  terms_html?: string;
21
+ terms_text?: string;
21
22
  terms_key?: string;
22
23
  mic_muting_enabled: boolean;
23
24
  transcript_enabled: boolean;
@@ -29,6 +30,9 @@ export interface WidgetConfig {
29
30
  language_presets: Partial<Record<Language, {
30
31
  text_contents?: Partial<TextContents>;
31
32
  first_message?: string;
33
+ terms_html?: string;
34
+ terms_text?: string;
35
+ terms_key?: string;
32
36
  }>>;
33
37
  disable_banner: boolean;
34
38
  override_link?: string;
@@ -82,6 +86,9 @@ export declare const DefaultTextContents: {
82
86
  follow_up_feedback_placeholder: string;
83
87
  submit: string;
84
88
  go_back: string;
89
+ copy: string;
90
+ download: string;
91
+ wrap: string;
85
92
  };
86
93
  export declare const TextKeys: (keyof typeof DefaultTextContents)[];
87
94
  export type TextContents = typeof DefaultTextContents;
@@ -170,5 +170,200 @@ export declare const Languages: {
170
170
  readonly flagCode: "ph";
171
171
  readonly languageCode: "tl";
172
172
  };
173
+ readonly af: {
174
+ readonly name: "Afrikaans";
175
+ readonly flagCode: "za";
176
+ readonly languageCode: "af";
177
+ };
178
+ readonly hy: {
179
+ readonly name: "Հայերեն";
180
+ readonly flagCode: "am";
181
+ readonly languageCode: "hy";
182
+ };
183
+ readonly as: {
184
+ readonly name: "অসমীয়া";
185
+ readonly flagCode: "in";
186
+ readonly languageCode: "as";
187
+ };
188
+ readonly az: {
189
+ readonly name: "Azərbaycan";
190
+ readonly flagCode: "az";
191
+ readonly languageCode: "az";
192
+ };
193
+ readonly be: {
194
+ readonly name: "Беларуская";
195
+ readonly flagCode: "by";
196
+ readonly languageCode: "be";
197
+ };
198
+ readonly bn: {
199
+ readonly name: "বাংলা";
200
+ readonly flagCode: "in";
201
+ readonly languageCode: "bn";
202
+ };
203
+ readonly bs: {
204
+ readonly name: "Bosanski";
205
+ readonly flagCode: "ba";
206
+ readonly languageCode: "bs";
207
+ };
208
+ readonly ca: {
209
+ readonly name: "Català";
210
+ readonly flagCode: "es-ct";
211
+ readonly languageCode: "ca";
212
+ };
213
+ readonly et: {
214
+ readonly name: "Eesti";
215
+ readonly flagCode: "ee";
216
+ readonly languageCode: "et";
217
+ };
218
+ readonly gl: {
219
+ readonly name: "Galego";
220
+ readonly flagCode: "es-ga";
221
+ readonly languageCode: "gl";
222
+ };
223
+ readonly ka: {
224
+ readonly name: "ქართული";
225
+ readonly flagCode: "ge";
226
+ readonly languageCode: "ka";
227
+ };
228
+ readonly gu: {
229
+ readonly name: "ગુજરાતી";
230
+ readonly flagCode: "in";
231
+ readonly languageCode: "gu";
232
+ };
233
+ readonly ha: {
234
+ readonly name: "Hausa";
235
+ readonly flagCode: "ng";
236
+ readonly languageCode: "ha";
237
+ };
238
+ readonly he: {
239
+ readonly name: "עברית";
240
+ readonly flagCode: "il";
241
+ readonly languageCode: "he";
242
+ };
243
+ readonly is: {
244
+ readonly name: "Íslenska";
245
+ readonly flagCode: "is";
246
+ readonly languageCode: "is";
247
+ };
248
+ readonly ga: {
249
+ readonly name: "Gaeilge";
250
+ readonly flagCode: "ie";
251
+ readonly languageCode: "ga";
252
+ };
253
+ readonly jv: {
254
+ readonly name: "Basa Jawa";
255
+ readonly flagCode: "id";
256
+ readonly languageCode: "jv";
257
+ };
258
+ readonly kn: {
259
+ readonly name: "ಕನ್ನಡ";
260
+ readonly flagCode: "in";
261
+ readonly languageCode: "kn";
262
+ };
263
+ readonly kk: {
264
+ readonly name: "Қазақша";
265
+ readonly flagCode: "kz";
266
+ readonly languageCode: "kk";
267
+ };
268
+ readonly ky: {
269
+ readonly name: "Кыргызча";
270
+ readonly flagCode: "kg";
271
+ readonly languageCode: "ky";
272
+ };
273
+ readonly lv: {
274
+ readonly name: "Latviešu";
275
+ readonly flagCode: "lv";
276
+ readonly languageCode: "lv";
277
+ };
278
+ readonly lt: {
279
+ readonly name: "Lietuvių";
280
+ readonly flagCode: "lt";
281
+ readonly languageCode: "lt";
282
+ };
283
+ readonly lb: {
284
+ readonly name: "Lëtzebuergesch";
285
+ readonly flagCode: "lu";
286
+ readonly languageCode: "lb";
287
+ };
288
+ readonly mk: {
289
+ readonly name: "Македонски";
290
+ readonly flagCode: "mk";
291
+ readonly languageCode: "mk";
292
+ };
293
+ readonly ml: {
294
+ readonly name: "മലയാളം";
295
+ readonly flagCode: "in";
296
+ readonly languageCode: "ml";
297
+ };
298
+ readonly mr: {
299
+ readonly name: "मराठी";
300
+ readonly flagCode: "in";
301
+ readonly languageCode: "mr";
302
+ };
303
+ readonly ne: {
304
+ readonly name: "नेपाली";
305
+ readonly flagCode: "np";
306
+ readonly languageCode: "ne";
307
+ };
308
+ readonly ps: {
309
+ readonly name: "پښتو";
310
+ readonly flagCode: "af";
311
+ readonly languageCode: "ps";
312
+ };
313
+ readonly fa: {
314
+ readonly name: "فارسی";
315
+ readonly flagCode: "ir";
316
+ readonly languageCode: "fa";
317
+ };
318
+ readonly pa: {
319
+ readonly name: "ਪੰਜਾਬੀ";
320
+ readonly flagCode: "in";
321
+ readonly languageCode: "pa";
322
+ };
323
+ readonly sr: {
324
+ readonly name: "Српски";
325
+ readonly flagCode: "rs";
326
+ readonly languageCode: "sr";
327
+ };
328
+ readonly sd: {
329
+ readonly name: "سنڌي";
330
+ readonly flagCode: "in";
331
+ readonly languageCode: "sd";
332
+ };
333
+ readonly sl: {
334
+ readonly name: "Slovenščina";
335
+ readonly flagCode: "si";
336
+ readonly languageCode: "sl";
337
+ };
338
+ readonly so: {
339
+ readonly name: "Soomaali";
340
+ readonly flagCode: "so";
341
+ readonly languageCode: "so";
342
+ };
343
+ readonly sw: {
344
+ readonly name: "Kiswahili";
345
+ readonly flagCode: "ke";
346
+ readonly languageCode: "sw";
347
+ };
348
+ readonly te: {
349
+ readonly name: "తెలుగు";
350
+ readonly flagCode: "in";
351
+ readonly languageCode: "te";
352
+ };
353
+ readonly th: {
354
+ readonly name: "ไทย";
355
+ readonly flagCode: "th";
356
+ readonly languageCode: "th";
357
+ };
358
+ readonly ur: {
359
+ readonly name: "اردو";
360
+ readonly flagCode: "pk";
361
+ readonly languageCode: "ur";
362
+ };
363
+ readonly cy: {
364
+ readonly name: "Cymraeg";
365
+ readonly flagCode: "gb-wls";
366
+ readonly languageCode: "cy";
367
+ };
173
368
  };
174
369
  export declare function isValidLanguage(value?: string): value is Language;
@@ -0,0 +1,2 @@
1
+ import { type ClassValue } from "clsx";
2
+ export declare const cn: (...inputs: ClassValue[]) => string;
package/dist/version.d.ts CHANGED
@@ -1 +1 @@
1
- export declare const PACKAGE_VERSION = "0.5.2";
1
+ export declare const PACKAGE_VERSION = "0.5.5";
@@ -1,2 +1,2 @@
1
1
  import { HTMLAttributes } from "preact/compat";
2
- export declare function CompactTrigger({ className, ...rest }: HTMLAttributes<HTMLDivElement>): import("react-dom/src").JSX.Element;
2
+ export declare function CompactTrigger({ className, ...rest }: HTMLAttributes<HTMLDivElement>): import("preact").JSX.Element;
@@ -2,5 +2,5 @@ import { Signal } from "@preact/signals";
2
2
  interface ErrorModalProps {
3
3
  sawError: Signal<boolean>;
4
4
  }
5
- export declare function ErrorModal({ sawError }: ErrorModalProps): import("react-dom/src").JSX.Element;
5
+ export declare function ErrorModal({ sawError }: ErrorModalProps): import("preact").JSX.Element;
6
6
  export {};
@@ -1,2 +1,2 @@
1
1
  import { ExpandableProps } from "./Trigger";
2
- export declare function ExpandableTriggerActions({ expanded }: ExpandableProps): import("react-dom/src").JSX.Element;
2
+ export declare function ExpandableTriggerActions({ expanded }: ExpandableProps): import("preact").JSX.Element;
@@ -1 +1 @@
1
- export declare function FeedbackActions(): import("react-dom/src").JSX.Element;
1
+ export declare function FeedbackActions(): import("preact").JSX.Element;
@@ -1 +1 @@
1
- export declare function FeedbackPage(): import("react-dom/src").JSX.Element;
1
+ export declare function FeedbackPage(): import("preact").JSX.Element;
@@ -1,2 +1,2 @@
1
1
  import { HTMLAttributes } from "preact/compat";
2
- export declare function FullTrigger({ className, ...rest }: HTMLAttributes<HTMLDivElement>): import("react-dom/src").JSX.Element;
2
+ export declare function FullTrigger({ className, ...rest }: HTMLAttributes<HTMLDivElement>): import("preact").JSX.Element;
@@ -3,5 +3,5 @@ interface SheetActionsProps {
3
3
  showTranscript: boolean;
4
4
  scrollPinned: Signal<boolean>;
5
5
  }
6
- export declare function SheetActions({ showTranscript, scrollPinned, }: SheetActionsProps): import("react-dom/src").JSX.Element;
6
+ export declare function SheetActions({ showTranscript, scrollPinned, }: SheetActionsProps): import("preact").JSX.Element;
7
7
  export {};
@@ -1,2 +1,2 @@
1
1
  import { HTMLAttributes } from "preact/compat";
2
- export declare function StatusLabel({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("react-dom/src").JSX.Element;
2
+ export declare function StatusLabel({ className, ...props }: HTMLAttributes<HTMLDivElement>): import("preact").JSX.Element;
@@ -4,5 +4,5 @@ interface TranscriptProps {
4
4
  scrollPinned: Signal<boolean>;
5
5
  transcript: ReadonlySignal<TranscriptEntry[]>;
6
6
  }
7
- export declare function Transcript({ scrollPinned, transcript }: TranscriptProps): import("react-dom/src").JSX.Element;
7
+ export declare function Transcript({ scrollPinned, transcript }: TranscriptProps): import("preact").JSX.Element;
8
8
  export {};
@@ -7,5 +7,5 @@ interface TriggerProps {
7
7
  expandable?: boolean;
8
8
  expanded: Signal<boolean>;
9
9
  }
10
- export declare function Trigger({ expandable, expanded }: TriggerProps): import("react-dom/src").JSX.Element;
10
+ export declare function Trigger({ expandable, expanded }: TriggerProps): import("preact").JSX.Element;
11
11
  export {};
@@ -2,5 +2,5 @@ import { ButtonProps } from "../components/Button";
2
2
  interface TriggerMuteButtonProps extends Omit<ButtonProps, "icon"> {
3
3
  visible: boolean;
4
4
  }
5
- export declare function TriggerMuteButton({ visible, ...rest }: TriggerMuteButtonProps): import("react-dom/src").JSX.Element | null;
5
+ export declare function TriggerMuteButton({ visible, ...rest }: TriggerMuteButtonProps): import("preact").JSX.Element | null;
6
6
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@elevenlabs/convai-widget-core",
3
- "version": "0.5.2",
3
+ "version": "0.5.5",
4
4
  "description": "The common library for the Conversational AI Widget.",
5
5
  "main": "./dist/index.js",
6
6
  "types": "./dist/index.d.ts",
@@ -23,15 +23,35 @@
23
23
  "playwright": "^1.46.1",
24
24
  "tailwindcss": "^3.4.17",
25
25
  "typescript": "^5.5.4",
26
- "vite": "^6.3.2",
26
+ "unified": "^11.0.5",
27
+ "vite": "^6.4.1",
28
+ "vite-bundle-analyzer": "^1.2.3",
27
29
  "vitest": "^3.1.2"
28
30
  },
29
31
  "dependencies": {
32
+ "@lezer/common": "^1.3.0",
33
+ "@lezer/highlight": "^1.2.3",
34
+ "@lezer/html": "^1.3.12",
35
+ "@lezer/javascript": "^1.5.4",
36
+ "@lezer/json": "^1.0.3",
37
+ "@lezer/lr": "^1.4.3",
38
+ "@lezer/markdown": "^1.6.0",
39
+ "@lezer/python": "^1.1.18",
40
+ "@lezer/xml": "^1.0.6",
41
+ "@lezer/yaml": "^1.0.3",
30
42
  "@preact/signals": "^2.0.4",
31
43
  "clsx": "^2.1.1",
44
+ "hast-util-from-lezer": "^0.5.4",
45
+ "hast-util-to-jsx-runtime": "^2.3.6",
46
+ "marked": "^17.0.0",
32
47
  "preact": "^10.26.5",
33
48
  "preact-custom-element": "^4.3.0",
34
- "@elevenlabs/client": "0.10.0"
49
+ "react-markdown": "^10.1.0",
50
+ "rehype-harden": "^1.1.5",
51
+ "rehype-raw": "^7.0.0",
52
+ "remark-gfm": "^4.0.1",
53
+ "tailwind-merge": "^3.4.0",
54
+ "@elevenlabs/client": "0.12.2"
35
55
  },
36
56
  "publishConfig": {
37
57
  "access": "public"
@@ -46,6 +66,7 @@
46
66
  "postinstall": "npm run generate-version",
47
67
  "prebuild": "npm run generate-version",
48
68
  "build": "vite build && tsc --declaration --emitDeclarationOnly",
69
+ "build:analyze": "ANALYZE=true vite build",
49
70
  "dev": "npm run generate-version && vite",
50
71
  "lint": "npm run check-types && npm run lint:es && npm run lint:prettier",
51
72
  "check-types": "tsc --noEmit --skipLibCheck",