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

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 (282) hide show
  1. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +48 -39
  2. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +1 -1
  3. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +2 -2
  4. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -1
  5. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +8 -7
  6. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -1
  7. package/dist/commonjs/features/voice/playing/hooks/{useDropdownAnimation.js → useVoiceTranscription.js} +7 -8
  8. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscription.js.map +1 -0
  9. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +37 -0
  10. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +1 -0
  11. package/dist/commonjs/features/voice/playing/model/Player.model.js +1 -24
  12. package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -1
  13. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +66 -0
  14. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
  15. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
  16. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
  17. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +175 -46
  18. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  19. package/dist/commonjs/features/voice/playing/model/{Dropdown.model.js → VoiceTranscription.model.js} +4 -4
  20. package/dist/commonjs/features/voice/playing/model/VoiceTranscription.model.js.map +1 -0
  21. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +15 -0
  22. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +1 -0
  23. package/dist/commonjs/features/voice/playing/model/{TranscriptionsCollection.js → VoiceTranscriptionsCollection.js} +4 -4
  24. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
  25. package/dist/commonjs/features/voice/types.js.map +1 -1
  26. package/dist/commonjs/index.js +0 -12
  27. package/dist/commonjs/index.js.map +1 -1
  28. package/dist/module/features/voice/playing/components/VoiceTranscription.js +47 -40
  29. package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +1 -1
  30. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +2 -2
  31. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -1
  32. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +7 -8
  33. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -1
  34. package/dist/module/features/voice/playing/hooks/{useDropdownAnimation.js → useVoiceTranscription.js} +5 -6
  35. package/dist/module/features/voice/playing/hooks/useVoiceTranscription.js.map +1 -0
  36. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +32 -0
  37. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +1 -0
  38. package/dist/module/features/voice/playing/model/Player.model.js +1 -24
  39. package/dist/module/features/voice/playing/model/Player.model.js.map +1 -1
  40. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +61 -0
  41. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
  42. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
  43. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
  44. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +177 -48
  45. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  46. package/dist/module/features/voice/playing/model/{Dropdown.model.js → VoiceTranscription.model.js} +2 -2
  47. package/dist/module/features/voice/playing/model/VoiceTranscription.model.js.map +1 -0
  48. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +10 -0
  49. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +1 -0
  50. package/dist/module/features/voice/playing/model/{TranscriptionsCollection.js → VoiceTranscriptionsCollection.js} +2 -2
  51. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
  52. package/dist/module/features/voice/types.js.map +1 -1
  53. package/dist/module/index.js +0 -1
  54. package/dist/module/index.js.map +1 -1
  55. package/dist/typescript/commonjs/features/voice/index.d.ts +0 -1
  56. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
  57. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -1
  58. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +2 -2
  59. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -1
  60. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -1
  61. package/dist/typescript/commonjs/features/voice/playing/hooks/{useDropdownAnimation.d.ts → useVoiceTranscription.d.ts} +3 -3
  62. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +1 -0
  63. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +12 -0
  64. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +1 -0
  65. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +0 -3
  66. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -1
  67. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
  68. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
  69. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
  70. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
  71. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +20 -18
  72. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  73. package/dist/typescript/commonjs/features/voice/playing/model/{Dropdown.model.d.ts → VoiceTranscription.model.d.ts} +2 -2
  74. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscription.model.d.ts.map +1 -0
  75. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +7 -0
  76. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +1 -0
  77. package/dist/typescript/{module/features/voice/playing/model/TranscriptionsCollection.d.ts → commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts} +2 -2
  78. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
  79. package/dist/typescript/commonjs/features/voice/types.d.ts +1 -4
  80. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  81. package/dist/typescript/commonjs/index.d.ts +0 -1
  82. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  83. package/dist/typescript/module/features/voice/index.d.ts +0 -1
  84. package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
  85. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -1
  86. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +2 -2
  87. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -1
  88. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -1
  89. package/dist/typescript/module/features/voice/playing/hooks/{useDropdownAnimation.d.ts → useVoiceTranscription.d.ts} +3 -3
  90. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +1 -0
  91. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +12 -0
  92. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +1 -0
  93. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +0 -3
  94. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -1
  95. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
  96. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
  97. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
  98. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
  99. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +20 -18
  100. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  101. package/dist/typescript/module/features/voice/playing/model/{Dropdown.model.d.ts → VoiceTranscription.model.d.ts} +2 -2
  102. package/dist/typescript/module/features/voice/playing/model/VoiceTranscription.model.d.ts.map +1 -0
  103. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +7 -0
  104. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +1 -0
  105. package/dist/typescript/{commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts → module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts} +2 -2
  106. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
  107. package/dist/typescript/module/features/voice/types.d.ts +1 -4
  108. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  109. package/dist/typescript/module/index.d.ts +0 -1
  110. package/dist/typescript/module/index.d.ts.map +1 -1
  111. package/package.json +1 -28
  112. package/src/features/voice/index.ts +0 -1
  113. package/src/features/voice/playing/components/VoiceTranscription.tsx +60 -43
  114. package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +4 -4
  115. package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +9 -8
  116. package/src/features/voice/playing/hooks/{useDropdownAnimation.ts → useVoiceTranscription.ts} +5 -5
  117. package/src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts +44 -0
  118. package/src/features/voice/playing/model/Player.model.ts +1 -26
  119. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +80 -0
  120. package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +2 -2
  121. package/src/features/voice/playing/model/VoicePlayer.model.ts +196 -56
  122. package/src/features/voice/playing/model/{Dropdown.model.ts → VoiceTranscription.model.ts} +1 -1
  123. package/src/features/voice/playing/model/VoiceTranscriptionTranslation.model.ts +11 -0
  124. package/src/features/voice/playing/model/{TranscriptionsCollection.ts → VoiceTranscriptionsCollection.ts} +1 -1
  125. package/src/features/voice/types.ts +0 -9
  126. package/src/index.ts +0 -1
  127. package/dist/commonjs/features/translation/constants.js +0 -11
  128. package/dist/commonjs/features/translation/constants.js.map +0 -1
  129. package/dist/commonjs/features/translation/helpers.js +0 -60
  130. package/dist/commonjs/features/translation/helpers.js.map +0 -1
  131. package/dist/commonjs/features/translation/index.js +0 -105
  132. package/dist/commonjs/features/translation/index.js.map +0 -1
  133. package/dist/commonjs/features/translation/model/TranslationModel.js +0 -122
  134. package/dist/commonjs/features/translation/model/TranslationModel.js.map +0 -1
  135. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js +0 -142
  136. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js.map +0 -1
  137. package/dist/commonjs/features/translation/model/TranslationService.js +0 -112
  138. package/dist/commonjs/features/translation/model/TranslationService.js.map +0 -1
  139. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js +0 -314
  140. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js.map +0 -1
  141. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js +0 -50
  142. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
  143. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js +0 -230
  144. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js.map +0 -1
  145. package/dist/commonjs/features/translation/providers/google.types.js +0 -2
  146. package/dist/commonjs/features/translation/providers/google.types.js.map +0 -1
  147. package/dist/commonjs/features/translation/providers/translation.interface.js +0 -49
  148. package/dist/commonjs/features/translation/providers/translation.interface.js.map +0 -1
  149. package/dist/commonjs/features/translation/types.js +0 -2
  150. package/dist/commonjs/features/translation/types.js.map +0 -1
  151. package/dist/commonjs/features/voice/playing/hooks/useDropdownAnimation.js.map +0 -1
  152. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js +0 -128
  153. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +0 -1
  154. package/dist/commonjs/features/voice/playing/model/Dropdown.model.js.map +0 -1
  155. package/dist/commonjs/features/voice/playing/model/PlaybackController.js +0 -183
  156. package/dist/commonjs/features/voice/playing/model/PlaybackController.js.map +0 -1
  157. package/dist/commonjs/features/voice/playing/model/TranscriptionsCollection.js.map +0 -1
  158. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js +0 -82
  159. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js.map +0 -1
  160. package/dist/commonjs/features/voice/playing/model/Translation.model.js +0 -62
  161. package/dist/commonjs/features/voice/playing/model/Translation.model.js.map +0 -1
  162. package/dist/module/features/translation/constants.js +0 -7
  163. package/dist/module/features/translation/constants.js.map +0 -1
  164. package/dist/module/features/translation/helpers.js +0 -53
  165. package/dist/module/features/translation/helpers.js.map +0 -1
  166. package/dist/module/features/translation/index.js +0 -12
  167. package/dist/module/features/translation/index.js.map +0 -1
  168. package/dist/module/features/translation/model/TranslationModel.js +0 -117
  169. package/dist/module/features/translation/model/TranslationModel.js.map +0 -1
  170. package/dist/module/features/translation/model/TranslationPreprocessor.js +0 -137
  171. package/dist/module/features/translation/model/TranslationPreprocessor.js.map +0 -1
  172. package/dist/module/features/translation/model/TranslationService.js +0 -107
  173. package/dist/module/features/translation/model/TranslationService.js.map +0 -1
  174. package/dist/module/features/translation/preserve/wordsToPreserve.js +0 -310
  175. package/dist/module/features/translation/preserve/wordsToPreserve.js.map +0 -1
  176. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js +0 -45
  177. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
  178. package/dist/module/features/translation/providers/google/supportedLanguages.js +0 -225
  179. package/dist/module/features/translation/providers/google/supportedLanguages.js.map +0 -1
  180. package/dist/module/features/translation/providers/google.types.js +0 -2
  181. package/dist/module/features/translation/providers/google.types.js.map +0 -1
  182. package/dist/module/features/translation/providers/translation.interface.js +0 -44
  183. package/dist/module/features/translation/providers/translation.interface.js.map +0 -1
  184. package/dist/module/features/translation/types.js +0 -2
  185. package/dist/module/features/translation/types.js.map +0 -1
  186. package/dist/module/features/voice/playing/hooks/useDropdownAnimation.js.map +0 -1
  187. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js +0 -123
  188. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +0 -1
  189. package/dist/module/features/voice/playing/model/Dropdown.model.js.map +0 -1
  190. package/dist/module/features/voice/playing/model/PlaybackController.js +0 -178
  191. package/dist/module/features/voice/playing/model/PlaybackController.js.map +0 -1
  192. package/dist/module/features/voice/playing/model/TranscriptionsCollection.js.map +0 -1
  193. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js +0 -77
  194. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js.map +0 -1
  195. package/dist/module/features/voice/playing/model/Translation.model.js +0 -57
  196. package/dist/module/features/voice/playing/model/Translation.model.js.map +0 -1
  197. package/dist/typescript/commonjs/features/translation/constants.d.ts +0 -5
  198. package/dist/typescript/commonjs/features/translation/constants.d.ts.map +0 -1
  199. package/dist/typescript/commonjs/features/translation/helpers.d.ts +0 -9
  200. package/dist/typescript/commonjs/features/translation/helpers.d.ts.map +0 -1
  201. package/dist/typescript/commonjs/features/translation/index.d.ts +0 -12
  202. package/dist/typescript/commonjs/features/translation/index.d.ts.map +0 -1
  203. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts +0 -33
  204. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts.map +0 -1
  205. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts +0 -34
  206. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
  207. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts +0 -40
  208. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts.map +0 -1
  209. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts +0 -3
  210. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
  211. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -17
  212. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
  213. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts +0 -209
  214. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
  215. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts +0 -15
  216. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts.map +0 -1
  217. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts +0 -30
  218. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts.map +0 -1
  219. package/dist/typescript/commonjs/features/translation/types.d.ts +0 -27
  220. package/dist/typescript/commonjs/features/translation/types.d.ts.map +0 -1
  221. package/dist/typescript/commonjs/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +0 -1
  222. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +0 -30
  223. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +0 -1
  224. package/dist/typescript/commonjs/features/voice/playing/model/Dropdown.model.d.ts.map +0 -1
  225. package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts +0 -28
  226. package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts.map +0 -1
  227. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts.map +0 -1
  228. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +0 -19
  229. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +0 -1
  230. package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts +0 -25
  231. package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts.map +0 -1
  232. package/dist/typescript/module/features/translation/constants.d.ts +0 -5
  233. package/dist/typescript/module/features/translation/constants.d.ts.map +0 -1
  234. package/dist/typescript/module/features/translation/helpers.d.ts +0 -9
  235. package/dist/typescript/module/features/translation/helpers.d.ts.map +0 -1
  236. package/dist/typescript/module/features/translation/index.d.ts +0 -12
  237. package/dist/typescript/module/features/translation/index.d.ts.map +0 -1
  238. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts +0 -33
  239. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts.map +0 -1
  240. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts +0 -34
  241. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
  242. package/dist/typescript/module/features/translation/model/TranslationService.d.ts +0 -40
  243. package/dist/typescript/module/features/translation/model/TranslationService.d.ts.map +0 -1
  244. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts +0 -3
  245. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
  246. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -17
  247. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
  248. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts +0 -209
  249. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
  250. package/dist/typescript/module/features/translation/providers/google.types.d.ts +0 -15
  251. package/dist/typescript/module/features/translation/providers/google.types.d.ts.map +0 -1
  252. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts +0 -30
  253. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts.map +0 -1
  254. package/dist/typescript/module/features/translation/types.d.ts +0 -27
  255. package/dist/typescript/module/features/translation/types.d.ts.map +0 -1
  256. package/dist/typescript/module/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +0 -1
  257. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +0 -30
  258. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +0 -1
  259. package/dist/typescript/module/features/voice/playing/model/Dropdown.model.d.ts.map +0 -1
  260. package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts +0 -28
  261. package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts.map +0 -1
  262. package/dist/typescript/module/features/voice/playing/model/TranscriptionsCollection.d.ts.map +0 -1
  263. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +0 -19
  264. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +0 -1
  265. package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts +0 -25
  266. package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts.map +0 -1
  267. package/src/features/translation/constants.ts +0 -4
  268. package/src/features/translation/helpers.ts +0 -63
  269. package/src/features/translation/index.ts +0 -30
  270. package/src/features/translation/model/TranslationModel.ts +0 -174
  271. package/src/features/translation/model/TranslationPreprocessor.ts +0 -171
  272. package/src/features/translation/model/TranslationService.ts +0 -148
  273. package/src/features/translation/preserve/wordsToPreserve.ts +0 -87
  274. package/src/features/translation/providers/google/GoogleTranslationProvider.ts +0 -50
  275. package/src/features/translation/providers/google/supportedLanguages.ts +0 -229
  276. package/src/features/translation/providers/google.types.ts +0 -16
  277. package/src/features/translation/providers/translation.interface.ts +0 -63
  278. package/src/features/translation/types.ts +0 -30
  279. package/src/features/voice/playing/hooks/useVoiceTranscriptionController.ts +0 -171
  280. package/src/features/voice/playing/model/PlaybackController.ts +0 -213
  281. package/src/features/voice/playing/model/TranscriptionsDownloader.model.ts +0 -88
  282. package/src/features/voice/playing/model/Translation.model.ts +0 -75
@@ -1,27 +1,31 @@
1
- import { createEvent, restore } from 'effector'
2
- import { TranscriptionsCollection } from './TranscriptionsCollection'
1
+ import { attach, createEffect, createEvent, restore } from 'effector'
2
+ import { VoiceTranscriptionsCollection } from './VoiceTranscriptionsCollection'
3
3
  import { VoiceFileDownloaderModel } from './VoiceFileDownloader.model'
4
- import { DropdownModel } from './Dropdown.model'
5
- import { TranslationModel } from './Translation.model'
4
+ import { VoiceTranscriptionModel } from './VoiceTranscription.model'
5
+ import { VoiceTranscriptionTranslationModel } from './VoiceTranscriptionTranslation.model'
6
6
  import { AnswerAudio, VoicePlayerApi, VoiceTranscriptionItem } from '../../types'
7
- import { PlayerModel } from './Player.model'
8
- import { TranscriptionsDownloaderModel } from './TranscriptionsDownloader.model'
9
- import { PlaybackController } from './PlaybackController'
7
+ import { PlayerModel, PlayerState } from './Player.model'
8
+ import { TranscriptionsDownloaderModel } from './TranscriptionsDownloaderModel'
10
9
 
11
- type VoicePlayerModelParams = {
10
+ type VoiceTranscriptionsPlayerModelParams = {
12
11
  api: VoicePlayerApi
13
12
  audios?: AnswerAudio[]
14
13
  }
14
+ type TogglePlayPauseParams = {
15
+ attemptNumber: number
16
+ playerState: PlayerState
17
+ }
15
18
 
16
19
  export class VoicePlayerModel {
17
- public readonly collection = new TranscriptionsCollection()
18
- public readonly dropdown = new DropdownModel()
20
+ public readonly collection = new VoiceTranscriptionsCollection()
21
+ public readonly downloader = new VoiceFileDownloaderModel()
22
+ public readonly dropdown = new VoiceTranscriptionModel()
23
+ public readonly translation = new VoiceTranscriptionTranslationModel()
19
24
  public readonly playerModel = new PlayerModel()
20
- public readonly downloader: VoiceFileDownloaderModel
21
- public readonly translation: TranslationModel
22
25
  public readonly loader: TranscriptionsDownloaderModel
23
26
  public readonly api: VoicePlayerApi
24
- private readonly playback: PlaybackController
27
+ private currentPlayingAttempt: number | null = null
28
+ private shouldPreventPlayback = false
25
29
 
26
30
  public readonly setCurrentAttempt = createEvent<number | null>()
27
31
  public readonly reset = createEvent()
@@ -30,21 +34,33 @@ export class VoicePlayerModel {
30
34
  public readonly $playerState = this.playerModel.$playerState
31
35
 
32
36
  public readonly pauseAudio = this.playerModel.pause
33
- public readonly seekAudio = this.playerModel.seek
34
37
 
35
- public readonly togglePlayPause: PlaybackController['togglePlayPause']
38
+ public readonly stopAudio = () => {
39
+ this.shouldPreventPlayback = true
40
+ this.abortAllDownloads()
41
+ this.playerModel.stop()
42
+ this.currentPlayingAttempt = null
43
+ this.setCurrentAttempt(null)
44
+ }
45
+
46
+ public readonly resetPlayer = () => {
47
+ this.shouldPreventPlayback = true
48
+ this.releaseCollectionResources()
49
+ this.playerModel.stop()
50
+ this.currentPlayingAttempt = null
51
+ this.setCurrentAttempt(null)
52
+ this.collection.clear()
53
+ }
36
54
 
37
- constructor(params: VoicePlayerModelParams) {
55
+ constructor(params: VoiceTranscriptionsPlayerModelParams) {
38
56
  this.api = params.api
39
- this.downloader = new VoiceFileDownloaderModel(params.api)
40
57
  this.loader = new TranscriptionsDownloaderModel(this.collection, params.api)
41
- this.translation = new TranslationModel(this.collection, params.api)
42
- this.playback = new PlaybackController({
43
- collection: this.collection,
44
- player: this.playerModel,
45
- downloader: this.downloader,
58
+ this.downloader.setApi(params.api)
59
+
60
+ this.playerModel.playbackFinished.watch(() => {
61
+ this.currentPlayingAttempt = null
62
+ this.setCurrentAttempt(null)
46
63
  })
47
- this.togglePlayPause = this.playback.togglePlayPause
48
64
 
49
65
  if (params.audios) {
50
66
  this.initializeCollectionFromAudios(params.audios)
@@ -53,28 +69,158 @@ export class VoicePlayerModel {
53
69
  this.playerModel.setupAudioMode()
54
70
  }
55
71
 
56
- public readonly stopAudio = () => {
57
- this.playback.halt()
72
+ public initializeWithAudios(answerAudio: AnswerAudio[]) {
73
+ this.loader.setTranscriptsLoaded(false)
74
+ this.collection.clear()
75
+ this.initializeCollectionFromAudios(answerAudio)
58
76
  }
59
77
 
60
- public readonly preloadAudio = (attemptNumber?: number) => {
61
- const target = attemptNumber ?? this.$currentAttempt.getState()
62
- if (target === null) return
63
- return this.playback.preloadAudio(target)
78
+ private initializeCollectionFromAudios(audios: AnswerAudio[]) {
79
+ if (!audios) {
80
+ console.warn('VoicePlayerModel: audios is not provided')
81
+ return
82
+ }
83
+ audios.forEach((audio, index) => {
84
+ const attemptNumber = index + 1
85
+ if (!audio.audioFileId) {
86
+ console.warn('VoicePlayerModel: audioFileId is missing for audio', audio)
87
+ return
88
+ }
89
+ this.collection.add(attemptNumber, {
90
+ attemptNumber,
91
+ audioFileId: audio.audioFileId,
92
+ _id: audio._id,
93
+ hasDrawing: !!audio.drawing,
94
+ })
95
+ })
64
96
  }
65
97
 
66
- public readonly resetPlayer = () => {
67
- this.playback.releaseResources()
68
- this.playback.halt()
69
- this.collection.clear()
70
- this.translation.clearCache()
98
+ private releaseCollectionResources() {
99
+ this.collection.getAll().forEach((item) => {
100
+ if (item.controller) {
101
+ this.downloader.abortDownload(item.controller)
102
+ }
103
+ if (item.audioUri?.startsWith('blob:')) {
104
+ try {
105
+ URL.revokeObjectURL(item.audioUri)
106
+ } catch (e) {}
107
+ }
108
+ })
71
109
  }
72
110
 
73
- public initializeWithAudios(answerAudio: AnswerAudio[]) {
74
- this.collection.clear()
75
- this.initializeCollectionFromAudios(answerAudio)
111
+ private abortAllDownloads() {
112
+ this.collection.getAll().forEach((item) => {
113
+ if (item.controller && item.audioLoading) {
114
+ this.downloader.abortDownload(item.controller)
115
+ this.collection.update(item.attemptNumber, {
116
+ audioLoading: false,
117
+ controller: undefined,
118
+ audioDownloadPromise: undefined,
119
+ })
120
+ }
121
+ })
76
122
  }
77
123
 
124
+ private readonly handlePlayAttempt = createEffect(async (attemptNumber: number) => {
125
+ this.shouldPreventPlayback = false
126
+ const item = this.collection.get(attemptNumber)
127
+ if (!item) return
128
+
129
+ if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
130
+ this.abortAllDownloads()
131
+ }
132
+
133
+ if (this.collection.hasAudio(attemptNumber)) {
134
+ this.playAudioFx(attemptNumber)
135
+ return
136
+ }
137
+
138
+ try {
139
+ this.playerModel.setPlayerState(PlayerState.LOADING)
140
+ const { collectionItem, downloadPromise } = await this.downloader.download({
141
+ audioFileId: item.audioFileId,
142
+ attemptNumber,
143
+ })
144
+
145
+ if (this.shouldPreventPlayback) {
146
+ collectionItem.controller?.abort()
147
+ return
148
+ }
149
+
150
+ this.collection.update(attemptNumber, collectionItem)
151
+
152
+ const result = await downloadPromise
153
+
154
+ if (this.shouldPreventPlayback) {
155
+ if (result.uri?.startsWith('blob:')) {
156
+ URL.revokeObjectURL(result.uri)
157
+ }
158
+ return
159
+ }
160
+
161
+ this.collection.update(attemptNumber, {
162
+ audioUri: result.uri,
163
+ audioLoading: false,
164
+ audioError: undefined,
165
+ controller: undefined,
166
+ audioDownloadPromise: undefined,
167
+ })
168
+
169
+ this.playerModel.setPlayerState(PlayerState.IDLE)
170
+ this.playAudioFx(attemptNumber)
171
+ } catch (error) {
172
+ console.error('Audio download error:', error)
173
+ if (error instanceof Error && error.name === 'AbortError') {
174
+ this.playerModel.setPlayerState(PlayerState.IDLE)
175
+ return
176
+ }
177
+
178
+ this.collection.update(attemptNumber, {
179
+ audioLoading: false,
180
+ audioError: error instanceof Error ? error.message : 'Failed to download audio',
181
+ controller: undefined,
182
+ audioDownloadPromise: undefined,
183
+ })
184
+ }
185
+ })
186
+
187
+ private playAudioFx = createEffect(async (attemptNumber: number) => {
188
+ if (this.shouldPreventPlayback) return
189
+
190
+ const item = this.collection.get(attemptNumber)
191
+ if (!item?.audioUri) {
192
+ console.warn('No audio URI available for attempt:', attemptNumber)
193
+ return
194
+ }
195
+
196
+ try {
197
+ if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
198
+ this.playerModel.player?.remove()
199
+ }
200
+
201
+ if (this.currentPlayingAttempt === attemptNumber && this.playerModel.player?.playing) {
202
+ this.playerModel.pause()
203
+ return
204
+ }
205
+
206
+ if (this.currentPlayingAttempt === attemptNumber && !this.playerModel.player?.playing) {
207
+ this.playerModel.resume()
208
+ return
209
+ }
210
+
211
+ this.currentPlayingAttempt = attemptNumber
212
+ this.setCurrentAttempt(attemptNumber)
213
+ await this.playerModel.play(item.audioUri)
214
+ } catch (error) {
215
+ console.error('Error playing audio:', error)
216
+ this.playerModel.setPlayerState(PlayerState.IDLE)
217
+
218
+ this.collection.update(attemptNumber, {
219
+ audioError: error instanceof Error ? error.message : 'Failed to play audio',
220
+ })
221
+ }
222
+ })
223
+
78
224
  public isAudioLoading(attemptNumber: number): boolean {
79
225
  return this.collection.get(attemptNumber)?.audioLoading || false
80
226
  }
@@ -88,31 +234,25 @@ export class VoicePlayerModel {
88
234
  }
89
235
 
90
236
  public cleanup() {
91
- this.playback.releaseResources()
237
+ this.releaseCollectionResources()
92
238
  this.collection.clear()
239
+ this.currentPlayingAttempt = null
93
240
  this.reset()
241
+ this.loader.reset()
94
242
  this.dropdown.reset()
95
243
  this.translation.reset()
96
244
  this.playerModel.release()
97
245
  }
98
246
 
99
- private initializeCollectionFromAudios(audios: AnswerAudio[]) {
100
- if (!audios) {
101
- console.warn('VoicePlayerModel: audios is not provided')
102
- return
103
- }
104
- audios.forEach((audio, index) => {
105
- const attemptNumber = index + 1
106
- if (!audio.audioFileId) {
107
- console.warn('VoicePlayerModel: audioFileId is missing for audio', audio)
108
- return
247
+ public togglePlayPause = attach({
248
+ source: this.playerModel.$playerState,
249
+ mapParams: (attemptNumber: number, playerState) => ({ attemptNumber, playerState }),
250
+ effect: createEffect(({ attemptNumber, playerState }: TogglePlayPauseParams) => {
251
+ if (this.currentPlayingAttempt === attemptNumber && playerState === PlayerState.PLAYING) {
252
+ this.pauseAudio()
253
+ } else {
254
+ this.handlePlayAttempt(attemptNumber)
109
255
  }
110
- this.collection.add(attemptNumber, {
111
- attemptNumber,
112
- audioFileId: audio.audioFileId,
113
- _id: audio._id,
114
- hasDrawing: !!audio.drawing,
115
- })
116
- })
117
- }
256
+ }),
257
+ })
118
258
  }
@@ -1,6 +1,6 @@
1
1
  import { createEvent, restore } from 'effector'
2
2
 
3
- export class DropdownModel {
3
+ export class VoiceTranscriptionModel {
4
4
  public readonly toggleExpand = createEvent()
5
5
  public readonly setExpanded = createEvent<boolean>()
6
6
  public readonly reset = createEvent()
@@ -0,0 +1,11 @@
1
+ import { createEvent, restore } from 'effector'
2
+
3
+ export class VoiceTranscriptionTranslationModel {
4
+ public readonly toggle = createEvent()
5
+ public readonly setActive = createEvent<boolean>()
6
+ public readonly reset = createEvent()
7
+
8
+ public readonly $isActive = restore(this.setActive, false)
9
+ .on(this.toggle, (state) => !state)
10
+ .reset(this.reset)
11
+ }
@@ -1,6 +1,6 @@
1
1
  import { VoiceTranscriptionItem } from '../../types'
2
2
 
3
- export class TranscriptionsCollection {
3
+ export class VoiceTranscriptionsCollection {
4
4
  public readonly collection: Map<number, VoiceTranscriptionItem> = new Map()
5
5
 
6
6
  public add(attemptNumber: number, item: VoiceTranscriptionItem) {
@@ -2,12 +2,6 @@ import { WithAbortSignal } from 'src/types/common.types'
2
2
  import { getAvailableInputs } from './helpers'
3
3
  import { VoiceRecordModel } from './recording/model/VoiceRecord.model'
4
4
  import { AxiosResponse } from 'axios'
5
- import type {
6
- GoogleTranslateProps as GoogleTranslatePayload,
7
- GoogleTranslateResponse,
8
- } from '../translation/providers/google.types'
9
-
10
- export type { GoogleTranslatePayload, GoogleTranslateResponse }
11
5
 
12
6
  export type VoiceRecordNotificationTypes = {
13
7
  success: (message: string) => void
@@ -73,7 +67,6 @@ export type VoicePlayerApi = {
73
67
  audioFileId: string,
74
68
  options?: { signal?: AbortSignal },
75
69
  ) => Promise<AxiosResponse<Blob>>
76
- translateText: (payload: GoogleTranslatePayload) => Promise<GoogleTranslateResponse>
77
70
  }
78
71
 
79
72
  export type VoiceTranscriptionItem = {
@@ -81,7 +74,6 @@ export type VoiceTranscriptionItem = {
81
74
  audioFileId: string
82
75
  _id: string
83
76
  transcript?: string
84
- transcriptLanguage?: string
85
77
  transcriptLoading?: boolean
86
78
  transcriptError?: string
87
79
  audioUri?: string
@@ -101,4 +93,3 @@ export enum VoiceTranscriptionVariant {
101
93
  SMALL = 'small',
102
94
  LARGE = 'large',
103
95
  }
104
-
package/src/index.ts CHANGED
@@ -14,4 +14,3 @@ export * from './shared/icons'
14
14
  export * from './features/voice'
15
15
  export * from './features/featureUsage'
16
16
  export * from './features/uiMode'
17
- export * from './features/translation'
@@ -1,11 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.PRACTICE_THEORY_CACHE_KEY_SUFFIX = exports.GBD_TEXT_CACHE_SUFFIX = exports.DESCRIPTION_CACHE_KEY_SUFFIX = exports.CHOICES_CACHE_KEY_SUFFIX = void 0;
7
- const GBD_TEXT_CACHE_SUFFIX = exports.GBD_TEXT_CACHE_SUFFIX = '::gbd';
8
- const DESCRIPTION_CACHE_KEY_SUFFIX = exports.DESCRIPTION_CACHE_KEY_SUFFIX = '::description';
9
- const CHOICES_CACHE_KEY_SUFFIX = exports.CHOICES_CACHE_KEY_SUFFIX = '::choices';
10
- const PRACTICE_THEORY_CACHE_KEY_SUFFIX = exports.PRACTICE_THEORY_CACHE_KEY_SUFFIX = '::practice-theory';
11
- //# sourceMappingURL=constants.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["GBD_TEXT_CACHE_SUFFIX","exports","DESCRIPTION_CACHE_KEY_SUFFIX","CHOICES_CACHE_KEY_SUFFIX","PRACTICE_THEORY_CACHE_KEY_SUFFIX"],"sourceRoot":"../../../../src","sources":["features/translation/constants.ts"],"mappings":";;;;;;AAAO,MAAMA,qBAAqB,GAAAC,OAAA,CAAAD,qBAAA,GAAG,OAAO;AACrC,MAAME,4BAA4B,GAAAD,OAAA,CAAAC,4BAAA,GAAG,eAAe;AACpD,MAAMC,wBAAwB,GAAAF,OAAA,CAAAE,wBAAA,GAAG,WAAW;AAC5C,MAAMC,gCAAgC,GAAAH,OAAA,CAAAG,gCAAA,GAAG,mBAAmB","ignoreList":[]}
@@ -1,60 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.maskSegment = exports.decodeHtmlEntities = void 0;
7
- exports.replaceMappedTokens = replaceMappedTokens;
8
- function replaceMappedTokens(input, map) {
9
- let result = input;
10
- for (const [original, override] of Object.entries(map)) {
11
- const escaped = original.replace(/[.*+?^${}()|[\]\\]/g, '\\$&');
12
- const regex = new RegExp(`\\b${escaped}\\b`, 'gi');
13
- result = result.replace(regex, override);
14
- }
15
- return result;
16
- }
17
-
18
- /**
19
- * Masks text segments matched by `regex` with a placeholder,
20
- * while preserving spaces around the original match.
21
- */
22
- const maskSegment = ({
23
- text,
24
- regex,
25
- placeholder,
26
- replacements,
27
- shouldSkip
28
- }) => {
29
- return text.replace(regex, (match, ...args) => {
30
- if (shouldSkip?.(match)) return match;
31
- const offset = args[args.length - 2];
32
- const input = args[args.length - 1];
33
- const before = offset > 0 ? input[offset - 1] : '';
34
- const afterIdx = offset + match.length;
35
- const after = afterIdx < input.length ? input[afterIdx] : '';
36
- const leftPad = /\s/.test(before);
37
- const rightPad = /\s/.test(after);
38
- replacements.push({
39
- placeholder,
40
- original: match,
41
- leftPad,
42
- rightPad
43
- });
44
- return placeholder;
45
- });
46
- };
47
- exports.maskSegment = maskSegment;
48
- const HTML_NAMED_ENTITIES = {
49
- '&amp;': '&',
50
- '&lt;': '<',
51
- '&gt;': '>',
52
- '&quot;': '"',
53
- '&apos;': "'",
54
- '&nbsp;': ' '
55
- };
56
- const decodeHtmlEntities = text => {
57
- return text.replace(/&#(\d+);/g, (_, code) => String.fromCharCode(parseInt(code, 10))).replace(/&#x([0-9a-f]+);/gi, (_, code) => String.fromCharCode(parseInt(code, 16))).replace(/&(amp|lt|gt|quot|apos|nbsp);/g, match => HTML_NAMED_ENTITIES[match] ?? match);
58
- };
59
- exports.decodeHtmlEntities = decodeHtmlEntities;
60
- //# sourceMappingURL=helpers.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["replaceMappedTokens","input","map","result","original","override","Object","entries","escaped","replace","regex","RegExp","maskSegment","text","placeholder","replacements","shouldSkip","match","args","offset","length","before","afterIdx","after","leftPad","test","rightPad","push","exports","HTML_NAMED_ENTITIES","decodeHtmlEntities","_","code","String","fromCharCode","parseInt"],"sourceRoot":"../../../../src","sources":["features/translation/helpers.ts"],"mappings":";;;;;;;AAEO,SAASA,mBAAmBA,CAACC,KAAa,EAAEC,GAA2B,EAAU;EACtF,IAAIC,MAAM,GAAGF,KAAK;EAElB,KAAK,MAAM,CAACG,QAAQ,EAAEC,QAAQ,CAAC,IAAIC,MAAM,CAACC,OAAO,CAACL,GAAG,CAAC,EAAE;IACtD,MAAMM,OAAO,GAAGJ,QAAQ,CAACK,OAAO,CAAC,qBAAqB,EAAE,MAAM,CAAC;IAC/D,MAAMC,KAAK,GAAG,IAAIC,MAAM,CAAC,MAAMH,OAAO,KAAK,EAAE,IAAI,CAAC;IAElDL,MAAM,GAAGA,MAAM,CAACM,OAAO,CAACC,KAAK,EAAEL,QAAQ,CAAC;EAC1C;EAEA,OAAOF,MAAM;AACf;;AAEA;AACA;AACA;AACA;AACO,MAAMS,WAAW,GAAGA,CAAC;EAC1BC,IAAI;EACJH,KAAK;EACLI,WAAW;EACXC,YAAY;EACZC;AACiB,CAAC,KAAa;EAC/B,OAAOH,IAAI,CAACJ,OAAO,CAACC,KAAK,EAAE,CAACO,KAAK,EAAE,GAAGC,IAAI,KAAK;IAC7C,IAAIF,UAAU,GAAGC,KAAK,CAAC,EAAE,OAAOA,KAAK;IAErC,MAAME,MAAM,GAAGD,IAAI,CAACA,IAAI,CAACE,MAAM,GAAG,CAAC,CAAW;IAC9C,MAAMnB,KAAK,GAAGiB,IAAI,CAACA,IAAI,CAACE,MAAM,GAAG,CAAC,CAAW;IAE7C,MAAMC,MAAM,GAAGF,MAAM,GAAG,CAAC,GAAGlB,KAAK,CAACkB,MAAM,GAAG,CAAC,CAAC,GAAG,EAAE;IAClD,MAAMG,QAAQ,GAAGH,MAAM,GAAGF,KAAK,CAACG,MAAM;IACtC,MAAMG,KAAK,GAAGD,QAAQ,GAAGrB,KAAK,CAACmB,MAAM,GAAGnB,KAAK,CAACqB,QAAQ,CAAC,GAAG,EAAE;IAE5D,MAAME,OAAO,GAAG,IAAI,CAACC,IAAI,CAACJ,MAAM,CAAC;IACjC,MAAMK,QAAQ,GAAG,IAAI,CAACD,IAAI,CAACF,KAAK,CAAC;IAEjCR,YAAY,CAACY,IAAI,CAAC;MAAEb,WAAW;MAAEV,QAAQ,EAAEa,KAAK;MAAEO,OAAO;MAAEE;IAAS,CAAC,CAAC;IAEtE,OAAOZ,WAAW;EACpB,CAAC,CAAC;AACJ,CAAC;AAAAc,OAAA,CAAAhB,WAAA,GAAAA,WAAA;AAED,MAAMiB,mBAA2C,GAAG;EAClD,OAAO,EAAE,GAAG;EACZ,MAAM,EAAE,GAAG;EACX,MAAM,EAAE,GAAG;EACX,QAAQ,EAAE,GAAG;EACb,QAAQ,EAAE,GAAG;EACb,QAAQ,EAAE;AACZ,CAAC;AAEM,MAAMC,kBAAkB,GAAIjB,IAAY,IAAa;EAC1D,OAAOA,IAAI,CACRJ,OAAO,CAAC,WAAW,EAAE,CAACsB,CAAC,EAAEC,IAAY,KAAKC,MAAM,CAACC,YAAY,CAACC,QAAQ,CAACH,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAClFvB,OAAO,CAAC,mBAAmB,EAAE,CAACsB,CAAC,EAAEC,IAAY,KAAKC,MAAM,CAACC,YAAY,CAACC,QAAQ,CAACH,IAAI,EAAE,EAAE,CAAC,CAAC,CAAC,CAC1FvB,OAAO,CACN,+BAA+B,EAC9BQ,KAAK,IAAKY,mBAAmB,CAACZ,KAAK,CAAC,IAAIA,KAC3C,CAAC;AACL,CAAC;AAAAW,OAAA,CAAAE,kBAAA,GAAAA,kBAAA","ignoreList":[]}
@@ -1,105 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- Object.defineProperty(exports, "CHOICES_CACHE_KEY_SUFFIX", {
7
- enumerable: true,
8
- get: function () {
9
- return _constants.CHOICES_CACHE_KEY_SUFFIX;
10
- }
11
- });
12
- Object.defineProperty(exports, "DESCRIPTION_CACHE_KEY_SUFFIX", {
13
- enumerable: true,
14
- get: function () {
15
- return _constants.DESCRIPTION_CACHE_KEY_SUFFIX;
16
- }
17
- });
18
- Object.defineProperty(exports, "GBD_TEXT_CACHE_SUFFIX", {
19
- enumerable: true,
20
- get: function () {
21
- return _constants.GBD_TEXT_CACHE_SUFFIX;
22
- }
23
- });
24
- Object.defineProperty(exports, "GoogleTranslateLanguage", {
25
- enumerable: true,
26
- get: function () {
27
- return _supportedLanguages.GoogleTranslateLanguage;
28
- }
29
- });
30
- Object.defineProperty(exports, "GoogleTranslationProvider", {
31
- enumerable: true,
32
- get: function () {
33
- return _GoogleTranslationProvider.GoogleTranslationProvider;
34
- }
35
- });
36
- Object.defineProperty(exports, "PRACTICE_THEORY_CACHE_KEY_SUFFIX", {
37
- enumerable: true,
38
- get: function () {
39
- return _constants.PRACTICE_THEORY_CACHE_KEY_SUFFIX;
40
- }
41
- });
42
- Object.defineProperty(exports, "TranslationKatexPreprocessor", {
43
- enumerable: true,
44
- get: function () {
45
- return _TranslationPreprocessor.TranslationKatexPreprocessor;
46
- }
47
- });
48
- Object.defineProperty(exports, "TranslationModel", {
49
- enumerable: true,
50
- get: function () {
51
- return _TranslationModel.TranslationModel;
52
- }
53
- });
54
- Object.defineProperty(exports, "TranslationProvider", {
55
- enumerable: true,
56
- get: function () {
57
- return _translationInterface.TranslationProvider;
58
- }
59
- });
60
- Object.defineProperty(exports, "TranslationService", {
61
- enumerable: true,
62
- get: function () {
63
- return _TranslationService.TranslationService;
64
- }
65
- });
66
- Object.defineProperty(exports, "decodeHtmlEntities", {
67
- enumerable: true,
68
- get: function () {
69
- return _helpers.decodeHtmlEntities;
70
- }
71
- });
72
- Object.defineProperty(exports, "maskSegment", {
73
- enumerable: true,
74
- get: function () {
75
- return _helpers.maskSegment;
76
- }
77
- });
78
- Object.defineProperty(exports, "preservedWordsReplacers", {
79
- enumerable: true,
80
- get: function () {
81
- return _wordsToPreserve.preservedWordsReplacers;
82
- }
83
- });
84
- Object.defineProperty(exports, "replaceMappedTokens", {
85
- enumerable: true,
86
- get: function () {
87
- return _helpers.replaceMappedTokens;
88
- }
89
- });
90
- Object.defineProperty(exports, "wordsToPreserve", {
91
- enumerable: true,
92
- get: function () {
93
- return _wordsToPreserve.wordsToPreserve;
94
- }
95
- });
96
- var _TranslationModel = require("./model/TranslationModel.js");
97
- var _TranslationService = require("./model/TranslationService.js");
98
- var _TranslationPreprocessor = require("./model/TranslationPreprocessor.js");
99
- var _translationInterface = require("./providers/translation.interface.js");
100
- var _GoogleTranslationProvider = require("./providers/google/GoogleTranslationProvider.js");
101
- var _supportedLanguages = require("./providers/google/supportedLanguages.js");
102
- var _wordsToPreserve = require("./preserve/wordsToPreserve.js");
103
- var _constants = require("./constants.js");
104
- var _helpers = require("./helpers.js");
105
- //# sourceMappingURL=index.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_TranslationModel","require","_TranslationService","_TranslationPreprocessor","_translationInterface","_GoogleTranslationProvider","_supportedLanguages","_wordsToPreserve","_constants","_helpers"],"sourceRoot":"../../../../src","sources":["features/translation/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,mBAAA,GAAAD,OAAA;AACA,IAAAE,wBAAA,GAAAF,OAAA;AACA,IAAAG,qBAAA,GAAAH,OAAA;AACA,IAAAI,0BAAA,GAAAJ,OAAA;AACA,IAAAK,mBAAA,GAAAL,OAAA;AAMA,IAAAM,gBAAA,GAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AAMA,IAAAQ,QAAA,GAAAR,OAAA","ignoreList":[]}