polymorph-sdk 0.2.0 → 0.2.3
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 -2
- package/dist/index.css +1 -1
- package/dist/index.d.ts +18 -5
- package/dist/index.js +3376 -3252
- package/package.json +6 -2
- package/src/ChatThread.tsx +73 -9
- package/src/PolymorphWidget.tsx +89 -17
- package/src/RoomHandler.tsx +99 -0
- package/src/VoiceOverlay.tsx +22 -2
- package/src/WidgetPanel.tsx +169 -132
- package/src/__tests__/exports.test.ts +13 -0
- package/src/index.ts +6 -1
- package/src/styles.module.css +38 -237
- package/src/types.ts +18 -5
- package/src/usePolymorphSession.ts +150 -42
package/dist/index.d.ts
CHANGED
|
@@ -48,17 +48,30 @@ export declare interface WidgetBranding {
|
|
|
48
48
|
export declare interface WidgetConfig {
|
|
49
49
|
apiBaseUrl: string;
|
|
50
50
|
apiKey?: string;
|
|
51
|
-
|
|
51
|
+
/** Server-side widget config ID. When set, metadata is ignored and config is resolved server-side. */
|
|
52
|
+
configId?: string;
|
|
53
|
+
/** LiveKit dispatched agent name (default: "custom-voice-agent"). */
|
|
54
|
+
agentName?: string;
|
|
55
|
+
metadata?: Record<string, string | string[]>;
|
|
56
|
+
/** Pre-filled user identity. When provided, the agent skips asking for these fields. */
|
|
57
|
+
user?: WidgetUser;
|
|
52
58
|
branding?: WidgetBranding;
|
|
53
59
|
position?: "bottom-right" | "bottom-left";
|
|
54
60
|
/** Enable voice call (default: true). When false, widget is chat-only. */
|
|
55
61
|
enableVoice?: boolean;
|
|
56
|
-
/** Participant identity sent to LiveKit */
|
|
57
|
-
userIdentity?: string;
|
|
58
|
-
/** Participant display name sent to LiveKit */
|
|
59
|
-
userName?: string;
|
|
60
62
|
/** Extra options passed to fetch (e.g. { credentials: "include" }) */
|
|
61
63
|
fetchOptions?: RequestInit;
|
|
64
|
+
/** Render widget in dark mode (default: false) */
|
|
65
|
+
darkMode?: boolean;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
declare interface WidgetUser {
|
|
69
|
+
/** Display name (e.g. "Jane Smith") */
|
|
70
|
+
name?: string;
|
|
71
|
+
/** Email address */
|
|
72
|
+
email?: string;
|
|
73
|
+
/** Phone number */
|
|
74
|
+
phone?: string;
|
|
62
75
|
}
|
|
63
76
|
|
|
64
77
|
export { }
|