@convai/web-sdk 1.8.0-beta.3 → 1.8.0-beta.4
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 +12 -1
- package/dist/core/AudioManager.d.ts +3 -3
- package/dist/core/AudioManager.js +1 -1
- package/dist/core/ConnectionStateHandler.d.ts +1 -1
- package/dist/core/ConvaiClient.d.ts +4 -4
- package/dist/core/ConvaiClient.js +14 -14
- package/dist/core/MemoryManager.d.ts +1 -1
- package/dist/core/MessageHandler.d.ts +3 -3
- package/dist/core/MessageHandler.js +2 -2
- package/dist/core/SSESession.d.ts +1 -1
- package/dist/core/SSESession.js +1 -1
- package/dist/core/ScreenShareManager.d.ts +2 -2
- package/dist/core/ScreenShareManager.js +2 -2
- package/dist/core/VideoManager.d.ts +2 -2
- package/dist/core/VideoManager.js +3 -3
- package/dist/core/connectRequest.d.ts +1 -1
- package/dist/core/contextUpdateRequest.d.ts +1 -1
- package/dist/core/index.d.ts +12 -12
- package/dist/core/index.js +10 -10
- package/dist/core/types.d.ts +2 -2
- package/dist/core/videoSourceState.d.ts +1 -1
- package/dist/core/visionRequest.d.ts +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/dist/lipsync-helpers/createBlendshapeQueue.d.ts +2 -2
- package/dist/lipsync-helpers/createBlendshapeQueue.js +2 -2
- package/dist/lipsync-helpers/declarativeMapping.d.ts +1 -1
- package/dist/lipsync-helpers/declarativeMapping.js +2 -2
- package/dist/lipsync-helpers/index.d.ts +12 -12
- package/dist/lipsync-helpers/index.js +9 -9
- package/dist/lipsync-helpers/mhaLimitDrivers.js +2 -2
- package/dist/lipsync-helpers/naturalness/processor.d.ts +1 -1
- package/dist/lipsync-helpers/naturalness/processor.js +1 -1
- package/dist/lipsync-helpers/naturalness/profiles/mha.d.ts +1 -1
- package/dist/lipsync-helpers/naturalness/profiles/mha.js +1 -1
- package/dist/lipsync-helpers/presetMappers.d.ts +1 -1
- package/dist/react/components/ConvaiWidget.d.ts +1 -1
- package/dist/react/components/ConvaiWidget.js +4 -4
- package/dist/react/components/index.d.ts +1 -1
- package/dist/react/components/index.js +1 -1
- package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts +1 -1
- package/dist/react/components/rtc-widget/components/ConviMessage.js +3 -3
- package/dist/react/components/rtc-widget/components/FloatingVideo.js +3 -3
- package/dist/react/components/rtc-widget/components/MessageBubble.js +1 -1
- package/dist/react/components/rtc-widget/components/MessageList.d.ts +1 -1
- package/dist/react/components/rtc-widget/components/MessageList.js +4 -4
- package/dist/react/components/rtc-widget/components/UserMessage.js +3 -3
- package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js +4 -4
- package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js +3 -3
- package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +4 -4
- package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +3 -3
- package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +3 -3
- package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts +5 -5
- package/dist/react/components/rtc-widget/components/conviComponents/index.js +5 -5
- package/dist/react/components/rtc-widget/components/index.d.ts +8 -8
- package/dist/react/components/rtc-widget/components/index.js +9 -9
- package/dist/react/components/rtc-widget/index.d.ts +5 -5
- package/dist/react/components/rtc-widget/index.js +3 -3
- package/dist/react/components/rtc-widget/styles/icons.d.ts +1 -1
- package/dist/react/components/rtc-widget/styles/icons.js +1 -1
- package/dist/react/components/rtc-widget/styles/index.d.ts +5 -5
- package/dist/react/components/rtc-widget/styles/index.js +4 -4
- package/dist/react/components/rtc-widget/styles/styledComponents.js +1 -1
- package/dist/react/hooks/index.d.ts +3 -3
- package/dist/react/hooks/index.js +3 -3
- package/dist/react/hooks/useCharacterInfo.js +1 -1
- package/dist/react/hooks/useConvaiClient.d.ts +1 -1
- package/dist/react/hooks/useConvaiClient.js +1 -1
- package/dist/react/index.d.ts +6 -6
- package/dist/react/index.js +6 -6
- package/dist/vanilla/AudioRenderer.js +1 -1
- package/dist/vanilla/ConvaiWidget.d.ts +1 -1
- package/dist/vanilla/ConvaiWidget.js +4 -4
- package/dist/vanilla/WebSocketSession.d.ts +1 -1
- package/dist/vanilla/WebSocketSession.js +1 -1
- package/dist/vanilla/index.d.ts +5 -5
- package/dist/vanilla/index.js +4 -4
- package/dist/vanilla/types.d.ts +1 -1
- package/dist/vanilla/websocket.d.ts +1 -1
- package/dist/vanilla/websocket.js +2 -2
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/dist/version.js.map +1 -1
- package/package.json +5 -4
package/README.md
CHANGED
|
@@ -113,6 +113,7 @@ Full documentation is at **<a href="https://docs.convai.com/api-docs/plugins-and
|
|
|
113
113
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/error-handling" target="_blank" rel="noopener noreferrer">Error Handling</a> | `error`, `disconnect`, `serverResponse`, retry patterns |
|
|
114
114
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/auth-tokens" target="_blank" rel="noopener noreferrer">Auth Tokens</a> | Server-side token exchange for production |
|
|
115
115
|
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk/websocket-transport-layer" target="_blank" rel="noopener noreferrer">WebSocket Transport</a> | Alternative transport for WebRTC-constrained environments |
|
|
116
|
+
| <a href="https://docs.convai.com/api-docs/plugins-and-integrations/web-plugins/convai-web-sdk" target="_blank" rel="noopener noreferrer">SSE Transport</a> | Text-only interaction transport; the one that runs under Node |
|
|
116
117
|
|
|
117
118
|
---
|
|
118
119
|
|
|
@@ -166,7 +167,17 @@ await client.connect();
|
|
|
166
167
|
client.sendUserTextMessage("Hello!");
|
|
167
168
|
```
|
|
168
169
|
|
|
169
|
-
This sends each message as an SSE `POST` with `Authorization: Bearer ...`. Set `transport: "sse"`
|
|
170
|
+
This sends each message as an SSE `POST` with `Authorization: Bearer ...`. Set `transport: "sse"`
|
|
171
|
+
explicitly if preferred. SSE carries text only — no voice, video, or lipsync — and it never calls
|
|
172
|
+
`/connect`, so `connect()` makes no network request and the session id arrives on the first
|
|
173
|
+
interaction via the `characterSessionId` event.
|
|
174
|
+
|
|
175
|
+
Because it needs neither WebRTC nor a DOM, this is the only transport that runs outside a browser.
|
|
176
|
+
Import `@convai/web-sdk/core` from Node, SSR, or a serverless function — not the root or `/react`
|
|
177
|
+
entry points, which pull in browser-only dependencies.
|
|
178
|
+
|
|
179
|
+
The interaction API is currently reachable at staging only; a production host is planned.
|
|
180
|
+
Full guide: [SSE Interaction Transport](docs/convai_sse_transport.md).
|
|
170
181
|
|
|
171
182
|
---
|
|
172
183
|
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Room } from "livekit-client";
|
|
2
|
-
import { AudioControls } from "./types";
|
|
3
|
-
import { EventEmitter } from "./EventEmitter";
|
|
4
|
-
import type { IWebSocketSession } from "./types";
|
|
2
|
+
import { AudioControls } from "./types.js";
|
|
3
|
+
import { EventEmitter } from "./EventEmitter.js";
|
|
4
|
+
import type { IWebSocketSession } from "./types.js";
|
|
5
5
|
/**
|
|
6
6
|
* Manages audio controls for LiveKit room
|
|
7
7
|
* Provides methods to enable/disable microphone, manage audio devices,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { ConnectionState, DisconnectReason } from "livekit-client";
|
|
2
|
-
import { ConvaiClientState } from "./types";
|
|
2
|
+
import { ConvaiClientState } from "./types.js";
|
|
3
3
|
/**
|
|
4
4
|
* Handles connection state changes and disconnection logic for ConvaiClient.
|
|
5
5
|
* Centralizes error handling and state management for better maintainability.
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Room } from "livekit-client";
|
|
2
|
-
import { ConvaiConfig, ConvaiClientState, ChatMessage, IConvaiClient, AudioControls, VideoControls, ScreenShareControls, DynamicInfo, ContextUpdateOptions, UploadFileOptions, WebSocketSessionFactory, RespondModeUpdateOptions, UpdateSceneMetadataOptions, VisionStatusOptions, VisionTriggerOptions, ConnectionData, SendUserTextMessageOptions } from "./types";
|
|
3
|
-
import { EventEmitter } from "./EventEmitter";
|
|
4
|
-
import { BlendshapeQueue } from "./BlendshapeQueue";
|
|
5
|
-
import { MemoryManager } from "./MemoryManager";
|
|
2
|
+
import { ConvaiConfig, ConvaiClientState, ChatMessage, IConvaiClient, AudioControls, VideoControls, ScreenShareControls, DynamicInfo, ContextUpdateOptions, UploadFileOptions, WebSocketSessionFactory, RespondModeUpdateOptions, UpdateSceneMetadataOptions, VisionStatusOptions, VisionTriggerOptions, ConnectionData, SendUserTextMessageOptions } from "./types.js";
|
|
3
|
+
import { EventEmitter } from "./EventEmitter.js";
|
|
4
|
+
import { BlendshapeQueue } from "./BlendshapeQueue.js";
|
|
5
|
+
import { MemoryManager } from "./MemoryManager.js";
|
|
6
6
|
/**
|
|
7
7
|
* Main Convai client class for managing AI voice assistant connections
|
|
8
8
|
* Provides complete interface for connecting to Convai's voice assistants,
|
|
@@ -1,19 +1,19 @@
|
|
|
1
1
|
import { Room, RoomEvent, DefaultReconnectPolicy, setLogLevel, } from "livekit-client";
|
|
2
2
|
setLogLevel("warn");
|
|
3
|
-
import { DisconnectReasonEnum, } from "./types";
|
|
4
|
-
import { AudioManager } from "./AudioManager";
|
|
5
|
-
import { VideoManager } from "./VideoManager";
|
|
6
|
-
import { ScreenShareManager } from "./ScreenShareManager";
|
|
7
|
-
import { MessageHandler } from "./MessageHandler";
|
|
8
|
-
import { SDK_VERSION } from "../version";
|
|
9
|
-
import { EventEmitter } from "./EventEmitter";
|
|
10
|
-
import { MemoryManager } from "./MemoryManager";
|
|
11
|
-
import { ConnectionStateHandler } from "./ConnectionStateHandler";
|
|
12
|
-
import { buildActionConnectConfig, buildBlendshapeConnectConfig, buildEmotionConnectConfig, } from "./connectRequest";
|
|
13
|
-
import { shouldPreemptForContextUpdateResponse, shouldPreemptForExplicitRespondMode, } from "./contextUpdateRequest";
|
|
14
|
-
import { resolveVisionInputConfig, serializeVisionInputConfig, } from "./visionRequest";
|
|
15
|
-
import { SSESession } from "./SSESession";
|
|
16
|
-
import { isValidLogicalTurnId } from "./logicalTurn";
|
|
3
|
+
import { DisconnectReasonEnum, } from "./types.js";
|
|
4
|
+
import { AudioManager } from "./AudioManager.js";
|
|
5
|
+
import { VideoManager } from "./VideoManager.js";
|
|
6
|
+
import { ScreenShareManager } from "./ScreenShareManager.js";
|
|
7
|
+
import { MessageHandler } from "./MessageHandler.js";
|
|
8
|
+
import { SDK_VERSION } from "../version.js";
|
|
9
|
+
import { EventEmitter } from "./EventEmitter.js";
|
|
10
|
+
import { MemoryManager } from "./MemoryManager.js";
|
|
11
|
+
import { ConnectionStateHandler } from "./ConnectionStateHandler.js";
|
|
12
|
+
import { buildActionConnectConfig, buildBlendshapeConnectConfig, buildEmotionConnectConfig, } from "./connectRequest.js";
|
|
13
|
+
import { shouldPreemptForContextUpdateResponse, shouldPreemptForExplicitRespondMode, } from "./contextUpdateRequest.js";
|
|
14
|
+
import { resolveVisionInputConfig, serializeVisionInputConfig, } from "./visionRequest.js";
|
|
15
|
+
import { SSESession } from "./SSESession.js";
|
|
16
|
+
import { isValidLogicalTurnId } from "./logicalTurn.js";
|
|
17
17
|
// Module-level registry — populated by importing @convai/web-sdk/vanilla/websocket
|
|
18
18
|
let _wsFactory = null;
|
|
19
19
|
function normalizeStateOfMind(value) {
|
|
@@ -27,7 +27,7 @@
|
|
|
27
27
|
* await memoryManager.deleteAllMemories();
|
|
28
28
|
* ```
|
|
29
29
|
*/
|
|
30
|
-
import { MemoryAddResponse, MemoryListResponse, MemoryGetResponse, MemoryDeleteResponse, MemoryDeleteAllResponse } from './types';
|
|
30
|
+
import { MemoryAddResponse, MemoryListResponse, MemoryGetResponse, MemoryDeleteResponse, MemoryDeleteAllResponse } from './types.js';
|
|
31
31
|
/**
|
|
32
32
|
* MemoryManager class for handling Convai Memory API operations.
|
|
33
33
|
* Provides methods to add, list, get, and delete memories for a character.
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Room } from "livekit-client";
|
|
2
|
-
import { ChatMessage } from "./types";
|
|
3
|
-
import { EventEmitter } from "./EventEmitter";
|
|
4
|
-
import { BlendshapeQueue } from "./BlendshapeQueue";
|
|
2
|
+
import { ChatMessage } from "./types.js";
|
|
3
|
+
import { EventEmitter } from "./EventEmitter.js";
|
|
4
|
+
import { BlendshapeQueue } from "./BlendshapeQueue.js";
|
|
5
5
|
/**
|
|
6
6
|
* Handles incoming messages from Convai
|
|
7
7
|
* Processes various message types from the AI assistant and updates chat history
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { RoomEvent } from "livekit-client";
|
|
2
|
-
import { EventEmitter } from "./EventEmitter";
|
|
3
|
-
import { BlendshapeQueue, } from "./BlendshapeQueue";
|
|
2
|
+
import { EventEmitter } from "./EventEmitter.js";
|
|
3
|
+
import { BlendshapeQueue, } from "./BlendshapeQueue.js";
|
|
4
4
|
/**
|
|
5
5
|
* Handles incoming messages from Convai
|
|
6
6
|
* Processes various message types from the AI assistant and updates chat history
|
package/dist/core/SSESession.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { buildActionConnectConfig, buildEmotionConnectConfig, } from "./connectRequest";
|
|
1
|
+
import { buildActionConnectConfig, buildEmotionConnectConfig, } from "./connectRequest.js";
|
|
2
2
|
/** Text-only interaction transport. One POST/SSE stream is used per message. */
|
|
3
3
|
export class SSESession {
|
|
4
4
|
constructor(options) {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Room } from "livekit-client";
|
|
2
|
-
import { ScreenShareControls } from "./types";
|
|
3
|
-
import { EventEmitter } from "./EventEmitter";
|
|
2
|
+
import { ScreenShareControls } from "./types.js";
|
|
3
|
+
import { EventEmitter } from "./EventEmitter.js";
|
|
4
4
|
/**
|
|
5
5
|
* Manages screen sharing controls for LiveKit room
|
|
6
6
|
* Provides methods to enable/disable screen sharing, manage screen share state,
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { logger } from "../utils/logger";
|
|
2
|
-
import { EventEmitter } from "./EventEmitter";
|
|
1
|
+
import { logger } from "../utils/logger.js";
|
|
2
|
+
import { EventEmitter } from "./EventEmitter.js";
|
|
3
3
|
/**
|
|
4
4
|
* Manages screen sharing controls for LiveKit room
|
|
5
5
|
* Provides methods to enable/disable screen sharing, manage screen share state,
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { Room } from "livekit-client";
|
|
2
|
-
import { PublishCanvasOptions, PublishVideoTrackOptions, VideoControls, VisionSourceHandle, VisionSourceState } from "./types";
|
|
3
|
-
import { EventEmitter } from "./EventEmitter";
|
|
2
|
+
import { PublishCanvasOptions, PublishVideoTrackOptions, VideoControls, VisionSourceHandle, VisionSourceState } from "./types.js";
|
|
3
|
+
import { EventEmitter } from "./EventEmitter.js";
|
|
4
4
|
type WebSocketVisionMessageType = "vision-frame" | "vision-source-state";
|
|
5
5
|
type WebSocketVisionMessageSender = (type: WebSocketVisionMessageType, data: Record<string, unknown>) => void;
|
|
6
6
|
/**
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Track } from "livekit-client";
|
|
2
|
-
import { logger } from "../utils/logger";
|
|
3
|
-
import { EventEmitter } from "./EventEmitter";
|
|
4
|
-
import { isWebcamVisionSource, shouldKeepExistingVisionSource, } from "./videoSourceState";
|
|
2
|
+
import { logger } from "../utils/logger.js";
|
|
3
|
+
import { EventEmitter } from "./EventEmitter.js";
|
|
4
|
+
import { isWebcamVisionSource, shouldKeepExistingVisionSource, } from "./videoSourceState.js";
|
|
5
5
|
/**
|
|
6
6
|
* Manages visual source controls. LiveKit publishes real video tracks;
|
|
7
7
|
* WebSocket samples active sources into vision-frame messages.
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ContextUpdateOptions, RespondMode } from "./types";
|
|
1
|
+
import type { ContextUpdateOptions, RespondMode } from "./types.js";
|
|
2
2
|
export declare function shouldPreemptForContextUpdateResponse(options: Pick<ContextUpdateOptions, "run_llm" | "respond_mode">): boolean;
|
|
3
3
|
export declare function shouldPreemptForExplicitRespondMode(respondMode: RespondMode | undefined): boolean;
|
|
4
4
|
//# sourceMappingURL=contextUpdateRequest.d.ts.map
|
package/dist/core/index.d.ts
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
|
-
export { ConvaiClient } from './ConvaiClient';
|
|
2
|
-
export * from './types';
|
|
3
|
-
export { getDisconnectReasonMessage } from './types';
|
|
4
|
-
export type { ConvaiClient as ConvaiClientType } from './ConvaiClient';
|
|
5
|
-
export { AudioManager } from './AudioManager';
|
|
6
|
-
export { VideoManager } from './VideoManager';
|
|
7
|
-
export { ScreenShareManager } from './ScreenShareManager';
|
|
8
|
-
export { MessageHandler } from './MessageHandler';
|
|
9
|
-
export { MemoryManager } from './MemoryManager';
|
|
10
|
-
export { BlendshapeQueue } from './BlendshapeQueue';
|
|
11
|
-
export type { TurnStats, BlendshapeChunkMetadata } from './BlendshapeQueue';
|
|
12
|
-
export { EventEmitter } from './EventEmitter';
|
|
1
|
+
export { ConvaiClient } from './ConvaiClient.js';
|
|
2
|
+
export * from './types.js';
|
|
3
|
+
export { getDisconnectReasonMessage } from './types.js';
|
|
4
|
+
export type { ConvaiClient as ConvaiClientType } from './ConvaiClient.js';
|
|
5
|
+
export { AudioManager } from './AudioManager.js';
|
|
6
|
+
export { VideoManager } from './VideoManager.js';
|
|
7
|
+
export { ScreenShareManager } from './ScreenShareManager.js';
|
|
8
|
+
export { MessageHandler } from './MessageHandler.js';
|
|
9
|
+
export { MemoryManager } from './MemoryManager.js';
|
|
10
|
+
export { BlendshapeQueue } from './BlendshapeQueue.js';
|
|
11
|
+
export type { TurnStats, BlendshapeChunkMetadata } from './BlendshapeQueue.js';
|
|
12
|
+
export { EventEmitter } from './EventEmitter.js';
|
|
13
13
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/core/index.js
CHANGED
|
@@ -1,17 +1,17 @@
|
|
|
1
1
|
// Main client
|
|
2
|
-
export { ConvaiClient } from './ConvaiClient';
|
|
2
|
+
export { ConvaiClient } from './ConvaiClient.js';
|
|
3
3
|
// Types (including IConvaiClient interface)
|
|
4
|
-
export * from './types';
|
|
4
|
+
export * from './types.js';
|
|
5
5
|
// Helper functions
|
|
6
|
-
export { getDisconnectReasonMessage } from './types';
|
|
6
|
+
export { getDisconnectReasonMessage } from './types.js';
|
|
7
7
|
// Managers (for advanced usage)
|
|
8
|
-
export { AudioManager } from './AudioManager';
|
|
9
|
-
export { VideoManager } from './VideoManager';
|
|
10
|
-
export { ScreenShareManager } from './ScreenShareManager';
|
|
11
|
-
export { MessageHandler } from './MessageHandler';
|
|
12
|
-
export { MemoryManager } from './MemoryManager';
|
|
8
|
+
export { AudioManager } from './AudioManager.js';
|
|
9
|
+
export { VideoManager } from './VideoManager.js';
|
|
10
|
+
export { ScreenShareManager } from './ScreenShareManager.js';
|
|
11
|
+
export { MessageHandler } from './MessageHandler.js';
|
|
12
|
+
export { MemoryManager } from './MemoryManager.js';
|
|
13
13
|
// Blendshape queue for lipsync
|
|
14
|
-
export { BlendshapeQueue } from './BlendshapeQueue';
|
|
14
|
+
export { BlendshapeQueue } from './BlendshapeQueue.js';
|
|
15
15
|
// Event Emitter (for advanced usage)
|
|
16
|
-
export { EventEmitter } from './EventEmitter';
|
|
16
|
+
export { EventEmitter } from './EventEmitter.js';
|
|
17
17
|
//# sourceMappingURL=index.js.map
|
package/dist/core/types.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { Room, DisconnectReason as LiveKitDisconnectReason } from 'livekit-client';
|
|
2
|
-
import { BlendshapeQueue } from './BlendshapeQueue';
|
|
2
|
+
import { BlendshapeQueue } from './BlendshapeQueue.js';
|
|
3
3
|
/**
|
|
4
4
|
* LiveKit disconnect reasons.
|
|
5
5
|
* Helps determine why a participant was disconnected from the room.
|
|
@@ -1058,7 +1058,7 @@ export interface IConvaiClient {
|
|
|
1058
1058
|
* }
|
|
1059
1059
|
* ```
|
|
1060
1060
|
*/
|
|
1061
|
-
readonly memoryManager: import('./MemoryManager').MemoryManager | null;
|
|
1061
|
+
readonly memoryManager: import('./MemoryManager.js').MemoryManager | null;
|
|
1062
1062
|
/**
|
|
1063
1063
|
* Connect to a Convai character.
|
|
1064
1064
|
*/
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { VisionSourceKind } from "./types";
|
|
1
|
+
import type { VisionSourceKind } from "./types.js";
|
|
2
2
|
export declare function isWebcamVisionSource(source?: VisionSourceKind | null): boolean;
|
|
3
3
|
export declare function shouldKeepExistingVisionSource(currentSource: VisionSourceKind, nextSource: VisionSourceKind, hasReplacementTrack: boolean): boolean;
|
|
4
4
|
//# sourceMappingURL=videoSourceState.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConvaiConfig, VisionInputConfig } from "./types";
|
|
1
|
+
import type { ConvaiConfig, VisionInputConfig } from "./types.js";
|
|
2
2
|
export declare function resolveVisionInputConfig(config: Pick<ConvaiConfig, "enableVideo" | "visionInputConfig">): VisionInputConfig | undefined;
|
|
3
3
|
export declare function serializeVisionInputConfig(config: VisionInputConfig): Record<string, unknown>;
|
|
4
4
|
//# sourceMappingURL=visionRequest.d.ts.map
|
package/dist/index.d.ts
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
export * from './react';
|
|
2
|
-
export * from './lipsync-helpers';
|
|
1
|
+
export * from './react/index.js';
|
|
2
|
+
export * from './lipsync-helpers/index.js';
|
|
3
3
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Default export: React version for backward compatibility
|
|
2
2
|
// Existing users can continue using: import { useConvaiClient } from '@convai/web-sdk';
|
|
3
|
-
export * from './react';
|
|
3
|
+
export * from './react/index.js';
|
|
4
4
|
// Export lipsync helpers
|
|
5
|
-
export * from './lipsync-helpers';
|
|
5
|
+
export * from './lipsync-helpers/index.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* - MetaHuman passthrough
|
|
7
7
|
* - Custom mapper
|
|
8
8
|
*/
|
|
9
|
-
import { BlendshapeQueue } from '../core/BlendshapeQueue';
|
|
10
|
-
import { BlendshapeMappingConfig, BlendshapeMapper } from './mappingTypes';
|
|
9
|
+
import { BlendshapeQueue } from '../core/BlendshapeQueue.js';
|
|
10
|
+
import { BlendshapeMappingConfig, BlendshapeMapper } from './mappingTypes.js';
|
|
11
11
|
/**
|
|
12
12
|
* Create a BlendshapeQueue with the specified mapping configuration
|
|
13
13
|
*
|
|
@@ -6,8 +6,8 @@
|
|
|
6
6
|
* - MetaHuman passthrough
|
|
7
7
|
* - Custom mapper
|
|
8
8
|
*/
|
|
9
|
-
import { BlendshapeQueue } from '../core/BlendshapeQueue';
|
|
10
|
-
import { arkitPassthroughMapper, metahumanPassthroughMapper, identityMapper } from './presetMappers';
|
|
9
|
+
import { BlendshapeQueue } from '../core/BlendshapeQueue.js';
|
|
10
|
+
import { arkitPassthroughMapper, metahumanPassthroughMapper, identityMapper } from './presetMappers.js';
|
|
11
11
|
/**
|
|
12
12
|
* Create a BlendshapeQueue with the specified mapping configuration
|
|
13
13
|
*
|
|
@@ -15,8 +15,8 @@
|
|
|
15
15
|
* };
|
|
16
16
|
* ```
|
|
17
17
|
*/
|
|
18
|
-
import { ARKIT_ORDER_61 } from './arkitOrder61';
|
|
19
|
-
import { METAHUMAN_ORDER_251 } from './metahumanOrder251';
|
|
18
|
+
import { ARKIT_ORDER_61 } from './arkitOrder61.js';
|
|
19
|
+
import { METAHUMAN_ORDER_251 } from './metahumanOrder251.js';
|
|
20
20
|
/**
|
|
21
21
|
* Create a mapper from ARKit format using declarative name mapping
|
|
22
22
|
*
|
|
@@ -4,16 +4,16 @@
|
|
|
4
4
|
* Essential blendshape order arrays for ARKit and MetaHuman formats.
|
|
5
5
|
* These define the order in which blendshape values are received from Convai's server.
|
|
6
6
|
*/
|
|
7
|
-
export { ARKIT_ORDER_61, STANDARD_ARKIT_ORDER, convertOrder61ToStandard, mapOrder61ToNames, getBlendshapeValueFromOrder61, getHeadRotation, getEyeRotations, getLipSyncValuesFromOrder61, getActiveBlendshapesFromOrder61, formatOrder61ForLogging, } from "./arkitOrder61";
|
|
8
|
-
export { METAHUMAN_ORDER_251, METAHUMAN_CATEGORIES, KEY_METAHUMAN_LIPSYNC, getMetaHumanBlendshapeName, getMetaHumanBlendshapeIndex, getMetaHumanBlendshapesByCategory, formatMetaHumanBlendshapesForLogging, } from "./metahumanOrder251";
|
|
9
|
-
export type { BlendshapeMapper, BlendshapeFormat, BlendshapeMappingConfig, } from "./mappingTypes";
|
|
10
|
-
export { PRESET_MAPPINGS, } from "./mappingTypes";
|
|
11
|
-
export { arkitPassthroughMapper, metahumanPassthroughMapper, identityMapper, } from "./presetMappers";
|
|
12
|
-
export { createBlendshapeQueue, createARKitBlendshapeQueue, createMetaHumanBlendshapeQueue, createCustomBlendshapeQueue, createPassthroughBlendshapeQueue, inferMappingFromConfig, } from "./createBlendshapeQueue";
|
|
13
|
-
export type { BlendshapeNameMapping, OptimizedBlendshapeOutput, } from "./declarativeMapping";
|
|
14
|
-
export { createARKitNameMapper, createMetaHumanNameMapper, getBlendshapeObject, } from "./declarativeMapping";
|
|
15
|
-
export { createLipsyncProcessor, getLipsyncProfile, } from "./naturalness/processor";
|
|
16
|
-
export type { LipsyncFormat, LipsyncFormatProfile, LipsyncProcessorOptions, LipsyncEnvelopeOptions, LipsyncMeshBinding, } from "./naturalness/types";
|
|
17
|
-
export { MHA_PROFILE, mhaChannelIndex } from "./naturalness/profiles/mha";
|
|
18
|
-
export { MHA_LIMIT_DRIVERS, applyMhaLimits, MHA_RECOMMENDED_GAINS, createMhaGainMask, MHA_EYE_CHANNEL_INDICES, symmetrizeMhaMouth, } from "./mhaLimitDrivers";
|
|
7
|
+
export { ARKIT_ORDER_61, STANDARD_ARKIT_ORDER, convertOrder61ToStandard, mapOrder61ToNames, getBlendshapeValueFromOrder61, getHeadRotation, getEyeRotations, getLipSyncValuesFromOrder61, getActiveBlendshapesFromOrder61, formatOrder61ForLogging, } from "./arkitOrder61.js";
|
|
8
|
+
export { METAHUMAN_ORDER_251, METAHUMAN_CATEGORIES, KEY_METAHUMAN_LIPSYNC, getMetaHumanBlendshapeName, getMetaHumanBlendshapeIndex, getMetaHumanBlendshapesByCategory, formatMetaHumanBlendshapesForLogging, } from "./metahumanOrder251.js";
|
|
9
|
+
export type { BlendshapeMapper, BlendshapeFormat, BlendshapeMappingConfig, } from "./mappingTypes.js";
|
|
10
|
+
export { PRESET_MAPPINGS, } from "./mappingTypes.js";
|
|
11
|
+
export { arkitPassthroughMapper, metahumanPassthroughMapper, identityMapper, } from "./presetMappers.js";
|
|
12
|
+
export { createBlendshapeQueue, createARKitBlendshapeQueue, createMetaHumanBlendshapeQueue, createCustomBlendshapeQueue, createPassthroughBlendshapeQueue, inferMappingFromConfig, } from "./createBlendshapeQueue.js";
|
|
13
|
+
export type { BlendshapeNameMapping, OptimizedBlendshapeOutput, } from "./declarativeMapping.js";
|
|
14
|
+
export { createARKitNameMapper, createMetaHumanNameMapper, getBlendshapeObject, } from "./declarativeMapping.js";
|
|
15
|
+
export { createLipsyncProcessor, getLipsyncProfile, } from "./naturalness/processor.js";
|
|
16
|
+
export type { LipsyncFormat, LipsyncFormatProfile, LipsyncProcessorOptions, LipsyncEnvelopeOptions, LipsyncMeshBinding, } from "./naturalness/types.js";
|
|
17
|
+
export { MHA_PROFILE, mhaChannelIndex } from "./naturalness/profiles/mha.js";
|
|
18
|
+
export { MHA_LIMIT_DRIVERS, applyMhaLimits, MHA_RECOMMENDED_GAINS, createMhaGainMask, MHA_EYE_CHANNEL_INDICES, symmetrizeMhaMouth, } from "./mhaLimitDrivers.js";
|
|
19
19
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -13,7 +13,7 @@ ARKIT_ORDER_61,
|
|
|
13
13
|
// Standard ARKit 52-element order
|
|
14
14
|
STANDARD_ARKIT_ORDER,
|
|
15
15
|
// Helper functions
|
|
16
|
-
convertOrder61ToStandard, mapOrder61ToNames, getBlendshapeValueFromOrder61, getHeadRotation, getEyeRotations, getLipSyncValuesFromOrder61, getActiveBlendshapesFromOrder61, formatOrder61ForLogging, } from "./arkitOrder61";
|
|
16
|
+
convertOrder61ToStandard, mapOrder61ToNames, getBlendshapeValueFromOrder61, getHeadRotation, getEyeRotations, getLipSyncValuesFromOrder61, getActiveBlendshapesFromOrder61, formatOrder61ForLogging, } from "./arkitOrder61.js";
|
|
17
17
|
// ============================================================================
|
|
18
18
|
// METAHUMAN FORMAT (251 CTRL_expressions_* blendshapes)
|
|
19
19
|
// ============================================================================
|
|
@@ -25,16 +25,16 @@ METAHUMAN_CATEGORIES,
|
|
|
25
25
|
// Key lipsync blendshapes
|
|
26
26
|
KEY_METAHUMAN_LIPSYNC,
|
|
27
27
|
// Helper functions
|
|
28
|
-
getMetaHumanBlendshapeName, getMetaHumanBlendshapeIndex, getMetaHumanBlendshapesByCategory, formatMetaHumanBlendshapesForLogging, } from "./metahumanOrder251";
|
|
29
|
-
export { PRESET_MAPPINGS, } from "./mappingTypes";
|
|
30
|
-
export { arkitPassthroughMapper, metahumanPassthroughMapper, identityMapper, } from "./presetMappers";
|
|
31
|
-
export { createBlendshapeQueue, createARKitBlendshapeQueue, createMetaHumanBlendshapeQueue, createCustomBlendshapeQueue, createPassthroughBlendshapeQueue, inferMappingFromConfig, } from "./createBlendshapeQueue";
|
|
32
|
-
export { createARKitNameMapper, createMetaHumanNameMapper, getBlendshapeObject, } from "./declarativeMapping";
|
|
28
|
+
getMetaHumanBlendshapeName, getMetaHumanBlendshapeIndex, getMetaHumanBlendshapesByCategory, formatMetaHumanBlendshapesForLogging, } from "./metahumanOrder251.js";
|
|
29
|
+
export { PRESET_MAPPINGS, } from "./mappingTypes.js";
|
|
30
|
+
export { arkitPassthroughMapper, metahumanPassthroughMapper, identityMapper, } from "./presetMappers.js";
|
|
31
|
+
export { createBlendshapeQueue, createARKitBlendshapeQueue, createMetaHumanBlendshapeQueue, createCustomBlendshapeQueue, createPassthroughBlendshapeQueue, inferMappingFromConfig, } from "./createBlendshapeQueue.js";
|
|
32
|
+
export { createARKitNameMapper, createMetaHumanNameMapper, getBlendshapeObject, } from "./declarativeMapping.js";
|
|
33
33
|
// Modular naturalness pipeline: format profiles + one-call processor.
|
|
34
34
|
// createLipsyncProcessor('mha') wraps symmetrize → limits → gains →
|
|
35
35
|
// envelope → mesh application; new formats plug in as profiles.
|
|
36
|
-
export { createLipsyncProcessor, getLipsyncProfile, } from "./naturalness/processor";
|
|
37
|
-
export { MHA_PROFILE, mhaChannelIndex } from "./naturalness/profiles/mha";
|
|
36
|
+
export { createLipsyncProcessor, getLipsyncProfile, } from "./naturalness/processor.js";
|
|
37
|
+
export { MHA_PROFILE, mhaChannelIndex } from "./naturalness/profiles/mha.js";
|
|
38
38
|
// Flat MHA convenience wrappers over the profile (piecemeal use)
|
|
39
|
-
export { MHA_LIMIT_DRIVERS, applyMhaLimits, MHA_RECOMMENDED_GAINS, createMhaGainMask, MHA_EYE_CHANNEL_INDICES, symmetrizeMhaMouth, } from "./mhaLimitDrivers";
|
|
39
|
+
export { MHA_LIMIT_DRIVERS, applyMhaLimits, MHA_RECOMMENDED_GAINS, createMhaGainMask, MHA_EYE_CHANNEL_INDICES, symmetrizeMhaMouth, } from "./mhaLimitDrivers.js";
|
|
40
40
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { METAHUMAN_ORDER_251 } from "./metahumanOrder251";
|
|
2
|
-
import { MHA_PROFILE, MHA_RECOMMENDED_GAIN_TABLE, mhaChannelIndex, } from "./naturalness/profiles/mha";
|
|
1
|
+
import { METAHUMAN_ORDER_251 } from "./metahumanOrder251.js";
|
|
2
|
+
import { MHA_PROFILE, MHA_RECOMMENDED_GAIN_TABLE, mhaChannelIndex, } from "./naturalness/profiles/mha.js";
|
|
3
3
|
/**
|
|
4
4
|
* Flat MHA convenience helpers — thin wrappers over the modular
|
|
5
5
|
* naturalness profile (see `naturalness/`). Prefer
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LipsyncFormat, LipsyncFormatProfile, LipsyncMeshBinding, LipsyncProcessorOptions } from "./types";
|
|
1
|
+
import type { LipsyncFormat, LipsyncFormatProfile, LipsyncMeshBinding, LipsyncProcessorOptions } from "./types.js";
|
|
2
2
|
/** Resolve a registered format profile; throws a helpful error otherwise. */
|
|
3
3
|
export declare function getLipsyncProfile(format: LipsyncFormat): LipsyncFormatProfile;
|
|
4
4
|
export interface LipsyncProcessor {
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { LipsyncFormatProfile } from "../types";
|
|
1
|
+
import type { LipsyncFormatProfile } from "../types.js";
|
|
2
2
|
/** Production-tuned per-channel gains (short name → gain). */
|
|
3
3
|
export declare const MHA_RECOMMENDED_GAIN_TABLE: Record<string, number>;
|
|
4
4
|
export declare const MHA_PROFILE: LipsyncFormatProfile;
|
|
@@ -5,12 +5,12 @@ import { FiMoreVertical, FiSend, FiPhoneOff } from "react-icons/fi";
|
|
|
5
5
|
import { IoVolumeMute, IoVolumeHigh } from "react-icons/io5";
|
|
6
6
|
import { PiWaveform } from "react-icons/pi";
|
|
7
7
|
import { RoomContext } from "@livekit/components-react";
|
|
8
|
-
import { useCharacterInfo } from "../hooks/useCharacterInfo";
|
|
9
|
-
import { AudioRenderer } from "../../vanilla/AudioRenderer";
|
|
8
|
+
import { useCharacterInfo } from "../hooks/useCharacterInfo.js";
|
|
9
|
+
import { AudioRenderer } from "../../vanilla/AudioRenderer.js";
|
|
10
10
|
// Import styled components and theme from rtc-widget
|
|
11
|
-
import { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, CloseButton, SettingsButton, Content, Footer, InputContainer, Input, ActionButton, aeroTheme, iosTransitions, ConvaiLogo, ChevronDown, } from "./rtc-widget";
|
|
11
|
+
import { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, CloseButton, SettingsButton, Content, Footer, InputContainer, Input, ActionButton, aeroTheme, iosTransitions, ConvaiLogo, ChevronDown, } from "./rtc-widget/index.js";
|
|
12
12
|
// Import message components
|
|
13
|
-
import { MessageList, SettingsTray, VoiceModeOverlay, FloatingVideo, } from "./rtc-widget";
|
|
13
|
+
import { MessageList, SettingsTray, VoiceModeOverlay, FloatingVideo, } from "./rtc-widget/index.js";
|
|
14
14
|
/**
|
|
15
15
|
* ConvaiWidget - A consolidated chat widget component for real-time conversations
|
|
16
16
|
*
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { ConvaiWidget } from './ConvaiWidget';
|
|
1
|
+
export { ConvaiWidget } from './ConvaiWidget.js';
|
|
2
2
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from "react";
|
|
2
|
-
import { AudioSettings } from "../../../../core/types";
|
|
2
|
+
import { AudioSettings } from "../../../../core/types.js";
|
|
3
3
|
interface AudioSettingsPanelProps {
|
|
4
4
|
currentSettings: AudioSettings;
|
|
5
5
|
onUpdateSettings: (settings: Partial<AudioSettings>) => Promise<void>;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { aeroTheme } from "../styles";
|
|
3
|
-
import { ConvaiLogo, ConviBubble, ConviMessageContainer, MessageHeader, ConviLabel, LogoWrapper, } from "../styles";
|
|
4
|
-
import { MarkdownRenderer } from "./MarkdownRenderer";
|
|
2
|
+
import { aeroTheme } from "../styles/index.js";
|
|
3
|
+
import { ConvaiLogo, ConviBubble, ConviMessageContainer, MessageHeader, ConviLabel, LogoWrapper, } from "../styles/index.js";
|
|
4
|
+
import { MarkdownRenderer } from "./MarkdownRenderer.js";
|
|
5
5
|
export const ConviMessage = ({ message, timestamp, className, showLogo = true, sender, }) => {
|
|
6
6
|
return (_jsxs(ConviMessageContainer, { className: className, children: [_jsxs(ConviBubble, { children: [showLogo && (_jsxs(MessageHeader, { children: [_jsx(LogoWrapper, { children: _jsx(ConvaiLogo, { size: "sm", color: "#10b981", animate: false, state: "connected" }) }), _jsx(ConviLabel, { children: sender })] })), _jsx(MarkdownRenderer, { text: message })] }), timestamp && (_jsx("span", { style: {
|
|
7
7
|
fontSize: aeroTheme.typography.sizes.caption,
|
|
@@ -4,9 +4,9 @@ import { motion } from "framer-motion";
|
|
|
4
4
|
import { VideoTrack, RoomContext, useRoomContext } from "@livekit/components-react";
|
|
5
5
|
import { IoClose, IoVideocamOff } from "react-icons/io5";
|
|
6
6
|
import { MdDragIndicator } from "react-icons/md";
|
|
7
|
-
import { aeroTheme } from "../styles/theme";
|
|
8
|
-
import { iosTransitions } from "../styles/framerConfig";
|
|
9
|
-
import { useLocalCameraTrack } from "../../../hooks/useLocalCameraTrack";
|
|
7
|
+
import { aeroTheme } from "../styles/theme.js";
|
|
8
|
+
import { iosTransitions } from "../styles/framerConfig.js";
|
|
9
|
+
import { useLocalCameraTrack } from "../../../hooks/useLocalCameraTrack.js";
|
|
10
10
|
/**
|
|
11
11
|
* LocalVideoDisplay component for rendering local camera feed inside FloatingVideo.
|
|
12
12
|
*/
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import React, { useRef, useEffect, useCallback } from "react";
|
|
3
|
-
import { UserMessage } from "./UserMessage";
|
|
4
|
-
import { ConviMessage } from "./ConviMessage";
|
|
5
|
-
import { aeroTheme } from "../styles";
|
|
6
|
-
import { MessageListContainer, MessageWrapper, EmptyState } from "../styles";
|
|
3
|
+
import { UserMessage } from "./UserMessage.js";
|
|
4
|
+
import { ConviMessage } from "./ConviMessage.js";
|
|
5
|
+
import { aeroTheme } from "../styles/index.js";
|
|
6
|
+
import { MessageListContainer, MessageWrapper, EmptyState } from "../styles/index.js";
|
|
7
7
|
export const MessageList = ({ messages, className, isStreaming = false, forceToBottomToken, }) => {
|
|
8
8
|
const containerRef = useRef(null);
|
|
9
9
|
const [shouldAutoScroll, setShouldAutoScroll] = React.useState(true);
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { aeroTheme } from "../styles";
|
|
3
|
-
import { UserBubble, UserMessageContainer, MessageHeader, UserLabel, LogoWrapper, } from "../styles";
|
|
2
|
+
import { aeroTheme } from "../styles/index.js";
|
|
3
|
+
import { UserBubble, UserMessageContainer, MessageHeader, UserLabel, LogoWrapper, } from "../styles/index.js";
|
|
4
4
|
import { FaUser } from "react-icons/fa";
|
|
5
|
-
import { MarkdownRenderer } from "./MarkdownRenderer";
|
|
5
|
+
import { MarkdownRenderer } from "./MarkdownRenderer.js";
|
|
6
6
|
export const UserMessage = ({ message, timestamp, className, sender, }) => {
|
|
7
7
|
return (_jsxs(UserMessageContainer, { className: className, children: [_jsxs(UserBubble, { children: [sender && (_jsxs(MessageHeader, { children: [_jsx(LogoWrapper, { children: _jsx(FaUser, { size: 16, color: aeroTheme.colors.convai.dark }) }), _jsx(UserLabel, { children: sender === "User" ? "You" : sender })] })), _jsx(MarkdownRenderer, { text: message })] }), timestamp && (_jsx("span", { style: {
|
|
8
8
|
fontSize: aeroTheme.typography.sizes.caption,
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
-
import { ConvaiLogo } from "../../styles/icons";
|
|
3
|
-
import { aeroTheme } from "../../styles/theme";
|
|
4
|
-
import { iosTransitions } from "../../styles/framerConfig";
|
|
5
|
-
import { ButtonContent, Logo } from "../../styles/styledComponents";
|
|
2
|
+
import { ConvaiLogo } from "../../styles/icons.js";
|
|
3
|
+
import { aeroTheme } from "../../styles/theme.js";
|
|
4
|
+
import { iosTransitions } from "../../styles/framerConfig.js";
|
|
5
|
+
import { ButtonContent, Logo } from "../../styles/styledComponents.js";
|
|
6
6
|
export const ConviButton = ({ isOpen }) => {
|
|
7
7
|
return (_jsx(ButtonContent, { animate: {
|
|
8
8
|
opacity: isOpen ? 0 : 1,
|
|
@@ -2,9 +2,9 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { AnimatePresence, motion } from "framer-motion";
|
|
3
3
|
import { FiSend, FiMic } from "react-icons/fi";
|
|
4
4
|
import { PiWaveform } from "react-icons/pi";
|
|
5
|
-
import { aeroTheme } from "../../styles/theme";
|
|
6
|
-
import { iosTransitions } from "../../styles/framerConfig";
|
|
7
|
-
import { Footer, InputContainer, Input, ActionButton, } from "../../styles/styledComponents";
|
|
5
|
+
import { aeroTheme } from "../../styles/theme.js";
|
|
6
|
+
import { iosTransitions } from "../../styles/framerConfig.js";
|
|
7
|
+
import { Footer, InputContainer, Input, ActionButton, } from "../../styles/styledComponents.js";
|
|
8
8
|
export const ConviFooter = ({ inputMode, inputValue, liveUserText, chatbotMic, localIsTyping, convaiIsTyping, isCreatingSpeaker, isPressingMic, isSettingsOpen, isVoiceMode, onInputChange, onKeyPress, onSend, onMicPress, onMicRelease, setIsPressingMic, onToggleVoiceMode, verbosityChanged = false, onContinue, }) => {
|
|
9
9
|
// Show Continue button in verbosity mode
|
|
10
10
|
if (inputMode === "verbosity") {
|
|
@@ -2,10 +2,10 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { motion } from "framer-motion";
|
|
3
3
|
import { FiMoreVertical } from "react-icons/fi";
|
|
4
4
|
import { IoVolumeMute, IoVolumeHigh } from "react-icons/io5";
|
|
5
|
-
import { ChevronDown } from "../../styles/icons";
|
|
6
|
-
import { aeroTheme } from "../../styles/theme";
|
|
7
|
-
import { iosTransitions } from "../../styles/framerConfig";
|
|
8
|
-
import { Header, Title, CloseButton, SettingsButton, } from "../../styles/styledComponents";
|
|
5
|
+
import { ChevronDown } from "../../styles/icons.js";
|
|
6
|
+
import { aeroTheme } from "../../styles/theme.js";
|
|
7
|
+
import { iosTransitions } from "../../styles/framerConfig.js";
|
|
8
|
+
import { Header, Title, CloseButton, SettingsButton, } from "../../styles/styledComponents.js";
|
|
9
9
|
export const ConviHeader = ({ isOpen, isSpeakerEditMode, isVoiceMode, isVerbosityMode, isMuted, characterImage, characterName = "Character", onClose, onSettingsToggle, onToggleMute, settingsButtonRef, }) => {
|
|
10
10
|
return (_jsxs(Header, { initial: { opacity: 0, y: -20 }, animate: {
|
|
11
11
|
opacity: isOpen ? 1 : 0,
|
|
@@ -3,9 +3,9 @@ import { AnimatePresence } from "framer-motion";
|
|
|
3
3
|
import { LiaRedoAltSolid } from "react-icons/lia";
|
|
4
4
|
import { IoVideocam, IoVideocamOff } from "react-icons/io5";
|
|
5
5
|
import { MdScreenShare, MdStopScreenShare } from "react-icons/md";
|
|
6
|
-
import { aeroTheme } from "../../styles/theme";
|
|
7
|
-
import { iosTransitions } from "../../styles/framerConfig";
|
|
8
|
-
import { SettingsTray as StyledSettingsTray, SettingsOption, } from "../../styles/styledComponents";
|
|
6
|
+
import { aeroTheme } from "../../styles/theme.js";
|
|
7
|
+
import { iosTransitions } from "../../styles/framerConfig.js";
|
|
8
|
+
import { SettingsTray as StyledSettingsTray, SettingsOption, } from "../../styles/styledComponents.js";
|
|
9
9
|
export const SettingsTray = ({ isOpen, isVideoVisible, isScreenShareActive, onReset, onDisconnect, onToggleVideo, onToggleScreenShare, }) => {
|
|
10
10
|
if (!isOpen)
|
|
11
11
|
return null;
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
2
|
import { useEffect, useRef, useState } from "react";
|
|
3
3
|
import { motion, AnimatePresence } from "framer-motion";
|
|
4
|
-
import { aeroTheme } from "../../styles/theme";
|
|
5
|
-
import { iosTransitions } from "../../styles/framerConfig";
|
|
6
|
-
import { AudioVisualizer } from "../AudioVisualizer";
|
|
4
|
+
import { aeroTheme } from "../../styles/theme.js";
|
|
5
|
+
import { iosTransitions } from "../../styles/framerConfig.js";
|
|
6
|
+
import { AudioVisualizer } from "../AudioVisualizer.js";
|
|
7
7
|
export const VoiceModeOverlay = ({ isActive, isTalking, isListening = false, convaiClient, characterImage, characterName = "Character", room, }) => {
|
|
8
8
|
const barsCount = 40; // Number of bars for user microphone waveform
|
|
9
9
|
// PERF: the waveform is driven OUTSIDE React. A setState per animation
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ConviButton } from "./ConviButton";
|
|
2
|
-
export { ConviHeader } from "./ConviHeader";
|
|
3
|
-
export { ConviFooter } from "./ConviFooter";
|
|
4
|
-
export { SettingsTray } from "./SettingsTray";
|
|
5
|
-
export { VoiceModeOverlay } from "./VoiceModeOverlay";
|
|
1
|
+
export { ConviButton } from "./ConviButton.js";
|
|
2
|
+
export { ConviHeader } from "./ConviHeader.js";
|
|
3
|
+
export { ConviFooter } from "./ConviFooter.js";
|
|
4
|
+
export { SettingsTray } from "./SettingsTray.js";
|
|
5
|
+
export { VoiceModeOverlay } from "./VoiceModeOverlay.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { ConviButton } from "./ConviButton";
|
|
2
|
-
export { ConviHeader } from "./ConviHeader";
|
|
3
|
-
export { ConviFooter } from "./ConviFooter";
|
|
4
|
-
export { SettingsTray } from "./SettingsTray";
|
|
5
|
-
export { VoiceModeOverlay } from "./VoiceModeOverlay";
|
|
1
|
+
export { ConviButton } from "./ConviButton.js";
|
|
2
|
+
export { ConviHeader } from "./ConviHeader.js";
|
|
3
|
+
export { ConviFooter } from "./ConviFooter.js";
|
|
4
|
+
export { SettingsTray } from "./SettingsTray.js";
|
|
5
|
+
export { VoiceModeOverlay } from "./VoiceModeOverlay.js";
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
export { MessageBubble } from "./MessageBubble";
|
|
2
|
-
export { MessageList } from "./MessageList";
|
|
3
|
-
export { UserMessage } from "./UserMessage";
|
|
4
|
-
export { ConviMessage } from "./ConviMessage";
|
|
5
|
-
export { MarkdownRenderer } from "./MarkdownRenderer";
|
|
6
|
-
export { FloatingVideo } from "./FloatingVideo";
|
|
7
|
-
export { AudioVisualizer } from "./AudioVisualizer";
|
|
8
|
-
export { ConviButton, ConviHeader, ConviFooter, SettingsTray, VoiceModeOverlay, } from "./conviComponents";
|
|
1
|
+
export { MessageBubble } from "./MessageBubble.js";
|
|
2
|
+
export { MessageList } from "./MessageList.js";
|
|
3
|
+
export { UserMessage } from "./UserMessage.js";
|
|
4
|
+
export { ConviMessage } from "./ConviMessage.js";
|
|
5
|
+
export { MarkdownRenderer } from "./MarkdownRenderer.js";
|
|
6
|
+
export { FloatingVideo } from "./FloatingVideo.js";
|
|
7
|
+
export { AudioVisualizer } from "./AudioVisualizer.js";
|
|
8
|
+
export { ConviButton, ConviHeader, ConviFooter, SettingsTray, VoiceModeOverlay, } from "./conviComponents/index.js";
|
|
9
9
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// Export message components
|
|
2
|
-
export { MessageBubble } from "./MessageBubble";
|
|
3
|
-
export { MessageList } from "./MessageList";
|
|
4
|
-
export { UserMessage } from "./UserMessage";
|
|
5
|
-
export { ConviMessage } from "./ConviMessage";
|
|
6
|
-
export { MarkdownRenderer } from "./MarkdownRenderer";
|
|
2
|
+
export { MessageBubble } from "./MessageBubble.js";
|
|
3
|
+
export { MessageList } from "./MessageList.js";
|
|
4
|
+
export { UserMessage } from "./UserMessage.js";
|
|
5
|
+
export { ConviMessage } from "./ConviMessage.js";
|
|
6
|
+
export { MarkdownRenderer } from "./MarkdownRenderer.js";
|
|
7
7
|
// Export floating video component
|
|
8
|
-
export { FloatingVideo } from "./FloatingVideo";
|
|
8
|
+
export { FloatingVideo } from "./FloatingVideo.js";
|
|
9
9
|
// Export audio visualizer
|
|
10
|
-
export { AudioVisualizer } from "./AudioVisualizer";
|
|
10
|
+
export { AudioVisualizer } from "./AudioVisualizer.js";
|
|
11
11
|
// Note: AudioSettingsPanel is internal only - audio settings are fixed
|
|
12
|
-
// export { AudioSettingsPanel } from "./AudioSettingsPanel";
|
|
12
|
+
// export { AudioSettingsPanel } from "./AudioSettingsPanel.js";
|
|
13
13
|
// Export convi sub-components
|
|
14
|
-
export { ConviButton, ConviHeader, ConviFooter, SettingsTray, VoiceModeOverlay, } from "./conviComponents";
|
|
14
|
+
export { ConviButton, ConviHeader, ConviFooter, SettingsTray, VoiceModeOverlay, } from "./conviComponents/index.js";
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { MessageBubble, MessageList, UserMessage, ConviMessage, FloatingVideo, ConviButton, ConviHeader, ConviFooter, SettingsTray, VoiceModeOverlay, } from "./components";
|
|
2
|
-
export { aeroTheme, glassStyles, iconSizes, variants, iosTransitions, animationVariants, ConvaiLogo, ChevronDown, } from "./styles";
|
|
3
|
-
export { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, HeaderLogo, CloseButton, SettingsButton, Content, Footer, InputContainer, Input, ActionButton, } from "./styles";
|
|
4
|
-
export type { RTCChatMessage, CharacterVerbosityConfig, ConviUIProps, } from "./types";
|
|
5
|
-
export type { LogoState } from "./styles";
|
|
1
|
+
export { MessageBubble, MessageList, UserMessage, ConviMessage, FloatingVideo, ConviButton, ConviHeader, ConviFooter, SettingsTray, VoiceModeOverlay, } from "./components/index.js";
|
|
2
|
+
export { aeroTheme, glassStyles, iconSizes, variants, iosTransitions, animationVariants, ConvaiLogo, ChevronDown, } from "./styles/index.js";
|
|
3
|
+
export { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, HeaderLogo, CloseButton, SettingsButton, Content, Footer, InputContainer, Input, ActionButton, } from "./styles/index.js";
|
|
4
|
+
export type { RTCChatMessage, CharacterVerbosityConfig, ConviUIProps, } from "./types/index.js";
|
|
5
|
+
export type { LogoState } from "./styles/index.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Export all components
|
|
2
2
|
export { MessageBubble, MessageList, UserMessage, ConviMessage, FloatingVideo,
|
|
3
3
|
// AudioSettingsPanel, // Internal only - audio settings are fixed
|
|
4
|
-
ConviButton, ConviHeader, ConviFooter, SettingsTray, VoiceModeOverlay, } from "./components";
|
|
4
|
+
ConviButton, ConviHeader, ConviFooter, SettingsTray, VoiceModeOverlay, } from "./components/index.js";
|
|
5
5
|
// Export styles and theme
|
|
6
|
-
export { aeroTheme, glassStyles, iconSizes, variants, iosTransitions, animationVariants, ConvaiLogo, ChevronDown, } from "./styles";
|
|
6
|
+
export { aeroTheme, glassStyles, iconSizes, variants, iosTransitions, animationVariants, ConvaiLogo, ChevronDown, } from "./styles/index.js";
|
|
7
7
|
// Export styled components for custom layouts
|
|
8
|
-
export { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, HeaderLogo, CloseButton, SettingsButton, Content, Footer, InputContainer, Input, ActionButton, } from "./styles";
|
|
8
|
+
export { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, HeaderLogo, CloseButton, SettingsButton, Content, Footer, InputContainer, Input, ActionButton, } from "./styles/index.js";
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -2,7 +2,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
2
2
|
import { useEffect, useState } from "react";
|
|
3
3
|
import { motion } from "framer-motion";
|
|
4
4
|
import styled from "styled-components";
|
|
5
|
-
import { aeroTheme, iconSizes } from "./theme";
|
|
5
|
+
import { aeroTheme, iconSizes } from "./theme.js";
|
|
6
6
|
const LogoSVG = styled(motion.svg) `
|
|
7
7
|
width: ${(props) => props.$size || "100%"};
|
|
8
8
|
height: ${(props) => props.$size || "100%"};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
export { aeroTheme, glassStyles, iconSizes, variants } from "./theme";
|
|
2
|
-
export { iosTransitions, animationVariants } from "./framerConfig";
|
|
3
|
-
export { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, HeaderLogo, CloseButton, SettingsButton, SettingsTray, SettingsOption, Content, Footer, InputContainer, Input, ActionButton, MessageList, Message, MessageBubble, MessageTime, ButtonContainer, ButtonLogo, ConviBubble, ConviMessageContainer, MessageHeader, ConviLabel, LogoWrapper, UserBubble, UserMessageContainer, UserLabel, BubbleContainer, Bubble, Timestamp, MessageListContainer, MessageWrapper, EmptyState, } from "./styledComponents";
|
|
4
|
-
export { ConvaiLogo, ChevronDown, AeroIcons, IconButton } from "./icons";
|
|
5
|
-
export type { LogoState } from "./icons";
|
|
1
|
+
export { aeroTheme, glassStyles, iconSizes, variants } from "./theme.js";
|
|
2
|
+
export { iosTransitions, animationVariants } from "./framerConfig.js";
|
|
3
|
+
export { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, HeaderLogo, CloseButton, SettingsButton, SettingsTray, SettingsOption, Content, Footer, InputContainer, Input, ActionButton, MessageList, Message, MessageBubble, MessageTime, ButtonContainer, ButtonLogo, ConviBubble, ConviMessageContainer, MessageHeader, ConviLabel, LogoWrapper, UserBubble, UserMessageContainer, UserLabel, BubbleContainer, Bubble, Timestamp, MessageListContainer, MessageWrapper, EmptyState, } from "./styledComponents.js";
|
|
4
|
+
export { ConvaiLogo, ChevronDown, AeroIcons, IconButton } from "./icons.js";
|
|
5
|
+
export type { LogoState } from "./icons.js";
|
|
6
6
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
// Export theme
|
|
2
|
-
export { aeroTheme, glassStyles, iconSizes, variants } from "./theme";
|
|
2
|
+
export { aeroTheme, glassStyles, iconSizes, variants } from "./theme.js";
|
|
3
3
|
// Export framer configs
|
|
4
|
-
export { iosTransitions, animationVariants } from "./framerConfig";
|
|
4
|
+
export { iosTransitions, animationVariants } from "./framerConfig.js";
|
|
5
5
|
// Export styled components
|
|
6
|
-
export { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, HeaderLogo, CloseButton, SettingsButton, SettingsTray, SettingsOption, Content, Footer, InputContainer, Input, ActionButton, MessageList, Message, MessageBubble, MessageTime, ButtonContainer, ButtonLogo, ConviBubble, ConviMessageContainer, MessageHeader, ConviLabel, LogoWrapper, UserBubble, UserMessageContainer, UserLabel, BubbleContainer, Bubble, Timestamp, MessageListContainer, MessageWrapper, EmptyState, } from "./styledComponents";
|
|
6
|
+
export { ConvaiContainer, MorphingContainer, ButtonContent, Logo, ChatContent, Header, Title, HeaderLogo, CloseButton, SettingsButton, SettingsTray, SettingsOption, Content, Footer, InputContainer, Input, ActionButton, MessageList, Message, MessageBubble, MessageTime, ButtonContainer, ButtonLogo, ConviBubble, ConviMessageContainer, MessageHeader, ConviLabel, LogoWrapper, UserBubble, UserMessageContainer, UserLabel, BubbleContainer, Bubble, Timestamp, MessageListContainer, MessageWrapper, EmptyState, } from "./styledComponents.js";
|
|
7
7
|
// Export icons
|
|
8
|
-
export { ConvaiLogo, ChevronDown, AeroIcons, IconButton } from "./icons";
|
|
8
|
+
export { ConvaiLogo, ChevronDown, AeroIcons, IconButton } from "./icons.js";
|
|
9
9
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import styled from "styled-components";
|
|
2
2
|
import { motion } from "framer-motion";
|
|
3
|
-
import { aeroTheme } from "./theme";
|
|
3
|
+
import { aeroTheme } from "./theme.js";
|
|
4
4
|
// Styled Components matching the original webChat exactly
|
|
5
5
|
export const ConvaiContainer = styled(motion.div) `
|
|
6
6
|
position: fixed !important;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
export { useConvaiClient } from './useConvaiClient';
|
|
2
|
-
export { useCharacterInfo } from './useCharacterInfo';
|
|
3
|
-
export { useLocalCameraTrack } from './useLocalCameraTrack';
|
|
1
|
+
export { useConvaiClient } from './useConvaiClient.js';
|
|
2
|
+
export { useCharacterInfo } from './useCharacterInfo.js';
|
|
3
|
+
export { useLocalCameraTrack } from './useLocalCameraTrack.js';
|
|
4
4
|
//# sourceMappingURL=index.d.ts.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
// Main hook
|
|
2
|
-
export { useConvaiClient } from './useConvaiClient';
|
|
2
|
+
export { useConvaiClient } from './useConvaiClient.js';
|
|
3
3
|
// Additional hooks
|
|
4
|
-
export { useCharacterInfo } from './useCharacterInfo';
|
|
5
|
-
export { useLocalCameraTrack } from './useLocalCameraTrack';
|
|
4
|
+
export { useCharacterInfo } from './useCharacterInfo.js';
|
|
5
|
+
export { useLocalCameraTrack } from './useLocalCameraTrack.js';
|
|
6
6
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { ConvaiConfig, IConvaiClient, ChatMessage } from "../../core/types";
|
|
1
|
+
import type { ConvaiConfig, IConvaiClient, ChatMessage } from "../../core/types.js";
|
|
2
2
|
/**
|
|
3
3
|
* React hook wrapper for ConvaiClient
|
|
4
4
|
* Main hook for managing Convai client connection and functionality.
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useEffect, useCallback } from "react";
|
|
2
|
-
import { ConvaiClient as CoreConvaiClient } from "../../core";
|
|
2
|
+
import { ConvaiClient as CoreConvaiClient } from "../../core/index.js";
|
|
3
3
|
/**
|
|
4
4
|
* React hook wrapper for ConvaiClient
|
|
5
5
|
* Main hook for managing Convai client connection and functionality.
|
package/dist/react/index.d.ts
CHANGED
|
@@ -1,8 +1,8 @@
|
|
|
1
|
-
export { useConvaiClient } from './hooks/useConvaiClient';
|
|
2
|
-
export { ConvaiWidget } from './components/ConvaiWidget';
|
|
3
|
-
export * from './hooks';
|
|
4
|
-
export * from '../core/types';
|
|
5
|
-
export { getDisconnectReasonMessage } from '../core/types';
|
|
6
|
-
export { ConvaiClient } from '../core';
|
|
1
|
+
export { useConvaiClient } from './hooks/useConvaiClient.js';
|
|
2
|
+
export { ConvaiWidget } from './components/ConvaiWidget.js';
|
|
3
|
+
export * from './hooks/index.js';
|
|
4
|
+
export * from '../core/types.js';
|
|
5
|
+
export { getDisconnectReasonMessage } from '../core/types.js';
|
|
6
|
+
export { ConvaiClient } from '../core/index.js';
|
|
7
7
|
export { RoomAudioRenderer as AudioRenderer, RoomContext as AudioContext } from '@livekit/components-react';
|
|
8
8
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/react/index.js
CHANGED
|
@@ -1,15 +1,15 @@
|
|
|
1
1
|
// Main hook (backward compatible)
|
|
2
|
-
export { useConvaiClient } from './hooks/useConvaiClient';
|
|
2
|
+
export { useConvaiClient } from './hooks/useConvaiClient.js';
|
|
3
3
|
// Components
|
|
4
|
-
export { ConvaiWidget } from './components/ConvaiWidget';
|
|
4
|
+
export { ConvaiWidget } from './components/ConvaiWidget.js';
|
|
5
5
|
// Additional hooks (for advanced usage)
|
|
6
|
-
export * from './hooks';
|
|
6
|
+
export * from './hooks/index.js';
|
|
7
7
|
// Re-export core types for convenience
|
|
8
|
-
export * from '../core/types';
|
|
8
|
+
export * from '../core/types.js';
|
|
9
9
|
// Re-export helper functions explicitly
|
|
10
|
-
export { getDisconnectReasonMessage } from '../core/types';
|
|
10
|
+
export { getDisconnectReasonMessage } from '../core/types.js';
|
|
11
11
|
// Re-export core client for advanced usage
|
|
12
|
-
export { ConvaiClient } from '../core';
|
|
12
|
+
export { ConvaiClient } from '../core/index.js';
|
|
13
13
|
// Re-export LiveKit components for convenience (backward compatible)
|
|
14
14
|
export { RoomAudioRenderer as AudioRenderer, RoomContext as AudioContext } from '@livekit/components-react';
|
|
15
15
|
//# sourceMappingURL=index.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { RoomEvent } from 'livekit-client';
|
|
2
|
-
import { logger } from '../utils/logger';
|
|
2
|
+
import { logger } from '../utils/logger.js';
|
|
3
3
|
/**
|
|
4
4
|
* AudioRenderer - Manages audio playback for remote participants
|
|
5
5
|
* Automatically creates and attaches audio elements for remote audio tracks
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* Vanilla ConvaiWidget - Complete UI widget for Convai conversations
|
|
3
3
|
* Ports the React ConvaiWidget to vanilla TypeScript with DOM manipulation
|
|
4
4
|
*/
|
|
5
|
-
import type { VanillaWidgetOptions, VanillaWidget } from "./types";
|
|
5
|
+
import type { VanillaWidgetOptions, VanillaWidget } from "./types.js";
|
|
6
6
|
/**
|
|
7
7
|
* Create a Convai chat widget in the specified container
|
|
8
8
|
*
|
|
@@ -2,10 +2,10 @@
|
|
|
2
2
|
* Vanilla ConvaiWidget - Complete UI widget for Convai conversations
|
|
3
3
|
* Ports the React ConvaiWidget to vanilla TypeScript with DOM manipulation
|
|
4
4
|
*/
|
|
5
|
-
import { AudioRenderer } from "./AudioRenderer";
|
|
6
|
-
import { aeroTheme, injectGlobalStyles, injectKeyframes, } from "./styles";
|
|
7
|
-
import { Icons } from "./icons";
|
|
8
|
-
import { ConvaiClient } from "../core/ConvaiClient";
|
|
5
|
+
import { AudioRenderer } from "./AudioRenderer.js";
|
|
6
|
+
import { aeroTheme, injectGlobalStyles, injectKeyframes, } from "./styles.js";
|
|
7
|
+
import { Icons } from "./icons.js";
|
|
8
|
+
import { ConvaiClient } from "../core/ConvaiClient.js";
|
|
9
9
|
/**
|
|
10
10
|
* Positioning declarations for the widget root, keyed by `placement`. The
|
|
11
11
|
* `bottom-right` entry must stay byte-identical to the literals it replaces --
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { PipecatClient, RTVIEvent } from "@pipecat-ai/client-js";
|
|
2
2
|
import { WebSocketTransport } from "@pipecat-ai/websocket-transport";
|
|
3
|
-
import { EventEmitter } from "../core/EventEmitter";
|
|
3
|
+
import { EventEmitter } from "../core/EventEmitter.js";
|
|
4
4
|
/**
|
|
5
5
|
* Adapter that wraps PipecatClient + WebSocketTransport for use in ConvaiClient.
|
|
6
6
|
*
|
package/dist/vanilla/index.d.ts
CHANGED
|
@@ -28,9 +28,9 @@
|
|
|
28
28
|
* // - client.audioControls, videoControls, etc.
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
|
-
export { ConvaiClient } from '../core/ConvaiClient';
|
|
32
|
-
export { AudioRenderer } from './AudioRenderer';
|
|
33
|
-
export { createConvaiWidget, destroyConvaiWidget } from './ConvaiWidget';
|
|
34
|
-
export * from '../core/types';
|
|
35
|
-
export type { VanillaWidget, VanillaWidgetOptions, WidgetPlacement, } from './types';
|
|
31
|
+
export { ConvaiClient } from '../core/ConvaiClient.js';
|
|
32
|
+
export { AudioRenderer } from './AudioRenderer.js';
|
|
33
|
+
export { createConvaiWidget, destroyConvaiWidget } from './ConvaiWidget.js';
|
|
34
|
+
export * from '../core/types.js';
|
|
35
|
+
export type { VanillaWidget, VanillaWidgetOptions, WidgetPlacement, } from './types.js';
|
|
36
36
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/vanilla/index.js
CHANGED
|
@@ -29,11 +29,11 @@
|
|
|
29
29
|
* ```
|
|
30
30
|
*/
|
|
31
31
|
// Main client for managing connections
|
|
32
|
-
export { ConvaiClient } from '../core/ConvaiClient';
|
|
32
|
+
export { ConvaiClient } from '../core/ConvaiClient.js';
|
|
33
33
|
// AudioRenderer for custom UI builders (handles audio playback)
|
|
34
|
-
export { AudioRenderer } from './AudioRenderer';
|
|
34
|
+
export { AudioRenderer } from './AudioRenderer.js';
|
|
35
35
|
// Vanilla widget - complete UI solution
|
|
36
|
-
export { createConvaiWidget, destroyConvaiWidget } from './ConvaiWidget';
|
|
36
|
+
export { createConvaiWidget, destroyConvaiWidget } from './ConvaiWidget.js';
|
|
37
37
|
// Re-export ALL core types for complete parity with React
|
|
38
|
-
export * from '../core/types';
|
|
38
|
+
export * from '../core/types.js';
|
|
39
39
|
//# sourceMappingURL=index.js.map
|
package/dist/vanilla/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { IConvaiClient, ChatMessage } from '../core/types';
|
|
1
|
+
import type { IConvaiClient, ChatMessage } from '../core/types.js';
|
|
2
2
|
/** Where the widget anchors itself. `inline` renders it in normal document flow. */
|
|
3
3
|
export type WidgetPlacement = 'bottom-right' | 'bottom-left' | 'top-right' | 'top-left' | 'inline';
|
|
4
4
|
/**
|
|
@@ -14,8 +14,8 @@
|
|
|
14
14
|
* const client = new ConvaiClient({ transport: 'websocket', ... });
|
|
15
15
|
* ```
|
|
16
16
|
*/
|
|
17
|
-
import { ConvaiClient } from "../core/ConvaiClient";
|
|
18
|
-
import { WebSocketSession } from "./WebSocketSession";
|
|
17
|
+
import { ConvaiClient } from "../core/ConvaiClient.js";
|
|
18
|
+
import { WebSocketSession } from "./WebSocketSession.js";
|
|
19
19
|
// Side-effect: register the Pipecat-backed factory with ConvaiClient.
|
|
20
20
|
// After this runs, any ConvaiClient instance can use transport: "websocket".
|
|
21
21
|
ConvaiClient.registerWebSocketTransport((onMessage, enableMic) => new WebSocketSession(onMessage, enableMic));
|
package/dist/version.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare const SDK_VERSION = "1.8.0-beta.
|
|
1
|
+
export declare const SDK_VERSION = "1.8.0-beta.4";
|
|
2
2
|
//# sourceMappingURL=version.d.ts.map
|
package/dist/version.js
CHANGED
package/dist/version.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gDAAgD;AAChD,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC","sourcesContent":["// GENERATED by scripts/sync-version.mjs — do not edit by hand.\n// Regenerated from package.json on every build.\nexport const SDK_VERSION = \"1.8.0-beta.
|
|
1
|
+
{"version":3,"file":"version.js","sourceRoot":"","sources":["../src/version.ts"],"names":[],"mappings":"AAAA,+DAA+D;AAC/D,gDAAgD;AAChD,MAAM,CAAC,MAAM,WAAW,GAAG,cAAc,CAAC","sourcesContent":["// GENERATED by scripts/sync-version.mjs — do not edit by hand.\n// Regenerated from package.json on every build.\nexport const SDK_VERSION = \"1.8.0-beta.4\";\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@convai/web-sdk",
|
|
3
|
-
"version": "1.8.0-beta.
|
|
3
|
+
"version": "1.8.0-beta.4",
|
|
4
4
|
"description": "Build web apps with lifelike AI characters. The Convai Web SDK gives you real-time voice, lipsync, emotions, and dynamic context — with first-class support for React and vanilla TypeScript.",
|
|
5
5
|
"private": false,
|
|
6
6
|
"type": "module",
|
|
@@ -42,11 +42,12 @@
|
|
|
42
42
|
"access": "public"
|
|
43
43
|
},
|
|
44
44
|
"scripts": {
|
|
45
|
-
"build": "node scripts/sync-version.mjs && tsc -p tsconfig.build.json && pnpm typecheck:downstream",
|
|
46
|
-
"build:fast": "node scripts/sync-version.mjs && tsc -p tsconfig.build.json",
|
|
47
|
-
"build:prod": "node scripts/sync-version.mjs && NODE_ENV=production tsc -p tsconfig.build.json && pnpm typecheck:downstream",
|
|
45
|
+
"build": "node scripts/sync-version.mjs && tsc -p tsconfig.build.json && node scripts/fix-dist-extensions.mjs && pnpm typecheck:downstream",
|
|
46
|
+
"build:fast": "node scripts/sync-version.mjs && tsc -p tsconfig.build.json && node scripts/fix-dist-extensions.mjs",
|
|
47
|
+
"build:prod": "node scripts/sync-version.mjs && NODE_ENV=production tsc -p tsconfig.build.json && node scripts/fix-dist-extensions.mjs && pnpm typecheck:downstream",
|
|
48
48
|
"dev": "tsc -p tsconfig.build.json --watch",
|
|
49
49
|
"clean": "rimraf dist",
|
|
50
|
+
"fix:ext": "node scripts/fix-dist-extensions.mjs",
|
|
50
51
|
"typecheck": "tsc --noEmit",
|
|
51
52
|
"typecheck:downstream": "pnpm -r --filter './examples/**' exec tsc -b --noEmit && pnpm -r --filter './doc-tests/**' exec tsc --noEmit",
|
|
52
53
|
"typecheck:all": "pnpm typecheck && pnpm typecheck:downstream",
|