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,11 +1,13 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
import type {
|
|
1
|
+
import type { PropsWithChildren } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { AttachmentPreviewListProps, AttachmentProps, AvatarProps, BaseImageProps, ChannelPreviewActionButtonsProps, CooldownTimerProps, CustomMessageActionsListProps, DateSeparatorProps, EmojiSearchIndex, EmptyStateIndicatorProps, EventComponentProps, FixedHeightMessageProps, GiphyPreviewMessageProps, LoadingIndicatorProps, MessageBouncePromptProps, MessageDeletedProps, MessageInputProps, MessageListNotificationsProps, MessageNotificationProps, MessageOptionsProps, MessageProps, MessageRepliesCountButtonProps, MessageStatusProps, MessageTimestampProps, MessageUIComponentProps, ModalGalleryProps, PinIndicatorProps, PollCreationDialogProps, PollOptionSelectorProps, QuotedMessagePreviewProps, ReactionOptions, ReactionSelectorProps, ReactionsListModalProps, ReactionsListProps, RecordingPermissionDeniedNotificationProps, SendButtonProps, StartRecordingAudioButtonProps, StreamedMessageTextProps, ThreadHeaderProps, ThreadListItemProps, ThreadListItemUIProps, TimestampProps, TypingIndicatorProps, UnreadMessagesNotificationProps, UnreadMessagesSeparatorProps } from '../components';
|
|
4
|
+
import type { SuggestionItemProps, SuggestionListProps } from '../components/TextareaComposer';
|
|
5
|
+
import type { SearchProps, SearchResultsPresearchProps, SearchSourceResultListProps } from '../experimental';
|
|
6
|
+
import type { PropsWithChildrenOnly, UnknownType } from '../types/types';
|
|
5
7
|
import type { StopAIGenerationButtonProps } from '../components/MessageInput/StopAIGenerationButton';
|
|
6
|
-
export type ComponentContextValue
|
|
8
|
+
export type ComponentContextValue = {
|
|
7
9
|
/** Custom UI component to display a message attachment, defaults to and accepts same props as: [Attachment](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Attachment.tsx) */
|
|
8
|
-
Attachment?: React.ComponentType<AttachmentProps
|
|
10
|
+
Attachment?: React.ComponentType<AttachmentProps>;
|
|
9
11
|
/** Custom UI component to display an attachment previews in MessageInput, defaults to and accepts same props as: [Attachment](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/AttachmentPreviewList.tsx) */
|
|
10
12
|
AttachmentPreviewList?: React.ComponentType<AttachmentPreviewListProps>;
|
|
11
13
|
/** Custom UI component to control adding attachments to MessageInput, defaults to and accepts same props as: [AttachmentSelector](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/AttachmentSelector.tsx) */
|
|
@@ -15,23 +17,23 @@ export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGe
|
|
|
15
17
|
/** Custom UI component to display AudioRecorder in MessageInput, defaults to and accepts same props as: [AudioRecorder](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/AudioRecorder.tsx) */
|
|
16
18
|
AudioRecorder?: React.ComponentType;
|
|
17
19
|
/** Optional UI component to override the default suggestion Item component, defaults to and accepts same props as: [Item](https://github.com/GetStream/stream-chat-react/blob/master/src/components/AutoCompleteTextarea/Item.js) */
|
|
18
|
-
AutocompleteSuggestionItem?: React.ComponentType<SuggestionItemProps
|
|
20
|
+
AutocompleteSuggestionItem?: React.ComponentType<SuggestionItemProps>;
|
|
19
21
|
/** Optional UI component to override the default List component that displays suggestions, defaults to and accepts same props as: [List](https://github.com/GetStream/stream-chat-react/blob/master/src/components/AutoCompleteTextarea/List.js) */
|
|
20
|
-
AutocompleteSuggestionList?: React.ComponentType<SuggestionListProps
|
|
22
|
+
AutocompleteSuggestionList?: React.ComponentType<SuggestionListProps>;
|
|
21
23
|
/** UI component to display a user's avatar, defaults to and accepts same props as: [Avatar](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Avatar/Avatar.tsx) */
|
|
22
|
-
Avatar?: React.ComponentType<AvatarProps
|
|
24
|
+
Avatar?: React.ComponentType<AvatarProps>;
|
|
23
25
|
/** Custom UI component to display <img/> elements resp. a fallback in case of load error, defaults to and accepts same props as: [BaseImage](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/BaseImage.tsx) */
|
|
24
26
|
BaseImage?: React.ComponentType<BaseImageProps>;
|
|
25
27
|
/** Custom UI component to display set of action buttons within `ChannelPreviewMessenger` component, accepts same props as: [ChannelPreviewActionButtons](https://github.com/GetStream/stream-chat-react/blob/master/src/components/ChannelList/ChannelPreviewActionButtons.tsx) */
|
|
26
|
-
ChannelPreviewActionButtons?: React.ComponentType<ChannelPreviewActionButtonsProps
|
|
28
|
+
ChannelPreviewActionButtons?: React.ComponentType<ChannelPreviewActionButtonsProps>;
|
|
27
29
|
/** Custom UI component to display the slow mode cooldown timer, defaults to and accepts same props as: [CooldownTimer](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/CooldownTimer.tsx) */
|
|
28
30
|
CooldownTimer?: React.ComponentType<CooldownTimerProps>;
|
|
29
31
|
/** Custom UI component to render set of buttons to be displayed in the MessageActionsBox, defaults to and accepts same props as: [CustomMessageActionsList](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageActions/CustomMessageActionsList.tsx) */
|
|
30
|
-
CustomMessageActionsList?: React.ComponentType<CustomMessageActionsListProps
|
|
32
|
+
CustomMessageActionsList?: React.ComponentType<CustomMessageActionsListProps>;
|
|
31
33
|
/** Custom UI component for date separators, defaults to and accepts same props as: [DateSeparator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/DateSeparator.tsx) */
|
|
32
34
|
DateSeparator?: React.ComponentType<DateSeparatorProps>;
|
|
33
35
|
/** Custom UI component to override default edit message input, defaults to and accepts same props as: [EditMessageForm](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/EditMessageForm.tsx) */
|
|
34
|
-
EditMessageInput?: React.ComponentType<MessageInputProps
|
|
36
|
+
EditMessageInput?: React.ComponentType<MessageInputProps>;
|
|
35
37
|
/** Custom UI component for rendering button with emoji picker in MessageInput */
|
|
36
38
|
EmojiPicker?: React.ComponentType;
|
|
37
39
|
/** Mechanism to be used with autocomplete and text replace features of the `MessageInput` component, see [emoji-mart `SearchIndex`](https://github.com/missive/emoji-mart#%EF%B8%8F%EF%B8%8F-headless-search) */
|
|
@@ -44,17 +46,17 @@ export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGe
|
|
|
44
46
|
*/
|
|
45
47
|
FileUploadIcon?: React.ComponentType;
|
|
46
48
|
/** Custom UI component to render a Giphy preview in the `VirtualizedMessageList` */
|
|
47
|
-
GiphyPreviewMessage?: React.ComponentType<GiphyPreviewMessageProps
|
|
49
|
+
GiphyPreviewMessage?: React.ComponentType<GiphyPreviewMessageProps>;
|
|
48
50
|
/** Custom UI component to render at the top of the `MessageList` */
|
|
49
51
|
HeaderComponent?: React.ComponentType;
|
|
50
52
|
/** Custom UI component handling how the message input is rendered, defaults to and accepts the same props as [MessageInputFlat](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/MessageInputFlat.tsx) */
|
|
51
|
-
Input?: React.ComponentType<MessageInputProps
|
|
53
|
+
Input?: React.ComponentType<MessageInputProps>;
|
|
52
54
|
/** Custom component to render link previews in message input **/
|
|
53
|
-
LinkPreviewList?: React.ComponentType
|
|
55
|
+
LinkPreviewList?: React.ComponentType;
|
|
54
56
|
/** Custom UI component to render while the `MessageList` is loading new messages, defaults to and accepts same props as: [LoadingIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Loading/LoadingIndicator.tsx) */
|
|
55
57
|
LoadingIndicator?: React.ComponentType<LoadingIndicatorProps>;
|
|
56
58
|
/** Custom UI component to display a message in the standard `MessageList`, defaults to and accepts the same props as: [MessageSimple](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageSimple.tsx) */
|
|
57
|
-
Message?: React.ComponentType<MessageUIComponentProps
|
|
59
|
+
Message?: React.ComponentType<MessageUIComponentProps>;
|
|
58
60
|
/** Custom UI component for message actions popup, accepts no props, all the defaults are set within [MessageActions (unstable)](https://github.com/GetStream/stream-chat-react/blob/master/src/experimental/MessageActions/MessageActions.tsx) */
|
|
59
61
|
MessageActions?: React.ComponentType;
|
|
60
62
|
/** Custom UI component to display the contents of a bounced message modal. Usually it allows to retry, edit, or delete the message. Defaults to and accepts the same props as: [MessageBouncePrompt](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageBounce/MessageBouncePrompt.tsx) */
|
|
@@ -62,7 +64,7 @@ export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGe
|
|
|
62
64
|
/** Custom UI component for a moderation-blocked message, defaults to and accepts same props as: [MessageBlocked](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageBlocked.tsx) */
|
|
63
65
|
MessageBlocked?: React.ComponentType;
|
|
64
66
|
/** Custom UI component for a deleted message, defaults to and accepts same props as: [MessageDeleted](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageDeleted.tsx) */
|
|
65
|
-
MessageDeleted?: React.ComponentType<MessageDeletedProps
|
|
67
|
+
MessageDeleted?: React.ComponentType<MessageDeletedProps>;
|
|
66
68
|
MessageListMainPanel?: React.ComponentType<PropsWithChildrenOnly>;
|
|
67
69
|
/** Custom UI component that displays message and connection status notifications in the `MessageList`, defaults to and accepts same props as [DefaultMessageListNotifications](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/MessageListNotifications.tsx) */
|
|
68
70
|
MessageListNotifications?: React.ComponentType<MessageListNotificationsProps>;
|
|
@@ -73,19 +75,19 @@ export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGe
|
|
|
73
75
|
*
|
|
74
76
|
* @deprecated Use MessageActions property instead.
|
|
75
77
|
*/
|
|
76
|
-
MessageOptions?: React.ComponentType<MessageOptionsProps
|
|
78
|
+
MessageOptions?: React.ComponentType<MessageOptionsProps>;
|
|
77
79
|
/** Custom UI component to display message replies, defaults to and accepts same props as: [MessageRepliesCountButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageRepliesCountButton.tsx) */
|
|
78
80
|
MessageRepliesCountButton?: React.ComponentType<MessageRepliesCountButtonProps>;
|
|
79
81
|
/** Custom UI component to display message delivery status, defaults to and accepts same props as: [MessageStatus](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageStatus.tsx) */
|
|
80
82
|
MessageStatus?: React.ComponentType<MessageStatusProps>;
|
|
81
83
|
/** Custom UI component to display system messages, defaults to and accepts same props as: [EventComponent](https://github.com/GetStream/stream-chat-react/blob/master/src/components/EventComponent/EventComponent.tsx) */
|
|
82
|
-
MessageSystem?: React.ComponentType<EventComponentProps
|
|
84
|
+
MessageSystem?: React.ComponentType<EventComponentProps>;
|
|
83
85
|
/** Custom UI component to display a timestamp on a message, defaults to and accepts same props as: [MessageTimestamp](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageTimestamp.tsx) */
|
|
84
|
-
MessageTimestamp?: React.ComponentType<MessageTimestampProps
|
|
86
|
+
MessageTimestamp?: React.ComponentType<MessageTimestampProps>;
|
|
85
87
|
/** Custom UI component for viewing message's image attachments, defaults to and accepts the same props as [ModalGallery](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/ModalGallery.tsx) */
|
|
86
88
|
ModalGallery?: React.ComponentType<ModalGalleryProps>;
|
|
87
89
|
/** Custom UI component to override default pinned message indicator, defaults to and accepts same props as: [PinIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/icons.tsx) */
|
|
88
|
-
PinIndicator?: React.ComponentType<PinIndicatorProps
|
|
90
|
+
PinIndicator?: React.ComponentType<PinIndicatorProps>;
|
|
89
91
|
/** Custom UI component to override default poll actions rendering in a message, defaults to and accepts same props as: [PollActions](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollActions/PollActions.tsx) */
|
|
90
92
|
PollActions?: React.ComponentType;
|
|
91
93
|
/** Custom UI component to override default poll rendering in a message, defaults to and accepts same props as: [PollContent](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollContent.tsx) */
|
|
@@ -95,21 +97,21 @@ export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGe
|
|
|
95
97
|
/** Custom UI component to override default poll header in a message, defaults to and accepts same props as: [PollHeader](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollHeader.tsx) */
|
|
96
98
|
PollHeader?: React.ComponentType;
|
|
97
99
|
/** Custom UI component to override default poll option selector, defaults to and accepts same props as: [PollOptionSelector](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/PollOptionSelector.tsx) */
|
|
98
|
-
PollOptionSelector?: React.ComponentType<PollOptionSelectorProps
|
|
100
|
+
PollOptionSelector?: React.ComponentType<PollOptionSelectorProps>;
|
|
99
101
|
/** Custom UI component to override quoted message UI on a sent message, defaults to and accepts same props as: [QuotedMessage](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/QuotedMessage.tsx) */
|
|
100
102
|
QuotedMessage?: React.ComponentType;
|
|
101
103
|
/** Custom UI component to override the message input's quoted message preview, defaults to and accepts same props as: [QuotedMessagePreview](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/QuotedMessagePreview.tsx) */
|
|
102
|
-
QuotedMessagePreview?: React.ComponentType<QuotedMessagePreviewProps
|
|
104
|
+
QuotedMessagePreview?: React.ComponentType<QuotedMessagePreviewProps>;
|
|
103
105
|
/** Custom UI component to override the rendering of quoted poll, defaults to and accepts same props as: [QuotedPoll](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Poll/QuotedPoll.tsx) */
|
|
104
106
|
QuotedPoll?: React.ComponentType;
|
|
105
107
|
/** Custom reaction options to be applied to ReactionSelector, ReactionList and SimpleReactionList components */
|
|
106
108
|
reactionOptions?: ReactionOptions;
|
|
107
109
|
/** Custom UI component to display the reaction selector, defaults to and accepts same props as: [ReactionSelector](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Reactions/ReactionSelector.tsx) */
|
|
108
|
-
ReactionSelector?: React.ForwardRefExoticComponent<ReactionSelectorProps
|
|
110
|
+
ReactionSelector?: React.ForwardRefExoticComponent<ReactionSelectorProps>;
|
|
109
111
|
/** Custom UI component to display the list of reactions on a message, defaults to and accepts same props as: [ReactionsList](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Reactions/ReactionsList.tsx) */
|
|
110
|
-
ReactionsList?: React.ComponentType<ReactionsListProps
|
|
112
|
+
ReactionsList?: React.ComponentType<ReactionsListProps>;
|
|
111
113
|
/** Custom UI component to display the reactions modal, defaults to and accepts same props as: [ReactionsListModal](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Reactions/ReactionsListModal.tsx) */
|
|
112
|
-
ReactionsListModal?: React.ComponentType<ReactionsListModalProps
|
|
114
|
+
ReactionsListModal?: React.ComponentType<ReactionsListModalProps>;
|
|
113
115
|
RecordingPermissionDeniedNotification?: React.ComponentType<RecordingPermissionDeniedNotificationProps>;
|
|
114
116
|
/** Custom component to display the search UI, defaults to and accepts same props as: [Search](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/Search.tsx) */
|
|
115
117
|
Search?: React.ComponentType<SearchProps>;
|
|
@@ -134,16 +136,16 @@ export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGe
|
|
|
134
136
|
/** Custom component to display the search source results UI during the search query execution, defaults to and accepts same props as: [SearchSourceResultsLoadingIndicator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Search/SearchResults/SearchSourceResultsLoadingIndicator.tsx) */
|
|
135
137
|
SearchSourceResultsLoadingIndicator?: React.ComponentType;
|
|
136
138
|
/** Custom UI component for send button, defaults to and accepts same props as: [SendButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageInput/icons.tsx) */
|
|
137
|
-
SendButton?: React.ComponentType<SendButtonProps
|
|
139
|
+
SendButton?: React.ComponentType<SendButtonProps>;
|
|
138
140
|
/** Custom UI component button for initiating audio recording, defaults to and accepts same props as: [StartRecordingAudioButton](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MediaRecorder/AudioRecorder/AudioRecordingButtons.tsx) */
|
|
139
141
|
StartRecordingAudioButton?: React.ComponentType<StartRecordingAudioButtonProps>;
|
|
140
142
|
StopAIGenerationButton?: React.ComponentType<StopAIGenerationButtonProps> | null;
|
|
141
143
|
StreamedMessageText?: React.ComponentType<StreamedMessageTextProps>;
|
|
142
144
|
/** Custom UI component that displays thread's parent or other message at the top of the `MessageList`, defaults to and accepts same props as [MessageSimple](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Message/MessageSimple.tsx) */
|
|
143
|
-
ThreadHead?: React.ComponentType<MessageProps
|
|
145
|
+
ThreadHead?: React.ComponentType<MessageProps>;
|
|
144
146
|
/** Custom UI component to display the header of a `Thread`, defaults to and accepts same props as: [DefaultThreadHeader](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Thread/Thread.tsx) */
|
|
145
|
-
ThreadHeader?: React.ComponentType<ThreadHeaderProps
|
|
146
|
-
ThreadInput?: React.ComponentType<MessageInputProps
|
|
147
|
+
ThreadHeader?: React.ComponentType<ThreadHeaderProps>;
|
|
148
|
+
ThreadInput?: React.ComponentType<MessageInputProps>;
|
|
147
149
|
ThreadListEmptyPlaceholder?: React.ComponentType;
|
|
148
150
|
ThreadListItem?: React.ComponentType<ThreadListItemProps>;
|
|
149
151
|
ThreadListItemUI?: React.ComponentType<ThreadListItemUIProps>;
|
|
@@ -162,19 +164,19 @@ export type ComponentContextValue<StreamChatGenerics extends DefaultStreamChatGe
|
|
|
162
164
|
/** Custom UI component that separates read messages from unread, defaults to and accepts same props as: [UnreadMessagesSeparator](https://github.com/GetStream/stream-chat-react/blob/master/src/components/MessageList/UnreadMessagesSeparator.tsx) */
|
|
163
165
|
UnreadMessagesSeparator?: React.ComponentType<UnreadMessagesSeparatorProps>;
|
|
164
166
|
/** Custom UI component to display a message in the `VirtualizedMessageList`, does not have a default implementation */
|
|
165
|
-
VirtualMessage?: React.ComponentType<FixedHeightMessageProps
|
|
167
|
+
VirtualMessage?: React.ComponentType<FixedHeightMessageProps>;
|
|
166
168
|
};
|
|
167
|
-
export declare const ComponentContext: React.Context<ComponentContextValue
|
|
168
|
-
export declare const ComponentProvider:
|
|
169
|
-
value: Partial<ComponentContextValue
|
|
169
|
+
export declare const ComponentContext: React.Context<ComponentContextValue>;
|
|
170
|
+
export declare const ComponentProvider: ({ children, value, }: PropsWithChildren<{
|
|
171
|
+
value: Partial<ComponentContextValue>;
|
|
170
172
|
}>) => React.JSX.Element;
|
|
171
|
-
export declare const useComponentContext:
|
|
173
|
+
export declare const useComponentContext: (_componentName?: string) => ComponentContextValue;
|
|
172
174
|
/**
|
|
173
175
|
* Typescript currently does not support partial inference, so if ComponentContext
|
|
174
176
|
* typing is desired while using the HOC withComponentContext, the Props for the
|
|
175
177
|
* wrapped component must be provided as the first generic.
|
|
176
178
|
*/
|
|
177
|
-
export declare const withComponentContext: <P extends UnknownType
|
|
178
|
-
(props: Omit<P, keyof ComponentContextValue
|
|
179
|
+
export declare const withComponentContext: <P extends UnknownType>(Component: React.ComponentType<P>) => {
|
|
180
|
+
(props: Omit<P, keyof ComponentContextValue>): React.JSX.Element;
|
|
179
181
|
displayName: string;
|
|
180
182
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropsWithChildren } from 'react';
|
|
2
3
|
import { DialogManager } from '../components/Dialog/DialogManager';
|
|
3
4
|
type DialogManagerProviderContextValue = {
|
|
4
5
|
dialogManager: DialogManager;
|
|
@@ -1,11 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
3
|
-
import {
|
|
4
|
-
|
|
1
|
+
import type { ReactEventHandler } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { LocalMessage } from 'stream-chat';
|
|
4
|
+
import type { PropsWithChildrenOnly } from '../types/types';
|
|
5
|
+
export interface MessageBounceContextValue {
|
|
5
6
|
handleDelete: ReactEventHandler;
|
|
6
7
|
handleEdit: ReactEventHandler;
|
|
7
8
|
handleRetry: ReactEventHandler;
|
|
8
|
-
message:
|
|
9
|
+
message: LocalMessage;
|
|
9
10
|
}
|
|
10
|
-
export declare function useMessageBounceContext
|
|
11
|
-
export declare function MessageBounceProvider
|
|
11
|
+
export declare function useMessageBounceContext(componentName?: string): MessageBounceContextValue;
|
|
12
|
+
export declare function MessageBounceProvider({ children }: PropsWithChildrenOnly): React.JSX.Element;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import React, { createContext, useCallback, useContext, useMemo
|
|
1
|
+
import React, { createContext, useCallback, useContext, useMemo } from 'react';
|
|
2
2
|
import { useMessageContext } from './MessageContext';
|
|
3
3
|
import { useChannelActionContext } from './ChannelActionContext';
|
|
4
4
|
import { isMessageBounced } from '../components';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import
|
|
2
|
-
import
|
|
1
|
+
import type { PropsWithChildren, ReactNode } from 'react';
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import type { LocalMessage, Mute, ReactionResponse, ReactionSort, UserResponse } from 'stream-chat';
|
|
3
4
|
import type { ChannelActionContextValue } from './ChannelActionContext';
|
|
4
|
-
import type { StreamMessage } from './ChannelStateContext';
|
|
5
5
|
import type { ActionHandlerReturnType } from '../components/Message/hooks/useActionHandler';
|
|
6
6
|
import type { PinPermissions } from '../components/Message/hooks/usePinHandler';
|
|
7
7
|
import type { ReactEventHandler } from '../components/Message/types';
|
|
@@ -10,11 +10,11 @@ import type { MessageInputProps } from '../components/MessageInput/MessageInput'
|
|
|
10
10
|
import type { GroupStyle } from '../components/MessageList/utils';
|
|
11
11
|
import type { ReactionDetailsComparator, ReactionsComparator, ReactionType } from '../components/Reactions/types';
|
|
12
12
|
import type { RenderTextOptions } from '../components/Message/renderText';
|
|
13
|
-
import type {
|
|
14
|
-
export type CustomMessageActions
|
|
15
|
-
[key: string]: (message:
|
|
13
|
+
import type { UnknownType } from '../types/types';
|
|
14
|
+
export type CustomMessageActions = {
|
|
15
|
+
[key: string]: (message: LocalMessage, event: React.BaseSyntheticEvent) => Promise<void> | void;
|
|
16
16
|
};
|
|
17
|
-
export type MessageContextValue
|
|
17
|
+
export type MessageContextValue = {
|
|
18
18
|
/** If actions such as edit, delete, flag, mute are enabled on Message */
|
|
19
19
|
actionsEnabled: boolean;
|
|
20
20
|
/** Function to exit edit state */
|
|
@@ -33,7 +33,7 @@ export type MessageContextValue<StreamChatGenerics extends DefaultStreamChatGene
|
|
|
33
33
|
/** Function to edit a message in a Channel */
|
|
34
34
|
handleEdit: ReactEventHandler;
|
|
35
35
|
/** Function to fetch the message reactions */
|
|
36
|
-
handleFetchReactions: (reactionType?: ReactionType
|
|
36
|
+
handleFetchReactions: (reactionType?: ReactionType, sort?: ReactionSort) => Promise<Array<ReactionResponse>>;
|
|
37
37
|
/** Function to flag a message in a Channel */
|
|
38
38
|
handleFlag: ReactEventHandler;
|
|
39
39
|
/** Function to mark message and the messages that follow it as unread in a Channel */
|
|
@@ -47,11 +47,11 @@ export type MessageContextValue<StreamChatGenerics extends DefaultStreamChatGene
|
|
|
47
47
|
/** Function to post a reaction on a Message */
|
|
48
48
|
handleReaction: (reactionType: string, event: React.BaseSyntheticEvent) => Promise<void>;
|
|
49
49
|
/** Function to retry sending a Message */
|
|
50
|
-
handleRetry: ChannelActionContextValue
|
|
50
|
+
handleRetry: ChannelActionContextValue['retrySendMessage'];
|
|
51
51
|
/** Function that returns whether the Message belongs to the current user */
|
|
52
52
|
isMyMessage: () => boolean;
|
|
53
53
|
/** The message object */
|
|
54
|
-
message:
|
|
54
|
+
message: LocalMessage;
|
|
55
55
|
/** Indicates whether a message has not been read yet or has been marked unread */
|
|
56
56
|
messageIsUnread: boolean;
|
|
57
57
|
/** Handler function for a click event on an @mention in Message */
|
|
@@ -65,13 +65,13 @@ export type MessageContextValue<StreamChatGenerics extends DefaultStreamChatGene
|
|
|
65
65
|
/** Function to toggle the edit state on a Message */
|
|
66
66
|
setEditingState: ReactEventHandler;
|
|
67
67
|
/** Additional props for underlying MessageInput component, [available props](https://getstream.io/chat/docs/sdk/react/message-input-components/message_input/#props) */
|
|
68
|
-
additionalMessageInputProps?: MessageInputProps
|
|
68
|
+
additionalMessageInputProps?: MessageInputProps;
|
|
69
69
|
/** Call this function to keep message list scrolled to the bottom when the scroll height increases, e.g. an element appears below the last message (only used in the `VirtualizedMessageList`) */
|
|
70
70
|
autoscrollToBottom?: () => void;
|
|
71
71
|
/** Message component configuration prop. If true, picking a reaction from the `ReactionSelector` component will close the selector */
|
|
72
72
|
closeReactionSelectorOnClick?: boolean;
|
|
73
73
|
/** Object containing custom message actions and function handlers */
|
|
74
|
-
customMessageActions?: CustomMessageActions
|
|
74
|
+
customMessageActions?: CustomMessageActions;
|
|
75
75
|
/** If true, the message is the last one in a group sent by a specific user (only used in the `VirtualizedMessageList`) */
|
|
76
76
|
endOfGroup?: boolean;
|
|
77
77
|
/** If true, the message is the first one in a group sent by a specific user (only used in the `VirtualizedMessageList`) */
|
|
@@ -89,21 +89,21 @@ export type MessageContextValue<StreamChatGenerics extends DefaultStreamChatGene
|
|
|
89
89
|
/**
|
|
90
90
|
* A factory function that determines whether a message is AI generated or not.
|
|
91
91
|
*/
|
|
92
|
-
isMessageAIGenerated?: (message:
|
|
92
|
+
isMessageAIGenerated?: (message: LocalMessage) => boolean;
|
|
93
93
|
/** Latest message id on current channel */
|
|
94
94
|
lastReceivedId?: string | null;
|
|
95
95
|
/** DOMRect object for parent MessageList component */
|
|
96
96
|
messageListRect?: DOMRect;
|
|
97
97
|
/** Array of muted users coming from [ChannelStateContext](https://getstream.io/chat/docs/sdk/react/contexts/channel_state_context/#mutes) */
|
|
98
|
-
mutes?: Mute
|
|
98
|
+
mutes?: Mute[];
|
|
99
99
|
/** @deprecated in favor of `channelCapabilities - The user roles allowed to pin Messages in various channel types */
|
|
100
100
|
pinPermissions?: PinPermissions;
|
|
101
101
|
/** Sort options to provide to a reactions query */
|
|
102
|
-
reactionDetailsSort?: ReactionSort
|
|
102
|
+
reactionDetailsSort?: ReactionSort;
|
|
103
103
|
/** A list of users that have read this Message */
|
|
104
|
-
readBy?: UserResponse
|
|
104
|
+
readBy?: UserResponse[];
|
|
105
105
|
/** Custom function to render message text content, defaults to the renderText function: [utils](https://github.com/GetStream/stream-chat-react/blob/master/src/utils.tsx) */
|
|
106
|
-
renderText?: (text?: string, mentioned_users?: UserResponse
|
|
106
|
+
renderText?: (text?: string, mentioned_users?: UserResponse[], options?: RenderTextOptions) => ReactNode;
|
|
107
107
|
/** Comparator function to sort the list of reacted users
|
|
108
108
|
* @deprecated use `reactionDetailsSort` instead
|
|
109
109
|
*/
|
|
@@ -115,17 +115,17 @@ export type MessageContextValue<StreamChatGenerics extends DefaultStreamChatGene
|
|
|
115
115
|
/** render HTML instead of markdown. Posting HTML is only allowed server-side */
|
|
116
116
|
unsafeHTML?: boolean;
|
|
117
117
|
};
|
|
118
|
-
export declare const MessageContext: React.Context<MessageContextValue
|
|
119
|
-
export declare const MessageProvider:
|
|
120
|
-
value: MessageContextValue
|
|
118
|
+
export declare const MessageContext: React.Context<MessageContextValue | undefined>;
|
|
119
|
+
export declare const MessageProvider: ({ children, value, }: PropsWithChildren<{
|
|
120
|
+
value: MessageContextValue;
|
|
121
121
|
}>) => React.JSX.Element;
|
|
122
|
-
export declare const useMessageContext:
|
|
122
|
+
export declare const useMessageContext: (_componentName?: string) => MessageContextValue;
|
|
123
123
|
/**
|
|
124
124
|
* Typescript currently does not support partial inference, so if MessageContext
|
|
125
125
|
* typing is desired while using the HOC withMessageContext, the Props for the
|
|
126
126
|
* wrapped component must be provided as the first generic.
|
|
127
127
|
*/
|
|
128
|
-
export declare const withMessageContext: <P extends UnknownType
|
|
129
|
-
(props: Omit<P, keyof MessageContextValue
|
|
128
|
+
export declare const withMessageContext: <P extends UnknownType>(Component: React.ComponentType<P>) => {
|
|
129
|
+
(props: Omit<P, keyof MessageContextValue>): React.JSX.Element;
|
|
130
130
|
displayName: string;
|
|
131
131
|
};
|
|
@@ -1,28 +1,10 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import type {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropsWithChildren } from 'react';
|
|
3
3
|
import type { CooldownTimerState, MessageInputProps } from '../components/MessageInput';
|
|
4
|
-
import type {
|
|
5
|
-
|
|
6
|
-
export
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
export declare const MessageInputContext: React.Context<(MessageInputState & import("../components/MessageInput/hooks/useLinkPreviews").EnrichURLsController & {
|
|
10
|
-
handleChange: React.ChangeEventHandler<HTMLTextAreaElement>;
|
|
11
|
-
handleSubmit: (event?: React.BaseSyntheticEvent<object, any, any> | undefined, customMessageData?: Partial<import("stream-chat").Message<DefaultStreamChatGenerics>> | undefined, options?: import("../types/types").SendMessageOptions | undefined) => void;
|
|
12
|
-
insertText: (textToInsert: string) => void;
|
|
13
|
-
isUploadEnabled: boolean;
|
|
14
|
-
maxFilesLeft: number;
|
|
15
|
-
numberOfUploads: number;
|
|
16
|
-
onPaste: (event: React.ClipboardEvent<HTMLTextAreaElement>) => void;
|
|
17
|
-
onSelectUser: (item: import("stream-chat").UserResponse<DefaultStreamChatGenerics>) => void;
|
|
18
|
-
recordingController: import("..").RecordingController<DefaultStreamChatGenerics>;
|
|
19
|
-
removeAttachments: (ids: string[]) => void;
|
|
20
|
-
textareaRef: React.MutableRefObject<HTMLTextAreaElement | null | undefined>;
|
|
21
|
-
uploadAttachment: (attachment: import("../components/MessageInput").LocalAttachment<DefaultStreamChatGenerics>) => Promise<import("../components/MessageInput").LocalAttachment<DefaultStreamChatGenerics> | undefined>;
|
|
22
|
-
uploadNewFiles: (files: FileList | File[]) => void;
|
|
23
|
-
upsertAttachments: (attachments: (import("../components/MessageInput").LocalAttachment<DefaultStreamChatGenerics> | import("stream-chat").Attachment<DefaultStreamChatGenerics>)[]) => void;
|
|
24
|
-
}) | undefined>;
|
|
25
|
-
export declare const MessageInputContextProvider: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics, V extends CustomTrigger = CustomTrigger>({ children, value, }: PropsWithChildren<{
|
|
26
|
-
value: MessageInputContextValue<StreamChatGenerics, V>;
|
|
4
|
+
import type { MessageInputHookProps } from '../components/MessageInput/hooks/useMessageInputControls';
|
|
5
|
+
export type MessageInputContextValue = MessageInputHookProps & Omit<MessageInputProps, 'Input'> & CooldownTimerState;
|
|
6
|
+
export declare const MessageInputContext: React.Context<MessageInputHookProps | undefined>;
|
|
7
|
+
export declare const MessageInputContextProvider: ({ children, value, }: PropsWithChildren<{
|
|
8
|
+
value: MessageInputContextValue;
|
|
27
9
|
}>) => React.JSX.Element;
|
|
28
|
-
export declare const useMessageInputContext:
|
|
10
|
+
export declare const useMessageInputContext: (componentName?: string) => MessageInputContextValue;
|
|
@@ -1,10 +1,11 @@
|
|
|
1
1
|
import React, { createContext, useContext } from 'react';
|
|
2
2
|
export const MessageInputContext = createContext(undefined);
|
|
3
3
|
export const MessageInputContextProvider = ({ children, value, }) => (React.createElement(MessageInputContext.Provider, { value: value }, children));
|
|
4
|
-
export const useMessageInputContext = (
|
|
4
|
+
export const useMessageInputContext = (
|
|
5
|
+
// eslint-disable-next-line @typescript-eslint/no-unused-vars
|
|
6
|
+
componentName) => {
|
|
5
7
|
const contextValue = useContext(MessageInputContext);
|
|
6
8
|
if (!contextValue) {
|
|
7
|
-
console.warn(`The useMessageInputContext hook was called outside of the MessageInputContext provider. Make sure this hook is called within the MessageInput's UI component. The errored call is located in the ${componentName} component.`);
|
|
8
9
|
return {};
|
|
9
10
|
}
|
|
10
11
|
return contextValue;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropsWithChildren } from 'react';
|
|
2
3
|
export type MessageListContextValue = {
|
|
3
4
|
/** The scroll container within which the messages and typing indicator are rendered */
|
|
4
5
|
listElement: HTMLDivElement | null;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropsWithChildren } from 'react';
|
|
2
3
|
import type { Poll } from 'stream-chat';
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
poll: Poll<StreamChatGenerics>;
|
|
4
|
+
export type PollContextValue = {
|
|
5
|
+
poll: Poll;
|
|
6
6
|
};
|
|
7
|
-
export declare const PollContext: React.Context<PollContextValue
|
|
8
|
-
export declare const PollProvider:
|
|
9
|
-
poll: Poll
|
|
7
|
+
export declare const PollContext: React.Context<PollContextValue | undefined>;
|
|
8
|
+
export declare const PollProvider: ({ children, poll, }: PropsWithChildren<{
|
|
9
|
+
poll: Poll;
|
|
10
10
|
}>) => React.JSX.Element | null;
|
|
11
|
-
export declare const usePollContext:
|
|
11
|
+
export declare const usePollContext: () => PollContextValue;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropsWithChildren } from 'react';
|
|
2
3
|
import type { TFunction } from 'i18next';
|
|
3
4
|
import type { TranslationLanguages } from 'stream-chat';
|
|
4
5
|
import type { UnknownType } from '../types/types';
|
|
@@ -1,20 +1,21 @@
|
|
|
1
|
-
import React
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropsWithChildren } from 'react';
|
|
2
3
|
import type { ChannelState as StreamChannelState } from 'stream-chat';
|
|
3
|
-
import type {
|
|
4
|
-
export type TypingContextValue
|
|
5
|
-
typing?: StreamChannelState
|
|
4
|
+
import type { UnknownType } from '../types/types';
|
|
5
|
+
export type TypingContextValue = {
|
|
6
|
+
typing?: StreamChannelState['typing'];
|
|
6
7
|
};
|
|
7
|
-
export declare const TypingContext: React.Context<TypingContextValue
|
|
8
|
-
export declare const TypingProvider:
|
|
9
|
-
value: TypingContextValue
|
|
8
|
+
export declare const TypingContext: React.Context<TypingContextValue | undefined>;
|
|
9
|
+
export declare const TypingProvider: ({ children, value, }: PropsWithChildren<{
|
|
10
|
+
value: TypingContextValue;
|
|
10
11
|
}>) => React.JSX.Element;
|
|
11
|
-
export declare const useTypingContext:
|
|
12
|
+
export declare const useTypingContext: (componentName?: string) => TypingContextValue;
|
|
12
13
|
/**
|
|
13
14
|
* Typescript currently does not support partial inference, so if TypingContext
|
|
14
15
|
* typing is desired while using the HOC withTypingContext, the Props for the
|
|
15
16
|
* wrapped component must be provided as the first generic.
|
|
16
17
|
*/
|
|
17
|
-
export declare const withTypingContext: <P extends UnknownType
|
|
18
|
-
(props: Omit<P, keyof TypingContextValue
|
|
18
|
+
export declare const withTypingContext: <P extends UnknownType>(Component: React.ComponentType<P>) => {
|
|
19
|
+
(props: Omit<P, keyof TypingContextValue>): React.JSX.Element;
|
|
19
20
|
displayName: string;
|
|
20
21
|
};
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
-
import React
|
|
2
|
-
import {
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { PropsWithChildren } from 'react';
|
|
3
|
+
import type { ComponentContextValue } from './ComponentContext';
|
|
3
4
|
export declare function WithComponents({ children, overrides, }: PropsWithChildren<{
|
|
4
5
|
overrides: Partial<ComponentContextValue>;
|
|
5
6
|
}>): React.JSX.Element;
|