@magmamath/students-features 1.3.23-rc.15 → 1.3.23-rc.17

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 (171) hide show
  1. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +19 -70
  2. package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +1 -1
  3. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +2 -2
  4. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -1
  5. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +5 -7
  6. package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -1
  7. package/dist/commonjs/features/voice/playing/hooks/{useVoiceTranscription.js → useDropdownAnimation.js} +8 -7
  8. package/dist/commonjs/features/voice/playing/hooks/useDropdownAnimation.js.map +1 -0
  9. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js +128 -0
  10. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +1 -0
  11. package/dist/commonjs/features/voice/playing/model/{VoiceTranscription.model.js → Dropdown.model.js} +4 -4
  12. package/dist/commonjs/features/voice/playing/model/Dropdown.model.js.map +1 -0
  13. package/dist/commonjs/features/voice/playing/model/PlaybackController.js +183 -0
  14. package/dist/commonjs/features/voice/playing/model/PlaybackController.js.map +1 -0
  15. package/dist/commonjs/features/voice/playing/model/Player.model.js +24 -1
  16. package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -1
  17. package/dist/commonjs/features/voice/playing/model/{VoiceTranscriptionsCollection.js → TranscriptionsCollection.js} +4 -4
  18. package/dist/commonjs/features/voice/playing/model/TranscriptionsCollection.js.map +1 -0
  19. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js +82 -0
  20. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -0
  21. package/dist/commonjs/features/voice/playing/model/{VoiceTranscriptionTranslation.model.js → Translation.model.js} +4 -4
  22. package/dist/commonjs/features/voice/playing/model/Translation.model.js.map +1 -0
  23. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
  24. package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
  25. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +46 -176
  26. package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  27. package/dist/commonjs/shared/components/PlayButton.js +1 -1
  28. package/dist/commonjs/shared/components/PlayButton.js.map +1 -1
  29. package/dist/module/features/voice/playing/components/VoiceTranscription.js +19 -68
  30. package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +1 -1
  31. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +2 -2
  32. package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -1
  33. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +7 -7
  34. package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -1
  35. package/dist/module/features/voice/playing/hooks/{useVoiceTranscription.js → useDropdownAnimation.js} +6 -5
  36. package/dist/module/features/voice/playing/hooks/useDropdownAnimation.js.map +1 -0
  37. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js +123 -0
  38. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +1 -0
  39. package/dist/module/features/voice/playing/model/{VoiceTranscription.model.js → Dropdown.model.js} +2 -2
  40. package/dist/module/features/voice/playing/model/Dropdown.model.js.map +1 -0
  41. package/dist/module/features/voice/playing/model/PlaybackController.js +178 -0
  42. package/dist/module/features/voice/playing/model/PlaybackController.js.map +1 -0
  43. package/dist/module/features/voice/playing/model/Player.model.js +24 -1
  44. package/dist/module/features/voice/playing/model/Player.model.js.map +1 -1
  45. package/dist/module/features/voice/playing/model/{VoiceTranscriptionsCollection.js → TranscriptionsCollection.js} +2 -2
  46. package/dist/module/features/voice/playing/model/TranscriptionsCollection.js.map +1 -0
  47. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js +77 -0
  48. package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js.map +1 -0
  49. package/dist/module/features/voice/playing/model/{VoiceTranscriptionTranslation.model.js → Translation.model.js} +2 -2
  50. package/dist/module/features/voice/playing/model/Translation.model.js.map +1 -0
  51. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
  52. package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
  53. package/dist/module/features/voice/playing/model/VoicePlayer.model.js +48 -178
  54. package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
  55. package/dist/module/shared/components/PlayButton.js +2 -2
  56. package/dist/module/shared/components/PlayButton.js.map +1 -1
  57. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -1
  58. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +2 -2
  59. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -1
  60. package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -1
  61. package/dist/typescript/{module/features/voice/playing/hooks/useVoiceTranscription.d.ts → commonjs/features/voice/playing/hooks/useDropdownAnimation.d.ts} +3 -3
  62. package/dist/typescript/commonjs/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +1 -0
  63. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +30 -0
  64. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +1 -0
  65. package/dist/typescript/commonjs/features/voice/playing/model/{VoiceTranscription.model.d.ts → Dropdown.model.d.ts} +2 -2
  66. package/dist/typescript/commonjs/features/voice/playing/model/Dropdown.model.d.ts.map +1 -0
  67. package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts +28 -0
  68. package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts.map +1 -0
  69. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +3 -0
  70. package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -1
  71. package/dist/typescript/{module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts → commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts} +2 -2
  72. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts.map +1 -0
  73. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +19 -0
  74. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -0
  75. package/dist/typescript/{module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts → commonjs/features/voice/playing/model/Translation.model.d.ts} +4 -4
  76. package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts.map +1 -0
  77. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
  78. package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
  79. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +18 -20
  80. package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  81. package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -1
  82. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +2 -2
  83. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -1
  84. package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -1
  85. package/dist/typescript/{commonjs/features/voice/playing/hooks/useVoiceTranscription.d.ts → module/features/voice/playing/hooks/useDropdownAnimation.d.ts} +3 -3
  86. package/dist/typescript/module/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +1 -0
  87. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +30 -0
  88. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +1 -0
  89. package/dist/typescript/module/features/voice/playing/model/{VoiceTranscription.model.d.ts → Dropdown.model.d.ts} +2 -2
  90. package/dist/typescript/module/features/voice/playing/model/Dropdown.model.d.ts.map +1 -0
  91. package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts +28 -0
  92. package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts.map +1 -0
  93. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +3 -0
  94. package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -1
  95. package/dist/typescript/{commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts → module/features/voice/playing/model/TranscriptionsCollection.d.ts} +2 -2
  96. package/dist/typescript/module/features/voice/playing/model/TranscriptionsCollection.d.ts.map +1 -0
  97. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +19 -0
  98. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +1 -0
  99. package/dist/typescript/{commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts → module/features/voice/playing/model/Translation.model.d.ts} +4 -4
  100. package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts.map +1 -0
  101. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
  102. package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
  103. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +18 -20
  104. package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
  105. package/package.json +2 -2
  106. package/src/features/voice/playing/components/VoiceTranscription.tsx +17 -109
  107. package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +4 -4
  108. package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +8 -10
  109. package/src/features/voice/playing/hooks/{useVoiceTranscription.ts → useDropdownAnimation.ts} +5 -5
  110. package/src/features/voice/playing/hooks/useVoiceTranscriptionController.ts +171 -0
  111. package/src/features/voice/playing/model/{VoiceTranscription.model.ts → Dropdown.model.ts} +1 -1
  112. package/src/features/voice/playing/model/PlaybackController.ts +213 -0
  113. package/src/features/voice/playing/model/Player.model.ts +26 -1
  114. package/src/features/voice/playing/model/{VoiceTranscriptionsCollection.ts → TranscriptionsCollection.ts} +1 -1
  115. package/src/features/voice/playing/model/TranscriptionsDownloader.model.ts +88 -0
  116. package/src/features/voice/playing/model/{VoiceTranscriptionTranslation.model.ts → Translation.model.ts} +4 -4
  117. package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +2 -2
  118. package/src/features/voice/playing/model/VoicePlayer.model.ts +56 -198
  119. package/src/shared/components/PlayButton.tsx +2 -2
  120. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscription.js.map +0 -1
  121. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoExpand.js +0 -46
  122. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoExpand.js.map +0 -1
  123. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.js +0 -26
  124. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.js.map +0 -1
  125. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +0 -36
  126. package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +0 -1
  127. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +0 -88
  128. package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +0 -1
  129. package/dist/commonjs/features/voice/playing/model/VoiceTranscription.model.js.map +0 -1
  130. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +0 -1
  131. package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +0 -1
  132. package/dist/module/features/voice/playing/hooks/useVoiceTranscription.js.map +0 -1
  133. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionAutoExpand.js +0 -41
  134. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionAutoExpand.js.map +0 -1
  135. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.js +0 -21
  136. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.js.map +0 -1
  137. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +0 -31
  138. package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +0 -1
  139. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +0 -83
  140. package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +0 -1
  141. package/dist/module/features/voice/playing/model/VoiceTranscription.model.js.map +0 -1
  142. package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +0 -1
  143. package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +0 -1
  144. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +0 -1
  145. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoExpand.d.ts +0 -16
  146. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoExpand.d.ts.map +0 -1
  147. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.d.ts +0 -10
  148. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.d.ts.map +0 -1
  149. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +0 -12
  150. package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +0 -1
  151. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -17
  152. package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +0 -1
  153. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscription.model.d.ts.map +0 -1
  154. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +0 -1
  155. package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +0 -1
  156. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +0 -1
  157. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionAutoExpand.d.ts +0 -16
  158. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionAutoExpand.d.ts.map +0 -1
  159. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.d.ts +0 -10
  160. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.d.ts.map +0 -1
  161. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +0 -12
  162. package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +0 -1
  163. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +0 -17
  164. package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +0 -1
  165. package/dist/typescript/module/features/voice/playing/model/VoiceTranscription.model.d.ts.map +0 -1
  166. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +0 -1
  167. package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +0 -1
  168. package/src/features/voice/playing/hooks/useVoiceTranscriptionAutoExpand.ts +0 -57
  169. package/src/features/voice/playing/hooks/useVoiceTranscriptionAutoTranslate.ts +0 -32
  170. package/src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts +0 -43
  171. package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +0 -94
@@ -5,26 +5,17 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.VoiceTranscription = void 0;
7
7
  var _reactNativeUi = require("@magmamath/react-native-ui");
8
- var _effectorReact = require("effector-react");
9
- var _react = _interopRequireWildcard(require("react"));
10
- var _reactI18next = require("react-i18next");
8
+ var _react = _interopRequireDefault(require("react"));
11
9
  var _reactNative = require("react-native");
12
10
  var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
13
- var _constants = require("../../constants.js");
14
- var _helpers = require("../../helpers.js");
15
11
  var _types = require("../../types.js");
16
- var _supportedLanguages = require("../../../translation/providers/google/supportedLanguages.js");
17
12
  var _i18n = require("../../../../i18n/i18n.js");
18
- var _useVoiceTranscriptionEffects = require("../hooks/useVoiceTranscriptionEffects.js");
19
- var _useVoiceTranscriptionAutoTranslate = require("../hooks/useVoiceTranscriptionAutoTranslate.js");
20
- var _useVoiceTranscriptionAutoExpand = require("../hooks/useVoiceTranscriptionAutoExpand.js");
13
+ var _useVoiceTranscriptionController = require("../hooks/useVoiceTranscriptionController.js");
21
14
  var _VoiceTranscriptContent = require("./VoiceTranscriptContent.js");
22
15
  var _VoiceTranscriptionCollapsible = require("./VoiceTranscriptionCollapsible.js");
23
16
  var _VoiceTranscriptionHeaderActions = require("./VoiceTranscriptionHeaderActions.js");
24
17
  var _jsxRuntime = require("react/jsx-runtime");
25
18
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
26
- 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); }
27
- 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; }
28
19
  const VoiceTranscription = ({
29
20
  style,
30
21
  model,
@@ -36,59 +27,17 @@ const VoiceTranscription = ({
36
27
  }) => {
37
28
  const t = (0, _i18n.useText)();
38
29
  const {
39
- i18n
40
- } = (0, _reactI18next.useTranslation)();
41
- const [playerState, isLoadingTranscripts, loadedForAnswersKey, isTranslationActive, translations, isTranslating] = (0, _effectorReact.useUnit)([model.$playerState, model.loader.loadAllTranscripts.pending, model.loader.$loadedKey, model.translation.$isActive, model.translation.$translations, model.translation.translate.pending]);
42
- const activeAttempt = (0, _helpers.getActiveAttempt)(attemptOffset, attemptsCount);
43
- const isLargeVariant = variant === _types.VoiceTranscriptionVariant.LARGE;
44
- const answersKey = (0, _react.useMemo)(() => answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(','), [answers]);
45
- (0, _useVoiceTranscriptionEffects.useVoiceTranscriptionEffects)({
30
+ display,
31
+ flags,
32
+ actions
33
+ } = (0, _useVoiceTranscriptionController.useVoiceTranscriptionController)({
46
34
  model,
47
35
  answers,
48
- answersKey,
49
- problemId,
50
- activeAttempt
51
- });
52
- const isContentReady = loadedForAnswersKey === answersKey;
53
- const hasActiveAudio = activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined;
54
- const activeTranscript = isContentReady && activeAttempt !== null ? model.loader.getTranscript(activeAttempt) : null;
55
- const hasTranscriptText = !!activeTranscript && activeTranscript !== _constants.NO_AUDIO_BE_MESSAGE;
56
- const isActiveTranscriptLoading = isLoadingTranscripts && hasActiveAudio && !activeTranscript;
57
- const transcriptLanguage = isContentReady && activeAttempt !== null ? model.loader.getTranscriptLanguage(activeAttempt) : undefined;
58
- const isSourceSameAsTarget = !!transcriptLanguage && (0, _supportedLanguages.resolveGoogleLanguageCode)(transcriptLanguage) === (0, _supportedLanguages.resolveGoogleLanguageCode)(i18n.language);
59
- const canTranslate = hasTranscriptText && !isSourceSameAsTarget;
60
- const cachedTranslation = activeAttempt !== null ? translations[activeAttempt] : undefined;
61
- const showTranslation = isTranslationActive && canTranslate;
62
- const isTranslationLoading = showTranslation && !cachedTranslation && isTranslating;
63
- const displayText = showTranslation ? cachedTranslation ?? activeTranscript : hasTranscriptText ? activeTranscript : t('voice.transcriptNotAvailable');
64
- (0, _useVoiceTranscriptionAutoTranslate.useVoiceTranscriptionAutoTranslate)({
65
- translationModel: model.translation,
66
- canTranslate,
67
- activeAttempt,
36
+ attemptOffset,
37
+ attemptsCount,
68
38
  problemId
69
39
  });
70
- (0, _useVoiceTranscriptionAutoExpand.useVoiceTranscriptionAutoExpand)({
71
- model,
72
- activeAttempt,
73
- targetLanguage: i18n.language
74
- });
75
- (0, _react.useEffect)(() => {
76
- if (showTranslation && activeAttempt !== null && !cachedTranslation && !isTranslating) {
77
- model.translation.translate({
78
- attemptNumber: activeAttempt,
79
- targetLanguage: i18n.language
80
- });
81
- }
82
- }, [showTranslation, activeAttempt, cachedTranslation, isTranslating, i18n.language, model]);
83
- const handlePlayPress = (0, _react.useCallback)(() => {
84
- if (activeAttempt) {
85
- model.translation.setActive(false);
86
- model.togglePlayPause(activeAttempt);
87
- }
88
- }, [model, activeAttempt]);
89
- const handleTranslationToggle = (0, _react.useCallback)(() => {
90
- model.translation.toggle();
91
- }, [model]);
40
+ const isLargeVariant = variant === _types.VoiceTranscriptionVariant.LARGE;
92
41
  return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
93
42
  style: [styles.container, isLargeVariant && styles.largeContainer, style],
94
43
  children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
@@ -97,19 +46,19 @@ const VoiceTranscription = ({
97
46
  style: styles.title,
98
47
  variant: "h7",
99
48
  children: t('voice.transcriptions')
100
- }), hasActiveAudio && /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptionHeaderActions.VoiceTranscriptionHeaderActions, {
101
- playerState: playerState,
102
- isTranslationActive: isTranslationActive,
103
- canTranslate: canTranslate,
104
- onPlayPress: handlePlayPress,
105
- onTranslationPress: handleTranslationToggle
49
+ }), flags.anyAttemptHasAudio && /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptionHeaderActions.VoiceTranscriptionHeaderActions, {
50
+ playerState: flags.playerState,
51
+ isTranslationActive: flags.isTranslationActive,
52
+ canTranslate: flags.canTranslate,
53
+ onPlayPress: actions.onPlayPress,
54
+ onTranslationPress: actions.onTranslationToggle
106
55
  })]
107
56
  }), isLargeVariant ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptContent.VoiceTranscriptContent, {
108
- text: displayText,
109
- isLoading: isActiveTranscriptLoading || isTranslationLoading
57
+ text: display.text,
58
+ isLoading: display.isLoading
110
59
  }) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptionCollapsible.VoiceTranscriptionCollapsible, {
111
- text: displayText,
112
- isLoading: isActiveTranscriptLoading || isTranslationLoading,
60
+ text: display.text,
61
+ isLoading: display.isLoading,
113
62
  dropdown: model.dropdown
114
63
  })]
115
64
  });
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeUi","require","_effectorReact","_react","_interopRequireWildcard","_reactI18next","_reactNative","_reactNativeReanimated","_interopRequireDefault","_constants","_helpers","_types","_supportedLanguages","_i18n","_useVoiceTranscriptionEffects","_useVoiceTranscriptionAutoTranslate","_useVoiceTranscriptionAutoExpand","_VoiceTranscriptContent","_VoiceTranscriptionCollapsible","_VoiceTranscriptionHeaderActions","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VoiceTranscription","style","model","answers","attemptOffset","attemptsCount","problemId","variant","VoiceTranscriptionVariant","SMALL","useText","i18n","useTranslation","playerState","isLoadingTranscripts","loadedForAnswersKey","isTranslationActive","translations","isTranslating","useUnit","$playerState","loader","loadAllTranscripts","pending","$loadedKey","translation","$isActive","$translations","translate","activeAttempt","getActiveAttempt","isLargeVariant","LARGE","answersKey","useMemo","map","_id","audioFileId","join","useVoiceTranscriptionEffects","isContentReady","hasActiveAudio","undefined","activeTranscript","getTranscript","hasTranscriptText","NO_AUDIO_BE_MESSAGE","isActiveTranscriptLoading","transcriptLanguage","getTranscriptLanguage","isSourceSameAsTarget","resolveGoogleLanguageCode","language","canTranslate","cachedTranslation","showTranslation","isTranslationLoading","displayText","useVoiceTranscriptionAutoTranslate","translationModel","useVoiceTranscriptionAutoExpand","targetLanguage","useEffect","attemptNumber","handlePlayPress","useCallback","setActive","togglePlayPause","handleTranslationToggle","toggle","jsxs","View","styles","container","largeContainer","children","header","jsx","Typography","title","VoiceTranscriptionHeaderActions","onPlayPress","onTranslationPress","VoiceTranscriptContent","text","isLoading","VoiceTranscriptionCollapsible","dropdown","exports","StyleSheet","create","position","top","left","width","maxHeight","minHeight","padding","boxShadow","borderRadius","backgroundColor","COLORS","NEUTRAL_1","overflow","height","flexDirection","justifyContent","alignItems","marginBottom","color","NEUTRAL_9","marginLeft"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscription.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,YAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAC,sBAAA,CAAAP,OAAA;AACA,IAAAQ,UAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AACA,IAAAU,MAAA,GAAAV,OAAA;AACA,IAAAW,mBAAA,GAAAX,OAAA;AACA,IAAAY,KAAA,GAAAZ,OAAA;AACA,IAAAa,6BAAA,GAAAb,OAAA;AACA,IAAAc,mCAAA,GAAAd,OAAA;AACA,IAAAe,gCAAA,GAAAf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,EAAE;IAChBC,eAAe,EAAEC,qBAAM,CAACC,SAAS;IACjCC,QAAQ,EAAE;EACZ,CAAC;EACD7B,cAAc,EAAE;IACdoB,KAAK,EAAE,KAAK;IACZU,MAAM,EAAE;EACV,CAAC;EACD5B,MAAM,EAAE;IACN6B,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBV,OAAO,EAAE,CAAC;IACVW,YAAY,EAAE,CAAC;IACfJ,MAAM,EAAE;EACV,CAAC;EACDzB,KAAK,EAAE;IACL8B,KAAK,EAAER,qBAAM,CAACS,SAAS;IACvBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeUi","require","_react","_interopRequireDefault","_reactNative","_reactNativeReanimated","_types","_i18n","_useVoiceTranscriptionController","_VoiceTranscriptContent","_VoiceTranscriptionCollapsible","_VoiceTranscriptionHeaderActions","_jsxRuntime","e","__esModule","default","VoiceTranscription","style","model","answers","attemptOffset","attemptsCount","problemId","variant","VoiceTranscriptionVariant","SMALL","t","useText","display","flags","actions","useVoiceTranscriptionController","isLargeVariant","LARGE","jsxs","View","styles","container","largeContainer","children","header","jsx","Typography","title","anyAttemptHasAudio","VoiceTranscriptionHeaderActions","playerState","isTranslationActive","canTranslate","onPlayPress","onTranslationPress","onTranslationToggle","VoiceTranscriptContent","text","isLoading","VoiceTranscriptionCollapsible","dropdown","exports","StyleSheet","create","position","top","left","width","maxHeight","minHeight","padding","boxShadow","borderRadius","backgroundColor","COLORS","NEUTRAL_1","overflow","height","flexDirection","justifyContent","alignItems","marginBottom","color","NEUTRAL_9","marginLeft"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscription.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,sBAA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;EACDlC,cAAc,EAAE;IACdyB,KAAK,EAAE,KAAK;IACZU,MAAM,EAAE;EACV,CAAC;EACDjC,MAAM,EAAE;IACNkC,aAAa,EAAE,KAAK;IACpBC,cAAc,EAAE,eAAe;IAC/BC,UAAU,EAAE,QAAQ;IACpBV,OAAO,EAAE,CAAC;IACVW,YAAY,EAAE,CAAC;IACfJ,MAAM,EAAE;EACV,CAAC;EACD9B,KAAK,EAAE;IACLmC,KAAK,EAAER,qBAAM,CAACS,SAAS;IACvBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -8,7 +8,7 @@ var _reactNativeUi = require("@magmamath/react-native-ui");
8
8
  var _react = _interopRequireWildcard(require("react"));
9
9
  var _reactNative = require("react-native");
10
10
  var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
11
- var _useVoiceTranscription = require("../hooks/useVoiceTranscription.js");
11
+ var _useDropdownAnimation = require("../hooks/useDropdownAnimation.js");
12
12
  var _VoiceTranscriptContent = require("./VoiceTranscriptContent.js");
13
13
  var _jsxRuntime = require("react/jsx-runtime");
14
14
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
@@ -24,7 +24,7 @@ const VoiceTranscriptionCollapsible = ({
24
24
  listAnimatedStyle,
25
25
  iconAnimatedStyle,
26
26
  onListLayout
27
- } = (0, _useVoiceTranscription.useVoiceTranscriptionDropdown)(dropdown);
27
+ } = (0, _useDropdownAnimation.useDropdownAnimation)(dropdown);
28
28
  const handleToggle = (0, _react.useCallback)(() => {
29
29
  dropdown.toggleExpand();
30
30
  }, [dropdown]);
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeUi","require","_react","_interopRequireWildcard","_reactNative","_reactNativeReanimated","_interopRequireDefault","_useVoiceTranscription","_VoiceTranscriptContent","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AnimatedTouchableOpacity","Animated","createAnimatedComponent","TouchableOpacity","VoiceTranscriptionCollapsible","text","isLoading","dropdown","listAnimatedStyle","iconAnimatedStyle","onListLayout","useVoiceTranscriptionDropdown","handleToggle","useCallback","toggleExpand","jsxs","Fragment","children","jsx","View","style","styles","collapsibleContent","onLayout","transcriptContainer","VoiceTranscriptContent","expandButton","onPress","CaretDownIcon","size","exports","StyleSheet","create","overflow","position","width","paddingHorizontal","justifyContent","alignItems"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionCollapsible.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAN,OAAA;AAEA,IAAAO,uBAAA,GAAAP,OAAA;AAAiE,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAK,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,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C,GAAA,EAAC5C,YAAA,CAAA6C,IAAI;QAACI,QAAQ,EAAEb,YAAa;QAACU,KAAK,EAAEC,MAAM,CAACG,mBAAoB;QAAAP,QAAA,eAC9D,IAAAtC,WAAA,CAAAuC,GAAA,EAACxC,uBAAA,CAAA+C,sBAAsB;UAACpB,IAAI,EAAEA,IAAK;UAACC,SAAS,EAAEA;QAAU,CAAE;MAAC,CACxD;IAAC,CACM,CAAC,eAChB,IAAA3B,WAAA,CAAAuC,GAAA,EAAClB,wBAAwB;MACvBoB,KAAK,EAAE,CAACC,MAAM,CAACK,YAAY,EAAEjB,iBAAiB,CAAE;MAChDkB,OAAO,EAAEf,YAAa;MAAAK,QAAA,eAEtB,IAAAtC,WAAA,CAAAuC,GAAA,EAAChD,cAAA,CAAA0D,aAAa;QAACC,IAAI,EAAE;MAAG,CAAE;IAAC,CACH,CAAC;EAAA,CAC3B,CAAC;AAEP,CAAC;AAAAC,OAAA,CAAA1B,6BAAA,GAAAA,6BAAA;AAED,MAAMiB,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,kBAAkB,EAAE;IAClBW,QAAQ,EAAE;EACZ,CAAC;EACDT,mBAAmB,EAAE;IACnBU,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,iBAAiB,EAAE;EACrB,CAAC;EACDV,YAAY,EAAE;IACZW,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_reactNativeUi","require","_react","_interopRequireWildcard","_reactNative","_reactNativeReanimated","_interopRequireDefault","_useDropdownAnimation","_VoiceTranscriptContent","_jsxRuntime","e","__esModule","default","_getRequireWildcardCache","WeakMap","r","t","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","AnimatedTouchableOpacity","Animated","createAnimatedComponent","TouchableOpacity","VoiceTranscriptionCollapsible","text","isLoading","dropdown","listAnimatedStyle","iconAnimatedStyle","onListLayout","useDropdownAnimation","handleToggle","useCallback","toggleExpand","jsxs","Fragment","children","jsx","View","style","styles","collapsibleContent","onLayout","transcriptContainer","VoiceTranscriptContent","expandButton","onPress","CaretDownIcon","size","exports","StyleSheet","create","overflow","position","width","paddingHorizontal","justifyContent","alignItems"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionCollapsible.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,uBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAC,sBAAA,CAAAL,OAAA;AACA,IAAAM,qBAAA,GAAAN,OAAA;AAEA,IAAAO,uBAAA,GAAAP,OAAA;AAAiE,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAK,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,SAAAG,yBAAAH,CAAA,6BAAAI,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAD,wBAAA,YAAAA,CAAAH,CAAA,WAAAA,CAAA,GAAAM,CAAA,GAAAD,CAAA,KAAAL,CAAA;AAAA,SAAAP,wBAAAO,CAAA,EAAAK,CAAA,SAAAA,CAAA,IAAAL,CAAA,IAAAA,CAAA,CAAAC,UAAA,SAAAD,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAE,OAAA,EAAAF,CAAA,QAAAM,CAAA,GAAAH,wBAAA,CAAAE,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAC,GAAA,CAAAP,CAAA,UAAAM,CAAA,CAAAE,GAAA,CAAAR,CAAA,OAAAS,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,C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CAACG,mBAAoB;QAAAP,QAAA,eAC9D,IAAAtC,WAAA,CAAAuC,GAAA,EAACxC,uBAAA,CAAA+C,sBAAsB;UAACpB,IAAI,EAAEA,IAAK;UAACC,SAAS,EAAEA;QAAU,CAAE;MAAC,CACxD;IAAC,CACM,CAAC,eAChB,IAAA3B,WAAA,CAAAuC,GAAA,EAAClB,wBAAwB;MACvBoB,KAAK,EAAE,CAACC,MAAM,CAACK,YAAY,EAAEjB,iBAAiB,CAAE;MAChDkB,OAAO,EAAEf,YAAa;MAAAK,QAAA,eAEtB,IAAAtC,WAAA,CAAAuC,GAAA,EAAChD,cAAA,CAAA0D,aAAa;QAACC,IAAI,EAAE;MAAG,CAAE;IAAC,CACH,CAAC;EAAA,CAC3B,CAAC;AAEP,CAAC;AAAAC,OAAA,CAAA1B,6BAAA,GAAAA,6BAAA;AAED,MAAMiB,MAAM,GAAGU,uBAAU,CAACC,MAAM,CAAC;EAC/BV,kBAAkB,EAAE;IAClBW,QAAQ,EAAE;EACZ,CAAC;EACDT,mBAAmB,EAAE;IACnBU,QAAQ,EAAE,UAAU;IACpBC,KAAK,EAAE,MAAM;IACbC,iBAAiB,EAAE;EACrB,CAAC;EACDV,YAAY,EAAE;IACZW,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
@@ -7,14 +7,11 @@ exports.VoiceTranscriptionHeaderActions = void 0;
7
7
  var _reactNativeUi = require("@magmamath/react-native-ui");
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactNative = require("react-native");
10
- var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
11
10
  var _styleTypes = require("../../../chatbot/types/style.types.js");
12
11
  var _PlayButton = require("../../../../shared/components/PlayButton.js");
13
12
  var _index = require("../model/index.js");
14
13
  var _helpers = require("../../helpers.js");
15
14
  var _jsxRuntime = require("react/jsx-runtime");
16
- 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); }
17
- 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; }
18
15
  function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
19
16
  const VoiceTranscriptionHeaderActions = ({
20
17
  playerState,
@@ -28,15 +25,13 @@ const VoiceTranscriptionHeaderActions = ({
28
25
  isLoading: playerState === _index.PlayerState.LOADING,
29
26
  status: (0, _helpers.getAudioStatus)(playerState)
30
27
  };
31
- return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
32
- entering: _reactNativeReanimated.FadeIn.duration(120),
33
- exiting: _reactNativeReanimated.FadeOut.duration(120),
28
+ return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
34
29
  style: styles.container,
35
30
  children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayButton.PlayButton, {
36
31
  state: playButtonState,
37
32
  onPress: onPlayPress,
38
33
  activityIndicatorColor: _reactNativeUi.COLORS.NEUTRAL_1
39
- }), canTranslate && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.ReanimatedButton, {
34
+ }), canTranslate && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
40
35
  variant: "secondary",
41
36
  size: "small",
42
37
  colorScheme: _styleTypes.ColorScheme.Blue,
@@ -54,6 +49,9 @@ const styles = _reactNative.StyleSheet.create({
54
49
  flexDirection: 'row',
55
50
  alignItems: 'center',
56
51
  gap: _reactNativeUi.SPACING[200]
52
+ },
53
+ hidden: {
54
+ opacity: 0
57
55
  }
58
56
  });
59
57
  //# sourceMappingURL=VoiceTranscriptionHeaderActions.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNativeUi","require","_react","_interopRequireDefault","_reactNative","_reactNativeReanimated","_interopRequireWildcard","_styleTypes","_PlayButton","_index","_helpers","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VoiceTranscriptionHeaderActions","playerState","isTranslationActive","canTranslate","onPlayPress","onTranslationPress","playButtonState","isActive","PlayerState","IDLE","isLoading","LOADING","status","getAudioStatus","jsxs","View","entering","FadeIn","duration","exiting","FadeOut","style","styles","container","children","jsx","PlayButton","state","onPress","activityIndicatorColor","COLORS","NEUTRAL_1","ReanimatedButton","variant","size","colorScheme","ColorScheme","Blue","icon","GlobeIcon","color","NEUTRAL_9","exports","StyleSheet","create","flexDirection","alignItems","gap","SPACING"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,sBAAA,GAAAC,uBAAA,CAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,MAAA,GAAAR,OAAA;AACA,IAAAS,QAAA,GAAAT,OAAA;AAA8C,IAAAU,WAAA,GAAAV,OAAA;AAAA,SAAAW,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;AAA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Default","_reactNative","_styleTypes","_PlayButton","_index","_helpers","_jsxRuntime","e","__esModule","default","VoiceTranscriptionHeaderActions","playerState","isTranslationActive","canTranslate","onPlayPress","onTranslationPress","playButtonState","isActive","PlayerState","IDLE","isLoading","LOADING","status","getAudioStatus","jsxs","View","style","styles","container","children","jsx","PlayButton","state","onPress","activityIndicatorColor","COLORS","NEUTRAL_1","Button","variant","size","colorScheme","ColorScheme","Blue","icon","GlobeIcon","color","NEUTRAL_9","exports","StyleSheet","create","flexDirection","alignItems","gap","SPACING","hidden","opacity"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAC,sBAAA,CAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,WAAA,GAAAL,OAAA;AACA,IAAAM,MAAA,GAAAN,OAAA;AACA,IAAAO,QAAA,GAAAP,OAAA;AAA8C,IAAAQ,WAAA,GAAAR,OAAA;AAAA,SAAAE,uBAAAO,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAUvC,MAAMG,+BAA+B,GAAGA,CAAC;EAC9CC,WAAW;EACXC,mBAAmB;EACnBC,YAAY;EACZC,WAAW;EACXC;AACqC,CAAC,KAAK;EAC3C,MAAMC,eAAe,GAAG;IACtBC,QAAQ,EAAEN,WAAW,KAAKO,kBAAW,CAACC,IAAI;IAC1CC,SAAS,EAAET,WAAW,KAAKO,kBAAW,CAACG,OAAO;IAC9CC,MAAM,EAAE,IAAAC,uBAAc,EAACZ,WAAW;EACpC,CAAC;EAED,oBACE,IAAAL,WAAA,CAAAkB,IAAA,EAACvB,YAAA,CAAAwB,IAAI;IAACC,KAAK,EAAEC,MAAM,CAACC,SAAU;IAAAC,QAAA,gBAC5B,IAAAvB,WAAA,CAAAwB,GAAA,EAAC3B,WAAA,CAAA4B,UAAU;MACTC,KAAK,EAAEhB,eAAgB;MACvBiB,OAAO,EAAEnB,WAAY;MACrBoB,sBAAsB,EAAEC,qBAAM,CAACC;IAAU,CAC1C,CAAC,EACDvB,YAAY,iBACX,IAAAP,WAAA,CAAAwB,GAAA,EAACjC,cAAA,CAAAwC,MAAM;MACLC,OAAO,EAAC,WAAW;MACnBC,IAAI,EAAC,OAAO;MACZC,WAAW,EAAEC,uBAAW,CAACC,IAAK;MAC9BzB,QAAQ,EAAEL,mBAAoB;MAC9BqB,OAAO,EAAElB,kBAAmB;MAC5B4B,IAAI,eAAE,IAAArC,WAAA,CAAAwB,GAAA,EAACjC,cAAA,CAAA+C,SAAS;QAACC,KAAK,EAAEjC,mBAAmB,GAAGuB,qBAAM,CAACC,SAAS,GAAGD,qBAAM,CAACW;MAAU,CAAE;IAAE,CACvF,CACF;EAAA,CACG,CAAC;AAEX,CAAC;AAAAC,OAAA,CAAArC,+BAAA,GAAAA,+BAAA;AAED,MAAMiB,MAAM,GAAGqB,uBAAU,CAACC,MAAM,CAAC;EAC/BrB,SAAS,EAAE;IACTsB,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAEC,sBAAO,CAAC,GAAG;EAClB,CAAC;EACDC,MAAM,EAAE;IACNC,OAAO,EAAE;EACX;AACF,CAAC,CAAC","ignoreList":[]}
@@ -3,20 +3,21 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.useVoiceTranscriptionDropdown = void 0;
6
+ exports.useDropdownAnimation = void 0;
7
7
  var _react = require("react");
8
8
  var _effectorReact = require("effector-react");
9
9
  var _reactNativeReanimated = require("react-native-reanimated");
10
10
  var _constants = require("../../constants.js");
11
- const useVoiceTranscriptionDropdown = model => {
11
+ const useDropdownAnimation = model => {
12
12
  const isExpanded = (0, _effectorReact.useUnit)(model.$isExpanded);
13
13
  const contentHeight = (0, _reactNativeReanimated.useSharedValue)(0);
14
14
  const animationProgress = (0, _reactNativeReanimated.useSharedValue)(isExpanded ? 1 : 0);
15
15
  const onListLayout = event => {
16
16
  const measuredHeight = event.nativeEvent.layout.height;
17
- if (measuredHeight > 0) {
18
- contentHeight.value = measuredHeight;
19
- }
17
+ if (measuredHeight <= 0) return;
18
+ contentHeight.value = contentHeight.value === 0 ? measuredHeight : (0, _reactNativeReanimated.withTiming)(measuredHeight, {
19
+ duration: 180
20
+ });
20
21
  };
21
22
  const listAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
22
23
  const height = (0, _reactNativeReanimated.interpolate)(animationProgress.value, [0, 1], [0, contentHeight.value || _constants.DROPDOWN_MAX_CONTENT_HEIGHT]);
@@ -46,5 +47,5 @@ const useVoiceTranscriptionDropdown = model => {
46
47
  onListLayout
47
48
  };
48
49
  };
49
- exports.useVoiceTranscriptionDropdown = useVoiceTranscriptionDropdown;
50
- //# sourceMappingURL=useVoiceTranscription.js.map
50
+ exports.useDropdownAnimation = useDropdownAnimation;
51
+ //# sourceMappingURL=useDropdownAnimation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_effectorReact","_reactNativeReanimated","_constants","useDropdownAnimation","model","isExpanded","useUnit","$isExpanded","contentHeight","useSharedValue","animationProgress","onListLayout","event","measuredHeight","nativeEvent","layout","height","value","withTiming","duration","listAnimatedStyle","useAnimatedStyle","interpolate","DROPDOWN_MAX_CONTENT_HEIGHT","opacity","iconAnimatedStyle","rotation","transform","rotate","useEffect","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useDropdownAnimation.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAGO,MAAMI,oBAAoB,GAAIC,KAAoB,IAAK;EAC5D,MAAMC,UA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LU,SAAS,EAAE,CAAC;QAAEC,MAAM,EAAE,GAAGF,QAAQ;MAAM,CAAC;IAC1C,CAAC;EACH,CAAC,EAAE,CAAChB,iBAAiB,CAAC,CAAC;EAEvB,IAAAmB,gBAAS,EAAC,MAAM;IACdnB,iBAAiB,CAACO,KAAK,GAAG,IAAAC,iCAAU,EAACb,UAAU,GAAG,CAAC,GAAG,CAAC,EAAE;MAAEc,QAAQ,EAAE;IAAI,CAAC,CAAC;EAC7E,CAAC,EAAE,CAACd,UAAU,EAAEK,iBAAiB,CAAC,CAAC;EAEnC,OAAO;IACLL,UAAU;IACVe,iBAAiB;IACjBK,iBAAiB;IACjBd;EACF,CAAC;AACH,CAAC;AAAAmB,OAAA,CAAA3B,oBAAA,GAAAA,oBAAA","ignoreList":[]}
@@ -0,0 +1,128 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useVoiceTranscriptionController = void 0;
7
+ var _effectorReact = require("effector-react");
8
+ var _react = require("react");
9
+ var _reactI18next = require("react-i18next");
10
+ var _constants = require("../../constants.js");
11
+ var _helpers = require("../../helpers.js");
12
+ var _supportedLanguages = require("../../../translation/providers/google/supportedLanguages.js");
13
+ var _i18n = require("../../../../i18n/i18n.js");
14
+ const useVoiceTranscriptionController = ({
15
+ model,
16
+ answers,
17
+ attemptOffset,
18
+ attemptsCount,
19
+ problemId
20
+ }) => {
21
+ const t = (0, _i18n.useText)();
22
+ const {
23
+ i18n
24
+ } = (0, _reactI18next.useTranslation)();
25
+ const [playerState, isLoadingTranscripts, isTranslationActive, translations, isTranslating] = (0, _effectorReact.useUnit)([model.$playerState, model.loader.loadTranscriptForAttempt.pending, model.translation.$isActive, model.translation.$translations, model.translation.translate.pending]);
26
+ const activeAttempt = (0, _helpers.getActiveAttempt)(attemptOffset, attemptsCount);
27
+ const answersKey = (0, _react.useMemo)(() => answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(','), [answers]);
28
+ const activeAudioFileId = activeAttempt !== null ? answers?.[activeAttempt - 1]?.audioFileId : undefined;
29
+ const hasActiveAudio = activeAudioFileId !== undefined;
30
+ const anyAttemptHasAudio = (0, _react.useMemo)(() => answers.some(a => !!a.audioFileId), [answers]);
31
+ const cachedEntry = activeAudioFileId ? model.loader.getCachedTranscript(activeAudioFileId) : undefined;
32
+ const activeTranscript = cachedEntry?.text ?? null;
33
+ const hasTranscriptText = !!activeTranscript && activeTranscript !== _constants.NO_AUDIO_BE_MESSAGE;
34
+ const isActiveTranscriptLoading = isLoadingTranscripts && hasActiveAudio && !activeTranscript;
35
+ const isSourceSameAsTarget = !!cachedEntry?.language && (0, _supportedLanguages.resolveGoogleLanguageCode)(cachedEntry.language) === (0, _supportedLanguages.resolveGoogleLanguageCode)(i18n.language);
36
+ const canTranslate = hasTranscriptText && !isSourceSameAsTarget;
37
+ const cachedTranslation = activeAttempt !== null ? translations[activeAttempt] : undefined;
38
+ const showTranslation = isTranslationActive && canTranslate;
39
+ const isTranslationLoading = showTranslation && !cachedTranslation && isTranslating;
40
+ const displayText = showTranslation ? cachedTranslation ?? activeTranscript : hasTranscriptText ? activeTranscript : t('voice.transcriptNotAvailable');
41
+
42
+ // Lifecycle effects
43
+ const answersRef = (0, _react.useRef)(answers);
44
+ answersRef.current = answers;
45
+ (0, _react.useEffect)(() => {
46
+ model.reinitializePlayer();
47
+ return () => {
48
+ model.stopAudio();
49
+ model.dropdown.setExpanded(false);
50
+ };
51
+ }, [model]);
52
+ (0, _react.useEffect)(() => {
53
+ model.dropdown.setExpanded(false);
54
+ model.resetPlayer();
55
+ }, [problemId]);
56
+ (0, _react.useEffect)(() => {
57
+ if (answersRef.current.some(a => a.audioFileId)) {
58
+ model.initializeWithAudios(answersRef.current);
59
+ }
60
+ }, [model, answersKey]);
61
+ (0, _react.useEffect)(() => {
62
+ model.stopAudio();
63
+ model.setCurrentAttempt(activeAttempt);
64
+ if (activeAttempt !== null) {
65
+ model.loader.loadTranscriptForAttempt(activeAttempt);
66
+ }
67
+ }, [model, activeAttempt, answersKey]);
68
+
69
+ // Auto-activate translation once per (problemId, activeAttempt) when translatable
70
+ const autoActivatedAttempts = (0, _react.useRef)(new Set());
71
+ (0, _react.useEffect)(() => {
72
+ autoActivatedAttempts.current.clear();
73
+ }, [problemId]);
74
+ (0, _react.useEffect)(() => {
75
+ if (canTranslate && activeAttempt !== null && !autoActivatedAttempts.current.has(activeAttempt)) {
76
+ autoActivatedAttempts.current.add(activeAttempt);
77
+ model.translation.setActive(true);
78
+ }
79
+ }, [canTranslate, activeAttempt, model]);
80
+
81
+ // Trigger translate when we should show translation but don't have it cached
82
+ (0, _react.useEffect)(() => {
83
+ if (showTranslation && activeAttempt !== null && !cachedTranslation && !isTranslating) {
84
+ model.translation.translate({
85
+ attemptNumber: activeAttempt,
86
+ targetLanguage: i18n.language
87
+ });
88
+ }
89
+ }, [showTranslation, activeAttempt, cachedTranslation, isTranslating, i18n.language, model]);
90
+
91
+ // Auto-open dropdown when a translation successfully completes
92
+ (0, _react.useEffect)(() => {
93
+ return model.translation.translate.doneData.watch(result => {
94
+ if (result) {
95
+ model.dropdown.setExpanded(true);
96
+ }
97
+ });
98
+ }, [model]);
99
+ const onPlayPress = (0, _react.useCallback)(() => {
100
+ if (activeAttempt) {
101
+ model.translation.setActive(false);
102
+ model.togglePlayPause(activeAttempt);
103
+ }
104
+ }, [model, activeAttempt]);
105
+ const onTranslationToggle = (0, _react.useCallback)(() => {
106
+ model.translation.toggle();
107
+ model.dropdown.setExpanded(true);
108
+ }, [model]);
109
+ return {
110
+ display: {
111
+ text: displayText,
112
+ isLoading: isActiveTranscriptLoading || isTranslationLoading
113
+ },
114
+ flags: {
115
+ playerState: playerState,
116
+ hasActiveAudio,
117
+ anyAttemptHasAudio,
118
+ canTranslate,
119
+ isTranslationActive
120
+ },
121
+ actions: {
122
+ onPlayPress,
123
+ onTranslationToggle
124
+ }
125
+ };
126
+ };
127
+ exports.useVoiceTranscriptionController = useVoiceTranscriptionController;
128
+ //# sourceMappingURL=useVoiceTranscriptionController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effectorReact","require","_react","_reactI18next","_constants","_helpers","_supportedLanguages","_i18n","useVoiceTranscriptionController","model","answers","attemptOffset","attemptsCount","problemId","t","useText","i18n","useTranslation","playerState","isLoadingTranscripts","isTranslationActive","translations","isTranslating","useUnit","$playerState","loader","loadTranscriptForAttempt","pending","translation","$isActive","$translations","translate","activeAttempt","getActiveAttempt","answersKey","useMemo","map","a","_id","audioFileId","join","activeAudioFileId","undefined","hasActiveAudio","anyAttemptHasAudio","some","cachedEntry","getCachedTranscript","activeTranscript","text","hasTranscriptText","NO_AUDIO_BE_MESSAGE","isActiveTranscriptLoading","isSourceSameAsTarget","language","resolveGoogleLanguageCode","canTranslate","cachedTranslation","showTranslation","isTranslationLoading","displayText","answersRef","useRef","current","useEffect","reinitializePlayer","stopAudio","dropdown","setExpanded","resetPlayer","initializeWithAudios","setCurrentAttempt","autoActivatedAttempts","Set","clear","has","add","setActive","attemptNumber","targetLanguage","doneData","watch","result","onPlayPress","useCallback","togglePlayPause","onTranslationToggle","toggle","display","isLoading","flags","actions","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionController.ts"],"mappings":";;;;;;AAAA,IAAAA,cAAA,GAAAC,OAAA;AACA,IAAAC,MAAA,GAAAD,OAAA;AACA,IAAAE,aAAA,GAAAF,OAAA;AACA,IAAAG,UAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AAEA,IAAAK,mBAAA,GAAAL,OAAA;AACA,IAAAM,KAAA,GAAAN,OAAA;AAcO,MAAMO,+BAA+B,GAAGA,CAAC;EAC9CC,KAAK;EACLC,OAAO;EACPC,aAAa;EACbC,aAAa;EACbC;AACM,CAAC,KAAK;EACZ,MAAMC,CAAC,GAAG,IAAAC,aAAO,EAAC,CAAC;EACnB,MAAM;IAAEC;EAAK,CAAC,GAAG,IAAAC,4BAA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F;EACF,CAAC;AACH,CAAC;AAAAM,OAAA,CAAApF,+BAAA,GAAAA,+BAAA","ignoreList":[]}
@@ -3,13 +3,13 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.VoiceTranscriptionModel = void 0;
6
+ exports.DropdownModel = void 0;
7
7
  var _effector = require("effector");
8
- class VoiceTranscriptionModel {
8
+ class DropdownModel {
9
9
  toggleExpand = (0, _effector.createEvent)();
10
10
  setExpanded = (0, _effector.createEvent)();
11
11
  reset = (0, _effector.createEvent)();
12
12
  $isExpanded = (0, _effector.restore)(this.setExpanded, false).on(this.toggleExpand, state => !state).reset(this.reset);
13
13
  }
14
- exports.VoiceTranscriptionModel = VoiceTranscriptionModel;
15
- //# sourceMappingURL=VoiceTranscription.model.js.map
14
+ exports.DropdownModel = DropdownModel;
15
+ //# sourceMappingURL=Dropdown.model.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_effector","require","DropdownModel","toggleExpand","createEvent","setExpanded","reset","$isExpanded","restore","on","state","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/Dropdown.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEO,MAAMC,aAAa,CAAC;EACTC,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,aAAA,GAAAA,aAAA","ignoreList":[]}