@convai/web-sdk 0.3.1-beta.3 → 0.3.2-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (255) hide show
  1. package/README.md +535 -1077
  2. package/dist/core/AudioManager.d.ts.map +1 -0
  3. package/dist/core/AudioManager.js +262 -0
  4. package/dist/core/AudioManager.js.map +1 -0
  5. package/dist/core/BlendshapeQueue.d.ts +128 -0
  6. package/dist/core/BlendshapeQueue.d.ts.map +1 -0
  7. package/dist/core/BlendshapeQueue.js +229 -0
  8. package/dist/core/BlendshapeQueue.js.map +1 -0
  9. package/dist/{types/core → core}/ConvaiClient.d.ts +19 -15
  10. package/dist/core/ConvaiClient.d.ts.map +1 -0
  11. package/dist/core/ConvaiClient.js +623 -0
  12. package/dist/core/ConvaiClient.js.map +1 -0
  13. package/dist/core/EventEmitter.d.ts.map +1 -0
  14. package/dist/core/EventEmitter.js +68 -0
  15. package/dist/core/EventEmitter.js.map +1 -0
  16. package/dist/{types/core → core}/MessageHandler.d.ts +7 -0
  17. package/dist/core/MessageHandler.d.ts.map +1 -0
  18. package/dist/core/MessageHandler.js +333 -0
  19. package/dist/core/MessageHandler.js.map +1 -0
  20. package/dist/core/ScreenShareManager.d.ts.map +1 -0
  21. package/dist/core/ScreenShareManager.js +207 -0
  22. package/dist/core/ScreenShareManager.js.map +1 -0
  23. package/dist/core/VideoManager.d.ts.map +1 -0
  24. package/dist/core/VideoManager.js +205 -0
  25. package/dist/core/VideoManager.js.map +1 -0
  26. package/dist/{types/core → core}/index.d.ts +2 -0
  27. package/dist/core/index.d.ts.map +1 -0
  28. package/dist/core/index.js +14 -1970
  29. package/dist/core/index.js.map +1 -0
  30. package/dist/{types/core → core}/types.d.ts +12 -21
  31. package/dist/core/types.d.ts.map +1 -0
  32. package/dist/core/types.js +2 -0
  33. package/dist/core/types.js.map +1 -0
  34. package/dist/dev.d.ts +12 -0
  35. package/dist/dev.d.ts.map +1 -0
  36. package/dist/dev.js +12 -0
  37. package/dist/dev.js.map +1 -0
  38. package/dist/index.d.ts +4 -0
  39. package/dist/index.d.ts.map +1 -0
  40. package/dist/index.js +6 -0
  41. package/dist/index.js.map +1 -0
  42. package/dist/lipsync-helpers/arkitBlendshapeHelpers.d.ts.map +1 -0
  43. package/dist/lipsync-helpers/arkitBlendshapeHelpers.js +201 -0
  44. package/dist/lipsync-helpers/arkitBlendshapeHelpers.js.map +1 -0
  45. package/dist/lipsync-helpers/arkitOrder61.d.ts.map +1 -0
  46. package/dist/lipsync-helpers/arkitOrder61.js +287 -0
  47. package/dist/lipsync-helpers/arkitOrder61.js.map +1 -0
  48. package/dist/lipsync-helpers/arkitPhonemeReference.d.ts.map +1 -0
  49. package/dist/lipsync-helpers/arkitPhonemeReference.js +362 -0
  50. package/dist/lipsync-helpers/arkitPhonemeReference.js.map +1 -0
  51. package/dist/{types/lipsync-helpers → lipsync-helpers}/index.d.ts +1 -0
  52. package/dist/lipsync-helpers/index.d.ts.map +1 -0
  53. package/dist/lipsync-helpers/index.js +20 -1165
  54. package/dist/lipsync-helpers/index.js.map +1 -0
  55. package/dist/lipsync-helpers/metahumanOrder251.d.ts +115 -0
  56. package/dist/lipsync-helpers/metahumanOrder251.d.ts.map +1 -0
  57. package/dist/lipsync-helpers/metahumanOrder251.js +432 -0
  58. package/dist/lipsync-helpers/metahumanOrder251.js.map +1 -0
  59. package/dist/lipsync-helpers/neurosyncBlendshapeMapper.d.ts.map +1 -0
  60. package/dist/lipsync-helpers/neurosyncBlendshapeMapper.js +315 -0
  61. package/dist/lipsync-helpers/neurosyncBlendshapeMapper.js.map +1 -0
  62. package/dist/react/components/ConvaiWidget.d.ts +68 -0
  63. package/dist/react/components/ConvaiWidget.d.ts.map +1 -0
  64. package/dist/react/components/ConvaiWidget.js +505 -0
  65. package/dist/react/components/ConvaiWidget.js.map +1 -0
  66. package/dist/react/components/index.d.ts +2 -0
  67. package/dist/react/components/index.d.ts.map +1 -0
  68. package/dist/react/components/index.js +3 -0
  69. package/dist/react/components/index.js.map +1 -0
  70. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts +10 -0
  71. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts.map +1 -0
  72. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js +316 -0
  73. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js.map +1 -0
  74. package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts +36 -0
  75. package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts.map +1 -0
  76. package/dist/react/components/rtc-widget/components/AudioVisualizer.js +259 -0
  77. package/dist/react/components/rtc-widget/components/AudioVisualizer.js.map +1 -0
  78. package/dist/react/components/rtc-widget/components/ConviMessage.d.ts +10 -0
  79. package/dist/react/components/rtc-widget/components/ConviMessage.d.ts.map +1 -0
  80. package/dist/react/components/rtc-widget/components/ConviMessage.js +14 -0
  81. package/dist/react/components/rtc-widget/components/ConviMessage.js.map +1 -0
  82. package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts +9 -0
  83. package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts.map +1 -0
  84. package/dist/react/components/rtc-widget/components/FloatingVideo.js +122 -0
  85. package/dist/react/components/rtc-widget/components/FloatingVideo.js.map +1 -0
  86. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +7 -0
  87. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +1 -0
  88. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +68 -0
  89. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +1 -0
  90. package/dist/react/components/rtc-widget/components/MessageBubble.d.ts +10 -0
  91. package/dist/react/components/rtc-widget/components/MessageBubble.d.ts.map +1 -0
  92. package/dist/react/components/rtc-widget/components/MessageBubble.js +23 -0
  93. package/dist/react/components/rtc-widget/components/MessageBubble.js.map +1 -0
  94. package/dist/react/components/rtc-widget/components/MessageList.d.ts +11 -0
  95. package/dist/react/components/rtc-widget/components/MessageList.d.ts.map +1 -0
  96. package/dist/react/components/rtc-widget/components/MessageList.js +89 -0
  97. package/dist/react/components/rtc-widget/components/MessageList.js.map +1 -0
  98. package/dist/react/components/rtc-widget/components/UserMessage.d.ts +9 -0
  99. package/dist/react/components/rtc-widget/components/UserMessage.d.ts.map +1 -0
  100. package/dist/react/components/rtc-widget/components/UserMessage.js +15 -0
  101. package/dist/react/components/rtc-widget/components/UserMessage.js.map +1 -0
  102. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts +6 -0
  103. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts.map +1 -0
  104. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js +15 -0
  105. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js.map +1 -0
  106. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts +25 -0
  107. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts.map +1 -0
  108. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js +172 -0
  109. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js.map +1 -0
  110. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +17 -0
  111. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts.map +1 -0
  112. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +66 -0
  113. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js.map +1 -0
  114. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +12 -0
  115. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts.map +1 -0
  116. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +68 -0
  117. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js.map +1 -0
  118. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts +12 -0
  119. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts.map +1 -0
  120. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +255 -0
  121. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js.map +1 -0
  122. package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts +6 -0
  123. package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts.map +1 -0
  124. package/dist/react/components/rtc-widget/components/conviComponents/index.js +6 -0
  125. package/dist/react/components/rtc-widget/components/conviComponents/index.js.map +1 -0
  126. package/dist/react/components/rtc-widget/components/index.d.ts +9 -0
  127. package/dist/react/components/rtc-widget/components/index.d.ts.map +1 -0
  128. package/dist/react/components/rtc-widget/components/index.js +15 -0
  129. package/dist/react/components/rtc-widget/components/index.js.map +1 -0
  130. package/dist/react/components/rtc-widget/index.d.ts +6 -0
  131. package/dist/react/components/rtc-widget/index.d.ts.map +1 -0
  132. package/dist/react/components/rtc-widget/index.js +9 -0
  133. package/dist/react/components/rtc-widget/index.js.map +1 -0
  134. package/dist/react/components/rtc-widget/styles/framerConfig.d.ts +116 -0
  135. package/dist/react/components/rtc-widget/styles/framerConfig.d.ts.map +1 -0
  136. package/dist/react/components/rtc-widget/styles/framerConfig.js +73 -0
  137. package/dist/react/components/rtc-widget/styles/framerConfig.js.map +1 -0
  138. package/dist/react/components/rtc-widget/styles/icons.d.ts +28 -0
  139. package/dist/react/components/rtc-widget/styles/icons.d.ts.map +1 -0
  140. package/dist/react/components/rtc-widget/styles/icons.js +257 -0
  141. package/dist/react/components/rtc-widget/styles/icons.js.map +1 -0
  142. package/dist/react/components/rtc-widget/styles/index.d.ts +6 -0
  143. package/dist/react/components/rtc-widget/styles/index.d.ts.map +1 -0
  144. package/dist/react/components/rtc-widget/styles/index.js +9 -0
  145. package/dist/react/components/rtc-widget/styles/index.js.map +1 -0
  146. package/dist/react/components/rtc-widget/styles/styledComponents.d.ts +90 -0
  147. package/dist/react/components/rtc-widget/styles/styledComponents.d.ts.map +1 -0
  148. package/dist/react/components/rtc-widget/styles/styledComponents.js +663 -0
  149. package/dist/react/components/rtc-widget/styles/styledComponents.js.map +1 -0
  150. package/dist/react/components/rtc-widget/styles/theme.d.ts +188 -0
  151. package/dist/react/components/rtc-widget/styles/theme.d.ts.map +1 -0
  152. package/dist/react/components/rtc-widget/styles/theme.js +290 -0
  153. package/dist/react/components/rtc-widget/styles/theme.js.map +1 -0
  154. package/dist/react/components/rtc-widget/types/index.d.ts +60 -0
  155. package/dist/react/components/rtc-widget/types/index.d.ts.map +1 -0
  156. package/dist/react/components/rtc-widget/types/index.js +2 -0
  157. package/dist/react/components/rtc-widget/types/index.js.map +1 -0
  158. package/dist/react/hooks/index.d.ts +4 -0
  159. package/dist/react/hooks/index.d.ts.map +1 -0
  160. package/dist/react/hooks/index.js +6 -0
  161. package/dist/react/hooks/index.js.map +1 -0
  162. package/dist/react/hooks/useCharacterInfo.d.ts +17 -0
  163. package/dist/react/hooks/useCharacterInfo.d.ts.map +1 -0
  164. package/dist/react/hooks/useCharacterInfo.js +60 -0
  165. package/dist/react/hooks/useCharacterInfo.js.map +1 -0
  166. package/dist/react/hooks/useConvaiClient.d.ts +35 -0
  167. package/dist/react/hooks/useConvaiClient.d.ts.map +1 -0
  168. package/dist/react/hooks/useConvaiClient.js +183 -0
  169. package/dist/react/hooks/useConvaiClient.js.map +1 -0
  170. package/dist/react/hooks/useLocalCameraTrack.d.ts +22 -0
  171. package/dist/react/hooks/useLocalCameraTrack.d.ts.map +1 -0
  172. package/dist/react/hooks/useLocalCameraTrack.js +34 -0
  173. package/dist/react/hooks/useLocalCameraTrack.js.map +1 -0
  174. package/dist/react/index.d.ts +7 -0
  175. package/dist/react/index.d.ts.map +1 -0
  176. package/dist/react/index.js +13 -0
  177. package/dist/react/index.js.map +1 -0
  178. package/dist/types/index.d.ts.map +1 -0
  179. package/dist/types/index.js +2 -0
  180. package/dist/types/index.js.map +1 -0
  181. package/dist/utils/LatencyMonitor.d.ts.map +1 -0
  182. package/dist/utils/LatencyMonitor.js +136 -0
  183. package/dist/utils/LatencyMonitor.js.map +1 -0
  184. package/dist/utils/logger.d.ts.map +1 -0
  185. package/dist/utils/logger.js +96 -0
  186. package/dist/utils/logger.js.map +1 -0
  187. package/dist/utils/speakerManagement.d.ts.map +1 -0
  188. package/dist/utils/speakerManagement.js +64 -0
  189. package/dist/utils/speakerManagement.js.map +1 -0
  190. package/dist/{types/vanilla → vanilla}/AudioRenderer.d.ts +5 -0
  191. package/dist/vanilla/AudioRenderer.d.ts.map +1 -0
  192. package/dist/vanilla/AudioRenderer.js +135 -0
  193. package/dist/vanilla/AudioRenderer.js.map +1 -0
  194. package/dist/vanilla/ConvaiWidget.d.ts.map +1 -0
  195. package/dist/vanilla/ConvaiWidget.js +1786 -0
  196. package/dist/vanilla/ConvaiWidget.js.map +1 -0
  197. package/dist/vanilla/icons.d.ts.map +1 -0
  198. package/dist/vanilla/icons.js +222 -0
  199. package/dist/vanilla/icons.js.map +1 -0
  200. package/dist/{types/vanilla → vanilla}/index.d.ts +1 -3
  201. package/dist/vanilla/index.d.ts.map +1 -0
  202. package/dist/vanilla/index.js +20 -5509
  203. package/dist/vanilla/index.js.map +1 -0
  204. package/dist/vanilla/styles.d.ts.map +1 -0
  205. package/dist/vanilla/styles.js +287 -0
  206. package/dist/vanilla/styles.js.map +1 -0
  207. package/dist/vanilla/types.d.ts +43 -0
  208. package/dist/vanilla/types.d.ts.map +1 -0
  209. package/dist/vanilla/types.js +2 -0
  210. package/dist/vanilla/types.js.map +1 -0
  211. package/package.json +33 -38
  212. package/CHANGELOG.md +0 -165
  213. package/dist/core/index.cjs +0 -1977
  214. package/dist/lipsync-helpers/index.cjs +0 -1195
  215. package/dist/types/core/AudioManager.d.ts.map +0 -1
  216. package/dist/types/core/ConvaiClient.d.ts.map +0 -1
  217. package/dist/types/core/EventEmitter.d.ts.map +0 -1
  218. package/dist/types/core/MessageHandler.d.ts.map +0 -1
  219. package/dist/types/core/ScreenShareManager.d.ts.map +0 -1
  220. package/dist/types/core/VideoManager.d.ts.map +0 -1
  221. package/dist/types/core/index.d.ts.map +0 -1
  222. package/dist/types/core/types.d.ts.map +0 -1
  223. package/dist/types/lipsync-helpers/arkitBlendshapeHelpers.d.ts.map +0 -1
  224. package/dist/types/lipsync-helpers/arkitOrder61.d.ts.map +0 -1
  225. package/dist/types/lipsync-helpers/arkitPhonemeReference.d.ts.map +0 -1
  226. package/dist/types/lipsync-helpers/index.d.ts.map +0 -1
  227. package/dist/types/lipsync-helpers/neurosyncBlendshapeMapper.d.ts.map +0 -1
  228. package/dist/types/types/index.d.ts.map +0 -1
  229. package/dist/types/utils/LatencyMonitor.d.ts.map +0 -1
  230. package/dist/types/utils/logger.d.ts.map +0 -1
  231. package/dist/types/utils/speakerManagement.d.ts.map +0 -1
  232. package/dist/types/vanilla/AudioRenderer.d.ts.map +0 -1
  233. package/dist/types/vanilla/ConvaiWidget.d.ts.map +0 -1
  234. package/dist/types/vanilla/icons.d.ts.map +0 -1
  235. package/dist/types/vanilla/index.d.ts.map +0 -1
  236. package/dist/types/vanilla/styles.d.ts.map +0 -1
  237. package/dist/types/vanilla/types.d.ts +0 -106
  238. package/dist/types/vanilla/types.d.ts.map +0 -1
  239. package/dist/umd/convai.umd.js +0 -1
  240. package/dist/vanilla/index.cjs +0 -5559
  241. /package/dist/{types/core → core}/AudioManager.d.ts +0 -0
  242. /package/dist/{types/core → core}/EventEmitter.d.ts +0 -0
  243. /package/dist/{types/core → core}/ScreenShareManager.d.ts +0 -0
  244. /package/dist/{types/core → core}/VideoManager.d.ts +0 -0
  245. /package/dist/{types/lipsync-helpers → lipsync-helpers}/arkitBlendshapeHelpers.d.ts +0 -0
  246. /package/dist/{types/lipsync-helpers → lipsync-helpers}/arkitOrder61.d.ts +0 -0
  247. /package/dist/{types/lipsync-helpers → lipsync-helpers}/arkitPhonemeReference.d.ts +0 -0
  248. /package/dist/{types/lipsync-helpers → lipsync-helpers}/neurosyncBlendshapeMapper.d.ts +0 -0
  249. /package/dist/types/{types/index.d.ts → index.d.ts} +0 -0
  250. /package/dist/{types/utils → utils}/LatencyMonitor.d.ts +0 -0
  251. /package/dist/{types/utils → utils}/logger.d.ts +0 -0
  252. /package/dist/{types/utils → utils}/speakerManagement.d.ts +0 -0
  253. /package/dist/{types/vanilla → vanilla}/ConvaiWidget.d.ts +0 -0
  254. /package/dist/{types/vanilla → vanilla}/icons.d.ts +0 -0
  255. /package/dist/{types/vanilla → vanilla}/styles.d.ts +0 -0
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/vanilla/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA6BG;AAEH,uCAAuC;AACvC,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AAEpD,gEAAgE;AAChE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAEhD,wCAAwC;AACxC,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,gBAAgB,CAAC"}
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.d.ts","sourceRoot":"","sources":["../../src/vanilla/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAGH,eAAO,MAAM,SAAS;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAyIrB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,eAAe,QAAO,MAmHlC,CAAC;AAMF,eAAO,MAAM,kBAAkB,QAAO,IASrC,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,YAAY,GAAI,QAAQ,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KAAG,MAO1D,CAAC"}
@@ -0,0 +1,287 @@
1
+ /**
2
+ * Vanilla Styles - Port of React theme system for vanilla implementations
3
+ */
4
+ // Theme configuration (matching React version)
5
+ export const aeroTheme = {
6
+ colors: {
7
+ primary: {
8
+ 50: "#f0f9ff",
9
+ 100: "#e0f2fe",
10
+ 200: "#bae6fd",
11
+ 300: "#7dd3fc",
12
+ 400: "#38bdf8",
13
+ 500: "#0ea5e9",
14
+ 600: "#0284c7",
15
+ 700: "#0369a1",
16
+ 800: "#075985",
17
+ 900: "#0c4a6e",
18
+ },
19
+ convai: {
20
+ light: "#1EB453",
21
+ medium: "#0b6049",
22
+ dark: "#084c3a",
23
+ },
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: {
37
+ light: "rgba(255, 255, 255, 0.1)",
38
+ medium: "rgba(255, 255, 255, 0.15)",
39
+ dark: "rgba(0, 0, 0, 0.1)",
40
+ backdrop: "rgba(255, 255, 255, 0.8)",
41
+ card: "rgba(255, 255, 255, 0.9)",
42
+ backdropLight: "blur(20px)",
43
+ borderLight: "1px solid rgba(255, 255, 255, 0.2)",
44
+ },
45
+ accent: {
46
+ purple: "#8b5cf6",
47
+ green: "#10b981",
48
+ blue: "#3b82f6",
49
+ orange: "#f59e0b",
50
+ red: "#ef4444",
51
+ },
52
+ error: {
53
+ 50: "#fef2f2",
54
+ 100: "#fee2e2",
55
+ 200: "#fecaca",
56
+ 300: "#fca5a5",
57
+ 400: "#f87171",
58
+ 500: "#ef4444",
59
+ 600: "#dc2626",
60
+ 700: "#b91c1c",
61
+ 800: "#991b1b",
62
+ 900: "#7f1d1d",
63
+ },
64
+ text: {
65
+ primary: "#1f2937",
66
+ secondary: "#6b7280",
67
+ tertiary: "#9ca3af",
68
+ inverse: "#ffffff",
69
+ },
70
+ },
71
+ typography: {
72
+ fontFamily: {
73
+ primary: '"Noto Sans", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
74
+ body: '-apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif',
75
+ mono: 'SF Mono, Monaco, "Cascadia Code", "Roboto Mono", Consolas, "Courier New", monospace',
76
+ },
77
+ fontSize: {
78
+ xs: "0.75rem",
79
+ sm: "0.875rem",
80
+ base: "1rem",
81
+ lg: "1.125rem",
82
+ xl: "1.25rem",
83
+ "2xl": "1.5rem",
84
+ "3xl": "1.875rem",
85
+ "4xl": "2.25rem",
86
+ },
87
+ fontWeight: {
88
+ normal: 400,
89
+ medium: 500,
90
+ semibold: 600,
91
+ bold: 700,
92
+ },
93
+ },
94
+ spacing: {
95
+ xs: "0.25rem",
96
+ sm: "0.5rem",
97
+ md: "1rem",
98
+ lg: "1.5rem",
99
+ xl: "2rem",
100
+ "2xl": "3rem",
101
+ "3xl": "4rem",
102
+ },
103
+ borderRadius: {
104
+ none: "0",
105
+ sm: "0.25rem",
106
+ md: "0.5rem",
107
+ lg: "0.75rem",
108
+ xl: "1rem",
109
+ "2xl": "1.5rem",
110
+ full: "9999px",
111
+ },
112
+ shadows: {
113
+ sm: "0 1px 2px 0 rgba(0, 0, 0, 0.05)",
114
+ md: "0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06)",
115
+ lg: "0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05)",
116
+ xl: "0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04)",
117
+ glass: "0 8px 32px rgba(0, 0, 0, 0.1)",
118
+ },
119
+ glass: {
120
+ backdrop: "blur(20px)",
121
+ backdropLight: "blur(10px)",
122
+ backdropHeavy: "blur(40px)",
123
+ border: "1px solid rgba(255, 255, 255, 0.2)",
124
+ borderLight: "1px solid rgba(255, 255, 255, 0.1)",
125
+ },
126
+ transitions: {
127
+ fast: "0.15s ease-in-out",
128
+ normal: "0.2s ease-in-out",
129
+ slow: "0.3s ease-in-out",
130
+ spring: "0.4s cubic-bezier(0.4, 0, 0.2, 1)",
131
+ snappy: "all 0.1s ease-out",
132
+ },
133
+ zIndex: {
134
+ base: 1,
135
+ dropdown: 1000,
136
+ sticky: 1020,
137
+ fixed: 1030,
138
+ modal: 1040,
139
+ popover: 1050,
140
+ tooltip: 1060,
141
+ },
142
+ };
143
+ /**
144
+ * Global CSS styles for the Convai widget
145
+ * This should be injected once into the document head
146
+ */
147
+ export const getGlobalStyles = () => `
148
+ @keyframes convai-pulse {
149
+ 0%, 100% {
150
+ opacity: 1;
151
+ }
152
+ 50% {
153
+ opacity: 0.5;
154
+ }
155
+ }
156
+
157
+ @keyframes convai-spin {
158
+ from {
159
+ transform: rotate(0deg);
160
+ }
161
+ to {
162
+ transform: rotate(360deg);
163
+ }
164
+ }
165
+
166
+ @keyframes convai-bounce {
167
+ 0%, 100% {
168
+ transform: translateY(0);
169
+ }
170
+ 50% {
171
+ transform: translateY(-10px);
172
+ }
173
+ }
174
+
175
+ @keyframes convai-slide-up {
176
+ from {
177
+ transform: translateY(20px);
178
+ opacity: 0;
179
+ }
180
+ to {
181
+ transform: translateY(0);
182
+ opacity: 1;
183
+ }
184
+ }
185
+
186
+ @keyframes convai-slide-down {
187
+ from {
188
+ transform: translateY(-20px);
189
+ opacity: 0;
190
+ }
191
+ to {
192
+ transform: translateY(0);
193
+ opacity: 1;
194
+ }
195
+ }
196
+
197
+ @keyframes convai-fade-in {
198
+ from {
199
+ opacity: 0;
200
+ }
201
+ to {
202
+ opacity: 1;
203
+ }
204
+ }
205
+
206
+ @keyframes convai-scale-in {
207
+ from {
208
+ transform: scale(0.8);
209
+ opacity: 0;
210
+ }
211
+ to {
212
+ transform: scale(1);
213
+ opacity: 1;
214
+ }
215
+ }
216
+
217
+ .convai-widget * {
218
+ box-sizing: border-box;
219
+ }
220
+
221
+ .convai-widget {
222
+ font-family: ${aeroTheme.typography.fontFamily.primary};
223
+ color: ${aeroTheme.colors.text.primary};
224
+ -webkit-font-smoothing: antialiased;
225
+ -moz-osx-font-smoothing: grayscale;
226
+ }
227
+
228
+ .convai-widget button {
229
+ font-family: inherit;
230
+ cursor: pointer;
231
+ border: none;
232
+ outline: none;
233
+ background: none;
234
+ padding: 0;
235
+ margin: 0;
236
+ }
237
+
238
+ .convai-widget input {
239
+ font-family: inherit;
240
+ border: none;
241
+ outline: none;
242
+ background: none;
243
+ }
244
+
245
+ .convai-widget::-webkit-scrollbar {
246
+ width: 6px;
247
+ }
248
+
249
+ .convai-widget::-webkit-scrollbar-track {
250
+ background: rgba(0, 0, 0, 0.05);
251
+ border-radius: 3px;
252
+ }
253
+
254
+ .convai-widget::-webkit-scrollbar-thumb {
255
+ background: rgba(0, 0, 0, 0.2);
256
+ border-radius: 3px;
257
+ }
258
+
259
+ .convai-widget::-webkit-scrollbar-thumb:hover {
260
+ background: rgba(0, 0, 0, 0.3);
261
+ }
262
+ `;
263
+ /**
264
+ * Inject global styles into the document head
265
+ */
266
+ let stylesInjected = false;
267
+ export const injectGlobalStyles = () => {
268
+ if (stylesInjected)
269
+ return;
270
+ const styleElement = document.createElement('style');
271
+ styleElement.id = 'convai-widget-styles';
272
+ styleElement.textContent = getGlobalStyles();
273
+ document.head.appendChild(styleElement);
274
+ stylesInjected = true;
275
+ };
276
+ /**
277
+ * Helper to create inline styles object from theme
278
+ */
279
+ export const createStyles = (styles) => {
280
+ return Object.entries(styles)
281
+ .map(([key, value]) => {
282
+ const cssKey = key.replace(/([A-Z])/g, '-$1').toLowerCase();
283
+ return `${cssKey}: ${value}`;
284
+ })
285
+ .join('; ');
286
+ };
287
+ //# sourceMappingURL=styles.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"styles.js","sourceRoot":"","sources":["../../src/vanilla/styles.ts"],"names":[],"mappings":"AAAA;;GAEG;AAEH,+CAA+C;AAC/C,MAAM,CAAC,MAAM,SAAS,GAAG;IACvB,MAAM,EAAE;QACN,OAAO,EAAE;YAC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B,MAAM,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,UAAU,EAAE,KAAK,CAAC,CAAC,WAAW,EAAE,CAAC;QAC5D,OAAO,GAAG,MAAM,KAAK,KAAK,EAAE,CAAC;IAC/B,CAAC,CAAC;SACD,IAAI,CAAC,IAAI,CAAC,CAAC;AAChB,CAAC,CAAC"}
@@ -0,0 +1,43 @@
1
+ import type { IConvaiClient, ChatMessage } from '../core/types';
2
+ /**
3
+ * Options for creating a vanilla ConvaiWidget
4
+ */
5
+ export interface VanillaWidgetOptions {
6
+ /**
7
+ * Convai client instance (required).
8
+ * Should be initialized with config: new ConvaiClient({ apiKey, characterId, ... })
9
+ * The widget will auto-connect on first click.
10
+ */
11
+ convaiClient: IConvaiClient & {
12
+ activity?: string;
13
+ chatMessages: ChatMessage[];
14
+ };
15
+ /**
16
+ * Show video toggle button in settings (default: true).
17
+ * Only works if connection type is "video". If false, hides the video button.
18
+ */
19
+ showVideo?: boolean;
20
+ /**
21
+ * Show screen share toggle button in settings (default: true).
22
+ * Only works if connection type is "video". If false, hides the screen share button.
23
+ */
24
+ showScreenShare?: boolean;
25
+ /**
26
+ * Start in voice mode by default when widget opens (default: true).
27
+ * When true, the widget will open directly in voice mode with microphone enabled.
28
+ */
29
+ defaultVoiceMode?: boolean;
30
+ }
31
+ /**
32
+ * Vanilla ConvaiWidget instance with cleanup method
33
+ */
34
+ export interface VanillaWidget {
35
+ /** Root DOM element of the widget */
36
+ element: HTMLElement;
37
+ /** Cleanup and destroy the widget */
38
+ destroy: () => void;
39
+ /** Update widget state (for future extensions) */
40
+ update?: (options: Partial<VanillaWidgetOptions>) => void;
41
+ }
42
+ export type { IConvaiClient, ConvaiConfig, ConvaiClientState, ChatMessage } from '../core/types';
43
+ //# sourceMappingURL=types.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/vanilla/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAmC,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjG;;GAEG;AACH,MAAM,WAAW,oBAAoB;IACnC;;;;OAIG;IACH,YAAY,EAAE,aAAa,GAAG;QAAE,QAAQ,CAAC,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,WAAW,EAAE,CAAA;KAAE,CAAC;IACjF;;;OAGG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB;;;OAGG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;CAC5B;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,qCAAqC;IACrC,OAAO,EAAE,WAAW,CAAC;IACrB,qCAAqC;IACrC,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,kDAAkD;IAClD,MAAM,CAAC,EAAE,CAAC,OAAO,EAAE,OAAO,CAAC,oBAAoB,CAAC,KAAK,IAAI,CAAC;CAC3D;AAGD,YAAY,EACV,aAAa,EACb,YAAY,EACZ,iBAAiB,EACjB,WAAW,EACZ,MAAM,eAAe,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/vanilla/types.ts"],"names":[],"mappings":""}
package/package.json CHANGED
@@ -1,34 +1,32 @@
1
1
  {
2
2
  "name": "@convai/web-sdk",
3
- "version": "0.3.1-beta.3",
4
- "description": "Convai Web SDK for AI voice assistants. Framework-agnostic with vanilla JavaScript/TypeScript support. Build voice-powered AI interactions with real-time audio/video streaming.",
3
+ "version": "0.3.2-beta.0",
4
+ "description": "Convai Web SDK for AI voice assistants. Supports both React and vanilla JavaScript/TypeScript. Build voice-powered AI interactions with real-time audio/video streaming.",
5
5
  "private": false,
6
6
  "type": "module",
7
- "main": "dist/vanilla/index.cjs",
8
- "module": "dist/vanilla/index.js",
9
- "types": "dist/types/vanilla/index.d.ts",
10
- "unpkg": "dist/umd/convai.umd.js",
11
- "jsdelivr": "dist/umd/convai.umd.js",
7
+ "main": "dist/index.js",
8
+ "module": "dist/index.js",
9
+ "types": "dist/index.d.ts",
12
10
  "exports": {
13
11
  ".": {
14
- "types": "./dist/types/vanilla/index.d.ts",
15
- "import": "./dist/vanilla/index.js",
16
- "require": "./dist/vanilla/index.cjs"
12
+ "import": "./dist/index.js",
13
+ "types": "./dist/index.d.ts"
17
14
  },
18
15
  "./core": {
19
- "types": "./dist/types/core/index.d.ts",
20
16
  "import": "./dist/core/index.js",
21
- "require": "./dist/core/index.cjs"
17
+ "types": "./dist/core/index.d.ts"
22
18
  },
23
19
  "./vanilla": {
24
- "types": "./dist/types/vanilla/index.d.ts",
25
20
  "import": "./dist/vanilla/index.js",
26
- "require": "./dist/vanilla/index.cjs"
21
+ "types": "./dist/vanilla/index.d.ts"
22
+ },
23
+ "./react": {
24
+ "import": "./dist/react/index.js",
25
+ "types": "./dist/react/index.d.ts"
27
26
  },
28
- "./lipsync": {
29
- "types": "./dist/types/lipsync-helpers/index.d.ts",
27
+ "./lipsync-helpers": {
30
28
  "import": "./dist/lipsync-helpers/index.js",
31
- "require": "./dist/lipsync-helpers/index.cjs"
29
+ "types": "./dist/lipsync-helpers/index.d.ts"
32
30
  }
33
31
  },
34
32
  "sideEffects": false,
@@ -36,11 +34,9 @@
36
34
  "access": "public"
37
35
  },
38
36
  "scripts": {
39
- "build": "npm run build:esm && npm run build:types",
40
- "build:esm": "rollup -c",
41
- "build:types": "tsc --project tsconfig.types.json",
42
- "build:prod": "NODE_ENV=production npm run build",
43
- "dev": "rollup -c --watch",
37
+ "build": "tsc",
38
+ "build:prod": "NODE_ENV=production tsc",
39
+ "dev": "tsc --watch",
44
40
  "clean": "rimraf dist",
45
41
  "prepublishOnly": "npm run clean && npm run build:prod",
46
42
  "changeset": "changeset",
@@ -53,14 +49,12 @@
53
49
  "publish:beta": "npm run build:prod && changeset publish --tag beta",
54
50
  "example:react": "cd examples/react && pnpm dev",
55
51
  "example:react:build": "cd examples/react && pnpm build",
56
- "example:react-lipsync": "cd examples/react-lipsync && pnpm dev",
57
- "example:react-lipsync:build": "cd examples/react-lipsync && pnpm build",
58
52
  "example:vanilla": "cd examples/vanilla && pnpm dev",
59
53
  "example:vanilla:build": "cd examples/vanilla && pnpm build",
60
54
  "examples:dev": "pnpm example:react",
61
- "examples:build": "pnpm example:react:build && pnpm example:react-lipsync:build && pnpm example:vanilla:build",
62
- "examples:install": "pnpm install && cd examples/react && pnpm install && cd ../react-lipsync && pnpm install && cd ../vanilla && pnpm install",
63
- "examples:clean": "pnpm clean && cd examples/react && pnpm clean && cd ../react-lipsync && pnpm clean && cd ../vanilla && pnpm clean"
55
+ "examples:build": "pnpm example:react:build && pnpm example:vanilla:build",
56
+ "examples:install": "pnpm install && cd examples/react && pnpm install && cd ../vanilla && pnpm install",
57
+ "examples:clean": "pnpm clean && cd examples/react && pnpm clean && cd ../vanilla && pnpm clean"
64
58
  },
65
59
  "keywords": [
66
60
  "convai",
@@ -85,25 +79,26 @@
85
79
  },
86
80
  "homepage": "https://github.com/convai/web-sdk#readme",
87
81
  "dependencies": {
88
- "livekit-client": "^2.8.0"
82
+ "@livekit/components-react": "^2.9.3",
83
+ "@livekit/components-styles": "^1.1.4",
84
+ "framer-motion": "^11.18.0",
85
+ "livekit-client": "^2.8.0",
86
+ "react-icons": "^5.4.0",
87
+ "styled-components": "^6.1.15"
89
88
  },
90
- "peerDependencies": {},
91
- "peerDependenciesMeta": {},
92
89
  "devDependencies": {
93
90
  "@changesets/cli": "^2.29.5",
94
- "@rollup/plugin-commonjs": "^28.0.0",
95
- "@rollup/plugin-node-resolve": "^15.3.0",
96
- "@rollup/plugin-terser": "^0.4.4",
97
- "@rollup/plugin-typescript": "^12.1.0",
98
91
  "@types/node": "^20.17.13",
92
+ "@types/react": "^18.3.18",
93
+ "@types/react-dom": "^18.3.5",
94
+ "@types/styled-components": "^5.1.34",
95
+ "react": "^18.3.1",
96
+ "react-dom": "^18.3.1",
99
97
  "rimraf": "^5.0.0",
100
- "rollup": "^4.28.0",
101
- "tslib": "^2.8.1",
102
98
  "typescript": "^5.7.3"
103
99
  },
104
100
  "files": [
105
101
  "dist",
106
- "README.md",
107
- "CHANGELOG.md"
102
+ "README.md"
108
103
  ]
109
104
  }
package/CHANGELOG.md DELETED
@@ -1,165 +0,0 @@
1
- # @convai/web-sdk
2
-
3
- ## 0.2.0 (Unreleased)
4
-
5
- ### ✨ New Features
6
-
7
- - **Vanilla JavaScript/TypeScript Support**: Full support for using the SDK without React
8
- - New `@convai/web-sdk/vanilla` export with `ConvaiClient` and `createConvaiWidget`
9
- - Complete vanilla widget with same functionality as React version
10
- - AudioRenderer for automatic audio playback in vanilla environments
11
- - Comprehensive vanilla usage guide and examples
12
-
13
- ### 🔨 Breaking Changes
14
-
15
- - **Removed Old Exports**: Deleted deprecated `/hooks` and `/components` folders
16
- - Old imports like `import { useConvaiClient } from '@convai/web-sdk/hooks'` no longer work
17
- - Use `import { useConvaiClient } from '@convai/web-sdk'` or `'@convai/web-sdk/react'` instead
18
- - All React functionality moved to `/react` subfolder (backward compatible via main export)
19
-
20
- ### 📦 Package Structure
21
-
22
- The SDK now exports four distinct packages:
23
- - `@convai/web-sdk` - Default export (React for backward compatibility)
24
- - `@convai/web-sdk/react` - React hooks and components
25
- - `@convai/web-sdk/vanilla` - Vanilla JS/TS with UI widget
26
- - `@convai/web-sdk/core` - Framework-agnostic core client
27
-
28
- ### 🎯 Improvements
29
-
30
- - Consolidated duplicate logic between React and core implementations
31
- - All business logic now centralized in core classes
32
- - Better TypeScript types across all exports
33
- - Improved documentation with vanilla usage guide
34
- - New vanilla example in `examples/vanilla`
35
-
36
- ### 📝 Documentation
37
-
38
- - Added [Vanilla Usage Guide](./docs/VANILLA_USAGE.md)
39
- - Updated [README](./README.md) with vanilla examples
40
- - Enhanced [API Reference](./API_REFERENCE.md) with vanilla exports
41
-
42
- ### 🔄 Migration Guide
43
-
44
- If you're using the old hook imports, update them:
45
-
46
- ```typescript
47
- // Before (deprecated)
48
- import { useConvaiClient } from '@convai/web-sdk/hooks';
49
- import { ConvaiWidget } from '@convai/web-sdk/components';
50
-
51
- // After (correct)
52
- import { useConvaiClient, ConvaiWidget } from '@convai/web-sdk';
53
- // or explicitly
54
- import { useConvaiClient, ConvaiWidget } from '@convai/web-sdk/react';
55
- ```
56
-
57
- ## 0.3.0-beta.0
58
-
59
- ### Minor Changes
60
-
61
- - **Adaptive Glass Styling**: Implemented subtle adaptive glass effect for ConvaiWidget that works seamlessly on any background
62
- - Added dual-border system (dark outer + light inner) for visibility on both light and dark backgrounds
63
- - Enhanced backdrop filter with color saturation (`saturate(180%)`) for more vibrant glass effect
64
- - Fixed rounded corners and removed square backdrop artifacts behind circular button
65
- - Added subtle white backgrounds (`rgba(255, 255, 255, 0.5)`) to header and footer for better visual hierarchy
66
- - Widget now seamlessly adapts to any website background (dark, light, or colored)
67
- - Improved shadow system with layered shadows for better depth perception
68
- - Main container now fully transparent with proper pointer-events handling
69
- - All child elements clip properly within rounded corners via `overflow: hidden`
70
-
71
- - **Speaker ID Management**: Added comprehensive speaker management for long-term memory and user analytics
72
- - New required `endUserId` parameter in `ConvaiConfig` for user identification
73
- - Automatic speaker ID creation/retrieval via Convai's speaker management API
74
- - Support for dev mode with `endUserId: '-1'` for testing without persistent memory
75
- - Speaker ID is automatically included in connection requests
76
- - Added `speakerId` to `ConvaiClient` interface for visibility
77
- - New `speakerManagement.ts` utility for handling speaker API calls
78
- - Idempotent speaker creation - same `endUserId` returns same speaker ID
79
-
80
- ### API Changes
81
-
82
- **Breaking Changes:**
83
- - `endUserId` is now a required parameter in `ConvaiConfig`
84
- - All connections now require user identification (use `'-1'` for anonymous/dev mode)
85
-
86
- **Migration Guide:**
87
-
88
- Update your configuration to include `endUserId`:
89
-
90
- ```diff
91
- const convaiClient = useConvaiClient({
92
- apiKey: 'your-api-key',
93
- characterId: 'your-character-id',
94
- + endUserId: 'user-uuid', // or '-1' for dev mode
95
- enableVideo: true,
96
- });
97
- ```
98
-
99
- ## 0.2.0-beta.0
100
-
101
- ### Minor Changes
102
-
103
- - 🔧 **Internal improvements and bug fixes**
104
- - 📚 **Documentation updates** for better clarity
105
- - 🎨 **Code organization improvements**
106
-
107
- ## 0.1.0
108
-
109
- ### Minor Changes
110
-
111
- - **Stable Release**: Moving from beta to stable release
112
- - **Package Rename**: Renamed from `web-handsfree` to `web-sdk` for clarity
113
- - 📚 **Documentation Updates**: Updated all documentation and examples to reflect the new package name
114
- - 🔗 **Repository URLs**: Updated GitHub repository URLs from web-handsfree to web-sdk
115
-
116
- ### What's Included
117
-
118
- - Complete React/TypeScript SDK for Convai AI-powered voice assistants
119
- - LiveKit WebRTC integration for real-time audio/video communication
120
- - `useConvaiClient()` hook for managing Convai connections
121
- - `ConvaiWidget` - all-in-one chat widget with voice/video/screen-share
122
- - Full TypeScript support with comprehensive type definitions
123
- - Updated examples and documentation
124
-
125
- ### Breaking Changes
126
-
127
- - Package import path changed from `@convai/web-handsfree` to `@convai/web-sdk`
128
- - Repository URLs updated to reflect new naming convention
129
-
130
- ### Migration Guide
131
-
132
- If upgrading from beta versions, update your imports:
133
-
134
- ```diff
135
- - import { useConvaiClient, ConvaiWidget } from "@convai/web-handsfree";
136
- + import { useConvaiClient, ConvaiWidget } from "@convai/web-sdk";
137
- ```
138
-
139
- ## 0.0.4-beta.1
140
-
141
- ### Patch Changes
142
-
143
- - Beta release 0.0.4-beta.0 with new features and improvements
144
- - ### UI State Management & Logging Improvements
145
-
146
- **Fixed:**
147
-
148
- - Fixed microphone mute UI state persistence issue after disconnect/reset - UI now properly resets to initial state
149
- - Fixed audio/video/screenshare controls not resetting after disconnect - all media controls now return to initial state when room disconnects
150
- - Fixed voice mode UI state not resetting after disconnect
151
-
152
- **Added:**
153
-
154
- - Added `startWithVideoOn` parameter to `ConvaiConfig` (default: false) - allows control over whether camera turns on immediately upon connection
155
- - Camera now stays off by default even when `enableVideo: true`, user can enable via settings tray
156
-
157
- **Improved:**
158
-
159
- - Removed all informational `logger.log()` calls from codebase - console output is now much cleaner
160
- - Kept only `logger.error()` calls for proper error handling and debugging
161
- - Reduced console spam by ~60 log statements
162
-
163
- **Breaking Changes:**
164
-
165
- - None - all changes are backward compatible