@magmamath/students-features 1.4.6 → 1.5.0-rc.10

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 (412) hide show
  1. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +1 -6
  2. package/dist/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
  3. package/dist/commonjs/features/fluency/components/Fluency.js +6 -12
  4. package/dist/commonjs/features/fluency/components/Fluency.js.map +1 -1
  5. package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js +5 -13
  6. package/dist/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -1
  7. package/dist/commonjs/features/fluency/model/FluencyModel.js +0 -21
  8. package/dist/commonjs/features/fluency/model/FluencyModel.js.map +1 -1
  9. package/dist/commonjs/features/fluency/shared/fluency.constants.js +1 -6
  10. package/dist/commonjs/features/fluency/shared/fluency.constants.js.map +1 -1
  11. package/dist/commonjs/features/fluency/shared/fluency.helpers.js +1 -3
  12. package/dist/commonjs/features/fluency/shared/fluency.helpers.js.map +1 -1
  13. package/dist/commonjs/features/pmProgress/model/PmProgressModel.js +1 -7
  14. package/dist/commonjs/features/pmProgress/model/PmProgressModel.js.map +1 -1
  15. package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js +4 -20
  16. package/dist/commonjs/features/pmProgress/model/PmRecommendationsModel.js.map +1 -1
  17. package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +1 -22
  18. package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
  19. package/dist/commonjs/features/translation/constants.js +11 -0
  20. package/dist/commonjs/features/translation/constants.js.map +1 -0
  21. package/dist/commonjs/features/translation/helpers.js +60 -0
  22. package/dist/commonjs/features/translation/helpers.js.map +1 -0
  23. package/dist/commonjs/features/translation/index.js +105 -0
  24. package/dist/commonjs/features/translation/index.js.map +1 -0
  25. package/dist/commonjs/features/translation/model/TranslationModel.js +122 -0
  26. package/dist/commonjs/features/translation/model/TranslationModel.js.map +1 -0
  27. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js +142 -0
  28. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js.map +1 -0
  29. package/dist/commonjs/features/translation/model/TranslationService.js +112 -0
  30. package/dist/commonjs/features/translation/model/TranslationService.js.map +1 -0
  31. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js +314 -0
  32. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js.map +1 -0
  33. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js +50 -0
  34. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js.map +1 -0
  35. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js +230 -0
  36. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js.map +1 -0
  37. package/dist/commonjs/features/translation/providers/google.types.js +2 -0
  38. package/dist/commonjs/features/translation/providers/google.types.js.map +1 -0
  39. package/dist/commonjs/features/translation/providers/translation.interface.js +49 -0
  40. package/dist/commonjs/features/translation/providers/translation.interface.js.map +1 -0
  41. package/dist/commonjs/features/translation/types.js +2 -0
  42. package/dist/commonjs/features/translation/types.js.map +1 -0
  43. package/dist/commonjs/features/voice/index.js +15 -4
  44. package/dist/commonjs/features/voice/index.js.map +1 -1
  45. package/dist/commonjs/features/voice/playing/components/VoiceIcon.js +1 -1
  46. package/dist/commonjs/features/voice/playing/components/VoiceIcon.js.map +1 -1
  47. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js +44 -0
  48. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -0
  49. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +107 -0
  50. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +1 -0
  51. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +66 -0
  52. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -0
  53. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +58 -0
  54. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -0
  55. package/dist/commonjs/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.js → useDropdownAnimation.js} +8 -7
  56. package/dist/commonjs/features/voice/playing/hooks/useDropdownAnimation.js.map +1 -0
  57. package/dist/commonjs/features/voice/playing/hooks/useVoicePlayerLifecycle.js +53 -0
  58. package/dist/commonjs/features/voice/playing/hooks/useVoicePlayerLifecycle.js.map +1 -0
  59. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js +111 -0
  60. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +1 -0
  61. package/dist/commonjs/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.js → Dropdown.model.js} +4 -4
  62. package/dist/commonjs/features/voice/playing/model/Dropdown.model.js.map +1 -0
  63. package/dist/commonjs/features/voice/playing/model/PlaybackController.js +192 -0
  64. package/dist/commonjs/features/voice/playing/model/PlaybackController.js.map +1 -0
  65. package/dist/commonjs/features/voice/playing/model/Player.model.js +50 -5
  66. package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -1
  67. package/dist/commonjs/features/voice/playing/model/{VoiceTranscriptionsCollection.js → TranscriptionsCollection.js} +4 -4
  68. package/dist/commonjs/features/voice/playing/model/TranscriptionsCollection.js.map +1 -0
  69. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js +83 -0
  70. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -0
  71. package/dist/commonjs/features/voice/playing/model/Translation.model.js +62 -0
  72. package/dist/commonjs/features/voice/playing/model/Translation.model.js.map +1 -0
  73. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
  74. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
  75. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +58 -172
  76. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  77. package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js +1 -1
  78. package/dist/commonjs/features/voice/recording/components/VoiceRecordDivider.js.map +1 -1
  79. package/dist/commonjs/features/voice/types.js +12 -1
  80. package/dist/commonjs/features/voice/types.js.map +1 -1
  81. package/dist/commonjs/index.js +12 -0
  82. package/dist/commonjs/index.js.map +1 -1
  83. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js +2 -7
  84. package/dist/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.js.map +1 -1
  85. package/dist/module/features/fluency/components/Fluency.js +8 -14
  86. package/dist/module/features/fluency/components/Fluency.js.map +1 -1
  87. package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js +5 -13
  88. package/dist/module/features/fluency/components/select-math-operator/SelectMathOperator.js.map +1 -1
  89. package/dist/module/features/fluency/model/FluencyModel.js +1 -22
  90. package/dist/module/features/fluency/model/FluencyModel.js.map +1 -1
  91. package/dist/module/features/fluency/shared/fluency.constants.js +0 -5
  92. package/dist/module/features/fluency/shared/fluency.constants.js.map +1 -1
  93. package/dist/module/features/fluency/shared/fluency.helpers.js +0 -1
  94. package/dist/module/features/fluency/shared/fluency.helpers.js.map +1 -1
  95. package/dist/module/features/pmProgress/model/PmProgressModel.js +1 -7
  96. package/dist/module/features/pmProgress/model/PmProgressModel.js.map +1 -1
  97. package/dist/module/features/pmProgress/model/PmRecommendationsModel.js +4 -20
  98. package/dist/module/features/pmProgress/model/PmRecommendationsModel.js.map +1 -1
  99. package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +0 -20
  100. package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
  101. package/dist/module/features/translation/constants.js +7 -0
  102. package/dist/module/features/translation/constants.js.map +1 -0
  103. package/dist/module/features/translation/helpers.js +53 -0
  104. package/dist/module/features/translation/helpers.js.map +1 -0
  105. package/dist/module/features/translation/index.js +12 -0
  106. package/dist/module/features/translation/index.js.map +1 -0
  107. package/dist/module/features/translation/model/TranslationModel.js +117 -0
  108. package/dist/module/features/translation/model/TranslationModel.js.map +1 -0
  109. package/dist/module/features/translation/model/TranslationPreprocessor.js +137 -0
  110. package/dist/module/features/translation/model/TranslationPreprocessor.js.map +1 -0
  111. package/dist/module/features/translation/model/TranslationService.js +107 -0
  112. package/dist/module/features/translation/model/TranslationService.js.map +1 -0
  113. package/dist/module/features/translation/preserve/wordsToPreserve.js +310 -0
  114. package/dist/module/features/translation/preserve/wordsToPreserve.js.map +1 -0
  115. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js +45 -0
  116. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js.map +1 -0
  117. package/dist/module/features/translation/providers/google/supportedLanguages.js +225 -0
  118. package/dist/module/features/translation/providers/google/supportedLanguages.js.map +1 -0
  119. package/dist/module/features/translation/providers/google.types.js +2 -0
  120. package/dist/module/features/translation/providers/google.types.js.map +1 -0
  121. package/dist/module/features/translation/providers/translation.interface.js +44 -0
  122. package/dist/module/features/translation/providers/translation.interface.js.map +1 -0
  123. package/dist/module/features/translation/types.js +2 -0
  124. package/dist/module/features/translation/types.js.map +1 -0
  125. package/dist/module/features/voice/index.js +2 -1
  126. package/dist/module/features/voice/index.js.map +1 -1
  127. package/dist/module/features/voice/playing/components/VoiceIcon.js +2 -2
  128. package/dist/module/features/voice/playing/components/VoiceIcon.js.map +1 -1
  129. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js +38 -0
  130. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -0
  131. package/dist/module/features/voice/playing/components/VoiceTranscription.js +101 -0
  132. package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +1 -0
  133. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +58 -0
  134. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -0
  135. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +52 -0
  136. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -0
  137. package/dist/module/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.js → useDropdownAnimation.js} +6 -5
  138. package/dist/module/features/voice/playing/hooks/useDropdownAnimation.js.map +1 -0
  139. package/dist/module/features/voice/playing/hooks/useVoicePlayerLifecycle.js +48 -0
  140. package/dist/module/features/voice/playing/hooks/useVoicePlayerLifecycle.js.map +1 -0
  141. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js +106 -0
  142. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +1 -0
  143. package/dist/module/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.js → Dropdown.model.js} +2 -2
  144. package/dist/module/features/voice/playing/model/Dropdown.model.js.map +1 -0
  145. package/dist/module/features/voice/playing/model/PlaybackController.js +187 -0
  146. package/dist/module/features/voice/playing/model/PlaybackController.js.map +1 -0
  147. package/dist/module/features/voice/playing/model/Player.model.js +51 -4
  148. package/dist/module/features/voice/playing/model/Player.model.js.map +1 -1
  149. package/dist/module/features/voice/playing/model/{VoiceTranscriptionsCollection.js → TranscriptionsCollection.js} +2 -2
  150. package/dist/module/features/voice/playing/model/TranscriptionsCollection.js.map +1 -0
  151. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js +78 -0
  152. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -0
  153. package/dist/module/features/voice/playing/model/Translation.model.js +57 -0
  154. package/dist/module/features/voice/playing/model/Translation.model.js.map +1 -0
  155. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
  156. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
  157. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +60 -174
  158. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  159. package/dist/module/features/voice/recording/components/VoiceRecordDivider.js +2 -2
  160. package/dist/module/features/voice/recording/components/VoiceRecordDivider.js.map +1 -1
  161. package/dist/module/features/voice/types.js +11 -0
  162. package/dist/module/features/voice/types.js.map +1 -1
  163. package/dist/module/index.js +1 -0
  164. package/dist/module/index.js.map +1 -1
  165. package/dist/typescript/commonjs/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
  166. package/dist/typescript/commonjs/features/fluency/components/Fluency.d.ts.map +1 -1
  167. package/dist/typescript/commonjs/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -1
  168. package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts +0 -3
  169. package/dist/typescript/commonjs/features/fluency/model/FluencyModel.d.ts.map +1 -1
  170. package/dist/typescript/commonjs/features/fluency/shared/fluency.constants.d.ts +0 -4
  171. package/dist/typescript/commonjs/features/fluency/shared/fluency.constants.d.ts.map +1 -1
  172. package/dist/typescript/commonjs/features/fluency/shared/fluency.helpers.d.ts +0 -1
  173. package/dist/typescript/commonjs/features/fluency/shared/fluency.helpers.d.ts.map +1 -1
  174. package/dist/typescript/commonjs/features/pmProgress/model/PmProgressModel.d.ts.map +1 -1
  175. package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts +38 -9
  176. package/dist/typescript/commonjs/features/pmProgress/model/PmRecommendationsModel.d.ts.map +1 -1
  177. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts +0 -1
  178. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
  179. package/dist/typescript/commonjs/features/translation/constants.d.ts +5 -0
  180. package/dist/typescript/commonjs/features/translation/constants.d.ts.map +1 -0
  181. package/dist/typescript/commonjs/features/translation/helpers.d.ts +9 -0
  182. package/dist/typescript/commonjs/features/translation/helpers.d.ts.map +1 -0
  183. package/dist/typescript/commonjs/features/translation/index.d.ts +12 -0
  184. package/dist/typescript/commonjs/features/translation/index.d.ts.map +1 -0
  185. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts +33 -0
  186. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts.map +1 -0
  187. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts +34 -0
  188. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts.map +1 -0
  189. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts +40 -0
  190. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts.map +1 -0
  191. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts +3 -0
  192. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts.map +1 -0
  193. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts +17 -0
  194. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +1 -0
  195. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts +209 -0
  196. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts.map +1 -0
  197. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts +15 -0
  198. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts.map +1 -0
  199. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts +30 -0
  200. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts.map +1 -0
  201. package/dist/typescript/commonjs/features/translation/types.d.ts +27 -0
  202. package/dist/typescript/commonjs/features/translation/types.d.ts.map +1 -0
  203. package/dist/typescript/commonjs/features/voice/index.d.ts +3 -1
  204. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
  205. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts +8 -0
  206. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -0
  207. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts +16 -0
  208. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -0
  209. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +10 -0
  210. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -0
  211. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +12 -0
  212. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -0
  213. package/dist/typescript/commonjs/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.d.ts → useDropdownAnimation.d.ts} +3 -3
  214. package/dist/typescript/commonjs/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +1 -0
  215. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoicePlayerLifecycle.d.ts +15 -0
  216. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoicePlayerLifecycle.d.ts.map +1 -0
  217. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +30 -0
  218. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +1 -0
  219. package/dist/typescript/{module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts → commonjs/features/voice/playing/model/Dropdown.model.d.ts} +2 -2
  220. package/dist/typescript/commonjs/features/voice/playing/model/Dropdown.model.d.ts.map +1 -0
  221. package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts +28 -0
  222. package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts.map +1 -0
  223. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +4 -0
  224. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -1
  225. package/dist/typescript/{module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts → commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts} +2 -2
  226. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts.map +1 -0
  227. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +19 -0
  228. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -0
  229. package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts +25 -0
  230. package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts.map +1 -0
  231. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
  232. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
  233. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +19 -18
  234. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  235. package/dist/typescript/commonjs/features/voice/types.d.ts +14 -2
  236. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  237. package/dist/typescript/commonjs/index.d.ts +1 -0
  238. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  239. package/dist/typescript/module/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.d.ts.map +1 -1
  240. package/dist/typescript/module/features/fluency/components/Fluency.d.ts.map +1 -1
  241. package/dist/typescript/module/features/fluency/components/select-math-operator/SelectMathOperator.d.ts.map +1 -1
  242. package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts +0 -3
  243. package/dist/typescript/module/features/fluency/model/FluencyModel.d.ts.map +1 -1
  244. package/dist/typescript/module/features/fluency/shared/fluency.constants.d.ts +0 -4
  245. package/dist/typescript/module/features/fluency/shared/fluency.constants.d.ts.map +1 -1
  246. package/dist/typescript/module/features/fluency/shared/fluency.helpers.d.ts +0 -1
  247. package/dist/typescript/module/features/fluency/shared/fluency.helpers.d.ts.map +1 -1
  248. package/dist/typescript/module/features/pmProgress/model/PmProgressModel.d.ts.map +1 -1
  249. package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts +38 -9
  250. package/dist/typescript/module/features/pmProgress/model/PmRecommendationsModel.d.ts.map +1 -1
  251. package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts +0 -1
  252. package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
  253. package/dist/typescript/module/features/translation/constants.d.ts +5 -0
  254. package/dist/typescript/module/features/translation/constants.d.ts.map +1 -0
  255. package/dist/typescript/module/features/translation/helpers.d.ts +9 -0
  256. package/dist/typescript/module/features/translation/helpers.d.ts.map +1 -0
  257. package/dist/typescript/module/features/translation/index.d.ts +12 -0
  258. package/dist/typescript/module/features/translation/index.d.ts.map +1 -0
  259. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts +33 -0
  260. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts.map +1 -0
  261. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts +34 -0
  262. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts.map +1 -0
  263. package/dist/typescript/module/features/translation/model/TranslationService.d.ts +40 -0
  264. package/dist/typescript/module/features/translation/model/TranslationService.d.ts.map +1 -0
  265. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts +3 -0
  266. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts.map +1 -0
  267. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts +17 -0
  268. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +1 -0
  269. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts +209 -0
  270. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts.map +1 -0
  271. package/dist/typescript/module/features/translation/providers/google.types.d.ts +15 -0
  272. package/dist/typescript/module/features/translation/providers/google.types.d.ts.map +1 -0
  273. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts +30 -0
  274. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts.map +1 -0
  275. package/dist/typescript/module/features/translation/types.d.ts +27 -0
  276. package/dist/typescript/module/features/translation/types.d.ts.map +1 -0
  277. package/dist/typescript/module/features/voice/index.d.ts +3 -1
  278. package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
  279. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts +8 -0
  280. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -0
  281. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts +16 -0
  282. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -0
  283. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +10 -0
  284. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -0
  285. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +12 -0
  286. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -0
  287. package/dist/typescript/module/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.d.ts → useDropdownAnimation.d.ts} +3 -3
  288. package/dist/typescript/module/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +1 -0
  289. package/dist/typescript/module/features/voice/playing/hooks/useVoicePlayerLifecycle.d.ts +15 -0
  290. package/dist/typescript/module/features/voice/playing/hooks/useVoicePlayerLifecycle.d.ts.map +1 -0
  291. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +30 -0
  292. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +1 -0
  293. package/dist/typescript/{commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts → module/features/voice/playing/model/Dropdown.model.d.ts} +2 -2
  294. package/dist/typescript/module/features/voice/playing/model/Dropdown.model.d.ts.map +1 -0
  295. package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts +28 -0
  296. package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts.map +1 -0
  297. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +4 -0
  298. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -1
  299. package/dist/typescript/{commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts → module/features/voice/playing/model/TranscriptionsCollection.d.ts} +2 -2
  300. package/dist/typescript/module/features/voice/playing/model/TranscriptionsCollection.d.ts.map +1 -0
  301. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +19 -0
  302. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -0
  303. package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts +25 -0
  304. package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts.map +1 -0
  305. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
  306. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
  307. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +19 -18
  308. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  309. package/dist/typescript/module/features/voice/types.d.ts +14 -2
  310. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  311. package/dist/typescript/module/index.d.ts +1 -0
  312. package/dist/typescript/module/index.d.ts.map +1 -1
  313. package/package.json +37 -10
  314. package/src/features/endOfAssignment/components/CorrectAnswer/CorrectAnswer.tsx +2 -9
  315. package/src/features/fluency/components/Fluency.tsx +9 -17
  316. package/src/features/fluency/components/select-math-operator/SelectMathOperator.tsx +5 -13
  317. package/src/features/fluency/model/FluencyModel.ts +1 -25
  318. package/src/features/fluency/shared/fluency.constants.ts +0 -5
  319. package/src/features/fluency/shared/fluency.helpers.ts +0 -3
  320. package/src/features/pmProgress/model/PmProgressModel.ts +1 -4
  321. package/src/features/pmProgress/model/PmRecommendationsModel.ts +6 -22
  322. package/src/features/pmProgress/shared/pmProgress.helpers.ts +0 -33
  323. package/src/features/translation/constants.ts +4 -0
  324. package/src/features/translation/helpers.ts +63 -0
  325. package/src/features/translation/index.ts +30 -0
  326. package/src/features/translation/model/TranslationModel.ts +174 -0
  327. package/src/features/translation/model/TranslationPreprocessor.ts +171 -0
  328. package/src/features/translation/model/TranslationService.ts +148 -0
  329. package/src/features/translation/preserve/wordsToPreserve.ts +87 -0
  330. package/src/features/translation/providers/google/GoogleTranslationProvider.ts +50 -0
  331. package/src/features/translation/providers/google/supportedLanguages.ts +229 -0
  332. package/src/features/translation/providers/google.types.ts +16 -0
  333. package/src/features/translation/providers/translation.interface.ts +63 -0
  334. package/src/features/translation/types.ts +30 -0
  335. package/src/features/voice/index.ts +3 -1
  336. package/src/features/voice/playing/components/VoiceIcon.tsx +2 -2
  337. package/src/features/voice/playing/components/VoiceTranscriptContent.tsx +44 -0
  338. package/src/features/voice/playing/components/VoiceTranscription.tsx +117 -0
  339. package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +59 -0
  340. package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +61 -0
  341. package/src/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.ts → useDropdownAnimation.ts} +5 -5
  342. package/src/features/voice/playing/hooks/useVoicePlayerLifecycle.ts +64 -0
  343. package/src/features/voice/playing/hooks/useVoiceTranscriptionController.ts +148 -0
  344. package/src/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.ts → Dropdown.model.ts} +2 -2
  345. package/src/features/voice/playing/model/PlaybackController.ts +221 -0
  346. package/src/features/voice/playing/model/Player.model.ts +52 -4
  347. package/src/features/voice/playing/model/{VoiceTranscriptionsCollection.ts → TranscriptionsCollection.ts} +1 -1
  348. package/src/features/voice/playing/model/TranscriptionsDownloader.model.ts +88 -0
  349. package/src/features/voice/playing/model/Translation.model.ts +75 -0
  350. package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +2 -2
  351. package/src/features/voice/playing/model/VoicePlayer.model.ts +68 -192
  352. package/src/features/voice/recording/components/VoiceRecordDivider.tsx +2 -2
  353. package/src/features/voice/types.ts +21 -1
  354. package/src/i18n/.generated/schema.json +3 -7
  355. package/src/index.ts +1 -0
  356. package/dist/commonjs/features/fluency/components/FluencyStatusOverlay.js +0 -101
  357. package/dist/commonjs/features/fluency/components/FluencyStatusOverlay.js.map +0 -1
  358. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +0 -245
  359. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +0 -1
  360. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +0 -109
  361. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +0 -1
  362. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +0 -1
  363. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +0 -34
  364. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +0 -1
  365. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +0 -66
  366. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +0 -1
  367. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +0 -1
  368. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +0 -1
  369. package/dist/module/features/fluency/components/FluencyStatusOverlay.js +0 -95
  370. package/dist/module/features/fluency/components/FluencyStatusOverlay.js.map +0 -1
  371. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +0 -238
  372. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +0 -1
  373. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +0 -103
  374. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +0 -1
  375. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +0 -1
  376. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +0 -29
  377. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +0 -1
  378. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +0 -61
  379. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +0 -1
  380. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +0 -1
  381. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +0 -1
  382. package/dist/typescript/commonjs/features/fluency/components/FluencyStatusOverlay.d.ts +0 -8
  383. package/dist/typescript/commonjs/features/fluency/components/FluencyStatusOverlay.d.ts.map +0 -1
  384. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +0 -16
  385. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +0 -1
  386. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +0 -12
  387. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +0 -1
  388. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +0 -1
  389. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +0 -11
  390. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +0 -1
  391. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -15
  392. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +0 -1
  393. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +0 -1
  394. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +0 -1
  395. package/dist/typescript/module/features/fluency/components/FluencyStatusOverlay.d.ts +0 -8
  396. package/dist/typescript/module/features/fluency/components/FluencyStatusOverlay.d.ts.map +0 -1
  397. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +0 -16
  398. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +0 -1
  399. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +0 -12
  400. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +0 -1
  401. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +0 -1
  402. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +0 -11
  403. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +0 -1
  404. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -15
  405. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +0 -1
  406. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +0 -1
  407. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +0 -1
  408. package/src/features/fluency/components/FluencyStatusOverlay.tsx +0 -101
  409. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +0 -296
  410. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +0 -128
  411. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +0 -40
  412. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +0 -80
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceTranscriptionsDropdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx"],"names":[],"mappings":"AASA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAChF,OAAO,EAEL,SAAS,EACT,SAAS,EAMV,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,WAAW,EAA0B,MAAM,aAAa,CAAA;AAEjE,OAAO,EAAE,gBAAgB,EAAe,MAAM,UAAU,CAAA;AASxD,KAAK,gCAAgC,GAAG;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,KAAK,EAAE,gBAAgB,CAAA;IACvB,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,2BAA2B,+FAQrC,gCAAgC,sBA4MlC,CAAA"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- type VoiceTranscriptionsDropdownItemProps = {
3
- attempt: number;
4
- content: string;
5
- isActive: boolean;
6
- isLoading?: boolean;
7
- onToggle: (attempt: number) => void;
8
- scrollToAttempt: (attempt: number) => void;
9
- };
10
- export declare const VoiceTranscriptionsDropdownItem: React.MemoExoticComponent<({ attempt, content, isActive, isLoading, onToggle, scrollToAttempt, }: VoiceTranscriptionsDropdownItemProps) => React.JSX.Element>;
11
- export {};
12
- //# sourceMappingURL=VoiceTranscriptionsDropdownItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceTranscriptionsDropdownItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAA;AAexD,KAAK,oCAAoC,GAAG;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,+BAA+B,oGAQvC,oCAAoC,uBAmExC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVoiceTranscriptionsDropdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gCAAgC,EAAE,MAAM,4CAA4C,CAAA;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhD,eAAO,MAAM,8BAA8B,UAAW,gCAAgC;;;;;;;;;;;0BAMvD,iBAAiB;CAwC/C,CAAA"}
@@ -1,11 +0,0 @@
1
- import { LayoutChangeEvent } from 'react-native';
2
- export declare const useVoiceTranscriptionsDropdownItemAnimation: (isExpanded: boolean) => {
3
- contentAnimatedStyle: {
4
- height: number;
5
- opacity: number;
6
- overflow: "hidden";
7
- };
8
- onLayout: (event: LayoutChangeEvent) => void;
9
- progress: import("react-native-reanimated").SharedValue<number>;
10
- };
11
- //# sourceMappingURL=useVoiceTranscriptionsDropdownItemAnimation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVoiceTranscriptionsDropdownItemAnimation.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAShD,eAAO,MAAM,2CAA2C,eAAgB,OAAO;;;;;;sBAoBpD,iBAAiB;;CAS3C,CAAA"}
@@ -1,15 +0,0 @@
1
- import { VoiceTranscriptionsCollection } from './VoiceTranscriptionsCollection';
2
- import { VoicePlayerApi } from '../../types';
3
- export declare class TranscriptionsDownloaderModel {
4
- private readonly collection;
5
- private readonly api;
6
- readonly setTranscriptsLoaded: import("effector").EventCallable<boolean>;
7
- readonly reset: import("effector").EventCallable<void>;
8
- readonly $transcriptsLoaded: import("effector").StoreWritable<boolean>;
9
- constructor(collection: VoiceTranscriptionsCollection, api: VoicePlayerApi);
10
- private fetchTranscriptWithRetry;
11
- readonly loadAllTranscripts: import("effector").Effect<void, void, Error>;
12
- getTranscript(attemptNumber: number): string | undefined;
13
- isTranscriptLoading(attemptNumber: number): boolean;
14
- }
15
- //# sourceMappingURL=TranscriptionsDownloaderModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TranscriptionsDownloaderModel.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/model/TranscriptionsDownloaderModel.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,6BAA6B,EAAE,MAAM,iCAAiC,CAAA;AAC/E,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAA;AAO5C,qBAAa,6BAA6B;IACxC,OAAO,CAAC,QAAQ,CAAC,UAAU,CAA+B;IAC1D,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAgB;IAEpC,SAAgB,oBAAoB,4CAAyB;IAC7D,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,kBAAkB,4CAA8D;gBAEpF,UAAU,EAAE,6BAA6B,EAAE,GAAG,EAAE,cAAc;YAK5D,wBAAwB;IAmBtC,SAAgB,kBAAkB,+CA4BhC;IAEK,aAAa,CAAC,aAAa,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS;IAIxD,mBAAmB,CAAC,aAAa,EAAE,MAAM,GAAG,OAAO;CAG3D"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceTranscriptionsCollection.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/model/VoiceTranscriptionsCollection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,sBAAsB,EAAE,MAAM,aAAa,CAAA;AAEpD,qBAAa,6BAA6B;IACxC,SAAgB,UAAU,EAAE,GAAG,CAAC,MAAM,EAAE,sBAAsB,CAAC,CAAY;IAEpE,GAAG,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,sBAAsB;IAIvD,MAAM,CAAC,aAAa,EAAE,MAAM,EAAE,IAAI,EAAE,OAAO,CAAC,sBAAsB,CAAC;IAKnE,MAAM,CAAC,aAAa,EAAE,MAAM;IAI5B,GAAG,CAAC,aAAa,EAAE,MAAM;IAIzB,MAAM;IAIN,KAAK;IAIL,aAAa,CAAC,aAAa,EAAE,MAAM;IAKnC,QAAQ,CAAC,aAAa,EAAE,MAAM;CAItC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceTranscriptionsDropdown.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts"],"names":[],"mappings":"AAEA,qBAAa,gCAAgC;IAC3C,SAAgB,YAAY,yCAAgB;IAC5C,SAAgB,WAAW,4CAAyB;IACpD,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,WAAW,4CAEP;CACrB"}
@@ -1,101 +0,0 @@
1
- import React, { ReactNode } from 'react'
2
- import { StyleSheet, View } from 'react-native'
3
- import {
4
- COLORS,
5
- ErrorIcon,
6
- HeadingVariants,
7
- InfoIcon,
8
- SPACING,
9
- Typography,
10
- } from '@magmamath/react-native-ui'
11
- import { FluencyStatus } from '../shared/fluency.constants'
12
- import type { TranslationKey } from '../../../i18n/i18n'
13
- import { useText } from '../../../i18n/i18n'
14
-
15
- type StatusVariant = {
16
- icon: ReactNode
17
- circleColor: string
18
- titleKey: TranslationKey
19
- subtitleKey: TranslationKey
20
- }
21
-
22
- const FLUENCY_STATUS_VARIANTS: Record<FluencyStatus, StatusVariant> = {
23
- [FluencyStatus.ERROR]: {
24
- icon: <ErrorIcon color={COLORS.PRIMARY_RED} size={40} />,
25
- circleColor: COLORS.RED_1,
26
- titleKey: 'student.fluency.errorTitle',
27
- subtitleKey: 'student.fluency.errorSubtitle',
28
- },
29
- [FluencyStatus.EMPTY]: {
30
- icon: <InfoIcon color={COLORS.NEUTRAL_6} size={40} />,
31
- circleColor: COLORS.NEUTRAL_2,
32
- titleKey: 'student.fluency.emptyTitle',
33
- subtitleKey: 'student.fluency.emptySubtitle',
34
- },
35
- }
36
-
37
- type FluencyStatusOverlayProps = {
38
- status: FluencyStatus
39
- }
40
-
41
- export const FluencyStatusOverlay = ({ status }: FluencyStatusOverlayProps) => {
42
- const t = useText()
43
-
44
- const variant = FLUENCY_STATUS_VARIANTS[status]
45
- if (!variant) return null
46
-
47
- return (
48
- <View style={styles.container}>
49
- <View style={styles.content}>
50
- <View style={[styles.iconCircle, { backgroundColor: variant.circleColor }]}>
51
- {variant.icon}
52
- </View>
53
- <View style={styles.text}>
54
- <Typography variant={HeadingVariants.H2} style={styles.title}>
55
- {t(variant.titleKey)}
56
- </Typography>
57
- <Typography variant={HeadingVariants.H7} style={styles.subtitle}>
58
- {t(variant.subtitleKey)}
59
- </Typography>
60
- </View>
61
- </View>
62
- </View>
63
- )
64
- }
65
-
66
- const styles = StyleSheet.create({
67
- container: {
68
- flex: 1,
69
- alignItems: 'center',
70
- justifyContent: 'center',
71
- },
72
- content: {
73
- alignItems: 'center',
74
- gap: SPACING[500],
75
- paddingBottom: SPACING[800],
76
- },
77
- iconCircle: {
78
- width: 88,
79
- height: 88,
80
- borderRadius: 44,
81
- alignItems: 'center',
82
- justifyContent: 'center',
83
- },
84
- text: {
85
- alignItems: 'center',
86
- gap: SPACING[200],
87
- maxWidth: 340,
88
- },
89
- title: {
90
- color: COLORS.NEUTRAL_9,
91
- textAlign: 'center',
92
- fontSize: 24,
93
- fontWeight: '500',
94
- },
95
- subtitle: {
96
- color: COLORS.NEUTRAL_7,
97
- textAlign: 'center',
98
- fontSize: 16,
99
- fontWeight: '400',
100
- },
101
- })
@@ -1,296 +0,0 @@
1
- import {
2
- Typography,
3
- ScrollableList,
4
- CaretDownIcon,
5
- COLORS,
6
- IS_WEB,
7
- ScrollableListScrollView,
8
- } from '@magmamath/react-native-ui'
9
- import { useUnit } from 'effector-react'
10
- import React, { useRef, useEffect, useState, useCallback, useMemo } from 'react'
11
- import {
12
- TouchableOpacity,
13
- StyleProp,
14
- ViewStyle,
15
- FlatList,
16
- LayoutChangeEvent,
17
- ScrollView,
18
- View,
19
- StyleSheet,
20
- } from 'react-native'
21
- import Animated, { FadeIn, FadeOut } from 'react-native-reanimated'
22
- import { AnswerAudio, VoiceTranscriptionItem } from '../../types'
23
- import { useVoiceTranscriptionsDropdown } from '../hooks/useVoiceTranscriptionsDropdown'
24
- import { VoicePlayerModel, PlayerState } from '../model'
25
- import { VoiceTranscriptionsDropdownItem } from './VoiceTranscriptionsDropdownItem'
26
- import { DROPDOWN_MAX_CONTENT_HEIGHT, NO_AUDIO_BE_MESSAGE } from '../../constants'
27
- import { useText } from '../../../../i18n/i18n'
28
- import { PlayButton } from '../../../../shared/components/PlayButton'
29
- import { getActiveAttempt, getAudioStatus } from '../../helpers'
30
-
31
- const AnimatedTouchableOpacity = Animated.createAnimatedComponent(TouchableOpacity)
32
-
33
- type VoiceTranscriptionsDropdownProps = {
34
- style?: StyleProp<ViewStyle>
35
- model: VoicePlayerModel
36
- answers: AnswerAudio[]
37
- attemptOffset: number
38
- onAttemptOffsetChange: (offset: number) => void
39
- attemptsCount: number
40
- problemId: string
41
- }
42
-
43
- export const VoiceTranscriptionsDropdown = ({
44
- style,
45
- model,
46
- answers,
47
- attemptOffset,
48
- onAttemptOffsetChange,
49
- attemptsCount,
50
- problemId,
51
- }: VoiceTranscriptionsDropdownProps) => {
52
- const [attempts, setAttempts] = useState<VoiceTranscriptionItem[]>([])
53
-
54
- const scrollRef = useRef<FlatList | null>(null)
55
- const scrollViewRef = useRef<ScrollView | null>(null)
56
- const itemLayoutsRef = useRef<Map<string, number>>(new Map())
57
- const answersRef = useRef(answers)
58
- answersRef.current = answers
59
-
60
- const t = useText()
61
-
62
- const [currentAttempt, transcriptsLoaded, playerState, isDropdownExpanded] = useUnit([
63
- model.$currentAttempt,
64
- model.loader.$transcriptsLoaded,
65
- model.$playerState,
66
- model.dropdown.$isExpanded,
67
- ])
68
-
69
- const activeAttempt = getActiveAttempt(attemptOffset, attemptsCount)
70
-
71
- const answersKey = useMemo(
72
- () => answers.map((a) => `${a._id}:${a.audioFileId ?? ''}`).join(','),
73
- [answers],
74
- )
75
-
76
- const hasActiveTranscript =
77
- activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined
78
-
79
- const playButtonState = {
80
- isActive: playerState !== PlayerState.IDLE,
81
- isLoading: playerState === PlayerState.LOADING,
82
- status: getAudioStatus(playerState),
83
- }
84
-
85
- const { listAnimatedStyle, iconAnimatedStyle, onListLayout } = useVoiceTranscriptionsDropdown(
86
- model.dropdown,
87
- )
88
-
89
- const handleItemLayout = useCallback((id: string, event: LayoutChangeEvent) => {
90
- itemLayoutsRef.current.set(id, event.nativeEvent.layout.y)
91
- }, [])
92
-
93
- const scrollToAttempt = useCallback(
94
- (attemptNumber: number) => {
95
- if (IS_WEB) {
96
- const item = attempts.find((item) => item.attemptNumber === attemptNumber)
97
- if (item) {
98
- const y = itemLayoutsRef.current.get(item._id)
99
- if (y !== undefined) {
100
- scrollViewRef.current?.scrollTo({ y, animated: true })
101
- }
102
- }
103
- return
104
- }
105
-
106
- const index = attempts.findIndex((item) => item.attemptNumber === attemptNumber)
107
- if (index !== -1) {
108
- scrollRef.current?.scrollToIndex({ index, animated: true, viewPosition: 0 })
109
- }
110
- },
111
- [attempts],
112
- )
113
-
114
- const handleItemToggle = useCallback(
115
- (attempt: number) => {
116
- if (onAttemptOffsetChange && attemptsCount !== undefined) {
117
- onAttemptOffsetChange(attemptsCount - attempt)
118
- }
119
- },
120
- [onAttemptOffsetChange, attemptsCount],
121
- )
122
-
123
- const handlePlayPress = useCallback(() => {
124
- if (activeAttempt) {
125
- model.togglePlayPause(activeAttempt)
126
- }
127
- }, [model, activeAttempt])
128
-
129
- const handleScrollToIndexFailed = useCallback((info: { index: number }) => {
130
- setTimeout(() => {
131
- scrollRef.current?.scrollToIndex({ index: info.index, animated: true, viewPosition: 0 })
132
- }, 100)
133
- }, [])
134
-
135
- useEffect(() => {
136
- model.reinitializePlayer()
137
- return () => model.cleanup()
138
- }, [model])
139
-
140
- useEffect(() => {
141
- const isLastAttemptsWithoutDrowing = !answers[answers.length - 1].drawing
142
- if (answers.length > 0 && isLastAttemptsWithoutDrowing) {
143
- model.dropdown.setExpanded(true)
144
- } else {
145
- model.dropdown.setExpanded(false)
146
- }
147
-
148
- model.resetPlayer()
149
- }, [problemId])
150
-
151
- useEffect(() => {
152
- if (answersRef.current.some((answer) => answer.audioFileId)) {
153
- model.initializeWithAudios(answersRef.current)
154
- model.loader.loadAllTranscripts()
155
- }
156
- }, [model, answersKey])
157
-
158
- useEffect(() => {
159
- model.stopAudio()
160
- }, [activeAttempt])
161
-
162
- useEffect(() => {
163
- const allAttempts = model.getAllAttempts()
164
- setAttempts(allAttempts)
165
- }, [answersKey, transcriptsLoaded, currentAttempt, model])
166
-
167
- useEffect(() => {
168
- if (isDropdownExpanded && activeAttempt !== null) {
169
- setTimeout(() => {
170
- scrollToAttempt(activeAttempt)
171
- }, 500)
172
- }
173
- }, [isDropdownExpanded, answersKey])
174
-
175
- const renderItem = useCallback(
176
- ({ item }: { item: VoiceTranscriptionItem }) => {
177
- const isLoading = model.loader.isTranscriptLoading(item.attemptNumber)
178
- const transcript = model.loader.getTranscript(item.attemptNumber)
179
- const isActive = activeAttempt === item.attemptNumber
180
-
181
- return (
182
- <VoiceTranscriptionsDropdownItem
183
- isLoading={isActive && isLoading}
184
- attempt={item.attemptNumber}
185
- content={
186
- transcript && transcript !== NO_AUDIO_BE_MESSAGE
187
- ? transcript
188
- : t('voice.transcriptNotAvailable')
189
- }
190
- isActive={isActive}
191
- onToggle={handleItemToggle}
192
- scrollToAttempt={scrollToAttempt}
193
- />
194
- )
195
- },
196
- [model, activeAttempt, t, handleItemToggle, scrollToAttempt],
197
- )
198
-
199
- return (
200
- <Animated.View style={[styles.container, style]}>
201
- <View style={styles.header}>
202
- <Typography style={styles.title} variant="h7">
203
- {t('voice.transcriptions')}
204
- </Typography>
205
- {hasActiveTranscript && (
206
- <Animated.View entering={FadeIn.duration(120)} exiting={FadeOut.duration(120)}>
207
- <PlayButton
208
- state={playButtonState}
209
- onPress={handlePlayPress}
210
- activityIndicatorColor={COLORS.NEUTRAL_1}
211
- />
212
- </Animated.View>
213
- )}
214
- </View>
215
-
216
- <Animated.View style={[listAnimatedStyle, { overflow: 'hidden' }]}>
217
- <View onLayout={onListLayout} style={styles.listContainer}>
218
- {IS_WEB ? (
219
- <ScrollableListScrollView
220
- bounces={false}
221
- ref={scrollViewRef}
222
- hideShadow
223
- style={styles.list}
224
- contentContainerStyle={styles.listContent}
225
- >
226
- {attempts.map((item) => (
227
- <View key={item._id} onLayout={(e) => handleItemLayout(item._id, e)}>
228
- {renderItem({ item })}
229
- </View>
230
- ))}
231
- </ScrollableListScrollView>
232
- ) : (
233
- <ScrollableList
234
- bounces={false}
235
- ref={scrollRef}
236
- hideShadow
237
- data={attempts}
238
- keyExtractor={(item) => item._id}
239
- onScrollToIndexFailed={handleScrollToIndexFailed}
240
- renderItem={renderItem}
241
- contentContainerStyle={styles.listContent}
242
- />
243
- )}
244
- </View>
245
- </Animated.View>
246
-
247
- <AnimatedTouchableOpacity
248
- style={[styles.expandButton, iconAnimatedStyle]}
249
- onPress={() => model.dropdown.toggleExpand()}
250
- >
251
- <CaretDownIcon size={22} />
252
- </AnimatedTouchableOpacity>
253
- </Animated.View>
254
- )
255
- }
256
-
257
- const styles = StyleSheet.create({
258
- container: {
259
- position: 'absolute',
260
- top: 56,
261
- left: 8,
262
- width: 222,
263
- maxHeight: 405,
264
- minHeight: 51,
265
- padding: 4,
266
- boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
267
- borderRadius: 12,
268
- backgroundColor: COLORS.NEUTRAL_1,
269
- overflow: 'hidden',
270
- },
271
- header: {
272
- flexDirection: 'row',
273
- justifyContent: 'space-between',
274
- alignItems: 'center',
275
- padding: 4,
276
- marginBottom: 4,
277
- height: 32,
278
- },
279
- title: {
280
- color: COLORS.NEUTRAL_9,
281
- marginLeft: 4,
282
- },
283
- list: { flex: 1 },
284
- expandButton: {
285
- justifyContent: 'center',
286
- alignItems: 'center',
287
- },
288
- listContainer: {
289
- position: 'absolute',
290
- maxHeight: DROPDOWN_MAX_CONTENT_HEIGHT,
291
- width: '100%',
292
- },
293
- listContent: {
294
- paddingHorizontal: 4,
295
- },
296
- })
@@ -1,128 +0,0 @@
1
- import { Pressable, StyleSheet, View } from 'react-native'
2
- import React, { memo, useCallback, useRef } from 'react'
3
- import {
4
- Button,
5
- ButtonSize,
6
- ButtonVariant,
7
- COLORS,
8
- Loader,
9
- LoaderColor,
10
- LoaderSize,
11
- Typography,
12
- } from '@magmamath/react-native-ui'
13
- import Animated, { runOnJS, useAnimatedReaction } from 'react-native-reanimated'
14
- import { useVoiceTranscriptionsDropdownItemAnimation } from '../hooks/useVoiceTranscriptionsDropdownItemAnimation'
15
- import { useText } from '../../../../i18n/i18n'
16
-
17
- type VoiceTranscriptionsDropdownItemProps = {
18
- attempt: number
19
- content: string
20
- isActive: boolean
21
- isLoading?: boolean
22
- onToggle: (attempt: number) => void
23
- scrollToAttempt: (attempt: number) => void
24
- }
25
-
26
- export const VoiceTranscriptionsDropdownItem = memo(
27
- ({
28
- attempt,
29
- content,
30
- isActive,
31
- isLoading,
32
- onToggle,
33
- scrollToAttempt,
34
- }: VoiceTranscriptionsDropdownItemProps) => {
35
- const t = useText()
36
- const isActiveRef = useRef(isActive)
37
- isActiveRef.current = isActive
38
-
39
- const { contentAnimatedStyle, onLayout, progress } =
40
- useVoiceTranscriptionsDropdownItemAnimation(isActive)
41
-
42
- const handleScrollToAttempt = useCallback(
43
- (attemptNumber: number) => {
44
- if (!isActiveRef.current) return
45
- scrollToAttempt(attemptNumber)
46
- },
47
- [scrollToAttempt],
48
- )
49
-
50
- useAnimatedReaction(
51
- () => progress.value,
52
- (progress) => {
53
- if (progress === 1 && isActive) {
54
- runOnJS(handleScrollToAttempt)(attempt)
55
- }
56
- },
57
- [progress, attempt, isActive],
58
- )
59
-
60
- return (
61
- <View style={styles.container}>
62
- <Pressable disabled={isActive} style={styles.itemHeader} onPress={() => onToggle(attempt)}>
63
- <Button
64
- onPress={() => !isActive && onToggle(attempt)}
65
- size={ButtonSize.SMALL}
66
- variant={ButtonVariant.TERTIARY}
67
- style={{
68
- text: {
69
- textTransform: 'uppercase',
70
- color: isActive ? COLORS.NEUTRAL_9 : COLORS.NEUTRAL_7,
71
- },
72
- }}
73
- >
74
- {t('voice.attempt', { number: String(attempt) })}
75
- </Button>
76
- </Pressable>
77
- {isLoading ? (
78
- <View style={styles.loaderContainer}>
79
- <Loader size={LoaderSize.SMALL} color={LoaderColor.BLUE} />
80
- </View>
81
- ) : (
82
- <Animated.View style={contentAnimatedStyle}>
83
- <View onLayout={onLayout} style={styles.contentWrapper}>
84
- <Typography
85
- variant="h8"
86
- style={[
87
- styles.itemContent,
88
- {
89
- color: isActive ? COLORS.NEUTRAL_9 : COLORS.NEUTRAL_7,
90
- },
91
- ]}
92
- >
93
- {content}
94
- </Typography>
95
- </View>
96
- </Animated.View>
97
- )}
98
- </View>
99
- )
100
- },
101
- )
102
-
103
- const styles = StyleSheet.create({
104
- container: {
105
- borderTopWidth: 1,
106
- borderColor: COLORS.NEUTRAL_3,
107
- },
108
- itemHeader: {
109
- flexDirection: 'row',
110
- justifyContent: 'space-between',
111
- alignItems: 'center',
112
- width: '100%',
113
- paddingVertical: 8,
114
- },
115
- itemContent: {
116
- paddingHorizontal: 8,
117
- },
118
- contentWrapper: {
119
- width: '100%',
120
- position: 'absolute',
121
- },
122
- loaderContainer: {
123
- justifyContent: 'center',
124
- alignItems: 'center',
125
- paddingTop: 4,
126
- paddingBottom: 8,
127
- },
128
- })
@@ -1,40 +0,0 @@
1
- import { useEffect } from 'react'
2
- import { LayoutChangeEvent } from 'react-native'
3
- import {
4
- useSharedValue,
5
- withTiming,
6
- useDerivedValue,
7
- useAnimatedStyle,
8
- interpolate,
9
- } from 'react-native-reanimated'
10
-
11
- export const useVoiceTranscriptionsDropdownItemAnimation = (isExpanded: boolean) => {
12
- const height = useSharedValue(0)
13
- const progress = useSharedValue(isExpanded ? 1 : 0)
14
-
15
- useEffect(() => {
16
- progress.value = withTiming(isExpanded ? 1 : 0)
17
- }, [isExpanded, progress])
18
-
19
- const derivedHeight = useDerivedValue(() => height.value * progress.value, [height, progress])
20
-
21
- const contentAnimatedStyle = useAnimatedStyle(() => {
22
- const opacity = interpolate(progress.value, [0, 0.3, 1], [0, 0, 1])
23
-
24
- return {
25
- height: derivedHeight.value,
26
- opacity,
27
- overflow: 'hidden',
28
- }
29
- }, [progress, derivedHeight])
30
-
31
- const onLayout = (event: LayoutChangeEvent) => {
32
- height.value = event.nativeEvent.layout.height
33
- }
34
-
35
- return {
36
- contentAnimatedStyle,
37
- onLayout,
38
- progress,
39
- }
40
- }