@convai/web-sdk 0.1.0 → 0.1.1-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/README.md +277 -185
  2. package/dist/components/ConvaiWidget.d.ts.map +1 -1
  3. package/dist/components/ConvaiWidget.js +13 -0
  4. package/dist/components/ConvaiWidget.js.map +1 -1
  5. package/dist/components/rtc-widget/components/AudioSettingsPanel.js +1 -1
  6. package/dist/components/rtc-widget/components/AudioSettingsPanel.js.map +1 -1
  7. package/dist/components/rtc-widget/styles/styledComponents.d.ts.map +1 -1
  8. package/dist/components/rtc-widget/styles/styledComponents.js +72 -51
  9. package/dist/components/rtc-widget/styles/styledComponents.js.map +1 -1
  10. package/dist/core/AudioManager.d.ts +75 -0
  11. package/dist/core/AudioManager.d.ts.map +1 -0
  12. package/dist/core/AudioManager.js +219 -0
  13. package/dist/core/AudioManager.js.map +1 -0
  14. package/dist/core/ConvaiClient.d.ts +122 -0
  15. package/dist/core/ConvaiClient.d.ts.map +1 -0
  16. package/dist/core/ConvaiClient.js +514 -0
  17. package/dist/core/ConvaiClient.js.map +1 -0
  18. package/dist/core/EventEmitter.d.ts +38 -0
  19. package/dist/core/EventEmitter.d.ts.map +1 -0
  20. package/dist/core/EventEmitter.js +68 -0
  21. package/dist/core/EventEmitter.js.map +1 -0
  22. package/dist/core/MessageHandler.d.ts +52 -0
  23. package/dist/core/MessageHandler.d.ts.map +1 -0
  24. package/dist/core/MessageHandler.js +281 -0
  25. package/dist/core/MessageHandler.js.map +1 -0
  26. package/dist/core/ScreenShareManager.d.ts +57 -0
  27. package/dist/core/ScreenShareManager.d.ts.map +1 -0
  28. package/dist/core/ScreenShareManager.js +206 -0
  29. package/dist/core/ScreenShareManager.js.map +1 -0
  30. package/dist/core/VideoManager.d.ts +69 -0
  31. package/dist/core/VideoManager.d.ts.map +1 -0
  32. package/dist/core/VideoManager.js +207 -0
  33. package/dist/core/VideoManager.js.map +1 -0
  34. package/dist/core/index.d.ts +9 -0
  35. package/dist/core/index.d.ts.map +1 -0
  36. package/dist/core/index.js +12 -0
  37. package/dist/core/index.js.map +1 -0
  38. package/dist/core/types.d.ts +311 -0
  39. package/dist/core/types.d.ts.map +1 -0
  40. package/dist/core/types.js +2 -0
  41. package/dist/core/types.js.map +1 -0
  42. package/dist/hooks/useAudioControls.d.ts.map +1 -1
  43. package/dist/hooks/useAudioControls.js +9 -1
  44. package/dist/hooks/useAudioControls.js.map +1 -1
  45. package/dist/hooks/useConvaiClient.d.ts.map +1 -1
  46. package/dist/hooks/useConvaiClient.js +32 -8
  47. package/dist/hooks/useConvaiClient.js.map +1 -1
  48. package/dist/hooks/useMessageHandler.d.ts.map +1 -1
  49. package/dist/hooks/useMessageHandler.js +39 -14
  50. package/dist/hooks/useMessageHandler.js.map +1 -1
  51. package/dist/index.d.ts +1 -5
  52. package/dist/index.d.ts.map +1 -1
  53. package/dist/index.js +3 -10
  54. package/dist/index.js.map +1 -1
  55. package/dist/react/components/ConvaiWidget.d.ts +59 -0
  56. package/dist/react/components/ConvaiWidget.d.ts.map +1 -0
  57. package/dist/react/components/ConvaiWidget.js +421 -0
  58. package/dist/react/components/ConvaiWidget.js.map +1 -0
  59. package/dist/react/components/index.d.ts +3 -0
  60. package/dist/react/components/index.d.ts.map +1 -0
  61. package/dist/react/components/index.js +5 -0
  62. package/dist/react/components/index.js.map +1 -0
  63. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts +10 -0
  64. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts.map +1 -0
  65. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js +316 -0
  66. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js.map +1 -0
  67. package/dist/react/components/rtc-widget/components/ConviMessage.d.ts +10 -0
  68. package/dist/react/components/rtc-widget/components/ConviMessage.d.ts.map +1 -0
  69. package/dist/react/components/rtc-widget/components/ConviMessage.js +14 -0
  70. package/dist/react/components/rtc-widget/components/ConviMessage.js.map +1 -0
  71. package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts +9 -0
  72. package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts.map +1 -0
  73. package/dist/react/components/rtc-widget/components/FloatingVideo.js +122 -0
  74. package/dist/react/components/rtc-widget/components/FloatingVideo.js.map +1 -0
  75. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +7 -0
  76. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +1 -0
  77. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +68 -0
  78. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +1 -0
  79. package/dist/react/components/rtc-widget/components/MessageBubble.d.ts +10 -0
  80. package/dist/react/components/rtc-widget/components/MessageBubble.d.ts.map +1 -0
  81. package/dist/react/components/rtc-widget/components/MessageBubble.js +23 -0
  82. package/dist/react/components/rtc-widget/components/MessageBubble.js.map +1 -0
  83. package/dist/react/components/rtc-widget/components/MessageList.d.ts +11 -0
  84. package/dist/react/components/rtc-widget/components/MessageList.d.ts.map +1 -0
  85. package/dist/react/components/rtc-widget/components/MessageList.js +89 -0
  86. package/dist/react/components/rtc-widget/components/MessageList.js.map +1 -0
  87. package/dist/react/components/rtc-widget/components/UserMessage.d.ts +9 -0
  88. package/dist/react/components/rtc-widget/components/UserMessage.d.ts.map +1 -0
  89. package/dist/react/components/rtc-widget/components/UserMessage.js +15 -0
  90. package/dist/react/components/rtc-widget/components/UserMessage.js.map +1 -0
  91. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts +6 -0
  92. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts.map +1 -0
  93. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js +15 -0
  94. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js.map +1 -0
  95. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts +25 -0
  96. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts.map +1 -0
  97. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js +172 -0
  98. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js.map +1 -0
  99. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +17 -0
  100. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts.map +1 -0
  101. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +66 -0
  102. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js.map +1 -0
  103. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +12 -0
  104. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts.map +1 -0
  105. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +68 -0
  106. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js.map +1 -0
  107. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts +8 -0
  108. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts.map +1 -0
  109. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +199 -0
  110. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js.map +1 -0
  111. package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts +6 -0
  112. package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts.map +1 -0
  113. package/dist/react/components/rtc-widget/components/conviComponents/index.js +6 -0
  114. package/dist/react/components/rtc-widget/components/conviComponents/index.js.map +1 -0
  115. package/dist/react/components/rtc-widget/components/index.d.ts +8 -0
  116. package/dist/react/components/rtc-widget/components/index.d.ts.map +1 -0
  117. package/dist/react/components/rtc-widget/components/index.js +13 -0
  118. package/dist/react/components/rtc-widget/components/index.js.map +1 -0
  119. package/dist/react/components/rtc-widget/index.d.ts +6 -0
  120. package/dist/react/components/rtc-widget/index.d.ts.map +1 -0
  121. package/dist/react/components/rtc-widget/index.js +9 -0
  122. package/dist/react/components/rtc-widget/index.js.map +1 -0
  123. package/dist/react/components/rtc-widget/styles/framerConfig.d.ts +116 -0
  124. package/dist/react/components/rtc-widget/styles/framerConfig.d.ts.map +1 -0
  125. package/dist/react/components/rtc-widget/styles/framerConfig.js +73 -0
  126. package/dist/react/components/rtc-widget/styles/framerConfig.js.map +1 -0
  127. package/dist/react/components/rtc-widget/styles/icons.d.ts +28 -0
  128. package/dist/react/components/rtc-widget/styles/icons.d.ts.map +1 -0
  129. package/dist/react/components/rtc-widget/styles/icons.js +257 -0
  130. package/dist/react/components/rtc-widget/styles/icons.js.map +1 -0
  131. package/dist/react/components/rtc-widget/styles/index.d.ts +6 -0
  132. package/dist/react/components/rtc-widget/styles/index.d.ts.map +1 -0
  133. package/dist/react/components/rtc-widget/styles/index.js +9 -0
  134. package/dist/react/components/rtc-widget/styles/index.js.map +1 -0
  135. package/dist/react/components/rtc-widget/styles/styledComponents.d.ts +90 -0
  136. package/dist/react/components/rtc-widget/styles/styledComponents.d.ts.map +1 -0
  137. package/dist/react/components/rtc-widget/styles/styledComponents.js +661 -0
  138. package/dist/react/components/rtc-widget/styles/styledComponents.js.map +1 -0
  139. package/dist/react/components/rtc-widget/styles/theme.d.ts +188 -0
  140. package/dist/react/components/rtc-widget/styles/theme.d.ts.map +1 -0
  141. package/dist/react/components/rtc-widget/styles/theme.js +290 -0
  142. package/dist/react/components/rtc-widget/styles/theme.js.map +1 -0
  143. package/dist/react/components/rtc-widget/types/index.d.ts +60 -0
  144. package/dist/react/components/rtc-widget/types/index.d.ts.map +1 -0
  145. package/dist/react/components/rtc-widget/types/index.js +2 -0
  146. package/dist/react/components/rtc-widget/types/index.js.map +1 -0
  147. package/dist/react/hooks/index.d.ts +4 -0
  148. package/dist/react/hooks/index.d.ts.map +1 -0
  149. package/dist/react/hooks/index.js +6 -0
  150. package/dist/react/hooks/index.js.map +1 -0
  151. package/dist/react/hooks/useCharacterInfo.d.ts +17 -0
  152. package/dist/react/hooks/useCharacterInfo.d.ts.map +1 -0
  153. package/dist/react/hooks/useCharacterInfo.js +60 -0
  154. package/dist/react/hooks/useCharacterInfo.js.map +1 -0
  155. package/dist/react/hooks/useConvaiClient.d.ts +32 -0
  156. package/dist/react/hooks/useConvaiClient.d.ts.map +1 -0
  157. package/dist/react/hooks/useConvaiClient.js +140 -0
  158. package/dist/react/hooks/useConvaiClient.js.map +1 -0
  159. package/dist/react/hooks/useLocalCameraTrack.d.ts +22 -0
  160. package/dist/react/hooks/useLocalCameraTrack.d.ts.map +1 -0
  161. package/dist/react/hooks/useLocalCameraTrack.js +34 -0
  162. package/dist/react/hooks/useLocalCameraTrack.js.map +1 -0
  163. package/dist/react/index.d.ts +8 -0
  164. package/dist/react/index.d.ts.map +1 -0
  165. package/dist/react/index.js +15 -0
  166. package/dist/react/index.js.map +1 -0
  167. package/dist/types/index.d.ts +26 -0
  168. package/dist/types/index.d.ts.map +1 -1
  169. package/dist/utils/speakerManagement.d.ts +22 -0
  170. package/dist/utils/speakerManagement.d.ts.map +1 -0
  171. package/dist/utils/speakerManagement.js +69 -0
  172. package/dist/utils/speakerManagement.js.map +1 -0
  173. package/dist/vanilla/index.d.ts +3 -0
  174. package/dist/vanilla/index.d.ts.map +1 -0
  175. package/dist/vanilla/index.js +5 -0
  176. package/dist/vanilla/index.js.map +1 -0
  177. package/package.json +22 -5
@@ -0,0 +1,188 @@
1
+ export declare const aeroTheme: {
2
+ colors: {
3
+ primary: {
4
+ 50: string;
5
+ 100: string;
6
+ 200: string;
7
+ 300: string;
8
+ 400: string;
9
+ 500: string;
10
+ 600: string;
11
+ 700: string;
12
+ 800: string;
13
+ 900: string;
14
+ };
15
+ convai: {
16
+ light: string;
17
+ medium: string;
18
+ dark: string;
19
+ };
20
+ neutral: {
21
+ 50: string;
22
+ 100: string;
23
+ 200: string;
24
+ 300: string;
25
+ 400: string;
26
+ 500: string;
27
+ 600: string;
28
+ 700: string;
29
+ 800: string;
30
+ 900: string;
31
+ };
32
+ glass: {
33
+ light: string;
34
+ medium: string;
35
+ dark: string;
36
+ backdrop: string;
37
+ card: string;
38
+ backdropLight: string;
39
+ borderLight: string;
40
+ };
41
+ accent: {
42
+ purple: string;
43
+ green: string;
44
+ blue: string;
45
+ orange: string;
46
+ red: string;
47
+ };
48
+ error: {
49
+ 50: string;
50
+ 100: string;
51
+ 200: string;
52
+ 300: string;
53
+ 400: string;
54
+ 500: string;
55
+ 600: string;
56
+ 700: string;
57
+ 800: string;
58
+ 900: string;
59
+ };
60
+ text: {
61
+ primary: string;
62
+ secondary: string;
63
+ tertiary: string;
64
+ inverse: string;
65
+ };
66
+ };
67
+ typography: {
68
+ fontFamily: {
69
+ primary: string;
70
+ title: string;
71
+ header: string;
72
+ body: string;
73
+ mono: string;
74
+ };
75
+ fontSize: {
76
+ xs: string;
77
+ sm: string;
78
+ base: string;
79
+ lg: string;
80
+ xl: string;
81
+ "2xl": string;
82
+ "3xl": string;
83
+ "4xl": string;
84
+ };
85
+ sizes: {
86
+ xs: string;
87
+ sm: string;
88
+ body: string;
89
+ lg: string;
90
+ xl: string;
91
+ "2xl": string;
92
+ "3xl": string;
93
+ "4xl": string;
94
+ caption: string;
95
+ };
96
+ fontWeight: {
97
+ normal: number;
98
+ medium: number;
99
+ semibold: number;
100
+ bold: number;
101
+ };
102
+ lineHeight: {
103
+ tight: number;
104
+ normal: number;
105
+ relaxed: number;
106
+ };
107
+ };
108
+ spacing: {
109
+ xs: string;
110
+ sm: string;
111
+ md: string;
112
+ lg: string;
113
+ xl: string;
114
+ "2xl": string;
115
+ "3xl": string;
116
+ };
117
+ borderRadius: {
118
+ none: string;
119
+ sm: string;
120
+ md: string;
121
+ lg: string;
122
+ xl: string;
123
+ "2xl": string;
124
+ full: string;
125
+ };
126
+ shadows: {
127
+ sm: string;
128
+ md: string;
129
+ lg: string;
130
+ xl: string;
131
+ glass: string;
132
+ };
133
+ glass: {
134
+ backdrop: string;
135
+ backdropLight: string;
136
+ backdropHeavy: string;
137
+ border: string;
138
+ borderLight: string;
139
+ };
140
+ transitions: {
141
+ fast: string;
142
+ normal: string;
143
+ slow: string;
144
+ spring: string;
145
+ snappy: string;
146
+ };
147
+ zIndex: {
148
+ base: number;
149
+ dropdown: number;
150
+ sticky: number;
151
+ fixed: number;
152
+ modal: number;
153
+ popover: number;
154
+ tooltip: number;
155
+ };
156
+ };
157
+ export declare const glassStyles: {
158
+ container: string;
159
+ overlay: string;
160
+ card: string;
161
+ input: string;
162
+ button: string;
163
+ };
164
+ export declare const iconSizes: {
165
+ xs: string;
166
+ sm: string;
167
+ md: string;
168
+ lg: string;
169
+ xl: string;
170
+ "2xl": string;
171
+ };
172
+ export declare const variants: {
173
+ button: {
174
+ primary: string;
175
+ secondary: string;
176
+ ghost: string;
177
+ };
178
+ input: {
179
+ default: string;
180
+ search: string;
181
+ };
182
+ card: {
183
+ default: string;
184
+ elevated: string;
185
+ interactive: string;
186
+ };
187
+ };
188
+ //# sourceMappingURL=theme.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/styles/theme.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CA4LrB,CAAC;AAGF,eAAO,MAAM,WAAW;;;;;;CA4DvB,CAAC;AAGF,eAAO,MAAM,SAAS;;;;;;;CAOrB,CAAC;AAGF,eAAO,MAAM,QAAQ;;;;;;;;;;;;;;;CAmDpB,CAAC"}
@@ -0,0 +1,290 @@
1
+ // Aero AI Module Theme - Translucent Glass Design System
2
+ export const aeroTheme = {
3
+ // Color Palette
4
+ colors: {
5
+ // Primary colors
6
+ primary: {
7
+ 50: "#f0f9ff",
8
+ 100: "#e0f2fe",
9
+ 200: "#bae6fd",
10
+ 300: "#7dd3fc",
11
+ 400: "#38bdf8",
12
+ 500: "#0ea5e9",
13
+ 600: "#0284c7",
14
+ 700: "#0369a1",
15
+ 800: "#075985",
16
+ 900: "#0c4a6e",
17
+ },
18
+ convai: {
19
+ light: "#1EB453",
20
+ medium: "#0b6049",
21
+ dark: "#084c3a",
22
+ },
23
+ // Neutral colors for glass effects
24
+ neutral: {
25
+ 50: "#fafafa",
26
+ 100: "#f5f5f5",
27
+ 200: "#e5e5e5",
28
+ 300: "#d4d4d4",
29
+ 400: "#a3a3a3",
30
+ 500: "#737373",
31
+ 600: "#525252",
32
+ 700: "#404040",
33
+ 800: "#262626",
34
+ 900: "#171717",
35
+ },
36
+ // Glass overlay colors
37
+ glass: {
38
+ light: "rgba(255, 255, 255, 0.1)",
39
+ medium: "rgba(255, 255, 255, 0.15)",
40
+ dark: "rgba(0, 0, 0, 0.1)",
41
+ backdrop: "rgba(255, 255, 255, 0.8)",
42
+ card: "rgba(255, 255, 255, 0.9)",
43
+ backdropLight: "blur(20px)",
44
+ borderLight: "1px solid rgba(255, 255, 255, 0.2)",
45
+ },
46
+ // Accent colors
47
+ accent: {
48
+ purple: "#8b5cf6",
49
+ green: "#10b981",
50
+ blue: "#3b82f6",
51
+ orange: "#f59e0b",
52
+ red: "#ef4444",
53
+ },
54
+ // Error colors
55
+ error: {
56
+ 50: "#fef2f2",
57
+ 100: "#fee2e2",
58
+ 200: "#fecaca",
59
+ 300: "#fca5a5",
60
+ 400: "#f87171",
61
+ 500: "#ef4444",
62
+ 600: "#dc2626",
63
+ 700: "#b91c1c",
64
+ 800: "#991b1b",
65
+ 900: "#7f1d1d",
66
+ },
67
+ // Text colors
68
+ text: {
69
+ primary: "#1f2937",
70
+ secondary: "#6b7280",
71
+ tertiary: "#9ca3af",
72
+ inverse: "#ffffff",
73
+ },
74
+ },
75
+ // Typography
76
+ typography: {
77
+ fontFamily: {
78
+ primary: '"Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
79
+ title: '"Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
80
+ header: '"Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
81
+ body: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
82
+ mono: 'SF Mono, Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace',
83
+ },
84
+ fontSize: {
85
+ xs: "0.75rem",
86
+ sm: "0.875rem",
87
+ base: "1rem",
88
+ lg: "1.125rem",
89
+ xl: "1.25rem",
90
+ "2xl": "1.5rem",
91
+ "3xl": "1.875rem",
92
+ "4xl": "2.25rem",
93
+ },
94
+ sizes: {
95
+ xs: "0.75rem",
96
+ sm: "0.875rem",
97
+ body: "1rem",
98
+ lg: "1.125rem",
99
+ xl: "1.25rem",
100
+ "2xl": "1.5rem",
101
+ "3xl": "1.875rem",
102
+ "4xl": "2.25rem",
103
+ caption: "0.75rem",
104
+ },
105
+ fontWeight: {
106
+ normal: 400,
107
+ medium: 500,
108
+ semibold: 600,
109
+ bold: 700,
110
+ },
111
+ lineHeight: {
112
+ tight: 1.25,
113
+ normal: 1.5,
114
+ relaxed: 1.75,
115
+ },
116
+ },
117
+ // Spacing
118
+ spacing: {
119
+ xs: "0.25rem",
120
+ sm: "0.5rem",
121
+ md: "1rem",
122
+ lg: "1.5rem",
123
+ xl: "2rem",
124
+ "2xl": "3rem",
125
+ "3xl": "4rem",
126
+ },
127
+ // Border Radius
128
+ borderRadius: {
129
+ none: "0",
130
+ sm: "0.25rem",
131
+ md: "0.5rem",
132
+ lg: "0.75rem",
133
+ xl: "1rem",
134
+ "2xl": "1.5rem",
135
+ full: "9999px",
136
+ },
137
+ // Shadows
138
+ shadows: {
139
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
140
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
141
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
142
+ xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
143
+ glass: "0 8px 32px rgba(0, 0, 0, 0.1)",
144
+ },
145
+ // Glass Effects
146
+ glass: {
147
+ backdrop: "blur(20px)",
148
+ backdropLight: "blur(10px)",
149
+ backdropHeavy: "blur(40px)",
150
+ border: "1px solid rgba(255, 255, 255, 0.2)",
151
+ borderLight: "1px solid rgba(255, 255, 255, 0.1)",
152
+ },
153
+ // Transitions
154
+ transitions: {
155
+ fast: "0.15s ease-in-out",
156
+ normal: "0.2s ease-in-out",
157
+ slow: "0.3s ease-in-out",
158
+ spring: "0.4s cubic-bezier(0.4, 0, 0.2, 1)",
159
+ snappy: "all 0.1s ease-out",
160
+ },
161
+ // Z-index scale
162
+ zIndex: {
163
+ base: 1,
164
+ dropdown: 1000,
165
+ sticky: 1020,
166
+ fixed: 1030,
167
+ modal: 1040,
168
+ popover: 1050,
169
+ tooltip: 1060,
170
+ },
171
+ };
172
+ // Common glass component styles
173
+ export const glassStyles = {
174
+ // Primary glass container
175
+ container: `
176
+ background: ${aeroTheme.colors.glass.backdrop};
177
+ backdrop-filter: ${aeroTheme.glass.backdrop};
178
+ border: ${aeroTheme.glass.border};
179
+ border-radius: ${aeroTheme.borderRadius.xl};
180
+ box-shadow: ${aeroTheme.shadows.glass};
181
+ `,
182
+ // Light glass overlay
183
+ overlay: `
184
+ background: ${aeroTheme.colors.glass.light};
185
+ backdrop-filter: ${aeroTheme.glass.backdropLight};
186
+ border: ${aeroTheme.glass.borderLight};
187
+ border-radius: ${aeroTheme.borderRadius.lg};
188
+ `,
189
+ // Card glass effect
190
+ card: `
191
+ background: ${aeroTheme.colors.glass.card};
192
+ backdrop-filter: ${aeroTheme.glass.backdrop};
193
+ border: ${aeroTheme.glass.borderLight};
194
+ border-radius: ${aeroTheme.borderRadius.lg};
195
+ box-shadow: ${aeroTheme.shadows.md};
196
+ `,
197
+ // Input glass effect
198
+ input: `
199
+ background: ${aeroTheme.colors.glass.medium};
200
+ backdrop-filter: ${aeroTheme.glass.backdropLight};
201
+ border: ${aeroTheme.glass.borderLight};
202
+ border-radius: ${aeroTheme.borderRadius.full};
203
+ transition: ${aeroTheme.transitions.normal};
204
+
205
+ &:focus {
206
+ background: ${aeroTheme.colors.glass.card};
207
+ border-color: ${aeroTheme.colors.primary[400]};
208
+ box-shadow: 0 0 0 3px ${aeroTheme.colors.primary[100]};
209
+ }
210
+ `,
211
+ // Button glass effect
212
+ button: `
213
+ background: ${aeroTheme.colors.glass.medium};
214
+ backdrop-filter: ${aeroTheme.glass.backdropLight};
215
+ border: ${aeroTheme.glass.borderLight};
216
+ border-radius: ${aeroTheme.borderRadius.lg};
217
+ transition: ${aeroTheme.transitions.normal};
218
+
219
+ &:hover {
220
+ background: ${aeroTheme.colors.glass.card};
221
+ transform: translateY(-1px);
222
+ box-shadow: ${aeroTheme.shadows.lg};
223
+ }
224
+
225
+ &:active {
226
+ transform: translateY(0);
227
+ }
228
+ `,
229
+ };
230
+ // Icon sizes for consistency
231
+ export const iconSizes = {
232
+ xs: "12px",
233
+ sm: "16px",
234
+ md: "20px",
235
+ lg: "24px",
236
+ xl: "32px",
237
+ "2xl": "40px",
238
+ };
239
+ // Common component variants
240
+ export const variants = {
241
+ // Button variants
242
+ button: {
243
+ primary: `
244
+ background: linear-gradient(135deg, ${aeroTheme.colors.primary[500]}, ${aeroTheme.colors.primary[600]});
245
+ color: ${aeroTheme.colors.text.inverse};
246
+ box-shadow: 0 4px 12px ${aeroTheme.colors.primary[200]};
247
+ `,
248
+ secondary: `
249
+ background: ${aeroTheme.colors.glass.medium};
250
+ color: ${aeroTheme.colors.text.primary};
251
+ border: ${aeroTheme.glass.borderLight};
252
+ `,
253
+ ghost: `
254
+ background: transparent;
255
+ color: ${aeroTheme.colors.text.secondary};
256
+
257
+ &:hover {
258
+ background: ${aeroTheme.colors.glass.light};
259
+ color: ${aeroTheme.colors.text.primary};
260
+ }
261
+ `,
262
+ },
263
+ // Input variants
264
+ input: {
265
+ default: glassStyles.input,
266
+ search: `
267
+ ${glassStyles.input}
268
+ padding-left: 2.5rem;
269
+ `,
270
+ },
271
+ // Card variants
272
+ card: {
273
+ default: glassStyles.card,
274
+ elevated: `
275
+ ${glassStyles.card}
276
+ box-shadow: ${aeroTheme.shadows.xl};
277
+ `,
278
+ interactive: `
279
+ ${glassStyles.card}
280
+ cursor: pointer;
281
+ transition: ${aeroTheme.transitions.normal};
282
+
283
+ &:hover {
284
+ transform: translateY(-2px);
285
+ box-shadow: ${aeroTheme.shadows.xl};
286
+ }
287
+ `,
288
+ },
289
+ };
290
+ //# sourceMappingURL=theme.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"theme.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/styles/theme.ts"],"names":[],"mappings":"AAAA,yDAAyD;AACzD,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,gBAAgB;IAChB,MAAM,EAAE;QACN,iBAAiB;QACjB,OAAO,EAAE;YACP,EAAE,EAAE,SAAS;YACb,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;SACf;QACD,MAAM,EAAE;YACN,KAAK,EAAE,SAAS;YAChB,MAAM,EAAE,SAAS;YACjB,IAAI,EAAE,SAAS;SAChB;QAED,mCAAmC;QACnC,OAAO,EAAE;YACP,EAAE,EAAE,SAAS;YACb,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;YACd,GAAG,EAAE,SAAS;Y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,WAAW;KACtC;QACD,KAAK,EAAE;;eAEI,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;;;sBAGxB,SAAS,CAAC,MAAM,CAAC,KAAK,CAAC,KAAK;iBACjC,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,OAAO;;KAEzC;KACF;IAED,iBAAiB;IACjB,KAAK,EAAE;QACL,OAAO,EAAE,WAAW,CAAC,KAAK;QAC1B,MAAM,EAAE;QACJ,WAAW,CAAC,KAAK;;KAEpB;KACF;IAED,gBAAgB;IAChB,IAAI,EAAE;QACJ,OAAO,EAAE,WAAW,CAAC,IAAI;QACzB,QAAQ,EAAE;QACN,WAAW,CAAC,IAAI;oBACJ,SAAS,CAAC,OAAO,CAAC,EAAE;KACnC;QACD,WAAW,EAAE;QACT,WAAW,CAAC,IAAI;;oBAEJ,SAAS,CAAC,WAAW,CAAC,MAAM;;;;sBAI1B,SAAS,CAAC,OAAO,CAAC,EAAE;;KAErC;KACF;CACF,CAAC"}
@@ -0,0 +1,60 @@
1
+ export interface RTCChatMessage {
2
+ id: string;
3
+ text: string;
4
+ isUser: boolean;
5
+ timestamp: string;
6
+ sender: string;
7
+ showLogo?: boolean;
8
+ }
9
+ export interface CharacterVerbosityConfig {
10
+ characterId: string;
11
+ label?: string;
12
+ }
13
+ export interface ConviUIProps {
14
+ isOpen: boolean;
15
+ backgroundOpacity?: number;
16
+ alwaysExpanded?: boolean;
17
+ characterName?: string;
18
+ characterImage?: string;
19
+ verbosityLevels?: Array<{
20
+ index: number;
21
+ characterId: string;
22
+ label?: string;
23
+ }>;
24
+ currentVerbosityIndex?: number;
25
+ onVerbosityChange?: (index: number, characterId: string) => void;
26
+ verbosityChanged?: boolean;
27
+ messages: RTCChatMessage[];
28
+ isStreaming?: boolean;
29
+ inputMode?: "conversation" | "speaker" | "voice" | "verbosity";
30
+ inputValue: string;
31
+ liveUserText?: string;
32
+ localIsTyping: boolean;
33
+ convaiIsTyping: boolean;
34
+ chatbotMic: boolean;
35
+ isPressingMic: boolean;
36
+ isTalking: boolean;
37
+ isMuted: boolean;
38
+ isVoiceMode: boolean;
39
+ isSettingsOpen: boolean;
40
+ isSpeakerEditMode: boolean;
41
+ isVerbosityMode: boolean;
42
+ isCreatingSpeaker?: boolean;
43
+ onToggle: () => void;
44
+ onClose: () => void;
45
+ onInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
46
+ onKeyPress: (e: React.KeyboardEvent) => void;
47
+ onSend: () => void;
48
+ onMicPress: () => void;
49
+ onMicRelease: () => void;
50
+ setIsPressingMic: (value: boolean) => void;
51
+ onToggleMute: () => void;
52
+ onToggleVoiceMode: () => void;
53
+ onSettingsToggle: () => void;
54
+ onReset: () => void;
55
+ onToggleVerbosityMode: () => void;
56
+ onContinue?: () => void;
57
+ settingsButtonRef?: React.RefObject<HTMLButtonElement>;
58
+ convaiClient?: any;
59
+ }
60
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/types/index.ts"],"names":[],"mappings":"AACA,MAAM,WAAW,cAAc;IAC7B,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,OAAO,CAAC;IAChB,SAAS,EAAE,MAAM,CAAC;IAClB,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAGD,MAAM,WAAW,wBAAwB;IACvC,WAAW,EAAE,MAAM,CAAC;IACpB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAID,MAAM,WAAW,YAAY;IAE3B,MAAM,EAAE,OAAO,CAAC;IAChB,iBAAiB,CAAC,EAAE,MAAM,CAAC;IAC3B,cAAc,CAAC,EAAE,OAAO,CAAC;IAGzB,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,cAAc,CAAC,EAAE,MAAM,CAAC;IAGxB,eAAe,CAAC,EAAE,KAAK,CAAC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AE,OAAO,KAAK,IAAI,CAAC;IAC3C,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,gBAAgB,EAAE,MAAM,IAAI,CAAC;IAC7B,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,qBAAqB,EAAE,MAAM,IAAI,CAAC;IAClC,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;IAGxB,iBAAiB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,iBAAiB,CAAC,CAAC;IACvD,YAAY,CAAC,EAAE,GAAG,CAAC;CACpB"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/types/index.ts"],"names":[],"mappings":""}
@@ -0,0 +1,4 @@
1
+ export { useConvaiClient } from './useConvaiClient';
2
+ export { useCharacterInfo } from './useCharacterInfo';
3
+ export { useLocalCameraTrack } from './useLocalCameraTrack';
4
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAGpD,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,6 @@
1
+ // Main hook
2
+ export { useConvaiClient } from './useConvaiClient';
3
+ // Additional hooks
4
+ export { useCharacterInfo } from './useCharacterInfo';
5
+ export { useLocalCameraTrack } from './useLocalCameraTrack';
6
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../../src/react/hooks/index.ts"],"names":[],"mappings":"AAAA,YAAY;AACZ,OAAO,EAAE,eAAe,EAAE,MAAM,mBAAmB,CAAC;AAEpD,mBAAmB;AACnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC"}
@@ -0,0 +1,17 @@
1
+ interface CharacterInfo {
2
+ name: string;
3
+ image: string | null;
4
+ }
5
+ /**
6
+ * Hook to fetch character information from Convai API
7
+ *
8
+ * @param characterId - The character ID to fetch information for (optional)
9
+ * @param apiKey - The Convai API key (optional)
10
+ * @returns Character information including name and image URL
11
+ */
12
+ export declare const useCharacterInfo: (characterId?: string, apiKey?: string) => CharacterInfo & {
13
+ isLoading: boolean;
14
+ error: Error | null;
15
+ };
16
+ export {};
17
+ //# sourceMappingURL=useCharacterInfo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCharacterInfo.d.ts","sourceRoot":"","sources":["../../../src/react/hooks/useCharacterInfo.ts"],"names":[],"mappings":"AAGA,UAAU,aAAa;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;CACtB;AAED;;;;;;GAMG;AACH,eAAO,MAAM,gBAAgB,GAC3B,cAAc,MAAM,EACpB,SAAS,MAAM,KACd,aAAa,GAAG;IAAE,SAAS,EAAE,OAAO,CAAC;IAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CAAA;CAyD3D,CAAC"}
@@ -0,0 +1,60 @@
1
+ import { useState, useEffect } from "react";
2
+ import { logger } from "../../utils/logger";
3
+ /**
4
+ * Hook to fetch character information from Convai API
5
+ *
6
+ * @param characterId - The character ID to fetch information for (optional)
7
+ * @param apiKey - The Convai API key (optional)
8
+ * @returns Character information including name and image URL
9
+ */
10
+ export const useCharacterInfo = (characterId, apiKey) => {
11
+ const [characterInfo, setCharacterInfo] = useState({
12
+ name: "Convi",
13
+ image: null,
14
+ });
15
+ const [isLoading, setIsLoading] = useState(true);
16
+ const [error, setError] = useState(null);
17
+ useEffect(() => {
18
+ const fetchCharacterInfo = async () => {
19
+ if (!characterId || !apiKey) {
20
+ setIsLoading(false);
21
+ return;
22
+ }
23
+ try {
24
+ setIsLoading(true);
25
+ setError(null);
26
+ const response = await fetch("https://api.convai.com/character/get", {
27
+ method: "POST",
28
+ headers: {
29
+ "Content-Type": "application/json",
30
+ "CONVAI-API-KEY": apiKey,
31
+ },
32
+ body: JSON.stringify({ charID: characterId }),
33
+ });
34
+ if (!response.ok) {
35
+ throw new Error(`Failed to fetch character info: ${response.status}`);
36
+ }
37
+ const data = await response.json();
38
+ // Extract character name and image with fallbacks
39
+ const name = data.character_name || "Convi";
40
+ const image = data.model_details?.METAHUMAN?.avatar_image_square ||
41
+ data.model_details?.METAHUMAN?.avatar_image ||
42
+ data.model_details?.modelPlaceholder ||
43
+ null;
44
+ setCharacterInfo({ name, image });
45
+ }
46
+ catch (err) {
47
+ const error = err instanceof Error ? err : new Error("Unknown error");
48
+ logger.error("Failed to fetch character info:", error);
49
+ setError(error);
50
+ // Keep default values on error
51
+ }
52
+ finally {
53
+ setIsLoading(false);
54
+ }
55
+ };
56
+ fetchCharacterInfo();
57
+ }, [characterId, apiKey]);
58
+ return { ...characterInfo, isLoading, error };
59
+ };
60
+ //# sourceMappingURL=useCharacterInfo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useCharacterInfo.js","sourceRoot":"","sources":["../../../src/react/hooks/useCharacterInfo.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAC5C,OAAO,EAAE,MAAM,EAAE,MAAM,oBAAoB,CAAC;AAO5C;;;;;;GAMG;AACH,MAAM,CAAC,MAAM,gBAAgB,GAAG,CAC9B,WAAoB,EACpB,MAAe,EAC8C,EAAE;IAC/D,MAAM,CAAC,aAAa,EAAE,gBAAgB,CAAC,GAAG,QAAQ,CAAgB;QAChE,IAAI,EAAE,OAAO;QACb,KAAK,EAAE,IAAI;KACZ,CAAC,CAAC;IACH,MA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