@magmamath/students-features 1.3.23-rc.8 → 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 (330) 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 -15
  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 -15
  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.map +1 -1
  96. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +2 -4
  97. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  98. package/dist/typescript/commonjs/features/voice/playing/model/{VoiceTranscription.model.d.ts → VoiceTranscriptionsDropdown.model.d.ts} +2 -2
  99. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  100. package/dist/typescript/commonjs/features/voice/types.d.ts +1 -9
  101. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  102. package/dist/typescript/commonjs/index.d.ts +0 -1
  103. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  104. package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -1
  105. package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts.map +1 -1
  106. package/dist/typescript/module/features/pmProgress/components/list/{ListCard.d.ts → DomainCard.d.ts} +6 -6
  107. package/dist/typescript/module/features/pmProgress/components/list/DomainCard.d.ts.map +1 -0
  108. package/dist/typescript/module/features/pmProgress/components/list/StandardItem.d.ts +13 -0
  109. package/dist/typescript/module/features/pmProgress/components/list/StandardItem.d.ts.map +1 -0
  110. package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -1
  111. package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
  112. package/dist/typescript/module/features/voice/index.d.ts +1 -1
  113. package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
  114. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
  115. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  116. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  117. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  118. package/dist/typescript/module/features/voice/playing/hooks/{useVoiceTranscription.d.ts → useVoiceTranscriptionsDropdown.d.ts} +3 -3
  119. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  120. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  121. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  122. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -1
  123. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +2 -4
  124. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  125. package/dist/typescript/module/features/voice/playing/model/{VoiceTranscription.model.d.ts → VoiceTranscriptionsDropdown.model.d.ts} +2 -2
  126. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  127. package/dist/typescript/module/features/voice/types.d.ts +1 -9
  128. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  129. package/dist/typescript/module/index.d.ts +0 -1
  130. package/dist/typescript/module/index.d.ts.map +1 -1
  131. package/package.json +1 -1
  132. package/src/features/pmProgress/components/chart/chart.helpers.ts +1 -0
  133. package/src/features/pmProgress/components/header/StartButton.tsx +11 -1
  134. package/src/features/pmProgress/components/list/{ListCard.tsx → DomainCard.tsx} +12 -19
  135. package/src/features/pmProgress/components/list/Fluency.tsx +3 -3
  136. package/src/features/pmProgress/components/list/PmDomainList.tsx +3 -3
  137. package/src/features/pmProgress/components/list/{ListItem.tsx → StandardItem.tsx} +4 -4
  138. package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +8 -4
  139. package/src/features/pmProgress/components/standard/StandardTag.tsx +2 -6
  140. package/src/features/pmProgress/shared/pmProgress.helpers.ts +1 -2
  141. package/src/features/voice/index.ts +1 -1
  142. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +296 -0
  143. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +128 -0
  144. package/src/features/voice/playing/hooks/{useVoiceTranscription.ts → useVoiceTranscriptionsDropdown.ts} +2 -2
  145. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
  146. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +5 -8
  147. package/src/features/voice/playing/model/VoicePlayer.model.ts +2 -7
  148. package/src/features/voice/playing/model/{VoiceTranscription.model.ts → VoiceTranscriptionsDropdown.model.ts} +2 -2
  149. package/src/features/voice/types.ts +0 -15
  150. package/src/index.ts +0 -1
  151. package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +0 -1
  152. package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +0 -1
  153. package/dist/commonjs/features/translation/constants.js +0 -11
  154. package/dist/commonjs/features/translation/constants.js.map +0 -1
  155. package/dist/commonjs/features/translation/helpers.js +0 -60
  156. package/dist/commonjs/features/translation/helpers.js.map +0 -1
  157. package/dist/commonjs/features/translation/index.js +0 -105
  158. package/dist/commonjs/features/translation/index.js.map +0 -1
  159. package/dist/commonjs/features/translation/model/TranslationModel.js +0 -122
  160. package/dist/commonjs/features/translation/model/TranslationModel.js.map +0 -1
  161. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js +0 -142
  162. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js.map +0 -1
  163. package/dist/commonjs/features/translation/model/TranslationService.js +0 -112
  164. package/dist/commonjs/features/translation/model/TranslationService.js.map +0 -1
  165. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js +0 -314
  166. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js.map +0 -1
  167. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js +0 -43
  168. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
  169. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js +0 -203
  170. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js.map +0 -1
  171. package/dist/commonjs/features/translation/providers/google.types.js +0 -2
  172. package/dist/commonjs/features/translation/providers/google.types.js.map +0 -1
  173. package/dist/commonjs/features/translation/providers/translation.interface.js +0 -35
  174. package/dist/commonjs/features/translation/providers/translation.interface.js.map +0 -1
  175. package/dist/commonjs/features/translation/types.js +0 -2
  176. package/dist/commonjs/features/translation/types.js.map +0 -1
  177. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js +0 -44
  178. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js.map +0 -1
  179. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +0 -131
  180. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +0 -1
  181. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +0 -66
  182. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +0 -1
  183. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +0 -59
  184. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +0 -1
  185. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscription.js.map +0 -1
  186. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +0 -37
  187. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +0 -1
  188. package/dist/commonjs/features/voice/playing/model/VoiceTranscription.model.js.map +0 -1
  189. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +0 -62
  190. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +0 -1
  191. package/dist/module/features/pmProgress/components/list/ListCard.js.map +0 -1
  192. package/dist/module/features/pmProgress/components/list/ListItem.js.map +0 -1
  193. package/dist/module/features/translation/constants.js +0 -7
  194. package/dist/module/features/translation/constants.js.map +0 -1
  195. package/dist/module/features/translation/helpers.js +0 -53
  196. package/dist/module/features/translation/helpers.js.map +0 -1
  197. package/dist/module/features/translation/index.js +0 -12
  198. package/dist/module/features/translation/index.js.map +0 -1
  199. package/dist/module/features/translation/model/TranslationModel.js +0 -117
  200. package/dist/module/features/translation/model/TranslationModel.js.map +0 -1
  201. package/dist/module/features/translation/model/TranslationPreprocessor.js +0 -137
  202. package/dist/module/features/translation/model/TranslationPreprocessor.js.map +0 -1
  203. package/dist/module/features/translation/model/TranslationService.js +0 -107
  204. package/dist/module/features/translation/model/TranslationService.js.map +0 -1
  205. package/dist/module/features/translation/preserve/wordsToPreserve.js +0 -310
  206. package/dist/module/features/translation/preserve/wordsToPreserve.js.map +0 -1
  207. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js +0 -38
  208. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
  209. package/dist/module/features/translation/providers/google/supportedLanguages.js +0 -199
  210. package/dist/module/features/translation/providers/google/supportedLanguages.js.map +0 -1
  211. package/dist/module/features/translation/providers/google.types.js +0 -2
  212. package/dist/module/features/translation/providers/google.types.js.map +0 -1
  213. package/dist/module/features/translation/providers/translation.interface.js +0 -30
  214. package/dist/module/features/translation/providers/translation.interface.js.map +0 -1
  215. package/dist/module/features/translation/types.js +0 -2
  216. package/dist/module/features/translation/types.js.map +0 -1
  217. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js +0 -38
  218. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js.map +0 -1
  219. package/dist/module/features/voice/playing/components/VoiceTranscription.js +0 -123
  220. package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +0 -1
  221. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +0 -58
  222. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +0 -1
  223. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +0 -51
  224. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +0 -1
  225. package/dist/module/features/voice/playing/hooks/useVoiceTranscription.js.map +0 -1
  226. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +0 -32
  227. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +0 -1
  228. package/dist/module/features/voice/playing/model/VoiceTranscription.model.js.map +0 -1
  229. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +0 -57
  230. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +0 -1
  231. package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts.map +0 -1
  232. package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts +0 -13
  233. package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts.map +0 -1
  234. package/dist/typescript/commonjs/features/translation/constants.d.ts +0 -5
  235. package/dist/typescript/commonjs/features/translation/constants.d.ts.map +0 -1
  236. package/dist/typescript/commonjs/features/translation/helpers.d.ts +0 -9
  237. package/dist/typescript/commonjs/features/translation/helpers.d.ts.map +0 -1
  238. package/dist/typescript/commonjs/features/translation/index.d.ts +0 -12
  239. package/dist/typescript/commonjs/features/translation/index.d.ts.map +0 -1
  240. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts +0 -33
  241. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts.map +0 -1
  242. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts +0 -34
  243. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
  244. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts +0 -40
  245. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts.map +0 -1
  246. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts +0 -3
  247. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
  248. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -16
  249. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
  250. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts +0 -197
  251. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
  252. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts +0 -15
  253. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts.map +0 -1
  254. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts +0 -23
  255. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts.map +0 -1
  256. package/dist/typescript/commonjs/features/translation/types.d.ts +0 -27
  257. package/dist/typescript/commonjs/features/translation/types.d.ts.map +0 -1
  258. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts +0 -8
  259. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +0 -1
  260. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts +0 -16
  261. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +0 -1
  262. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +0 -10
  263. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +0 -1
  264. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +0 -12
  265. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +0 -1
  266. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +0 -1
  267. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +0 -12
  268. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +0 -1
  269. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscription.model.d.ts.map +0 -1
  270. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +0 -25
  271. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +0 -1
  272. package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts.map +0 -1
  273. package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts +0 -13
  274. package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts.map +0 -1
  275. package/dist/typescript/module/features/translation/constants.d.ts +0 -5
  276. package/dist/typescript/module/features/translation/constants.d.ts.map +0 -1
  277. package/dist/typescript/module/features/translation/helpers.d.ts +0 -9
  278. package/dist/typescript/module/features/translation/helpers.d.ts.map +0 -1
  279. package/dist/typescript/module/features/translation/index.d.ts +0 -12
  280. package/dist/typescript/module/features/translation/index.d.ts.map +0 -1
  281. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts +0 -33
  282. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts.map +0 -1
  283. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts +0 -34
  284. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
  285. package/dist/typescript/module/features/translation/model/TranslationService.d.ts +0 -40
  286. package/dist/typescript/module/features/translation/model/TranslationService.d.ts.map +0 -1
  287. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts +0 -3
  288. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
  289. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -16
  290. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
  291. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts +0 -197
  292. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
  293. package/dist/typescript/module/features/translation/providers/google.types.d.ts +0 -15
  294. package/dist/typescript/module/features/translation/providers/google.types.d.ts.map +0 -1
  295. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts +0 -23
  296. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts.map +0 -1
  297. package/dist/typescript/module/features/translation/types.d.ts +0 -27
  298. package/dist/typescript/module/features/translation/types.d.ts.map +0 -1
  299. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts +0 -8
  300. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +0 -1
  301. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts +0 -16
  302. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +0 -1
  303. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +0 -10
  304. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +0 -1
  305. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +0 -12
  306. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +0 -1
  307. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +0 -1
  308. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +0 -12
  309. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +0 -1
  310. package/dist/typescript/module/features/voice/playing/model/VoiceTranscription.model.d.ts.map +0 -1
  311. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +0 -25
  312. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +0 -1
  313. package/src/features/translation/constants.ts +0 -4
  314. package/src/features/translation/helpers.ts +0 -63
  315. package/src/features/translation/index.ts +0 -30
  316. package/src/features/translation/model/TranslationModel.ts +0 -174
  317. package/src/features/translation/model/TranslationPreprocessor.ts +0 -171
  318. package/src/features/translation/model/TranslationService.ts +0 -148
  319. package/src/features/translation/preserve/wordsToPreserve.ts +0 -87
  320. package/src/features/translation/providers/google/GoogleTranslationProvider.ts +0 -34
  321. package/src/features/translation/providers/google/supportedLanguages.ts +0 -196
  322. package/src/features/translation/providers/google.types.ts +0 -16
  323. package/src/features/translation/providers/translation.interface.ts +0 -49
  324. package/src/features/translation/types.ts +0 -30
  325. package/src/features/voice/playing/components/VoiceTranscriptContent.tsx +0 -37
  326. package/src/features/voice/playing/components/VoiceTranscription.tsx +0 -163
  327. package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +0 -59
  328. package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +0 -62
  329. package/src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts +0 -44
  330. package/src/features/voice/playing/model/VoiceTranscriptionTranslation.model.ts +0 -75
@@ -1,123 +0,0 @@
1
- "use strict";
2
-
3
- import { Typography, COLORS } from '@magmamath/react-native-ui';
4
- import { useUnit } from 'effector-react';
5
- import React, { useCallback, useEffect, useMemo } from 'react';
6
- import { useTranslation } from 'react-i18next';
7
- import { StyleSheet, View } from 'react-native';
8
- import Animated from 'react-native-reanimated';
9
- import { NO_AUDIO_BE_MESSAGE } from "../../constants.js";
10
- import { getActiveAttempt } from "../../helpers.js";
11
- import { VoiceTranscriptionVariant } from "../../types.js";
12
- import { useText } from "../../../../i18n/i18n.js";
13
- import { useVoiceTranscriptionEffects } from "../hooks/useVoiceTranscriptionEffects.js";
14
- import { VoiceTranscriptContent } from "./VoiceTranscriptContent.js";
15
- import { VoiceTranscriptionCollapsible } from "./VoiceTranscriptionCollapsible.js";
16
- import { VoiceTranscriptionHeaderActions } from "./VoiceTranscriptionHeaderActions.js";
17
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
18
- export const VoiceTranscription = ({
19
- style,
20
- model,
21
- answers,
22
- attemptOffset,
23
- attemptsCount,
24
- problemId,
25
- variant = VoiceTranscriptionVariant.SMALL
26
- }) => {
27
- const t = useText();
28
- const {
29
- i18n
30
- } = useTranslation();
31
- const [playerState, isLoadingTranscripts, isTranslationActive, translations, isTranslating] = useUnit([model.$playerState, model.loader.loadAllTranscripts.pending, model.translation.$isActive, model.translation.$translations, model.translation.translate.pending]);
32
- const activeAttempt = getActiveAttempt(attemptOffset, attemptsCount);
33
- const isLargeVariant = variant === VoiceTranscriptionVariant.LARGE;
34
- const answersKey = useMemo(() => answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(','), [answers]);
35
- useVoiceTranscriptionEffects({
36
- model,
37
- answers,
38
- answersKey,
39
- problemId,
40
- activeAttempt
41
- });
42
- const hasActiveAudio = activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined;
43
- const activeTranscript = activeAttempt !== null ? model.loader.getTranscript(activeAttempt) : null;
44
- const hasTranscriptText = !!activeTranscript && activeTranscript !== NO_AUDIO_BE_MESSAGE;
45
- const isActiveTranscriptLoading = isLoadingTranscripts && hasActiveAudio && !activeTranscript;
46
- const cachedTranslation = activeAttempt !== null ? translations[activeAttempt] : undefined;
47
- const showTranslation = isTranslationActive && hasTranscriptText;
48
- const isTranslationLoading = showTranslation && !cachedTranslation && isTranslating;
49
- const displayText = showTranslation ? cachedTranslation ?? activeTranscript : hasTranscriptText ? activeTranscript : t('voice.transcriptNotAvailable');
50
- useEffect(() => {
51
- if (showTranslation && activeAttempt !== null && !cachedTranslation && !isTranslating) {
52
- model.translation.translate({
53
- attemptNumber: activeAttempt,
54
- targetLanguage: i18n.language
55
- });
56
- }
57
- }, [showTranslation, activeAttempt, cachedTranslation, isTranslating, i18n.language, model]);
58
- const handlePlayPress = useCallback(() => {
59
- if (activeAttempt) {
60
- model.translation.setActive(false);
61
- model.togglePlayPause(activeAttempt);
62
- }
63
- }, [model, activeAttempt]);
64
- const handleTranslationToggle = useCallback(() => {
65
- model.translation.toggle();
66
- }, [model]);
67
- return /*#__PURE__*/_jsxs(Animated.View, {
68
- style: [styles.container, isLargeVariant && styles.largeContainer, style],
69
- children: [/*#__PURE__*/_jsxs(View, {
70
- style: styles.header,
71
- children: [/*#__PURE__*/_jsx(Typography, {
72
- style: styles.title,
73
- variant: "h7",
74
- children: t('voice.transcriptions')
75
- }), hasActiveAudio && /*#__PURE__*/_jsx(VoiceTranscriptionHeaderActions, {
76
- playerState: playerState,
77
- isTranslationActive: isTranslationActive,
78
- canTranslate: hasTranscriptText,
79
- onPlayPress: handlePlayPress,
80
- onTranslationPress: handleTranslationToggle
81
- })]
82
- }), isLargeVariant ? /*#__PURE__*/_jsx(VoiceTranscriptContent, {
83
- text: displayText,
84
- isLoading: isActiveTranscriptLoading || isTranslationLoading
85
- }) : /*#__PURE__*/_jsx(VoiceTranscriptionCollapsible, {
86
- text: displayText,
87
- isLoading: isActiveTranscriptLoading || isTranslationLoading,
88
- dropdown: model.dropdown
89
- })]
90
- });
91
- };
92
- const styles = StyleSheet.create({
93
- container: {
94
- position: 'absolute',
95
- top: 56,
96
- left: 8,
97
- width: 222,
98
- maxHeight: 405,
99
- minHeight: 51,
100
- padding: 4,
101
- boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
102
- borderRadius: 12,
103
- backgroundColor: COLORS.NEUTRAL_1,
104
- overflow: 'hidden'
105
- },
106
- largeContainer: {
107
- width: '98%',
108
- height: '100%'
109
- },
110
- header: {
111
- flexDirection: 'row',
112
- justifyContent: 'space-between',
113
- alignItems: 'center',
114
- padding: 4,
115
- marginBottom: 4,
116
- height: 32
117
- },
118
- title: {
119
- color: COLORS.NEUTRAL_9,
120
- marginLeft: 4
121
- }
122
- });
123
- //# sourceMappingURL=VoiceTranscription.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Typography","COLORS","useUnit","React","useCallback","useEffect","useMemo","useTranslation","StyleSheet","View","Animated","NO_AUDIO_BE_MESSAGE","getActiveAttempt","VoiceTranscriptionVariant","useText","useVoiceTranscriptionEffects","VoiceTranscriptContent","VoiceTranscriptionCollapsible","VoiceTranscriptionHeaderActions","jsx","_jsx","jsxs","_jsxs","VoiceTranscription","style","model","answers","attemptOffset","attemptsCount","problemId","variant","SMALL","t","i18n","playerState","isLoadingTranscripts","isTranslationActive","translations","isTranslating","$playerState","loader","loadAllTranscripts","pending","translation","$isActive","$translations","translate","activeAttempt","isLargeVariant","LARGE","answersKey","map","a","_id","audioFileId","join","hasActiveAudio","undefined","activeTranscript","getTranscript","hasTranscriptText","isActiveTranscriptLoading","cachedTranslation","showTranslation","isTranslationLoading","displayText","attemptNumber","targetLanguage","language","handlePlayPress","setActive","togglePlayPause","handleTranslationToggle","toggle","styles","container","largeContainer","children","header","title","canTranslate","onPlayPress","onTranslationPress","text","isLoading","dropdown","create","position","top","left","width","maxHeight","minHeight","padding","boxShadow","borderRadius","backgroundColor","NEUTRAL_1","overflow","height","flexDirection","justifyContent","alignItems","marginBottom","color","NEUTRAL_9","marginLeft"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscription.tsx"],"mappings":";;AAAA,SAASA,UAAU,EAAEC,MAAM,QAAQ,4BAA4B;AAC/D,SAASC,OAAO,QAAQ,gBAAgB;AACxC,OAAOC,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,OAAO,QAAQ,OAAO;AAC9D,SAASC,cAAc,QAAQ,eAAe;AAC9C,SAAoBC,UAAU,EAAEC,IAAI,QAAmB,cAAc;AACrE,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,mBAAmB,QAAQ,oBAAiB;AACrD,SAASC,gBAAgB,QAAQ,kBAAe;AAChD,SAAsBC,yBAAyB,QAAQ,gBAAa;AACpE,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,4BAA4B,QAAQ,0CAAuC;AAEpF,SAASC,sBAAsB,QAAQ,6BAA0B;AACjE,SAASC,6BAA6B,QAAQ,oCAAiC;AAC/E,SAASC,+BAA+B,QAAQ,sCAAmC;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAYnF,OAAO,MAAMC,kBAAkB,GAAGA,CAAC;EACjCC,KAAK;EACLC,KAAK;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AAE,CAAC;IACVC,SAAS,EAAE,wCAAwC;IACnDC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAE/F,MAAM,CAACgG,SAAS;IACjCC,QAAQ,EAAE;EACZ,CAAC;EACDtB,cAAc,EAAE;IACdc,KAAK,EAAE,KAAK;IACZS,MAAM,EAAE;EACV,CAAC;EACDrB,MAAM,EAAE;IACNsB,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBT,OAAO,EAAE,CAAC;IACVU,YAAY,EAAE,CAAC;IACfJ,MAAM,EAAE;EACV,CAAC;EACDpB,KAAK,EAAE;IACLyB,KAAK,EAAEvG,MAAM,CAACwG,SAAS;IACvBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,58 +0,0 @@
1
- "use strict";
2
-
3
- import { CaretDownIcon } from '@magmamath/react-native-ui';
4
- import React, { useCallback } from 'react';
5
- import { StyleSheet, TouchableOpacity, View } from 'react-native';
6
- import Animated from 'react-native-reanimated';
7
- import { useVoiceTranscriptionDropdown } from "../hooks/useVoiceTranscription.js";
8
- import { VoiceTranscriptContent } from "./VoiceTranscriptContent.js";
9
- import { jsx as _jsx, Fragment as _Fragment, jsxs as _jsxs } from "react/jsx-runtime";
10
- const AnimatedTouchableOpacity = Animated.createAnimatedComponent(TouchableOpacity);
11
- export const VoiceTranscriptionCollapsible = ({
12
- text,
13
- isLoading,
14
- dropdown
15
- }) => {
16
- const {
17
- listAnimatedStyle,
18
- iconAnimatedStyle,
19
- onListLayout
20
- } = useVoiceTranscriptionDropdown(dropdown);
21
- const handleToggle = useCallback(() => {
22
- dropdown.toggleExpand();
23
- }, [dropdown]);
24
- return /*#__PURE__*/_jsxs(_Fragment, {
25
- children: [/*#__PURE__*/_jsx(Animated.View, {
26
- style: [listAnimatedStyle, styles.collapsibleContent],
27
- children: /*#__PURE__*/_jsx(View, {
28
- onLayout: onListLayout,
29
- style: styles.transcriptContainer,
30
- children: /*#__PURE__*/_jsx(VoiceTranscriptContent, {
31
- text: text,
32
- isLoading: isLoading
33
- })
34
- })
35
- }), /*#__PURE__*/_jsx(AnimatedTouchableOpacity, {
36
- style: [styles.expandButton, iconAnimatedStyle],
37
- onPress: handleToggle,
38
- children: /*#__PURE__*/_jsx(CaretDownIcon, {
39
- size: 22
40
- })
41
- })]
42
- });
43
- };
44
- const styles = StyleSheet.create({
45
- collapsibleContent: {
46
- overflow: 'hidden'
47
- },
48
- transcriptContainer: {
49
- position: 'absolute',
50
- width: '100%',
51
- paddingHorizontal: 4
52
- },
53
- expandButton: {
54
- justifyContent: 'center',
55
- alignItems: 'center'
56
- }
57
- });
58
- //# sourceMappingURL=VoiceTranscriptionCollapsible.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["CaretDownIcon","React","useCallback","StyleSheet","TouchableOpacity","View","Animated","useVoiceTranscriptionDropdown","VoiceTranscriptContent","jsx","_jsx","Fragment","_Fragment","jsxs","_jsxs","AnimatedTouchableOpacity","createAnimatedComponent","VoiceTranscriptionCollapsible","text","isLoading","dropdown","listAnimatedStyle","iconAnimatedStyle","onListLayout","handleToggle","toggleExpand","children","style","styles","collapsibleContent","onLayout","transcriptContainer","expandButton","onPress","size","create","overflow","position","width","paddingHorizontal","justifyContent","alignItems"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionCollapsible.tsx"],"mappings":";;AAAA,SAASA,aAAa,QAAQ,4BAA4B;AAC1D,OAAOC,KAAK,IAAIC,WAAW,QAAQ,OAAO;AAC1C,SAASC,UAAU,EAAEC,gBAAgB,EAAEC,IAAI,QAAQ,cAAc;AACjE,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,6BAA6B,QAAQ,mCAAgC;AAE9E,SAASC,sBAAsB,QAAQ,6BAA0B;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,QAAA,IAAAC,SAAA,EAAAC,IAAA,IAAAC,KAAA;AAEjE,MAAMC,w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EAAE;IACZQ,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,51 +0,0 @@
1
- "use strict";
2
-
3
- import { Button, COLORS, GlobeIcon, SPACING } from '@magmamath/react-native-ui';
4
- import React from 'react';
5
- import { StyleSheet } from 'react-native';
6
- import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
7
- import { ColorScheme } from "../../../chatbot/types/style.types.js";
8
- import { PlayButton } from "../../../../shared/components/PlayButton.js";
9
- import { PlayerState } from "../model/index.js";
10
- import { getAudioStatus } from "../../helpers.js";
11
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
- export const VoiceTranscriptionHeaderActions = ({
13
- playerState,
14
- isTranslationActive,
15
- canTranslate,
16
- onPlayPress,
17
- onTranslationPress
18
- }) => {
19
- const playButtonState = {
20
- isActive: playerState !== PlayerState.IDLE,
21
- isLoading: playerState === PlayerState.LOADING,
22
- status: getAudioStatus(playerState)
23
- };
24
- return /*#__PURE__*/_jsxs(Animated.View, {
25
- entering: FadeIn.duration(120),
26
- exiting: FadeOut.duration(120),
27
- style: styles.container,
28
- children: [/*#__PURE__*/_jsx(PlayButton, {
29
- state: playButtonState,
30
- onPress: onPlayPress,
31
- activityIndicatorColor: COLORS.NEUTRAL_1
32
- }), canTranslate && /*#__PURE__*/_jsx(Button, {
33
- variant: "secondary",
34
- size: "small",
35
- colorScheme: ColorScheme.Blue,
36
- isActive: isTranslationActive,
37
- onPress: onTranslationPress,
38
- icon: /*#__PURE__*/_jsx(GlobeIcon, {
39
- color: isTranslationActive ? COLORS.NEUTRAL_1 : COLORS.NEUTRAL_9
40
- })
41
- })]
42
- });
43
- };
44
- const styles = StyleSheet.create({
45
- container: {
46
- flexDirection: 'row',
47
- alignItems: 'center',
48
- gap: SPACING[200]
49
- }
50
- });
51
- //# sourceMappingURL=VoiceTranscriptionHeaderActions.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Button","COLORS","GlobeIcon","SPACING","React","StyleSheet","Animated","FadeIn","FadeOut","ColorScheme","PlayButton","PlayerState","getAudioStatus","jsx","_jsx","jsxs","_jsxs","VoiceTranscriptionHeaderActions","playerState","isTranslationActive","canTranslate","onPlayPress","onTranslationPress","playButtonState","isActive","IDLE","isLoading","LOADING","status","View","entering","duration","exiting","style","styles","container","children","state","onPress","activityIndicatorColor","NEUTRAL_1","variant","size","colorScheme","Blue","icon","color","NEUTRAL_9","create","flexDirection","alignItems","gap"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,MAAM,EAAEC,SAAS,EAAEC,OAAO,QAAQ,4BAA4B;AAC/E,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,QAAQ,cAAc;AACzC,OAAOC,QAAQ,IAAIC,MAAM,EAAEC,OAAO,QAAQ,yBAAyB;AACnE,SAASC,WAAW,QAAQ,uCAAoC;AAChE,SAASC,UAAU,QAAQ,6CAA0C;AACrE,SAASC,WAAW,QAAQ,mBAAU;AACtC,SAASC,cAAc,QAAQ,kBAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAU9C,OAAO,MAAMC,+BAA+B,GAAGA,CAAC;EAC9CC,WAAW;EACXC,mBAAmB;EACnBC,YAAY;EACZC,WAAW;EACXC;AACqC,CAAC,KAAK;EAC3C,MAAMC,eAAe,GAAG;IACtBC,QAAQ,EAAEN,WAAW,KAAKP,WAAW,CAACc,IAAI;IAC1CC,SAAS,EAAER,WAAW,KAAKP,WAAW,CAACgB,OAAO;IAC9CC,MAAM,EAAEhB,cAAc,CAACM,WAAW;EACpC,CAAC;EAED,oBACEF,KAAA,CAACV,QAAQ,CAACuB,IAAI;IACZC,QAAQ,EAAEvB,MAAM,CAACwB,QAAQ,CAAC,GAAG,CAAE;IAC/BC,OAAO,EAAExB,OAAO,CAACuB,QAAQ,CAAC,GAAG,CAAE;IAC/BE,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAExBtB,IAAA,CAACJ,UAAU;MACT2B,KAAK,EAAEd,eAAgB;MACvBe,OAAO,EAAEjB,WAAY;MACrBkB,sBAAsB,EAAEtC,MAAM,CAACuC;IAAU,CAC1C,CAAC,EACDpB,YAAY,iBACXN,IAAA,CAACd,MAAM;MACLyC,OAAO,EAAC,WAAW;MACnBC,IAAI,EAAC,OAAO;MACZC,WAAW,EAAElC,WAAW,CAACmC,IAAK;MAC9BpB,QAAQ,EAAEL,mBAAoB;MAC9BmB,OAAO,EAAEhB,kBAAmB;MAC5BuB,IAAI,eAAE/B,IAAA,CAACZ,SAAS;QAAC4C,KAAK,EAAE3B,mBAAmB,GAAGlB,MAAM,CAACuC,SAAS,GAAGvC,MAAM,CAAC8C;MAAU,CAAE;IAAE,CACvF,CACF;EAAA,CACY,CAAC;AAEpB,CAAC;AAED,MAAMb,MAAM,GAAG7B,UAAU,CAAC2C,MAAM,CAAC;EAC/Bb,SAAS,EAAE;IACTc,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAEhD,OAAO,CAAC,GAAG;EAClB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useUnit","useAnimatedStyle","useSharedValue","withTiming","interpolate","DROPDOWN_MAX_CONTENT_HEIGHT","useVoiceTranscriptionDropdown","model","isExpanded","$isExpanded","contentHeight","animationProgress","onListLayout","event","measuredHeight","nativeEvent","layout","height","value","listAnimatedStyle","opacity","iconAnimatedStyle","rotation","transform","rotate","duration"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscription.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,EAAEC,WAAW,QAAQ,yBAAyB;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CAAC;IAC1C,CAAC;EACH,CAAC,EAAE,CAACX,iBAAiB,CAAC,CAAC;EAEvBZ,SAAS,CAAC,MAAM;IACdY,iBAAiB,CAACO,KAAK,GAAGf,UAAU,CAACK,UAAU,GAAG,CAAC,GAAG,CAAC,EAAE;MAAEiB,QAAQ,EAAE;IAAI,CAAC,CAAC;EAC7E,CAAC,EAAE,CAACjB,UAAU,EAAEG,iBAAiB,CAAC,CAAC;EAEnC,OAAO;IACLH,UAAU;IACVW,iBAAiB;IACjBE,iBAAiB;IACjBT;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,32 +0,0 @@
1
- "use strict";
2
-
3
- import { useEffect, useRef } from 'react';
4
- export const useVoiceTranscriptionEffects = ({
5
- model,
6
- answers,
7
- answersKey,
8
- problemId,
9
- activeAttempt
10
- }) => {
11
- const answersRef = useRef(answers);
12
- answersRef.current = answers;
13
- useEffect(() => {
14
- model.reinitializePlayer();
15
- return () => model.cleanup();
16
- }, [model]);
17
- useEffect(() => {
18
- const lastAnswerHasNoDrawing = !answers[answers.length - 1]?.drawing;
19
- model.dropdown.setExpanded(answers.length > 0 && lastAnswerHasNoDrawing);
20
- model.resetPlayer();
21
- }, [problemId]);
22
- useEffect(() => {
23
- if (answersRef.current.some(answer => answer.audioFileId)) {
24
- model.initializeWithAudios(answersRef.current);
25
- model.loader.loadAllTranscripts();
26
- }
27
- }, [model, answersKey]);
28
- useEffect(() => {
29
- model.stopAudio();
30
- }, [activeAttempt]);
31
- };
32
- //# sourceMappingURL=useVoiceTranscriptionEffects.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useRef","useVoiceTranscriptionEffects","model","answers","answersKey","problemId","activeAttempt","answersRef","current","reinitializePlayer","cleanup","lastAnswerHasNoDrawing","length","drawing","dropdown","setExpanded","resetPlayer","some","answer","audioFileId","initializeWithAudios","loader","loadAllTranscripts","stopAudio"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionEffects.ts"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAYzC,OAAO,MAAMC,4BAA4B,GAAGA,CAAC;EAC3CC,KAAK;EACLC,OAAO;EACPC,UAAU;EACVC,SAAS;EACTC;AACM,CAAC,KAAK;EACZ,MAAMC,UAAU,GAAGP,MAAM,CAACG,OAAO,CAAC;EAClCI,UAAU,CAACC,OAAO,GAAGL,OAAO;EAE5BJ,SAAS,CAAC,MAAM;IACdG,KAAK,CAACO,kBAAkB,CAAC,CAAC;IAC1B,OAAO,MAAMP,KAAK,CAACQ,OAAO,CAAC,CAAC;EAC9B,CAAC,EAAE,CAACR,KAAK,CAAC,CAAC;EAEXH,SAAS,CAAC,MAAM;IACd,MAAMY,sBAAsB,GAAG,CAACR,OAAO,CAACA,OAAO,CAACS,MAAM,GAAG,CAAC,CAAC,EAAEC,OAAO;IACpEX,KAAK,CAACY,QAAQ,CAACC,WAAW,CAACZ,OAAO,CAACS,MAAM,GAAG,CAAC,IAAID,sBAAsB,CAAC;IACxET,KAAK,CAACc,WAAW,CAAC,CAAC;EACrB,CAAC,EAAE,CAACX,SAAS,CAAC,CAAC;EAEfN,SAAS,CAAC,MAAM;IACd,IAAIQ,UAAU,CAACC,OAAO,CAACS,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACC,WAAW,CAAC,EAAE;MAC3DjB,KAAK,CAACkB,oBAAoB,CAACb,UAAU,CAACC,OAAO,CAAC;MAC9CN,KAAK,CAACmB,MAAM,CAACC,kBAAkB,CAAC,CAAC;IACnC;EACF,CAAC,EAAE,CAACpB,KAAK,EAAEE,UAAU,CAAC,CAAC;EAEvBL,SAAS,CAAC,MAAM;IACdG,KAAK,CAACqB,SAAS,CAAC,CAAC;EACnB,CAAC,EAAE,CAACjB,aAAa,CAAC,CAAC;AACrB,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["createEvent","restore","VoiceTranscriptionModel","toggleExpand","setExpanded","reset","$isExpanded","on","state"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscription.model.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,QAAQ,UAAU;AAE/C,OAAO,MAAMC,uBAAuB,CAAC;EACnBC,YAAY,GAAGH,WAAW,CAAC,CAAC;EAC5BI,WAAW,GAAGJ,WAAW,CAAU,CAAC;EACpCK,KAAK,GAAGL,WAAW,CAAC,CAAC;EAErBM,WAAW,GAAGL,OAAO,CAAC,IAAI,CAACG,WAAW,EAAE,KAAK,CAAC,CAC3DG,EAAE,CAAC,IAAI,CAACJ,YAAY,EAAGK,KAAK,IAAK,CAACA,KAAK,CAAC,CACxCH,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;AACtB","ignoreList":[]}
@@ -1,57 +0,0 @@
1
- "use strict";
2
-
3
- import { createEffect, createEvent, createStore, restore } from 'effector';
4
- import { TranslationService } from "../../../translation/model/TranslationService.js";
5
- import { GoogleTranslationProvider } from "../../../translation/providers/google/GoogleTranslationProvider.js";
6
- import { preservedWordsReplacers, wordsToPreserve } from "../../../translation/preserve/wordsToPreserve.js";
7
- export class VoiceTranscriptionTranslationModel {
8
- toggle = createEvent();
9
- setActive = createEvent();
10
- clearCache = createEvent();
11
- reset = createEvent();
12
- $isActive = restore(this.setActive, false).on(this.toggle, state => !state).reset(this.reset);
13
- translate = createEffect(async ({
14
- attemptNumber,
15
- targetLanguage
16
- }) => {
17
- const item = this.collection.get(attemptNumber);
18
- if (!item?.transcript) return null;
19
- const text = await this.service.translate(item.transcript, {
20
- targetLang: targetLanguage,
21
- sourceLang: item.transcriptLanguage,
22
- cacheKey: `voice::${attemptNumber}::${targetLanguage}`
23
- });
24
- if (!text) return null;
25
- return {
26
- attemptNumber,
27
- text
28
- };
29
- });
30
- $translations = createStore({}).on(this.translate.doneData, (state, result) => {
31
- if (!result) return state;
32
- return {
33
- ...state,
34
- [result.attemptNumber]: result.text
35
- };
36
- }).reset(this.reset, this.clearCache);
37
- constructor(collection, api) {
38
- this.collection = collection;
39
- this.service = new TranslationService({
40
- preserve: {
41
- map: wordsToPreserve,
42
- replacers: preservedWordsReplacers
43
- },
44
- providers: [new GoogleTranslationProvider({
45
- api: {
46
- translateRequest: api.translateText
47
- }
48
- })]
49
- });
50
- this.clearCache.watch(() => this.service.reset());
51
- this.reset.watch(() => this.service.reset());
52
- }
53
- getTranslation(attemptNumber) {
54
- return this.$translations.getState()[attemptNumber];
55
- }
56
- }
57
- //# sourceMappingURL=VoiceTranscriptionTranslation.model.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["createEffect","createEvent","createStore","restore","TranslationService","GoogleTranslationProvider","preservedWordsReplacers","wordsToPreserve","VoiceTranscriptionTranslationModel","toggle","setActive","clearCache","reset","$isActive","on","state","translate","attemptNumber","targetLanguage","item","collection","get","transcript","text","service","targetLang","sourceLang","transcriptLanguage","cacheKey","$translations","doneData","result","constructor","api","preserve","map","replacers","providers","translateRequest","translateText","watch","getTranslation","getState"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionTranslation.model.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,WAAW,EAAEC,WAAW,EAAEC,OAAO,QAAQ,UAAU;AAG1E,SAASC,kBAAkB,QAAQ,kDAA+C;AAClF,SAASC,yBAAyB,QAAQ,oEAAiE;AAC3G,SACEC,uBAAuB,EACvBC,eAAe,QACV,kDAA+C;AAYtD,OAAO,MAAMC,kCAAkC,CAAC;EAI9BC,MAAM,GAAGR,WAAW,CAAC,CAAC;EACtBS,SAAS,GAAGT,WAAW,CAAU,CAAC;EAClCU,UAAU,GAAGV,WAAW,CAAC,CAAC;EAC1BW,KAAK,GAAGX,WAAW,CAAC,CAAC;EAErBY,SAAS,GAAGV,OAAO,CAAC,IAAI,CAACO,SAAS,EAAE,KAAK,CAAC,CACvDI,EAAE,CAAC,IAAI,CAACL,MAAM,EAAGM,KAAK,IAAK,CAACA,KAAK,CAAC,CAClCH,KAAK,CAAC,IAAI,CA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gB,EAAEL,GAAG,CAACM;QAAc;MAAE,CAAC,CAAC;IAC7F,CAAC,CAAC;IAEF,IAAI,CAAC5B,UAAU,CAAC6B,KAAK,CAAC,MAAM,IAAI,CAAChB,OAAO,CAACZ,KAAK,CAAC,CAAC,CAAC;IACjD,IAAI,CAACA,KAAK,CAAC4B,KAAK,CAAC,MAAM,IAAI,CAAChB,OAAO,CAACZ,KAAK,CAAC,CAAC,CAAC;EAC9C;EAEO6B,cAAcA,CAACxB,aAAqB,EAAsB;IAC/D,OAAO,IAAI,CAACY,aAAa,CAACa,QAAQ,CAAC,CAAC,CAACzB,aAAa,CAAC;EACrD;AACF","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListCard.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/list/ListCard.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAkBvC,MAAM,MAAM,YAAY,GAAG;IACzB,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,WAAW,EAAE,OAAO,CAAA;IACpB,UAAU,EAAE,MAAM,CAAA;IAClB,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAQD,KAAK,aAAa,CAAC,CAAC,SAAS,YAAY,IAAI;IAC3C,KAAK,EAAE,MAAM,CAAA;IACb,IAAI,EAAE,KAAK,CAAC,YAAY,CAAA;IACxB,KAAK,EAAE,MAAM,CAAA;IACb,KAAK,EAAE,CAAC,EAAE,CAAA;IACV,WAAW,CAAC,EAAE,CAAC,IAAI,EAAE,CAAC,KAAK,IAAI,CAAA;IAC/B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,IAAI,CAAA;IACtB,UAAU,CAAC,EAAE,MAAM,IAAI,CAAA;IACvB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IAC9B,OAAO,CAAC,EAAE,OAAO,CAAA;IACjB,MAAM,CAAC,EAAE,OAAO,CAAA;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAA;IACjB,aAAa,CAAC,EAAE,MAAM,CAAA;IACtB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,aAAa,CAAC,EAAE,OAAO,CAAA;IACvB,aAAa,CAAC,EAAE,MAAM,GAAG,IAAI,CAAA;IAC7B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,YAAY,uNAoB5C,aAAa,CAAC,CAAC,CAAC,sBAkFlB,CAAA"}
@@ -1,13 +0,0 @@
1
- import React from 'react';
2
- export type ListItemProps = {
3
- title: string;
4
- subtitle: string;
5
- skillsLeft: number;
6
- isFinished?: boolean;
7
- isLoading?: boolean;
8
- onPress?: () => void;
9
- isSkillsLeftHidden?: boolean;
10
- testID?: string;
11
- };
12
- export declare const ListItem: ({ title, subtitle, skillsLeft, isFinished, isLoading, onPress, isSkillsLeftHidden, testID, }: ListItemProps) => React.JSX.Element;
13
- //# sourceMappingURL=ListItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"ListItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/pmProgress/components/list/ListItem.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAmB,MAAM,OAAO,CAAA;AAoBvC,MAAM,MAAM,aAAa,GAAG;IAC1B,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,EAAE,MAAM,CAAA;IAChB,UAAU,EAAE,MAAM,CAAA;IAClB,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAA;IACpB,kBAAkB,CAAC,EAAE,OAAO,CAAA;IAC5B,MAAM,CAAC,EAAE,MAAM,CAAA;CAChB,CAAA;AAED,eAAO,MAAM,QAAQ,iGASlB,aAAa,sBAgEf,CAAA"}
@@ -1,5 +0,0 @@
1
- export declare const GBD_TEXT_CACHE_SUFFIX = "::gbd";
2
- export declare const DESCRIPTION_CACHE_KEY_SUFFIX = "::description";
3
- export declare const CHOICES_CACHE_KEY_SUFFIX = "::choices";
4
- export declare const PRACTICE_THEORY_CACHE_KEY_SUFFIX = "::practice-theory";
5
- //# sourceMappingURL=constants.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../../../src/features/translation/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,qBAAqB,UAAU,CAAA;AAC5C,eAAO,MAAM,4BAA4B,kBAAkB,CAAA;AAC3D,eAAO,MAAM,wBAAwB,cAAc,CAAA;AACnD,eAAO,MAAM,gCAAgC,sBAAsB,CAAA"}
@@ -1,9 +0,0 @@
1
- import { MaskSegmentParams } from './types';
2
- export declare function replaceMappedTokens(input: string, map: Record<string, string>): string;
3
- /**
4
- * Masks text segments matched by `regex` with a placeholder,
5
- * while preserving spaces around the original match.
6
- */
7
- export declare const maskSegment: ({ text, regex, placeholder, replacements, shouldSkip, }: MaskSegmentParams) => string;
8
- export declare const decodeHtmlEntities: (text: string) => string;
9
- //# sourceMappingURL=helpers.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"helpers.d.ts","sourceRoot":"","sources":["../../../../../src/features/translation/helpers.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAA;AAE3C,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,GAAG,MAAM,CAWtF;AAED;;;GAGG;AACH,eAAO,MAAM,WAAW,4DAMrB,iBAAiB,KAAG,MAkBtB,CAAA;AAWD,eAAO,MAAM,kBAAkB,SAAU,MAAM,KAAG,MAQjD,CAAA"}
@@ -1,12 +0,0 @@
1
- export { TranslationModel } from './model/TranslationModel';
2
- export { TranslationService, type TranslateConfigProps } from './model/TranslationService';
3
- export { TranslationKatexPreprocessor } from './model/TranslationPreprocessor';
4
- export { TranslationProvider, type LanguageGlossary } from './providers/translation.interface';
5
- export { GoogleTranslationProvider } from './providers/google/GoogleTranslationProvider';
6
- export { GoogleTranslateLanguage } from './providers/google/supportedLanguages';
7
- export type { GoogleTranslateProps, GoogleTranslateResponse, GoogleTranslation, } from './providers/google.types';
8
- export { wordsToPreserve, preservedWordsReplacers } from './preserve/wordsToPreserve';
9
- export { GBD_TEXT_CACHE_SUFFIX, DESCRIPTION_CACHE_KEY_SUFFIX, CHOICES_CACHE_KEY_SUFFIX, PRACTICE_THEORY_CACHE_KEY_SUFFIX, } from './constants';
10
- export { replaceMappedTokens, maskSegment, decodeHtmlEntities, } from './helpers';
11
- export type { TranslatableProblem, TranslateAllFxParams, TranslateFxParams, Replacement, MaskSegmentParams, } from './types';
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../src/features/translation/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAA;AAC3D,OAAO,EAAE,kBAAkB,EAAE,KAAK,oBAAoB,EAAE,MAAM,4BAA4B,CAAA;AAC1F,OAAO,EAAE,4BAA4B,EAAE,MAAM,iCAAiC,CAAA;AAC9E,OAAO,EAAE,mBAAmB,EAAE,KAAK,gBAAgB,EAAE,MAAM,mCAAmC,CAAA;AAC9F,OAAO,EAAE,yBAAyB,EAAE,MAAM,8CAA8C,CAAA;AACxF,OAAO,EAAE,uBAAuB,EAAE,MAAM,uCAAuC,CAAA;AAC/E,YAAY,EACV,oBAAoB,EACpB,uBAAuB,EACvB,iBAAiB,GAClB,MAAM,0BAA0B,CAAA;AACjC,OAAO,EAAE,eAAe,EAAE,uBAAuB,EAAE,MAAM,4BAA4B,CAAA;AACrF,OAAO,EACL,qBAAqB,EACrB,4BAA4B,EAC5B,wBAAwB,EACxB,gCAAgC,GACjC,MAAM,aAAa,CAAA;AACpB,OAAO,EACL,mBAAmB,EACnB,WAAW,EACX,kBAAkB,GACnB,MAAM,WAAW,CAAA;AAClB,YAAY,EACV,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,WAAW,EACX,iBAAiB,GAClB,MAAM,SAAS,CAAA"}
@@ -1,33 +0,0 @@
1
- import { Store, Unit } from 'effector';
2
- import { GoogleTranslateProps, GoogleTranslateResponse } from '../providers/google.types';
3
- import { TranslatableProblem, TranslateFxParams } from '../types';
4
- type TranslationModelProps<TProblem extends TranslatableProblem> = {
5
- $problem: Store<TProblem | null>;
6
- $problemId: Store<string>;
7
- $assignmentId: Store<string>;
8
- $currentProblemIndex: Store<number>;
9
- $translationLanguageCode: Store<string>;
10
- $contentLanguageCode?: Store<string>;
11
- $isTranslationLocked: Store<boolean>;
12
- languageChanged: Unit<unknown>;
13
- api: {
14
- translateRequest: (payload: GoogleTranslateProps) => Promise<GoogleTranslateResponse>;
15
- };
16
- getGreatWorkFeedbackText?: () => string;
17
- };
18
- export declare class TranslationModel<TProblem extends TranslatableProblem = TranslatableProblem> {
19
- private readonly service;
20
- readonly toggle: import("effector").EventCallable<void>;
21
- readonly setTranslated: import("effector").EventCallable<boolean>;
22
- readonly reset: import("effector").EventCallable<void>;
23
- readonly $isTranslationActive: import("effector").StoreWritable<boolean>;
24
- readonly $isTranslated: import("effector").StoreWritable<boolean>;
25
- readonly $isTranslationPending: Store<boolean>;
26
- readonly translateFx: import("effector").Effect<TranslateFxParams, string, Error>;
27
- readonly translateAllFx: import("effector").Effect<void, unknown[] | undefined, Error>;
28
- constructor({ $problem, $problemId, $assignmentId, $currentProblemIndex, $translationLanguageCode, $contentLanguageCode, $isTranslationLocked, languageChanged, api, getGreatWorkFeedbackText, }: TranslationModelProps<TProblem>);
29
- getTranslated<T extends string | string[]>(key: string): T | undefined;
30
- clearCache(): void;
31
- }
32
- export {};
33
- //# sourceMappingURL=TranslationModel.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TranslationModel.d.ts","sourceRoot":"","sources":["../../../../../../src/features/translation/model/TranslationModel.ts"],"names":[],"mappings":"AAAA,OAAO,EAQL,KAAK,EACL,IAAI,EACL,MAAM,UAAU,CAAA;AAEjB,OAAO,EACL,oBAAoB,EACpB,uBAAuB,EACxB,MAAM,2BAA2B,CAAA;AAWlC,OAAO,EACL,mBAAmB,EAEnB,iBAAiB,EAClB,MAAM,UAAU,CAAA;AAEjB,KAAK,qBAAqB,CAAC,QAAQ,SAAS,mBAAmB,IAAI;IACjE,QAAQ,EAAE,KAAK,CAAC,QAAQ,GAAG,IAAI,CAAC,CAAA;IAChC,UAAU,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACzB,aAAa,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IAC5B,oBAAoB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACnC,wBAAwB,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACvC,oBAAoB,CAAC,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACpC,oBAAoB,EAAE,KAAK,CAAC,OAAO,CAAC,CAAA;IACpC,eAAe,EAAE,IAAI,CAAC,OAAO,CAAC,CAAA;IAC9B,GAAG,EAAE;QACH,gBAAgB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;KACtF,CAAA;IACD,wBAAwB,CAAC,EAAE,MAAM,MAAM,CAAA;CACxC,CAAA;AAED,qBAAa,gBAAgB,CAAC,QAAQ,SAAS,mBAAmB,GAAG,mBAAmB;IACtF,OAAO,CAAC,QAAQ,CAAC,OAAO,CAAoB;IAE5C,SAAgB,MAAM,yCAAgB;IACtC,SAAgB,aAAa,4CAAyB;IACtD,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,oBAAoB,4CAAuD;IAC3F,SAAgB,aAAa,4CAA4B;IACzD,SAAgB,qBAAqB,iBAAA;IAErC,SAAgB,WAAW,8DAAA;IAC3B,SAAgB,cAAc,gEAAA;gBAElB,EACV,QAAQ,EACR,UAAU,EACV,aAAa,EACb,oBAAoB,EACpB,wBAAwB,EACxB,oBAAoB,EACpB,oBAAoB,EACpB,eAAe,EACf,GAAG,EACH,wBAAwB,GACzB,EAAE,qBAAqB,CAAC,QAAQ,CAAC;IA8F3B,aAAa,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAItE,UAAU;CAGlB"}
@@ -1,34 +0,0 @@
1
- import { LanguageGlossary } from '../providers/translation.interface';
2
- import { Replacement } from '../types';
3
- type SetupPreservableProps = {
4
- glossaryToPreserve: LanguageGlossary;
5
- preserveWordsReplacers: [RegExp, string][];
6
- };
7
- export declare class TranslationKatexPreprocessor {
8
- private static plaintextConverter;
9
- static setPlaintextConverter(converter: (text: string) => string): void;
10
- static shouldSkipTranslation(text?: string | string[]): boolean;
11
- static isMathExpressionOnly(text: string): boolean;
12
- static isSingleLetter(text: string): boolean;
13
- static isMathSymbolsOnly(text: string): boolean;
14
- private globalTargetLanguage;
15
- private preserveWordsMap;
16
- private preserveWordsReplacers;
17
- private normalizePlaceholderSpacing;
18
- sanitize(text: string): {
19
- sanitized: string;
20
- replacements: Replacement[];
21
- };
22
- restore(text: string, replacements: Replacement[]): string;
23
- sanitizeBatch(texts: string[]): {
24
- sanitized: string[];
25
- replacements: Replacement[][];
26
- };
27
- restoreBatch(texts: string[], replacementsArray: Replacement[][]): string[];
28
- setupPreservable({ glossaryToPreserve, preserveWordsReplacers }: SetupPreservableProps): void;
29
- setupTarget(language: string): void;
30
- private skipCustomReplacerSanitizeWithoutGlossary;
31
- private applyPreserved;
32
- }
33
- export {};
34
- //# sourceMappingURL=TranslationPreprocessor.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TranslationPreprocessor.d.ts","sourceRoot":"","sources":["../../../../../../src/features/translation/model/TranslationPreprocessor.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,gBAAgB,EAAE,MAAM,oCAAoC,CAAA;AAErE,OAAO,EAAE,WAAW,EAAE,MAAM,UAAU,CAAA;AA2BtC,KAAK,qBAAqB,GAAG;IAC3B,kBAAkB,EAAE,gBAAgB,CAAA;IACpC,sBAAsB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAAE,CAAA;CAC3C,CAAA;AAED,qBAAa,4BAA4B;IACvC,OAAO,CAAC,MAAM,CAAC,kBAAkB,CAA2C;WAE9D,qBAAqB,CAAC,SAAS,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM;WAIzD,qBAAqB,CAAC,IAAI,GAAE,MAAM,GAAG,MAAM,EAAO;WAYlD,oBAAoB,CAAC,IAAI,EAAE,MAAM;WAIjC,cAAc,CAAC,IAAI,EAAE,MAAM;WAI3B,iBAAiB,CAAC,IAAI,EAAE,MAAM;IAO5C,OAAO,CAAC,oBAAoB,CAAsB;IAClD,OAAO,CAAC,gBAAgB,CAAuB;IAC/C,OAAO,CAAC,sBAAsB,CAAyB;IAEvD,OAAO,CAAC,2BAA2B;IAM5B,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,YAAY,EAAE,WAAW,EAAE,CAAA;KAAE;IA8B1E,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,WAAW,EAAE;IAUjD,aAAa,CAAC,KAAK,EAAE,MAAM,EAAE,GAAG;QAAE,SAAS,EAAE,MAAM,EAAE,CAAC;QAAC,YAAY,EAAE,WAAW,EAAE,EAAE,CAAA;KAAE;IAatF,YAAY,CAAC,KAAK,EAAE,MAAM,EAAE,EAAE,iBAAiB,EAAE,WAAW,EAAE,EAAE;IAYhE,gBAAgB,CAAC,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,EAAE,qBAAqB;IAKtF,WAAW,CAAC,QAAQ,EAAE,MAAM;IAInC,OAAO,CAAC,yCAAyC;IAYjD,OAAO,CAAC,cAAc;CAMvB"}
@@ -1,40 +0,0 @@
1
- import { Store } from 'effector';
2
- import { LanguageGlossary, TranslationProvider } from '../providers/translation.interface';
3
- type TranslationServiceProps = {
4
- providers: TranslationProvider[];
5
- preserve?: {
6
- map: LanguageGlossary;
7
- replacers: [RegExp, string][];
8
- };
9
- onError?: () => void;
10
- };
11
- export type TranslateConfigProps = {
12
- targetLang?: string;
13
- sourceLang?: string;
14
- cacheKeySuffix?: string;
15
- cacheKey?: string;
16
- };
17
- export declare class TranslationService {
18
- private readonly preprocessor;
19
- private readonly cache;
20
- private readonly providers;
21
- private readonly onError;
22
- private globalTargetLanguage;
23
- private sourceLanguage;
24
- private customCacheKeyFn;
25
- constructor({ providers, preserve, onError }: TranslationServiceProps);
26
- private getTargetLanguage;
27
- private getProvider;
28
- private createCacheKey;
29
- translate: <T extends string | string[]>(text?: T, config?: TranslateConfigProps) => Promise<T>;
30
- bindTargetLanguage<T extends string>(store: Store<T>, callback?: (value: T) => string): this;
31
- bindSourceLanguage<T extends string>(store: Store<T>): this;
32
- bindCustomCacheKey<T extends string>(store: Store<T>, callback: (value: T, input: {
33
- text: string | string[];
34
- target: string;
35
- }) => string): this;
36
- getCached<T extends string | string[]>(key: string): T | undefined;
37
- reset(): void;
38
- }
39
- export {};
40
- //# sourceMappingURL=TranslationService.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"TranslationService.d.ts","sourceRoot":"","sources":["../../../../../../src/features/translation/model/TranslationService.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,UAAU,CAAA;AAEhC,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,oCAAoC,CAAA;AAE1F,KAAK,uBAAuB,GAAG;IAC7B,SAAS,EAAE,mBAAmB,EAAE,CAAA;IAChC,QAAQ,CA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CAAC,CAAC,CAAC,EACf,QAAQ,EAAE,CAAC,KAAK,EAAE,CAAC,EAAE,KAAK,EAAE;QAAE,IAAI,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,KAAK,MAAM,GACjF,IAAI;IASA,SAAS,CAAC,CAAC,SAAS,MAAM,GAAG,MAAM,EAAE,EAAE,GAAG,EAAE,MAAM,GAAG,CAAC,GAAG,SAAS;IAIlE,KAAK;CAGb"}
@@ -1,3 +0,0 @@
1
- export declare const wordsToPreserve: Record<string, Record<string, string>>;
2
- export declare const preservedWordsReplacers: [RegExp, string][];
3
- //# sourceMappingURL=wordsToPreserve.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"wordsToPreserve.d.ts","sourceRoot":"","sources":["../../../../../../src/features/translation/preserve/wordsToPreserve.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CA4ElE,CAAA;AAOD,eAAO,MAAM,uBAAuB,EAAE,CAAC,MAAM,EAAE,MAAM,CAAC,EAGrD,CAAA"}
@@ -1,16 +0,0 @@
1
- import { LanguageGlossary, TranslationProvider } from '../translation.interface';
2
- import { GoogleTranslateProps, GoogleTranslateResponse } from '../google.types';
3
- type GoogleTranslationProviderProps = {
4
- api: {
5
- translateRequest: (payload: GoogleTranslateProps) => Promise<GoogleTranslateResponse>;
6
- };
7
- glossaries?: LanguageGlossary;
8
- };
9
- export declare class GoogleTranslationProvider extends TranslationProvider {
10
- private readonly getTranslationFx;
11
- constructor({ api, glossaries }: GoogleTranslationProviderProps);
12
- request(text: string, targetLanguage: string, sourceLanguage?: string): Promise<string>;
13
- requestBatch(text: string[], targetLanguage: string, sourceLanguage?: string): Promise<string[]>;
14
- }
15
- export {};
16
- //# sourceMappingURL=GoogleTranslationProvider.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"GoogleTranslationProvider.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/translation/providers/google/GoogleTranslationProvider.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,0BAA0B,CAAA;AAEhF,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,iBAAiB,CAAA;AAG/E,KAAK,8BAA8B,GAAG;IACpC,GAAG,EAAE;QACH,gBAAgB,EAAE,CAAC,OAAO,EAAE,oBAAoB,KAAK,OAAO,CAAC,uBAAuB,CAAC,CAAA;KACtF,CAAA;IACD,UAAU,CAAC,EAAE,gBAAgB,CAAA;CAC9B,CAAA;AAED,qBAAa,yBAA0B,SAAQ,mBAAmB;IAChE,OAAO,CAAC,QAAQ,CAAC,gBAAgB,CAAuD;gBAE5E,EAAE,GAAG,EAAE,UAAU,EAAE,EAAE,8BAA8B;IAKlD,OAAO,CAAC,IAAI,EAAE,MAAM,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM;IAMrE,YAAY,CAAC,IAAI,EAAE,MAAM,EAAE,EAAE,cAAc,EAAE,MAAM,EAAE,cAAc,CAAC,EAAE,MAAM;CAM1F"}