@elevenlabs/convai-widget-core 0.11.7 → 0.12.1
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 +2 -0
- package/dist/components/Icon.d.ts +2 -0
- package/dist/contexts/conversation.d.ts +21 -0
- package/dist/contexts/widget-config.d.ts +3 -0
- package/dist/index.js +5826 -5273
- package/dist/mocks/browser.d.ts +137 -0
- package/dist/types/attributes.d.ts +1 -1
- package/dist/types/config.d.ts +10 -0
- package/dist/utils/display-transcript.d.ts +2 -1
- package/dist/version.d.ts +1 -1
- package/dist/widget/EventBridge.d.ts +1 -0
- package/dist/widget/PendingFilePreview.d.ts +7 -0
- package/dist/widget/UploadFileButton.d.ts +8 -0
- package/dist/widget/UploadFileButton.test.d.ts +1 -0
- package/dist/widget/useFileUpload.d.ts +32 -0
- package/package.json +10 -10
|
@@ -16,6 +16,8 @@ export declare function usePlaygroundSettings(): {
|
|
|
16
16
|
setTextOnly: import("preact/hooks").Dispatch<import("preact/hooks").StateUpdater<boolean>>;
|
|
17
17
|
alwaysExpanded: boolean;
|
|
18
18
|
setAlwaysExpanded: import("preact/hooks").Dispatch<import("preact/hooks").StateUpdater<boolean>>;
|
|
19
|
+
allowEvents: boolean;
|
|
20
|
+
setAllowEvents: import("preact/hooks").Dispatch<import("preact/hooks").StateUpdater<boolean>>;
|
|
19
21
|
dismissible: boolean;
|
|
20
22
|
setDismissible: import("preact/hooks").Dispatch<import("preact/hooks").StateUpdater<boolean>>;
|
|
21
23
|
showAgentStatus: boolean;
|
|
@@ -2,6 +2,7 @@ import { JSX } from "preact";
|
|
|
2
2
|
declare const ICON_MAP: {
|
|
3
3
|
phone: typeof PhoneIcon;
|
|
4
4
|
"phone-off": typeof PhoneSlashIcon;
|
|
5
|
+
paperclip: typeof PaperclipIcon;
|
|
5
6
|
chat: typeof ChatIcon;
|
|
6
7
|
mic: typeof MicIcon;
|
|
7
8
|
"mic-off": typeof MicOffIcon;
|
|
@@ -34,6 +35,7 @@ interface IconProps {
|
|
|
34
35
|
export declare function Icon({ name, size, className }: IconProps): JSX.Element;
|
|
35
36
|
declare function PhoneIcon(props: JSX.HTMLAttributes<SVGSVGElement>): JSX.Element;
|
|
36
37
|
declare function PhoneSlashIcon(props: JSX.HTMLAttributes<SVGSVGElement>): JSX.Element;
|
|
38
|
+
declare function PaperclipIcon(props: JSX.HTMLAttributes<SVGSVGElement>): JSX.Element;
|
|
37
39
|
declare function ChatIcon(props: JSX.HTMLAttributes<SVGSVGElement>): JSX.Element;
|
|
38
40
|
declare function MicIcon(props: JSX.HTMLAttributes<SVGSVGElement>): JSX.Element;
|
|
39
41
|
declare function MicOffIcon(props: JSX.HTMLAttributes<SVGSVGElement>): JSX.Element;
|
|
@@ -20,12 +20,25 @@ export declare const ConversationContext: import("preact").Context<{
|
|
|
20
20
|
setMicMuted: (muted: boolean) => void;
|
|
21
21
|
sendFeedback: (like: boolean) => void;
|
|
22
22
|
sendUserMessage: (text: string) => void;
|
|
23
|
+
sendMultimodalMessage: (input: {
|
|
24
|
+
text?: string;
|
|
25
|
+
file: TranscriptFileInput & {
|
|
26
|
+
fileId: string;
|
|
27
|
+
};
|
|
28
|
+
}) => void;
|
|
23
29
|
sendUserActivity: () => void;
|
|
30
|
+
sendContextualUpdate: (text: string) => void;
|
|
24
31
|
addModeToggleEntry: (mode: ConversationMode) => void;
|
|
25
32
|
} | null>;
|
|
26
33
|
interface ConversationProviderProps {
|
|
27
34
|
children: ComponentChildren;
|
|
28
35
|
}
|
|
36
|
+
/** File metadata stored alongside a user message in the local transcript. */
|
|
37
|
+
export type TranscriptFileInput = {
|
|
38
|
+
fileName: string;
|
|
39
|
+
mimeType: string;
|
|
40
|
+
previewUrl: string | null;
|
|
41
|
+
};
|
|
29
42
|
export type TranscriptEntry = {
|
|
30
43
|
type: "message";
|
|
31
44
|
role: Role;
|
|
@@ -33,6 +46,7 @@ export type TranscriptEntry = {
|
|
|
33
46
|
isText: boolean;
|
|
34
47
|
conversationIndex: number;
|
|
35
48
|
eventId?: number;
|
|
49
|
+
fileInput?: TranscriptFileInput | null;
|
|
36
50
|
} | {
|
|
37
51
|
type: "agent_tool_request";
|
|
38
52
|
toolName: string;
|
|
@@ -79,7 +93,14 @@ export declare function useConversation(): {
|
|
|
79
93
|
setMicMuted: (muted: boolean) => void;
|
|
80
94
|
sendFeedback: (like: boolean) => void;
|
|
81
95
|
sendUserMessage: (text: string) => void;
|
|
96
|
+
sendMultimodalMessage: (input: {
|
|
97
|
+
text?: string;
|
|
98
|
+
file: TranscriptFileInput & {
|
|
99
|
+
fileId: string;
|
|
100
|
+
};
|
|
101
|
+
}) => void;
|
|
82
102
|
sendUserActivity: () => void;
|
|
103
|
+
sendContextualUpdate: (text: string) => void;
|
|
83
104
|
addModeToggleEntry: (mode: ConversationMode) => void;
|
|
84
105
|
};
|
|
85
106
|
export {};
|
|
@@ -10,6 +10,8 @@ export declare function useTextOnly(): ReadonlySignal<boolean>;
|
|
|
10
10
|
export declare function useIsConversationTextOnly(): ReadonlySignal<boolean>;
|
|
11
11
|
export declare function useFirstMessage(): ReadonlySignal<string | null>;
|
|
12
12
|
export declare function useTextInputEnabled(): ReadonlySignal<boolean>;
|
|
13
|
+
export declare function useFileInputEnabled(): ReadonlySignal<boolean>;
|
|
14
|
+
export declare function useFileInputMaxFiles(): ReadonlySignal<number | null>;
|
|
13
15
|
export declare function useLocalizedTerms(): ReadonlySignal<{
|
|
14
16
|
terms_html: string | undefined;
|
|
15
17
|
terms_text: string | undefined;
|
|
@@ -24,4 +26,5 @@ export interface MarkdownLinkConfig {
|
|
|
24
26
|
}
|
|
25
27
|
export declare function useMarkdownLinkConfig(): ReadonlySignal<MarkdownLinkConfig>;
|
|
26
28
|
export declare function useSyntaxTheme(): ReadonlySignal<SyntaxHighlightTheme>;
|
|
29
|
+
export declare function useAllowEvents(): ReadonlySignal<boolean>;
|
|
27
30
|
export {};
|