@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,245 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.VoiceTranscriptionsDropdown = void 0;
7
- var _reactNativeUi = require("@magmamath/react-native-ui");
8
- var _effectorReact = require("effector-react");
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _reactNative = require("react-native");
11
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
12
- var _useVoiceTranscriptionsDropdown = require("../hooks/useVoiceTranscriptionsDropdown.js");
13
- var _index = require("../model/index.js");
14
- var _VoiceTranscriptionsDropdownItem = require("./VoiceTranscriptionsDropdownItem.js");
15
- var _constants = require("../../constants.js");
16
- var _i18n = require("../../../../i18n/i18n.js");
17
- var _PlayButton = require("../../../../shared/components/PlayButton.js");
18
- var _helpers = require("../../helpers.js");
19
- var _jsxRuntime = require("react/jsx-runtime");
20
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
21
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
22
- const AnimatedTouchableOpacity = _reactNativeReanimated.default.createAnimatedComponent(_reactNative.TouchableOpacity);
23
- const VoiceTranscriptionsDropdown = ({
24
- style,
25
- model,
26
- answers,
27
- attemptOffset,
28
- onAttemptOffsetChange,
29
- attemptsCount,
30
- problemId
31
- }) => {
32
- const [attempts, setAttempts] = (0, _react.useState)([]);
33
- const scrollRef = (0, _react.useRef)(null);
34
- const scrollViewRef = (0, _react.useRef)(null);
35
- const itemLayoutsRef = (0, _react.useRef)(new Map());
36
- const answersRef = (0, _react.useRef)(answers);
37
- answersRef.current = answers;
38
- const t = (0, _i18n.useText)();
39
- const [currentAttempt, transcriptsLoaded, playerState, isDropdownExpanded] = (0, _effectorReact.useUnit)([model.$currentAttempt, model.loader.$transcriptsLoaded, model.$playerState, model.dropdown.$isExpanded]);
40
- const activeAttempt = (0, _helpers.getActiveAttempt)(attemptOffset, attemptsCount);
41
- const answersKey = (0, _react.useMemo)(() => answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(','), [answers]);
42
- const hasActiveTranscript = activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined;
43
- const playButtonState = {
44
- isActive: playerState !== _index.PlayerState.IDLE,
45
- isLoading: playerState === _index.PlayerState.LOADING,
46
- status: (0, _helpers.getAudioStatus)(playerState)
47
- };
48
- const {
49
- listAnimatedStyle,
50
- iconAnimatedStyle,
51
- onListLayout
52
- } = (0, _useVoiceTranscriptionsDropdown.useVoiceTranscriptionsDropdown)(model.dropdown);
53
- const handleItemLayout = (0, _react.useCallback)((id, event) => {
54
- itemLayoutsRef.current.set(id, event.nativeEvent.layout.y);
55
- }, []);
56
- const scrollToAttempt = (0, _react.useCallback)(attemptNumber => {
57
- if (_reactNativeUi.IS_WEB) {
58
- const item = attempts.find(item => item.attemptNumber === attemptNumber);
59
- if (item) {
60
- const y = itemLayoutsRef.current.get(item._id);
61
- if (y !== undefined) {
62
- scrollViewRef.current?.scrollTo({
63
- y,
64
- animated: true
65
- });
66
- }
67
- }
68
- return;
69
- }
70
- const index = attempts.findIndex(item => item.attemptNumber === attemptNumber);
71
- if (index !== -1) {
72
- scrollRef.current?.scrollToIndex({
73
- index,
74
- animated: true,
75
- viewPosition: 0
76
- });
77
- }
78
- }, [attempts]);
79
- const handleItemToggle = (0, _react.useCallback)(attempt => {
80
- if (onAttemptOffsetChange && attemptsCount !== undefined) {
81
- onAttemptOffsetChange(attemptsCount - attempt);
82
- }
83
- }, [onAttemptOffsetChange, attemptsCount]);
84
- const handlePlayPress = (0, _react.useCallback)(() => {
85
- if (activeAttempt) {
86
- model.togglePlayPause(activeAttempt);
87
- }
88
- }, [model, activeAttempt]);
89
- const handleScrollToIndexFailed = (0, _react.useCallback)(info => {
90
- setTimeout(() => {
91
- scrollRef.current?.scrollToIndex({
92
- index: info.index,
93
- animated: true,
94
- viewPosition: 0
95
- });
96
- }, 100);
97
- }, []);
98
- (0, _react.useEffect)(() => {
99
- model.reinitializePlayer();
100
- return () => model.cleanup();
101
- }, [model]);
102
- (0, _react.useEffect)(() => {
103
- const isLastAttemptsWithoutDrowing = !answers[answers.length - 1].drawing;
104
- if (answers.length > 0 && isLastAttemptsWithoutDrowing) {
105
- model.dropdown.setExpanded(true);
106
- } else {
107
- model.dropdown.setExpanded(false);
108
- }
109
- model.resetPlayer();
110
- }, [problemId]);
111
- (0, _react.useEffect)(() => {
112
- if (answersRef.current.some(answer => answer.audioFileId)) {
113
- model.initializeWithAudios(answersRef.current);
114
- model.loader.loadAllTranscripts();
115
- }
116
- }, [model, answersKey]);
117
- (0, _react.useEffect)(() => {
118
- model.stopAudio();
119
- }, [activeAttempt]);
120
- (0, _react.useEffect)(() => {
121
- const allAttempts = model.getAllAttempts();
122
- setAttempts(allAttempts);
123
- }, [answersKey, transcriptsLoaded, currentAttempt, model]);
124
- (0, _react.useEffect)(() => {
125
- if (isDropdownExpanded && activeAttempt !== null) {
126
- setTimeout(() => {
127
- scrollToAttempt(activeAttempt);
128
- }, 500);
129
- }
130
- }, [isDropdownExpanded, answersKey]);
131
- const renderItem = (0, _react.useCallback)(({
132
- item
133
- }) => {
134
- const isLoading = model.loader.isTranscriptLoading(item.attemptNumber);
135
- const transcript = model.loader.getTranscript(item.attemptNumber);
136
- const isActive = activeAttempt === item.attemptNumber;
137
- return /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptionsDropdownItem.VoiceTranscriptionsDropdownItem, {
138
- isLoading: isActive && isLoading,
139
- attempt: item.attemptNumber,
140
- content: transcript && transcript !== _constants.NO_AUDIO_BE_MESSAGE ? transcript : t('voice.transcriptNotAvailable'),
141
- isActive: isActive,
142
- onToggle: handleItemToggle,
143
- scrollToAttempt: scrollToAttempt
144
- });
145
- }, [model, activeAttempt, t, handleItemToggle, scrollToAttempt]);
146
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
147
- style: [styles.container, style],
148
- children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
149
- style: styles.header,
150
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
151
- style: styles.title,
152
- variant: "h7",
153
- children: t('voice.transcriptions')
154
- }), hasActiveTranscript && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
155
- entering: _reactNativeReanimated.FadeIn.duration(120),
156
- exiting: _reactNativeReanimated.FadeOut.duration(120),
157
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayButton.PlayButton, {
158
- state: playButtonState,
159
- onPress: handlePlayPress,
160
- activityIndicatorColor: _reactNativeUi.COLORS.NEUTRAL_1
161
- })
162
- })]
163
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
164
- style: [listAnimatedStyle, {
165
- overflow: 'hidden'
166
- }],
167
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
168
- onLayout: onListLayout,
169
- style: styles.listContainer,
170
- children: _reactNativeUi.IS_WEB ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.ScrollableListScrollView, {
171
- bounces: false,
172
- ref: scrollViewRef,
173
- hideShadow: true,
174
- style: styles.list,
175
- contentContainerStyle: styles.listContent,
176
- children: attempts.map(item => /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
177
- onLayout: e => handleItemLayout(item._id, e),
178
- children: renderItem({
179
- item
180
- })
181
- }, item._id))
182
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.ScrollableList, {
183
- bounces: false,
184
- ref: scrollRef,
185
- hideShadow: true,
186
- data: attempts,
187
- keyExtractor: item => item._id,
188
- onScrollToIndexFailed: handleScrollToIndexFailed,
189
- renderItem: renderItem,
190
- contentContainerStyle: styles.listContent
191
- })
192
- })
193
- }), /*#__PURE__*/(0, _jsxRuntime.jsx)(AnimatedTouchableOpacity, {
194
- style: [styles.expandButton, iconAnimatedStyle],
195
- onPress: () => model.dropdown.toggleExpand(),
196
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.CaretDownIcon, {
197
- size: 22
198
- })
199
- })]
200
- });
201
- };
202
- exports.VoiceTranscriptionsDropdown = VoiceTranscriptionsDropdown;
203
- const styles = _reactNative.StyleSheet.create({
204
- container: {
205
- position: 'absolute',
206
- top: 56,
207
- left: 8,
208
- width: 222,
209
- maxHeight: 405,
210
- minHeight: 51,
211
- padding: 4,
212
- boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
213
- borderRadius: 12,
214
- backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
215
- overflow: 'hidden'
216
- },
217
- header: {
218
- flexDirection: 'row',
219
- justifyContent: 'space-between',
220
- alignItems: 'center',
221
- padding: 4,
222
- marginBottom: 4,
223
- height: 32
224
- },
225
- title: {
226
- color: _reactNativeUi.COLORS.NEUTRAL_9,
227
- marginLeft: 4
228
- },
229
- list: {
230
- flex: 1
231
- },
232
- expandButton: {
233
- justifyContent: 'center',
234
- alignItems: 'center'
235
- },
236
- listContainer: {
237
- position: 'absolute',
238
- maxHeight: _constants.DROPDOWN_MAX_CONTENT_HEIGHT,
239
- width: '100%'
240
- },
241
- listContent: {
242
- paddingHorizontal: 4
243
- }
244
- });
245
- //# sourceMappingURL=VoiceTranscriptionsDropdown.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNativeUi","require","_effectorReact","_react","_interopRequireWildcard","_reactNative","_reactNativeReanimated","_useVoiceTranscriptionsDropdown","_index","_VoiceTranscriptionsDropdownItem","_constants","_i18n","_PlayButton","_helpers","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AnimatedTouchableOpacity","Animated","createAnimatedComponent","TouchableOpacity","VoiceTranscriptionsDropdown","style","model","answers","attemptOffset","onAttemptOffsetChange","attemptsCount","problemId","attempts","setAttempts","useState","scrollRef","useRef","scrollViewRef","itemLayoutsRef","Map","answersRef","current","useText","currentAttempt","transcriptsLoaded","playerState","isDropdownExpanded","useUnit","$currentAttempt","loader","$transcriptsLoaded","$playerState","dropdown","$isExpanded","activeAttempt","getActiveAttempt","answersKey","useMemo","map","_id","audioFileId","join","hasActiveTranscript","undefined","playButtonState","isActive","PlayerState","IDLE","isLoading","LOADING","status","getAudioStatus","listAnimatedStyle","iconAnimatedStyle","onListLayout","useVoiceTranscriptionsDropdown","handleItemLayout","useCallback","id","event","nativeEvent","layout","y","scrollToAttempt","attemptNumber","IS_WEB","item","find","scrollTo","animated","index","findIndex","scrollToIndex","viewPosition","handleItemToggle","attempt","handlePlayPress","togglePlayPause","handleScrollToIndexFailed","info","setTimeout","useEffect","reinitializePlayer","cleanup","isLastAttemptsWithoutDrowing","length","drawing","setExpanded","resetPlayer","some","answer","initializeWithAudios","loadAllTranscripts","stopAudio","allAttempts","getAllAttempts","renderItem","isTranscriptLoading","transcript","getTranscript","jsx","VoiceTranscriptionsDropdownItem","content","NO_AUDIO_BE_MESSAGE","onToggle","jsxs","View","styles","container","children","header","Typography","title","variant","entering","FadeIn","duration","exiting","FadeOut","PlayButton","state","onPress","activityIndicatorColor","COLORS","NEUTRAL_1","overflow","onLayout","listContainer","ScrollableListScrollView","bounces","ref","hideShadow","list","contentContainerStyle","listContent","ScrollableList","data","keyExtractor","onScrollToIndexFailed","expandButton","toggleExpand","CaretDownIcon","size","exports","StyleSheet","create","position","top","left","width","maxHeight","minHeight","padding","boxShadow","borderRadius","backgroundColor","flexDirection","justifyContent","alignItems","marginBottom","height","color","NEUTRAL_9","marginLeft","flex","DROPDOWN_MAX_CONTENT_HEIGHT","paddingHorizontal"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionsDropdown.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AAQA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,YAAA,GAAAJ,OAAA;AAUA,IAAAK,sBAAA,GAAAF,uBAAA,CAAAH,OAAA;AAEA,IAAAM,+BAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,gCAAA,GAAAR,OAAA;AACA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,QAAA,GAAAZ,OAAA;AAAgE,IAAAa,WAAA,GAAAb,OAAA;AAAA,SAAAc,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAZ,wBAAAY,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OA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
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.VoiceTranscriptionsDropdownItem = void 0;
7
- var _reactNative = require("react-native");
8
- var _react = _interopRequireWildcard(require("react"));
9
- var _reactNativeUi = require("@magmamath/react-native-ui");
10
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
11
- var _useVoiceTranscriptionsDropdownItemAnimation = require("../hooks/useVoiceTranscriptionsDropdownItemAnimation.js");
12
- var _i18n = require("../../../../i18n/i18n.js");
13
- var _jsxRuntime = require("react/jsx-runtime");
14
- function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function (e) { return e ? t : r; })(e); }
15
- function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != typeof e && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
16
- const VoiceTranscriptionsDropdownItem = exports.VoiceTranscriptionsDropdownItem = /*#__PURE__*/(0, _react.memo)(({
17
- attempt,
18
- content,
19
- isActive,
20
- isLoading,
21
- onToggle,
22
- scrollToAttempt
23
- }) => {
24
- const t = (0, _i18n.useText)();
25
- const isActiveRef = (0, _react.useRef)(isActive);
26
- isActiveRef.current = isActive;
27
- const {
28
- contentAnimatedStyle,
29
- onLayout,
30
- progress
31
- } = (0, _useVoiceTranscriptionsDropdownItemAnimation.useVoiceTranscriptionsDropdownItemAnimation)(isActive);
32
- const handleScrollToAttempt = (0, _react.useCallback)(attemptNumber => {
33
- if (!isActiveRef.current) return;
34
- scrollToAttempt(attemptNumber);
35
- }, [scrollToAttempt]);
36
- (0, _reactNativeReanimated.useAnimatedReaction)(() => progress.value, progress => {
37
- if (progress === 1 && isActive) {
38
- (0, _reactNativeReanimated.runOnJS)(handleScrollToAttempt)(attempt);
39
- }
40
- }, [progress, attempt, isActive]);
41
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
42
- style: styles.container,
43
- children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Pressable, {
44
- disabled: isActive,
45
- style: styles.itemHeader,
46
- onPress: () => onToggle(attempt),
47
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
48
- onPress: () => !isActive && onToggle(attempt),
49
- size: _reactNativeUi.ButtonSize.SMALL,
50
- variant: _reactNativeUi.ButtonVariant.TERTIARY,
51
- style: {
52
- text: {
53
- textTransform: 'uppercase',
54
- color: isActive ? _reactNativeUi.COLORS.NEUTRAL_9 : _reactNativeUi.COLORS.NEUTRAL_7
55
- }
56
- },
57
- children: t('voice.attempt', {
58
- number: String(attempt)
59
- })
60
- })
61
- }), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
62
- style: styles.loaderContainer,
63
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Loader, {
64
- size: _reactNativeUi.LoaderSize.SMALL,
65
- color: _reactNativeUi.LoaderColor.BLUE
66
- })
67
- }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
68
- style: contentAnimatedStyle,
69
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
70
- onLayout: onLayout,
71
- style: styles.contentWrapper,
72
- children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
73
- variant: "h8",
74
- style: [styles.itemContent, {
75
- color: isActive ? _reactNativeUi.COLORS.NEUTRAL_9 : _reactNativeUi.COLORS.NEUTRAL_7
76
- }],
77
- children: content
78
- })
79
- })
80
- })]
81
- });
82
- });
83
- const styles = _reactNative.StyleSheet.create({
84
- container: {
85
- borderTopWidth: 1,
86
- borderColor: _reactNativeUi.COLORS.NEUTRAL_3
87
- },
88
- itemHeader: {
89
- flexDirection: 'row',
90
- justifyContent: 'space-between',
91
- alignItems: 'center',
92
- width: '100%',
93
- paddingVertical: 8
94
- },
95
- itemContent: {
96
- paddingHorizontal: 8
97
- },
98
- contentWrapper: {
99
- width: '100%',
100
- position: 'absolute'
101
- },
102
- loaderContainer: {
103
- justifyContent: 'center',
104
- alignItems: 'center',
105
- paddingTop: 4,
106
- paddingBottom: 8
107
- }
108
- });
109
- //# sourceMappingURL=VoiceTranscriptionsDropdownItem.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_reactNative","require","_react","_interopRequireWildcard","_reactNativeUi","_reactNativeReanimated","_useVoiceTranscriptionsDropdownItemAnimation","_i18n","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VoiceTranscriptionsDropdownItem","exports","memo","attempt","content","isActive","isLoading","onToggle","scrollToAttempt","useText","isActiveRef","useRef","current","contentAnimatedStyle","onLayout","progress","useVoiceTranscriptionsDropdownItemAnimation","handleScrollToAttempt","useCallback","attemptNumber","useAnimatedReaction","value","runOnJS","jsxs","View","style","styles","container","children","jsx","Pressable","disabled","itemHeader","onPress","Button","size","ButtonSize","SMALL","variant","ButtonVariant","TERTIARY","text","textTransform","color","COLORS","NEUTRAL_9","NEUTRAL_7","number","String","loaderContainer","Loader","LoaderSize","LoaderColor","BLUE","contentWrapper","Typography","itemContent","StyleSheet","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,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,M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AAK,EAAEtC,QAAQ,GAAGuC,qBAAM,CAACC,SAAS,GAAGD,qBAAM,CAACE;UAC9C,CAAC,CACD;UAAAlB,QAAA,EAEDxB;QAAO,CACE;MAAC,CACT;IAAC,CACM,CAChB;EAAA,CACG,CAAC;AAEX,CACF,CAAC;AAED,MAAMsB,MAAM,GAAG+B,uBAAU,CAACC,MAAM,CAAC;EAC/B/B,SAAS,EAAE;IACTgC,cAAc,EAAE,CAAC;IACjBC,WAAW,EAAEhB,qBAAM,CAACiB;EACtB,CAAC;EACD7B,UAAU,EAAE;IACV8B,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBC,KAAK,EAAE,MAAM;IACbC,eAAe,EAAE;EACnB,CAAC;EACDV,WAAW,EAAE;IACXW,iBAAiB,EAAE;EACrB,CAAC;EACDb,cAAc,EAAE;IACdW,KAAK,EAAE,MAAM;IACbG,QAAQ,EAAE;EACZ,CAAC;EACDnB,eAAe,EAAE;IACfc,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":["_react","require","_effectorReact","_reactNativeReanimated","_constants","useVoiceTranscriptionsDropdown","model","isExpanded","useUnit","$isExpanded","contentHeight","useSharedValue","animationProgress","onListLayout","event","measuredHeight","nativeEvent","layout","height","value","listAnimatedStyle","useAnimatedStyle","interpolate","DROPDOWN_MAX_CONTENT_HEIGHT","opacity","iconAnimatedStyle","rotation","transform","rotate","useEffect","withTiming","duration","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAA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,QAAQ;MAAM,CAAC;IAC1C,CAAC;EACH,CAAC,EAAE,CAACd,iBAAiB,CAAC,CAAC;EAEvB,IAAAiB,gBAAS,EAAC,MAAM;IACdjB,iBAAiB,CAACO,KAAK,GAAG,IAAAW,iCAAU,EAACvB,UAAU,GAAG,CAAC,GAAG,CAAC,EAAE;MAAEwB,QAAQ,EAAE;IAAI,CAAC,CAAC;EAC7E,CAAC,EAAE,CAACxB,UAAU,EAAEK,iBAAiB,CAAC,CAAC;EAEnC,OAAO;IACLL,UAAU;IACVa,iBAAiB;IACjBK,iBAAiB;IACjBZ;EACF,CAAC;AACH,CAAC;AAAAmB,OAAA,CAAA3B,8BAAA,GAAAA,8BAAA","ignoreList":[]}
@@ -1,34 +0,0 @@
1
- "use strict";
2
-
3
- Object.defineProperty(exports, "__esModule", {
4
- value: true
5
- });
6
- exports.useVoiceTranscriptionsDropdownItemAnimation = void 0;
7
- var _react = require("react");
8
- var _reactNativeReanimated = require("react-native-reanimated");
9
- const useVoiceTranscriptionsDropdownItemAnimation = isExpanded => {
10
- const height = (0, _reactNativeReanimated.useSharedValue)(0);
11
- const progress = (0, _reactNativeReanimated.useSharedValue)(isExpanded ? 1 : 0);
12
- (0, _react.useEffect)(() => {
13
- progress.value = (0, _reactNativeReanimated.withTiming)(isExpanded ? 1 : 0);
14
- }, [isExpanded, progress]);
15
- const derivedHeight = (0, _reactNativeReanimated.useDerivedValue)(() => height.value * progress.value, [height, progress]);
16
- const contentAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
17
- const opacity = (0, _reactNativeReanimated.interpolate)(progress.value, [0, 0.3, 1], [0, 0, 1]);
18
- return {
19
- height: derivedHeight.value,
20
- opacity,
21
- overflow: 'hidden'
22
- };
23
- }, [progress, derivedHeight]);
24
- const onLayout = event => {
25
- height.value = event.nativeEvent.layout.height;
26
- };
27
- return {
28
- contentAnimatedStyle,
29
- onLayout,
30
- progress
31
- };
32
- };
33
- exports.useVoiceTranscriptionsDropdownItemAnimation = useVoiceTranscriptionsDropdownItemAnimation;
34
- //# sourceMappingURL=useVoiceTranscriptionsDropdownItemAnimation.js.map
@@ -1 +0,0 @@
1
- {"version":3,"names":["_react","require","_reactNativeReanimated","useVoiceTranscriptionsDropdownItemAnimation","isExpanded","height","useSharedValue","progress","useEffect","value","withTiming","derivedHeight","useDerivedValue","contentAnimatedStyle","useAnimatedStyle","opacity","interpolate","overflow","onLayout","event","nativeEvent","layout","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAQO,MAAME,2CAA2C,GAAIC,UAAmB,IAAK;EAClF,MAAMC,MAAM,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EAChC,MAAMC,QAAQ,GAAG,IAAAD,qCAAc,EAACF,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;EAEnD,IAAAI,gBAAS,EAAC,MAAM;IACdD,QAAQ,CAACE,KAAK,GAAG,IAAAC,iCAAU,EAACN,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;EACjD,CAAC,EAAE,CAACA,UAAU,EAAEG,QAAQ,CAAC,CAAC;EAE1B,MAAMI,aAAa,GAAG,IAAAC,sCAAe,EAAC,MAAMP,MAAM,CAACI,KAAK,GAAGF,QAAQ,CAACE,KAAK,EAAE,CAACJ,MAAM,EAAEE,QAAQ,CAAC,CAAC;EAE9F,MAAMM,oBAAoB,GAAG,IAAAC,uCAAgB,EAAC,MAAM;IAClD,MAAMC,OAAO,GAAG,IAAAC,kCAAW,EAACT,QAAQ,CAACE,KAAK,EAAE,CAAC,CAAC,EAAE,GAAG,EAAE,CAAC,CAAC,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,CAAC,CAAC,CAAC;IAEnE,OAAO;MACLJ,MAAM,EAAEM,aAAa,CAACF,KAAK;MAC3BM,OAAO;MACPE,QAAQ,EAAE;IACZ,CAAC;EACH,CAAC,EAAE,CAACV,QAAQ,EAAEI,aAAa,CAAC,CAAC;EAE7B,MAAMO,QAAQ,GAAIC,KAAwB,IAAK;IAC7Cd,MAAM,CAACI,KAAK,GAAGU,KAAK,CAACC,WAAW,CAACC,MAAM,CAAChB,MAAM;EAChD,CAAC;EAED,OAAO;IACLQ,oBAAoB;IACpBK,QAAQ;IACRX;EACF,CAAC;AACH,CAAC;AAAAe,OAAA,CAAAnB,2CAAA,GAAAA,2CAAA","ignoreList":[]}
@@ -1 +0,0 @@
1
- {"version":3,"names":["_effector","require","VoiceTranscriptionsDropdownModel","toggleExpand","createEvent","setExpanded","reset","$isExpanded","restore","on","state","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEO,MAAMC,gCAAgC,CAAC;EAC5BC,YAAY,GAAG,IAAAC,qBAAW,EAAC,CAAC;EAC5BC,WAAW,GAAG,IAAAD,qBAAW,EAAU,CAAC;EACpCE,KAAK,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAErBG,WAAW,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACH,WAAW,EAAE,KAAK,CAAC,CAC3DI,EAAE,CAAC,IAAI,CAACN,YAAY,EAAGO,KAAK,IAAK,CAACA,KAAK,CAAC,CACxCJ,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;AACtB;AAACK,OAAA,CAAAT,gCAAA,GAAAA,gCAAA","ignoreList":[]}