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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (332) hide show
  1. package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js +1 -0
  2. package/dist/commonjs/features/pmProgress/components/chart/chart.helpers.js.map +1 -1
  3. package/dist/commonjs/features/pmProgress/components/header/StartButton.js +10 -1
  4. package/dist/commonjs/features/pmProgress/components/header/StartButton.js.map +1 -1
  5. package/dist/commonjs/features/pmProgress/components/list/{ListCard.js → DomainCard.js} +10 -22
  6. package/dist/commonjs/features/pmProgress/components/list/DomainCard.js.map +1 -0
  7. package/dist/commonjs/features/pmProgress/components/list/Fluency.js +3 -3
  8. package/dist/commonjs/features/pmProgress/components/list/Fluency.js.map +1 -1
  9. package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js +3 -3
  10. package/dist/commonjs/features/pmProgress/components/list/PmDomainList.js.map +1 -1
  11. package/dist/commonjs/features/pmProgress/components/list/{ListItem.js → StandardItem.js} +5 -5
  12. package/dist/commonjs/features/pmProgress/components/list/StandardItem.js.map +1 -0
  13. package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js +7 -4
  14. package/dist/commonjs/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -1
  15. package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js +1 -8
  16. package/dist/commonjs/features/pmProgress/components/standard/StandardTag.js.map +1 -1
  17. package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js +1 -1
  18. package/dist/commonjs/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
  19. package/dist/commonjs/features/voice/index.js +4 -4
  20. package/dist/commonjs/features/voice/index.js.map +1 -1
  21. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +245 -0
  22. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  23. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +109 -0
  24. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  25. package/dist/commonjs/features/voice/playing/hooks/{useVoiceTranscription.js → useVoiceTranscriptionsDropdown.js} +4 -4
  26. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  27. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +34 -0
  28. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  29. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +4 -18
  30. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -1
  31. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +2 -6
  32. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  33. package/dist/commonjs/features/voice/playing/model/{VoiceTranscription.model.js → VoiceTranscriptionsDropdown.model.js} +4 -4
  34. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  35. package/dist/commonjs/features/voice/types.js +1 -6
  36. package/dist/commonjs/features/voice/types.js.map +1 -1
  37. package/dist/commonjs/index.js +0 -12
  38. package/dist/commonjs/index.js.map +1 -1
  39. package/dist/module/features/pmProgress/components/chart/chart.helpers.js +1 -0
  40. package/dist/module/features/pmProgress/components/chart/chart.helpers.js.map +1 -1
  41. package/dist/module/features/pmProgress/components/header/StartButton.js +10 -1
  42. package/dist/module/features/pmProgress/components/header/StartButton.js.map +1 -1
  43. package/dist/module/features/pmProgress/components/list/{ListCard.js → DomainCard.js} +8 -20
  44. package/dist/module/features/pmProgress/components/list/DomainCard.js.map +1 -0
  45. package/dist/module/features/pmProgress/components/list/Fluency.js +3 -3
  46. package/dist/module/features/pmProgress/components/list/Fluency.js.map +1 -1
  47. package/dist/module/features/pmProgress/components/list/PmDomainList.js +3 -3
  48. package/dist/module/features/pmProgress/components/list/PmDomainList.js.map +1 -1
  49. package/dist/module/features/pmProgress/components/list/{ListItem.js → StandardItem.js} +3 -3
  50. package/dist/module/features/pmProgress/components/list/StandardItem.js.map +1 -0
  51. package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js +7 -4
  52. package/dist/module/features/pmProgress/components/recs/PmTeacherRecs.js.map +1 -1
  53. package/dist/module/features/pmProgress/components/standard/StandardTag.js +2 -9
  54. package/dist/module/features/pmProgress/components/standard/StandardTag.js.map +1 -1
  55. package/dist/module/features/pmProgress/shared/pmProgress.helpers.js +1 -1
  56. package/dist/module/features/pmProgress/shared/pmProgress.helpers.js.map +1 -1
  57. package/dist/module/features/voice/index.js +1 -1
  58. package/dist/module/features/voice/index.js.map +1 -1
  59. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +238 -0
  60. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
  61. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +103 -0
  62. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
  63. package/dist/module/features/voice/playing/hooks/{useVoiceTranscription.js → useVoiceTranscriptionsDropdown.js} +2 -2
  64. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
  65. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +29 -0
  66. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
  67. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +4 -18
  68. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -1
  69. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +2 -6
  70. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  71. package/dist/module/features/voice/playing/model/{VoiceTranscription.model.js → VoiceTranscriptionsDropdown.model.js} +2 -2
  72. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
  73. package/dist/module/features/voice/types.js +0 -5
  74. package/dist/module/features/voice/types.js.map +1 -1
  75. package/dist/module/index.js +0 -1
  76. package/dist/module/index.js.map +1 -1
  77. package/dist/typescript/commonjs/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -1
  78. package/dist/typescript/commonjs/features/pmProgress/components/header/StartButton.d.ts.map +1 -1
  79. package/dist/typescript/commonjs/features/pmProgress/components/list/{ListCard.d.ts → DomainCard.d.ts} +6 -6
  80. package/dist/typescript/commonjs/features/pmProgress/components/list/DomainCard.d.ts.map +1 -0
  81. package/dist/typescript/commonjs/features/pmProgress/components/list/StandardItem.d.ts +13 -0
  82. package/dist/typescript/commonjs/features/pmProgress/components/list/StandardItem.d.ts.map +1 -0
  83. package/dist/typescript/commonjs/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -1
  84. package/dist/typescript/commonjs/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
  85. package/dist/typescript/commonjs/features/voice/index.d.ts +1 -1
  86. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
  87. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
  88. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  89. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  90. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  91. package/dist/typescript/commonjs/features/voice/playing/hooks/{useVoiceTranscription.d.ts → useVoiceTranscriptionsDropdown.d.ts} +3 -3
  92. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  93. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  94. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  95. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -1
  96. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -1
  97. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +2 -4
  98. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  99. package/dist/typescript/commonjs/features/voice/playing/model/{VoiceTranscription.model.d.ts → VoiceTranscriptionsDropdown.model.d.ts} +2 -2
  100. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  101. package/dist/typescript/commonjs/features/voice/types.d.ts +1 -9
  102. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  103. package/dist/typescript/commonjs/index.d.ts +0 -1
  104. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  105. package/dist/typescript/module/features/pmProgress/components/chart/chart.helpers.d.ts.map +1 -1
  106. package/dist/typescript/module/features/pmProgress/components/header/StartButton.d.ts.map +1 -1
  107. package/dist/typescript/module/features/pmProgress/components/list/{ListCard.d.ts → DomainCard.d.ts} +6 -6
  108. package/dist/typescript/module/features/pmProgress/components/list/DomainCard.d.ts.map +1 -0
  109. package/dist/typescript/module/features/pmProgress/components/list/StandardItem.d.ts +13 -0
  110. package/dist/typescript/module/features/pmProgress/components/list/StandardItem.d.ts.map +1 -0
  111. package/dist/typescript/module/features/pmProgress/components/recs/PmTeacherRecs.d.ts.map +1 -1
  112. package/dist/typescript/module/features/pmProgress/shared/pmProgress.helpers.d.ts.map +1 -1
  113. package/dist/typescript/module/features/voice/index.d.ts +1 -1
  114. package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
  115. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +16 -0
  116. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
  117. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
  118. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
  119. package/dist/typescript/module/features/voice/playing/hooks/{useVoiceTranscription.d.ts → useVoiceTranscriptionsDropdown.d.ts} +3 -3
  120. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
  121. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
  122. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
  123. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -1
  124. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -1
  125. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +2 -4
  126. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  127. package/dist/typescript/module/features/voice/playing/model/{VoiceTranscription.model.d.ts → VoiceTranscriptionsDropdown.model.d.ts} +2 -2
  128. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
  129. package/dist/typescript/module/features/voice/types.d.ts +1 -9
  130. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  131. package/dist/typescript/module/index.d.ts +0 -1
  132. package/dist/typescript/module/index.d.ts.map +1 -1
  133. package/package.json +1 -1
  134. package/src/features/pmProgress/components/chart/chart.helpers.ts +1 -0
  135. package/src/features/pmProgress/components/header/StartButton.tsx +11 -1
  136. package/src/features/pmProgress/components/list/{ListCard.tsx → DomainCard.tsx} +12 -19
  137. package/src/features/pmProgress/components/list/Fluency.tsx +3 -3
  138. package/src/features/pmProgress/components/list/PmDomainList.tsx +3 -3
  139. package/src/features/pmProgress/components/list/{ListItem.tsx → StandardItem.tsx} +4 -4
  140. package/src/features/pmProgress/components/recs/PmTeacherRecs.tsx +8 -4
  141. package/src/features/pmProgress/components/standard/StandardTag.tsx +2 -6
  142. package/src/features/pmProgress/shared/pmProgress.helpers.ts +1 -2
  143. package/src/features/voice/index.ts +1 -1
  144. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +296 -0
  145. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +128 -0
  146. package/src/features/voice/playing/hooks/{useVoiceTranscription.ts → useVoiceTranscriptionsDropdown.ts} +2 -2
  147. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
  148. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +5 -12
  149. package/src/features/voice/playing/model/VoicePlayer.model.ts +2 -7
  150. package/src/features/voice/playing/model/{VoiceTranscription.model.ts → VoiceTranscriptionsDropdown.model.ts} +2 -2
  151. package/src/features/voice/types.ts +0 -15
  152. package/src/index.ts +0 -1
  153. package/dist/commonjs/features/pmProgress/components/list/ListCard.js.map +0 -1
  154. package/dist/commonjs/features/pmProgress/components/list/ListItem.js.map +0 -1
  155. package/dist/commonjs/features/translation/constants.js +0 -11
  156. package/dist/commonjs/features/translation/constants.js.map +0 -1
  157. package/dist/commonjs/features/translation/helpers.js +0 -60
  158. package/dist/commonjs/features/translation/helpers.js.map +0 -1
  159. package/dist/commonjs/features/translation/index.js +0 -105
  160. package/dist/commonjs/features/translation/index.js.map +0 -1
  161. package/dist/commonjs/features/translation/model/TranslationModel.js +0 -122
  162. package/dist/commonjs/features/translation/model/TranslationModel.js.map +0 -1
  163. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js +0 -142
  164. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js.map +0 -1
  165. package/dist/commonjs/features/translation/model/TranslationService.js +0 -112
  166. package/dist/commonjs/features/translation/model/TranslationService.js.map +0 -1
  167. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js +0 -314
  168. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js.map +0 -1
  169. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js +0 -50
  170. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
  171. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js +0 -230
  172. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js.map +0 -1
  173. package/dist/commonjs/features/translation/providers/google.types.js +0 -2
  174. package/dist/commonjs/features/translation/providers/google.types.js.map +0 -1
  175. package/dist/commonjs/features/translation/providers/translation.interface.js +0 -49
  176. package/dist/commonjs/features/translation/providers/translation.interface.js.map +0 -1
  177. package/dist/commonjs/features/translation/types.js +0 -2
  178. package/dist/commonjs/features/translation/types.js.map +0 -1
  179. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js +0 -44
  180. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js.map +0 -1
  181. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +0 -135
  182. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +0 -1
  183. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +0 -66
  184. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +0 -1
  185. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +0 -59
  186. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +0 -1
  187. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscription.js.map +0 -1
  188. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +0 -37
  189. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +0 -1
  190. package/dist/commonjs/features/voice/playing/model/VoiceTranscription.model.js.map +0 -1
  191. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +0 -62
  192. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +0 -1
  193. package/dist/module/features/pmProgress/components/list/ListCard.js.map +0 -1
  194. package/dist/module/features/pmProgress/components/list/ListItem.js.map +0 -1
  195. package/dist/module/features/translation/constants.js +0 -7
  196. package/dist/module/features/translation/constants.js.map +0 -1
  197. package/dist/module/features/translation/helpers.js +0 -53
  198. package/dist/module/features/translation/helpers.js.map +0 -1
  199. package/dist/module/features/translation/index.js +0 -12
  200. package/dist/module/features/translation/index.js.map +0 -1
  201. package/dist/module/features/translation/model/TranslationModel.js +0 -117
  202. package/dist/module/features/translation/model/TranslationModel.js.map +0 -1
  203. package/dist/module/features/translation/model/TranslationPreprocessor.js +0 -137
  204. package/dist/module/features/translation/model/TranslationPreprocessor.js.map +0 -1
  205. package/dist/module/features/translation/model/TranslationService.js +0 -107
  206. package/dist/module/features/translation/model/TranslationService.js.map +0 -1
  207. package/dist/module/features/translation/preserve/wordsToPreserve.js +0 -310
  208. package/dist/module/features/translation/preserve/wordsToPreserve.js.map +0 -1
  209. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js +0 -45
  210. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
  211. package/dist/module/features/translation/providers/google/supportedLanguages.js +0 -225
  212. package/dist/module/features/translation/providers/google/supportedLanguages.js.map +0 -1
  213. package/dist/module/features/translation/providers/google.types.js +0 -2
  214. package/dist/module/features/translation/providers/google.types.js.map +0 -1
  215. package/dist/module/features/translation/providers/translation.interface.js +0 -44
  216. package/dist/module/features/translation/providers/translation.interface.js.map +0 -1
  217. package/dist/module/features/translation/types.js +0 -2
  218. package/dist/module/features/translation/types.js.map +0 -1
  219. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js +0 -38
  220. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js.map +0 -1
  221. package/dist/module/features/voice/playing/components/VoiceTranscription.js +0 -127
  222. package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +0 -1
  223. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +0 -58
  224. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +0 -1
  225. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +0 -51
  226. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +0 -1
  227. package/dist/module/features/voice/playing/hooks/useVoiceTranscription.js.map +0 -1
  228. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +0 -32
  229. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +0 -1
  230. package/dist/module/features/voice/playing/model/VoiceTranscription.model.js.map +0 -1
  231. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +0 -57
  232. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +0 -1
  233. package/dist/typescript/commonjs/features/pmProgress/components/list/ListCard.d.ts.map +0 -1
  234. package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts +0 -13
  235. package/dist/typescript/commonjs/features/pmProgress/components/list/ListItem.d.ts.map +0 -1
  236. package/dist/typescript/commonjs/features/translation/constants.d.ts +0 -5
  237. package/dist/typescript/commonjs/features/translation/constants.d.ts.map +0 -1
  238. package/dist/typescript/commonjs/features/translation/helpers.d.ts +0 -9
  239. package/dist/typescript/commonjs/features/translation/helpers.d.ts.map +0 -1
  240. package/dist/typescript/commonjs/features/translation/index.d.ts +0 -12
  241. package/dist/typescript/commonjs/features/translation/index.d.ts.map +0 -1
  242. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts +0 -33
  243. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts.map +0 -1
  244. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts +0 -34
  245. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
  246. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts +0 -40
  247. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts.map +0 -1
  248. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts +0 -3
  249. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
  250. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -17
  251. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
  252. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts +0 -209
  253. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
  254. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts +0 -15
  255. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts.map +0 -1
  256. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts +0 -30
  257. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts.map +0 -1
  258. package/dist/typescript/commonjs/features/translation/types.d.ts +0 -27
  259. package/dist/typescript/commonjs/features/translation/types.d.ts.map +0 -1
  260. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts +0 -8
  261. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +0 -1
  262. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts +0 -16
  263. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +0 -1
  264. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +0 -10
  265. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +0 -1
  266. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +0 -12
  267. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +0 -1
  268. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +0 -1
  269. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +0 -12
  270. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +0 -1
  271. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscription.model.d.ts.map +0 -1
  272. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +0 -25
  273. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +0 -1
  274. package/dist/typescript/module/features/pmProgress/components/list/ListCard.d.ts.map +0 -1
  275. package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts +0 -13
  276. package/dist/typescript/module/features/pmProgress/components/list/ListItem.d.ts.map +0 -1
  277. package/dist/typescript/module/features/translation/constants.d.ts +0 -5
  278. package/dist/typescript/module/features/translation/constants.d.ts.map +0 -1
  279. package/dist/typescript/module/features/translation/helpers.d.ts +0 -9
  280. package/dist/typescript/module/features/translation/helpers.d.ts.map +0 -1
  281. package/dist/typescript/module/features/translation/index.d.ts +0 -12
  282. package/dist/typescript/module/features/translation/index.d.ts.map +0 -1
  283. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts +0 -33
  284. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts.map +0 -1
  285. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts +0 -34
  286. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
  287. package/dist/typescript/module/features/translation/model/TranslationService.d.ts +0 -40
  288. package/dist/typescript/module/features/translation/model/TranslationService.d.ts.map +0 -1
  289. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts +0 -3
  290. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
  291. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -17
  292. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
  293. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts +0 -209
  294. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
  295. package/dist/typescript/module/features/translation/providers/google.types.d.ts +0 -15
  296. package/dist/typescript/module/features/translation/providers/google.types.d.ts.map +0 -1
  297. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts +0 -30
  298. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts.map +0 -1
  299. package/dist/typescript/module/features/translation/types.d.ts +0 -27
  300. package/dist/typescript/module/features/translation/types.d.ts.map +0 -1
  301. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts +0 -8
  302. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +0 -1
  303. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts +0 -16
  304. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +0 -1
  305. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +0 -10
  306. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +0 -1
  307. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +0 -12
  308. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +0 -1
  309. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +0 -1
  310. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +0 -12
  311. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +0 -1
  312. package/dist/typescript/module/features/voice/playing/model/VoiceTranscription.model.d.ts.map +0 -1
  313. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +0 -25
  314. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +0 -1
  315. package/src/features/translation/constants.ts +0 -4
  316. package/src/features/translation/helpers.ts +0 -63
  317. package/src/features/translation/index.ts +0 -30
  318. package/src/features/translation/model/TranslationModel.ts +0 -174
  319. package/src/features/translation/model/TranslationPreprocessor.ts +0 -171
  320. package/src/features/translation/model/TranslationService.ts +0 -148
  321. package/src/features/translation/preserve/wordsToPreserve.ts +0 -87
  322. package/src/features/translation/providers/google/GoogleTranslationProvider.ts +0 -50
  323. package/src/features/translation/providers/google/supportedLanguages.ts +0 -229
  324. package/src/features/translation/providers/google.types.ts +0 -16
  325. package/src/features/translation/providers/translation.interface.ts +0 -63
  326. package/src/features/translation/types.ts +0 -30
  327. package/src/features/voice/playing/components/VoiceTranscriptContent.tsx +0 -37
  328. package/src/features/voice/playing/components/VoiceTranscription.tsx +0 -172
  329. package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +0 -59
  330. package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +0 -62
  331. package/src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts +0 -44
  332. package/src/features/voice/playing/model/VoiceTranscriptionTranslation.model.ts +0 -75
@@ -1,38 +0,0 @@
1
- "use strict";
2
-
3
- import { COLORS, Loader, LoaderColor, LoaderSize, Typography } from '@magmamath/react-native-ui';
4
- import React from 'react';
5
- import { StyleSheet, View } from 'react-native';
6
- import { jsx as _jsx } from "react/jsx-runtime";
7
- export const VoiceTranscriptContent = ({
8
- text,
9
- isLoading
10
- }) => {
11
- if (isLoading) {
12
- return /*#__PURE__*/_jsx(View, {
13
- style: styles.loaderContainer,
14
- children: /*#__PURE__*/_jsx(Loader, {
15
- size: LoaderSize.SMALL,
16
- color: LoaderColor.BLUE
17
- })
18
- });
19
- }
20
- return /*#__PURE__*/_jsx(Typography, {
21
- variant: "h8",
22
- style: styles.text,
23
- children: text
24
- });
25
- };
26
- const styles = StyleSheet.create({
27
- text: {
28
- color: COLORS.NEUTRAL_7,
29
- paddingHorizontal: 8,
30
- paddingVertical: 8
31
- },
32
- loaderContainer: {
33
- justifyContent: 'center',
34
- alignItems: 'center',
35
- paddingVertical: 8
36
- }
37
- });
38
- //# sourceMappingURL=VoiceTranscriptContent.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["COLORS","Loader","LoaderColor","LoaderSize","Typography","React","StyleSheet","View","jsx","_jsx","VoiceTranscriptContent","text","isLoading","style","styles","loaderContainer","children","size","SMALL","color","BLUE","variant","create","NEUTRAL_7","paddingHorizontal","paddingVertical","justifyContent","alignItems"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptContent.tsx"],"mappings":";;AAAA,SAASA,MAAM,EAAEC,MAAM,EAAEC,WAAW,EAAEC,UAAU,EAAEC,UAAU,QAAQ,4BAA4B;AAChG,OAAOC,KAAK,MAAM,OAAO;AACzB,SAASC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAAA,SAAAC,GAAA,IAAAC,IAAA;AAO/C,OAAO,MAAMC,sBAAsB,GAAGA,CAAC;EAAEC,IAAI;EAAEC;AAAuC,CAAC,KAAK;EAC1F,IAAIA,SAAS,EAAE;IACb,oBACEH,IAAA,CAACF,IAAI;MAACM,KAAK,EAAEC,MAAM,CAACC,eAAgB;MAAAC,QAAA,eAClCP,IAAA,CAACR,MAAM;QAACgB,IAAI,EAAEd,UAAU,CAACe,KAAM;QAACC,KAAK,EAAEjB,WAAW,CAACkB;MAAK,CAAE;IAAC,CACvD,CAAC;EAEX;EAEA,oBACEX,IAAA,CAACL,UAAU;IAACiB,OAAO,EAAC,IAAI;IAACR,KAAK,EAAEC,MAAM,CAACH,IAAK;IAAAK,QAAA,EACzCL;EAAI,CACK,CAAC;AAEjB,CAAC;AAED,MAAMG,MAAM,GAAGR,UAAU,CAACgB,MAAM,CAAC;EAC/BX,IAAI,EAAE;IACJQ,KAAK,EAAEnB,MAAM,CAACuB,SAAS;IACvBC,iBAAiB,EAAE,CAAC;IACpBC,eAAe,EAAE;EACnB,CAAC;EACDV,eAAe,EAAE;IACfW,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBF,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,127 +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 { resolveGoogleLanguageCode } from "../../../translation/providers/google/supportedLanguages.js";
13
- import { useText } from "../../../../i18n/i18n.js";
14
- import { useVoiceTranscriptionEffects } from "../hooks/useVoiceTranscriptionEffects.js";
15
- import { VoiceTranscriptContent } from "./VoiceTranscriptContent.js";
16
- import { VoiceTranscriptionCollapsible } from "./VoiceTranscriptionCollapsible.js";
17
- import { VoiceTranscriptionHeaderActions } from "./VoiceTranscriptionHeaderActions.js";
18
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
19
- export const VoiceTranscription = ({
20
- style,
21
- model,
22
- answers,
23
- attemptOffset,
24
- attemptsCount,
25
- problemId,
26
- variant = VoiceTranscriptionVariant.SMALL
27
- }) => {
28
- const t = useText();
29
- const {
30
- i18n
31
- } = useTranslation();
32
- const [playerState, isLoadingTranscripts, isTranslationActive, translations, isTranslating] = useUnit([model.$playerState, model.loader.loadAllTranscripts.pending, model.translation.$isActive, model.translation.$translations, model.translation.translate.pending]);
33
- const activeAttempt = getActiveAttempt(attemptOffset, attemptsCount);
34
- const isLargeVariant = variant === VoiceTranscriptionVariant.LARGE;
35
- const answersKey = useMemo(() => answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(','), [answers]);
36
- useVoiceTranscriptionEffects({
37
- model,
38
- answers,
39
- answersKey,
40
- problemId,
41
- activeAttempt
42
- });
43
- const hasActiveAudio = activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined;
44
- const activeTranscript = activeAttempt !== null ? model.loader.getTranscript(activeAttempt) : null;
45
- const hasTranscriptText = !!activeTranscript && activeTranscript !== NO_AUDIO_BE_MESSAGE;
46
- const isActiveTranscriptLoading = isLoadingTranscripts && hasActiveAudio && !activeTranscript;
47
- const transcriptLanguage = activeAttempt !== null ? model.loader.getTranscriptLanguage(activeAttempt) : undefined;
48
- const isSourceSameAsTarget = !!transcriptLanguage && resolveGoogleLanguageCode(transcriptLanguage) === resolveGoogleLanguageCode(i18n.language);
49
- const canTranslate = hasTranscriptText && !isSourceSameAsTarget;
50
- const cachedTranslation = activeAttempt !== null ? translations[activeAttempt] : undefined;
51
- const showTranslation = isTranslationActive && canTranslate;
52
- const isTranslationLoading = showTranslation && !cachedTranslation && isTranslating;
53
- const displayText = showTranslation ? cachedTranslation ?? activeTranscript : hasTranscriptText ? activeTranscript : t('voice.transcriptNotAvailable');
54
- useEffect(() => {
55
- if (showTranslation && activeAttempt !== null && !cachedTranslation && !isTranslating) {
56
- model.translation.translate({
57
- attemptNumber: activeAttempt,
58
- targetLanguage: i18n.language
59
- });
60
- }
61
- }, [showTranslation, activeAttempt, cachedTranslation, isTranslating, i18n.language, model]);
62
- const handlePlayPress = useCallback(() => {
63
- if (activeAttempt) {
64
- model.translation.setActive(false);
65
- model.togglePlayPause(activeAttempt);
66
- }
67
- }, [model, activeAttempt]);
68
- const handleTranslationToggle = useCallback(() => {
69
- model.translation.toggle();
70
- }, [model]);
71
- return /*#__PURE__*/_jsxs(Animated.View, {
72
- style: [styles.container, isLargeVariant && styles.largeContainer, style],
73
- children: [/*#__PURE__*/_jsxs(View, {
74
- style: styles.header,
75
- children: [/*#__PURE__*/_jsx(Typography, {
76
- style: styles.title,
77
- variant: "h7",
78
- children: t('voice.transcriptions')
79
- }), hasActiveAudio && /*#__PURE__*/_jsx(VoiceTranscriptionHeaderActions, {
80
- playerState: playerState,
81
- isTranslationActive: isTranslationActive,
82
- canTranslate: canTranslate,
83
- onPlayPress: handlePlayPress,
84
- onTranslationPress: handleTranslationToggle
85
- })]
86
- }), isLargeVariant ? /*#__PURE__*/_jsx(VoiceTranscriptContent, {
87
- text: displayText,
88
- isLoading: isActiveTranscriptLoading || isTranslationLoading
89
- }) : /*#__PURE__*/_jsx(VoiceTranscriptionCollapsible, {
90
- text: displayText,
91
- isLoading: isActiveTranscriptLoading || isTranslationLoading,
92
- dropdown: model.dropdown
93
- })]
94
- });
95
- };
96
- const styles = StyleSheet.create({
97
- container: {
98
- position: 'absolute',
99
- top: 56,
100
- left: 8,
101
- width: 222,
102
- maxHeight: 405,
103
- minHeight: 51,
104
- padding: 4,
105
- boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
106
- borderRadius: 12,
107
- backgroundColor: COLORS.NEUTRAL_1,
108
- overflow: 'hidden'
109
- },
110
- largeContainer: {
111
- width: '98%',
112
- height: '100%'
113
- },
114
- header: {
115
- flexDirection: 'row',
116
- justifyContent: 'space-between',
117
- alignItems: 'center',
118
- padding: 4,
119
- marginBottom: 4,
120
- height: 32
121
- },
122
- title: {
123
- color: COLORS.NEUTRAL_9,
124
- marginLeft: 4
125
- }
126
- });
127
- //# 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","resolveGoogleLanguageCode","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","transcriptLanguage","getTranscriptLanguage","isSourceSameAsTarget","language","canTranslate","cachedTranslation","showTranslation","isTranslationLoading","displayText","attemptNumber","targetLanguage","handlePlayPress","setActive","togglePlayPause","handleTranslationToggle","toggle","styles","container","largeContainer","children","header","title","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,yBAAyB,QAAQ,6DAA0D;AACpG,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;EACLC,OAAO;EACPC,aAAa;EACbC,aAAa;EACbC,SAAS;EACTC,OAAO,GAAGlB,yBAAyB,CAACmB;AACb,CAAC,KAAK;EAC7B,MAAMC,CAAC,GAAGlB,OAAO,CAAC,CA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SAAS,EAAE;IACTW,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,EAAE;IACPC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,GAAG;IACVC,SAAS,EAAE,GAAG;IACdC,SAAS,EAAE,EAAE;IACbC,OAAO,EAAE,CAAC;IACVC,SAAS,EAAE,wCAAwC;IACnDC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAEnG,MAAM,CAACoG,SAAS;IACjCC,QAAQ,EAAE;EACZ,CAAC;EACDrB,cAAc,EAAE;IACda,KAAK,EAAE,KAAK;IACZS,MAAM,EAAE;EACV,CAAC;EACDpB,MAAM,EAAE;IACNqB,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;EACDnB,KAAK,EAAE;IACLwB,KAAK,EAAE3G,MAAM,CAAC4G,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;AAC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EAC/BN,kBAAkB,EAAE;IAClBO,QAAQ,EAAE;EACZ,CAAC;EACDL,mBAAmB,EAAE;IACnBM,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,iBAAiB,EAAE;EACrB,CAAC;EACDP,YAAY,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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AiB,CAACO,KAAK,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC;IAEvE,OAAO;MACLK,SAAS,EAAE,CAAC;QAAEC,MAAM,EAAE,GAAGF,QAAQ;MAAM,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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kB,CAAC;MACpC8B,QAAQ,EAAE;QACRC,GAAG,EAAE5B,eAAe;QACpB6B,SAAS,EAAE9B;MACb,CAAC;MACD+B,SAAS,EAAE,CAAC,IAAIhC,yBAAyB,CAAC;QAAE4B,GAAG,EAAE;UAAEK,gBAAgB,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,EAA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