@elevenlabs/convai-widget-core 0.0.7
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/LICENSE +21 -0
- package/dist/components/Avatar.d.ts +10 -0
- package/dist/components/Button.d.ts +26 -0
- package/dist/components/CopyButton.d.ts +7 -0
- package/dist/components/Flag.d.ts +11 -0
- package/dist/components/Icon.d.ts +31 -0
- package/dist/components/InOutTransition.d.ts +37 -0
- package/dist/components/SizeTransition.d.ts +28 -0
- package/dist/components/TextArea.d.ts +2 -0
- package/dist/contexts/attributes.d.ts +17 -0
- package/dist/contexts/avatar-config.d.ts +13 -0
- package/dist/contexts/conversation.d.ts +42 -0
- package/dist/contexts/language-config.d.ts +16 -0
- package/dist/contexts/mic-config.d.ts +13 -0
- package/dist/contexts/root-portal.d.ts +6 -0
- package/dist/contexts/server-location.d.ts +14 -0
- package/dist/contexts/session-config.d.ts +9 -0
- package/dist/contexts/terms.d.ts +14 -0
- package/dist/contexts/text-contents.d.ts +12 -0
- package/dist/contexts/widget-config.d.ts +12 -0
- package/dist/index.d.ts +2 -0
- package/dist/index.dev.d.ts +1 -0
- package/dist/index.js +5511 -0
- package/dist/index.local.d.ts +1 -0
- package/dist/index.test.d.ts +1 -0
- package/dist/mocks/browser.d.ts +29 -0
- package/dist/mocks/web-component.d.ts +5 -0
- package/dist/orb/Orb.d.ts +24 -0
- package/dist/styles/Style.d.ts +1 -0
- package/dist/types/attributes.d.ts +5 -0
- package/dist/types/config.d.ts +71 -0
- package/dist/types/languages.d.ts +169 -0
- package/dist/utils/signalish.d.ts +7 -0
- package/dist/utils/useContextSafely.d.ts +2 -0
- package/dist/utils/useCssTransition.d.ts +13 -0
- package/dist/utils/useReducedMotion.d.ts +1 -0
- package/dist/widget/CallButton.d.ts +7 -0
- package/dist/widget/CompactExpandableTrigger.d.ts +2 -0
- package/dist/widget/CompactTrigger.d.ts +2 -0
- package/dist/widget/ErrorModal.d.ts +6 -0
- package/dist/widget/ExpandableTriggerActions.d.ts +2 -0
- package/dist/widget/FullExpandableTrigger.d.ts +2 -0
- package/dist/widget/FullTrigger.d.ts +2 -0
- package/dist/widget/LanguageSelect.d.ts +7 -0
- package/dist/widget/PoweredBy.d.ts +1 -0
- package/dist/widget/Sheet.d.ts +6 -0
- package/dist/widget/SheetActions.d.ts +7 -0
- package/dist/widget/SheetLanguageSelect.d.ts +2 -0
- package/dist/widget/StatusLabel.d.ts +2 -0
- package/dist/widget/TermsModal.d.ts +1 -0
- package/dist/widget/Transcript.d.ts +8 -0
- package/dist/widget/TranscriptMessage.d.ts +7 -0
- package/dist/widget/Trigger.d.ts +11 -0
- package/dist/widget/TriggerActions.d.ts +1 -0
- package/dist/widget/TriggerLanguageSelect.d.ts +6 -0
- package/dist/widget/TriggerMuteButton.d.ts +6 -0
- package/dist/widget/Wrapper.d.ts +1 -0
- package/dist/widget/index.d.ts +2 -0
- package/package.json +50 -0
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
import { WidgetConfig } from "../types/config";
|
|
2
|
+
export declare const AGENTS: {
|
|
3
|
+
readonly basic: WidgetConfig;
|
|
4
|
+
readonly text_only: {
|
|
5
|
+
readonly text_only: true;
|
|
6
|
+
readonly variant: import("../types/config").Variant;
|
|
7
|
+
readonly placement: import("../types/config").Placement;
|
|
8
|
+
readonly avatar: import("../types/config").AvatarConfig;
|
|
9
|
+
readonly feedback_mode: import("../types/config").FeedbackMode;
|
|
10
|
+
readonly language: import("@elevenlabs/client").Language;
|
|
11
|
+
readonly supported_language_overrides?: import("@elevenlabs/client").Language[];
|
|
12
|
+
readonly terms_html?: string;
|
|
13
|
+
readonly terms_key?: string;
|
|
14
|
+
readonly mic_muting_enabled: boolean;
|
|
15
|
+
readonly transcript_enabled: boolean;
|
|
16
|
+
readonly text_input_enabled: boolean;
|
|
17
|
+
readonly text_contents: Partial<import("../types/config").TextContents>;
|
|
18
|
+
readonly language_presets: Partial<Record<import("@elevenlabs/client").Language, {
|
|
19
|
+
text_contents?: Partial<import("../types/config").TextContents>;
|
|
20
|
+
first_message?: string;
|
|
21
|
+
}>>;
|
|
22
|
+
readonly disable_banner: boolean;
|
|
23
|
+
readonly override_link?: string;
|
|
24
|
+
readonly supports_text_only: boolean;
|
|
25
|
+
readonly first_message?: string;
|
|
26
|
+
};
|
|
27
|
+
readonly fail: WidgetConfig;
|
|
28
|
+
};
|
|
29
|
+
export declare const Worker: import("msw/lib/browser").SetupWorker;
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
export declare class Orb {
|
|
2
|
+
private static noiseImage;
|
|
3
|
+
private gl;
|
|
4
|
+
private program;
|
|
5
|
+
private startTime;
|
|
6
|
+
private targetSpeed;
|
|
7
|
+
private speed;
|
|
8
|
+
private rafId;
|
|
9
|
+
private resizeObserver?;
|
|
10
|
+
private colorA;
|
|
11
|
+
private colorB;
|
|
12
|
+
private offsets;
|
|
13
|
+
constructor(canvas: HTMLCanvasElement);
|
|
14
|
+
dispose(): void;
|
|
15
|
+
updateViewport(): void;
|
|
16
|
+
updateColors(a: string, b: string): void;
|
|
17
|
+
updateVolume(input: number, output: number): void;
|
|
18
|
+
private updateColor;
|
|
19
|
+
private setupProgram;
|
|
20
|
+
private getShader;
|
|
21
|
+
private copyNoiseImage;
|
|
22
|
+
toDataURL: () => string;
|
|
23
|
+
render: () => void;
|
|
24
|
+
}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Style: import("preact").FunctionComponent<{}>;
|
|
@@ -0,0 +1,5 @@
|
|
|
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"];
|
|
3
|
+
export type CustomAttributes = {
|
|
4
|
+
[key in (typeof CustomAttributeList)[number]]?: string;
|
|
5
|
+
};
|
|
@@ -0,0 +1,71 @@
|
|
|
1
|
+
import { Language } from "@elevenlabs/client";
|
|
2
|
+
export declare const Variants: readonly ["tiny", "compact", "full"];
|
|
3
|
+
export type Variant = (typeof Variants)[number];
|
|
4
|
+
export declare function parseVariant(variant: string | undefined): Variant;
|
|
5
|
+
export declare const Placements: readonly ["top-left", "top", "top-right", "bottom-left", "bottom", "bottom-right"];
|
|
6
|
+
export type Placement = (typeof Placements)[number];
|
|
7
|
+
export declare function parsePlacement(placement: string | undefined): Placement;
|
|
8
|
+
export type FeedbackMode = "none" | "during" | "end";
|
|
9
|
+
export interface WidgetConfig {
|
|
10
|
+
variant: Variant;
|
|
11
|
+
placement: Placement;
|
|
12
|
+
avatar: AvatarConfig;
|
|
13
|
+
feedback_mode: FeedbackMode;
|
|
14
|
+
language: Language;
|
|
15
|
+
supported_language_overrides?: Language[];
|
|
16
|
+
terms_html?: string;
|
|
17
|
+
terms_key?: string;
|
|
18
|
+
mic_muting_enabled: boolean;
|
|
19
|
+
transcript_enabled: boolean;
|
|
20
|
+
text_input_enabled: boolean;
|
|
21
|
+
text_contents: Partial<TextContents>;
|
|
22
|
+
language_presets: Partial<Record<Language, {
|
|
23
|
+
text_contents?: Partial<TextContents>;
|
|
24
|
+
first_message?: string;
|
|
25
|
+
}>>;
|
|
26
|
+
disable_banner: boolean;
|
|
27
|
+
override_link?: string;
|
|
28
|
+
text_only: boolean;
|
|
29
|
+
supports_text_only: boolean;
|
|
30
|
+
first_message?: string;
|
|
31
|
+
}
|
|
32
|
+
export type AvatarConfig = {
|
|
33
|
+
type: "orb";
|
|
34
|
+
color_1: string;
|
|
35
|
+
color_2: string;
|
|
36
|
+
} | {
|
|
37
|
+
type: "url";
|
|
38
|
+
custom_url: string;
|
|
39
|
+
} | {
|
|
40
|
+
type: "image";
|
|
41
|
+
url: string;
|
|
42
|
+
};
|
|
43
|
+
export declare const DefaultTextContents: {
|
|
44
|
+
main_label: string;
|
|
45
|
+
start_call: string;
|
|
46
|
+
start_chat: string;
|
|
47
|
+
new_call: string;
|
|
48
|
+
end_call: string;
|
|
49
|
+
mute_microphone: string;
|
|
50
|
+
change_language: string;
|
|
51
|
+
collapse: string;
|
|
52
|
+
expand: string;
|
|
53
|
+
copied: string;
|
|
54
|
+
accept_terms: string;
|
|
55
|
+
dismiss_terms: string;
|
|
56
|
+
listening_status: string;
|
|
57
|
+
speaking_status: string;
|
|
58
|
+
connecting_status: string;
|
|
59
|
+
chatting_status: string;
|
|
60
|
+
input_label: string;
|
|
61
|
+
input_placeholder: string;
|
|
62
|
+
input_placeholder_text_only: string;
|
|
63
|
+
input_placeholder_new_conversation: string;
|
|
64
|
+
user_ended_conversation: string;
|
|
65
|
+
agent_ended_conversation: string;
|
|
66
|
+
conversation_id: string;
|
|
67
|
+
error_occurred: string;
|
|
68
|
+
copy_id: string;
|
|
69
|
+
};
|
|
70
|
+
export declare const TextKeys: (keyof typeof DefaultTextContents)[];
|
|
71
|
+
export type TextContents = typeof DefaultTextContents;
|
|
@@ -0,0 +1,169 @@
|
|
|
1
|
+
import type { Language } from "@elevenlabs/client";
|
|
2
|
+
export interface LanguageInfo {
|
|
3
|
+
name: string;
|
|
4
|
+
flagCode: string;
|
|
5
|
+
languageCode: Language;
|
|
6
|
+
}
|
|
7
|
+
export declare const Languages: {
|
|
8
|
+
readonly en: {
|
|
9
|
+
readonly name: "English";
|
|
10
|
+
readonly flagCode: "us";
|
|
11
|
+
readonly languageCode: "en";
|
|
12
|
+
};
|
|
13
|
+
readonly zh: {
|
|
14
|
+
readonly name: "中文";
|
|
15
|
+
readonly flagCode: "cn";
|
|
16
|
+
readonly languageCode: "zh";
|
|
17
|
+
};
|
|
18
|
+
readonly es: {
|
|
19
|
+
readonly name: "Español";
|
|
20
|
+
readonly flagCode: "es";
|
|
21
|
+
readonly languageCode: "es";
|
|
22
|
+
};
|
|
23
|
+
readonly hi: {
|
|
24
|
+
readonly name: "हिन्दी";
|
|
25
|
+
readonly flagCode: "in";
|
|
26
|
+
readonly languageCode: "hi";
|
|
27
|
+
};
|
|
28
|
+
readonly pt: {
|
|
29
|
+
readonly name: "Português (Portugal)";
|
|
30
|
+
readonly flagCode: "pt";
|
|
31
|
+
readonly languageCode: "pt";
|
|
32
|
+
};
|
|
33
|
+
readonly "pt-br": {
|
|
34
|
+
readonly name: "Português (Brasil)";
|
|
35
|
+
readonly flagCode: "br";
|
|
36
|
+
readonly languageCode: "pt-br";
|
|
37
|
+
};
|
|
38
|
+
readonly fr: {
|
|
39
|
+
readonly name: "Français";
|
|
40
|
+
readonly flagCode: "fr";
|
|
41
|
+
readonly languageCode: "fr";
|
|
42
|
+
};
|
|
43
|
+
readonly de: {
|
|
44
|
+
readonly name: "Deutsch";
|
|
45
|
+
readonly flagCode: "de";
|
|
46
|
+
readonly languageCode: "de";
|
|
47
|
+
};
|
|
48
|
+
readonly ja: {
|
|
49
|
+
readonly name: "日本語";
|
|
50
|
+
readonly flagCode: "jp";
|
|
51
|
+
readonly languageCode: "ja";
|
|
52
|
+
};
|
|
53
|
+
readonly ar: {
|
|
54
|
+
readonly name: "العربية";
|
|
55
|
+
readonly flagCode: "ae";
|
|
56
|
+
readonly languageCode: "ar";
|
|
57
|
+
};
|
|
58
|
+
readonly ru: {
|
|
59
|
+
readonly name: "Русский";
|
|
60
|
+
readonly flagCode: "ru";
|
|
61
|
+
readonly languageCode: "ru";
|
|
62
|
+
};
|
|
63
|
+
readonly ko: {
|
|
64
|
+
readonly name: "한국어";
|
|
65
|
+
readonly flagCode: "kr";
|
|
66
|
+
readonly languageCode: "ko";
|
|
67
|
+
};
|
|
68
|
+
readonly id: {
|
|
69
|
+
readonly name: "Bahasa Indonesia";
|
|
70
|
+
readonly flagCode: "id";
|
|
71
|
+
readonly languageCode: "id";
|
|
72
|
+
};
|
|
73
|
+
readonly it: {
|
|
74
|
+
readonly name: "Italiano";
|
|
75
|
+
readonly flagCode: "it";
|
|
76
|
+
readonly languageCode: "it";
|
|
77
|
+
};
|
|
78
|
+
readonly nl: {
|
|
79
|
+
readonly name: "Nederlands";
|
|
80
|
+
readonly flagCode: "nl";
|
|
81
|
+
readonly languageCode: "nl";
|
|
82
|
+
};
|
|
83
|
+
readonly tr: {
|
|
84
|
+
readonly name: "Türkçe";
|
|
85
|
+
readonly flagCode: "tr";
|
|
86
|
+
readonly languageCode: "tr";
|
|
87
|
+
};
|
|
88
|
+
readonly pl: {
|
|
89
|
+
readonly name: "Polski";
|
|
90
|
+
readonly flagCode: "pl";
|
|
91
|
+
readonly languageCode: "pl";
|
|
92
|
+
};
|
|
93
|
+
readonly sv: {
|
|
94
|
+
readonly name: "Svenska";
|
|
95
|
+
readonly flagCode: "se";
|
|
96
|
+
readonly languageCode: "sv";
|
|
97
|
+
};
|
|
98
|
+
readonly ms: {
|
|
99
|
+
readonly name: "Bahasa Melayu";
|
|
100
|
+
readonly flagCode: "my";
|
|
101
|
+
readonly languageCode: "ms";
|
|
102
|
+
};
|
|
103
|
+
readonly ro: {
|
|
104
|
+
readonly name: "Română";
|
|
105
|
+
readonly flagCode: "ro";
|
|
106
|
+
readonly languageCode: "ro";
|
|
107
|
+
};
|
|
108
|
+
readonly uk: {
|
|
109
|
+
readonly name: "Українська";
|
|
110
|
+
readonly flagCode: "ua";
|
|
111
|
+
readonly languageCode: "uk";
|
|
112
|
+
};
|
|
113
|
+
readonly el: {
|
|
114
|
+
readonly name: "Ελληνικά";
|
|
115
|
+
readonly flagCode: "gr";
|
|
116
|
+
readonly languageCode: "el";
|
|
117
|
+
};
|
|
118
|
+
readonly cs: {
|
|
119
|
+
readonly name: "Čeština";
|
|
120
|
+
readonly flagCode: "cz";
|
|
121
|
+
readonly languageCode: "cs";
|
|
122
|
+
};
|
|
123
|
+
readonly da: {
|
|
124
|
+
readonly name: "Dansk";
|
|
125
|
+
readonly flagCode: "dk";
|
|
126
|
+
readonly languageCode: "da";
|
|
127
|
+
};
|
|
128
|
+
readonly fi: {
|
|
129
|
+
readonly name: "Suomi";
|
|
130
|
+
readonly flagCode: "fi";
|
|
131
|
+
readonly languageCode: "fi";
|
|
132
|
+
};
|
|
133
|
+
readonly bg: {
|
|
134
|
+
readonly name: "Български";
|
|
135
|
+
readonly flagCode: "bg";
|
|
136
|
+
readonly languageCode: "bg";
|
|
137
|
+
};
|
|
138
|
+
readonly hr: {
|
|
139
|
+
readonly name: "Hrvatski";
|
|
140
|
+
readonly flagCode: "hr";
|
|
141
|
+
readonly languageCode: "hr";
|
|
142
|
+
};
|
|
143
|
+
readonly sk: {
|
|
144
|
+
readonly name: "Slovenčina";
|
|
145
|
+
readonly flagCode: "sk";
|
|
146
|
+
readonly languageCode: "sk";
|
|
147
|
+
};
|
|
148
|
+
readonly ta: {
|
|
149
|
+
readonly name: "தமிழ்";
|
|
150
|
+
readonly flagCode: "in";
|
|
151
|
+
readonly languageCode: "ta";
|
|
152
|
+
};
|
|
153
|
+
readonly hu: {
|
|
154
|
+
readonly name: "Magyar";
|
|
155
|
+
readonly flagCode: "hu";
|
|
156
|
+
readonly languageCode: "hu";
|
|
157
|
+
};
|
|
158
|
+
readonly no: {
|
|
159
|
+
readonly name: "Norsk";
|
|
160
|
+
readonly flagCode: "no";
|
|
161
|
+
readonly languageCode: "no";
|
|
162
|
+
};
|
|
163
|
+
readonly vi: {
|
|
164
|
+
readonly name: "Tiếng Việt";
|
|
165
|
+
readonly flagCode: "vn";
|
|
166
|
+
readonly languageCode: "vi";
|
|
167
|
+
};
|
|
168
|
+
};
|
|
169
|
+
export declare function isValidLanguage(value?: string): value is Language;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { JSX } from "preact";
|
|
2
|
+
type SignalLike<T> = JSX.SignalLike<T>;
|
|
3
|
+
export type Signalish<T> = JSX.Signalish<T>;
|
|
4
|
+
export declare function useSignalish<T>(value: SignalLike<T> | T): SignalLike<T>;
|
|
5
|
+
export declare function getSignalish<T>(value: SignalLike<T> | T): T;
|
|
6
|
+
export declare function peekSignalish<T>(value: SignalLike<T> | T): T;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { TransitionEvent } from "preact/compat";
|
|
2
|
+
interface CSSTransitionOptions {
|
|
3
|
+
onStart?: () => void;
|
|
4
|
+
onEnd?: () => void;
|
|
5
|
+
}
|
|
6
|
+
export declare function useCSSTransition({ onStart, onEnd }: CSSTransitionOptions): {
|
|
7
|
+
transitioning: import("@preact/signals").Signal<boolean>;
|
|
8
|
+
handlers: {
|
|
9
|
+
onTransitionStart: (e: TransitionEvent<HTMLElement>) => void;
|
|
10
|
+
onTransitionEnd: (e: TransitionEvent<HTMLElement>) => void;
|
|
11
|
+
};
|
|
12
|
+
};
|
|
13
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function useReducedMotion(): import("@preact/signals").Signal<boolean>;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { BaseButtonProps } from "../components/Button";
|
|
2
|
+
interface CallButtonProps extends BaseButtonProps {
|
|
3
|
+
iconOnly?: boolean;
|
|
4
|
+
isDisconnected?: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function CallButton({ iconOnly, isDisconnected, children, ...props }: CallButtonProps): import("preact").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { ComponentChildren } from "preact";
|
|
2
|
+
import { SelectContentProps } from "@radix-ui/react-select";
|
|
3
|
+
interface LanguageSelectProps extends SelectContentProps {
|
|
4
|
+
children: ComponentChildren;
|
|
5
|
+
}
|
|
6
|
+
export declare function LanguageSelect({ children, ...rest }: LanguageSelectProps): import("preact").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function PoweredBy(): import("preact").JSX.Element | null;
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { Signal } from "@preact/signals";
|
|
2
|
+
interface SheetActionsProps {
|
|
3
|
+
showTranscript: boolean;
|
|
4
|
+
scrollPinned: Signal<boolean>;
|
|
5
|
+
}
|
|
6
|
+
export declare function SheetActions({ showTranscript, scrollPinned, }: SheetActionsProps): import("preact/compat").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TermsModal(): import("preact").JSX.Element;
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { ReadonlySignal, Signal } from "@preact/signals";
|
|
2
|
+
import { TranscriptEntry } from "../contexts/conversation";
|
|
3
|
+
interface TranscriptProps {
|
|
4
|
+
scrollPinned: Signal<boolean>;
|
|
5
|
+
transcript: ReadonlySignal<TranscriptEntry[]>;
|
|
6
|
+
}
|
|
7
|
+
export declare function Transcript({ scrollPinned, transcript }: TranscriptProps): import("preact/compat").JSX.Element;
|
|
8
|
+
export {};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { TranscriptEntry } from "../contexts/conversation";
|
|
2
|
+
interface TranscriptMessageProps {
|
|
3
|
+
entry: TranscriptEntry;
|
|
4
|
+
animateIn: boolean;
|
|
5
|
+
}
|
|
6
|
+
export declare function TranscriptMessage({ entry, animateIn, }: TranscriptMessageProps): import("preact").JSX.Element;
|
|
7
|
+
export {};
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
import { Signal } from "@preact/signals";
|
|
2
|
+
import { HTMLAttributes } from "preact/compat";
|
|
3
|
+
export interface ExpandableProps extends HTMLAttributes<HTMLDivElement> {
|
|
4
|
+
expanded: Signal<boolean>;
|
|
5
|
+
}
|
|
6
|
+
interface TriggerProps {
|
|
7
|
+
expandable?: boolean;
|
|
8
|
+
expanded: Signal<boolean>;
|
|
9
|
+
}
|
|
10
|
+
export declare function Trigger({ expandable, expanded }: TriggerProps): import("preact/compat").JSX.Element;
|
|
11
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function TriggerActions(): import("preact").JSX.Element;
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { SelectTriggerProps } from "@radix-ui/react-select";
|
|
2
|
+
interface Props extends SelectTriggerProps {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function TriggerLanguageSelect({ visible, className, ...rest }: Props): import("preact").JSX.Element | null;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ButtonProps } from "../components/Button";
|
|
2
|
+
interface TriggerMuteButtonProps extends Omit<ButtonProps, "icon"> {
|
|
3
|
+
visible: boolean;
|
|
4
|
+
}
|
|
5
|
+
export declare function TriggerMuteButton({ visible, ...rest }: TriggerMuteButtonProps): import("preact/compat").JSX.Element | null;
|
|
6
|
+
export {};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const Wrapper: import("preact").FunctionComponent<{}>;
|
package/package.json
ADDED
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@elevenlabs/convai-widget-core",
|
|
3
|
+
"version": "0.0.7",
|
|
4
|
+
"description": "The common library for the Conversational AI Widget.",
|
|
5
|
+
"main": "./dist/index.js",
|
|
6
|
+
"types": "./dist/index.d.ts",
|
|
7
|
+
"source": "./src/index.ts",
|
|
8
|
+
"type": "module",
|
|
9
|
+
"files": [
|
|
10
|
+
"dist"
|
|
11
|
+
],
|
|
12
|
+
"keywords": [],
|
|
13
|
+
"author": "ElevenLabs",
|
|
14
|
+
"license": "MIT",
|
|
15
|
+
"devDependencies": {
|
|
16
|
+
"@preact/preset-vite": "^2.10.1",
|
|
17
|
+
"@radix-ui/react-select": "^2.2.2",
|
|
18
|
+
"@radix-ui/react-slot": "^1.2.0",
|
|
19
|
+
"@types/preact-custom-element": "^4.0.4",
|
|
20
|
+
"@vitest/browser": "^3.1.2",
|
|
21
|
+
"eslint": "^9.8.0",
|
|
22
|
+
"msw": "^2.7.5",
|
|
23
|
+
"playwright": "^1.46.1",
|
|
24
|
+
"tailwindcss": "^3.4.17",
|
|
25
|
+
"typescript": "^5.5.4",
|
|
26
|
+
"vite": "^6.3.2",
|
|
27
|
+
"vitest": "^3.1.2"
|
|
28
|
+
},
|
|
29
|
+
"dependencies": {
|
|
30
|
+
"@preact/signals": "^2.0.4",
|
|
31
|
+
"clsx": "^2.1.1",
|
|
32
|
+
"preact": "^10.26.5",
|
|
33
|
+
"preact-custom-element": "^4.3.0",
|
|
34
|
+
"@elevenlabs/client": "0.1.6"
|
|
35
|
+
},
|
|
36
|
+
"repository": {
|
|
37
|
+
"type": "git",
|
|
38
|
+
"url": "git+https://github.com/elevenlabs/packages.git",
|
|
39
|
+
"directory": "packages/convai-widget-core"
|
|
40
|
+
},
|
|
41
|
+
"scripts": {
|
|
42
|
+
"build": "vite build && tsc --declaration --emitDeclarationOnly",
|
|
43
|
+
"dev": "vite",
|
|
44
|
+
"lint": "npm run lint:ts && npm run lint:es && npm run lint:prettier",
|
|
45
|
+
"lint:ts": "tsc --noEmit --skipLibCheck",
|
|
46
|
+
"lint:es": "npx eslint .",
|
|
47
|
+
"lint:prettier": "prettier 'src/**/*.ts' --check",
|
|
48
|
+
"test": "vitest"
|
|
49
|
+
}
|
|
50
|
+
}
|