stream-chat-react-native-core 6.0.0-rc.8 → 6.0.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/README.md +1 -1
- package/lib/commonjs/components/AITypingIndicatorView/AITypingIndicatorView.js +53 -0
- package/lib/commonjs/components/AITypingIndicatorView/AITypingIndicatorView.js.map +1 -0
- package/lib/commonjs/components/AITypingIndicatorView/hooks/useAIState.js +59 -0
- package/lib/commonjs/components/AITypingIndicatorView/hooks/useAIState.js.map +1 -0
- package/lib/commonjs/components/AITypingIndicatorView/index.js +26 -0
- package/lib/commonjs/components/AITypingIndicatorView/index.js.map +1 -0
- package/lib/commonjs/components/Attachment/AudioAttachment.js +27 -22
- package/lib/commonjs/components/Attachment/AudioAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +3 -1
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +2 -2
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +37 -133
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +6 -4
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +483 -1056
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useChannelDataState.js +174 -0
- package/lib/commonjs/components/Channel/hooks/useChannelDataState.js.map +1 -0
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +0 -6
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -0
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +4 -0
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js +3 -3
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useMessageListPagination.js +324 -0
- package/lib/commonjs/components/Channel/hooks/useMessageListPagination.js.map +1 -0
- package/lib/commonjs/components/ChannelList/Skeleton.js +7 -3
- package/lib/commonjs/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +85 -45
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +17 -91
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +3 -24
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +2 -2
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewData.js +121 -0
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewData.js.map +1 -0
- package/lib/commonjs/components/ChannelPreview/hooks/useIsChannelMuted.js +35 -0
- package/lib/commonjs/components/ChannelPreview/hooks/useIsChannelMuted.js.map +1 -0
- package/lib/commonjs/components/Chat/Chat.js +5 -1
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js +15 -9
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +2 -0
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js +0 -4
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +46 -46
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +3 -4
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/hooks/useAnimatedGalleryStyle.js +2 -2
- package/lib/commonjs/components/ImageGallery/hooks/useAnimatedGalleryStyle.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +7 -0
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +17 -4
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +15 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/StreamingMessageView.js +36 -0
- package/lib/commonjs/components/Message/MessageSimple/StreamingMessageView.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.js +9 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/generateMarkdownText.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +209 -23
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +2 -0
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useStreamingMessage.js +43 -0
- package/lib/commonjs/components/Message/hooks/useStreamingMessage.js.map +1 -0
- package/lib/commonjs/components/MessageInput/MessageInput.js +41 -21
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/StopMessageStreamingButton.js +39 -0
- package/lib/commonjs/components/MessageInput/StopMessageStreamingButton.js.map +1 -0
- package/lib/commonjs/components/MessageList/MessageList.js +74 -73
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js +4 -2
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/hooks/useFetchReactions.js +3 -2
- package/lib/commonjs/components/MessageMenu/hooks/useFetchReactions.js.map +1 -1
- package/lib/commonjs/components/Poll/CreatePollContent.js +14 -9
- package/lib/commonjs/components/Poll/CreatePollContent.js.map +1 -1
- package/lib/commonjs/components/Poll/Poll.js +2 -8
- package/lib/commonjs/components/Poll/Poll.js.map +1 -1
- package/lib/commonjs/components/Poll/components/Button.js +9 -474
- package/lib/commonjs/components/Poll/components/Button.js.map +1 -1
- package/lib/commonjs/components/Poll/components/CreatePollIcon.js +2 -2
- package/lib/commonjs/components/Poll/components/CreatePollIcon.js.map +1 -1
- package/lib/commonjs/components/Poll/components/CreatePollOptions.js +9 -4
- package/lib/commonjs/components/Poll/components/CreatePollOptions.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollAnswersList.js +99 -26
- package/lib/commonjs/components/Poll/components/PollAnswersList.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollButtons.js +291 -0
- package/lib/commonjs/components/Poll/components/PollButtons.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollInputDialog.js +14 -4
- package/lib/commonjs/components/Poll/components/PollInputDialog.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollModalHeader.js +7 -1
- package/lib/commonjs/components/Poll/components/PollModalHeader.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollOption.js +88 -6
- package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js +2 -2
- package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollResultItem.js +62 -67
- package/lib/commonjs/components/Poll/components/PollResults/PollResultItem.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollVote.js +89 -0
- package/lib/commonjs/components/Poll/components/PollResults/PollVote.js.map +1 -0
- package/lib/commonjs/components/Poll/components/index.js +11 -0
- package/lib/commonjs/components/Poll/components/index.js.map +1 -1
- package/lib/commonjs/components/ThreadList/ThreadList.js +0 -3
- package/lib/commonjs/components/ThreadList/ThreadList.js.map +1 -1
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js +11 -5
- package/lib/commonjs/components/UIComponents/BottomSheetModal.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/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +0 -35
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js +7 -84
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +4 -2
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -0
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +15 -0
- 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/mock-builders/event/notificationChannelMutesUpdated.js +14 -0
- package/lib/commonjs/mock-builders/event/notificationChannelMutesUpdated.js.map +1 -0
- package/lib/commonjs/mock-builders/event/notificationMarkRead.js +14 -0
- package/lib/commonjs/mock-builders/event/notificationMarkRead.js.map +1 -0
- package/lib/commonjs/mock-builders/event/notificationMarkUnread.js +17 -0
- package/lib/commonjs/mock-builders/event/notificationMarkUnread.js.map +1 -0
- package/lib/commonjs/mock-builders/generator/channel.js +1 -0
- package/lib/commonjs/mock-builders/generator/channel.js.map +1 -1
- package/lib/commonjs/store/SqliteClient.js +11 -2
- package/lib/commonjs/store/SqliteClient.js.map +1 -1
- package/lib/commonjs/utils/getTrimmedAttachmentTitle.js +8 -2
- package/lib/commonjs/utils/getTrimmedAttachmentTitle.js.map +1 -1
- package/lib/commonjs/utils/utils.js +3 -2
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/AITypingIndicatorView/AITypingIndicatorView.js +53 -0
- package/lib/module/components/AITypingIndicatorView/AITypingIndicatorView.js.map +1 -0
- package/lib/module/components/AITypingIndicatorView/hooks/useAIState.js +59 -0
- package/lib/module/components/AITypingIndicatorView/hooks/useAIState.js.map +1 -0
- package/lib/module/components/AITypingIndicatorView/index.js +26 -0
- package/lib/module/components/AITypingIndicatorView/index.js.map +1 -0
- package/lib/module/components/Attachment/AudioAttachment.js +27 -22
- package/lib/module/components/Attachment/AudioAttachment.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +3 -1
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +2 -2
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +37 -133
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +6 -4
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +483 -1056
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useChannelDataState.js +174 -0
- package/lib/module/components/Channel/hooks/useChannelDataState.js.map +1 -0
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js +0 -6
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -0
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +4 -0
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js +3 -3
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useMessageListPagination.js +324 -0
- package/lib/module/components/Channel/hooks/useMessageListPagination.js.map +1 -0
- package/lib/module/components/ChannelList/Skeleton.js +7 -3
- package/lib/module/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +85 -45
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +17 -91
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +3 -24
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +2 -2
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewData.js +121 -0
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewData.js.map +1 -0
- package/lib/module/components/ChannelPreview/hooks/useIsChannelMuted.js +35 -0
- package/lib/module/components/ChannelPreview/hooks/useIsChannelMuted.js.map +1 -0
- package/lib/module/components/Chat/Chat.js +5 -1
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/useAppSettings.js +15 -9
- package/lib/module/components/Chat/hooks/useAppSettings.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +2 -0
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js +0 -4
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +46 -46
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +3 -4
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/hooks/useAnimatedGalleryStyle.js +2 -2
- package/lib/module/components/ImageGallery/hooks/useAnimatedGalleryStyle.js.map +1 -1
- package/lib/module/components/Message/Message.js +7 -0
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +17 -4
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +15 -6
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/StreamingMessageView.js +36 -0
- package/lib/module/components/Message/MessageSimple/StreamingMessageView.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.js +9 -1
- package/lib/module/components/Message/MessageSimple/utils/generateMarkdownText.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +209 -23
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/hooks/useCreateMessageContext.js +2 -0
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useStreamingMessage.js +43 -0
- package/lib/module/components/Message/hooks/useStreamingMessage.js.map +1 -0
- package/lib/module/components/MessageInput/MessageInput.js +41 -21
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/StopMessageStreamingButton.js +39 -0
- package/lib/module/components/MessageInput/StopMessageStreamingButton.js.map +1 -0
- package/lib/module/components/MessageList/MessageList.js +74 -73
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactions.js +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactions.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js +4 -2
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js.map +1 -1
- package/lib/module/components/MessageMenu/hooks/useFetchReactions.js +3 -2
- package/lib/module/components/MessageMenu/hooks/useFetchReactions.js.map +1 -1
- package/lib/module/components/Poll/CreatePollContent.js +14 -9
- package/lib/module/components/Poll/CreatePollContent.js.map +1 -1
- package/lib/module/components/Poll/Poll.js +2 -8
- package/lib/module/components/Poll/Poll.js.map +1 -1
- package/lib/module/components/Poll/components/Button.js +9 -474
- package/lib/module/components/Poll/components/Button.js.map +1 -1
- package/lib/module/components/Poll/components/CreatePollIcon.js +2 -2
- package/lib/module/components/Poll/components/CreatePollIcon.js.map +1 -1
- package/lib/module/components/Poll/components/CreatePollOptions.js +9 -4
- package/lib/module/components/Poll/components/CreatePollOptions.js.map +1 -1
- package/lib/module/components/Poll/components/PollAnswersList.js +99 -26
- package/lib/module/components/Poll/components/PollAnswersList.js.map +1 -1
- package/lib/module/components/Poll/components/PollButtons.js +291 -0
- package/lib/module/components/Poll/components/PollButtons.js.map +1 -0
- package/lib/module/components/Poll/components/PollInputDialog.js +14 -4
- package/lib/module/components/Poll/components/PollInputDialog.js.map +1 -1
- package/lib/module/components/Poll/components/PollModalHeader.js +7 -1
- package/lib/module/components/Poll/components/PollModalHeader.js.map +1 -1
- package/lib/module/components/Poll/components/PollOption.js +88 -6
- package/lib/module/components/Poll/components/PollOption.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js +2 -2
- package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollResultItem.js +62 -67
- package/lib/module/components/Poll/components/PollResults/PollResultItem.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollVote.js +89 -0
- package/lib/module/components/Poll/components/PollResults/PollVote.js.map +1 -0
- package/lib/module/components/Poll/components/index.js +11 -0
- package/lib/module/components/Poll/components/index.js.map +1 -1
- package/lib/module/components/ThreadList/ThreadList.js +0 -3
- package/lib/module/components/ThreadList/ThreadList.js.map +1 -1
- package/lib/module/components/UIComponents/BottomSheetModal.js +11 -5
- package/lib/module/components/UIComponents/BottomSheetModal.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/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +0 -35
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js +7 -84
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +4 -2
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -0
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +15 -0
- 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/mock-builders/event/notificationChannelMutesUpdated.js +14 -0
- package/lib/module/mock-builders/event/notificationChannelMutesUpdated.js.map +1 -0
- package/lib/module/mock-builders/event/notificationMarkRead.js +14 -0
- package/lib/module/mock-builders/event/notificationMarkRead.js.map +1 -0
- package/lib/module/mock-builders/event/notificationMarkUnread.js +17 -0
- package/lib/module/mock-builders/event/notificationMarkUnread.js.map +1 -0
- package/lib/module/mock-builders/generator/channel.js +1 -0
- package/lib/module/mock-builders/generator/channel.js.map +1 -1
- package/lib/module/store/SqliteClient.js +11 -2
- package/lib/module/store/SqliteClient.js.map +1 -1
- package/lib/module/utils/getTrimmedAttachmentTitle.js +8 -2
- package/lib/module/utils/getTrimmedAttachmentTitle.js.map +1 -1
- package/lib/module/utils/utils.js +3 -2
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/AITypingIndicatorView/AITypingIndicatorView.d.ts +11 -0
- package/lib/typescript/components/AITypingIndicatorView/AITypingIndicatorView.d.ts.map +1 -0
- package/lib/typescript/components/AITypingIndicatorView/hooks/useAIState.d.ts +18 -0
- package/lib/typescript/components/AITypingIndicatorView/hooks/useAIState.d.ts.map +1 -0
- package/lib/typescript/components/AITypingIndicatorView/index.d.ts +3 -0
- package/lib/typescript/components/AITypingIndicatorView/index.d.ts.map +1 -0
- package/lib/typescript/components/Attachment/AudioAttachment.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerItem.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerSelectionBar.d.ts.map +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +7 -6
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useChannelDataState.d.ts +75 -0
- package/lib/typescript/components/Channel/hooks/useChannelDataState.d.ts.map +1 -0
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +128 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useMessageListPagination.d.ts +28 -0
- package/lib/typescript/components/Channel/hooks/useMessageListPagination.d.ts.map +1 -0
- package/lib/typescript/components/ChannelList/Skeleton.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +1 -2
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +2 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts.map +1 -1
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewData.d.ts +8 -0
- package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewData.d.ts.map +1 -0
- package/lib/typescript/components/ChannelPreview/hooks/useIsChannelMuted.d.ts +8 -0
- package/lib/typescript/components/ChannelPreview/hooks/useIsChannelMuted.d.ts.map +1 -0
- package/lib/typescript/components/Chat/Chat.d.ts +7 -1
- package/lib/typescript/components/Chat/Chat.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useAppSettings.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/lib/typescript/components/Message/Message.d.ts +1 -1
- package/lib/typescript/components/Message/Message.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/StreamingMessageView.d.ts +12 -0
- package/lib/typescript/components/Message/MessageSimple/StreamingMessageView.d.ts.map +1 -0
- package/lib/typescript/components/Message/MessageSimple/utils/generateMarkdownText.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +16 -1
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useStreamingMessage.d.ts +17 -0
- package/lib/typescript/components/Message/hooks/useStreamingMessage.d.ts.map +1 -0
- 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/StopMessageStreamingButton.d.ts +10 -0
- package/lib/typescript/components/MessageInput/StopMessageStreamingButton.d.ts.map +1 -0
- package/lib/typescript/components/MessageList/MessageList.d.ts +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +1 -1
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/hooks/useFetchReactions.d.ts +3 -2
- package/lib/typescript/components/MessageMenu/hooks/useFetchReactions.d.ts.map +1 -1
- package/lib/typescript/components/Poll/Poll.d.ts +0 -1
- package/lib/typescript/components/Poll/Poll.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/Button.d.ts +0 -17
- package/lib/typescript/components/Poll/components/Button.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/CreatePollOptions.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollAnswersList.d.ts +2 -0
- package/lib/typescript/components/Poll/components/PollAnswersList.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollButtons.d.ts +10 -0
- package/lib/typescript/components/Poll/components/PollButtons.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollInputDialog.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollOption.d.ts +2 -0
- package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollResults/PollResultItem.d.ts +11 -4
- package/lib/typescript/components/Poll/components/PollResults/PollResultItem.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollResults/PollVote.d.ts +6 -0
- package/lib/typescript/components/Poll/components/PollResults/PollVote.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/index.d.ts +1 -0
- package/lib/typescript/components/Poll/components/index.d.ts.map +1 -1
- package/lib/typescript/components/ThreadList/ThreadList.d.ts.map +1 -1
- package/lib/typescript/components/UIComponents/BottomSheetModal.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/channelContext/ChannelContext.d.ts +27 -37
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +0 -16
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +7 -13
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts.map +1 -1
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +2 -1
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +4 -0
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +2 -1
- 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/messagesContext/MessagesContext.d.ts +8 -4
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts.map +1 -1
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +17 -16
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts.map +1 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +16 -1
- 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/store/SqliteClient.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +3 -0
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/utils/getTrimmedAttachmentTitle.d.ts.map +1 -1
- package/lib/typescript/utils/i18n/Streami18n.d.ts +2 -0
- package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
- package/lib/typescript/utils/utils.d.ts.map +1 -1
- package/package.json +5 -5
- package/src/components/AITypingIndicatorView/AITypingIndicatorView.tsx +50 -0
- package/src/components/AITypingIndicatorView/hooks/useAIState.ts +68 -0
- package/src/components/AITypingIndicatorView/index.ts +2 -0
- package/src/components/Attachment/AudioAttachment.tsx +20 -19
- package/src/components/Attachment/Gallery.tsx +1 -1
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +7 -2
- package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx +16 -32
- package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx +3 -5
- package/src/components/Channel/Channel.tsx +262 -835
- package/src/components/Channel/__tests__/Channel.test.js +244 -13
- package/src/components/Channel/__tests__/useMessageListPagination.test.js +419 -0
- package/src/components/Channel/hooks/useChannelDataState.ts +235 -0
- package/src/components/Channel/hooks/useCreateChannelContext.ts +0 -6
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +2 -0
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +4 -0
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +3 -10
- package/src/components/Channel/hooks/useMessageListPagination.tsx +246 -0
- package/src/components/ChannelList/Skeleton.tsx +9 -1
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +37 -30
- package/src/components/ChannelPreview/ChannelPreview.tsx +28 -107
- package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +5 -15
- package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +2 -7
- package/src/components/ChannelPreview/__tests__/ChannelPreview.test.tsx +226 -10
- package/src/components/ChannelPreview/hooks/__tests__/useChannelPreviewDisplayName.test.tsx +1 -1
- package/src/components/ChannelPreview/hooks/__tests__/useChannelPreviewMuted.test.tsx +62 -0
- package/src/components/ChannelPreview/hooks/useChannelPreviewData.ts +138 -0
- package/src/components/ChannelPreview/hooks/useIsChannelMuted.ts +29 -0
- package/src/components/Chat/Chat.tsx +11 -2
- package/src/components/Chat/hooks/__tests__/useAppSettings.test.tsx +1 -0
- package/src/components/Chat/hooks/useAppSettings.ts +2 -0
- package/src/components/Chat/hooks/useCreateChatContext.ts +2 -0
- package/src/components/Chat/hooks/useIsOnline.ts +0 -5
- package/src/components/ImageGallery/ImageGallery.tsx +1 -0
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +32 -32
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +5 -6
- package/src/components/ImageGallery/hooks/useAnimatedGalleryStyle.tsx +2 -2
- package/src/components/Message/Message.tsx +16 -2
- package/src/components/Message/MessageSimple/MessageContent.tsx +22 -2
- package/src/components/Message/MessageSimple/MessageFooter.tsx +16 -5
- package/src/components/Message/MessageSimple/StreamingMessageView.tsx +34 -0
- package/src/components/Message/MessageSimple/utils/generateMarkdownText.ts +15 -1
- package/src/components/Message/MessageSimple/utils/renderText.tsx +207 -3
- package/src/components/Message/hooks/useCreateMessageContext.ts +2 -0
- package/src/components/Message/hooks/useStreamingMessage.ts +54 -0
- package/src/components/MessageInput/MessageInput.tsx +38 -20
- package/src/components/MessageInput/StopMessageStreamingButton.tsx +34 -0
- package/src/components/MessageInput/__tests__/MessageInput.test.js +116 -2
- package/src/components/MessageList/MessageList.tsx +53 -85
- package/src/components/MessageList/ScrollToBottomButton.tsx +1 -1
- package/src/components/MessageList/__tests__/MessageList.test.js +174 -2
- package/src/components/MessageList/__tests__/ScrollToBottomButton.test.js +3 -3
- package/src/components/MessageList/__tests__/__snapshots__/ScrollToBottomButton.test.js.snap +1 -1
- package/src/components/MessageList/hooks/useMessageList.ts +2 -5
- package/src/components/MessageList/utils/getReadStates.ts +3 -2
- package/src/components/MessageMenu/MessageUserReactions.tsx +1 -1
- package/src/components/MessageMenu/MessageUserReactionsItem.tsx +4 -2
- package/src/components/MessageMenu/hooks/useFetchReactions.ts +6 -3
- package/src/components/Poll/CreatePollContent.tsx +4 -4
- package/src/components/Poll/Poll.tsx +1 -20
- package/src/components/Poll/components/Button.tsx +8 -420
- package/src/components/Poll/components/CreatePollIcon.tsx +1 -1
- package/src/components/Poll/components/CreatePollOptions.tsx +9 -4
- package/src/components/Poll/components/PollAnswersList.tsx +66 -3
- package/src/components/Poll/components/PollButtons.tsx +241 -0
- package/src/components/Poll/components/PollInputDialog.tsx +9 -6
- package/src/components/Poll/components/PollModalHeader.tsx +3 -3
- package/src/components/Poll/components/PollOption.tsx +74 -4
- package/src/components/Poll/components/PollResults/PollOptionFullResults.tsx +1 -1
- package/src/components/Poll/components/PollResults/PollResultItem.tsx +68 -52
- package/src/components/Poll/components/PollResults/PollVote.tsx +68 -0
- package/src/components/Poll/components/index.ts +1 -0
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +37 -4
- package/src/components/ThreadList/ThreadList.tsx +0 -2
- package/src/components/UIComponents/BottomSheetModal.tsx +7 -3
- package/src/components/index.ts +7 -0
- package/src/contexts/channelContext/ChannelContext.tsx +35 -37
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +1 -67
- package/src/contexts/channelsStateContext/useChannelState.ts +6 -108
- package/src/contexts/chatContext/ChatContext.tsx +2 -1
- package/src/contexts/messageContext/MessageContext.tsx +4 -0
- package/src/contexts/messageInputContext/MessageInputContext.tsx +5 -1
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +2 -0
- package/src/contexts/messagesContext/MessagesContext.tsx +8 -3
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +17 -16
- package/src/contexts/themeContext/utils/theme.ts +30 -1
- 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/mock-builders/event/notificationChannelMutesUpdated.js +7 -0
- package/src/mock-builders/event/notificationMarkRead.js +7 -0
- package/src/mock-builders/event/notificationMarkUnread.js +9 -0
- package/src/mock-builders/generator/channel.ts +1 -0
- package/src/store/SqliteClient.ts +5 -1
- package/src/types/types.ts +3 -0
- package/src/utils/getTrimmedAttachmentTitle.ts +10 -2
- package/src/utils/utils.ts +5 -2
- package/src/version.json +1 -1
|
@@ -475,9 +475,12 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
475
475
|
}
|
|
476
476
|
>
|
|
477
477
|
<Text
|
|
478
|
-
numberOfLines={5}
|
|
479
478
|
style={
|
|
480
479
|
{
|
|
480
|
+
"alignItems": "flex-start",
|
|
481
|
+
"flexDirection": "row",
|
|
482
|
+
"flexWrap": "wrap",
|
|
483
|
+
"justifyContent": "flex-start",
|
|
481
484
|
"marginBottom": 8,
|
|
482
485
|
"marginTop": 8,
|
|
483
486
|
}
|
|
@@ -575,6 +578,13 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
575
578
|
]
|
|
576
579
|
}
|
|
577
580
|
/>
|
|
581
|
+
<View
|
|
582
|
+
style={
|
|
583
|
+
[
|
|
584
|
+
undefined,
|
|
585
|
+
]
|
|
586
|
+
}
|
|
587
|
+
/>
|
|
578
588
|
</View>
|
|
579
589
|
<View
|
|
580
590
|
onFocusCapture={[Function]}
|
|
@@ -823,9 +833,12 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
823
833
|
}
|
|
824
834
|
>
|
|
825
835
|
<Text
|
|
826
|
-
numberOfLines={5}
|
|
827
836
|
style={
|
|
828
837
|
{
|
|
838
|
+
"alignItems": "flex-start",
|
|
839
|
+
"flexDirection": "row",
|
|
840
|
+
"flexWrap": "wrap",
|
|
841
|
+
"justifyContent": "flex-start",
|
|
829
842
|
"marginBottom": 8,
|
|
830
843
|
"marginTop": 8,
|
|
831
844
|
}
|
|
@@ -923,6 +936,13 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
923
936
|
]
|
|
924
937
|
}
|
|
925
938
|
/>
|
|
939
|
+
<View
|
|
940
|
+
style={
|
|
941
|
+
[
|
|
942
|
+
undefined,
|
|
943
|
+
]
|
|
944
|
+
}
|
|
945
|
+
/>
|
|
926
946
|
</View>
|
|
927
947
|
<View
|
|
928
948
|
onFocusCapture={[Function]}
|
|
@@ -1171,9 +1191,12 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
1171
1191
|
}
|
|
1172
1192
|
>
|
|
1173
1193
|
<Text
|
|
1174
|
-
numberOfLines={5}
|
|
1175
1194
|
style={
|
|
1176
1195
|
{
|
|
1196
|
+
"alignItems": "flex-start",
|
|
1197
|
+
"flexDirection": "row",
|
|
1198
|
+
"flexWrap": "wrap",
|
|
1199
|
+
"justifyContent": "flex-start",
|
|
1177
1200
|
"marginBottom": 8,
|
|
1178
1201
|
"marginTop": 8,
|
|
1179
1202
|
}
|
|
@@ -1302,6 +1325,13 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
1302
1325
|
05/05/2020
|
|
1303
1326
|
</Text>
|
|
1304
1327
|
</View>
|
|
1328
|
+
<View
|
|
1329
|
+
style={
|
|
1330
|
+
[
|
|
1331
|
+
undefined,
|
|
1332
|
+
]
|
|
1333
|
+
}
|
|
1334
|
+
/>
|
|
1305
1335
|
</View>
|
|
1306
1336
|
<View
|
|
1307
1337
|
onLayout={[Function]}
|
|
@@ -1553,9 +1583,12 @@ exports[`Thread should match thread snapshot 1`] = `
|
|
|
1553
1583
|
}
|
|
1554
1584
|
>
|
|
1555
1585
|
<Text
|
|
1556
|
-
numberOfLines={5}
|
|
1557
1586
|
style={
|
|
1558
1587
|
{
|
|
1588
|
+
"alignItems": "flex-start",
|
|
1589
|
+
"flexDirection": "row",
|
|
1590
|
+
"flexWrap": "wrap",
|
|
1591
|
+
"justifyContent": "flex-start",
|
|
1559
1592
|
"marginBottom": 8,
|
|
1560
1593
|
"marginTop": 8,
|
|
1561
1594
|
}
|
|
@@ -45,6 +45,7 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
|
|
|
45
45
|
const { children, height = windowHeight / 2, onClose, visible } = props;
|
|
46
46
|
const {
|
|
47
47
|
theme: {
|
|
48
|
+
bottomSheetModal: { container, contentContainer, handle, overlay: overlayTheme },
|
|
48
49
|
colors: { grey, overlay, white_snow },
|
|
49
50
|
},
|
|
50
51
|
} = useTheme();
|
|
@@ -121,7 +122,7 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
|
|
|
121
122
|
<Modal animationType='fade' onRequestClose={handleDismiss} transparent visible={visible}>
|
|
122
123
|
<GestureHandlerRootView style={{ flex: 1 }}>
|
|
123
124
|
<TouchableWithoutFeedback onPress={handleDismiss}>
|
|
124
|
-
<View style={[styles.overlay, { backgroundColor: overlay }]}>
|
|
125
|
+
<View style={[styles.overlay, { backgroundColor: overlay }, overlayTheme]}>
|
|
125
126
|
<GestureDetector gesture={gesture}>
|
|
126
127
|
<Animated.View
|
|
127
128
|
style={[
|
|
@@ -131,10 +132,13 @@ export const BottomSheetModal = (props: PropsWithChildren<BottomSheetModalProps>
|
|
|
131
132
|
height,
|
|
132
133
|
transform: [{ translateY }],
|
|
133
134
|
},
|
|
135
|
+
container,
|
|
134
136
|
]}
|
|
135
137
|
>
|
|
136
|
-
<View
|
|
137
|
-
|
|
138
|
+
<View
|
|
139
|
+
style={[styles.handle, { backgroundColor: grey, width: windowWidth / 4 }, handle]}
|
|
140
|
+
/>
|
|
141
|
+
<View style={[styles.contentContainer, contentContainer]}>{children}</View>
|
|
138
142
|
</Animated.View>
|
|
139
143
|
</GestureDetector>
|
|
140
144
|
</View>
|
package/src/components/index.ts
CHANGED
|
@@ -67,6 +67,8 @@ export * from './ChannelPreview/hooks/useChannelPreviewDisplayAvatar';
|
|
|
67
67
|
export * from './ChannelPreview/hooks/useChannelPreviewDisplayName';
|
|
68
68
|
export * from './ChannelPreview/hooks/useChannelPreviewDisplayPresence';
|
|
69
69
|
export * from './ChannelPreview/hooks/useLatestMessagePreview';
|
|
70
|
+
export * from './ChannelPreview/hooks/useChannelPreviewData';
|
|
71
|
+
export * from './ChannelPreview/hooks/useIsChannelMuted';
|
|
70
72
|
|
|
71
73
|
export * from './Chat/Chat';
|
|
72
74
|
export * from './Chat/hooks/useCreateChatClient';
|
|
@@ -95,6 +97,7 @@ export * from './KeyboardCompatibleView/KeyboardCompatibleView';
|
|
|
95
97
|
export * from './Message/hooks/useCreateMessageContext';
|
|
96
98
|
export * from './Message/hooks/useMessageActions';
|
|
97
99
|
export * from './Message/hooks/useMessageActionHandlers';
|
|
100
|
+
export * from './Message/hooks/useStreamingMessage';
|
|
98
101
|
export * from './Message/Message';
|
|
99
102
|
export * from './Message/MessageSimple/MessageAvatar';
|
|
100
103
|
export * from './Message/MessageSimple/MessageBounce';
|
|
@@ -131,6 +134,7 @@ export * from './MessageInput/InputButtons';
|
|
|
131
134
|
export * from './MessageInput/MessageInput';
|
|
132
135
|
export * from './MessageInput/MoreOptionsButton';
|
|
133
136
|
export * from './MessageInput/SendButton';
|
|
137
|
+
export * from './MessageInput/StopMessageStreamingButton';
|
|
134
138
|
export * from './MessageInput/ShowThreadMessageInChannelButton';
|
|
135
139
|
export * from './MessageInput/UploadProgressIndicator';
|
|
136
140
|
|
|
@@ -171,3 +175,6 @@ export * from './UIComponents/Spinner';
|
|
|
171
175
|
export * from './Thread/Thread';
|
|
172
176
|
export * from './Thread/components/ThreadFooterComponent';
|
|
173
177
|
export * from './ThreadList/ThreadList';
|
|
178
|
+
|
|
179
|
+
export * from './Message/MessageSimple/StreamingMessageView';
|
|
180
|
+
export * from './AITypingIndicatorView';
|
|
@@ -59,26 +59,21 @@ export type ChannelContextValue<
|
|
|
59
59
|
*/
|
|
60
60
|
hideDateSeparators: boolean;
|
|
61
61
|
hideStickyDateHeader: boolean;
|
|
62
|
-
/**
|
|
63
|
-
* Returns true if the current user has admin privileges
|
|
64
|
-
*/
|
|
65
|
-
isAdmin: boolean;
|
|
66
|
-
/**
|
|
67
|
-
* Returns true if the current user is a moderator
|
|
68
|
-
*/
|
|
69
|
-
isModerator: boolean;
|
|
70
|
-
/**
|
|
71
|
-
* Returns true if the current user is a owner
|
|
72
|
-
*/
|
|
73
|
-
isOwner: boolean;
|
|
74
62
|
/**
|
|
75
63
|
* Loads channel around a specific message
|
|
76
64
|
*
|
|
77
65
|
* @param messageId If undefined, channel will be loaded at most recent message.
|
|
78
66
|
*/
|
|
79
|
-
loadChannelAroundMessage: ({
|
|
67
|
+
loadChannelAroundMessage: ({
|
|
68
|
+
limit,
|
|
69
|
+
messageId,
|
|
70
|
+
setTargetedMessage,
|
|
71
|
+
}: {
|
|
72
|
+
limit?: number;
|
|
73
|
+
messageId?: string;
|
|
74
|
+
setTargetedMessage?: (messageId: string) => void;
|
|
75
|
+
}) => Promise<void>;
|
|
80
76
|
|
|
81
|
-
loading: boolean;
|
|
82
77
|
/**
|
|
83
78
|
* Custom loading indicator to override the Stream default
|
|
84
79
|
*/
|
|
@@ -125,6 +120,31 @@ export type ChannelContextValue<
|
|
|
125
120
|
* Its a map of filename and AbortController
|
|
126
121
|
*/
|
|
127
122
|
uploadAbortControllerRef: React.MutableRefObject<Map<string, AbortController>>;
|
|
123
|
+
disabled?: boolean;
|
|
124
|
+
enableMessageGroupingByUser?: boolean;
|
|
125
|
+
isChannelActive?: boolean;
|
|
126
|
+
lastRead?: Date;
|
|
127
|
+
|
|
128
|
+
loading?: boolean;
|
|
129
|
+
/**
|
|
130
|
+
* Maximum time in milliseconds that should occur between messages
|
|
131
|
+
* to still consider them grouped together
|
|
132
|
+
*/
|
|
133
|
+
maxTimeBetweenGroupedMessages?: number;
|
|
134
|
+
/**
|
|
135
|
+
* Custom UI component for sticky header of channel.
|
|
136
|
+
*
|
|
137
|
+
* **Default** [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/DateHeader.tsx)
|
|
138
|
+
*/
|
|
139
|
+
StickyHeader?: React.ComponentType<StickyHeaderProps>;
|
|
140
|
+
|
|
141
|
+
/**
|
|
142
|
+
* Id of message, around which Channel/MessageList gets loaded when opened.
|
|
143
|
+
* You will see a highlighted background for targetted message, when opened.
|
|
144
|
+
*/
|
|
145
|
+
targetedMessage?: string;
|
|
146
|
+
threadList?: boolean;
|
|
147
|
+
watcherCount?: ChannelState<StreamChatGenerics>['watcher_count'];
|
|
128
148
|
/**
|
|
129
149
|
*
|
|
130
150
|
* ```json
|
|
@@ -148,29 +168,7 @@ export type ChannelContextValue<
|
|
|
148
168
|
* }
|
|
149
169
|
* ```
|
|
150
170
|
*/
|
|
151
|
-
watchers
|
|
152
|
-
disabled?: boolean;
|
|
153
|
-
enableMessageGroupingByUser?: boolean;
|
|
154
|
-
isChannelActive?: boolean;
|
|
155
|
-
lastRead?: Date;
|
|
156
|
-
/**
|
|
157
|
-
* Maximum time in milliseconds that should occur between messages
|
|
158
|
-
* to still consider them grouped together
|
|
159
|
-
*/
|
|
160
|
-
maxTimeBetweenGroupedMessages?: number;
|
|
161
|
-
/**
|
|
162
|
-
* Custom UI component for sticky header of channel.
|
|
163
|
-
*
|
|
164
|
-
* **Default** [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/DateHeader.tsx)
|
|
165
|
-
*/
|
|
166
|
-
StickyHeader?: React.ComponentType<StickyHeaderProps>;
|
|
167
|
-
/**
|
|
168
|
-
* Id of message, around which Channel/MessageList gets loaded when opened.
|
|
169
|
-
* You will see a highlighted background for targetted message, when opened.
|
|
170
|
-
*/
|
|
171
|
-
targetedMessage?: string;
|
|
172
|
-
threadList?: boolean;
|
|
173
|
-
watcherCount?: ChannelState<StreamChatGenerics>['watcher_count'];
|
|
171
|
+
watchers?: ChannelState<StreamChatGenerics>['watchers'];
|
|
174
172
|
};
|
|
175
173
|
|
|
176
174
|
export const ChannelContext = React.createContext(
|
|
@@ -11,10 +11,7 @@ import React, {
|
|
|
11
11
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
12
12
|
import { ActiveChannelsProvider } from '../activeChannelsRefContext/ActiveChannelsRefContext';
|
|
13
13
|
|
|
14
|
-
import type { ChannelContextValue } from '../channelContext/ChannelContext';
|
|
15
|
-
import type { PaginatedMessageListContextValue } from '../paginatedMessageListContext/PaginatedMessageListContext';
|
|
16
14
|
import type { ThreadContextValue } from '../threadContext/ThreadContext';
|
|
17
|
-
import type { TypingContextValue } from '../typingContext/TypingContext';
|
|
18
15
|
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
|
|
19
16
|
|
|
20
17
|
import { isTestEnvironment } from '../utils/isTestEnvironment';
|
|
@@ -22,14 +19,7 @@ import { isTestEnvironment } from '../utils/isTestEnvironment';
|
|
|
22
19
|
export type ChannelState<
|
|
23
20
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
24
21
|
> = {
|
|
25
|
-
members: ChannelContextValue<StreamChatGenerics>['members'];
|
|
26
|
-
messages: PaginatedMessageListContextValue<StreamChatGenerics>['messages'];
|
|
27
|
-
read: ChannelContextValue<StreamChatGenerics>['read'];
|
|
28
|
-
subscriberCount: number;
|
|
29
22
|
threadMessages: ThreadContextValue<StreamChatGenerics>['threadMessages'];
|
|
30
|
-
typing: TypingContextValue<StreamChatGenerics>['typing'];
|
|
31
|
-
watcherCount: ChannelContextValue<StreamChatGenerics>['watcherCount'];
|
|
32
|
-
watchers: ChannelContextValue<StreamChatGenerics>['watchers'];
|
|
33
23
|
};
|
|
34
24
|
|
|
35
25
|
type ChannelsState<
|
|
@@ -56,25 +46,12 @@ type SetStateAction<
|
|
|
56
46
|
type: 'SET_STATE';
|
|
57
47
|
};
|
|
58
48
|
|
|
59
|
-
type IncreaseSubscriberCountAction = {
|
|
60
|
-
payload: { cid: string };
|
|
61
|
-
type: 'INCREASE_SUBSCRIBER_COUNT';
|
|
62
|
-
};
|
|
63
|
-
type DecreaseSubscriberCountAction = {
|
|
64
|
-
payload: { cid: string };
|
|
65
|
-
type: 'DECREASE_SUBSCRIBER_COUNT';
|
|
66
|
-
};
|
|
67
|
-
|
|
68
49
|
type Action<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> =
|
|
69
|
-
|
|
70
|
-
| IncreaseSubscriberCountAction
|
|
71
|
-
| DecreaseSubscriberCountAction;
|
|
50
|
+
SetStateAction<StreamChatGenerics>;
|
|
72
51
|
|
|
73
52
|
export type ChannelsStateContextValue<
|
|
74
53
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
75
54
|
> = {
|
|
76
|
-
decreaseSubscriberCount: (value: { cid: string }) => void;
|
|
77
|
-
increaseSubscriberCount: (value: { cid: string }) => void;
|
|
78
55
|
setState: (value: Payload<Keys, StreamChatGenerics>) => void;
|
|
79
56
|
state: ChannelsState<StreamChatGenerics>;
|
|
80
57
|
};
|
|
@@ -95,39 +72,6 @@ function reducer(state: ChannelsState, action: Action) {
|
|
|
95
72
|
},
|
|
96
73
|
};
|
|
97
74
|
|
|
98
|
-
case 'INCREASE_SUBSCRIBER_COUNT': {
|
|
99
|
-
const currentCount = state[action.payload.cid]?.subscriberCount ?? 0;
|
|
100
|
-
return {
|
|
101
|
-
...state,
|
|
102
|
-
[action.payload.cid]: {
|
|
103
|
-
...(state[action.payload.cid] || {}),
|
|
104
|
-
subscriberCount: currentCount + 1,
|
|
105
|
-
},
|
|
106
|
-
};
|
|
107
|
-
}
|
|
108
|
-
|
|
109
|
-
case 'DECREASE_SUBSCRIBER_COUNT': {
|
|
110
|
-
const currentCount = state[action.payload.cid]?.subscriberCount ?? 0;
|
|
111
|
-
|
|
112
|
-
// If there last subscribed Channel component unsubscribes, we clear the channel state.
|
|
113
|
-
if (currentCount <= 1) {
|
|
114
|
-
const stateShallowCopy = {
|
|
115
|
-
...state,
|
|
116
|
-
};
|
|
117
|
-
|
|
118
|
-
delete stateShallowCopy[action.payload.cid];
|
|
119
|
-
|
|
120
|
-
return stateShallowCopy;
|
|
121
|
-
}
|
|
122
|
-
|
|
123
|
-
return {
|
|
124
|
-
...state,
|
|
125
|
-
[action.payload.cid]: {
|
|
126
|
-
...(state[action.payload.cid] || {}),
|
|
127
|
-
subscriberCount: currentCount - 1,
|
|
128
|
-
},
|
|
129
|
-
};
|
|
130
|
-
}
|
|
131
75
|
default:
|
|
132
76
|
throw new Error();
|
|
133
77
|
}
|
|
@@ -150,18 +94,8 @@ export const ChannelsStateProvider = <
|
|
|
150
94
|
dispatch({ payload, type: 'SET_STATE' });
|
|
151
95
|
}, []);
|
|
152
96
|
|
|
153
|
-
const increaseSubscriberCount = useCallback((payload: { cid: string }) => {
|
|
154
|
-
dispatch({ payload, type: 'INCREASE_SUBSCRIBER_COUNT' });
|
|
155
|
-
}, []);
|
|
156
|
-
|
|
157
|
-
const decreaseSubscriberCount = useCallback((payload: { cid: string }) => {
|
|
158
|
-
dispatch({ payload, type: 'DECREASE_SUBSCRIBER_COUNT' });
|
|
159
|
-
}, []);
|
|
160
|
-
|
|
161
97
|
const value = useMemo(
|
|
162
98
|
() => ({
|
|
163
|
-
decreaseSubscriberCount,
|
|
164
|
-
increaseSubscriberCount,
|
|
165
99
|
setState,
|
|
166
100
|
state,
|
|
167
101
|
}),
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { useCallback,
|
|
1
|
+
import { useCallback, useMemo } from 'react';
|
|
2
2
|
|
|
3
3
|
import type { Channel as ChannelType } from 'stream-chat';
|
|
4
4
|
|
|
@@ -11,32 +11,21 @@ import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
|
11
11
|
type StateManagerParams<
|
|
12
12
|
Key extends Keys,
|
|
13
13
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
14
|
-
> =
|
|
15
|
-
ChannelsStateContextValue<StreamChatGenerics>,
|
|
16
|
-
'increaseSubscriberCount' | 'decreaseSubscriberCount'
|
|
17
|
-
> & {
|
|
14
|
+
> = ChannelsStateContextValue<StreamChatGenerics> & {
|
|
18
15
|
cid: string;
|
|
19
16
|
key: Key;
|
|
20
17
|
};
|
|
21
18
|
|
|
22
|
-
/*
|
|
19
|
+
/*
|
|
23
20
|
This hook takes care of creating a useState-like interface which can be used later to call
|
|
24
21
|
updates to the ChannelsStateContext reducer. It receives the cid and key which it wants to update
|
|
25
22
|
and perform the state updates. Also supports a initialState.
|
|
26
23
|
*/
|
|
27
|
-
function useStateManager<
|
|
24
|
+
export function useStateManager<
|
|
28
25
|
Key extends Keys,
|
|
29
26
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
30
27
|
>(
|
|
31
|
-
{
|
|
32
|
-
cid,
|
|
33
|
-
key,
|
|
34
|
-
setState,
|
|
35
|
-
state,
|
|
36
|
-
}: Omit<
|
|
37
|
-
StateManagerParams<Key, StreamChatGenerics>,
|
|
38
|
-
'increaseSubscriberCount' | 'decreaseSubscriberCount'
|
|
39
|
-
>,
|
|
28
|
+
{ cid, key, setState, state }: StateManagerParams<Key, StreamChatGenerics>,
|
|
40
29
|
initialValue?: ChannelState<StreamChatGenerics>[Key],
|
|
41
30
|
) {
|
|
42
31
|
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
@@ -56,20 +45,8 @@ function useStateManager<
|
|
|
56
45
|
export type UseChannelStateValue<
|
|
57
46
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
58
47
|
> = {
|
|
59
|
-
members: ChannelState<StreamChatGenerics>['members'];
|
|
60
|
-
messages: ChannelState<StreamChatGenerics>['messages'];
|
|
61
|
-
read: ChannelState<StreamChatGenerics>['read'];
|
|
62
|
-
setMembers: (value: ChannelState<StreamChatGenerics>['members']) => void;
|
|
63
|
-
setMessages: (value: ChannelState<StreamChatGenerics>['messages']) => void;
|
|
64
|
-
setRead: (value: ChannelState<StreamChatGenerics>['read']) => void;
|
|
65
48
|
setThreadMessages: (value: ChannelState<StreamChatGenerics>['threadMessages']) => void;
|
|
66
|
-
setTyping: (value: ChannelState<StreamChatGenerics>['typing']) => void;
|
|
67
|
-
setWatcherCount: (value: ChannelState<StreamChatGenerics>['watcherCount']) => void;
|
|
68
|
-
setWatchers: (value: ChannelState<StreamChatGenerics>['watchers']) => void;
|
|
69
49
|
threadMessages: ChannelState<StreamChatGenerics>['threadMessages'];
|
|
70
|
-
typing: ChannelState<StreamChatGenerics>['typing'];
|
|
71
|
-
watcherCount: ChannelState<StreamChatGenerics>['watcherCount'];
|
|
72
|
-
watchers: ChannelState<StreamChatGenerics>['watchers'];
|
|
73
50
|
};
|
|
74
51
|
|
|
75
52
|
export function useChannelState<
|
|
@@ -79,74 +56,7 @@ export function useChannelState<
|
|
|
79
56
|
threadId?: string,
|
|
80
57
|
): UseChannelStateValue<StreamChatGenerics> {
|
|
81
58
|
const cid = channel?.id || 'id'; // in case channel is not initialized, use generic id string for indexing
|
|
82
|
-
const {
|
|
83
|
-
useChannelsStateContext<StreamChatGenerics>();
|
|
84
|
-
|
|
85
|
-
// Keeps track of how many Channel components are subscribed to this Channel state (Channel vs Thread concurrency)
|
|
86
|
-
useEffect(() => {
|
|
87
|
-
increaseSubscriberCount({ cid });
|
|
88
|
-
return () => {
|
|
89
|
-
decreaseSubscriberCount({ cid });
|
|
90
|
-
};
|
|
91
|
-
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
92
|
-
}, []);
|
|
93
|
-
|
|
94
|
-
const [members, setMembers] = useStateManager(
|
|
95
|
-
{
|
|
96
|
-
cid,
|
|
97
|
-
key: 'members',
|
|
98
|
-
setState,
|
|
99
|
-
state,
|
|
100
|
-
},
|
|
101
|
-
channel?.state?.members || {},
|
|
102
|
-
);
|
|
103
|
-
|
|
104
|
-
const [messages, setMessages] = useStateManager(
|
|
105
|
-
{
|
|
106
|
-
cid,
|
|
107
|
-
key: 'messages',
|
|
108
|
-
setState,
|
|
109
|
-
state,
|
|
110
|
-
},
|
|
111
|
-
channel?.state?.messages || [],
|
|
112
|
-
);
|
|
113
|
-
|
|
114
|
-
const [read, setRead] = useStateManager(
|
|
115
|
-
{
|
|
116
|
-
cid,
|
|
117
|
-
key: 'read',
|
|
118
|
-
setState,
|
|
119
|
-
state,
|
|
120
|
-
},
|
|
121
|
-
channel?.state?.read || {},
|
|
122
|
-
);
|
|
123
|
-
|
|
124
|
-
const [typing, setTyping] = useStateManager(
|
|
125
|
-
{
|
|
126
|
-
cid,
|
|
127
|
-
key: 'typing',
|
|
128
|
-
setState,
|
|
129
|
-
state,
|
|
130
|
-
},
|
|
131
|
-
{},
|
|
132
|
-
);
|
|
133
|
-
|
|
134
|
-
const [watcherCount, setWatcherCount] = useStateManager({
|
|
135
|
-
cid,
|
|
136
|
-
key: 'watcherCount',
|
|
137
|
-
setState,
|
|
138
|
-
state,
|
|
139
|
-
});
|
|
140
|
-
|
|
141
|
-
const [watchers, setWatchers] = useStateManager(
|
|
142
|
-
{
|
|
143
|
-
cid,
|
|
144
|
-
key: 'watchers',
|
|
145
|
-
setState,
|
|
146
|
-
state,
|
|
147
|
-
},
|
|
148
|
-
{},
|
|
149
|
-
);
|
|
59
|
+
const { setState, state } = useChannelsStateContext<StreamChatGenerics>();
|
|
150
60
|
|
|
151
61
|
const [threadMessages, setThreadMessages] = useStateManager(
|
|
152
62
|
{
|
|
@@ -159,19 +69,7 @@ export function useChannelState<
|
|
|
159
69
|
);
|
|
160
70
|
|
|
161
71
|
return {
|
|
162
|
-
members,
|
|
163
|
-
messages,
|
|
164
|
-
read,
|
|
165
|
-
setMembers,
|
|
166
|
-
setMessages,
|
|
167
|
-
setRead,
|
|
168
72
|
setThreadMessages,
|
|
169
|
-
setTyping,
|
|
170
|
-
setWatcherCount,
|
|
171
|
-
setWatchers,
|
|
172
73
|
threadMessages,
|
|
173
|
-
typing,
|
|
174
|
-
watcherCount,
|
|
175
|
-
watchers,
|
|
176
74
|
};
|
|
177
75
|
}
|
|
@@ -4,6 +4,7 @@ import type { ImageProps } from 'react-native';
|
|
|
4
4
|
import type { AppSettingsAPIResponse, Channel, Mute, StreamChat } from 'stream-chat';
|
|
5
5
|
|
|
6
6
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
7
|
+
import { MessageContextValue } from '../messageContext/MessageContext';
|
|
7
8
|
import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
|
|
8
9
|
|
|
9
10
|
import { isTestEnvironment } from '../utils/isTestEnvironment';
|
|
@@ -64,7 +65,7 @@ export type ChatContextValue<
|
|
|
64
65
|
* @overrideType Channel
|
|
65
66
|
*/
|
|
66
67
|
channel?: Channel<StreamChatGenerics>;
|
|
67
|
-
}
|
|
68
|
+
} & Partial<Pick<MessageContextValue<StreamChatGenerics>, 'isMessageAIGenerated'>>;
|
|
68
69
|
|
|
69
70
|
export const ChatContext = React.createContext(DEFAULT_BASE_CONTEXT_VALUE as ChatContextValue);
|
|
70
71
|
|
|
@@ -47,6 +47,10 @@ export type MessageContextValue<
|
|
|
47
47
|
images: Attachment<StreamChatGenerics>[];
|
|
48
48
|
/** Boolean that determines if the edited message is pressed. */
|
|
49
49
|
isEditedMessageOpen: boolean;
|
|
50
|
+
/**
|
|
51
|
+
* A factory function that determines whether a message is AI generated or not.
|
|
52
|
+
*/
|
|
53
|
+
isMessageAIGenerated: (message: MessageType<StreamChatGenerics>) => boolean;
|
|
50
54
|
/** Whether or not this is the active user's message */
|
|
51
55
|
isMyMessage: boolean;
|
|
52
56
|
/** Whether or not this is the last message in a group of messages */
|
|
@@ -29,7 +29,7 @@ import { useMessageDetailsForState } from './hooks/useMessageDetailsForState';
|
|
|
29
29
|
|
|
30
30
|
import { isUploadAllowed, MAX_FILE_SIZE_TO_UPLOAD, prettifyFileSize } from './utils/utils';
|
|
31
31
|
|
|
32
|
-
import { PollContentProps } from '../../components';
|
|
32
|
+
import { PollContentProps, StopMessageStreamingButtonProps } from '../../components';
|
|
33
33
|
import { AudioAttachmentProps } from '../../components/Attachment/AudioAttachment';
|
|
34
34
|
import { parseLinksFromText } from '../../components/Message/MessageSimple/utils/parseLinks';
|
|
35
35
|
import type { AttachButtonProps } from '../../components/MessageInput/AttachButton';
|
|
@@ -388,6 +388,7 @@ export type InputMessageInputContextValue<
|
|
|
388
388
|
* Defaults to and accepts same props as: [AudioRecordingButton](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageInput/components/AudioRecorder/AudioRecordingButton.tsx)
|
|
389
389
|
*/
|
|
390
390
|
StartAudioRecordingButton: React.ComponentType<AudioRecordingButtonProps<StreamChatGenerics>>;
|
|
391
|
+
StopMessageStreamingButton: React.ComponentType<StopMessageStreamingButtonProps> | null;
|
|
391
392
|
/**
|
|
392
393
|
* Custom UI component to render upload progress indicator on attachment preview.
|
|
393
394
|
*
|
|
@@ -590,7 +591,9 @@ export const MessageInputProvider = <
|
|
|
590
591
|
editing,
|
|
591
592
|
initialValue,
|
|
592
593
|
openPollCreationDialog: openPollCreationDialogFromContext,
|
|
594
|
+
StopMessageStreamingButton,
|
|
593
595
|
} = value;
|
|
596
|
+
|
|
594
597
|
const {
|
|
595
598
|
fileUploads,
|
|
596
599
|
imageUploads,
|
|
@@ -1482,6 +1485,7 @@ export const MessageInputProvider = <
|
|
|
1482
1485
|
openPollCreationDialog,
|
|
1483
1486
|
sendMessage, // overriding the originally passed in sendMessage
|
|
1484
1487
|
showPollCreationDialog,
|
|
1488
|
+
StopMessageStreamingButton,
|
|
1485
1489
|
});
|
|
1486
1490
|
return (
|
|
1487
1491
|
<MessageInputContext.Provider
|
|
@@ -103,6 +103,7 @@ export const useCreateMessageInputContext = <
|
|
|
103
103
|
showPollCreationDialog,
|
|
104
104
|
ShowThreadMessageInChannelButton,
|
|
105
105
|
StartAudioRecordingButton,
|
|
106
|
+
StopMessageStreamingButton,
|
|
106
107
|
takeAndUploadImage,
|
|
107
108
|
text,
|
|
108
109
|
thread,
|
|
@@ -225,6 +226,7 @@ export const useCreateMessageInputContext = <
|
|
|
225
226
|
showPollCreationDialog,
|
|
226
227
|
ShowThreadMessageInChannelButton,
|
|
227
228
|
StartAudioRecordingButton,
|
|
229
|
+
StopMessageStreamingButton,
|
|
228
230
|
takeAndUploadImage,
|
|
229
231
|
text,
|
|
230
232
|
toggleAttachmentPicker,
|
|
@@ -4,7 +4,7 @@ import { PressableProps } from 'react-native';
|
|
|
4
4
|
|
|
5
5
|
import type { Attachment, ChannelState, MessageResponse } from 'stream-chat';
|
|
6
6
|
|
|
7
|
-
import { PollContentProps } from '../../components';
|
|
7
|
+
import type { PollContentProps, StreamingMessageViewProps } from '../../components';
|
|
8
8
|
import type { AttachmentProps } from '../../components/Attachment/Attachment';
|
|
9
9
|
import type { AttachmentActionsProps } from '../../components/Attachment/AttachmentActions';
|
|
10
10
|
import type { AudioAttachmentProps } from '../../components/Attachment/AudioAttachment';
|
|
@@ -61,7 +61,7 @@ import type { ReplyProps } from '../../components/Reply/Reply';
|
|
|
61
61
|
import { FlatList } from '../../native';
|
|
62
62
|
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
63
63
|
import type { ReactionData } from '../../utils/utils';
|
|
64
|
-
import type { Alignment } from '../messageContext/MessageContext';
|
|
64
|
+
import type { Alignment, MessageContextValue } from '../messageContext/MessageContext';
|
|
65
65
|
import type { SuggestionCommand } from '../suggestionsContext/SuggestionsContext';
|
|
66
66
|
import type { DeepPartial } from '../themeContext/ThemeContext';
|
|
67
67
|
import type { Theme } from '../themeContext/utils/theme';
|
|
@@ -75,12 +75,13 @@ export type MessageContentType =
|
|
|
75
75
|
| 'gallery'
|
|
76
76
|
| 'quoted_reply'
|
|
77
77
|
| 'poll'
|
|
78
|
+
| 'ai_text'
|
|
78
79
|
| 'text';
|
|
79
80
|
export type DeletedMessagesVisibilityType = 'always' | 'never' | 'receiver' | 'sender';
|
|
80
81
|
|
|
81
82
|
export type MessagesContextValue<
|
|
82
83
|
StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,
|
|
83
|
-
> = {
|
|
84
|
+
> = Pick<MessageContextValue<StreamChatGenerics>, 'isMessageAIGenerated'> & {
|
|
84
85
|
/**
|
|
85
86
|
* UI component for Attachment.
|
|
86
87
|
* Defaults to: [Attachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Attachment.tsx)
|
|
@@ -294,6 +295,10 @@ export type MessagesContextValue<
|
|
|
294
295
|
sendReaction: (type: string, messageId: string) => Promise<void>;
|
|
295
296
|
setEditingState: (message?: MessageType<StreamChatGenerics>) => void;
|
|
296
297
|
setQuotedMessageState: (message?: MessageType<StreamChatGenerics>) => void;
|
|
298
|
+
/**
|
|
299
|
+
* UI component for StreamingMessageView. Displays the text of a message with a typewriter animation.
|
|
300
|
+
*/
|
|
301
|
+
StreamingMessageView: React.ComponentType<StreamingMessageViewProps<StreamChatGenerics>>;
|
|
297
302
|
/**
|
|
298
303
|
* UI component for TypingIndicator
|
|
299
304
|
* Defaults to: [TypingIndicator](https://getstream.io/chat/docs/sdk/reactnative/ui-components/typing-indicator/)
|