@elevenlabs/convai-widget-core 0.9.0 → 0.10.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/dist/PlaygroundSettings.d.ts +37 -0
- package/dist/contexts/conversation.d.ts +13 -13
- package/dist/index.dev.d.ts +1 -1
- package/dist/index.js +4600 -4552
- package/dist/mocks/browser.d.ts +11 -0
- package/dist/shadowdom.dev.d.ts +1 -0
- package/dist/types/attributes.d.ts +1 -1
- package/dist/types/config.d.ts +1 -0
- package/dist/utils/display-transcript.d.ts +40 -0
- package/dist/utils/display-transcript.test.d.ts +1 -0
- package/dist/version.d.ts +1 -1
- package/dist/widget/Transcript.d.ts +2 -2
- package/dist/widget/TranscriptMessage.d.ts +2 -2
- package/package.json +2 -2
package/dist/mocks/browser.d.ts
CHANGED
|
@@ -42,6 +42,7 @@ export declare const AGENTS: {
|
|
|
42
42
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
43
43
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
44
44
|
readonly show_agent_status?: boolean;
|
|
45
|
+
readonly show_conversation_id?: boolean;
|
|
45
46
|
};
|
|
46
47
|
readonly webrtc: {
|
|
47
48
|
readonly use_rtc: true;
|
|
@@ -84,6 +85,7 @@ export declare const AGENTS: {
|
|
|
84
85
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
85
86
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
86
87
|
readonly show_agent_status?: boolean;
|
|
88
|
+
readonly show_conversation_id?: boolean;
|
|
87
89
|
};
|
|
88
90
|
readonly fail: WidgetConfig;
|
|
89
91
|
readonly end_call_test: {
|
|
@@ -127,6 +129,7 @@ export declare const AGENTS: {
|
|
|
127
129
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
128
130
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
129
131
|
readonly show_agent_status?: boolean;
|
|
132
|
+
readonly show_conversation_id?: boolean;
|
|
130
133
|
};
|
|
131
134
|
readonly localized: {
|
|
132
135
|
readonly terms_html: "<p>Default Terms in English</p>";
|
|
@@ -180,6 +183,7 @@ export declare const AGENTS: {
|
|
|
180
183
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
181
184
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
182
185
|
readonly show_agent_status?: boolean;
|
|
186
|
+
readonly show_conversation_id?: boolean;
|
|
183
187
|
};
|
|
184
188
|
readonly markdown: {
|
|
185
189
|
readonly text_only: true;
|
|
@@ -224,6 +228,7 @@ export declare const AGENTS: {
|
|
|
224
228
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
225
229
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
226
230
|
readonly show_agent_status?: boolean;
|
|
231
|
+
readonly show_conversation_id?: boolean;
|
|
227
232
|
};
|
|
228
233
|
readonly markdown_no_links: {
|
|
229
234
|
readonly text_only: true;
|
|
@@ -266,6 +271,7 @@ export declare const AGENTS: {
|
|
|
266
271
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
267
272
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
268
273
|
readonly show_agent_status?: boolean;
|
|
274
|
+
readonly show_conversation_id?: boolean;
|
|
269
275
|
};
|
|
270
276
|
readonly markdown_domain_allowlist: {
|
|
271
277
|
readonly text_only: true;
|
|
@@ -310,6 +316,7 @@ export declare const AGENTS: {
|
|
|
310
316
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
311
317
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
312
318
|
readonly show_agent_status?: boolean;
|
|
319
|
+
readonly show_conversation_id?: boolean;
|
|
313
320
|
};
|
|
314
321
|
readonly markdown_default_domain: {
|
|
315
322
|
readonly text_only: true;
|
|
@@ -352,6 +359,7 @@ export declare const AGENTS: {
|
|
|
352
359
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
353
360
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
354
361
|
readonly show_agent_status?: boolean;
|
|
362
|
+
readonly show_conversation_id?: boolean;
|
|
355
363
|
};
|
|
356
364
|
readonly tool_call: {
|
|
357
365
|
readonly text_only: true;
|
|
@@ -394,6 +402,7 @@ export declare const AGENTS: {
|
|
|
394
402
|
readonly use_rtc?: boolean;
|
|
395
403
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
396
404
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
405
|
+
readonly show_conversation_id?: boolean;
|
|
397
406
|
};
|
|
398
407
|
readonly audio_tags_strip: {
|
|
399
408
|
readonly text_only: true;
|
|
@@ -436,6 +445,7 @@ export declare const AGENTS: {
|
|
|
436
445
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
437
446
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
438
447
|
readonly show_agent_status?: boolean;
|
|
448
|
+
readonly show_conversation_id?: boolean;
|
|
439
449
|
};
|
|
440
450
|
readonly audio_tags_no_strip: {
|
|
441
451
|
readonly text_only: true;
|
|
@@ -478,6 +488,7 @@ export declare const AGENTS: {
|
|
|
478
488
|
readonly syntax_highlight_theme?: import("../types/config").SyntaxHighlightTheme;
|
|
479
489
|
readonly conversation_mode_toggle_enabled?: boolean;
|
|
480
490
|
readonly show_agent_status?: boolean;
|
|
491
|
+
readonly show_conversation_id?: boolean;
|
|
481
492
|
};
|
|
482
493
|
};
|
|
483
494
|
export declare const Worker: import("msw/browser").SetupWorker;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import "./playground.css";
|
|
@@ -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-llm", "override-speed", "override-stability", "override-similarity-boost", "override-first-message", "override-language", "override-voice-id", "override-text-only", "mic-muting", "transcript", "text-input", "text-contents", "default-expanded", "always-expanded", "dismissible", "strip-audio-tags", "user-id", "use-rtc", "collect-feedback", "worklet-path-raw-audio-processor", "worklet-path-audio-concat-processor", "worklet-path-libsamplerate", "syntax-highlight-theme", "markdown-link-allowed-hosts", "markdown-link-include-www", "markdown-link-allow-http", "show-agent-status"];
|
|
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-llm", "override-speed", "override-stability", "override-similarity-boost", "override-first-message", "override-language", "override-voice-id", "override-text-only", "mic-muting", "transcript", "text-input", "text-contents", "default-expanded", "always-expanded", "dismissible", "strip-audio-tags", "user-id", "use-rtc", "collect-feedback", "worklet-path-raw-audio-processor", "worklet-path-audio-concat-processor", "worklet-path-libsamplerate", "syntax-highlight-theme", "markdown-link-allowed-hosts", "markdown-link-include-www", "markdown-link-allow-http", "show-agent-status", "show-conversation-id"];
|
|
3
3
|
export type CustomAttributes = {
|
|
4
4
|
[key in (typeof CustomAttributeList)[number]]?: string;
|
|
5
5
|
};
|
package/dist/types/config.d.ts
CHANGED
|
@@ -0,0 +1,40 @@
|
|
|
1
|
+
import type { Role } from "@elevenlabs/client";
|
|
2
|
+
import type { TranscriptEntry } from "../contexts/conversation";
|
|
3
|
+
import type { ConversationMode } from "../contexts/conversation-mode";
|
|
4
|
+
export declare const ToolCallStatus: {
|
|
5
|
+
readonly LOADING: "loading";
|
|
6
|
+
readonly SUCCESS: "success";
|
|
7
|
+
readonly ERROR: "error";
|
|
8
|
+
};
|
|
9
|
+
export type ToolCallStatusType = (typeof ToolCallStatus)[keyof typeof ToolCallStatus];
|
|
10
|
+
export type DisplayTranscriptEntry = {
|
|
11
|
+
type: "message";
|
|
12
|
+
role: Role;
|
|
13
|
+
message: string;
|
|
14
|
+
isText: boolean;
|
|
15
|
+
conversationIndex: number;
|
|
16
|
+
eventId?: number;
|
|
17
|
+
toolStatus?: ToolCallStatusType;
|
|
18
|
+
} | {
|
|
19
|
+
type: "disconnection";
|
|
20
|
+
role: Role;
|
|
21
|
+
message?: undefined;
|
|
22
|
+
conversationIndex: number;
|
|
23
|
+
} | {
|
|
24
|
+
type: "error";
|
|
25
|
+
message: string;
|
|
26
|
+
conversationIndex: number;
|
|
27
|
+
} | {
|
|
28
|
+
type: "mode_toggle";
|
|
29
|
+
mode: ConversationMode;
|
|
30
|
+
conversationIndex: number;
|
|
31
|
+
};
|
|
32
|
+
export interface DisplayTranscriptConfig {
|
|
33
|
+
showAgentStatus: boolean;
|
|
34
|
+
transcriptEnabled: boolean;
|
|
35
|
+
/** If set, prepend as the first agent message (for text-only first message). */
|
|
36
|
+
firstMessage?: string;
|
|
37
|
+
/** The conversationIndex to use for the prepended first message. */
|
|
38
|
+
firstMessageConversationIndex?: number;
|
|
39
|
+
}
|
|
40
|
+
export declare function buildDisplayTranscript(entries: TranscriptEntry[], config: DisplayTranscriptConfig): DisplayTranscriptEntry[];
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
package/dist/version.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
export declare const PACKAGE_VERSION = "0.
|
|
1
|
+
export declare const PACKAGE_VERSION = "0.10.0";
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { ReadonlySignal, Signal } from "@preact/signals";
|
|
2
|
-
import {
|
|
2
|
+
import { DisplayTranscriptEntry } from "../utils/display-transcript";
|
|
3
3
|
interface TranscriptProps {
|
|
4
4
|
scrollPinned: Signal<boolean>;
|
|
5
|
-
transcript: ReadonlySignal<
|
|
5
|
+
transcript: ReadonlySignal<DisplayTranscriptEntry[]>;
|
|
6
6
|
}
|
|
7
7
|
export declare function Transcript({ scrollPinned, transcript }: TranscriptProps): import("preact").JSX.Element;
|
|
8
8
|
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type
|
|
1
|
+
import { type DisplayTranscriptEntry } from "../utils/display-transcript";
|
|
2
2
|
interface TranscriptMessageProps {
|
|
3
|
-
entry:
|
|
3
|
+
entry: DisplayTranscriptEntry;
|
|
4
4
|
animateIn: boolean;
|
|
5
5
|
}
|
|
6
6
|
export declare function TranscriptMessage({ entry, animateIn, }: TranscriptMessageProps): import("preact").JSX.Element;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@elevenlabs/convai-widget-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "The common library for the Conversational AI Widget.",
|
|
5
5
|
"main": "./dist/index.js",
|
|
6
6
|
"types": "./dist/index.d.ts",
|
|
@@ -58,7 +58,7 @@
|
|
|
58
58
|
"remark-parse": "^11.0.0",
|
|
59
59
|
"remark-rehype": "^11.1.2",
|
|
60
60
|
"tailwind-merge": "^3.4.0",
|
|
61
|
-
"@elevenlabs/client": "0.
|
|
61
|
+
"@elevenlabs/client": "0.15.0"
|
|
62
62
|
},
|
|
63
63
|
"publishConfig": {
|
|
64
64
|
"access": "public"
|