stream-chat-react-native-core 10.0.0-rc.2 → 10.0.0-rc.4
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/ai-components/README.md +50 -2
- package/lib/commonjs/ai-components/index.js +24 -0
- package/lib/commonjs/ai-components/index.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/ComposerView.js +4 -2
- package/lib/commonjs/ai-components/message-composer/ComposerView.js.map +1 -1
- package/lib/commonjs/ai-components/message-composer/SpeechToTextButton.js +4 -1
- package/lib/commonjs/ai-components/message-composer/SpeechToTextButton.js.map +1 -1
- package/lib/commonjs/ai-components/native/AIDictation.js +6 -0
- package/lib/commonjs/ai-components/native/AIDictation.js.map +1 -1
- package/lib/commonjs/ai-components/store/dictation/store.js +4 -2
- package/lib/commonjs/ai-components/store/dictation/store.js.map +1 -1
- package/lib/commonjs/ai-components/store/dictation/useDictationState.js +4 -2
- package/lib/commonjs/ai-components/store/dictation/useDictationState.js.map +1 -1
- package/lib/commonjs/ai-components/store/index.js +22 -0
- package/lib/commonjs/ai-components/store/index.js.map +1 -1
- package/lib/commonjs/ai-components/theme.js +3 -0
- package/lib/commonjs/ai-components/theme.js.map +1 -1
- package/lib/commonjs/ai-components/transcription/useDictation.js +7 -3
- package/lib/commonjs/ai-components/transcription/useDictation.js.map +1 -1
- package/lib/commonjs/ai-components/transcription/useDictationAudioLevel.js +32 -0
- package/lib/commonjs/ai-components/transcription/useDictationAudioLevel.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/VoiceGlow.js +79 -0
- package/lib/commonjs/ai-components/voice-visualization/VoiceGlow.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/VoiceVisualizationView.js +147 -0
- package/lib/commonjs/ai-components/voice-visualization/VoiceVisualizationView.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/VoiceWave.js +58 -0
- package/lib/commonjs/ai-components/voice-visualization/VoiceWave.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/bounce.js +60 -0
- package/lib/commonjs/ai-components/voice-visualization/bounce.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/driver.js +208 -0
- package/lib/commonjs/ai-components/voice-visualization/driver.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/glowShader.js +218 -0
- package/lib/commonjs/ai-components/voice-visualization/glowShader.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/index.js +18 -0
- package/lib/commonjs/ai-components/voice-visualization/index.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/math.js +70 -0
- package/lib/commonjs/ai-components/voice-visualization/math.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/palette.js +47 -0
- package/lib/commonjs/ai-components/voice-visualization/palette.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/simplex.js +77 -0
- package/lib/commonjs/ai-components/voice-visualization/simplex.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/styles.js +33 -0
- package/lib/commonjs/ai-components/voice-visualization/styles.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/types.js +4 -0
- package/lib/commonjs/ai-components/voice-visualization/types.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/useReduceMotion.js +28 -0
- package/lib/commonjs/ai-components/voice-visualization/useReduceMotion.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/useVoiceVisualization.js +129 -0
- package/lib/commonjs/ai-components/voice-visualization/useVoiceVisualization.js.map +1 -0
- package/lib/commonjs/ai-components/voice-visualization/waveGeometry.js +124 -0
- package/lib/commonjs/ai-components/voice-visualization/waveGeometry.js.map +1 -0
- package/lib/commonjs/components/Channel/Channel.js +1 -0
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/ChannelShell.js +8 -1
- package/lib/commonjs/components/Channel/ChannelShell.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useChannelLifecycle.js +2 -1
- package/lib/commonjs/components/Channel/hooks/useChannelLifecycle.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useJumpToLatestOnOpen.js +26 -0
- package/lib/commonjs/components/Channel/hooks/useJumpToLatestOnOpen.js.map +1 -0
- package/lib/commonjs/components/ChannelDetails/components/members/ChannelMemberItem.js +1 -1
- package/lib/commonjs/components/ChannelDetails/components/members/ChannelMemberItem.js.map +1 -1
- package/lib/commonjs/components/ChannelDetails/hooks/useChannelDetailsMemberStatusText.js +1 -1
- package/lib/commonjs/components/ChannelDetails/hooks/useChannelDetailsMemberStatusText.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListView.js +0 -2
- package/lib/commonjs/components/ChannelList/ChannelListView.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +2 -2
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelLastMessagePreview.js +1 -0
- package/lib/commonjs/components/ChannelPreview/ChannelLastMessagePreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js +2 -0
- package/lib/commonjs/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +1 -0
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewData.js +5 -5
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewData.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewPollLabel.js +4 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewPollLabel.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useConnectionLifecycle.js +6 -2
- package/lib/commonjs/components/Chat/hooks/useConnectionLifecycle.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js +5 -0
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.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/MessageItemView/MessageStatus.js +4 -0
- package/lib/commonjs/components/Message/MessageItemView/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/MessageItemView/MessageWrapper.js +7 -4
- package/lib/commonjs/components/Message/MessageItemView/MessageWrapper.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageActionHandlers.js +3 -3
- package/lib/commonjs/components/Message/hooks/useCreateMessageActionHandlers.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useProcessReactions.js +2 -2
- package/lib/commonjs/components/Message/hooks/useProcessReactions.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useUserMuteActive.js +1 -1
- package/lib/commonjs/components/Message/hooks/useUserMuteActive.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageComposer.js +2 -1
- package/lib/commonjs/components/MessageInput/MessageComposer.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageFlashList.js +2 -2
- package/lib/commonjs/components/MessageList/MessageFlashList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +2 -2
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useOwnUnreadCount.js +1 -1
- package/lib/commonjs/components/MessageList/hooks/useOwnUnreadCount.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/hooks/useMessageOwnReactions.js +2 -2
- package/lib/commonjs/components/MessageMenu/hooks/useMessageOwnReactions.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollAnswersList.js +1 -1
- package/lib/commonjs/components/Poll/components/PollAnswersList.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollButtons.js +1 -1
- package/lib/commonjs/components/Poll/components/PollButtons.js.map +1 -1
- package/lib/commonjs/components/Poll/hook/useIsPollCreatedByCurrentUser.js +1 -1
- package/lib/commonjs/components/Poll/hook/useIsPollCreatedByCurrentUser.js.map +1 -1
- package/lib/commonjs/components/Thread/Thread.js +1 -1
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/components/ThreadList/ThreadListItem.js +1 -1
- package/lib/commonjs/components/ThreadList/ThreadListItem.js.map +1 -1
- package/lib/commonjs/components/ThreadList/ThreadListUnreadBanner.js +9 -2
- package/lib/commonjs/components/ThreadList/ThreadListUnreadBanner.js.map +1 -1
- package/lib/commonjs/components/index.js +36 -0
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/componentsContext/defaultComponents.js +0 -2
- package/lib/commonjs/contexts/componentsContext/defaultComponents.js.map +1 -1
- package/lib/commonjs/contexts/liveLocationManagerContext/LiveLocationManagerContext.js +1 -1
- package/lib/commonjs/contexts/liveLocationManagerContext/LiveLocationManagerContext.js.map +1 -1
- package/lib/commonjs/hooks/actions/useChannelActionItems.js +1 -1
- package/lib/commonjs/hooks/actions/useChannelActionItems.js.map +1 -1
- package/lib/commonjs/hooks/actions/useChannelActions.js +2 -2
- package/lib/commonjs/hooks/actions/useChannelActions.js.map +1 -1
- package/lib/commonjs/hooks/actions/useChannelMemberActionItems.js +1 -1
- package/lib/commonjs/hooks/actions/useChannelMemberActionItems.js.map +1 -1
- package/lib/commonjs/hooks/index.js +11 -0
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/messagePreview/useMessageDeliveryStatus.js +6 -6
- package/lib/commonjs/hooks/messagePreview/useMessageDeliveryStatus.js.map +1 -1
- package/lib/commonjs/hooks/useIsDirectChat.js +1 -1
- package/lib/commonjs/hooks/useIsDirectChat.js.map +1 -1
- package/lib/commonjs/i18n/runtimeDefaults.js +1 -0
- package/lib/commonjs/i18n/runtimeDefaults.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelMessages.js +5 -3
- package/lib/commonjs/store/apis/getChannelMessages.js.map +1 -1
- package/lib/commonjs/store/apis/getChannels.js +6 -3
- package/lib/commonjs/store/apis/getChannels.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js +2 -1
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js +7 -5
- package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js.map +1 -1
- package/lib/commonjs/utils/installNativeMultipartAdapter.js.map +1 -1
- package/lib/commonjs/utils/setupCommandUIMiddlewares.js +6 -3
- package/lib/commonjs/utils/setupCommandUIMiddlewares.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/ai-components/README.md +50 -2
- package/lib/module/ai-components/index.js +24 -0
- package/lib/module/ai-components/index.js.map +1 -1
- package/lib/module/ai-components/message-composer/ComposerView.js +4 -2
- package/lib/module/ai-components/message-composer/ComposerView.js.map +1 -1
- package/lib/module/ai-components/message-composer/SpeechToTextButton.js +4 -1
- package/lib/module/ai-components/message-composer/SpeechToTextButton.js.map +1 -1
- package/lib/module/ai-components/native/AIDictation.js +6 -0
- package/lib/module/ai-components/native/AIDictation.js.map +1 -1
- package/lib/module/ai-components/store/dictation/store.js +4 -2
- package/lib/module/ai-components/store/dictation/store.js.map +1 -1
- package/lib/module/ai-components/store/dictation/useDictationState.js +4 -2
- package/lib/module/ai-components/store/dictation/useDictationState.js.map +1 -1
- package/lib/module/ai-components/store/index.js +22 -0
- package/lib/module/ai-components/store/index.js.map +1 -1
- package/lib/module/ai-components/theme.js +3 -0
- package/lib/module/ai-components/theme.js.map +1 -1
- package/lib/module/ai-components/transcription/useDictation.js +7 -3
- package/lib/module/ai-components/transcription/useDictation.js.map +1 -1
- package/lib/module/ai-components/transcription/useDictationAudioLevel.js +32 -0
- package/lib/module/ai-components/transcription/useDictationAudioLevel.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/VoiceGlow.js +79 -0
- package/lib/module/ai-components/voice-visualization/VoiceGlow.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/VoiceVisualizationView.js +147 -0
- package/lib/module/ai-components/voice-visualization/VoiceVisualizationView.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/VoiceWave.js +58 -0
- package/lib/module/ai-components/voice-visualization/VoiceWave.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/bounce.js +60 -0
- package/lib/module/ai-components/voice-visualization/bounce.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/driver.js +208 -0
- package/lib/module/ai-components/voice-visualization/driver.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/glowShader.js +218 -0
- package/lib/module/ai-components/voice-visualization/glowShader.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/index.js +18 -0
- package/lib/module/ai-components/voice-visualization/index.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/math.js +70 -0
- package/lib/module/ai-components/voice-visualization/math.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/palette.js +47 -0
- package/lib/module/ai-components/voice-visualization/palette.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/simplex.js +77 -0
- package/lib/module/ai-components/voice-visualization/simplex.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/styles.js +33 -0
- package/lib/module/ai-components/voice-visualization/styles.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/types.js +4 -0
- package/lib/module/ai-components/voice-visualization/types.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/useReduceMotion.js +28 -0
- package/lib/module/ai-components/voice-visualization/useReduceMotion.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/useVoiceVisualization.js +129 -0
- package/lib/module/ai-components/voice-visualization/useVoiceVisualization.js.map +1 -0
- package/lib/module/ai-components/voice-visualization/waveGeometry.js +124 -0
- package/lib/module/ai-components/voice-visualization/waveGeometry.js.map +1 -0
- package/lib/module/components/Channel/Channel.js +1 -0
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/ChannelShell.js +8 -1
- package/lib/module/components/Channel/ChannelShell.js.map +1 -1
- package/lib/module/components/Channel/hooks/useChannelLifecycle.js +2 -1
- package/lib/module/components/Channel/hooks/useChannelLifecycle.js.map +1 -1
- package/lib/module/components/Channel/hooks/useJumpToLatestOnOpen.js +26 -0
- package/lib/module/components/Channel/hooks/useJumpToLatestOnOpen.js.map +1 -0
- package/lib/module/components/ChannelDetails/components/members/ChannelMemberItem.js +1 -1
- package/lib/module/components/ChannelDetails/components/members/ChannelMemberItem.js.map +1 -1
- package/lib/module/components/ChannelDetails/hooks/useChannelDetailsMemberStatusText.js +1 -1
- package/lib/module/components/ChannelDetails/hooks/useChannelDetailsMemberStatusText.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListView.js +0 -2
- package/lib/module/components/ChannelList/ChannelListView.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +2 -2
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelLastMessagePreview.js +1 -0
- package/lib/module/components/ChannelPreview/ChannelLastMessagePreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js +2 -0
- package/lib/module/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +1 -0
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewView.js +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewData.js +5 -5
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewData.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewPollLabel.js +4 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewPollLabel.js.map +1 -1
- package/lib/module/components/Chat/hooks/useConnectionLifecycle.js +6 -2
- package/lib/module/components/Chat/hooks/useConnectionLifecycle.js.map +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js +5 -0
- package/lib/module/components/Indicators/LoadingErrorIndicator.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/MessageItemView/MessageStatus.js +4 -0
- package/lib/module/components/Message/MessageItemView/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/MessageItemView/MessageWrapper.js +7 -4
- package/lib/module/components/Message/MessageItemView/MessageWrapper.js.map +1 -1
- package/lib/module/components/Message/hooks/useCreateMessageActionHandlers.js +3 -3
- package/lib/module/components/Message/hooks/useCreateMessageActionHandlers.js.map +1 -1
- package/lib/module/components/Message/hooks/useProcessReactions.js +2 -2
- package/lib/module/components/Message/hooks/useProcessReactions.js.map +1 -1
- package/lib/module/components/Message/hooks/useUserMuteActive.js +1 -1
- package/lib/module/components/Message/hooks/useUserMuteActive.js.map +1 -1
- package/lib/module/components/MessageInput/MessageComposer.js +2 -1
- package/lib/module/components/MessageInput/MessageComposer.js.map +1 -1
- package/lib/module/components/MessageList/MessageFlashList.js +2 -2
- package/lib/module/components/MessageList/MessageFlashList.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +2 -2
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useOwnUnreadCount.js +1 -1
- package/lib/module/components/MessageList/hooks/useOwnUnreadCount.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js.map +1 -1
- package/lib/module/components/MessageMenu/hooks/useMessageOwnReactions.js +2 -2
- package/lib/module/components/MessageMenu/hooks/useMessageOwnReactions.js.map +1 -1
- package/lib/module/components/Poll/components/PollAnswersList.js +1 -1
- package/lib/module/components/Poll/components/PollAnswersList.js.map +1 -1
- package/lib/module/components/Poll/components/PollButtons.js +1 -1
- package/lib/module/components/Poll/components/PollButtons.js.map +1 -1
- package/lib/module/components/Poll/hook/useIsPollCreatedByCurrentUser.js +1 -1
- package/lib/module/components/Poll/hook/useIsPollCreatedByCurrentUser.js.map +1 -1
- package/lib/module/components/Thread/Thread.js +1 -1
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/components/ThreadList/ThreadListItem.js +1 -1
- package/lib/module/components/ThreadList/ThreadListItem.js.map +1 -1
- package/lib/module/components/ThreadList/ThreadListUnreadBanner.js +9 -2
- package/lib/module/components/ThreadList/ThreadListUnreadBanner.js.map +1 -1
- package/lib/module/components/index.js +36 -0
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/componentsContext/defaultComponents.js +0 -2
- package/lib/module/contexts/componentsContext/defaultComponents.js.map +1 -1
- package/lib/module/contexts/liveLocationManagerContext/LiveLocationManagerContext.js +1 -1
- package/lib/module/contexts/liveLocationManagerContext/LiveLocationManagerContext.js.map +1 -1
- package/lib/module/hooks/actions/useChannelActionItems.js +1 -1
- package/lib/module/hooks/actions/useChannelActionItems.js.map +1 -1
- package/lib/module/hooks/actions/useChannelActions.js +2 -2
- package/lib/module/hooks/actions/useChannelActions.js.map +1 -1
- package/lib/module/hooks/actions/useChannelMemberActionItems.js +1 -1
- package/lib/module/hooks/actions/useChannelMemberActionItems.js.map +1 -1
- package/lib/module/hooks/index.js +11 -0
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/messagePreview/useMessageDeliveryStatus.js +6 -6
- package/lib/module/hooks/messagePreview/useMessageDeliveryStatus.js.map +1 -1
- package/lib/module/hooks/useIsDirectChat.js +1 -1
- package/lib/module/hooks/useIsDirectChat.js.map +1 -1
- package/lib/module/i18n/runtimeDefaults.js +1 -0
- package/lib/module/i18n/runtimeDefaults.js.map +1 -1
- package/lib/module/store/apis/getChannelMessages.js +5 -3
- package/lib/module/store/apis/getChannelMessages.js.map +1 -1
- package/lib/module/store/apis/getChannels.js +6 -3
- package/lib/module/store/apis/getChannels.js.map +1 -1
- package/lib/module/store/apis/getChannelsForFilterSort.js +2 -1
- package/lib/module/store/apis/getChannelsForFilterSort.js.map +1 -1
- package/lib/module/store/apis/queries/selectMessagesForChannels.js +7 -5
- package/lib/module/store/apis/queries/selectMessagesForChannels.js.map +1 -1
- package/lib/module/utils/installNativeMultipartAdapter.js.map +1 -1
- package/lib/module/utils/setupCommandUIMiddlewares.js +6 -3
- package/lib/module/utils/setupCommandUIMiddlewares.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/ai-components/index.d.ts +3 -1
- package/lib/typescript/ai-components/index.d.ts.map +1 -1
- package/lib/typescript/ai-components/message-composer/ComposerView.d.ts.map +1 -1
- package/lib/typescript/ai-components/native/AIDictation.d.ts +6 -0
- package/lib/typescript/ai-components/native/AIDictation.d.ts.map +1 -1
- package/lib/typescript/ai-components/store/dictation/store.d.ts +7 -0
- package/lib/typescript/ai-components/store/dictation/store.d.ts.map +1 -1
- package/lib/typescript/ai-components/store/dictation/useDictationState.d.ts +1 -0
- package/lib/typescript/ai-components/store/dictation/useDictationState.d.ts.map +1 -1
- package/lib/typescript/ai-components/store/index.d.ts +2 -0
- package/lib/typescript/ai-components/store/index.d.ts.map +1 -1
- package/lib/typescript/ai-components/theme.d.ts +13 -0
- package/lib/typescript/ai-components/theme.d.ts.map +1 -1
- package/lib/typescript/ai-components/transcription/useDictation.d.ts +9 -1
- package/lib/typescript/ai-components/transcription/useDictation.d.ts.map +1 -1
- package/lib/typescript/ai-components/transcription/useDictationAudioLevel.d.ts +11 -0
- package/lib/typescript/ai-components/transcription/useDictationAudioLevel.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/VoiceGlow.d.ts +13 -0
- package/lib/typescript/ai-components/voice-visualization/VoiceGlow.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/VoiceVisualizationView.d.ts +26 -0
- package/lib/typescript/ai-components/voice-visualization/VoiceVisualizationView.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/VoiceWave.d.ts +13 -0
- package/lib/typescript/ai-components/voice-visualization/VoiceWave.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/bounce.d.ts +20 -0
- package/lib/typescript/ai-components/voice-visualization/bounce.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/driver.d.ts +96 -0
- package/lib/typescript/ai-components/voice-visualization/driver.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/glowShader.d.ts +7 -0
- package/lib/typescript/ai-components/voice-visualization/glowShader.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/index.d.ts +4 -0
- package/lib/typescript/ai-components/voice-visualization/index.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/math.d.ts +26 -0
- package/lib/typescript/ai-components/voice-visualization/math.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/palette.d.ts +18 -0
- package/lib/typescript/ai-components/voice-visualization/palette.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/simplex.d.ts +11 -0
- package/lib/typescript/ai-components/voice-visualization/simplex.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/styles.d.ts +24 -0
- package/lib/typescript/ai-components/voice-visualization/styles.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/types.d.ts +45 -0
- package/lib/typescript/ai-components/voice-visualization/types.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/useReduceMotion.d.ts +10 -0
- package/lib/typescript/ai-components/voice-visualization/useReduceMotion.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/useVoiceVisualization.d.ts +18 -0
- package/lib/typescript/ai-components/voice-visualization/useVoiceVisualization.d.ts.map +1 -0
- package/lib/typescript/ai-components/voice-visualization/waveGeometry.d.ts +25 -0
- package/lib/typescript/ai-components/voice-visualization/waveGeometry.d.ts.map +1 -0
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/ChannelShell.d.ts +2 -0
- package/lib/typescript/components/Channel/ChannelShell.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useChannelLifecycle.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useJumpToLatestOnOpen.d.ts +15 -0
- package/lib/typescript/components/Channel/hooks/useJumpToLatestOnOpen.d.ts.map +1 -0
- package/lib/typescript/components/ChannelList/ChannelListView.d.ts +1 -1
- package/lib/typescript/components/ChannelList/ChannelListView.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewData.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useConnectionLifecycle.d.ts +5 -4
- package/lib/typescript/components/Chat/hooks/useConnectionLifecycle.d.ts.map +1 -1
- package/lib/typescript/components/Indicators/LoadingErrorIndicator.d.ts +1 -1
- package/lib/typescript/components/Indicators/LoadingErrorIndicator.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageStatus.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageItemView/MessageWrapper.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/MessageComposer.d.ts.map +1 -1
- package/lib/typescript/components/ThreadList/ThreadListUnreadBanner.d.ts.map +1 -1
- package/lib/typescript/components/index.d.ts +3 -0
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/contexts/componentsContext/defaultComponents.d.ts +0 -1
- package/lib/typescript/contexts/componentsContext/defaultComponents.d.ts.map +1 -1
- package/lib/typescript/hooks/index.d.ts +1 -0
- package/lib/typescript/hooks/index.d.ts.map +1 -1
- package/lib/typescript/hooks/messagePreview/useMessageDeliveryStatus.d.ts +3 -0
- package/lib/typescript/hooks/messagePreview/useMessageDeliveryStatus.d.ts.map +1 -1
- package/lib/typescript/i18n/keys.d.ts +3 -1
- package/lib/typescript/i18n/keys.d.ts.map +1 -1
- package/lib/typescript/i18n/runtimeDefaults.d.ts +1 -0
- package/lib/typescript/i18n/runtimeDefaults.d.ts.map +1 -1
- package/lib/typescript/store/apis/getChannelMessages.d.ts +2 -1
- package/lib/typescript/store/apis/getChannelMessages.d.ts.map +1 -1
- package/lib/typescript/store/apis/getChannels.d.ts +3 -1
- package/lib/typescript/store/apis/getChannels.d.ts.map +1 -1
- package/lib/typescript/store/apis/getChannelsForFilterSort.d.ts.map +1 -1
- package/lib/typescript/store/apis/queries/selectMessagesForChannels.d.ts +3 -1
- package/lib/typescript/store/apis/queries/selectMessagesForChannels.d.ts.map +1 -1
- package/lib/typescript/utils/installNativeMultipartAdapter.d.ts +5 -3
- package/lib/typescript/utils/installNativeMultipartAdapter.d.ts.map +1 -1
- package/lib/typescript/utils/setupCommandUIMiddlewares.d.ts.map +1 -1
- package/package.json +4 -4
- package/src/__tests__/offline-support/offline-feature.tsx +7 -7
- package/src/__tests__/offline-support/optimistic-update.tsx +5 -5
- package/src/ai-components/README.md +50 -2
- package/src/ai-components/__tests__/VoiceVisualization.test.tsx +208 -0
- package/src/ai-components/__tests__/dictation.test.tsx +58 -1
- package/src/ai-components/__tests__/voiceDriver.test.ts +317 -0
- package/src/ai-components/__tests__/voicePalette.test.ts +124 -0
- package/src/ai-components/index.ts +3 -1
- package/src/ai-components/message-composer/ComposerView.tsx +6 -3
- package/src/ai-components/message-composer/SpeechToTextButton.tsx +5 -2
- package/src/ai-components/native/AIDictation.ts +11 -0
- package/src/ai-components/store/dictation/store.ts +9 -0
- package/src/ai-components/store/dictation/useDictationState.ts +2 -1
- package/src/ai-components/store/index.ts +2 -0
- package/src/ai-components/theme.ts +16 -0
- package/src/ai-components/transcription/useDictation.ts +16 -3
- package/src/ai-components/transcription/useDictationAudioLevel.ts +38 -0
- package/src/ai-components/voice-visualization/VoiceGlow.tsx +79 -0
- package/src/ai-components/voice-visualization/VoiceVisualizationView.tsx +179 -0
- package/src/ai-components/voice-visualization/VoiceWave.tsx +67 -0
- package/src/ai-components/voice-visualization/bounce.ts +61 -0
- package/src/ai-components/voice-visualization/driver.ts +240 -0
- package/src/ai-components/voice-visualization/glowShader.ts +227 -0
- package/src/ai-components/voice-visualization/index.ts +3 -0
- package/src/ai-components/voice-visualization/math.ts +73 -0
- package/src/ai-components/voice-visualization/palette.ts +59 -0
- package/src/ai-components/voice-visualization/simplex.ts +92 -0
- package/src/ai-components/voice-visualization/styles.ts +42 -0
- package/src/ai-components/voice-visualization/types.ts +44 -0
- package/src/ai-components/voice-visualization/useReduceMotion.ts +34 -0
- package/src/ai-components/voice-visualization/useVoiceVisualization.ts +153 -0
- package/src/ai-components/voice-visualization/waveGeometry.ts +137 -0
- package/src/components/Channel/Channel.tsx +1 -0
- package/src/components/Channel/ChannelShell.tsx +12 -0
- package/src/components/Channel/__tests__/Channel.test.tsx +146 -5
- package/src/components/Channel/hooks/useChannelLifecycle.ts +4 -1
- package/src/components/Channel/hooks/useJumpToLatestOnOpen.ts +42 -0
- package/src/components/ChannelDetails/__tests__/ChannelDetails.test.tsx +1 -1
- package/src/components/ChannelDetails/__tests__/ChannelDetailsActionsSection.test.tsx +1 -1
- package/src/components/ChannelDetails/__tests__/ChannelDetailsEditButton.test.tsx +1 -1
- package/src/components/ChannelDetails/__tests__/ChannelDetailsMemberSection.test.tsx +1 -1
- package/src/components/ChannelDetails/__tests__/ChannelDetailsNavHeader.test.tsx +1 -1
- package/src/components/ChannelDetails/__tests__/ChannelDetailsProfile.test.tsx +2 -2
- package/src/components/ChannelDetails/__tests__/ChannelEditDetailsForm.test.tsx +1 -1
- package/src/components/ChannelDetails/__tests__/ChannelEditDetailsFormContent.test.tsx +2 -2
- package/src/components/ChannelDetails/__tests__/ChannelEditName.test.tsx +1 -1
- package/src/components/ChannelDetails/__tests__/members/ChannelAddMembersForm.test.tsx +1 -1
- package/src/components/ChannelDetails/__tests__/members/ChannelMemberActionsSheet.test.tsx +2 -2
- package/src/components/ChannelDetails/__tests__/members/ChannelMemberItem.test.tsx +1 -1
- package/src/components/ChannelDetails/__tests__/useChannelDetailsMemberStatusText.test.tsx +1 -1
- package/src/components/ChannelDetails/components/members/ChannelMemberItem.tsx +1 -1
- package/src/components/ChannelDetails/hooks/useChannelDetailsMemberStatusText.ts +1 -1
- package/src/components/ChannelList/ChannelListView.tsx +1 -3
- package/src/components/ChannelList/__tests__/ChannelList.test.tsx +72 -0
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +2 -2
- package/src/components/ChannelPreview/ChannelDetailsBottomSheet.tsx +1 -1
- package/src/components/ChannelPreview/ChannelLastMessagePreview.tsx +1 -1
- package/src/components/ChannelPreview/ChannelMessagePreviewDeliveryStatus.tsx +8 -2
- package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +1 -1
- package/src/components/ChannelPreview/ChannelPreviewView.tsx +1 -1
- package/src/components/ChannelPreview/__tests__/ChannelPreview.test.tsx +4 -4
- package/src/components/ChannelPreview/__tests__/ChannelPreviewView.test.tsx +40 -0
- package/src/components/ChannelPreview/hooks/__tests__/useChannelPreviewData.test.tsx +51 -0
- package/src/components/ChannelPreview/hooks/__tests__/useChannelPreviewDisplayName.test.tsx +1 -1
- package/src/components/ChannelPreview/hooks/__tests__/useChannelPreviewDisplayPresence.test.tsx +1 -1
- package/src/components/ChannelPreview/hooks/__tests__/useChannelPreviewPollLabel.test.tsx +87 -0
- package/src/components/ChannelPreview/hooks/useChannelPreviewData.ts +3 -4
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +1 -1
- package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +1 -1
- package/src/components/ChannelPreview/hooks/useChannelPreviewPollLabel.ts +1 -1
- package/src/components/Chat/__tests__/Chat.test.tsx +31 -1
- package/src/components/Chat/hooks/useConnectionLifecycle.ts +12 -6
- package/src/components/Indicators/LoadingErrorIndicator.tsx +8 -1
- package/src/components/Message/Message.tsx +1 -1
- package/src/components/Message/MessageItemView/MessageStatus.tsx +16 -2
- package/src/components/Message/MessageItemView/MessageWrapper.tsx +14 -4
- package/src/components/Message/MessageItemView/__tests__/MessageStatus.test.tsx +21 -0
- package/src/components/Message/hooks/__tests__/useCreateMessageActionHandlers.test.tsx +1 -1
- package/src/components/Message/hooks/__tests__/useUserMuteActive.test.tsx +1 -1
- package/src/components/Message/hooks/useCreateMessageActionHandlers.ts +3 -3
- package/src/components/Message/hooks/useProcessReactions.ts +2 -2
- package/src/components/Message/hooks/useUserMuteActive.ts +1 -1
- package/src/components/MessageInput/MessageComposer.tsx +4 -2
- package/src/components/MessageList/MessageFlashList.tsx +2 -2
- package/src/components/MessageList/MessageList.tsx +2 -2
- package/src/components/MessageList/__tests__/MessageList.test.tsx +115 -14
- package/src/components/MessageList/__tests__/ScrollToBottomButton.test.tsx +3 -3
- package/src/components/MessageList/hooks/useOwnUnreadCount.ts +1 -1
- package/src/components/MessageMenu/MessageUserReactionsItem.tsx +1 -1
- package/src/components/MessageMenu/hooks/useMessageOwnReactions.ts +2 -2
- package/src/components/Poll/components/PollAnswersList.tsx +1 -1
- package/src/components/Poll/components/PollButtons.tsx +1 -1
- package/src/components/Poll/hook/useIsPollCreatedByCurrentUser.ts +1 -1
- package/src/components/Thread/Thread.tsx +1 -1
- package/src/components/Thread/__tests__/Thread.test.tsx +89 -2
- package/src/components/ThreadList/ThreadListItem.tsx +1 -1
- package/src/components/ThreadList/ThreadListUnreadBanner.tsx +6 -2
- package/src/components/ThreadList/__tests__/ThreadList.test.tsx +21 -0
- package/src/components/index.ts +3 -0
- package/src/contexts/componentsContext/defaultComponents.ts +0 -2
- package/src/contexts/liveLocationManagerContext/LiveLocationManagerContext.tsx +1 -1
- package/src/hooks/__tests__/useChannelMuteActive.test.tsx +1 -1
- package/src/hooks/__tests__/useIsDirectChat.test.tsx +1 -1
- package/src/hooks/actions/__tests__/useChannelActionItems.test.tsx +1 -1
- package/src/hooks/actions/__tests__/useChannelActions.test.tsx +1 -1
- package/src/hooks/actions/__tests__/useChannelMemberActionItems.test.tsx +6 -6
- package/src/hooks/actions/useChannelActionItems.tsx +1 -1
- package/src/hooks/actions/useChannelActions.ts +2 -2
- package/src/hooks/actions/useChannelMemberActionItems.tsx +1 -1
- package/src/hooks/index.ts +1 -0
- package/src/hooks/messagePreview/__tests__/useMessageDeliveryStatus.test.tsx +57 -32
- package/src/hooks/messagePreview/useMessageDeliveryStatus.ts +13 -7
- package/src/hooks/useIsDirectChat.ts +1 -1
- package/src/i18n/__tests__/catalog.fixture.json +2 -0
- package/src/i18n/keys.ts +3 -0
- package/src/i18n/runtimeDefaults.ts +1 -0
- package/src/store/__tests__/selectMessagesForChannels.test.ts +34 -12
- package/src/store/apis/getChannelMessages.ts +4 -1
- package/src/store/apis/getChannels.ts +5 -1
- package/src/store/apis/getChannelsForFilterSort.ts +1 -0
- package/src/store/apis/queries/selectMessagesForChannels.ts +7 -2
- package/src/utils/__tests__/setupCommandUIMiddlewares.test.ts +49 -0
- package/src/utils/installNativeMultipartAdapter.ts +5 -3
- package/src/utils/setupCommandUIMiddlewares.ts +3 -0
- package/src/version.json +1 -1
|
@@ -0,0 +1,32 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.useDictationAudioLevel = void 0;
|
|
5
|
+
var _react = require("react");
|
|
6
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
7
|
+
var _AIDictation = require("../native/AIDictation");
|
|
8
|
+
var useDictationAudioLevel = () => {
|
|
9
|
+
var level = (0, _reactNativeReanimated.useSharedValue)(null);
|
|
10
|
+
(0, _react.useEffect)(() => {
|
|
11
|
+
var unsubscribeLevel = _AIDictation.AIDictation.addLevelListener(payload => {
|
|
12
|
+
level.value = typeof (payload == null ? void 0 : payload.level) === 'number' ? payload.level : null;
|
|
13
|
+
});
|
|
14
|
+
var unsubscribeState = _AIDictation.AIDictation.addStateListener(({
|
|
15
|
+
state
|
|
16
|
+
}) => {
|
|
17
|
+
if (state !== 'listening' && state !== 'starting') level.value = null;
|
|
18
|
+
});
|
|
19
|
+
var unsubscribeError = _AIDictation.AIDictation.addErrorListener(() => {
|
|
20
|
+
level.value = null;
|
|
21
|
+
});
|
|
22
|
+
return () => {
|
|
23
|
+
unsubscribeLevel();
|
|
24
|
+
unsubscribeState();
|
|
25
|
+
unsubscribeError();
|
|
26
|
+
level.value = null;
|
|
27
|
+
};
|
|
28
|
+
}, [level]);
|
|
29
|
+
return level;
|
|
30
|
+
};
|
|
31
|
+
exports.useDictationAudioLevel = useDictationAudioLevel;
|
|
32
|
+
//# sourceMappingURL=useDictationAudioLevel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNativeReanimated","_AIDictation","useDictationAudioLevel","level","useSharedValue","useEffect","unsubscribeLevel","AIDictation","addLevelListener","payload","value","unsubscribeState","addStateListener","state","unsubscribeError","addErrorListener","exports"],"sourceRoot":"../../../../src","sources":["ai-components/transcription/useDictationAudioLevel.ts"],"mappings":";;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAEA,IAAAE,YAAA,GAAAF,OAAA;AAUO,IAAMG,sBAAsB,GAAGA,CAAA,KAAkC;EACtE,IAAMC,KAAK,GAAG,IAAAC,qCAAc,EAAgB,IAAI,CAAC;EAEjD,IAAAC,gBAAS,EAAC,MAAM;IACd,IAAMC,gBAAgB,GAAGC,wBAAW,CAACC,gBAAgB,CAAEC,OAAO,IAAK;MACjEN,KAAK,CAACO,KAAK,GAAG,QAAOD,OAAO,oBAAPA,OAAO,CAAEN,KAAK,MAAK,QAAQ,GAAGM,OAAO,CAACN,KAAK,GAAG,IAAI;IACzE,CAAC,CAAC;IACF,IAAMQ,gBAAgB,GAAGJ,wBAAW,CAACK,gBAAgB,CAAC,CAAC;MAAEC;IAAM,CAAC,KAAK;MACnE,IAAIA,KAAK,KAAK,WAAW,IAAIA,KAAK,KAAK,UAAU,EAAEV,KAAK,CAACO,KAAK,GAAG,IAAI;IACvE,CAAC,CAAC;IACF,IAAMI,gBAAgB,GAAGP,wBAAW,CAACQ,gBAAgB,CAAC,MAAM;MAC1DZ,KAAK,CAACO,KAAK,GAAG,IAAI;IACpB,CAAC,CAAC;IAEF,OAAO,MAAM;MACXJ,gBAAgB,CAAC,CAAC;MAClBK,gBAAgB,CAAC,CAAC;MAClBG,gBAAgB,CAAC,CAAC;MAClBX,KAAK,CAACO,KAAK,GAAG,IAAI;IACpB,CAAC;EACH,CAAC,EAAE,CAACP,KAAK,CAAC,CAAC;EAEX,OAAOA,KAAK;AACd,CAAC;AAACa,OAAA,CAAAd,sBAAA,GAAAA,sBAAA","ignoreList":[]}
|
|
@@ -0,0 +1,79 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.VoiceGlow = void 0;
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
var _reactNativeSkia = require("@shopify/react-native-skia");
|
|
9
|
+
var _driver = require("./driver");
|
|
10
|
+
var _glowShader = require("./glowShader");
|
|
11
|
+
var _styles = require("./styles");
|
|
12
|
+
var _VoiceVisualizationView = require("./VoiceVisualizationView");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/voice-visualization/VoiceGlow.tsx";
|
|
15
|
+
var GlowCanvas = ({
|
|
16
|
+
size: {
|
|
17
|
+
height,
|
|
18
|
+
width
|
|
19
|
+
},
|
|
20
|
+
visualization: {
|
|
21
|
+
dark,
|
|
22
|
+
driver
|
|
23
|
+
}
|
|
24
|
+
}) => {
|
|
25
|
+
var effect = (0, _glowShader.getGlowEffect)();
|
|
26
|
+
var uniforms = (0, _reactNativeReanimated.useDerivedValue)(() => {
|
|
27
|
+
var d = driver.value;
|
|
28
|
+
var color = i => [d.colors[i].hue, d.colors[i].saturation, d.colors[i].value, 0];
|
|
29
|
+
return {
|
|
30
|
+
bright: d.bright,
|
|
31
|
+
col0: color(0),
|
|
32
|
+
col1: color(1),
|
|
33
|
+
col2: color(2),
|
|
34
|
+
col3: color(3),
|
|
35
|
+
col4: color(4),
|
|
36
|
+
count: d.count,
|
|
37
|
+
dark: dark.value,
|
|
38
|
+
flow: d.flow,
|
|
39
|
+
flowSpin: d.flowSpin,
|
|
40
|
+
hover: [d.hoverX, d.hoverY],
|
|
41
|
+
hoverAmt: d.hoverAmount,
|
|
42
|
+
load: d.load,
|
|
43
|
+
mic: d.mic,
|
|
44
|
+
orbSpin: d.orbSpin,
|
|
45
|
+
react: (0, _driver.driverReact)(d),
|
|
46
|
+
resolution: [width, height],
|
|
47
|
+
sat: d.sat,
|
|
48
|
+
scale: (0, _driver.driverScale)(d),
|
|
49
|
+
tap: [d.tapX, d.tapY],
|
|
50
|
+
tapTime: d.tapAge,
|
|
51
|
+
time: d.time,
|
|
52
|
+
voice: d.voice
|
|
53
|
+
};
|
|
54
|
+
});
|
|
55
|
+
if (!effect) return null;
|
|
56
|
+
return (0, _jsxRuntime.jsx)(_reactNativeSkia.Canvas, {
|
|
57
|
+
style: {
|
|
58
|
+
height,
|
|
59
|
+
width
|
|
60
|
+
},
|
|
61
|
+
children: (0, _jsxRuntime.jsx)(_reactNativeSkia.Fill, {
|
|
62
|
+
children: (0, _jsxRuntime.jsx)(_reactNativeSkia.Shader, {
|
|
63
|
+
source: effect,
|
|
64
|
+
uniforms: uniforms
|
|
65
|
+
})
|
|
66
|
+
})
|
|
67
|
+
});
|
|
68
|
+
};
|
|
69
|
+
var renderGlow = (visualization, size) => (0, _jsxRuntime.jsx)(GlowCanvas, {
|
|
70
|
+
size: size,
|
|
71
|
+
visualization: visualization
|
|
72
|
+
});
|
|
73
|
+
var VoiceGlow = props => (0, _jsxRuntime.jsx)(_VoiceVisualizationView.VoiceVisualizationView, {
|
|
74
|
+
...props,
|
|
75
|
+
renderCanvas: renderGlow,
|
|
76
|
+
visualStyle: _styles.GLOW_STYLE
|
|
77
|
+
});
|
|
78
|
+
exports.VoiceGlow = VoiceGlow;
|
|
79
|
+
//# sourceMappingURL=VoiceGlow.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeReanimated","_reactNativeSkia","_driver","_glowShader","_styles","_VoiceVisualizationView","_jsxRuntime","_jsxFileName","GlowCanvas","size","height","width","visualization","dark","driver","effect","getGlowEffect","uniforms","useDerivedValue","d","value","color","i","colors","hue","saturation","bright","col0","col1","col2","col3","col4","count","flow","flowSpin","hover","hoverX","hoverY","hoverAmt","hoverAmount","load","mic","orbSpin","react","driverReact","resolution","sat","scale","driverScale","tap","tapX","tapY","tapTime","tapAge","time","voice","jsx","Canvas","style","children","Fill","Shader","source","renderGlow","VoiceGlow","props","VoiceVisualizationView","renderCanvas","visualStyle","GLOW_STYLE","exports"],"sourceRoot":"../../../../src","sources":["ai-components/voice-visualization/VoiceGlow.tsx"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAGA,IAAAM,uBAAA,GAAAN,OAAA;AAAwF,IAAAO,WAAA,GAAAP,OAAA;AAAA,IAAAQ,YAAA;AAIxF,IAAMC,UAAU,GAAGA,CAAC;EAClBC,IAAI,EAAE;IAAEC,MAAM;IAAEC;EAAM,CAAC;EACvBC,aAAa,EAAE;IAAEC,IAAI;IAAEC;EAAO;AAIhC,CAAC,KAAK;EACJ,IAAMC,MAAM,GAAG,IAAAC,yBAAa,EAAC,CAAC;EAC9B,IAAMC,QAAQ,GAAG,IAAAC,sCAAe,EAAC,MAAM;IACrC,IAAMC,CAAC,GAAGL,MAAM,CAACM,KAAK;IACtB,IAAMC,KAAK,GAAIC,CAAS,IAAK,CAACH,CAAC,CAACI,MAAM,CAACD,CAAC,CAAC,CAACE,GAAG,EAAEL,CAAC,CAACI,MAAM,CAACD,CAAC,CAAC,CAACG,UAAU,EAAEN,CAAC,CAACI,MAAM,CAACD,CAAC,CAAC,CAACF,KAAK,EAAE,CAAC,CAAC;IAC5F,OAAO;MACLM,MAAM,EAAEP,CAAC,CAACO,MAAM;MAChBC,IAAI,EAAEN,KAAK,CAAC,CAAC,CAAC;MACdO,IAAI,EAAEP,KAAK,CAAC,CAAC,CAAC;MACdQ,IAAI,EAAER,KAAK,CAAC,CAAC,CAAC;MACdS,IAAI,EAAET,KAA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ACE,QAAQ,EAAEA;MAAS,CAAE;IAAC,CAC1C;EAAC,CACD,CAAC;AAEb,CAAC;AAED,IAAM8C,UAAU,GAAGA,CAACnD,aAAiC,EAAEH,IAAqB,KAC1E,IAAAH,WAAA,CAAAkD,GAAA,EAAChD,UAAU;EAACC,IAAI,EAAEA,IAAK;EAACG,aAAa,EAAEA;AAAc,CAAE,CACxD;AAUM,IAAMoD,SAAS,GAAIC,KAAqB,IAC7C,IAAA3D,WAAA,CAAAkD,GAAA,EAACnD,uBAAA,CAAA6D,sBAAsB;EAAA,GAAKD,KAAK;EAAEE,YAAY,EAAEJ,UAAW;EAACK,WAAW,EAAEC;AAAW,CAAE,CACxF;AAACC,OAAA,CAAAN,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -0,0 +1,147 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.VoiceVisualizationView = void 0;
|
|
6
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeReanimated = _interopRequireDefault(require("react-native-reanimated"));
|
|
10
|
+
var _useVoiceVisualization = require("./useVoiceVisualization");
|
|
11
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
+
var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/voice-visualization/VoiceVisualizationView.tsx";
|
|
13
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
14
|
+
var DEFAULT_STATE_LABELS = {
|
|
15
|
+
connecting: 'Connecting',
|
|
16
|
+
idle: 'Ready',
|
|
17
|
+
listening: 'Listening',
|
|
18
|
+
speaking: 'Speaking',
|
|
19
|
+
thinking: 'Thinking'
|
|
20
|
+
};
|
|
21
|
+
var VoiceVisualizationView = ({
|
|
22
|
+
accessibilityLabel = 'Voice agent',
|
|
23
|
+
accessibilityValue,
|
|
24
|
+
audioLevel,
|
|
25
|
+
colors,
|
|
26
|
+
expressivity,
|
|
27
|
+
onLayout,
|
|
28
|
+
pointerEvents = 'box-none',
|
|
29
|
+
renderCanvas,
|
|
30
|
+
state,
|
|
31
|
+
stateLabels,
|
|
32
|
+
style,
|
|
33
|
+
visualStyle,
|
|
34
|
+
...restProps
|
|
35
|
+
}) => {
|
|
36
|
+
var _stateLabels$state;
|
|
37
|
+
var visualization = (0, _useVoiceVisualization.useVoiceVisualization)({
|
|
38
|
+
audioLevel,
|
|
39
|
+
colors,
|
|
40
|
+
expressivity,
|
|
41
|
+
state
|
|
42
|
+
}, visualStyle);
|
|
43
|
+
var hover = visualization.hover,
|
|
44
|
+
opacity = visualization.opacity,
|
|
45
|
+
tap = visualization.tap;
|
|
46
|
+
var _useState = (0, _react.useState)({
|
|
47
|
+
height: 0,
|
|
48
|
+
width: 0
|
|
49
|
+
}),
|
|
50
|
+
_useState2 = (0, _slicedToArray2.default)(_useState, 2),
|
|
51
|
+
layout = _useState2[0],
|
|
52
|
+
setLayout = _useState2[1];
|
|
53
|
+
var handleLayout = (0, _react.useCallback)(event => {
|
|
54
|
+
onLayout == null || onLayout(event);
|
|
55
|
+
var _event$nativeEvent$la = event.nativeEvent.layout,
|
|
56
|
+
height = _event$nativeEvent$la.height,
|
|
57
|
+
width = _event$nativeEvent$la.width;
|
|
58
|
+
setLayout(current => current.width === width && current.height === height ? current : {
|
|
59
|
+
height,
|
|
60
|
+
width
|
|
61
|
+
});
|
|
62
|
+
}, [onLayout]);
|
|
63
|
+
var side = Math.min(layout.width, layout.height);
|
|
64
|
+
var pixelRatio = _reactNative.PixelRatio.get();
|
|
65
|
+
var density = Math.min(1, visualStyle.maxScale / pixelRatio);
|
|
66
|
+
var canvasSize = (0, _react.useMemo)(() => ({
|
|
67
|
+
height: layout.height * density,
|
|
68
|
+
pixelRatio: pixelRatio * density,
|
|
69
|
+
width: layout.width * density
|
|
70
|
+
}), [density, layout.height, layout.width, pixelRatio]);
|
|
71
|
+
var hitWidth = visualStyle.hitArea.width * side;
|
|
72
|
+
var hitHeight = visualStyle.hitArea.height * side;
|
|
73
|
+
var toLocalPoint = (0, _react.useCallback)((locationX, locationY) => ({
|
|
74
|
+
x: (locationX - hitWidth / 2) / (side || 1),
|
|
75
|
+
y: (hitHeight / 2 - locationY) / (side || 1)
|
|
76
|
+
}), [hitHeight, hitWidth, side]);
|
|
77
|
+
var handleTouchEnd = (0, _react.useCallback)(event => {
|
|
78
|
+
var _toLocalPoint = toLocalPoint(event.nativeEvent.locationX, event.nativeEvent.locationY),
|
|
79
|
+
x = _toLocalPoint.x,
|
|
80
|
+
y = _toLocalPoint.y;
|
|
81
|
+
if (visualStyle.contains(x, y)) tap(x, y);
|
|
82
|
+
}, [tap, toLocalPoint, visualStyle]);
|
|
83
|
+
var handlePointerMove = (0, _react.useCallback)(event => {
|
|
84
|
+
var _event$nativeEvent = event.nativeEvent,
|
|
85
|
+
buttons = _event$nativeEvent.buttons,
|
|
86
|
+
offsetX = _event$nativeEvent.offsetX,
|
|
87
|
+
offsetY = _event$nativeEvent.offsetY,
|
|
88
|
+
pointerType = _event$nativeEvent.pointerType;
|
|
89
|
+
if (pointerType === 'touch') return;
|
|
90
|
+
var _toLocalPoint2 = toLocalPoint(offsetX, offsetY),
|
|
91
|
+
x = _toLocalPoint2.x,
|
|
92
|
+
y = _toLocalPoint2.y;
|
|
93
|
+
var hovering = buttons === 0 && visualStyle.contains(x, y);
|
|
94
|
+
hover(hovering ? x : null, hovering ? y : null);
|
|
95
|
+
}, [hover, toLocalPoint, visualStyle]);
|
|
96
|
+
var handlePointerLeave = (0, _react.useCallback)(() => hover(null, null), [hover]);
|
|
97
|
+
return (0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
98
|
+
accessibilityLabel: accessibilityLabel,
|
|
99
|
+
accessibilityRole: "image",
|
|
100
|
+
accessibilityValue: accessibilityValue != null ? accessibilityValue : {
|
|
101
|
+
text: (_stateLabels$state = stateLabels == null ? void 0 : stateLabels[state]) != null ? _stateLabels$state : DEFAULT_STATE_LABELS[state]
|
|
102
|
+
},
|
|
103
|
+
accessible: true,
|
|
104
|
+
onLayout: handleLayout,
|
|
105
|
+
pointerEvents: pointerEvents,
|
|
106
|
+
style: style,
|
|
107
|
+
...restProps,
|
|
108
|
+
children: side > 0 ? (0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
109
|
+
children: [(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
110
|
+
pointerEvents: "none",
|
|
111
|
+
style: [styles.canvas, {
|
|
112
|
+
height: canvasSize.height,
|
|
113
|
+
left: (layout.width - canvasSize.width) / 2,
|
|
114
|
+
opacity,
|
|
115
|
+
top: (layout.height - canvasSize.height) / 2,
|
|
116
|
+
transform: [{
|
|
117
|
+
scale: 1 / density
|
|
118
|
+
}],
|
|
119
|
+
width: canvasSize.width
|
|
120
|
+
}],
|
|
121
|
+
children: renderCanvas(visualization, canvasSize)
|
|
122
|
+
}), (0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
123
|
+
collapsable: false,
|
|
124
|
+
onPointerLeave: handlePointerLeave,
|
|
125
|
+
onPointerMove: handlePointerMove,
|
|
126
|
+
onTouchEnd: handleTouchEnd,
|
|
127
|
+
style: [styles.hitArea, {
|
|
128
|
+
height: hitHeight,
|
|
129
|
+
left: (layout.width - hitWidth) / 2,
|
|
130
|
+
top: (layout.height - hitHeight) / 2,
|
|
131
|
+
width: hitWidth
|
|
132
|
+
}],
|
|
133
|
+
testID: "voice-visualization-hit-area"
|
|
134
|
+
})]
|
|
135
|
+
}) : null
|
|
136
|
+
});
|
|
137
|
+
};
|
|
138
|
+
exports.VoiceVisualizationView = VoiceVisualizationView;
|
|
139
|
+
var styles = _reactNative.StyleSheet.create({
|
|
140
|
+
canvas: {
|
|
141
|
+
position: 'absolute'
|
|
142
|
+
},
|
|
143
|
+
hitArea: {
|
|
144
|
+
position: 'absolute'
|
|
145
|
+
}
|
|
146
|
+
});
|
|
147
|
+
//# sourceMappingURL=VoiceVisualizationView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_interopRequireDefault","_useVoiceVisualization","_jsxRuntime","_jsxFileName","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","_t","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","DEFAULT_STATE_LABELS","connecting","idle","listening","speaking","thinking","VoiceVisualizationView","accessibilityLabel","accessibilityValue","audioLevel","colors","expressivity","onLayout","pointerEvents","renderCanvas","state","stateLabels","style","visualStyle","restProps","_stateLabels$state","visualization","useVoiceVisualization","hover","opacity","tap","_useState","useState","height","width","_useState2","_slicedToArray2","layout","setLayout","handleLayout","useCallback","event","_event$nativeEvent$la","nativeEvent","current","side","Math","min","pixelRatio","PixelRatio","density","maxScale","canvasSize","useMemo","hitWidth","hitArea","hitHeight","toLocalPoint","locationX","locationY","x","y","handleTouchEnd","_toLocalPoint","contains","handlePointerMove","_event$nativeEvent","buttons","offsetX","offsetY","pointerType","_toLocalPoint2","hovering","handlePointerLeave","jsx","View","accessibilityRole","text","accessible","children","jsxs","Fragment","styles","canvas","left","top","transform","scale","collapsable","onPointerLeave","onPointerMove","onTouch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,YAAA,CAAAgG,IAAI;QAEHa,WAAW,EAAE,KAAM;QACnBC,cAAc,EAAEhB,kBAAmB;QACnCiB,aAAa,EAAEzB,iBAAkB;QACjC0B,UAAU,EAAE7B,cAAe;QAC3BxC,KAAK,EAAE,CACL4D,MAAM,CAAC3B,OAAO,EACd;UACEtB,MAAM,EAAEuB,SAAS;UACjB4B,IAAI,EAAE,CAAC/C,MAAM,CAACH,KAAK,GAAGoB,QAAQ,IAAI,CAAC;UACnC+B,GAAG,EAAE,CAAChD,MAAM,CAACJ,MAAM,GAAGuB,SAAS,IAAI,CAAC;UACpCtB,KAAK,EAAEoB;QACT,CAAC,CACD;QACFsC,MAAM,EAAC;MAA8B,CACtC,CAAC;IAAA,CACF,CAAC,GACD;EAAI,CACJ,CAAC;AAEX,CAAC;AAACC,OAAA,CAAAlF,sBAAA,GAAAA,sBAAA;AAEF,IAAMuE,MAAM,GAAGY,uBAAU,CAACC,MAAM,CAAC;EAC/BZ,MAAM,EAAE;IAAEa,QAAQ,EAAE;EAAW,CAAC;EAChCzC,OAAO,EAAE;IAAEyC,QAAQ,EAAE;EAAW;AAClC,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,58 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
+
Object.defineProperty(exports, "__esModule", {
|
|
3
|
+
value: true
|
|
4
|
+
});
|
|
5
|
+
exports.VoiceWave = void 0;
|
|
6
|
+
var _react = _interopRequireDefault(require("react"));
|
|
7
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
8
|
+
var _reactNativeSkia = require("@shopify/react-native-skia");
|
|
9
|
+
var _styles = require("./styles");
|
|
10
|
+
var _VoiceVisualizationView = require("./VoiceVisualizationView");
|
|
11
|
+
var _waveGeometry = require("./waveGeometry");
|
|
12
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
13
|
+
var _jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/ai-components/voice-visualization/VoiceWave.tsx";
|
|
14
|
+
var WaveCanvas = ({
|
|
15
|
+
size: {
|
|
16
|
+
height,
|
|
17
|
+
pixelRatio,
|
|
18
|
+
width
|
|
19
|
+
},
|
|
20
|
+
visualization: {
|
|
21
|
+
dark,
|
|
22
|
+
driver
|
|
23
|
+
}
|
|
24
|
+
}) => {
|
|
25
|
+
var path = (0, _reactNativeReanimated.useDerivedValue)(() => (0, _waveGeometry.wavePath)(driver.value, width, height));
|
|
26
|
+
var colors = (0, _reactNativeReanimated.useDerivedValue)(() => (0, _waveGeometry.waveColors)(driver.value, dark.value));
|
|
27
|
+
var m = Math.min(width, height);
|
|
28
|
+
return (0, _jsxRuntime.jsx)(_reactNativeSkia.Canvas, {
|
|
29
|
+
style: {
|
|
30
|
+
height,
|
|
31
|
+
width
|
|
32
|
+
},
|
|
33
|
+
children: (0, _jsxRuntime.jsx)(_reactNativeSkia.Path, {
|
|
34
|
+
path: path,
|
|
35
|
+
strokeCap: "round",
|
|
36
|
+
strokeJoin: "round",
|
|
37
|
+
strokeWidth: (0, _waveGeometry.waveStrokeWidth)(width, height, pixelRatio),
|
|
38
|
+
style: "stroke",
|
|
39
|
+
children: (0, _jsxRuntime.jsx)(_reactNativeSkia.LinearGradient, {
|
|
40
|
+
colors: colors,
|
|
41
|
+
end: (0, _reactNativeSkia.vec)(width / 2 + _waveGeometry.WAVE_END * m, 0),
|
|
42
|
+
positions: _waveGeometry.WAVE_POSITIONS,
|
|
43
|
+
start: (0, _reactNativeSkia.vec)(width / 2 + _waveGeometry.WAVE_START * m, 0)
|
|
44
|
+
})
|
|
45
|
+
})
|
|
46
|
+
});
|
|
47
|
+
};
|
|
48
|
+
var renderWave = (visualization, size) => (0, _jsxRuntime.jsx)(WaveCanvas, {
|
|
49
|
+
size: size,
|
|
50
|
+
visualization: visualization
|
|
51
|
+
});
|
|
52
|
+
var VoiceWave = props => (0, _jsxRuntime.jsx)(_VoiceVisualizationView.VoiceVisualizationView, {
|
|
53
|
+
...props,
|
|
54
|
+
renderCanvas: renderWave,
|
|
55
|
+
visualStyle: _styles.WAVE_STYLE
|
|
56
|
+
});
|
|
57
|
+
exports.VoiceWave = VoiceWave;
|
|
58
|
+
//# sourceMappingURL=VoiceWave.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNativeReanimated","_reactNativeSkia","_styles","_VoiceVisualizationView","_waveGeometry","_jsxRuntime","_jsxFileName","WaveCanvas","size","height","pixelRatio","width","visualization","dark","driver","path","useDerivedValue","wavePath","value","colors","waveColors","m","Math","min","jsx","Canvas","style","children","Path","strokeCap","strokeJoin","strokeWidth","waveStrokeWidth","LinearGradient","end","vec","WAVE_END","positions","WAVE_POSITIONS","start","WAVE_START","renderWave","VoiceWave","props","VoiceVisualizationView","renderCanvas","visualStyle","WAVE_STYLE","exports"],"sourceRoot":"../../../../src","sources":["ai-components/voice-visualization/VoiceWave.tsx"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,sBAAA,GAAAD,OAAA;AAEA,IAAAE,gBAAA,GAAAF,OAAA;AAEA,IAAAG,OAAA,GAAAH,OAAA;AAGA,IAAAI,uBAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAL,OAAA;AAOwB,IAAAM,WAAA,GAAAN,OAAA;AAAA,IAAAO,YAAA;AAIxB,IAAMC,UAAU,GAAGA,CAAC;EAClBC,IAAI,EAAE;IAAEC,MAAM;IAAEC,UAAU;IAAEC;EAAM,CAAC;EACnCC,aAAa,EAAE;IAAEC,IAAI;IAAEC;EAAO;AAIhC,CAAC,KAAK;EACJ,IAAMC,IAAI,GAAG,IAAAC,sCAAe,EAAC,MAAM,IAAAC,sBAAQ,EAACH,MAAM,CAACI,KAAK,EAAEP,KAAK,EAAEF,MAAM,CAAC,CAAC;EACzE,IAAMU,MAAM,GAAG,IAAAH,sCAAe,EAAC,MAAM,IAAAI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J,UAAW;EAACK,WAAW,EAAEC;AAAW,CAAE,CACxF;AAACC,OAAA,CAAAN,SAAA,GAAAA,SAAA","ignoreList":[]}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.startBounce = exports.scaleAt = exports.easeOut = exports.createBounce = exports.bounceScale = exports.advanceBounce = exports.BOUNCE_DURATION = void 0;
|
|
5
|
+
var BOUNCE_DURATION = exports.BOUNCE_DURATION = 0.34;
|
|
6
|
+
var OFFSETS = [0, 0.3, 0.62, 1];
|
|
7
|
+
var SCALES = [1, 0.93, 1.03, 1];
|
|
8
|
+
var createBounce = () => ({
|
|
9
|
+
age: Number.POSITIVE_INFINITY
|
|
10
|
+
});
|
|
11
|
+
exports.createBounce = createBounce;
|
|
12
|
+
var startBounce = bounce => {
|
|
13
|
+
'worklet';
|
|
14
|
+
|
|
15
|
+
bounce.age = 0;
|
|
16
|
+
};
|
|
17
|
+
exports.startBounce = startBounce;
|
|
18
|
+
var advanceBounce = (bounce, seconds) => {
|
|
19
|
+
'worklet';
|
|
20
|
+
|
|
21
|
+
bounce.age += seconds;
|
|
22
|
+
};
|
|
23
|
+
exports.advanceBounce = advanceBounce;
|
|
24
|
+
var easeOut = x => {
|
|
25
|
+
'worklet';
|
|
26
|
+
|
|
27
|
+
var bx = 3 * 0.58;
|
|
28
|
+
var ax = 1 - bx;
|
|
29
|
+
var by = 3;
|
|
30
|
+
var ay = 1 - by;
|
|
31
|
+
var low = 0;
|
|
32
|
+
var high = 1;
|
|
33
|
+
for (var i = 0; i < 24; i++) {
|
|
34
|
+
var middle = (low + high) / 2;
|
|
35
|
+
if ((ax * middle + bx) * middle * middle < x) low = middle;else high = middle;
|
|
36
|
+
}
|
|
37
|
+
var t = (low + high) / 2;
|
|
38
|
+
return (ay * t + by) * t * t;
|
|
39
|
+
};
|
|
40
|
+
exports.easeOut = easeOut;
|
|
41
|
+
var scaleAt = progress => {
|
|
42
|
+
'worklet';
|
|
43
|
+
|
|
44
|
+
for (var i = 1; i < OFFSETS.length; i++) {
|
|
45
|
+
if (progress <= OFFSETS[i]) {
|
|
46
|
+
var fraction = (progress - OFFSETS[i - 1]) / (OFFSETS[i] - OFFSETS[i - 1]);
|
|
47
|
+
return SCALES[i - 1] + (SCALES[i] - SCALES[i - 1]) * fraction;
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
return 1;
|
|
51
|
+
};
|
|
52
|
+
exports.scaleAt = scaleAt;
|
|
53
|
+
var bounceScale = bounce => {
|
|
54
|
+
'worklet';
|
|
55
|
+
|
|
56
|
+
if (bounce.age >= BOUNCE_DURATION) return 1;
|
|
57
|
+
return scaleAt(easeOut(Math.max(bounce.age, 0) / BOUNCE_DURATION));
|
|
58
|
+
};
|
|
59
|
+
exports.bounceScale = bounceScale;
|
|
60
|
+
//# sourceMappingURL=bounce.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["BOUNCE_DURATION","exports","OFFSETS","SCALES","createBounce","age","Number","POSITIVE_INFINITY","startBounce","bounce","advanceBounce","seconds","easeOut","x","bx","ax","by","ay","low","high","i","middle","t","scaleAt","progress","length","fraction","bounceScale","Math","max"],"sourceRoot":"../../../../src","sources":["ai-components/voice-visualization/bounce.ts"],"mappings":";;;;AAMO,IAAMA,eAAe,GAAAC,OAAA,CAAAD,eAAA,GAAG,IAAI;AAEnC,IAAME,OAAO,GAAG,CAAC,CAAC,EAAE,GAAG,EAAE,IAAI,EAAE,CAAC,CAAC;AACjC,IAAMC,MAAM,GAAG,CAAC,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,CAAC,CAAC;AAK1B,IAAMC,YAAY,GAAGA,CAAA,MAAoB;EAAEC,GAAG,EAAEC,MAAM,CAACC;AAAkB,CAAC,CAAC;AAACN,OAAA,CAAAG,YAAA,GAAAA,YAAA;AAE5E,IAAMI,WAAW,GAAIC,MAAmB,IAAK;EA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,CAAC,CAAC,EAAE;MAC1B,IAAMM,QAAQ,GAAG,CAACF,QAAQ,GAAGtB,OAAO,CAACkB,CAAC,GAAG,CAAC,CAAC,KAAKlB,OAAO,CAACkB,CAAC,CAAC,GAAGlB,OAAO,CAACkB,CAAC,GAAG,CAAC,CAAC,CAAC;MAC5E,OAAOjB,MAAM,CAACiB,CAAC,GAAG,CAAC,CAAC,GAAG,CAACjB,MAAM,CAACiB,CAAC,CAAC,GAAGjB,MAAM,CAACiB,CAAC,GAAG,CAAC,CAAC,IAAIM,QAAQ;IAC/D;EACF;EACA,OAAO,CAAC;AACV,CAAC;AAACzB,OAAA,CAAAsB,OAAA,GAAAA,OAAA;AAEK,IAAMI,WAAW,GAAIlB,MAAmB,IAAK;EAClD,SAAS;;EACT,IAAIA,MAAM,CAACJ,GAAG,IAAIL,eAAe,EAAE,OAAO,CAAC;EAC3C,OAAOuB,OAAO,CAACX,OAAO,CAACgB,IAAI,CAACC,GAAG,CAACpB,MAAM,CAACJ,GAAG,EAAE,CAAC,CAAC,GAAGL,eAAe,CAAC,CAAC;AACpE,CAAC;AAACC,OAAA,CAAA0B,WAAA,GAAAA,WAAA","ignoreList":[]}
|
|
@@ -0,0 +1,208 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.tapDriver = exports.slots = exports.scales = exports.hoverDriver = exports.ease = exports.driverScale = exports.driverReact = exports.createDriverState = exports.advanceDriver = exports.REDUCED = exports.NO_TAP = exports.LEVEL_RESPONSE = void 0;
|
|
5
|
+
var _bounce = require("./bounce");
|
|
6
|
+
var _palette = require("./palette");
|
|
7
|
+
var LEVEL_RESPONSE = exports.LEVEL_RESPONSE = {
|
|
8
|
+
steady: {
|
|
9
|
+
fall: 0.35,
|
|
10
|
+
rise: 0.35
|
|
11
|
+
},
|
|
12
|
+
smooth: {
|
|
13
|
+
fall: 0.05,
|
|
14
|
+
rise: 0.16
|
|
15
|
+
}
|
|
16
|
+
};
|
|
17
|
+
var MOTIONS = {
|
|
18
|
+
connecting: {
|
|
19
|
+
bright: 1,
|
|
20
|
+
flow: 0,
|
|
21
|
+
load: 1,
|
|
22
|
+
react: 0,
|
|
23
|
+
sat: 1,
|
|
24
|
+
speed: 1
|
|
25
|
+
},
|
|
26
|
+
idle: {
|
|
27
|
+
bright: 1,
|
|
28
|
+
flow: 0,
|
|
29
|
+
load: 0,
|
|
30
|
+
react: 0.12,
|
|
31
|
+
sat: 1,
|
|
32
|
+
speed: 0.4
|
|
33
|
+
},
|
|
34
|
+
listening: {
|
|
35
|
+
bright: 1,
|
|
36
|
+
flow: 0,
|
|
37
|
+
load: 0,
|
|
38
|
+
react: 0.45,
|
|
39
|
+
sat: 1,
|
|
40
|
+
speed: 0.9
|
|
41
|
+
},
|
|
42
|
+
speaking: {
|
|
43
|
+
bright: 1,
|
|
44
|
+
flow: 0,
|
|
45
|
+
load: 0,
|
|
46
|
+
react: 1,
|
|
47
|
+
sat: 1,
|
|
48
|
+
speed: 1.25
|
|
49
|
+
},
|
|
50
|
+
thinking: {
|
|
51
|
+
bright: 1,
|
|
52
|
+
flow: 1,
|
|
53
|
+
load: 0,
|
|
54
|
+
react: 0,
|
|
55
|
+
sat: 1,
|
|
56
|
+
speed: 1.25
|
|
57
|
+
}
|
|
58
|
+
};
|
|
59
|
+
var NO_TAP = exports.NO_TAP = 100;
|
|
60
|
+
var MAX_FRAME = 0.05;
|
|
61
|
+
var REDUCED = exports.REDUCED = 0.07;
|
|
62
|
+
var DRIVERS = 0.08;
|
|
63
|
+
var GENTLE = 0.12;
|
|
64
|
+
var VOICE = 0.1;
|
|
65
|
+
var scales = expressivity => {
|
|
66
|
+
'worklet';
|
|
67
|
+
|
|
68
|
+
return {
|
|
69
|
+
amplitude: 0.15 + 0.85 * expressivity,
|
|
70
|
+
speed: 0.6 + 0.4 * expressivity
|
|
71
|
+
};
|
|
72
|
+
};
|
|
73
|
+
exports.scales = scales;
|
|
74
|
+
var ease = (perFrame, dt) => {
|
|
75
|
+
'worklet';
|
|
76
|
+
|
|
77
|
+
return 1 - Math.pow(1 - perFrame, dt * 60);
|
|
78
|
+
};
|
|
79
|
+
exports.ease = ease;
|
|
80
|
+
var rem = (x, m) => {
|
|
81
|
+
'worklet';
|
|
82
|
+
|
|
83
|
+
return (x % m + m) % m;
|
|
84
|
+
};
|
|
85
|
+
var easeHsv = (color, target, fraction) => {
|
|
86
|
+
'worklet';
|
|
87
|
+
|
|
88
|
+
var hueStep = (rem(target.hue - color.hue + 1.5, 1) - 0.5) * fraction;
|
|
89
|
+
color.hue = rem(color.hue + hueStep + 1, 1);
|
|
90
|
+
color.saturation += (target.saturation - color.saturation) * fraction;
|
|
91
|
+
color.value += (target.value - color.value) * fraction;
|
|
92
|
+
};
|
|
93
|
+
var slots = colors => {
|
|
94
|
+
'worklet';
|
|
95
|
+
|
|
96
|
+
var _colors$;
|
|
97
|
+
var first = (_colors$ = colors[0]) != null ? _colors$ : {
|
|
98
|
+
hue: 0,
|
|
99
|
+
saturation: 0,
|
|
100
|
+
value: 0
|
|
101
|
+
};
|
|
102
|
+
var result = [];
|
|
103
|
+
for (var i = 0; i < _palette.MAXIMUM_COLORS; i++) {
|
|
104
|
+
var _colors$i;
|
|
105
|
+
result.push((_colors$i = colors[i]) != null ? _colors$i : first);
|
|
106
|
+
}
|
|
107
|
+
return result;
|
|
108
|
+
};
|
|
109
|
+
exports.slots = slots;
|
|
110
|
+
var createDriverState = (input, levelResponse = LEVEL_RESPONSE.steady) => {
|
|
111
|
+
var m = MOTIONS[input.state];
|
|
112
|
+
var s = scales(input.expressivity);
|
|
113
|
+
return {
|
|
114
|
+
baseReact: m.react * s.amplitude,
|
|
115
|
+
bounce: (0, _bounce.createBounce)(),
|
|
116
|
+
bright: m.bright,
|
|
117
|
+
colors: slots(input.colors).map(color => ({
|
|
118
|
+
...color
|
|
119
|
+
})),
|
|
120
|
+
count: input.colors.length,
|
|
121
|
+
expressivity: input.expressivity,
|
|
122
|
+
flow: m.flow * s.amplitude,
|
|
123
|
+
flowSpin: 0,
|
|
124
|
+
hoverAmount: 0,
|
|
125
|
+
hoverX: 0,
|
|
126
|
+
hoverY: 0,
|
|
127
|
+
isHovering: false,
|
|
128
|
+
levelResponse,
|
|
129
|
+
load: m.load * s.amplitude,
|
|
130
|
+
mic: 0,
|
|
131
|
+
orbSpin: 0,
|
|
132
|
+
sat: m.sat,
|
|
133
|
+
speed: m.speed * s.speed,
|
|
134
|
+
tapAge: NO_TAP,
|
|
135
|
+
tapX: 0,
|
|
136
|
+
tapY: 0,
|
|
137
|
+
time: 0,
|
|
138
|
+
voice: 0
|
|
139
|
+
};
|
|
140
|
+
};
|
|
141
|
+
exports.createDriverState = createDriverState;
|
|
142
|
+
var driverReact = d => {
|
|
143
|
+
'worklet';
|
|
144
|
+
|
|
145
|
+
return d.baseReact + (Math.max(d.baseReact, d.mic) - d.baseReact) * d.voice;
|
|
146
|
+
};
|
|
147
|
+
exports.driverReact = driverReact;
|
|
148
|
+
var driverScale = d => {
|
|
149
|
+
'worklet';
|
|
150
|
+
|
|
151
|
+
return (0, _bounce.bounceScale)(d.bounce);
|
|
152
|
+
};
|
|
153
|
+
exports.driverScale = driverScale;
|
|
154
|
+
var tapDriver = (d, input, x, y) => {
|
|
155
|
+
'worklet';
|
|
156
|
+
|
|
157
|
+
if (input.reduceMotion) return;
|
|
158
|
+
d.tapX = x;
|
|
159
|
+
d.tapY = y;
|
|
160
|
+
d.tapAge = 0;
|
|
161
|
+
(0, _bounce.startBounce)(d.bounce);
|
|
162
|
+
};
|
|
163
|
+
exports.tapDriver = tapDriver;
|
|
164
|
+
var hoverDriver = (d, input, x, y) => {
|
|
165
|
+
'worklet';
|
|
166
|
+
|
|
167
|
+
if (x === null || y === null || input.reduceMotion) {
|
|
168
|
+
d.isHovering = false;
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
d.hoverX = x;
|
|
172
|
+
d.hoverY = y;
|
|
173
|
+
d.isHovering = true;
|
|
174
|
+
};
|
|
175
|
+
exports.hoverDriver = hoverDriver;
|
|
176
|
+
var advanceDriver = (d, input, seconds) => {
|
|
177
|
+
'worklet';
|
|
178
|
+
var _input$audioLevel;
|
|
179
|
+
var dt = Math.min(Math.max(seconds, 0), MAX_FRAME);
|
|
180
|
+
if (input.reduceMotion) d.isHovering = false;
|
|
181
|
+
var m = MOTIONS[input.state];
|
|
182
|
+
var s = scales(input.expressivity);
|
|
183
|
+
var drivers = ease(DRIVERS, dt);
|
|
184
|
+
d.speed += (m.speed * s.speed - d.speed) * drivers;
|
|
185
|
+
d.bright += (m.bright - d.bright) * drivers;
|
|
186
|
+
d.sat += (m.sat - d.sat) * drivers;
|
|
187
|
+
d.load += (m.load * s.amplitude - d.load) * drivers;
|
|
188
|
+
d.flow += (m.flow * s.amplitude - d.flow) * drivers;
|
|
189
|
+
d.baseReact += (m.react * s.amplitude - d.baseReact) * drivers;
|
|
190
|
+
d.expressivity += (input.expressivity - d.expressivity) * drivers;
|
|
191
|
+
var step = dt * (input.reduceMotion ? REDUCED : 1) * d.speed;
|
|
192
|
+
d.time += step;
|
|
193
|
+
d.flowSpin += step * d.flow;
|
|
194
|
+
d.orbSpin += step * (1 + 0.5 * d.flow + 0.1 * d.baseReact);
|
|
195
|
+
d.tapAge += dt;
|
|
196
|
+
(0, _bounce.advanceBounce)(d.bounce, dt);
|
|
197
|
+
var gentle = ease(GENTLE, dt);
|
|
198
|
+
d.hoverAmount += ((d.isHovering ? 1 : 0) - d.hoverAmount) * gentle;
|
|
199
|
+
d.voice += ((input.audioLevel === null ? 0 : 1) - d.voice) * ease(VOICE, dt);
|
|
200
|
+
var level = (_input$audioLevel = input.audioLevel) != null ? _input$audioLevel : 0;
|
|
201
|
+
var response = level > d.mic ? d.levelResponse.rise : d.levelResponse.fall;
|
|
202
|
+
d.mic += (level - d.mic) * ease(response, dt);
|
|
203
|
+
var targets = slots(input.colors);
|
|
204
|
+
for (var i = 0; i < d.colors.length; i++) easeHsv(d.colors[i], targets[i], gentle);
|
|
205
|
+
d.count += (input.colors.length - d.count) * gentle;
|
|
206
|
+
};
|
|
207
|
+
exports.advanceDriver = advanceDriver;
|
|
208
|
+
//# sourceMappingURL=driver.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_bounce","require","_palette","LEVEL_RESPONSE","exports","steady","fall","rise","smooth","MOTIONS","connecting","bright","flow","load","react","sat","speed","idle","listening","speaking","thinking","NO_TAP","MAX_FRAME","REDUCED","DRIVERS","GENTLE","VOICE","scales","expressivity","amplitude","ease","perFrame","dt","Math","pow","rem","x","m","easeHsv","color","target","fraction","hueStep","hue","saturation","value","slots","colors","_colors$","first","result","i","MAXIMUM_COLORS","_colors$i","push","createDriverState","input","levelResponse","state","s","baseReact","bounce","createBounce","map","count","length","flowSpin","hoverAmount","hoverX","hoverY","isHovering","mic","orbSpin","tapAge","tapX","tapY","time","voice","driverReact","d","max","driverScale","bounceScale","tapDriver","y","reduceMotion","startBounce","hoverDriver","advanceDriver","seconds","_input$audioLevel","min","drivers","step","advanceBounce","gentle","audioLevel","level","response","targets"],"sourceRoot":"../../../../src","sources":["ai-components/voice-visualization/driver.ts"],"mappings":";;;;AAAA,IAAAA,OAAA,GAAAC,OAAA;AACA,IAAAC,QAAA,GAAAD,OAAA;AASO,IAAME,cAAc,GAAAC,OAAA,CAAAD,cAAA,GAAG;EAE5BE,MAAM,EAAE;IAAEC,IAAI,EAAE,IAAI;IAAEC,IAAI,EAAE;EAAK,CAAC;EAKlCC,MAAM,EAAE;IAAEF,IAAI,EAAE,IAAI;IAAEC,IAAI,EAAE;EAAK;AACnC,CAAyC;AAyDzC,IAAME,OAA6C,GAAG;EACpDC,UAAU,EAAE;IAAEC,MAAM,EAAE,CAAC;IAAEC,IAAI,EAAE,CAAC;IAAEC,IAAI,EAAE,CAAC;IAAEC,KAAK,EAAE,CAAC;IAAEC,GAAG,EAAE,CAAC;IAAEC,KAAK,EAAE;EAAE,C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