@convai/web-sdk 1.9.0-beta.7 → 1.9.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 (344) hide show
  1. package/README.md +66 -33
  2. package/dist/core/AudioManager.d.ts +0 -1
  3. package/dist/core/AudioManager.js +0 -1
  4. package/dist/core/BlendshapeQueue.d.ts +0 -1
  5. package/dist/core/BlendshapeQueue.js +20 -6
  6. package/dist/core/CharacterRoster.d.ts +0 -1
  7. package/dist/core/CharacterRoster.js +0 -1
  8. package/dist/core/CharacterVersionManager.d.ts +0 -1
  9. package/dist/core/CharacterVersionManager.js +0 -1
  10. package/dist/core/ConnectionStateHandler.d.ts +0 -1
  11. package/dist/core/ConnectionStateHandler.js +5 -2
  12. package/dist/core/ConvaiClient.d.ts +31 -3
  13. package/dist/core/ConvaiClient.js +136 -14
  14. package/dist/core/ConvaiRoomError.d.ts +0 -1
  15. package/dist/core/ConvaiRoomError.js +20 -2
  16. package/dist/core/EventEmitter.d.ts +0 -1
  17. package/dist/core/EventEmitter.js +0 -1
  18. package/dist/core/MemoryManager.d.ts +0 -1
  19. package/dist/core/MemoryManager.js +0 -1
  20. package/dist/core/MessageHandler.d.ts +0 -1
  21. package/dist/core/MessageHandler.js +41 -10
  22. package/dist/core/SSESession.d.ts +0 -1
  23. package/dist/core/SSESession.js +0 -1
  24. package/dist/core/ScreenShareManager.d.ts +0 -1
  25. package/dist/core/ScreenShareManager.js +0 -1
  26. package/dist/core/VideoManager.d.ts +0 -1
  27. package/dist/core/VideoManager.js +0 -1
  28. package/dist/core/characterInfo.d.ts +45 -0
  29. package/dist/core/characterInfo.js +55 -0
  30. package/dist/core/characterReference.d.ts +0 -1
  31. package/dist/core/characterReference.js +0 -1
  32. package/dist/core/connectRequest.d.ts +0 -1
  33. package/dist/core/connectRequest.js +0 -1
  34. package/dist/core/contextUpdateRequest.d.ts +0 -1
  35. package/dist/core/contextUpdateRequest.js +0 -1
  36. package/dist/core/index.d.ts +4 -3
  37. package/dist/core/index.js +20 -3
  38. package/dist/core/logicalTurn.d.ts +0 -1
  39. package/dist/core/logicalTurn.js +0 -1
  40. package/dist/core/modelOutput.d.ts +0 -1
  41. package/dist/core/modelOutput.js +0 -1
  42. package/dist/core/publishedChat.d.ts +0 -1
  43. package/dist/core/publishedChat.js +0 -1
  44. package/dist/core/rosterRequest.d.ts +0 -1
  45. package/dist/core/rosterRequest.js +0 -1
  46. package/dist/core/rtviEnvelope.d.ts +0 -1
  47. package/dist/core/rtviEnvelope.js +0 -1
  48. package/dist/core/types.d.ts +112 -10
  49. package/dist/core/types.js +0 -1
  50. package/dist/core/videoSourceState.d.ts +0 -1
  51. package/dist/core/videoSourceState.js +0 -1
  52. package/dist/core/visionRequest.d.ts +0 -1
  53. package/dist/core/visionRequest.js +0 -1
  54. package/dist/embed/index.d.ts +11 -1
  55. package/dist/embed/index.js +11 -1
  56. package/dist/embed/publicationApi.d.ts +0 -1
  57. package/dist/embed/publicationApi.js +0 -1
  58. package/dist/index.d.ts +0 -1
  59. package/dist/index.js +0 -1
  60. package/dist/lipsync-helpers/arkitOrder61.d.ts +0 -1
  61. package/dist/lipsync-helpers/arkitOrder61.js +5 -3
  62. package/dist/lipsync-helpers/createBlendshapeQueue.d.ts +0 -1
  63. package/dist/lipsync-helpers/createBlendshapeQueue.js +7 -1
  64. package/dist/lipsync-helpers/declarativeMapping.d.ts +2 -1
  65. package/dist/lipsync-helpers/declarativeMapping.js +72 -146
  66. package/dist/lipsync-helpers/index.d.ts +0 -1
  67. package/dist/lipsync-helpers/index.js +0 -1
  68. package/dist/lipsync-helpers/mappingTypes.d.ts +6 -5
  69. package/dist/lipsync-helpers/mappingTypes.js +0 -1
  70. package/dist/lipsync-helpers/metahumanOrder251.d.ts +0 -1
  71. package/dist/lipsync-helpers/metahumanOrder251.js +8 -9
  72. package/dist/lipsync-helpers/mhaLimitDrivers.d.ts +0 -1
  73. package/dist/lipsync-helpers/mhaLimitDrivers.js +0 -1
  74. package/dist/lipsync-helpers/naturalness/processor.d.ts +0 -1
  75. package/dist/lipsync-helpers/naturalness/processor.js +6 -4
  76. package/dist/lipsync-helpers/naturalness/profiles/mha.d.ts +0 -1
  77. package/dist/lipsync-helpers/naturalness/profiles/mha.js +0 -1
  78. package/dist/lipsync-helpers/naturalness/types.d.ts +0 -1
  79. package/dist/lipsync-helpers/naturalness/types.js +0 -1
  80. package/dist/lipsync-helpers/presetMappers.d.ts +0 -1
  81. package/dist/lipsync-helpers/presetMappers.js +0 -1
  82. package/dist/react/components/ConvaiWidget.d.ts +0 -1
  83. package/dist/react/components/ConvaiWidget.js +16 -8
  84. package/dist/react/components/index.d.ts +0 -1
  85. package/dist/react/components/index.js +0 -1
  86. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts +0 -1
  87. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js +0 -1
  88. package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts +0 -1
  89. package/dist/react/components/rtc-widget/components/AudioVisualizer.js +0 -1
  90. package/dist/react/components/rtc-widget/components/ConviMessage.d.ts +0 -1
  91. package/dist/react/components/rtc-widget/components/ConviMessage.js +0 -1
  92. package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts +0 -1
  93. package/dist/react/components/rtc-widget/components/FloatingVideo.js +0 -1
  94. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts +0 -1
  95. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js +0 -1
  96. package/dist/react/components/rtc-widget/components/MessageBubble.d.ts +0 -1
  97. package/dist/react/components/rtc-widget/components/MessageBubble.js +0 -1
  98. package/dist/react/components/rtc-widget/components/MessageList.d.ts +0 -1
  99. package/dist/react/components/rtc-widget/components/MessageList.js +0 -1
  100. package/dist/react/components/rtc-widget/components/SiteCard.d.ts +0 -1
  101. package/dist/react/components/rtc-widget/components/SiteCard.js +0 -1
  102. package/dist/react/components/rtc-widget/components/UserMessage.d.ts +0 -1
  103. package/dist/react/components/rtc-widget/components/UserMessage.js +0 -1
  104. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts +0 -1
  105. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js +0 -1
  106. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts +0 -1
  107. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js +0 -1
  108. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts +0 -1
  109. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js +0 -1
  110. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts +0 -1
  111. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js +0 -1
  112. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts +0 -1
  113. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js +0 -1
  114. package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts +0 -1
  115. package/dist/react/components/rtc-widget/components/conviComponents/index.js +0 -1
  116. package/dist/react/components/rtc-widget/components/index.d.ts +0 -1
  117. package/dist/react/components/rtc-widget/components/index.js +0 -1
  118. package/dist/react/components/rtc-widget/index.d.ts +0 -1
  119. package/dist/react/components/rtc-widget/index.js +0 -1
  120. package/dist/react/components/rtc-widget/styles/framerConfig.d.ts +0 -1
  121. package/dist/react/components/rtc-widget/styles/framerConfig.js +0 -1
  122. package/dist/react/components/rtc-widget/styles/icons.d.ts +0 -1
  123. package/dist/react/components/rtc-widget/styles/icons.js +0 -1
  124. package/dist/react/components/rtc-widget/styles/index.d.ts +0 -1
  125. package/dist/react/components/rtc-widget/styles/index.js +0 -1
  126. package/dist/react/components/rtc-widget/styles/styledComponents.d.ts +0 -1
  127. package/dist/react/components/rtc-widget/styles/styledComponents.js +0 -1
  128. package/dist/react/components/rtc-widget/styles/theme.d.ts +0 -1
  129. package/dist/react/components/rtc-widget/styles/theme.js +0 -1
  130. package/dist/react/components/rtc-widget/types/index.d.ts +0 -1
  131. package/dist/react/components/rtc-widget/types/index.js +0 -1
  132. package/dist/react/hooks/index.d.ts +0 -1
  133. package/dist/react/hooks/index.js +0 -1
  134. package/dist/react/hooks/useCharacterInfo.d.ts +12 -11
  135. package/dist/react/hooks/useCharacterInfo.js +49 -50
  136. package/dist/react/hooks/useConvaiClient.d.ts +0 -1
  137. package/dist/react/hooks/useConvaiClient.js +6 -5
  138. package/dist/react/hooks/useLocalCameraTrack.d.ts +0 -1
  139. package/dist/react/hooks/useLocalCameraTrack.js +0 -1
  140. package/dist/react/icons.d.ts +0 -1
  141. package/dist/react/icons.js +0 -1
  142. package/dist/react/index.d.ts +0 -1
  143. package/dist/react/index.js +0 -1
  144. package/dist/utils/inlineMarkdown.d.ts +0 -1
  145. package/dist/utils/inlineMarkdown.js +0 -1
  146. package/dist/utils/lightbox.d.ts +0 -1
  147. package/dist/utils/lightbox.js +0 -1
  148. package/dist/utils/linkPresentation.d.ts +0 -1
  149. package/dist/utils/linkPresentation.js +0 -1
  150. package/dist/utils/linkPreview.d.ts +0 -1
  151. package/dist/utils/linkPreview.js +0 -1
  152. package/dist/utils/logger.d.ts +0 -1
  153. package/dist/utils/logger.js +0 -1
  154. package/dist/vanilla/AudioRenderer.d.ts +0 -1
  155. package/dist/vanilla/AudioRenderer.js +0 -1
  156. package/dist/vanilla/ConvaiWidget.d.ts +0 -1
  157. package/dist/vanilla/ConvaiWidget.js +18 -30
  158. package/dist/vanilla/WebSocketSession.d.ts +0 -1
  159. package/dist/vanilla/WebSocketSession.js +0 -1
  160. package/dist/vanilla/WidgetEventSubscriptions.d.ts +0 -1
  161. package/dist/vanilla/WidgetEventSubscriptions.js +0 -1
  162. package/dist/vanilla/icons.d.ts +0 -1
  163. package/dist/vanilla/icons.js +0 -1
  164. package/dist/vanilla/index.d.ts +0 -1
  165. package/dist/vanilla/index.js +0 -1
  166. package/dist/vanilla/styles.d.ts +0 -1
  167. package/dist/vanilla/styles.js +0 -1
  168. package/dist/vanilla/types.d.ts +0 -1
  169. package/dist/vanilla/types.js +0 -1
  170. package/dist/vanilla/websocket.d.ts +0 -1
  171. package/dist/vanilla/websocket.js +0 -1
  172. package/dist/version.d.ts +1 -2
  173. package/dist/version.js +1 -2
  174. package/package.json +3 -3
  175. package/dist/core/AudioManager.d.ts.map +0 -1
  176. package/dist/core/AudioManager.js.map +0 -1
  177. package/dist/core/BlendshapeQueue.d.ts.map +0 -1
  178. package/dist/core/BlendshapeQueue.js.map +0 -1
  179. package/dist/core/CharacterRoster.d.ts.map +0 -1
  180. package/dist/core/CharacterRoster.js.map +0 -1
  181. package/dist/core/CharacterVersionManager.d.ts.map +0 -1
  182. package/dist/core/CharacterVersionManager.js.map +0 -1
  183. package/dist/core/ConnectionStateHandler.d.ts.map +0 -1
  184. package/dist/core/ConnectionStateHandler.js.map +0 -1
  185. package/dist/core/ConvaiClient.d.ts.map +0 -1
  186. package/dist/core/ConvaiClient.js.map +0 -1
  187. package/dist/core/ConvaiRoomError.d.ts.map +0 -1
  188. package/dist/core/ConvaiRoomError.js.map +0 -1
  189. package/dist/core/EventEmitter.d.ts.map +0 -1
  190. package/dist/core/EventEmitter.js.map +0 -1
  191. package/dist/core/MemoryManager.d.ts.map +0 -1
  192. package/dist/core/MemoryManager.js.map +0 -1
  193. package/dist/core/MessageHandler.d.ts.map +0 -1
  194. package/dist/core/MessageHandler.js.map +0 -1
  195. package/dist/core/SSESession.d.ts.map +0 -1
  196. package/dist/core/SSESession.js.map +0 -1
  197. package/dist/core/ScreenShareManager.d.ts.map +0 -1
  198. package/dist/core/ScreenShareManager.js.map +0 -1
  199. package/dist/core/VideoManager.d.ts.map +0 -1
  200. package/dist/core/VideoManager.js.map +0 -1
  201. package/dist/core/characterReference.d.ts.map +0 -1
  202. package/dist/core/characterReference.js.map +0 -1
  203. package/dist/core/connectRequest.d.ts.map +0 -1
  204. package/dist/core/connectRequest.js.map +0 -1
  205. package/dist/core/contextUpdateRequest.d.ts.map +0 -1
  206. package/dist/core/contextUpdateRequest.js.map +0 -1
  207. package/dist/core/index.d.ts.map +0 -1
  208. package/dist/core/index.js.map +0 -1
  209. package/dist/core/logicalTurn.d.ts.map +0 -1
  210. package/dist/core/logicalTurn.js.map +0 -1
  211. package/dist/core/modelOutput.d.ts.map +0 -1
  212. package/dist/core/modelOutput.js.map +0 -1
  213. package/dist/core/publishedChat.d.ts.map +0 -1
  214. package/dist/core/publishedChat.js.map +0 -1
  215. package/dist/core/rosterRequest.d.ts.map +0 -1
  216. package/dist/core/rosterRequest.js.map +0 -1
  217. package/dist/core/rtviEnvelope.d.ts.map +0 -1
  218. package/dist/core/rtviEnvelope.js.map +0 -1
  219. package/dist/core/types.d.ts.map +0 -1
  220. package/dist/core/types.js.map +0 -1
  221. package/dist/core/videoSourceState.d.ts.map +0 -1
  222. package/dist/core/videoSourceState.js.map +0 -1
  223. package/dist/core/visionRequest.d.ts.map +0 -1
  224. package/dist/core/visionRequest.js.map +0 -1
  225. package/dist/embed/index.d.ts.map +0 -1
  226. package/dist/embed/index.js.map +0 -1
  227. package/dist/embed/publicationApi.d.ts.map +0 -1
  228. package/dist/embed/publicationApi.js.map +0 -1
  229. package/dist/index.d.ts.map +0 -1
  230. package/dist/index.js.map +0 -1
  231. package/dist/lipsync-helpers/arkitOrder61.d.ts.map +0 -1
  232. package/dist/lipsync-helpers/arkitOrder61.js.map +0 -1
  233. package/dist/lipsync-helpers/createBlendshapeQueue.d.ts.map +0 -1
  234. package/dist/lipsync-helpers/createBlendshapeQueue.js.map +0 -1
  235. package/dist/lipsync-helpers/declarativeMapping.d.ts.map +0 -1
  236. package/dist/lipsync-helpers/declarativeMapping.js.map +0 -1
  237. package/dist/lipsync-helpers/index.d.ts.map +0 -1
  238. package/dist/lipsync-helpers/index.js.map +0 -1
  239. package/dist/lipsync-helpers/mappingTypes.d.ts.map +0 -1
  240. package/dist/lipsync-helpers/mappingTypes.js.map +0 -1
  241. package/dist/lipsync-helpers/metahumanOrder251.d.ts.map +0 -1
  242. package/dist/lipsync-helpers/metahumanOrder251.js.map +0 -1
  243. package/dist/lipsync-helpers/mhaLimitDrivers.d.ts.map +0 -1
  244. package/dist/lipsync-helpers/mhaLimitDrivers.js.map +0 -1
  245. package/dist/lipsync-helpers/naturalness/processor.d.ts.map +0 -1
  246. package/dist/lipsync-helpers/naturalness/processor.js.map +0 -1
  247. package/dist/lipsync-helpers/naturalness/profiles/mha.d.ts.map +0 -1
  248. package/dist/lipsync-helpers/naturalness/profiles/mha.js.map +0 -1
  249. package/dist/lipsync-helpers/naturalness/types.d.ts.map +0 -1
  250. package/dist/lipsync-helpers/naturalness/types.js.map +0 -1
  251. package/dist/lipsync-helpers/presetMappers.d.ts.map +0 -1
  252. package/dist/lipsync-helpers/presetMappers.js.map +0 -1
  253. package/dist/react/components/ConvaiWidget.d.ts.map +0 -1
  254. package/dist/react/components/ConvaiWidget.js.map +0 -1
  255. package/dist/react/components/index.d.ts.map +0 -1
  256. package/dist/react/components/index.js.map +0 -1
  257. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.d.ts.map +0 -1
  258. package/dist/react/components/rtc-widget/components/AudioSettingsPanel.js.map +0 -1
  259. package/dist/react/components/rtc-widget/components/AudioVisualizer.d.ts.map +0 -1
  260. package/dist/react/components/rtc-widget/components/AudioVisualizer.js.map +0 -1
  261. package/dist/react/components/rtc-widget/components/ConviMessage.d.ts.map +0 -1
  262. package/dist/react/components/rtc-widget/components/ConviMessage.js.map +0 -1
  263. package/dist/react/components/rtc-widget/components/FloatingVideo.d.ts.map +0 -1
  264. package/dist/react/components/rtc-widget/components/FloatingVideo.js.map +0 -1
  265. package/dist/react/components/rtc-widget/components/MarkdownRenderer.d.ts.map +0 -1
  266. package/dist/react/components/rtc-widget/components/MarkdownRenderer.js.map +0 -1
  267. package/dist/react/components/rtc-widget/components/MessageBubble.d.ts.map +0 -1
  268. package/dist/react/components/rtc-widget/components/MessageBubble.js.map +0 -1
  269. package/dist/react/components/rtc-widget/components/MessageList.d.ts.map +0 -1
  270. package/dist/react/components/rtc-widget/components/MessageList.js.map +0 -1
  271. package/dist/react/components/rtc-widget/components/SiteCard.d.ts.map +0 -1
  272. package/dist/react/components/rtc-widget/components/SiteCard.js.map +0 -1
  273. package/dist/react/components/rtc-widget/components/UserMessage.d.ts.map +0 -1
  274. package/dist/react/components/rtc-widget/components/UserMessage.js.map +0 -1
  275. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.d.ts.map +0 -1
  276. package/dist/react/components/rtc-widget/components/conviComponents/ConviButton.js.map +0 -1
  277. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.d.ts.map +0 -1
  278. package/dist/react/components/rtc-widget/components/conviComponents/ConviFooter.js.map +0 -1
  279. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.d.ts.map +0 -1
  280. package/dist/react/components/rtc-widget/components/conviComponents/ConviHeader.js.map +0 -1
  281. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.d.ts.map +0 -1
  282. package/dist/react/components/rtc-widget/components/conviComponents/SettingsTray.js.map +0 -1
  283. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.d.ts.map +0 -1
  284. package/dist/react/components/rtc-widget/components/conviComponents/VoiceModeOverlay.js.map +0 -1
  285. package/dist/react/components/rtc-widget/components/conviComponents/index.d.ts.map +0 -1
  286. package/dist/react/components/rtc-widget/components/conviComponents/index.js.map +0 -1
  287. package/dist/react/components/rtc-widget/components/index.d.ts.map +0 -1
  288. package/dist/react/components/rtc-widget/components/index.js.map +0 -1
  289. package/dist/react/components/rtc-widget/index.d.ts.map +0 -1
  290. package/dist/react/components/rtc-widget/index.js.map +0 -1
  291. package/dist/react/components/rtc-widget/styles/framerConfig.d.ts.map +0 -1
  292. package/dist/react/components/rtc-widget/styles/framerConfig.js.map +0 -1
  293. package/dist/react/components/rtc-widget/styles/icons.d.ts.map +0 -1
  294. package/dist/react/components/rtc-widget/styles/icons.js.map +0 -1
  295. package/dist/react/components/rtc-widget/styles/index.d.ts.map +0 -1
  296. package/dist/react/components/rtc-widget/styles/index.js.map +0 -1
  297. package/dist/react/components/rtc-widget/styles/styledComponents.d.ts.map +0 -1
  298. package/dist/react/components/rtc-widget/styles/styledComponents.js.map +0 -1
  299. package/dist/react/components/rtc-widget/styles/theme.d.ts.map +0 -1
  300. package/dist/react/components/rtc-widget/styles/theme.js.map +0 -1
  301. package/dist/react/components/rtc-widget/types/index.d.ts.map +0 -1
  302. package/dist/react/components/rtc-widget/types/index.js.map +0 -1
  303. package/dist/react/hooks/index.d.ts.map +0 -1
  304. package/dist/react/hooks/index.js.map +0 -1
  305. package/dist/react/hooks/useCharacterInfo.d.ts.map +0 -1
  306. package/dist/react/hooks/useCharacterInfo.js.map +0 -1
  307. package/dist/react/hooks/useConvaiClient.d.ts.map +0 -1
  308. package/dist/react/hooks/useConvaiClient.js.map +0 -1
  309. package/dist/react/hooks/useLocalCameraTrack.d.ts.map +0 -1
  310. package/dist/react/hooks/useLocalCameraTrack.js.map +0 -1
  311. package/dist/react/icons.d.ts.map +0 -1
  312. package/dist/react/icons.js.map +0 -1
  313. package/dist/react/index.d.ts.map +0 -1
  314. package/dist/react/index.js.map +0 -1
  315. package/dist/utils/inlineMarkdown.d.ts.map +0 -1
  316. package/dist/utils/inlineMarkdown.js.map +0 -1
  317. package/dist/utils/lightbox.d.ts.map +0 -1
  318. package/dist/utils/lightbox.js.map +0 -1
  319. package/dist/utils/linkPresentation.d.ts.map +0 -1
  320. package/dist/utils/linkPresentation.js.map +0 -1
  321. package/dist/utils/linkPreview.d.ts.map +0 -1
  322. package/dist/utils/linkPreview.js.map +0 -1
  323. package/dist/utils/logger.d.ts.map +0 -1
  324. package/dist/utils/logger.js.map +0 -1
  325. package/dist/vanilla/AudioRenderer.d.ts.map +0 -1
  326. package/dist/vanilla/AudioRenderer.js.map +0 -1
  327. package/dist/vanilla/ConvaiWidget.d.ts.map +0 -1
  328. package/dist/vanilla/ConvaiWidget.js.map +0 -1
  329. package/dist/vanilla/WebSocketSession.d.ts.map +0 -1
  330. package/dist/vanilla/WebSocketSession.js.map +0 -1
  331. package/dist/vanilla/WidgetEventSubscriptions.d.ts.map +0 -1
  332. package/dist/vanilla/WidgetEventSubscriptions.js.map +0 -1
  333. package/dist/vanilla/icons.d.ts.map +0 -1
  334. package/dist/vanilla/icons.js.map +0 -1
  335. package/dist/vanilla/index.d.ts.map +0 -1
  336. package/dist/vanilla/index.js.map +0 -1
  337. package/dist/vanilla/styles.d.ts.map +0 -1
  338. package/dist/vanilla/styles.js.map +0 -1
  339. package/dist/vanilla/types.d.ts.map +0 -1
  340. package/dist/vanilla/types.js.map +0 -1
  341. package/dist/vanilla/websocket.d.ts.map +0 -1
  342. package/dist/vanilla/websocket.js.map +0 -1
  343. package/dist/version.d.ts.map +0 -1
  344. package/dist/version.js.map +0 -1
@@ -36,89 +36,11 @@ import { METAHUMAN_ORDER_251 } from './metahumanOrder251.js';
36
36
  * ```
37
37
  */
38
38
  export function createARKitNameMapper(mapping, outputFormat = 'object') {
39
- // Build reverse mapping: source index -> target names
40
- const sourceIndexToTargets = new Map();
41
- for (const [sourceName, targetNames] of Object.entries(mapping)) {
42
- // Convert source name to camelCase if needed
43
- const sourceNameVariations = [
44
- sourceName,
45
- sourceName.charAt(0).toUpperCase() + sourceName.slice(1),
46
- sourceName.charAt(0).toLowerCase() + sourceName.slice(1),
47
- ];
48
- let sourceIndex = -1;
49
- for (const variation of sourceNameVariations) {
50
- sourceIndex = ARKIT_ORDER_61.indexOf(variation);
51
- if (sourceIndex !== -1)
52
- break;
53
- }
54
- if (sourceIndex === -1) {
55
- console.warn(`[ARKit Name Mapper] Source blendshape "${sourceName}" not found in ARKit format`);
56
- continue;
57
- }
58
- sourceIndexToTargets.set(sourceIndex, targetNames);
59
- }
60
- // Build list of unique target names
61
- const uniqueTargets = new Set();
62
- for (const targets of sourceIndexToTargets.values()) {
63
- targets.forEach(t => uniqueTargets.add(t));
64
- }
65
- const targetNames = Array.from(uniqueTargets);
66
- // Build accumulation structure: target name -> [source indices]
67
- const targetToSources = new Map();
68
- for (const targetName of targetNames) {
69
- targetToSources.set(targetName, []);
70
- }
71
- for (const [sourceIndex, targets] of sourceIndexToTargets.entries()) {
72
- for (const targetName of targets) {
73
- targetToSources.get(targetName)?.push(sourceIndex);
74
- }
75
- }
76
- // Pre-allocate output structures
77
- const outputValues = new Float32Array(targetNames.length);
78
- const nameToIndex = new Map();
79
- targetNames.forEach((name, index) => nameToIndex.set(name, index));
80
- if (outputFormat === 'optimized') {
81
- // Optimized format: return structured object for fast iteration
82
- const optimizedOutput = {
83
- names: targetNames,
84
- values: outputValues,
85
- nameToIndex,
86
- length: targetNames.length,
87
- };
88
- return (input) => {
89
- outputValues.fill(0);
90
- // Accumulate values for each target
91
- for (let i = 0; i < targetNames.length; i++) {
92
- const sourceIndices = targetToSources.get(targetNames[i]);
93
- let sum = 0;
94
- for (const srcIndex of sourceIndices) {
95
- sum += input[srcIndex] || 0;
96
- }
97
- outputValues[i] = sum / sourceIndices.length; // Average if multiple sources
98
- }
99
- // Return same object reference (values are updated in place)
100
- return optimizedOutput;
101
- };
102
- }
103
- else {
104
- // Object format: return key-value object
105
- return (input) => {
106
- const output = {};
107
- for (const targetName of targetNames) {
108
- const sourceIndices = targetToSources.get(targetName);
109
- let sum = 0;
110
- for (const srcIndex of sourceIndices) {
111
- sum += input[srcIndex] || 0;
112
- }
113
- output[targetName] = sum / sourceIndices.length;
114
- }
115
- // Convert to Float32Array representation (for compatibility)
116
- // Store as object in the array's properties (hack but works)
117
- const result = new Float32Array(0);
118
- result.__blendshapeObject = output;
119
- return result;
120
- };
121
- }
39
+ return buildNameMapper(mapping, outputFormat, (name) => firstIndexOf(ARKIT_ORDER_61, [
40
+ name,
41
+ name.charAt(0).toUpperCase() + name.slice(1),
42
+ name.charAt(0).toLowerCase() + name.slice(1),
43
+ ]), 'ARKit');
122
44
  }
123
45
  /**
124
46
  * Create a mapper from MetaHuman format using declarative name mapping
@@ -136,82 +58,87 @@ export function createARKitNameMapper(mapping, outputFormat = 'object') {
136
58
  * ```
137
59
  */
138
60
  export function createMetaHumanNameMapper(mapping, outputFormat = 'object') {
139
- // Build reverse mapping: source index -> target names
140
- const sourceIndexToTargets = new Map();
141
- for (const [sourceName, targetNames] of Object.entries(mapping)) {
142
- const sourceIndex = METAHUMAN_ORDER_251.indexOf(sourceName);
61
+ // Full CTRL_expressions_* names, or the short form the ARKit mapper also
62
+ // accepts ("jawOpen").
63
+ return buildNameMapper(mapping, outputFormat, (name) => firstIndexOf(METAHUMAN_ORDER_251, [
64
+ name,
65
+ `CTRL_expressions_${name}`,
66
+ `CTRL_expressions_${name.charAt(0).toLowerCase()}${name.slice(1)}`,
67
+ ]), 'MetaHuman');
68
+ }
69
+ /** Hidden on 'object' frames: the target name for each value, in order. */
70
+ const NAMES = '__blendshapeNames';
71
+ function firstIndexOf(order, candidates) {
72
+ for (const candidate of candidates) {
73
+ const index = order.indexOf(candidate);
74
+ if (index !== -1)
75
+ return index;
76
+ }
77
+ return -1;
78
+ }
79
+ /** Attach target names to a frame without making them iterable values. */
80
+ export function withBlendshapeNames(values, names) {
81
+ Object.defineProperty(values, NAMES, { value: names, enumerable: false });
82
+ return values;
83
+ }
84
+ function buildNameMapper(mapping, outputFormat, indexOf, label) {
85
+ // target name -> source indices it averages
86
+ const targetToSources = new Map();
87
+ for (const [sourceName, targets] of Object.entries(mapping)) {
88
+ const sourceIndex = indexOf(sourceName);
143
89
  if (sourceIndex === -1) {
144
- console.warn(`[MetaHuman Name Mapper] Source blendshape "${sourceName}" not found in MetaHuman format`);
90
+ console.warn(`[${label} Name Mapper] Source blendshape "${sourceName}" not found in ${label} format`);
145
91
  continue;
146
92
  }
147
- sourceIndexToTargets.set(sourceIndex, targetNames);
148
- }
149
- // Build list of unique target names
150
- const uniqueTargets = new Set();
151
- for (const targets of sourceIndexToTargets.values()) {
152
- targets.forEach(t => uniqueTargets.add(t));
153
- }
154
- const targetNames = Array.from(uniqueTargets);
155
- // Build accumulation structure: target name -> [source indices]
156
- const targetToSources = new Map();
157
- for (const targetName of targetNames) {
158
- targetToSources.set(targetName, []);
159
- }
160
- for (const [sourceIndex, targets] of sourceIndexToTargets.entries()) {
161
- for (const targetName of targets) {
162
- targetToSources.get(targetName)?.push(sourceIndex);
93
+ for (const target of targets) {
94
+ if (!targetToSources.has(target))
95
+ targetToSources.set(target, []);
96
+ targetToSources.get(target).push(sourceIndex);
163
97
  }
164
98
  }
165
- // Pre-allocate output structures
166
- const outputValues = new Float32Array(targetNames.length);
167
- const nameToIndex = new Map();
168
- targetNames.forEach((name, index) => nameToIndex.set(name, index));
99
+ const names = Array.from(targetToSources.keys());
100
+ const sources = names.map((name) => targetToSources.get(name));
101
+ const nameToIndex = new Map(names.map((name, i) => [name, i]));
102
+ // Fresh values for every frame. The queue keeps each frame until it is
103
+ // played, so a shared buffer made every queued frame read as the newest.
104
+ const compute = (input) => {
105
+ const values = new Float32Array(names.length);
106
+ for (let i = 0; i < names.length; i++) {
107
+ let sum = 0;
108
+ for (const srcIndex of sources[i])
109
+ sum += input[srcIndex] || 0;
110
+ values[i] = sum / sources[i].length; // average when several sources share a target
111
+ }
112
+ return values;
113
+ };
169
114
  if (outputFormat === 'optimized') {
170
- // Optimized format: return structured object for fast iteration
171
- const optimizedOutput = {
172
- names: targetNames,
173
- values: outputValues,
174
- nameToIndex,
175
- length: targetNames.length,
176
- };
177
- return (input) => {
178
- outputValues.fill(0);
179
- // Accumulate values for each target
180
- for (let i = 0; i < targetNames.length; i++) {
181
- const sourceIndices = targetToSources.get(targetNames[i]);
182
- let sum = 0;
183
- for (const srcIndex of sourceIndices) {
184
- sum += input[srcIndex] || 0;
185
- }
186
- outputValues[i] = sum / sourceIndices.length; // Average if multiple sources
187
- }
188
- // Return same object reference (values are updated in place)
189
- return optimizedOutput;
190
- };
191
- }
192
- else {
193
- // Object format: return key-value object
194
115
  return (input) => {
195
- const output = {};
196
- for (const targetName of targetNames) {
197
- const sourceIndices = targetToSources.get(targetName);
198
- let sum = 0;
199
- for (const srcIndex of sourceIndices) {
200
- sum += input[srcIndex] || 0;
201
- }
202
- output[targetName] = sum / sourceIndices.length;
203
- }
204
- // Convert to Float32Array representation (for compatibility)
205
- const result = new Float32Array(0);
206
- result.__blendshapeObject = output;
207
- return result;
116
+ const output = {
117
+ names,
118
+ values: compute(input),
119
+ nameToIndex,
120
+ length: names.length,
121
+ };
122
+ return output;
208
123
  };
209
124
  }
125
+ // 'object': a real numeric frame — so fades and any numeric consumer work —
126
+ // with the names attached for getBlendshapeObject().
127
+ return (input) => withBlendshapeNames(compute(input), names);
210
128
  }
211
129
  /**
212
130
  * Helper to extract blendshape object from mapper output
213
131
  */
214
132
  export function getBlendshapeObject(output) {
133
+ if (!output)
134
+ return {};
135
+ const names = output[NAMES];
136
+ if (names) {
137
+ const obj = {};
138
+ for (let i = 0; i < names.length; i++)
139
+ obj[names[i]] = output[i];
140
+ return obj;
141
+ }
215
142
  if (output.__blendshapeObject) {
216
143
  return output.__blendshapeObject;
217
144
  }
@@ -225,4 +152,3 @@ export function getBlendshapeObject(output) {
225
152
  }
226
153
  return {};
227
154
  }
228
- //# sourceMappingURL=declarativeMapping.js.map
@@ -16,4 +16,3 @@ export { createLipsyncProcessor, getLipsyncProfile, } from "./naturalness/proces
16
16
  export type { LipsyncFormat, LipsyncFormatProfile, LipsyncProcessorOptions, LipsyncEnvelopeOptions, LipsyncMeshBinding, } from "./naturalness/types.js";
17
17
  export { MHA_PROFILE, mhaChannelIndex } from "./naturalness/profiles/mha.js";
18
18
  export { MHA_LIMIT_DRIVERS, applyMhaLimits, MHA_RECOMMENDED_GAINS, createMhaGainMask, MHA_EYE_CHANNEL_INDICES, symmetrizeMhaMouth, } from "./mhaLimitDrivers.js";
19
- //# sourceMappingURL=index.d.ts.map
@@ -37,4 +37,3 @@ export { createLipsyncProcessor, getLipsyncProfile, } from "./naturalness/proces
37
37
  export { MHA_PROFILE, mhaChannelIndex } from "./naturalness/profiles/mha.js";
38
38
  // Flat MHA convenience wrappers over the profile (piecemeal use)
39
39
  export { MHA_LIMIT_DRIVERS, applyMhaLimits, MHA_RECOMMENDED_GAINS, createMhaGainMask, MHA_EYE_CHANNEL_INDICES, symmetrizeMhaMouth, } from "./mhaLimitDrivers.js";
40
- //# sourceMappingURL=index.js.map
@@ -28,10 +28,12 @@ export interface BlendshapeMappingConfig {
28
28
  */
29
29
  inputFormat: BlendshapeFormat;
30
30
  /**
31
- * Output format for application
32
- * - arkit: Map to 61-element ARKit format
33
- * - mha: Map to 251-element MetaHuman format
34
- * - custom: Use custom mapper function
31
+ * Output format for application. Without a `mapper`, only a passthrough of
32
+ * the same format is built in (arkit -> arkit, mha -> mha); any other pair
33
+ * throws. There is no built-in ARKit <-> MetaHuman conversion.
34
+ * - arkit: 61-element ARKit format
35
+ * - mha: 251-element MetaHuman format
36
+ * - custom: your `mapper` decides
35
37
  */
36
38
  outputFormat: BlendshapeFormat;
37
39
  /**
@@ -61,4 +63,3 @@ export declare const PRESET_MAPPINGS: {
61
63
  readonly outputFormat: "mha";
62
64
  };
63
65
  };
64
- //# sourceMappingURL=mappingTypes.d.ts.map
@@ -25,4 +25,3 @@ export const PRESET_MAPPINGS = {
25
25
  outputFormat: "mha",
26
26
  },
27
27
  };
28
- //# sourceMappingURL=mappingTypes.js.map
@@ -112,4 +112,3 @@ export declare function formatMetaHumanBlendshapesForLogging(values: number[] |
112
112
  total: number;
113
113
  activeCount: number;
114
114
  };
115
- //# sourceMappingURL=metahumanOrder251.d.ts.map
@@ -30,7 +30,7 @@ export const METAHUMAN_ORDER_251 = [
30
30
  "CTRL_expressions_earUpL", // 8
31
31
  "CTRL_expressions_earUpR", // 9
32
32
  // ============================================================================
33
- // EYES (43 blendshapes)
33
+ // EYES (33 blendshapes)
34
34
  // ============================================================================
35
35
  "CTRL_expressions_eyeBlinkL", // 10 - 🔑 KEY
36
36
  "CTRL_expressions_eyeBlinkR", // 11 - 🔑 KEY
@@ -77,7 +77,7 @@ export const METAHUMAN_ORDER_251 = [
77
77
  "CTRL_expressions_eyelashesUpOUTL", // 49
78
78
  "CTRL_expressions_eyelashesUpOUTR", // 50
79
79
  // ============================================================================
80
- // JAW (13 blendshapes)
80
+ // JAW (14 blendshapes)
81
81
  // ============================================================================
82
82
  "CTRL_expressions_jawBack", // 51
83
83
  "CTRL_expressions_jawChinCompressL", // 52
@@ -94,7 +94,7 @@ export const METAHUMAN_ORDER_251 = [
94
94
  "CTRL_expressions_jawOpenExtreme", // 63
95
95
  "CTRL_expressions_jawRight", // 64 - 🔑 KEY
96
96
  // ============================================================================
97
- // MOUTH (133 blendshapes) - Most important for lipsync!
97
+ // MOUTH (128 blendshapes) - Most important for lipsync!
98
98
  // ============================================================================
99
99
  "CTRL_expressions_mouthCheekBlowL", // 65
100
100
  "CTRL_expressions_mouthCheekBlowR", // 66
@@ -242,7 +242,7 @@ export const METAHUMAN_ORDER_251 = [
242
242
  "CTRL_expressions_neckThroatInhale", // 205
243
243
  "CTRL_expressions_neckThroatUp", // 206
244
244
  // ============================================================================
245
- // NOSE (10 blendshapes)
245
+ // NOSE (12 blendshapes)
246
246
  // ============================================================================
247
247
  "CTRL_expressions_noseNasolabialDeepenL", // 207
248
248
  "CTRL_expressions_noseNasolabialDeepenR", // 208
@@ -311,8 +311,8 @@ export const METAHUMAN_CATEGORIES = {
311
311
  },
312
312
  eyes: {
313
313
  start: 10,
314
- end: 52,
315
- count: 43,
314
+ end: 42,
315
+ count: 33,
316
316
  },
317
317
  eyelashes: {
318
318
  start: 43,
@@ -326,8 +326,8 @@ export const METAHUMAN_CATEGORIES = {
326
326
  },
327
327
  mouth: {
328
328
  start: 65,
329
- end: 197,
330
- count: 133,
329
+ end: 192,
330
+ count: 128,
331
331
  },
332
332
  neck: {
333
333
  start: 193,
@@ -429,4 +429,3 @@ export function formatMetaHumanBlendshapesForLogging(values, threshold = 0.01, m
429
429
  activeCount: activeList.length,
430
430
  };
431
431
  }
432
- //# sourceMappingURL=metahumanOrder251.js.map
@@ -30,4 +30,3 @@ export declare const MHA_EYE_CHANNEL_INDICES: readonly number[];
30
30
  * sides unevenly (measured up to 1.5×), which reads as a lopsided mouth.
31
31
  */
32
32
  export declare function symmetrizeMhaMouth(frame: Float32Array): void;
33
- //# sourceMappingURL=mhaLimitDrivers.d.ts.map
@@ -57,4 +57,3 @@ export function symmetrizeMhaMouth(frame) {
57
57
  frame[ri] = m;
58
58
  }
59
59
  }
60
- //# sourceMappingURL=mhaLimitDrivers.js.map
@@ -21,4 +21,3 @@ export interface LipsyncProcessor {
21
21
  tick(frame: Float32Array | null, deltaSeconds: number, bindings: LipsyncMeshBinding[]): void;
22
22
  }
23
23
  export declare function createLipsyncProcessor(formatOrProfile: LipsyncFormat | LipsyncFormatProfile, options?: LipsyncProcessorOptions): LipsyncProcessor;
24
- //# sourceMappingURL=processor.d.ts.map
@@ -53,6 +53,10 @@ export function createLipsyncProcessor(formatOrProfile, options = {}) {
53
53
  const releaseTau = envelope === false ? 0 : envelope.release ?? 0.18;
54
54
  // Scratch state
55
55
  const work = new Float32Array(dim);
56
+ // Envelope-weighted output. Kept apart from `work` (the shaped frame) so a
57
+ // silent tick scales the stored frame once, not the previous output again —
58
+ // which compounded and closed the mouth ~5x faster than `release`.
59
+ const out = new Float32Array(dim);
56
60
  let last = null;
57
61
  let env = envelope === false ? 1 : 0;
58
62
  const shape = (src) => {
@@ -90,10 +94,9 @@ export function createLipsyncProcessor(formatOrProfile, options = {}) {
90
94
  if (!last)
91
95
  return null;
92
96
  if (envelope !== false && env < 1) {
93
- // weight the scratch in place (last === work)
94
97
  for (let i = 0; i < dim; i++)
95
- work[i] = last[i] * env;
96
- return work;
98
+ out[i] = last[i] * env;
99
+ return out;
97
100
  }
98
101
  return last;
99
102
  };
@@ -159,4 +162,3 @@ export function createLipsyncProcessor(formatOrProfile, options = {}) {
159
162
  },
160
163
  };
161
164
  }
162
- //# sourceMappingURL=processor.js.map
@@ -4,4 +4,3 @@ export declare const MHA_RECOMMENDED_GAIN_TABLE: Record<string, number>;
4
4
  export declare const MHA_PROFILE: LipsyncFormatProfile;
5
5
  /** Short channel name → MHA-251 frame index (e.g. "jawOpen" → 62). */
6
6
  export declare function mhaChannelIndex(shortName: string): number | undefined;
7
- //# sourceMappingURL=mha.d.ts.map
@@ -102,4 +102,3 @@ export const MHA_PROFILE = {
102
102
  export function mhaChannelIndex(shortName) {
103
103
  return MHA_INDEX[shortName];
104
104
  }
105
- //# sourceMappingURL=mha.js.map
@@ -65,4 +65,3 @@ export interface LipsyncMeshBinding {
65
65
  /** Number of matched channels. */
66
66
  matched: number;
67
67
  }
68
- //# sourceMappingURL=types.d.ts.map
@@ -8,4 +8,3 @@
8
8
  * profile file — no processor changes.
9
9
  */
10
10
  export {};
11
- //# sourceMappingURL=types.js.map
@@ -21,4 +21,3 @@ export declare const metahumanPassthroughMapper: BlendshapeMapper;
21
21
  * Returns input as-is (converts to Float32Array if needed)
22
22
  */
23
23
  export declare const identityMapper: BlendshapeMapper;
24
- //# sourceMappingURL=presetMappers.d.ts.map
@@ -35,4 +35,3 @@ export const identityMapper = (input) => {
35
35
  }
36
36
  return new Float32Array(input);
37
37
  };
38
- //# sourceMappingURL=presetMappers.js.map
@@ -84,4 +84,3 @@ interface ConvaiWidgetProps {
84
84
  */
85
85
  export declare const ConvaiWidget: React.FC<ConvaiWidgetProps>;
86
86
  export {};
87
- //# sourceMappingURL=ConvaiWidget.d.ts.map
@@ -53,7 +53,7 @@ import { MessageList, SettingsTray, VoiceModeOverlay, FloatingVideo, } from "./r
53
53
  export const ConvaiWidget = ({ convaiClient, showVideo = true, showScreenShare = true, defaultVoiceMode = true, requestPublicationGrant, publishedChatConnectOptions, publishedChatDescriptor, linkPreviewResolver, }) => {
54
54
  const isTextOnly = Boolean(requestPublicationGrant) || convaiClient.connectionType === "text";
55
55
  // Fetch character information dynamically from client's stored values
56
- const { name: fetchedCharacterName, image: fetchedCharacterImage, isLoading: isFetchedCharacterLoading, } = useCharacterInfo(convaiClient.characterId || undefined, convaiClient.apiKey || undefined, convaiClient.authToken || undefined);
56
+ const { name: fetchedCharacterName, image: fetchedCharacterImage, isLoading: isFetchedCharacterLoading, } = useCharacterInfo(convaiClient.characterId || undefined, convaiClient.apiKey || undefined, convaiClient.authToken || undefined, convaiClient.characterInfoUrl);
57
57
  const characterName = publishedChatDescriptor?.display_name || fetchedCharacterName;
58
58
  const characterImage = publishedChatDescriptor?.image_url ?? fetchedCharacterImage;
59
59
  const isCharacterLoading = publishedChatDescriptor
@@ -279,6 +279,13 @@ export const ConvaiWidget = ({ convaiClient, showVideo = true, showScreenShare =
279
279
  };
280
280
  ensureMicState();
281
281
  }, [isVoiceMode, convaiClient]);
282
+ // While default voice mode is still pending, render the voice view rather
283
+ // than the text input. Otherwise the panel opens in text mode (the
284
+ // disconnect reset below also runs on mount), the user starts typing, and
285
+ // the moment the connection lands the input is swapped out and the mic goes
286
+ // live under them.
287
+ const showVoiceMode = isVoiceMode ||
288
+ (defaultVoiceMode && !isTextOnly && !hasEnteredDefaultVoiceMode);
282
289
  // Handle default voice mode when widget opens (only once)
283
290
  useEffect(() => {
284
291
  if (isOpen &&
@@ -373,7 +380,7 @@ export const ConvaiWidget = ({ convaiClient, showVideo = true, showScreenShare =
373
380
  }, style: {
374
381
  pointerEvents: isOpen ? "auto" : "none",
375
382
  minHeight: "3.5rem", // Ensure consistent height
376
- }, children: [_jsx(CloseButton, { onClick: handleClose, whileHover: { scale: 1.1 }, whileTap: { scale: 0.9 }, transition: iosTransitions.snappy, style: { cursor: "pointer", pointerEvents: "auto" }, children: _jsx(ChevronDown, { size: "md" }) }), _jsxs(Title, { children: [selectedCharacter.image && !isVoiceMode && (_jsx(motion.img, { src: selectedCharacter.image, alt: selectedCharacter.name, initial: { scale: 0.8, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0.8, opacity: 0 }, transition: iosTransitions.fadePop, style: {
383
+ }, children: [_jsx(CloseButton, { onClick: handleClose, whileHover: { scale: 1.1 }, whileTap: { scale: 0.9 }, transition: iosTransitions.snappy, style: { cursor: "pointer", pointerEvents: "auto" }, children: _jsx(ChevronDown, { size: "md" }) }), _jsxs(Title, { children: [selectedCharacter.image && !showVoiceMode && (_jsx(motion.img, { src: selectedCharacter.image, alt: selectedCharacter.name, initial: { scale: 0.8, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0.8, opacity: 0 }, transition: iosTransitions.fadePop, style: {
377
384
  width: "1.5rem",
378
385
  height: "1.5rem",
379
386
  borderRadius: "50%",
@@ -396,7 +403,7 @@ export const ConvaiWidget = ({ convaiClient, showVideo = true, showScreenShare =
396
403
  alignItems: "center",
397
404
  marginLeft: "0.5rem",
398
405
  outline: "none",
399
- }, "aria-label": isMuted ? "Unmute" : "Mute", title: isMuted ? "Unmute" : "Mute", children: isMuted ? (_jsx(IoVolumeMute, { size: 16, color: "#919EABA6" })) : (_jsx(IoVolumeHigh, { size: 16, color: "#0E7360" })) }), isVoiceMode && (_jsx("span", { style: {
406
+ }, "aria-label": isMuted ? "Unmute" : "Mute", title: isMuted ? "Unmute" : "Mute", children: isMuted ? (_jsx(IoVolumeMute, { size: 16, color: "#919EABA6" })) : (_jsx(IoVolumeHigh, { size: 16, color: "#0E7360" })) }), showVoiceMode && (_jsx("span", { style: {
400
407
  fontSize: "10px",
401
408
  color: aeroTheme.colors.convai.light,
402
409
  fontWeight: 500,
@@ -460,7 +467,7 @@ export const ConvaiWidget = ({ convaiClient, showVideo = true, showScreenShare =
460
467
  gap: "0.5rem",
461
468
  position: "relative",
462
469
  }, children: _jsx(SettingsButton, { ref: settingsButtonRef, onClick: handleSettingsToggle, whileHover: { scale: 1.1 }, whileTap: { scale: 0.9 }, transition: iosTransitions.snappy, style: { cursor: "pointer" }, children: _jsx(FiMoreVertical, { size: 20 }) }) })] }), _jsxs(Content, { style: {
463
- background: isVoiceMode
470
+ background: showVoiceMode
464
471
  ? "rgba(255, 255, 255, 0.98)"
465
472
  : "transparent",
466
473
  filter: isSettingsOpen ? "blur(3px)" : "none",
@@ -494,7 +501,7 @@ export const ConvaiWidget = ({ convaiClient, showVideo = true, showScreenShare =
494
501
  fontSize: "14px",
495
502
  fontWeight: 500,
496
503
  color: aeroTheme.colors.text.secondary,
497
- }, children: ["Connecting to ", selectedCharacter.name, "..."] })] })) }), isVoiceMode && (_jsx(VoiceModeOverlay, { isActive: !convaiClient.isAudioMuted, isTalking: convaiClient.state.isSpeaking, isListening: convaiClient.state.isListening, convaiClient: null, characterImage: characterImage || undefined, characterName: characterName || undefined, room: convaiClient.room?.state === "connected" ? convaiClient.room : null })), !isVoiceMode && (_jsx(MessageList, { messages: formatMessages(), isStreaming: convaiClient.state.isSpeaking, forceToBottomToken: `${isOpen}-${convaiClient.chatMessages.length}`, linkPreviewResolver: linkPreviewResolver }))] }), _jsx(Footer, { initial: { y: 20, opacity: 0 }, animate: { y: 0, opacity: 1 }, transition: {
504
+ }, children: ["Connecting to ", selectedCharacter.name, "..."] })] })) }), showVoiceMode && (_jsx(VoiceModeOverlay, { isActive: !convaiClient.isAudioMuted, isTalking: convaiClient.state.isSpeaking, isListening: convaiClient.state.isListening, convaiClient: null, characterImage: characterImage || undefined, characterName: characterName || undefined, room: convaiClient.room?.state === "connected" ? convaiClient.room : null })), !showVoiceMode && (_jsx(MessageList, { messages: formatMessages(), isStreaming: convaiClient.state.isSpeaking, forceToBottomToken: `${isOpen}-${convaiClient.chatMessages.length}`, linkPreviewResolver: linkPreviewResolver }))] }), _jsx(Footer, { initial: { y: 20, opacity: 0 }, animate: { y: 0, opacity: 1 }, transition: {
498
505
  delay: 0.7,
499
506
  ...iosTransitions.modalSlide,
500
507
  }, style: {
@@ -504,9 +511,9 @@ export const ConvaiWidget = ({ convaiClient, showVideo = true, showScreenShare =
504
511
  gap: "0.5rem",
505
512
  alignItems: "center",
506
513
  position: "relative",
507
- justifyContent: isVoiceMode ? "center" : "flex-start",
514
+ justifyContent: showVoiceMode ? "center" : "flex-start",
508
515
  minHeight: "3.5rem", // Ensure consistent height
509
- }, children: isVoiceMode ? (_jsx(motion.button, { initial: { scale: 0.8, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0.8, opacity: 0 }, transition: {
516
+ }, children: showVoiceMode ? (_jsx(motion.button, { initial: { scale: 0.8, opacity: 0 }, animate: { scale: 1, opacity: 1 }, exit: { scale: 0.8, opacity: 0 }, transition: {
510
517
  duration: 0.3,
511
518
  ease: "easeOut",
512
519
  }, onClick: async () => {
@@ -518,6 +525,8 @@ export const ConvaiWidget = ({ convaiClient, showVideo = true, showScreenShare =
518
525
  convaiClient.toggleStt(false);
519
526
  }
520
527
  setIsVoiceMode(false);
528
+ // Leaving early also cancels a still-pending default.
529
+ setHasEnteredDefaultVoiceMode(true);
521
530
  }, whileHover: { scale: 1.1 }, whileTap: { scale: 0.9 }, style: {
522
531
  cursor: "pointer",
523
532
  backgroundColor: "#ef4444",
@@ -599,4 +608,3 @@ export const ConvaiWidget = ({ convaiClient, showVideo = true, showScreenShare =
599
608
  await convaiClient.videoControls.disableVideo();
600
609
  }, mirror: true }))] }));
601
610
  };
602
- //# sourceMappingURL=ConvaiWidget.js.map
@@ -1,2 +1 @@
1
1
  export { ConvaiWidget } from './ConvaiWidget.js';
2
- //# sourceMappingURL=index.d.ts.map
@@ -1,3 +1,2 @@
1
1
  // Main widget component
2
2
  export { ConvaiWidget } from './ConvaiWidget.js';
3
- //# sourceMappingURL=index.js.map
@@ -7,4 +7,3 @@ interface AudioSettingsPanelProps {
7
7
  }
8
8
  export declare const AudioSettingsPanel: React.FC<AudioSettingsPanelProps>;
9
9
  export {};
10
- //# sourceMappingURL=AudioSettingsPanel.d.ts.map
@@ -313,4 +313,3 @@ export const AudioSettingsPanel = ({ currentSettings, onUpdateSettings, isConnec
313
313
  };
314
314
  return (_jsxs(Panel, { isOpen: true, children: [_jsxs(Title, { children: ["Audio Sensitivity Settings", _jsx(StatusIndicator, { isConnected: isConnected, children: isConnected ? "LIVE" : "OFFLINE" })] }), _jsx(Subtitle, { children: "Adjust these settings to reduce interruptions and find the optimal balance for your environment." }), isConnected && (_jsx(InfoBox, { children: "Warning: Changing settings will briefly restart your microphone. Changes apply immediately." })), _jsxs(SettingGroup, { children: [_jsxs(SettingLabel, { children: [_jsx("span", { children: "Echo Cancellation" }), _jsx(Toggle, { enabled: localSettings.echoCancellation || false, onClick: () => handleToggle("echoCancellation", !localSettings.echoCancellation) })] }), _jsx(SettingDescription, { children: "Prevents feedback loops from speakers. Recommended ON." })] }), _jsxs(SettingGroup, { children: [_jsxs(SettingLabel, { children: [_jsx("span", { children: "Noise Suppression" }), _jsx(Toggle, { enabled: localSettings.noiseSuppression || false, onClick: () => handleToggle("noiseSuppression", !localSettings.noiseSuppression) })] }), _jsx(SettingDescription, { children: "Filters out background noise. Turn ON to reduce false interruptions." })] }), _jsxs(SettingGroup, { children: [_jsxs(SettingLabel, { children: [_jsx("span", { children: "Auto Gain Control" }), _jsx(Toggle, { enabled: localSettings.autoGainControl || false, onClick: () => handleToggle("autoGainControl", !localSettings.autoGainControl) })] }), _jsx(SettingDescription, { children: "Automatically adjusts microphone volume. Turn ON in noisy environments to prevent unwanted interruptions." })] }), _jsxs(SliderGroup, { children: [_jsxs(SliderLabel, { children: [_jsx("span", { children: "Sample Rate" }), _jsxs(SliderValue, { children: [localSettings.sampleRate || 48000, " Hz"] })] }), _jsx(Slider, { type: "range", min: "8000", max: "48000", step: "8000", value: localSettings.sampleRate || 48000, onChange: (e) => handleSliderChange("sampleRate", parseInt(e.target.value)), onMouseUp: (e) => handleSliderRelease("sampleRate", parseInt(e.target.value)), onTouchEnd: (e) => handleSliderRelease("sampleRate", parseInt(e.target.value)) }), _jsx(SettingDescription, { children: "Higher = better quality, lower = less data. 48000 Hz recommended." })] }), _jsxs(PresetButtons, { children: [_jsx(PresetButton, { onClick: () => applyPreset("quiet"), active: getCurrentPreset() === "quiet", disabled: isUpdating, children: "\uD83D\uDD07 Quiet" }), _jsx(PresetButton, { onClick: () => applyPreset("balanced"), active: getCurrentPreset() === "balanced", disabled: isUpdating, children: "Balanced" }), _jsx(PresetButton, { onClick: () => applyPreset("noisy"), active: getCurrentPreset() === "noisy", disabled: isUpdating, children: "\uD83D\uDD0A Noisy" })] })] }));
315
315
  };
316
- //# sourceMappingURL=AudioSettingsPanel.js.map
@@ -33,4 +33,3 @@ interface AudioVisualizerProps {
33
33
  */
34
34
  export declare const AudioVisualizer: React.FC<AudioVisualizerProps>;
35
35
  export {};
36
- //# sourceMappingURL=AudioVisualizer.d.ts.map
@@ -283,4 +283,3 @@ export const AudioVisualizer = ({ room, size = 350, color = '#10b981', opacity =
283
283
  }, [room, size, color, opacity, avatarRadius, barCount, onSpeakingChange]);
284
284
  return (_jsx(VisualizerContainer, { style: { width: size, height: size }, children: _jsx(Canvas, { ref: canvasRef }) }));
285
285
  };
286
- //# sourceMappingURL=AudioVisualizer.js.map
@@ -10,4 +10,3 @@ interface ConviMessageProps {
10
10
  }
11
11
  export declare const ConviMessage: ({ message, timestamp, className, showLogo, sender, resolveLinkPreview, }: ConviMessageProps) => import("react/jsx-runtime").JSX.Element;
12
12
  export {};
13
- //# sourceMappingURL=ConviMessage.d.ts.map
@@ -11,4 +11,3 @@ export const ConviMessage = ({ message, timestamp, className, showLogo = true, s
11
11
  fontFamily: aeroTheme.typography.fontFamily.body,
12
12
  }, children: timestamp }))] }));
13
13
  };
14
- //# sourceMappingURL=ConviMessage.js.map
@@ -6,4 +6,3 @@ interface FloatingVideoProps {
6
6
  }
7
7
  export declare const FloatingVideo: React.FC<FloatingVideoProps>;
8
8
  export {};
9
- //# sourceMappingURL=FloatingVideo.d.ts.map
@@ -118,4 +118,3 @@ export const FloatingVideo = ({ isVisible, onClose, mirror = true, }) => {
118
118
  height: "100%",
119
119
  }, children: _jsx(LocalVideoDisplay, { mirror: mirror }) }) })] }) }) }));
120
120
  };
121
- //# sourceMappingURL=FloatingVideo.js.map
@@ -29,4 +29,3 @@ interface MarkdownRendererProps {
29
29
  }
30
30
  export declare const MarkdownRenderer: React.FC<MarkdownRendererProps>;
31
31
  export {};
32
- //# sourceMappingURL=MarkdownRenderer.d.ts.map
@@ -138,4 +138,3 @@ export const MarkdownRenderer = ({ text, media = true, pageProtocol, resolveLink
138
138
  return (_jsxs(React.Fragment, { children: [nodes.length > 0 ? nodes : line, lineIndex < lines.length - 1 && _jsx("br", {})] }, `line-${lineIndex}`));
139
139
  }) }));
140
140
  };
141
- //# sourceMappingURL=MarkdownRenderer.js.map
@@ -7,4 +7,3 @@ interface MessageBubbleProps {
7
7
  }
8
8
  export declare const MessageBubble: ({ children, isUser, timestamp, className, }: MessageBubbleProps) => import("react/jsx-runtime").JSX.Element;
9
9
  export {};
10
- //# sourceMappingURL=MessageBubble.d.ts.map
@@ -20,4 +20,3 @@ const bubbleVariants = {
20
20
  export const MessageBubble = ({ children, isUser = false, timestamp, className, }) => {
21
21
  return (_jsxs(BubbleContainer, { "$isUser": isUser, className: className, initial: "initial", animate: "animate", exit: "exit", variants: bubbleVariants, transition: { duration: 0.2, ease: "easeInOut" }, children: [_jsx(Bubble, { "$isUser": isUser, children: children }), timestamp && _jsx(Timestamp, { "$isUser": isUser, children: timestamp })] }));
22
22
  };
23
- //# sourceMappingURL=MessageBubble.js.map