@cuekit-ai/react 1.4.0 → 1.5.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/index.d.mts CHANGED
@@ -62,47 +62,6 @@ type MicButtonProps = {
62
62
 
63
63
  declare const MicButton: React__default.FC<MicButtonProps>;
64
64
 
65
- interface ChatPopupProps {
66
- isOpen: boolean;
67
- isMinimized: boolean;
68
- onClose: () => void;
69
- onMinimize: () => void;
70
- onRestore: () => void;
71
- onSendText: (text: string) => Promise<any>;
72
- onEndCall?: () => Promise<void>;
73
- messages: Array<{
74
- text: string;
75
- sender: 'user' | 'assistant';
76
- }>;
77
- isConnected: boolean;
78
- micState: string;
79
- participants: string[];
80
- error?: string | null;
81
- currentTheme?: 'light' | 'dark';
82
- onThemeToggle?: (theme: 'light' | 'dark') => void;
83
- status?: string;
84
- anchor?: {
85
- position: 'bottom-right' | 'bottom-left' | 'bottom-center';
86
- bottom: number;
87
- size: number;
88
- };
89
- }
90
- declare const ChatPopup: React__default.FC<ChatPopupProps>;
91
-
92
- interface BorderGlowProps {
93
- isActive: boolean;
94
- }
95
- declare const BorderGlow: ({ isActive }: BorderGlowProps) => React__default.JSX.Element | null;
96
-
97
- interface VoiceIntensityVisualizerProps {
98
- isActive: boolean;
99
- barCount?: number;
100
- minHeight?: number;
101
- className?: string;
102
- buttonSize?: number;
103
- }
104
- declare const VoiceIntensityVisualizer: React__default.FC<VoiceIntensityVisualizerProps>;
105
-
106
65
  interface AuthResponse {
107
66
  session_id: string;
108
67
  api_key: string;
@@ -160,6 +119,10 @@ interface ChatMessage {
160
119
  timestamp: string;
161
120
  }
162
121
  type MicState = 'idle' | 'listening' | 'thinking' | 'replying';
122
+ interface MuteState {
123
+ isMuted: boolean;
124
+ canMute: boolean;
125
+ }
163
126
  declare const useCuekit: (options?: {
164
127
  onNavigationCommand?: (command: NavigationCommand) => void;
165
128
  onConnectionStateChange?: (state: ConnectionState) => void;
@@ -175,6 +138,10 @@ declare const useCuekit: (options?: {
175
138
  setStatus: React.Dispatch<React.SetStateAction<string>>;
176
139
  connect: (identity: string, apiKey?: string, appId?: string) => Promise<void>;
177
140
  disconnect: () => Promise<void>;
141
+ muteState: MuteState;
142
+ toggleMute: () => Promise<void>;
143
+ setMute: (muted: boolean) => Promise<void>;
144
+ sendChatMessage: (message: string) => Promise<void>;
178
145
  isConnected: boolean;
179
146
  isConnecting: boolean;
180
147
  connectionState: ConnectionState | null;
@@ -189,6 +156,49 @@ declare const useCuekit: (options?: {
189
156
  audioContainerRef: React.RefObject<HTMLDivElement>;
190
157
  };
191
158
 
159
+ interface ChatPopupProps {
160
+ isOpen: boolean;
161
+ isMinimized: boolean;
162
+ onClose: () => void;
163
+ onMinimize: () => void;
164
+ onRestore: () => void;
165
+ onSendText: (text: string) => Promise<any>;
166
+ onEndCall?: () => Promise<void>;
167
+ messages: Array<{
168
+ text: string;
169
+ sender: 'user' | 'assistant';
170
+ }>;
171
+ isConnected: boolean;
172
+ micState: string;
173
+ participants: string[];
174
+ error?: string | null;
175
+ currentTheme?: 'light' | 'dark';
176
+ onThemeToggle?: (theme: 'light' | 'dark') => void;
177
+ status?: string;
178
+ anchor?: {
179
+ position: 'bottom-right' | 'bottom-left' | 'bottom-center';
180
+ bottom: number;
181
+ size: number;
182
+ };
183
+ muteState?: MuteState;
184
+ onToggleMute?: () => Promise<void>;
185
+ }
186
+ declare const ChatPopup: React__default.FC<ChatPopupProps>;
187
+
188
+ interface BorderGlowProps {
189
+ isActive: boolean;
190
+ }
191
+ declare const BorderGlow: ({ isActive }: BorderGlowProps) => React__default.JSX.Element | null;
192
+
193
+ interface VoiceIntensityVisualizerProps {
194
+ isActive: boolean;
195
+ barCount?: number;
196
+ minHeight?: number;
197
+ className?: string;
198
+ buttonSize?: number;
199
+ }
200
+ declare const VoiceIntensityVisualizer: React__default.FC<VoiceIntensityVisualizerProps>;
201
+
192
202
  declare const useWebRTC: (options?: {
193
203
  onNavigationCommand?: (command: NavigationCommand) => void;
194
204
  onConnectionStateChange?: (state: ConnectionState) => void;
@@ -297,4 +307,4 @@ declare function getCurrentPathParams(): Record<string, string>;
297
307
  */
298
308
  declare function resolveRoutePath(routePath: string, params: Record<string, string>): string;
299
309
 
300
- export { BorderGlow, ChatPopup, type ChatPopupProps, CuekitProvider, type DOMStructurePayload, type ElementAction, InitCuekit, type InteractiveElement, MicButton, type MicButtonProps, type MicState$1 as MicState, type NavigationCommand, type ServerConfig, type TokenRequest, type TokenResponse, VoiceIntensityVisualizer, type WebRTCServerConfig, captureAllInteractiveElements, clearElementCache, configureWebRTCServer, executeAction, generateDynamicId, getCurrentPathParams, getWebRTCServerConfig, initWebRTC, initWebRTCWithDeployedBackend, resolveRoutePath, useCuekit, useQubeContext, useWebRTC, validateDynamicElements };
310
+ export { BorderGlow, ChatPopup, type ChatPopupProps, CuekitProvider, type DOMStructurePayload, type ElementAction, InitCuekit, type InteractiveElement, MicButton, type MicButtonProps, type MicState$1 as MicState, type MuteState, type NavigationCommand, type ServerConfig, type TokenRequest, type TokenResponse, VoiceIntensityVisualizer, type WebRTCServerConfig, captureAllInteractiveElements, clearElementCache, configureWebRTCServer, executeAction, generateDynamicId, getCurrentPathParams, getWebRTCServerConfig, initWebRTC, initWebRTCWithDeployedBackend, resolveRoutePath, useCuekit, useQubeContext, useWebRTC, validateDynamicElements };
package/dist/index.d.ts CHANGED
@@ -62,47 +62,6 @@ type MicButtonProps = {
62
62
 
63
63
  declare const MicButton: React__default.FC<MicButtonProps>;
64
64
 
65
- interface ChatPopupProps {
66
- isOpen: boolean;
67
- isMinimized: boolean;
68
- onClose: () => void;
69
- onMinimize: () => void;
70
- onRestore: () => void;
71
- onSendText: (text: string) => Promise<any>;
72
- onEndCall?: () => Promise<void>;
73
- messages: Array<{
74
- text: string;
75
- sender: 'user' | 'assistant';
76
- }>;
77
- isConnected: boolean;
78
- micState: string;
79
- participants: string[];
80
- error?: string | null;
81
- currentTheme?: 'light' | 'dark';
82
- onThemeToggle?: (theme: 'light' | 'dark') => void;
83
- status?: string;
84
- anchor?: {
85
- position: 'bottom-right' | 'bottom-left' | 'bottom-center';
86
- bottom: number;
87
- size: number;
88
- };
89
- }
90
- declare const ChatPopup: React__default.FC<ChatPopupProps>;
91
-
92
- interface BorderGlowProps {
93
- isActive: boolean;
94
- }
95
- declare const BorderGlow: ({ isActive }: BorderGlowProps) => React__default.JSX.Element | null;
96
-
97
- interface VoiceIntensityVisualizerProps {
98
- isActive: boolean;
99
- barCount?: number;
100
- minHeight?: number;
101
- className?: string;
102
- buttonSize?: number;
103
- }
104
- declare const VoiceIntensityVisualizer: React__default.FC<VoiceIntensityVisualizerProps>;
105
-
106
65
  interface AuthResponse {
107
66
  session_id: string;
108
67
  api_key: string;
@@ -160,6 +119,10 @@ interface ChatMessage {
160
119
  timestamp: string;
161
120
  }
162
121
  type MicState = 'idle' | 'listening' | 'thinking' | 'replying';
122
+ interface MuteState {
123
+ isMuted: boolean;
124
+ canMute: boolean;
125
+ }
163
126
  declare const useCuekit: (options?: {
164
127
  onNavigationCommand?: (command: NavigationCommand) => void;
165
128
  onConnectionStateChange?: (state: ConnectionState) => void;
@@ -175,6 +138,10 @@ declare const useCuekit: (options?: {
175
138
  setStatus: React.Dispatch<React.SetStateAction<string>>;
176
139
  connect: (identity: string, apiKey?: string, appId?: string) => Promise<void>;
177
140
  disconnect: () => Promise<void>;
141
+ muteState: MuteState;
142
+ toggleMute: () => Promise<void>;
143
+ setMute: (muted: boolean) => Promise<void>;
144
+ sendChatMessage: (message: string) => Promise<void>;
178
145
  isConnected: boolean;
179
146
  isConnecting: boolean;
180
147
  connectionState: ConnectionState | null;
@@ -189,6 +156,49 @@ declare const useCuekit: (options?: {
189
156
  audioContainerRef: React.RefObject<HTMLDivElement>;
190
157
  };
191
158
 
159
+ interface ChatPopupProps {
160
+ isOpen: boolean;
161
+ isMinimized: boolean;
162
+ onClose: () => void;
163
+ onMinimize: () => void;
164
+ onRestore: () => void;
165
+ onSendText: (text: string) => Promise<any>;
166
+ onEndCall?: () => Promise<void>;
167
+ messages: Array<{
168
+ text: string;
169
+ sender: 'user' | 'assistant';
170
+ }>;
171
+ isConnected: boolean;
172
+ micState: string;
173
+ participants: string[];
174
+ error?: string | null;
175
+ currentTheme?: 'light' | 'dark';
176
+ onThemeToggle?: (theme: 'light' | 'dark') => void;
177
+ status?: string;
178
+ anchor?: {
179
+ position: 'bottom-right' | 'bottom-left' | 'bottom-center';
180
+ bottom: number;
181
+ size: number;
182
+ };
183
+ muteState?: MuteState;
184
+ onToggleMute?: () => Promise<void>;
185
+ }
186
+ declare const ChatPopup: React__default.FC<ChatPopupProps>;
187
+
188
+ interface BorderGlowProps {
189
+ isActive: boolean;
190
+ }
191
+ declare const BorderGlow: ({ isActive }: BorderGlowProps) => React__default.JSX.Element | null;
192
+
193
+ interface VoiceIntensityVisualizerProps {
194
+ isActive: boolean;
195
+ barCount?: number;
196
+ minHeight?: number;
197
+ className?: string;
198
+ buttonSize?: number;
199
+ }
200
+ declare const VoiceIntensityVisualizer: React__default.FC<VoiceIntensityVisualizerProps>;
201
+
192
202
  declare const useWebRTC: (options?: {
193
203
  onNavigationCommand?: (command: NavigationCommand) => void;
194
204
  onConnectionStateChange?: (state: ConnectionState) => void;
@@ -297,4 +307,4 @@ declare function getCurrentPathParams(): Record<string, string>;
297
307
  */
298
308
  declare function resolveRoutePath(routePath: string, params: Record<string, string>): string;
299
309
 
300
- export { BorderGlow, ChatPopup, type ChatPopupProps, CuekitProvider, type DOMStructurePayload, type ElementAction, InitCuekit, type InteractiveElement, MicButton, type MicButtonProps, type MicState$1 as MicState, type NavigationCommand, type ServerConfig, type TokenRequest, type TokenResponse, VoiceIntensityVisualizer, type WebRTCServerConfig, captureAllInteractiveElements, clearElementCache, configureWebRTCServer, executeAction, generateDynamicId, getCurrentPathParams, getWebRTCServerConfig, initWebRTC, initWebRTCWithDeployedBackend, resolveRoutePath, useCuekit, useQubeContext, useWebRTC, validateDynamicElements };
310
+ export { BorderGlow, ChatPopup, type ChatPopupProps, CuekitProvider, type DOMStructurePayload, type ElementAction, InitCuekit, type InteractiveElement, MicButton, type MicButtonProps, type MicState$1 as MicState, type MuteState, type NavigationCommand, type ServerConfig, type TokenRequest, type TokenResponse, VoiceIntensityVisualizer, type WebRTCServerConfig, captureAllInteractiveElements, clearElementCache, configureWebRTCServer, executeAction, generateDynamicId, getCurrentPathParams, getWebRTCServerConfig, initWebRTC, initWebRTCWithDeployedBackend, resolveRoutePath, useCuekit, useQubeContext, useWebRTC, validateDynamicElements };