@memori.ai/memori-react 8.45.2 → 8.45.5

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 (729) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/dist/components/Chat/Chat.d.ts +1 -0
  3. package/dist/components/Chat/Chat.js +6 -3
  4. package/dist/components/Chat/Chat.js.map +1 -1
  5. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.css +78 -0
  6. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +39 -0
  7. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js +43 -0
  8. package/dist/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -0
  9. package/dist/components/ChatInputs/ChatInputs.d.ts +1 -0
  10. package/dist/components/ChatInputs/ChatInputs.js +2 -2
  11. package/dist/components/ChatInputs/ChatInputs.js.map +1 -1
  12. package/dist/components/ContentPreviewModal/DocumentMarkdown.d.ts +7 -0
  13. package/dist/components/ContentPreviewModal/DocumentMarkdown.js +31 -0
  14. package/dist/components/ContentPreviewModal/DocumentMarkdown.js.map +1 -0
  15. package/dist/components/DrawerFooter/DrawerFooter.css +62 -0
  16. package/dist/components/DrawerFooter/DrawerFooter.d.ts +12 -0
  17. package/dist/components/DrawerFooter/DrawerFooter.js +10 -0
  18. package/dist/components/DrawerFooter/DrawerFooter.js.map +1 -0
  19. package/dist/components/IconButton/IconButton.css +135 -0
  20. package/dist/components/IconButton/IconButton.d.ts +9 -0
  21. package/dist/components/IconButton/IconButton.js +36 -0
  22. package/dist/components/IconButton/IconButton.js.map +1 -0
  23. package/dist/components/LoginModal/LoginModal.css +270 -0
  24. package/dist/components/LoginModal/LoginModal.d.ts +19 -0
  25. package/dist/components/LoginModal/LoginModal.js +355 -0
  26. package/dist/components/LoginModal/LoginModal.js.map +1 -0
  27. package/dist/components/MemoriWidget/MemoriWidget.d.ts +2 -2
  28. package/dist/components/MemoriWidget/MemoriWidget.js +13 -21
  29. package/dist/components/MemoriWidget/MemoriWidget.js.map +1 -1
  30. package/dist/components/MobileSessionPanel/MobileSessionPanel.css +540 -0
  31. package/dist/components/MobileSessionPanel/MobileSessionPanel.d.ts +65 -0
  32. package/dist/components/MobileSessionPanel/MobileSessionPanel.js +254 -0
  33. package/dist/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
  34. package/dist/components/PositionPopover/PositionPopover.css +218 -0
  35. package/dist/components/PositionPopover/PositionPopover.d.ts +22 -0
  36. package/dist/components/PositionPopover/PositionPopover.js +208 -0
  37. package/dist/components/PositionPopover/PositionPopover.js.map +1 -0
  38. package/dist/components/ReasoningBlock/ReasoningBlock.css +156 -0
  39. package/dist/components/ReasoningBlock/ReasoningBlock.d.ts +7 -0
  40. package/dist/components/ReasoningBlock/ReasoningBlock.js +61 -0
  41. package/dist/components/ReasoningBlock/ReasoningBlock.js.map +1 -0
  42. package/dist/components/SideDrawer/SideDrawer.css +112 -0
  43. package/dist/components/SideDrawer/SideDrawer.d.ts +22 -0
  44. package/dist/components/SideDrawer/SideDrawer.js +17 -0
  45. package/dist/components/SideDrawer/SideDrawer.js.map +1 -0
  46. package/dist/components/UploadButton/UploadButton.d.ts +2 -0
  47. package/dist/components/UploadButton/UploadButton.js +2 -2
  48. package/dist/components/UploadButton/UploadButton.js.map +1 -1
  49. package/dist/components/UploadButton/UploadImages/UploadImages.d.ts +2 -0
  50. package/dist/components/UploadButton/UploadImages/UploadImages.js +7 -1
  51. package/dist/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
  52. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +4 -0
  53. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js +144 -0
  54. package/dist/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -0
  55. package/{src/components/layouts → dist/components/layouts/WebsiteAssistant}/website-assistant.css +298 -86
  56. package/dist/components/layouts/chat.css +27 -4
  57. package/dist/components/layouts/fullpage.css +628 -0
  58. package/dist/helpers/artifactPanel.d.ts +6 -0
  59. package/dist/helpers/artifactPanel.js +42 -0
  60. package/dist/helpers/artifactPanel.js.map +1 -0
  61. package/dist/helpers/chatScroll.d.ts +12 -0
  62. package/dist/helpers/chatScroll.js +14 -0
  63. package/dist/helpers/chatScroll.js.map +1 -0
  64. package/dist/helpers/conversationHistory.d.ts +16 -0
  65. package/dist/helpers/conversationHistory.js +89 -0
  66. package/dist/helpers/conversationHistory.js.map +1 -0
  67. package/dist/helpers/conversationTitle.d.ts +8 -0
  68. package/dist/helpers/conversationTitle.js +27 -0
  69. package/dist/helpers/conversationTitle.js.map +1 -0
  70. package/dist/helpers/enhanceBubbleCodeBlocks.d.ts +5 -0
  71. package/dist/helpers/enhanceBubbleCodeBlocks.js +97 -0
  72. package/dist/helpers/enhanceBubbleCodeBlocks.js.map +1 -0
  73. package/dist/helpers/highlightMatches.d.ts +2 -0
  74. package/dist/helpers/highlightMatches.js +54 -0
  75. package/dist/helpers/highlightMatches.js.map +1 -0
  76. package/dist/helpers/nats/dialogStateCatchUp.d.ts +3 -0
  77. package/dist/helpers/nats/dialogStateCatchUp.js +40 -0
  78. package/dist/helpers/nats/dialogStateCatchUp.js.map +1 -0
  79. package/dist/helpers/positionPopover.d.ts +3 -0
  80. package/dist/helpers/positionPopover.js +22 -0
  81. package/dist/helpers/positionPopover.js.map +1 -0
  82. package/dist/helpers/prism.d.ts +16 -0
  83. package/dist/helpers/prism.js +78 -0
  84. package/dist/helpers/prism.js.map +1 -0
  85. package/dist/helpers/reasoning.d.ts +7 -0
  86. package/dist/helpers/reasoning.js +43 -0
  87. package/dist/helpers/reasoning.js.map +1 -0
  88. package/dist/helpers/relativeTime.d.ts +3 -0
  89. package/dist/helpers/relativeTime.js +56 -0
  90. package/dist/helpers/relativeTime.js.map +1 -0
  91. package/dist/helpers/sourcesCount.d.ts +2 -0
  92. package/dist/helpers/sourcesCount.js +22 -0
  93. package/dist/helpers/sourcesCount.js.map +1 -0
  94. package/dist/helpers/tts/muteSpeaker.d.ts +13 -0
  95. package/dist/helpers/tts/muteSpeaker.js +26 -0
  96. package/dist/helpers/tts/muteSpeaker.js.map +1 -0
  97. package/dist/helpers/usePressTooltip.d.ts +18 -0
  98. package/dist/helpers/usePressTooltip.js +38 -0
  99. package/dist/helpers/usePressTooltip.js.map +1 -0
  100. package/dist/icons/FacebookIcon.d.ts +3 -0
  101. package/dist/icons/FacebookIcon.js +6 -0
  102. package/dist/icons/FacebookIcon.js.map +1 -0
  103. package/dist/icons/LinkedinIcon.d.ts +3 -0
  104. package/dist/icons/LinkedinIcon.js +6 -0
  105. package/dist/icons/LinkedinIcon.js.map +1 -0
  106. package/dist/icons/MemoriIcon.d.ts +3 -0
  107. package/dist/icons/MemoriIcon.js +8 -0
  108. package/dist/icons/MemoriIcon.js.map +1 -0
  109. package/dist/icons/TelegramIcon.d.ts +3 -0
  110. package/dist/icons/TelegramIcon.js +6 -0
  111. package/dist/icons/TelegramIcon.js.map +1 -0
  112. package/dist/icons/TwitterIcon.d.ts +3 -0
  113. package/dist/icons/TwitterIcon.js +6 -0
  114. package/dist/icons/TwitterIcon.js.map +1 -0
  115. package/dist/icons/WhatsappIcon.d.ts +3 -0
  116. package/dist/icons/WhatsappIcon.js +6 -0
  117. package/dist/icons/WhatsappIcon.js.map +1 -0
  118. package/dist/icons/artifacts/DocumentIcon.d.ts +3 -0
  119. package/dist/icons/artifacts/DocumentIcon.js +6 -0
  120. package/dist/icons/artifacts/DocumentIcon.js.map +1 -0
  121. package/dist/icons/artifacts/HtmlIcon.d.ts +3 -0
  122. package/dist/icons/artifacts/HtmlIcon.js +6 -0
  123. package/dist/icons/artifacts/HtmlIcon.js.map +1 -0
  124. package/dist/icons/artifacts/JavascriptIcon.d.ts +3 -0
  125. package/dist/icons/artifacts/JavascriptIcon.js +6 -0
  126. package/dist/icons/artifacts/JavascriptIcon.js.map +1 -0
  127. package/dist/icons/artifacts/MarkdownIcon.d.ts +3 -0
  128. package/dist/icons/artifacts/MarkdownIcon.js +6 -0
  129. package/dist/icons/artifacts/MarkdownIcon.js.map +1 -0
  130. package/dist/icons/artifacts/PythonIcon.d.ts +3 -0
  131. package/dist/icons/artifacts/PythonIcon.js +6 -0
  132. package/dist/icons/artifacts/PythonIcon.js.map +1 -0
  133. package/dist/icons/artifacts/SvgIcon.d.ts +3 -0
  134. package/dist/icons/artifacts/SvgIcon.js +6 -0
  135. package/dist/icons/artifacts/SvgIcon.js.map +1 -0
  136. package/dist/icons/artifacts/XmlIcon.d.ts +3 -0
  137. package/dist/icons/artifacts/XmlIcon.js +6 -0
  138. package/dist/icons/artifacts/XmlIcon.js.map +1 -0
  139. package/dist/icons/artifacts/cssIcon.d.ts +3 -0
  140. package/dist/icons/artifacts/cssIcon.js +6 -0
  141. package/dist/icons/artifacts/cssIcon.js.map +1 -0
  142. package/dist/styles/motion.css +25 -0
  143. package/dist/styles.css +1 -2
  144. package/dist/version.d.ts +1 -1
  145. package/dist/version.js +1 -1
  146. package/esm/components/Chat/Chat.d.ts +1 -0
  147. package/esm/components/Chat/Chat.js +6 -3
  148. package/esm/components/Chat/Chat.js.map +1 -1
  149. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.d.ts +39 -0
  150. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js +40 -0
  151. package/esm/components/ChatHistoryDrawer/ChatResumeDrawer.js.map +1 -0
  152. package/esm/components/ChatInputs/ChatInputs.d.ts +1 -0
  153. package/esm/components/ChatInputs/ChatInputs.js +2 -2
  154. package/esm/components/ChatInputs/ChatInputs.js.map +1 -1
  155. package/esm/components/ContentPreviewModal/DocumentMarkdown.d.ts +7 -0
  156. package/esm/components/ContentPreviewModal/DocumentMarkdown.js +28 -0
  157. package/esm/components/ContentPreviewModal/DocumentMarkdown.js.map +1 -0
  158. package/esm/components/DrawerFooter/DrawerFooter.d.ts +12 -0
  159. package/esm/components/DrawerFooter/DrawerFooter.js +8 -0
  160. package/esm/components/DrawerFooter/DrawerFooter.js.map +1 -0
  161. package/esm/components/IconButton/IconButton.d.ts +9 -0
  162. package/esm/components/IconButton/IconButton.js +33 -0
  163. package/esm/components/IconButton/IconButton.js.map +1 -0
  164. package/esm/components/LoginModal/LoginModal.d.ts +19 -0
  165. package/esm/components/LoginModal/LoginModal.js +352 -0
  166. package/esm/components/LoginModal/LoginModal.js.map +1 -0
  167. package/esm/components/MemoriWidget/MemoriWidget.d.ts +2 -2
  168. package/esm/components/MemoriWidget/MemoriWidget.js +8 -17
  169. package/esm/components/MemoriWidget/MemoriWidget.js.map +1 -1
  170. package/esm/components/MobileSessionPanel/MobileSessionPanel.d.ts +65 -0
  171. package/esm/components/MobileSessionPanel/MobileSessionPanel.js +251 -0
  172. package/esm/components/MobileSessionPanel/MobileSessionPanel.js.map +1 -0
  173. package/esm/components/PositionPopover/PositionPopover.d.ts +22 -0
  174. package/esm/components/PositionPopover/PositionPopover.js +203 -0
  175. package/esm/components/PositionPopover/PositionPopover.js.map +1 -0
  176. package/esm/components/ReasoningBlock/ReasoningBlock.d.ts +7 -0
  177. package/esm/components/ReasoningBlock/ReasoningBlock.js +58 -0
  178. package/esm/components/ReasoningBlock/ReasoningBlock.js.map +1 -0
  179. package/esm/components/SideDrawer/SideDrawer.d.ts +22 -0
  180. package/esm/components/SideDrawer/SideDrawer.js +12 -0
  181. package/esm/components/SideDrawer/SideDrawer.js.map +1 -0
  182. package/esm/components/UploadButton/UploadButton.d.ts +2 -0
  183. package/esm/components/UploadButton/UploadButton.js +2 -2
  184. package/esm/components/UploadButton/UploadButton.js.map +1 -1
  185. package/esm/components/UploadButton/UploadImages/UploadImages.d.ts +2 -0
  186. package/esm/components/UploadButton/UploadImages/UploadImages.js +7 -1
  187. package/esm/components/UploadButton/UploadImages/UploadImages.js.map +1 -1
  188. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.d.ts +4 -0
  189. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js +141 -0
  190. package/esm/components/layouts/WebsiteAssistant/WebsiteAssistant.js.map +1 -0
  191. package/esm/components/layouts/chat.css +27 -4
  192. package/esm/helpers/artifactPanel.d.ts +6 -0
  193. package/esm/helpers/artifactPanel.js +37 -0
  194. package/esm/helpers/artifactPanel.js.map +1 -0
  195. package/esm/helpers/chatScroll.d.ts +12 -0
  196. package/esm/helpers/chatScroll.js +9 -0
  197. package/esm/helpers/chatScroll.js.map +1 -0
  198. package/esm/helpers/conversationHistory.d.ts +16 -0
  199. package/esm/helpers/conversationHistory.js +82 -0
  200. package/esm/helpers/conversationHistory.js.map +1 -0
  201. package/esm/helpers/conversationTitle.d.ts +8 -0
  202. package/esm/helpers/conversationTitle.js +23 -0
  203. package/esm/helpers/conversationTitle.js.map +1 -0
  204. package/esm/helpers/enhanceBubbleCodeBlocks.d.ts +5 -0
  205. package/esm/helpers/enhanceBubbleCodeBlocks.js +94 -0
  206. package/esm/helpers/enhanceBubbleCodeBlocks.js.map +1 -0
  207. package/esm/helpers/highlightMatches.d.ts +2 -0
  208. package/esm/helpers/highlightMatches.js +49 -0
  209. package/esm/helpers/highlightMatches.js.map +1 -0
  210. package/esm/helpers/nats/dialogStateCatchUp.d.ts +3 -0
  211. package/esm/helpers/nats/dialogStateCatchUp.js +35 -0
  212. package/esm/helpers/nats/dialogStateCatchUp.js.map +1 -0
  213. package/esm/helpers/positionPopover.d.ts +3 -0
  214. package/esm/helpers/positionPopover.js +17 -0
  215. package/esm/helpers/positionPopover.js.map +1 -0
  216. package/esm/helpers/prism.d.ts +16 -0
  217. package/esm/helpers/prism.js +74 -0
  218. package/esm/helpers/prism.js.map +1 -0
  219. package/esm/helpers/reasoning.d.ts +7 -0
  220. package/esm/helpers/reasoning.js +39 -0
  221. package/esm/helpers/reasoning.js.map +1 -0
  222. package/esm/helpers/relativeTime.d.ts +3 -0
  223. package/esm/helpers/relativeTime.js +50 -0
  224. package/esm/helpers/relativeTime.js.map +1 -0
  225. package/esm/helpers/sourcesCount.d.ts +2 -0
  226. package/esm/helpers/sourcesCount.js +18 -0
  227. package/esm/helpers/sourcesCount.js.map +1 -0
  228. package/esm/helpers/tts/muteSpeaker.d.ts +13 -0
  229. package/esm/helpers/tts/muteSpeaker.js +21 -0
  230. package/esm/helpers/tts/muteSpeaker.js.map +1 -0
  231. package/esm/helpers/usePressTooltip.d.ts +18 -0
  232. package/esm/helpers/usePressTooltip.js +35 -0
  233. package/esm/helpers/usePressTooltip.js.map +1 -0
  234. package/esm/icons/FacebookIcon.d.ts +3 -0
  235. package/esm/icons/FacebookIcon.js +4 -0
  236. package/esm/icons/FacebookIcon.js.map +1 -0
  237. package/esm/icons/LinkedinIcon.d.ts +3 -0
  238. package/esm/icons/LinkedinIcon.js +4 -0
  239. package/esm/icons/LinkedinIcon.js.map +1 -0
  240. package/esm/icons/MemoriIcon.d.ts +3 -0
  241. package/esm/icons/MemoriIcon.js +6 -0
  242. package/esm/icons/MemoriIcon.js.map +1 -0
  243. package/esm/icons/TelegramIcon.d.ts +3 -0
  244. package/esm/icons/TelegramIcon.js +4 -0
  245. package/esm/icons/TelegramIcon.js.map +1 -0
  246. package/esm/icons/TwitterIcon.d.ts +3 -0
  247. package/esm/icons/TwitterIcon.js +4 -0
  248. package/esm/icons/TwitterIcon.js.map +1 -0
  249. package/esm/icons/WhatsappIcon.d.ts +3 -0
  250. package/esm/icons/WhatsappIcon.js +4 -0
  251. package/esm/icons/WhatsappIcon.js.map +1 -0
  252. package/esm/icons/artifacts/DocumentIcon.d.ts +3 -0
  253. package/esm/icons/artifacts/DocumentIcon.js +4 -0
  254. package/esm/icons/artifacts/DocumentIcon.js.map +1 -0
  255. package/esm/icons/artifacts/HtmlIcon.d.ts +3 -0
  256. package/esm/icons/artifacts/HtmlIcon.js +4 -0
  257. package/esm/icons/artifacts/HtmlIcon.js.map +1 -0
  258. package/esm/icons/artifacts/JavascriptIcon.d.ts +3 -0
  259. package/esm/icons/artifacts/JavascriptIcon.js +4 -0
  260. package/esm/icons/artifacts/JavascriptIcon.js.map +1 -0
  261. package/esm/icons/artifacts/MarkdownIcon.d.ts +3 -0
  262. package/esm/icons/artifacts/MarkdownIcon.js +4 -0
  263. package/esm/icons/artifacts/MarkdownIcon.js.map +1 -0
  264. package/esm/icons/artifacts/PythonIcon.d.ts +3 -0
  265. package/esm/icons/artifacts/PythonIcon.js +4 -0
  266. package/esm/icons/artifacts/PythonIcon.js.map +1 -0
  267. package/esm/icons/artifacts/SvgIcon.d.ts +3 -0
  268. package/esm/icons/artifacts/SvgIcon.js +4 -0
  269. package/esm/icons/artifacts/SvgIcon.js.map +1 -0
  270. package/esm/icons/artifacts/XmlIcon.d.ts +3 -0
  271. package/esm/icons/artifacts/XmlIcon.js +4 -0
  272. package/esm/icons/artifacts/XmlIcon.js.map +1 -0
  273. package/esm/icons/artifacts/cssIcon.d.ts +3 -0
  274. package/esm/icons/artifacts/cssIcon.js +4 -0
  275. package/esm/icons/artifacts/cssIcon.js.map +1 -0
  276. package/esm/styles.css +1 -2
  277. package/esm/version.d.ts +1 -1
  278. package/esm/version.js +1 -1
  279. package/package.json +7 -7
  280. package/dist/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.d.ts +0 -3
  281. package/dist/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js +0 -64
  282. package/dist/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js.map +0 -1
  283. package/esm/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.d.ts +0 -3
  284. package/esm/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js +0 -62
  285. package/esm/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.js.map +0 -1
  286. package/src/I18nWrapper.tsx +0 -13
  287. package/src/__snapshots__/index.test.tsx.snap +0 -96
  288. package/src/components/AgeVerificationModal/AgeVerificationModal.css +0 -95
  289. package/src/components/AgeVerificationModal/AgeVerificationModal.stories.tsx +0 -46
  290. package/src/components/AgeVerificationModal/AgeVerificationModal.test.tsx +0 -33
  291. package/src/components/AgeVerificationModal/AgeVerificationModal.tsx +0 -99
  292. package/src/components/AgeVerificationModal/__snapshots__/AgeVerificationModal.test.tsx.snap +0 -19
  293. package/src/components/Auth/Auth.css +0 -57
  294. package/src/components/Auth/Auth.stories.tsx +0 -90
  295. package/src/components/Auth/Auth.test.tsx +0 -63
  296. package/src/components/Auth/Auth.tsx +0 -201
  297. package/src/components/Auth/__snapshots__/Auth.test.tsx.snap +0 -143
  298. package/src/components/Avatar/Avatar.css +0 -151
  299. package/src/components/Avatar/Avatar.stories.tsx +0 -160
  300. package/src/components/Avatar/Avatar.test.tsx +0 -158
  301. package/src/components/Avatar/Avatar.tsx +0 -245
  302. package/src/components/Avatar/AvatarView/AvatarComponent/Shadow/DynamicShadow.tsx +0 -103
  303. package/src/components/Avatar/AvatarView/AvatarComponent/avatarComponent.tsx +0 -105
  304. package/src/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/fullbodyAvatar.tsx +0 -338
  305. package/src/components/Avatar/AvatarView/AvatarComponent/components/FullbodyAvatar/types.ts +0 -44
  306. package/src/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarAnimator.ts +0 -1091
  307. package/src/components/Avatar/AvatarView/AvatarComponent/components/controllers/AvatarPositionController.ts +0 -83
  308. package/src/components/Avatar/AvatarView/AvatarComponent/components/controllers/MorphTargetController.ts +0 -301
  309. package/src/components/Avatar/AvatarView/AvatarComponent/components/controls.tsx +0 -100
  310. package/src/components/Avatar/AvatarView/AvatarComponent/components/halfbodyAvatar.tsx +0 -152
  311. package/src/components/Avatar/AvatarView/AvatarComponent/components/loader.tsx +0 -31
  312. package/src/components/Avatar/AvatarView/AvatarComponent/constants.ts +0 -141
  313. package/src/components/Avatar/AvatarView/AvatarComponent/lights/Lights.tsx +0 -145
  314. package/src/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.css +0 -111
  315. package/src/components/Avatar/AvatarView/AvatarComponent/positionControls/positionControls.tsx +0 -201
  316. package/src/components/Avatar/AvatarView/AvatarView.stories.tsx +0 -254
  317. package/src/components/Avatar/AvatarView/index.tsx +0 -194
  318. package/src/components/Avatar/AvatarView/utils/hideHands.ts +0 -11
  319. package/src/components/Avatar/AvatarView/utils/useEyeBlink.ts +0 -100
  320. package/src/components/Avatar/AvatarView/utils/useHeadMovement.ts +0 -72
  321. package/src/components/Avatar/AvatarView/utils/useLoadingMorphAnim.ts +0 -38
  322. package/src/components/Avatar/AvatarView/utils/useMouthAnimation.ts +0 -93
  323. package/src/components/Avatar/AvatarView/utils/useSmile.ts +0 -39
  324. package/src/components/Avatar/AvatarView/utils/utils.ts +0 -55
  325. package/src/components/Avatar/__snapshots__/Avatar.test.tsx.snap +0 -246
  326. package/src/components/Blob/Blob.css +0 -286
  327. package/src/components/Blob/Blob.stories.tsx +0 -53
  328. package/src/components/Blob/Blob.test.tsx +0 -18
  329. package/src/components/Blob/Blob.tsx +0 -26
  330. package/src/components/Blob/__snapshots__/Blob.test.tsx.snap +0 -80
  331. package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.css +0 -40
  332. package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.stories.tsx +0 -58
  333. package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.test.tsx +0 -53
  334. package/src/components/BlockedMemoriBadge/BlockedMemoriBadge.tsx +0 -74
  335. package/src/components/BlockedMemoriBadge/__snapshots__/BlockedMemoriBadge.test.tsx.snap +0 -181
  336. package/src/components/ChangeMode/ChangeMode.css +0 -22
  337. package/src/components/ChangeMode/ChangeMode.stories.tsx +0 -50
  338. package/src/components/ChangeMode/ChangeMode.test.tsx +0 -24
  339. package/src/components/ChangeMode/ChangeMode.tsx +0 -51
  340. package/src/components/ChangeMode/__snapshots__/ChangeMode.test.tsx.snap +0 -107
  341. package/src/components/Chat/Chat.css +0 -285
  342. package/src/components/Chat/Chat.stories.tsx +0 -1684
  343. package/src/components/Chat/Chat.test.tsx +0 -372
  344. package/src/components/Chat/Chat.tsx +0 -778
  345. package/src/components/Chat/__snapshots__/Chat.test.tsx.snap +0 -6816
  346. package/src/components/ChatBubble/ChatBubble.css +0 -430
  347. package/src/components/ChatBubble/ChatBubble.stories.tsx +0 -1192
  348. package/src/components/ChatBubble/ChatBubble.test.tsx +0 -481
  349. package/src/components/ChatBubble/ChatBubble.tsx +0 -776
  350. package/src/components/ChatBubble/__snapshots__/ChatBubble.test.tsx.snap +0 -8734
  351. package/src/components/ChatHistoryDrawer/ChatHistory.css +0 -587
  352. package/src/components/ChatHistoryDrawer/ChatHistory.stories.tsx +0 -410
  353. package/src/components/ChatHistoryDrawer/ChatHistory.test.tsx +0 -107
  354. package/src/components/ChatHistoryDrawer/ChatHistory.tsx +0 -1298
  355. package/src/components/ChatHistoryDrawer/__snapshots__/ChatHistory.test.tsx.snap +0 -27
  356. package/src/components/ChatInputs/ChatInputs.css +0 -340
  357. package/src/components/ChatInputs/ChatInputs.stories.tsx +0 -251
  358. package/src/components/ChatInputs/ChatInputs.tsx +0 -487
  359. package/src/components/ChatTextArea/ChatTextArea.css +0 -185
  360. package/src/components/ChatTextArea/ChatTextArea.stories.tsx +0 -55
  361. package/src/components/ChatTextArea/ChatTextArea.test.tsx +0 -28
  362. package/src/components/ChatTextArea/ChatTextArea.tsx +0 -171
  363. package/src/components/ChatTextArea/__snapshots__/ChatTextArea.test.tsx.snap +0 -68
  364. package/src/components/CompletionProviderStatus/CompletionProviderStatus.css +0 -36
  365. package/src/components/CompletionProviderStatus/CompletionProviderStatus.stories.tsx +0 -296
  366. package/src/components/CompletionProviderStatus/CompletionProviderStatus.test.tsx +0 -31
  367. package/src/components/CompletionProviderStatus/CompletionProviderStatus.tsx +0 -232
  368. package/src/components/CompletionProviderStatus/__snapshots__/CompletionProviderStatus.test.tsx.snap +0 -96
  369. package/src/components/ContentPreviewModal/ContentPreviewModal.css +0 -128
  370. package/src/components/ContentPreviewModal/ContentPreviewModal.tsx +0 -67
  371. package/src/components/ContentPreviewModal/index.ts +0 -2
  372. package/src/components/CustomGLBModelViewer/ModelViewer.css +0 -11
  373. package/src/components/CustomGLBModelViewer/ModelViewer.stories.tsx +0 -58
  374. package/src/components/CustomGLBModelViewer/ModelViewer.test.tsx +0 -13
  375. package/src/components/CustomGLBModelViewer/ModelViewer.tsx +0 -37
  376. package/src/components/CustomGLBModelViewer/__snapshots__/ModelViewer.test.tsx.snap +0 -20
  377. package/src/components/DateSelector/DateSelector.css +0 -158
  378. package/src/components/DateSelector/DateSelector.stories.tsx +0 -47
  379. package/src/components/DateSelector/DateSelector.test.tsx +0 -149
  380. package/src/components/DateSelector/DateSelector.tsx +0 -251
  381. package/src/components/DateSelector/__snapshots__/DateSelector.test.tsx.snap +0 -1954
  382. package/src/components/ErrorBoundary/ErrorBoundary.tsx +0 -54
  383. package/src/components/ExpertsDrawer/ExpertsDrawer.css +0 -67
  384. package/src/components/ExpertsDrawer/ExpertsDrawer.stories.tsx +0 -54
  385. package/src/components/ExpertsDrawer/ExpertsDrawer.test.tsx +0 -53
  386. package/src/components/ExpertsDrawer/ExpertsDrawer.tsx +0 -69
  387. package/src/components/ExpertsDrawer/__snapshots__/ExpertsDrawer.test.tsx.snap +0 -11
  388. package/src/components/ExportHistoryButton/ExportHistoryButton.css +0 -22
  389. package/src/components/FeedbackButtons/FeedbackButtons.css +0 -107
  390. package/src/components/FeedbackButtons/FeedbackButtons.stories.tsx +0 -52
  391. package/src/components/FeedbackButtons/FeedbackButtons.test.tsx +0 -11
  392. package/src/components/FeedbackButtons/FeedbackButtons.tsx +0 -152
  393. package/src/components/FeedbackButtons/__snapshots__/FeedbackButtons.test.tsx.snap +0 -42
  394. package/src/components/FilePreview/FilePreview.css +0 -358
  395. package/src/components/FilePreview/FilePreview.stories.tsx +0 -63
  396. package/src/components/FilePreview/FilePreview.test.tsx +0 -26
  397. package/src/components/FilePreview/FilePreview.tsx +0 -277
  398. package/src/components/FilePreview/__snapshots__/FilePreview.test.tsx.snap +0 -185
  399. package/src/components/Header/ChatConsumptionDropdown.test.tsx +0 -117
  400. package/src/components/Header/ChatConsumptionDropdown.tsx +0 -275
  401. package/src/components/Header/Header.css +0 -282
  402. package/src/components/Header/Header.stories.tsx +0 -338
  403. package/src/components/Header/Header.test.tsx +0 -371
  404. package/src/components/Header/Header.tsx +0 -442
  405. package/src/components/Header/__snapshots__/Header.test.tsx.snap +0 -964
  406. package/src/components/KnownFacts/KnownFacts.css +0 -19
  407. package/src/components/KnownFacts/KnownFacts.stories.tsx +0 -80
  408. package/src/components/KnownFacts/KnownFacts.test.tsx +0 -57
  409. package/src/components/KnownFacts/KnownFacts.tsx +0 -376
  410. package/src/components/KnownFacts/__snapshots__/KnownFacts.test.tsx.snap +0 -19
  411. package/src/components/LoginDrawer/LoginDrawer.css +0 -1616
  412. package/src/components/LoginDrawer/LoginDrawer.stories.tsx +0 -102
  413. package/src/components/LoginDrawer/LoginDrawer.test.tsx +0 -199
  414. package/src/components/LoginDrawer/LoginDrawer.tsx +0 -600
  415. package/src/components/LoginDrawer/__snapshots__/LoginDrawer.test.tsx.snap +0 -91
  416. package/src/components/MediaWidget/DocumentCard.test.tsx +0 -45
  417. package/src/components/MediaWidget/DocumentCard.tsx +0 -19
  418. package/src/components/MediaWidget/MediaItemWidget.css +0 -1398
  419. package/src/components/MediaWidget/MediaItemWidget.stories.tsx +0 -423
  420. package/src/components/MediaWidget/MediaItemWidget.test.tsx +0 -248
  421. package/src/components/MediaWidget/MediaItemWidget.tsx +0 -997
  422. package/src/components/MediaWidget/MediaItemWidget.types.ts +0 -65
  423. package/src/components/MediaWidget/MediaItemWidget.utils.test.ts +0 -367
  424. package/src/components/MediaWidget/MediaItemWidget.utils.ts +0 -227
  425. package/src/components/MediaWidget/MediaPreviewModal.test.tsx +0 -271
  426. package/src/components/MediaWidget/MediaPreviewModal.tsx +0 -425
  427. package/src/components/MediaWidget/MediaWidget.css +0 -131
  428. package/src/components/MediaWidget/MediaWidget.stories.tsx +0 -319
  429. package/src/components/MediaWidget/MediaWidget.test.tsx +0 -41
  430. package/src/components/MediaWidget/MediaWidget.tsx +0 -107
  431. package/src/components/MediaWidget/__snapshots__/DocumentCard.test.tsx.snap +0 -24
  432. package/src/components/MediaWidget/__snapshots__/MediaItemWidget.test.tsx.snap +0 -791
  433. package/src/components/MediaWidget/__snapshots__/MediaWidget.test.tsx.snap +0 -154
  434. package/src/components/MemoriArtifactSystem/ArtifactDrawer.stories.tsx +0 -2299
  435. package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.css +0 -163
  436. package/src/components/MemoriArtifactSystem/components/ArtifactActions/ArtifactActions.tsx +0 -250
  437. package/src/components/MemoriArtifactSystem/components/ArtifactActions/CopyButton.stories.tsx +0 -30
  438. package/src/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyButtonWithDropdown.tsx +0 -467
  439. package/src/components/MemoriArtifactSystem/components/ArtifactActions/components/CopyMenuItem.tsx +0 -89
  440. package/src/components/MemoriArtifactSystem/components/ArtifactActions/hooks/useCopyArtifact.ts +0 -619
  441. package/src/components/MemoriArtifactSystem/components/ArtifactActions/index.ts +0 -9
  442. package/src/components/MemoriArtifactSystem/components/ArtifactActions/styles.css +0 -489
  443. package/src/components/MemoriArtifactSystem/components/ArtifactActions/test/CopyButtonTest.tsx +0 -90
  444. package/src/components/MemoriArtifactSystem/components/ArtifactActions/types.ts +0 -73
  445. package/src/components/MemoriArtifactSystem/components/ArtifactActions/utils/PDFExporter.ts +0 -454
  446. package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.css +0 -1059
  447. package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/ArtifactDrawer.tsx +0 -431
  448. package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/components/TabSwitch.css +0 -150
  449. package/src/components/MemoriArtifactSystem/components/ArtifactDrawer/components/TabSwitch.tsx +0 -79
  450. package/src/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.css +0 -253
  451. package/src/components/MemoriArtifactSystem/components/ArtifactHandler/ArtifactHandler.tsx +0 -561
  452. package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.css +0 -355
  453. package/src/components/MemoriArtifactSystem/components/ArtifactPreview/ArtifactPreview.tsx +0 -160
  454. package/src/components/MemoriArtifactSystem/context/ArtifactContext.tsx +0 -167
  455. package/src/components/MemoriArtifactSystem/types/artifact.types.ts +0 -35
  456. package/src/components/MemoriArtifactSystem/utils/ArtifactAPI.test.tsx +0 -308
  457. package/src/components/MemoriArtifactSystem/utils/ArtifactAPI.tsx +0 -379
  458. package/src/components/MemoriArtifactSystem/utils/applyEdits.test.ts +0 -85
  459. package/src/components/MemoriArtifactSystem/utils/applyEdits.ts +0 -173
  460. package/src/components/MemoriWidget/MemoriWidget.css +0 -220
  461. package/src/components/MemoriWidget/MemoriWidget.stories.tsx +0 -274
  462. package/src/components/MemoriWidget/MemoriWidget.tsx +0 -3930
  463. package/src/components/MicrophoneButton/MicrophoneButton.css +0 -142
  464. package/src/components/MicrophoneButton/MicrophoneButton.stories.tsx +0 -52
  465. package/src/components/MicrophoneButton/MicrophoneButton.tsx +0 -128
  466. package/src/components/PositionDrawer/PositionDrawer.stories.tsx +0 -51
  467. package/src/components/PositionDrawer/PositionDrawer.test.tsx +0 -39
  468. package/src/components/PositionDrawer/PositionDrawer.tsx +0 -50
  469. package/src/components/PositionDrawer/__snapshots__/PositionDrawer.test.tsx.snap +0 -17
  470. package/src/components/PoweredBy/PoweredBy.css +0 -47
  471. package/src/components/PoweredBy/PoweredBy.stories.tsx +0 -75
  472. package/src/components/PoweredBy/PoweredBy.test.tsx +0 -15
  473. package/src/components/PoweredBy/PoweredBy.tsx +0 -44
  474. package/src/components/PoweredBy/__snapshots__/PoweredBy.test.tsx.snap +0 -55
  475. package/src/components/SendOnEnterMenu/SendOnEnterMenu.css +0 -47
  476. package/src/components/SendOnEnterMenu/SendOnEnterMenu.stories.tsx +0 -58
  477. package/src/components/SendOnEnterMenu/SendOnEnterMenu.test.tsx +0 -17
  478. package/src/components/SendOnEnterMenu/SendOnEnterMenu.tsx +0 -82
  479. package/src/components/SendOnEnterMenu/__snapshots__/SendOnEnterMenu.test.tsx.snap +0 -57
  480. package/src/components/SettingsDrawer/SettingsDrawer.css +0 -24
  481. package/src/components/SettingsDrawer/SettingsDrawer.stories.tsx +0 -94
  482. package/src/components/SettingsDrawer/SettingsDrawer.test.tsx +0 -202
  483. package/src/components/SettingsDrawer/SettingsDrawer.tsx +0 -255
  484. package/src/components/SettingsDrawer/__snapshots__/SettingsDrawer.test.tsx.snap +0 -59
  485. package/src/components/ShareButton/ShareButton.css +0 -73
  486. package/src/components/ShareButton/ShareButton.stories.tsx +0 -98
  487. package/src/components/ShareButton/ShareButton.test.tsx +0 -53
  488. package/src/components/ShareButton/ShareButton.tsx +0 -395
  489. package/src/components/ShareButton/__snapshots__/ShareButton.test.tsx.snap +0 -316
  490. package/src/components/Snippet/Snippet.css +0 -142
  491. package/src/components/Snippet/Snippet.stories.tsx +0 -286
  492. package/src/components/Snippet/Snippet.test.tsx +0 -176
  493. package/src/components/Snippet/Snippet.tsx +0 -148
  494. package/src/components/Snippet/__snapshots__/Snippet.test.tsx.snap +0 -603
  495. package/src/components/StartPanel/StartPanel.css +0 -273
  496. package/src/components/StartPanel/StartPanel.stories.tsx +0 -404
  497. package/src/components/StartPanel/StartPanel.test.tsx +0 -360
  498. package/src/components/StartPanel/StartPanel.tsx +0 -426
  499. package/src/components/StartPanel/__snapshots__/StartPanel.test.tsx.snap +0 -1986
  500. package/src/components/Typing/Typing.stories.tsx +0 -130
  501. package/src/components/Typing/Typing.test.tsx +0 -62
  502. package/src/components/Typing/Typing.tsx +0 -154
  503. package/src/components/Typing/__snapshots__/Typing.test.tsx.snap +0 -133
  504. package/src/components/UploadButton/UploadButton.css +0 -542
  505. package/src/components/UploadButton/UploadButton.stories.tsx +0 -376
  506. package/src/components/UploadButton/UploadButton.test.tsx +0 -11
  507. package/src/components/UploadButton/UploadButton.tsx +0 -688
  508. package/src/components/UploadButton/UploadDocuments/UploadDocuments.tsx +0 -421
  509. package/src/components/UploadButton/UploadImages/UploadImages.tsx +0 -538
  510. package/src/components/UploadButton/__snapshots__/UploadButton.test.tsx.snap +0 -165
  511. package/src/components/VenueWidget/VenueWidget.css +0 -163
  512. package/src/components/VenueWidget/VenueWidget.stories.tsx +0 -66
  513. package/src/components/VenueWidget/VenueWidget.test.tsx +0 -49
  514. package/src/components/VenueWidget/VenueWidget.tsx +0 -458
  515. package/src/components/VenueWidget/__snapshots__/VenueWidget.test.tsx.snap +0 -370
  516. package/src/components/WhyThisAnswer/WhyThisAnswer.css +0 -171
  517. package/src/components/WhyThisAnswer/WhyThisAnswer.stories.tsx +0 -285
  518. package/src/components/WhyThisAnswer/WhyThisAnswer.test.tsx +0 -245
  519. package/src/components/WhyThisAnswer/WhyThisAnswer.tsx +0 -233
  520. package/src/components/WhyThisAnswer/__snapshots__/WhyThisAnswer.test.tsx.snap +0 -27
  521. package/src/components/icons/AI.tsx +0 -34
  522. package/src/components/icons/Alert.tsx +0 -31
  523. package/src/components/icons/ArrowUp.tsx +0 -28
  524. package/src/components/icons/Bug.tsx +0 -81
  525. package/src/components/icons/Chat.tsx +0 -30
  526. package/src/components/icons/ChevronDown.tsx +0 -26
  527. package/src/components/icons/ChevronLeft.tsx +0 -28
  528. package/src/components/icons/ChevronRight.tsx +0 -28
  529. package/src/components/icons/ChevronUp.tsx +0 -24
  530. package/src/components/icons/Clear.tsx +0 -23
  531. package/src/components/icons/Close.tsx +0 -30
  532. package/src/components/icons/Code.tsx +0 -24
  533. package/src/components/icons/Copy.tsx +0 -23
  534. package/src/components/icons/DeepThought.tsx +0 -38
  535. package/src/components/icons/Delete.tsx +0 -23
  536. package/src/components/icons/Document.tsx +0 -50
  537. package/src/components/icons/Download.tsx +0 -23
  538. package/src/components/icons/Edit.tsx +0 -17
  539. package/src/components/icons/Expand.tsx +0 -23
  540. package/src/components/icons/Eye.tsx +0 -17
  541. package/src/components/icons/EyeInvisible.tsx +0 -24
  542. package/src/components/icons/Facebook.tsx +0 -23
  543. package/src/components/icons/Feedback.tsx +0 -24
  544. package/src/components/icons/File.tsx +0 -17
  545. package/src/components/icons/FileExcel.tsx +0 -23
  546. package/src/components/icons/FilePdf.tsx +0 -23
  547. package/src/components/icons/FileWord.tsx +0 -23
  548. package/src/components/icons/Fullscreen.tsx +0 -23
  549. package/src/components/icons/FullscreenExit.tsx +0 -23
  550. package/src/components/icons/GasStation.tsx +0 -36
  551. package/src/components/icons/Group.tsx +0 -30
  552. package/src/components/icons/History.tsx +0 -33
  553. package/src/components/icons/Image.tsx +0 -37
  554. package/src/components/icons/Info.tsx +0 -31
  555. package/src/components/icons/Link.tsx +0 -17
  556. package/src/components/icons/Linkedin.tsx +0 -23
  557. package/src/components/icons/Loading.tsx +0 -28
  558. package/src/components/icons/Logout.tsx +0 -27
  559. package/src/components/icons/Mail.tsx +0 -17
  560. package/src/components/icons/MapMarker.tsx +0 -26
  561. package/src/components/icons/MenuHorizontal.tsx +0 -29
  562. package/src/components/icons/MenuVertical.tsx +0 -29
  563. package/src/components/icons/Message.tsx +0 -23
  564. package/src/components/icons/Microphone.tsx +0 -23
  565. package/src/components/icons/Minus.tsx +0 -23
  566. package/src/components/icons/MinusCircle.tsx +0 -24
  567. package/src/components/icons/PaperClip.tsx +0 -23
  568. package/src/components/icons/Picture.tsx +0 -23
  569. package/src/components/icons/Plus.tsx +0 -18
  570. package/src/components/icons/Preview.tsx +0 -29
  571. package/src/components/icons/Print.tsx +0 -38
  572. package/src/components/icons/QuestionHelp.tsx +0 -30
  573. package/src/components/icons/Refresh.tsx +0 -30
  574. package/src/components/icons/SelectIcon.tsx +0 -28
  575. package/src/components/icons/Send.tsx +0 -17
  576. package/src/components/icons/Setting.tsx +0 -23
  577. package/src/components/icons/Share.tsx +0 -23
  578. package/src/components/icons/Sound.tsx +0 -23
  579. package/src/components/icons/SoundDeactivated.tsx +0 -27
  580. package/src/components/icons/Telegram.tsx +0 -26
  581. package/src/components/icons/ThumbDown.tsx +0 -29
  582. package/src/components/icons/ThumbUp.tsx +0 -29
  583. package/src/components/icons/Translation.tsx +0 -24
  584. package/src/components/icons/Twitter.tsx +0 -23
  585. package/src/components/icons/Upload.tsx +0 -34
  586. package/src/components/icons/User.tsx +0 -17
  587. package/src/components/icons/Warning.tsx +0 -24
  588. package/src/components/icons/WhatsApp.tsx +0 -24
  589. package/src/components/icons/icons.stories.css +0 -5
  590. package/src/components/icons/icons.stories.tsx +0 -81
  591. package/src/components/icons/loading.css +0 -14
  592. package/src/components/layouts/Chat.test.tsx +0 -40
  593. package/src/components/layouts/Chat.tsx +0 -69
  594. package/src/components/layouts/FullBody/FullBody.stories.tsx +0 -110
  595. package/src/components/layouts/FullPage.test.tsx +0 -65
  596. package/src/components/layouts/FullPage.tsx +0 -80
  597. package/src/components/layouts/HiddenChat.test.tsx +0 -40
  598. package/src/components/layouts/HiddenChat.tsx +0 -233
  599. package/src/components/layouts/Totem/Totem.stories.tsx +0 -131
  600. package/src/components/layouts/Totem.test.tsx +0 -40
  601. package/src/components/layouts/Totem.tsx +0 -49
  602. package/src/components/layouts/WebsiteAssistant.test.tsx +0 -40
  603. package/src/components/layouts/WebsiteAssistant.tsx +0 -132
  604. package/src/components/layouts/ZoomedFullBody/ZoomedFullBody.stories.tsx +0 -131
  605. package/src/components/layouts/ZoomedFullBody.test.tsx +0 -40
  606. package/src/components/layouts/ZoomedFullBody.tsx +0 -81
  607. package/src/components/layouts/__snapshots__/Chat.test.tsx.snap +0 -457
  608. package/src/components/layouts/__snapshots__/FullPage.test.tsx.snap +0 -1045
  609. package/src/components/layouts/__snapshots__/HiddenChat.test.tsx.snap +0 -460
  610. package/src/components/layouts/__snapshots__/Totem.test.tsx.snap +0 -566
  611. package/src/components/layouts/__snapshots__/WebsiteAssistant.test.tsx.snap +0 -59
  612. package/src/components/layouts/__snapshots__/ZoomedFullBody.test.tsx.snap +0 -523
  613. package/src/components/layouts/chat.css +0 -451
  614. package/src/components/layouts/hidden-chat.css +0 -276
  615. package/src/components/layouts/layouts.stories.tsx +0 -231
  616. package/src/components/layouts/totem.css +0 -221
  617. package/src/components/layouts/zoomed-full-body.css +0 -18
  618. package/src/components/ui/Alert.css +0 -93
  619. package/src/components/ui/Alert.stories.tsx +0 -137
  620. package/src/components/ui/Alert.test.tsx +0 -129
  621. package/src/components/ui/Alert.tsx +0 -123
  622. package/src/components/ui/Button.css +0 -167
  623. package/src/components/ui/Button.stories.tsx +0 -156
  624. package/src/components/ui/Button.test.tsx +0 -74
  625. package/src/components/ui/Button.tsx +0 -107
  626. package/src/components/ui/Card.css +0 -65
  627. package/src/components/ui/Card.stories.tsx +0 -95
  628. package/src/components/ui/Card.test.tsx +0 -47
  629. package/src/components/ui/Card.tsx +0 -48
  630. package/src/components/ui/Checkbox.css +0 -116
  631. package/src/components/ui/Checkbox.stories.tsx +0 -74
  632. package/src/components/ui/Checkbox.test.tsx +0 -28
  633. package/src/components/ui/Checkbox.tsx +0 -58
  634. package/src/components/ui/ConfirmDialog.css +0 -42
  635. package/src/components/ui/ConfirmDialog.stories.tsx +0 -216
  636. package/src/components/ui/ConfirmDialog.test.tsx +0 -124
  637. package/src/components/ui/ConfirmDialog.tsx +0 -58
  638. package/src/components/ui/Details.css +0 -66
  639. package/src/components/ui/Drawer.css +0 -270
  640. package/src/components/ui/Drawer.stories.tsx +0 -267
  641. package/src/components/ui/Drawer.test.tsx +0 -130
  642. package/src/components/ui/Drawer.tsx +0 -293
  643. package/src/components/ui/Dropdown.css +0 -173
  644. package/src/components/ui/Dropdown.tsx +0 -63
  645. package/src/components/ui/Expandable.css +0 -15
  646. package/src/components/ui/Expandable.stories.tsx +0 -180
  647. package/src/components/ui/Expandable.test.tsx +0 -107
  648. package/src/components/ui/Expandable.tsx +0 -121
  649. package/src/components/ui/Modal.css +0 -98
  650. package/src/components/ui/Modal.stories.tsx +0 -171
  651. package/src/components/ui/Modal.test.tsx +0 -111
  652. package/src/components/ui/Modal.tsx +0 -117
  653. package/src/components/ui/Select.css +0 -138
  654. package/src/components/ui/Select.stories.tsx +0 -79
  655. package/src/components/ui/Select.test.tsx +0 -84
  656. package/src/components/ui/Select.tsx +0 -79
  657. package/src/components/ui/Slider.css +0 -192
  658. package/src/components/ui/Slider.stories.tsx +0 -63
  659. package/src/components/ui/Slider.tsx +0 -142
  660. package/src/components/ui/Spin.css +0 -31
  661. package/src/components/ui/Spin.stories.tsx +0 -64
  662. package/src/components/ui/Spin.test.tsx +0 -41
  663. package/src/components/ui/Spin.tsx +0 -31
  664. package/src/components/ui/Table.css +0 -132
  665. package/src/components/ui/Tooltip.css +0 -171
  666. package/src/components/ui/Tooltip.stories.tsx +0 -109
  667. package/src/components/ui/Tooltip.test.tsx +0 -102
  668. package/src/components/ui/Tooltip.tsx +0 -163
  669. package/src/components/ui/__snapshots__/Alert.test.tsx.snap +0 -59
  670. package/src/components/ui/__snapshots__/Button.test.tsx.snap +0 -204
  671. package/src/components/ui/__snapshots__/Card.test.tsx.snap +0 -321
  672. package/src/components/ui/__snapshots__/Checkbox.test.tsx.snap +0 -131
  673. package/src/components/ui/__snapshots__/ConfirmDialog.test.tsx.snap +0 -35
  674. package/src/components/ui/__snapshots__/Drawer.test.tsx.snap +0 -67
  675. package/src/components/ui/__snapshots__/Expandable.test.tsx.snap +0 -159
  676. package/src/components/ui/__snapshots__/Modal.test.tsx.snap +0 -59
  677. package/src/components/ui/__snapshots__/Select.test.tsx.snap +0 -254
  678. package/src/components/ui/__snapshots__/Spin.test.tsx.snap +0 -193
  679. package/src/components/ui/__snapshots__/Tooltip.test.tsx.snap +0 -113
  680. package/src/components/ui/definitions.stories.tsx +0 -139
  681. package/src/context/visemeContext.tsx +0 -384
  682. package/src/helpers/chatPdfExport.ts +0 -544
  683. package/src/helpers/configuration.ts +0 -42
  684. package/src/helpers/constants.ts +0 -268
  685. package/src/helpers/convertDocument.test.ts +0 -67
  686. package/src/helpers/convertDocument.ts +0 -35
  687. package/src/helpers/credits.ts +0 -54
  688. package/src/helpers/error.test.ts +0 -29
  689. package/src/helpers/error.ts +0 -278
  690. package/src/helpers/imageCompression.ts +0 -230
  691. package/src/helpers/llmUsage.ts +0 -328
  692. package/src/helpers/markedExtendedTables.js +0 -217
  693. package/src/helpers/media.test.ts +0 -169
  694. package/src/helpers/media.ts +0 -81
  695. package/src/helpers/message.test.ts +0 -126
  696. package/src/helpers/message.ts +0 -219
  697. package/src/helpers/nats/getNatsConfig.ts +0 -148
  698. package/src/helpers/nats/isSessionExpiredError.test.ts +0 -38
  699. package/src/helpers/nats/isSessionExpiredError.ts +0 -51
  700. package/src/helpers/nats/useNats.test.tsx +0 -81
  701. package/src/helpers/nats/useNats.ts +0 -204
  702. package/src/helpers/nats/useNatsSession.test.ts +0 -16
  703. package/src/helpers/nats/useNatsSession.ts +0 -460
  704. package/src/helpers/piiDetection.test.ts +0 -186
  705. package/src/helpers/piiDetection.ts +0 -91
  706. package/src/helpers/sanitizer.ts +0 -17
  707. package/src/helpers/statistics.ts +0 -58
  708. package/src/helpers/stt/useSTT.ts +0 -515
  709. package/src/helpers/translations.ts +0 -39
  710. package/src/helpers/tts/ttsVoiceUtility.ts +0 -275
  711. package/src/helpers/tts/useTTS.ts +0 -621
  712. package/src/helpers/utils.test.ts +0 -331
  713. package/src/helpers/utils.ts +0 -591
  714. package/src/helpers/venue.ts +0 -36
  715. package/src/i18n.ts +0 -39
  716. package/src/index.stories.tsx +0 -220
  717. package/src/index.test.tsx +0 -156
  718. package/src/index.tsx +0 -592
  719. package/src/locales/de.json +0 -680
  720. package/src/locales/en.json +0 -754
  721. package/src/locales/es.json +0 -682
  722. package/src/locales/fr.json +0 -682
  723. package/src/locales/it.json +0 -750
  724. package/src/mocks/data.ts +0 -790
  725. package/src/styles.css +0 -126
  726. package/src/types/integration.test.ts +0 -32
  727. package/src/types/integration.ts +0 -31
  728. package/src/types/layout.ts +0 -50
  729. package/src/version.ts +0 -2
@@ -1,1091 +0,0 @@
1
- import {
2
- AnimationAction,
3
- AnimationClip,
4
- AnimationMixer,
5
- LoopOnce,
6
- Scene,
7
- } from 'three';
8
- import { AnimationState } from '../FullbodyAvatar/types';
9
- import { MAPPING_EMOTIONS_ITALIAN_TO_ENGLISH } from '../../constants';
10
-
11
- // Animation categories
12
- export type AnimationCategory = 'IDLE' | 'LOADING' | 'ACTION';
13
-
14
- // Animation metadata with essential properties
15
- export interface AnimationInfo {
16
- name: string;
17
- category: AnimationCategory;
18
- duration: number;
19
- canLoop: boolean;
20
- defaultLoopCount: number; // 0 for infinite
21
- }
22
-
23
- // Animation play options
24
- export interface AnimationPlayOptions {
25
- fadeInDuration?: number;
26
- fadeOutDuration?: number;
27
- timeScale?: number;
28
- loopCount?: number;
29
- fallbackToIdle?: boolean;
30
- }
31
-
32
- /**
33
- * Enhanced AvatarAnimator class
34
- * A system for managing 3D avatar animations with improved sequence parsing and generalized emotion handling
35
- */
36
- export class AvatarAnimator {
37
- // Animation system
38
- private mixer: AnimationMixer | null = null;
39
- private actions: Record<string, AnimationAction> = {};
40
- private animations: Map<string, AnimationInfo> = new Map();
41
-
42
- // Current state tracking
43
- private currentAnimation: string | null = null;
44
- private currentSequence: string[] | null = null;
45
- private sequenceIndex: number = 0;
46
- private isTransitioning: boolean = false;
47
-
48
- // Configuration
49
- private timeScale: number = 1.0;
50
- private fadeInDuration: number = 0.8;
51
- private fadeOutDuration: number = 0.8;
52
- private avatarType: 'RPM' | 'CUSTOM_GLB' = 'CUSTOM_GLB';
53
-
54
- // Event system
55
- private eventListeners: Record<string, Array<(data: any) => void>> = {
56
- start: [],
57
- complete: [],
58
- loop: [],
59
- transition: [],
60
- error: [],
61
- };
62
-
63
- // Initialization state
64
- private initialized: boolean = false;
65
-
66
- // Track idle rotations
67
- private idleRotationCount = 0;
68
- private currentIdleAnimation: string | null = null;
69
- private idleRotationLimit = 5; // Number of loops before changing idle animation
70
- private lastAnimationTime: number | null = null;
71
- /**
72
- * Initialize the animator with pre-loaded animations
73
- * Added protection against multiple initializations
74
- */
75
- async initialize(
76
- scene: Scene,
77
- preloadedActions: Record<string, AnimationAction>,
78
- animations: AnimationClip[] = [],
79
- avatarType: 'RPM' | 'CUSTOM_GLB' = 'CUSTOM_GLB'
80
- ): Promise<void> {
81
- // Guard against multiple initializations
82
- if (this.initialized || this.mixer) {
83
- console.warn(
84
- '[AvatarAnimator] Already initialized, ignoring duplicate initialization'
85
- );
86
- return;
87
- }
88
-
89
- // Create a new mixer for the scene
90
- this.mixer = new AnimationMixer(scene);
91
-
92
- // Store avatar type
93
- this.avatarType = avatarType;
94
-
95
- // Start with empty actions to avoid duplicates
96
- this.actions = {};
97
-
98
- // First register animations directly from the model
99
- this.registerClipsDirectly(animations);
100
-
101
- // Then register any additional preloaded actions that don't conflict
102
- // This ensures avatar animations take precedence over fallback animations
103
- Object.entries(preloadedActions).forEach(([name, action]) => {
104
- if (!this.actions[name]) {
105
- this.actions[name] = action;
106
- this.registerAnimation(name, action);
107
- }
108
- });
109
- // Setup mixer event listeners
110
- this.setupMixerEvents();
111
-
112
- // Use direct approach to start animation (bypassing play method initially)
113
- const idleAnimations = ['Idle1', 'Idle2', 'Idle3', 'Idle4', 'Idle5'];
114
- let startedSuccessfully = false;
115
-
116
- for (const idleName of idleAnimations) {
117
- if (this.actions[idleName]) {
118
- try {
119
- const idleAction = this.actions[idleName];
120
- idleAction.reset();
121
- idleAction.setEffectiveTimeScale(1);
122
- idleAction.setEffectiveWeight(1);
123
- idleAction.setLoop(Infinity, Infinity);
124
- idleAction.play();
125
-
126
- // Update state
127
- this.currentAnimation = idleName;
128
- this.currentIdleAnimation = idleName;
129
- this.idleRotationCount = 0;
130
-
131
- startedSuccessfully = true;
132
- break;
133
- } catch (error) {
134
- console.error(`Error starting ${idleName}:`, error);
135
- }
136
- }
137
- }
138
-
139
- if (!startedSuccessfully) {
140
- console.warn(
141
- '[AvatarAnimator] Could not start any idle animation directly'
142
- );
143
- // Don't try fallback methods here to avoid loops
144
- }
145
-
146
- // Mark as initialized AFTER everything is set up
147
- this.initialized = true;
148
- }
149
-
150
- /**
151
- * Register animation clips directly from the model
152
- * This ensures model animations take priority
153
- */
154
- private registerClipsDirectly(clips: AnimationClip[]): void {
155
- if (!this.mixer) return;
156
-
157
- clips.forEach(clip => {
158
- // Create a new action for each clip
159
- const action = this.mixer?.clipAction(clip);
160
- if (!action) {
161
- console.warn(
162
- `[AvatarAnimator] Failed to create action for clip: ${clip.name}`
163
- );
164
- return;
165
- }
166
- // Store the action with its name
167
- this.actions[clip.name] = action;
168
- // Register the animation metadata
169
- this.registerAnimation(clip.name, action);
170
- });
171
- }
172
-
173
- /**
174
- * Register a single animation with inferred metadata
175
- */
176
- private registerAnimation(name: string, action: AnimationAction): void {
177
- const duration = action.getClip().duration;
178
-
179
- // Infer category and loop settings from name
180
- let category: AnimationCategory = 'ACTION';
181
- let defaultLoopCount = 1;
182
- let canLoop = false;
183
-
184
- // Categorize animations based on name patterns
185
- const lowerName = name.toLowerCase();
186
- if (lowerName.includes('idle')) {
187
- category = 'IDLE';
188
- defaultLoopCount = 0; // infinite
189
- canLoop = true;
190
- } else if (lowerName.includes('loading') || lowerName.includes('wait')) {
191
- category = 'LOADING';
192
- defaultLoopCount = 0; // infinite
193
- canLoop = true;
194
- }
195
-
196
- // Store animation info
197
- this.animations.set(name, {
198
- name,
199
- category,
200
- duration,
201
- canLoop,
202
- defaultLoopCount,
203
- });
204
- }
205
-
206
- /**
207
- * Play a specific animation with improved transition handling
208
- */
209
- play(animationName: string, options: AnimationPlayOptions = {}): void {
210
- try {
211
- if (!this.initialized || !this.mixer) {
212
- console.warn(
213
- `[AvatarAnimator] Cannot play ${animationName} - not initialized`
214
- );
215
- return;
216
- }
217
-
218
- // Check if animation exists
219
- const nextAction = this.actions[animationName];
220
-
221
- if (!nextAction) {
222
- console.warn(`[AvatarAnimator] Animation not found: ${animationName}`);
223
- if (options.fallbackToIdle !== false) {
224
- const fallbackAnim = Object.keys(this.actions)[0];
225
- if (fallbackAnim) {
226
- this.play(fallbackAnim, { ...options, fallbackToIdle: false });
227
- }
228
- }
229
- return;
230
- }
231
-
232
- // Get animation info
233
- const animInfo = this.getAnimationInfo(animationName);
234
- if (!animInfo) {
235
- console.warn(
236
- `[AvatarAnimator] Animation info not found: ${animationName}`
237
- );
238
- if (options.fallbackToIdle !== false) {
239
- this.idle();
240
- }
241
- return;
242
- }
243
-
244
- // Skip if the same animation is already playing and is the same category
245
- if (
246
- this.currentAnimation === animationName &&
247
- !this.isTransitioning &&
248
- options.loopCount === undefined // Only skip if not explicitly changing loop count
249
- ) {
250
- return;
251
- }
252
-
253
- // Prevent overlapping transitions
254
- if (this.isTransitioning) {
255
- // Complete any ongoing transition first
256
- if (this.currentAnimation) {
257
- const currentAction = this.actions[this.currentAnimation];
258
- if (currentAction) {
259
- currentAction.fadeOut(0.1); // Quick fade out of current transition
260
- }
261
- }
262
- }
263
-
264
- // Set up transition parameters
265
- const fadeIn = options.fadeInDuration ?? this.fadeInDuration;
266
- const fadeOut = options.fadeOutDuration ?? this.fadeOutDuration;
267
- const loopCount = options.loopCount ?? animInfo.defaultLoopCount;
268
- const timeScale = options.timeScale ?? this.timeScale;
269
-
270
- // Check if this is an idle animation
271
- const isIdleAnimation = animInfo.category === 'IDLE';
272
- if (isIdleAnimation) {
273
- this.currentIdleAnimation = animationName;
274
- this.idleRotationCount = 0;
275
- }
276
-
277
- // Emit transition event
278
- this.emit('transition', {
279
- from: this.currentAnimation,
280
- to: animationName,
281
- });
282
-
283
- // Fade out current animation if exists
284
- if (this.currentAnimation) {
285
- const currentAction = this.actions[this.currentAnimation];
286
- if (currentAction) {
287
- // Important: We must stop the action if we're resetting it to the same animation
288
- if (this.currentAnimation === animationName) {
289
- currentAction.stop();
290
- } else {
291
- currentAction.fadeOut(fadeOut);
292
- }
293
- }
294
- }
295
-
296
- // Configure next animation
297
- nextAction.reset();
298
- nextAction.fadeIn(fadeIn);
299
- nextAction.timeScale = timeScale;
300
-
301
- // Ensure action is enabled and weight is reset
302
- nextAction.enabled = true;
303
- // nextAction.setEffectiveWeight(0); // Start from zero weight for smooth fade in
304
-
305
- // Set loop behavior
306
- if (loopCount === 0) {
307
- // Infinite looping
308
- nextAction.setLoop(Infinity, Infinity);
309
- } else {
310
- // Limited loops or single play
311
- nextAction.setLoop(
312
- loopCount > 1 ? loopCount : LoopOnce,
313
- loopCount > 1 ? loopCount : 1
314
- );
315
- nextAction.clampWhenFinished = true;
316
- }
317
-
318
- // Play the animation
319
- nextAction.play();
320
-
321
- // Update state
322
- this.currentAnimation = animationName;
323
- this.isTransitioning = true;
324
-
325
- // Clear transition state after the longer of the fade durations
326
- const transitionDuration = Math.max(fadeIn, fadeOut) * 1000;
327
- setTimeout(() => {
328
- this.isTransitioning = false;
329
- }, transitionDuration);
330
-
331
- // Emit start event
332
- this.emit('start', {
333
- animation: animationName,
334
- category: animInfo.category,
335
- loopCount,
336
- });
337
- } catch (error) {
338
- console.error(
339
- `[AvatarAnimator] Error in play method for ${animationName}:`,
340
- error
341
- );
342
- // Try to recover
343
- if (options.fallbackToIdle !== false) {
344
- try {
345
- this.idle();
346
- } catch (recoveryError) {
347
- console.error(
348
- '[AvatarAnimator] Failed to recover with idle animation:',
349
- recoveryError
350
- );
351
- }
352
- }
353
- }
354
- }
355
-
356
- /**
357
- * Execute an animation command (single animation or sequence)
358
- */
359
- execute(command: string): void {
360
- if (!this.initialized) {
361
- console.warn('[AvatarAnimator] Cannot execute - not initialized');
362
- return;
363
- }
364
-
365
- try {
366
- // Parse for loop count if specified
367
- let loopCount: number | undefined;
368
- const loopMatch = command.match(/\[loop=(\d+)\]/);
369
- if (loopMatch) {
370
- loopCount = parseInt(loopMatch[1], 10);
371
- command = command.replace(loopMatch[0], '').trim();
372
- }
373
-
374
- // Simple sequence parsing with -> operator
375
- if (command.includes('->')) {
376
- const sequence = command.split('->').map(s => s.trim());
377
- this.playSequence(sequence, { loopCount });
378
- } else {
379
- // Single animation play
380
- this.play(command, { loopCount });
381
- }
382
- } catch (error) {
383
- console.error(
384
- '[AvatarAnimator] Error executing animation command:',
385
- error
386
- );
387
- this.emit('error', { error, command });
388
- this.idle();
389
- }
390
- }
391
-
392
- /**
393
- * Enhanced processChatEmission method with improved transition handling
394
- */
395
- processChatEmission(
396
- chatEmission: string | null | undefined,
397
- isLoading: boolean
398
- ): void {
399
- if (!this.initialized) {
400
- console.warn(
401
- '[AvatarAnimator] Cannot process chat emission - not initialized'
402
- );
403
- return;
404
- }
405
-
406
- // Track whether we're transitioning from loading state
407
- const wasInLoadingState = this.getAnimationCategory() === 'LOADING';
408
-
409
- // Handle loading state
410
- if (isLoading) {
411
- if (wasInLoadingState) {
412
- // Already in loading state
413
- return;
414
- }
415
- this.loading();
416
- return;
417
- }
418
-
419
- // Default to idle if no chat emission
420
- if (!chatEmission) {
421
- if (this.getAnimationCategory() === 'IDLE') {
422
- // Already idle
423
- return;
424
- }
425
- // Use longer transition when coming from loading state
426
- this.idle(
427
- wasInLoadingState
428
- ? { fadeInDuration: 1.2, fadeOutDuration: 1.0 }
429
- : undefined
430
- );
431
- return;
432
- }
433
-
434
- // Look for animation instructions in various formats
435
-
436
- // 1. Look for sequence format with specific tag
437
- const sequenceMatch = chatEmission.match(
438
- /<output class="animation-sequence">(.*?)<\/output>/
439
- );
440
-
441
- // 2. Look for animation tag with optional loop count
442
- const animationMatch = chatEmission.match(
443
- /<output class="animation">(.*?)(\[loop=(\d+)\])?<\/output>/
444
- );
445
-
446
- // 3. Look for legacy emotion format (for backward compatibility)
447
- const emotionMatch = chatEmission.match(
448
- /<output class="memori-emotion">(.*?)<\/output>/
449
- );
450
-
451
- // Calculate transition parameters based on current state
452
- const transitionOptions = this.calculateTransitionOptions();
453
-
454
- // Process matches in order of priority
455
- //ex. <output class="animation-sequence">Anger->Sadness->Surprise</output>
456
- if (sequenceMatch && sequenceMatch[1]) {
457
- const sequence = sequenceMatch[1].trim();
458
-
459
- // Check if already playing this sequence
460
- if (
461
- this.currentSequence &&
462
- this.currentSequence.join('->') === sequence &&
463
- this.sequenceIndex < this.currentSequence.length
464
- ) {
465
- return;
466
- }
467
-
468
- // Execute sequence with enhanced transition options
469
- this.executeWithTransition(sequence, transitionOptions);
470
- return;
471
- }
472
-
473
- //ex. <output class="animation">Anger</output> OR <output class="animation">[loop=2]Anger</output>
474
- if (animationMatch && animationMatch[1]) {
475
- const animation = animationMatch[1].trim();
476
- let loopCount: number | undefined;
477
-
478
- // Check for loop count
479
- if (animationMatch[3]) {
480
- loopCount = parseInt(animationMatch[3], 10);
481
- }
482
-
483
- // Play with enhanced transition options
484
- this.play(animation, {
485
- ...transitionOptions,
486
- loopCount,
487
- });
488
- return;
489
- }
490
-
491
- //ex. <output class="memori-emotion">Anger</output>
492
- if (emotionMatch && emotionMatch[1]) {
493
- const emotion = emotionMatch[1].trim();
494
-
495
- let matchingAnimations: string[] = [];
496
- //If the name of the emotion is in english, we can use the emotion mapping to find the corresponding animation
497
- if (
498
- MAPPING_EMOTIONS_ITALIAN_TO_ENGLISH.find(
499
- item => item.english === emotion
500
- )
501
- ) {
502
- let matchingEmotions = MAPPING_EMOTIONS_ITALIAN_TO_ENGLISH.filter(
503
- item => item.english === emotion
504
- );
505
- matchingAnimations = this.getAllAnimationNames().filter(name =>
506
- matchingEmotions.some(emotion =>
507
- name.toLowerCase().startsWith(emotion.italian.toLowerCase())
508
- )
509
- );
510
- } else {
511
- // More generalized approach - try to find any animation that starts with this emotion
512
- matchingAnimations = this.getAllAnimationNames().filter(name =>
513
- name.toLowerCase().startsWith(emotion.toLowerCase())
514
- );
515
- }
516
-
517
- if (matchingAnimations.length > 0) {
518
- const randomIndex = Math.floor(
519
- Math.random() * matchingAnimations.length
520
- );
521
- const animationToPlay = matchingAnimations[randomIndex];
522
-
523
- // Play with enhanced transition options
524
- this.play(animationToPlay, transitionOptions);
525
- return;
526
- }
527
- }
528
-
529
- // Default to idle if current state is not already idle
530
- if (this.getAnimationCategory() !== 'IDLE') {
531
- this.idle(transitionOptions);
532
- }
533
- }
534
-
535
- /**
536
- * Calculate optimal transition parameters based on current state
537
- */
538
- private calculateTransitionOptions(): AnimationPlayOptions {
539
- // Start with base transition parameters
540
- const options: AnimationPlayOptions = {
541
- fadeInDuration: this.fadeInDuration,
542
- fadeOutDuration: this.fadeOutDuration,
543
- timeScale: this.timeScale,
544
- };
545
-
546
- // Get current animation state
547
- const currentCategory = this.getAnimationCategory();
548
- const currentAction = this.currentAnimation
549
- ? this.actions[this.currentAnimation]
550
- : null;
551
-
552
- options.fadeOutDuration = 0.8;
553
- options.fadeInDuration = 0.8;
554
-
555
- // Further adjust based on current animation progress
556
- if (currentAction) {
557
- const clip = currentAction.getClip();
558
- const progress = currentAction.time / clip.duration;
559
-
560
- // If we're near the end of the animation (>75%), slightly faster fade out
561
- if (progress > 0.75) {
562
- options.fadeOutDuration = Math.max(
563
- 0.4,
564
- (options.fadeOutDuration ?? 0.8) * 0.8
565
- );
566
- }
567
- // If we're near the beginning (<25%), slightly faster fade in for new animation
568
- else if (progress < 0.25) {
569
- options.fadeInDuration = Math.max(
570
- 0.4,
571
- (options.fadeInDuration ?? 0.8) * 0.8
572
- );
573
- }
574
- }
575
-
576
- return options;
577
- }
578
-
579
- /**
580
- * Execute an animation command with enhanced transition handling
581
- */
582
- private executeWithTransition(
583
- command: string,
584
- options: AnimationPlayOptions = {}
585
- ): void {
586
- if (!this.initialized) {
587
- console.warn('[AvatarAnimator] Cannot execute - not initialized');
588
- return;
589
- }
590
-
591
- try {
592
- // Parse for loop count if specified
593
- let loopCount: number | undefined;
594
- const loopMatch = command.match(/\[loop=(\d+)\]/);
595
- if (loopMatch) {
596
- loopCount = parseInt(loopMatch[1], 10);
597
- command = command.replace(loopMatch[0], '').trim();
598
- }
599
-
600
- // Simple sequence parsing with -> operator
601
- if (command.includes('->')) {
602
- const sequence = command.split('->').map(s => s.trim());
603
-
604
- // Enhanced sequence options
605
- const sequenceOptions = {
606
- ...options,
607
- loopCount: loopCount || 1,
608
- };
609
-
610
- this.playSequence(sequence, sequenceOptions);
611
- } else {
612
- // Single animation play with enhanced options
613
- this.play(command, {
614
- ...options,
615
- loopCount,
616
- });
617
- }
618
- } catch (error) {
619
- console.error(
620
- '[AvatarAnimator] Error executing animation command:',
621
- error
622
- );
623
- this.emit('error', { error, command });
624
- this.idle();
625
- }
626
- }
627
-
628
- /**
629
- * Improved idle transition with better animation selection and transitions
630
- */
631
- idle(options: AnimationPlayOptions = {}): void {
632
- // Get all idle animations
633
- const idleAnimations = this.getAnimationsByCategory('IDLE');
634
-
635
- if (idleAnimations.length > 0) {
636
- // If already in an idle animation, ensure we pick a different one
637
- let availableIdles = idleAnimations;
638
-
639
- if (this.getAnimationCategory() === 'IDLE') {
640
- // Filter out current idle to ensure variety
641
- availableIdles = idleAnimations.filter(
642
- info => info.name !== this.currentAnimation
643
- );
644
-
645
- // If we've filtered out all options, reset to full list
646
- if (availableIdles.length === 0) {
647
- availableIdles = idleAnimations;
648
- }
649
- }
650
-
651
- // Choose a random idle from available options
652
- const randomIndex = Math.floor(Math.random() * availableIdles.length);
653
- const selectedIdle = availableIdles[randomIndex].name;
654
-
655
- // Apply smooth transition options
656
- const transitionOptions: AnimationPlayOptions = {
657
- fadeInDuration: options.fadeInDuration ?? 0.7, // Slower fade for natural idle transition
658
- fadeOutDuration: options.fadeOutDuration ?? 0.7, // Slower fade for natural idle transition
659
- timeScale: options.timeScale ?? 0.9, // Slightly slower for more natural movement
660
- loopCount: 0, // Always infinite for idle
661
- ...options,
662
- };
663
-
664
- // Always ensure loopCount is 0 (infinite) for idle animations
665
- transitionOptions.loopCount = 0;
666
-
667
- // Play new idle with optimized transition parameters
668
- this.play(selectedIdle, transitionOptions);
669
-
670
- // Update idle tracking state
671
- this.currentIdleAnimation = selectedIdle;
672
- this.idleRotationCount = 0;
673
-
674
- return;
675
- } else {
676
- // Fallback for avatars without idle animations
677
- console.warn(
678
- '[AvatarAnimator] No idle animations available, checking fallback options'
679
- );
680
-
681
- // For custom GLB, use any loopable animation
682
- const loopableAnimations = Array.from(this.animations.values())
683
- .filter(info => info.canLoop)
684
- .map(info => info.name);
685
-
686
- if (loopableAnimations.length > 0) {
687
- const randomIndex = Math.floor(
688
- Math.random() * loopableAnimations.length
689
- );
690
- const fallbackAnimation = loopableAnimations[randomIndex];
691
-
692
- // Use smooth transition parameters
693
- this.play(fallbackAnimation, {
694
- loopCount: 0,
695
- fadeInDuration: options.fadeInDuration ?? 0.7,
696
- fadeOutDuration: options.fadeOutDuration ?? 0.7,
697
- timeScale: options.timeScale ?? 0.9,
698
- });
699
-
700
- this.currentIdleAnimation = fallbackAnimation;
701
- this.idleRotationCount = 0;
702
- } else if (Object.keys(this.actions).length > 0) {
703
- // Last resort: use any available animation
704
- const firstAnimation = Object.keys(this.actions)[0];
705
-
706
- this.play(firstAnimation, {
707
- loopCount: 0,
708
- fadeInDuration: options.fadeInDuration ?? 0.7,
709
- fadeOutDuration: options.fadeOutDuration ?? 0.7,
710
- timeScale: options.timeScale ?? 0.9,
711
- });
712
-
713
- this.currentIdleAnimation = firstAnimation;
714
- this.idleRotationCount = 0;
715
- }
716
- }
717
- }
718
-
719
- /**
720
- * Improved loading animation with transition parameters
721
- */
722
- loading(options: AnimationPlayOptions = {}): void {
723
- const randomLoading = this.getRandomAnimation('LOADING');
724
- if (randomLoading) {
725
- // Default transition parameters
726
- const transitionOptions: AnimationPlayOptions = {
727
- loopCount: 0, // Always infinite for loading
728
- fadeInDuration: options.fadeInDuration ?? 0.8,
729
- fadeOutDuration: options.fadeOutDuration ?? 0.8,
730
- timeScale: options.timeScale ?? this.timeScale,
731
- ...options,
732
- };
733
-
734
- // Always ensure loopCount is 0 (infinite) for loading animations
735
- transitionOptions.loopCount = 0;
736
-
737
- this.play(randomLoading, transitionOptions);
738
- } else {
739
- console.warn(
740
- '[AvatarAnimator] No loading animations available, using idle instead'
741
- );
742
- this.idle(options);
743
- }
744
- }
745
-
746
- /**
747
- * Play a sequence of animations with improved transition handling
748
- */
749
- playSequence(sequence: string[], options: AnimationPlayOptions = {}): void {
750
- if (!sequence || sequence.length === 0) {
751
- console.warn('[AvatarAnimator] Empty animation sequence provided');
752
- return;
753
- }
754
-
755
- // Limit sequence length to prevent performance issues
756
- if (sequence.length > 5) {
757
- console.warn(
758
- `[AvatarAnimator] Sequence too long (${sequence.length}), limiting to 5 animations`
759
- );
760
- sequence = sequence.slice(0, 5);
761
- }
762
-
763
- // Validate all animations exist
764
- const validSequence = sequence.filter(name => this.actions[name]);
765
-
766
- if (validSequence.length === 0) {
767
- console.error(
768
- '[AvatarAnimator] No valid animations in sequence, defaulting to idle'
769
- );
770
- this.idle();
771
- return;
772
- }
773
-
774
- // Complete any ongoing transition first
775
- if (this.isTransitioning) {
776
- // If we're already transitioning, let's make sure it completes
777
- // before starting the sequence
778
- setTimeout(() => {
779
- this.playSequence(sequence, options);
780
- }, 100);
781
- return;
782
- }
783
-
784
- // Store sequence info
785
- this.currentSequence = [...validSequence];
786
- this.sequenceIndex = 0;
787
-
788
- // Use optimized transition parameters for first animation in sequence
789
- const firstAnimationOptions = {
790
- fadeInDuration: 0.6, // Smoother entry into sequence
791
- fadeOutDuration: 0.6, // Smoother exit from current animation
792
- loopCount: 1,
793
- timeScale: options.timeScale ?? this.timeScale,
794
- };
795
-
796
- // Play first animation
797
- const firstAnimation = validSequence[0];
798
- this.play(firstAnimation, firstAnimationOptions);
799
- }
800
-
801
- /**
802
- * FIXED: Added a method to force transition to idle, useful for debugging
803
- */
804
- forceIdle(): void {
805
- // console.log('[AvatarAnimator] Force transitioning to idle');
806
-
807
- const idleAnimations = this.getAnimationsByCategory('IDLE');
808
- if (idleAnimations.length > 0) {
809
- // Just pick the first idle animation
810
- const forcedIdle = idleAnimations[0].name;
811
-
812
- // Force play with immediate transition
813
- this.play(forcedIdle, {
814
- loopCount: 0,
815
- fadeInDuration: 0.8,
816
- fadeOutDuration: 0.8,
817
- });
818
-
819
- // Update state
820
- this.currentIdleAnimation = forcedIdle;
821
- this.idleRotationCount = 0;
822
-
823
- // console.log(`[AvatarAnimator] Forced idle transition to: ${forcedIdle}`);
824
- } else {
825
- console.error(
826
- '[AvatarAnimator] No idle animations available for forced transition'
827
- );
828
- }
829
- }
830
-
831
- /**
832
- * Updates animation system with better transition handling
833
- */
834
- update(delta: number): void {
835
- if (!this.initialized || !this.mixer) return;
836
-
837
- // Clamp delta to prevent extreme time jumps which cause jerky transitions
838
- const clampedDelta = Math.min(delta, 0.1);
839
-
840
- // Update the mixer with clamped delta
841
- this.mixer.update(clampedDelta);
842
-
843
- // Skip other processing during active transitions
844
- if (this.isTransitioning) {
845
- return;
846
- }
847
-
848
- // Handle sequence progression
849
- if (this.currentSequence && this.currentAnimation) {
850
- const currentAction = this.actions[this.currentAnimation];
851
- if (currentAction) {
852
- const clipDuration = currentAction.getClip().duration;
853
- const progress = currentAction.time / clipDuration;
854
-
855
- // If near end of animation and not already transitioning to next
856
- if (progress > 0.85 && !this.isTransitioning) {
857
- if (this.sequenceIndex < this.currentSequence.length - 1) {
858
- // Move to next animation in sequence with smooth transition
859
- this.sequenceIndex++;
860
- const nextAnimation = this.currentSequence[this.sequenceIndex];
861
- this.play(nextAnimation, {
862
- fadeInDuration: 0.5, // Longer fade for smoother transitions
863
- fadeOutDuration: 0.5, // Longer fade for smoother transitions
864
- loopCount: 1,
865
- });
866
- } else {
867
- // End of sequence - return to idle with smooth transition
868
- this.currentSequence = null;
869
- this.sequenceIndex = 0;
870
- this.idle({
871
- fadeInDuration: 0.7,
872
- fadeOutDuration: 0.7,
873
- });
874
- }
875
- }
876
- }
877
- }
878
-
879
- // Handle idle rotation
880
- if (
881
- this.currentAnimation &&
882
- this.currentIdleAnimation &&
883
- this.getAnimationCategory() === 'IDLE'
884
- ) {
885
- const currentAction = this.actions[this.currentAnimation];
886
- if (currentAction) {
887
- const clipDuration = currentAction.getClip().duration;
888
- const currentTime = currentAction.time % clipDuration;
889
- const previousTime = this.lastAnimationTime || 0;
890
-
891
- // Detect loop completion (time wraps around)
892
- if (previousTime > currentTime + 0.1) {
893
- this.idleRotationCount++;
894
-
895
- // Change idle animation after certain number of loops
896
- if (this.idleRotationCount >= this.idleRotationLimit) {
897
- this.idleRotationCount = 0;
898
- this.idle({
899
- fadeInDuration: 0.6, // Smooth transition between idles
900
- fadeOutDuration: 0.6, // Smooth transition between idles
901
- });
902
- }
903
- }
904
-
905
- // Store time for next comparison
906
- this.lastAnimationTime = currentTime;
907
- }
908
- }
909
- }
910
-
911
- /**
912
- * Set up event listeners for the animation mixer with improved transition handling
913
- */
914
- private setupMixerEvents(): void {
915
- if (!this.mixer) {
916
- console.warn(
917
- '[AvatarAnimator] Cannot setup mixer events - mixer not initialized'
918
- );
919
- return;
920
- }
921
-
922
- // Listen for animation loops
923
- this.mixer.addEventListener('loop', event => {
924
- const action = event.action as AnimationAction;
925
- if (!action || !this.currentAnimation) return;
926
-
927
- if (action === this.actions[this.currentAnimation]) {
928
- this.emit('loop', { animation: this.currentAnimation });
929
- }
930
- });
931
-
932
- // Listen for animation completion with improved transition handling
933
- this.mixer.addEventListener('finished', event => {
934
- const action = event.action as AnimationAction;
935
- if (!action || !this.currentAnimation) return;
936
-
937
- if (action === this.actions[this.currentAnimation]) {
938
- // Prevent multiple completion handlers during transition
939
- if (this.isTransitioning) {
940
- return;
941
- }
942
-
943
- this.emit('complete', { animation: this.currentAnimation });
944
-
945
- // Add a small delay to ensure clean transition
946
- setTimeout(() => {
947
- // Handle sequence progression
948
- if (
949
- this.currentSequence &&
950
- this.sequenceIndex < this.currentSequence.length - 1
951
- ) {
952
- // Proceed to next animation in sequence with smooth transition
953
- this.sequenceIndex++;
954
- this.play(this.currentSequence[this.sequenceIndex], {
955
- fadeInDuration: 0.5, // Increased for smoother transitions
956
- fadeOutDuration: 0.5, // Increased for smoother transitions
957
- loopCount: 1,
958
- });
959
- } else if (
960
- this.currentSequence &&
961
- this.sequenceIndex >= this.currentSequence.length - 1
962
- ) {
963
- // End of sequence - return to idle with smooth transition
964
- this.currentSequence = null;
965
- this.sequenceIndex = 0;
966
- this.idle({
967
- fadeInDuration: 0.7,
968
- fadeOutDuration: 0.7,
969
- });
970
- } else if (
971
- this.currentAnimation &&
972
- this.getAnimationInfo(this.currentAnimation)?.category !== 'IDLE'
973
- ) {
974
- // Non-idle animation completed - return to idle with smooth transition
975
- this.idle({
976
- fadeInDuration: 0.7,
977
- fadeOutDuration: 0.7,
978
- });
979
- }
980
- }, 50); // Small delay to ensure smooth timing
981
- }
982
- });
983
- }
984
- /**
985
- * Set the animation time scale
986
- */
987
- setTimeScale(timeScale: number): void {
988
- // console.log('[AvatarAnimator] Setting time scale:', timeScale);
989
- this.timeScale = timeScale;
990
-
991
- // Update current animation if exists
992
- if (this.currentAnimation) {
993
- const currentAction = this.actions[this.currentAnimation];
994
- if (currentAction) {
995
- currentAction.timeScale = timeScale;
996
- }
997
- }
998
- }
999
-
1000
- /**
1001
- * Get a random animation by category
1002
- */
1003
- private getRandomAnimation(
1004
- category: AnimationCategory,
1005
- exclude: (string | null)[] = []
1006
- ): string | null {
1007
- const filteredAnimations = Array.from(this.animations.values()).filter(
1008
- info => info.category === category && !exclude.includes(info.name)
1009
- );
1010
-
1011
- if (filteredAnimations.length === 0) return null;
1012
-
1013
- const randomIndex = Math.floor(Math.random() * filteredAnimations.length);
1014
- return filteredAnimations[randomIndex].name;
1015
- }
1016
-
1017
- /**
1018
- * Get animation info by name
1019
- */
1020
- private getAnimationInfo(name: string): AnimationInfo | null {
1021
- return this.animations.get(name) || null;
1022
- }
1023
-
1024
- /**
1025
- * Get the current animation category
1026
- */
1027
- private getAnimationCategory(): AnimationCategory | null {
1028
- if (!this.currentAnimation) return null;
1029
- return this.getAnimationInfo(this.currentAnimation)?.category || null;
1030
- }
1031
-
1032
- /**
1033
- * Event system methods
1034
- */
1035
- on(
1036
- event: 'start' | 'complete' | 'loop' | 'transition' | 'error',
1037
- callback: (data: any) => void
1038
- ): void {
1039
- if (this.eventListeners[event]) {
1040
- this.eventListeners[event].push(callback);
1041
- }
1042
- }
1043
-
1044
- off(
1045
- event: 'start' | 'complete' | 'loop' | 'transition' | 'error',
1046
- callback: (data: any) => void
1047
- ): void {
1048
- if (this.eventListeners[event]) {
1049
- this.eventListeners[event] = this.eventListeners[event].filter(
1050
- cb => cb !== callback
1051
- );
1052
- }
1053
- }
1054
-
1055
- private emit(event: string, data: any): void {
1056
- if (this.eventListeners[event]) {
1057
- this.eventListeners[event].forEach(callback => {
1058
- try {
1059
- callback(data);
1060
- } catch (error) {
1061
- console.error(`Error in ${event} event handler:`, error);
1062
- }
1063
- });
1064
- }
1065
- }
1066
-
1067
- /**
1068
- * Utility getters
1069
- */
1070
- getCurrentAnimationName(): string | null {
1071
- return this.currentAnimation;
1072
- }
1073
-
1074
- getAvatarType(): 'RPM' | 'CUSTOM_GLB' {
1075
- return this.avatarType;
1076
- }
1077
-
1078
- isInitialized(): boolean {
1079
- return this.initialized;
1080
- }
1081
-
1082
- getAllAnimationNames(): string[] {
1083
- return Array.from(this.animations.keys());
1084
- }
1085
-
1086
- getAnimationsByCategory(category: AnimationCategory): AnimationInfo[] {
1087
- return Array.from(this.animations.values()).filter(
1088
- info => info.category === category
1089
- );
1090
- }
1091
- }