@magmamath/students-features 1.3.23-rc.21 → 1.3.23-rc.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js +48 -39
- package/dist/commonjs/features/voice/playing/components/VoiceTranscription.js.map +1 -1
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js +2 -2
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -1
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +8 -7
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -1
- package/dist/commonjs/features/voice/playing/hooks/{useDropdownAnimation.js → useVoiceTranscription.js} +7 -8
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscription.js.map +1 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +37 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/Player.model.js +1 -24
- package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -1
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js +66 -0
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
- package/dist/commonjs/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +175 -46
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
- package/dist/commonjs/features/voice/playing/model/{Dropdown.model.js → VoiceTranscription.model.js} +4 -4
- package/dist/commonjs/features/voice/playing/model/VoiceTranscription.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +15 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/{TranscriptionsCollection.js → VoiceTranscriptionsCollection.js} +4 -4
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/commonjs/features/voice/types.js.map +1 -1
- package/dist/commonjs/index.js +0 -12
- package/dist/commonjs/index.js.map +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscription.js +47 -40
- package/dist/module/features/voice/playing/components/VoiceTranscription.js.map +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js +2 -2
- package/dist/module/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map +1 -1
- package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js +7 -8
- package/dist/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map +1 -1
- package/dist/module/features/voice/playing/hooks/{useDropdownAnimation.js → useVoiceTranscription.js} +5 -6
- package/dist/module/features/voice/playing/hooks/useVoiceTranscription.js.map +1 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js +32 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.js.map +1 -0
- package/dist/module/features/voice/playing/model/Player.model.js +1 -24
- package/dist/module/features/voice/playing/model/Player.model.js.map +1 -1
- package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js +61 -0
- package/dist/module/features/voice/playing/model/TranscriptionsDownloaderModel.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js +2 -2
- package/dist/module/features/voice/playing/model/VoiceFileDownloader.model.js.map +1 -1
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js +177 -48
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -1
- package/dist/module/features/voice/playing/model/{Dropdown.model.js → VoiceTranscription.model.js} +2 -2
- package/dist/module/features/voice/playing/model/VoiceTranscription.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js +10 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/{TranscriptionsCollection.js → VoiceTranscriptionsCollection.js} +2 -2
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/module/features/voice/types.js.map +1 -1
- package/dist/module/index.js +0 -1
- package/dist/module/index.js.map +1 -1
- package/dist/typescript/commonjs/features/voice/index.d.ts +0 -1
- package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +2 -2
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/hooks/{useDropdownAnimation.d.ts → useVoiceTranscription.d.ts} +3 -3
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +12 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +0 -3
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +20 -18
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/playing/model/{Dropdown.model.d.ts → VoiceTranscription.model.d.ts} +2 -2
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscription.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +7 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +1 -0
- package/dist/typescript/{module/features/voice/playing/model/TranscriptionsCollection.d.ts → commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts} +2 -2
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts +1 -4
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/commonjs/index.d.ts +0 -1
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/index.d.ts +0 -1
- package/dist/typescript/module/features/voice/index.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscription.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts +2 -2
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionCollapsible.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionHeaderActions.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/hooks/{useDropdownAnimation.d.ts → useVoiceTranscription.d.ts} +3 -3
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscription.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts +12 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionEffects.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +0 -3
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts +15 -0
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloaderModel.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts +2 -2
- package/dist/typescript/module/features/voice/playing/model/VoiceFileDownloader.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +20 -18
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/playing/model/{Dropdown.model.d.ts → VoiceTranscription.model.d.ts} +2 -2
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscription.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts +7 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionTranslation.model.d.ts.map +1 -0
- package/dist/typescript/{commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts → module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts} +2 -2
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/types.d.ts +1 -4
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -1
- package/dist/typescript/module/index.d.ts +0 -1
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/package.json +1 -28
- package/src/features/voice/index.ts +0 -1
- package/src/features/voice/playing/components/VoiceTranscription.tsx +60 -43
- package/src/features/voice/playing/components/VoiceTranscriptionCollapsible.tsx +4 -4
- package/src/features/voice/playing/components/VoiceTranscriptionHeaderActions.tsx +9 -8
- package/src/features/voice/playing/hooks/{useDropdownAnimation.ts → useVoiceTranscription.ts} +5 -5
- package/src/features/voice/playing/hooks/useVoiceTranscriptionEffects.ts +44 -0
- package/src/features/voice/playing/model/Player.model.ts +1 -26
- package/src/features/voice/playing/model/TranscriptionsDownloaderModel.ts +80 -0
- package/src/features/voice/playing/model/VoiceFileDownloader.model.ts +2 -2
- package/src/features/voice/playing/model/VoicePlayer.model.ts +196 -56
- package/src/features/voice/playing/model/{Dropdown.model.ts → VoiceTranscription.model.ts} +1 -1
- package/src/features/voice/playing/model/VoiceTranscriptionTranslation.model.ts +11 -0
- package/src/features/voice/playing/model/{TranscriptionsCollection.ts → VoiceTranscriptionsCollection.ts} +1 -1
- package/src/features/voice/types.ts +0 -9
- package/src/index.ts +0 -1
- package/dist/commonjs/features/translation/constants.js +0 -11
- package/dist/commonjs/features/translation/constants.js.map +0 -1
- package/dist/commonjs/features/translation/helpers.js +0 -60
- package/dist/commonjs/features/translation/helpers.js.map +0 -1
- package/dist/commonjs/features/translation/index.js +0 -105
- package/dist/commonjs/features/translation/index.js.map +0 -1
- package/dist/commonjs/features/translation/model/TranslationModel.js +0 -122
- package/dist/commonjs/features/translation/model/TranslationModel.js.map +0 -1
- package/dist/commonjs/features/translation/model/TranslationPreprocessor.js +0 -142
- package/dist/commonjs/features/translation/model/TranslationPreprocessor.js.map +0 -1
- package/dist/commonjs/features/translation/model/TranslationService.js +0 -112
- package/dist/commonjs/features/translation/model/TranslationService.js.map +0 -1
- package/dist/commonjs/features/translation/preserve/wordsToPreserve.js +0 -314
- package/dist/commonjs/features/translation/preserve/wordsToPreserve.js.map +0 -1
- package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js +0 -50
- package/dist/commonjs/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
- package/dist/commonjs/features/translation/providers/google/supportedLanguages.js +0 -230
- package/dist/commonjs/features/translation/providers/google/supportedLanguages.js.map +0 -1
- package/dist/commonjs/features/translation/providers/google.types.js +0 -2
- package/dist/commonjs/features/translation/providers/google.types.js.map +0 -1
- package/dist/commonjs/features/translation/providers/translation.interface.js +0 -49
- package/dist/commonjs/features/translation/providers/translation.interface.js.map +0 -1
- package/dist/commonjs/features/translation/types.js +0 -2
- package/dist/commonjs/features/translation/types.js.map +0 -1
- package/dist/commonjs/features/voice/playing/hooks/useDropdownAnimation.js.map +0 -1
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js +0 -128
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +0 -1
- package/dist/commonjs/features/voice/playing/model/Dropdown.model.js.map +0 -1
- package/dist/commonjs/features/voice/playing/model/PlaybackController.js +0 -183
- package/dist/commonjs/features/voice/playing/model/PlaybackController.js.map +0 -1
- package/dist/commonjs/features/voice/playing/model/TranscriptionsCollection.js.map +0 -1
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js +0 -82
- package/dist/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.js.map +0 -1
- package/dist/commonjs/features/voice/playing/model/Translation.model.js +0 -62
- package/dist/commonjs/features/voice/playing/model/Translation.model.js.map +0 -1
- package/dist/module/features/translation/constants.js +0 -7
- package/dist/module/features/translation/constants.js.map +0 -1
- package/dist/module/features/translation/helpers.js +0 -53
- package/dist/module/features/translation/helpers.js.map +0 -1
- package/dist/module/features/translation/index.js +0 -12
- package/dist/module/features/translation/index.js.map +0 -1
- package/dist/module/features/translation/model/TranslationModel.js +0 -117
- package/dist/module/features/translation/model/TranslationModel.js.map +0 -1
- package/dist/module/features/translation/model/TranslationPreprocessor.js +0 -137
- package/dist/module/features/translation/model/TranslationPreprocessor.js.map +0 -1
- package/dist/module/features/translation/model/TranslationService.js +0 -107
- package/dist/module/features/translation/model/TranslationService.js.map +0 -1
- package/dist/module/features/translation/preserve/wordsToPreserve.js +0 -310
- package/dist/module/features/translation/preserve/wordsToPreserve.js.map +0 -1
- package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js +0 -45
- package/dist/module/features/translation/providers/google/GoogleTranslationProvider.js.map +0 -1
- package/dist/module/features/translation/providers/google/supportedLanguages.js +0 -225
- package/dist/module/features/translation/providers/google/supportedLanguages.js.map +0 -1
- package/dist/module/features/translation/providers/google.types.js +0 -2
- package/dist/module/features/translation/providers/google.types.js.map +0 -1
- package/dist/module/features/translation/providers/translation.interface.js +0 -44
- package/dist/module/features/translation/providers/translation.interface.js.map +0 -1
- package/dist/module/features/translation/types.js +0 -2
- package/dist/module/features/translation/types.js.map +0 -1
- package/dist/module/features/voice/playing/hooks/useDropdownAnimation.js.map +0 -1
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js +0 -123
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionController.js.map +0 -1
- package/dist/module/features/voice/playing/model/Dropdown.model.js.map +0 -1
- package/dist/module/features/voice/playing/model/PlaybackController.js +0 -178
- package/dist/module/features/voice/playing/model/PlaybackController.js.map +0 -1
- package/dist/module/features/voice/playing/model/TranscriptionsCollection.js.map +0 -1
- package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js +0 -77
- package/dist/module/features/voice/playing/model/TranscriptionsDownloader.model.js.map +0 -1
- package/dist/module/features/voice/playing/model/Translation.model.js +0 -57
- package/dist/module/features/voice/playing/model/Translation.model.js.map +0 -1
- package/dist/typescript/commonjs/features/translation/constants.d.ts +0 -5
- package/dist/typescript/commonjs/features/translation/constants.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/helpers.d.ts +0 -9
- package/dist/typescript/commonjs/features/translation/helpers.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/index.d.ts +0 -12
- package/dist/typescript/commonjs/features/translation/index.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts +0 -33
- package/dist/typescript/commonjs/features/translation/model/TranslationModel.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts +0 -34
- package/dist/typescript/commonjs/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts +0 -40
- package/dist/typescript/commonjs/features/translation/model/TranslationService.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts +0 -3
- package/dist/typescript/commonjs/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -17
- package/dist/typescript/commonjs/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts +0 -209
- package/dist/typescript/commonjs/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts +0 -15
- package/dist/typescript/commonjs/features/translation/providers/google.types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts +0 -30
- package/dist/typescript/commonjs/features/translation/providers/translation.interface.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/translation/types.d.ts +0 -27
- package/dist/typescript/commonjs/features/translation/types.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +0 -30
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/model/Dropdown.model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts +0 -28
- package/dist/typescript/commonjs/features/voice/playing/model/PlaybackController.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsCollection.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +0 -19
- package/dist/typescript/commonjs/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +0 -1
- package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts +0 -25
- package/dist/typescript/commonjs/features/voice/playing/model/Translation.model.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/constants.d.ts +0 -5
- package/dist/typescript/module/features/translation/constants.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/helpers.d.ts +0 -9
- package/dist/typescript/module/features/translation/helpers.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/index.d.ts +0 -12
- package/dist/typescript/module/features/translation/index.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/model/TranslationModel.d.ts +0 -33
- package/dist/typescript/module/features/translation/model/TranslationModel.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts +0 -34
- package/dist/typescript/module/features/translation/model/TranslationPreprocessor.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/model/TranslationService.d.ts +0 -40
- package/dist/typescript/module/features/translation/model/TranslationService.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts +0 -3
- package/dist/typescript/module/features/translation/preserve/wordsToPreserve.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts +0 -17
- package/dist/typescript/module/features/translation/providers/google/GoogleTranslationProvider.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts +0 -209
- package/dist/typescript/module/features/translation/providers/google/supportedLanguages.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/providers/google.types.d.ts +0 -15
- package/dist/typescript/module/features/translation/providers/google.types.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/providers/translation.interface.d.ts +0 -30
- package/dist/typescript/module/features/translation/providers/translation.interface.d.ts.map +0 -1
- package/dist/typescript/module/features/translation/types.d.ts +0 -27
- package/dist/typescript/module/features/translation/types.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/hooks/useDropdownAnimation.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts +0 -30
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionController.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/model/Dropdown.model.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts +0 -28
- package/dist/typescript/module/features/voice/playing/model/PlaybackController.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsCollection.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts +0 -19
- package/dist/typescript/module/features/voice/playing/model/TranscriptionsDownloader.model.d.ts.map +0 -1
- package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts +0 -25
- package/dist/typescript/module/features/voice/playing/model/Translation.model.d.ts.map +0 -1
- package/src/features/translation/constants.ts +0 -4
- package/src/features/translation/helpers.ts +0 -63
- package/src/features/translation/index.ts +0 -30
- package/src/features/translation/model/TranslationModel.ts +0 -174
- package/src/features/translation/model/TranslationPreprocessor.ts +0 -171
- package/src/features/translation/model/TranslationService.ts +0 -148
- package/src/features/translation/preserve/wordsToPreserve.ts +0 -87
- package/src/features/translation/providers/google/GoogleTranslationProvider.ts +0 -50
- package/src/features/translation/providers/google/supportedLanguages.ts +0 -229
- package/src/features/translation/providers/google.types.ts +0 -16
- package/src/features/translation/providers/translation.interface.ts +0 -63
- package/src/features/translation/types.ts +0 -30
- package/src/features/voice/playing/hooks/useVoiceTranscriptionController.ts +0 -171
- package/src/features/voice/playing/model/PlaybackController.ts +0 -213
- package/src/features/voice/playing/model/TranscriptionsDownloader.model.ts +0 -88
- package/src/features/voice/playing/model/Translation.model.ts +0 -75
|
@@ -5,17 +5,22 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.VoiceTranscription = void 0;
|
|
7
7
|
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
8
|
-
var
|
|
8
|
+
var _effectorReact = require("effector-react");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
9
10
|
var _reactNative = require("react-native");
|
|
10
11
|
var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
|
|
12
|
+
var _constants = require("../../constants.js");
|
|
13
|
+
var _helpers = require("../../helpers.js");
|
|
11
14
|
var _types = require("../../types.js");
|
|
12
15
|
var _i18n = require("../../../../i18n/i18n.js");
|
|
13
|
-
var
|
|
16
|
+
var _useVoiceTranscriptionEffects = require("../hooks/useVoiceTranscriptionEffects.js");
|
|
14
17
|
var _VoiceTranscriptContent = require("./VoiceTranscriptContent.js");
|
|
15
18
|
var _VoiceTranscriptionCollapsible = require("./VoiceTranscriptionCollapsible.js");
|
|
16
19
|
var _VoiceTranscriptionHeaderActions = require("./VoiceTranscriptionHeaderActions.js");
|
|
17
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
22
|
+
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); }
|
|
23
|
+
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; }
|
|
19
24
|
const VoiceTranscription = ({
|
|
20
25
|
style,
|
|
21
26
|
model,
|
|
@@ -26,39 +31,52 @@ const VoiceTranscription = ({
|
|
|
26
31
|
variant = _types.VoiceTranscriptionVariant.SMALL
|
|
27
32
|
}) => {
|
|
28
33
|
const t = (0, _i18n.useText)();
|
|
29
|
-
const
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
+
const [playerState, isLoadingTranscripts, isTranslationActive] = (0, _effectorReact.useUnit)([model.$playerState, model.loader.loadAllTranscripts.pending, model.translation.$isActive]);
|
|
35
|
+
const activeAttempt = (0, _helpers.getActiveAttempt)(attemptOffset, attemptsCount);
|
|
36
|
+
const isLargeVariant = variant === _types.VoiceTranscriptionVariant.LARGE;
|
|
37
|
+
const answersKey = (0, _react.useMemo)(() => answers.map(a => `${a._id}:${a.audioFileId ?? ''}`).join(','), [answers]);
|
|
38
|
+
(0, _useVoiceTranscriptionEffects.useVoiceTranscriptionEffects)({
|
|
34
39
|
model,
|
|
35
40
|
answers,
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
41
|
+
answersKey,
|
|
42
|
+
problemId,
|
|
43
|
+
activeAttempt
|
|
39
44
|
});
|
|
40
|
-
const
|
|
45
|
+
const hasActiveTranscript = activeAttempt !== null && answers?.[activeAttempt - 1]?.audioFileId !== undefined;
|
|
46
|
+
const activeTranscript = activeAttempt !== null ? model.loader.getTranscript(activeAttempt) : null;
|
|
47
|
+
const hasTranscriptText = !!activeTranscript && activeTranscript !== _constants.NO_AUDIO_BE_MESSAGE;
|
|
48
|
+
const isActiveTranscriptLoading = isLoadingTranscripts && hasActiveTranscript && !activeTranscript;
|
|
49
|
+
const activeTranscriptText = hasTranscriptText ? activeTranscript : t('voice.transcriptNotAvailable');
|
|
50
|
+
const handlePlayPress = (0, _react.useCallback)(() => {
|
|
51
|
+
if (activeAttempt) {
|
|
52
|
+
model.translation.setActive(false);
|
|
53
|
+
model.togglePlayPause(activeAttempt);
|
|
54
|
+
}
|
|
55
|
+
}, [model, activeAttempt]);
|
|
56
|
+
const handleTranslationToggle = (0, _react.useCallback)(() => {
|
|
57
|
+
model.translation.toggle();
|
|
58
|
+
}, [model]);
|
|
41
59
|
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
42
|
-
style: [styles.container, isLargeVariant
|
|
60
|
+
style: [styles.container, isLargeVariant && styles.largeContainer, style],
|
|
43
61
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
44
62
|
style: styles.header,
|
|
45
63
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Typography, {
|
|
46
64
|
style: styles.title,
|
|
47
65
|
variant: "h7",
|
|
48
66
|
children: t('voice.transcriptions')
|
|
49
|
-
}),
|
|
50
|
-
playerState:
|
|
51
|
-
isTranslationActive:
|
|
52
|
-
canTranslate:
|
|
53
|
-
onPlayPress:
|
|
54
|
-
onTranslationPress:
|
|
67
|
+
}), hasActiveTranscript && /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptionHeaderActions.VoiceTranscriptionHeaderActions, {
|
|
68
|
+
playerState: playerState,
|
|
69
|
+
isTranslationActive: isTranslationActive,
|
|
70
|
+
canTranslate: hasTranscriptText,
|
|
71
|
+
onPlayPress: handlePlayPress,
|
|
72
|
+
onTranslationPress: handleTranslationToggle
|
|
55
73
|
})]
|
|
56
74
|
}), isLargeVariant ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptContent.VoiceTranscriptContent, {
|
|
57
|
-
text:
|
|
58
|
-
isLoading:
|
|
75
|
+
text: activeTranscriptText,
|
|
76
|
+
isLoading: isActiveTranscriptLoading
|
|
59
77
|
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceTranscriptionCollapsible.VoiceTranscriptionCollapsible, {
|
|
60
|
-
text:
|
|
61
|
-
isLoading:
|
|
78
|
+
text: activeTranscriptText,
|
|
79
|
+
isLoading: isActiveTranscriptLoading,
|
|
62
80
|
dropdown: model.dropdown
|
|
63
81
|
})]
|
|
64
82
|
});
|
|
@@ -66,30 +84,21 @@ const VoiceTranscription = ({
|
|
|
66
84
|
exports.VoiceTranscription = VoiceTranscription;
|
|
67
85
|
const styles = _reactNative.StyleSheet.create({
|
|
68
86
|
container: {
|
|
87
|
+
position: 'absolute',
|
|
88
|
+
top: 56,
|
|
89
|
+
left: 8,
|
|
90
|
+
width: 222,
|
|
91
|
+
maxHeight: 405,
|
|
92
|
+
minHeight: 51,
|
|
69
93
|
padding: 4,
|
|
70
94
|
boxShadow: '0px 1px 3px 0px rgba(51, 51, 51, 0.25)',
|
|
71
95
|
borderRadius: 12,
|
|
72
96
|
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_1,
|
|
73
97
|
overflow: 'hidden'
|
|
74
98
|
},
|
|
75
|
-
// SMALL: floats over the drawing area; consumer-positioned siblings sit
|
|
76
|
-
// beneath it. Absolute positioning is intentional here.
|
|
77
|
-
smallContainer: {
|
|
78
|
-
position: 'absolute',
|
|
79
|
-
top: 56,
|
|
80
|
-
left: _reactNativeUi.SPACING[200],
|
|
81
|
-
width: 222,
|
|
82
|
-
maxHeight: 405,
|
|
83
|
-
minHeight: 51
|
|
84
|
-
},
|
|
85
|
-
// LARGE: rendered as a flex child of the SolutionCard's column flow,
|
|
86
|
-
// between the header and footer. Auto-sizes to whatever space the footer
|
|
87
|
-
// (with or without the playable timeline) leaves — no magic numbers.
|
|
88
99
|
largeContainer: {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
marginTop: _reactNativeUi.SPACING[200],
|
|
92
|
-
marginBottom: _reactNativeUi.SPACING[200]
|
|
100
|
+
width: '98%',
|
|
101
|
+
height: '100%'
|
|
93
102
|
},
|
|
94
103
|
header: {
|
|
95
104
|
flexDirection: 'row',
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeUi","require","_react","
|
|
1
|
+
{"version":3,"names":["_reactNativeUi","require","_effectorReact","_react","_interopRequireWildcard","_reactNative","_reactNativeReanimated","_interopRequireDefault","_constants","_helpers","_types","_i18n","_useVoiceTranscriptionEffects","_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","playerState","isLoadingTranscripts","isTranslationActive","useUnit","$playerState","loader","loadAllTranscripts","pending","translation","$isActive","activeAttempt","getActiveAttempt","isLargeVariant","LARGE","answersKey","useMemo","map","_id","audioFileId","join","useVoiceTranscriptionEffects","hasActiveTranscript","undefined","activeTranscript","getTranscript","hasTranscriptText","NO_AUDIO_BE_MESSAGE","isActiveTranscriptLoading","activeTranscriptText","handlePlayPress","useCallback","setActive","togglePlayPause","handleTranslationToggle","toggle","jsxs","View","styles","container","largeContainer","children","header","jsx","Typography","title","VoiceTranscriptionHeaderActions","canTranslate","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,YAAA,GAAAJ,OAAA;AACA,IAAAK,sBAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,UAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,MAAA,GAAAT,OAAA;AACA,IAAAU,KAAA,GAAAV,OAAA;AACA,IAAAW,6BAAA,GAAAX,OAAA;AAEA,IAAAY,uBAAA,GAAAZ,OAAA;AACA,IAAAa,8BAAA,GAAAb,OAAA;AACA,IAAAc,gCAAA,GAAAd,OAAA;AAAmF,IAAAe,WAAA,GAAAf,OAAA;AAAA,SAAAM,uBAAAU,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,S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AAC7E,uBAAA,CAAAoF,sBAAsB;MAACC,IAAI,EAAEtB,oBAAqB;MAACuB,SAAS,EAAExB;IAA0B,CAAE,CAAC,gBAE5F,IAAA3D,WAAA,CAAA0E,GAAA,EAAC5E,8BAAA,CAAAsF,6BAA6B;MAC5BF,IAAI,EAAEtB,oBAAqB;MAC3BuB,SAAS,EAAExB,yBAA0B;MACrC0B,QAAQ,EAAE9D,KAAK,CAAC8D;IAAS,CAC1B,CACF;EAAA,CACY,CAAC;AAEpB,CAAC;AAAAC,OAAA,CAAAjE,kBAAA,GAAAA,kBAAA;AAED,MAAMgD,MAAM,GAAGkB,uBAAU,CAACC,MAAM,CAAC;EAC/BlB,SAAS,EAAE;IACTmB,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,EAAE;IACPC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,GAAG;IACVC,SAAS,EAAE,GAAG;IACdC,SAAS,EAAE,EAAE;IACbC,OAAO,EAAE,CAAC;IACVC,SAAS,EAAE,wCAAwC;IACnDC,YAAY,EAAE,EAAE;IAChBC,eAAe,EAAEC,qBAAM,CAACC,SAAS;IACjCC,QAAQ,EAAE;EACZ,CAAC;EACD9B,cAAc,EAAE;IACdqB,KAAK,EAAE,KAAK;IACZU,MAAM,EAAE;EACV,CAAC;EACD7B,MAAM,EAAE;IACN8B,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;EACD1B,KAAK,EAAE;IACL+B,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
|
|
11
|
+
var _useVoiceTranscription = require("../hooks/useVoiceTranscription.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,
|
|
27
|
+
} = (0, _useVoiceTranscription.useVoiceTranscriptionDropdown)(dropdown);
|
|
28
28
|
const handleToggle = (0, _react.useCallback)(() => {
|
|
29
29
|
dropdown.toggleExpand();
|
|
30
30
|
}, [dropdown]);
|
package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionCollapsible.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeUi","require","_react","_interopRequireWildcard","_reactNative","_reactNativeReanimated","_interopRequireDefault","
|
|
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"],"sourceRo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AAAuC,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,11 +7,14 @@ 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"));
|
|
10
11
|
var _styleTypes = require("../../../chatbot/types/style.types.js");
|
|
11
12
|
var _PlayButton = require("../../../../shared/components/PlayButton.js");
|
|
12
13
|
var _index = require("../model/index.js");
|
|
13
14
|
var _helpers = require("../../helpers.js");
|
|
14
15
|
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; }
|
|
15
18
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
19
|
const VoiceTranscriptionHeaderActions = ({
|
|
17
20
|
playerState,
|
|
@@ -25,17 +28,18 @@ const VoiceTranscriptionHeaderActions = ({
|
|
|
25
28
|
isLoading: playerState === _index.PlayerState.LOADING,
|
|
26
29
|
status: (0, _helpers.getAudioStatus)(playerState)
|
|
27
30
|
};
|
|
28
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(
|
|
31
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
32
|
+
entering: _reactNativeReanimated.FadeIn.duration(120),
|
|
33
|
+
exiting: _reactNativeReanimated.FadeOut.duration(120),
|
|
29
34
|
style: styles.container,
|
|
30
35
|
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_PlayButton.PlayButton, {
|
|
31
36
|
state: playButtonState,
|
|
32
37
|
onPress: onPlayPress,
|
|
33
|
-
activityIndicatorColor: _reactNativeUi.COLORS.NEUTRAL_1
|
|
34
|
-
colorScheme: _styleTypes.ColorScheme.Yellow
|
|
38
|
+
activityIndicatorColor: _reactNativeUi.COLORS.NEUTRAL_1
|
|
35
39
|
}), canTranslate && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.Button, {
|
|
36
40
|
variant: "secondary",
|
|
37
41
|
size: "small",
|
|
38
|
-
colorScheme: _styleTypes.ColorScheme.
|
|
42
|
+
colorScheme: _styleTypes.ColorScheme.Blue,
|
|
39
43
|
isActive: isTranslationActive,
|
|
40
44
|
onPress: onTranslationPress,
|
|
41
45
|
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeUi.GlobeIcon, {
|
|
@@ -50,9 +54,6 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
50
54
|
flexDirection: 'row',
|
|
51
55
|
alignItems: 'center',
|
|
52
56
|
gap: _reactNativeUi.SPACING[200]
|
|
53
|
-
},
|
|
54
|
-
hidden: {
|
|
55
|
-
opacity: 0
|
|
56
57
|
}
|
|
57
58
|
});
|
|
58
59
|
//# sourceMappingURL=VoiceTranscriptionHeaderActions.js.map
|
package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionHeaderActions.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_reactNativeUi","require","_react","_interopRequireDefault","_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","
|
|
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","Button","variant","size","colorScheme","ColorScheme","Blue","icon","GlobeIcon","color","NEUTRAL_9","exports","StyleSheet","create","fl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ACZC,WAAW,EAAEC,uBAAW,CAACC,IAAK;MAC9B9B,QAAQ,EAAEL,mBAAoB;MAC9B0B,OAAO,EAAEvB,kBAAmB;MAC5BiC,IAAI,eAAE,IAAA3D,WAAA,CAAA8C,GAAA,EAACzD,cAAA,CAAAuE,SAAS;QAACC,KAAK,EAAEtC,mBAAmB,GAAG4B,qBAAM,CAACC,SAAS,GAAGD,qBAAM,CAACW;MAAU,CAAE;IAAE,CACvF,CACF;EAAA,CACY,CAAC;AAEpB,CAAC;AAAAC,OAAA,CAAA1C,+BAAA,GAAAA,+BAAA;AAED,MAAMsB,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;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -3,21 +3,20 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.
|
|
6
|
+
exports.useVoiceTranscriptionDropdown = 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
|
|
11
|
+
const useVoiceTranscriptionDropdown = 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
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
});
|
|
17
|
+
if (measuredHeight > 0) {
|
|
18
|
+
contentHeight.value = measuredHeight;
|
|
19
|
+
}
|
|
21
20
|
};
|
|
22
21
|
const listAnimatedStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
23
22
|
const height = (0, _reactNativeReanimated.interpolate)(animationProgress.value, [0, 1], [0, contentHeight.value || _constants.DROPDOWN_MAX_CONTENT_HEIGHT]);
|
|
@@ -47,5 +46,5 @@ const useDropdownAnimation = model => {
|
|
|
47
46
|
onListLayout
|
|
48
47
|
};
|
|
49
48
|
};
|
|
50
|
-
exports.
|
|
51
|
-
//# sourceMappingURL=
|
|
49
|
+
exports.useVoiceTranscriptionDropdown = useVoiceTranscriptionDropdown;
|
|
50
|
+
//# sourceMappingURL=useVoiceTranscription.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_effectorReact","_reactNativeReanimated","_constants","useVoiceTranscriptionDropdown","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/useVoiceTranscription.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAEA,IAAAG,UAAA,GAAAH,OAAA;AAGO,MAAMI,6BAA6B,GAAIC,KAA8B,IAAK;EAC/E,MAAMC,UAAU,GAAG,IAAAC,sBAAO,EAACF,KAAK,CAACG,WAAW,CAAC;EAE7C,MAAMC,aAAa,GAAG,IAAAC,qCAAc,EAAC,CAAC,CAAC;EACvC,MAAMC,iBAAiB,GAAG,IAAAD,qCAAc,EAACJ,UAAU,GAAG,CAAC,GAAG,CAAC,CAAC;EAE5D,MAAMM,YAAY,GAAIC,KAAwB,IAAK;I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C,OAAO;IACLL,UAAU;IACVa,iBAAiB;IACjBK,iBAAiB;IACjBZ;EACF,CAAC;AACH,CAAC;AAAAmB,OAAA,CAAA3B,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.useVoiceTranscriptionEffects = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
const useVoiceTranscriptionEffects = ({
|
|
9
|
+
model,
|
|
10
|
+
answers,
|
|
11
|
+
answersKey,
|
|
12
|
+
problemId,
|
|
13
|
+
activeAttempt
|
|
14
|
+
}) => {
|
|
15
|
+
const answersRef = (0, _react.useRef)(answers);
|
|
16
|
+
answersRef.current = answers;
|
|
17
|
+
(0, _react.useEffect)(() => {
|
|
18
|
+
model.reinitializePlayer();
|
|
19
|
+
return () => model.cleanup();
|
|
20
|
+
}, [model]);
|
|
21
|
+
(0, _react.useEffect)(() => {
|
|
22
|
+
const lastAnswerHasNoDrawing = !answers[answers.length - 1]?.drawing;
|
|
23
|
+
model.dropdown.setExpanded(answers.length > 0 && lastAnswerHasNoDrawing);
|
|
24
|
+
model.resetPlayer();
|
|
25
|
+
}, [problemId]);
|
|
26
|
+
(0, _react.useEffect)(() => {
|
|
27
|
+
if (answersRef.current.some(answer => answer.audioFileId)) {
|
|
28
|
+
model.initializeWithAudios(answersRef.current);
|
|
29
|
+
model.loader.loadAllTranscripts();
|
|
30
|
+
}
|
|
31
|
+
}, [model, answersKey]);
|
|
32
|
+
(0, _react.useEffect)(() => {
|
|
33
|
+
model.stopAudio();
|
|
34
|
+
}, [activeAttempt]);
|
|
35
|
+
};
|
|
36
|
+
exports.useVoiceTranscriptionEffects = useVoiceTranscriptionEffects;
|
|
37
|
+
//# sourceMappingURL=useVoiceTranscriptionEffects.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","useVoiceTranscriptionEffects","model","answers","answersKey","problemId","activeAttempt","answersRef","useRef","current","useEffect","reinitializePlayer","cleanup","lastAnswerHasNoDrawing","length","drawing","dropdown","setExpanded","resetPlayer","some","answer","audioFileId","initializeWithAudios","loader","loadAllTranscripts","stopAudio","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/hooks/useVoiceTranscriptionEffects.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAYO,MAAMC,4BAA4B,GAAGA,CAAC;EAC3CC,KAAK;EACLC,OAAO;EACPC,UAAU;EACVC,SAAS;EACTC;AACM,CAAC,KAAK;EACZ,MAAMC,UAAU,GAAG,IAAAC,aAAM,EAACL,OAAO,CAAC;EAClCI,UAAU,CAACE,OAAO,GAAGN,OAAO;EAE5B,IAAAO,gBAAS,EAAC,MAAM;IACdR,KAAK,CAACS,kBAAkB,CAAC,CAAC;IAC1B,OAAO,MAAMT,KAAK,CAACU,OAAO,CAAC,CAAC;EAC9B,CAAC,EAAE,CAACV,KAAK,CAAC,CAAC;EAEX,IAAAQ,gBAAS,EAAC,MAAM;IACd,MAAMG,sBAAsB,GAAG,CAACV,OAAO,CAACA,OAAO,CAACW,MAAM,GAAG,CAAC,CAAC,EAAEC,OAAO;IACpEb,KAAK,CAACc,QAAQ,CAACC,WAAW,CAACd,OAAO,CAACW,MAAM,GAAG,CAAC,IAAID,sBAAsB,CAAC;IACxEX,KAAK,CAACgB,WAAW,CAAC,CAAC;EACrB,CAAC,EAAE,CAACb,SAAS,CAAC,CAAC;EAEf,IAAAK,gBAAS,EAAC,MAAM;IACd,IAAIH,UAAU,CAACE,OAAO,CAACU,IAAI,CAAEC,MAAM,IAAKA,MAAM,CAACC,WAAW,CAAC,EAAE;MAC3DnB,KAAK,CAACoB,oBAAoB,CAACf,UAAU,CAACE,OAAO,CAAC;MAC9CP,KAAK,CAACqB,MAAM,CAACC,kBAAkB,CAAC,CAAC;IACnC;EACF,CAAC,EAAE,CAACtB,KAAK,EAAEE,UAAU,CAAC,CAAC;EAEvB,IAAAM,gBAAS,EAAC,MAAM;IACdR,KAAK,CAACuB,SAAS,CAAC,CAAC;EACnB,CAAC,EAAE,CAACnB,aAAa,CAAC,CAAC;AACrB,CAAC;AAAAoB,OAAA,CAAAzB,4BAAA,GAAAA,4BAAA","ignoreList":[]}
|
|
@@ -16,7 +16,6 @@ let PlayerState = exports.PlayerState = /*#__PURE__*/function (PlayerState) {
|
|
|
16
16
|
class PlayerModel {
|
|
17
17
|
player = (0, _expoAudio.createAudioPlayer)();
|
|
18
18
|
stopped = false;
|
|
19
|
-
primedUri = null;
|
|
20
19
|
reset = (0, _effector.createEvent)();
|
|
21
20
|
setPlayerState = (0, _effector.createEvent)();
|
|
22
21
|
playbackFinished = (0, _effector.createEvent)();
|
|
@@ -40,29 +39,11 @@ class PlayerModel {
|
|
|
40
39
|
this.stopped = true;
|
|
41
40
|
if (this.player) {
|
|
42
41
|
this.player.replace('');
|
|
43
|
-
this.primedUri = null;
|
|
44
42
|
this.setPlayerState(PlayerState.IDLE);
|
|
45
43
|
} else {
|
|
46
44
|
console.warn('Cannot stop: audio player not initialized');
|
|
47
45
|
}
|
|
48
46
|
});
|
|
49
|
-
prime = (0, _effector.createEffect)(uri => {
|
|
50
|
-
if (!this.player) return;
|
|
51
|
-
if (this.primedUri === uri) return;
|
|
52
|
-
this.primedUri = uri;
|
|
53
|
-
this.player.replace(uri);
|
|
54
|
-
});
|
|
55
|
-
seek = (0, _effector.createEffect)(async seconds => {
|
|
56
|
-
if (!this.player) {
|
|
57
|
-
console.warn('Cannot seek: audio player not initialized');
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
if (!this.player.isLoaded) {
|
|
61
|
-
console.warn('Cannot seek: audio player not loaded');
|
|
62
|
-
return;
|
|
63
|
-
}
|
|
64
|
-
await this.player.seekTo(seconds);
|
|
65
|
-
});
|
|
66
47
|
resume = (0, _effector.createEffect)(() => {
|
|
67
48
|
if (this.player) {
|
|
68
49
|
this.player.play();
|
|
@@ -77,10 +58,7 @@ class PlayerModel {
|
|
|
77
58
|
return;
|
|
78
59
|
}
|
|
79
60
|
this.stopped = false;
|
|
80
|
-
|
|
81
|
-
this.player.replace(uri);
|
|
82
|
-
this.primedUri = uri;
|
|
83
|
-
}
|
|
61
|
+
this.player.replace(uri);
|
|
84
62
|
const waitForLoad = () => {
|
|
85
63
|
if (this.stopped) return;
|
|
86
64
|
if (this.player && this.player.isLoaded) {
|
|
@@ -113,7 +91,6 @@ class PlayerModel {
|
|
|
113
91
|
this.player.release();
|
|
114
92
|
this.player = null;
|
|
115
93
|
}
|
|
116
|
-
this.primedUri = null;
|
|
117
94
|
this.reset();
|
|
118
95
|
}
|
|
119
96
|
}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","_expoAudio","PlayerState","exports","PlayerModel","player","createAudioPlayer","stopped","
|
|
1
|
+
{"version":3,"names":["_effector","require","_expoAudio","PlayerState","exports","PlayerModel","player","createAudioPlayer","stopped","reset","createEvent","setPlayerState","playbackFinished","$playerState","restore","IDLE","setupAudioMode","createEffect","setAudioModeAsync","playsInSilentMode","shouldPlayInBackground","interruptionMode","pause","PAUSED","console","warn","stop","replace","resume","play","PLAYING","uri","waitForLoad","isLoaded","unsubscribe","addListener","status","didJustFinish","remove","setTimeout","reinitialize","release","error"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/Player.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAA8E,IAE5DE,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAA,OAAXA,WAAW;AAAA;AAOtB,MAAME,WAAW,CAAC;EAChBC,MAAM,GAAuB,IAAAC,4BAAiB,EAAC,CAAC;EAC/CC,OAAO,GAAG,KAAK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,IAAI;QACF,IAAI,CAACoB,IAAI,CAAC,CAAC;QACX,IAAI,CAACpB,MAAM,CAACgC,MAAM,CAAC,CAAC;MACtB,CAAC,CAAC,OAAOI,KAAK,EAAE,CAAC;MACjB,IAAI,CAACpC,MAAM,CAACmC,OAAO,CAAC,CAAC;MACrB,IAAI,CAACnC,MAAM,GAAG,IAAI;IACpB;IACA,IAAI,CAACG,KAAK,CAAC,CAAC;EACd;AACF;AAACL,OAAA,CAAAC,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,66 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.TranscriptionsDownloaderModel = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
var _constants = require("../../constants.js");
|
|
9
|
+
class TranscriptionsDownloaderModel {
|
|
10
|
+
setTranscriptsLoaded = (0, _effector.createEvent)();
|
|
11
|
+
reset = (0, _effector.createEvent)();
|
|
12
|
+
$transcriptsLoaded = (0, _effector.restore)(this.setTranscriptsLoaded, false).reset(this.reset);
|
|
13
|
+
constructor(collection, api) {
|
|
14
|
+
this.collection = collection;
|
|
15
|
+
this.api = api;
|
|
16
|
+
}
|
|
17
|
+
async fetchTranscriptWithRetry(audioFileId) {
|
|
18
|
+
for (let attempt = 0; attempt < _constants.TRANSCRIPT_MAX_RETRIES; attempt++) {
|
|
19
|
+
const response = await this.api.getAudioFileTranscript(audioFileId);
|
|
20
|
+
if (response.status === 'completed') {
|
|
21
|
+
return response.text;
|
|
22
|
+
}
|
|
23
|
+
if (response.status === 'failed') {
|
|
24
|
+
return _constants.NO_AUDIO_BE_MESSAGE;
|
|
25
|
+
}
|
|
26
|
+
if (attempt < _constants.TRANSCRIPT_MAX_RETRIES - 1) {
|
|
27
|
+
await new Promise(resolve => setTimeout(resolve, _constants.TRANSCRIPT_RETRY_INTERVAL_MS));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
return _constants.NO_AUDIO_BE_MESSAGE;
|
|
31
|
+
}
|
|
32
|
+
loadAllTranscripts = (0, _effector.createEffect)(async () => {
|
|
33
|
+
const attempts = this.collection.getAll();
|
|
34
|
+
const transcriptPromises = attempts.map(async item => {
|
|
35
|
+
if (this.collection.hasTranscript(item.attemptNumber)) {
|
|
36
|
+
return;
|
|
37
|
+
}
|
|
38
|
+
this.collection.update(item.attemptNumber, {
|
|
39
|
+
transcriptLoading: true
|
|
40
|
+
});
|
|
41
|
+
try {
|
|
42
|
+
const text = await this.fetchTranscriptWithRetry(item.audioFileId);
|
|
43
|
+
this.collection.update(item.attemptNumber, {
|
|
44
|
+
transcript: text,
|
|
45
|
+
transcriptLoading: false,
|
|
46
|
+
transcriptError: undefined
|
|
47
|
+
});
|
|
48
|
+
} catch (error) {
|
|
49
|
+
this.collection.update(item.attemptNumber, {
|
|
50
|
+
transcriptLoading: false,
|
|
51
|
+
transcriptError: error instanceof Error ? error.message : 'Failed to load transcript'
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
});
|
|
55
|
+
await Promise.all(transcriptPromises);
|
|
56
|
+
this.setTranscriptsLoaded(true);
|
|
57
|
+
});
|
|
58
|
+
getTranscript(attemptNumber) {
|
|
59
|
+
return this.collection.get(attemptNumber)?.transcript;
|
|
60
|
+
}
|
|
61
|
+
isTranscriptLoading(attemptNumber) {
|
|
62
|
+
return this.collection.get(attemptNumber)?.transcriptLoading || false;
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
exports.TranscriptionsDownloaderModel = TranscriptionsDownloaderModel;
|
|
66
|
+
//# sourceMappingURL=TranscriptionsDownloaderModel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","_constants","TranscriptionsDownloaderModel","setTranscriptsLoaded","createEvent","reset","$transcriptsLoaded","restore","constructor","collection","api","fetchTranscriptWithRetry","audioFileId","attempt","TRANSCRIPT_MAX_RETRIES","response","getAudioFileTranscript","status","text","NO_AUDIO_BE_MESSAGE","Promise","resolve","setTimeout","TRANSCRIPT_RETRY_INTERVAL_MS","loadAllTranscripts","createEffect","attempts","getAll","transcriptPromises","map","item","hasTranscript","attemptNumber","update","transcriptLoading","transcript","transcriptError","undefined","error","Error","message","all","getTranscript","get","isTranscriptLoading","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/TranscriptionsDownloaderModel.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAGA,IAAAC,UAAA,GAAAD,OAAA;AAMO,MAAME,6BAA6B,CAAC;EAIzBC,oBAAoB,GAAG,IAAAC,qBAAW,EAAU,CAAC;EAC7CC,KAAK,GAAG,IAAAD,qBAAW,EAAC,CAAC;EAErBE,kBAAkB,GAAG,IAAAC,iBAAO,EAAC,IAAI,CAACJ,oBAAoB,EAAE,KAAK,CAAC,CAACE,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;EAEhGG,WAAWA,CAACC,UAAyC,EAAEC,GAAmB,EAAE;IAC1E,IAAI,CAACD,UAAU,GAAGA,UAAU;IAC5B,IAAI,CAACC,GAAG,GAAGA,GAAG;EAChB;EAEA,MAAcC,wBAAwBA,CAACC,WAAmB,EAAmB;IAC3E,KAAK,IAAIC,OAAO,GAAG,CAAC,EAAEA,OAAO,GAAGC,iCAAsB,EAAED,OAAO,EAAE,EAAE;MACjE,MAAME,QAAQ,GAAG,MAAM,IAAI,CAACL,GAAG,CAACM,sBAAsB,CAACJ,WAAW,CAAC;MAEnE,IAAIG,QAAQ,CAACE,MAAM,KAAK,WAAW,EAAE;QACnC,OAAOF,QAAQ,CAACG,IAAI;MACtB;MAEA,IAAIH,QAAQ,CAACE,MAAM,KAAK,QAAQ,EAAE;QAChC,OAAOE,8BAAmB;MAC5B;MAEA,IAAIN,OAAO,GAAGC,iCAAsB,GAAG,CAAC,EAAE;QACxC,MAAM,IAAIM,OAAO,CAAEC,OAAO,IAAKC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,mBAAmBA,CAACZ,aAAqB,EAAW;IACzD,OAAO,IAAI,CAACvB,UAAU,CAACkC,GAAG,CAACX,aAAa,CAAC,EAAEE,iBAAiB,IAAI,KAAK;EACvE;AACF;AAACW,OAAA,CAAA3C,6BAAA,GAAAA,6BAAA","ignoreList":[]}
|
|
@@ -7,9 +7,9 @@ exports.VoiceFileDownloaderModel = void 0;
|
|
|
7
7
|
var _effector = require("effector");
|
|
8
8
|
var _helpers = require("../../helpers.js");
|
|
9
9
|
class VoiceFileDownloaderModel {
|
|
10
|
-
|
|
10
|
+
setApi = api => {
|
|
11
11
|
this.api = api;
|
|
12
|
-
}
|
|
12
|
+
};
|
|
13
13
|
download = (0, _effector.createEffect)(async ({
|
|
14
14
|
audioFileId,
|
|
15
15
|
attemptNumber
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_effector","require","_helpers","VoiceFileDownloaderModel","
|
|
1
|
+
{"version":3,"names":["_effector","require","_helpers","VoiceFileDownloaderModel","setApi","api","download","createEffect","audioFileId","attemptNumber","downloadAudio","controller","downloadAudioFileRequestGenerator","downloadPromise","collectionItem","audioLoading","audioDownloadPromise","abortDownload","abort","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceFileDownloader.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEA,IAAAC,QAAA,GAAAD,OAAA;AAYO,MAAME,wBAAwB,CAAC;EAGpBC,MAAM,GAAIC,GAAmB,IAAK;IAChD,IAAI,CAACA,GAAG,GAAGA,GAAG;EAChB,CAAC;EAEeC,QAAQ,GAAG,IAAAC,sBAAY,EACrC,OAAO;IAAEC,WAAW;IAAEC;EAA8B,CAAC,KAA8B;IACjF,MAAM;MAAEC,aAAa;MAAEC;IAAW,CAAC,GAAG,IAAAC,0CAAiC,EAACJ,WAAW,EAAE,IAAI,CAACH,GAAG,CAAC;IAC9F,MAAMQ,eAAe,GAAGH,aAAa,CAAC,CAAC;IAEvC,MAAMI,cAA+C,GAAG;MACtDL,aAAa;MACbD,WAAW;MACXO,YAAY,EAAE,IAAI;MAClBC,oBAAoB,EAAEH,eAAe;MACrCF;IACF,CAAC;IAED,OAAO;MAAEG,cAAc;MAAED;IAAgB,CAAC;EAC5C,CACF,CAAC;EAEeI,aAAa,GAAIN,UAA4B,IAAK;IAChEA,UAAU,EAAEO,KAAK,CAAC,CAAC;EACrB,CAAC;AACH;AAACC,OAAA,CAAAhB,wBAAA,GAAAA,wBAAA","ignoreList":[]}
|