@magmamath/students-features 0.11.0-rc.9 → 1.0.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 (517) hide show
  1. package/dist/commonjs/features/chatbot/components/Chat/Chat.js +59 -221
  2. package/dist/commonjs/features/chatbot/components/Chat/Chat.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js +58 -45
  4. package/dist/commonjs/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
  5. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js +1 -1
  6. package/dist/commonjs/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
  7. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +2 -2
  8. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
  9. package/dist/commonjs/features/chatbot/components/ChatInput/FreeText/SendMessageButton.js +1 -1
  10. package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
  11. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
  12. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js +34 -14
  13. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
  14. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +8 -48
  15. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  16. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js +13 -14
  17. package/dist/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  18. package/dist/commonjs/features/chatbot/components/ChatMessage/SentMessage.js +1 -1
  19. package/dist/commonjs/features/chatbot/components/Chatbot.js +12 -22
  20. package/dist/commonjs/features/chatbot/components/Chatbot.js.map +1 -1
  21. package/dist/commonjs/features/chatbot/constants.js +4 -4
  22. package/dist/commonjs/features/chatbot/constants.js.map +1 -1
  23. package/dist/commonjs/features/chatbot/helpers.js +1 -8
  24. package/dist/commonjs/features/chatbot/helpers.js.map +1 -1
  25. package/dist/commonjs/features/chatbot/index.js.map +1 -1
  26. package/dist/commonjs/features/chatbot/model/ChatBotModel.js +10 -46
  27. package/dist/commonjs/features/chatbot/model/ChatBotModel.js.map +1 -1
  28. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js +1 -2
  29. package/dist/commonjs/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
  30. package/dist/commonjs/features/chatbot/model/ChatbotApi.js +1 -1
  31. package/dist/commonjs/features/chatbot/model/ChatbotApi.js.map +1 -1
  32. package/dist/commonjs/features/chatbot/model/ChatbotTranslation.js +1 -1
  33. package/dist/commonjs/features/chatbot/model/ChatbotTranslation.js.map +1 -1
  34. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js +0 -9
  35. package/dist/commonjs/features/chatbot/model/ChatsCacheModel.js.map +1 -1
  36. package/dist/commonjs/features/chatbot/types/model.types.js.map +1 -1
  37. package/dist/commonjs/features/gifCelebrations/helpers.js +1 -0
  38. package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -1
  39. package/dist/commonjs/features/voice/constants.js +23 -0
  40. package/dist/commonjs/features/voice/constants.js.map +1 -0
  41. package/dist/commonjs/features/voice/helpers.js +208 -0
  42. package/dist/commonjs/features/voice/helpers.js.map +1 -0
  43. package/dist/commonjs/features/voice/index.js +105 -0
  44. package/dist/commonjs/features/voice/index.js.map +1 -0
  45. package/dist/commonjs/features/voice/playing/components/VoiceIcon.js +49 -0
  46. package/dist/commonjs/features/voice/playing/components/VoiceIcon.js.map +1 -0
  47. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +215 -0
  48. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  49. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +108 -0
  50. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  51. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +50 -0
  52. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  53. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +34 -0
  54. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  55. package/dist/commonjs/features/voice/playing/model/Player.model.js +98 -0
  56. package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -0
  57. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +66 -0
  58. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
  59. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +39 -0
  60. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -0
  61. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +223 -0
  62. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
  63. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js +41 -0
  64. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
  65. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +15 -0
  66. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  67. package/dist/commonjs/features/voice/playing/model/index.js +20 -0
  68. package/dist/commonjs/features/voice/playing/model/index.js.map +1 -0
  69. package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +74 -0
  70. package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -0
  71. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +63 -0
  72. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
  73. package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +35 -0
  74. package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
  75. package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js +27 -0
  76. package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js.map +1 -0
  77. package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js +50 -0
  78. package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
  79. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +59 -0
  80. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
  81. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +22 -0
  82. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
  83. package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +53 -0
  84. package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
  85. package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +78 -0
  86. package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
  87. package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +51 -0
  88. package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
  89. package/dist/commonjs/features/voice/recording/model/Recorder.model.js +55 -0
  90. package/dist/commonjs/features/voice/recording/model/Recorder.model.js.map +1 -0
  91. package/dist/commonjs/features/voice/recording/model/Uploader.model.js +44 -0
  92. package/dist/commonjs/features/voice/recording/model/Uploader.model.js.map +1 -0
  93. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +248 -0
  94. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
  95. package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js +30 -0
  96. package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
  97. package/dist/commonjs/features/voice/types.js +6 -0
  98. package/dist/commonjs/features/voice/types.js.map +1 -0
  99. package/dist/commonjs/index.js +12 -0
  100. package/dist/commonjs/index.js.map +1 -1
  101. package/dist/commonjs/shared/components/PlayButton.js +70 -0
  102. package/dist/commonjs/shared/components/PlayButton.js.map +1 -0
  103. package/dist/commonjs/shared/translation/localization/ca.json +18 -2
  104. package/dist/commonjs/shared/translation/localization/de.json +18 -2
  105. package/dist/commonjs/shared/translation/localization/en.json +18 -2
  106. package/dist/commonjs/shared/translation/localization/gb.json +18 -2
  107. package/dist/commonjs/shared/translation/localization/sct.json +18 -2
  108. package/dist/commonjs/shared/translation/localization/sw.json +18 -2
  109. package/dist/module/features/chatbot/components/Chat/Chat.js +61 -223
  110. package/dist/module/features/chatbot/components/Chat/Chat.js.map +1 -1
  111. package/dist/module/features/chatbot/components/ChatControls/ChatControls.js +59 -47
  112. package/dist/module/features/chatbot/components/ChatControls/ChatControls.js.map +1 -1
  113. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js +1 -1
  114. package/dist/module/features/chatbot/components/ChatInput/ChatInput.js.map +1 -1
  115. package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js +2 -2
  116. package/dist/module/features/chatbot/components/ChatInput/FreeText/ChatTextInput.js.map +1 -1
  117. package/dist/module/features/chatbot/components/ChatInput/FreeText/SendMessageButton.js +1 -1
  118. package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
  119. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
  120. package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js +36 -17
  121. package/dist/module/features/chatbot/components/ChatMessage/MessageLoader.js.map +1 -1
  122. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +9 -49
  123. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  124. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js +12 -13
  125. package/dist/module/features/chatbot/components/ChatMessage/ReceivedMessage.js.map +1 -1
  126. package/dist/module/features/chatbot/components/ChatMessage/SentMessage.js +1 -1
  127. package/dist/module/features/chatbot/components/Chatbot.js +11 -20
  128. package/dist/module/features/chatbot/components/Chatbot.js.map +1 -1
  129. package/dist/module/features/chatbot/constants.js +5 -5
  130. package/dist/module/features/chatbot/constants.js.map +1 -1
  131. package/dist/module/features/chatbot/helpers.js +1 -8
  132. package/dist/module/features/chatbot/helpers.js.map +1 -1
  133. package/dist/module/features/chatbot/index.js.map +1 -1
  134. package/dist/module/features/chatbot/model/ChatBotModel.js +10 -46
  135. package/dist/module/features/chatbot/model/ChatBotModel.js.map +1 -1
  136. package/dist/module/features/chatbot/model/ChatBoxTextManager.js +1 -2
  137. package/dist/module/features/chatbot/model/ChatBoxTextManager.js.map +1 -1
  138. package/dist/module/features/chatbot/model/ChatbotApi.js +1 -1
  139. package/dist/module/features/chatbot/model/ChatbotApi.js.map +1 -1
  140. package/dist/module/features/chatbot/model/ChatbotTranslation.js +1 -1
  141. package/dist/module/features/chatbot/model/ChatbotTranslation.js.map +1 -1
  142. package/dist/module/features/chatbot/model/ChatsCacheModel.js +0 -9
  143. package/dist/module/features/chatbot/model/ChatsCacheModel.js.map +1 -1
  144. package/dist/module/features/chatbot/types/model.types.js.map +1 -1
  145. package/dist/module/features/gifCelebrations/helpers.js +1 -0
  146. package/dist/module/features/gifCelebrations/helpers.js.map +1 -1
  147. package/dist/module/features/voice/constants.js +19 -0
  148. package/dist/module/features/voice/constants.js.map +1 -0
  149. package/dist/module/features/voice/helpers.js +191 -0
  150. package/dist/module/features/voice/helpers.js.map +1 -0
  151. package/dist/module/features/voice/index.js +12 -0
  152. package/dist/module/features/voice/index.js.map +1 -0
  153. package/dist/module/features/voice/playing/components/VoiceIcon.js +41 -0
  154. package/dist/module/features/voice/playing/components/VoiceIcon.js.map +1 -0
  155. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +208 -0
  156. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  157. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +102 -0
  158. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  159. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +45 -0
  160. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  161. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +29 -0
  162. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  163. package/dist/module/features/voice/playing/model/Player.model.js +93 -0
  164. package/dist/module/features/voice/playing/model/Player.model.js.map +1 -0
  165. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +61 -0
  166. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
  167. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +34 -0
  168. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -0
  169. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +218 -0
  170. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
  171. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js +36 -0
  172. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
  173. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +10 -0
  174. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  175. package/dist/module/features/voice/playing/model/index.js +5 -0
  176. package/dist/module/features/voice/playing/model/index.js.map +1 -0
  177. package/dist/module/features/voice/recording/components/VoiceRecord.js +67 -0
  178. package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -0
  179. package/dist/module/features/voice/recording/components/VoiceRecordButton.js +57 -0
  180. package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
  181. package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +29 -0
  182. package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
  183. package/dist/module/features/voice/recording/components/VoiceRecordDivider.js +21 -0
  184. package/dist/module/features/voice/recording/components/VoiceRecordDivider.js.map +1 -0
  185. package/dist/module/features/voice/recording/components/VoiceRecordTimer.js +44 -0
  186. package/dist/module/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
  187. package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js +54 -0
  188. package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
  189. package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +17 -0
  190. package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
  191. package/dist/module/features/voice/recording/modal/ModalFooterButtons.js +47 -0
  192. package/dist/module/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
  193. package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js +71 -0
  194. package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
  195. package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js +45 -0
  196. package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
  197. package/dist/module/features/voice/recording/model/Recorder.model.js +50 -0
  198. package/dist/module/features/voice/recording/model/Recorder.model.js.map +1 -0
  199. package/dist/module/features/voice/recording/model/Uploader.model.js +39 -0
  200. package/dist/module/features/voice/recording/model/Uploader.model.js.map +1 -0
  201. package/dist/module/features/voice/recording/model/VoiceRecord.model.js +244 -0
  202. package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
  203. package/dist/module/features/voice/recording/model/VoiceRecordCollection.js +25 -0
  204. package/dist/module/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
  205. package/dist/module/features/voice/types.js +4 -0
  206. package/dist/module/features/voice/types.js.map +1 -0
  207. package/dist/module/index.js +1 -0
  208. package/dist/module/index.js.map +1 -1
  209. package/dist/module/shared/components/PlayButton.js +64 -0
  210. package/dist/module/shared/components/PlayButton.js.map +1 -0
  211. package/dist/module/shared/translation/localization/ca.json +18 -2
  212. package/dist/module/shared/translation/localization/de.json +18 -2
  213. package/dist/module/shared/translation/localization/en.json +18 -2
  214. package/dist/module/shared/translation/localization/gb.json +18 -2
  215. package/dist/module/shared/translation/localization/sct.json +18 -2
  216. package/dist/module/shared/translation/localization/sw.json +18 -2
  217. package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts +1 -2
  218. package/dist/typescript/commonjs/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
  219. package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts +3 -3
  220. package/dist/typescript/commonjs/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
  221. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
  222. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
  223. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -1
  224. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  225. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
  226. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts +3 -2
  227. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
  228. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
  229. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  230. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  231. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts +1 -2
  232. package/dist/typescript/commonjs/features/chatbot/components/Chatbot.d.ts.map +1 -1
  233. package/dist/typescript/commonjs/features/chatbot/constants.d.ts +5 -5
  234. package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
  235. package/dist/typescript/commonjs/features/chatbot/helpers.d.ts.map +1 -1
  236. package/dist/typescript/commonjs/features/chatbot/index.d.ts +2 -2
  237. package/dist/typescript/commonjs/features/chatbot/index.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts +1 -2
  239. package/dist/typescript/commonjs/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  240. package/dist/typescript/commonjs/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
  241. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts +0 -1
  242. package/dist/typescript/commonjs/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
  243. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts +17 -19
  244. package/dist/typescript/commonjs/features/chatbot/types/api.types.d.ts.map +1 -1
  245. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts +13 -8
  246. package/dist/typescript/commonjs/features/chatbot/types/model.types.d.ts.map +1 -1
  247. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts +0 -1
  248. package/dist/typescript/commonjs/features/chatbot/types/units.types.d.ts.map +1 -1
  249. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -1
  250. package/dist/typescript/commonjs/features/voice/constants.d.ts +16 -0
  251. package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -0
  252. package/dist/typescript/commonjs/features/voice/helpers.d.ts +46 -0
  253. package/dist/typescript/commonjs/features/voice/helpers.d.ts.map +1 -0
  254. package/dist/typescript/commonjs/features/voice/index.d.ts +10 -0
  255. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -0
  256. package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts +8 -0
  257. package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
  258. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
  259. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  260. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  261. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  262. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
  263. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  264. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  265. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  266. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +23 -0
  267. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -0
  268. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
  269. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
  270. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +17 -0
  271. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -0
  272. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
  273. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
  274. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +13 -0
  275. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
  276. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
  277. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  278. package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts +3 -0
  279. package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts.map +1 -0
  280. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts +10 -0
  281. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
  282. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
  283. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
  284. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
  285. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
  286. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDivider.d.ts +3 -0
  287. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDivider.d.ts.map +1 -0
  288. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
  289. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
  290. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
  291. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
  292. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
  293. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
  294. package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
  295. package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
  296. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
  297. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
  298. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
  299. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
  300. package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts +19 -0
  301. package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
  302. package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts +18 -0
  303. package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
  304. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
  305. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
  306. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
  307. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
  308. package/dist/typescript/commonjs/features/voice/types.d.ts +72 -0
  309. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -0
  310. package/dist/typescript/commonjs/index.d.ts +1 -0
  311. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  312. package/dist/typescript/commonjs/shared/components/PlayButton.d.ts +18 -0
  313. package/dist/typescript/commonjs/shared/components/PlayButton.d.ts.map +1 -0
  314. package/dist/typescript/commonjs/shared/translation/constants.d.ts +102 -6
  315. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  316. package/dist/typescript/commonjs/shared/translation/model.d.ts +34 -2
  317. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  318. package/dist/typescript/commonjs/types/common.types.d.ts +3 -0
  319. package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
  320. package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts +1 -2
  321. package/dist/typescript/module/features/chatbot/components/Chat/Chat.d.ts.map +1 -1
  322. package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts +3 -3
  323. package/dist/typescript/module/features/chatbot/components/ChatControls/ChatControls.d.ts.map +1 -1
  324. package/dist/typescript/module/features/chatbot/components/ChatInput/ChatInput.d.ts.map +1 -1
  325. package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
  326. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts +1 -1
  327. package/dist/typescript/module/features/chatbot/components/ChatMessage/ChatMessage.d.ts.map +1 -1
  328. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
  329. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts +3 -2
  330. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageLoader.d.ts.map +1 -1
  331. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
  332. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  333. package/dist/typescript/module/features/chatbot/components/ChatMessage/ReceivedMessage.d.ts.map +1 -1
  334. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts +1 -2
  335. package/dist/typescript/module/features/chatbot/components/Chatbot.d.ts.map +1 -1
  336. package/dist/typescript/module/features/chatbot/constants.d.ts +5 -5
  337. package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
  338. package/dist/typescript/module/features/chatbot/helpers.d.ts.map +1 -1
  339. package/dist/typescript/module/features/chatbot/index.d.ts +2 -2
  340. package/dist/typescript/module/features/chatbot/index.d.ts.map +1 -1
  341. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts +1 -2
  342. package/dist/typescript/module/features/chatbot/model/ChatBotModel.d.ts.map +1 -1
  343. package/dist/typescript/module/features/chatbot/model/ChatBoxTextManager.d.ts.map +1 -1
  344. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts +0 -1
  345. package/dist/typescript/module/features/chatbot/model/ChatsCacheModel.d.ts.map +1 -1
  346. package/dist/typescript/module/features/chatbot/types/api.types.d.ts +17 -19
  347. package/dist/typescript/module/features/chatbot/types/api.types.d.ts.map +1 -1
  348. package/dist/typescript/module/features/chatbot/types/model.types.d.ts +13 -8
  349. package/dist/typescript/module/features/chatbot/types/model.types.d.ts.map +1 -1
  350. package/dist/typescript/module/features/chatbot/types/units.types.d.ts +0 -1
  351. package/dist/typescript/module/features/chatbot/types/units.types.d.ts.map +1 -1
  352. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -1
  353. package/dist/typescript/module/features/voice/constants.d.ts +16 -0
  354. package/dist/typescript/module/features/voice/constants.d.ts.map +1 -0
  355. package/dist/typescript/module/features/voice/helpers.d.ts +46 -0
  356. package/dist/typescript/module/features/voice/helpers.d.ts.map +1 -0
  357. package/dist/typescript/module/features/voice/index.d.ts +10 -0
  358. package/dist/typescript/module/features/voice/index.d.ts.map +1 -0
  359. package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts +8 -0
  360. package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
  361. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
  362. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  363. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  364. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  365. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
  366. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  367. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  368. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  369. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +23 -0
  370. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -0
  371. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
  372. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
  373. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +17 -0
  374. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -0
  375. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
  376. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
  377. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +13 -0
  378. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
  379. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
  380. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  381. package/dist/typescript/module/features/voice/playing/model/index.d.ts +3 -0
  382. package/dist/typescript/module/features/voice/playing/model/index.d.ts.map +1 -0
  383. package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts +10 -0
  384. package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
  385. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
  386. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
  387. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
  388. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
  389. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDivider.d.ts +3 -0
  390. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDivider.d.ts.map +1 -0
  391. package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
  392. package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
  393. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
  394. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
  395. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
  396. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
  397. package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
  398. package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
  399. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
  400. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
  401. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
  402. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
  403. package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts +19 -0
  404. package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
  405. package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts +18 -0
  406. package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
  407. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
  408. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
  409. package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
  410. package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
  411. package/dist/typescript/module/features/voice/types.d.ts +72 -0
  412. package/dist/typescript/module/features/voice/types.d.ts.map +1 -0
  413. package/dist/typescript/module/index.d.ts +1 -0
  414. package/dist/typescript/module/index.d.ts.map +1 -1
  415. package/dist/typescript/module/shared/components/PlayButton.d.ts +18 -0
  416. package/dist/typescript/module/shared/components/PlayButton.d.ts.map +1 -0
  417. package/dist/typescript/module/shared/translation/constants.d.ts +102 -6
  418. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  419. package/dist/typescript/module/shared/translation/model.d.ts +34 -2
  420. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  421. package/dist/typescript/module/types/common.types.d.ts +3 -0
  422. package/dist/typescript/module/types/common.types.d.ts.map +1 -1
  423. package/package.json +11 -6
  424. package/src/features/chatbot/components/Chat/Chat.tsx +70 -288
  425. package/src/features/chatbot/components/ChatControls/ChatControls.tsx +66 -46
  426. package/src/features/chatbot/components/ChatInput/ChatInput.tsx +1 -2
  427. package/src/features/chatbot/components/ChatInput/FreeText/ChatTextInput.tsx +2 -2
  428. package/src/features/chatbot/components/ChatInput/FreeText/SendMessageButton.tsx +1 -1
  429. package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -1
  430. package/src/features/chatbot/components/ChatMessage/ChatMessage.tsx +1 -1
  431. package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +1 -1
  432. package/src/features/chatbot/components/ChatMessage/MessageLoader.tsx +33 -17
  433. package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +9 -51
  434. package/src/features/chatbot/components/ChatMessage/ReceivedMessage.tsx +12 -13
  435. package/src/features/chatbot/components/ChatMessage/SentMessage.tsx +1 -1
  436. package/src/features/chatbot/components/Chatbot.tsx +11 -21
  437. package/src/features/chatbot/constants.ts +4 -4
  438. package/src/features/chatbot/helpers.ts +0 -3
  439. package/src/features/chatbot/index.ts +2 -16
  440. package/src/features/chatbot/model/ChatBotModel.ts +8 -51
  441. package/src/features/chatbot/model/ChatBoxTextManager.ts +0 -1
  442. package/src/features/chatbot/model/ChatbotApi.ts +1 -1
  443. package/src/features/chatbot/model/ChatbotTranslation.ts +1 -1
  444. package/src/features/chatbot/model/ChatsCacheModel.ts +0 -7
  445. package/src/features/chatbot/types/api.types.ts +17 -17
  446. package/src/features/chatbot/types/model.types.ts +15 -8
  447. package/src/features/chatbot/types/units.types.ts +0 -1
  448. package/src/features/gifCelebrations/helpers.ts +1 -0
  449. package/src/features/voice/constants.ts +15 -0
  450. package/src/features/voice/helpers.ts +251 -0
  451. package/src/features/voice/index.ts +11 -0
  452. package/src/features/voice/playing/components/VoiceIcon.tsx +38 -0
  453. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +251 -0
  454. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +127 -0
  455. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts +54 -0
  456. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
  457. package/src/features/voice/playing/model/Player.model.ts +104 -0
  458. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +80 -0
  459. package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +42 -0
  460. package/src/features/voice/playing/model/VoicePlayer.model.ts +255 -0
  461. package/src/features/voice/playing/model/VoiceTranscriptionsCollection.ts +40 -0
  462. package/src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts +11 -0
  463. package/src/features/voice/playing/model/index.ts +2 -0
  464. package/src/features/voice/recording/components/VoiceRecord.tsx +65 -0
  465. package/src/features/voice/recording/components/VoiceRecordButton.tsx +64 -0
  466. package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +25 -0
  467. package/src/features/voice/recording/components/VoiceRecordDivider.tsx +17 -0
  468. package/src/features/voice/recording/components/VoiceRecordTimer.tsx +49 -0
  469. package/src/features/voice/recording/hooks/useVoiceRecorder.ts +62 -0
  470. package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +19 -0
  471. package/src/features/voice/recording/modal/ModalFooterButtons.tsx +54 -0
  472. package/src/features/voice/recording/modal/VoiceRecordDeleteModal.tsx +82 -0
  473. package/src/features/voice/recording/modal/VoiceRecordUndoModal.tsx +50 -0
  474. package/src/features/voice/recording/model/Recorder.model.ts +63 -0
  475. package/src/features/voice/recording/model/Uploader.model.ts +48 -0
  476. package/src/features/voice/recording/model/VoiceRecord.model.ts +302 -0
  477. package/src/features/voice/recording/model/VoiceRecordCollection.ts +26 -0
  478. package/src/features/voice/types.ts +84 -0
  479. package/src/index.ts +1 -0
  480. package/src/shared/components/PlayButton.tsx +84 -0
  481. package/src/shared/translation/localization/ca.json +18 -2
  482. package/src/shared/translation/localization/de.json +18 -2
  483. package/src/shared/translation/localization/en.json +18 -2
  484. package/src/shared/translation/localization/gb.json +18 -2
  485. package/src/shared/translation/localization/sct.json +18 -2
  486. package/src/shared/translation/localization/sw.json +18 -2
  487. package/src/types/common.types.ts +1 -0
  488. package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  489. package/dist/commonjs/features/chatbot/components/Chat/CloseButton.js +0 -39
  490. package/dist/commonjs/features/chatbot/components/Chat/CloseButton.js.map +0 -1
  491. package/dist/commonjs/features/chatbot/components/Chat/GradientFade.js +0 -44
  492. package/dist/commonjs/features/chatbot/components/Chat/GradientFade.js.map +0 -1
  493. package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js +0 -41
  494. package/dist/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.js.map +0 -1
  495. package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  496. package/dist/module/features/chatbot/components/Chat/CloseButton.js +0 -33
  497. package/dist/module/features/chatbot/components/Chat/CloseButton.js.map +0 -1
  498. package/dist/module/features/chatbot/components/Chat/GradientFade.js +0 -39
  499. package/dist/module/features/chatbot/components/Chat/GradientFade.js.map +0 -1
  500. package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js +0 -34
  501. package/dist/module/features/chatbot/components/ChatMessage/AnimatedMessage.js.map +0 -1
  502. package/dist/typescript/commonjs/features/chatbot/components/Chat/CloseButton.d.ts +0 -7
  503. package/dist/typescript/commonjs/features/chatbot/components/Chat/CloseButton.d.ts.map +0 -1
  504. package/dist/typescript/commonjs/features/chatbot/components/Chat/GradientFade.d.ts +0 -10
  505. package/dist/typescript/commonjs/features/chatbot/components/Chat/GradientFade.d.ts.map +0 -1
  506. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts +0 -7
  507. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts.map +0 -1
  508. package/dist/typescript/module/features/chatbot/components/Chat/CloseButton.d.ts +0 -7
  509. package/dist/typescript/module/features/chatbot/components/Chat/CloseButton.d.ts.map +0 -1
  510. package/dist/typescript/module/features/chatbot/components/Chat/GradientFade.d.ts +0 -10
  511. package/dist/typescript/module/features/chatbot/components/Chat/GradientFade.d.ts.map +0 -1
  512. package/dist/typescript/module/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts +0 -7
  513. package/dist/typescript/module/features/chatbot/components/ChatMessage/AnimatedMessage.d.ts.map +0 -1
  514. package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  515. package/src/features/chatbot/components/Chat/CloseButton.tsx +0 -31
  516. package/src/features/chatbot/components/Chat/GradientFade.tsx +0 -43
  517. package/src/features/chatbot/components/ChatMessage/AnimatedMessage.tsx +0 -30
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { Button, ButtonColor, ButtonSize, ButtonVariant, SPACING } from '@magmamath/react-native-ui';
5
+ import { StyleSheet, View } from 'react-native';
6
+ import { useText } from "../../../../shared/translation/index.js";
7
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
8
+ export const ModalFooterButtons = ({
9
+ onCancel,
10
+ onConfirm,
11
+ confirmLabel,
12
+ confirmColor = ButtonColor.BLUE
13
+ }) => {
14
+ const t = useText();
15
+ return /*#__PURE__*/_jsxs(View, {
16
+ style: styles.container,
17
+ children: [/*#__PURE__*/_jsx(Button, {
18
+ style: {
19
+ text: styles.buttonLabel
20
+ },
21
+ variant: ButtonVariant.TERTIARY,
22
+ size: ButtonSize.LARGE,
23
+ onPress: onCancel,
24
+ children: t('voice.cancel')
25
+ }), /*#__PURE__*/_jsx(Button, {
26
+ colorScheme: confirmColor,
27
+ variant: ButtonVariant.PRIMARY,
28
+ size: ButtonSize.LARGE,
29
+ onPress: onConfirm,
30
+ style: {
31
+ text: styles.buttonLabel
32
+ },
33
+ children: t(confirmLabel)
34
+ })]
35
+ });
36
+ };
37
+ const styles = StyleSheet.create({
38
+ container: {
39
+ flexDirection: 'row',
40
+ alignItems: 'center',
41
+ gap: SPACING[200]
42
+ },
43
+ buttonLabel: {
44
+ textTransform: 'uppercase'
45
+ }
46
+ });
47
+ //# sourceMappingURL=ModalFooterButtons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Button","ButtonColor","ButtonSize","ButtonVariant","SPACING","StyleSheet","View","useText","jsx","_jsx","jsxs","_jsxs","ModalFooterButtons","onCancel","onConfirm","confirmLabel","confirmColor","BLUE","t","style","styles","container","children","text","buttonLabel","variant","TERTIARY","size","LARGE","onPress","colorScheme","PRIMARY","create","flexDirection","alignItems","gap","textTransform"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/modal/ModalFooterButtons.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,MAAM,EAAEC,WAAW,EAAEC,UAAU,EAAEC,aAAa,EAAEC,OAAO,QAAQ,4BAA4B;AACpG,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC/C,SAASC,OAAO,QAAQ,yCAAgC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAUxD,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,QAAQ;EACRC,SAAS;EACTC,YAAY;EACZC,YAAY,GAAGf,WAAW,CAACgB;AACJ,CAAC,KAAK;EAC7B,MAAMC,CAAC,GAAGX,OAAO,CAAC,CAAC;EAEnB,oBACEI,KAAA,CAACL,IAAI;IAACa,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5Bb,IAAA,CAACT,MAAM;MACLmB,KAAK,EAAE;QAAEI,IAAI,EAAEH,MAAM,CAACI;MAAY,CAAE;MACpCC,OAAO,EAAEtB,aAAa,CAACuB,QAAS;MAChCC,IAAI,EAAEzB,UAAU,CAAC0B,KAAM;MACvBC,OAAO,EAAEhB,QAAS;MAAAS,QAAA,EAEjBJ,CAAC,CAAC,cAAc;IAAC,CACZ,CAAC,eACTT,IAAA,CAACT,MAAM;MACL8B,WAAW,EAAEd,YAAa;MAC1BS,OAAO,EAAEtB,aAAa,CAAC4B,OAAQ;MAC/BJ,IAAI,EAAEzB,UAAU,CAAC0B,KAAM;MACvBC,OAAO,EAAEf,SAAU;MACnBK,KAAK,EAAE;QAAEI,IAAI,EAAEH,MAAM,CAACI;MAAY,CAAE;MAAAF,QAAA,EAEnCJ,CAAC,CAACH,YAAY;IAAC,CACV,CAAC;EAAA,CACL,CAAC;AAEX,CAAC;AAED,MAAMK,MAAM,GAAGf,UAAU,CAAC2B,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE/B,OAAO,CAAC,GAAG;EAClB,CAAC;EACDoB,WAAW,EAAE;IACXY,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,71 @@
1
+ "use strict";
2
+
3
+ import React, { useEffect } from 'react';
4
+ import { BaseModal, ButtonColor } from '@magmamath/react-native-ui';
5
+ import { StyleSheet } from 'react-native';
6
+ import { useUnit } from 'effector-react';
7
+ import { VoiceRecorderState } from "../../constants.js";
8
+ import { useText } from "../../../../shared/translation/index.js";
9
+ import { ModalFooterButtons } from "./ModalFooterButtons.js";
10
+ import { jsx as _jsx } from "react/jsx-runtime";
11
+ export const VoiceRecordDeleteModal = ({
12
+ modal: {
13
+ closeModal,
14
+ params
15
+ }
16
+ }) => {
17
+ const t = useText();
18
+ const {
19
+ model
20
+ } = params;
21
+ const recorderState = useUnit(model.recorderModel.$voiceRecordState);
22
+ const handleDelete = () => {
23
+ if (recorderState === VoiceRecorderState.PAUSED) {
24
+ // if recording is paused, we need to start it again to ensure the recorder is in a consistent state before deletion
25
+ // without .record() browser still will use microphone
26
+ model.recorderModel.recorder.record();
27
+ setTimeout(() => {
28
+ model.stop();
29
+ model.deleteCurrentRecording();
30
+ }, 50);
31
+ closeModal();
32
+ return;
33
+ }
34
+ model.deleteCurrentRecording();
35
+ closeModal();
36
+ };
37
+ useEffect(() => {
38
+ if (recorderState === VoiceRecorderState.RECORDING) {
39
+ model.recorderModel.recorder.pause();
40
+ }
41
+ return () => {
42
+ if (model.recorderModel.$voiceRecordState.getState() === VoiceRecorderState.PAUSED) {
43
+ try {
44
+ model.recorderModel.recorder.record();
45
+ } catch (error) {
46
+ console.error(`Failed to resume recording: ${error}`);
47
+ }
48
+ }
49
+ };
50
+ }, []);
51
+ return /*#__PURE__*/_jsx(BaseModal, {
52
+ style: {
53
+ container: styles.modalContainer
54
+ },
55
+ header: t('voice.deleteRecording'),
56
+ content: t('voice.youWontBeAbleToRecover'),
57
+ footer: /*#__PURE__*/_jsx(ModalFooterButtons, {
58
+ onCancel: closeModal,
59
+ onConfirm: handleDelete,
60
+ confirmLabel: "voice.delete",
61
+ confirmColor: ButtonColor.RED
62
+ })
63
+ });
64
+ };
65
+ const styles = StyleSheet.create({
66
+ modalContainer: {
67
+ width: 600,
68
+ height: 268
69
+ }
70
+ });
71
+ //# sourceMappingURL=VoiceRecordDeleteModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","BaseModal","ButtonColor","StyleSheet","useUnit","VoiceRecorderState","useText","ModalFooterButtons","jsx","_jsx","VoiceRecordDeleteModal","modal","closeModal","params","t","model","recorderState","recorderModel","$voiceRecordState","handleDelete","PAUSED","recorder","record","setTimeout","stop","deleteCurrentRecording","RECORDING","pause","getState","error","console","style","container","styles","modalContainer","header","content","footer","onCancel","onConfirm","confirmLabel","confirmColor","RED","create","width","height"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/modal/VoiceRecordDeleteModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,QAAQ,OAAO;AACxC,SAASC,SAAS,EAAEC,WAAW,QAAQ,4BAA4B;AACnE,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,kBAAkB,QAAQ,oBAAiB;AACpD,SAASC,OAAO,QAAQ,yCAAgC;AACxD,SAASC,kBAAkB,QAAQ,yBAAsB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUzD,OAAO,MAAMC,sBAAsB,GAAGA,CAAC;EACrCC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AACQ,CAAC,KAAK;EAC1C,MAAMC,CAAC,GAAGR,OAAO,CAAC,CAAC;EACnB,MAAM;IAAES;EAAM,CAAC,GAAGF,MAAM;EAExB,MAAMG,aAAa,GAAGZ,OAAO,CAACW,KAAK,CAACE,aAAa,CAACC,iBAAiB,CAAC;EAEpE,MAAMC,YAAY,GAAGA,CAAA,KAAM;IACzB,IAAIH,aAAa,KAAKX,kBAAkB,CAACe,MAAM,EAAE;MAC/C;MACA;MACAL,KAAK,CAACE,aAAa,CAACI,QAAQ,CAACC,MAAM,CAAC,CAAC;MACrCC,UAAU,CAAC,MAAM;QACfR,KAAK,CAACS,IAAI,CAAC,CAAC;QACZT,KAAK,CAACU,sBAAsB,CAAC,CAAC;MAChC,CAAC,EAAE,EAAE,CAAC;MACNb,UAAU,CAAC,CAAC;MACZ;IACF;IAEAG,KAAK,CAACU,sBAAsB,CAAC,CAAC;IAC9Bb,UAAU,CAAC,CAAC;EACd,CAAC;EAEDZ,SAAS,CAAC,MAAM;IACd,IAAIgB,aAAa,KAAKX,kBAAkB,CAACqB,SAAS,EAAE;MAClDX,KAAK,CAACE,aAAa,CAACI,QAAQ,CAACM,KAAK,CAAC,CAAC;IACtC;IAEA,OAAO,MAAM;MACX,IAAIZ,KAAK,CAACE,aAAa,CAACC,iBAAiB,CAACU,QAAQ,CAAC,CAAC,KAAKvB,kBAAkB,CAACe,MAAM,EAAE;QAClF,IAAI;UACFL,KAAK,CAACE,aAAa,CAACI,QAAQ,CAACC,MAAM,CAAC,CAAC;QACvC,CAAC,CAAC,OAAOO,KAAK,EAAE;UACdC,OAAO,CAACD,KAAK,CAAC,+BAA+BA,KAAK,EAAE,CAAC;QACvD;MACF;IACF,CAAC;EACH,CAAC,EAAE,EAAE,CAAC;EAEN,oBACEpB,IAAA,CAACR,SAAS;IACR8B,KAAK,EAAE;MACLC,SAAS,EAAEC,MAAM,CAACC;IACpB,CAAE;IACFC,MAAM,EAAErB,CAAC,CAAC,uBAAuB,CAAE;IACnCsB,OAAO,EAAEtB,CAAC,CAAC,8BAA8B,CAAE;IAC3CuB,MAAM,eACJ5B,IAAA,CAACF,kBAAkB;MACjB+B,QAAQ,EAAE1B,UAAW;MACrB2B,SAAS,EAAEpB,YAAa;MACxBqB,YAAY,EAAC,cAAc;MAC3BC,YAAY,EAAEvC,WAAW,CAACwC;IAAI,CAC/B;EACF,CACF,CAAC;AAEN,CAAC;AAED,MAAMT,MAAM,GAAG9B,UAAU,CAACwC,MAAM,CAAC;EAC/BT,cAAc,EAAE;IACdU,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,45 @@
1
+ "use strict";
2
+
3
+ import React from 'react';
4
+ import { BaseModal } from '@magmamath/react-native-ui';
5
+ import { StyleSheet } from 'react-native';
6
+ import { useText } from "../../../../shared/translation/index.js";
7
+ import { ModalFooterButtons } from "./ModalFooterButtons.js";
8
+ import { jsx as _jsx } from "react/jsx-runtime";
9
+ export const VoiceRecordUndoModal = ({
10
+ modal: {
11
+ closeModal,
12
+ params
13
+ }
14
+ }) => {
15
+ const t = useText();
16
+ const {
17
+ model
18
+ } = params;
19
+ const redoRecording = () => {
20
+ model.deleteCurrentRecording({
21
+ notification: false
22
+ });
23
+ closeModal();
24
+ model.initializeRecording();
25
+ };
26
+ return /*#__PURE__*/_jsx(BaseModal, {
27
+ style: {
28
+ container: styles.modalStyle
29
+ },
30
+ header: t('voice.redoRecording'),
31
+ content: t('voice.thisWillRemoveRecording'),
32
+ footer: /*#__PURE__*/_jsx(ModalFooterButtons, {
33
+ onCancel: closeModal,
34
+ onConfirm: redoRecording,
35
+ confirmLabel: "voice.redo"
36
+ })
37
+ });
38
+ };
39
+ const styles = StyleSheet.create({
40
+ modalStyle: {
41
+ width: 600,
42
+ height: 268
43
+ }
44
+ });
45
+ //# sourceMappingURL=VoiceRecordUndoModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","BaseModal","StyleSheet","useText","ModalFooterButtons","jsx","_jsx","VoiceRecordUndoModal","modal","closeModal","params","t","model","redoRecording","deleteCurrentRecording","notification","initializeRecording","style","container","styles","modalStyle","header","content","footer","onCancel","onConfirm","confirmLabel","create","width","height"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/modal/VoiceRecordUndoModal.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,SAAS,QAAQ,4BAA4B;AACtD,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,OAAO,QAAQ,yCAAgC;AACxD,SAASC,kBAAkB,QAAQ,yBAAsB;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAUzD,OAAO,MAAMC,oBAAoB,GAAGA,CAAC;EACnCC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AACH,CAAC,KAAK;EAC/B,MAAMC,CAAC,GAAGR,OAAO,CAAC,CAAC;EACnB,MAAM;IAAES;EAAM,CAAC,GAAGF,MAAM;EAExB,MAAMG,aAAa,GAAGA,CAAA,KAAM;IAC1BD,KAAK,CAACE,sBAAsB,CAAC;MAAEC,YAAY,EAAE;IAAM,CAAC,CAAC;IACrDN,UAAU,CAAC,CAAC;IACZG,KAAK,CAACI,mBAAmB,CAAC,CAAC;EAC7B,CAAC;EAED,oBACEV,IAAA,CAACL,SAAS;IACRgB,KAAK,EAAE;MACLC,SAAS,EAAEC,MAAM,CAACC;IACpB,CAAE;IACFC,MAAM,EAAEV,CAAC,CAAC,qBAAqB,CAAE;IACjCW,OAAO,EAAEX,CAAC,CAAC,+BAA+B,CAAE;IAC5CY,MAAM,eACJjB,IAAA,CAACF,kBAAkB;MACjBoB,QAAQ,EAAEf,UAAW;MACrBgB,SAAS,EAAEZ,aAAc;MACzBa,YAAY,EAAC;IAAY,CAC1B;EACF,CACF,CAAC;AAEN,CAAC;AAED,MAAMP,MAAM,GAAGjB,UAAU,CAACyB,MAAM,CAAC;EAC/BP,UAAU,EAAE;IACVQ,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ import { createEffect, createEvent, restore } from 'effector';
4
+ import { setAudioModeAsync } from 'expo-audio';
5
+ import { VoiceRecorderState } from "../../constants.js";
6
+ const AUDIO_MODE_CONFIG = {
7
+ playsInSilentMode: true,
8
+ allowsRecording: true
9
+ };
10
+ export class RecorderModel {
11
+ stopResolver = null;
12
+ reset = createEvent();
13
+ setVoiceRecordState = createEvent();
14
+ setAvailableInputs = createEvent();
15
+ setLastKnownDurationMs = createEvent();
16
+ $voiceRecordState = restore(this.setVoiceRecordState, VoiceRecorderState.IDLE).reset(this.reset);
17
+ $availableInputs = restore(this.setAvailableInputs, []);
18
+ $lastKnownDurationMs = restore(this.setLastKnownDurationMs, 0).reset(this.reset);
19
+ start = createEffect(async () => {
20
+ try {
21
+ await setAudioModeAsync(AUDIO_MODE_CONFIG);
22
+ await this.recorder.prepareToRecordAsync();
23
+ this.recorder.record();
24
+ this.setVoiceRecordState(VoiceRecorderState.RECORDING);
25
+ } catch (error) {
26
+ console.error('Error starting recording:', error);
27
+ throw error;
28
+ }
29
+ });
30
+ stop = createEffect(() => {
31
+ if (!this.recorder.getStatus().isRecording) return;
32
+ return this.recorder.stop();
33
+ });
34
+ stopAndAwaitResult() {
35
+ return new Promise(resolve => {
36
+ this.stopResolver = resolve;
37
+ this.recorder.getStatus().isRecording && this.recorder.stop();
38
+ });
39
+ }
40
+ resolveRecord(result) {
41
+ if (this.stopResolver) {
42
+ this.stopResolver(result);
43
+ this.stopResolver = null;
44
+ }
45
+ }
46
+ clearStopResolver() {
47
+ this.stopResolver = null;
48
+ }
49
+ }
50
+ //# sourceMappingURL=Recorder.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEffect","createEvent","restore","setAudioModeAsync","VoiceRecorderState","AUDIO_MODE_CONFIG","playsInSilentMode","allowsRecording","RecorderModel","stopResolver","reset","setVoiceRecordState","setAvailableInputs","setLastKnownDurationMs","$voiceRecordState","IDLE","$availableInputs","$lastKnownDurationMs","start","recorder","prepareToRecordAsync","record","RECORDING","error","console","stop","getStatus","isRecording","stopAndAwaitResult","Promise","resolve","resolveRecord","result","clearStopResolver"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/Recorder.model.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,EAAEC,OAAO,QAAQ,UAAU;AAC7D,SAAwBC,iBAAiB,QAAQ,YAAY;AAC7D,SAASC,kBAAkB,QAAQ,oBAAiB;AAGpD,MAAMC,iBAAiB,GAAG;EACxBC,iBAAiB,EAAE,IAAI;EACvBC,eAAe,EAAE;AACnB,CAAU;AAIV,OAAO,MAAMC,aAAa,CAAc;EAE9BC,YAAY,GAA2B,IAAI;EAEnCC,KAAK,GAAGT,WAAW,CAAC,CAAC;EACrBU,mBAAmB,GAAGV,WAAW,CAAqB,CAAC;EACvDW,kBAAkB,GAAGX,WAAW,CAAuB,CAAC;EACxDY,sBAAsB,GAAGZ,WAAW,CAAS,CAAC;EAE9Ca,iBAAiB,GAAGZ,OAAO,CACzC,IAAI,CAACS,mBAAmB,EACxBP,kBAAkB,CAACW,IACrB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IAAI;IAC1B;EACF;EAEOwB,iBAAiBA,CAAA,EAAS;IAC/B,IAAI,CAACxB,YAAY,GAAG,IAAI;EAC1B;AACF","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ import { createEffect } from 'effector';
4
+ import { generateAudioFormData, uploadAudioFileRequestGenerator } from "../../helpers.js";
5
+ export class UploaderModel {
6
+ setApi = api => {
7
+ this.api = api;
8
+ };
9
+ upload = createEffect(async ({
10
+ uri,
11
+ fileName,
12
+ durationMs
13
+ }) => {
14
+ const formData = await generateAudioFormData({
15
+ audioFileUri: uri,
16
+ durationMs,
17
+ fileName
18
+ });
19
+ const {
20
+ uploadAudio,
21
+ controller
22
+ } = uploadAudioFileRequestGenerator(formData, this.api);
23
+ const uploadPromise = uploadAudio();
24
+ const collectionItem = {
25
+ durationMs,
26
+ audioUploadPromise: uploadPromise,
27
+ controller,
28
+ uri
29
+ };
30
+ return {
31
+ collectionItem,
32
+ uploadPromise
33
+ };
34
+ });
35
+ abortUpload = controller => {
36
+ controller?.abort();
37
+ };
38
+ }
39
+ //# sourceMappingURL=Uploader.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createEffect","generateAudioFormData","uploadAudioFileRequestGenerator","UploaderModel","setApi","api","upload","uri","fileName","durationMs","formData","audioFileUri","uploadAudio","controller","uploadPromise","collectionItem","audioUploadPromise","abortUpload","abort"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/Uploader.model.ts"],"mappings":";;AAAA,SAASA,YAAY,QAAQ,UAAU;AAEvC,SAASC,qBAAqB,EAAEC,+BAA+B,QAAQ,kBAAe;AAatF,OAAO,MAAMC,aAAa,CAAC;EAGTC,MAAM,GAAIC,GAAqB,IAAK;IAClD,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB,CAAC;EAEeC,MAAM,GAAGN,YAAY,CACnC,OAAO;IAAEO,GAAG;IAAEC,QAAQ;IAAEC;EAAyB,CAAC,KAA4B;IAC5E,MAAMC,QAAQ,GAAG,MAAMT,qBAAqB,CAAC;MAC3CU,YAAY,EAAEJ,GAAG;MACjBE,UAAU;MACVD;IACF,CAAC,CAAC;IAEF,MAAM;MAAEI,WAAW;MAAEC;IAAW,CAAC,GAAGX,+BAA+B,CAACQ,QAAQ,EAAE,IAAI,CAACL,GAAG,CAAC;IACvF,MAAMS,aAAa,GAAGF,WAAW,CAAC,CAAC;IAEnC,MAAMG,cAAyC,GAAG;MAChDN,UAAU;MACVO,kBAAkB,EAAEF,aAAa;MACjCD,UAAU;MACVN;IACF,CAAC;IAED,OAAO;MAAEQ,cAAc;MAAED;IAAc,CAAC;EAC1C,CACF,CAAC;EAEeG,WAAW,GAAIJ,UAA4B,IAAK;IAC9DA,UAAU,EAAEK,KAAK,CAAC,CAAC;EACrB,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,244 @@
1
+ "use strict";
2
+
3
+ import { attach, combine, createEffect, createEvent, restore, sample } from 'effector';
4
+ import { RecorderModel } from "./Recorder.model.js";
5
+ import { VoiceRecordsCollection } from "./VoiceRecordCollection.js";
6
+ import { UploaderModel } from "./Uploader.model.js";
7
+ import { VoiceRecorderState } from "../../constants.js";
8
+ import { ensureRecordingPermissions, getAvailableInputs } from "../../helpers.js";
9
+ import { VOICE_RECORDER_MIN_DURATION_MS } from "../../constants.js";
10
+ import { t } from "../../../../shared/translation/index.js";
11
+ export class VoiceRecordModel {
12
+ recorderModel = new RecorderModel();
13
+ collection = new VoiceRecordsCollection();
14
+ uploader = new UploaderModel();
15
+ shouldDiscardRecording = false;
16
+ setCurrentKey = createEvent();
17
+ setCurrentRecord = createEvent();
18
+ reset = createEvent();
19
+ setIsButtonDisabled = createEvent();
20
+ startAudioUpload = createEvent();
21
+ $currentKey = restore(this.setCurrentKey, '');
22
+ $currentRecord = restore(this.setCurrentRecord, null).reset(this.reset);
23
+ $isButtonDisabled = restore(this.setIsButtonDisabled, false);
24
+ $isExpanded = combine(this.recorderModel.$voiceRecordState, this.$currentRecord, (recorderState, currentRecord) => {
25
+ if (recorderState !== VoiceRecorderState.IDLE || currentRecord) return true;
26
+ return false;
27
+ });
28
+ deleteAudioRecord = createEffect(async audioFileId => {
29
+ await this.api.deleteAudioFile(audioFileId);
30
+ });
31
+ deleteCurrentRecording = attach({
32
+ source: this.$currentKey,
33
+ mapParams: (props, currentKey) => ({
34
+ notification: true,
35
+ ...props,
36
+ currentKey
37
+ }),
38
+ effect: createEffect(({
39
+ currentKey,
40
+ notification
41
+ }) => {
42
+ const recordingItem = this.collection.get(currentKey);
43
+ if (recordingItem?.id) {
44
+ this.deleteAudioRecord(recordingItem.id);
45
+ }
46
+ this.abortUploadIfInProgress(recordingItem);
47
+ this.resetRecordingState(currentKey);
48
+ if (notification) {
49
+ this.notification.success(t('voice.recordingDeleted'));
50
+ }
51
+ })
52
+ });
53
+ initializeRecording = attach({
54
+ source: this.$currentRecord,
55
+ effect: createEffect(async currentRecord => {
56
+ if (currentRecord) {
57
+ this.deleteCurrentRecording({
58
+ notification: false
59
+ });
60
+ }
61
+ const hasPermissions = await ensureRecordingPermissions();
62
+ if (!hasPermissions) {
63
+ this.notification.error(t('voice.noMicrophoneAccess'));
64
+ return;
65
+ }
66
+ const inputs = await getAvailableInputs(this.recorderModel.recorder);
67
+ this.recorderModel.setAvailableInputs(inputs);
68
+ if (inputs.length === 0) {
69
+ this.notification.error(t('voice.noMicrophoneFound'));
70
+ return;
71
+ }
72
+ return this.recorderModel.start().catch(error => {
73
+ if (error.name === 'NotAllowedError') {
74
+ this.notification.error(t('voice.noMicrophoneAccessBySystem'));
75
+ }
76
+ });
77
+ })
78
+ });
79
+ stop = createEffect(async () => {
80
+ this.shouldDiscardRecording = true;
81
+ await this.recorderModel.stop();
82
+ this.recorderModel.clearStopResolver();
83
+ this.recorderModel.reset();
84
+ });
85
+ cleanup = async () => {
86
+ if (this.recorderModel.recorder.getStatus().isRecording) {
87
+ await this.recorderModel.recorder.stop();
88
+ }
89
+ this.recorderModel.reset();
90
+ };
91
+ recordingStatusUpdate = status => {
92
+ if (status.error) {
93
+ this.notification.error(`Recorder error: ${status.error}`);
94
+ this.recorderModel.clearStopResolver();
95
+ this.shouldDiscardRecording = false;
96
+ return;
97
+ }
98
+ if (status.isFinished && status.url) {
99
+ if (!this.shouldDiscardRecording) {
100
+ this.startAudioUpload(status.url);
101
+ }
102
+ this.shouldDiscardRecording = false;
103
+ }
104
+ };
105
+ getRecordingItem = attach({
106
+ source: this.recorderModel.$voiceRecordState,
107
+ mapParams: (key, recorderState) => ({
108
+ key,
109
+ recorderState
110
+ }),
111
+ effect: createEffect(async ({
112
+ key,
113
+ recorderState
114
+ }) => {
115
+ try {
116
+ const isRecording = recorderState === VoiceRecorderState.RECORDING;
117
+ if (isRecording) {
118
+ return await this.recorderModel.stopAndAwaitResult();
119
+ }
120
+ return this.collection.get(key);
121
+ } catch (error) {
122
+ console.error(`Failed to get recording item: ${error}`);
123
+ this.notification.error(t('voice.uploadFailed'));
124
+ return undefined;
125
+ }
126
+ })
127
+ });
128
+ abortUploadIfInProgress(recordingItem) {
129
+ if (!recordingItem?.id && recordingItem?.controller) {
130
+ this.uploader.abortUpload(recordingItem.controller);
131
+ }
132
+ }
133
+ resetRecordingState(currentKey) {
134
+ this.recorderModel.reset();
135
+ this.reset();
136
+ this.collection.delete(currentKey);
137
+ }
138
+ handleAudioUpload = createEffect(async ({
139
+ uri,
140
+ currentKey,
141
+ durationMs
142
+ }) => {
143
+ const {
144
+ collectionItem,
145
+ uploadPromise
146
+ } = await this.uploader.upload({
147
+ uri,
148
+ fileName: currentKey,
149
+ durationMs
150
+ });
151
+ this.collection.add(currentKey, collectionItem);
152
+ this.setCurrentRecord(collectionItem);
153
+ this.recorderModel.resolveRecord(collectionItem);
154
+ uploadPromise.then(data => {
155
+ if (this.collection.get(currentKey)) {
156
+ this.collection.update(currentKey, {
157
+ id: data.id
158
+ });
159
+ }
160
+ }).catch(error => {
161
+ if (error.name === 'CanceledError') return;
162
+ this.collection.delete(currentKey);
163
+ this.reset();
164
+ this.notification.error(t('voice.uploadFailed'));
165
+ });
166
+ return uploadPromise;
167
+ });
168
+ setupUploadHandler() {
169
+ sample({
170
+ clock: this.startAudioUpload,
171
+ source: {
172
+ currentKey: this.$currentKey,
173
+ durationMs: this.recorderModel.$lastKnownDurationMs
174
+ },
175
+ filter: ({
176
+ currentKey
177
+ }, uri) => !!uri && !!currentKey,
178
+ fn: ({
179
+ currentKey,
180
+ durationMs
181
+ }, uri) => ({
182
+ currentKey,
183
+ durationMs,
184
+ uri
185
+ }),
186
+ target: this.handleAudioUpload
187
+ });
188
+ }
189
+ setupCurrentRecordSync() {
190
+ sample({
191
+ source: this.$currentKey,
192
+ fn: currentKey => this.collection.get(currentKey),
193
+ target: createEffect(recordingItem => {
194
+ if (!recordingItem) {
195
+ this.reset();
196
+ return;
197
+ }
198
+ this.setCurrentRecord(recordingItem);
199
+ })
200
+ });
201
+ }
202
+ recorderButtonHandler = attach({
203
+ source: {
204
+ currentKey: this.$currentKey,
205
+ recorderState: this.recorderModel.$voiceRecordState,
206
+ isInitializing: this.initializeRecording.pending,
207
+ lastKnownDurationMs: this.recorderModel.$lastKnownDurationMs
208
+ },
209
+ effect: createEffect(({
210
+ currentKey,
211
+ recorderState,
212
+ isInitializing,
213
+ lastKnownDurationMs
214
+ }) => {
215
+ if (isInitializing) return;
216
+ if (recorderState === VoiceRecorderState.RECORDING && lastKnownDurationMs < VOICE_RECORDER_MIN_DURATION_MS) {
217
+ console.warn(`Voice record is too short to upload`);
218
+ return;
219
+ }
220
+ if (recorderState === VoiceRecorderState.RECORDING) {
221
+ this.recorderModel.stop();
222
+ return;
223
+ }
224
+ if (this.collection.get(currentKey)) {
225
+ this.events.undoRecord();
226
+ return;
227
+ }
228
+ this.initializeRecording();
229
+ })
230
+ });
231
+ constructor({
232
+ api,
233
+ notification,
234
+ events
235
+ }) {
236
+ this.api = api;
237
+ this.notification = notification;
238
+ this.events = events;
239
+ this.uploader.setApi(api);
240
+ this.setupUploadHandler();
241
+ this.setupCurrentRecordSync();
242
+ }
243
+ }
244
+ //# sourceMappingURL=VoiceRecord.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["attach","combine","createEffect","createEvent","restore","sample","RecorderModel","VoiceRecordsCollection","UploaderModel","VoiceRecorderState","ensureRecordingPermissions","getAvailableInputs","VOICE_RECORDER_MIN_DURATION_MS","t","VoiceRecordModel","recorderModel","collection","uploader","shouldDiscardRecording","setCurrentKey","setCurrentRecord","reset","setIsButtonDisabled","startAudioUpload","$currentKey","$currentRecord","$isButtonDisabled","$isExpanded","$voiceRecordState","recorderState","currentRecord","IDLE","deleteAudioRecord","audioFileId","api","deleteAudioFile","deleteCurrentRecording","source","mapParams","props","currentKey","notification","effect","recordingItem","get","id","abortUploadIfInProgress","resetRecordingState","success","initializeRecording","hasPermissions","error","inputs","recorder","setAvailableInputs","length","start","catch","name","stop","clearStopResolver","cleanup","getStatus","isRecording","recordingStatusUpdate","status","isFinished","url","getRecordingItem","key","RECORDING","stopAndAwaitResult","console","undefined","controller","abortUpload","delete","handleAudioUpload","uri","durationMs","collectionItem","uploadPromise","upload","fileName","add","resolveRecord","then","data","update","setupUploadHandler","clock","$lastKnownDurationMs","filter","fn","target","setupCurrentRecordSync","recorderButtonHandler","isInitializing","pending","lastKnownDurationMs","warn","events","undoRecord","constructor","setApi"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/VoiceRecord.model.ts"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,OAAO,EAAEC,YAAY,EAAEC,WAAW,EAAEC,OAAO,EAAEC,MAAM,QAAoB,UAAU;AAClG,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,sBAAsB,QAAQ,4BAAyB;AAChE,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,kBAAkB,QAAQ,oBAAiB;AAMpD,SAASC,0BAA0B,EAAEC,kBAAkB,QAAQ,kBAAe;AAC9E,SAASC,8BAA8B,QAAQ,oBAAiB;AAChE,SAASC,C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CAAC4C,IAAI,CAAC,CAAC;QACzB;MACF;MACA,IAAI,IAAI,CAAC3C,UAAU,CAAC4B,GAAG,CAACJ,UAAU,CAAC,EAAE;QACnC,IAAI,CAAC6D,MAAM,CAACC,UAAU,CAAC,CAAC;QACxB;MACF;MAEA,IAAI,CAACrD,mBAAmB,CAAC,CAAC;IAC5B,CACF;EACF,CAAC,CAAC;EAEFsD,WAAWA,CAAC;IAAErE,GAAG;IAAEO,YAAY;IAAE4D;EAA+B,CAAC,EAAE;IACjE,IAAI,CAACnE,GAAG,GAAGA,GAAG;IACd,IAAI,CAACO,YAAY,GAAGA,YAAY;IAChC,IAAI,CAAC4D,MAAM,GAAGA,MAAM;IACpB,IAAI,CAACpF,QAAQ,CAACuF,MAAM,CAACtE,GAAG,CAAC;IAEzB,IAAI,CAACuD,kBAAkB,CAAC,CAAC;IACzB,IAAI,CAACM,sBAAsB,CAAC,CAAC;EAC/B;AACF","ignoreList":[]}
@@ -0,0 +1,25 @@
1
+ "use strict";
2
+
3
+ export class VoiceRecordsCollection {
4
+ collection = new Map();
5
+ add(key, item) {
6
+ this.collection.set(key, item);
7
+ }
8
+ update(key, item) {
9
+ const existingItem = this.collection.get(key) || {};
10
+ this.collection.set(key, {
11
+ ...existingItem,
12
+ ...item
13
+ });
14
+ }
15
+ delete(key) {
16
+ this.collection.delete(key);
17
+ }
18
+ get(key) {
19
+ return this.collection.get(key);
20
+ }
21
+ clear() {
22
+ this.collection.clear();
23
+ }
24
+ }
25
+ //# sourceMappingURL=VoiceRecordCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["VoiceRecordsCollection","collection","Map","add","key","item","set","update","existingItem","get","delete","clear"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/VoiceRecordCollection.ts"],"mappings":";;AAEA,OAAO,MAAMA,sBAAsB,CAAC;EAClBC,UAAU,GAA2C,IAAIC,GAAG,CAAC,CAAC;EAEvEC,GAAGA,CAACC,GAAW,EAAEC,IAA+B,EAAE;IACvD,IAAI,CAACJ,UAAU,CAACK,GAAG,CAACF,GAAG,EAAEC,IAAI,CAAC;EAChC;EAEOE,MAAMA,CAACH,GAAW,EAAEC,IAAwC,EAAE;IACnE,MAAMG,YAAY,GAAG,IAAI,CAACP,UAAU,CAACQ,GAAG,CAACL,GAAG,CAAC,IAAI,CAAC,CAAC;IACnD,IAAI,CAACH,UAAU,CAACK,GAAG,CAACF,GAAG,EAAE;MAAE,GAAGI,YAAY;MAAE,GAAGH;IAAK,CAAC,CAAC;EACxD;EAEOK,MAAMA,CAACN,GAAW,EAAE;IACzB,IAAI,CAACH,UAAU,CAACS,MAAM,CAACN,GAAG,CAAC;EAC7B;EAEOK,GAAGA,CAACL,GAAW,EAAE;IACtB,OAAO,IAAI,CAACH,UAAU,CAACQ,GAAG,CAACL,GAAG,CAAC;EACjC;EAEOO,KAAKA,CAAA,EAAG;IACb,IAAI,CAACV,UAAU,CAACU,KAAK,CAAC,CAAC;EACzB;AACF","ignoreList":[]}
@@ -0,0 +1,4 @@
1
+ "use strict";
2
+
3
+ export {};
4
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["features/voice/types.ts"],"mappings":"","ignoreList":[]}
@@ -13,4 +13,5 @@ export * from "./features/exampleSolution/index.js";
13
13
  export * from "./features/keyboard/index.js";
14
14
  export * from "./features/openEnded/index.js";
15
15
  export * from "./shared/icons/index.js";
16
+ export * from "./features/voice/index.js";
16
17
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["useFeaturesLocalization","setFeaturesLocalization","Locale","generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,uBAAuB,EAAEC,MAAM,QAAQ,+BAAsB;AAC/F,SAASC,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,8BAAqB;AACnC,cAAc,+BAAsB;AACpC,cAAc,yBAAgB","ignoreList":[]}
1
+ {"version":3,"names":["useFeaturesLocalization","setFeaturesLocalization","Locale","generateRandomId"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA,SAASA,uBAAuB,EAAEC,uBAAuB,EAAEC,MAAM,QAAQ,+BAAsB;AAC/F,SAASC,gBAAgB,QAAQ,0BAAuB;AACxD,cAAc,6BAAoB;AAClC,cAAc,8BAAqB;AACnC,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,kCAAyB;AACvC,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,qCAA4B;AAC1C,cAAc,8BAAqB;AACnC,cAAc,+BAAsB;AACpC,cAAc,yBAAgB;AAC9B,cAAc,2BAAkB","ignoreList":[]}