@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,14 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { aeroTheme } from "../styles";
3
+ import { ConvaiLogo, ConviBubble, ConviMessageContainer, MessageHeader, ConviLabel, LogoWrapper, } from "../styles";
4
+ import { MarkdownRenderer } from "./MarkdownRenderer";
5
+ export const ConviMessage = ({ message, timestamp, className, showLogo = true, sender, }) => {
6
+ return (_jsxs(ConviMessageContainer, { className: className, children: [_jsxs(ConviBubble, { children: [showLogo && (_jsxs(MessageHeader, { children: [_jsx(LogoWrapper, { children: _jsx(ConvaiLogo, { size: "sm", color: "#10b981", animate: false, state: "connected" }) }), _jsx(ConviLabel, { children: sender })] })), _jsx(MarkdownRenderer, { text: message })] }), timestamp && (_jsx("span", { style: {
7
+ fontSize: aeroTheme.typography.sizes.caption,
8
+ color: aeroTheme.colors.text.secondary,
9
+ marginTop: 4,
10
+ alignSelf: "flex-start",
11
+ fontFamily: aeroTheme.typography.fontFamily.body,
12
+ }, children: timestamp }))] }));
13
+ };
14
+ //# sourceMappingURL=ConviMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConviMessage.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/ConviMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,UAAU,EACV,WAAW,EACX,qBAAqB,EACrB,aAAa,EACb,UAAU,EACV,WAAW,GACZ,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAUtD,MAAM,CAAC,MAAM,YAAY,GAAG,CAAC,EAC3B,OAAO,EACP,SAAS,EACT,SAAS,EACT,QAAQ,GAAG,IAAI,EACf,MAAM,GACY,EAAE,EAAE;IACtB,OAAO,CACL,MAAC,qBAAqB,IAAC,SAAS,EAAE,SAAS,aACzC,MAAC,WAAW,eACT,QAAQ,IAAI,CACX,MAAC,aAAa,eACZ,KAAC,WAAW,cACV,KAAC,UAAU,IACT,IAAI,EAAC,IAAI,EACT,KAAK,EAAC,SAAS,EACf,OAAO,EAAE,KAAK,EACd,KAAK,EAAC,WAAW,GACjB,GACU,EACd,KAAC,UAAU,cAAE,MAAM,GAAc,IACnB,CACjB,EACD,KAAC,gBAAgB,IAAC,IAAI,EAAE,OAAO,GAAI,IACvB,EACb,SAAS,IAAI,CACZ,eACE,KAAK,EAAE;oBACL,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO;oBAC5C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;oBACtC,SAAS,EAAE,CAAC;oBACZ,SAAS,EAAE,YAAY;oBACvB,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI;iBACjD,YAEA,SAAS,GACL,CACR,IACqB,CACzB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ import React from "react";
2
+ interface FloatingVideoProps {
3
+ isVisible: boolean;
4
+ onClose: () => void;
5
+ mirror?: boolean;
6
+ }
7
+ export declare const FloatingVideo: React.FC<FloatingVideoProps>;
8
+ export {};
9
+ //# sourceMappingURL=FloatingVideo.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingVideo.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/FloatingVideo.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA2B,MAAM,OAAO,CAAC;AAShD,UAAU,kBAAkB;IAC1B,SAAS,EAAE,OAAO,CAAC;IACnB,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;CAClB;AA4DD,eAAO,MAAM,aAAa,EAAE,KAAK,CAAC,EAAE,CAAC,kBAAkB,CA+ItD,CAAC"}
@@ -0,0 +1,122 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { useRef, useState } from "react";
3
+ import { motion } from "framer-motion";
4
+ import { VideoTrack, RoomContext, useRoomContext } from "@livekit/components-react";
5
+ import { IoClose, IoVideocamOff } from "react-icons/io5";
6
+ import { MdDragIndicator } from "react-icons/md";
7
+ import { aeroTheme } from "../styles/theme";
8
+ import { iosTransitions } from "../styles/framerConfig";
9
+ import { useLocalCameraTrack } from "../../../hooks/useLocalCameraTrack";
10
+ /**
11
+ * LocalVideoDisplay component for rendering local camera feed inside FloatingVideo.
12
+ */
13
+ const LocalVideoDisplay = ({ mirror = false }) => {
14
+ const cameraTrackRef = useLocalCameraTrack();
15
+ // Check if camera track is available (for local participant, check if track exists)
16
+ if (!cameraTrackRef.publication?.track) {
17
+ return (_jsxs("div", { style: {
18
+ width: "100%",
19
+ height: "100%",
20
+ display: "flex",
21
+ flexDirection: "column",
22
+ alignItems: "center",
23
+ justifyContent: "center",
24
+ color: aeroTheme.colors.neutral[400],
25
+ gap: "12px",
26
+ background: "#000",
27
+ }, children: [_jsx(IoVideocamOff, { size: 48 }), _jsx("span", { style: { fontSize: "14px", textAlign: "center" }, children: "Camera is off" })] }));
28
+ }
29
+ return (_jsx("div", { style: {
30
+ width: "100%",
31
+ height: "100%",
32
+ position: "relative",
33
+ }, children: _jsx("div", { style: {
34
+ transform: mirror ? "scaleX(-1)" : "none",
35
+ width: "100%",
36
+ height: "100%",
37
+ }, children: _jsx(VideoTrack, { trackRef: cameraTrackRef, style: {
38
+ width: "100%",
39
+ height: "100%",
40
+ objectFit: "cover",
41
+ } }) }) }));
42
+ };
43
+ export const FloatingVideo = ({ isVisible, onClose, mirror = true, }) => {
44
+ const room = useRoomContext(); // Get room from parent RoomContext
45
+ const [position, setPosition] = useState({ x: 20, y: 20 });
46
+ const [isDragging, setIsDragging] = useState(false);
47
+ const containerRef = useRef(null);
48
+ const handleDragEnd = (event, info) => {
49
+ setIsDragging(false);
50
+ // Get window dimensions
51
+ const windowWidth = window.innerWidth;
52
+ const windowHeight = window.innerHeight;
53
+ // Get container dimensions
54
+ const containerWidth = containerRef.current?.offsetWidth || 320;
55
+ const containerHeight = containerRef.current?.offsetHeight || 240;
56
+ // Calculate new position with boundary constraints
57
+ let newX = position.x + info.offset.x;
58
+ let newY = position.y + info.offset.y;
59
+ // Keep within bounds
60
+ newX = Math.max(0, Math.min(newX, windowWidth - containerWidth));
61
+ newY = Math.max(0, Math.min(newY, windowHeight - containerHeight));
62
+ setPosition({ x: newX, y: newY });
63
+ };
64
+ if (!isVisible)
65
+ return null;
66
+ // Wrap in RoomContext.Provider to ensure room is available to child components
67
+ return (_jsx(RoomContext.Provider, { value: room, children: _jsx(motion.div, { ref: containerRef, drag: true, dragMomentum: false, dragElastic: 0, onDragStart: () => setIsDragging(true), onDragEnd: handleDragEnd, initial: { opacity: 0, scale: 0.8 }, animate: { opacity: 1, scale: 1 }, exit: { opacity: 0, scale: 0.8 }, transition: iosTransitions.modalSlide, style: {
68
+ position: "fixed",
69
+ left: position.x,
70
+ top: position.y,
71
+ zIndex: 10000,
72
+ width: "320px",
73
+ borderRadius: aeroTheme.borderRadius.lg,
74
+ overflow: "hidden",
75
+ boxShadow: "0 8px 32px rgba(0, 0, 0, 0.3)",
76
+ cursor: isDragging ? "grabbing" : "grab",
77
+ }, children: _jsxs("div", { style: {
78
+ background: "rgba(15, 23, 42, 0.95)",
79
+ backdropFilter: "blur(20px)",
80
+ border: `1px solid ${aeroTheme.colors.neutral[700]}`,
81
+ borderRadius: aeroTheme.borderRadius.lg,
82
+ overflow: "hidden",
83
+ }, children: [_jsxs("div", { style: {
84
+ display: "flex",
85
+ alignItems: "center",
86
+ justifyContent: "space-between",
87
+ padding: "8px 12px",
88
+ background: "rgba(0, 0, 0, 0.3)",
89
+ borderBottom: `1px solid ${aeroTheme.colors.neutral[700]}`,
90
+ }, children: [_jsxs("div", { style: {
91
+ display: "flex",
92
+ alignItems: "center",
93
+ gap: "8px",
94
+ color: aeroTheme.colors.neutral[300],
95
+ fontSize: "12px",
96
+ fontWeight: 500,
97
+ }, children: [_jsx(MdDragIndicator, { size: 16 }), _jsx("span", { children: "Your Camera" })] }), _jsx(motion.button, { onPointerDown: (e) => e.stopPropagation(), onClick: (e) => {
98
+ e.stopPropagation();
99
+ onClose();
100
+ }, whileHover: { scale: 1.1 }, whileTap: { scale: 0.9 }, style: {
101
+ background: "transparent",
102
+ border: "none",
103
+ color: aeroTheme.colors.neutral[400],
104
+ cursor: "pointer",
105
+ display: "flex",
106
+ alignItems: "center",
107
+ justifyContent: "center",
108
+ padding: "4px",
109
+ }, "aria-label": "Close video", children: _jsx(IoClose, { size: 20 }) })] }), _jsx("div", { style: {
110
+ position: "relative",
111
+ width: "100%",
112
+ paddingBottom: "75%", // 4:3 aspect ratio
113
+ background: "#000",
114
+ }, children: _jsx("div", { style: {
115
+ position: "absolute",
116
+ top: 0,
117
+ left: 0,
118
+ width: "100%",
119
+ height: "100%",
120
+ }, children: _jsx(LocalVideoDisplay, { mirror: mirror }) }) })] }) }) }));
121
+ };
122
+ //# sourceMappingURL=FloatingVideo.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"FloatingVideo.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/FloatingVideo.tsx"],"names":[],"mappings":";AAAA,OAAc,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,OAAO,CAAC;AAChD,OAAO,EAAE,MAAM,EAAW,MAAM,eAAe,CAAC;AAChD,OAAO,EAAE,UAAU,EAAE,WAAW,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AACpF,OAAO,EAAE,OAAO,EAAE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E,QAAQ;oCACpB,cAAc,EAAE,QAAQ;oCACxB,OAAO,EAAE,KAAK;iCACf,gBACU,aAAa,YAExB,KAAC,OAAO,IAAC,IAAI,EAAE,EAAE,GAAI,GACP,IACZ,EAGN,cACE,KAAK,EAAE;4BACL,QAAQ,EAAE,UAAU;4BACpB,KAAK,EAAE,MAAM;4BACb,aAAa,EAAE,KAAK,EAAE,mBAAmB;4BACzC,UAAU,EAAE,MAAM;yBACnB,YAED,cACE,KAAK,EAAE;gCACL,QAAQ,EAAE,UAAU;gCACpB,GAAG,EAAE,CAAC;gCACN,IAAI,EAAE,CAAC;gCACP,KAAK,EAAE,MAAM;gCACb,MAAM,EAAE,MAAM;6BACf,YAED,KAAC,iBAAiB,IAAC,MAAM,EAAE,MAAM,GAAI,GACjC,GACF,IACF,GACK,GACQ,CACxB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,7 @@
1
+ import React from "react";
2
+ interface MarkdownRendererProps {
3
+ text: string;
4
+ }
5
+ export declare const MarkdownRenderer: React.FC<MarkdownRendererProps>;
6
+ export {};
7
+ //# sourceMappingURL=MarkdownRenderer.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/MarkdownRenderer.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,UAAU,qBAAqB;IAC7B,IAAI,EAAE,MAAM,CAAC;CACd;AAED,eAAO,MAAM,gBAAgB,EAAE,KAAK,CAAC,EAAE,CAAC,qBAAqB,CAmG5D,CAAC"}
@@ -0,0 +1,68 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React from "react";
3
+ export const MarkdownRenderer = ({ text }) => {
4
+ // Convert markdown to JSX elements
5
+ const renderMarkdown = (input) => {
6
+ if (!input)
7
+ return null;
8
+ // Handle both actual newlines and \n escape sequences
9
+ // Replace literal \n strings with actual newlines
10
+ const normalizedText = input.replace(/\\n/g, '\n');
11
+ // Split by actual newlines
12
+ const lines = normalizedText.split('\n');
13
+ return lines.map((line, lineIndex) => {
14
+ // Process markdown within each line
15
+ const processLine = (text) => {
16
+ const parts = [];
17
+ let remaining = text;
18
+ let keyCounter = 0;
19
+ // Process bold and italic markdown
20
+ // Bold: **text** or __text__
21
+ // Italic: *text* or _text_
22
+ const markdownRegex = /(\*\*|__)(.*?)\1|\*([^*]+)\*|_([^_]+)_/g;
23
+ let lastIndex = 0;
24
+ let match;
25
+ while ((match = markdownRegex.exec(remaining)) !== null) {
26
+ // Add text before the match
27
+ if (match.index > lastIndex) {
28
+ const textBefore = remaining.substring(lastIndex, match.index);
29
+ if (textBefore) {
30
+ parts.push(_jsx(React.Fragment, { children: textBefore }, `text-${lineIndex}-${keyCounter++}`));
31
+ }
32
+ }
33
+ // Determine if it's bold or italic
34
+ if (match[1] && match[2]) {
35
+ // Bold text (** or __)
36
+ parts.push(_jsx("strong", { children: match[2] }, `bold-${lineIndex}-${keyCounter++}`));
37
+ }
38
+ else if (match[3]) {
39
+ // Italic text (*)
40
+ parts.push(_jsx("em", { children: match[3] }, `italic-${lineIndex}-${keyCounter++}`));
41
+ }
42
+ else if (match[4]) {
43
+ // Italic text (_)
44
+ parts.push(_jsx("em", { children: match[4] }, `italic-${lineIndex}-${keyCounter++}`));
45
+ }
46
+ lastIndex = match.index + match[0].length;
47
+ }
48
+ // Add remaining text
49
+ if (lastIndex < remaining.length) {
50
+ const textAfter = remaining.substring(lastIndex);
51
+ if (textAfter) {
52
+ parts.push(_jsx(React.Fragment, { children: textAfter }, `text-${lineIndex}-${keyCounter++}`));
53
+ }
54
+ }
55
+ return parts;
56
+ };
57
+ const processedLine = processLine(line);
58
+ // Handle empty lines (creates paragraph spacing)
59
+ if (line.trim() === "" && lineIndex > 0) {
60
+ return _jsx("br", {}, `br-${lineIndex}`);
61
+ }
62
+ // Return the line with line break
63
+ return (_jsxs(React.Fragment, { children: [processedLine.length > 0 ? processedLine : line, lineIndex < lines.length - 1 && _jsx("br", {})] }, `line-${lineIndex}`));
64
+ });
65
+ };
66
+ return _jsx("div", { style: { whiteSpace: 'pre-wrap', wordWrap: 'break-word' }, children: renderMarkdown(text) });
67
+ };
68
+ //# sourceMappingURL=MarkdownRenderer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MarkdownRenderer.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/MarkdownRenderer.tsx"],"names":[],"mappings":";AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,MAAM,CAAC,MAAM,gBAAgB,GAAoC,CAAC,EAAE,IAAI,EAAE,EAAE,EAAE;IAC5E,mCAAmC;IACnC,MAAM,cAAc,GAAG,CAAC,KAAa,EAAmB,EAAE;QACxD,IAAI,CAAC,KAAK;YAAE,OAAO,IAAI,CAAC;QAExB,sDAAsD;QACtD,kDAAkD;QAClD,MAAM,cAAc,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;QAEnD,2BAA2B;QAC3B,MAAM,KAAK,GAAG,cAAc,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;QAEzC,OAAO,KAAK,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,SAAS,EAAE,EAAE;YACnC,oCAAoC;YACpC,MAAM,WAAW,GAAG,CAAC,IAAY,EAAqB,EAAE;gBACtD,MAAM,KAAK,GAAsB,EAAE,CAAC;gBACpC,IAAI,SAAS,GAAG,IAAI,CAAC;gBACrB,IAAI,UAAU,GAAG,CAAC,CAAC;gBAEnB,mCAAmC;gBACnC,6BAA6B;gBAC7B,2BAA2B;gBAC3B,MAAM,aAAa,GAAG,yCAAyC,CAAC;gBAChE,IAAI,SAAS,GAAG,CAAC,CAAC;gBAClB,IAAI,KAAK,CAAC;gBAEV,OAAO,CAAC,KAAK,GAAG,aAAa,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,KAAK,IAAI,EAAE,CAAC;oBAC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I,SAAS,EAAE,CAAC;wBACd,KAAK,CAAC,IAAI,CACR,KAAC,KAAK,CAAC,QAAQ,cACZ,SAAS,IADS,QAAQ,SAAS,IAAI,UAAU,EAAE,EAAE,CAEvC,CAClB,CAAC;oBACJ,CAAC;gBACH,CAAC;gBAED,OAAO,KAAK,CAAC;YACf,CAAC,CAAC;YAEF,MAAM,aAAa,GAAG,WAAW,CAAC,IAAI,CAAC,CAAC;YAExC,iDAAiD;YACjD,IAAI,IAAI,CAAC,IAAI,EAAE,KAAK,EAAE,IAAI,SAAS,GAAG,CAAC,EAAE,CAAC;gBACxC,OAAO,eAAS,MAAM,SAAS,EAAE,CAAI,CAAC;YACxC,CAAC;YAED,kCAAkC;YAClC,OAAO,CACL,MAAC,KAAK,CAAC,QAAQ,eACZ,aAAa,CAAC,MAAM,GAAG,CAAC,CAAC,CAAC,CAAC,aAAa,CAAC,CAAC,CAAC,IAAI,EAC/C,SAAS,GAAG,KAAK,CAAC,MAAM,GAAG,CAAC,IAAI,cAAM,KAFpB,QAAQ,SAAS,EAAE,CAGvB,CAClB,CAAC;QACJ,CAAC,CAAC,CAAC;IACL,CAAC,CAAC;IAEF,OAAO,cAAK,KAAK,EAAE,EAAE,UAAU,EAAE,UAAU,EAAE,QAAQ,EAAE,YAAY,EAAE,YAAG,cAAc,CAAC,IAAI,CAAC,GAAO,CAAC;AACtG,CAAC,CAAC"}
@@ -0,0 +1,10 @@
1
+ import React from "react";
2
+ interface MessageBubbleProps {
3
+ children: React.ReactNode;
4
+ isUser?: boolean;
5
+ timestamp?: string;
6
+ className?: string;
7
+ }
8
+ export declare const MessageBubble: ({ children, isUser, timestamp, className, }: MessageBubbleProps) => import("react/jsx-runtime").JSX.Element;
9
+ export {};
10
+ //# sourceMappingURL=MessageBubble.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageBubble.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/MessageBubble.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAG1B,UAAU,kBAAkB;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAoBD,eAAO,MAAM,aAAa,GAAI,6CAK3B,kBAAkB,4CAepB,CAAC"}
@@ -0,0 +1,23 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { BubbleContainer, Bubble, Timestamp } from "../styles";
3
+ const bubbleVariants = {
4
+ initial: {
5
+ opacity: 0,
6
+ y: 20,
7
+ scale: 0.95,
8
+ },
9
+ animate: {
10
+ opacity: 1,
11
+ y: 0,
12
+ scale: 1,
13
+ },
14
+ exit: {
15
+ opacity: 0,
16
+ y: -10,
17
+ scale: 0.95,
18
+ },
19
+ };
20
+ export const MessageBubble = ({ children, isUser = false, timestamp, className, }) => {
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
+ };
23
+ //# sourceMappingURL=MessageBubble.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageBubble.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/MessageBubble.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,eAAe,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AAS/D,MAAM,cAAc,GAAG;IACrB,OAAO,EAAE;QACP,OAAO,EAAE,CAAC;QACV,CAAC,EAAE,EAAE;QACL,KAAK,EAAE,IAAI;KACZ;IACD,OAAO,EAAE;QACP,OAAO,EAAE,CAAC;QACV,CAAC,EAAE,CAAC;QACJ,KAAK,EAAE,CAAC;KACT;IACD,IAAI,EAAE;QACJ,OAAO,EAAE,CAAC;QACV,CAAC,EAAE,CAAC,EAAE;QACN,KAAK,EAAE,IAAI;KACZ;CACF,CAAC;AAEF,MAAM,CAAC,MAAM,aAAa,GAAG,CAAC,EAC5B,QAAQ,EACR,MAAM,GAAG,KAAK,EACd,SAAS,EACT,SAAS,GACU,EAAE,EAAE;IACvB,OAAO,CACL,MAAC,eAAe,eACL,MAAM,EACf,SAAS,EAAE,SAAS,EACpB,OAAO,EAAC,SAAS,EACjB,OAAO,EAAC,SAAS,EACjB,IAAI,EAAC,MAAM,EACX,QAAQ,EAAE,cAAc,EACxB,UAAU,EAAE,EAAE,QAAQ,EAAE,GAAG,EAAE,IAAI,EAAE,WAAW,EAAE,aAEhD,KAAC,MAAM,eAAU,MAAM,YAAG,QAAQ,GAAU,EAC3C,SAAS,IAAI,KAAC,SAAS,eAAU,MAAM,YAAG,SAAS,GAAa,IACjD,CACnB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,11 @@
1
+ import { RTCChatMessage } from "../types";
2
+ type Message = RTCChatMessage;
3
+ interface MessageListProps {
4
+ messages: Message[];
5
+ className?: string;
6
+ isStreaming?: boolean;
7
+ forceToBottomToken?: string | number | boolean;
8
+ }
9
+ export declare const MessageList: ({ messages, className, isStreaming, forceToBottomToken, }: MessageListProps) => import("react/jsx-runtime").JSX.Element;
10
+ export {};
11
+ //# sourceMappingURL=MessageList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageList.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/MessageList.tsx"],"names":[],"mappings":"AAKA,OAAO,EAAE,cAAc,EAAE,MAAM,UAAU,CAAC;AAE1C,KAAK,OAAO,GAAG,cAAc,CAAC;AAE9B,UAAU,gBAAgB;IACxB,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,kBAAkB,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC;CAChD;AAED,eAAO,MAAM,WAAW,GAAI,2DAKzB,gBAAgB,4CAsHlB,CAAC"}
@@ -0,0 +1,89 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import React, { useRef, useEffect, useCallback } from "react";
3
+ import { UserMessage } from "./UserMessage";
4
+ import { ConviMessage } from "./ConviMessage";
5
+ import { aeroTheme } from "../styles";
6
+ import { MessageListContainer, MessageWrapper, EmptyState } from "../styles";
7
+ export const MessageList = ({ messages, className, isStreaming = false, forceToBottomToken, }) => {
8
+ const containerRef = useRef(null);
9
+ const [shouldAutoScroll, setShouldAutoScroll] = React.useState(true);
10
+ // Handle scroll events
11
+ const handleScroll = useCallback((e) => {
12
+ const { scrollTop, scrollHeight, clientHeight } = e.currentTarget;
13
+ // Check if user is near bottom (within 100px)
14
+ const isNearBottom = scrollHeight - scrollTop - clientHeight < 100;
15
+ setShouldAutoScroll(isNearBottom);
16
+ }, []);
17
+ // Auto-scroll to bottom
18
+ const scrollToBottom = useCallback(() => {
19
+ const el = containerRef.current;
20
+ if (!el || !shouldAutoScroll)
21
+ return;
22
+ try {
23
+ el.scrollTo({ top: el.scrollHeight, behavior: isStreaming ? "smooth" : "auto" });
24
+ }
25
+ catch {
26
+ // Fallback for older browsers
27
+ el.scrollTop = el.scrollHeight;
28
+ }
29
+ }, [shouldAutoScroll, isStreaming]);
30
+ const scrollToBottomImmediate = useCallback(() => {
31
+ const el = containerRef.current;
32
+ if (!el)
33
+ return;
34
+ try {
35
+ el.scrollTo({ top: el.scrollHeight, behavior: "auto" });
36
+ }
37
+ catch {
38
+ el.scrollTop = el.scrollHeight;
39
+ }
40
+ }, []);
41
+ // Scroll to bottom on new messages
42
+ useEffect(() => {
43
+ if (messages.length > 0) {
44
+ // Use requestAnimationFrame to ensure DOM is updated
45
+ requestAnimationFrame(() => {
46
+ scrollToBottom();
47
+ });
48
+ }
49
+ }, [messages.length, scrollToBottom]);
50
+ // Observe size changes to keep smooth auto-scroll when message content grows
51
+ useEffect(() => {
52
+ const el = containerRef.current;
53
+ if (!el || typeof ResizeObserver === "undefined")
54
+ return;
55
+ const observer = new ResizeObserver(() => {
56
+ if (!shouldAutoScroll)
57
+ return;
58
+ // Smooth during streaming, instant otherwise to prevent bounce at finalization
59
+ try {
60
+ el.scrollTo({ top: el.scrollHeight, behavior: isStreaming ? "smooth" : "auto" });
61
+ }
62
+ catch {
63
+ el.scrollTop = el.scrollHeight;
64
+ }
65
+ });
66
+ observer.observe(el);
67
+ return () => observer.disconnect();
68
+ }, [shouldAutoScroll, isStreaming]);
69
+ // Force bottom when token changes (e.g., when chat opens or after reload)
70
+ useEffect(() => {
71
+ if (forceToBottomToken !== undefined) {
72
+ requestAnimationFrame(() => scrollToBottomImmediate());
73
+ }
74
+ }, [forceToBottomToken, scrollToBottomImmediate]);
75
+ // Initial scroll to bottom
76
+ useEffect(() => {
77
+ if (containerRef.current && messages.length > 0) {
78
+ containerRef.current.scrollTop = containerRef.current.scrollHeight;
79
+ }
80
+ }, []);
81
+ if (messages.length === 0) {
82
+ return (_jsxs(EmptyState, { children: [_jsx("p", { children: "Start a conversation" }), _jsx("p", { style: {
83
+ fontSize: aeroTheme.typography.sizes.caption,
84
+ marginTop: 8,
85
+ }, children: "Type a message below to begin chatting" })] }));
86
+ }
87
+ return (_jsx(MessageListContainer, { ref: containerRef, className: className, onScroll: handleScroll, children: messages.map((message) => (_jsx(MessageWrapper, { children: message.isUser ? (_jsx(UserMessage, { message: message.text, timestamp: message.timestamp, sender: message.sender })) : (_jsx(ConviMessage, { message: message.text, timestamp: message.timestamp, showLogo: message.showLogo, sender: message.sender })) }, message.id))) }));
88
+ };
89
+ //# sourceMappingURL=MessageList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"MessageList.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/MessageList.tsx"],"names":[],"mappings":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G,CAAC,CAAC,OAAgB,EAAE,EAAE,CAAC,CAClC,KAAC,cAAc,cACZ,OAAO,CAAC,MAAM,CAAC,CAAC,CAAC,CAChB,KAAC,WAAW,IACV,OAAO,EAAE,OAAO,CAAC,IAAI,EACrB,SAAS,EAAE,OAAO,CAAC,SAAS,EAC5B,MAAM,EAAE,OAAO,CAAC,MAAM,GACtB,CACH,CAAC,CAAC,CAAC,CACF,KAAC,YAAY,IACX,OAAO,EAAE,OAAO,CAAC,IAAI,EACrB,SAAS,EAAE,OAAO,CAAC,SAAS,EAC5B,QAAQ,EAAE,OAAO,CAAC,QAAQ,EAC1B,MAAM,EAAE,OAAO,CAAC,MAAM,GACtB,CACH,IAdkB,OAAO,CAAC,EAAE,CAed,CAClB,CAAC,GACmB,CACxB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,9 @@
1
+ interface UserMessageProps {
2
+ message: string;
3
+ timestamp?: string;
4
+ className?: string;
5
+ sender?: string;
6
+ }
7
+ export declare const UserMessage: ({ message, timestamp, className, sender, }: UserMessageProps) => import("react/jsx-runtime").JSX.Element;
8
+ export {};
9
+ //# sourceMappingURL=UserMessage.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserMessage.d.ts","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/UserMessage.tsx"],"names":[],"mappings":"AAaA,UAAU,gBAAgB;IACxB,OAAO,EAAE,MAAM,CAAC;IAChB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,GAAI,4CAKzB,gBAAgB,4CA6BlB,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { aeroTheme } from "../styles";
3
+ import { UserBubble, UserMessageContainer, MessageHeader, UserLabel, LogoWrapper, } from "../styles";
4
+ import { FaUser } from "react-icons/fa";
5
+ import { MarkdownRenderer } from "./MarkdownRenderer";
6
+ export const UserMessage = ({ message, timestamp, className, sender, }) => {
7
+ return (_jsxs(UserMessageContainer, { className: className, children: [_jsxs(UserBubble, { children: [sender && (_jsxs(MessageHeader, { children: [_jsx(LogoWrapper, { children: _jsx(FaUser, { size: 16, color: aeroTheme.colors.convai.dark }) }), _jsx(UserLabel, { children: sender === "User" ? "You" : sender })] })), _jsx(MarkdownRenderer, { text: message })] }), timestamp && (_jsx("span", { style: {
8
+ fontSize: aeroTheme.typography.sizes.caption,
9
+ color: aeroTheme.colors.text.secondary,
10
+ marginTop: 4,
11
+ alignSelf: "flex-end",
12
+ fontFamily: aeroTheme.typography.fontFamily.body,
13
+ }, children: timestamp }))] }));
14
+ };
15
+ //# sourceMappingURL=UserMessage.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"UserMessage.js","sourceRoot":"","sources":["../../../../../src/react/components/rtc-widget/components/UserMessage.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAC;AACtC,OAAO,EACL,UAAU,EACV,oBAAoB,EACpB,aAAa,EACb,SAAS,EACT,WAAW,GACZ,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,MAAM,EAAE,MAAM,gBAAgB,CAAC;AACxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AAStD,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAC1B,OAAO,EACP,SAAS,EACT,SAAS,EACT,MAAM,GACW,EAAE,EAAE;IACrB,OAAO,CACL,MAAC,oBAAoB,IAAC,SAAS,EAAE,SAAS,aACxC,MAAC,UAAU,eACR,MAAM,IAAI,CACT,MAAC,aAAa,eACZ,KAAC,WAAW,cACV,KAAC,MAAM,IAAC,IAAI,EAAE,EAAE,EAAE,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,MAAM,CAAC,IAAI,GAAI,GAC7C,EACd,KAAC,SAAS,cAAE,MAAM,KAAK,MAAM,CAAC,CAAC,CAAC,KAAK,CAAC,CAAC,CAAC,MAAM,GAAa,IAC7C,CACjB,EACD,KAAC,gBAAgB,IAAC,IAAI,EAAE,OAAO,GAAI,IACxB,EACZ,SAAS,IAAI,CACZ,eACE,KAAK,EAAE;oBACL,QAAQ,EAAE,SAAS,CAAC,UAAU,CAAC,KAAK,CAAC,OAAO;oBAC5C,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS;oBACtC,SAAS,EAAE,CAAC;oBACZ,SAAS,EAAE,UAAU;oBACrB,UAAU,EAAE,SAAS,CAAC,UAAU,CAAC,UAAU,CAAC,IAAI;iBACjD,YAEA,SAAS,GACL,CACR,IACoB,CACxB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,6 @@
1
+ interface ConviButtonProps {
2
+ isOpen: boolean;
3
+ }
4
+ export declare const ConviButton: ({ isOpen }: ConviButtonProps) => import("react/jsx-runtime").JSX.Element;
5
+ export {};
6
+ //# sourceMappingURL=ConviButton.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConviButton.d.ts","sourceRoot":"","sources":["../../../../../../src/react/components/rtc-widget/components/conviComponents/ConviButton.tsx"],"names":[],"mappings":"AAMA,UAAU,gBAAgB;IACxB,MAAM,EAAE,OAAO,CAAC;CACjB;AAED,eAAO,MAAM,WAAW,GAAI,YAAY,gBAAgB,4CAyBvD,CAAC"}
@@ -0,0 +1,15 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { ConvaiLogo } from "../../styles/icons";
3
+ import { aeroTheme } from "../../styles/theme";
4
+ import { iosTransitions } from "../../styles/framerConfig";
5
+ import { ButtonContent, Logo } from "../../styles/styledComponents";
6
+ export const ConviButton = ({ isOpen }) => {
7
+ return (_jsx(ButtonContent, { animate: {
8
+ opacity: isOpen ? 0 : 1,
9
+ scale: isOpen ? 0.8 : 1,
10
+ }, transition: {
11
+ duration: 0.3,
12
+ ease: "easeInOut",
13
+ }, children: _jsx(Logo, { animate: { rotate: isOpen ? 90 : 0 }, transition: iosTransitions.layoutMorph, children: _jsx(ConvaiLogo, { size: "xl", color: aeroTheme.colors.primary[500], animate: isOpen, state: isOpen ? "connected" : "idle" }) }) }));
14
+ };
15
+ //# sourceMappingURL=ConviButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConviButton.js","sourceRoot":"","sources":["../../../../../../src/react/components/rtc-widget/components/conviComponents/ConviButton.tsx"],"names":[],"mappings":";AACA,OAAO,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,oBAAoB,CAAC;AAC/C,OAAO,EAAE,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAC3D,OAAO,EAAE,aAAa,EAAE,IAAI,EAAE,MAAM,+BAA+B,CAAC;AAMpE,MAAM,CAAC,MAAM,WAAW,GAAG,CAAC,EAAE,MAAM,EAAoB,EAAE,EAAE;IAC1D,OAAO,CACL,KAAC,aAAa,IACZ,OAAO,EAAE;YACP,OAAO,EAAE,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC;YACvB,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;SACxB,EACD,UAAU,EAAE;YACV,QAAQ,EAAE,GAAG;YACb,IAAI,EAAE,WAAW;SAClB,YAED,KAAC,IAAI,IACH,OAAO,EAAE,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,CAAC,EAAE,EACpC,UAAU,EAAE,cAAc,CAAC,WAAW,YAEtC,KAAC,UAAU,IACT,IAAI,EAAC,IAAI,EACT,KAAK,EAAE,SAAS,CAAC,MAAM,CAAC,OAAO,CAAC,GAAG,CAAC,EACpC,OAAO,EAAE,MAAM,EACf,KAAK,EAAE,MAAM,CAAC,CAAC,CAAC,WAAW,CAAC,CAAC,CAAC,MAAM,GACpC,GACG,GACO,CACjB,CAAC;AACJ,CAAC,CAAC"}
@@ -0,0 +1,25 @@
1
+ import React from "react";
2
+ interface ConviFooterProps {
3
+ inputMode: "conversation" | "speaker" | "voice" | "verbosity";
4
+ inputValue: string;
5
+ liveUserText: string;
6
+ chatbotMic: boolean;
7
+ localIsTyping: boolean;
8
+ convaiIsTyping: boolean;
9
+ isCreatingSpeaker: boolean;
10
+ isPressingMic: boolean;
11
+ isSettingsOpen: boolean;
12
+ isVoiceMode: boolean;
13
+ onInputChange: (e: React.ChangeEvent<HTMLInputElement>) => void;
14
+ onKeyPress: (e: React.KeyboardEvent) => void;
15
+ onSend: () => void;
16
+ onMicPress: () => void;
17
+ onMicRelease: () => void;
18
+ setIsPressingMic: (value: boolean) => void;
19
+ onToggleVoiceMode: () => void;
20
+ verbosityChanged?: boolean;
21
+ onContinue?: () => void;
22
+ }
23
+ export declare const ConviFooter: ({ inputMode, inputValue, liveUserText, chatbotMic, localIsTyping, convaiIsTyping, isCreatingSpeaker, isPressingMic, isSettingsOpen, isVoiceMode, onInputChange, onKeyPress, onSend, onMicPress, onMicRelease, setIsPressingMic, onToggleVoiceMode, verbosityChanged, onContinue, }: ConviFooterProps) => import("react/jsx-runtime").JSX.Element;
24
+ export {};
25
+ //# sourceMappingURL=ConviFooter.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConviFooter.d.ts","sourceRoot":"","sources":["../../../../../../src/react/components/rtc-widget/components/conviComponents/ConviFooter.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAa1B,UAAU,gBAAgB;IACxB,SAAS,EAAE,cAAc,GAAG,SAAS,GAAG,OAAO,GAAG,WAAW,CAAC;IAC9D,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,OAAO,CAAC;IAC3B,aAAa,EAAE,OAAO,CAAC;IACvB,cAAc,EAAE,OAAO,CAAC;IACxB,WAAW,EAAE,OAAO,CAAC;IACrB,aAAa,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,WAAW,CAAC,gBAAgB,CAAC,KAAK,IAAI,CAAC;IAChE,UAAU,EAAE,CAAC,CAAC,EAAE,KAAK,CAAC,aAAa,KAAK,IAAI,CAAC;IAC7C,MAAM,EAAE,MAAM,IAAI,CAAC;IACnB,UAAU,EAAE,MAAM,IAAI,CAAC;IACvB,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,gBAAgB,EAAE,CAAC,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IAC3C,iBAAiB,EAAE,MAAM,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,eAAO,MAAM,WAAW,GAAI,oRAoBzB,gBAAgB,4CA2RlB,CAAC"}