@magmamath/students-features 1.3.23-rc.9 → 1.3.23

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 (332) hide show
  1. package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js +1 -0
  2. package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js.map +1 -1
  3. package/dist/commonjs/features/pmProgress/components/header/StartButton.js +10 -1
  4. package/dist/commonjs/features/pmProgress/components/header/StartButton.js.map +1 -1
  5. package/dist/commonjs/features/pmProgress/components/list/{ListCard.js → DomainCard.js} +10 -22
  6. package/dist/commonjs/features/pmProgress/components/list/DomainCard.js.map +1 -0
  7. package/dist/commonjs/features/pmProgress/components/list/Fluency.js +3 -3
  8. package/dist/commonjs/features/pmProgress/components/list/Fluency.js.map +1 -1
  9. package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +3 -3
  10. package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js.map +1 -1
  11. package/dist/commonjs/features/pmProgress/components/list/{ListItem.js → StandardItem.js} +5 -5
  12. package/dist/commonjs/features/pmProgress/components/list/StandardItem.js.map +1 -0
  13. package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +7 -4
  14. package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -1
  15. package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js +1 -8
  16. package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js.map +1 -1
  17. package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +1 -1
  18. package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
  19. package/dist/commonjs/features/voice/index.js +4 -4
  20. package/dist/commonjs/features/voice/index.js.map +1 -1
  21. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +245 -0
  22. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  23. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +109 -0
  24. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  25. package/dist/commonjs/features/voice/playing/hooks/{useVoiceTranscription.js → useVoiceTranscriptionsDropdown.js} +4 -4
  26. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  27. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +34 -0
  28. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  29. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +4 -18
  30. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -1
  31. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +2 -6
  32. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  33. package/dist/commonjs/features/voice/playing/model/{VoiceTranscription.model.js → VoiceTranscriptionsDropdown.model.js} +4 -4
  34. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  35. package/dist/commonjs/features/voice/types.js +1 -6
  36. package/dist/commonjs/features/voice/types.js.map +1 -1
  37. package/dist/commonjs/index.js +0 -12
  38. package/dist/commonjs/index.js.map +1 -1
  39. package/dist/module/features/pmProgress/components/chart/chart.helpers.js +1 -0
  40. package/dist/module/features/pmProgress/components/chart/chart.helpers.js.map +1 -1
  41. package/dist/module/features/pmProgress/components/header/StartButton.js +10 -1
  42. package/dist/module/features/pmProgress/components/header/StartButton.js.map +1 -1
  43. package/dist/module/features/pmProgress/components/list/{ListCard.js → DomainCard.js} +8 -20
  44. package/dist/module/features/pmProgress/components/list/DomainCard.js.map +1 -0
  45. package/dist/module/features/pmProgress/components/list/Fluency.js +3 -3
  46. package/dist/module/features/pmProgress/components/list/Fluency.js.map +1 -1
  47. package/dist/module/features/pmProgress/components/list/PmDomainList.js +3 -3
  48. package/dist/module/features/pmProgress/components/list/PmDomainList.js.map +1 -1
  49. package/dist/module/features/pmProgress/components/list/{ListItem.js → StandardItem.js} +3 -3
  50. package/dist/module/features/pmProgress/components/list/StandardItem.js.map +1 -0
  51. package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js +7 -4
  52. package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -1
  53. package/dist/module/features/pmProgress/components/standard/StandardTag.js +2 -9
  54. package/dist/module/features/pmProgress/components/standard/StandardTag.js.map +1 -1
  55. package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +1 -1
  56. package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
  57. package/dist/module/features/voice/index.js +1 -1
  58. package/dist/module/features/voice/index.js.map +1 -1
  59. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +238 -0
  60. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  61. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +103 -0
  62. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  63. package/dist/module/features/voice/playing/hooks/{useVoiceTranscription.js → useVoiceTranscriptionsDropdown.js} +2 -2
  64. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  65. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +29 -0
  66. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  67. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +4 -18
  68. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -1
  69. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +2 -6
  70. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  71. package/dist/module/features/voice/playing/model/{VoiceTranscription.model.js → VoiceTranscriptionsDropdown.model.js} +2 -2
  72. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  73. package/dist/module/features/voice/types.js +0 -5
  74. package/dist/module/features/voice/types.js.map +1 -1
  75. package/dist/module/index.js +0 -1
  76. package/dist/module/index.js.map +1 -1
  77. package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -1
  78. package/dist/typescript/commonjs/features/pmProgress/components/header/StartButton.d.ts.map +1 -1
  79. package/dist/typescript/commonjs/features/pmProgress/components/list/{ListCard.d.ts → DomainCard.d.ts} +6 -6
  80. package/dist/typescript/commonjs/features/pmProgress/components/list/DomainCard.d.ts.map +1 -0
  81. package/dist/typescript/commonjs/features/pmProgress/components/list/StandardItem.d.ts +13 -0
  82. package/dist/typescript/commonjs/features/pmProgress/components/list/StandardItem.d.ts.map +1 -0
  83. package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -1
  84. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
  85. package/dist/typescript/commonjs/features/voice/index.d.ts +1 -1
  86. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
  87. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
  88. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  89. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  90. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  91. package/dist/typescript/commonjs/features/voice/playing/hooks/{useVoiceTranscription.d.ts → useVoiceTranscriptionsDropdown.d.ts} +3 -3
  92. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  93. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  94. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  95. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -1
  96. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -1
  97. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +2 -4
  98. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  99. package/dist/typescript/commonjs/features/voice/playing/model/{VoiceTranscription.model.d.ts → VoiceTranscriptionsDropdown.model.d.ts} +2 -2
  100. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  101. package/dist/typescript/commonjs/features/voice/types.d.ts +1 -9
  102. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  103. package/dist/typescript/commonjs/index.d.ts +0 -1
  104. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  105. package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -1
  106. package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts.map +1 -1
  107. package/dist/typescript/module/features/pmProgress/components/list/{ListCard.d.ts → DomainCard.d.ts} +6 -6
  108. package/dist/typescript/module/features/pmProgress/components/list/DomainCard.d.ts.map +1 -0
  109. package/dist/typescript/module/features/pmProgress/components/list/StandardItem.d.ts +13 -0
  110. package/dist/typescript/module/features/pmProgress/components/list/StandardItem.d.ts.map +1 -0
  111. package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -1
  112. package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
  113. package/dist/typescript/module/features/voice/index.d.ts +1 -1
  114. package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
  115. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
  116. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  117. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  118. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  119. package/dist/typescript/module/features/voice/playing/hooks/{useVoiceTranscription.d.ts → useVoiceTranscriptionsDropdown.d.ts} +3 -3
  120. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  121. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  122. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  123. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -1
  124. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -1
  125. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +2 -4
  126. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  127. package/dist/typescript/module/features/voice/playing/model/{VoiceTranscription.model.d.ts → VoiceTranscriptionsDropdown.model.d.ts} +2 -2
  128. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  129. package/dist/typescript/module/features/voice/types.d.ts +1 -9
  130. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  131. package/dist/typescript/module/index.d.ts +0 -1
  132. package/dist/typescript/module/index.d.ts.map +1 -1
  133. package/package.json +1 -1
  134. package/src/features/pmProgress/components/chart/chart.helpers.ts +1 -0
  135. package/src/features/pmProgress/components/header/StartButton.tsx +11 -1
  136. package/src/features/pmProgress/components/list/{ListCard.tsx → DomainCard.tsx} +12 -19
  137. package/src/features/pmProgress/components/list/Fluency.tsx +3 -3
  138. package/src/features/pmProgress/components/list/PmDomainList.tsx +3 -3
  139. package/src/features/pmProgress/components/list/{ListItem.tsx → StandardItem.tsx} +4 -4
  140. package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +8 -4
  141. package/src/features/pmProgress/components/standard/StandardTag.tsx +2 -6
  142. package/src/features/pmProgress/shared/pmProgress.helpers.ts +1 -2
  143. package/src/features/voice/index.ts +1 -1
  144. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +296 -0
  145. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +128 -0
  146. package/src/features/voice/playing/hooks/{useVoiceTranscription.ts → useVoiceTranscriptionsDropdown.ts} +2 -2
  147. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
  148. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +5 -12
  149. package/src/features/voice/playing/model/VoicePlayer.model.ts +2 -7
  150. package/src/features/voice/playing/model/{VoiceTranscription.model.ts → VoiceTranscriptionsDropdown.model.ts} +2 -2
  151. package/src/features/voice/types.ts +0 -15
  152. package/src/index.ts +0 -1
  153. package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +0 -1
  154. package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +0 -1
  155. package/dist/commonjs/features/translation/constants.js +0 -11
  156. package/dist/commonjs/features/translation/constants.js.map +0 -1
  157. package/dist/commonjs/features/translation/helpers.js +0 -60
  158. package/dist/commonjs/features/translation/helpers.js.map +0 -1
  159. package/dist/commonjs/features/translation/index.js +0 -105
  160. package/dist/commonjs/features/translation/index.js.map +0 -1
  161. package/dist/commonjs/features/translation/model/TranslationModel.js +0 -122
  162. package/dist/commonjs/features/translation/model/TranslationModel.js.map +0 -1
  163. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js +0 -142
  164. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js.map +0 -1
  165. package/dist/commonjs/features/translation/model/TranslationService.js +0 -112
  166. package/dist/commonjs/features/translation/model/TranslationService.js.map +0 -1
  167. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js +0 -314
  168. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js.map +0 -1
  169. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js +0 -50
  170. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
  171. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js +0 -230
  172. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js.map +0 -1
  173. package/dist/commonjs/features/translation/providers/google.types.js +0 -2
  174. package/dist/commonjs/features/translation/providers/google.types.js.map +0 -1
  175. package/dist/commonjs/features/translation/providers/translation.interface.js +0 -49
  176. package/dist/commonjs/features/translation/providers/translation.interface.js.map +0 -1
  177. package/dist/commonjs/features/translation/types.js +0 -2
  178. package/dist/commonjs/features/translation/types.js.map +0 -1
  179. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js +0 -44
  180. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js.map +0 -1
  181. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +0 -135
  182. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +0 -1
  183. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +0 -66
  184. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +0 -1
  185. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +0 -59
  186. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +0 -1
  187. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscription.js.map +0 -1
  188. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +0 -37
  189. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +0 -1
  190. package/dist/commonjs/features/voice/playing/model/VoiceTranscription.model.js.map +0 -1
  191. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +0 -62
  192. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +0 -1
  193. package/dist/module/features/pmProgress/components/list/ListCard.js.map +0 -1
  194. package/dist/module/features/pmProgress/components/list/ListItem.js.map +0 -1
  195. package/dist/module/features/translation/constants.js +0 -7
  196. package/dist/module/features/translation/constants.js.map +0 -1
  197. package/dist/module/features/translation/helpers.js +0 -53
  198. package/dist/module/features/translation/helpers.js.map +0 -1
  199. package/dist/module/features/translation/index.js +0 -12
  200. package/dist/module/features/translation/index.js.map +0 -1
  201. package/dist/module/features/translation/model/TranslationModel.js +0 -117
  202. package/dist/module/features/translation/model/TranslationModel.js.map +0 -1
  203. package/dist/module/features/translation/model/TranslationPreprocessor.js +0 -137
  204. package/dist/module/features/translation/model/TranslationPreprocessor.js.map +0 -1
  205. package/dist/module/features/translation/model/TranslationService.js +0 -107
  206. package/dist/module/features/translation/model/TranslationService.js.map +0 -1
  207. package/dist/module/features/translation/preserve/wordsToPreserve.js +0 -310
  208. package/dist/module/features/translation/preserve/wordsToPreserve.js.map +0 -1
  209. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js +0 -45
  210. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
  211. package/dist/module/features/translation/providers/google/supportedLanguages.js +0 -225
  212. package/dist/module/features/translation/providers/google/supportedLanguages.js.map +0 -1
  213. package/dist/module/features/translation/providers/google.types.js +0 -2
  214. package/dist/module/features/translation/providers/google.types.js.map +0 -1
  215. package/dist/module/features/translation/providers/translation.interface.js +0 -44
  216. package/dist/module/features/translation/providers/translation.interface.js.map +0 -1
  217. package/dist/module/features/translation/types.js +0 -2
  218. package/dist/module/features/translation/types.js.map +0 -1
  219. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js +0 -38
  220. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js.map +0 -1
  221. package/dist/module/features/voice/playing/components/VoiceTranscription.js +0 -127
  222. package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +0 -1
  223. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +0 -58
  224. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +0 -1
  225. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +0 -51
  226. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +0 -1
  227. package/dist/module/features/voice/playing/hooks/useVoiceTranscription.js.map +0 -1
  228. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +0 -32
  229. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +0 -1
  230. package/dist/module/features/voice/playing/model/VoiceTranscription.model.js.map +0 -1
  231. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +0 -57
  232. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +0 -1
  233. package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts.map +0 -1
  234. package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts +0 -13
  235. package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts.map +0 -1
  236. package/dist/typescript/commonjs/features/translation/constants.d.ts +0 -5
  237. package/dist/typescript/commonjs/features/translation/constants.d.ts.map +0 -1
  238. package/dist/typescript/commonjs/features/translation/helpers.d.ts +0 -9
  239. package/dist/typescript/commonjs/features/translation/helpers.d.ts.map +0 -1
  240. package/dist/typescript/commonjs/features/translation/index.d.ts +0 -12
  241. package/dist/typescript/commonjs/features/translation/index.d.ts.map +0 -1
  242. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts +0 -33
  243. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts.map +0 -1
  244. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts +0 -34
  245. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
  246. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts +0 -40
  247. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts.map +0 -1
  248. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts +0 -3
  249. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
  250. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -17
  251. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
  252. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts +0 -209
  253. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
  254. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts +0 -15
  255. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts.map +0 -1
  256. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts +0 -30
  257. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts.map +0 -1
  258. package/dist/typescript/commonjs/features/translation/types.d.ts +0 -27
  259. package/dist/typescript/commonjs/features/translation/types.d.ts.map +0 -1
  260. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts +0 -8
  261. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +0 -1
  262. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts +0 -16
  263. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +0 -1
  264. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +0 -10
  265. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +0 -1
  266. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +0 -12
  267. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +0 -1
  268. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +0 -1
  269. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +0 -12
  270. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +0 -1
  271. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscription.model.d.ts.map +0 -1
  272. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +0 -25
  273. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +0 -1
  274. package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts.map +0 -1
  275. package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts +0 -13
  276. package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts.map +0 -1
  277. package/dist/typescript/module/features/translation/constants.d.ts +0 -5
  278. package/dist/typescript/module/features/translation/constants.d.ts.map +0 -1
  279. package/dist/typescript/module/features/translation/helpers.d.ts +0 -9
  280. package/dist/typescript/module/features/translation/helpers.d.ts.map +0 -1
  281. package/dist/typescript/module/features/translation/index.d.ts +0 -12
  282. package/dist/typescript/module/features/translation/index.d.ts.map +0 -1
  283. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts +0 -33
  284. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts.map +0 -1
  285. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts +0 -34
  286. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
  287. package/dist/typescript/module/features/translation/model/TranslationService.d.ts +0 -40
  288. package/dist/typescript/module/features/translation/model/TranslationService.d.ts.map +0 -1
  289. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts +0 -3
  290. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
  291. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -17
  292. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
  293. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts +0 -209
  294. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
  295. package/dist/typescript/module/features/translation/providers/google.types.d.ts +0 -15
  296. package/dist/typescript/module/features/translation/providers/google.types.d.ts.map +0 -1
  297. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts +0 -30
  298. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts.map +0 -1
  299. package/dist/typescript/module/features/translation/types.d.ts +0 -27
  300. package/dist/typescript/module/features/translation/types.d.ts.map +0 -1
  301. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts +0 -8
  302. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +0 -1
  303. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts +0 -16
  304. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +0 -1
  305. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +0 -10
  306. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +0 -1
  307. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +0 -12
  308. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +0 -1
  309. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +0 -1
  310. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +0 -12
  311. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +0 -1
  312. package/dist/typescript/module/features/voice/playing/model/VoiceTranscription.model.d.ts.map +0 -1
  313. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +0 -25
  314. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +0 -1
  315. package/src/features/translation/constants.ts +0 -4
  316. package/src/features/translation/helpers.ts +0 -63
  317. package/src/features/translation/index.ts +0 -30
  318. package/src/features/translation/model/TranslationModel.ts +0 -174
  319. package/src/features/translation/model/TranslationPreprocessor.ts +0 -171
  320. package/src/features/translation/model/TranslationService.ts +0 -148
  321. package/src/features/translation/preserve/wordsToPreserve.ts +0 -87
  322. package/src/features/translation/providers/google/GoogleTranslationProvider.ts +0 -50
  323. package/src/features/translation/providers/google/supportedLanguages.ts +0 -229
  324. package/src/features/translation/providers/google.types.ts +0 -16
  325. package/src/features/translation/providers/translation.interface.ts +0 -63
  326. package/src/features/translation/types.ts +0 -30
  327. package/src/features/voice/playing/components/VoiceTranscriptContent.tsx +0 -37
  328. package/src/features/voice/playing/components/VoiceTranscription.tsx +0 -172
  329. package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +0 -59
  330. package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +0 -62
  331. package/src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts +0 -44
  332. package/src/features/voice/playing/model/VoiceTranscriptionTranslation.model.ts +0 -75
@@ -1,44 +0,0 @@
1
- import { useEffect, useRef } from 'react'
2
- import { AnswerAudio } from '../../types'
3
- import { VoicePlayerModel } from '../model'
4
-
5
- type Params = {
6
- model: VoicePlayerModel
7
- answers: AnswerAudio[]
8
- answersKey: string
9
- problemId: string
10
- activeAttempt: number | null
11
- }
12
-
13
- export const useVoiceTranscriptionEffects = ({
14
- model,
15
- answers,
16
- answersKey,
17
- problemId,
18
- activeAttempt,
19
- }: Params) => {
20
- const answersRef = useRef(answers)
21
- answersRef.current = answers
22
-
23
- useEffect(() => {
24
- model.reinitializePlayer()
25
- return () => model.cleanup()
26
- }, [model])
27
-
28
- useEffect(() => {
29
- const lastAnswerHasNoDrawing = !answers[answers.length - 1]?.drawing
30
- model.dropdown.setExpanded(answers.length > 0 && lastAnswerHasNoDrawing)
31
- model.resetPlayer()
32
- }, [problemId])
33
-
34
- useEffect(() => {
35
- if (answersRef.current.some((answer) => answer.audioFileId)) {
36
- model.initializeWithAudios(answersRef.current)
37
- model.loader.loadAllTranscripts()
38
- }
39
- }, [model, answersKey])
40
-
41
- useEffect(() => {
42
- model.stopAudio()
43
- }, [activeAttempt])
44
- }
@@ -1,75 +0,0 @@
1
- import { createEffect, createEvent, createStore, restore } from 'effector'
2
- import { VoiceTranscriptionsCollection } from './VoiceTranscriptionsCollection'
3
- import { VoicePlayerApi } from '../../types'
4
- import { TranslationService } from '../../../translation/model/TranslationService'
5
- import { GoogleTranslationProvider } from '../../../translation/providers/google/GoogleTranslationProvider'
6
- import {
7
- preservedWordsReplacers,
8
- wordsToPreserve,
9
- } from '../../../translation/preserve/wordsToPreserve'
10
-
11
- type TranslateParams = {
12
- attemptNumber: number
13
- targetLanguage: string
14
- }
15
-
16
- type TranslateResult = {
17
- attemptNumber: number
18
- text: string
19
- }
20
-
21
- export class VoiceTranscriptionTranslationModel {
22
- private readonly collection: VoiceTranscriptionsCollection
23
- private readonly service: TranslationService
24
-
25
- public readonly toggle = createEvent()
26
- public readonly setActive = createEvent<boolean>()
27
- public readonly clearCache = createEvent()
28
- public readonly reset = createEvent()
29
-
30
- public readonly $isActive = restore(this.setActive, false)
31
- .on(this.toggle, (state) => !state)
32
- .reset(this.reset)
33
-
34
- public readonly translate = createEffect<TranslateParams, TranslateResult | null>(
35
- async ({ attemptNumber, targetLanguage }) => {
36
- const item = this.collection.get(attemptNumber)
37
- if (!item?.transcript) return null
38
-
39
- const text = await this.service.translate(item.transcript, {
40
- targetLang: targetLanguage,
41
- sourceLang: item.transcriptLanguage,
42
- cacheKey: `voice::${attemptNumber}::${targetLanguage}`,
43
- })
44
-
45
- if (!text) return null
46
-
47
- return { attemptNumber, text }
48
- },
49
- )
50
-
51
- public readonly $translations = createStore<Record<number, string>>({})
52
- .on(this.translate.doneData, (state, result) => {
53
- if (!result) return state
54
- return { ...state, [result.attemptNumber]: result.text }
55
- })
56
- .reset(this.reset, this.clearCache)
57
-
58
- constructor(collection: VoiceTranscriptionsCollection, api: VoicePlayerApi) {
59
- this.collection = collection
60
- this.service = new TranslationService({
61
- preserve: {
62
- map: wordsToPreserve,
63
- replacers: preservedWordsReplacers,
64
- },
65
- providers: [new GoogleTranslationProvider({ api: { translateRequest: api.translateText } })],
66
- })
67
-
68
- this.clearCache.watch(() => this.service.reset())
69
- this.reset.watch(() => this.service.reset())
70
- }
71
-
72
- public getTranslation(attemptNumber: number): string | undefined {
73
- return this.$translations.getState()[attemptNumber]
74
- }
75
- }