stream-chat-react-native-core 5.28.1 → 5.29.0
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/lib/commonjs/components/Attachment/Attachment.js +2 -2
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/AudioAttachment.js +247 -115
- package/lib/commonjs/components/Attachment/AudioAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +30 -50
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/VideoThumbnail.js +3 -3
- package/lib/commonjs/components/Attachment/VideoThumbnail.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +43 -1
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +24 -0
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js +6 -6
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +1 -1
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +4 -2
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +55 -74
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +250 -43
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +9 -7
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecorder.js +221 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecorder.js.map +1 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +121 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js +68 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js.map +1 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js +75 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js.map +1 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingPreview.js +87 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingPreview.js.map +1 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingWaveform.js +47 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingWaveform.js.map +1 -0
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js +452 -0
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js.map +1 -0
- package/lib/commonjs/components/MessageInput/utils/audioSampling.js +91 -0
- package/lib/commonjs/components/MessageInput/utils/audioSampling.js.map +1 -0
- package/lib/commonjs/components/MessageInput/utils/normalizeAudioLevel.js +18 -0
- package/lib/commonjs/components/MessageInput/utils/normalizeAudioLevel.js.map +1 -0
- package/lib/commonjs/components/ProgressControl/ProgressControl.js +57 -40
- package/lib/commonjs/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/commonjs/components/ProgressControl/WaveProgressBar.js +162 -0
- package/lib/commonjs/components/ProgressControl/WaveProgressBar.js.map +1 -0
- package/lib/commonjs/components/Reply/Reply.js +45 -20
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/index.js +66 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +23 -12
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +24 -0
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js +76 -28
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +62 -7
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/i18n/en.json +2 -0
- package/lib/commonjs/i18n/es.json +2 -0
- package/lib/commonjs/i18n/fr.json +2 -0
- package/lib/commonjs/i18n/he.json +2 -0
- package/lib/commonjs/i18n/hi.json +2 -0
- package/lib/commonjs/i18n/it.json +2 -0
- package/lib/commonjs/i18n/ja.json +2 -0
- package/lib/commonjs/i18n/ko.json +2 -0
- package/lib/commonjs/i18n/nl.json +2 -0
- package/lib/commonjs/i18n/pt-BR.json +2 -0
- package/lib/commonjs/i18n/ru.json +2 -0
- package/lib/commonjs/i18n/tr.json +2 -0
- package/lib/commonjs/icons/ArrowLeft.js +27 -0
- package/lib/commonjs/icons/ArrowLeft.js.map +1 -0
- package/lib/commonjs/icons/ArrowUp.js +26 -0
- package/lib/commonjs/icons/ArrowUp.js.map +1 -0
- package/lib/commonjs/icons/Audio.js +24 -24
- package/lib/commonjs/icons/Audio.js.map +1 -1
- package/lib/commonjs/icons/CircleStop.js +27 -0
- package/lib/commonjs/icons/CircleStop.js.map +1 -0
- package/lib/commonjs/icons/Delete.js +17 -6
- package/lib/commonjs/icons/Delete.js.map +1 -1
- package/lib/commonjs/icons/Lock.js +30 -0
- package/lib/commonjs/icons/Lock.js.map +1 -0
- package/lib/commonjs/icons/Mic.js +30 -0
- package/lib/commonjs/icons/Mic.js.map +1 -0
- package/lib/commonjs/icons/Pause.js +15 -20
- package/lib/commonjs/icons/Pause.js.map +1 -1
- package/lib/commonjs/icons/Play.js +18 -10
- package/lib/commonjs/icons/Play.js.map +1 -1
- package/lib/commonjs/icons/SendCheck.js +30 -0
- package/lib/commonjs/icons/SendCheck.js.map +1 -0
- package/lib/commonjs/icons/SendRight.js +24 -6
- package/lib/commonjs/icons/SendRight.js.map +1 -1
- package/lib/commonjs/icons/SendUp.js +24 -6
- package/lib/commonjs/icons/SendUp.js.map +1 -1
- package/lib/commonjs/icons/Stop.js +19 -0
- package/lib/commonjs/icons/Stop.js.map +1 -0
- package/lib/commonjs/icons/index.js +77 -0
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/native.js +10 -1
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/utils/getTrimmedAttachmentTitle.js +11 -0
- package/lib/commonjs/utils/getTrimmedAttachmentTitle.js.map +1 -0
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +2 -2
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/AudioAttachment.js +247 -115
- package/lib/module/components/Attachment/AudioAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +30 -50
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/VideoThumbnail.js +3 -3
- package/lib/module/components/Attachment/VideoThumbnail.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +43 -1
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +24 -0
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js +6 -6
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/module/components/Message/Message.js +1 -1
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +4 -2
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +55 -74
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +1 -1
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +250 -43
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/SendButton.js +9 -7
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecorder.js +221 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecorder.js.map +1 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +121 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js +68 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js.map +1 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js +75 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js.map +1 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingPreview.js +87 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingPreview.js.map +1 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingWaveform.js +47 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingWaveform.js.map +1 -0
- package/lib/module/components/MessageInput/hooks/useAudioController.js +452 -0
- package/lib/module/components/MessageInput/hooks/useAudioController.js.map +1 -0
- package/lib/module/components/MessageInput/utils/audioSampling.js +91 -0
- package/lib/module/components/MessageInput/utils/audioSampling.js.map +1 -0
- package/lib/module/components/MessageInput/utils/normalizeAudioLevel.js +18 -0
- package/lib/module/components/MessageInput/utils/normalizeAudioLevel.js.map +1 -0
- package/lib/module/components/ProgressControl/ProgressControl.js +57 -40
- package/lib/module/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/module/components/ProgressControl/WaveProgressBar.js +162 -0
- package/lib/module/components/ProgressControl/WaveProgressBar.js.map +1 -0
- package/lib/module/components/Reply/Reply.js +45 -20
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/index.js +66 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +23 -12
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +24 -0
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js +76 -28
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +62 -7
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/i18n/en.json +2 -0
- package/lib/module/i18n/es.json +2 -0
- package/lib/module/i18n/fr.json +2 -0
- package/lib/module/i18n/he.json +2 -0
- package/lib/module/i18n/hi.json +2 -0
- package/lib/module/i18n/it.json +2 -0
- package/lib/module/i18n/ja.json +2 -0
- package/lib/module/i18n/ko.json +2 -0
- package/lib/module/i18n/nl.json +2 -0
- package/lib/module/i18n/pt-BR.json +2 -0
- package/lib/module/i18n/ru.json +2 -0
- package/lib/module/i18n/tr.json +2 -0
- package/lib/module/icons/ArrowLeft.js +27 -0
- package/lib/module/icons/ArrowLeft.js.map +1 -0
- package/lib/module/icons/ArrowUp.js +26 -0
- package/lib/module/icons/ArrowUp.js.map +1 -0
- package/lib/module/icons/Audio.js +24 -24
- package/lib/module/icons/Audio.js.map +1 -1
- package/lib/module/icons/CircleStop.js +27 -0
- package/lib/module/icons/CircleStop.js.map +1 -0
- package/lib/module/icons/Delete.js +17 -6
- package/lib/module/icons/Delete.js.map +1 -1
- package/lib/module/icons/Lock.js +30 -0
- package/lib/module/icons/Lock.js.map +1 -0
- package/lib/module/icons/Mic.js +30 -0
- package/lib/module/icons/Mic.js.map +1 -0
- package/lib/module/icons/Pause.js +15 -20
- package/lib/module/icons/Pause.js.map +1 -1
- package/lib/module/icons/Play.js +18 -10
- package/lib/module/icons/Play.js.map +1 -1
- package/lib/module/icons/SendCheck.js +30 -0
- package/lib/module/icons/SendCheck.js.map +1 -0
- package/lib/module/icons/SendRight.js +24 -6
- package/lib/module/icons/SendRight.js.map +1 -1
- package/lib/module/icons/SendUp.js +24 -6
- package/lib/module/icons/SendUp.js.map +1 -1
- package/lib/module/icons/Stop.js +19 -0
- package/lib/module/icons/Stop.js.map +1 -0
- package/lib/module/icons/index.js +77 -0
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/native.js +10 -1
- package/lib/module/native.js.map +1 -1
- package/lib/module/utils/getTrimmedAttachmentTitle.js +11 -0
- package/lib/module/utils/getTrimmedAttachmentTitle.js.map +1 -0
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/AudioAttachment.d.ts +3 -8
- package/lib/typescript/components/Attachment/AudioAttachment.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts.map +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +15 -3
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryVideoControl.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +1 -1
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/InputButtons.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/SendButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecorder.d.ts +51 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecorder.d.ts.map +1 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingButton.d.ts +43 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingButton.d.ts.map +1 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.d.ts +29 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.d.ts.map +1 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.d.ts +22 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.d.ts.map +1 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingPreview.d.ts +31 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingPreview.d.ts.map +1 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingWaveform.d.ts +19 -0
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingWaveform.d.ts.map +1 -0
- package/lib/typescript/components/MessageInput/hooks/useAudioController.d.ts +28 -0
- package/lib/typescript/components/MessageInput/hooks/useAudioController.d.ts.map +1 -0
- package/lib/typescript/components/MessageInput/utils/audioSampling.d.ts +11 -0
- package/lib/typescript/components/MessageInput/utils/audioSampling.d.ts.map +1 -0
- package/lib/typescript/components/MessageInput/utils/normalizeAudioLevel.d.ts +5 -0
- package/lib/typescript/components/MessageInput/utils/normalizeAudioLevel.d.ts.map +1 -0
- package/lib/typescript/components/ProgressControl/ProgressControl.d.ts +2 -2
- package/lib/typescript/components/ProgressControl/ProgressControl.d.ts.map +1 -1
- package/lib/typescript/components/ProgressControl/WaveProgressBar.d.ts +11 -0
- package/lib/typescript/components/ProgressControl/WaveProgressBar.d.ts.map +1 -0
- package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +6 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +70 -4
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts.map +1 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +62 -7
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
- package/lib/typescript/i18n/en.json +2 -0
- package/lib/typescript/i18n/es.json +2 -0
- package/lib/typescript/i18n/fr.json +2 -0
- package/lib/typescript/i18n/he.json +2 -0
- package/lib/typescript/i18n/hi.json +2 -0
- package/lib/typescript/i18n/it.json +2 -0
- package/lib/typescript/i18n/ja.json +2 -0
- package/lib/typescript/i18n/ko.json +2 -0
- package/lib/typescript/i18n/nl.json +2 -0
- package/lib/typescript/i18n/pt-BR.json +2 -0
- package/lib/typescript/i18n/ru.json +2 -0
- package/lib/typescript/i18n/tr.json +2 -0
- package/lib/typescript/icons/ArrowLeft.d.ts +8 -0
- package/lib/typescript/icons/ArrowLeft.d.ts.map +1 -0
- package/lib/typescript/icons/ArrowUp.d.ts +9 -0
- package/lib/typescript/icons/ArrowUp.d.ts.map +1 -0
- package/lib/typescript/icons/Audio.d.ts.map +1 -1
- package/lib/typescript/icons/CircleStop.d.ts +8 -0
- package/lib/typescript/icons/CircleStop.d.ts.map +1 -0
- package/lib/typescript/icons/Delete.d.ts +5 -1
- package/lib/typescript/icons/Delete.d.ts.map +1 -1
- package/lib/typescript/icons/Lock.d.ts +9 -0
- package/lib/typescript/icons/Lock.d.ts.map +1 -0
- package/lib/typescript/icons/Mic.d.ts +8 -0
- package/lib/typescript/icons/Mic.d.ts.map +1 -0
- package/lib/typescript/icons/Pause.d.ts +3 -1
- package/lib/typescript/icons/Pause.d.ts.map +1 -1
- package/lib/typescript/icons/Play.d.ts +3 -1
- package/lib/typescript/icons/Play.d.ts.map +1 -1
- package/lib/typescript/icons/SendCheck.d.ts +8 -0
- package/lib/typescript/icons/SendCheck.d.ts.map +1 -0
- package/lib/typescript/icons/SendRight.d.ts +5 -1
- package/lib/typescript/icons/SendRight.d.ts.map +1 -1
- package/lib/typescript/icons/SendUp.d.ts +5 -1
- package/lib/typescript/icons/SendUp.d.ts.map +1 -1
- package/lib/typescript/icons/Stop.d.ts +4 -0
- package/lib/typescript/icons/Stop.d.ts.map +1 -0
- package/lib/typescript/icons/index.d.ts +7 -0
- package/lib/typescript/icons/index.d.ts.map +1 -1
- package/lib/typescript/native.d.ts +49 -0
- package/lib/typescript/native.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +6 -0
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/utils/Streami18n.d.ts +2 -0
- package/lib/typescript/utils/Streami18n.d.ts.map +1 -1
- package/lib/typescript/utils/getTrimmedAttachmentTitle.d.ts +2 -0
- package/lib/typescript/utils/getTrimmedAttachmentTitle.d.ts.map +1 -0
- package/package.json +1 -1
- package/src/components/Attachment/Attachment.tsx +7 -2
- package/src/components/Attachment/AudioAttachment.tsx +223 -119
- package/src/components/Attachment/FileAttachmentGroup.tsx +35 -55
- package/src/components/Attachment/VideoThumbnail.tsx +1 -1
- package/src/components/Channel/Channel.tsx +32 -0
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +24 -0
- package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +1 -1
- package/src/components/ImageGallery/__tests__/ImageGalleryVideoControl.test.tsx +2 -2
- package/src/components/ImageGallery/components/ImageGalleryVideoControl.tsx +2 -7
- package/src/components/Message/Message.tsx +1 -1
- package/src/components/Message/MessageSimple/MessageContent.tsx +2 -1
- package/src/components/Message/MessageSimple/MessageSimple.tsx +2 -1
- package/src/components/Message/hooks/useMessageActions.tsx +2 -2
- package/src/components/MessageInput/FileUploadPreview.tsx +67 -98
- package/src/components/MessageInput/InputButtons.tsx +2 -1
- package/src/components/MessageInput/MessageInput.tsx +320 -49
- package/src/components/MessageInput/SendButton.tsx +7 -3
- package/src/components/MessageInput/__tests__/MessageInput.test.js +0 -1
- package/src/components/MessageInput/__tests__/__snapshots__/SendButton.test.js.snap +132 -48
- package/src/components/MessageInput/components/AudioRecorder/AudioRecorder.tsx +313 -0
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingButton.tsx +192 -0
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.tsx +114 -0
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.tsx +85 -0
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingPreview.tsx +102 -0
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingWaveform.tsx +62 -0
- package/src/components/MessageInput/hooks/useAudioController.tsx +288 -0
- package/src/components/MessageInput/utils/audioSampling.ts +108 -0
- package/src/components/MessageInput/utils/normalizeAudioLevel.ts +20 -0
- package/src/components/ProgressControl/ProgressControl.tsx +69 -40
- package/src/components/ProgressControl/WaveProgressBar.tsx +180 -0
- package/src/components/Reply/Reply.tsx +89 -56
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +38 -20
- package/src/components/index.ts +6 -0
- package/src/contexts/messageInputContext/MessageInputContext.tsx +95 -10
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +25 -0
- package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +80 -27
- package/src/contexts/themeContext/utils/theme.ts +111 -14
- package/src/i18n/en.json +2 -0
- package/src/i18n/es.json +2 -0
- package/src/i18n/fr.json +2 -0
- package/src/i18n/he.json +2 -0
- package/src/i18n/hi.json +2 -0
- package/src/i18n/it.json +2 -0
- package/src/i18n/ja.json +2 -0
- package/src/i18n/ko.json +2 -0
- package/src/i18n/nl.json +2 -0
- package/src/i18n/pt-BR.json +2 -0
- package/src/i18n/ru.json +2 -0
- package/src/i18n/tr.json +2 -0
- package/src/icons/ArrowLeft.tsx +18 -0
- package/src/icons/ArrowUp.tsx +19 -0
- package/src/icons/Audio.tsx +24 -24
- package/src/icons/CircleStop.tsx +18 -0
- package/src/icons/Delete.tsx +14 -8
- package/src/icons/Lock.tsx +22 -0
- package/src/icons/Mic.tsx +20 -0
- package/src/icons/Pause.tsx +12 -11
- package/src/icons/Play.tsx +9 -13
- package/src/icons/SendCheck.tsx +18 -0
- package/src/icons/SendRight.tsx +16 -7
- package/src/icons/SendUp.tsx +16 -7
- package/src/icons/Stop.tsx +12 -0
- package/src/icons/index.ts +7 -0
- package/src/native.ts +69 -0
- package/src/types/types.ts +6 -0
- package/src/utils/getTrimmedAttachmentTitle.ts +5 -0
- package/src/version.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"native.d.ts","sourceRoot":"","sources":["../../src/native.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,QAAQ,IAAI,eAAe,EAAE,SAAS,EAAE,SA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
id?: string;
|
|
18
18
|
mimeType?: string;
|
|
19
19
|
size?: number;
|
|
20
|
+
type?: 'file' | 'image' | 'video' | 'audio' | 'voiceRecording';
|
|
20
21
|
uri?: string;
|
|
22
|
+
waveform_data?: number[];
|
|
21
23
|
};
|
|
22
24
|
export type FileUpload = {
|
|
23
25
|
file: File;
|
|
@@ -27,7 +29,9 @@ export type FileUpload = {
|
|
|
27
29
|
paused?: boolean;
|
|
28
30
|
progress?: number;
|
|
29
31
|
thumb_url?: string;
|
|
32
|
+
type?: string;
|
|
30
33
|
url?: string;
|
|
34
|
+
waveform_data?: number[];
|
|
31
35
|
};
|
|
32
36
|
export type ImageUpload = {
|
|
33
37
|
file: Partial<Asset>;
|
|
@@ -38,10 +42,12 @@ export type ImageUpload = {
|
|
|
38
42
|
width?: number;
|
|
39
43
|
};
|
|
40
44
|
export type DefaultAttachmentType = UnknownType & {
|
|
45
|
+
duration?: number;
|
|
41
46
|
file_size?: number;
|
|
42
47
|
mime_type?: string;
|
|
43
48
|
originalFile?: File;
|
|
44
49
|
originalImage?: Partial<Asset>;
|
|
50
|
+
waveform_data?: number[];
|
|
45
51
|
};
|
|
46
52
|
interface DefaultUserType extends UnknownType {
|
|
47
53
|
image?: string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/types/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,kBAAkB,EAAE,qBAAqB,EAAE,MAAM,aAAa,CAAC;AAE7E,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAC;AAErD,MAAM,MAAM,KAAK,GAAG;IAClB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE,MAAM,CAAC;IACf,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,QAAQ,GAAG,QAAQ,CAAC;IAC5B,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE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,kBAAkB,CAAC;IAChC,WAAW,EAAE,qBAAqB,CAAC;IACnC,SAAS,EAAE,WAAW,CAAC;IACvB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,WAAW,CAAC;IAC1B,QAAQ,EAAE,eAAe,CAAC;CAC3B;AAED,MAAM,MAAM,WAAW,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;AAElD,MAAM,MAAM,OAAO,CAAC,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC,CAAC"}
|
|
@@ -142,6 +142,7 @@ export declare class Streami18n {
|
|
|
142
142
|
Flag: string;
|
|
143
143
|
"Flag Message": string;
|
|
144
144
|
"Flag action failed either due to a network issue or the message is already flagged": string;
|
|
145
|
+
"Hold to start recording.": string;
|
|
145
146
|
"How about sending your first message to a friend?": string;
|
|
146
147
|
"Instant Commands": string;
|
|
147
148
|
"Let's start chatting!": string;
|
|
@@ -163,6 +164,7 @@ export declare class Streami18n {
|
|
|
163
164
|
"Photos and Videos": string;
|
|
164
165
|
"Pin to Conversation": string;
|
|
165
166
|
"Pinned by": string;
|
|
167
|
+
"Please allow Audio permissions in settings.": string;
|
|
166
168
|
"Please enable access to your photos and videos so you can share them.": string;
|
|
167
169
|
"Please select a channel first": string;
|
|
168
170
|
"Reconnecting...": string;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Streami18n.d.ts","sourceRoot":"","sources":["../../../src/utils/Streami18n.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAM1B,OAAa,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEvD,OAAO,KAAK,MAAM,MAAM,QAAQ,CAAC;AAEjC,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,mDAAmD,CAAC;AACzF,OAAO,cAAc,MAAM,iBAAiB,CAAC;AAa7C,OAAO,iBAAiB,CAAC;AACzB,OAAO,iBAAiB,CAAC;AACzB,OAAO,iB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cAAc,CAAC,GAAG,yBAAyB,EACvE,iBAAiB,CAAC,EAAE,OAAO,CAAC,OAAO,CAAC;IA+BtC,iBAAiB,CAAC,GAAG,EAAE,MAAM,EAAE,MAAM,EAAE,OAAO,CAAC,OAAO,CAAC;IASvD;;;OAGG;IACG,WAAW,CAAC,QAAQ,EAAE,MAAM;IAoBlC,2BAA2B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW5D,8BAA8B,CAAC,QAAQ,EAAE,CAAC,CAAC,EAAE,SAAS,KAAK,IAAI;;;IAW/D,iBAAiB,CAAC,SAAS,EAAE,SAAS;CAQvC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"getTrimmedAttachmentTitle.d.ts","sourceRoot":"","sources":["../../../src/utils/getTrimmedAttachmentTitle.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,yBAAyB,WAAY,MAAM,WAIvD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "stream-chat-react-native-core",
|
|
3
3
|
"description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
|
|
4
|
-
"version": "5.
|
|
4
|
+
"version": "5.29.0",
|
|
5
5
|
"author": {
|
|
6
6
|
"company": "Stream.io Inc",
|
|
7
7
|
"name": "Stream.io Inc"
|
|
@@ -87,7 +87,11 @@ const AttachmentWithContext = <
|
|
|
87
87
|
);
|
|
88
88
|
}
|
|
89
89
|
|
|
90
|
-
if (
|
|
90
|
+
if (
|
|
91
|
+
attachment.type === 'file' ||
|
|
92
|
+
attachment.type === 'audio' ||
|
|
93
|
+
attachment.type === 'voiceRecording'
|
|
94
|
+
) {
|
|
91
95
|
return <FileAttachment attachment={attachment} />;
|
|
92
96
|
}
|
|
93
97
|
|
|
@@ -117,7 +121,8 @@ const areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = Default
|
|
|
117
121
|
const attachmentEqual =
|
|
118
122
|
prevAttachment.actions?.length === nextAttachment.actions?.length &&
|
|
119
123
|
prevAttachment.image_url === nextAttachment.image_url &&
|
|
120
|
-
prevAttachment.thumb_url === nextAttachment.thumb_url
|
|
124
|
+
prevAttachment.thumb_url === nextAttachment.thumb_url &&
|
|
125
|
+
prevAttachment.type === nextAttachment.type;
|
|
121
126
|
if (!attachmentEqual) return false;
|
|
122
127
|
|
|
123
128
|
if (isAttachmentEqual) {
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
2
|
-
import { I18nManager, StyleSheet, Text,
|
|
1
|
+
import React, { useEffect, useState } from 'react';
|
|
2
|
+
import { I18nManager, Pressable, StyleSheet, Text, View } from 'react-native';
|
|
3
3
|
|
|
4
4
|
import dayjs from 'dayjs';
|
|
5
5
|
import duration from 'dayjs/plugin/duration';
|
|
6
6
|
|
|
7
7
|
import { useTheme } from '../../contexts';
|
|
8
|
-
import { Pause, Play } from '../../icons';
|
|
8
|
+
import { Audio, Pause, Play } from '../../icons';
|
|
9
9
|
import {
|
|
10
10
|
PlaybackStatus,
|
|
11
11
|
Sound,
|
|
@@ -14,85 +14,58 @@ import {
|
|
|
14
14
|
VideoProgressData,
|
|
15
15
|
} from '../../native';
|
|
16
16
|
import type { FileUpload } from '../../types/types';
|
|
17
|
+
import { getTrimmedAttachmentTitle } from '../../utils/getTrimmedAttachmentTitle';
|
|
17
18
|
import { ProgressControl } from '../ProgressControl/ProgressControl';
|
|
19
|
+
import { WaveProgressBar } from '../ProgressControl/WaveProgressBar';
|
|
18
20
|
|
|
19
21
|
dayjs.extend(duration);
|
|
20
22
|
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
const styles = StyleSheet.create({
|
|
24
|
-
fileContainer: {
|
|
25
|
-
borderRadius: 12,
|
|
26
|
-
borderWidth: 1,
|
|
27
|
-
flexDirection: 'row',
|
|
28
|
-
height: FILE_PREVIEW_HEIGHT,
|
|
29
|
-
paddingLeft: 8,
|
|
30
|
-
paddingRight: 8,
|
|
31
|
-
},
|
|
32
|
-
fileContentContainer: { flexDirection: 'row', paddingRight: 40 },
|
|
33
|
-
filenameText: {
|
|
34
|
-
fontSize: 14,
|
|
35
|
-
fontWeight: 'bold',
|
|
36
|
-
paddingLeft: 10,
|
|
37
|
-
},
|
|
38
|
-
fileTextContainer: {
|
|
39
|
-
justifyContent: 'space-around',
|
|
40
|
-
},
|
|
41
|
-
flatList: { marginBottom: 12, maxHeight: FILE_PREVIEW_HEIGHT * 2.5 + 16 },
|
|
42
|
-
overlay: {
|
|
43
|
-
borderRadius: 12,
|
|
44
|
-
marginLeft: 8,
|
|
45
|
-
marginRight: 8,
|
|
46
|
-
},
|
|
47
|
-
progressControlView: {
|
|
48
|
-
flex: 8,
|
|
49
|
-
},
|
|
50
|
-
progressDurationText: {
|
|
51
|
-
flex: 4,
|
|
52
|
-
fontSize: 12,
|
|
53
|
-
paddingLeft: 10,
|
|
54
|
-
paddingRight: 8,
|
|
55
|
-
},
|
|
56
|
-
roundedView: {
|
|
57
|
-
alignItems: 'center',
|
|
58
|
-
alignSelf: 'center',
|
|
59
|
-
borderRadius: 50,
|
|
60
|
-
display: 'flex',
|
|
61
|
-
elevation: 4,
|
|
62
|
-
height: 36,
|
|
63
|
-
justifyContent: 'center',
|
|
64
|
-
shadowOffset: {
|
|
65
|
-
height: 2,
|
|
66
|
-
width: 0,
|
|
67
|
-
},
|
|
68
|
-
shadowOpacity: 0.23,
|
|
69
|
-
shadowRadius: 2.62,
|
|
70
|
-
width: 36,
|
|
71
|
-
},
|
|
72
|
-
});
|
|
73
|
-
|
|
74
|
-
export type AudioAttachmentPropsWithContext = {
|
|
23
|
+
export type AudioAttachmentProps = {
|
|
75
24
|
item: Omit<FileUpload, 'state'>;
|
|
76
25
|
onLoad: (index: string, duration: number) => void;
|
|
77
26
|
onPlayPause: (index: string, pausedStatus?: boolean) => void;
|
|
78
27
|
onProgress: (index: string, currentTime?: number, hasEnd?: boolean) => void;
|
|
28
|
+
hideProgressBar?: boolean;
|
|
29
|
+
showSpeedSettings?: boolean;
|
|
79
30
|
testID?: string;
|
|
80
31
|
};
|
|
81
32
|
|
|
82
|
-
|
|
33
|
+
/**
|
|
34
|
+
* AudioAttachment
|
|
35
|
+
* UI Component to preview the audio files
|
|
36
|
+
*/
|
|
37
|
+
export const AudioAttachment = (props: AudioAttachmentProps) => {
|
|
38
|
+
const [width, setWidth] = useState(0);
|
|
39
|
+
const [currentSpeed, setCurrentSpeed] = useState<number>(1.0);
|
|
83
40
|
const soundRef = React.useRef<SoundReturnType | null>(null);
|
|
84
|
-
const {
|
|
41
|
+
const {
|
|
42
|
+
hideProgressBar = false,
|
|
43
|
+
item,
|
|
44
|
+
onLoad,
|
|
45
|
+
onPlayPause,
|
|
46
|
+
onProgress,
|
|
47
|
+
showSpeedSettings = false,
|
|
48
|
+
testID,
|
|
49
|
+
} = props;
|
|
85
50
|
|
|
51
|
+
/** This is for Native CLI Apps */
|
|
86
52
|
const handleLoad = (payload: VideoPayloadData) => {
|
|
87
|
-
onLoad(item.id, payload.duration);
|
|
53
|
+
onLoad(item.id, item.duration || payload.duration);
|
|
88
54
|
};
|
|
89
55
|
|
|
56
|
+
/** This is for Native CLI Apps */
|
|
90
57
|
const handleProgress = (data: VideoProgressData) => {
|
|
91
|
-
if (data.currentTime
|
|
58
|
+
if (data.currentTime <= data.seekableDuration) {
|
|
92
59
|
onProgress(item.id, data.currentTime);
|
|
93
60
|
}
|
|
94
61
|
};
|
|
95
62
|
|
|
63
|
+
/** This is for Native CLI Apps */
|
|
64
|
+
const handleEnd = () => {
|
|
65
|
+
onPlayPause(item.id, true);
|
|
66
|
+
onProgress(item.id, item.duration, true);
|
|
67
|
+
};
|
|
68
|
+
|
|
96
69
|
const handlePlayPause = async (isPausedStatusAvailable?: boolean) => {
|
|
97
70
|
if (soundRef.current) {
|
|
98
71
|
if (isPausedStatusAvailable === undefined) {
|
|
@@ -103,9 +76,13 @@ const AudioAttachmentWithContext = (props: AudioAttachmentPropsWithContext) => {
|
|
|
103
76
|
if (soundRef.current.setPositionAsync) soundRef.current.setPositionAsync(0);
|
|
104
77
|
}
|
|
105
78
|
if (item.paused) {
|
|
79
|
+
// For expo CLI
|
|
106
80
|
if (soundRef.current.playAsync) await soundRef.current.playAsync();
|
|
81
|
+
if (soundRef.current.setProgressUpdateIntervalAsync)
|
|
82
|
+
await soundRef.current.setProgressUpdateIntervalAsync(60);
|
|
107
83
|
onPlayPause(item.id, false);
|
|
108
84
|
} else {
|
|
85
|
+
// For expo CLI
|
|
109
86
|
if (soundRef.current.pauseAsync) await soundRef.current.pauseAsync();
|
|
110
87
|
onPlayPause(item.id, true);
|
|
111
88
|
}
|
|
@@ -117,17 +94,15 @@ const AudioAttachmentWithContext = (props: AudioAttachmentPropsWithContext) => {
|
|
|
117
94
|
|
|
118
95
|
const handleProgressDrag = async (position: number) => {
|
|
119
96
|
onProgress(item.id, position);
|
|
97
|
+
// For native CLI
|
|
120
98
|
if (soundRef.current?.seek) soundRef.current.seek(position);
|
|
99
|
+
// For expo CLI
|
|
121
100
|
if (soundRef.current?.setPositionAsync) {
|
|
122
101
|
await soundRef.current.setPositionAsync(position * 1000);
|
|
123
102
|
}
|
|
124
103
|
};
|
|
125
104
|
|
|
126
|
-
|
|
127
|
-
onPlayPause(item.id, true);
|
|
128
|
-
onProgress(item.id, item.duration, true);
|
|
129
|
-
};
|
|
130
|
-
|
|
105
|
+
/** For Expo CLI */
|
|
131
106
|
const onPlaybackStatusUpdate = (playbackStatus: PlaybackStatus) => {
|
|
132
107
|
if (!playbackStatus.isLoaded) {
|
|
133
108
|
// Update your UI for the unloaded state
|
|
@@ -136,7 +111,10 @@ const AudioAttachmentWithContext = (props: AudioAttachmentPropsWithContext) => {
|
|
|
136
111
|
}
|
|
137
112
|
} else {
|
|
138
113
|
const { durationMillis, positionMillis } = playbackStatus;
|
|
139
|
-
|
|
114
|
+
// This is done for Expo CLI where we don't get file duration from file picker
|
|
115
|
+
if (item.duration === 0) {
|
|
116
|
+
onLoad(item.id, durationMillis / 1000);
|
|
117
|
+
}
|
|
140
118
|
// Update your UI for the loaded state
|
|
141
119
|
if (playbackStatus.isPlaying) {
|
|
142
120
|
// Update your UI for the playing state
|
|
@@ -187,24 +165,53 @@ const AudioAttachmentWithContext = (props: AudioAttachmentPropsWithContext) => {
|
|
|
187
165
|
if (soundRef.current.pauseAsync) await soundRef.current.pauseAsync();
|
|
188
166
|
} else {
|
|
189
167
|
if (soundRef.current.playAsync) await soundRef.current.playAsync();
|
|
168
|
+
if (soundRef.current.setProgressUpdateIntervalAsync)
|
|
169
|
+
await soundRef.current.setProgressUpdateIntervalAsync(60);
|
|
190
170
|
}
|
|
191
171
|
}
|
|
192
172
|
};
|
|
173
|
+
// For expo CLI
|
|
193
174
|
if (!Sound.Player) {
|
|
194
175
|
initalPlayPause();
|
|
195
176
|
}
|
|
196
177
|
}, [item.paused]);
|
|
197
178
|
|
|
179
|
+
const onSpeedChangeHandler = async () => {
|
|
180
|
+
if (currentSpeed === 2.0) {
|
|
181
|
+
setCurrentSpeed(1.0);
|
|
182
|
+
if (soundRef.current && soundRef.current.setRateAsync) {
|
|
183
|
+
await soundRef.current.setRateAsync(1.0);
|
|
184
|
+
}
|
|
185
|
+
} else {
|
|
186
|
+
if (currentSpeed === 1.0) {
|
|
187
|
+
setCurrentSpeed(1.5);
|
|
188
|
+
if (soundRef.current && soundRef.current.setRateAsync) {
|
|
189
|
+
await soundRef.current.setRateAsync(1.5);
|
|
190
|
+
}
|
|
191
|
+
} else if (currentSpeed === 1.5) {
|
|
192
|
+
setCurrentSpeed(2.0);
|
|
193
|
+
if (soundRef.current && soundRef.current.setRateAsync) {
|
|
194
|
+
await soundRef.current.setRateAsync(2.0);
|
|
195
|
+
}
|
|
196
|
+
}
|
|
197
|
+
}
|
|
198
|
+
};
|
|
199
|
+
|
|
198
200
|
const {
|
|
199
201
|
theme: {
|
|
200
|
-
|
|
202
|
+
audioAttachment: {
|
|
203
|
+
container,
|
|
204
|
+
leftContainer,
|
|
205
|
+
playPauseButton,
|
|
206
|
+
progressControlContainer,
|
|
207
|
+
progressDurationText,
|
|
208
|
+
rightContainer,
|
|
209
|
+
speedChangeButton,
|
|
210
|
+
speedChangeButtonText,
|
|
211
|
+
},
|
|
212
|
+
colors: { accent_blue, black, grey_dark, grey_whisper, static_black, static_white, white },
|
|
201
213
|
messageInput: {
|
|
202
|
-
fileUploadPreview: {
|
|
203
|
-
audioAttachment: { progressControlView, progressDurationText, roundedView },
|
|
204
|
-
fileContentContainer,
|
|
205
|
-
filenameText,
|
|
206
|
-
fileTextContainer,
|
|
207
|
-
},
|
|
214
|
+
fileUploadPreview: { filenameText },
|
|
208
215
|
},
|
|
209
216
|
},
|
|
210
217
|
} = useTheme();
|
|
@@ -215,28 +222,40 @@ const AudioAttachmentWithContext = (props: AudioAttachmentPropsWithContext) => {
|
|
|
215
222
|
? progressValueInSeconds / 3600 >= 1
|
|
216
223
|
? dayjs.duration(progressValueInSeconds, 'second').format('HH:mm:ss')
|
|
217
224
|
: dayjs.duration(progressValueInSeconds, 'second').format('mm:ss')
|
|
218
|
-
: '
|
|
219
|
-
|
|
220
|
-
const lastIndexOfDot = item.file.name.lastIndexOf('.');
|
|
225
|
+
: dayjs.duration(item.duration ?? 0, 'second').format('mm:ss');
|
|
221
226
|
|
|
222
227
|
return (
|
|
223
|
-
<View
|
|
224
|
-
|
|
228
|
+
<View
|
|
229
|
+
accessibilityLabel='audio-attachment-preview'
|
|
230
|
+
onLayout={({ nativeEvent }) => {
|
|
231
|
+
setWidth(nativeEvent.layout.width);
|
|
232
|
+
}}
|
|
233
|
+
style={[
|
|
234
|
+
styles.container,
|
|
235
|
+
{
|
|
236
|
+
backgroundColor: white,
|
|
237
|
+
borderColor: grey_whisper,
|
|
238
|
+
},
|
|
239
|
+
container,
|
|
240
|
+
]}
|
|
241
|
+
testID={testID}
|
|
242
|
+
>
|
|
243
|
+
<Pressable
|
|
225
244
|
accessibilityLabel='Play Pause Button'
|
|
226
245
|
onPress={() => handlePlayPause()}
|
|
227
246
|
style={[
|
|
228
|
-
styles.
|
|
229
|
-
roundedView,
|
|
247
|
+
styles.playPauseButton,
|
|
230
248
|
{ backgroundColor: static_white, shadowColor: black },
|
|
249
|
+
playPauseButton,
|
|
231
250
|
]}
|
|
232
251
|
>
|
|
233
252
|
{item.paused ? (
|
|
234
|
-
<Play
|
|
253
|
+
<Play fill={static_black} height={32} width={32} />
|
|
235
254
|
) : (
|
|
236
|
-
<Pause
|
|
255
|
+
<Pause fill={static_black} height={32} width={32} />
|
|
237
256
|
)}
|
|
238
|
-
</
|
|
239
|
-
<View style={[styles.
|
|
257
|
+
</Pressable>
|
|
258
|
+
<View style={[styles.leftContainer, leftContainer]}>
|
|
240
259
|
<Text
|
|
241
260
|
accessibilityLabel='File Name'
|
|
242
261
|
numberOfLines={1}
|
|
@@ -254,15 +273,9 @@ const AudioAttachmentWithContext = (props: AudioAttachmentPropsWithContext) => {
|
|
|
254
273
|
filenameText,
|
|
255
274
|
]}
|
|
256
275
|
>
|
|
257
|
-
{
|
|
276
|
+
{getTrimmedAttachmentTitle(item.file.name)}
|
|
258
277
|
</Text>
|
|
259
|
-
<View
|
|
260
|
-
style={{
|
|
261
|
-
alignItems: 'center',
|
|
262
|
-
display: 'flex',
|
|
263
|
-
flexDirection: 'row',
|
|
264
|
-
}}
|
|
265
|
-
>
|
|
278
|
+
<View style={styles.audioInfo}>
|
|
266
279
|
{/* <ExpoSoundPlayer filePaused={!!item.paused} soundRef={soundRef} /> */}
|
|
267
280
|
{Sound.Player && (
|
|
268
281
|
<Sound.Player
|
|
@@ -270,6 +283,7 @@ const AudioAttachmentWithContext = (props: AudioAttachmentPropsWithContext) => {
|
|
|
270
283
|
onLoad={handleLoad}
|
|
271
284
|
onProgress={handleProgress}
|
|
272
285
|
paused={item.paused as boolean}
|
|
286
|
+
rate={currentSpeed}
|
|
273
287
|
soundRef={soundRef}
|
|
274
288
|
testID='sound-player'
|
|
275
289
|
uri={item.file.uri}
|
|
@@ -278,37 +292,127 @@ const AudioAttachmentWithContext = (props: AudioAttachmentPropsWithContext) => {
|
|
|
278
292
|
<Text style={[styles.progressDurationText, { color: grey_dark }, progressDurationText]}>
|
|
279
293
|
{progressDuration}
|
|
280
294
|
</Text>
|
|
281
|
-
|
|
282
|
-
<
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
295
|
+
{!hideProgressBar && (
|
|
296
|
+
<View style={[styles.progressControlContainer, progressControlContainer]}>
|
|
297
|
+
{item.file.waveform_data ? (
|
|
298
|
+
<WaveProgressBar
|
|
299
|
+
amplitudesCount={35}
|
|
300
|
+
onPlayPause={handlePlayPause}
|
|
301
|
+
onProgressDrag={(position) => {
|
|
302
|
+
if (item.file.waveform_data) {
|
|
303
|
+
const progress = (position / 30) * (item.duration as number);
|
|
304
|
+
handleProgressDrag(progress);
|
|
305
|
+
}
|
|
306
|
+
}}
|
|
307
|
+
progress={item.progress as number}
|
|
308
|
+
waveformData={item.file.waveform_data}
|
|
309
|
+
/>
|
|
310
|
+
) : (
|
|
311
|
+
<ProgressControl
|
|
312
|
+
duration={item.duration as number}
|
|
313
|
+
filledColor={accent_blue}
|
|
314
|
+
onPlayPause={handlePlayPause}
|
|
315
|
+
onProgressDrag={handleProgressDrag}
|
|
316
|
+
progress={item.progress as number}
|
|
317
|
+
testID='progress-control'
|
|
318
|
+
width={width / 2}
|
|
319
|
+
/>
|
|
320
|
+
)}
|
|
321
|
+
</View>
|
|
322
|
+
)}
|
|
292
323
|
</View>
|
|
293
324
|
</View>
|
|
325
|
+
{showSpeedSettings && (
|
|
326
|
+
<View style={[styles.rightContainer, rightContainer]}>
|
|
327
|
+
{item.progress === 0 || item.progress === 1 ? (
|
|
328
|
+
<Audio fill={'#ffffff'} />
|
|
329
|
+
) : (
|
|
330
|
+
<Pressable
|
|
331
|
+
onPress={onSpeedChangeHandler}
|
|
332
|
+
style={[
|
|
333
|
+
styles.speedChangeButton,
|
|
334
|
+
{ backgroundColor: static_white, shadowColor: black },
|
|
335
|
+
speedChangeButton,
|
|
336
|
+
]}
|
|
337
|
+
>
|
|
338
|
+
<Text
|
|
339
|
+
style={[styles.speedChangeButtonText, speedChangeButtonText]}
|
|
340
|
+
>{`x${currentSpeed}`}</Text>
|
|
341
|
+
</Pressable>
|
|
342
|
+
)}
|
|
343
|
+
</View>
|
|
344
|
+
)}
|
|
294
345
|
</View>
|
|
295
346
|
);
|
|
296
347
|
};
|
|
297
348
|
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
|
|
349
|
+
const styles = StyleSheet.create({
|
|
350
|
+
audioInfo: {
|
|
351
|
+
alignItems: 'center',
|
|
352
|
+
display: 'flex',
|
|
353
|
+
flexDirection: 'row',
|
|
354
|
+
},
|
|
355
|
+
container: {
|
|
356
|
+
alignItems: 'center',
|
|
357
|
+
borderRadius: 12,
|
|
358
|
+
borderWidth: 1,
|
|
359
|
+
flexDirection: 'row',
|
|
360
|
+
paddingHorizontal: 8,
|
|
361
|
+
paddingVertical: 12,
|
|
362
|
+
},
|
|
363
|
+
filenameText: {
|
|
364
|
+
fontSize: 14,
|
|
365
|
+
fontWeight: 'bold',
|
|
366
|
+
paddingBottom: 12,
|
|
367
|
+
paddingLeft: 8,
|
|
368
|
+
},
|
|
369
|
+
leftContainer: {
|
|
370
|
+
justifyContent: 'space-around',
|
|
371
|
+
},
|
|
372
|
+
playPauseButton: {
|
|
373
|
+
alignItems: 'center',
|
|
374
|
+
alignSelf: 'center',
|
|
375
|
+
borderRadius: 50,
|
|
376
|
+
display: 'flex',
|
|
377
|
+
elevation: 4,
|
|
378
|
+
justifyContent: 'center',
|
|
379
|
+
paddingVertical: 2,
|
|
380
|
+
shadowOffset: {
|
|
381
|
+
height: 2,
|
|
382
|
+
width: 0,
|
|
383
|
+
},
|
|
384
|
+
shadowOpacity: 0.23,
|
|
385
|
+
shadowRadius: 2.62,
|
|
386
|
+
width: 36,
|
|
387
|
+
},
|
|
388
|
+
progressControlContainer: {},
|
|
389
|
+
progressDurationText: {
|
|
390
|
+
fontSize: 12,
|
|
391
|
+
paddingLeft: 10,
|
|
392
|
+
paddingRight: 8,
|
|
393
|
+
},
|
|
394
|
+
rightContainer: {
|
|
395
|
+
marginLeft: 10,
|
|
396
|
+
},
|
|
397
|
+
speedChangeButton: {
|
|
398
|
+
alignItems: 'center',
|
|
399
|
+
alignSelf: 'center',
|
|
400
|
+
borderRadius: 50,
|
|
401
|
+
elevation: 4,
|
|
402
|
+
justifyContent: 'center',
|
|
403
|
+
paddingVertical: 5,
|
|
404
|
+
shadowOffset: {
|
|
405
|
+
height: 2,
|
|
406
|
+
width: 0,
|
|
407
|
+
},
|
|
408
|
+
shadowOpacity: 0.23,
|
|
409
|
+
shadowRadius: 2.62,
|
|
410
|
+
width: 36,
|
|
411
|
+
},
|
|
412
|
+
speedChangeButtonText: {
|
|
413
|
+
fontSize: 12,
|
|
414
|
+
fontWeight: '500',
|
|
415
|
+
},
|
|
416
|
+
});
|
|
313
417
|
|
|
314
418
|
AudioAttachment.displayName = 'AudioAttachment{messageInput{audioAttachment}}';
|