@magmamath/students-features 1.3.22 → 1.3.23-rc.10

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (270) hide show
  1. package/dist/commonjs/features/translation/constants.js +11 -0
  2. package/dist/commonjs/features/translation/constants.js.map +1 -0
  3. package/dist/commonjs/features/translation/helpers.js +60 -0
  4. package/dist/commonjs/features/translation/helpers.js.map +1 -0
  5. package/dist/commonjs/features/translation/index.js +105 -0
  6. package/dist/commonjs/features/translation/index.js.map +1 -0
  7. package/dist/commonjs/features/translation/model/TranslationModel.js +122 -0
  8. package/dist/commonjs/features/translation/model/TranslationModel.js.map +1 -0
  9. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js +142 -0
  10. package/dist/commonjs/features/translation/model/TranslationPreprocessor.js.map +1 -0
  11. package/dist/commonjs/features/translation/model/TranslationService.js +112 -0
  12. package/dist/commonjs/features/translation/model/TranslationService.js.map +1 -0
  13. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js +314 -0
  14. package/dist/commonjs/features/translation/preserve/wordsToPreserve.js.map +1 -0
  15. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js +50 -0
  16. package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js.map +1 -0
  17. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js +230 -0
  18. package/dist/commonjs/features/translation/providers/google/supportedLanguages.js.map +1 -0
  19. package/dist/commonjs/features/translation/providers/google.types.js +2 -0
  20. package/dist/commonjs/features/translation/providers/google.types.js.map +1 -0
  21. package/dist/commonjs/features/translation/providers/translation.interface.js +49 -0
  22. package/dist/commonjs/features/translation/providers/translation.interface.js.map +1 -0
  23. package/dist/commonjs/features/translation/types.js +2 -0
  24. package/dist/commonjs/features/translation/types.js.map +1 -0
  25. package/dist/commonjs/features/voice/index.js +4 -4
  26. package/dist/commonjs/features/voice/index.js.map +1 -1
  27. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js +44 -0
  28. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -0
  29. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +142 -0
  30. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +1 -0
  31. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +66 -0
  32. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -0
  33. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +59 -0
  34. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -0
  35. package/dist/commonjs/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.js → useVoiceTranscription.js} +4 -4
  36. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscription.js.map +1 -0
  37. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.js +26 -0
  38. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.js.map +1 -0
  39. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +37 -0
  40. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +1 -0
  41. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +18 -4
  42. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -1
  43. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +6 -2
  44. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  45. package/dist/commonjs/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.js → VoiceTranscription.model.js} +4 -4
  46. package/dist/commonjs/features/voice/playing/model/VoiceTranscription.model.js.map +1 -0
  47. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +62 -0
  48. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +1 -0
  49. package/dist/commonjs/features/voice/types.js +6 -1
  50. package/dist/commonjs/features/voice/types.js.map +1 -1
  51. package/dist/commonjs/index.js +12 -0
  52. package/dist/commonjs/index.js.map +1 -1
  53. package/dist/module/features/translation/constants.js +7 -0
  54. package/dist/module/features/translation/constants.js.map +1 -0
  55. package/dist/module/features/translation/helpers.js +53 -0
  56. package/dist/module/features/translation/helpers.js.map +1 -0
  57. package/dist/module/features/translation/index.js +12 -0
  58. package/dist/module/features/translation/index.js.map +1 -0
  59. package/dist/module/features/translation/model/TranslationModel.js +117 -0
  60. package/dist/module/features/translation/model/TranslationModel.js.map +1 -0
  61. package/dist/module/features/translation/model/TranslationPreprocessor.js +137 -0
  62. package/dist/module/features/translation/model/TranslationPreprocessor.js.map +1 -0
  63. package/dist/module/features/translation/model/TranslationService.js +107 -0
  64. package/dist/module/features/translation/model/TranslationService.js.map +1 -0
  65. package/dist/module/features/translation/preserve/wordsToPreserve.js +310 -0
  66. package/dist/module/features/translation/preserve/wordsToPreserve.js.map +1 -0
  67. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js +45 -0
  68. package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js.map +1 -0
  69. package/dist/module/features/translation/providers/google/supportedLanguages.js +225 -0
  70. package/dist/module/features/translation/providers/google/supportedLanguages.js.map +1 -0
  71. package/dist/module/features/translation/providers/google.types.js +2 -0
  72. package/dist/module/features/translation/providers/google.types.js.map +1 -0
  73. package/dist/module/features/translation/providers/translation.interface.js +44 -0
  74. package/dist/module/features/translation/providers/translation.interface.js.map +1 -0
  75. package/dist/module/features/translation/types.js +2 -0
  76. package/dist/module/features/translation/types.js.map +1 -0
  77. package/dist/module/features/voice/index.js +1 -1
  78. package/dist/module/features/voice/index.js.map +1 -1
  79. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js +38 -0
  80. package/dist/module/features/voice/playing/components/VoiceTranscriptContent.js.map +1 -0
  81. package/dist/module/features/voice/playing/components/VoiceTranscription.js +134 -0
  82. package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +1 -0
  83. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +58 -0
  84. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -0
  85. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +51 -0
  86. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -0
  87. package/dist/module/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.js → useVoiceTranscription.js} +2 -2
  88. package/dist/module/features/voice/playing/hooks/useVoiceTranscription.js.map +1 -0
  89. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.js +21 -0
  90. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.js.map +1 -0
  91. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +32 -0
  92. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +1 -0
  93. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +18 -4
  94. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -1
  95. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +6 -2
  96. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  97. package/dist/module/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.js → VoiceTranscription.model.js} +2 -2
  98. package/dist/module/features/voice/playing/model/VoiceTranscription.model.js.map +1 -0
  99. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +57 -0
  100. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +1 -0
  101. package/dist/module/features/voice/types.js +5 -0
  102. package/dist/module/features/voice/types.js.map +1 -1
  103. package/dist/module/index.js +1 -0
  104. package/dist/module/index.js.map +1 -1
  105. package/dist/typescript/commonjs/features/translation/constants.d.ts +5 -0
  106. package/dist/typescript/commonjs/features/translation/constants.d.ts.map +1 -0
  107. package/dist/typescript/commonjs/features/translation/helpers.d.ts +9 -0
  108. package/dist/typescript/commonjs/features/translation/helpers.d.ts.map +1 -0
  109. package/dist/typescript/commonjs/features/translation/index.d.ts +12 -0
  110. package/dist/typescript/commonjs/features/translation/index.d.ts.map +1 -0
  111. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts +33 -0
  112. package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts.map +1 -0
  113. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts +34 -0
  114. package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts.map +1 -0
  115. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts +40 -0
  116. package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts.map +1 -0
  117. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts +3 -0
  118. package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts.map +1 -0
  119. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts +17 -0
  120. package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +1 -0
  121. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts +209 -0
  122. package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts.map +1 -0
  123. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts +15 -0
  124. package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts.map +1 -0
  125. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts +30 -0
  126. package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts.map +1 -0
  127. package/dist/typescript/commonjs/features/translation/types.d.ts +27 -0
  128. package/dist/typescript/commonjs/features/translation/types.d.ts.map +1 -0
  129. package/dist/typescript/commonjs/features/voice/index.d.ts +1 -1
  130. package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
  131. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts +8 -0
  132. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -0
  133. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts +16 -0
  134. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -0
  135. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +10 -0
  136. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -0
  137. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +12 -0
  138. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -0
  139. package/dist/typescript/{module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts → commonjs/features/voice/playing/hooks/useVoiceTranscription.d.ts} +3 -3
  140. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +1 -0
  141. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.d.ts +10 -0
  142. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.d.ts.map +1 -0
  143. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +12 -0
  144. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +1 -0
  145. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +1 -0
  146. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -1
  147. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +4 -2
  148. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  149. package/dist/typescript/commonjs/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.d.ts → VoiceTranscription.model.d.ts} +2 -2
  150. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscription.model.d.ts.map +1 -0
  151. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +25 -0
  152. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +1 -0
  153. package/dist/typescript/commonjs/features/voice/types.d.ts +9 -1
  154. package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
  155. package/dist/typescript/commonjs/index.d.ts +1 -0
  156. package/dist/typescript/commonjs/index.d.ts.map +1 -1
  157. package/dist/typescript/module/features/translation/constants.d.ts +5 -0
  158. package/dist/typescript/module/features/translation/constants.d.ts.map +1 -0
  159. package/dist/typescript/module/features/translation/helpers.d.ts +9 -0
  160. package/dist/typescript/module/features/translation/helpers.d.ts.map +1 -0
  161. package/dist/typescript/module/features/translation/index.d.ts +12 -0
  162. package/dist/typescript/module/features/translation/index.d.ts.map +1 -0
  163. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts +33 -0
  164. package/dist/typescript/module/features/translation/model/TranslationModel.d.ts.map +1 -0
  165. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts +34 -0
  166. package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts.map +1 -0
  167. package/dist/typescript/module/features/translation/model/TranslationService.d.ts +40 -0
  168. package/dist/typescript/module/features/translation/model/TranslationService.d.ts.map +1 -0
  169. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts +3 -0
  170. package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts.map +1 -0
  171. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts +17 -0
  172. package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +1 -0
  173. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts +209 -0
  174. package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts.map +1 -0
  175. package/dist/typescript/module/features/translation/providers/google.types.d.ts +15 -0
  176. package/dist/typescript/module/features/translation/providers/google.types.d.ts.map +1 -0
  177. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts +30 -0
  178. package/dist/typescript/module/features/translation/providers/translation.interface.d.ts.map +1 -0
  179. package/dist/typescript/module/features/translation/types.d.ts +27 -0
  180. package/dist/typescript/module/features/translation/types.d.ts.map +1 -0
  181. package/dist/typescript/module/features/voice/index.d.ts +1 -1
  182. package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
  183. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts +8 -0
  184. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptContent.d.ts.map +1 -0
  185. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts +16 -0
  186. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -0
  187. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +10 -0
  188. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -0
  189. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts +12 -0
  190. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -0
  191. package/dist/typescript/{commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts → module/features/voice/playing/hooks/useVoiceTranscription.d.ts} +3 -3
  192. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +1 -0
  193. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.d.ts +10 -0
  194. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.d.ts.map +1 -0
  195. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +12 -0
  196. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +1 -0
  197. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +1 -0
  198. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -1
  199. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +4 -2
  200. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  201. package/dist/typescript/module/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.d.ts → VoiceTranscription.model.d.ts} +2 -2
  202. package/dist/typescript/module/features/voice/playing/model/VoiceTranscription.model.d.ts.map +1 -0
  203. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +25 -0
  204. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +1 -0
  205. package/dist/typescript/module/features/voice/types.d.ts +9 -1
  206. package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
  207. package/dist/typescript/module/index.d.ts +1 -0
  208. package/dist/typescript/module/index.d.ts.map +1 -1
  209. package/package.json +1 -1
  210. package/src/features/translation/constants.ts +4 -0
  211. package/src/features/translation/helpers.ts +63 -0
  212. package/src/features/translation/index.ts +30 -0
  213. package/src/features/translation/model/TranslationModel.ts +174 -0
  214. package/src/features/translation/model/TranslationPreprocessor.ts +171 -0
  215. package/src/features/translation/model/TranslationService.ts +148 -0
  216. package/src/features/translation/preserve/wordsToPreserve.ts +87 -0
  217. package/src/features/translation/providers/google/GoogleTranslationProvider.ts +50 -0
  218. package/src/features/translation/providers/google/supportedLanguages.ts +229 -0
  219. package/src/features/translation/providers/google.types.ts +16 -0
  220. package/src/features/translation/providers/translation.interface.ts +63 -0
  221. package/src/features/translation/types.ts +30 -0
  222. package/src/features/voice/index.ts +1 -1
  223. package/src/features/voice/playing/components/VoiceTranscriptContent.tsx +37 -0
  224. package/src/features/voice/playing/components/VoiceTranscription.tsx +175 -0
  225. package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +59 -0
  226. package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +62 -0
  227. package/src/features/voice/playing/hooks/{useVoiceTranscriptionsDropdown.ts → useVoiceTranscription.ts} +2 -2
  228. package/src/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.ts +32 -0
  229. package/src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts +44 -0
  230. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +12 -5
  231. package/src/features/voice/playing/model/VoicePlayer.model.ts +7 -2
  232. package/src/features/voice/playing/model/{VoiceTranscriptionsDropdown.model.ts → VoiceTranscription.model.ts} +2 -2
  233. package/src/features/voice/playing/model/VoiceTranscriptionTranslation.model.ts +75 -0
  234. package/src/features/voice/types.ts +15 -0
  235. package/src/index.ts +1 -0
  236. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +0 -245
  237. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +0 -1
  238. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +0 -109
  239. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +0 -1
  240. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +0 -1
  241. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +0 -34
  242. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +0 -1
  243. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +0 -1
  244. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +0 -238
  245. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +0 -1
  246. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +0 -103
  247. package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +0 -1
  248. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +0 -1
  249. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +0 -29
  250. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +0 -1
  251. package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +0 -1
  252. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +0 -16
  253. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +0 -1
  254. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +0 -12
  255. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +0 -1
  256. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +0 -1
  257. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +0 -11
  258. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +0 -1
  259. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +0 -1
  260. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +0 -16
  261. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +0 -1
  262. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +0 -12
  263. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +0 -1
  264. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +0 -1
  265. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +0 -11
  266. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +0 -1
  267. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +0 -1
  268. package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +0 -296
  269. package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +0 -128
  270. package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +0 -40
@@ -1,238 +0,0 @@
1
- "use strict";
2
-
3
- import { Typography, ScrollableList, CaretDownIcon, COLORS, IS_WEB, ScrollableListScrollView } from '@magmamath/react-native-ui';
4
- import { useUnit } from 'effector-react';
5
- import React, { useRef, useEffect, useState, useCallback, useMemo } from 'react';
6
- import { TouchableOpacity, View, StyleSheet } from 'react-native';
7
- import Animated, { FadeIn, FadeOut } from 'react-native-reanimated';
8
- import { useVoiceTranscriptionsDropdown } from "../hooks/useVoiceTranscriptionsDropdown.js";
9
- import { PlayerState } from "../model/index.js";
10
- import { VoiceTranscriptionsDropdownItem } from "./VoiceTranscriptionsDropdownItem.js";
11
- import { DROPDOWN_MAX_CONTENT_HEIGHT, NO_AUDIO_BE_MESSAGE } from "../../constants.js";
12
- import { useText } from "../../../../i18n/i18n.js";
13
- import { PlayButton } from "../../../../shared/components/PlayButton.js";
14
- import { getActiveAttempt, getAudioStatus } from "../../helpers.js";
15
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
16
- const AnimatedTouchableOpacity = Animated.createAnimatedComponent(TouchableOpacity);
17
- export const VoiceTranscriptionsDropdown = ({
18
- style,
19
- model,
20
- answers,
21
- attemptOffset,
22
- onAttemptOffsetChange,
23
- attemptsCount,
24
- problemId
25
- }) => {
26
- const [attempts, setAttempts] = useState([]);
27
- const scrollRef = useRef(null);
28
- const scrollViewRef = useRef(null);
29
- const itemLayoutsRef = useRef(new Map());
30
- const answersRef = useRef(answers);
31
- answersRef.current = answers;
32
- const t = useText();
33
- const [currentAttempt, transcriptsLoaded, playerState, isDropdownExpanded] = useUnit([model.$currentAttempt, model.loader.$transcriptsLoaded, model.$playerState, model.dropdown.$isExpanded]);
34
- const activeAttempt = getActiveAttempt(attemptOffset, attemptsCount);
35
- const answersKey = useMemo(() => answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(','), [answers]);
36
- const hasActiveTranscript = activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined;
37
- const playButtonState = {
38
- isActive: playerState !== PlayerState.IDLE,
39
- isLoading: playerState === PlayerState.LOADING,
40
- status: getAudioStatus(playerState)
41
- };
42
- const {
43
- listAnimatedStyle,
44
- iconAnimatedStyle,
45
- onListLayout
46
- } = useVoiceTranscriptionsDropdown(model.dropdown);
47
- const handleItemLayout = useCallback((id, event) => {
48
- itemLayoutsRef.current.set(id, event.nativeEvent.layout.y);
49
- }, []);
50
- const scrollToAttempt = useCallback(attemptNumber => {
51
- if (IS_WEB) {
52
- const item = attempts.find(item => item.attemptNumber === attemptNumber);
53
- if (item) {
54
- const y = itemLayoutsRef.current.get(item._id);
55
- if (y !== undefined) {
56
- scrollViewRef.current?.scrollTo({
57
- y,
58
- animated: true
59
- });
60
- }
61
- }
62
- return;
63
- }
64
- const index = attempts.findIndex(item => item.attemptNumber === attemptNumber);
65
- if (index !== -1) {
66
- scrollRef.current?.scrollToIndex({
67
- index,
68
- animated: true,
69
- viewPosition: 0
70
- });
71
- }
72
- }, [attempts]);
73
- const handleItemToggle = useCallback(attempt => {
74
- if (onAttemptOffsetChange && attemptsCount !== undefined) {
75
- onAttemptOffsetChange(attemptsCount - attempt);
76
- }
77
- }, [onAttemptOffsetChange, attemptsCount]);
78
- const handlePlayPress = useCallback(() => {
79
- if (activeAttempt) {
80
- model.togglePlayPause(activeAttempt);
81
- }
82
- }, [model, activeAttempt]);
83
- const handleScrollToIndexFailed = useCallback(info => {
84
- setTimeout(() => {
85
- scrollRef.current?.scrollToIndex({
86
- index: info.index,
87
- animated: true,
88
- viewPosition: 0
89
- });
90
- }, 100);
91
- }, []);
92
- useEffect(() => {
93
- model.reinitializePlayer();
94
- return () => model.cleanup();
95
- }, [model]);
96
- useEffect(() => {
97
- const isLastAttemptsWithoutDrowing = !answers[answers.length - 1].drawing;
98
- if (answers.length > 0 && isLastAttemptsWithoutDrowing) {
99
- model.dropdown.setExpanded(true);
100
- } else {
101
- model.dropdown.setExpanded(false);
102
- }
103
- model.resetPlayer();
104
- }, [problemId]);
105
- useEffect(() => {
106
- if (answersRef.current.some(answer => answer.audioFileId)) {
107
- model.initializeWithAudios(answersRef.current);
108
- model.loader.loadAllTranscripts();
109
- }
110
- }, [model, answersKey]);
111
- useEffect(() => {
112
- model.stopAudio();
113
- }, [activeAttempt]);
114
- useEffect(() => {
115
- const allAttempts = model.getAllAttempts();
116
- setAttempts(allAttempts);
117
- }, [answersKey, transcriptsLoaded, currentAttempt, model]);
118
- useEffect(() => {
119
- if (isDropdownExpanded && activeAttempt !== null) {
120
- setTimeout(() => {
121
- scrollToAttempt(activeAttempt);
122
- }, 500);
123
- }
124
- }, [isDropdownExpanded, answersKey]);
125
- const renderItem = useCallback(({
126
- item
127
- }) => {
128
- const isLoading = model.loader.isTranscriptLoading(item.attemptNumber);
129
- const transcript = model.loader.getTranscript(item.attemptNumber);
130
- const isActive = activeAttempt === item.attemptNumber;
131
- return /*#__PURE__*/_jsx(VoiceTranscriptionsDropdownItem, {
132
- isLoading: isActive && isLoading,
133
- attempt: item.attemptNumber,
134
- content: transcript && transcript !== NO_AUDIO_BE_MESSAGE ? transcript : t('voice.transcriptNotAvailable'),
135
- isActive: isActive,
136
- onToggle: handleItemToggle,
137
- scrollToAttempt: scrollToAttempt
138
- });
139
- }, [model, activeAttempt, t, handleItemToggle, scrollToAttempt]);
140
- return /*#__PURE__*/_jsxs(Animated.View, {
141
- style: [styles.container, style],
142
- children: [/*#__PURE__*/_jsxs(View, {
143
- style: styles.header,
144
- children: [/*#__PURE__*/_jsx(Typography, {
145
- style: styles.title,
146
- variant: "h7",
147
- children: t('voice.transcriptions')
148
- }), hasActiveTranscript && /*#__PURE__*/_jsx(Animated.View, {
149
- entering: FadeIn.duration(120),
150
- exiting: FadeOut.duration(120),
151
- children: /*#__PURE__*/_jsx(PlayButton, {
152
- state: playButtonState,
153
- onPress: handlePlayPress,
154
- activityIndicatorColor: COLORS.NEUTRAL_1
155
- })
156
- })]
157
- }), /*#__PURE__*/_jsx(Animated.View, {
158
- style: [listAnimatedStyle, {
159
- overflow: 'hidden'
160
- }],
161
- children: /*#__PURE__*/_jsx(View, {
162
- onLayout: onListLayout,
163
- style: styles.listContainer,
164
- children: IS_WEB ? /*#__PURE__*/_jsx(ScrollableListScrollView, {
165
- bounces: false,
166
- ref: scrollViewRef,
167
- hideShadow: true,
168
- style: styles.list,
169
- contentContainerStyle: styles.listContent,
170
- children: attempts.map(item => /*#__PURE__*/_jsx(View, {
171
- onLayout: e => handleItemLayout(item._id, e),
172
- children: renderItem({
173
- item
174
- })
175
- }, item._id))
176
- }) : /*#__PURE__*/_jsx(ScrollableList, {
177
- bounces: false,
178
- ref: scrollRef,
179
- hideShadow: true,
180
- data: attempts,
181
- keyExtractor: item => item._id,
182
- onScrollToIndexFailed: handleScrollToIndexFailed,
183
- renderItem: renderItem,
184
- contentContainerStyle: styles.listContent
185
- })
186
- })
187
- }), /*#__PURE__*/_jsx(AnimatedTouchableOpacity, {
188
- style: [styles.expandButton, iconAnimatedStyle],
189
- onPress: () => model.dropdown.toggleExpand(),
190
- children: /*#__PURE__*/_jsx(CaretDownIcon, {
191
- size: 22
192
- })
193
- })]
194
- });
195
- };
196
- const styles = StyleSheet.create({
197
- container: {
198
- position: 'absolute',
199
- top: 56,
200
- left: 8,
201
- width: 222,
202
- maxHeight: 405,
203
- minHeight: 51,
204
- padding: 4,
205
- boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
206
- borderRadius: 12,
207
- backgroundColor: COLORS.NEUTRAL_1,
208
- overflow: 'hidden'
209
- },
210
- header: {
211
- flexDirection: 'row',
212
- justifyContent: 'space-between',
213
- alignItems: 'center',
214
- padding: 4,
215
- marginBottom: 4,
216
- height: 32
217
- },
218
- title: {
219
- color: COLORS.NEUTRAL_9,
220
- marginLeft: 4
221
- },
222
- list: {
223
- flex: 1
224
- },
225
- expandButton: {
226
- justifyContent: 'center',
227
- alignItems: 'center'
228
- },
229
- listContainer: {
230
- position: 'absolute',
231
- maxHeight: DROPDOWN_MAX_CONTENT_HEIGHT,
232
- width: '100%'
233
- },
234
- listContent: {
235
- paddingHorizontal: 4
236
- }
237
- });
238
- //# sourceMappingURL=VoiceTranscriptionsDropdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Typography","ScrollableList","CaretDownIcon","COLORS","IS_WEB","ScrollableListScrollView","useUnit","React","useRef","useEffect","useState","useCallback","useMemo","TouchableOpacity","View","StyleSheet","Animated","FadeIn","FadeOut","useVoiceTranscriptionsDropdown","PlayerState","VoiceTranscriptionsDropdownItem","DROPDOWN_MAX_CONTENT_HEIGHT","NO_AUDIO_BE_MESSAGE","useText","PlayButton","getActiveAttempt","getAudioStatus","jsx","_jsx","jsxs","_jsxs","AnimatedTouchableOpacity","createAnimatedComponent","VoiceTranscriptionsDropdown","style","model","answers","attemptOffset","onAttemptOffsetChange","attemptsCount","problemId","attempts","setAttempts","scrollRef","scrollViewRef","itemLayoutsRef","Map","answersRef","current","t","currentAttempt","transcriptsLoaded","playerState","isDropdownExpanded","$currentAttempt","loader","$transcriptsLoaded","$playerState","dropdown","$isExpanded","activeAttempt","answersKey","map","a","_id","audioFileId","join","hasActiveTranscript","undefined","playButtonState","isActive","IDLE","isLoading","LOADING","status","listAnimatedStyle","iconAnimatedStyle","onListLayout","handleItemLayout","id","event","set","nativeEvent","layout","y","scrollToAttempt","attemptNumber","item","find","get","scrollTo","animated","index","findIndex","scrollToIndex","viewPosition","handleItemToggle","attempt","handlePlayPress","togglePlayPause","handleScrollToIndexFailed","info","setTimeout","reinitializePlayer","cleanup","isLastAttemptsWithoutDrowing","length","drawing","setExpanded","resetPlayer","some","answer","initializeWithAudios","loadAllTranscripts","stopAudio","allAttempts","getAllAttempts","renderItem","isTranscriptLoading","transcript","getTranscript","content","onToggle","styles","container","children","header","title","variant","entering","duration","exiting","state","onPress","activityIndicatorColor","NEUTRAL_1","overflow","onLayout","listContainer","bounces","ref","hideShadow","list","contentContainerStyle","listContent","e","data","keyExtractor","onScrollToIndexFailed","expandButton","toggleExpand","size","create","position","top","left","width","maxHeight","minHeight","padding","boxShadow","borderRadius","backgroundColor","flexDirection","justifyContent","alignItems","marginBottom","height","color","NEUTRAL_9","marginLeft","flex","paddingHorizontal"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionsDropdown.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,cAAc,EACdC,aAAa,EACbC,MAAM,EACNC,MAAM,EACNC,wBAAwB,QACnB,4BAA4B;AACnC,SAASC,OAAO,QAAQ,gBAAgB;AACxC,OAAOC,KAAK,IAAIC,MAAM,EAAEC,SAAS,EAAEC,QAAQ,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAChF,SACEC,gBAAgB,EAMhBC,IAAI,EACJC,UAAU,QACL,cAAc;AACrB,OAAOC,QAAQ,IAAIC,MAAM,EAAEC,OAAO,QAAQ,yBAAyB;AAEnE,SAASC,8BAA8B,QAAQ,4CAAyC;AACxF,SAA2BC,WAAW,QAAQ,mBAAU;AACxD,SAASC,+BAA+B,QAAQ,sCAAmC;AACnF,SAASC,2BAA2B,EAAEC,mBAAmB,QAAQ,oBAAiB;AAClF,SAASC,OAAO,QAAQ,0BAAuB;AAC/C,SAASC,UAAU,QAAQ,6CAA0C;AACrE,SAASC,gBAAgB,EAAEC,cAAc,QAAQ,kBAAe;AAAA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEhE,MAAMC,wBAAwB,GAAGhB,QAAQ,CAACiB,uBAAuB,CAACpB,gBAAgB,CAAC;AAYnF,OAAO,MAAMqB,2BAA2B,GAAGA,CAAC;EAC1CC,KAAK;EACLC,KAAK;EACLC,OAAO;EACPC,aAAa;EACbC,qBAAqB;EACrBC,aAAa;EACbC;AACgC,CAAC,KAAK;EACtC,MAAM,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/B5B,SAAS,EAAE;IACT6B,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,EAAEhK,MAAM,CAACqI,SAAS;IACjCC,QAAQ,EAAE;EACZ,CAAC;EACDV,MAAM,EAAE;IACNqC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBN,OAAO,EAAE,CAAC;IACVO,YAAY,EAAE,CAAC;IACfC,MAAM,EAAE;EACV,CAAC;EACDxC,KAAK,EAAE;IACLyC,KAAK,EAAEtK,MAAM,CAACuK,SAAS;IACvBC,UAAU,EAAE;EACd,CAAC;EACD5B,IAAI,EAAE;IAAE6B,IAAI,EAAE;EAAE,CAAC;EACjBtB,YAAY,EAAE;IACZe,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACD3B,aAAa,EAAE;IACbe,QAAQ,EAAE,UAAU;IACpBI,SAAS,EAAExI,2BAA2B;IACtCuI,KAAK,EAAE;EACT,CAAC;EACDZ,WAAW,EAAE;IACX4B,iBAAiB,EAAE;EACrB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1,103 +0,0 @@
1
- "use strict";
2
-
3
- import { Pressable, StyleSheet, View } from 'react-native';
4
- import React, { memo, useCallback, useRef } from 'react';
5
- import { Button, ButtonSize, ButtonVariant, COLORS, Loader, LoaderColor, LoaderSize, Typography } from '@magmamath/react-native-ui';
6
- import Animated, { runOnJS, useAnimatedReaction } from 'react-native-reanimated';
7
- import { useVoiceTranscriptionsDropdownItemAnimation } from "../hooks/useVoiceTranscriptionsDropdownItemAnimation.js";
8
- import { useText } from "../../../../i18n/i18n.js";
9
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
- export const VoiceTranscriptionsDropdownItem = /*#__PURE__*/memo(({
11
- attempt,
12
- content,
13
- isActive,
14
- isLoading,
15
- onToggle,
16
- scrollToAttempt
17
- }) => {
18
- const t = useText();
19
- const isActiveRef = useRef(isActive);
20
- isActiveRef.current = isActive;
21
- const {
22
- contentAnimatedStyle,
23
- onLayout,
24
- progress
25
- } = useVoiceTranscriptionsDropdownItemAnimation(isActive);
26
- const handleScrollToAttempt = useCallback(attemptNumber => {
27
- if (!isActiveRef.current) return;
28
- scrollToAttempt(attemptNumber);
29
- }, [scrollToAttempt]);
30
- useAnimatedReaction(() => progress.value, progress => {
31
- if (progress === 1 && isActive) {
32
- runOnJS(handleScrollToAttempt)(attempt);
33
- }
34
- }, [progress, attempt, isActive]);
35
- return /*#__PURE__*/_jsxs(View, {
36
- style: styles.container,
37
- children: [/*#__PURE__*/_jsx(Pressable, {
38
- disabled: isActive,
39
- style: styles.itemHeader,
40
- onPress: () => onToggle(attempt),
41
- children: /*#__PURE__*/_jsx(Button, {
42
- onPress: () => !isActive && onToggle(attempt),
43
- size: ButtonSize.SMALL,
44
- variant: ButtonVariant.TERTIARY,
45
- style: {
46
- text: {
47
- textTransform: 'uppercase',
48
- color: isActive ? COLORS.NEUTRAL_9 : COLORS.NEUTRAL_7
49
- }
50
- },
51
- children: t('voice.attempt', {
52
- number: String(attempt)
53
- })
54
- })
55
- }), isLoading ? /*#__PURE__*/_jsx(View, {
56
- style: styles.loaderContainer,
57
- children: /*#__PURE__*/_jsx(Loader, {
58
- size: LoaderSize.SMALL,
59
- color: LoaderColor.BLUE
60
- })
61
- }) : /*#__PURE__*/_jsx(Animated.View, {
62
- style: contentAnimatedStyle,
63
- children: /*#__PURE__*/_jsx(View, {
64
- onLayout: onLayout,
65
- style: styles.contentWrapper,
66
- children: /*#__PURE__*/_jsx(Typography, {
67
- variant: "h8",
68
- style: [styles.itemContent, {
69
- color: isActive ? COLORS.NEUTRAL_9 : COLORS.NEUTRAL_7
70
- }],
71
- children: content
72
- })
73
- })
74
- })]
75
- });
76
- });
77
- const styles = StyleSheet.create({
78
- container: {
79
- borderTopWidth: 1,
80
- borderColor: COLORS.NEUTRAL_3
81
- },
82
- itemHeader: {
83
- flexDirection: 'row',
84
- justifyContent: 'space-between',
85
- alignItems: 'center',
86
- width: '100%',
87
- paddingVertical: 8
88
- },
89
- itemContent: {
90
- paddingHorizontal: 8
91
- },
92
- contentWrapper: {
93
- width: '100%',
94
- position: 'absolute'
95
- },
96
- loaderContainer: {
97
- justifyContent: 'center',
98
- alignItems: 'center',
99
- paddingTop: 4,
100
- paddingBottom: 8
101
- }
102
- });
103
- //# sourceMappingURL=VoiceTranscriptionsDropdownItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["Pressable","StyleSheet","View","React","memo","useCallback","useRef","Button","ButtonSize","ButtonVariant","COLORS","Loader","LoaderColor","LoaderSize","Typography","Animated","runOnJS","useAnimatedReaction","useVoiceTranscriptionsDropdownItemAnimation","useText","jsx","_jsx","jsxs","_jsxs","VoiceTranscriptionsDropdownItem","attempt","content","isActive","isLoading","onToggle","scrollToAttempt","t","isActiveRef","current","contentAnimatedStyle","onLayout","progress","handleScrollToAttempt","attemptNumber","value","style","styles","container","children","disabled","itemHeader","onPress","size","SMALL","variant","TERTIARY","text","textTransform","color","NEUTRAL_9","NEUTRAL_7","number","String","loaderContainer","BLUE","contentWrapper","itemContent","create","borderTopWidth","borderColor","NEUTRAL_3","flexDirection","justifyContent","alignItems","width","paddingVertical","paddingHorizontal","position","paddingTop","paddingBottom"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx"],"mappings":";;AAAA,SAASA,SAAS,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAC1D,OAAOC,KAAK,IAAIC,IAAI,EAAEC,WAAW,EAAEC,MAAM,QAAQ,OAAO;AACxD,SACEC,MAAM,EACNC,UAAU,EACVC,aAAa,EAC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AC,CACT;IAAC,CACM,CAChB;EAAA,CACG,CAAC;AAEX,CACF,CAAC;AAED,MAAMe,MAAM,GAAGxC,UAAU,CAAC6D,MAAM,CAAC;EAC/BpB,SAAS,EAAE;IACTqB,cAAc,EAAE,CAAC;IACjBC,WAAW,EAAEtD,MAAM,CAACuD;EACtB,CAAC;EACDpB,UAAU,EAAE;IACVqB,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAE,MAAM;IACbC,eAAe,EAAE;EACnB,CAAC;EACDT,WAAW,EAAE;IACXU,iBAAiB,EAAE;EACrB,CAAC;EACDX,cAAc,EAAE;IACdS,KAAK,EAAE,MAAM;IACbG,QAAQ,EAAE;EACZ,CAAC;EACDd,eAAe,EAAE;IACfS,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBK,UAAU,EAAE,CAAC;IACbC,aAAa,EAAE;EACjB;AACF,CAAC,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useUnit","useAnimatedStyle","useSharedValue","withTiming","interpolate","DROPDOWN_MAX_CONTENT_HEIGHT","useVoiceTranscriptionsDropdown","model","isExpanded","$isExpanded","contentHeight","animationProgress","onListLayout","event","measuredHeight","nativeEvent","layout","height","value","listAnimatedStyle","opacity","iconAnimatedStyle","rotation","transform","rotate","duration"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,OAAO,QAAQ,gBAAgB;AACxC,SAASC,gBAAgB,EAAEC,cAAc,EAAEC,UAAU,EAAEC,WAAW,QAAQ,yBAAyB;AAEnG,SAASC,2BAA2B,QAAQ,oBAAiB;AAG7D,OAAO,MAAMC,8BAA8B,GAAIC,KAAuC,IAAK;EACzF,MAAMC,UAAU,GAAGR,OAAO,CAACO,KAAK,CAACE,WAAW,C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G,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,29 +0,0 @@
1
- "use strict";
2
-
3
- import { useEffect } from 'react';
4
- import { useSharedValue, withTiming, useDerivedValue, useAnimatedStyle, interpolate } from 'react-native-reanimated';
5
- export const useVoiceTranscriptionsDropdownItemAnimation = isExpanded => {
6
- const height = useSharedValue(0);
7
- const progress = useSharedValue(isExpanded ? 1 : 0);
8
- useEffect(() => {
9
- progress.value = withTiming(isExpanded ? 1 : 0);
10
- }, [isExpanded, progress]);
11
- const derivedHeight = useDerivedValue(() => height.value * progress.value, [height, progress]);
12
- const contentAnimatedStyle = useAnimatedStyle(() => {
13
- const opacity = interpolate(progress.value, [0, 0.3, 1], [0, 0, 1]);
14
- return {
15
- height: derivedHeight.value,
16
- opacity,
17
- overflow: 'hidden'
18
- };
19
- }, [progress, derivedHeight]);
20
- const onLayout = event => {
21
- height.value = event.nativeEvent.layout.height;
22
- };
23
- return {
24
- contentAnimatedStyle,
25
- onLayout,
26
- progress
27
- };
28
- };
29
- //# sourceMappingURL=useVoiceTranscriptionsDropdownItemAnimation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["useEffect","useSharedValue","withTiming","useDerivedValue","useAnimatedStyle","interpolate","useVoiceTranscriptionsDropdownItemAnimation","isExpanded","height","progress","value","derivedHeight","contentAnimatedStyle","opacity","overflow","onLayout","event","nativeEvent","layout"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,OAAO;AAEjC,SACEC,cAAc,EACdC,UAAU,EACVC,eAAe,EACfC,gBAAgB,EAChBC,WAAW,QACN,yBAAyB;AAEhC,OAAO,MAAMC,2CAA2C,GAAIC,UAAmB,IAAK;EAClF,MAAMC,MAAM,GAAGP,cAAc,CAAC,CAAC,CAAC;EAChC,MAAMQ,QAAQ,GAAGR,cAAc,CAACM,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;EAEnDP,SAAS,CAAC,MAAM;IACdS,QAAQ,CAACC,KAAK,GAAGR,UAAU,CAACK,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;EACjD,CAAC,EAAE,CAACA,UAAU,EAAEE,QAAQ,CAAC,CAAC;EAE1B,MAAME,aAAa,GAAGR,eAAe,CAAC,MAAMK,MAAM,CAACE,KAAK,GAAGD,QAAQ,CAACC,KAAK,EAAE,CAACF,MAAM,EAAEC,QAAQ,CAAC,CAAC;EAE9F,MAAMG,oBAAoB,GAAGR,gBAAgB,CAAC,MAAM;IAClD,MAAMS,OAAO,GAAGR,WAAW,CAACI,QAAQ,CAACC,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAEnE,OAAO;MACLF,MAAM,EAAEG,aAAa,CAACD,KAAK;MAC3BG,OAAO;MACPC,QAAQ,EAAE;IACZ,CAAC;EACH,CAAC,EAAE,CAACL,QAAQ,EAAEE,aAAa,CAAC,CAAC;EAE7B,MAAMI,QAAQ,GAAIC,KAAwB,IAAK;IAC7CR,MAAM,CAACE,KAAK,GAAGM,KAAK,CAACC,WAAW,CAACC,MAAM,CAACV,MAAM;EAChD,CAAC;EAED,OAAO;IACLI,oBAAoB;IACpBG,QAAQ;IACRN;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["createEvent","restore","VoiceTranscriptionsDropdownModel","toggleExpand","setExpanded","reset","$isExpanded","on","state"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAeC,OAAO,QAAQ,UAAU;AAE5D,OAAO,MAAMC,gCAAgC,CAAC;EAC5BC,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,16 +0,0 @@
1
- import React from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- import { AnswerAudio } from '../../types';
4
- import { VoicePlayerModel } from '../model';
5
- type VoiceTranscriptionsDropdownProps = {
6
- style?: StyleProp<ViewStyle>;
7
- model: VoicePlayerModel;
8
- answers: AnswerAudio[];
9
- attemptOffset: number;
10
- onAttemptOffsetChange: (offset: number) => void;
11
- attemptsCount: number;
12
- problemId: string;
13
- };
14
- export declare const VoiceTranscriptionsDropdown: ({ style, model, answers, attemptOffset, onAttemptOffsetChange, attemptsCount, problemId, }: VoiceTranscriptionsDropdownProps) => React.JSX.Element;
15
- export {};
16
- //# sourceMappingURL=VoiceTranscriptionsDropdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceTranscriptionsDropdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx"],"names":[],"mappings":"AASA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAChF,OAAO,EAEL,SAAS,EACT,SAAS,EAMV,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,WAAW,EAA0B,MAAM,aAAa,CAAA;AAEjE,OAAO,EAAE,gBAAgB,EAAe,MAAM,UAAU,CAAA;AASxD,KAAK,gCAAgC,GAAG;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,KAAK,EAAE,gBAAgB,CAAA;IACvB,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,2BAA2B,+FAQrC,gCAAgC,sBA4MlC,CAAA"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- type VoiceTranscriptionsDropdownItemProps = {
3
- attempt: number;
4
- content: string;
5
- isActive: boolean;
6
- isLoading?: boolean;
7
- onToggle: (attempt: number) => void;
8
- scrollToAttempt: (attempt: number) => void;
9
- };
10
- export declare const VoiceTranscriptionsDropdownItem: React.MemoExoticComponent<({ attempt, content, isActive, isLoading, onToggle, scrollToAttempt, }: VoiceTranscriptionsDropdownItemProps) => React.JSX.Element>;
11
- export {};
12
- //# sourceMappingURL=VoiceTranscriptionsDropdownItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceTranscriptionsDropdownItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAA;AAexD,KAAK,oCAAoC,GAAG;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,+BAA+B,oGAQvC,oCAAoC,uBAmExC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVoiceTranscriptionsDropdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gCAAgC,EAAE,MAAM,4CAA4C,CAAA;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhD,eAAO,MAAM,8BAA8B,UAAW,gCAAgC;;;;;;;;;;;0BAMvD,iBAAiB;CAwC/C,CAAA"}
@@ -1,11 +0,0 @@
1
- import { LayoutChangeEvent } from 'react-native';
2
- export declare const useVoiceTranscriptionsDropdownItemAnimation: (isExpanded: boolean) => {
3
- contentAnimatedStyle: {
4
- height: number;
5
- opacity: number;
6
- overflow: "hidden";
7
- };
8
- onLayout: (event: LayoutChangeEvent) => void;
9
- progress: import("react-native-reanimated").SharedValue<number>;
10
- };
11
- //# sourceMappingURL=useVoiceTranscriptionsDropdownItemAnimation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVoiceTranscriptionsDropdownItemAnimation.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAShD,eAAO,MAAM,2CAA2C,eAAgB,OAAO;;;;;;sBAoBpD,iBAAiB;;CAS3C,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceTranscriptionsDropdown.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts"],"names":[],"mappings":"AAEA,qBAAa,gCAAgC;IAC3C,SAAgB,YAAY,yCAAgB;IAC5C,SAAgB,WAAW,4CAAyB;IACpD,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,WAAW,4CAEP;CACrB"}
@@ -1,16 +0,0 @@
1
- import React from 'react';
2
- import { StyleProp, ViewStyle } from 'react-native';
3
- import { AnswerAudio } from '../../types';
4
- import { VoicePlayerModel } from '../model';
5
- type VoiceTranscriptionsDropdownProps = {
6
- style?: StyleProp<ViewStyle>;
7
- model: VoicePlayerModel;
8
- answers: AnswerAudio[];
9
- attemptOffset: number;
10
- onAttemptOffsetChange: (offset: number) => void;
11
- attemptsCount: number;
12
- problemId: string;
13
- };
14
- export declare const VoiceTranscriptionsDropdown: ({ style, model, answers, attemptOffset, onAttemptOffsetChange, attemptsCount, problemId, }: VoiceTranscriptionsDropdownProps) => React.JSX.Element;
15
- export {};
16
- //# sourceMappingURL=VoiceTranscriptionsDropdown.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceTranscriptionsDropdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx"],"names":[],"mappings":"AASA,OAAO,KAA4D,MAAM,OAAO,CAAA;AAChF,OAAO,EAEL,SAAS,EACT,SAAS,EAMV,MAAM,cAAc,CAAA;AAErB,OAAO,EAAE,WAAW,EAA0B,MAAM,aAAa,CAAA;AAEjE,OAAO,EAAE,gBAAgB,EAAe,MAAM,UAAU,CAAA;AASxD,KAAK,gCAAgC,GAAG;IACtC,KAAK,CAAC,EAAE,SAAS,CAAC,SAAS,CAAC,CAAA;IAC5B,KAAK,EAAE,gBAAgB,CAAA;IACvB,OAAO,EAAE,WAAW,EAAE,CAAA;IACtB,aAAa,EAAE,MAAM,CAAA;IACrB,qBAAqB,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAA;IAC/C,aAAa,EAAE,MAAM,CAAA;IACrB,SAAS,EAAE,MAAM,CAAA;CAClB,CAAA;AAED,eAAO,MAAM,2BAA2B,+FAQrC,gCAAgC,sBA4MlC,CAAA"}
@@ -1,12 +0,0 @@
1
- import React from 'react';
2
- type VoiceTranscriptionsDropdownItemProps = {
3
- attempt: number;
4
- content: string;
5
- isActive: boolean;
6
- isLoading?: boolean;
7
- onToggle: (attempt: number) => void;
8
- scrollToAttempt: (attempt: number) => void;
9
- };
10
- export declare const VoiceTranscriptionsDropdownItem: React.MemoExoticComponent<({ attempt, content, isActive, isLoading, onToggle, scrollToAttempt, }: VoiceTranscriptionsDropdownItemProps) => React.JSX.Element>;
11
- export {};
12
- //# sourceMappingURL=VoiceTranscriptionsDropdownItem.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceTranscriptionsDropdownItem.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAA;AAexD,KAAK,oCAAoC,GAAG;IAC1C,OAAO,EAAE,MAAM,CAAA;IACf,OAAO,EAAE,MAAM,CAAA;IACf,QAAQ,EAAE,OAAO,CAAA;IACjB,SAAS,CAAC,EAAE,OAAO,CAAA;IACnB,QAAQ,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;IACnC,eAAe,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAA;CAC3C,CAAA;AAED,eAAO,MAAM,+BAA+B,oGAQvC,oCAAoC,uBAmExC,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVoiceTranscriptionsDropdown.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,gCAAgC,EAAE,MAAM,4CAA4C,CAAA;AAE7F,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAEhD,eAAO,MAAM,8BAA8B,UAAW,gCAAgC;;;;;;;;;;;0BAMvD,iBAAiB;CAwC/C,CAAA"}
@@ -1,11 +0,0 @@
1
- import { LayoutChangeEvent } from 'react-native';
2
- export declare const useVoiceTranscriptionsDropdownItemAnimation: (isExpanded: boolean) => {
3
- contentAnimatedStyle: {
4
- height: number;
5
- opacity: number;
6
- overflow: "hidden";
7
- };
8
- onLayout: (event: LayoutChangeEvent) => void;
9
- progress: import("react-native-reanimated").SharedValue<number>;
10
- };
11
- //# sourceMappingURL=useVoiceTranscriptionsDropdownItemAnimation.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useVoiceTranscriptionsDropdownItemAnimation.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAA;AAShD,eAAO,MAAM,2CAA2C,eAAgB,OAAO;;;;;;sBAoBpD,iBAAiB;;CAS3C,CAAA"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"VoiceTranscriptionsDropdown.model.d.ts","sourceRoot":"","sources":["../../../../../../../src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts"],"names":[],"mappings":"AAEA,qBAAa,gCAAgC;IAC3C,SAAgB,YAAY,yCAAgB;IAC5C,SAAgB,WAAW,4CAAyB;IACpD,SAAgB,KAAK,yCAAgB;IAErC,SAAgB,WAAW,4CAEP;CACrB"}