@magmamath/students-features 0.9.113 → 0.9.114-rc.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (367) hide show
  1. package/dist/commonjs/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
  2. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
  3. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +8 -48
  4. package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  5. package/dist/commonjs/features/chatbot/constants.js +4 -4
  6. package/dist/commonjs/features/chatbot/constants.js.map +1 -1
  7. package/dist/commonjs/features/gifCelebrations/helpers.js +1 -0
  8. package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -1
  9. package/dist/commonjs/features/voice/constants.js +22 -0
  10. package/dist/commonjs/features/voice/constants.js.map +1 -0
  11. package/dist/commonjs/features/voice/helpers.js +211 -0
  12. package/dist/commonjs/features/voice/helpers.js.map +1 -0
  13. package/dist/commonjs/features/voice/index.js +138 -0
  14. package/dist/commonjs/features/voice/index.js.map +1 -0
  15. package/dist/commonjs/features/voice/model/index.js +68 -0
  16. package/dist/commonjs/features/voice/model/index.js.map +1 -0
  17. package/dist/commonjs/features/voice/playing/components/VoiceIcon.js +49 -0
  18. package/dist/commonjs/features/voice/playing/components/VoiceIcon.js.map +1 -0
  19. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +208 -0
  20. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  21. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +108 -0
  22. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  23. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +50 -0
  24. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  25. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +34 -0
  26. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  27. package/dist/commonjs/features/voice/playing/model/Player.model.js +87 -0
  28. package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -0
  29. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +244 -0
  30. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
  31. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js +41 -0
  32. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
  33. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js +39 -0
  34. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js.map +1 -0
  35. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +15 -0
  36. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  37. package/dist/commonjs/features/voice/playing/model/index.js +47 -0
  38. package/dist/commonjs/features/voice/playing/model/index.js.map +1 -0
  39. package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +74 -0
  40. package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -0
  41. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +61 -0
  42. package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
  43. package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +35 -0
  44. package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
  45. package/dist/commonjs/features/voice/recording/components/VoiceRecordDevider.js +27 -0
  46. package/dist/commonjs/features/voice/recording/components/VoiceRecordDevider.js.map +1 -0
  47. package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js +50 -0
  48. package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
  49. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +59 -0
  50. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
  51. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +22 -0
  52. package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
  53. package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +53 -0
  54. package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
  55. package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +78 -0
  56. package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
  57. package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +51 -0
  58. package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
  59. package/dist/commonjs/features/voice/recording/model/Recorder.model.js +54 -0
  60. package/dist/commonjs/features/voice/recording/model/Recorder.model.js.map +1 -0
  61. package/dist/commonjs/features/voice/recording/model/Uploader.model.js +44 -0
  62. package/dist/commonjs/features/voice/recording/model/Uploader.model.js.map +1 -0
  63. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +239 -0
  64. package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
  65. package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js +30 -0
  66. package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
  67. package/dist/commonjs/features/voice/recording/model/index.js +34 -0
  68. package/dist/commonjs/features/voice/recording/model/index.js.map +1 -0
  69. package/dist/commonjs/features/voice/types.js +6 -0
  70. package/dist/commonjs/features/voice/types.js.map +1 -0
  71. package/dist/commonjs/index.js +12 -0
  72. package/dist/commonjs/index.js.map +1 -1
  73. package/dist/commonjs/shared/components/PlayButton.js +70 -0
  74. package/dist/commonjs/shared/components/PlayButton.js.map +1 -0
  75. package/dist/commonjs/shared/translation/localization/ca.json +17 -0
  76. package/dist/commonjs/shared/translation/localization/de.json +17 -0
  77. package/dist/commonjs/shared/translation/localization/en.json +17 -0
  78. package/dist/commonjs/shared/translation/localization/gb.json +17 -0
  79. package/dist/commonjs/shared/translation/localization/sct.json +17 -0
  80. package/dist/commonjs/shared/translation/localization/sw.json +17 -0
  81. package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
  82. package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
  83. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +9 -49
  84. package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
  85. package/dist/module/features/chatbot/constants.js +5 -5
  86. package/dist/module/features/chatbot/constants.js.map +1 -1
  87. package/dist/module/features/gifCelebrations/helpers.js +1 -0
  88. package/dist/module/features/gifCelebrations/helpers.js.map +1 -1
  89. package/dist/module/features/voice/constants.js +18 -0
  90. package/dist/module/features/voice/constants.js.map +1 -0
  91. package/dist/module/features/voice/helpers.js +194 -0
  92. package/dist/module/features/voice/helpers.js.map +1 -0
  93. package/dist/module/features/voice/index.js +20 -0
  94. package/dist/module/features/voice/index.js.map +1 -0
  95. package/dist/module/features/voice/model/index.js +15 -0
  96. package/dist/module/features/voice/model/index.js.map +1 -0
  97. package/dist/module/features/voice/playing/components/VoiceIcon.js +41 -0
  98. package/dist/module/features/voice/playing/components/VoiceIcon.js.map +1 -0
  99. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +201 -0
  100. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  101. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +102 -0
  102. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  103. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +45 -0
  104. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  105. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +29 -0
  106. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  107. package/dist/module/features/voice/playing/model/Player.model.js +82 -0
  108. package/dist/module/features/voice/playing/model/Player.model.js.map +1 -0
  109. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +234 -0
  110. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
  111. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js +36 -0
  112. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
  113. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js +34 -0
  114. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js.map +1 -0
  115. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +10 -0
  116. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  117. package/dist/module/features/voice/playing/model/index.js +8 -0
  118. package/dist/module/features/voice/playing/model/index.js.map +1 -0
  119. package/dist/module/features/voice/recording/components/VoiceRecord.js +67 -0
  120. package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -0
  121. package/dist/module/features/voice/recording/components/VoiceRecordButton.js +55 -0
  122. package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
  123. package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +29 -0
  124. package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
  125. package/dist/module/features/voice/recording/components/VoiceRecordDevider.js +21 -0
  126. package/dist/module/features/voice/recording/components/VoiceRecordDevider.js.map +1 -0
  127. package/dist/module/features/voice/recording/components/VoiceRecordTimer.js +44 -0
  128. package/dist/module/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
  129. package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js +54 -0
  130. package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
  131. package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +17 -0
  132. package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
  133. package/dist/module/features/voice/recording/modal/ModalFooterButtons.js +47 -0
  134. package/dist/module/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
  135. package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js +71 -0
  136. package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
  137. package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js +45 -0
  138. package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
  139. package/dist/module/features/voice/recording/model/Recorder.model.js +49 -0
  140. package/dist/module/features/voice/recording/model/Recorder.model.js.map +1 -0
  141. package/dist/module/features/voice/recording/model/Uploader.model.js +39 -0
  142. package/dist/module/features/voice/recording/model/Uploader.model.js.map +1 -0
  143. package/dist/module/features/voice/recording/model/VoiceRecord.model.js +234 -0
  144. package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
  145. package/dist/module/features/voice/recording/model/VoiceRecordCollection.js +25 -0
  146. package/dist/module/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
  147. package/dist/module/features/voice/recording/model/index.js +7 -0
  148. package/dist/module/features/voice/recording/model/index.js.map +1 -0
  149. package/dist/module/features/voice/types.js +4 -0
  150. package/dist/module/features/voice/types.js.map +1 -0
  151. package/dist/module/index.js +1 -0
  152. package/dist/module/index.js.map +1 -1
  153. package/dist/module/shared/components/PlayButton.js +64 -0
  154. package/dist/module/shared/components/PlayButton.js.map +1 -0
  155. package/dist/module/shared/translation/localization/ca.json +17 -0
  156. package/dist/module/shared/translation/localization/de.json +17 -0
  157. package/dist/module/shared/translation/localization/en.json +17 -0
  158. package/dist/module/shared/translation/localization/gb.json +17 -0
  159. package/dist/module/shared/translation/localization/sct.json +17 -0
  160. package/dist/module/shared/translation/localization/sw.json +17 -0
  161. package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
  162. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
  163. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
  164. package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  165. package/dist/typescript/commonjs/features/chatbot/constants.d.ts +5 -5
  166. package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -1
  168. package/dist/typescript/commonjs/features/voice/constants.d.ts +15 -0
  169. package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -0
  170. package/dist/typescript/commonjs/features/voice/helpers.d.ts +46 -0
  171. package/dist/typescript/commonjs/features/voice/helpers.d.ts.map +1 -0
  172. package/dist/typescript/commonjs/features/voice/index.d.ts +13 -0
  173. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -0
  174. package/dist/typescript/commonjs/features/voice/model/index.d.ts +11 -0
  175. package/dist/typescript/commonjs/features/voice/model/index.d.ts.map +1 -0
  176. package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts +8 -0
  177. package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
  178. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +15 -0
  179. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  180. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  181. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  182. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
  183. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  184. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  185. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  186. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +21 -0
  187. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -0
  188. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
  189. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
  190. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +26 -0
  191. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
  192. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts +18 -0
  193. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts.map +1 -0
  194. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
  195. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  196. package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts +7 -0
  197. package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts.map +1 -0
  198. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts +10 -0
  199. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
  200. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
  201. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
  202. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
  203. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
  204. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDevider.d.ts +3 -0
  205. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDevider.d.ts.map +1 -0
  206. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
  207. package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
  208. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
  209. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
  210. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
  211. package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
  212. package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
  213. package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
  214. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
  215. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
  216. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
  217. package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
  218. package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts +19 -0
  219. package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
  220. package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts +18 -0
  221. package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
  222. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
  223. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
  224. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
  225. package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
  226. package/dist/typescript/commonjs/features/voice/recording/model/index.d.ts +5 -0
  227. package/dist/typescript/commonjs/features/voice/recording/model/index.d.ts.map +1 -0
  228. package/dist/typescript/commonjs/features/voice/types.d.ts +58 -0
  229. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -0
  230. package/dist/typescript/commonjs/index.d.ts +1 -0
  231. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  232. package/dist/typescript/commonjs/shared/components/PlayButton.d.ts +18 -0
  233. package/dist/typescript/commonjs/shared/components/PlayButton.d.ts.map +1 -0
  234. package/dist/typescript/commonjs/shared/translation/constants.d.ts +102 -0
  235. package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
  236. package/dist/typescript/commonjs/shared/translation/model.d.ts +34 -0
  237. package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
  238. package/dist/typescript/commonjs/types/common.types.d.ts +3 -0
  239. package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
  240. package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
  241. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
  242. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
  243. package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
  244. package/dist/typescript/module/features/chatbot/constants.d.ts +5 -5
  245. package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
  246. package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -1
  247. package/dist/typescript/module/features/voice/constants.d.ts +15 -0
  248. package/dist/typescript/module/features/voice/constants.d.ts.map +1 -0
  249. package/dist/typescript/module/features/voice/helpers.d.ts +46 -0
  250. package/dist/typescript/module/features/voice/helpers.d.ts.map +1 -0
  251. package/dist/typescript/module/features/voice/index.d.ts +13 -0
  252. package/dist/typescript/module/features/voice/index.d.ts.map +1 -0
  253. package/dist/typescript/module/features/voice/model/index.d.ts +11 -0
  254. package/dist/typescript/module/features/voice/model/index.d.ts.map +1 -0
  255. package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts +8 -0
  256. package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
  257. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +15 -0
  258. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  259. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  260. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  261. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
  262. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  263. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  264. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  265. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +21 -0
  266. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -0
  267. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
  268. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
  269. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +26 -0
  270. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
  271. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts +18 -0
  272. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts.map +1 -0
  273. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
  274. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  275. package/dist/typescript/module/features/voice/playing/model/index.d.ts +7 -0
  276. package/dist/typescript/module/features/voice/playing/model/index.d.ts.map +1 -0
  277. package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts +10 -0
  278. package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
  279. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
  280. package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
  281. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
  282. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
  283. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDevider.d.ts +3 -0
  284. package/dist/typescript/module/features/voice/recording/components/VoiceRecordDevider.d.ts.map +1 -0
  285. package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
  286. package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
  287. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
  288. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
  289. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
  290. package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
  291. package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
  292. package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
  293. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
  294. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
  295. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
  296. package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
  297. package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts +19 -0
  298. package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
  299. package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts +18 -0
  300. package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
  301. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
  302. package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
  303. package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
  304. package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
  305. package/dist/typescript/module/features/voice/recording/model/index.d.ts +5 -0
  306. package/dist/typescript/module/features/voice/recording/model/index.d.ts.map +1 -0
  307. package/dist/typescript/module/features/voice/types.d.ts +58 -0
  308. package/dist/typescript/module/features/voice/types.d.ts.map +1 -0
  309. package/dist/typescript/module/index.d.ts +1 -0
  310. package/dist/typescript/module/index.d.ts.map +1 -1
  311. package/dist/typescript/module/shared/components/PlayButton.d.ts +18 -0
  312. package/dist/typescript/module/shared/components/PlayButton.d.ts.map +1 -0
  313. package/dist/typescript/module/shared/translation/constants.d.ts +102 -0
  314. package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
  315. package/dist/typescript/module/shared/translation/model.d.ts +34 -0
  316. package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
  317. package/dist/typescript/module/types/common.types.d.ts +3 -0
  318. package/dist/typescript/module/types/common.types.d.ts.map +1 -1
  319. package/package.json +11 -4
  320. package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -1
  321. package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +1 -1
  322. package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +9 -51
  323. package/src/features/chatbot/constants.ts +4 -4
  324. package/src/features/gifCelebrations/helpers.ts +1 -0
  325. package/src/features/voice/constants.ts +14 -0
  326. package/src/features/voice/helpers.ts +254 -0
  327. package/src/features/voice/index.ts +17 -0
  328. package/src/features/voice/model/index.ts +13 -0
  329. package/src/features/voice/playing/components/VoiceIcon.tsx +38 -0
  330. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +239 -0
  331. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +127 -0
  332. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts +54 -0
  333. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
  334. package/src/features/voice/playing/model/Player.model.ts +92 -0
  335. package/src/features/voice/playing/model/VoicePlayer.model.ts +282 -0
  336. package/src/features/voice/playing/model/VoiceTranscriptionsCollection.ts +53 -0
  337. package/src/features/voice/playing/model/VoiceTranscriptionsDownloader.model.ts +43 -0
  338. package/src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts +12 -0
  339. package/src/features/voice/playing/model/index.ts +6 -0
  340. package/src/features/voice/recording/components/VoiceRecord.tsx +65 -0
  341. package/src/features/voice/recording/components/VoiceRecordButton.tsx +63 -0
  342. package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +25 -0
  343. package/src/features/voice/recording/components/VoiceRecordDevider.tsx +17 -0
  344. package/src/features/voice/recording/components/VoiceRecordTimer.tsx +49 -0
  345. package/src/features/voice/recording/hooks/useVoiceRecorder.ts +62 -0
  346. package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +19 -0
  347. package/src/features/voice/recording/modal/ModalFooterButtons.tsx +54 -0
  348. package/src/features/voice/recording/modal/VoiceRecordDeleteModal.tsx +82 -0
  349. package/src/features/voice/recording/modal/VoiceRecordUndoModal.tsx +50 -0
  350. package/src/features/voice/recording/model/Recorder.model.ts +62 -0
  351. package/src/features/voice/recording/model/Uploader.model.ts +48 -0
  352. package/src/features/voice/recording/model/VoiceRecord.model.ts +278 -0
  353. package/src/features/voice/recording/model/VoiceRecordCollection.ts +26 -0
  354. package/src/features/voice/recording/model/index.ts +4 -0
  355. package/src/features/voice/types.ts +69 -0
  356. package/src/index.ts +1 -0
  357. package/src/shared/components/PlayButton.tsx +84 -0
  358. package/src/shared/translation/localization/ca.json +17 -0
  359. package/src/shared/translation/localization/de.json +17 -0
  360. package/src/shared/translation/localization/en.json +17 -0
  361. package/src/shared/translation/localization/gb.json +17 -0
  362. package/src/shared/translation/localization/sct.json +17 -0
  363. package/src/shared/translation/localization/sw.json +17 -0
  364. package/src/types/common.types.ts +1 -0
  365. package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  366. package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
  367. package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
@@ -0,0 +1,87 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.PlayerState = exports.PlayerModel = void 0;
7
+ var _effector = require("effector");
8
+ var _expoAudio = require("expo-audio");
9
+ let PlayerState = exports.PlayerState = /*#__PURE__*/function (PlayerState) {
10
+ PlayerState["PLAYING"] = "playing";
11
+ PlayerState["PAUSED"] = "paused";
12
+ PlayerState["LOADING"] = "loading";
13
+ PlayerState["IDLE"] = "idle";
14
+ return PlayerState;
15
+ }({});
16
+ class PlayerModel {
17
+ player = (0, _expoAudio.createAudioPlayer)();
18
+ reset = (0, _effector.createEvent)();
19
+ setPlayerState = (0, _effector.createEvent)();
20
+ playbackFinished = (0, _effector.createEvent)();
21
+ $playerState = (0, _effector.restore)(this.setPlayerState, PlayerState.IDLE).reset(this.reset);
22
+ pause = (0, _effector.createEffect)(() => {
23
+ if (this.player) {
24
+ this.player.pause();
25
+ this.setPlayerState(PlayerState.PAUSED);
26
+ } else {
27
+ console.warn('Cannot pause: audio player not initialized');
28
+ }
29
+ });
30
+ stop = (0, _effector.createEffect)(() => {
31
+ if (this.player) {
32
+ this.player.replace('');
33
+ this.setPlayerState(PlayerState.IDLE);
34
+ } else {
35
+ console.warn('Cannot stop: audio player not initialized');
36
+ }
37
+ });
38
+ resume = (0, _effector.createEffect)(() => {
39
+ if (this.player) {
40
+ this.player.play();
41
+ this.setPlayerState(PlayerState.PLAYING);
42
+ } else {
43
+ console.warn('Cannot resume: audio player not initialized');
44
+ }
45
+ });
46
+ play = (0, _effector.createEffect)(async uri => {
47
+ if (!this.player) {
48
+ console.warn('Audio player not initialized');
49
+ return;
50
+ }
51
+ this.player.replace(uri);
52
+ const waitForLoad = () => {
53
+ if (this.player && this.player.isLoaded) {
54
+ const unsubscribe = this.player.addListener('playbackStatusUpdate', status => {
55
+ if (status.didJustFinish) {
56
+ this.playbackFinished();
57
+ unsubscribe?.remove?.();
58
+ this.setPlayerState(PlayerState.IDLE);
59
+ }
60
+ });
61
+ this.player.play();
62
+ this.setPlayerState(PlayerState.PLAYING);
63
+ } else {
64
+ setTimeout(waitForLoad, 10);
65
+ }
66
+ };
67
+ waitForLoad();
68
+ });
69
+ reinitialize() {
70
+ if (!this.player) {
71
+ this.player = (0, _expoAudio.createAudioPlayer)();
72
+ }
73
+ }
74
+ release() {
75
+ if (this.player) {
76
+ try {
77
+ this.stop();
78
+ this.player.remove();
79
+ } catch (error) {}
80
+ this.player.release();
81
+ this.player = null;
82
+ }
83
+ this.reset();
84
+ }
85
+ }
86
+ exports.PlayerModel = PlayerModel;
87
+ //# sourceMappingURL=Player.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effector","require","_expoAudio","PlayerState","exports","PlayerModel","player","createAudioPlayer","reset","createEvent","setPlayerState","playbackFinished","$playerState","restore","IDLE","pause","createEffect","PAUSED","console","warn","stop","replace","resume","play","PLAYING","uri","waitForLoad","isLoaded","unsubscribe","addListener","status","didJustFinish","remove","setTimeout","reinitialize","release","error"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/Player.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAA2D,IAE/CE,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAOhB,MAAME,WAAW,CAAC;EAChBC,MAAM,GAAuB,IAAAC,4BAAiB,EAAC,CAAC;EAEvCC,KAAK,GAAG,IAAAC,qBAAW,EAAC,CAAC;EACrBC,cAAc,GAAG,IAAAD,qBAAW,EAAc,CAAC;EAC3CE,gBAAgB,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAEhCG,YAAY,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,cAAc,EAAEP,WAAW,CAACW,IAAI,CAAC,CAACN,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EAE/EO,KAAK,GAAG,IAAAC,sBAAY,EAAC,MAAM;IACzC,IAAI,IAAI,CAACV,MAAM,EAAE;MACf,IAAI,CAACA,MAAM,CAACS,KAAK,CAAC,CAAC;MACnB,IAAI,CAACL,cAAc,CAACP,WAAW,CAACc,MAAM,CAAC;IACzC,CAAC,MAAM;MACLC,OAAO,CAACC,IAAI,CAAC,4CAA4C,CAAC;IAC5D;EACF,CAAC,CAAC;EAEcC,IAAI,GAAG,IAAAJ,sBAAY,EAAC,MAAM;IACxC,IAAI,IAAI,CAACV,MAAM,EAAE;MACf,IAAI,CAACA,MAAM,CAACe,OAAO,CAAC,EAAE,CAAC;MACvB,IAAI,CAACX,cAAc,CAACP,WAAW,CAACW,IAAI,CAAC;IACvC,CAAC,MAAM;MACLI,OAAO,CAACC,IAAI,CAAC,2CAA2C,CAAC;IAC3D;EACF,CAAC,CAAC;EAEcG,MAAM,GAAG,IAAAN,sBAAY,EAAC,M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CAAA,EAAG;IACf,IAAI,IAAI,CAAC7B,MAAM,EAAE;MACf,IAAI;QACF,IAAI,CAACc,IAAI,CAAC,CAAC;QACX,IAAI,CAACd,MAAM,CAAC0B,MAAM,CAAC,CAAC;MACtB,CAAC,CAAC,OAAOI,KAAK,EAAE,CAAC;MACjB,IAAI,CAAC9B,MAAM,CAAC6B,OAAO,CAAC,CAAC;MACrB,IAAI,CAAC7B,MAAM,GAAG,IAAI;IACpB;IACA,IAAI,CAACE,KAAK,CAAC,CAAC;EACd;AACF;AAACJ,OAAA,CAAAC,WAAA,GAAAA,WAAA","ignoreList":[]}
@@ -0,0 +1,244 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "PlayerState", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _PlayerModel.PlayerState;
10
+ }
11
+ });
12
+ exports.VoicePlayerModel = void 0;
13
+ var _effector = require("effector");
14
+ var _VoiceTranscriptionsCollection = require("./VoiceTranscriptionsCollection.js");
15
+ var _VoiceTranscriptionsDownloaderModel = require("./VoiceTranscriptionsDownloader.model.js");
16
+ var _VoiceTranscriptionsDropdownModel = require("./VoiceTranscriptionsDropdown.model.js");
17
+ var _PlayerModel = require("./Player.model.js");
18
+ var _constants = require("../../constants.js");
19
+ class VoicePlayerModel {
20
+ collection = new _VoiceTranscriptionsCollection.VoiceTranscriptionsCollection();
21
+ downloader = new _VoiceTranscriptionsDownloaderModel.VoiceTranscriptionsDownloaderModel();
22
+ dropdown = new _VoiceTranscriptionsDropdownModel.VoiceTranscriptionsDropdownModel();
23
+ playerModel = new _PlayerModel.PlayerModel();
24
+ currentPlayingAttempt = null;
25
+ setCurrentAttempt = (0, _effector.createEvent)();
26
+ setTranscriptsLoaded = (0, _effector.createEvent)();
27
+ reset = (0, _effector.createEvent)();
28
+ $currentAttempt = (0, _effector.restore)(this.setCurrentAttempt, null).reset(this.reset);
29
+ $transcriptsLoaded = (0, _effector.restore)(this.setTranscriptsLoaded, false).reset(this.reset);
30
+ $playerState = this.playerModel.$playerState;
31
+ pauseAudio = this.playerModel.pause;
32
+ stopAudio = (0, _effector.createEffect)(() => {
33
+ this.playerModel.stop();
34
+ this.currentPlayingAttempt = null;
35
+ this.setCurrentAttempt(null);
36
+ });
37
+ constructor(params) {
38
+ this.api = params.api;
39
+ this.downloader.setApi(params.api);
40
+ this.playerModel.playbackFinished.watch(() => {
41
+ this.currentPlayingAttempt = null;
42
+ this.setCurrentAttempt(null);
43
+ });
44
+ if (params.audios) {
45
+ this.initializeCollectionFromAudios(params.audios);
46
+ }
47
+ }
48
+ initializeWithAudios(answerAudio) {
49
+ this.setTranscriptsLoaded(false);
50
+ this.collection.clear();
51
+ this.initializeCollectionFromAudios(answerAudio);
52
+ }
53
+ initializeCollectionFromAudios(audios) {
54
+ if (!audios) {
55
+ console.warn('VoicePlayerModel: audios is not provided');
56
+ return;
57
+ }
58
+ audios.forEach((audio, index) => {
59
+ const attemptNumber = index + 1;
60
+ if (!audio.audioFileId) {
61
+ console.warn('VoicePlayerModel: audioFileId is missing for audio', audio);
62
+ return;
63
+ }
64
+ this.collection.add(attemptNumber, {
65
+ attemptNumber,
66
+ audioFileId: audio.audioFileId,
67
+ _id: audio._id,
68
+ hasDrawing: !!audio.drawing
69
+ });
70
+ });
71
+ }
72
+ async fetchTranscriptWithRetry(audioFileId) {
73
+ for (let attempt = 0; attempt < _constants.TRANSCRIPT_MAX_RETRIES; attempt++) {
74
+ const response = await this.api.getAudioFileTranscript(audioFileId);
75
+ if (response.status === 'completed') {
76
+ return response.text;
77
+ }
78
+ if (response.status === 'failed') {
79
+ return _constants.NO_AUDIO_BE_MESSAGE;
80
+ }
81
+ if (attempt < _constants.TRANSCRIPT_MAX_RETRIES - 1) {
82
+ await new Promise(resolve => setTimeout(resolve, _constants.TRANSCRIPT_RETRY_INTERVAL_MS));
83
+ }
84
+ }
85
+ return _constants.NO_AUDIO_BE_MESSAGE;
86
+ }
87
+ loadAllTranscripts = (0, _effector.createEffect)(async () => {
88
+ const attempts = this.collection.getAll();
89
+ const transcriptPromises = attempts.map(async item => {
90
+ if (this.collection.hasTranscript(item.attemptNumber)) {
91
+ return;
92
+ }
93
+ this.collection.update(item.attemptNumber, {
94
+ transcriptLoading: true
95
+ });
96
+ try {
97
+ const text = await this.fetchTranscriptWithRetry(item.audioFileId);
98
+ this.collection.update(item.attemptNumber, {
99
+ transcript: text,
100
+ transcriptLoading: false,
101
+ transcriptError: undefined
102
+ });
103
+ } catch (error) {
104
+ this.collection.update(item.attemptNumber, {
105
+ transcriptLoading: false,
106
+ transcriptError: error instanceof Error ? error.message : 'Failed to load transcript'
107
+ });
108
+ }
109
+ });
110
+ await Promise.all(transcriptPromises);
111
+ this.setTranscriptsLoaded(true);
112
+ });
113
+ handlePlayAttempt = (0, _effector.createEffect)(async attemptNumber => {
114
+ const item = this.collection.get(attemptNumber);
115
+ if (!item) return;
116
+ if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
117
+ const previousItem = this.collection.get(this.currentPlayingAttempt);
118
+ if (previousItem?.controller && previousItem?.audioLoading) {
119
+ this.downloader.abortDownload(previousItem.controller);
120
+ this.collection.update(this.currentPlayingAttempt, {
121
+ audioLoading: false,
122
+ controller: undefined,
123
+ audioDownloadPromise: undefined
124
+ });
125
+ }
126
+ }
127
+ if (this.collection.hasAudio(attemptNumber)) {
128
+ this.playAudioFx(attemptNumber);
129
+ return;
130
+ }
131
+ try {
132
+ this.playerModel.setPlayerState(_PlayerModel.PlayerState.LOADING);
133
+ const {
134
+ collectionItem,
135
+ downloadPromise
136
+ } = await this.downloader.download({
137
+ audioFileId: item.audioFileId,
138
+ attemptNumber
139
+ });
140
+ this.collection.update(attemptNumber, collectionItem);
141
+ const result = await downloadPromise;
142
+ this.collection.update(attemptNumber, {
143
+ audioUri: result.uri,
144
+ audioLoading: false,
145
+ audioError: undefined,
146
+ controller: undefined,
147
+ audioDownloadPromise: undefined
148
+ });
149
+ this.playerModel.setPlayerState(_PlayerModel.PlayerState.IDLE);
150
+ this.playAudioFx(attemptNumber);
151
+ } catch (error) {
152
+ console.error('Audio download error:', error);
153
+ if (error instanceof Error && error.name === 'AbortError') {
154
+ return;
155
+ }
156
+ this.collection.update(attemptNumber, {
157
+ audioLoading: false,
158
+ audioError: error instanceof Error ? error.message : 'Failed to download audio',
159
+ controller: undefined,
160
+ audioDownloadPromise: undefined
161
+ });
162
+ }
163
+ });
164
+ playAudioFx = (0, _effector.createEffect)(async attemptNumber => {
165
+ const item = this.collection.get(attemptNumber);
166
+ if (!item?.audioUri) {
167
+ console.warn('No audio URI available for attempt:', attemptNumber);
168
+ return;
169
+ }
170
+ try {
171
+ if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
172
+ this.playerModel.player?.remove();
173
+ }
174
+ if (this.currentPlayingAttempt === attemptNumber && this.playerModel.player?.playing) {
175
+ this.playerModel.pause();
176
+ return;
177
+ }
178
+ if (this.currentPlayingAttempt === attemptNumber && !this.playerModel.player?.playing) {
179
+ this.playerModel.resume();
180
+ return;
181
+ }
182
+ this.currentPlayingAttempt = attemptNumber;
183
+ this.setCurrentAttempt(attemptNumber);
184
+ await this.playerModel.play(item.audioUri);
185
+ } catch (error) {
186
+ console.error('Error playing audio:', error);
187
+ this.playerModel.setPlayerState(_PlayerModel.PlayerState.IDLE);
188
+ this.collection.update(attemptNumber, {
189
+ audioError: error instanceof Error ? error.message : 'Failed to play audio'
190
+ });
191
+ }
192
+ });
193
+ getTranscript(attemptNumber) {
194
+ return this.collection.get(attemptNumber)?.transcript;
195
+ }
196
+ isTranscriptLoading(attemptNumber) {
197
+ return this.collection.get(attemptNumber)?.transcriptLoading || false;
198
+ }
199
+ isAudioLoading(attemptNumber) {
200
+ return this.collection.get(attemptNumber)?.audioLoading || false;
201
+ }
202
+ getAllAttempts() {
203
+ return this.collection.getAll();
204
+ }
205
+ reinitializePlayer() {
206
+ this.playerModel.reinitialize();
207
+ }
208
+ cleanup() {
209
+ this.collection.getAll().forEach(item => {
210
+ if (item.audioUri && item.audioUri.startsWith('blob:')) {
211
+ try {
212
+ URL.revokeObjectURL(item.audioUri);
213
+ } catch (e) {}
214
+ }
215
+ if (item.controller) {
216
+ this.downloader.abortDownload(item.controller);
217
+ }
218
+ });
219
+ this.collection.clear();
220
+ this.currentPlayingAttempt = null;
221
+ this.reset();
222
+ this.dropdown.reset();
223
+ this.playerModel.release();
224
+ }
225
+ togglePlayPause = (0, _effector.attach)({
226
+ source: this.playerModel.$playerState,
227
+ mapParams: (attemptNumber, playerState) => ({
228
+ attemptNumber,
229
+ playerState
230
+ }),
231
+ effect: (0, _effector.createEffect)(({
232
+ attemptNumber,
233
+ playerState
234
+ }) => {
235
+ if (this.currentPlayingAttempt === attemptNumber && playerState === _PlayerModel.PlayerState.PLAYING) {
236
+ this.pauseAudio();
237
+ } else {
238
+ this.handlePlayAttempt(attemptNumber);
239
+ }
240
+ })
241
+ });
242
+ }
243
+ exports.VoicePlayerModel = VoicePlayerModel;
244
+ //# sourceMappingURL=VoicePlayer.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effector","require","_VoiceTranscriptionsCollection","_VoiceTranscriptionsDownloaderModel","_VoiceTranscriptionsDropdownModel","_PlayerModel","_constants","VoicePlayerModel","collection","VoiceTranscriptionsCollection","downloader","VoiceTranscriptionsDownloaderModel","dropdown","VoiceTranscriptionsDropdownModel","playerModel","PlayerModel","currentPlayingAttempt","setCurrentAttempt","createEvent","setTranscriptsLoaded","reset","$currentAttempt","restore","$transcriptsLoaded","$playerState","pauseAudio","pause","stopAudio","createEffect","stop","constructor","params","api","setApi","playbackFinished","watch","audios","initializeCollectionFromAudios","initializeWithAudios","answerAudio","clear","console","warn","forEach","audio","index","attemptNumber","audioFileId","add","_id","hasDrawing","drawing","fetchTranscriptWithRetry","attempt","TRANSCRIPT_MAX_RETRIES","response","getAudioFileTranscript","status","text","NO_AUDIO_BE_MESSAGE","Promise","resolve","setTimeout","TRANSCRIPT_RETRY_INTERVAL_MS","loadAllTranscripts","attempts","getAll","transcriptPromises","map","item","hasTranscript","update","transcriptLoading","transcript","transcriptError","undefined","error","Error","message","all","handlePlayAttempt","get","previousItem","controller","audioLoading","abortDownload","audioDownloadPromise","hasAudio","playAudioFx","setPlayerState","PlayerState","LOADING","collectionItem","downloadPromise","download","result","audioUri","uri","audioError","IDLE","name","player","remove","playing","resume","play","getTranscript","isTranscriptLoading","isAudioLoading","getAllAttempts","reinitializePlayer","reinitialize","cleanup","startsWith","URL","revokeObjectURL","e","release","togglePlayPause","attach","source","mapParams","playerState","effect","PLAYING","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoicePlayer.model.ts"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,8BAAA,GAAAD,OAAA;AAIA,IAAAE,mCAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAiBO,MAAMM,gBAAgB,CAAC;EACZC,UAAU,GAAG,IAAIC,4DAA6B,CAAC,CAAC;EAChDC,UAAU,GAAG,IAAIC,sEAAkC,CAAC,CAAC;EACrDC,QAAQ,GAAG,IAAIC,kEAAgC,CAAC,CAAC;EACjDC,WAAW,GAAG,IAAIC,wBAAW,CAAC,CAAC;EAEvCC,qBAAqB,GAAkB,IAAI;EAEnCC,iBAAiB,GAAG,IAAAC,qBAAW,EAAgB,CAAC;EAChDC,oBAAoB,GAAG,IAAAD,qBAAW,EAAU,CAAC;EAC7CE,KAAK,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAErBG,eAAe,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACL,iBAAiB,EAAE,IAAI,CAAC,CAACG,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EACzEG,kBAAkB,GAAG,IAAAD,iBAAO,EAAC,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AC2E,aAAa,CAAChB,IAAI,CAACc,UAAU,CAAC;MAChD;IACF,CAAC,CAAC;IAEF,IAAI,CAAC3E,UAAU,CAACgC,KAAK,CAAC,CAAC;IACvB,IAAI,CAACxB,qBAAqB,GAAG,IAAI;IACjC,IAAI,CAACI,KAAK,CAAC,CAAC;IACZ,IAAI,CAACR,QAAQ,CAACQ,KAAK,CAAC,CAAC;IACrB,IAAI,CAACN,WAAW,CAACuG,OAAO,CAAC,CAAC;EAC5B;EAEOC,eAAe,GAAG,IAAAC,gBAAM,EAAC;IAC9BC,MAAM,EAAE,IAAI,CAAC1G,WAAW,CAACU,YAAY;IACrCiG,SAAS,EAAEA,CAAC3E,aAAqB,EAAE4E,WAAW,MAAM;MAAE5E,aAAa;MAAE4E;IAAY,CAAC,CAAC;IACnFC,MAAM,EAAE,IAAA/F,sBAAY,EAAC,CAAC;MAAEkB,aAAa;MAAE4E;IAAmC,CAAC,KAAK;MAC9E,IAAI,IAAI,CAAC1G,qBAAqB,KAAK8B,aAAa,IAAI4E,WAAW,KAAKhC,wBAAW,CAACkC,OAAO,EAAE;QACvF,IAAI,CAACnG,UAAU,CAAC,CAAC;MACnB,CAAC,MAAM;QACL,IAAI,CAACuD,iBAAiB,CAAClC,aAAa,CAAC;MACvC;IACF,CAAC;EACH,CAAC,CAAC;AACJ;AAAC+E,OAAA,CAAAtH,gBAAA,GAAAA,gBAAA","ignoreList":[]}
@@ -0,0 +1,41 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceTranscriptionsCollection = void 0;
7
+ class VoiceTranscriptionsCollection {
8
+ collection = new Map();
9
+ add(attemptNumber, item) {
10
+ this.collection.set(attemptNumber, item);
11
+ }
12
+ update(attemptNumber, item) {
13
+ const existingItem = this.collection.get(attemptNumber) || {};
14
+ this.collection.set(attemptNumber, {
15
+ ...existingItem,
16
+ ...item
17
+ });
18
+ }
19
+ delete(attemptNumber) {
20
+ this.collection.delete(attemptNumber);
21
+ }
22
+ get(attemptNumber) {
23
+ return this.collection.get(attemptNumber);
24
+ }
25
+ getAll() {
26
+ return Array.from(this.collection.values());
27
+ }
28
+ clear() {
29
+ this.collection.clear();
30
+ }
31
+ hasTranscript(attemptNumber) {
32
+ const item = this.collection.get(attemptNumber);
33
+ return !!item?.transcript;
34
+ }
35
+ hasAudio(attemptNumber) {
36
+ const item = this.collection.get(attemptNumber);
37
+ return !!item?.audioUri;
38
+ }
39
+ }
40
+ exports.VoiceTranscriptionsCollection = VoiceTranscriptionsCollection;
41
+ //# sourceMappingURL=VoiceTranscriptionsCollection.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["VoiceTranscriptionsCollection","collection","Map","add","attemptNumber","item","set","update","existingItem","get","delete","getAll","Array","from","values","clear","hasTranscript","transcript","hasAudio","audioUri","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsCollection.ts"],"mappings":";;;;;;AAeO,MAAMA,6BAA6B,CAAC;EACzBC,UAAU,GAAwC,IAAIC,GAAG,CAAC,CAAC;EAEpEC,GAAGA,CAACC,aAAqB,EAAEC,IAA4B,EAAE;IAC9D,IAAI,CAACJ,UAAU,CAACK,GAAG,CAACF,aAAa,EAAEC,IAAI,CAAC;EAC1C;EAEOE,MAAMA,CAACH,aAAqB,EAAEC,IAAqC,EAAE;IAC1E,MAAMG,YAAY,GAAG,IAAI,CAACP,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC,IAAK,CAAC,CAA4B;IACzF,IAAI,CAACH,UAAU,CAACK,GAAG,CAACF,aAAa,EAAE;MAAE,GAAGI,YAAY;MAAE,GAAGH;IAAK,CAAC,CAAC;EAClE;EAEOK,MAAMA,CAACN,aAAqB,EAAE;IACnC,IAAI,CAACH,UAAU,CAACS,MAAM,CAACN,aAAa,CAAC;EACvC;EAEOK,GAAGA,CAACL,aAAqB,EAAE;IAChC,OAAO,IAAI,CAACH,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC;EAC3C;EAEOO,MAAMA,CAAA,EAAG;IACd,OAAOC,KAAK,CAACC,IAAI,CAAC,IAAI,CAACZ,UAAU,CAACa,MAAM,CAAC,CAAC,CAAC;EAC7C;EAEOC,KAAKA,CAAA,EAAG;IACb,IAAI,CAACd,UAAU,CAACc,KAAK,CAAC,CAAC;EACzB;EAEOC,aAAaA,CAACZ,aAAqB,EAAE;IAC1C,MAAMC,IAAI,GAAG,IAAI,CAACJ,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC;IAC/C,OAAO,CAAC,CAACC,IAAI,EAAEY,UAAU;EAC3B;EAEOC,QAAQA,CAACd,aAAqB,EAAE;IACrC,MAAMC,IAAI,GAAG,IAAI,CAACJ,UAAU,CAACQ,GAAG,CAACL,aAAa,CAAC;IAC/C,OAAO,CAAC,CAACC,IAAI,EAAEc,QAAQ;EACzB;AACF;AAACC,OAAA,CAAApB,6BAAA,GAAAA,6BAAA","ignoreList":[]}
@@ -0,0 +1,39 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceTranscriptionsDownloaderModel = void 0;
7
+ var _effector = require("effector");
8
+ var _helpers = require("../../helpers.js");
9
+ class VoiceTranscriptionsDownloaderModel {
10
+ setApi = api => {
11
+ this.api = api;
12
+ };
13
+ download = (0, _effector.createEffect)(async ({
14
+ audioFileId,
15
+ attemptNumber
16
+ }) => {
17
+ const {
18
+ downloadAudio,
19
+ controller
20
+ } = (0, _helpers.downloadAudioFileRequestGenerator)(audioFileId, this.api);
21
+ const downloadPromise = downloadAudio();
22
+ const collectionItem = {
23
+ attemptNumber,
24
+ audioFileId,
25
+ audioLoading: true,
26
+ audioDownloadPromise: downloadPromise,
27
+ controller
28
+ };
29
+ return {
30
+ collectionItem,
31
+ downloadPromise
32
+ };
33
+ });
34
+ abortDownload = controller => {
35
+ controller?.abort();
36
+ };
37
+ }
38
+ exports.VoiceTranscriptionsDownloaderModel = VoiceTranscriptionsDownloaderModel;
39
+ //# sourceMappingURL=VoiceTranscriptionsDownloader.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effector","require","_helpers","VoiceTranscriptionsDownloaderModel","setApi","api","download","createEffect","audioFileId","attemptNumber","downloadAudio","controller","downloadAudioFileRequestGenerator","downloadPromise","collectionItem","audioLoading","audioDownloadPromise","abortDownload","abort","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsDownloader.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAGA,IAAAC,QAAA,GAAAD,OAAA;AAYO,MAAME,kCAAkC,CAAC;EAG9BC,MAAM,GAAIC,GAAmB,IAAK;IAChD,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB,CAAC;EAEeC,QAAQ,GAAG,IAAAC,sBAAY,EACrC,OAAO;IAAEC,WAAW;IAAEC;EAA8B,CAAC,KAA8B;IACjF,MAAM;MAAEC,aAAa;MAAEC;IAAW,CAAC,GAAG,IAAAC,0CAAiC,EAACJ,WAAW,EAAE,IAAI,CAACH,GAAG,CAAC;IAC9F,MAAMQ,eAAe,GAAGH,aAAa,CAAC,CAAC;IAEvC,MAAMI,cAA+C,GAAG;MACtDL,aAAa;MACbD,WAAW;MACXO,YAAY,EAAE,IAAI;MAClBC,oBAAoB,EAAEH,eAAe;MACrCF;IACF,CAAC;IAED,OAAO;MAAEG,cAAc;MAAED;IAAgB,CAAC;EAC5C,CACF,CAAC;EAEeI,aAAa,GAAIN,UAA4B,IAAK;IAChEA,UAAU,EAAEO,KAAK,CAAC,CAAC;EACrB,CAAC;AACH;AAACC,OAAA,CAAAhB,kCAAA,GAAAA,kCAAA","ignoreList":[]}
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceTranscriptionsDropdownModel = void 0;
7
+ var _effector = require("effector");
8
+ class VoiceTranscriptionsDropdownModel {
9
+ toggleExpand = (0, _effector.createEvent)();
10
+ setExpanded = (0, _effector.createEvent)();
11
+ reset = (0, _effector.createEvent)();
12
+ $isExpanded = (0, _effector.createStore)(false).on(this.setExpanded, (_, value) => value).on(this.toggleExpand, state => !state).reset(this.reset);
13
+ }
14
+ exports.VoiceTranscriptionsDropdownModel = VoiceTranscriptionsDropdownModel;
15
+ //# sourceMappingURL=VoiceTranscriptionsDropdown.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effector","require","VoiceTranscriptionsDropdownModel","toggleExpand","createEvent","setExpanded","reset","$isExpanded","createStore","on","_","value","state","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEO,MAAMC,gCAAgC,CAAC;EAC5BC,YAAY,GAAG,IAAAC,qBAAW,EAAC,CAAC;EAC5BC,WAAW,GAAG,IAAAD,qBAAW,EAAU,CAAC;EACpCE,KAAK,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAErBG,WAAW,GAAG,IAAAC,qBAAW,EAAC,KAAK,CAAC,CAC7CC,EAAE,CAAC,IAAI,CAACJ,WAAW,EAAE,CAACK,CAAC,EAAEC,KAAK,KAAKA,KAAK,CAAC,CACzCF,EAAE,CAAC,IAAI,CAACN,YAAY,EAAGS,KAAK,IAAK,CAACA,KAAK,CAAC,CACxCN,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;AACtB;AAACO,OAAA,CAAAX,gCAAA,GAAAA,gCAAA","ignoreList":[]}
@@ -0,0 +1,47 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "PlayerModel", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _PlayerModel.PlayerModel;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "PlayerState", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _PlayerModel.PlayerState;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "VoicePlayerModel", {
19
+ enumerable: true,
20
+ get: function () {
21
+ return _VoicePlayerModel.VoicePlayerModel;
22
+ }
23
+ });
24
+ Object.defineProperty(exports, "VoiceTranscriptionsCollection", {
25
+ enumerable: true,
26
+ get: function () {
27
+ return _VoiceTranscriptionsCollection.VoiceTranscriptionsCollection;
28
+ }
29
+ });
30
+ Object.defineProperty(exports, "VoiceTranscriptionsDownloaderModel", {
31
+ enumerable: true,
32
+ get: function () {
33
+ return _VoiceTranscriptionsDownloaderModel.VoiceTranscriptionsDownloaderModel;
34
+ }
35
+ });
36
+ Object.defineProperty(exports, "VoiceTranscriptionsDropdownModel", {
37
+ enumerable: true,
38
+ get: function () {
39
+ return _VoiceTranscriptionsDropdownModel.VoiceTranscriptionsDropdownModel;
40
+ }
41
+ });
42
+ var _VoicePlayerModel = require("./VoicePlayer.model.js");
43
+ var _PlayerModel = require("./Player.model.js");
44
+ var _VoiceTranscriptionsCollection = require("./VoiceTranscriptionsCollection.js");
45
+ var _VoiceTranscriptionsDownloaderModel = require("./VoiceTranscriptionsDownloader.model.js");
46
+ var _VoiceTranscriptionsDropdownModel = require("./VoiceTranscriptionsDropdown.model.js");
47
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_VoicePlayerModel","require","_PlayerModel","_VoiceTranscriptionsCollection","_VoiceTranscriptionsDownloaderModel","_VoiceTranscriptionsDropdownModel"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,8BAAA,GAAAF,OAAA;AAEA,IAAAG,mCAAA,GAAAH,OAAA;AACA,IAAAI,iCAAA,GAAAJ,OAAA","ignoreList":[]}
@@ -0,0 +1,74 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceRecord = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _VoiceRecordButton = require("./VoiceRecordButton.js");
9
+ var _react = _interopRequireWildcard(require("react"));
10
+ var _reactNativeUi = require("@magmamath/react-native-ui");
11
+ var _VoiceRecordDeleteButton = require("./VoiceRecordDeleteButton.js");
12
+ var _VoiceRecordDevider = require("./VoiceRecordDevider.js");
13
+ var _VoiceRecordTimer = require("./VoiceRecordTimer.js");
14
+ var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
15
+ var _useVoiceRecorder = require("../hooks/useVoiceRecorder.js");
16
+ var _useVoiceRecorderAnimation = require("../hooks/useVoiceRecorderAnimation.js");
17
+ var _effectorReact = require("effector-react");
18
+ var _jsxRuntime = require("react/jsx-runtime");
19
+ 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); }
20
+ 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; }
21
+ const VoiceRecord = ({
22
+ style,
23
+ model
24
+ }) => {
25
+ const {
26
+ recorderState
27
+ } = (0, _useVoiceRecorder.useVoiceRecorder)(model);
28
+ const [isExpanded, isDisabled] = (0, _effectorReact.useUnit)([model.$isExpanded, model.$isButtonDisabled]);
29
+ const {
30
+ containerAnimatedStyle
31
+ } = (0, _useVoiceRecorderAnimation.useVoiceRecorderAnimation)(isExpanded);
32
+ (0, _react.useEffect)(() => {
33
+ return () => {
34
+ model.cleanup();
35
+ };
36
+ }, [model]);
37
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
38
+ style: [styles.container, style, containerAnimatedStyle],
39
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordButton.VoiceRecordButton, {
40
+ model: model
41
+ }), isExpanded && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
42
+ entering: _reactNativeReanimated.FadeIn,
43
+ exiting: _reactNativeReanimated.FadeOut,
44
+ style: styles.expendedContainer,
45
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordTimer.VoiceRecordTimer, {
46
+ style: styles.timer,
47
+ model: model,
48
+ recordingFileDurationMs: recorderState.durationMillis
49
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordDevider.VoiceRecordDevider, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordDeleteButton.VoiceRecordDeleteButton, {
50
+ isDisabled: isDisabled,
51
+ onPress: model.events.deleteRecord
52
+ })]
53
+ })]
54
+ });
55
+ };
56
+ exports.VoiceRecord = VoiceRecord;
57
+ const styles = _reactNative.StyleSheet.create({
58
+ container: {
59
+ alignItems: 'center',
60
+ padding: 3,
61
+ paddingBottom: 6,
62
+ backgroundColor: _reactNativeUi.COLORS.NEUTRAL_3,
63
+ borderRadius: 32,
64
+ boxShadow: '0 1px 3px 0 rgba(51, 51, 51, 0.10), 0 0 1px 0 rgba(51, 51, 51, 0.40)',
65
+ overflow: 'hidden'
66
+ },
67
+ timer: {
68
+ marginTop: _reactNativeUi.SPACING[400]
69
+ },
70
+ expendedContainer: {
71
+ alignItems: 'center'
72
+ }
73
+ });
74
+ //# sourceMappingURL=VoiceRecord.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_VoiceRecordButton","_react","_interopRequireWildcard","_reactNativeUi","_VoiceRecordDeleteButton","_VoiceRecordDevider","_VoiceRecordTimer","_reactNativeReanimated","_useVoiceRecorder","_useVoiceRecorderAnimation","_effectorReact","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VoiceRecord","style","model","recorderState","useVoiceRecorder","isExpanded","isDisabled","useUnit","$isExpanded","$isButtonDisabled","containerAnimatedStyle","useVoiceRecorderAnimation","useEffect","cleanup","jsxs","View","styles","container","children","jsx","VoiceRecordButton","entering","FadeIn","exiting","FadeOut","expendedContainer","VoiceRecordTimer","timer","recordingFileDurationMs","durationMillis","VoiceRecordDevider","VoiceRecordDeleteButton","onPress","events","deleteRecord","exports","StyleSheet","create","alignItems","padding","paddingBottom","backgroundColor","COLORS","NEUTRAL_3","borderRadius","boxShadow","overflow","marginTop","SPACING"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceRecord.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,wBAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAL,uBAAA,CAAAH,OAAA;AAEA,IAAAS,iBAAA,GAAAT,OAAA;AACA,IAAAU,0BAAA,GAAAV,OAAA;AACA,IAAAW,cAAA,GAAAX,OAAA;AAAwC,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAa,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;A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