@magmamath/students-features 0.9.113 → 0.9.114-rc.1
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/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +8 -48
- package/dist/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/commonjs/features/chatbot/constants.js +4 -4
- package/dist/commonjs/features/chatbot/constants.js.map +1 -1
- package/dist/commonjs/features/gifCelebrations/helpers.js +1 -0
- package/dist/commonjs/features/gifCelebrations/helpers.js.map +1 -1
- package/dist/commonjs/features/voice/constants.js +22 -0
- package/dist/commonjs/features/voice/constants.js.map +1 -0
- package/dist/commonjs/features/voice/helpers.js +211 -0
- package/dist/commonjs/features/voice/helpers.js.map +1 -0
- package/dist/commonjs/features/voice/index.js +138 -0
- package/dist/commonjs/features/voice/index.js.map +1 -0
- package/dist/commonjs/features/voice/model/index.js +68 -0
- package/dist/commonjs/features/voice/model/index.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceIcon.js +49 -0
- package/dist/commonjs/features/voice/playing/components/VoiceIcon.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js +208 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +108 -0
- package/dist/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +50 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +34 -0
- package/dist/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/Player.model.js +87 -0
- package/dist/commonjs/features/voice/playing/model/Player.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js +244 -0
- package/dist/commonjs/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js +41 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js +39 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +15 -0
- package/dist/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
- package/dist/commonjs/features/voice/playing/model/index.js +47 -0
- package/dist/commonjs/features/voice/playing/model/index.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js +74 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecord.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js +61 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js +35 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDevider.js +27 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordDevider.js.map +1 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js +50 -0
- package/dist/commonjs/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js +59 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js +22 -0
- package/dist/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js +53 -0
- package/dist/commonjs/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js +78 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js +51 -0
- package/dist/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js +54 -0
- package/dist/commonjs/features/voice/recording/model/Recorder.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/Uploader.model.js +44 -0
- package/dist/commonjs/features/voice/recording/model/Uploader.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js +239 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js +30 -0
- package/dist/commonjs/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
- package/dist/commonjs/features/voice/recording/model/index.js +34 -0
- package/dist/commonjs/features/voice/recording/model/index.js.map +1 -0
- package/dist/commonjs/features/voice/types.js +6 -0
- package/dist/commonjs/features/voice/types.js.map +1 -0
- package/dist/commonjs/index.js +12 -0
- package/dist/commonjs/index.js.map +1 -1
- package/dist/commonjs/shared/components/PlayButton.js +70 -0
- package/dist/commonjs/shared/components/PlayButton.js.map +1 -0
- package/dist/commonjs/shared/translation/localization/ca.json +17 -0
- package/dist/commonjs/shared/translation/localization/de.json +17 -0
- package/dist/commonjs/shared/translation/localization/en.json +17 -0
- package/dist/commonjs/shared/translation/localization/gb.json +17 -0
- package/dist/commonjs/shared/translation/localization/sct.json +17 -0
- package/dist/commonjs/shared/translation/localization/sw.json +17 -0
- package/dist/module/features/chatbot/components/ChatInput/RequestHintButton.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.js.map +1 -1
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js +9 -49
- package/dist/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.js.map +1 -1
- package/dist/module/features/chatbot/constants.js +5 -5
- package/dist/module/features/chatbot/constants.js.map +1 -1
- package/dist/module/features/gifCelebrations/helpers.js +1 -0
- package/dist/module/features/gifCelebrations/helpers.js.map +1 -1
- package/dist/module/features/voice/constants.js +18 -0
- package/dist/module/features/voice/constants.js.map +1 -0
- package/dist/module/features/voice/helpers.js +194 -0
- package/dist/module/features/voice/helpers.js.map +1 -0
- package/dist/module/features/voice/index.js +20 -0
- package/dist/module/features/voice/index.js.map +1 -0
- package/dist/module/features/voice/model/index.js +15 -0
- package/dist/module/features/voice/model/index.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceIcon.js +41 -0
- package/dist/module/features/voice/playing/components/VoiceIcon.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js +201 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js +102 -0
- package/dist/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.js.map +1 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js +45 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.js.map +1 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js +29 -0
- package/dist/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.js.map +1 -0
- package/dist/module/features/voice/playing/model/Player.model.js +82 -0
- package/dist/module/features/voice/playing/model/Player.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js +234 -0
- package/dist/module/features/voice/playing/model/VoicePlayer.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js +36 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsCollection.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js +34 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js +10 -0
- package/dist/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.js.map +1 -0
- package/dist/module/features/voice/playing/model/index.js +8 -0
- package/dist/module/features/voice/playing/model/index.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecord.js +67 -0
- package/dist/module/features/voice/recording/components/VoiceRecord.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js +55 -0
- package/dist/module/features/voice/recording/components/VoiceRecordButton.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js +29 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDeleteButton.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDevider.js +21 -0
- package/dist/module/features/voice/recording/components/VoiceRecordDevider.js.map +1 -0
- package/dist/module/features/voice/recording/components/VoiceRecordTimer.js +44 -0
- package/dist/module/features/voice/recording/components/VoiceRecordTimer.js.map +1 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js +54 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorder.js.map +1 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js +17 -0
- package/dist/module/features/voice/recording/hooks/useVoiceRecorderAnimation.js.map +1 -0
- package/dist/module/features/voice/recording/modal/ModalFooterButtons.js +47 -0
- package/dist/module/features/voice/recording/modal/ModalFooterButtons.js.map +1 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js +71 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordDeleteModal.js.map +1 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js +45 -0
- package/dist/module/features/voice/recording/modal/VoiceRecordUndoModal.js.map +1 -0
- package/dist/module/features/voice/recording/model/Recorder.model.js +49 -0
- package/dist/module/features/voice/recording/model/Recorder.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/Uploader.model.js +39 -0
- package/dist/module/features/voice/recording/model/Uploader.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js +234 -0
- package/dist/module/features/voice/recording/model/VoiceRecord.model.js.map +1 -0
- package/dist/module/features/voice/recording/model/VoiceRecordCollection.js +25 -0
- package/dist/module/features/voice/recording/model/VoiceRecordCollection.js.map +1 -0
- package/dist/module/features/voice/recording/model/index.js +7 -0
- package/dist/module/features/voice/recording/model/index.js.map +1 -0
- package/dist/module/features/voice/types.js +4 -0
- package/dist/module/features/voice/types.js.map +1 -0
- package/dist/module/index.js +1 -0
- package/dist/module/index.js.map +1 -1
- package/dist/module/shared/components/PlayButton.js +64 -0
- package/dist/module/shared/components/PlayButton.js.map +1 -0
- package/dist/module/shared/translation/localization/ca.json +17 -0
- package/dist/module/shared/translation/localization/de.json +17 -0
- package/dist/module/shared/translation/localization/en.json +17 -0
- package/dist/module/shared/translation/localization/gb.json +17 -0
- package/dist/module/shared/translation/localization/sct.json +17 -0
- package/dist/module/shared/translation/localization/sw.json +17 -0
- package/dist/typescript/commonjs/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
- package/dist/typescript/commonjs/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts +5 -5
- package/dist/typescript/commonjs/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/gifCelebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/commonjs/features/voice/constants.d.ts +15 -0
- package/dist/typescript/commonjs/features/voice/constants.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/helpers.d.ts +46 -0
- package/dist/typescript/commonjs/features/voice/helpers.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/index.d.ts +13 -0
- package/dist/typescript/commonjs/features/voice/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/model/index.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/model/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts +8 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +15 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
- package/dist/typescript/commonjs/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts +21 -0
- package/dist/typescript/commonjs/features/voice/playing/model/Player.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +26 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts +18 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
- package/dist/typescript/commonjs/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts +7 -0
- package/dist/typescript/commonjs/features/voice/playing/model/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDevider.d.ts +3 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordDevider.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
- package/dist/typescript/commonjs/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
- package/dist/typescript/commonjs/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts +19 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts +18 -0
- package/dist/typescript/commonjs/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
- package/dist/typescript/commonjs/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/recording/model/index.d.ts +5 -0
- package/dist/typescript/commonjs/features/voice/recording/model/index.d.ts.map +1 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts +58 -0
- package/dist/typescript/commonjs/features/voice/types.d.ts.map +1 -0
- package/dist/typescript/commonjs/index.d.ts +1 -0
- package/dist/typescript/commonjs/index.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/components/PlayButton.d.ts +18 -0
- package/dist/typescript/commonjs/shared/components/PlayButton.d.ts.map +1 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts +102 -0
- package/dist/typescript/commonjs/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/commonjs/shared/translation/model.d.ts +34 -0
- package/dist/typescript/commonjs/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/commonjs/types/common.types.d.ts +3 -0
- package/dist/typescript/commonjs/types/common.types.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatInput/RequestHintButton.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageButtonsBlock.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts +2 -2
- package/dist/typescript/module/features/chatbot/components/ChatMessage/MessageTextToSpeech.d.ts.map +1 -1
- package/dist/typescript/module/features/chatbot/constants.d.ts +5 -5
- package/dist/typescript/module/features/chatbot/constants.d.ts.map +1 -1
- package/dist/typescript/module/features/gifCelebrations/helpers.d.ts.map +1 -1
- package/dist/typescript/module/features/voice/constants.d.ts +15 -0
- package/dist/typescript/module/features/voice/constants.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/helpers.d.ts +46 -0
- package/dist/typescript/module/features/voice/helpers.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/index.d.ts +13 -0
- package/dist/typescript/module/features/voice/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/model/index.d.ts +11 -0
- package/dist/typescript/module/features/voice/model/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts +8 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceIcon.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts +15 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts +12 -0
- package/dist/typescript/module/features/voice/playing/components/VoiceTranscriptionsDropdownItem.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts +16 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts +11 -0
- package/dist/typescript/module/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts +21 -0
- package/dist/typescript/module/features/voice/playing/model/Player.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts +41 -0
- package/dist/typescript/module/features/voice/playing/model/VoicePlayer.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts +26 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts +18 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDownloader.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts +7 -0
- package/dist/typescript/module/features/voice/playing/model/VoiceTranscriptionsDropdown.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/playing/model/index.d.ts +7 -0
- package/dist/typescript/module/features/voice/playing/model/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecord.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordButton.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts +8 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDeleteButton.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDevider.d.ts +3 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordDevider.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/components/VoiceRecordTimer.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts +5 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorder.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts +6 -0
- package/dist/typescript/module/features/voice/recording/hooks/useVoiceRecorderAnimation.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts +12 -0
- package/dist/typescript/module/features/voice/recording/modal/ModalFooterButtons.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordDeleteModal.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts +11 -0
- package/dist/typescript/module/features/voice/recording/modal/VoiceRecordUndoModal.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts +19 -0
- package/dist/typescript/module/features/voice/recording/model/Recorder.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts +18 -0
- package/dist/typescript/module/features/voice/recording/model/Uploader.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts +50 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecord.model.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts +10 -0
- package/dist/typescript/module/features/voice/recording/model/VoiceRecordCollection.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/recording/model/index.d.ts +5 -0
- package/dist/typescript/module/features/voice/recording/model/index.d.ts.map +1 -0
- package/dist/typescript/module/features/voice/types.d.ts +58 -0
- package/dist/typescript/module/features/voice/types.d.ts.map +1 -0
- package/dist/typescript/module/index.d.ts +1 -0
- package/dist/typescript/module/index.d.ts.map +1 -1
- package/dist/typescript/module/shared/components/PlayButton.d.ts +18 -0
- package/dist/typescript/module/shared/components/PlayButton.d.ts.map +1 -0
- package/dist/typescript/module/shared/translation/constants.d.ts +102 -0
- package/dist/typescript/module/shared/translation/constants.d.ts.map +1 -1
- package/dist/typescript/module/shared/translation/model.d.ts +34 -0
- package/dist/typescript/module/shared/translation/model.d.ts.map +1 -1
- package/dist/typescript/module/types/common.types.d.ts +3 -0
- package/dist/typescript/module/types/common.types.d.ts.map +1 -1
- package/package.json +11 -4
- package/src/features/chatbot/components/ChatInput/RequestHintButton.tsx +0 -1
- package/src/features/chatbot/components/ChatMessage/MessageButtonsBlock.tsx +1 -1
- package/src/features/chatbot/components/ChatMessage/MessageTextToSpeech.tsx +9 -51
- package/src/features/chatbot/constants.ts +4 -4
- package/src/features/gifCelebrations/helpers.ts +1 -0
- package/src/features/voice/constants.ts +14 -0
- package/src/features/voice/helpers.ts +254 -0
- package/src/features/voice/index.ts +17 -0
- package/src/features/voice/model/index.ts +13 -0
- package/src/features/voice/playing/components/VoiceIcon.tsx +38 -0
- package/src/features/voice/playing/components/VoiceTranscriptionsDropdown.tsx +239 -0
- package/src/features/voice/playing/components/VoiceTranscriptionsDropdownItem.tsx +127 -0
- package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdown.ts +54 -0
- package/src/features/voice/playing/hooks/useVoiceTranscriptionsDropdownItemAnimation.ts +40 -0
- package/src/features/voice/playing/model/Player.model.ts +92 -0
- package/src/features/voice/playing/model/VoicePlayer.model.ts +282 -0
- package/src/features/voice/playing/model/VoiceTranscriptionsCollection.ts +53 -0
- package/src/features/voice/playing/model/VoiceTranscriptionsDownloader.model.ts +43 -0
- package/src/features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts +12 -0
- package/src/features/voice/playing/model/index.ts +6 -0
- package/src/features/voice/recording/components/VoiceRecord.tsx +65 -0
- package/src/features/voice/recording/components/VoiceRecordButton.tsx +63 -0
- package/src/features/voice/recording/components/VoiceRecordDeleteButton.tsx +25 -0
- package/src/features/voice/recording/components/VoiceRecordDevider.tsx +17 -0
- package/src/features/voice/recording/components/VoiceRecordTimer.tsx +49 -0
- package/src/features/voice/recording/hooks/useVoiceRecorder.ts +62 -0
- package/src/features/voice/recording/hooks/useVoiceRecorderAnimation.ts +19 -0
- package/src/features/voice/recording/modal/ModalFooterButtons.tsx +54 -0
- package/src/features/voice/recording/modal/VoiceRecordDeleteModal.tsx +82 -0
- package/src/features/voice/recording/modal/VoiceRecordUndoModal.tsx +50 -0
- package/src/features/voice/recording/model/Recorder.model.ts +62 -0
- package/src/features/voice/recording/model/Uploader.model.ts +48 -0
- package/src/features/voice/recording/model/VoiceRecord.model.ts +278 -0
- package/src/features/voice/recording/model/VoiceRecordCollection.ts +26 -0
- package/src/features/voice/recording/model/index.ts +4 -0
- package/src/features/voice/types.ts +69 -0
- package/src/index.ts +1 -0
- package/src/shared/components/PlayButton.tsx +84 -0
- package/src/shared/translation/localization/ca.json +17 -0
- package/src/shared/translation/localization/de.json +17 -0
- package/src/shared/translation/localization/en.json +17 -0
- package/src/shared/translation/localization/gb.json +17 -0
- package/src/shared/translation/localization/sct.json +17 -0
- package/src/shared/translation/localization/sw.json +17 -0
- package/src/types/common.types.ts +1 -0
- package/dist/commonjs/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/dist/module/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
- package/src/features/chatbot/TTS_HIGHLIGHTING.md +0 -120
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PlayerState = exports.PlayerModel = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
var _expoAudio = require("expo-audio");
|
|
9
|
+
let PlayerState = exports.PlayerState = /*#__PURE__*/function (PlayerState) {
|
|
10
|
+
PlayerState["PLAYING"] = "playing";
|
|
11
|
+
PlayerState["PAUSED"] = "paused";
|
|
12
|
+
PlayerState["LOADING"] = "loading";
|
|
13
|
+
PlayerState["IDLE"] = "idle";
|
|
14
|
+
return PlayerState;
|
|
15
|
+
}({});
|
|
16
|
+
class PlayerModel {
|
|
17
|
+
player = (0, _expoAudio.createAudioPlayer)();
|
|
18
|
+
reset = (0, _effector.createEvent)();
|
|
19
|
+
setPlayerState = (0, _effector.createEvent)();
|
|
20
|
+
playbackFinished = (0, _effector.createEvent)();
|
|
21
|
+
$playerState = (0, _effector.restore)(this.setPlayerState, PlayerState.IDLE).reset(this.reset);
|
|
22
|
+
pause = (0, _effector.createEffect)(() => {
|
|
23
|
+
if (this.player) {
|
|
24
|
+
this.player.pause();
|
|
25
|
+
this.setPlayerState(PlayerState.PAUSED);
|
|
26
|
+
} else {
|
|
27
|
+
console.warn('Cannot pause: audio player not initialized');
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
stop = (0, _effector.createEffect)(() => {
|
|
31
|
+
if (this.player) {
|
|
32
|
+
this.player.replace('');
|
|
33
|
+
this.setPlayerState(PlayerState.IDLE);
|
|
34
|
+
} else {
|
|
35
|
+
console.warn('Cannot stop: audio player not initialized');
|
|
36
|
+
}
|
|
37
|
+
});
|
|
38
|
+
resume = (0, _effector.createEffect)(() => {
|
|
39
|
+
if (this.player) {
|
|
40
|
+
this.player.play();
|
|
41
|
+
this.setPlayerState(PlayerState.PLAYING);
|
|
42
|
+
} else {
|
|
43
|
+
console.warn('Cannot resume: audio player not initialized');
|
|
44
|
+
}
|
|
45
|
+
});
|
|
46
|
+
play = (0, _effector.createEffect)(async uri => {
|
|
47
|
+
if (!this.player) {
|
|
48
|
+
console.warn('Audio player not initialized');
|
|
49
|
+
return;
|
|
50
|
+
}
|
|
51
|
+
this.player.replace(uri);
|
|
52
|
+
const waitForLoad = () => {
|
|
53
|
+
if (this.player && this.player.isLoaded) {
|
|
54
|
+
const unsubscribe = this.player.addListener('playbackStatusUpdate', status => {
|
|
55
|
+
if (status.didJustFinish) {
|
|
56
|
+
this.playbackFinished();
|
|
57
|
+
unsubscribe?.remove?.();
|
|
58
|
+
this.setPlayerState(PlayerState.IDLE);
|
|
59
|
+
}
|
|
60
|
+
});
|
|
61
|
+
this.player.play();
|
|
62
|
+
this.setPlayerState(PlayerState.PLAYING);
|
|
63
|
+
} else {
|
|
64
|
+
setTimeout(waitForLoad, 10);
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
waitForLoad();
|
|
68
|
+
});
|
|
69
|
+
reinitialize() {
|
|
70
|
+
if (!this.player) {
|
|
71
|
+
this.player = (0, _expoAudio.createAudioPlayer)();
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
release() {
|
|
75
|
+
if (this.player) {
|
|
76
|
+
try {
|
|
77
|
+
this.stop();
|
|
78
|
+
this.player.remove();
|
|
79
|
+
} catch (error) {}
|
|
80
|
+
this.player.release();
|
|
81
|
+
this.player = null;
|
|
82
|
+
}
|
|
83
|
+
this.reset();
|
|
84
|
+
}
|
|
85
|
+
}
|
|
86
|
+
exports.PlayerModel = PlayerModel;
|
|
87
|
+
//# sourceMappingURL=Player.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","_expoAudio","PlayerState","exports","PlayerModel","player","createAudioPlayer","reset","createEvent","setPlayerState","playbackFinished","$playerState","restore","IDLE","pause","createEffect","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;AAA2D,IAE/CE,WAAW,GAAAC,OAAA,CAAAD,WAAA,0BAAXA,WAAW;EAAXA,WAAW;EAAXA,WAAW;EAAX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AI,CAAC7B,MAAM,GAAG,IAAI;IACpB;IACA,IAAI,CAACE,KAAK,CAAC,CAAC;EACd;AACF;AAACJ,OAAA,CAAAC,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,244 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "PlayerState", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _PlayerModel.PlayerState;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
exports.VoicePlayerModel = void 0;
|
|
13
|
+
var _effector = require("effector");
|
|
14
|
+
var _VoiceTranscriptionsCollection = require("./VoiceTranscriptionsCollection.js");
|
|
15
|
+
var _VoiceTranscriptionsDownloaderModel = require("./VoiceTranscriptionsDownloader.model.js");
|
|
16
|
+
var _VoiceTranscriptionsDropdownModel = require("./VoiceTranscriptionsDropdown.model.js");
|
|
17
|
+
var _PlayerModel = require("./Player.model.js");
|
|
18
|
+
var _constants = require("../../constants.js");
|
|
19
|
+
class VoicePlayerModel {
|
|
20
|
+
collection = new _VoiceTranscriptionsCollection.VoiceTranscriptionsCollection();
|
|
21
|
+
downloader = new _VoiceTranscriptionsDownloaderModel.VoiceTranscriptionsDownloaderModel();
|
|
22
|
+
dropdown = new _VoiceTranscriptionsDropdownModel.VoiceTranscriptionsDropdownModel();
|
|
23
|
+
playerModel = new _PlayerModel.PlayerModel();
|
|
24
|
+
currentPlayingAttempt = null;
|
|
25
|
+
setCurrentAttempt = (0, _effector.createEvent)();
|
|
26
|
+
setTranscriptsLoaded = (0, _effector.createEvent)();
|
|
27
|
+
reset = (0, _effector.createEvent)();
|
|
28
|
+
$currentAttempt = (0, _effector.restore)(this.setCurrentAttempt, null).reset(this.reset);
|
|
29
|
+
$transcriptsLoaded = (0, _effector.restore)(this.setTranscriptsLoaded, false).reset(this.reset);
|
|
30
|
+
$playerState = this.playerModel.$playerState;
|
|
31
|
+
pauseAudio = this.playerModel.pause;
|
|
32
|
+
stopAudio = (0, _effector.createEffect)(() => {
|
|
33
|
+
this.playerModel.stop();
|
|
34
|
+
this.currentPlayingAttempt = null;
|
|
35
|
+
this.setCurrentAttempt(null);
|
|
36
|
+
});
|
|
37
|
+
constructor(params) {
|
|
38
|
+
this.api = params.api;
|
|
39
|
+
this.downloader.setApi(params.api);
|
|
40
|
+
this.playerModel.playbackFinished.watch(() => {
|
|
41
|
+
this.currentPlayingAttempt = null;
|
|
42
|
+
this.setCurrentAttempt(null);
|
|
43
|
+
});
|
|
44
|
+
if (params.audios) {
|
|
45
|
+
this.initializeCollectionFromAudios(params.audios);
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
initializeWithAudios(answerAudio) {
|
|
49
|
+
this.setTranscriptsLoaded(false);
|
|
50
|
+
this.collection.clear();
|
|
51
|
+
this.initializeCollectionFromAudios(answerAudio);
|
|
52
|
+
}
|
|
53
|
+
initializeCollectionFromAudios(audios) {
|
|
54
|
+
if (!audios) {
|
|
55
|
+
console.warn('VoicePlayerModel: audios is not provided');
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
audios.forEach((audio, index) => {
|
|
59
|
+
const attemptNumber = index + 1;
|
|
60
|
+
if (!audio.audioFileId) {
|
|
61
|
+
console.warn('VoicePlayerModel: audioFileId is missing for audio', audio);
|
|
62
|
+
return;
|
|
63
|
+
}
|
|
64
|
+
this.collection.add(attemptNumber, {
|
|
65
|
+
attemptNumber,
|
|
66
|
+
audioFileId: audio.audioFileId,
|
|
67
|
+
_id: audio._id,
|
|
68
|
+
hasDrawing: !!audio.drawing
|
|
69
|
+
});
|
|
70
|
+
});
|
|
71
|
+
}
|
|
72
|
+
async fetchTranscriptWithRetry(audioFileId) {
|
|
73
|
+
for (let attempt = 0; attempt < _constants.TRANSCRIPT_MAX_RETRIES; attempt++) {
|
|
74
|
+
const response = await this.api.getAudioFileTranscript(audioFileId);
|
|
75
|
+
if (response.status === 'completed') {
|
|
76
|
+
return response.text;
|
|
77
|
+
}
|
|
78
|
+
if (response.status === 'failed') {
|
|
79
|
+
return _constants.NO_AUDIO_BE_MESSAGE;
|
|
80
|
+
}
|
|
81
|
+
if (attempt < _constants.TRANSCRIPT_MAX_RETRIES - 1) {
|
|
82
|
+
await new Promise(resolve => setTimeout(resolve, _constants.TRANSCRIPT_RETRY_INTERVAL_MS));
|
|
83
|
+
}
|
|
84
|
+
}
|
|
85
|
+
return _constants.NO_AUDIO_BE_MESSAGE;
|
|
86
|
+
}
|
|
87
|
+
loadAllTranscripts = (0, _effector.createEffect)(async () => {
|
|
88
|
+
const attempts = this.collection.getAll();
|
|
89
|
+
const transcriptPromises = attempts.map(async item => {
|
|
90
|
+
if (this.collection.hasTranscript(item.attemptNumber)) {
|
|
91
|
+
return;
|
|
92
|
+
}
|
|
93
|
+
this.collection.update(item.attemptNumber, {
|
|
94
|
+
transcriptLoading: true
|
|
95
|
+
});
|
|
96
|
+
try {
|
|
97
|
+
const text = await this.fetchTranscriptWithRetry(item.audioFileId);
|
|
98
|
+
this.collection.update(item.attemptNumber, {
|
|
99
|
+
transcript: text,
|
|
100
|
+
transcriptLoading: false,
|
|
101
|
+
transcriptError: undefined
|
|
102
|
+
});
|
|
103
|
+
} catch (error) {
|
|
104
|
+
this.collection.update(item.attemptNumber, {
|
|
105
|
+
transcriptLoading: false,
|
|
106
|
+
transcriptError: error instanceof Error ? error.message : 'Failed to load transcript'
|
|
107
|
+
});
|
|
108
|
+
}
|
|
109
|
+
});
|
|
110
|
+
await Promise.all(transcriptPromises);
|
|
111
|
+
this.setTranscriptsLoaded(true);
|
|
112
|
+
});
|
|
113
|
+
handlePlayAttempt = (0, _effector.createEffect)(async attemptNumber => {
|
|
114
|
+
const item = this.collection.get(attemptNumber);
|
|
115
|
+
if (!item) return;
|
|
116
|
+
if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
|
|
117
|
+
const previousItem = this.collection.get(this.currentPlayingAttempt);
|
|
118
|
+
if (previousItem?.controller && previousItem?.audioLoading) {
|
|
119
|
+
this.downloader.abortDownload(previousItem.controller);
|
|
120
|
+
this.collection.update(this.currentPlayingAttempt, {
|
|
121
|
+
audioLoading: false,
|
|
122
|
+
controller: undefined,
|
|
123
|
+
audioDownloadPromise: undefined
|
|
124
|
+
});
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
if (this.collection.hasAudio(attemptNumber)) {
|
|
128
|
+
this.playAudioFx(attemptNumber);
|
|
129
|
+
return;
|
|
130
|
+
}
|
|
131
|
+
try {
|
|
132
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.LOADING);
|
|
133
|
+
const {
|
|
134
|
+
collectionItem,
|
|
135
|
+
downloadPromise
|
|
136
|
+
} = await this.downloader.download({
|
|
137
|
+
audioFileId: item.audioFileId,
|
|
138
|
+
attemptNumber
|
|
139
|
+
});
|
|
140
|
+
this.collection.update(attemptNumber, collectionItem);
|
|
141
|
+
const result = await downloadPromise;
|
|
142
|
+
this.collection.update(attemptNumber, {
|
|
143
|
+
audioUri: result.uri,
|
|
144
|
+
audioLoading: false,
|
|
145
|
+
audioError: undefined,
|
|
146
|
+
controller: undefined,
|
|
147
|
+
audioDownloadPromise: undefined
|
|
148
|
+
});
|
|
149
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.IDLE);
|
|
150
|
+
this.playAudioFx(attemptNumber);
|
|
151
|
+
} catch (error) {
|
|
152
|
+
console.error('Audio download error:', error);
|
|
153
|
+
if (error instanceof Error && error.name === 'AbortError') {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
this.collection.update(attemptNumber, {
|
|
157
|
+
audioLoading: false,
|
|
158
|
+
audioError: error instanceof Error ? error.message : 'Failed to download audio',
|
|
159
|
+
controller: undefined,
|
|
160
|
+
audioDownloadPromise: undefined
|
|
161
|
+
});
|
|
162
|
+
}
|
|
163
|
+
});
|
|
164
|
+
playAudioFx = (0, _effector.createEffect)(async attemptNumber => {
|
|
165
|
+
const item = this.collection.get(attemptNumber);
|
|
166
|
+
if (!item?.audioUri) {
|
|
167
|
+
console.warn('No audio URI available for attempt:', attemptNumber);
|
|
168
|
+
return;
|
|
169
|
+
}
|
|
170
|
+
try {
|
|
171
|
+
if (this.currentPlayingAttempt !== null && this.currentPlayingAttempt !== attemptNumber) {
|
|
172
|
+
this.playerModel.player?.remove();
|
|
173
|
+
}
|
|
174
|
+
if (this.currentPlayingAttempt === attemptNumber && this.playerModel.player?.playing) {
|
|
175
|
+
this.playerModel.pause();
|
|
176
|
+
return;
|
|
177
|
+
}
|
|
178
|
+
if (this.currentPlayingAttempt === attemptNumber && !this.playerModel.player?.playing) {
|
|
179
|
+
this.playerModel.resume();
|
|
180
|
+
return;
|
|
181
|
+
}
|
|
182
|
+
this.currentPlayingAttempt = attemptNumber;
|
|
183
|
+
this.setCurrentAttempt(attemptNumber);
|
|
184
|
+
await this.playerModel.play(item.audioUri);
|
|
185
|
+
} catch (error) {
|
|
186
|
+
console.error('Error playing audio:', error);
|
|
187
|
+
this.playerModel.setPlayerState(_PlayerModel.PlayerState.IDLE);
|
|
188
|
+
this.collection.update(attemptNumber, {
|
|
189
|
+
audioError: error instanceof Error ? error.message : 'Failed to play audio'
|
|
190
|
+
});
|
|
191
|
+
}
|
|
192
|
+
});
|
|
193
|
+
getTranscript(attemptNumber) {
|
|
194
|
+
return this.collection.get(attemptNumber)?.transcript;
|
|
195
|
+
}
|
|
196
|
+
isTranscriptLoading(attemptNumber) {
|
|
197
|
+
return this.collection.get(attemptNumber)?.transcriptLoading || false;
|
|
198
|
+
}
|
|
199
|
+
isAudioLoading(attemptNumber) {
|
|
200
|
+
return this.collection.get(attemptNumber)?.audioLoading || false;
|
|
201
|
+
}
|
|
202
|
+
getAllAttempts() {
|
|
203
|
+
return this.collection.getAll();
|
|
204
|
+
}
|
|
205
|
+
reinitializePlayer() {
|
|
206
|
+
this.playerModel.reinitialize();
|
|
207
|
+
}
|
|
208
|
+
cleanup() {
|
|
209
|
+
this.collection.getAll().forEach(item => {
|
|
210
|
+
if (item.audioUri && item.audioUri.startsWith('blob:')) {
|
|
211
|
+
try {
|
|
212
|
+
URL.revokeObjectURL(item.audioUri);
|
|
213
|
+
} catch (e) {}
|
|
214
|
+
}
|
|
215
|
+
if (item.controller) {
|
|
216
|
+
this.downloader.abortDownload(item.controller);
|
|
217
|
+
}
|
|
218
|
+
});
|
|
219
|
+
this.collection.clear();
|
|
220
|
+
this.currentPlayingAttempt = null;
|
|
221
|
+
this.reset();
|
|
222
|
+
this.dropdown.reset();
|
|
223
|
+
this.playerModel.release();
|
|
224
|
+
}
|
|
225
|
+
togglePlayPause = (0, _effector.attach)({
|
|
226
|
+
source: this.playerModel.$playerState,
|
|
227
|
+
mapParams: (attemptNumber, playerState) => ({
|
|
228
|
+
attemptNumber,
|
|
229
|
+
playerState
|
|
230
|
+
}),
|
|
231
|
+
effect: (0, _effector.createEffect)(({
|
|
232
|
+
attemptNumber,
|
|
233
|
+
playerState
|
|
234
|
+
}) => {
|
|
235
|
+
if (this.currentPlayingAttempt === attemptNumber && playerState === _PlayerModel.PlayerState.PLAYING) {
|
|
236
|
+
this.pauseAudio();
|
|
237
|
+
} else {
|
|
238
|
+
this.handlePlayAttempt(attemptNumber);
|
|
239
|
+
}
|
|
240
|
+
})
|
|
241
|
+
});
|
|
242
|
+
}
|
|
243
|
+
exports.VoicePlayerModel = VoicePlayerModel;
|
|
244
|
+
//# sourceMappingURL=VoicePlayer.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","_VoiceTranscriptionsCollection","_VoiceTranscriptionsDownloaderModel","_VoiceTranscriptionsDropdownModel","_PlayerModel","_constants","VoicePlayerModel","collection","VoiceTranscriptionsCollection","downloader","VoiceTranscriptionsDownloaderModel","dropdown","VoiceTranscriptionsDropdownModel","playerModel","PlayerModel","currentPlayingAttempt","setCurrentAttempt","createEvent","setTranscriptsLoaded","reset","$currentAttempt","restore","$transcriptsLoaded","$playerState","pauseAudio","pause","stopAudio","createEffect","stop","constructor","params","api","setApi","playbackFinished","watch","audios","initializeCollectionFromAudios","initializeWithAudios","answerAudio","clear","console","warn","forEach","audio","index","attemptNumber","audioFileId","add","_id","hasDrawing","drawing","fetchTranscriptWithRetry","attempt","TRANSCRIPT_MAX_RETRIES","response","getAudioFileTranscript","status","text","NO_AUDIO_BE_MESSAGE","Promise","resolve","setTimeout","TRANSCRIPT_RETRY_INTERVAL_MS","loadAllTranscripts","attempts","getAll","transcriptPromises","map","item","hasTranscript","update","transcriptLoading","transcript","transcriptError","undefined","error","Error","message","all","handlePlayAttempt","get","previousItem","controller","audioLoading","abortDownload","audioDownloadPromise","hasAudio","playAudioFx","setPlayerState","PlayerState","LOADING","collectionItem","downloadPromise","download","result","audioUri","uri","audioError","IDLE","name","player","remove","playing","resume","play","getTranscript","isTranscriptLoading","isAudioLoading","getAllAttempts","reinitializePlayer","reinitialize","cleanup","startsWith","URL","revokeObjectURL","e","release","togglePlayPause","attach","source","mapParams","playerState","effect","PLAYING","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoicePlayer.model.ts"],"mappings":";;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AACA,IAAAC,8BAAA,GAAAD,OAAA;AAIA,IAAAE,mCAAA,GAAAF,OAAA;AACA,IAAAG,iCAAA,GAAAH,OAAA;AAEA,IAAAI,YAAA,GAAAJ,OAAA;AACA,IAAAK,UAAA,GAAAL,OAAA;AAiBO,MAAMM,gBAAgB,CAAC;EACZC,UAAU,GAAG,IAAIC,4DAA6B,CAAC,CAAC;EAChDC,UAAU,GAAG,IAAIC,sEAAkC,CAAC,CAAC;EACrDC,QAAQ,GAAG,IAAIC,kEAAgC,CAAC,CAAC;EACjDC,WAAW,GAAG,IAAIC,wBAAW,CAAC,CAAC;EAEvCC,qBAAqB,GAAkB,IAAI;EAEnC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
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceTranscriptionsCollection = void 0;
|
|
7
|
+
class VoiceTranscriptionsCollection {
|
|
8
|
+
collection = new Map();
|
|
9
|
+
add(attemptNumber, item) {
|
|
10
|
+
this.collection.set(attemptNumber, item);
|
|
11
|
+
}
|
|
12
|
+
update(attemptNumber, item) {
|
|
13
|
+
const existingItem = this.collection.get(attemptNumber) || {};
|
|
14
|
+
this.collection.set(attemptNumber, {
|
|
15
|
+
...existingItem,
|
|
16
|
+
...item
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
delete(attemptNumber) {
|
|
20
|
+
this.collection.delete(attemptNumber);
|
|
21
|
+
}
|
|
22
|
+
get(attemptNumber) {
|
|
23
|
+
return this.collection.get(attemptNumber);
|
|
24
|
+
}
|
|
25
|
+
getAll() {
|
|
26
|
+
return Array.from(this.collection.values());
|
|
27
|
+
}
|
|
28
|
+
clear() {
|
|
29
|
+
this.collection.clear();
|
|
30
|
+
}
|
|
31
|
+
hasTranscript(attemptNumber) {
|
|
32
|
+
const item = this.collection.get(attemptNumber);
|
|
33
|
+
return !!item?.transcript;
|
|
34
|
+
}
|
|
35
|
+
hasAudio(attemptNumber) {
|
|
36
|
+
const item = this.collection.get(attemptNumber);
|
|
37
|
+
return !!item?.audioUri;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.VoiceTranscriptionsCollection = VoiceTranscriptionsCollection;
|
|
41
|
+
//# sourceMappingURL=VoiceTranscriptionsCollection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["VoiceTranscriptionsCollection","collection","Map","add","attemptNumber","item","set","update","existingItem","get","delete","getAll","Array","from","values","clear","hasTranscript","transcript","hasAudio","audioUri","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsCollection.ts"],"mappings":";;;;;;AAeO,MAAMA,6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1,39 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceTranscriptionsDownloaderModel = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
var _helpers = require("../../helpers.js");
|
|
9
|
+
class VoiceTranscriptionsDownloaderModel {
|
|
10
|
+
setApi = api => {
|
|
11
|
+
this.api = api;
|
|
12
|
+
};
|
|
13
|
+
download = (0, _effector.createEffect)(async ({
|
|
14
|
+
audioFileId,
|
|
15
|
+
attemptNumber
|
|
16
|
+
}) => {
|
|
17
|
+
const {
|
|
18
|
+
downloadAudio,
|
|
19
|
+
controller
|
|
20
|
+
} = (0, _helpers.downloadAudioFileRequestGenerator)(audioFileId, this.api);
|
|
21
|
+
const downloadPromise = downloadAudio();
|
|
22
|
+
const collectionItem = {
|
|
23
|
+
attemptNumber,
|
|
24
|
+
audioFileId,
|
|
25
|
+
audioLoading: true,
|
|
26
|
+
audioDownloadPromise: downloadPromise,
|
|
27
|
+
controller
|
|
28
|
+
};
|
|
29
|
+
return {
|
|
30
|
+
collectionItem,
|
|
31
|
+
downloadPromise
|
|
32
|
+
};
|
|
33
|
+
});
|
|
34
|
+
abortDownload = controller => {
|
|
35
|
+
controller?.abort();
|
|
36
|
+
};
|
|
37
|
+
}
|
|
38
|
+
exports.VoiceTranscriptionsDownloaderModel = VoiceTranscriptionsDownloaderModel;
|
|
39
|
+
//# sourceMappingURL=VoiceTranscriptionsDownloader.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","_helpers","VoiceTranscriptionsDownloaderModel","setApi","api","download","createEffect","audioFileId","attemptNumber","downloadAudio","controller","downloadAudioFileRequestGenerator","downloadPromise","collectionItem","audioLoading","audioDownloadPromise","abortDownload","abort","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsDownloader.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAGA,IAAAC,QAAA,GAAAD,OAAA;AAYO,MAAME,kCAAkC,CAAC;EAG9BC,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,kCAAA,GAAAA,kCAAA","ignoreList":[]}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceTranscriptionsDropdownModel = void 0;
|
|
7
|
+
var _effector = require("effector");
|
|
8
|
+
class VoiceTranscriptionsDropdownModel {
|
|
9
|
+
toggleExpand = (0, _effector.createEvent)();
|
|
10
|
+
setExpanded = (0, _effector.createEvent)();
|
|
11
|
+
reset = (0, _effector.createEvent)();
|
|
12
|
+
$isExpanded = (0, _effector.createStore)(false).on(this.setExpanded, (_, value) => value).on(this.toggleExpand, state => !state).reset(this.reset);
|
|
13
|
+
}
|
|
14
|
+
exports.VoiceTranscriptionsDropdownModel = VoiceTranscriptionsDropdownModel;
|
|
15
|
+
//# sourceMappingURL=VoiceTranscriptionsDropdown.model.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_effector","require","VoiceTranscriptionsDropdownModel","toggleExpand","createEvent","setExpanded","reset","$isExpanded","createStore","on","_","value","state","exports"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/VoiceTranscriptionsDropdown.model.ts"],"mappings":";;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAEO,MAAMC,gCAAgC,CAAC;EAC5BC,YAAY,GAAG,IAAAC,qBAAW,EAAC,CAAC;EAC5BC,WAAW,GAAG,IAAAD,qBAAW,EAAU,CAAC;EACpCE,KAAK,GAAG,IAAAF,qBAAW,EAAC,CAAC;EAErBG,WAAW,GAAG,IAAAC,qBAAW,EAAC,KAAK,CAAC,CAC7CC,EAAE,CAAC,IAAI,CAACJ,WAAW,EAAE,CAACK,CAAC,EAAEC,KAAK,KAAKA,KAAK,CAAC,CACzCF,EAAE,CAAC,IAAI,CAACN,YAAY,EAAGS,KAAK,IAAK,CAACA,KAAK,CAAC,CACxCN,KAAK,CAAC,IAAI,CAACA,KAAK,CAAC;AACtB;AAACO,OAAA,CAAAX,gCAAA,GAAAA,gCAAA","ignoreList":[]}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
Object.defineProperty(exports, "PlayerModel", {
|
|
7
|
+
enumerable: true,
|
|
8
|
+
get: function () {
|
|
9
|
+
return _PlayerModel.PlayerModel;
|
|
10
|
+
}
|
|
11
|
+
});
|
|
12
|
+
Object.defineProperty(exports, "PlayerState", {
|
|
13
|
+
enumerable: true,
|
|
14
|
+
get: function () {
|
|
15
|
+
return _PlayerModel.PlayerState;
|
|
16
|
+
}
|
|
17
|
+
});
|
|
18
|
+
Object.defineProperty(exports, "VoicePlayerModel", {
|
|
19
|
+
enumerable: true,
|
|
20
|
+
get: function () {
|
|
21
|
+
return _VoicePlayerModel.VoicePlayerModel;
|
|
22
|
+
}
|
|
23
|
+
});
|
|
24
|
+
Object.defineProperty(exports, "VoiceTranscriptionsCollection", {
|
|
25
|
+
enumerable: true,
|
|
26
|
+
get: function () {
|
|
27
|
+
return _VoiceTranscriptionsCollection.VoiceTranscriptionsCollection;
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
Object.defineProperty(exports, "VoiceTranscriptionsDownloaderModel", {
|
|
31
|
+
enumerable: true,
|
|
32
|
+
get: function () {
|
|
33
|
+
return _VoiceTranscriptionsDownloaderModel.VoiceTranscriptionsDownloaderModel;
|
|
34
|
+
}
|
|
35
|
+
});
|
|
36
|
+
Object.defineProperty(exports, "VoiceTranscriptionsDropdownModel", {
|
|
37
|
+
enumerable: true,
|
|
38
|
+
get: function () {
|
|
39
|
+
return _VoiceTranscriptionsDropdownModel.VoiceTranscriptionsDropdownModel;
|
|
40
|
+
}
|
|
41
|
+
});
|
|
42
|
+
var _VoicePlayerModel = require("./VoicePlayer.model.js");
|
|
43
|
+
var _PlayerModel = require("./Player.model.js");
|
|
44
|
+
var _VoiceTranscriptionsCollection = require("./VoiceTranscriptionsCollection.js");
|
|
45
|
+
var _VoiceTranscriptionsDownloaderModel = require("./VoiceTranscriptionsDownloader.model.js");
|
|
46
|
+
var _VoiceTranscriptionsDropdownModel = require("./VoiceTranscriptionsDropdown.model.js");
|
|
47
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_VoicePlayerModel","require","_PlayerModel","_VoiceTranscriptionsCollection","_VoiceTranscriptionsDownloaderModel","_VoiceTranscriptionsDropdownModel"],"sourceRoot":"../../../../../../src","sources":["features/voice/playing/model/index.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,iBAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,8BAAA,GAAAF,OAAA;AAEA,IAAAG,mCAAA,GAAAH,OAAA;AACA,IAAAI,iCAAA,GAAAJ,OAAA","ignoreList":[]}
|
|
@@ -0,0 +1,74 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.VoiceRecord = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _VoiceRecordButton = require("./VoiceRecordButton.js");
|
|
9
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
10
|
+
var _reactNativeUi = require("@magmamath/react-native-ui");
|
|
11
|
+
var _VoiceRecordDeleteButton = require("./VoiceRecordDeleteButton.js");
|
|
12
|
+
var _VoiceRecordDevider = require("./VoiceRecordDevider.js");
|
|
13
|
+
var _VoiceRecordTimer = require("./VoiceRecordTimer.js");
|
|
14
|
+
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
15
|
+
var _useVoiceRecorder = require("../hooks/useVoiceRecorder.js");
|
|
16
|
+
var _useVoiceRecorderAnimation = require("../hooks/useVoiceRecorderAnimation.js");
|
|
17
|
+
var _effectorReact = require("effector-react");
|
|
18
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
19
|
+
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); }
|
|
20
|
+
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; }
|
|
21
|
+
const VoiceRecord = ({
|
|
22
|
+
style,
|
|
23
|
+
model
|
|
24
|
+
}) => {
|
|
25
|
+
const {
|
|
26
|
+
recorderState
|
|
27
|
+
} = (0, _useVoiceRecorder.useVoiceRecorder)(model);
|
|
28
|
+
const [isExpanded, isDisabled] = (0, _effectorReact.useUnit)([model.$isExpanded, model.$isButtonDisabled]);
|
|
29
|
+
const {
|
|
30
|
+
containerAnimatedStyle
|
|
31
|
+
} = (0, _useVoiceRecorderAnimation.useVoiceRecorderAnimation)(isExpanded);
|
|
32
|
+
(0, _react.useEffect)(() => {
|
|
33
|
+
return () => {
|
|
34
|
+
model.cleanup();
|
|
35
|
+
};
|
|
36
|
+
}, [model]);
|
|
37
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
38
|
+
style: [styles.container, style, containerAnimatedStyle],
|
|
39
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordButton.VoiceRecordButton, {
|
|
40
|
+
model: model
|
|
41
|
+
}), isExpanded && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNativeReanimated.default.View, {
|
|
42
|
+
entering: _reactNativeReanimated.FadeIn,
|
|
43
|
+
exiting: _reactNativeReanimated.FadeOut,
|
|
44
|
+
style: styles.expendedContainer,
|
|
45
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordTimer.VoiceRecordTimer, {
|
|
46
|
+
style: styles.timer,
|
|
47
|
+
model: model,
|
|
48
|
+
recordingFileDurationMs: recorderState.durationMillis
|
|
49
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordDevider.VoiceRecordDevider, {}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_VoiceRecordDeleteButton.VoiceRecordDeleteButton, {
|
|
50
|
+
isDisabled: isDisabled,
|
|
51
|
+
onPress: model.events.deleteRecord
|
|
52
|
+
})]
|
|
53
|
+
})]
|
|
54
|
+
});
|
|
55
|
+
};
|
|
56
|
+
exports.VoiceRecord = VoiceRecord;
|
|
57
|
+
const styles = _reactNative.StyleSheet.create({
|
|
58
|
+
container: {
|
|
59
|
+
alignItems: 'center',
|
|
60
|
+
padding: 3,
|
|
61
|
+
paddingBottom: 6,
|
|
62
|
+
backgroundColor: _reactNativeUi.COLORS.NEUTRAL_3,
|
|
63
|
+
borderRadius: 32,
|
|
64
|
+
boxShadow: '0 1px 3px 0 rgba(51, 51, 51, 0.10), 0 0 1px 0 rgba(51, 51, 51, 0.40)',
|
|
65
|
+
overflow: 'hidden'
|
|
66
|
+
},
|
|
67
|
+
timer: {
|
|
68
|
+
marginTop: _reactNativeUi.SPACING[400]
|
|
69
|
+
},
|
|
70
|
+
expendedContainer: {
|
|
71
|
+
alignItems: 'center'
|
|
72
|
+
}
|
|
73
|
+
});
|
|
74
|
+
//# sourceMappingURL=VoiceRecord.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_VoiceRecordButton","_react","_interopRequireWildcard","_reactNativeUi","_VoiceRecordDeleteButton","_VoiceRecordDevider","_VoiceRecordTimer","_reactNativeReanimated","_useVoiceRecorder","_useVoiceRecorderAnimation","_effectorReact","_jsxRuntime","_getRequireWildcardCache","e","WeakMap","r","t","__esModule","default","has","get","n","__proto__","a","Object","defineProperty","getOwnPropertyDescriptor","u","hasOwnProperty","call","i","set","VoiceRecord","style","model","recorderState","useVoiceRecorder","isExpanded","isDisabled","useUnit","$isExpanded","$isButtonDisabled","containerAnimatedStyle","useVoiceRecorderAnimation","useEffect","cleanup","jsxs","View","styles","container","children","jsx","VoiceRecordButton","entering","FadeIn","exiting","FadeOut","expendedContainer","VoiceRecordTimer","timer","recordingFileDurationMs","durationMillis","VoiceRecordDevider","VoiceRecordDeleteButton","onPress","events","deleteRecord","exports","StyleSheet","create","alignItems","padding","paddingBottom","backgroundColor","COLORS","NEUTRAL_3","borderRadius","boxShadow","overflow","marginTop","SPACING"],"sourceRoot":"../../../../../../src","sources":["features/voice/recording/components/VoiceRecord.tsx"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAC,uBAAA,CAAAH,OAAA;AACA,IAAAI,cAAA,GAAAJ,OAAA;AACA,IAAAK,wBAAA,GAAAL,OAAA;AACA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,iBAAA,GAAAP,OAAA;AACA,IAAAQ,sBAAA,GAAAL,uBAAA,CAAAH,OAAA;AAEA,IAAAS,iBAAA,GAAAT,OAAA;AACA,IAAAU,0BAAA,GAAAV,OAAA;AACA,IAAAW,cAAA,GAAAX,OAAA;AAAwC,IAAAY,WAAA,GAAAZ,OAAA;AAAA,SAAAa,yBAAAC,CAAA,6BAAAC,OAAA,mBAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,CAAAC,CAAA,WAAAA,CAAA,GAAAG,CAAA,GAAAD,CAAA,KAAAF,CAAA;AAAA,SAAAX,wBAAAW,CAAA,EAAAE,CAAA,SAAAA,CAAA,IAAAF,CAAA,IAAAA,CAAA,CAAAI,UAAA,SAAAJ,CAAA,eAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,WAAAK,OAAA,EAAAL,CAAA,QAAAG,CAAA,GAAAJ,wBAAA,CAAAG,CAAA,OAAAC,CAAA,IAAAA,CAAA,CAAAG,GAAA,CAAAN,CAAA,UAAAG,CAAA,CAAAI,GAAA,CAAAP,CAAA,OAAAQ,CAAA,KAAAC,SAAA,UAAAC,CAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,CAAA,IAAAd,CAAA,oBAAAc,CAAA,OAAAC,cAAA,CAAAC,IAAA,CAAAhB,CAAA,EAAAc,CA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