stream-chat-react 12.14.0 → 13.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/AIStateIndicator/AIStateIndicator.d.ts +4 -5
- package/dist/components/AIStateIndicator/hooks/useAIState.d.ts +2 -3
- package/dist/components/Attachment/Attachment.d.ts +8 -9
- package/dist/components/Attachment/Attachment.js +6 -5
- package/dist/components/Attachment/AttachmentActions.d.ts +2 -3
- package/dist/components/Attachment/AttachmentContainer.d.ts +15 -15
- package/dist/components/Attachment/AttachmentContainer.js +2 -2
- package/dist/components/Attachment/Audio.d.ts +3 -4
- package/dist/components/Attachment/Card.d.ts +1 -1
- package/dist/components/Attachment/FileAttachment.d.ts +3 -4
- package/dist/components/Attachment/FileAttachment.js +1 -1
- package/dist/components/Attachment/UnsupportedAttachment.d.ts +3 -4
- package/dist/components/Attachment/UnsupportedAttachment.js +1 -1
- package/dist/components/Attachment/VoiceRecording.d.ts +4 -5
- package/dist/components/Attachment/components/FileSizeIndicator.d.ts +1 -1
- package/dist/components/Attachment/components/FileSizeIndicator.js +4 -2
- package/dist/components/Attachment/utils.d.ts +8 -22
- package/dist/components/Attachment/utils.js +3 -18
- package/dist/components/Avatar/Avatar.d.ts +3 -4
- package/dist/components/Avatar/ChannelAvatar.d.ts +3 -4
- package/dist/components/Avatar/ChannelAvatar.js +1 -1
- package/dist/components/Avatar/GroupAvatar.d.ts +2 -2
- package/dist/components/Channel/Channel.d.ts +18 -37
- package/dist/components/Channel/Channel.js +25 -88
- package/dist/components/Channel/channelState.d.ts +17 -18
- package/dist/components/Channel/hooks/useChannelContainerClasses.d.ts +2 -3
- package/dist/components/Channel/hooks/useCreateChannelStateContext.d.ts +2 -3
- package/dist/components/Channel/hooks/useCreateChannelStateContext.js +1 -15
- package/dist/components/Channel/hooks/useCreateTypingContext.d.ts +1 -2
- package/dist/components/Channel/hooks/useEditMessageHandler.d.ts +3 -4
- package/dist/components/Channel/hooks/useMentionsHandlers.d.ts +3 -4
- package/dist/components/Channel/utils.d.ts +8 -6
- package/dist/components/Channel/utils.js +1 -0
- package/dist/components/ChannelHeader/ChannelHeader.d.ts +2 -3
- package/dist/components/ChannelList/ChannelList.d.ts +31 -30
- package/dist/components/ChannelList/ChannelList.js +8 -10
- package/dist/components/ChannelList/ChannelListMessenger.d.ts +6 -6
- package/dist/components/ChannelList/hooks/useChannelDeletedListener.d.ts +1 -2
- package/dist/components/ChannelList/hooks/useChannelHiddenListener.d.ts +1 -2
- package/dist/components/ChannelList/hooks/useChannelListShape.d.ts +44 -44
- package/dist/components/ChannelList/hooks/useChannelListShape.js +0 -2
- package/dist/components/ChannelList/hooks/useChannelMembershipState.d.ts +3 -3
- package/dist/components/ChannelList/hooks/useChannelTruncatedListener.d.ts +1 -2
- package/dist/components/ChannelList/hooks/useChannelUpdatedListener.d.ts +1 -2
- package/dist/components/ChannelList/hooks/useChannelVisibleListener.d.ts +1 -2
- package/dist/components/ChannelList/hooks/useConnectionRecoveredListener.d.ts +1 -2
- package/dist/components/ChannelList/hooks/useMessageNewListener.d.ts +1 -2
- package/dist/components/ChannelList/hooks/useNotificationAddedToChannelListener.d.ts +1 -2
- package/dist/components/ChannelList/hooks/useNotificationMessageNewListener.d.ts +1 -2
- package/dist/components/ChannelList/hooks/useNotificationRemovedFromChannelListener.d.ts +1 -2
- package/dist/components/ChannelList/hooks/usePaginatedChannels.d.ts +7 -8
- package/dist/components/ChannelList/hooks/usePaginatedChannels.js +3 -3
- package/dist/components/ChannelList/hooks/useSelectedChannelState.d.ts +7 -7
- package/dist/components/ChannelList/hooks/useUserPresenceChangedListener.d.ts +1 -2
- package/dist/components/ChannelList/utils.d.ts +20 -21
- package/dist/components/ChannelList/utils.js +2 -2
- package/dist/components/ChannelPreview/ChannelPreview.d.ts +15 -16
- package/dist/components/ChannelPreview/ChannelPreview.js +1 -1
- package/dist/components/ChannelPreview/ChannelPreviewActionButtons.d.ts +4 -4
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.d.ts +1 -2
- package/dist/components/ChannelPreview/hooks/useChannelPreviewInfo.d.ts +3 -4
- package/dist/components/ChannelPreview/hooks/useIsChannelMuted.d.ts +1 -2
- package/dist/components/ChannelPreview/hooks/useMessageDeliveryStatus.d.ts +5 -7
- package/dist/components/ChannelPreview/icons.d.ts +1 -1
- package/dist/components/ChannelPreview/utils.d.ts +7 -7
- package/dist/components/ChannelSearch/ChannelSearch.d.ts +5 -6
- package/dist/components/ChannelSearch/ChannelSearch.js +2 -2
- package/dist/components/ChannelSearch/SearchBar.d.ts +1 -1
- package/dist/components/ChannelSearch/SearchBar.js +1 -1
- package/dist/components/ChannelSearch/SearchResults.d.ts +13 -14
- package/dist/components/ChannelSearch/SearchResults.js +1 -1
- package/dist/components/ChannelSearch/hooks/useChannelSearch.d.ts +17 -18
- package/dist/components/ChannelSearch/hooks/useChannelSearch.js +2 -6
- package/dist/components/ChannelSearch/utils.d.ts +2 -3
- package/dist/components/Chat/Chat.d.ts +9 -9
- package/dist/components/Chat/hooks/useChannelsQueryState.d.ts +1 -1
- package/dist/components/Chat/hooks/useChat.d.ts +10 -10
- package/dist/components/Chat/hooks/useChat.js +3 -3
- package/dist/components/Chat/hooks/useCreateChatClient.d.ts +4 -4
- package/dist/components/Chat/hooks/useCreateChatContext.d.ts +1 -2
- package/dist/components/Dialog/DialogAnchor.d.ts +4 -3
- package/dist/components/Dialog/DialogAnchor.js +2 -2
- package/dist/components/Dialog/DialogMenu.d.ts +2 -1
- package/dist/components/Dialog/DialogPortal.d.ts +2 -1
- package/dist/components/Dialog/FormDialog.d.ts +2 -1
- package/dist/components/Dialog/FormDialog.js +1 -1
- package/dist/components/Dialog/PromptDialog.d.ts +2 -1
- package/dist/components/DragAndDrop/DragAndDropContainer.d.ts +2 -1
- package/dist/components/EventComponent/EventComponent.d.ts +7 -6
- package/dist/components/Form/FieldError.d.ts +2 -1
- package/dist/components/Form/SwitchField.d.ts +2 -1
- package/dist/components/Form/SwitchField.js +1 -1
- package/dist/components/Gallery/Gallery.d.ts +5 -5
- package/dist/components/Gallery/Image.d.ts +6 -5
- package/dist/components/Gallery/ModalGallery.d.ts +3 -4
- package/dist/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +2 -1
- package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.d.ts +2 -1
- package/dist/components/LoadMore/LoadMoreButton.d.ts +2 -1
- package/dist/components/LoadMore/LoadMorePaginator.d.ts +3 -2
- package/dist/components/LoadMore/LoadMorePaginator.js +1 -1
- package/dist/components/MediaRecorder/AudioRecorder/AudioRecorder.js +3 -2
- package/dist/components/MediaRecorder/AudioRecorder/AudioRecordingInProgress.js +1 -1
- package/dist/components/MediaRecorder/RecordingPermissionDeniedNotification.d.ts +1 -1
- package/dist/components/MediaRecorder/classes/MediaRecorderController.d.ts +11 -23
- package/dist/components/MediaRecorder/hooks/useMediaRecorder.d.ts +8 -8
- package/dist/components/MediaRecorder/hooks/useMediaRecorder.js +6 -4
- package/dist/components/MediaRecorder/observable/BehaviorSubject.d.ts +2 -2
- package/dist/components/MediaRecorder/observable/Observable.d.ts +1 -1
- package/dist/components/MediaRecorder/observable/Subject.d.ts +3 -2
- package/dist/components/Message/FixedHeightMessage.d.ts +4 -5
- package/dist/components/Message/Message.d.ts +1 -2
- package/dist/components/Message/MessageDeleted.d.ts +4 -5
- package/dist/components/Message/MessageEditedTimestamp.d.ts +2 -3
- package/dist/components/Message/MessageErrorText.d.ts +4 -5
- package/dist/components/Message/MessageErrorText.js +2 -2
- package/dist/components/Message/MessageOptions.d.ts +3 -3
- package/dist/components/Message/MessageRepliesCountButton.d.ts +2 -1
- package/dist/components/Message/MessageSimple.d.ts +1 -2
- package/dist/components/Message/MessageSimple.js +8 -10
- package/dist/components/Message/MessageStatus.d.ts +3 -4
- package/dist/components/Message/MessageText.d.ts +6 -6
- package/dist/components/Message/MessageTimestamp.d.ts +4 -5
- package/dist/components/Message/QuotedMessage.d.ts +2 -3
- package/dist/components/Message/QuotedMessage.js +1 -1
- package/dist/components/Message/StreamedMessageText.d.ts +3 -4
- package/dist/components/Message/hooks/useActionHandler.d.ts +2 -3
- package/dist/components/Message/hooks/useActionHandler.js +1 -1
- package/dist/components/Message/hooks/useDeleteHandler.d.ts +4 -5
- package/dist/components/Message/hooks/useFlagHandler.d.ts +5 -6
- package/dist/components/Message/hooks/useMarkUnreadHandler.d.ts +5 -6
- package/dist/components/Message/hooks/useMentionsHandler.d.ts +6 -8
- package/dist/components/Message/hooks/useMessageTextStreaming.d.ts +2 -3
- package/dist/components/Message/hooks/useMuteHandler.d.ts +5 -7
- package/dist/components/Message/hooks/useMuteHandler.js +1 -1
- package/dist/components/Message/hooks/useOpenThreadHandler.d.ts +2 -3
- package/dist/components/Message/hooks/usePinHandler.d.ts +4 -5
- package/dist/components/Message/hooks/usePinHandler.js +1 -1
- package/dist/components/Message/hooks/useReactionHandler.d.ts +3 -4
- package/dist/components/Message/hooks/useReactionHandler.js +2 -4
- package/dist/components/Message/hooks/useReactionsFetcher.d.ts +5 -7
- package/dist/components/Message/hooks/useRetryHandler.d.ts +2 -3
- package/dist/components/Message/hooks/useRetryHandler.js +1 -1
- package/dist/components/Message/hooks/useUserHandler.d.ts +5 -6
- package/dist/components/Message/hooks/useUserRole.d.ts +2 -3
- package/dist/components/Message/hooks/useUserRole.js +1 -1
- package/dist/components/Message/icons.d.ts +2 -2
- package/dist/components/Message/icons.js +1 -1
- package/dist/components/Message/renderText/componentRenderers/Anchor.d.ts +2 -1
- package/dist/components/Message/renderText/componentRenderers/Emoji.d.ts +1 -1
- package/dist/components/Message/renderText/componentRenderers/Mention.d.ts +5 -5
- package/dist/components/Message/renderText/componentRenderers/Mention.js +1 -1
- package/dist/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.d.ts +1 -2
- package/dist/components/Message/renderText/renderText.d.ts +6 -6
- package/dist/components/Message/renderText/types.d.ts +1 -1
- package/dist/components/Message/types.d.ts +27 -28
- package/dist/components/Message/utils.d.ts +21 -22
- package/dist/components/Message/utils.js +5 -4
- package/dist/components/MessageActions/CustomMessageActionsList.d.ts +6 -7
- package/dist/components/MessageActions/MessageActions.d.ts +6 -5
- package/dist/components/MessageActions/MessageActions.js +1 -1
- package/dist/components/MessageActions/MessageActionsBox.d.ts +5 -5
- package/dist/components/MessageActions/MessageActionsBox.js +4 -3
- package/dist/components/MessageActions/hooks/useMessageActionsBoxPopper.d.ts +1 -1
- package/dist/components/MessageBounce/MessageBounceModal.d.ts +4 -3
- package/dist/components/MessageBounce/MessageBouncePrompt.d.ts +1 -2
- package/dist/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.d.ts +11 -11
- package/dist/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.js +17 -14
- package/dist/components/MessageInput/AttachmentPreviewList/FileAttachmentPreview.d.ts +4 -12
- package/dist/components/MessageInput/AttachmentPreviewList/FileAttachmentPreview.js +8 -5
- package/dist/components/MessageInput/AttachmentPreviewList/ImageAttachmentPreview.d.ts +4 -5
- package/dist/components/MessageInput/AttachmentPreviewList/ImageAttachmentPreview.js +2 -2
- package/dist/components/MessageInput/AttachmentPreviewList/UnsupportedAttachmentPreview.d.ts +7 -5
- package/dist/components/MessageInput/AttachmentPreviewList/UnsupportedAttachmentPreview.js +5 -2
- package/dist/components/MessageInput/AttachmentPreviewList/VoiceRecordingPreview.d.ts +4 -5
- package/dist/components/MessageInput/AttachmentPreviewList/VoiceRecordingPreview.js +5 -2
- package/dist/components/MessageInput/AttachmentPreviewList/index.d.ts +1 -1
- package/dist/components/MessageInput/AttachmentPreviewList/types.d.ts +3 -4
- package/dist/components/MessageInput/AttachmentSelector.d.ts +1 -2
- package/dist/components/MessageInput/AttachmentSelector.js +5 -3
- package/dist/components/MessageInput/EditMessageForm.d.ts +3 -2
- package/dist/components/MessageInput/EditMessageForm.js +30 -6
- package/dist/components/MessageInput/LinkPreviewList.d.ts +6 -4
- package/dist/components/MessageInput/LinkPreviewList.js +24 -10
- package/dist/components/MessageInput/MessageInput.d.ts +23 -45
- package/dist/components/MessageInput/MessageInput.js +25 -15
- package/dist/components/MessageInput/MessageInputFlat.d.ts +1 -2
- package/dist/components/MessageInput/MessageInputFlat.js +31 -76
- package/dist/components/MessageInput/QuotedMessagePreview.d.ts +4 -7
- package/dist/components/MessageInput/QuotedMessagePreview.js +22 -16
- package/dist/components/MessageInput/SendButton.d.ts +4 -5
- package/dist/components/MessageInput/SendButton.js +6 -2
- package/dist/components/MessageInput/WithDragAndDropUpload.d.ts +38 -0
- package/dist/components/MessageInput/WithDragAndDropUpload.js +96 -0
- package/dist/components/MessageInput/hooks/index.d.ts +5 -1
- package/dist/components/MessageInput/hooks/index.js +5 -1
- package/dist/components/MessageInput/hooks/useAttachmentManagerState.d.ts +10 -0
- package/dist/components/MessageInput/hooks/useAttachmentManagerState.js +19 -0
- package/dist/components/MessageInput/hooks/useCanCreatePoll.d.ts +1 -0
- package/dist/components/MessageInput/hooks/useCanCreatePoll.js +10 -0
- package/dist/components/MessageInput/hooks/useCooldownTimer.d.ts +2 -3
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.d.ts +1 -2
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.js +1 -55
- package/dist/components/MessageInput/hooks/useMessageComposer.d.ts +2 -0
- package/dist/components/MessageInput/hooks/useMessageComposer.js +80 -0
- package/dist/components/MessageInput/hooks/useMessageComposerHasSendableData.d.ts +1 -0
- package/dist/components/MessageInput/hooks/useMessageComposerHasSendableData.js +8 -0
- package/dist/components/MessageInput/hooks/useMessageInputControls.d.ts +12 -0
- package/dist/components/MessageInput/hooks/useMessageInputControls.js +23 -0
- package/dist/components/MessageInput/hooks/useMessageInputText.d.ts +1 -5
- package/dist/components/MessageInput/hooks/useMessageInputText.js +19 -53
- package/dist/components/MessageInput/hooks/usePasteHandler.d.ts +1 -3
- package/dist/components/MessageInput/hooks/usePasteHandler.js +6 -8
- package/dist/components/MessageInput/hooks/useSubmitHandler.d.ts +2 -6
- package/dist/components/MessageInput/hooks/useSubmitHandler.js +30 -98
- package/dist/components/MessageInput/hooks/utils.d.ts +0 -27
- package/dist/components/MessageInput/hooks/utils.js +0 -124
- package/dist/components/MessageInput/index.d.ts +1 -2
- package/dist/components/MessageInput/index.js +1 -2
- package/dist/components/MessageList/ConnectionStatus.d.ts +1 -2
- package/dist/components/MessageList/ConnectionStatus.js +1 -1
- package/dist/components/MessageList/CustomNotification.d.ts +2 -1
- package/dist/components/MessageList/GiphyPreviewMessage.d.ts +4 -5
- package/dist/components/MessageList/MessageList.d.ts +11 -12
- package/dist/components/MessageList/MessageList.js +4 -4
- package/dist/components/MessageList/MessageNotification.d.ts +2 -1
- package/dist/components/MessageList/VirtualizedMessageList.d.ts +22 -21
- package/dist/components/MessageList/VirtualizedMessageList.js +6 -6
- package/dist/components/MessageList/VirtualizedMessageListComponents.d.ts +10 -10
- package/dist/components/MessageList/VirtualizedMessageListComponents.js +7 -7
- package/dist/components/MessageList/hooks/MessageList/useEnrichedMessages.d.ts +8 -10
- package/dist/components/MessageList/hooks/MessageList/useEnrichedMessages.js +1 -1
- package/dist/components/MessageList/hooks/MessageList/useMessageListElements.d.ts +11 -12
- package/dist/components/MessageList/hooks/MessageList/useMessageListScrollManager.d.ts +4 -5
- package/dist/components/MessageList/hooks/MessageList/useScrollLocationLogic.d.ts +5 -6
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.d.ts +4 -5
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.js +3 -2
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useMessageSetKey.d.ts +4 -5
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useMessageSetKey.js +1 -1
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.d.ts +2 -3
- package/dist/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.d.ts +2 -3
- package/dist/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.js +6 -2
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useScrollToBottomOnNewMessage.d.ts +4 -5
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useShouldForceScrollToBottom.d.ts +2 -3
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.d.ts +3 -4
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.js +5 -6
- package/dist/components/MessageList/hooks/useLastReadData.d.ts +5 -6
- package/dist/components/MessageList/hooks/useLastReadData.js +5 -1
- package/dist/components/MessageList/hooks/useMarkRead.d.ts +1 -2
- package/dist/components/MessageList/renderMessages.d.ts +14 -14
- package/dist/components/MessageList/renderMessages.js +8 -7
- package/dist/components/MessageList/utils.d.ts +34 -28
- package/dist/components/MessageList/utils.js +26 -21
- package/dist/components/Modal/Modal.d.ts +2 -1
- package/dist/components/Poll/Poll.d.ts +2 -3
- package/dist/components/Poll/Poll.js +1 -1
- package/dist/components/Poll/PollActions/AddCommentForm.d.ts +1 -2
- package/dist/components/Poll/PollActions/AddCommentForm.js +4 -2
- package/dist/components/Poll/PollActions/EndPollDialog.d.ts +1 -2
- package/dist/components/Poll/PollActions/EndPollDialog.js +1 -1
- package/dist/components/Poll/PollActions/PollAction.d.ts +2 -1
- package/dist/components/Poll/PollActions/PollActions.d.ts +7 -8
- package/dist/components/Poll/PollActions/PollActions.js +5 -5
- package/dist/components/Poll/PollActions/PollAnswerList.d.ts +1 -2
- package/dist/components/Poll/PollActions/PollOptionsFullList.d.ts +1 -2
- package/dist/components/Poll/PollActions/PollOptionsFullList.js +4 -2
- package/dist/components/Poll/PollActions/PollResults/PollOptionVotesList.d.ts +3 -4
- package/dist/components/Poll/PollActions/PollResults/PollOptionVotesList.js +1 -1
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithLatestVotes.d.ts +3 -4
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.d.ts +4 -5
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.js +1 -1
- package/dist/components/Poll/PollActions/PollResults/PollResults.d.ts +1 -2
- package/dist/components/Poll/PollActions/PollResults/PollResults.js +1 -1
- package/dist/components/Poll/PollActions/SuggestPollOptionForm.d.ts +1 -2
- package/dist/components/Poll/PollActions/SuggestPollOptionForm.js +3 -1
- package/dist/components/Poll/PollContent.d.ts +1 -2
- package/dist/components/Poll/PollCreationDialog/MultipleAnswersField.d.ts +2 -0
- package/dist/components/Poll/PollCreationDialog/MultipleAnswersField.js +35 -0
- package/dist/components/Poll/PollCreationDialog/NameField.d.ts +2 -0
- package/dist/components/Poll/PollCreationDialog/NameField.js +26 -0
- package/dist/components/Poll/PollCreationDialog/OptionFieldSet.d.ts +1 -8
- package/dist/components/Poll/PollCreationDialog/OptionFieldSet.js +33 -65
- package/dist/components/Poll/PollCreationDialog/PollCreationDialog.js +31 -85
- package/dist/components/Poll/PollCreationDialog/PollCreationDialogControls.d.ts +1 -4
- package/dist/components/Poll/PollCreationDialog/PollCreationDialogControls.js +15 -41
- package/dist/components/Poll/PollCreationDialog/types.d.ts +0 -14
- package/dist/components/Poll/PollHeader.d.ts +1 -2
- package/dist/components/Poll/PollOptionList.d.ts +1 -2
- package/dist/components/Poll/PollOptionList.js +4 -2
- package/dist/components/Poll/PollOptionSelector.d.ts +3 -4
- package/dist/components/Poll/PollVote.d.ts +6 -7
- package/dist/components/Poll/PollVote.js +3 -3
- package/dist/components/Poll/QuotedPoll.d.ts +1 -2
- package/dist/components/Poll/constants.d.ts +0 -1
- package/dist/components/Poll/constants.js +0 -1
- package/dist/components/Poll/hooks/useManagePollVotesRealtime.d.ts +2 -3
- package/dist/components/Poll/hooks/usePollAnswerPagination.d.ts +2 -3
- package/dist/components/Poll/hooks/usePollAnswerPagination.js +2 -2
- package/dist/components/Poll/hooks/usePollOptionVotesPagination.d.ts +2 -3
- package/dist/components/Poll/hooks/usePollOptionVotesPagination.js +1 -1
- package/dist/components/Portal/Portal.d.ts +1 -1
- package/dist/components/ReactFileUtilities/FileIcon/FileIcon.d.ts +1 -1
- package/dist/components/ReactFileUtilities/FileIcon/FileIconSet.d.ts +2 -1
- package/dist/components/ReactFileUtilities/FileIcon/iconMap.d.ts +1 -1
- package/dist/components/ReactFileUtilities/UploadButton.d.ts +3 -2
- package/dist/components/ReactFileUtilities/UploadButton.js +16 -6
- package/dist/components/ReactFileUtilities/index.d.ts +0 -1
- package/dist/components/ReactFileUtilities/index.js +0 -1
- package/dist/components/ReactFileUtilities/utils.d.ts +2 -2
- package/dist/components/Reactions/ReactionSelector.d.ts +4 -5
- package/dist/components/Reactions/ReactionSelectorWithButton.d.ts +1 -2
- package/dist/components/Reactions/ReactionsList.d.ts +6 -7
- package/dist/components/Reactions/ReactionsList.js +2 -2
- package/dist/components/Reactions/ReactionsListModal.d.ts +9 -10
- package/dist/components/Reactions/SimpleReactionsList.d.ts +5 -6
- package/dist/components/Reactions/StreamEmoji.d.ts +1 -1
- package/dist/components/Reactions/hooks/useFetchReactions.d.ts +9 -10
- package/dist/components/Reactions/hooks/useProcessReactions.d.ts +1 -2
- package/dist/components/Reactions/types.d.ts +3 -4
- package/dist/components/Reactions/utils/utils.d.ts +1 -1
- package/dist/components/SafeAnchor/SafeAnchor.d.ts +2 -1
- package/dist/components/{CommandItem → TextareaComposer/SuggestionList}/CommandItem.d.ts +2 -1
- package/dist/components/{CommandItem → TextareaComposer/SuggestionList}/CommandItem.js +1 -2
- package/dist/components/{EmoticonItem → TextareaComposer/SuggestionList}/EmoticonItem.d.ts +7 -7
- package/dist/components/TextareaComposer/SuggestionList/EmoticonItem.js +12 -0
- package/dist/components/TextareaComposer/SuggestionList/SuggestionList.d.ts +16 -0
- package/dist/components/TextareaComposer/SuggestionList/SuggestionList.js +49 -0
- package/dist/components/TextareaComposer/SuggestionList/SuggestionListItem.d.ts +18 -0
- package/dist/components/TextareaComposer/SuggestionList/SuggestionListItem.js +25 -0
- package/dist/components/{UserItem → TextareaComposer/SuggestionList}/UserItem.d.ts +7 -4
- package/dist/components/TextareaComposer/SuggestionList/UserItem.js +24 -0
- package/dist/components/TextareaComposer/SuggestionList/index.d.ts +5 -0
- package/dist/components/TextareaComposer/SuggestionList/index.js +5 -0
- package/dist/components/TextareaComposer/TextareaComposer.d.ts +13 -0
- package/dist/components/TextareaComposer/TextareaComposer.js +155 -0
- package/dist/components/TextareaComposer/index.d.ts +2 -0
- package/dist/components/TextareaComposer/index.js +2 -0
- package/dist/components/Thread/Thread.d.ts +13 -10
- package/dist/components/Thread/Thread.js +23 -12
- package/dist/components/Thread/ThreadHead.d.ts +2 -3
- package/dist/components/Thread/ThreadHeader.d.ts +5 -6
- package/dist/components/Thread/ThreadHeader.js +1 -1
- package/dist/components/Threads/ThreadContext.d.ts +2 -2
- package/dist/components/Threads/ThreadContext.js +1 -4
- package/dist/components/Threads/ThreadList/ThreadList.d.ts +1 -1
- package/dist/components/Threads/ThreadList/ThreadListItem.d.ts +1 -1
- package/dist/components/Threads/hooks/useThreadManagerState.d.ts +1 -1
- package/dist/components/Threads/hooks/useThreadState.d.ts +1 -1
- package/dist/components/Threads/icons.d.ts +1 -1
- package/dist/components/Tooltip/Tooltip.d.ts +3 -2
- package/dist/components/Tooltip/hooks/useEnterLeaveHandlers.d.ts +1 -1
- package/dist/components/TypingIndicator/TypingIndicator.d.ts +1 -2
- package/dist/components/Window/Window.d.ts +6 -6
- package/dist/components/index.d.ts +1 -5
- package/dist/components/index.js +1 -5
- package/dist/context/AttachmentSelectorContext.d.ts +2 -1
- package/dist/context/ChannelActionContext.d.ts +26 -35
- package/dist/context/ChannelListContext.d.ts +9 -9
- package/dist/context/ChannelListContext.js +1 -1
- package/dist/context/ChannelStateContext.d.ts +24 -34
- package/dist/context/ChatContext.d.ts +18 -17
- package/dist/context/ComponentContext.d.ts +39 -37
- package/dist/context/DialogManagerContext.d.ts +2 -1
- package/dist/context/MessageBounceContext.d.ts +8 -7
- package/dist/context/MessageBounceContext.js +1 -1
- package/dist/context/MessageContext.d.ts +23 -23
- package/dist/context/MessageInputContext.d.ts +8 -26
- package/dist/context/MessageInputContext.js +3 -2
- package/dist/context/MessageListContext.d.ts +2 -1
- package/dist/context/PollContext.d.ts +8 -8
- package/dist/context/TranslationContext.d.ts +2 -1
- package/dist/context/TypingContext.d.ts +11 -10
- package/dist/context/VirtualizedMessageListContext.d.ts +2 -1
- package/dist/context/WithComponents.d.ts +3 -2
- package/dist/css/v2/index.css +1 -1
- package/dist/css/v2/index.layout.css +1 -1
- package/dist/experimental/MessageActions/MessageActions.d.ts +1 -1
- package/dist/experimental/MessageActions/MessageActions.js +1 -1
- package/dist/experimental/MessageActions/defaults.js +4 -3
- package/dist/experimental/Search/Search.d.ts +1 -2
- package/dist/experimental/Search/SearchContext.d.ts +8 -8
- package/dist/experimental/Search/SearchResults/SearchResultItem.d.ts +11 -11
- package/dist/experimental/Search/SearchResults/SearchResultItem.js +3 -3
- package/dist/experimental/Search/SearchResults/SearchResults.d.ts +1 -2
- package/dist/experimental/Search/SearchResults/SearchResultsHeader.d.ts +1 -2
- package/dist/experimental/Search/SearchResults/SearchResultsHeader.js +1 -1
- package/dist/experimental/Search/SearchResults/SearchSourceResultList.d.ts +2 -3
- package/dist/experimental/Search/SearchResults/SearchSourceResultListFooter.d.ts +1 -2
- package/dist/experimental/Search/SearchResults/SearchSourceResults.d.ts +1 -2
- package/dist/experimental/Search/SearchResults/SearchSourceResults.js +1 -1
- package/dist/experimental/Search/SearchSourceResultsContext.d.ts +2 -1
- package/dist/experimental/Search/hooks/useSearchFocusedMessage.d.ts +1 -2
- package/dist/experimental/Search/hooks/useSearchFocusedMessage.js +3 -1
- package/dist/experimental/Search/hooks/useSearchQueriesInProgress.d.ts +3 -4
- package/dist/experimental/index.browser.cjs +1139 -1075
- package/dist/experimental/index.browser.cjs.map +4 -4
- package/dist/experimental/index.node.cjs +1139 -1075
- package/dist/experimental/index.node.cjs.map +4 -4
- package/dist/i18n/Streami18n.d.ts +1 -1
- package/dist/i18n/types.d.ts +2 -2
- package/dist/i18n/utils.d.ts +1 -1
- package/dist/i18n/utils.js +3 -1
- package/dist/index.browser.cjs +28545 -30631
- package/dist/index.browser.cjs.map +4 -4
- package/dist/index.node.cjs +30774 -32868
- package/dist/index.node.cjs.map +4 -4
- package/dist/plugins/Emojis/index.browser.cjs +133 -5
- package/dist/plugins/Emojis/index.browser.cjs.map +4 -4
- package/dist/plugins/Emojis/index.d.ts +1 -0
- package/dist/plugins/Emojis/index.js +1 -0
- package/dist/plugins/Emojis/index.node.cjs +135 -6
- package/dist/plugins/Emojis/index.node.cjs.map +4 -4
- package/dist/plugins/Emojis/middleware/index.d.ts +1 -0
- package/dist/plugins/Emojis/middleware/index.js +1 -0
- package/dist/plugins/Emojis/middleware/textComposerEmojiMiddleware.d.ts +66 -0
- package/dist/plugins/Emojis/middleware/textComposerEmojiMiddleware.js +143 -0
- package/dist/plugins/encoders/mp3.browser.cjs.map +2 -2
- package/dist/plugins/encoders/mp3.node.cjs.map +2 -2
- package/dist/scss/v2/Autocomplete/Autocomplete-layout.scss +14 -0
- package/dist/scss/v2/Autocomplete/Autocomplete-theme.scss +11 -0
- package/dist/scss/v2/DropzoneContainer/DropzoneContainer-layout.scss +14 -0
- package/dist/scss/v2/DropzoneContainer/DropzoneContainer-theme.scss +17 -0
- package/dist/scss/v2/LinkPreview/LinkPreview-layout.scss +18 -0
- package/dist/scss/v2/LinkPreview/LinkPreview-theme.scss +15 -0
- package/dist/scss/v2/MessageInput/MessageInput-layout.scss +0 -13
- package/dist/scss/v2/MessageInput/MessageInput-theme.scss +8 -19
- package/dist/scss/v2/index.layout.scss +2 -1
- package/dist/scss/v2/index.scss +1 -0
- package/dist/types/defaultDataInterfaces.d.ts +25 -0
- package/dist/types/index.d.ts +2 -1
- package/dist/types/types.d.ts +2 -62
- package/dist/utils/getChannel.d.ts +5 -6
- package/dist/utils/mergeDeep.d.ts +2 -3
- package/package.json +5 -5
- package/dist/components/AutoCompleteTextarea/Item.d.ts +0 -2
- package/dist/components/AutoCompleteTextarea/Item.js +0 -10
- package/dist/components/AutoCompleteTextarea/List.d.ts +0 -17
- package/dist/components/AutoCompleteTextarea/List.js +0 -89
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts +0 -114
- package/dist/components/AutoCompleteTextarea/Textarea.js +0 -593
- package/dist/components/AutoCompleteTextarea/index.d.ts +0 -4
- package/dist/components/AutoCompleteTextarea/index.js +0 -4
- package/dist/components/AutoCompleteTextarea/types.d.ts +0 -15
- package/dist/components/AutoCompleteTextarea/utils.d.ts +0 -6
- package/dist/components/AutoCompleteTextarea/utils.js +0 -40
- package/dist/components/ChatAutoComplete/ChatAutoComplete.d.ts +0 -78
- package/dist/components/ChatAutoComplete/ChatAutoComplete.js +0 -33
- package/dist/components/ChatAutoComplete/index.d.ts +0 -1
- package/dist/components/ChatAutoComplete/index.js +0 -1
- package/dist/components/CommandItem/index.d.ts +0 -1
- package/dist/components/CommandItem/index.js +0 -1
- package/dist/components/EmoticonItem/EmoticonItem.js +0 -16
- package/dist/components/EmoticonItem/index.d.ts +0 -1
- package/dist/components/EmoticonItem/index.js +0 -1
- package/dist/components/MessageInput/DefaultTriggerProvider.d.ts +0 -35
- package/dist/components/MessageInput/DefaultTriggerProvider.js +0 -24
- package/dist/components/MessageInput/DropzoneProvider.d.ts +0 -4
- package/dist/components/MessageInput/DropzoneProvider.js +0 -23
- package/dist/components/MessageInput/hooks/useAttachments.d.ts +0 -14
- package/dist/components/MessageInput/hooks/useAttachments.js +0 -209
- package/dist/components/MessageInput/hooks/useCommandTrigger.d.ts +0 -3
- package/dist/components/MessageInput/hooks/useCommandTrigger.js +0 -62
- package/dist/components/MessageInput/hooks/useEmojiTrigger.d.ts +0 -3
- package/dist/components/MessageInput/hooks/useEmojiTrigger.js +0 -29
- package/dist/components/MessageInput/hooks/useLinkPreviews.d.ts +0 -30
- package/dist/components/MessageInput/hooks/useLinkPreviews.js +0 -109
- package/dist/components/MessageInput/hooks/useMessageInputState.d.ts +0 -71
- package/dist/components/MessageInput/hooks/useMessageInputState.js +0 -200
- package/dist/components/MessageInput/hooks/useUserTrigger.d.ts +0 -12
- package/dist/components/MessageInput/hooks/useUserTrigger.js +0 -130
- package/dist/components/MessageInput/types.d.ts +0 -87
- package/dist/components/MessageInput/types.js +0 -19
- package/dist/components/ReactFileUtilities/ImageDropzone.d.ts +0 -16
- package/dist/components/ReactFileUtilities/ImageDropzone.js +0 -42
- package/dist/components/UserItem/UserItem.js +0 -26
- package/dist/components/UserItem/index.d.ts +0 -1
- package/dist/components/UserItem/index.js +0 -1
- /package/dist/components/{MessageInput → MediaRecorder/AudioRecorder}/hooks/useTimeElapsed.d.ts +0 -0
- /package/dist/components/{MessageInput → MediaRecorder/AudioRecorder}/hooks/useTimeElapsed.js +0 -0
- /package/dist/scss/v2/DragAndDropContainer/{DragAmdDropContainer-layout.scss → DragAndDropContainer-layout.scss} +0 -0
- /package/dist/{components/AutoCompleteTextarea/types.js → types/defaultDataInterfaces.js} +0 -0
|
@@ -1,20 +1,24 @@
|
|
|
1
|
-
import React, { useEffect } from 'react';
|
|
1
|
+
import React, { useContext, useEffect } from 'react';
|
|
2
2
|
import clsx from 'clsx';
|
|
3
3
|
import { MESSAGE_ACTIONS } from '../Message';
|
|
4
4
|
import { MessageInput, MessageInputFlat } from '../MessageInput';
|
|
5
|
-
import { MessageList, VirtualizedMessageList
|
|
5
|
+
import { MessageList, VirtualizedMessageList } from '../MessageList';
|
|
6
6
|
import { ThreadHeader as DefaultThreadHeader } from './ThreadHeader';
|
|
7
7
|
import { ThreadHead as DefaultThreadHead } from '../Thread/ThreadHead';
|
|
8
8
|
import { useChannelActionContext, useChannelStateContext, useChatContext, useComponentContext, } from '../../context';
|
|
9
9
|
import { useThreadContext } from '../Threads';
|
|
10
10
|
import { useStateStore } from '../../store';
|
|
11
|
+
const LegacyThreadContext = React.createContext({ legacyThread: undefined });
|
|
12
|
+
export const useLegacyThreadContext = () => useContext(LegacyThreadContext);
|
|
11
13
|
/**
|
|
12
14
|
* The Thread component renders a parent Message with a list of replies
|
|
13
15
|
*/
|
|
14
16
|
export const Thread = (props) => {
|
|
15
17
|
const { channel, channelConfig, thread } = useChannelStateContext('Thread');
|
|
16
18
|
const threadInstance = useThreadContext();
|
|
17
|
-
if (
|
|
19
|
+
if (!thread && !threadInstance)
|
|
20
|
+
return null;
|
|
21
|
+
if (channelConfig?.replies === false)
|
|
18
22
|
return null;
|
|
19
23
|
// the wrapper ensures a key variable is set and the component recreates on thread switch
|
|
20
24
|
return (
|
|
@@ -30,22 +34,24 @@ const selector = (nextValue) => ({
|
|
|
30
34
|
const ThreadInner = (props) => {
|
|
31
35
|
const { additionalMessageInputProps, additionalMessageListProps, additionalParentMessageProps, additionalVirtualizedMessageListProps, autoFocus = true, enableDateSeparator = false, Input: PropInput, Message: PropMessage, messageActions = Object.keys(MESSAGE_ACTIONS), virtualized, } = props;
|
|
32
36
|
const threadInstance = useThreadContext();
|
|
33
|
-
const { isLoadingNext, isLoadingPrev, parentMessage, replies } = useStateStore(threadInstance?.state, selector) ?? {};
|
|
34
37
|
const { thread, threadHasMore, threadLoadingMore, threadMessages = [], threadSuppressAutoscroll, } = useChannelStateContext('Thread');
|
|
35
38
|
const { closeThread, loadMoreThread } = useChannelActionContext('Thread');
|
|
36
39
|
const { customClasses } = useChatContext('Thread');
|
|
37
40
|
const { Message: ContextMessage, ThreadHead = DefaultThreadHead, ThreadHeader = DefaultThreadHeader, ThreadInput: ContextInput, VirtualMessage, } = useComponentContext('Thread');
|
|
41
|
+
const { isLoadingNext, isLoadingPrev, parentMessage, replies } = useStateStore(threadInstance?.state, selector) ?? {};
|
|
38
42
|
const ThreadInput = PropInput ?? additionalMessageInputProps?.Input ?? ContextInput ?? MessageInputFlat;
|
|
39
43
|
const ThreadMessage = PropMessage || additionalMessageListProps?.Message;
|
|
40
44
|
const FallbackMessage = virtualized && VirtualMessage ? VirtualMessage : ContextMessage;
|
|
41
45
|
const MessageUIComponent = ThreadMessage || FallbackMessage;
|
|
42
46
|
const ThreadMessageList = virtualized ? VirtualizedMessageList : MessageList;
|
|
43
47
|
useEffect(() => {
|
|
44
|
-
if (
|
|
48
|
+
if (threadInstance)
|
|
49
|
+
return;
|
|
50
|
+
if ((thread?.reply_count ?? 0) > 0) {
|
|
45
51
|
// FIXME: integrators can customize channel query options but cannot customize channel.getReplies() options
|
|
46
52
|
loadMoreThread();
|
|
47
53
|
}
|
|
48
|
-
}, [thread, loadMoreThread]);
|
|
54
|
+
}, [thread, loadMoreThread, threadInstance]);
|
|
49
55
|
const threadProps = threadInstance
|
|
50
56
|
? {
|
|
51
57
|
loadingMore: isLoadingPrev,
|
|
@@ -68,10 +74,15 @@ const ThreadInner = (props) => {
|
|
|
68
74
|
'str-chat__thread--virtualized': virtualized,
|
|
69
75
|
});
|
|
70
76
|
const head = (React.createElement(ThreadHead, { key: messageAsThread.id, message: messageAsThread, Message: MessageUIComponent, ...additionalParentMessageProps }));
|
|
71
|
-
return (
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
React.createElement(
|
|
77
|
+
return (
|
|
78
|
+
// Thread component needs a context which we can use for message composer
|
|
79
|
+
React.createElement(LegacyThreadContext.Provider, { value: {
|
|
80
|
+
legacyThread: thread ?? undefined,
|
|
81
|
+
} },
|
|
82
|
+
React.createElement("div", { className: threadClass },
|
|
83
|
+
React.createElement(ThreadHeader, { closeThread: closeThread, thread: messageAsThread }),
|
|
84
|
+
React.createElement(ThreadMessageList, { disableDateSeparator: !enableDateSeparator, head: head, Message: MessageUIComponent, messageActions: messageActions, suppressAutoscroll: threadSuppressAutoscroll, threadList: true, ...threadProps, ...(virtualized
|
|
85
|
+
? additionalVirtualizedMessageListProps
|
|
86
|
+
: additionalMessageListProps) }),
|
|
87
|
+
React.createElement(MessageInput, { focus: autoFocus, Input: ThreadInput, isThreadInput: true, parent: thread ?? parentMessage, ...additionalMessageInputProps }))));
|
|
77
88
|
};
|
|
@@ -1,4 +1,3 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { MessageProps } from '../Message';
|
|
3
|
-
|
|
4
|
-
export declare const ThreadHead: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: MessageProps<StreamChatGenerics>) => React.JSX.Element;
|
|
2
|
+
import type { MessageProps } from '../Message';
|
|
3
|
+
export declare const ThreadHead: (props: MessageProps) => React.JSX.Element;
|
|
@@ -1,11 +1,10 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ChannelPreviewInfoParams } from '../ChannelPreview/hooks/useChannelPreviewInfo';
|
|
3
|
-
import {
|
|
4
|
-
|
|
5
|
-
export type ThreadHeaderProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
2
|
+
import type { ChannelPreviewInfoParams } from '../ChannelPreview/hooks/useChannelPreviewInfo';
|
|
3
|
+
import type { LocalMessage } from 'stream-chat';
|
|
4
|
+
export type ThreadHeaderProps = {
|
|
6
5
|
/** Callback for closing the thread */
|
|
7
6
|
closeThread: (event?: React.BaseSyntheticEvent) => void;
|
|
8
7
|
/** The thread parent message */
|
|
9
|
-
thread:
|
|
8
|
+
thread: LocalMessage;
|
|
10
9
|
};
|
|
11
|
-
export declare const ThreadHeader:
|
|
10
|
+
export declare const ThreadHeader: (props: ThreadHeaderProps & Pick<ChannelPreviewInfoParams, 'overrideImage' | 'overrideTitle'>) => React.JSX.Element;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { useChannelPreviewInfo
|
|
2
|
+
import { useChannelPreviewInfo } from '../ChannelPreview/hooks/useChannelPreviewInfo';
|
|
3
3
|
import { CloseIcon } from './icons';
|
|
4
4
|
import { useChannelStateContext } from '../../context/ChannelStateContext';
|
|
5
5
|
import { useTranslationContext } from '../../context/TranslationContext';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import type { PropsWithChildren } from 'react';
|
|
3
|
-
import { Thread } from 'stream-chat';
|
|
3
|
+
import type { Thread } from 'stream-chat';
|
|
4
4
|
export type ThreadContextValue = Thread | undefined;
|
|
5
5
|
export declare const ThreadContext: React.Context<ThreadContextValue>;
|
|
6
|
-
export declare const useThreadContext: () =>
|
|
6
|
+
export declare const useThreadContext: () => ThreadContextValue;
|
|
7
7
|
export declare const ThreadProvider: ({ children, thread, }: PropsWithChildren<{
|
|
8
8
|
thread?: Thread;
|
|
9
9
|
}>) => React.JSX.Element;
|
|
@@ -1,9 +1,6 @@
|
|
|
1
1
|
import React, { createContext, useContext } from 'react';
|
|
2
2
|
import { Channel } from '../../components';
|
|
3
3
|
export const ThreadContext = createContext(undefined);
|
|
4
|
-
export const useThreadContext = () =>
|
|
5
|
-
const thread = useContext(ThreadContext);
|
|
6
|
-
return thread ?? undefined;
|
|
7
|
-
};
|
|
4
|
+
export const useThreadContext = () => useContext(ThreadContext);
|
|
8
5
|
export const ThreadProvider = ({ children, thread, }) => (React.createElement(ThreadContext.Provider, { value: thread },
|
|
9
6
|
React.createElement(Channel, { channel: thread?.channel }, children)));
|
|
@@ -5,5 +5,5 @@ export type ThreadListItemProps = {
|
|
|
5
5
|
thread: Thread;
|
|
6
6
|
threadListItemUIProps?: ThreadListItemUIProps;
|
|
7
7
|
};
|
|
8
|
-
export declare const useThreadListItemContext: () => Thread
|
|
8
|
+
export declare const useThreadListItemContext: () => Thread | undefined;
|
|
9
9
|
export declare const ThreadListItem: ({ thread, threadListItemUIProps, }: ThreadListItemProps) => React.JSX.Element;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { ThreadManagerState } from 'stream-chat';
|
|
1
|
+
import type { ThreadManagerState } from 'stream-chat';
|
|
2
2
|
export declare const useThreadManagerState: <T extends readonly unknown[]>(selector: (nextValue: ThreadManagerState) => T) => T;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
+
import type { ComponentPropsWithoutRef } from 'react';
|
|
3
3
|
export declare const Icon: {
|
|
4
4
|
MessageBubble: (props: ComponentPropsWithoutRef<'svg'>) => React.JSX.Element;
|
|
5
5
|
MessageBubbleEmpty: (props: ComponentPropsWithoutRef<'svg'>) => React.JSX.Element;
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { ComponentProps } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { PopperProps } from 'react-popper';
|
|
3
4
|
export declare const Tooltip: ({ children, ...rest }: ComponentProps<'div'>) => React.JSX.Element;
|
|
4
5
|
export type PopperTooltipProps<T extends HTMLElement> = React.PropsWithChildren<{
|
|
5
6
|
/** Reference element to which the tooltip should attach to */
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React from 'react';
|
|
1
|
+
import type React from 'react';
|
|
2
2
|
export declare const useEnterLeaveHandlers: <T extends HTMLElement>({ onMouseEnter, onMouseLeave, }?: Partial<Record<'onMouseEnter' | 'onMouseLeave', React.MouseEventHandler<T>>>) => {
|
|
3
3
|
handleEnter: React.MouseEventHandler<T>;
|
|
4
4
|
handleLeave: React.MouseEventHandler<T>;
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
3
2
|
export type TypingIndicatorProps = {
|
|
4
3
|
/** Whether the typing indicator is in a thread */
|
|
5
4
|
threadList?: boolean;
|
|
6
5
|
};
|
|
7
|
-
export declare const TypingIndicator:
|
|
6
|
+
export declare const TypingIndicator: (props: TypingIndicatorProps) => React.JSX.Element | null;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import type {
|
|
4
|
-
export type WindowProps
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { LocalMessage } from 'stream-chat';
|
|
4
|
+
export type WindowProps = {
|
|
5
5
|
/** optional prop to force addition of class str-chat__main-panel---with-thread-opn to the Window root element */
|
|
6
|
-
thread?:
|
|
6
|
+
thread?: LocalMessage;
|
|
7
7
|
};
|
|
8
8
|
/**
|
|
9
9
|
* A UI component for conditionally displaying a Thread or Channel
|
|
10
10
|
*/
|
|
11
|
-
export declare const Window:
|
|
11
|
+
export declare const Window: (props: PropsWithChildren<WindowProps>) => React.JSX.Element;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './Attachment';
|
|
2
|
-
export * from './AutoCompleteTextarea';
|
|
3
2
|
export * from './Avatar';
|
|
4
3
|
export * from './Channel';
|
|
5
4
|
export * from './ChannelHeader';
|
|
@@ -7,11 +6,8 @@ export * from './ChannelList';
|
|
|
7
6
|
export * from './ChannelPreview';
|
|
8
7
|
export * from './ChannelSearch';
|
|
9
8
|
export * from './Chat';
|
|
10
|
-
export * from './ChatAutoComplete';
|
|
11
|
-
export * from './CommandItem';
|
|
12
9
|
export * from './DateSeparator';
|
|
13
10
|
export * from './Dialog';
|
|
14
|
-
export * from './EmoticonItem';
|
|
15
11
|
export * from './EmptyStateIndicator';
|
|
16
12
|
export * from './EventComponent';
|
|
17
13
|
export * from './Gallery';
|
|
@@ -29,10 +25,10 @@ export * from './Modal';
|
|
|
29
25
|
export * from './Poll';
|
|
30
26
|
export * from './Reactions';
|
|
31
27
|
export * from './SafeAnchor';
|
|
28
|
+
export * from './TextareaComposer';
|
|
32
29
|
export * from './Thread';
|
|
33
30
|
export * from './Tooltip';
|
|
34
31
|
export * from './TypingIndicator';
|
|
35
|
-
export * from './UserItem';
|
|
36
32
|
export * from './Window';
|
|
37
33
|
export * from './Threads';
|
|
38
34
|
export * from './ChatView';
|
package/dist/components/index.js
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
export * from './Attachment';
|
|
2
|
-
export * from './AutoCompleteTextarea';
|
|
3
2
|
export * from './Avatar';
|
|
4
3
|
export * from './Channel';
|
|
5
4
|
export * from './ChannelHeader';
|
|
@@ -7,11 +6,8 @@ export * from './ChannelList';
|
|
|
7
6
|
export * from './ChannelPreview';
|
|
8
7
|
export * from './ChannelSearch';
|
|
9
8
|
export * from './Chat';
|
|
10
|
-
export * from './ChatAutoComplete';
|
|
11
|
-
export * from './CommandItem';
|
|
12
9
|
export * from './DateSeparator';
|
|
13
10
|
export * from './Dialog';
|
|
14
|
-
export * from './EmoticonItem';
|
|
15
11
|
export * from './EmptyStateIndicator';
|
|
16
12
|
export * from './EventComponent';
|
|
17
13
|
export * from './Gallery';
|
|
@@ -28,10 +24,10 @@ export * from './Modal';
|
|
|
28
24
|
export * from './Poll';
|
|
29
25
|
export * from './Reactions';
|
|
30
26
|
export * from './SafeAnchor';
|
|
27
|
+
export * from './TextareaComposer';
|
|
31
28
|
export * from './Thread';
|
|
32
29
|
export * from './Tooltip';
|
|
33
30
|
export * from './TypingIndicator';
|
|
34
|
-
export * from './UserItem';
|
|
35
31
|
export * from './Window';
|
|
36
32
|
export * from './Threads';
|
|
37
33
|
export * from './ChatView';
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import type {
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { LocalMessage, Message, MessageResponse, SendMessageOptions, UpdateMessageAPIResponse, UpdateMessageOptions } from 'stream-chat';
|
|
4
4
|
import type { ChannelStateReducerAction } from '../components/Channel/channelState';
|
|
5
5
|
import type { CustomMentionHandler } from '../components/Message/hooks/useMentionsHandler';
|
|
6
|
-
import type { ChannelUnreadUiState,
|
|
6
|
+
import type { ChannelUnreadUiState, UnknownType } from '../types/types';
|
|
7
7
|
export type MarkReadWrapperOptions = {
|
|
8
8
|
/**
|
|
9
9
|
* Signal, whether the `channelUnreadUiState` should be updated.
|
|
@@ -12,25 +12,13 @@ export type MarkReadWrapperOptions = {
|
|
|
12
12
|
*/
|
|
13
13
|
updateChannelUiUnreadState?: boolean;
|
|
14
14
|
};
|
|
15
|
-
export type
|
|
16
|
-
export type
|
|
17
|
-
attachments?: MessageAttachments<StreamChatGenerics>;
|
|
18
|
-
error?: ErrorFromResponse<APIErrorResponse>;
|
|
19
|
-
errorStatusCode?: number;
|
|
20
|
-
id?: string;
|
|
21
|
-
mentioned_users?: UserResponse<StreamChatGenerics>[];
|
|
22
|
-
parent?: StreamMessage<StreamChatGenerics>;
|
|
23
|
-
parent_id?: string;
|
|
24
|
-
status?: string;
|
|
25
|
-
text?: string;
|
|
26
|
-
};
|
|
27
|
-
export type RetrySendMessage<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = (message: StreamMessage<StreamChatGenerics>) => Promise<void>;
|
|
28
|
-
export type ChannelActionContextValue<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
15
|
+
export type RetrySendMessage = (message: LocalMessage) => Promise<void>;
|
|
16
|
+
export type ChannelActionContextValue = {
|
|
29
17
|
addNotification: (text: string, type: 'success' | 'error') => void;
|
|
30
18
|
closeThread: (event?: React.BaseSyntheticEvent) => void;
|
|
31
|
-
deleteMessage: (message:
|
|
32
|
-
dispatch: React.Dispatch<ChannelStateReducerAction
|
|
33
|
-
editMessage: (message:
|
|
19
|
+
deleteMessage: (message: LocalMessage) => Promise<MessageResponse>;
|
|
20
|
+
dispatch: React.Dispatch<ChannelStateReducerAction>;
|
|
21
|
+
editMessage: (message: LocalMessage | MessageResponse, options?: UpdateMessageOptions) => Promise<UpdateMessageAPIResponse | void>;
|
|
34
22
|
jumpToFirstUnreadMessage: (queryMessageLimit?: number, highlightDuration?: number) => Promise<void>;
|
|
35
23
|
jumpToLatestMessage: () => Promise<void>;
|
|
36
24
|
jumpToMessage: (messageId: string, limit?: number, highlightDuration?: number) => Promise<void>;
|
|
@@ -38,27 +26,30 @@ export type ChannelActionContextValue<StreamChatGenerics extends DefaultStreamCh
|
|
|
38
26
|
loadMoreNewer: (limit?: number) => Promise<number>;
|
|
39
27
|
loadMoreThread: () => Promise<void>;
|
|
40
28
|
markRead: (options?: MarkReadWrapperOptions) => void;
|
|
41
|
-
onMentionsClick: CustomMentionHandler
|
|
42
|
-
onMentionsHover: CustomMentionHandler
|
|
43
|
-
openThread: (message:
|
|
44
|
-
removeMessage: (message:
|
|
45
|
-
retrySendMessage: RetrySendMessage
|
|
46
|
-
sendMessage: (
|
|
29
|
+
onMentionsClick: CustomMentionHandler;
|
|
30
|
+
onMentionsHover: CustomMentionHandler;
|
|
31
|
+
openThread: (message: LocalMessage, event?: React.BaseSyntheticEvent) => void;
|
|
32
|
+
removeMessage: (message: LocalMessage) => void;
|
|
33
|
+
retrySendMessage: RetrySendMessage;
|
|
34
|
+
sendMessage: (params: {
|
|
35
|
+
localMessage: LocalMessage;
|
|
36
|
+
message: Message;
|
|
37
|
+
options?: SendMessageOptions;
|
|
38
|
+
}) => Promise<void>;
|
|
47
39
|
setChannelUnreadUiState: React.Dispatch<React.SetStateAction<ChannelUnreadUiState | undefined>>;
|
|
48
|
-
|
|
49
|
-
updateMessage: (message: StreamMessage<StreamChatGenerics>) => void;
|
|
40
|
+
updateMessage: (message: MessageResponse | LocalMessage) => void;
|
|
50
41
|
};
|
|
51
|
-
export declare const ChannelActionContext: React.Context<ChannelActionContextValue
|
|
52
|
-
export declare const ChannelActionProvider:
|
|
53
|
-
value: ChannelActionContextValue
|
|
42
|
+
export declare const ChannelActionContext: React.Context<ChannelActionContextValue | undefined>;
|
|
43
|
+
export declare const ChannelActionProvider: ({ children, value, }: PropsWithChildren<{
|
|
44
|
+
value: ChannelActionContextValue;
|
|
54
45
|
}>) => React.JSX.Element;
|
|
55
|
-
export declare const useChannelActionContext:
|
|
46
|
+
export declare const useChannelActionContext: (componentName?: string) => ChannelActionContextValue;
|
|
56
47
|
/**
|
|
57
48
|
* Typescript currently does not support partial inference, so if ChannelActionContext
|
|
58
49
|
* typing is desired while using the HOC withChannelActionContext, the Props for the
|
|
59
50
|
* wrapped component must be provided as the first generic.
|
|
60
51
|
*/
|
|
61
|
-
export declare const withChannelActionContext: <P extends UnknownType
|
|
62
|
-
(props: Omit<P, keyof ChannelActionContextValue
|
|
52
|
+
export declare const withChannelActionContext: <P extends UnknownType>(Component: React.ComponentType<P>) => {
|
|
53
|
+
(props: Omit<P, keyof ChannelActionContextValue>): React.JSX.Element;
|
|
63
54
|
displayName: string;
|
|
64
55
|
};
|
|
@@ -1,22 +1,22 @@
|
|
|
1
|
-
import
|
|
1
|
+
import type { Dispatch, PropsWithChildren, SetStateAction } from 'react';
|
|
2
|
+
import React from 'react';
|
|
2
3
|
import type { Channel } from 'stream-chat';
|
|
3
|
-
|
|
4
|
-
export type ChannelListContextValue<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
4
|
+
export type ChannelListContextValue = {
|
|
5
5
|
/**
|
|
6
6
|
* State representing the array of loaded channels.
|
|
7
7
|
* Channels query is executed by default only by ChannelList component in the SDK.
|
|
8
8
|
*/
|
|
9
|
-
channels: Channel
|
|
9
|
+
channels: Channel[];
|
|
10
10
|
/**
|
|
11
11
|
* Sets the list of Channel objects to be rendered by ChannelList component.
|
|
12
12
|
*/
|
|
13
|
-
setChannels: Dispatch<SetStateAction<Channel
|
|
13
|
+
setChannels: Dispatch<SetStateAction<Channel[]>>;
|
|
14
14
|
};
|
|
15
|
-
export declare const ChannelListContext: React.Context<ChannelListContextValue
|
|
15
|
+
export declare const ChannelListContext: React.Context<ChannelListContextValue | undefined>;
|
|
16
16
|
/**
|
|
17
17
|
* Context provider for components rendered within the `ChannelList`
|
|
18
18
|
*/
|
|
19
|
-
export declare const ChannelListContextProvider:
|
|
20
|
-
value: ChannelListContextValue
|
|
19
|
+
export declare const ChannelListContextProvider: ({ children, value, }: PropsWithChildren<{
|
|
20
|
+
value: ChannelListContextValue;
|
|
21
21
|
}>) => React.JSX.Element;
|
|
22
|
-
export declare const useChannelListContext:
|
|
22
|
+
export declare const useChannelListContext: (componentName?: string) => ChannelListContextValue;
|
|
@@ -1,14 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import type {
|
|
4
|
-
import type {
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { Channel, ChannelConfigWithInfo, LocalMessage, Mute, ChannelState as StreamChannelState } from 'stream-chat';
|
|
4
|
+
import type { ChannelUnreadUiState, GiphyVersions, ImageAttachmentSizeHandler, UnknownType, VideoAttachmentSizeHandler } from '../types/types';
|
|
5
5
|
export type ChannelNotifications = Array<{
|
|
6
6
|
id: string;
|
|
7
7
|
text: string;
|
|
8
8
|
type: 'success' | 'error';
|
|
9
9
|
}>;
|
|
10
|
-
export type
|
|
11
|
-
export type ChannelState<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
10
|
+
export type ChannelState = {
|
|
12
11
|
suppressAutoscroll: boolean;
|
|
13
12
|
error?: Error | null;
|
|
14
13
|
hasMore?: boolean;
|
|
@@ -17,52 +16,43 @@ export type ChannelState<StreamChatGenerics extends DefaultStreamChatGenerics =
|
|
|
17
16
|
loading?: boolean;
|
|
18
17
|
loadingMore?: boolean;
|
|
19
18
|
loadingMoreNewer?: boolean;
|
|
20
|
-
members?: StreamChannelState
|
|
21
|
-
messages?:
|
|
22
|
-
pinnedMessages?:
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
thread?: StreamMessage<StreamChatGenerics> | null;
|
|
19
|
+
members?: StreamChannelState['members'];
|
|
20
|
+
messages?: LocalMessage[];
|
|
21
|
+
pinnedMessages?: LocalMessage[];
|
|
22
|
+
read?: StreamChannelState['read'];
|
|
23
|
+
thread?: LocalMessage | null;
|
|
26
24
|
threadHasMore?: boolean;
|
|
27
25
|
threadLoadingMore?: boolean;
|
|
28
|
-
threadMessages?:
|
|
26
|
+
threadMessages?: LocalMessage[];
|
|
29
27
|
threadSuppressAutoscroll?: boolean;
|
|
30
|
-
typing?: StreamChannelState
|
|
28
|
+
typing?: StreamChannelState['typing'];
|
|
31
29
|
watcherCount?: number;
|
|
32
|
-
watchers?: StreamChannelState
|
|
30
|
+
watchers?: StreamChannelState['watchers'];
|
|
33
31
|
};
|
|
34
|
-
export type ChannelStateContextValue
|
|
35
|
-
channel: Channel
|
|
32
|
+
export type ChannelStateContextValue = Omit<ChannelState, 'typing'> & {
|
|
33
|
+
channel: Channel;
|
|
36
34
|
channelCapabilities: Record<string, boolean>;
|
|
37
|
-
channelConfig: ChannelConfigWithInfo
|
|
35
|
+
channelConfig: ChannelConfigWithInfo | undefined;
|
|
38
36
|
imageAttachmentSizeHandler: ImageAttachmentSizeHandler;
|
|
39
|
-
multipleUploads: boolean;
|
|
40
37
|
notifications: ChannelNotifications;
|
|
41
38
|
shouldGenerateVideoThumbnail: boolean;
|
|
42
39
|
videoAttachmentSizeHandler: VideoAttachmentSizeHandler;
|
|
43
|
-
|
|
44
|
-
channelUnreadUiState?: ChannelUnreadUiState<StreamChatGenerics>;
|
|
45
|
-
debounceURLEnrichmentMs?: URLEnrichmentConfig['debounceURLEnrichmentMs'];
|
|
46
|
-
dragAndDropWindow?: boolean;
|
|
47
|
-
enrichURLForPreview?: URLEnrichmentConfig['enrichURLForPreview'];
|
|
48
|
-
findURLFn?: URLEnrichmentConfig['findURLFn'];
|
|
40
|
+
channelUnreadUiState?: ChannelUnreadUiState;
|
|
49
41
|
giphyVersion?: GiphyVersions;
|
|
50
|
-
|
|
51
|
-
mutes?: Array<Mute<StreamChatGenerics>>;
|
|
52
|
-
onLinkPreviewDismissed?: URLEnrichmentConfig['onLinkPreviewDismissed'];
|
|
42
|
+
mutes?: Array<Mute>;
|
|
53
43
|
watcher_count?: number;
|
|
54
44
|
};
|
|
55
|
-
export declare const ChannelStateContext: React.Context<ChannelStateContextValue
|
|
56
|
-
export declare const ChannelStateProvider:
|
|
57
|
-
value: ChannelStateContextValue
|
|
45
|
+
export declare const ChannelStateContext: React.Context<ChannelStateContextValue | undefined>;
|
|
46
|
+
export declare const ChannelStateProvider: ({ children, value, }: PropsWithChildren<{
|
|
47
|
+
value: ChannelStateContextValue;
|
|
58
48
|
}>) => React.JSX.Element;
|
|
59
|
-
export declare const useChannelStateContext:
|
|
49
|
+
export declare const useChannelStateContext: (componentName?: string) => ChannelStateContextValue;
|
|
60
50
|
/**
|
|
61
51
|
* Typescript currently does not support partial inference, so if ChannelStateContext
|
|
62
52
|
* typing is desired while using the HOC withChannelStateContext, the Props for the
|
|
63
53
|
* wrapped component must be provided as the first generic.
|
|
64
54
|
*/
|
|
65
|
-
export declare const withChannelStateContext: <P extends UnknownType
|
|
66
|
-
(props: Omit<P, keyof ChannelStateContextValue
|
|
55
|
+
export declare const withChannelStateContext: <P extends UnknownType>(Component: React.ComponentType<P>) => {
|
|
56
|
+
(props: Omit<P, keyof ChannelStateContextValue>): React.JSX.Element;
|
|
67
57
|
displayName: string;
|
|
68
58
|
};
|
|
@@ -1,30 +1,31 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropsWithChildren } from 'react';
|
|
2
3
|
import type { AppSettingsAPIResponse, Channel, Mute, SearchController } from 'stream-chat';
|
|
3
4
|
import type { ChatProps } from '../components/Chat/Chat';
|
|
4
|
-
import type {
|
|
5
|
+
import type { UnknownType } from '../types/types';
|
|
5
6
|
import type { ChannelsQueryState } from '../components/Chat/hooks/useChannelsQueryState';
|
|
6
7
|
type CSSClasses = 'chat' | 'chatContainer' | 'channel' | 'channelList' | 'message' | 'messageList' | 'thread' | 'threadList' | 'virtualMessage' | 'virtualizedMessageList';
|
|
7
8
|
export type CustomClasses = Partial<Record<CSSClasses, string>>;
|
|
8
|
-
type
|
|
9
|
-
export type ChatContextValue
|
|
9
|
+
type ChannelConfId = string;
|
|
10
|
+
export type ChatContextValue = {
|
|
10
11
|
/**
|
|
11
12
|
* Indicates, whether a channels query has been triggered within ChannelList by its channels pagination controller.
|
|
12
13
|
*/
|
|
13
14
|
channelsQueryState: ChannelsQueryState;
|
|
14
15
|
closeMobileNav: () => void;
|
|
15
|
-
getAppSettings: () => Promise<AppSettingsAPIResponse
|
|
16
|
-
latestMessageDatesByChannels: Record<
|
|
17
|
-
mutes: Array<Mute
|
|
16
|
+
getAppSettings: () => Promise<AppSettingsAPIResponse> | null;
|
|
17
|
+
latestMessageDatesByChannels: Record<ChannelConfId, Date>;
|
|
18
|
+
mutes: Array<Mute>;
|
|
18
19
|
openMobileNav: () => void;
|
|
19
20
|
/** Instance of SearchController class that allows to control all the search operations. */
|
|
20
|
-
searchController: SearchController
|
|
21
|
+
searchController: SearchController;
|
|
21
22
|
/**
|
|
22
23
|
* Sets active channel to be rendered within Channel component.
|
|
23
24
|
* @param newChannel
|
|
24
25
|
* @param watchers
|
|
25
26
|
* @param event
|
|
26
27
|
*/
|
|
27
|
-
setActiveChannel: (newChannel?: Channel
|
|
28
|
+
setActiveChannel: (newChannel?: Channel, watchers?: {
|
|
28
29
|
limit?: number;
|
|
29
30
|
offset?: number;
|
|
30
31
|
}, event?: React.BaseSyntheticEvent) => void;
|
|
@@ -32,25 +33,25 @@ export type ChatContextValue<StreamChatGenerics extends DefaultStreamChatGeneric
|
|
|
32
33
|
/**
|
|
33
34
|
* Active channel used to render the contents of the Channel component.
|
|
34
35
|
*/
|
|
35
|
-
channel?: Channel
|
|
36
|
+
channel?: Channel;
|
|
36
37
|
/**
|
|
37
38
|
* Object through which custom classes can be set for main container components of the SDK.
|
|
38
39
|
*/
|
|
39
40
|
customClasses?: CustomClasses;
|
|
40
41
|
navOpen?: boolean;
|
|
41
|
-
} & Partial<Pick<ChatProps
|
|
42
|
-
export declare const ChatContext: React.Context<ChatContextValue
|
|
43
|
-
export declare const ChatProvider:
|
|
44
|
-
value: ChatContextValue
|
|
42
|
+
} & Partial<Pick<ChatProps, 'isMessageAIGenerated'>> & Required<Pick<ChatProps, 'theme' | 'client'>>;
|
|
43
|
+
export declare const ChatContext: React.Context<ChatContextValue | undefined>;
|
|
44
|
+
export declare const ChatProvider: ({ children, value, }: PropsWithChildren<{
|
|
45
|
+
value: ChatContextValue;
|
|
45
46
|
}>) => React.JSX.Element;
|
|
46
|
-
export declare const useChatContext:
|
|
47
|
+
export declare const useChatContext: (componentName?: string) => ChatContextValue;
|
|
47
48
|
/**
|
|
48
49
|
* Typescript currently does not support partial inference so if ChatContext
|
|
49
50
|
* typing is desired while using the HOC withChatContext the Props for the
|
|
50
51
|
* wrapped component must be provided as the first generic.
|
|
51
52
|
*/
|
|
52
|
-
export declare const withChatContext: <P extends UnknownType
|
|
53
|
-
(props: Omit<P, keyof ChatContextValue
|
|
53
|
+
export declare const withChatContext: <P extends UnknownType>(Component: React.ComponentType<P>) => {
|
|
54
|
+
(props: Omit<P, keyof ChatContextValue>): React.JSX.Element;
|
|
54
55
|
displayName: string;
|
|
55
56
|
};
|
|
56
57
|
export {};
|