@voxket-ai/voxket-live 1.0.143 → 1.0.145
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 +1 -141
- package/dist/components/widget.d.ts +0 -1
- package/dist/core/client.d.ts +2 -16
- package/dist/index.cjs +189 -70
- package/dist/index.d.ts +1 -0
- package/dist/index.js +7827 -7663
- package/dist/lib/portal-manager.d.ts +86 -0
- package/dist/types/core.d.ts +0 -2
- package/package.json +1 -2
- package/dist/components/chat/attachment-message.d.ts +0 -9
- package/dist/components/chat/chat-input-panel.d.ts +0 -11
- package/dist/components/chat/chat-message.d.ts +0 -10
- package/dist/components/chat/default-views.d.ts +0 -5
- package/dist/components/chat/markdown-utils.d.ts +0 -5
- package/dist/components/chat/streaming-text.d.ts +0 -8
- package/dist/components/chat/thinking-indicator.d.ts +0 -6
- package/dist/components/chat/tool-execution-indicator.d.ts +0 -8
- package/dist/components/deep-analysis.d.ts +0 -17
- package/dist/examples/test-visualization-event.d.ts +0 -18
- package/dist/examples/visualization-view.d.ts +0 -8
- package/dist/hooks/chat-hooks.d.ts +0 -39
- package/dist/types/tools.d.ts +0 -23
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Voxket SDK Portal Management Utilities
|
|
3
|
+
*
|
|
4
|
+
* These utilities help manage portal rendering for fullscreen and popup modes
|
|
5
|
+
* to ensure proper isolation from consumer website styles.
|
|
6
|
+
*/
|
|
7
|
+
export declare class VoxketPortalManager {
|
|
8
|
+
private static portalContainers;
|
|
9
|
+
/**
|
|
10
|
+
* Creates an isolated portal container for fullscreen/popup modes
|
|
11
|
+
*/
|
|
12
|
+
static createPortalContainer(displayType: 'fullscreen' | 'popup', id: string): HTMLElement;
|
|
13
|
+
/**
|
|
14
|
+
* Removes a portal container and cleans up resources
|
|
15
|
+
*/
|
|
16
|
+
static removePortalContainer(id: string): void;
|
|
17
|
+
/**
|
|
18
|
+
* Applies strong CSS isolation to prevent consumer site interference
|
|
19
|
+
*/
|
|
20
|
+
private static applyContainerIsolation;
|
|
21
|
+
/**
|
|
22
|
+
* Cleans up all portal containers (useful for unmounting)
|
|
23
|
+
*/
|
|
24
|
+
static cleanupAllPortals(): void;
|
|
25
|
+
/**
|
|
26
|
+
* Checks if a portal container exists
|
|
27
|
+
*/
|
|
28
|
+
static hasPortalContainer(id: string): boolean;
|
|
29
|
+
/**
|
|
30
|
+
* Gets an existing portal container
|
|
31
|
+
*/
|
|
32
|
+
static getPortalContainer(id: string): HTMLElement | undefined;
|
|
33
|
+
}
|
|
34
|
+
export declare class VoxketStyleManager {
|
|
35
|
+
private static injectedStyles;
|
|
36
|
+
/**
|
|
37
|
+
* Injects critical CSS styles for display mode isolation
|
|
38
|
+
*/
|
|
39
|
+
static injectIsolationStyles(): void;
|
|
40
|
+
/**
|
|
41
|
+
* Removes injected isolation styles
|
|
42
|
+
*/
|
|
43
|
+
static removeIsolationStyles(): void;
|
|
44
|
+
/**
|
|
45
|
+
* Cleans up all injected styles
|
|
46
|
+
*/
|
|
47
|
+
static cleanupAllStyles(): void;
|
|
48
|
+
}
|
|
49
|
+
export declare class VoxketScrollManager {
|
|
50
|
+
private static originalBodyStyle;
|
|
51
|
+
private static isLocked;
|
|
52
|
+
/**
|
|
53
|
+
* Prevents body scrolling when fullscreen mode is active
|
|
54
|
+
*/
|
|
55
|
+
static lockBodyScroll(): void;
|
|
56
|
+
/**
|
|
57
|
+
* Restores body scrolling when fullscreen mode is closed
|
|
58
|
+
*/
|
|
59
|
+
static unlockBodyScroll(): void;
|
|
60
|
+
/**
|
|
61
|
+
* Checks if body scroll is currently locked
|
|
62
|
+
*/
|
|
63
|
+
static isBodyScrollLocked(): boolean;
|
|
64
|
+
}
|
|
65
|
+
export declare class VoxketPositionManager {
|
|
66
|
+
/**
|
|
67
|
+
* Calculates optimal popup position to avoid viewport edges
|
|
68
|
+
*/
|
|
69
|
+
static calculateOptimalPosition(preferredPosition: 'top-left' | 'top-right' | 'bottom-left' | 'bottom-right', popupWidth?: number, popupHeight?: number, margin?: number): {
|
|
70
|
+
position: string;
|
|
71
|
+
styles: Record<string, string>;
|
|
72
|
+
};
|
|
73
|
+
/**
|
|
74
|
+
* Checks if device is mobile
|
|
75
|
+
*/
|
|
76
|
+
static isMobileDevice(): boolean;
|
|
77
|
+
/**
|
|
78
|
+
* Gets mobile-optimized position (always bottom sheet)
|
|
79
|
+
*/
|
|
80
|
+
static getMobilePosition(): {
|
|
81
|
+
position: string;
|
|
82
|
+
styles: Record<string, string>;
|
|
83
|
+
};
|
|
84
|
+
}
|
|
85
|
+
export declare function initializeVoxketSDK(): void;
|
|
86
|
+
export declare function cleanupVoxketSDK(): void;
|
package/dist/types/core.d.ts
CHANGED
|
@@ -19,8 +19,6 @@ export interface SessionConfig {
|
|
|
19
19
|
participantName?: string;
|
|
20
20
|
/** Session-specific metadata */
|
|
21
21
|
metadata?: Record<string, any>;
|
|
22
|
-
/** Participant-specific metadata to be sent to the API */
|
|
23
|
-
participantMetadata?: Record<string, any>;
|
|
24
22
|
/** Session timeout in milliseconds */
|
|
25
23
|
timeout?: number;
|
|
26
24
|
/** Supported modalities for this session */
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@voxket-ai/voxket-live",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.145",
|
|
4
4
|
"description": "A React widget for embedding Voxket-powered audio/video/chat experiences.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.cjs",
|
|
@@ -94,7 +94,6 @@
|
|
|
94
94
|
"motion": "~12.18.1",
|
|
95
95
|
"path": "~0.12.7",
|
|
96
96
|
"react-markdown": "~10.1.0",
|
|
97
|
-
"recharts": "~3.2.1",
|
|
98
97
|
"rehype-highlight": "~7.0.2",
|
|
99
98
|
"remark-gfm": "~4.0.1",
|
|
100
99
|
"sonner": "~2.0.5",
|
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { ThemeType } from '../../styles';
|
|
2
|
-
import { ChatMessage } from '../../types/core';
|
|
3
|
-
interface AttachmentMessageProps {
|
|
4
|
-
message: ChatMessage;
|
|
5
|
-
theme: ThemeType;
|
|
6
|
-
isOwn: boolean;
|
|
7
|
-
}
|
|
8
|
-
export declare function AttachmentMessage({ message, theme, isOwn }: AttachmentMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export {};
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { ThemeType } from '../../styles';
|
|
2
|
-
interface ChatInputPanelProps {
|
|
3
|
-
onSendMessage: (message: string) => void;
|
|
4
|
-
onSendAttachments: (files: File[]) => void;
|
|
5
|
-
disabled?: boolean;
|
|
6
|
-
theme: ThemeType;
|
|
7
|
-
onEndChat?: () => void;
|
|
8
|
-
attachmentsEnabled?: boolean;
|
|
9
|
-
}
|
|
10
|
-
export declare function ChatInputPanel({ onSendMessage, onSendAttachments, disabled, theme, onEndChat, attachmentsEnabled }: ChatInputPanelProps): import("react/jsx-runtime").JSX.Element;
|
|
11
|
-
export {};
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import { ThemeType } from '../../styles';
|
|
2
|
-
import { ChatMessage } from '../../types/core';
|
|
3
|
-
interface ChatMessageProps {
|
|
4
|
-
message: ChatMessage;
|
|
5
|
-
theme: ThemeType;
|
|
6
|
-
isOwn: boolean;
|
|
7
|
-
isStreaming?: boolean;
|
|
8
|
-
}
|
|
9
|
-
export declare function ChatMessageComponent({ message, theme, isOwn, isStreaming }: ChatMessageProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
export declare function DefaultSuccessView(): import("react/jsx-runtime").JSX.Element;
|
|
2
|
-
export declare function DefaultTimeoutView(): import("react/jsx-runtime").JSX.Element;
|
|
3
|
-
export declare function DefaultToolExecutionView({ toolData }: {
|
|
4
|
-
toolData?: any;
|
|
5
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -1,5 +0,0 @@
|
|
|
1
|
-
import { ThemeType } from '../../styles';
|
|
2
|
-
export declare function createMarkdownComponents(theme: ThemeType): any;
|
|
3
|
-
export declare function linkifyText(text: string, theme: ThemeType): (string | import("react/jsx-runtime").JSX.Element)[];
|
|
4
|
-
export declare function detectMarkdownContent(content: string): boolean;
|
|
5
|
-
export declare function cleanMarkdownContent(content: string): string;
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
interface StreamingTextProps {
|
|
2
|
-
text: string;
|
|
3
|
-
isComplete: boolean;
|
|
4
|
-
isRealTimeStream?: boolean;
|
|
5
|
-
speed?: number;
|
|
6
|
-
}
|
|
7
|
-
export declare function StreamingText({ text, isComplete, isRealTimeStream, speed }: StreamingTextProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { ThemeType } from '../../styles';
|
|
2
|
-
import { ToolExecutionData } from '../../types/tools';
|
|
3
|
-
interface ToolExecutionIndicatorProps {
|
|
4
|
-
toolData: ToolExecutionData;
|
|
5
|
-
theme: ThemeType;
|
|
6
|
-
}
|
|
7
|
-
export declare function ToolExecutionIndicator({ toolData, theme }: ToolExecutionIndicatorProps): import("react/jsx-runtime").JSX.Element;
|
|
8
|
-
export {};
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { VoxketClient } from '../core/client';
|
|
2
|
-
import { ThemeType } from '../styles';
|
|
3
|
-
interface DeepAnalysisProps {
|
|
4
|
-
voxketClient: VoxketClient | null;
|
|
5
|
-
theme: ThemeType;
|
|
6
|
-
setTheme: (theme: ThemeType) => void;
|
|
7
|
-
configAgentId: string;
|
|
8
|
-
configParticipantName: string;
|
|
9
|
-
className?: string;
|
|
10
|
-
prompts?: string[];
|
|
11
|
-
statusMessage?: string;
|
|
12
|
-
welcomeTitle?: string;
|
|
13
|
-
welcomeSubTitle?: string;
|
|
14
|
-
participantMetadata?: Record<string, any>;
|
|
15
|
-
}
|
|
16
|
-
export declare function DeepAnalysis({ voxketClient, theme, setTheme, configAgentId, configParticipantName, className, prompts, statusMessage, welcomeTitle, welcomeSubTitle, participantMetadata }: DeepAnalysisProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
-
export {};
|
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Test script to simulate visualization_data events
|
|
3
|
-
* This can be run in the browser console when the deep analysis component is active
|
|
4
|
-
*/
|
|
5
|
-
declare global {
|
|
6
|
-
interface Window {
|
|
7
|
-
voxketClient?: any;
|
|
8
|
-
testVisualizationEvent?: () => void;
|
|
9
|
-
testBarChart?: () => void;
|
|
10
|
-
testLineChart?: () => void;
|
|
11
|
-
testTableData?: () => void;
|
|
12
|
-
}
|
|
13
|
-
}
|
|
14
|
-
declare function testVisualizationEvent(): void;
|
|
15
|
-
declare function testBarChart(): void;
|
|
16
|
-
declare function testLineChart(): void;
|
|
17
|
-
declare function testTableData(): void;
|
|
18
|
-
export { testVisualizationEvent, testBarChart, testLineChart, testTableData };
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { VoxketInteractiveView } from '../types/rpc';
|
|
2
|
-
/**
|
|
3
|
-
* Visualization RPC Component
|
|
4
|
-
* - Agent calls RPC with schema JSON
|
|
5
|
-
* - RpcManager passes data → this component renders chart/table
|
|
6
|
-
* - Component responds back via handler.didSuccess or handler.didFail
|
|
7
|
-
*/
|
|
8
|
-
export declare const VisualizationView: VoxketInteractiveView;
|
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import { VoxketClient } from '../core/client';
|
|
2
|
-
import { ChatMessage } from '../types/core';
|
|
3
|
-
import { InteractiveUIState } from '../types/rpc';
|
|
4
|
-
import { ToolExecutionData } from '../types/tools';
|
|
5
|
-
import * as React from 'react';
|
|
6
|
-
export type { ToolExecutionData };
|
|
7
|
-
export declare function useChatMessages(client: VoxketClient): {
|
|
8
|
-
messages: ChatMessage[];
|
|
9
|
-
setMessages: React.Dispatch<React.SetStateAction<ChatMessage[]>>;
|
|
10
|
-
isLoading: boolean;
|
|
11
|
-
setIsLoading: React.Dispatch<React.SetStateAction<boolean>>;
|
|
12
|
-
streamingMessages: Set<string>;
|
|
13
|
-
setStreamingMessages: React.Dispatch<React.SetStateAction<Set<string>>>;
|
|
14
|
-
pendingMessages: ChatMessage[];
|
|
15
|
-
setPendingMessages: React.Dispatch<React.SetStateAction<ChatMessage[]>>;
|
|
16
|
-
};
|
|
17
|
-
export declare function useAgentState(client: VoxketClient): {
|
|
18
|
-
agentState: "idle" | "thinking" | "speaking" | "tool_execution";
|
|
19
|
-
setAgentState: React.Dispatch<React.SetStateAction<"idle" | "thinking" | "speaking" | "tool_execution">>;
|
|
20
|
-
toolExecutions: ToolExecutionData[];
|
|
21
|
-
setToolExecutions: React.Dispatch<React.SetStateAction<ToolExecutionData[]>>;
|
|
22
|
-
};
|
|
23
|
-
export declare function useInteractionState(client: VoxketClient): {
|
|
24
|
-
currentInteraction: InteractiveUIState | null;
|
|
25
|
-
setCurrentInteraction: React.Dispatch<React.SetStateAction<InteractiveUIState | null>>;
|
|
26
|
-
};
|
|
27
|
-
export declare function useScrollBehavior(): {
|
|
28
|
-
messagesContainerRef: React.RefObject<HTMLDivElement>;
|
|
29
|
-
shouldAutoScroll: boolean;
|
|
30
|
-
setShouldAutoScroll: React.Dispatch<React.SetStateAction<boolean>>;
|
|
31
|
-
scrollToBottom: (immediate?: boolean) => void;
|
|
32
|
-
smartScrollToBottom: (immediate?: boolean) => void;
|
|
33
|
-
handleScroll: () => void;
|
|
34
|
-
};
|
|
35
|
-
export declare function useMobileDetection(): {
|
|
36
|
-
isMobile: boolean;
|
|
37
|
-
isFullscreen: boolean;
|
|
38
|
-
setIsFullscreen: React.Dispatch<React.SetStateAction<boolean>>;
|
|
39
|
-
};
|
package/dist/types/tools.d.ts
DELETED
|
@@ -1,23 +0,0 @@
|
|
|
1
|
-
export interface ToolExecutionData {
|
|
2
|
-
type: string;
|
|
3
|
-
function_calls: Array<{
|
|
4
|
-
id: string;
|
|
5
|
-
type: string;
|
|
6
|
-
call_id: string;
|
|
7
|
-
arguments: string;
|
|
8
|
-
name: string;
|
|
9
|
-
created_at: number;
|
|
10
|
-
}>;
|
|
11
|
-
function_call_outputs: Array<{
|
|
12
|
-
id: string;
|
|
13
|
-
type: string;
|
|
14
|
-
name: string;
|
|
15
|
-
call_id: string;
|
|
16
|
-
output: string;
|
|
17
|
-
is_error: boolean;
|
|
18
|
-
created_at: number;
|
|
19
|
-
}>;
|
|
20
|
-
created_at: number;
|
|
21
|
-
parseError?: boolean;
|
|
22
|
-
rawData?: any;
|
|
23
|
-
}
|