@magmamath/students-features 1.3.23-rc.2 → 1.3.23-rc.21

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 (306) hide show
  1. package/dist/commonjs/features/translation/constants.js +11 -0
  2. package/dist/commonjs/features/translation/constants.js.map +1 -0
  3. package/dist/commonjs/features/translation/helpers.js +60 -0
  4. package/dist/commonjs/features/translation/helpers.js.map +1 -0
  5. package/dist/commonjs/features/translation/index.js +105 -0
  6. package/dist/commonjs/features/translation/index.js.map +1 -0
  7. package/dist/commonjs/features/translation/model/TranslationModel.js +122 -0
  8. package/dist/commonjs/features/translation/model/TranslationModel.js.map +1 -0
  9. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js +142 -0
  10. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js.map +1 -0
  11. package/dist/commonjs/features/translation/model/TranslationService.js +112 -0
  12. package/dist/commonjs/features/translation/model/TranslationService.js.map +1 -0
  13. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js +314 -0
  14. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js.map +1 -0
  15. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js +50 -0
  16. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js.map +1 -0
  17. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js +230 -0
  18. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js.map +1 -0
  19. package/dist/commonjs/features/translation/providers/google.types.js +2 -0
  20. package/dist/commonjs/features/translation/providers/google.types.js.map +1 -0
  21. package/dist/commonjs/features/translation/providers/translation.interface.js +49 -0
  22. package/dist/commonjs/features/translation/providers/translation.interface.js.map +1 -0
  23. package/dist/commonjs/features/translation/types.js +2 -0
  24. package/dist/commonjs/features/translation/types.js.map +1 -0
  25. package/dist/commonjs/features/voice/index.js +4 -4
  26. package/dist/commonjs/features/voice/index.js.map +1 -1
  27. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js +44 -0
  28. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -0
  29. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +107 -0
  30. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +1 -0
  31. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +66 -0
  32. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -0
  33. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +58 -0
  34. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -0
  35. package/dist/commonjs/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.js → useDropdownAnimation.js} +8 -7
  36. package/dist/commonjs/features/voice/playing/hooks/useDropdownAnimation.js.map +1 -0
  37. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js +128 -0
  38. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +1 -0
  39. package/dist/commonjs/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.js → Dropdown.model.js} +4 -4
  40. package/dist/commonjs/features/voice/playing/model/Dropdown.model.js.map +1 -0
  41. package/dist/commonjs/features/voice/playing/model/PlaybackController.js +183 -0
  42. package/dist/commonjs/features/voice/playing/model/PlaybackController.js.map +1 -0
  43. package/dist/commonjs/features/voice/playing/model/Player.model.js +24 -1
  44. package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -1
  45. package/dist/commonjs/features/voice/playing/model/{VoiceTranscriptionsCollection.js → TranscriptionsCollection.js} +4 -4
  46. package/dist/commonjs/features/voice/playing/model/TranscriptionsCollection.js.map +1 -0
  47. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js +82 -0
  48. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -0
  49. package/dist/commonjs/features/voice/playing/model/Translation.model.js +62 -0
  50. package/dist/commonjs/features/voice/playing/model/Translation.model.js.map +1 -0
  51. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
  52. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
  53. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +46 -172
  54. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  55. package/dist/commonjs/features/voice/types.js.map +1 -1
  56. package/dist/commonjs/index.js +12 -0
  57. package/dist/commonjs/index.js.map +1 -1
  58. package/dist/module/features/translation/constants.js +7 -0
  59. package/dist/module/features/translation/constants.js.map +1 -0
  60. package/dist/module/features/translation/helpers.js +53 -0
  61. package/dist/module/features/translation/helpers.js.map +1 -0
  62. package/dist/module/features/translation/index.js +12 -0
  63. package/dist/module/features/translation/index.js.map +1 -0
  64. package/dist/module/features/translation/model/TranslationModel.js +117 -0
  65. package/dist/module/features/translation/model/TranslationModel.js.map +1 -0
  66. package/dist/module/features/translation/model/TranslationPreprocessor.js +137 -0
  67. package/dist/module/features/translation/model/TranslationPreprocessor.js.map +1 -0
  68. package/dist/module/features/translation/model/TranslationService.js +107 -0
  69. package/dist/module/features/translation/model/TranslationService.js.map +1 -0
  70. package/dist/module/features/translation/preserve/wordsToPreserve.js +310 -0
  71. package/dist/module/features/translation/preserve/wordsToPreserve.js.map +1 -0
  72. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js +45 -0
  73. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js.map +1 -0
  74. package/dist/module/features/translation/providers/google/supportedLanguages.js +225 -0
  75. package/dist/module/features/translation/providers/google/supportedLanguages.js.map +1 -0
  76. package/dist/module/features/translation/providers/google.types.js +2 -0
  77. package/dist/module/features/translation/providers/google.types.js.map +1 -0
  78. package/dist/module/features/translation/providers/translation.interface.js +44 -0
  79. package/dist/module/features/translation/providers/translation.interface.js.map +1 -0
  80. package/dist/module/features/translation/types.js +2 -0
  81. package/dist/module/features/translation/types.js.map +1 -0
  82. package/dist/module/features/voice/index.js +1 -1
  83. package/dist/module/features/voice/index.js.map +1 -1
  84. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js +38 -0
  85. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -0
  86. package/dist/module/features/voice/playing/components/VoiceTranscription.js +101 -0
  87. package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +1 -0
  88. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +58 -0
  89. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -0
  90. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +52 -0
  91. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -0
  92. package/dist/module/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.js → useDropdownAnimation.js} +6 -5
  93. package/dist/module/features/voice/playing/hooks/useDropdownAnimation.js.map +1 -0
  94. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js +123 -0
  95. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +1 -0
  96. package/dist/module/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.js → Dropdown.model.js} +2 -2
  97. package/dist/module/features/voice/playing/model/Dropdown.model.js.map +1 -0
  98. package/dist/module/features/voice/playing/model/PlaybackController.js +178 -0
  99. package/dist/module/features/voice/playing/model/PlaybackController.js.map +1 -0
  100. package/dist/module/features/voice/playing/model/Player.model.js +24 -1
  101. package/dist/module/features/voice/playing/model/Player.model.js.map +1 -1
  102. package/dist/module/features/voice/playing/model/{VoiceTranscriptionsCollection.js → TranscriptionsCollection.js} +2 -2
  103. package/dist/module/features/voice/playing/model/TranscriptionsCollection.js.map +1 -0
  104. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js +77 -0
  105. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -0
  106. package/dist/module/features/voice/playing/model/Translation.model.js +57 -0
  107. package/dist/module/features/voice/playing/model/Translation.model.js.map +1 -0
  108. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
  109. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
  110. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +48 -174
  111. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  112. package/dist/module/features/voice/types.js.map +1 -1
  113. package/dist/module/index.js +1 -0
  114. package/dist/module/index.js.map +1 -1
  115. package/dist/typescript/commonjs/features/translation/constants.d.ts +5 -0
  116. package/dist/typescript/commonjs/features/translation/constants.d.ts.map +1 -0
  117. package/dist/typescript/commonjs/features/translation/helpers.d.ts +9 -0
  118. package/dist/typescript/commonjs/features/translation/helpers.d.ts.map +1 -0
  119. package/dist/typescript/commonjs/features/translation/index.d.ts +12 -0
  120. package/dist/typescript/commonjs/features/translation/index.d.ts.map +1 -0
  121. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts +33 -0
  122. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts.map +1 -0
  123. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts +34 -0
  124. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts.map +1 -0
  125. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts +40 -0
  126. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts.map +1 -0
  127. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts +3 -0
  128. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts.map +1 -0
  129. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts +17 -0
  130. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +1 -0
  131. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts +209 -0
  132. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts.map +1 -0
  133. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts +15 -0
  134. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts.map +1 -0
  135. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts +30 -0
  136. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts.map +1 -0
  137. package/dist/typescript/commonjs/features/translation/types.d.ts +27 -0
  138. package/dist/typescript/commonjs/features/translation/types.d.ts.map +1 -0
  139. package/dist/typescript/commonjs/features/voice/index.d.ts +2 -1
  140. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
  141. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts +8 -0
  142. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -0
  143. package/dist/typescript/{module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts → commonjs/features/voice/playing/components/VoiceTranscription.d.ts} +3 -4
  144. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -0
  145. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +10 -0
  146. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -0
  147. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +12 -0
  148. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -0
  149. package/dist/typescript/{module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts → commonjs/features/voice/playing/hooks/useDropdownAnimation.d.ts} +3 -3
  150. package/dist/typescript/commonjs/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +1 -0
  151. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +30 -0
  152. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +1 -0
  153. package/dist/typescript/{module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts → commonjs/features/voice/playing/model/Dropdown.model.d.ts} +2 -2
  154. package/dist/typescript/commonjs/features/voice/playing/model/Dropdown.model.d.ts.map +1 -0
  155. package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts +28 -0
  156. package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts.map +1 -0
  157. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +3 -0
  158. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -1
  159. package/dist/typescript/{module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts → commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts} +2 -2
  160. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts.map +1 -0
  161. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +19 -0
  162. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -0
  163. package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts +25 -0
  164. package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts.map +1 -0
  165. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
  166. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +18 -18
  168. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  169. package/dist/typescript/commonjs/features/voice/types.d.ts +5 -1
  170. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  171. package/dist/typescript/commonjs/index.d.ts +1 -0
  172. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  173. package/dist/typescript/module/features/translation/constants.d.ts +5 -0
  174. package/dist/typescript/module/features/translation/constants.d.ts.map +1 -0
  175. package/dist/typescript/module/features/translation/helpers.d.ts +9 -0
  176. package/dist/typescript/module/features/translation/helpers.d.ts.map +1 -0
  177. package/dist/typescript/module/features/translation/index.d.ts +12 -0
  178. package/dist/typescript/module/features/translation/index.d.ts.map +1 -0
  179. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts +33 -0
  180. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts.map +1 -0
  181. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts +34 -0
  182. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts.map +1 -0
  183. package/dist/typescript/module/features/translation/model/TranslationService.d.ts +40 -0
  184. package/dist/typescript/module/features/translation/model/TranslationService.d.ts.map +1 -0
  185. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts +3 -0
  186. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts.map +1 -0
  187. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts +17 -0
  188. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +1 -0
  189. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts +209 -0
  190. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts.map +1 -0
  191. package/dist/typescript/module/features/translation/providers/google.types.d.ts +15 -0
  192. package/dist/typescript/module/features/translation/providers/google.types.d.ts.map +1 -0
  193. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts +30 -0
  194. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts.map +1 -0
  195. package/dist/typescript/module/features/translation/types.d.ts +27 -0
  196. package/dist/typescript/module/features/translation/types.d.ts.map +1 -0
  197. package/dist/typescript/module/features/voice/index.d.ts +2 -1
  198. package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
  199. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts +8 -0
  200. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -0
  201. package/dist/typescript/{commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts → module/features/voice/playing/components/VoiceTranscription.d.ts} +3 -4
  202. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -0
  203. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +10 -0
  204. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -0
  205. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +12 -0
  206. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -0
  207. package/dist/typescript/{commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts → module/features/voice/playing/hooks/useDropdownAnimation.d.ts} +3 -3
  208. package/dist/typescript/module/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +1 -0
  209. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +30 -0
  210. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +1 -0
  211. package/dist/typescript/{commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts → module/features/voice/playing/model/Dropdown.model.d.ts} +2 -2
  212. package/dist/typescript/module/features/voice/playing/model/Dropdown.model.d.ts.map +1 -0
  213. package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts +28 -0
  214. package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts.map +1 -0
  215. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +3 -0
  216. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -1
  217. package/dist/typescript/{commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts → module/features/voice/playing/model/TranscriptionsCollection.d.ts} +2 -2
  218. package/dist/typescript/module/features/voice/playing/model/TranscriptionsCollection.d.ts.map +1 -0
  219. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +19 -0
  220. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -0
  221. package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts +25 -0
  222. package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts.map +1 -0
  223. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
  224. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
  225. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +18 -18
  226. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  227. package/dist/typescript/module/features/voice/types.d.ts +5 -1
  228. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  229. package/dist/typescript/module/index.d.ts +1 -0
  230. package/dist/typescript/module/index.d.ts.map +1 -1
  231. package/package.json +28 -1
  232. package/src/features/translation/constants.ts +4 -0
  233. package/src/features/translation/helpers.ts +63 -0
  234. package/src/features/translation/index.ts +30 -0
  235. package/src/features/translation/model/TranslationModel.ts +174 -0
  236. package/src/features/translation/model/TranslationPreprocessor.ts +171 -0
  237. package/src/features/translation/model/TranslationService.ts +148 -0
  238. package/src/features/translation/preserve/wordsToPreserve.ts +87 -0
  239. package/src/features/translation/providers/google/GoogleTranslationProvider.ts +50 -0
  240. package/src/features/translation/providers/google/supportedLanguages.ts +229 -0
  241. package/src/features/translation/providers/google.types.ts +16 -0
  242. package/src/features/translation/providers/translation.interface.ts +63 -0
  243. package/src/features/translation/types.ts +30 -0
  244. package/src/features/voice/index.ts +2 -1
  245. package/src/features/voice/playing/components/VoiceTranscriptContent.tsx +37 -0
  246. package/src/features/voice/playing/components/VoiceTranscription.tsx +117 -0
  247. package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +59 -0
  248. package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +61 -0
  249. package/src/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.ts → useDropdownAnimation.ts} +5 -5
  250. package/src/features/voice/playing/hooks/useVoiceTranscriptionController.ts +171 -0
  251. package/src/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.ts → Dropdown.model.ts} +2 -2
  252. package/src/features/voice/playing/model/PlaybackController.ts +213 -0
  253. package/src/features/voice/playing/model/Player.model.ts +26 -1
  254. package/src/features/voice/playing/model/{VoiceTranscriptionsCollection.ts → TranscriptionsCollection.ts} +1 -1
  255. package/src/features/voice/playing/model/TranscriptionsDownloader.model.ts +88 -0
  256. package/src/features/voice/playing/model/Translation.model.ts +75 -0
  257. package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +2 -2
  258. package/src/features/voice/playing/model/VoicePlayer.model.ts +57 -194
  259. package/src/features/voice/types.ts +10 -0
  260. package/src/index.ts +1 -0
  261. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +0 -251
  262. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +0 -1
  263. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +0 -109
  264. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +0 -1
  265. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +0 -1
  266. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +0 -34
  267. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +0 -1
  268. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +0 -66
  269. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +0 -1
  270. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +0 -1
  271. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +0 -1
  272. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +0 -244
  273. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +0 -1
  274. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +0 -103
  275. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +0 -1
  276. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +0 -1
  277. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +0 -29
  278. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +0 -1
  279. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +0 -61
  280. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +0 -1
  281. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +0 -1
  282. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +0 -1
  283. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +0 -1
  284. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +0 -12
  285. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +0 -1
  286. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +0 -1
  287. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +0 -11
  288. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +0 -1
  289. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -15
  290. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +0 -1
  291. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +0 -1
  292. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +0 -1
  293. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +0 -1
  294. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +0 -12
  295. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +0 -1
  296. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +0 -1
  297. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +0 -11
  298. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +0 -1
  299. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -15
  300. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +0 -1
  301. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +0 -1
  302. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +0 -1
  303. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +0 -302
  304. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +0 -128
  305. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +0 -40
  306. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +0 -80
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_helpers","require","TranslationProvider","glossaries","constructor","supportedLanguages","Set","isTargetSupported","language","resolveLanguage","has","base","split","getSupportedLanguages","values","applyGlossary","text","targetLanguage","glossary","replaceMappedTokens","exports"],"sourceRoot":"../../../../../src","sources":["features/translation/providers/translation.interface.ts"],"mappings":";;;;;;AAAA,IAAAA,QAAA,GAAAC,OAAA;AAWO,MAAeC,mBAAmB,CAAC;EAErBC,UAAU,GAAqB,CAAC,CAAC;EAE1CC,WAAWA,CAAC;IAAEC,kBAAkB;IAAEF,UAAU,GAAG,CAAC;EAA4B,CAAC,EAAE;IACvF,IAAI,CAACE,kBAAkB,GAAG,IAAIC,GAAG,CAACD,kBAAkB,CAAC;IACrD,IAAI,CAACF,UAAU,GAAGA,UAAU;EAC9B;EAaOI,iBAAiBA,CAACC,QAAgB,EAAE;IACzC,OAAO,IAAI,CAACC,eAAe,CAACD,QAAQ,CAAC,KAAK,IAAI;EAChD;;EAEA;AACF;AACA;AACA;AACA;AACA;EACSC,eAAeA,CAACD,QAAgB,EAAiB;IACtD,IAAI,CAACA,QAAQ,EAAE,OAAO,IAAI;IAC1B,IAAI,IAAI,CAACH,kBAAkB,CAACK,GAAG,CAACF,QAAQ,CAAC,EAAE,OAAOA,QAAQ;IAC1D,MAAMG,IAAI,GAAGH,QAAQ,CAACI,KAAK,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;IACnC,IAAID,IAAI,KAAKH,QAAQ,IAAI,IAAI,CAACH,kBAAkB,CAACK,GAAG,CAACC,IAAI,CAAC,EAAE,OAAOA,IAAI;IACvE,OAAO,IAAI;EACb;EAEOE,qBAAqBA,CAAA,EAAG;IAC7B,OAAO,IAAI,CAACR,kBAAkB,CAACS,MAAM,CAAC,CAAC;EACzC;;EAEA;AACF;AACA;AACA;EACSC,aAAaA,CAACC,IAAY,EAAEC,cAAsB,EAAU;IACjE,MAAMC,QAAQ,GAAG,IAAI,CAACf,UAAU,CAACc,cAAc,CAAC;IAChD,IAAI,CAACC,QAAQ,EAAE,OAAOF,IAAI;IAC1B,OAAO,IAAAG,4BAAmB,EAACH,IAAI,EAAEE,QAAQ,CAAC;EAC5C;AACF;AAACE,OAAA,CAAAlB,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../../src","sources":["features/translation/types.ts"],"mappings":"","ignoreList":[]}
@@ -58,14 +58,14 @@ Object.keys(_VoicePlayerModel).forEach(function (key) {
58
58
  }
59
59
  });
60
60
  });
61
- var _VoiceTranscriptionsDropdown = require("./playing/components/VoiceTranscriptionsDropdown.js");
62
- Object.keys(_VoiceTranscriptionsDropdown).forEach(function (key) {
61
+ var _VoiceTranscription = require("./playing/components/VoiceTranscription.js");
62
+ Object.keys(_VoiceTranscription).forEach(function (key) {
63
63
  if (key === "default" || key === "__esModule") return;
64
- if (key in exports && exports[key] === _VoiceTranscriptionsDropdown[key]) return;
64
+ if (key in exports && exports[key] === _VoiceTranscription[key]) return;
65
65
  Object.defineProperty(exports, key, {
66
66
  enumerable: true,
67
67
  get: function () {
68
- return _VoiceTranscriptionsDropdown[key];
68
+ return _VoiceTranscription[key];
69
69
  }
70
70
  });
71
71
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_VoiceRecord","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_VoiceRecordModel","_VoiceRecordDeleteModal","_VoiceRecordUndoModal","_VoicePlayerModel","_VoiceTranscriptionsDropdown","_VoiceIcon","_constants","_types"],"sourceRoot":"../../../../src","sources":["features/voice/index.ts"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,iBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,iBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,iBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAA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CAAAZ,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAQ,MAAA,CAAAZ,GAAA;IAAA;EAAA;AAAA","ignoreList":[]}
1
+ {"version":3,"names":["_VoiceRecord","require","Object","keys","forEach","key","exports","defineProperty","enumerable","get","_VoiceRecordModel","_VoiceRecordDeleteModal","_VoiceRecordUndoModal","_VoicePlayerModel","_VoiceTranscription","_VoiceIcon","_constants","_types"],"sourceRoot":"../../../../src","sources":["features/voice/index.ts"],"mappings":";;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,YAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAL,YAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAT,YAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAK,iBAAA,GAAAT,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAO,iBAAA,EAAAN,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAA,GAAA,IAAAC,OAAA,IAAAA,OAAA,CAAAD,GAAA,MAAAK,iBAAA,CAAAL,GAAA;EAAAH,MAAA,CAAAK,cAAA,CAAAD,OAAA,EAAAD,GAAA;IAAAG,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,iBAAA,CAAAL,GAAA;IAAA;EAAA;AAAA;AACA,IAAAM,uBAAA,GAAAV,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAQ,uBAAA,EAAAP,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,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
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceTranscriptContent = void 0;
7
+ var _reactNativeUi = require("@magmamath/react-native-ui");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactNative = require("react-native");
10
+ var _jsxRuntime = require("react/jsx-runtime");
11
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
12
+ const VoiceTranscriptContent = ({
13
+ text,
14
+ isLoading
15
+ }) => {
16
+ if (isLoading) {
17
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
18
+ style: styles.loaderContainer,
19
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Loader, {
20
+ size: _reactNativeUi.LoaderSize.SMALL,
21
+ color: _reactNativeUi.LoaderColor.BLUE
22
+ })
23
+ });
24
+ }
25
+ return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
26
+ variant: "h8",
27
+ style: styles.text,
28
+ children: text
29
+ });
30
+ };
31
+ exports.VoiceTranscriptContent = VoiceTranscriptContent;
32
+ const styles = _reactNative.StyleSheet.create({
33
+ text: {
34
+ color: _reactNativeUi.COLORS.NEUTRAL_7,
35
+ paddingHorizontal: 8,
36
+ paddingVertical: 8
37
+ },
38
+ loaderContainer: {
39
+ justifyContent: 'center',
40
+ alignItems: 'center',
41
+ paddingVertical: 8
42
+ }
43
+ });
44
+ //# sourceMappingURL=VoiceTranscriptContent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeUi","require","_react","_interopRequireDefault","_reactNative","_jsxRuntime","e","__esModule","default","VoiceTranscriptContent","text","isLoading","jsx","View","style","styles","loaderContainer","children","Loader","size","LoaderSize","SMALL","color","LoaderColor","BLUE","Typography","variant","exports","StyleSheet","create","COLORS","NEUTRAL_7","paddingHorizontal","paddingVertical","justifyContent","alignItems"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptContent.tsx"],"m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{
4
+ value: true
5
+ });
6
+ exports.VoiceTranscription = void 0;
7
+ var _reactNativeUi = require("@magmamath/react-native-ui");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactNative = require("react-native");
10
+ var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
11
+ var _types = require("../../types.js");
12
+ var _i18n = require("../../../../i18n/i18n.js");
13
+ var _useVoiceTranscriptionController = require("../hooks/useVoiceTranscriptionController.js");
14
+ var _VoiceTranscriptContent = require("./VoiceTranscriptContent.js");
15
+ var _VoiceTranscriptionCollapsible = require("./VoiceTranscriptionCollapsible.js");
16
+ var _VoiceTranscriptionHeaderActions = require("./VoiceTranscriptionHeaderActions.js");
17
+ var _jsxRuntime = require("react/jsx-runtime");
18
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
+ const VoiceTranscription = ({
20
+ style,
21
+ model,
22
+ answers,
23
+ attemptOffset,
24
+ attemptsCount,
25
+ problemId,
26
+ variant = _types.VoiceTranscriptionVariant.SMALL
27
+ }) => {
28
+ const t = (0, _i18n.useText)();
29
+ const {
30
+ display,
31
+ flags,
32
+ actions
33
+ } = (0, _useVoiceTranscriptionController.useVoiceTranscriptionController)({
34
+ model,
35
+ answers,
36
+ attemptOffset,
37
+ attemptsCount,
38
+ problemId
39
+ });
40
+ const isLargeVariant = variant === _types.VoiceTranscriptionVariant.LARGE;
41
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
42
+ style: [styles.container, isLargeVariant ? styles.largeContainer : styles.smallContainer, style],
43
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
44
+ style: styles.header,
45
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
46
+ style: styles.title,
47
+ variant: "h7",
48
+ children: t('voice.transcriptions')
49
+ }), flags.anyAttemptHasAudio && /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptionHeaderActions.VoiceTranscriptionHeaderActions, {
50
+ playerState: flags.playerState,
51
+ isTranslationActive: flags.isTranslationActive,
52
+ canTranslate: flags.canTranslate,
53
+ onPlayPress: actions.onPlayPress,
54
+ onTranslationPress: actions.onTranslationToggle
55
+ })]
56
+ }), isLargeVariant ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptContent.VoiceTranscriptContent, {
57
+ text: display.text,
58
+ isLoading: display.isLoading
59
+ }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptionCollapsible.VoiceTranscriptionCollapsible, {
60
+ text: display.text,
61
+ isLoading: display.isLoading,
62
+ dropdown: model.dropdown
63
+ })]
64
+ });
65
+ };
66
+ exports.VoiceTranscription = VoiceTranscription;
67
+ const styles = _reactNative.StyleSheet.create({
68
+ container: {
69
+ padding: 4,
70
+ boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
71
+ borderRadius: 12,
72
+ backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
73
+ overflow: 'hidden'
74
+ },
75
+ // SMALL: floats over the drawing area; consumer-positioned siblings sit
76
+ // beneath it. Absolute positioning is intentional here.
77
+ smallContainer: {
78
+ position: 'absolute',
79
+ top: 56,
80
+ left: _reactNativeUi.SPACING[200],
81
+ width: 222,
82
+ maxHeight: 405,
83
+ minHeight: 51
84
+ },
85
+ // LARGE: rendered as a flex child of the SolutionCard's column flow,
86
+ // between the header and footer. Auto-sizes to whatever space the footer
87
+ // (with or without the playable timeline) leaves — no magic numbers.
88
+ largeContainer: {
89
+ flex: 1,
90
+ marginHorizontal: _reactNativeUi.SPACING[200],
91
+ marginTop: _reactNativeUi.SPACING[200],
92
+ marginBottom: _reactNativeUi.SPACING[200]
93
+ },
94
+ header: {
95
+ flexDirection: 'row',
96
+ justifyContent: 'space-between',
97
+ alignItems: 'center',
98
+ padding: 4,
99
+ marginBottom: 4,
100
+ height: 32
101
+ },
102
+ title: {
103
+ color: _reactNativeUi.COLORS.NEUTRAL_9,
104
+ marginLeft: 4
105
+ }
106
+ });
107
+ //# sourceMappingURL=VoiceTranscription.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeUi","require","_react","_interopRequireDefault","_reactNative","_reactNativeReanimated","_types","_i18n","_useVoiceTranscriptionController","_VoiceTranscriptContent","_VoiceTranscriptionCollapsible","_VoiceTranscriptionHeaderActions","_jsxRuntime","e","__esModule","default","VoiceTranscription","style","model","answers","attemptOffset","attemptsCount","problemId","variant","VoiceTranscriptionVariant","SMALL","t","useText","display","flags","actions","useVoiceTranscriptionController","isLargeVariant","LARGE","jsxs","View","styles","container","largeContainer","smallContainer","children","header","jsx","Typography","title","anyAttemptHasAudio","VoiceTranscriptionHeaderActions","playerState","isTranslationActive","canTranslate","onPlayPress","onTranslationPress","onTranslationToggle","VoiceTranscriptContent","text","isLoading","VoiceTranscriptionCollapsible","dropdown","exports","StyleSheet","create","padding","boxShadow","borderRadius","backgroundColor","COLORS","NEUTRAL_1","overflow","position","top","left","SPACING","width","maxHeight","minHeight","flex","marginHorizontal","marginTop","marginBottom","flexDirection","justifyContent","alignItems","height","color","NEUTRAL_9","marginLeft"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscription.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAF,sBAAA,CAAAF,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AACA,IAAAO,gCAAA,GAAAP,OAAA;AAEA,IAAAQ,uBAAA,GAAAR,OAAA;AACA,IAAAS,8BAAA,GAAAT,OAAA;AACA,IAAAU,gCAAA,GAAAV,OAAA;AAAmF,IAAAW,WAAA,GAAAX,OAAA;AAAA,SAAAE,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA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a,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBpB,OAAO,EAAE,CAAC;IACViB,YAAY,EAAE,CAAC;IACfI,MAAM,EAAE;EACV,CAAC;EACDtC,KAAK,EAAE;IACLuC,KAAK,EAAElB,qBAAM,CAACmB,SAAS;IACvBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,66 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceTranscriptionCollapsible = void 0;
7
+ var _reactNativeUi = require("@magmamath/react-native-ui");
8
+ var _react = _interopRequireWildcard(require("react"));
9
+ var _reactNative = require("react-native");
10
+ var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
11
+ var _useDropdownAnimation = require("../hooks/useDropdownAnimation.js");
12
+ var _VoiceTranscriptContent = require("./VoiceTranscriptContent.js");
13
+ var _jsxRuntime = require("react/jsx-runtime");
14
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
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 AnimatedTouchableOpacity = _reactNativeReanimated.default.createAnimatedComponent(_reactNative.TouchableOpacity);
18
+ const VoiceTranscriptionCollapsible = ({
19
+ text,
20
+ isLoading,
21
+ dropdown
22
+ }) => {
23
+ const {
24
+ listAnimatedStyle,
25
+ iconAnimatedStyle,
26
+ onListLayout
27
+ } = (0, _useDropdownAnimation.useDropdownAnimation)(dropdown);
28
+ const handleToggle = (0, _react.useCallback)(() => {
29
+ dropdown.toggleExpand();
30
+ }, [dropdown]);
31
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
32
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
33
+ style: [listAnimatedStyle, styles.collapsibleContent],
34
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
35
+ onLayout: onListLayout,
36
+ style: styles.transcriptContainer,
37
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptContent.VoiceTranscriptContent, {
38
+ text: text,
39
+ isLoading: isLoading
40
+ })
41
+ })
42
+ }), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedTouchableOpacity, {
43
+ style: [styles.expandButton, iconAnimatedStyle],
44
+ onPress: handleToggle,
45
+ children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CaretDownIcon, {
46
+ size: 22
47
+ })
48
+ })]
49
+ });
50
+ };
51
+ exports.VoiceTranscriptionCollapsible = VoiceTranscriptionCollapsible;
52
+ const styles = _reactNative.StyleSheet.create({
53
+ collapsibleContent: {
54
+ overflow: 'hidden'
55
+ },
56
+ transcriptContainer: {
57
+ position: 'absolute',
58
+ width: '100%',
59
+ paddingHorizontal: 4
60
+ },
61
+ expandButton: {
62
+ justifyContent: 'center',
63
+ alignItems: 'center'
64
+ }
65
+ });
66
+ //# sourceMappingURL=VoiceTranscriptionCollapsible.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeUi","require","_react","_interopRequireWildcard","_reactNative","_reactNativeReanimated","_interopRequireDefault","_useDropdownAnimation","_VoiceTranscriptContent","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AnimatedTouchableOpacity","Animated","createAnimatedComponent","TouchableOpacity","VoiceTranscriptionCollapsible","text","isLoading","dropdown","listAnimatedStyle","iconAnimatedStyle","onListLayout","useDropdownAnimation","handleToggle","useCallback","toggleExpand","jsxs","Fragment","children","jsx","View","style","styles","collapsibleContent","onLayout","transcriptContainer","VoiceTranscriptContent","expandButton","onPress","CaretDownIcon","size","exports","StyleSheet","create","overflow","position","width","paddingHorizontal","justifyContent","alignItems"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionCollapsible.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAEA,IAAAO,uBAAA,GAAAP,OAAA;AAAiE,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAK,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,G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AEa,MAAM,CAACC,kBAAkB,CAAE;MAAAL,QAAA,eACnE,IAAAtC,WAAA,CAAAuC,GAAA,EAAC5C,YAAA,CAAA6C,IAAI;QAACI,QAAQ,EAAEb,YAAa;QAACU,KAAK,EAAEC,MAAM,CAACG,mBAAoB;QAAAP,QAAA,eAC9D,IAAAtC,WAAA,CAAAuC,GAAA,EAACxC,uBAAA,CAAA+C,sBAAsB;UAACpB,IAAI,EAAEA,IAAK;UAACC,SAAS,EAAEA;QAAU,CAAE;MAAC,CACxD;IAAC,CACM,CAAC,eAChB,IAAA3B,WAAA,CAAAuC,GAAA,EAAClB,wBAAwB;MACvBoB,KAAK,EAAE,CAACC,MAAM,CAACK,YAAY,EAAEjB,iBAAiB,CAAE;MAChDkB,OAAO,EAAEf,YAAa;MAAAK,QAAA,eAEtB,IAAAtC,WAAA,CAAAuC,GAAA,EAAChD,cAAA,CAAA0D,aAAa;QAACC,IAAI,EAAE;MAAG,CAAE;IAAC,CACH,CAAC;EAAA,CAC3B,CAAC;AAEP,CAAC;AAAAC,OAAA,CAAA1B,6BAAA,GAAAA,6BAAA;AAED,MAAMiB,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,kBAAkB,EAAE;IAClBW,QAAQ,EAAE;EACZ,CAAC;EACDT,mBAAmB,EAAE;IACnBU,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,iBAAiB,EAAE;EACrB,CAAC;EACDV,YAAY,EAAE;IACZW,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,58 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.VoiceTranscriptionHeaderActions = void 0;
7
+ var _reactNativeUi = require("@magmamath/react-native-ui");
8
+ var _react = _interopRequireDefault(require("react"));
9
+ var _reactNative = require("react-native");
10
+ var _styleTypes = require("../../../chatbot/types/style.types.js");
11
+ var _PlayButton = require("../../../../shared/components/PlayButton.js");
12
+ var _index = require("../model/index.js");
13
+ var _helpers = require("../../helpers.js");
14
+ var _jsxRuntime = require("react/jsx-runtime");
15
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
16
+ const VoiceTranscriptionHeaderActions = ({
17
+ playerState,
18
+ isTranslationActive,
19
+ canTranslate,
20
+ onPlayPress,
21
+ onTranslationPress
22
+ }) => {
23
+ const playButtonState = {
24
+ isActive: playerState !== _index.PlayerState.IDLE,
25
+ isLoading: playerState === _index.PlayerState.LOADING,
26
+ status: (0, _helpers.getAudioStatus)(playerState)
27
+ };
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
29
+ style: styles.container,
30
+ children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayButton.PlayButton, {
31
+ state: playButtonState,
32
+ onPress: onPlayPress,
33
+ activityIndicatorColor: _reactNativeUi.COLORS.NEUTRAL_1,
34
+ colorScheme: _styleTypes.ColorScheme.Yellow
35
+ }), canTranslate && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
36
+ variant: "secondary",
37
+ size: "small",
38
+ colorScheme: _styleTypes.ColorScheme.Yellow,
39
+ isActive: isTranslationActive,
40
+ onPress: onTranslationPress,
41
+ icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.GlobeIcon, {
42
+ color: isTranslationActive ? _reactNativeUi.COLORS.NEUTRAL_1 : _reactNativeUi.COLORS.NEUTRAL_9
43
+ })
44
+ })]
45
+ });
46
+ };
47
+ exports.VoiceTranscriptionHeaderActions = VoiceTranscriptionHeaderActions;
48
+ const styles = _reactNative.StyleSheet.create({
49
+ container: {
50
+ flexDirection: 'row',
51
+ alignItems: 'center',
52
+ gap: _reactNativeUi.SPACING[200]
53
+ },
54
+ hidden: {
55
+ opacity: 0
56
+ }
57
+ });
58
+ //# sourceMappingURL=VoiceTranscriptionHeaderActions.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeUi","require","_react","_interopRequireDefault","_reactNative","_styleTypes","_PlayButton","_index","_helpers","_jsxRuntime","e","__esModule","default","VoiceTranscriptionHeaderActions","playerState","isTranslationActive","canTranslate","onPlayPress","onTranslationPress","playButtonState","isActive","PlayerState","IDLE","isLoading","LOADING","status","getAudioStatus","jsxs","View","style","styles","container","children","jsx","PlayButton","state","onPress","activityIndicatorColor","COLORS","NEUTRAL_1","colorScheme","ColorScheme","Yellow","Button","variant","size","icon","GlobeIcon","color","NEUTRAL_9","exports","StyleSheet","create","flexDirection","alignItems","gap","SPACING","hidden","opacity"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAA8C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAUvC,MAAMG,+BAA+B,GAAGA,CAAC;EAC9CC,WAAW;EACXC,mBAAmB;EACnBC,YAAY;EACZC,WAAW;EACXC;AACqC,CAAC,KAAK;EAC3C,MAAMC,eAAe,GAAG;IACtBC,QAAQ,EAAEN,WAAW,KAAKO,kBAAW,CAACC,IAAI;IAC1CC,SAAS,EAAET,WAAW,KAAKO,kBAAW,CAACG,OAAO;IAC9CC,MAAM,EAAE,IAAAC,uBAAc,EAACZ,WAAW;EACpC,CAAC;EAED,oBACE,IAAAL,WAAA,CAAAkB,IAAA,EAACvB,YAAA,CAAAwB,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5B,IAAAvB,WAAA,CAAAwB,GAAA,EAAC3B,WAAA,CAAA4B,UAAU;MACTC,KAAK,EAAEhB,eAAgB;MACvBiB,OAAO,EAAEnB,WAAY;MACrBoB,sBAAsB,EAAEC,qBAAM,CAACC,SAAU;MACzCC,WAAW,EAAEC,uBAAW,CAACC;IAAO,CACjC,CAAC,EACD1B,YAAY,iBACX,IAAAP,WAAA,CAAAwB,GAAA,EAACjC,cAAA,CAAA2C,MAAM;MACLC,OAAO,EAAC,WAAW;MACnBC,IAAI,EAAC,OAAO;MACZL,WAAW,EAAEC,uBAAW,CAACC,MAAO;MAChCtB,QAAQ,EAAEL,mBAAoB;MAC9BqB,OAAO,EAAElB,kBAAmB;MAC5B4B,IAAI,eAAE,IAAArC,WAAA,CAAAwB,GAAA,EAACjC,cAAA,CAAA+C,SAAS;QAACC,KAAK,EAAEjC,mBAAmB,GAAGuB,qBAAM,CAACC,SAAS,GAAGD,qBAAM,CAACW;MAAU,CAAE;IAAE,CACvF,CACF;EAAA,CACG,CAAC;AAEX,CAAC;AAAAC,OAAA,CAAArC,+BAAA,GAAAA,+BAAA;AAED,MAAMiB,MAAM,GAAGqB,uBAAU,CAACC,MAAM,CAAC;EAC/BrB,SAAS,EAAE;IACTsB,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAEC,sBAAO,CAAC,GAAG;EAClB,CAAC;EACDC,MAAM,EAAE;IACNC,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
@@ -3,20 +3,21 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useVoiceTranscriptionsDropdown = void 0;
6
+ exports.useDropdownAnimation = void 0;
7
7
  var _react = require("react");
8
8
  var _effectorReact = require("effector-react");
9
9
  var _reactNativeReanimated = require("react-native-reanimated");
10
10
  var _constants = require("../../constants.js");
11
- const useVoiceTranscriptionsDropdown = model => {
11
+ const useDropdownAnimation = model => {
12
12
  const isExpanded = (0, _effectorReact.useUnit)(model.$isExpanded);
13
13
  const contentHeight = (0, _reactNativeReanimated.useSharedValue)(0);
14
14
  const animationProgress = (0, _reactNativeReanimated.useSharedValue)(isExpanded ? 1 : 0);
15
15
  const onListLayout = event => {
16
16
  const measuredHeight = event.nativeEvent.layout.height;
17
- if (measuredHeight > 0) {
18
- contentHeight.value = measuredHeight;
19
- }
17
+ if (measuredHeight <= 0) return;
18
+ contentHeight.value = contentHeight.value === 0 ? measuredHeight : (0, _reactNativeReanimated.withTiming)(measuredHeight, {
19
+ duration: 180
20
+ });
20
21
  };
21
22
  const listAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
22
23
  const height = (0, _reactNativeReanimated.interpolate)(animationProgress.value, [0, 1], [0, contentHeight.value || _constants.DROPDOWN_MAX_CONTENT_HEIGHT]);
@@ -46,5 +47,5 @@ const useVoiceTranscriptionsDropdown = model => {
46
47
  onListLayout
47
48
  };
48
49
  };
49
- exports.useVoiceTranscriptionsDropdown = useVoiceTranscriptionsDropdown;
50
- //# sourceMappingURL=useVoiceTranscriptionsDropdown.js.map
50
+ exports.useDropdownAnimation = useDropdownAnimation;
51
+ //# sourceMappingURL=useDropdownAnimation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_effectorReact","_reactNativeReanimated","_constants","useDropdownAnimation","model","isExpanded","useUnit","$isExpanded","contentHeight","useSharedValue","animationProgress","onListLayout","event","measuredHeight","nativeEvent","layout","height","value","withTiming","duration","listAnimatedStyle","useAnimatedStyle","interpolate","DROPDOWN_MAX_CONTENT_HEIGHT","opacity","iconAnimatedStyle","rotation","transform","rotate","useEffect","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useDropdownAnimation.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,G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ACO,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAEvE,OAAO;MACLU,SAAS,EAAE,CAAC;QAAEC,MAAM,EAAE,GAAGF,QAAQ;MAAM,CAAC;IAC1C,CAAC;EACH,CAAC,EAAE,CAAChB,iBAAiB,CAAC,CAAC;EAEvB,IAAAmB,gBAAS,EAAC,MAAM;IACdnB,iBAAiB,CAACO,KAAK,GAAG,IAAAC,iCAAU,EAACb,UAAU,GAAG,CAAC,GAAG,CAAC,EAAE;MAAEc,QAAQ,EAAE;IAAI,CAAC,CAAC;EAC7E,CAAC,EAAE,CAACd,UAAU,EAAEK,iBAAiB,CAAC,CAAC;EAEnC,OAAO;IACLL,UAAU;IACVe,iBAAiB;IACjBK,iBAAiB;IACjBd;EACF,CAAC;AACH,CAAC;AAAAmB,OAAA,CAAA3B,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useVoiceTranscriptionController = void 0;
7
+ var _effectorReact = require("effector-react");
8
+ var _react = require("react");
9
+ var _reactI18next = require("react-i18next");
10
+ var _constants = require("../../constants.js");
11
+ var _helpers = require("../../helpers.js");
12
+ var _supportedLanguages = require("../../../translation/providers/google/supportedLanguages.js");
13
+ var _i18n = require("../../../../i18n/i18n.js");
14
+ const useVoiceTranscriptionController = ({
15
+ model,
16
+ answers,
17
+ attemptOffset,
18
+ attemptsCount,
19
+ problemId
20
+ }) => {
21
+ const t = (0, _i18n.useText)();
22
+ const {
23
+ i18n
24
+ } = (0, _reactI18next.useTranslation)();
25
+ const [playerState, isLoadingTranscripts, isTranslationActive, translations, isTranslating] = (0, _effectorReact.useUnit)([model.$playerState, model.loader.loadTranscriptForAttempt.pending, model.translation.$isActive, model.translation.$translations, model.translation.translate.pending]);
26
+ const activeAttempt = (0, _helpers.getActiveAttempt)(attemptOffset, attemptsCount);
27
+ const answersKey = (0, _react.useMemo)(() => answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(','), [answers]);
28
+ const activeAudioFileId = activeAttempt !== null ? answers?.[activeAttempt - 1]?.audioFileId : undefined;
29
+ const hasActiveAudio = activeAudioFileId !== undefined;
30
+ const anyAttemptHasAudio = (0, _react.useMemo)(() => answers.some(a => !!a.audioFileId), [answers]);
31
+ const cachedEntry = activeAudioFileId ? model.loader.getCachedTranscript(activeAudioFileId) : undefined;
32
+ const activeTranscript = cachedEntry?.text ?? null;
33
+ const hasTranscriptText = !!activeTranscript && activeTranscript !== _constants.NO_AUDIO_BE_MESSAGE;
34
+ const isActiveTranscriptLoading = isLoadingTranscripts && hasActiveAudio && !activeTranscript;
35
+ const isSourceSameAsTarget = !!cachedEntry?.language && (0, _supportedLanguages.resolveGoogleLanguageCode)(cachedEntry.language) === (0, _supportedLanguages.resolveGoogleLanguageCode)(i18n.language);
36
+ const canTranslate = hasTranscriptText && !isSourceSameAsTarget;
37
+ const cachedTranslation = activeAttempt !== null ? translations[activeAttempt] : undefined;
38
+ const showTranslation = isTranslationActive && canTranslate;
39
+ const isTranslationLoading = showTranslation && !cachedTranslation && isTranslating;
40
+ const displayText = showTranslation ? cachedTranslation ?? activeTranscript : hasTranscriptText ? activeTranscript : t('voice.transcriptNotAvailable');
41
+
42
+ // Lifecycle effects
43
+ const answersRef = (0, _react.useRef)(answers);
44
+ answersRef.current = answers;
45
+ (0, _react.useEffect)(() => {
46
+ model.reinitializePlayer();
47
+ return () => {
48
+ model.stopAudio();
49
+ model.dropdown.setExpanded(false);
50
+ };
51
+ }, [model]);
52
+ (0, _react.useEffect)(() => {
53
+ model.dropdown.setExpanded(false);
54
+ model.resetPlayer();
55
+ }, [problemId]);
56
+ (0, _react.useEffect)(() => {
57
+ if (answersRef.current.some(a => a.audioFileId)) {
58
+ model.initializeWithAudios(answersRef.current);
59
+ }
60
+ }, [model, answersKey]);
61
+ (0, _react.useEffect)(() => {
62
+ model.stopAudio();
63
+ model.setCurrentAttempt(activeAttempt);
64
+ if (activeAttempt !== null) {
65
+ model.loader.loadTranscriptForAttempt(activeAttempt);
66
+ }
67
+ }, [model, activeAttempt, answersKey]);
68
+
69
+ // Auto-activate translation once per (problemId, activeAttempt) when translatable
70
+ const autoActivatedAttempts = (0, _react.useRef)(new Set());
71
+ (0, _react.useEffect)(() => {
72
+ autoActivatedAttempts.current.clear();
73
+ }, [problemId]);
74
+ (0, _react.useEffect)(() => {
75
+ if (canTranslate && activeAttempt !== null && !autoActivatedAttempts.current.has(activeAttempt)) {
76
+ autoActivatedAttempts.current.add(activeAttempt);
77
+ model.translation.setActive(true);
78
+ }
79
+ }, [canTranslate, activeAttempt, model]);
80
+
81
+ // Trigger translate when we should show translation but don't have it cached
82
+ (0, _react.useEffect)(() => {
83
+ if (showTranslation && activeAttempt !== null && !cachedTranslation && !isTranslating) {
84
+ model.translation.translate({
85
+ attemptNumber: activeAttempt,
86
+ targetLanguage: i18n.language
87
+ });
88
+ }
89
+ }, [showTranslation, activeAttempt, cachedTranslation, isTranslating, i18n.language, model]);
90
+
91
+ // Auto-open dropdown when a translation successfully completes
92
+ (0, _react.useEffect)(() => {
93
+ return model.translation.translate.doneData.watch(result => {
94
+ if (result) {
95
+ model.dropdown.setExpanded(true);
96
+ }
97
+ });
98
+ }, [model]);
99
+ const onPlayPress = (0, _react.useCallback)(() => {
100
+ if (activeAttempt) {
101
+ model.translation.setActive(false);
102
+ model.togglePlayPause(activeAttempt);
103
+ }
104
+ }, [model, activeAttempt]);
105
+ const onTranslationToggle = (0, _react.useCallback)(() => {
106
+ model.translation.toggle();
107
+ model.dropdown.setExpanded(true);
108
+ }, [model]);
109
+ return {
110
+ display: {
111
+ text: displayText,
112
+ isLoading: isActiveTranscriptLoading || isTranslationLoading
113
+ },
114
+ flags: {
115
+ playerState: playerState,
116
+ hasActiveAudio,
117
+ anyAttemptHasAudio,
118
+ canTranslate,
119
+ isTranslationActive
120
+ },
121
+ actions: {
122
+ onPlayPress,
123
+ onTranslationToggle
124
+ }
125
+ };
126
+ };
127
+ exports.useVoiceTranscriptionController = useVoiceTranscriptionController;
128
+ //# sourceMappingURL=useVoiceTranscriptionController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effectorReact","require","_react","_reactI18next","_constants","_helpers","_supportedLanguages","_i18n","useVoiceTranscriptionController","model","answers","attemptOffset","attemptsCount","problemId","t","useText","i18n","useTranslation","playerState","isLoadingTranscripts","isTranslationActive","translations","isTranslating","useUnit","$playerState","loader","loadTranscriptForAttempt","pending","translation","$isActive","$translations","translate","activeAttempt","getActiveAttempt","answersKey","useMemo","map","a","_id","audioFileId","join","activeAudioFileId","undefined","hasActiveAudio","anyAttemptHasAudio","some","cachedEntry","getCachedTranscript","activeTranscript","text","hasTranscriptText","NO_AUDIO_BE_MESSAGE","isActiveTranscriptLoading","isSourceSameAsTarget","language","resolveGoogleLanguageCode","canTranslate","cachedTranslation","showTranslation","isTranslationLoading","displayText","answersRef","useRef","current","useEffect","reinitializePlayer","stopAudio","dropdown","setExpanded","resetPlayer","initializeWithAudios","setCurrentAttempt","autoActivatedAttempts","Set","clear","has","add","setActive","attemptNumber","targetLanguage","doneData","watch","result","onPlayPress","useCallback","togglePlayPause","onTranslationToggle","toggle","display","isLoading","flags","actions","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionController.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AAcO,MAAMO,+BAA+B,GAAGA,CAAC;EAC9CC,KAAK;EACLC,OAAO;EACPC,aAAa;EACbC,aAAa;EACbC;AACM,CAAC,KA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0B;MACvCyB,cAAc;MACdC,kBAAkB;MAClBY,YAAY;MACZpC;IACF,CAAC;IACDuE,OAAO,EAAE;MACPR,WAAW;MACXG;IACF;EACF,CAAC;AACH,CAAC;AAAAM,OAAA,CAAApF,+BAAA,GAAAA,+BAAA","ignoreList":[]}
@@ -3,13 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.VoiceTranscriptionsDropdownModel = void 0;
6
+ exports.DropdownModel = void 0;
7
7
  var _effector = require("effector");
8
- class VoiceTranscriptionsDropdownModel {
8
+ class DropdownModel {
9
9
  toggleExpand = (0, _effector.createEvent)();
10
10
  setExpanded = (0, _effector.createEvent)();
11
11
  reset = (0, _effector.createEvent)();
12
12
  $isExpanded = (0, _effector.restore)(this.setExpanded, false).on(this.toggleExpand, state => !state).reset(this.reset);
13
13
  }
14
- exports.VoiceTranscriptionsDropdownModel = VoiceTranscriptionsDropdownModel;
15
- //# sourceMappingURL=VoiceTranscriptionsDropdown.model.js.map
14
+ exports.DropdownModel = DropdownModel;
15
+ //# sourceMappingURL=Dropdown.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effector","require","DropdownModel","toggleExpand","createEvent","setExpanded","reset","$isExpanded","restore","on","state","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/Dropdown.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEO,MAAMC,aAAa,CAAC;EACTC,YAAY,GAAG,IAAAC,qBAAW,EAAC,CAAC;EAC5BC,WAAW,GAAG,IAAAD,qBAAW,EAAU,CAAC;EACpCE,KAAK,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAErBG,WAAW,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,WAAW,EAAE,KAAK,CAAC,CAC3DI,EAAE,CAAC,IAAI,CAACN,YAAY,EAAGO,KAAK,IAAK,CAACA,KAAK,CAAC,CACxCJ,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;AACtB;AAACK,OAAA,CAAAT,aAAA,GAAAA,aAAA","ignoreList":[]}