@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,63 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceRecordButton = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNativeUi = require("@magmamath/react-native-ui");
9
+ var _reactNative = require("react-native");
10
+ var _effectorReact = require("effector-react");
11
+ var _constants = require("../../constants.js");
12
+ var _index = require("../../../../shared/translation/index.js");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
+ const VoiceRecordButton = ({
17
+ style,
18
+ model
19
+ }) => {
20
+ const t = (0, _index.useText)();
21
+ const availableInputs = (0, _effectorReact.useUnit)(model.recorderModel.$availableInputs);
22
+ const voiceRecordState = (0, _effectorReact.useUnit)(model.recorderModel.$voiceRecordState);
23
+ const isButtonDisabled = (0, _effectorReact.useUnit)(model.$isButtonDisabled);
24
+ const isInitializing = (0, _effectorReact.useUnit)(model.initializeRecording.pending);
25
+ const combinedStyles = (0, _react.useMemo)(() => {
26
+ return {
27
+ button: [{
28
+ width: 50,
29
+ height: 50
30
+ }, style?.button],
31
+ container: [style?.container],
32
+ text: [style?.text]
33
+ };
34
+ }, [style]);
35
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
36
+ onPressIn: e => {
37
+ if (availableInputs.length) return;
38
+ e.preventDefault();
39
+ model.notification.warning(t('voice.noMicrophoneFound'));
40
+ },
41
+ pointerEvents: !availableInputs.length || isInitializing ? 'box-only' : 'auto',
42
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
43
+ disabled: isButtonDisabled || !availableInputs.length,
44
+ onPressIn: () => model.recorderButtonHandler(),
45
+ style: combinedStyles,
46
+ size: _reactNativeUi.ButtonSize.LARGE,
47
+ variant: _reactNativeUi.ButtonVariant.SECONDARY,
48
+ colorScheme: _reactNativeUi.ButtonColor.WHITE,
49
+ icon: voiceRecordState === _constants.VoiceRecorderState.RECORDING ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CheckIcon, {
50
+ size: 25
51
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.MicrophoneIcon, {
52
+ style: _reactNativeUi.IS_WEB ? {
53
+ width: 19
54
+ } : {
55
+ minWidth: 23,
56
+ minHeight: 23
57
+ }
58
+ })
59
+ })
60
+ });
61
+ };
62
+ exports.VoiceRecordButton = VoiceRecordButton;
63
+ //# sourceMappingURL=VoiceRecordButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNativeUi","_reactNative","_effectorReact","_constants","_index","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VoiceRecordButton","style","model","useText","availableInputs","useUnit","recorderModel","$availableInputs","voiceRecordState","$voiceRecordState","isButtonDisabled","$isButtonDisabled","isInitializing","initializeRecording","pending","combinedStyles","useMemo","button","width","height","container","text","jsx","Pressable","onPressIn","length","preventDefault","notification","warning","pointerEvents","children","Button","disabled","recorderButtonHandler","size","ButtonSize","LARGE","variant","ButtonVariant","SECONDARY","colorScheme","ButtonColor","WHITE","icon","VoiceRecorderState","RECORDING","CheckIcon","MicrophoneIcon","IS_WEB","minWidth","minHeight","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceRecordButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AAQA,IAAAE,YAAA,GAAAF,OAAA;AAGA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AAAwD,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAO,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAA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AAgB,KAAKoC,6BAAkB,CAACC,SAAS,gBAC/C,IAAAlE,WAAA,CAAA2C,GAAA,EAAChD,cAAA,CAAAwE,SAAS;QAACZ,IAAI,EAAE;MAAG,CAAE,CAAC,gBAEvB,IAAAvD,WAAA,CAAA2C,GAAA,EAAChD,cAAA,CAAAyE,cAAc;QAAC9C,KAAK,EAAE+C,qBAAM,GAAG;UAAE9B,KAAK,EAAE;QAAG,CAAC,GAAG;UAAE+B,QAAQ,EAAE,EAAE;UAAEC,SAAS,EAAE;QAAG;MAAE,CAAE;IAErF,CACF;EAAC,CACO,CAAC;AAEhB,CAAC;AAAAC,OAAA,CAAAnD,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceRecordDeleteButton = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _reactNativeUi = require("@magmamath/react-native-ui");
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ const VoiceRecordDeleteButton = ({
13
+ onPress,
14
+ isDisabled
15
+ }) => {
16
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
17
+ style: styles.container,
18
+ onPress: onPress,
19
+ disabled: isDisabled,
20
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.TrashcanIcon, {
21
+ size: 20,
22
+ color: isDisabled ? _reactNativeUi.COLORS.NEUTRAL_5 : _reactNativeUi.COLORS.NEUTRAL_9
23
+ })
24
+ });
25
+ };
26
+ exports.VoiceRecordDeleteButton = VoiceRecordDeleteButton;
27
+ const styles = _reactNative.StyleSheet.create({
28
+ container: {
29
+ width: 36,
30
+ height: 36,
31
+ alignItems: 'center',
32
+ justifyContent: 'center'
33
+ }
34
+ });
35
+ //# sourceMappingURL=VoiceRecordDeleteButton.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_reactNativeUi","_react","_interopRequireDefault","_jsxRuntime","e","__esModule","default","VoiceRecordDeleteButton","onPress","isDisabled","jsx","TouchableOpacity","style","styles","container","disabled","children","TrashcanIcon","size","color","COLORS","NEUTRAL_5","NEUTRAL_9","exports","StyleSheet","create","width","height","alignItems","justifyContent"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceRecordDeleteButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAAyB,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAG,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAOlB,MAAMG,uBAAuB,GAAGA,CAAC;EAAEC,OAAO;EAAEC;AAAmC,CAAC,KAAK;EAC1F,oBACE,IAAAN,WAAA,CAAAO,GAAA,EAACZ,YAAA,CAAAa,gBAAgB;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAACN,OAAO,EAAEA,OAAQ;IAACO,QAAQ,EAAEN,UAAW;IAAAO,QAAA,eAChF,IAAAb,WAAA,CAAAO,GAAA,EAACV,cAAA,CAAAiB,YAAY;MAACC,IAAI,EAAE,EAAG;MAACC,KAAK,EAAEV,UAAU,GAAGW,qBAAM,CAACC,SAAS,GAAGD,qBAAM,CAACE;IAAU,CAAE;EAAC,CACnE,CAAC;AAEvB,CAAC;AAAAC,OAAA,CAAAhB,uBAAA,GAAAA,uBAAA;AAED,MAAMM,MAAM,GAAGW,uBAAU,CAACC,MAAM,CAAC;EAC/BX,SAAS,EAAE;IACTY,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,27 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceRecordDivider = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactNativeUi = require("@magmamath/react-native-ui");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ const VoiceRecordDivider = () => {
13
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
14
+ style: styles.container
15
+ });
16
+ };
17
+ exports.VoiceRecordDivider = VoiceRecordDivider;
18
+ const styles = _reactNative.StyleSheet.create({
19
+ container: {
20
+ height: 1,
21
+ borderRadius: 1,
22
+ width: 28,
23
+ margin: 8,
24
+ backgroundColor: _reactNativeUi.COLORS.NEUTRAL_6
25
+ }
26
+ });
27
+ //# sourceMappingURL=VoiceRecordDivider.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_react","_interopRequireDefault","_reactNativeUi","_jsxRuntime","e","__esModule","default","VoiceRecordDivider","jsx","View","style","styles","container","exports","StyleSheet","create","height","borderRadius","width","margin","backgroundColor","COLORS","NEUTRAL_6"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceRecordDivider.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AAAmD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAE,uBAAAG,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE5C,MAAMG,kBAAkB,GAAGA,CAAA,KAAM;EACtC,oBAAO,IAAAJ,WAAA,CAAAK,GAAA,EAACV,YAAA,CAAAW,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC;EAAU,CAAE,CAAC;AAC1C,CAAC;AAAAC,OAAA,CAAAN,kBAAA,GAAAA,kBAAA;AAED,MAAMI,MAAM,GAAGG,uBAAU,CAACC,MAAM,CAAC;EAC/BH,SAAS,EAAE;IACTI,MAAM,EAAE,CAAC;IACTC,YAAY,EAAE,CAAC;IACfC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,CAAC;IACTC,eAAe,EAAEC,qBAAM,CAACC;EAC1B;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,50 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceRecordTimer = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _reactNativeUi = require("@magmamath/react-native-ui");
9
+ var _react = _interopRequireDefault(require("react"));
10
+ var _effectorReact = require("effector-react");
11
+ var _helpers = require("../../helpers.js");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ const VoiceRecordTimer = ({
15
+ style,
16
+ model,
17
+ recordingFileDurationMs
18
+ }) => {
19
+ const savedAudioFileDurationMs = (0, _effectorReact.useUnit)(model.$currentRecord)?.durationMs || 0;
20
+ const displayDurationMs = recordingFileDurationMs || savedAudioFileDurationMs;
21
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
22
+ style: [styles.container, style],
23
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
24
+ variant: "h9",
25
+ style: styles.text,
26
+ children: displayDurationMs ? (0, _helpers.formatDuration)(displayDurationMs) : '0:00'
27
+ })
28
+ });
29
+ };
30
+ exports.VoiceRecordTimer = VoiceRecordTimer;
31
+ const styles = _reactNative.StyleSheet.create({
32
+ container: {
33
+ backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
34
+ paddingHorizontal: 8,
35
+ paddingVertical: 2,
36
+ alignItems: 'center',
37
+ borderWidth: 0.5,
38
+ borderColor: _reactNativeUi.COLORS.NEUTRAL_4,
39
+ borderRadius: 18,
40
+ minWidth: 45
41
+ },
42
+ text: {
43
+ color: _reactNativeUi.COLORS.NEUTRAL_10,
44
+ fontSize: 13,
45
+ fontWeight: '600',
46
+ lineHeight: 18,
47
+ textTransform: 'uppercase'
48
+ }
49
+ });
50
+ //# sourceMappingURL=VoiceRecordTimer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_reactNativeUi","_react","_interopRequireDefault","_effectorReact","_helpers","_jsxRuntime","e","__esModule","default","VoiceRecordTimer","style","model","recordingFileDurationMs","savedAudioFileDurationMs","useUnit","$currentRecord","durationMs","displayDurationMs","jsx","View","styles","container","children","Typography","variant","text","formatDuration","exports","StyleSheet","create","backgroundColor","COLORS","NEUTRAL_1","paddingHorizontal","paddingVertical","alignItems","borderWidth","borderColor","NEUTRAL_4","borderRadius","minWidth","color","NEUTRAL_10","fontSize","fontWeight","lineHeight","textTransform"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceRecordTimer.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,sBAAA,CAAAH,OAAA;AAEA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,QAAA,GAAAL,OAAA;AAA8C,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAG,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAQvC,MAAMG,gBAAgB,GAAGA,CAAC;EAC/BC,KAAK;EACLC,KAAK;EACLC;AACqB,CAAC,KAAK;EAC3B,MAAMC,wBAAwB,GAAG,IAAAC,sBAAO,EAACH,KAAK,CAACI,cAAc,CAAC,EAAEC,UAAU,IAAI,CAAC;EAC/E,MAAMC,iBAAiB,GAAGL,uBAAuB,IAAIC,wBAAwB;EAE7E,oBACE,IAAAR,WAAA,CAAAa,GAAA,EAACpB,YAAA,CAAAqB,IAAI;IAACT,KAAK,EAAE,CAACU,MAAM,CAACC,SAAS,EAAEX,KAAK,CAAE;IAAAY,QAAA,eACrC,IAAAjB,WAAA,CAAAa,GAAA,EAAClB,cAAA,CAAAuB,UAAU;MAACC,OAAO,EAAC,IAAI;MAACd,KAAK,EAAEU,MAAM,CAACK,IAAK;MAAAH,QAAA,EACzCL,iBAAiB,GAAG,IAAAS,uBAAc,EAACT,iBAAiB,CAAC,GAAG;IAAM,CACrD;EAAC,CACT,CAAC;AAEX,CAAC;AAAAU,OAAA,CAAAlB,gBAAA,GAAAA,gBAAA;AAED,MAAMW,MAAM,GAAGQ,uBAAU,CAACC,MAAM,CAAC;EAC/BR,SAAS,EAAE;IACTS,eAAe,EAAEC,qBAAM,CAACC,SAAS;IACjCC,iBAAiB,EAAE,CAAC;IACpBC,eAAe,EAAE,CAAC;IAClBC,UAAU,EAAE,QAAQ;IACpBC,WAAW,EAAE,GAAG;IAChBC,WAAW,EAAEN,qBAAM,CAACO,SAAS;IAC7BC,YAAY,EAAE,EAAE;IAChBC,QAAQ,EAAE;EACZ,CAAC;EACDf,IAAI,EAAE;IACJgB,KAAK,EAAEV,qBAAM,CAACW,UAAU;IACxBC,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBC,UAAU,EAAE,EAAE;IACdC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,59 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useVoiceRecorder = void 0;
7
+ var _expoAudio = require("expo-audio");
8
+ var _react = require("react");
9
+ var _reactNativeUi = require("@magmamath/react-native-ui");
10
+ var _constants = require("../../constants.js");
11
+ var _helpers = require("../../helpers.js");
12
+ const useVoiceRecorder = model => {
13
+ const recorder = (0, _expoAudio.useAudioRecorder)(_expoAudio.RecordingPresets.LOW_QUALITY, model.recordingStatusUpdate);
14
+ const recorderState = (0, _expoAudio.useAudioRecorderState)(recorder);
15
+ (0, _react.useEffect)(() => {
16
+ if (recorderState.durationMillis >= _constants.VOICE_RECORDER_MAX_DURATION_MS && recorderState.isRecording) {
17
+ model.recorderModel.stop();
18
+ }
19
+ // Track the last known duration while recording (for old browsers where getAudioDurationMs returns Infinity)
20
+ if (recorderState.isRecording && recorderState.durationMillis > 0) {
21
+ model.recorderModel.setLastKnownDurationMs(recorderState.durationMillis);
22
+ }
23
+ }, [recorderState.durationMillis]);
24
+ (0, _react.useEffect)(() => {
25
+ if (!_reactNativeUi.IS_WEB) {
26
+ //only once for iPad and listener for WEB
27
+ (0, _helpers.getAvailableInputs)(recorder).then(inputs => {
28
+ model.recorderModel.setAvailableInputs(inputs);
29
+ });
30
+ return;
31
+ }
32
+ const removeListener = (0, _helpers.addAudioInputsListenerWeb)(devices => {
33
+ model.recorderModel.setAvailableInputs(devices);
34
+ });
35
+ return removeListener;
36
+ }, [recorder, model.recorderModel]);
37
+ (0, _react.useEffect)(() => {
38
+ if (recorderState.isRecording) {
39
+ model.recorderModel.setVoiceRecordState(_constants.VoiceRecorderState.RECORDING);
40
+ return;
41
+ }
42
+ if (recorderState.durationMillis > 0) {
43
+ model.recorderModel.setVoiceRecordState(_constants.VoiceRecorderState.PAUSED);
44
+ return;
45
+ }
46
+ model.recorderModel.setVoiceRecordState(_constants.VoiceRecorderState.IDLE);
47
+ return () => {
48
+ model.recorderModel.reset();
49
+ };
50
+ }, [recorderState, model.recorderModel]);
51
+ (0, _react.useEffect)(() => {
52
+ model.recorderModel.recorder = recorder;
53
+ }, [recorder]);
54
+ return {
55
+ recorderState
56
+ };
57
+ };
58
+ exports.useVoiceRecorder = useVoiceRecorder;
59
+ //# sourceMappingURL=useVoiceRecorder.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_expoAudio","require","_react","_reactNativeUi","_constants","_helpers","useVoiceRecorder","model","recorder","useAudioRecorder","RecordingPresets","LOW_QUALITY","recordingStatusUpdate","recorderState","useAudioRecorderState","useEffect","durationMillis","VOICE_RECORDER_MAX_DURATION_MS","isRecording","recorderModel","stop","setLastKnownDurationMs","IS_WEB","getAvailableInputs","then","inputs","setAvailableInputs","removeListener","addAudioInputsListenerWeb","devices","setVoiceRecordState","VoiceRecorderState","RECORDING","PAUSED","IDLE","reset","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/hooks/useVoiceRecorder.ts"],"mappings":";;;;;;AAAA,IAAAA,UAAA,GAAAC,OAAA;AAEA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEO,MAAMK,gBAAgB,GAAIC,KAAuB,IAAK;EAC3D,MAAMC,QAAQ,GAAG,IAAAC,2BAAgB,EAACC,2BAAgB,CAACC,WAAW,EAAEJ,KAAK,CAACK,qBAAqB,CAAC;EAC5F,MAAMC,aAAa,GAAG,IAAAC,gCAAqB,EAACN,QAAQ,CAAC;EAErD,IAAAO,gBAAS,EAAC,MAAM;IACd,IACEF,aAAa,CAACG,cAAc,IAAIC,yCAA8B,IAC9DJ,aAAa,CAACK,WAAW,EACzB;MACAX,KAAK,CAACY,aAAa,CAACC,IAAI,CAAC,CAAC;IAC5B;IACA;IACA,IAAIP,aAAa,CAACK,WAAW,IAAIL,aAAa,CAACG,cAAc,GAAG,CAAC,EAAE;MACjET,KAAK,CAACY,aAAa,CAACE,sBAAsB,CAACR,aAAa,CAACG,cAAc,CAAC;IAC1E;EACF,CAAC,EAAE,CAACH,aAAa,CAACG,cAAc,CAAC,CAAC;EAElC,IAAAD,gBAAS,EAAC,MAAM;IACd,IAAI,CAACO,qBAAM,EAAE;MACX;MACA,IAAAC,2BAAkB,EAACf,QAAQ,CAAC,CAACgB,IAAI,CAAEC,MAAM,IAAK;QAC5ClB,KAAK,CAACY,aAAa,CAACO,kBAAkB,CAACD,MAAM,CAAC;MAChD,CAAC,CAAC;MACF;IACF;IAEA,MAAME,cAAc,GAAG,IAAAC,kCAAyB,EAAEC,OAAO,IAAK;MAC5DtB,KAAK,CAACY,aAAa,CAACO,kBAAkB,CAACG,OAAO,CAAC;IACjD,CAAC,CAAC;IAEF,OAAOF,cAAc;EACvB,CAAC,EAAE,CAACnB,QAAQ,EAAED,KAAK,CAACY,aAAa,CAAC,CAAC;EAEnC,IAAAJ,gBAAS,EAAC,MAAM;IACd,IAAIF,aAAa,CAACK,WAAW,EAAE;MAC7BX,KAAK,CAACY,aAAa,CAACW,mBAAmB,CAACC,6BAAkB,CAACC,SAAS,CAAC;MACrE;IACF;IACA,IAAInB,aAAa,CAACG,cAAc,GAAG,CAAC,EAAE;MACpCT,KAAK,CAACY,aAAa,CAACW,mBAAmB,CAACC,6BAAkB,CAACE,MAAM,CAAC;MAClE;IACF;IACA1B,KAAK,CAACY,aAAa,CAACW,mBAAmB,CAACC,6BAAkB,CAACG,IAAI,CAAC;IAEhE,OAAO,MAAM;MACX3B,KAAK,CAACY,aAAa,CAACgB,KAAK,CAAC,CAAC;IAC7B,CAAC;EACH,CAAC,EAAE,CAACtB,aAAa,EAAEN,KAAK,CAACY,aAAa,CAAC,CAAC;EAExC,IAAAJ,gBAAS,EAAC,MAAM;IACdR,KAAK,CAACY,aAAa,CAACX,QAAQ,GAAGA,QAAQ;EACzC,CAAC,EAAE,CAACA,QAAQ,CAAC,CAAC;EAEd,OAAO;IAAEK;EAAc,CAAC;AAC1B,CAAC;AAAAuB,OAAA,CAAA9B,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -0,0 +1,22 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useVoiceRecorderAnimation = void 0;
7
+ var _reactNativeReanimated = require("react-native-reanimated");
8
+ var _constants = require("../../constants.js");
9
+ const useVoiceRecorderAnimation = isExpanded => {
10
+ const containerAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
11
+ return {
12
+ height: (0, _reactNativeReanimated.withTiming)(isExpanded ? _constants.VOICE_RECORDER_CONTAINER_SIZES.EXPANDED : _constants.VOICE_RECORDER_CONTAINER_SIZES.COLLAPSED, {
13
+ duration: 280
14
+ })
15
+ };
16
+ }, [isExpanded]);
17
+ return {
18
+ containerAnimatedStyle
19
+ };
20
+ };
21
+ exports.useVoiceRecorderAnimation = useVoiceRecorderAnimation;
22
+ //# sourceMappingURL=useVoiceRecorderAnimation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeReanimated","require","_constants","useVoiceRecorderAnimation","isExpanded","containerAnimatedStyle","useAnimatedStyle","height","withTiming","VOICE_RECORDER_CONTAINER_SIZES","EXPANDED","COLLAPSED","duration","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/hooks/useVoiceRecorderAnimation.ts"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEO,MAAME,yBAAyB,GAAIC,UAAmB,IAAK;EAChE,MAAMC,sBAAsB,GAAG,IAAAC,uCAAgB,EAAC,MAAM;IACpD,OAAO;MACLC,MAAM,EAAE,IAAAC,iCAAU,EAChBJ,UAAU,GACNK,yCAA8B,CAACC,QAAQ,GACvCD,yCAA8B,CAACE,SAAS,EAC5C;QACEC,QAAQ,EAAE;MACZ,CACF;IACF,CAAC;EACH,CAAC,EAAE,CAACR,UAAU,CAAC,CAAC;EAEhB,OAAO;IAAEC;EAAuB,CAAC;AACnC,CAAC;AAAAQ,OAAA,CAAAV,yBAAA,GAAAA,yBAAA","ignoreList":[]}
@@ -0,0 +1,53 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ModalFooterButtons = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNativeUi = require("@magmamath/react-native-ui");
9
+ var _reactNative = require("react-native");
10
+ var _index = require("../../../../shared/translation/index.js");
11
+ var _jsxRuntime = require("react/jsx-runtime");
12
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
13
+ const ModalFooterButtons = ({
14
+ onCancel,
15
+ onConfirm,
16
+ confirmLabel,
17
+ confirmColor = _reactNativeUi.ButtonColor.BLUE
18
+ }) => {
19
+ const t = (0, _index.useText)();
20
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
21
+ style: styles.container,
22
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
23
+ style: {
24
+ text: styles.buttonLabel
25
+ },
26
+ variant: _reactNativeUi.ButtonVariant.TERTIARY,
27
+ size: _reactNativeUi.ButtonSize.LARGE,
28
+ onPress: onCancel,
29
+ children: t('voice.cancel')
30
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
31
+ colorScheme: confirmColor,
32
+ variant: _reactNativeUi.ButtonVariant.PRIMARY,
33
+ size: _reactNativeUi.ButtonSize.LARGE,
34
+ onPress: onConfirm,
35
+ style: {
36
+ text: styles.buttonLabel
37
+ },
38
+ children: t(confirmLabel)
39
+ })]
40
+ });
41
+ };
42
+ exports.ModalFooterButtons = ModalFooterButtons;
43
+ const styles = _reactNative.StyleSheet.create({
44
+ container: {
45
+ flexDirection: 'row',
46
+ alignItems: 'center',
47
+ gap: _reactNativeUi.SPACING[200]
48
+ },
49
+ buttonLabel: {
50
+ textTransform: 'uppercase'
51
+ }
52
+ });
53
+ //# sourceMappingURL=ModalFooterButtons.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeUi","_reactNative","_index","_jsxRuntime","e","__esModule","default","ModalFooterButtons","onCancel","onConfirm","confirmLabel","confirmColor","ButtonColor","BLUE","t","useText","jsxs","View","style","styles","container","children","jsx","Button","text","buttonLabel","variant","ButtonVariant","TERTIARY","size","ButtonSize","LARGE","onPress","colorScheme","PRIMARY","exports","StyleSheet","create","flexDirection","alignItems","gap","SPACING","textTransform"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/modal/ModalFooterButtons.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AAAwD,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAUjD,MAAMG,kBAAkB,GAAGA,CAAC;EACjCC,QAAQ;EACRC,SAAS;EACTC,YAAY;EACZC,YAAY,GAAGC,0BAAW,CAACC;AACJ,CAAC,KAAK;EAC7B,MAAMC,CAAC,GAAG,IAAAC,cAAO,EAAC,CAAC;EAEnB,oBACE,IAAAZ,WAAA,CAAAa,IAAA,EAACf,YAAA,CAAAgB,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5B,IAAAlB,WAAA,CAAAmB,GAAA,EAACtB,cAAA,CAAAuB,MAAM;MACLL,KAAK,EAAE;QAAEM,IAAI,EAAEL,MAAM,CAACM;MAAY,CAAE;MACpCC,OAAO,EAAEC,4BAAa,CAACC,QAAS;MAChCC,IAAI,EAAEC,yBAAU,CAACC,KAAM;MACvBC,OAAO,EAAExB,QAAS;MAAAa,QAAA,EAEjBP,CAAC,CAAC,cAAc;IAAC,CACZ,CAAC,eACT,IAAAX,WAAA,CAAAmB,GAAA,EAACtB,cAAA,CAAAuB,MAAM;MACLU,WAAW,EAAEtB,YAAa;MAC1Be,OAAO,EAAEC,4BAAa,CAACO,OAAQ;MAC/BL,IAAI,EAAEC,yBAAU,CAACC,KAAM;MACvBC,OAAO,EAAEvB,SAAU;MACnBS,KAAK,EAAE;QAAEM,IAAI,EAAEL,MAAM,CAACM;MAAY,CAAE;MAAAJ,QAAA,EAEnCP,CAAC,CAACJ,YAAY;IAAC,CACV,CAAC;EAAA,CACL,CAAC;AAEX,CAAC;AAAAyB,OAAA,CAAA5B,kBAAA,GAAAA,kBAAA;AAED,MAAMY,MAAM,GAAGiB,uBAAU,CAACC,MAAM,CAAC;EAC/BjB,SAAS,EAAE;IACTkB,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAEC,sBAAO,CAAC,GAAG;EAClB,CAAC;EACDhB,WAAW,EAAE;IACXiB,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,78 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceRecordDeleteModal = void 0;
7
+ var _react = _interopRequireWildcard(require("react"));
8
+ var _reactNativeUi = require("@magmamath/react-native-ui");
9
+ var _reactNative = require("react-native");
10
+ var _effectorReact = require("effector-react");
11
+ var _constants = require("../../constants.js");
12
+ var _index = require("../../../../shared/translation/index.js");
13
+ var _ModalFooterButtons = require("./ModalFooterButtons.js");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
16
+ function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
17
+ const VoiceRecordDeleteModal = ({
18
+ modal: {
19
+ closeModal,
20
+ params
21
+ }
22
+ }) => {
23
+ const t = (0, _index.useText)();
24
+ const {
25
+ model
26
+ } = params;
27
+ const recorderState = (0, _effectorReact.useUnit)(model.recorderModel.$voiceRecordState);
28
+ const handleDelete = () => {
29
+ if (recorderState === _constants.VoiceRecorderState.PAUSED) {
30
+ // if recording is paused, we need to start it again to ensure the recorder is in a consistent state before deletion
31
+ // without .record() browser still will use microphone
32
+ model.recorderModel.recorder.record();
33
+ setTimeout(() => {
34
+ model.stop();
35
+ model.deleteCurrentRecording();
36
+ }, 50);
37
+ closeModal();
38
+ return;
39
+ }
40
+ model.deleteCurrentRecording();
41
+ closeModal();
42
+ };
43
+ (0, _react.useEffect)(() => {
44
+ if (recorderState === _constants.VoiceRecorderState.RECORDING) {
45
+ model.recorderModel.recorder.pause();
46
+ }
47
+ return () => {
48
+ if (model.recorderModel.$voiceRecordState.getState() === _constants.VoiceRecorderState.PAUSED) {
49
+ try {
50
+ model.recorderModel.recorder.record();
51
+ } catch (error) {
52
+ console.error(`Failed to resume recording: ${error}`);
53
+ }
54
+ }
55
+ };
56
+ }, []);
57
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.BaseModal, {
58
+ style: {
59
+ container: styles.modalContainer
60
+ },
61
+ header: t('voice.deleteRecording'),
62
+ content: t('voice.youWontBeAbleToRecover'),
63
+ footer: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ModalFooterButtons.ModalFooterButtons, {
64
+ onCancel: closeModal,
65
+ onConfirm: handleDelete,
66
+ confirmLabel: "voice.delete",
67
+ confirmColor: _reactNativeUi.ButtonColor.RED
68
+ })
69
+ });
70
+ };
71
+ exports.VoiceRecordDeleteModal = VoiceRecordDeleteModal;
72
+ const styles = _reactNative.StyleSheet.create({
73
+ modalContainer: {
74
+ width: 600,
75
+ height: 268
76
+ }
77
+ });
78
+ //# sourceMappingURL=VoiceRecordDeleteModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNativeUi","_reactNative","_effectorReact","_constants","_index","_ModalFooterButtons","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VoiceRecordDeleteModal","modal","closeModal","params","useText","model","recorderState","useUnit","recorderModel","$voiceRecordState","handleDelete","VoiceRecorderState","PAUSED","recorder","record","setTimeout","stop","deleteCurrentRecording","useEffect","RECORDING","pause","getState","error","console","jsx","BaseModal","style","container","styles","modalContainer","header","content","footer","ModalFooterButtons","onCancel","onConfirm","confirmLabel","confirmColor","ButtonColor","RED","exports","StyleSheet","create","width","height"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/modal/VoiceRecordDeleteModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,cAAA,GAAAH,OAAA;AACA,IAAAI,UAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AAAyD,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAQ,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAV,wBAAAU,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,C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VC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceRecordUndoModal = void 0;
7
+ var _react = _interopRequireDefault(require("react"));
8
+ var _reactNativeUi = require("@magmamath/react-native-ui");
9
+ var _reactNative = require("react-native");
10
+ var _index = require("../../../../shared/translation/index.js");
11
+ var _ModalFooterButtons = require("./ModalFooterButtons.js");
12
+ var _jsxRuntime = require("react/jsx-runtime");
13
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
14
+ const VoiceRecordUndoModal = ({
15
+ modal: {
16
+ closeModal,
17
+ params
18
+ }
19
+ }) => {
20
+ const t = (0, _index.useText)();
21
+ const {
22
+ model
23
+ } = params;
24
+ const redoRecording = () => {
25
+ model.deleteCurrentRecording({
26
+ notification: false
27
+ });
28
+ closeModal();
29
+ model.initializeRecording();
30
+ };
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.BaseModal, {
32
+ style: {
33
+ container: styles.modalStyle
34
+ },
35
+ header: t('voice.redoRecording'),
36
+ content: t('voice.thisWillRemoveRecording'),
37
+ footer: /*#__PURE__*/(0, _jsxRuntime.jsx)(_ModalFooterButtons.ModalFooterButtons, {
38
+ onCancel: closeModal,
39
+ onConfirm: redoRecording,
40
+ confirmLabel: "voice.redo"
41
+ })
42
+ });
43
+ };
44
+ exports.VoiceRecordUndoModal = VoiceRecordUndoModal;
45
+ const styles = _reactNative.StyleSheet.create({
46
+ modalStyle: {
47
+ width: 600,
48
+ height: 268
49
+ }
50
+ });
51
+ //# sourceMappingURL=VoiceRecordUndoModal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeUi","_reactNative","_index","_ModalFooterButtons","_jsxRuntime","e","__esModule","default","VoiceRecordUndoModal","modal","closeModal","params","t","useText","model","redoRecording","deleteCurrentRecording","notification","initializeRecording","jsx","BaseModal","style","container","styles","modalStyle","header","content","footer","ModalFooterButtons","onCancel","onConfirm","confirmLabel","exports","StyleSheet","create","width","height"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/modal/VoiceRecordUndoModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,mBAAA,GAAAJ,OAAA;AAAyD,IAAAK,WAAA,GAAAL,OAAA;AAAA,SAAAD,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAUlD,MAAMG,oBAAoB,GAAGA,CAAC;EACnCC,KAAK,EAAE;IAAEC,UAAU;IAAEC;EAAO;AACH,CAAC,KAAK;EAC/B,MAAMC,CAAC,GAAG,IAAAC,cAAO,EAAC,CAAC;EACnB,MAAM;IAAEC;EAAM,CAAC,GAAGH,MAAM;EAExB,MAAMI,aAAa,GAAGA,CAAA,KAAM;IAC1BD,KAAK,CAACE,sBAAsB,CAAC;MAAEC,YAAY,EAAE;IAAM,CAAC,CAAC;IACrDP,UAAU,CAAC,CAAC;IACZI,KAAK,CAACI,mBAAmB,CAAC,CAAC;EAC7B,CAAC;EAED,oBACE,IAAAd,WAAA,CAAAe,GAAA,EAACnB,cAAA,CAAAoB,SAAS;IACRC,KAAK,EAAE;MACLC,SAAS,EAAEC,MAAM,CAACC;IACpB,CAAE;IACFC,MAAM,EAAEb,CAAC,CAAC,qBAAqB,CAAE;IACjCc,OAAO,EAAEd,CAAC,CAAC,+BAA+B,CAAE;IAC5Ce,MAAM,eACJ,IAAAvB,WAAA,CAAAe,GAAA,EAAChB,mBAAA,CAAAyB,kBAAkB;MACjBC,QAAQ,EAAEnB,UAAW;MACrBoB,SAAS,EAAEf,aAAc;MACzBgB,YAAY,EAAC;IAAY,CAC1B;EACF,CACF,CAAC;AAEN,CAAC;AAAAC,OAAA,CAAAxB,oBAAA,GAAAA,oBAAA;AAED,MAAMe,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,UAAU,EAAE;IACVW,KAAK,EAAE,GAAG;IACVC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,55 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.RecorderModel = void 0;
7
+ var _effector = require("effector");
8
+ var _expoAudio = require("expo-audio");
9
+ var _constants = require("../../constants.js");
10
+ const AUDIO_MODE_CONFIG = {
11
+ playsInSilentMode: true,
12
+ allowsRecording: true
13
+ };
14
+ class RecorderModel {
15
+ stopResolver = null;
16
+ reset = (0, _effector.createEvent)();
17
+ setVoiceRecordState = (0, _effector.createEvent)();
18
+ setAvailableInputs = (0, _effector.createEvent)();
19
+ setLastKnownDurationMs = (0, _effector.createEvent)();
20
+ $voiceRecordState = (0, _effector.restore)(this.setVoiceRecordState, _constants.VoiceRecorderState.IDLE).reset(this.reset);
21
+ $availableInputs = (0, _effector.restore)(this.setAvailableInputs, []);
22
+ $lastKnownDurationMs = (0, _effector.restore)(this.setLastKnownDurationMs, 0).reset(this.reset);
23
+ start = (0, _effector.createEffect)(async () => {
24
+ try {
25
+ await (0, _expoAudio.setAudioModeAsync)(AUDIO_MODE_CONFIG);
26
+ await this.recorder.prepareToRecordAsync();
27
+ this.recorder.record();
28
+ this.setVoiceRecordState(_constants.VoiceRecorderState.RECORDING);
29
+ } catch (error) {
30
+ console.error('Error starting recording:', error);
31
+ throw error;
32
+ }
33
+ });
34
+ stop = (0, _effector.createEffect)(() => {
35
+ if (!this.recorder.getStatus().isRecording) return;
36
+ return this.recorder.stop();
37
+ });
38
+ stopAndAwaitResult() {
39
+ return new Promise(resolve => {
40
+ this.stopResolver = resolve;
41
+ this.recorder.getStatus().isRecording && this.recorder.stop();
42
+ });
43
+ }
44
+ resolveRecord(result) {
45
+ if (this.stopResolver) {
46
+ this.stopResolver(result);
47
+ this.stopResolver = null;
48
+ }
49
+ }
50
+ clearStopResolver() {
51
+ this.stopResolver = null;
52
+ }
53
+ }
54
+ exports.RecorderModel = RecorderModel;
55
+ //# sourceMappingURL=Recorder.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effector","require","_expoAudio","_constants","AUDIO_MODE_CONFIG","playsInSilentMode","allowsRecording","RecorderModel","stopResolver","reset","createEvent","setVoiceRecordState","setAvailableInputs","setLastKnownDurationMs","$voiceRecordState","restore","VoiceRecorderState","IDLE","$availableInputs","$lastKnownDurationMs","start","createEffect","setAudioModeAsync","recorder","prepareToRecordAsync","record","RECORDING","error","console","stop","getStatus","isRecording","stopAndAwaitResult","Promise","resolve","resolveRecord","result","clearStopResolver","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/Recorder.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AACA,IAAAE,UAAA,GAAAF,OAAA;AAGA,MAAMG,iBAAiB,GAAG;EACxBC,iBAAiB,EAAE,IAAI;EACvBC,eAAe,EAAE;AACnB,CAAU;AAIH,MAAMC,aAAa,CAAc;EAE9BC,YAAY,GAA2B,IAAI;EAEnCC,KAAK,GAAG,IAAAC,qBAAW,EAAC,CAAC;EACrBC,mBAAmB,GAAG,IAAAD,qBAAW,EAAqB,CAAC;EACvDE,kBAAkB,GAAG,IAAAF,qBAAW,EAAuB,CAAC;EACxDG,sBAAsB,GAAG,IAAAH,qBAAW,EAAS,CAAC;EAE9CI,iBAAiB,GAAG,IAAAC,iBAAO,EACzC,IAAI,CAACJ,mBAAmB,EACxBK,6BAAkB,CAACC,IACrB,CAAC,CAACR,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EACHS,gBAAgB,GAAG,IAAAH,iBAAO,EAA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AC/B,IAAI,CAAC7B,YAAY,GAAG,IAAI;EAC1B;AACF;AAAC8B,OAAA,CAAA/B,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.UploaderModel = void 0;
7
+ var _effector = require("effector");
8
+ var _helpers = require("../../helpers.js");
9
+ class UploaderModel {
10
+ setApi = api => {
11
+ this.api = api;
12
+ };
13
+ upload = (0, _effector.createEffect)(async ({
14
+ uri,
15
+ fileName,
16
+ durationMs
17
+ }) => {
18
+ const formData = await (0, _helpers.generateAudioFormData)({
19
+ audioFileUri: uri,
20
+ durationMs,
21
+ fileName
22
+ });
23
+ const {
24
+ uploadAudio,
25
+ controller
26
+ } = (0, _helpers.uploadAudioFileRequestGenerator)(formData, this.api);
27
+ const uploadPromise = uploadAudio();
28
+ const collectionItem = {
29
+ durationMs,
30
+ audioUploadPromise: uploadPromise,
31
+ controller,
32
+ uri
33
+ };
34
+ return {
35
+ collectionItem,
36
+ uploadPromise
37
+ };
38
+ });
39
+ abortUpload = controller => {
40
+ controller?.abort();
41
+ };
42
+ }
43
+ exports.UploaderModel = UploaderModel;
44
+ //# sourceMappingURL=Uploader.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effector","require","_helpers","UploaderModel","setApi","api","upload","createEffect","uri","fileName","durationMs","formData","generateAudioFormData","audioFileUri","uploadAudio","controller","uploadAudioFileRequestGenerator","uploadPromise","collectionItem","audioUploadPromise","abortUpload","abort","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/model/Uploader.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAaO,MAAME,aAAa,CAAC;EAGTC,MAAM,GAAIC,GAAqB,IAAK;IAClD,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB,CAAC;EAEeC,MAAM,GAAG,IAAAC,sBAAY,EACnC,OAAO;IAAEC,GAAG;IAAEC,QAAQ;IAAEC;EAAyB,CAAC,KAA4B;IAC5E,MAAMC,QAAQ,GAAG,MAAM,IAAAC,8BAAqB,EAAC;MAC3CC,YAAY,EAAEL,GAAG;MACjBE,UAAU;MACVD;IACF,CAAC,CAAC;IAEF,MAAM;MAAEK,WAAW;MAAEC;IAAW,CAAC,GAAG,IAAAC,wCAA+B,EAACL,QAAQ,EAAE,IAAI,CAACN,GAAG,CAAC;IACvF,MAAMY,aAAa,GAAGH,WAAW,CAAC,CAAC;IAEnC,MAAMI,cAAyC,GAAG;MAChDR,UAAU;MACVS,kBAAkB,EAAEF,aAAa;MACjCF,UAAU;MACVP;IACF,CAAC;IAED,OAAO;MAAEU,cAAc;MAAED;IAAc,CAAC;EAC1C,CACF,CAAC;EAEeG,WAAW,GAAIL,UAA4B,IAAK;IAC9DA,UAAU,EAAEM,KAAK,CAAC,CAAC;EACrB,CAAC;AACH;AAACC,OAAA,CAAAnB,aAAA,GAAAA,aAAA","ignoreList":[]}