stream-chat-react 0.0.0-5283b1a4613ed8f1b26322bd34e611bf90c8b356
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/LICENSE +219 -0
- package/README.md +122 -0
- package/dist/assets/EmojiOneColor.woff2 +0 -0
- package/dist/assets/NotoColorEmoji-flags.woff2 +0 -0
- package/dist/assets/icons/stream-chat-icons.eot +0 -0
- package/dist/assets/icons/stream-chat-icons.svg +50 -0
- package/dist/assets/icons/stream-chat-icons.ttf +0 -0
- package/dist/assets/icons/stream-chat-icons.woff +0 -0
- package/dist/assets/icons/stream-chat-icons.woff2 +0 -0
- package/dist/components/AIStateIndicator/AIStateIndicator.d.ts +7 -0
- package/dist/components/AIStateIndicator/AIStateIndicator.js +15 -0
- package/dist/components/AIStateIndicator/hooks/useAIState.d.ts +17 -0
- package/dist/components/AIStateIndicator/hooks/useAIState.js +39 -0
- package/dist/components/AIStateIndicator/index.d.ts +2 -0
- package/dist/components/AIStateIndicator/index.js +2 -0
- package/dist/components/Attachment/Attachment.d.ts +43 -0
- package/dist/components/Attachment/Attachment.js +85 -0
- package/dist/components/Attachment/AttachmentActions.d.ts +18 -0
- package/dist/components/Attachment/AttachmentActions.js +15 -0
- package/dist/components/Attachment/AttachmentContainer.d.ts +18 -0
- package/dist/components/Attachment/AttachmentContainer.js +150 -0
- package/dist/components/Attachment/Audio.d.ts +10 -0
- package/dist/components/Attachment/Audio.js +29 -0
- package/dist/components/Attachment/Card.d.ts +9 -0
- package/dist/components/Attachment/Card.js +87 -0
- package/dist/components/Attachment/FileAttachment.d.ts +7 -0
- package/dist/components/Attachment/FileAttachment.js +11 -0
- package/dist/components/Attachment/UnsupportedAttachment.d.ts +7 -0
- package/dist/components/Attachment/UnsupportedAttachment.js +10 -0
- package/dist/components/Attachment/VoiceRecording.d.ts +17 -0
- package/dist/components/Attachment/VoiceRecording.js +42 -0
- package/dist/components/Attachment/attachment-sizing.d.ts +8 -0
- package/dist/components/Attachment/attachment-sizing.js +80 -0
- package/dist/components/Attachment/audioSampling.d.ts +9 -0
- package/dist/components/Attachment/audioSampling.js +81 -0
- package/dist/components/Attachment/components/DownloadButton.d.ts +6 -0
- package/dist/components/Attachment/components/DownloadButton.js +5 -0
- package/dist/components/Attachment/components/FileSizeIndicator.d.ts +12 -0
- package/dist/components/Attachment/components/FileSizeIndicator.js +7 -0
- package/dist/components/Attachment/components/PlayButton.d.ts +7 -0
- package/dist/components/Attachment/components/PlayButton.js +3 -0
- package/dist/components/Attachment/components/PlaybackRateButton.d.ts +3 -0
- package/dist/components/Attachment/components/PlaybackRateButton.js +2 -0
- package/dist/components/Attachment/components/ProgressBar.d.ts +6 -0
- package/dist/components/Attachment/components/ProgressBar.js +6 -0
- package/dist/components/Attachment/components/WaveProgressBar.d.ts +16 -0
- package/dist/components/Attachment/components/WaveProgressBar.js +84 -0
- package/dist/components/Attachment/components/index.d.ts +6 -0
- package/dist/components/Attachment/components/index.js +6 -0
- package/dist/components/Attachment/hooks/useAudioController.d.ts +27 -0
- package/dist/components/Attachment/hooks/useAudioController.js +124 -0
- package/dist/components/Attachment/icons.d.ts +5 -0
- package/dist/components/Attachment/icons.js +7 -0
- package/dist/components/Attachment/index.d.ts +10 -0
- package/dist/components/Attachment/index.js +10 -0
- package/dist/components/Attachment/utils.d.ts +34 -0
- package/dist/components/Attachment/utils.js +35 -0
- package/dist/components/AutoCompleteTextarea/Item.d.ts +2 -0
- package/dist/components/AutoCompleteTextarea/Item.js +10 -0
- package/dist/components/AutoCompleteTextarea/List.d.ts +17 -0
- package/dist/components/AutoCompleteTextarea/List.js +88 -0
- package/dist/components/AutoCompleteTextarea/Textarea.d.ts +114 -0
- package/dist/components/AutoCompleteTextarea/Textarea.js +597 -0
- package/dist/components/AutoCompleteTextarea/index.d.ts +4 -0
- package/dist/components/AutoCompleteTextarea/index.js +4 -0
- package/dist/components/AutoCompleteTextarea/types.d.ts +15 -0
- package/dist/components/AutoCompleteTextarea/types.js +1 -0
- package/dist/components/AutoCompleteTextarea/utils.d.ts +6 -0
- package/dist/components/AutoCompleteTextarea/utils.js +44 -0
- package/dist/components/Avatar/Avatar.d.ts +21 -0
- package/dist/components/Avatar/Avatar.js +24 -0
- package/dist/components/Avatar/ChannelAvatar.d.ts +5 -0
- package/dist/components/Avatar/ChannelAvatar.js +8 -0
- package/dist/components/Avatar/GroupAvatar.d.ts +8 -0
- package/dist/components/Avatar/GroupAvatar.js +6 -0
- package/dist/components/Avatar/index.d.ts +3 -0
- package/dist/components/Avatar/index.js +3 -0
- package/dist/components/Channel/Channel.d.ts +84 -0
- package/dist/components/Channel/Channel.js +889 -0
- package/dist/components/Channel/LoadingChannel.d.ts +2 -0
- package/dist/components/Channel/LoadingChannel.js +20 -0
- package/dist/components/Channel/channelState.d.ts +85 -0
- package/dist/components/Channel/channelState.js +174 -0
- package/dist/components/Channel/constants.d.ts +1 -0
- package/dist/components/Channel/constants.js +1 -0
- package/dist/components/Channel/hooks/useChannelContainerClasses.d.ts +10 -0
- package/dist/components/Channel/hooks/useChannelContainerClasses.js +17 -0
- package/dist/components/Channel/hooks/useCreateChannelStateContext.d.ts +6 -0
- package/dist/components/Channel/hooks/useCreateChannelStateContext.js +101 -0
- package/dist/components/Channel/hooks/useCreateTypingContext.d.ts +3 -0
- package/dist/components/Channel/hooks/useCreateTypingContext.js +11 -0
- package/dist/components/Channel/hooks/useEditMessageHandler.d.ts +5 -0
- package/dist/components/Channel/hooks/useEditMessageHandler.js +10 -0
- package/dist/components/Channel/hooks/useIsMounted.d.ts +2 -0
- package/dist/components/Channel/hooks/useIsMounted.js +11 -0
- package/dist/components/Channel/hooks/useMentionsHandlers.d.ts +5 -0
- package/dist/components/Channel/hooks/useMentionsHandlers.js +20 -0
- package/dist/components/Channel/index.d.ts +3 -0
- package/dist/components/Channel/index.js +3 -0
- package/dist/components/Channel/utils.d.ts +35 -0
- package/dist/components/Channel/utils.js +64 -0
- package/dist/components/ChannelHeader/ChannelHeader.d.ts +19 -0
- package/dist/components/ChannelHeader/ChannelHeader.js +40 -0
- package/dist/components/ChannelHeader/icons.d.ts +4 -0
- package/dist/components/ChannelHeader/icons.js +8 -0
- package/dist/components/ChannelHeader/index.d.ts +1 -0
- package/dist/components/ChannelHeader/index.js +1 -0
- package/dist/components/ChannelList/ChannelList.d.ts +97 -0
- package/dist/components/ChannelList/ChannelList.js +142 -0
- package/dist/components/ChannelList/ChannelListMessenger.d.ts +21 -0
- package/dist/components/ChannelList/ChannelListMessenger.js +19 -0
- package/dist/components/ChannelList/hooks/index.d.ts +14 -0
- package/dist/components/ChannelList/hooks/index.js +14 -0
- package/dist/components/ChannelList/hooks/useChannelDeletedListener.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useChannelDeletedListener.js +26 -0
- package/dist/components/ChannelList/hooks/useChannelHiddenListener.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useChannelHiddenListener.js +26 -0
- package/dist/components/ChannelList/hooks/useChannelListShape.d.ts +60 -0
- package/dist/components/ChannelList/hooks/useChannelListShape.js +351 -0
- package/dist/components/ChannelList/hooks/useChannelMembershipState.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useChannelMembershipState.js +6 -0
- package/dist/components/ChannelList/hooks/useChannelTruncatedListener.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useChannelTruncatedListener.js +20 -0
- package/dist/components/ChannelList/hooks/useChannelUpdatedListener.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useChannelUpdatedListener.js +32 -0
- package/dist/components/ChannelList/hooks/useChannelVisibleListener.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useChannelVisibleListener.js +26 -0
- package/dist/components/ChannelList/hooks/useConnectionRecoveredListener.d.ts +2 -0
- package/dist/components/ChannelList/hooks/useConnectionRecoveredListener.js +16 -0
- package/dist/components/ChannelList/hooks/useMessageNewListener.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useMessageNewListener.js +36 -0
- package/dist/components/ChannelList/hooks/useMobileNavigation.d.ts +1 -0
- package/dist/components/ChannelList/hooks/useMobileNavigation.js +17 -0
- package/dist/components/ChannelList/hooks/useNotificationAddedToChannelListener.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useNotificationAddedToChannelListener.js +33 -0
- package/dist/components/ChannelList/hooks/useNotificationMessageNewListener.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useNotificationMessageNewListener.js +26 -0
- package/dist/components/ChannelList/hooks/useNotificationRemovedFromChannelListener.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useNotificationRemovedFromChannelListener.js +19 -0
- package/dist/components/ChannelList/hooks/usePaginatedChannels.d.ts +19 -0
- package/dist/components/ChannelList/hooks/usePaginatedChannels.js +94 -0
- package/dist/components/ChannelList/hooks/useSelectedChannelState.d.ts +11 -0
- package/dist/components/ChannelList/hooks/useSelectedChannelState.js +20 -0
- package/dist/components/ChannelList/hooks/useUserPresenceChangedListener.d.ts +3 -0
- package/dist/components/ChannelList/hooks/useUserPresenceChangedListener.js +24 -0
- package/dist/components/ChannelList/index.d.ts +4 -0
- package/dist/components/ChannelList/index.js +4 -0
- package/dist/components/ChannelList/utils.d.ts +56 -0
- package/dist/components/ChannelList/utils.js +122 -0
- package/dist/components/ChannelPreview/ChannelPreview.d.ts +56 -0
- package/dist/components/ChannelPreview/ChannelPreview.js +80 -0
- package/dist/components/ChannelPreview/ChannelPreviewActionButtons.d.ts +6 -0
- package/dist/components/ChannelPreview/ChannelPreviewActionButtons.js +30 -0
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.d.ts +8 -0
- package/dist/components/ChannelPreview/ChannelPreviewMessenger.js +38 -0
- package/dist/components/ChannelPreview/hooks/index.d.ts +2 -0
- package/dist/components/ChannelPreview/hooks/index.js +2 -0
- package/dist/components/ChannelPreview/hooks/useChannelPreviewInfo.d.ts +14 -0
- package/dist/components/ChannelPreview/hooks/useChannelPreviewInfo.js +32 -0
- package/dist/components/ChannelPreview/hooks/useIsChannelMuted.d.ts +7 -0
- package/dist/components/ChannelPreview/hooks/useIsChannelMuted.js +13 -0
- package/dist/components/ChannelPreview/hooks/useMessageDeliveryStatus.d.ts +16 -0
- package/dist/components/ChannelPreview/hooks/useMessageDeliveryStatus.js +55 -0
- package/dist/components/ChannelPreview/icons.d.ts +6 -0
- package/dist/components/ChannelPreview/icons.js +8 -0
- package/dist/components/ChannelPreview/index.d.ts +5 -0
- package/dist/components/ChannelPreview/index.js +5 -0
- package/dist/components/ChannelPreview/utils.d.ts +14 -0
- package/dist/components/ChannelPreview/utils.js +87 -0
- package/dist/components/ChannelSearch/ChannelSearch.d.ts +19 -0
- package/dist/components/ChannelSearch/ChannelSearch.js +21 -0
- package/dist/components/ChannelSearch/SearchBar.d.ts +31 -0
- package/dist/components/ChannelSearch/SearchBar.js +68 -0
- package/dist/components/ChannelSearch/SearchInput.d.ts +18 -0
- package/dist/components/ChannelSearch/SearchInput.js +7 -0
- package/dist/components/ChannelSearch/SearchResults.d.ts +33 -0
- package/dist/components/ChannelSearch/SearchResults.js +85 -0
- package/dist/components/ChannelSearch/hooks/useChannelSearch.d.ts +52 -0
- package/dist/components/ChannelSearch/hooks/useChannelSearch.js +174 -0
- package/dist/components/ChannelSearch/icons.d.ts +6 -0
- package/dist/components/ChannelSearch/icons.js +9 -0
- package/dist/components/ChannelSearch/index.d.ts +6 -0
- package/dist/components/ChannelSearch/index.js +5 -0
- package/dist/components/ChannelSearch/utils.d.ts +4 -0
- package/dist/components/ChannelSearch/utils.js +1 -0
- package/dist/components/Chat/Chat.d.ts +34 -0
- package/dist/components/Chat/Chat.js +35 -0
- package/dist/components/Chat/hooks/useChannelsQueryState.d.ts +11 -0
- package/dist/components/Chat/hooks/useChannelsQueryState.js +11 -0
- package/dist/components/Chat/hooks/useChat.d.ts +24 -0
- package/dist/components/Chat/hooks/useChat.js +88 -0
- package/dist/components/Chat/hooks/useCreateChatClient.d.ts +11 -0
- package/dist/components/Chat/hooks/useCreateChatClient.js +31 -0
- package/dist/components/Chat/hooks/useCreateChatContext.d.ts +3 -0
- package/dist/components/Chat/hooks/useCreateChatContext.js +38 -0
- package/dist/components/Chat/index.d.ts +3 -0
- package/dist/components/Chat/index.js +3 -0
- package/dist/components/ChatAutoComplete/ChatAutoComplete.d.ts +78 -0
- package/dist/components/ChatAutoComplete/ChatAutoComplete.js +33 -0
- package/dist/components/ChatAutoComplete/index.d.ts +1 -0
- package/dist/components/ChatAutoComplete/index.js +1 -0
- package/dist/components/ChatView/ChatView.d.ts +18 -0
- package/dist/components/ChatView/ChatView.js +105 -0
- package/dist/components/ChatView/index.d.ts +1 -0
- package/dist/components/ChatView/index.js +1 -0
- package/dist/components/CommandItem/CommandItem.d.ts +12 -0
- package/dist/components/CommandItem/CommandItem.js +12 -0
- package/dist/components/CommandItem/index.d.ts +1 -0
- package/dist/components/CommandItem/index.js +1 -0
- package/dist/components/DateSeparator/DateSeparator.d.ts +16 -0
- package/dist/components/DateSeparator/DateSeparator.js +24 -0
- package/dist/components/DateSeparator/index.d.ts +1 -0
- package/dist/components/DateSeparator/index.js +1 -0
- package/dist/components/Dialog/DialogAnchor.d.ts +24 -0
- package/dist/components/Dialog/DialogAnchor.js +68 -0
- package/dist/components/Dialog/DialogManager.d.ts +51 -0
- package/dist/components/Dialog/DialogManager.js +140 -0
- package/dist/components/Dialog/DialogMenu.d.ts +3 -0
- package/dist/components/Dialog/DialogMenu.js +5 -0
- package/dist/components/Dialog/DialogPortal.d.ts +7 -0
- package/dist/components/Dialog/DialogPortal.js +17 -0
- package/dist/components/Dialog/FormDialog.d.ts +23 -0
- package/dist/components/Dialog/FormDialog.js +72 -0
- package/dist/components/Dialog/PromptDialog.d.ts +8 -0
- package/dist/components/Dialog/PromptDialog.js +7 -0
- package/dist/components/Dialog/hooks/index.d.ts +1 -0
- package/dist/components/Dialog/hooks/index.js +1 -0
- package/dist/components/Dialog/hooks/useDialog.d.ts +4 -0
- package/dist/components/Dialog/hooks/useDialog.js +30 -0
- package/dist/components/Dialog/index.d.ts +4 -0
- package/dist/components/Dialog/index.js +4 -0
- package/dist/components/DragAndDrop/DragAndDropContainer.d.ts +7 -0
- package/dist/components/DragAndDrop/DragAndDropContainer.js +93 -0
- package/dist/components/EmoticonItem/EmoticonItem.d.ts +17 -0
- package/dist/components/EmoticonItem/EmoticonItem.js +16 -0
- package/dist/components/EmoticonItem/index.d.ts +1 -0
- package/dist/components/EmoticonItem/index.js +1 -0
- package/dist/components/EmptyStateIndicator/EmptyStateIndicator.d.ts +6 -0
- package/dist/components/EmptyStateIndicator/EmptyStateIndicator.js +24 -0
- package/dist/components/EmptyStateIndicator/icons.d.ts +2 -0
- package/dist/components/EmptyStateIndicator/icons.js +3 -0
- package/dist/components/EmptyStateIndicator/index.d.ts +1 -0
- package/dist/components/EmptyStateIndicator/index.js +1 -0
- package/dist/components/EventComponent/EventComponent.d.ts +12 -0
- package/dist/components/EventComponent/EventComponent.js +39 -0
- package/dist/components/EventComponent/index.d.ts +1 -0
- package/dist/components/EventComponent/index.js +1 -0
- package/dist/components/Form/FieldError.d.ts +6 -0
- package/dist/components/Form/FieldError.js +3 -0
- package/dist/components/Form/SwitchField.d.ts +7 -0
- package/dist/components/Form/SwitchField.js +21 -0
- package/dist/components/Gallery/BaseImage.d.ts +5 -0
- package/dist/components/Gallery/BaseImage.js +18 -0
- package/dist/components/Gallery/Gallery.d.ts +17 -0
- package/dist/components/Gallery/Gallery.js +49 -0
- package/dist/components/Gallery/Image.d.ts +20 -0
- package/dist/components/Gallery/Image.js +20 -0
- package/dist/components/Gallery/ModalGallery.d.ts +10 -0
- package/dist/components/Gallery/ModalGallery.js +25 -0
- package/dist/components/Gallery/index.d.ts +4 -0
- package/dist/components/Gallery/index.js +4 -0
- package/dist/components/InfiniteScrollPaginator/InfiniteScroll.d.ts +44 -0
- package/dist/components/InfiniteScrollPaginator/InfiniteScroll.js +105 -0
- package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.d.ts +10 -0
- package/dist/components/InfiniteScrollPaginator/InfiniteScrollPaginator.js +68 -0
- package/dist/components/InfiniteScrollPaginator/hooks/useCursorPaginator.d.ts +18 -0
- package/dist/components/InfiniteScrollPaginator/hooks/useCursorPaginator.js +41 -0
- package/dist/components/InfiniteScrollPaginator/index.d.ts +1 -0
- package/dist/components/InfiniteScrollPaginator/index.js +1 -0
- package/dist/components/LoadMore/LoadMoreButton.d.ts +13 -0
- package/dist/components/LoadMore/LoadMoreButton.js +16 -0
- package/dist/components/LoadMore/LoadMorePaginator.d.ts +11 -0
- package/dist/components/LoadMore/LoadMorePaginator.js +16 -0
- package/dist/components/LoadMore/index.d.ts +2 -0
- package/dist/components/LoadMore/index.js +2 -0
- package/dist/components/Loading/LoadingChannels.d.ts +5 -0
- package/dist/components/Loading/LoadingChannels.js +14 -0
- package/dist/components/Loading/LoadingErrorIndicator.d.ts +6 -0
- package/dist/components/Loading/LoadingErrorIndicator.js +12 -0
- package/dist/components/Loading/LoadingIndicator.d.ts +11 -0
- package/dist/components/Loading/LoadingIndicator.js +15 -0
- package/dist/components/Loading/index.d.ts +3 -0
- package/dist/components/Loading/index.js +3 -0
- package/dist/components/MML/MML.d.ts +14 -0
- package/dist/components/MML/MML.js +15 -0
- package/dist/components/MML/index.d.ts +1 -0
- package/dist/components/MML/index.js +1 -0
- package/dist/components/MediaRecorder/AudioRecorder/AudioRecorder.d.ts +2 -0
- package/dist/components/MediaRecorder/AudioRecorder/AudioRecorder.js +28 -0
- package/dist/components/MediaRecorder/AudioRecorder/AudioRecordingButtons.d.ts +3 -0
- package/dist/components/MediaRecorder/AudioRecorder/AudioRecordingButtons.js +4 -0
- package/dist/components/MediaRecorder/AudioRecorder/AudioRecordingInProgress.d.ts +2 -0
- package/dist/components/MediaRecorder/AudioRecorder/AudioRecordingInProgress.js +49 -0
- package/dist/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.d.ts +7 -0
- package/dist/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.js +19 -0
- package/dist/components/MediaRecorder/AudioRecorder/RecordingTimer.d.ts +5 -0
- package/dist/components/MediaRecorder/AudioRecorder/RecordingTimer.js +6 -0
- package/dist/components/MediaRecorder/AudioRecorder/index.d.ts +3 -0
- package/dist/components/MediaRecorder/AudioRecorder/index.js +3 -0
- package/dist/components/MediaRecorder/RecordingPermissionDeniedNotification.d.ts +7 -0
- package/dist/components/MediaRecorder/RecordingPermissionDeniedNotification.js +20 -0
- package/dist/components/MediaRecorder/classes/AmplitudeRecorder.d.ts +54 -0
- package/dist/components/MediaRecorder/classes/AmplitudeRecorder.js +85 -0
- package/dist/components/MediaRecorder/classes/BrowserPermission.d.ts +22 -0
- package/dist/components/MediaRecorder/classes/BrowserPermission.js +63 -0
- package/dist/components/MediaRecorder/classes/MediaRecorderController.d.ts +82 -0
- package/dist/components/MediaRecorder/classes/MediaRecorderController.js +257 -0
- package/dist/components/MediaRecorder/classes/index.d.ts +3 -0
- package/dist/components/MediaRecorder/classes/index.js +2 -0
- package/dist/components/MediaRecorder/hooks/index.d.ts +1 -0
- package/dist/components/MediaRecorder/hooks/index.js +1 -0
- package/dist/components/MediaRecorder/hooks/useMediaRecorder.d.ts +18 -0
- package/dist/components/MediaRecorder/hooks/useMediaRecorder.js +58 -0
- package/dist/components/MediaRecorder/index.d.ts +6 -0
- package/dist/components/MediaRecorder/index.js +5 -0
- package/dist/components/MediaRecorder/observable/BehaviorSubject.d.ts +10 -0
- package/dist/components/MediaRecorder/observable/BehaviorSubject.js +25 -0
- package/dist/components/MediaRecorder/observable/Observable.d.ts +17 -0
- package/dist/components/MediaRecorder/observable/Observable.js +21 -0
- package/dist/components/MediaRecorder/observable/Observer.d.ts +9 -0
- package/dist/components/MediaRecorder/observable/Observer.js +3 -0
- package/dist/components/MediaRecorder/observable/Subject.d.ts +15 -0
- package/dist/components/MediaRecorder/observable/Subject.js +58 -0
- package/dist/components/MediaRecorder/observable/Subscription.d.ts +10 -0
- package/dist/components/MediaRecorder/observable/Subscription.js +10 -0
- package/dist/components/MediaRecorder/observable/index.d.ts +5 -0
- package/dist/components/MediaRecorder/observable/index.js +5 -0
- package/dist/components/MediaRecorder/transcode/audioProcessing.d.ts +15 -0
- package/dist/components/MediaRecorder/transcode/audioProcessing.js +30 -0
- package/dist/components/MediaRecorder/transcode/index.d.ts +8 -0
- package/dist/components/MediaRecorder/transcode/index.js +7 -0
- package/dist/components/MediaRecorder/transcode/wav.d.ts +7 -0
- package/dist/components/MediaRecorder/transcode/wav.js +100 -0
- package/dist/components/Message/FixedHeightMessage.d.ts +14 -0
- package/dist/components/Message/FixedHeightMessage.js +69 -0
- package/dist/components/Message/Message.d.ts +8 -0
- package/dist/components/Message/Message.js +118 -0
- package/dist/components/Message/MessageDeleted.d.ts +7 -0
- package/dist/components/Message/MessageDeleted.js +13 -0
- package/dist/components/Message/MessageEditedTimestamp.d.ts +7 -0
- package/dist/components/Message/MessageEditedTimestamp.js +20 -0
- package/dist/components/Message/MessageErrorText.d.ts +8 -0
- package/dist/components/Message/MessageErrorText.js +15 -0
- package/dist/components/Message/MessageOptions.d.ts +11 -0
- package/dist/components/Message/MessageOptions.js +36 -0
- package/dist/components/Message/MessageRepliesCountButton.d.ts +8 -0
- package/dist/components/Message/MessageRepliesCountButton.js +18 -0
- package/dist/components/Message/MessageSimple.d.ts +7 -0
- package/dist/components/Message/MessageSimple.js +110 -0
- package/dist/components/Message/MessageStatus.d.ts +13 -0
- package/dist/components/Message/MessageStatus.js +53 -0
- package/dist/components/Message/MessageText.d.ts +10 -0
- package/dist/components/Message/MessageText.js +35 -0
- package/dist/components/Message/MessageTimestamp.d.ts +9 -0
- package/dist/components/Message/MessageTimestamp.js +12 -0
- package/dist/components/Message/QuotedMessage.d.ts +3 -0
- package/dist/components/Message/QuotedMessage.js +43 -0
- package/dist/components/Message/StreamedMessageText.d.ts +8 -0
- package/dist/components/Message/StreamedMessageText.js +16 -0
- package/dist/components/Message/Timestamp.d.ts +7 -0
- package/dist/components/Message/Timestamp.js +24 -0
- package/dist/components/Message/hooks/index.d.ts +15 -0
- package/dist/components/Message/hooks/index.js +15 -0
- package/dist/components/Message/hooks/useActionHandler.d.ts +7 -0
- package/dist/components/Message/hooks/useActionHandler.js +34 -0
- package/dist/components/Message/hooks/useDeleteHandler.d.ts +8 -0
- package/dist/components/Message/hooks/useDeleteHandler.js +25 -0
- package/dist/components/Message/hooks/useEditHandler.d.ts +8 -0
- package/dist/components/Message/hooks/useEditHandler.js +19 -0
- package/dist/components/Message/hooks/useFlagHandler.d.ts +10 -0
- package/dist/components/Message/hooks/useFlagHandler.js +28 -0
- package/dist/components/Message/hooks/useMarkUnreadHandler.d.ts +9 -0
- package/dist/components/Message/hooks/useMarkUnreadHandler.js +31 -0
- package/dist/components/Message/hooks/useMentionsHandler.d.ts +14 -0
- package/dist/components/Message/hooks/useMentionsHandler.js +18 -0
- package/dist/components/Message/hooks/useMessageTextStreaming.d.ts +16 -0
- package/dist/components/Message/hooks/useMessageTextStreaming.js +31 -0
- package/dist/components/Message/hooks/useMuteHandler.d.ts +11 -0
- package/dist/components/Message/hooks/useMuteHandler.js +53 -0
- package/dist/components/Message/hooks/useOpenThreadHandler.d.ts +4 -0
- package/dist/components/Message/hooks/useOpenThreadHandler.js +12 -0
- package/dist/components/Message/hooks/usePinHandler.d.ts +29 -0
- package/dist/components/Message/hooks/usePinHandler.js +59 -0
- package/dist/components/Message/hooks/useReactionHandler.d.ts +5 -0
- package/dist/components/Message/hooks/useReactionHandler.js +116 -0
- package/dist/components/Message/hooks/useReactionsFetcher.d.ts +11 -0
- package/dist/components/Message/hooks/useReactionsFetcher.js +30 -0
- package/dist/components/Message/hooks/useRetryHandler.d.ts +3 -0
- package/dist/components/Message/hooks/useRetryHandler.js +10 -0
- package/dist/components/Message/hooks/useUserHandler.d.ts +13 -0
- package/dist/components/Message/hooks/useUserHandler.js +14 -0
- package/dist/components/Message/hooks/useUserRole.d.ts +16 -0
- package/dist/components/Message/hooks/useUserRole.js +51 -0
- package/dist/components/Message/icons.d.ts +10 -0
- package/dist/components/Message/icons.js +31 -0
- package/dist/components/Message/index.d.ts +17 -0
- package/dist/components/Message/index.js +16 -0
- package/dist/components/Message/renderText/componentRenderers/Anchor.d.ts +2 -0
- package/dist/components/Message/renderText/componentRenderers/Anchor.js +9 -0
- package/dist/components/Message/renderText/componentRenderers/Emoji.d.ts +3 -0
- package/dist/components/Message/renderText/componentRenderers/Emoji.js +2 -0
- package/dist/components/Message/renderText/componentRenderers/Mention.d.ts +9 -0
- package/dist/components/Message/renderText/componentRenderers/Mention.js +2 -0
- package/dist/components/Message/renderText/componentRenderers/index.d.ts +3 -0
- package/dist/components/Message/renderText/componentRenderers/index.js +3 -0
- package/dist/components/Message/renderText/index.d.ts +5 -0
- package/dist/components/Message/renderText/index.js +4 -0
- package/dist/components/Message/renderText/regex.d.ts +4 -0
- package/dist/components/Message/renderText/regex.js +21 -0
- package/dist/components/Message/renderText/rehypePlugins/emojiMarkdownPlugin.d.ts +2 -0
- package/dist/components/Message/renderText/rehypePlugins/emojiMarkdownPlugin.js +8 -0
- package/dist/components/Message/renderText/rehypePlugins/index.d.ts +2 -0
- package/dist/components/Message/renderText/rehypePlugins/index.js +2 -0
- package/dist/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.d.ts +4 -0
- package/dist/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.js +50 -0
- package/dist/components/Message/renderText/remarkPlugins/htmlToTextPlugin.d.ts +2 -0
- package/dist/components/Message/renderText/remarkPlugins/htmlToTextPlugin.js +10 -0
- package/dist/components/Message/renderText/remarkPlugins/index.d.ts +2 -0
- package/dist/components/Message/renderText/remarkPlugins/index.js +2 -0
- package/dist/components/Message/renderText/remarkPlugins/keepLineBreaksPlugin.d.ts +2 -0
- package/dist/components/Message/renderText/remarkPlugins/keepLineBreaksPlugin.js +28 -0
- package/dist/components/Message/renderText/renderText.d.ts +19 -0
- package/dist/components/Message/renderText/renderText.js +122 -0
- package/dist/components/Message/renderText/types.d.ts +2 -0
- package/dist/components/Message/renderText/types.js +1 -0
- package/dist/components/Message/types.d.ts +106 -0
- package/dist/components/Message/types.js +1 -0
- package/dist/components/Message/utils.d.ts +80 -0
- package/dist/components/Message/utils.js +313 -0
- package/dist/components/MessageActions/CustomMessageActionsList.d.ts +9 -0
- package/dist/components/MessageActions/CustomMessageActionsList.js +11 -0
- package/dist/components/MessageActions/MessageActions.d.ts +18 -0
- package/dist/components/MessageActions/MessageActions.js +55 -0
- package/dist/components/MessageActions/MessageActionsBox.d.ts +14 -0
- package/dist/components/MessageActions/MessageActionsBox.js +41 -0
- package/dist/components/MessageActions/hooks/index.d.ts +1 -0
- package/dist/components/MessageActions/hooks/index.js +1 -0
- package/dist/components/MessageActions/hooks/useMessageActionsBoxPopper.d.ts +18 -0
- package/dist/components/MessageActions/hooks/useMessageActionsBoxPopper.js +31 -0
- package/dist/components/MessageActions/index.d.ts +3 -0
- package/dist/components/MessageActions/index.js +3 -0
- package/dist/components/MessageBounce/MessageBounceModal.d.ts +7 -0
- package/dist/components/MessageBounce/MessageBounceModal.js +8 -0
- package/dist/components/MessageBounce/MessageBouncePrompt.d.ts +6 -0
- package/dist/components/MessageBounce/MessageBouncePrompt.js +18 -0
- package/dist/components/MessageBounce/index.d.ts +2 -0
- package/dist/components/MessageBounce/index.js +2 -0
- package/dist/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.d.ts +15 -0
- package/dist/components/MessageInput/AttachmentPreviewList/AttachmentPreviewList.js +34 -0
- package/dist/components/MessageInput/AttachmentPreviewList/FileAttachmentPreview.d.ts +13 -0
- package/dist/components/MessageInput/AttachmentPreviewList/FileAttachmentPreview.js +19 -0
- package/dist/components/MessageInput/AttachmentPreviewList/ImageAttachmentPreview.d.ts +6 -0
- package/dist/components/MessageInput/AttachmentPreviewList/ImageAttachmentPreview.js +23 -0
- package/dist/components/MessageInput/AttachmentPreviewList/UnsupportedAttachmentPreview.d.ts +6 -0
- package/dist/components/MessageInput/AttachmentPreviewList/UnsupportedAttachmentPreview.js +20 -0
- package/dist/components/MessageInput/AttachmentPreviewList/VoiceRecordingPreview.d.ts +6 -0
- package/dist/components/MessageInput/AttachmentPreviewList/VoiceRecordingPreview.js +25 -0
- package/dist/components/MessageInput/AttachmentPreviewList/index.d.ts +6 -0
- package/dist/components/MessageInput/AttachmentPreviewList/index.js +1 -0
- package/dist/components/MessageInput/AttachmentPreviewList/types.d.ts +7 -0
- package/dist/components/MessageInput/AttachmentPreviewList/types.js +1 -0
- package/dist/components/MessageInput/AttachmentSelector.d.ts +25 -0
- package/dist/components/MessageInput/AttachmentSelector.js +125 -0
- package/dist/components/MessageInput/CooldownTimer.d.ts +6 -0
- package/dist/components/MessageInput/CooldownTimer.js +6 -0
- package/dist/components/MessageInput/DefaultTriggerProvider.d.ts +35 -0
- package/dist/components/MessageInput/DefaultTriggerProvider.js +24 -0
- package/dist/components/MessageInput/DropzoneProvider.d.ts +4 -0
- package/dist/components/MessageInput/DropzoneProvider.js +23 -0
- package/dist/components/MessageInput/EditMessageForm.d.ts +3 -0
- package/dist/components/MessageInput/EditMessageForm.js +20 -0
- package/dist/components/MessageInput/LinkPreviewList.d.ts +6 -0
- package/dist/components/MessageInput/LinkPreviewList.js +30 -0
- package/dist/components/MessageInput/MessageInput.d.ts +97 -0
- package/dist/components/MessageInput/MessageInput.js +43 -0
- package/dist/components/MessageInput/MessageInputFlat.d.ts +3 -0
- package/dist/components/MessageInput/MessageInputFlat.js +111 -0
- package/dist/components/MessageInput/QuotedMessagePreview.d.ts +8 -0
- package/dist/components/MessageInput/QuotedMessagePreview.js +37 -0
- package/dist/components/MessageInput/SendButton.d.ts +7 -0
- package/dist/components/MessageInput/SendButton.js +4 -0
- package/dist/components/MessageInput/StopAIGenerationButton.d.ts +3 -0
- package/dist/components/MessageInput/StopAIGenerationButton.js +6 -0
- package/dist/components/MessageInput/hooks/index.d.ts +2 -0
- package/dist/components/MessageInput/hooks/index.js +2 -0
- package/dist/components/MessageInput/hooks/useAttachments.d.ts +14 -0
- package/dist/components/MessageInput/hooks/useAttachments.js +201 -0
- package/dist/components/MessageInput/hooks/useCommandTrigger.d.ts +3 -0
- package/dist/components/MessageInput/hooks/useCommandTrigger.js +62 -0
- package/dist/components/MessageInput/hooks/useCooldownTimer.d.ts +8 -0
- package/dist/components/MessageInput/hooks/useCooldownTimer.js +39 -0
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.d.ts +3 -0
- package/dist/components/MessageInput/hooks/useCreateMessageInputContext.js +97 -0
- package/dist/components/MessageInput/hooks/useEmojiTrigger.d.ts +3 -0
- package/dist/components/MessageInput/hooks/useEmojiTrigger.js +29 -0
- package/dist/components/MessageInput/hooks/useLinkPreviews.d.ts +30 -0
- package/dist/components/MessageInput/hooks/useLinkPreviews.js +107 -0
- package/dist/components/MessageInput/hooks/useMessageInputState.d.ts +71 -0
- package/dist/components/MessageInput/hooks/useMessageInputState.js +199 -0
- package/dist/components/MessageInput/hooks/useMessageInputText.d.ts +10 -0
- package/dist/components/MessageInput/hooks/useMessageInputText.js +76 -0
- package/dist/components/MessageInput/hooks/usePasteHandler.d.ts +5 -0
- package/dist/components/MessageInput/hooks/usePasteHandler.js +38 -0
- package/dist/components/MessageInput/hooks/useSubmitHandler.d.ts +8 -0
- package/dist/components/MessageInput/hooks/useSubmitHandler.js +123 -0
- package/dist/components/MessageInput/hooks/useTimeElapsed.d.ts +9 -0
- package/dist/components/MessageInput/hooks/useTimeElapsed.js +30 -0
- package/dist/components/MessageInput/hooks/useTimer.d.ts +3 -0
- package/dist/components/MessageInput/hooks/useTimer.js +19 -0
- package/dist/components/MessageInput/hooks/useUserTrigger.d.ts +12 -0
- package/dist/components/MessageInput/hooks/useUserTrigger.js +130 -0
- package/dist/components/MessageInput/hooks/utils.d.ts +28 -0
- package/dist/components/MessageInput/hooks/utils.js +127 -0
- package/dist/components/MessageInput/icons.d.ts +15 -0
- package/dist/components/MessageInput/icons.js +48 -0
- package/dist/components/MessageInput/index.d.ts +14 -0
- package/dist/components/MessageInput/index.js +13 -0
- package/dist/components/MessageInput/types.d.ts +87 -0
- package/dist/components/MessageInput/types.js +19 -0
- package/dist/components/MessageList/ConnectionStatus.d.ts +3 -0
- package/dist/components/MessageList/ConnectionStatus.js +19 -0
- package/dist/components/MessageList/CustomNotification.d.ts +7 -0
- package/dist/components/MessageList/CustomNotification.js +9 -0
- package/dist/components/MessageList/GiphyPreviewMessage.d.ts +7 -0
- package/dist/components/MessageList/GiphyPreviewMessage.js +7 -0
- package/dist/components/MessageList/MessageList.d.ts +78 -0
- package/dist/components/MessageList/MessageList.js +156 -0
- package/dist/components/MessageList/MessageListMainPanel.d.ts +4 -0
- package/dist/components/MessageList/MessageListMainPanel.js +3 -0
- package/dist/components/MessageList/MessageListNotifications.d.ts +14 -0
- package/dist/components/MessageList/MessageListNotifications.js +12 -0
- package/dist/components/MessageList/MessageNotification.d.ts +14 -0
- package/dist/components/MessageList/MessageNotification.js +8 -0
- package/dist/components/MessageList/ScrollToBottomButton.d.ts +3 -0
- package/dist/components/MessageList/ScrollToBottomButton.js +56 -0
- package/dist/components/MessageList/UnreadMessagesNotification.d.ts +16 -0
- package/dist/components/MessageList/UnreadMessagesNotification.js +13 -0
- package/dist/components/MessageList/UnreadMessagesSeparator.d.ts +13 -0
- package/dist/components/MessageList/UnreadMessagesSeparator.js +9 -0
- package/dist/components/MessageList/VirtualizedMessageList.d.ts +139 -0
- package/dist/components/MessageList/VirtualizedMessageList.js +261 -0
- package/dist/components/MessageList/VirtualizedMessageListComponents.d.ts +17 -0
- package/dist/components/MessageList/VirtualizedMessageListComponents.js +93 -0
- package/dist/components/MessageList/hooks/MessageList/index.d.ts +5 -0
- package/dist/components/MessageList/hooks/MessageList/index.js +5 -0
- package/dist/components/MessageList/hooks/MessageList/useEnrichedMessages.d.ts +19 -0
- package/dist/components/MessageList/hooks/MessageList/useEnrichedMessages.js +35 -0
- package/dist/components/MessageList/hooks/MessageList/useMessageListElements.d.ts +18 -0
- package/dist/components/MessageList/hooks/MessageList/useMessageListElements.js +42 -0
- package/dist/components/MessageList/hooks/MessageList/useMessageListScrollManager.d.ts +16 -0
- package/dist/components/MessageList/hooks/MessageList/useMessageListScrollManager.js +58 -0
- package/dist/components/MessageList/hooks/MessageList/useScrollLocationLogic.d.ts +18 -0
- package/dist/components/MessageList/hooks/MessageList/useScrollLocationLogic.js +66 -0
- package/dist/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.d.ts +8 -0
- package/dist/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.js +70 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/index.d.ts +7 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/index.js +7 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.d.ts +7 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.js +21 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useMessageSetKey.d.ts +9 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useMessageSetKey.js +18 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.d.ts +10 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.js +42 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.d.ts +3 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.js +55 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useScrollToBottomOnNewMessage.d.ts +10 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useScrollToBottomOnNewMessage.js +32 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useShouldForceScrollToBottom.d.ts +3 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useShouldForceScrollToBottom.js +24 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.d.ts +23 -0
- package/dist/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.js +34 -0
- package/dist/components/MessageList/hooks/index.d.ts +8 -0
- package/dist/components/MessageList/hooks/index.js +8 -0
- package/dist/components/MessageList/hooks/useLastReadData.d.ts +14 -0
- package/dist/components/MessageList/hooks/useLastReadData.js +6 -0
- package/dist/components/MessageList/hooks/useMarkRead.d.ts +19 -0
- package/dist/components/MessageList/hooks/useMarkRead.js +87 -0
- package/dist/components/MessageList/icons.d.ts +9 -0
- package/dist/components/MessageList/icons.js +7 -0
- package/dist/components/MessageList/index.d.ts +12 -0
- package/dist/components/MessageList/index.js +12 -0
- package/dist/components/MessageList/renderMessages.d.ts +33 -0
- package/dist/components/MessageList/renderMessages.js +51 -0
- package/dist/components/MessageList/utils.d.ts +80 -0
- package/dist/components/MessageList/utils.js +251 -0
- package/dist/components/Modal/Modal.d.ts +10 -0
- package/dist/components/Modal/Modal.js +34 -0
- package/dist/components/Modal/ModalHeader.d.ts +8 -0
- package/dist/components/Modal/ModalHeader.js +6 -0
- package/dist/components/Modal/icons.d.ts +2 -0
- package/dist/components/Modal/icons.js +5 -0
- package/dist/components/Modal/index.d.ts +1 -0
- package/dist/components/Modal/index.js +1 -0
- package/dist/components/Poll/Poll.d.ts +7 -0
- package/dist/components/Poll/Poll.js +8 -0
- package/dist/components/Poll/PollActions/AddCommentForm.d.ts +7 -0
- package/dist/components/Poll/PollActions/AddCommentForm.js +24 -0
- package/dist/components/Poll/PollActions/EndPollDialog.d.ts +6 -0
- package/dist/components/Poll/PollActions/EndPollDialog.js +19 -0
- package/dist/components/Poll/PollActions/PollAction.d.ts +9 -0
- package/dist/components/Poll/PollActions/PollAction.js +5 -0
- package/dist/components/Poll/PollActions/PollActions.d.ts +17 -0
- package/dist/components/Poll/PollActions/PollActions.js +46 -0
- package/dist/components/Poll/PollActions/PollAnswerList.d.ts +7 -0
- package/dist/components/Poll/PollActions/PollAnswerList.js +28 -0
- package/dist/components/Poll/PollActions/PollOptionsFullList.d.ts +6 -0
- package/dist/components/Poll/PollActions/PollOptionsFullList.js +16 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionVotesList.d.ts +7 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionVotesList.js +18 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithLatestVotes.d.ts +9 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithLatestVotes.js +19 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.d.ts +11 -0
- package/dist/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.js +18 -0
- package/dist/components/Poll/PollActions/PollResults/PollResults.d.ts +6 -0
- package/dist/components/Poll/PollActions/PollResults/PollResults.js +33 -0
- package/dist/components/Poll/PollActions/PollResults/index.d.ts +1 -0
- package/dist/components/Poll/PollActions/PollResults/index.js +1 -0
- package/dist/components/Poll/PollActions/SuggestPollOptionForm.d.ts +7 -0
- package/dist/components/Poll/PollActions/SuggestPollOptionForm.js +37 -0
- package/dist/components/Poll/PollActions/index.d.ts +7 -0
- package/dist/components/Poll/PollActions/index.js +7 -0
- package/dist/components/Poll/PollContent.d.ts +3 -0
- package/dist/components/Poll/PollContent.js +18 -0
- package/dist/components/Poll/PollCreationDialog/OptionFieldSet.d.ts +9 -0
- package/dist/components/Poll/PollCreationDialog/OptionFieldSet.js +70 -0
- package/dist/components/Poll/PollCreationDialog/PollCreationDialog.d.ts +5 -0
- package/dist/components/Poll/PollCreationDialog/PollCreationDialog.js +87 -0
- package/dist/components/Poll/PollCreationDialog/PollCreationDialogControls.d.ts +8 -0
- package/dist/components/Poll/PollCreationDialog/PollCreationDialogControls.js +44 -0
- package/dist/components/Poll/PollCreationDialog/index.d.ts +1 -0
- package/dist/components/Poll/PollCreationDialog/index.js +1 -0
- package/dist/components/Poll/PollCreationDialog/types.d.ts +21 -0
- package/dist/components/Poll/PollCreationDialog/types.js +1 -0
- package/dist/components/Poll/PollHeader.d.ts +3 -0
- package/dist/components/Poll/PollHeader.js +31 -0
- package/dist/components/Poll/PollOptionList.d.ts +6 -0
- package/dist/components/Poll/PollOptionList.js +14 -0
- package/dist/components/Poll/PollOptionSelector.d.ts +19 -0
- package/dist/components/Poll/PollOptionSelector.js +53 -0
- package/dist/components/Poll/PollVote.d.ts +12 -0
- package/dist/components/Poll/PollVote.js +31 -0
- package/dist/components/Poll/QuotedPoll.d.ts +3 -0
- package/dist/components/Poll/QuotedPoll.js +17 -0
- package/dist/components/Poll/constants.d.ts +3 -0
- package/dist/components/Poll/constants.js +3 -0
- package/dist/components/Poll/hooks/index.d.ts +2 -0
- package/dist/components/Poll/hooks/index.js +2 -0
- package/dist/components/Poll/hooks/useManagePollVotesRealtime.d.ts +4 -0
- package/dist/components/Poll/hooks/useManagePollVotesRealtime.js +36 -0
- package/dist/components/Poll/hooks/usePollAnswerPagination.d.ts +13 -0
- package/dist/components/Poll/hooks/usePollAnswerPagination.js +27 -0
- package/dist/components/Poll/hooks/usePollOptionVotesPagination.d.ts +13 -0
- package/dist/components/Poll/hooks/usePollOptionVotesPagination.js +27 -0
- package/dist/components/Poll/index.d.ts +10 -0
- package/dist/components/Poll/index.js +10 -0
- package/dist/components/Portal/Portal.d.ts +6 -0
- package/dist/components/Portal/Portal.js +14 -0
- package/dist/components/ReactFileUtilities/FileIcon/FileIcon.d.ts +13 -0
- package/dist/components/ReactFileUtilities/FileIcon/FileIcon.js +24 -0
- package/dist/components/ReactFileUtilities/FileIcon/FileIconSet.d.ts +24 -0
- package/dist/components/ReactFileUtilities/FileIcon/FileIconSet.js +122 -0
- package/dist/components/ReactFileUtilities/FileIcon/iconMap.d.ts +10 -0
- package/dist/components/ReactFileUtilities/FileIcon/iconMap.js +67 -0
- package/dist/components/ReactFileUtilities/FileIcon/index.d.ts +1 -0
- package/dist/components/ReactFileUtilities/FileIcon/index.js +1 -0
- package/dist/components/ReactFileUtilities/FileIcon/mimeTypes.d.ts +7 -0
- package/dist/components/ReactFileUtilities/FileIcon/mimeTypes.js +146 -0
- package/dist/components/ReactFileUtilities/ImageDropzone.d.ts +16 -0
- package/dist/components/ReactFileUtilities/ImageDropzone.js +40 -0
- package/dist/components/ReactFileUtilities/LoadingIndicator.d.ts +8 -0
- package/dist/components/ReactFileUtilities/LoadingIndicator.js +9 -0
- package/dist/components/ReactFileUtilities/UploadButton.d.ts +16 -0
- package/dist/components/ReactFileUtilities/UploadButton.js +24 -0
- package/dist/components/ReactFileUtilities/index.d.ts +6 -0
- package/dist/components/ReactFileUtilities/index.js +6 -0
- package/dist/components/ReactFileUtilities/types.d.ts +2 -0
- package/dist/components/ReactFileUtilities/types.js +1 -0
- package/dist/components/ReactFileUtilities/utils.d.ts +15 -0
- package/dist/components/ReactFileUtilities/utils.js +103 -0
- package/dist/components/Reactions/ReactionSelector.d.ts +35 -0
- package/dist/components/Reactions/ReactionSelector.js +92 -0
- package/dist/components/Reactions/ReactionSelectorWithButton.d.ts +12 -0
- package/dist/components/Reactions/ReactionSelectorWithButton.js +22 -0
- package/dist/components/Reactions/ReactionsList.d.ts +36 -0
- package/dist/components/Reactions/ReactionsList.js +41 -0
- package/dist/components/Reactions/ReactionsListModal.d.ts +16 -0
- package/dist/components/Reactions/ReactionsListModal.js +38 -0
- package/dist/components/Reactions/SimpleReactionsList.d.ts +21 -0
- package/dist/components/Reactions/SimpleReactionsList.js +36 -0
- package/dist/components/Reactions/SpriteImage.d.ts +12 -0
- package/dist/components/Reactions/SpriteImage.js +26 -0
- package/dist/components/Reactions/StreamEmoji.d.ts +16 -0
- package/dist/components/Reactions/StreamEmoji.js +17 -0
- package/dist/components/Reactions/hooks/useFetchReactions.d.ts +14 -0
- package/dist/components/Reactions/hooks/useFetchReactions.js +38 -0
- package/dist/components/Reactions/hooks/useProcessReactions.d.ts +14 -0
- package/dist/components/Reactions/hooks/useProcessReactions.js +67 -0
- package/dist/components/Reactions/index.d.ts +6 -0
- package/dist/components/Reactions/index.js +6 -0
- package/dist/components/Reactions/reactionOptions.d.ts +7 -0
- package/dist/components/Reactions/reactionOptions.js +11 -0
- package/dist/components/Reactions/types.d.ts +16 -0
- package/dist/components/Reactions/types.js +1 -0
- package/dist/components/Reactions/utils/utils.d.ts +3 -0
- package/dist/components/Reactions/utils/utils.js +16 -0
- package/dist/components/SafeAnchor/SafeAnchor.d.ts +17 -0
- package/dist/components/SafeAnchor/SafeAnchor.js +12 -0
- package/dist/components/SafeAnchor/index.d.ts +1 -0
- package/dist/components/SafeAnchor/index.js +2 -0
- package/dist/components/Thread/Thread.d.ts +32 -0
- package/dist/components/Thread/Thread.js +76 -0
- package/dist/components/Thread/ThreadHead.d.ts +4 -0
- package/dist/components/Thread/ThreadHead.js +10 -0
- package/dist/components/Thread/ThreadHeader.d.ts +11 -0
- package/dist/components/Thread/ThreadHeader.js +21 -0
- package/dist/components/Thread/ThreadStart.d.ts +2 -0
- package/dist/components/Thread/ThreadStart.js +10 -0
- package/dist/components/Thread/icons.d.ts +4 -0
- package/dist/components/Thread/icons.js +8 -0
- package/dist/components/Thread/index.d.ts +3 -0
- package/dist/components/Thread/index.js +3 -0
- package/dist/components/Threads/ThreadContext.d.ts +9 -0
- package/dist/components/Threads/ThreadContext.js +9 -0
- package/dist/components/Threads/ThreadList/ThreadList.d.ts +9 -0
- package/dist/components/Threads/ThreadList/ThreadList.js +41 -0
- package/dist/components/Threads/ThreadList/ThreadListEmptyPlaceholder.d.ts +2 -0
- package/dist/components/Threads/ThreadList/ThreadListEmptyPlaceholder.js +5 -0
- package/dist/components/Threads/ThreadList/ThreadListItem.d.ts +9 -0
- package/dist/components/Threads/ThreadList/ThreadListItem.js +52 -0
- package/dist/components/Threads/ThreadList/ThreadListItemUI.d.ts +15 -0
- package/dist/components/Threads/ThreadList/ThreadListItemUI.js +75 -0
- package/dist/components/Threads/ThreadList/ThreadListLoadingIndicator.d.ts +2 -0
- package/dist/components/Threads/ThreadList/ThreadListLoadingIndicator.js +16 -0
- package/dist/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.d.ts +2 -0
- package/dist/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.js +18 -0
- package/dist/components/Threads/ThreadList/index.d.ts +3 -0
- package/dist/components/Threads/ThreadList/index.js +3 -0
- package/dist/components/Threads/UnreadCountBadge.d.ts +6 -0
- package/dist/components/Threads/UnreadCountBadge.js +5 -0
- package/dist/components/Threads/hooks/useThreadManagerState.d.ts +2 -0
- package/dist/components/Threads/hooks/useThreadManagerState.js +6 -0
- package/dist/components/Threads/hooks/useThreadState.d.ts +5 -0
- package/dist/components/Threads/hooks/useThreadState.js +11 -0
- package/dist/components/Threads/icons.d.ts +8 -0
- package/dist/components/Threads/icons.js +13 -0
- package/dist/components/Threads/index.d.ts +2 -0
- package/dist/components/Threads/index.js +2 -0
- package/dist/components/Tooltip/Tooltip.d.ts +14 -0
- package/dist/components/Tooltip/Tooltip.js +20 -0
- package/dist/components/Tooltip/hooks/index.d.ts +1 -0
- package/dist/components/Tooltip/hooks/index.js +1 -0
- package/dist/components/Tooltip/hooks/useEnterLeaveHandlers.d.ts +6 -0
- package/dist/components/Tooltip/hooks/useEnterLeaveHandlers.js +13 -0
- package/dist/components/Tooltip/index.d.ts +1 -0
- package/dist/components/Tooltip/index.js +1 -0
- package/dist/components/TypingIndicator/TypingIndicator.d.ts +7 -0
- package/dist/components/TypingIndicator/TypingIndicator.js +59 -0
- package/dist/components/TypingIndicator/index.d.ts +1 -0
- package/dist/components/TypingIndicator/index.js +1 -0
- package/dist/components/UserItem/UserItem.d.ts +23 -0
- package/dist/components/UserItem/UserItem.js +26 -0
- package/dist/components/UserItem/index.d.ts +1 -0
- package/dist/components/UserItem/index.js +1 -0
- package/dist/components/UtilityComponents/ErrorBoundary.d.ts +16 -0
- package/dist/components/UtilityComponents/ErrorBoundary.js +19 -0
- package/dist/components/UtilityComponents/NullComponent.d.ts +1 -0
- package/dist/components/UtilityComponents/NullComponent.js +1 -0
- package/dist/components/UtilityComponents/index.d.ts +2 -0
- package/dist/components/UtilityComponents/index.js +2 -0
- package/dist/components/Window/Window.d.ts +11 -0
- package/dist/components/Window/Window.js +14 -0
- package/dist/components/Window/index.d.ts +1 -0
- package/dist/components/Window/index.js +1 -0
- package/dist/components/index.d.ts +41 -0
- package/dist/components/index.js +39 -0
- package/dist/constants/limits.d.ts +7 -0
- package/dist/constants/limits.js +7 -0
- package/dist/constants/messageTypes.d.ts +4 -0
- package/dist/constants/messageTypes.js +4 -0
- package/dist/context/AttachmentSelectorContext.d.ts +8 -0
- package/dist/context/AttachmentSelectorContext.js +6 -0
- package/dist/context/ChannelActionContext.d.ts +64 -0
- package/dist/context/ChannelActionContext.js +26 -0
- package/dist/context/ChannelListContext.d.ts +22 -0
- package/dist/context/ChannelListContext.js +14 -0
- package/dist/context/ChannelStateContext.d.ts +68 -0
- package/dist/context/ChannelStateContext.js +26 -0
- package/dist/context/ChatContext.d.ts +54 -0
- package/dist/context/ChatContext.js +25 -0
- package/dist/context/ComponentContext.d.ts +153 -0
- package/dist/context/ComponentContext.js +24 -0
- package/dist/context/DialogManagerContext.d.ts +10 -0
- package/dist/context/DialogManagerContext.js +14 -0
- package/dist/context/MessageBounceContext.d.ts +11 -0
- package/dist/context/MessageBounceContext.js +36 -0
- package/dist/context/MessageContext.d.ts +131 -0
- package/dist/context/MessageContext.js +27 -0
- package/dist/context/MessageInputContext.d.ts +28 -0
- package/dist/context/MessageInputContext.js +11 -0
- package/dist/context/MessageListContext.d.ts +15 -0
- package/dist/context/MessageListContext.js +14 -0
- package/dist/context/PollContext.d.ts +11 -0
- package/dist/context/PollContext.js +7 -0
- package/dist/context/TranslationContext.d.ts +19 -0
- package/dist/context/TranslationContext.js +30 -0
- package/dist/context/TypingContext.d.ts +20 -0
- package/dist/context/TypingContext.js +26 -0
- package/dist/context/WithComponents.d.ts +5 -0
- package/dist/context/WithComponents.js +7 -0
- package/dist/context/index.d.ts +14 -0
- package/dist/context/index.js +14 -0
- package/dist/context/utils/getDisplayName.d.ts +2 -0
- package/dist/context/utils/getDisplayName.js +1 -0
- package/dist/css/v2/emoji-mart.css +1 -0
- package/dist/css/v2/emoji-replacement.css +1 -0
- package/dist/css/v2/index.css +3 -0
- package/dist/css/v2/index.layout.css +3 -0
- package/dist/experimental/MessageActions/MessageActions.d.ts +17 -0
- package/dist/experimental/MessageActions/MessageActions.js +48 -0
- package/dist/experimental/MessageActions/defaults.d.ts +5 -0
- package/dist/experimental/MessageActions/defaults.js +93 -0
- package/dist/experimental/MessageActions/hooks/index.d.ts +2 -0
- package/dist/experimental/MessageActions/hooks/index.js +2 -0
- package/dist/experimental/MessageActions/hooks/useBaseMessageActionSetFilter.d.ts +8 -0
- package/dist/experimental/MessageActions/hooks/useBaseMessageActionSetFilter.js +57 -0
- package/dist/experimental/MessageActions/hooks/useSplitMessageActionSet.d.ts +5 -0
- package/dist/experimental/MessageActions/hooks/useSplitMessageActionSet.js +12 -0
- package/dist/experimental/MessageActions/index.d.ts +3 -0
- package/dist/experimental/MessageActions/index.js +3 -0
- package/dist/experimental/index.browser.cjs +1103 -0
- package/dist/experimental/index.browser.cjs.map +7 -0
- package/dist/experimental/index.d.ts +1 -0
- package/dist/experimental/index.js +1 -0
- package/dist/experimental/index.node.cjs +1111 -0
- package/dist/experimental/index.node.cjs.map +7 -0
- package/dist/i18n/Streami18n.d.ts +337 -0
- package/dist/i18n/Streami18n.js +610 -0
- package/dist/i18n/de.json +202 -0
- package/dist/i18n/en.json +192 -0
- package/dist/i18n/es.json +210 -0
- package/dist/i18n/fr.json +210 -0
- package/dist/i18n/hi.json +203 -0
- package/dist/i18n/index.d.ts +4 -0
- package/dist/i18n/index.js +4 -0
- package/dist/i18n/it.json +210 -0
- package/dist/i18n/ja.json +196 -0
- package/dist/i18n/ko.json +196 -0
- package/dist/i18n/nl.json +202 -0
- package/dist/i18n/pt.json +210 -0
- package/dist/i18n/ru.json +218 -0
- package/dist/i18n/tr.json +202 -0
- package/dist/i18n/translations.d.ts +13 -0
- package/dist/i18n/translations.js +13 -0
- package/dist/i18n/types.d.ts +26 -0
- package/dist/i18n/types.js +1 -0
- package/dist/i18n/utils.d.ts +14 -0
- package/dist/i18n/utils.js +88 -0
- package/dist/index.browser.cjs +51140 -0
- package/dist/index.browser.cjs.map +7 -0
- package/dist/index.d.ts +6 -0
- package/dist/index.js +6 -0
- package/dist/index.node.cjs +56089 -0
- package/dist/index.node.cjs.map +7 -0
- package/dist/plugins/Emojis/EmojiPicker.d.ts +22 -0
- package/dist/plugins/Emojis/EmojiPicker.js +50 -0
- package/dist/plugins/Emojis/icons.d.ts +2 -0
- package/dist/plugins/Emojis/icons.js +4 -0
- package/dist/plugins/Emojis/index.browser.cjs +167 -0
- package/dist/plugins/Emojis/index.browser.cjs.map +7 -0
- package/dist/plugins/Emojis/index.d.ts +2 -0
- package/dist/plugins/Emojis/index.js +2 -0
- package/dist/plugins/Emojis/index.node.cjs +172 -0
- package/dist/plugins/Emojis/index.node.cjs.map +7 -0
- package/dist/plugins/encoders/mp3.browser.cjs +105 -0
- package/dist/plugins/encoders/mp3.browser.cjs.map +7 -0
- package/dist/plugins/encoders/mp3.d.ts +1 -0
- package/dist/plugins/encoders/mp3.js +33 -0
- package/dist/plugins/encoders/mp3.node.cjs +109 -0
- package/dist/plugins/encoders/mp3.node.cjs.map +7 -0
- package/dist/scss/v2/AIStateIndicator/AIStateIndicator-layout.scss +3 -0
- package/dist/scss/v2/AIStateIndicator/AIStateIndicator-theme.scss +7 -0
- package/dist/scss/v2/AttachmentList/AttachmentList-layout.scss +651 -0
- package/dist/scss/v2/AttachmentList/AttachmentList-theme.scss +549 -0
- package/dist/scss/v2/AttachmentPreviewList/AttachmentPreviewList-layout.scss +138 -0
- package/dist/scss/v2/AttachmentPreviewList/AttachmentPreviewList-theme.scss +179 -0
- package/dist/scss/v2/AudioRecorder/AudioRecorder-layout.scss +139 -0
- package/dist/scss/v2/AudioRecorder/AudioRecorder-theme.scss +61 -0
- package/dist/scss/v2/Autocomplete/Autocomplete-layout.scss +80 -0
- package/dist/scss/v2/Autocomplete/Autocomplete-theme.scss +209 -0
- package/dist/scss/v2/Avatar/Avatar-layout.scss +137 -0
- package/dist/scss/v2/Avatar/Avatar-theme.scss +64 -0
- package/dist/scss/v2/BaseImage/BaseImage-layout.scss +21 -0
- package/dist/scss/v2/BaseImage/BaseImage-theme.scss +35 -0
- package/dist/scss/v2/BaseImage/index.scss +2 -0
- package/dist/scss/v2/Channel/Channel-layout.scss +140 -0
- package/dist/scss/v2/Channel/Channel-theme.scss +100 -0
- package/dist/scss/v2/ChannelHeader/ChannelHeader-layout.scss +27 -0
- package/dist/scss/v2/ChannelHeader/ChannelHeader-theme.scss +43 -0
- package/dist/scss/v2/ChannelList/ChannelList-layout.scss +65 -0
- package/dist/scss/v2/ChannelList/ChannelList-theme.scss +89 -0
- package/dist/scss/v2/ChannelPreview/ChannelPreview-layout.scss +126 -0
- package/dist/scss/v2/ChannelPreview/ChannelPreview-theme.scss +148 -0
- package/dist/scss/v2/ChannelSearch/ChannelSearch-layout.scss +121 -0
- package/dist/scss/v2/ChannelSearch/ChannelSearch-theme.scss +238 -0
- package/dist/scss/v2/ChatView/ChatView-layout.scss +43 -0
- package/dist/scss/v2/ChatView/ChatView-theme.scss +32 -0
- package/dist/scss/v2/Dialog/Dialog-layout.scss +62 -0
- package/dist/scss/v2/Dialog/Dialog-theme.scss +103 -0
- package/dist/scss/v2/DragAndDropContainer/DragAmdDropContainer-layout.scss +5 -0
- package/dist/scss/v2/DragAndDropContainer/DragAndDropContainer-theme.scss +47 -0
- package/dist/scss/v2/EditMessageForm/EditMessageForm-layout.scss +51 -0
- package/dist/scss/v2/EditMessageForm/EditMessageForm-theme.scss +50 -0
- package/dist/scss/v2/Form/Form-layout.scss +9 -0
- package/dist/scss/v2/Form/Form-theme.scss +17 -0
- package/dist/scss/v2/Icon/Icon-layout.scss +92 -0
- package/dist/scss/v2/Icon/Icon-theme.scss +13 -0
- package/dist/scss/v2/ImageCarousel/ImageCarousel-layout.scss +51 -0
- package/dist/scss/v2/ImageCarousel/ImageCarousel-theme.scss +30 -0
- package/dist/scss/v2/InfiniteScrollPaginator/InfiniteScrollPaginator-layout.scss +4 -0
- package/dist/scss/v2/LinkPreview/LinkPreview-layout.scss +49 -0
- package/dist/scss/v2/LinkPreview/LinkPreview-theme.scss +17 -0
- package/dist/scss/v2/LinkPreview/index.scss +2 -0
- package/dist/scss/v2/LoadingIndicator/LoadingIndicator-layout.scss +64 -0
- package/dist/scss/v2/LoadingIndicator/LoadingIndicator-theme.scss +14 -0
- package/dist/scss/v2/Message/Message-layout.scss +555 -0
- package/dist/scss/v2/Message/Message-theme.scss +415 -0
- package/dist/scss/v2/MessageActionsBox/MessageActionsBox-layout.scss +20 -0
- package/dist/scss/v2/MessageActionsBox/MessageActionsBox-theme.scss +77 -0
- package/dist/scss/v2/MessageBouncePrompt/MessageBouncePrompt-layout.scss +19 -0
- package/dist/scss/v2/MessageBouncePrompt/MessageBouncePrompt-theme.scss +51 -0
- package/dist/scss/v2/MessageInput/MessageInput-layout.scss +249 -0
- package/dist/scss/v2/MessageInput/MessageInput-theme.scss +351 -0
- package/dist/scss/v2/MessageList/MessageList-layout.scss +65 -0
- package/dist/scss/v2/MessageList/MessageList-theme.scss +107 -0
- package/dist/scss/v2/MessageList/VirtualizedMessageList-layout.scss +57 -0
- package/dist/scss/v2/MessageList/VirtualizedMessageList-theme.scss +41 -0
- package/dist/scss/v2/MessageReactions/MessageReactions-layout.scss +143 -0
- package/dist/scss/v2/MessageReactions/MessageReactions-theme.scss +92 -0
- package/dist/scss/v2/MessageReactions/MessageReactionsSelector-layout.scss +86 -0
- package/dist/scss/v2/MessageReactions/MessageReactionsSelector-theme.scss +94 -0
- package/dist/scss/v2/Modal/Modal-layout.scss +72 -0
- package/dist/scss/v2/Modal/Modal-theme.scss +94 -0
- package/dist/scss/v2/Notification/MessageNotification-layout.scss +12 -0
- package/dist/scss/v2/Notification/MessageNotification-theme.scss +34 -0
- package/dist/scss/v2/Notification/Notification-layout.scss +7 -0
- package/dist/scss/v2/Notification/Notification-theme.scss +32 -0
- package/dist/scss/v2/Notification/NotificationList-layout.scss +11 -0
- package/dist/scss/v2/Notification/NotificationList-theme.scss +31 -0
- package/dist/scss/v2/Poll/Poll-layout.scss +488 -0
- package/dist/scss/v2/Poll/Poll-theme.scss +206 -0
- package/dist/scss/v2/Thread/Thread-layout.scss +65 -0
- package/dist/scss/v2/Thread/Thread-theme.scss +82 -0
- package/dist/scss/v2/ThreadList/ThreadList-layout.scss +152 -0
- package/dist/scss/v2/ThreadList/ThreadList-theme.scss +75 -0
- package/dist/scss/v2/Tooltip/Tooltip-layout.scss +10 -0
- package/dist/scss/v2/Tooltip/Tooltip-theme.scss +36 -0
- package/dist/scss/v2/TypingIndicator/TypingIndicator-layout.scss +31 -0
- package/dist/scss/v2/TypingIndicator/TypingIndicator-theme.scss +68 -0
- package/dist/scss/v2/UnreadCountBadge/UnreadCountBadge-layout.scss +49 -0
- package/dist/scss/v2/UnreadCountBadge/UnreadCountBadge-theme.scss +11 -0
- package/dist/scss/v2/_base.scss +65 -0
- package/dist/scss/v2/_emoji-replacement.scss +45 -0
- package/dist/scss/v2/_global-layout-variables.scss +65 -0
- package/dist/scss/v2/_global-theme-variables.scss +173 -0
- package/dist/scss/v2/_icons.scss +33 -0
- package/dist/scss/v2/_palette-variables.scss +55 -0
- package/dist/scss/v2/_utils.scss +212 -0
- package/dist/scss/v2/_variables.scss +2 -0
- package/dist/scss/v2/common/CTAButton/CTAButton-layout.scss +4 -0
- package/dist/scss/v2/common/CTAButton/CTAButton-theme.scss +42 -0
- package/dist/scss/v2/common/CircleFAButton/CircleFAButton-layout.scss +14 -0
- package/dist/scss/v2/common/CircleFAButton/CircleFAButton-theme.scss +35 -0
- package/dist/scss/v2/index.layout.scss +46 -0
- package/dist/scss/v2/index.scss +47 -0
- package/dist/scss/v2/vendor/emoji-mart.scss +514 -0
- package/dist/scss/v2/vendor/react-image-gallery.scss +256 -0
- package/dist/store/hooks/index.d.ts +1 -0
- package/dist/store/hooks/index.js +1 -0
- package/dist/store/hooks/useStateStore.d.ts +3 -0
- package/dist/store/hooks/useStateStore.js +15 -0
- package/dist/store/index.d.ts +1 -0
- package/dist/store/index.js +1 -0
- package/dist/types/index.d.ts +1 -0
- package/dist/types/index.js +1 -0
- package/dist/types/types.d.ts +114 -0
- package/dist/types/types.js +1 -0
- package/dist/utils/browsers.d.ts +1 -0
- package/dist/utils/browsers.js +5 -0
- package/dist/utils/deprecationWarning.d.ts +1 -0
- package/dist/utils/deprecationWarning.js +12 -0
- package/dist/utils/getChannel.d.ts +21 -0
- package/dist/utils/getChannel.js +52 -0
- package/dist/utils/getWholeChar.d.ts +1 -0
- package/dist/utils/getWholeChar.js +26 -0
- package/dist/utils/index.d.ts +2 -0
- package/dist/utils/index.js +2 -0
- package/dist/utils/mergeDeep.d.ts +3 -0
- package/dist/utils/mergeDeep.js +5 -0
- package/package.json +302 -0
package/LICENSE
ADDED
|
@@ -0,0 +1,219 @@
|
|
|
1
|
+
SOURCE CODE LICENSE AGREEMENT
|
|
2
|
+
|
|
3
|
+
IMPORTANT - READ THIS CAREFULLY BEFORE DOWNLOADING, INSTALLING, USING OR
|
|
4
|
+
ELECTRONICALLY ACCESSING THIS PROPRIETARY PRODUCT.
|
|
5
|
+
|
|
6
|
+
THIS IS A LEGAL AGREEMENT BETWEEN STREAM.IO, INC. (“STREAM.IO”) AND THE
|
|
7
|
+
BUSINESS ENTITY OR PERSON FOR WHOM YOU (“YOU”) ARE ACTING (“CUSTOMER”) AS THE
|
|
8
|
+
LICENSEE OF THE PROPRIETARY SOFTWARE INTO WHICH THIS AGREEMENT HAS BEEN
|
|
9
|
+
INCLUDED (THE “AGREEMENT”). YOU AGREE THAT YOU ARE THE CUSTOMER, OR YOU ARE AN
|
|
10
|
+
EMPLOYEE OR AGENT OF CUSTOMER AND ARE ENTERING INTO THIS AGREEMENT FOR LICENSE
|
|
11
|
+
OF THE SOFTWARE BY CUSTOMER FOR CUSTOMER’S BUSINESS PURPOSES AS DESCRIBED IN
|
|
12
|
+
AND IN ACCORDANCE WITH THIS AGREEMENT. YOU HEREBY AGREE THAT YOU ENTER INTO
|
|
13
|
+
THIS AGREEMENT ON BEHALF OF CUSTOMER AND THAT YOU HAVE THE AUTHORITY TO BIND
|
|
14
|
+
CUSTOMER TO THIS AGREEMENT.
|
|
15
|
+
|
|
16
|
+
STREAM.IO IS WILLING TO LICENSE THE SOFTWARE TO CUSTOMER ONLY ON THE FOLLOWING
|
|
17
|
+
CONDITIONS: (1) YOU ARE A CURRENT CUSTOMER OF STREAM.IO; (2) YOU ARE NOT A
|
|
18
|
+
COMPETITOR OF STREAM.IO; AND (3) THAT YOU ACCEPT ALL THE TERMS IN THIS
|
|
19
|
+
AGREEMENT. BY DOWNLOADING, INSTALLING, CONFIGURING, ACCESSING OR OTHERWISE
|
|
20
|
+
USING THE SOFTWARE, INCLUDING ANY UPDATES, UPGRADES, OR NEWER VERSIONS, YOU
|
|
21
|
+
REPRESENT, WARRANT AND ACKNOWLEDGE THAT (A) CUSTOMER IS A CURRENT CUSTOMER OF
|
|
22
|
+
STREAM.IO; (B) CUSTOMER IS NOT A COMPETITOR OF STREAM.IO; AND THAT (C) YOU HAVE
|
|
23
|
+
READ THIS AGREEMENT, UNDERSTAND THIS AGREEMENT, AND THAT CUSTOMER AGREES TO BE
|
|
24
|
+
BOUND BY ALL THE TERMS OF THIS AGREEMENT.
|
|
25
|
+
|
|
26
|
+
IF YOU DO NOT AGREE TO ALL THE TERMS AND CONDITIONS OF THIS AGREEMENT,
|
|
27
|
+
STREAM.IO IS UNWILLING TO LICENSE THE SOFTWARE TO CUSTOMER, AND THEREFORE, DO
|
|
28
|
+
NOT COMPLETE THE DOWNLOAD PROCESS, ACCESS OR OTHERWISE USE THE SOFTWARE, AND
|
|
29
|
+
CUSTOMER SHOULD IMMEDIATELY RETURN THE SOFTWARE AND CEASE ANY USE OF THE
|
|
30
|
+
SOFTWARE.
|
|
31
|
+
|
|
32
|
+
1. SOFTWARE. The Stream.io software accompanying this Agreement, may include
|
|
33
|
+
Source Code, Executable Object Code, associated media, printed materials and
|
|
34
|
+
documentation (collectively, the “Software”). The Software also includes any
|
|
35
|
+
updates or upgrades to or new versions of the original Software, if and when
|
|
36
|
+
made available to you by Stream.io. “Source Code” means computer programming
|
|
37
|
+
code in human readable form that is not suitable for machine execution without
|
|
38
|
+
the intervening steps of interpretation or compilation. “Executable Object
|
|
39
|
+
Code" means the computer programming code in any other form than Source Code
|
|
40
|
+
that is not readily perceivable by humans and suitable for machine execution
|
|
41
|
+
without the intervening steps of interpretation or compilation. “Site” means a
|
|
42
|
+
Customer location controlled by Customer. “Authorized User” means any employee
|
|
43
|
+
or contractor of Customer working at the Site, who has signed a written
|
|
44
|
+
confidentiality agreement with Customer or is otherwise bound in writing by
|
|
45
|
+
confidentiality and use obligations at least as restrictive as those imposed
|
|
46
|
+
under this Agreement.
|
|
47
|
+
|
|
48
|
+
2. LICENSE GRANT. Subject to the terms and conditions of this Agreement, in
|
|
49
|
+
consideration for the representations, warranties, and covenants made by
|
|
50
|
+
Customer in this Agreement, Stream.io grants to Customer, during the term of
|
|
51
|
+
this Agreement, a personal, non-exclusive, non-transferable, non-sublicensable
|
|
52
|
+
license to:
|
|
53
|
+
|
|
54
|
+
a. install and use Software Source Code on password protected computers at a Site,
|
|
55
|
+
restricted to Authorized Users;
|
|
56
|
+
|
|
57
|
+
b. create derivative works, improvements (whether or not patentable), extensions
|
|
58
|
+
and other modifications to the Software Source Code (“Modifications”) to build
|
|
59
|
+
unique scalable newsfeeds, activity streams, and in-app messaging via Stream’s
|
|
60
|
+
application program interface (“API”);
|
|
61
|
+
|
|
62
|
+
c. compile the Software Source Code to create Executable Object Code versions of
|
|
63
|
+
the Software Source Code and Modifications to build such newsfeeds, activity
|
|
64
|
+
streams, and in-app messaging via the API;
|
|
65
|
+
|
|
66
|
+
d. install, execute and use such Executable Object Code versions solely for
|
|
67
|
+
Customer’s internal business use (including development of websites through
|
|
68
|
+
which data generated by Stream services will be streamed (“Apps”));
|
|
69
|
+
|
|
70
|
+
e. use and distribute such Executable Object Code as part of Customer’s Apps; and
|
|
71
|
+
|
|
72
|
+
f. make electronic copies of the Software and Modifications as required for backup
|
|
73
|
+
or archival purposes.
|
|
74
|
+
|
|
75
|
+
3. RESTRICTIONS. Customer is responsible for all activities that occur in
|
|
76
|
+
connection with the Software. Customer will not, and will not attempt to: (a)
|
|
77
|
+
sublicense or transfer the Software or any Source Code related to the Software
|
|
78
|
+
or any of Customer’s rights under this Agreement, except as otherwise provided
|
|
79
|
+
in this Agreement, (b) use the Software Source Code for the benefit of a third
|
|
80
|
+
party or to operate a service; (c) allow any third party to access or use the
|
|
81
|
+
Software Source Code; (d) sublicense or distribute the Software Source Code or
|
|
82
|
+
any Modifications in Source Code or other derivative works based on any part of
|
|
83
|
+
the Software Source Code; (e) use the Software in any manner that competes with
|
|
84
|
+
Stream.io or its business; or (e) otherwise use the Software in any manner that
|
|
85
|
+
exceeds the scope of use permitted in this Agreement. Customer shall use the
|
|
86
|
+
Software in compliance with any accompanying documentation any laws applicable
|
|
87
|
+
to Customer.
|
|
88
|
+
|
|
89
|
+
4. OPEN SOURCE. Customer and its Authorized Users shall not use any software or
|
|
90
|
+
software components that are open source in conjunction with the Software
|
|
91
|
+
Source Code or any Modifications in Source Code or in any way that could
|
|
92
|
+
subject the Software to any open source licenses.
|
|
93
|
+
|
|
94
|
+
5. CONTRACTORS. Under the rights granted to Customer under this Agreement,
|
|
95
|
+
Customer may permit its employees, contractors, and agencies of Customer to
|
|
96
|
+
become Authorized Users to exercise the rights to the Software granted to
|
|
97
|
+
Customer in accordance with this Agreement solely on behalf of Customer to
|
|
98
|
+
provide services to Customer; provided that Customer shall be liable for the
|
|
99
|
+
acts and omissions of all Authorized Users to the extent any of such acts or
|
|
100
|
+
omissions, if performed by Customer, would constitute a breach of, or otherwise
|
|
101
|
+
give rise to liability to Customer under, this Agreement. Customer shall not
|
|
102
|
+
and shall not permit any Authorized User to use the Software except as
|
|
103
|
+
expressly permitted in this Agreement.
|
|
104
|
+
|
|
105
|
+
6. COMPETITIVE PRODUCT DEVELOPMENT. Customer shall not use the Software in any way
|
|
106
|
+
to engage in the development of products or services which could be reasonably
|
|
107
|
+
construed to provide a complete or partial functional or commercial alternative
|
|
108
|
+
to Stream.io’s products or services (a “Competitive Product”). Customer shall
|
|
109
|
+
ensure that there is no direct or indirect use of, or sharing of, Software
|
|
110
|
+
source code, or other information based upon or derived from the Software to
|
|
111
|
+
develop such products or services. Without derogating from the generality of
|
|
112
|
+
the foregoing, development of Competitive Products shall include having direct
|
|
113
|
+
or indirect access to, supervising, consulting or assisting in the development
|
|
114
|
+
of, or producing any specifications, documentation, object code or source code
|
|
115
|
+
for, all or part of a Competitive Product.
|
|
116
|
+
|
|
117
|
+
7. LIMITATION ON MODIFICATIONS. Notwithstanding any provision in this Agreement,
|
|
118
|
+
Modifications may only be created and used by Customer as permitted by this
|
|
119
|
+
Agreement and Modification Source Code may not be distributed to third parties.
|
|
120
|
+
Customer will not assert against Stream.io, its affiliates, or their customers,
|
|
121
|
+
direct or indirect, agents and contractors, in any way, any patent rights that
|
|
122
|
+
Customer may obtain relating to any Modifications for Stream.io, its
|
|
123
|
+
affiliates’, or their customers’, direct or indirect, agents’ and contractors’
|
|
124
|
+
manufacture, use, import, offer for sale or sale of any Stream.io products or
|
|
125
|
+
services.
|
|
126
|
+
|
|
127
|
+
8. DELIVERY AND ACCEPTANCE. The Software will be delivered electronically pursuant
|
|
128
|
+
to Stream.io standard download procedures. The Software is deemed accepted upon
|
|
129
|
+
delivery.
|
|
130
|
+
|
|
131
|
+
9. IMPLEMENTATION AND SUPPORT. Stream.io has no obligation under this Agreement to
|
|
132
|
+
provide any support or consultation concerning the Software.
|
|
133
|
+
|
|
134
|
+
10. TERM AND TERMINATION. The term of this Agreement begins when the Software is
|
|
135
|
+
downloaded or accessed and shall continue until terminated. Either party may
|
|
136
|
+
terminate this Agreement upon written notice. This Agreement shall
|
|
137
|
+
automatically terminate if Customer is or becomes a competitor of Stream.io or
|
|
138
|
+
makes or sells any Competitive Products. Upon termination of this Agreement for
|
|
139
|
+
any reason, (a) all rights granted to Customer in this Agreement immediately
|
|
140
|
+
cease to exist, (b) Customer must promptly discontinue all use of the Software
|
|
141
|
+
and return to Stream.io or destroy all copies of the Software in Customer’s
|
|
142
|
+
possession or control. Any continued use of the Software by Customer or attempt
|
|
143
|
+
by Customer to exercise any rights under this Agreement after this Agreement
|
|
144
|
+
has terminated shall be considered copyright infringement and subject Customer
|
|
145
|
+
to applicable remedies for copyright infringement. Sections 2, 5, 6, 8 and 9
|
|
146
|
+
shall survive expiration or termination of this Agreement for any reason.
|
|
147
|
+
|
|
148
|
+
11. OWNERSHIP. As between the parties, the Software and all worldwide intellectual
|
|
149
|
+
property rights and proprietary rights relating thereto or embodied therein,
|
|
150
|
+
are the exclusive property of Stream.io and its suppliers. Stream.io and its
|
|
151
|
+
suppliers reserve all rights in and to the Software not expressly granted to
|
|
152
|
+
Customer in this Agreement, and no other licenses or rights are granted by
|
|
153
|
+
implication, estoppel or otherwise.
|
|
154
|
+
|
|
155
|
+
12. WARRANTY DISCLAIMER. USE OF THIS SOFTWARE IS ENTIRELY AT YOURS AND CUSTOMER’S
|
|
156
|
+
OWN RISK. THE SOFTWARE IS PROVIDED “AS IS” WITHOUT ANY WARRANTY OF ANY KIND
|
|
157
|
+
WHATSOEVER. STREAM.IO DOES NOT MAKE, AND HEREBY DISCLAIMS, ANY WARRANTY OF ANY
|
|
158
|
+
KIND, WHETHER EXPRESS, IMPLIED, STATUTORY OR OTHERWISE, INCLUDING WITHOUT
|
|
159
|
+
LIMITATION, THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR
|
|
160
|
+
PURPOSE, TITLE, NON-INFRINGEMENT OF THIRD-PARTY RIGHTS, RESULTS, EFFORTS,
|
|
161
|
+
QUALITY OR QUIET ENJOYMENT. STREAM.IO DOES NOT WARRANT THAT THE SOFTWARE IS
|
|
162
|
+
ERROR-FREE, WILL FUNCTION WITHOUT INTERRUPTION, WILL MEET ANY SPECIFIC NEED
|
|
163
|
+
THAT CUSTOMER HAS, THAT ALL DEFECTS WILL BE CORRECTED OR THAT IT IS
|
|
164
|
+
SUFFICIENTLY DOCUMENTED TO BE USABLE BY CUSTOMER. TO THE EXTENT THAT STREAM.IO
|
|
165
|
+
MAY NOT DISCLAIM ANY WARRANTY AS A MATTER OF APPLICABLE LAW, THE SCOPE AND
|
|
166
|
+
DURATION OF SUCH WARRANTY WILL BE THE MINIMUM PERMITTED UNDER SUCH LAW.
|
|
167
|
+
CUSTOMER ACKNOWLEDGES THAT IT HAS RELIED ON NO WARRANTIES OTHER THAN THE
|
|
168
|
+
EXPRESS WARRANTIES IN THIS AGREEMENT.
|
|
169
|
+
|
|
170
|
+
13. LIMITATION OF LIABILITY. TO THE FULLEST EXTENT PERMISSIBLE BY LAW, STREAM.IO’S
|
|
171
|
+
TOTAL LIABILITY FOR ALL DAMAGES ARISING OUT OF OR RELATED TO THE SOFTWARE OR
|
|
172
|
+
THIS AGREEMENT, WHETHER IN CONTRACT, TORT (INCLUDING NEGLIGENCE) OR OTHERWISE,
|
|
173
|
+
SHALL NOT EXCEED $100. IN NO EVENT WILL STREAM.IO BE LIABLE FOR ANY INDIRECT,
|
|
174
|
+
CONSEQUENTIAL, EXEMPLARY, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES OF ANY KIND
|
|
175
|
+
WHATSOEVER, INCLUDING ANY LOST DATA AND LOST PROFITS, ARISING FROM OR RELATING
|
|
176
|
+
TO THE SOFTWARE EVEN IF STREAM.IO HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH
|
|
177
|
+
DAMAGES. CUSTOMER ACKNOWLEDGES THAT THIS PROVISION REFLECTS THE AGREED UPON
|
|
178
|
+
ALLOCATION OF RISK FOR THIS AGREEMENT AND THAT STREAM.IO WOULD NOT ENTER INTO
|
|
179
|
+
THIS AGREEMENT WITHOUT THESE LIMITATIONS ON ITS LIABILITY.
|
|
180
|
+
|
|
181
|
+
14. General. Customer may not assign or transfer this Agreement, by operation of
|
|
182
|
+
law or otherwise, or any of its rights under this Agreement (including the
|
|
183
|
+
license rights granted to Customer) to any third party without Stream.io’s
|
|
184
|
+
prior written consent, which consent will not be unreasonably withheld or
|
|
185
|
+
delayed. Stream.io may assign this Agreement, without consent, including, but
|
|
186
|
+
limited to, affiliate or any successor to all or substantially all its business
|
|
187
|
+
or assets to which this Agreement relates, whether by merger, sale of assets,
|
|
188
|
+
sale of stock, reorganization or otherwise. Any attempted assignment or
|
|
189
|
+
transfer in violation of the foregoing will be null and void. Stream.io shall
|
|
190
|
+
not be liable hereunder by reason of any failure or delay in the performance of
|
|
191
|
+
its obligations hereunder for any cause which is beyond the reasonable control.
|
|
192
|
+
All notices, consents, and approvals under this Agreement must be delivered in
|
|
193
|
+
writing by courier, by electronic mail, or by certified or registered mail,
|
|
194
|
+
(postage prepaid and return receipt requested) to the other party at the
|
|
195
|
+
address set forth in the customer agreement between Stream.io and Customer and
|
|
196
|
+
will be effective upon receipt or when delivery is refused. This Agreement will
|
|
197
|
+
be governed by and interpreted in accordance with the laws of the State of
|
|
198
|
+
Colorado, without reference to its choice of laws rules. The United Nations
|
|
199
|
+
Convention on Contracts for the International Sale of Goods does not apply to
|
|
200
|
+
this Agreement. Any action or proceeding arising from or relating to this
|
|
201
|
+
Agreement shall be brought in a federal or state court in Denver, Colorado, and
|
|
202
|
+
each party irrevocably submits to the jurisdiction and venue of any such court
|
|
203
|
+
in any such action or proceeding. All waivers must be in writing. Any waiver or
|
|
204
|
+
failure to enforce any provision of this Agreement on one occasion will not be
|
|
205
|
+
deemed a waiver of any other provision or of such provision on any other
|
|
206
|
+
occasion. If any provision of this Agreement is unenforceable, such provision
|
|
207
|
+
will be changed and interpreted to accomplish the objectives of such provision
|
|
208
|
+
to the greatest extent possible under applicable law and the remaining
|
|
209
|
+
provisions will continue in full force and effect. Customer shall not violate
|
|
210
|
+
any applicable law, rule or regulation, including those regarding the export of
|
|
211
|
+
technical data. The headings of Sections of this Agreement are for convenience
|
|
212
|
+
and are not to be used in interpreting this Agreement. As used in this
|
|
213
|
+
Agreement, the word “including” means “including but not limited to.” This
|
|
214
|
+
Agreement (including all exhibits and attachments) constitutes the entire
|
|
215
|
+
agreement between the parties regarding the subject hereof and supersedes all
|
|
216
|
+
prior or contemporaneous agreements, understandings and communication, whether
|
|
217
|
+
written or oral. This Agreement may be amended only by a written document
|
|
218
|
+
signed by both parties. The terms of any purchase order or similar document
|
|
219
|
+
submitted by Customer to Stream.io will have no effect.
|
package/README.md
ADDED
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
# Official React SDK for [Stream Chat](https://getstream.io/chat/sdk/react/)
|
|
2
|
+
|
|
3
|
+
<p align="center">
|
|
4
|
+
<a href="https://getstream.io/chat/react-chat/tutorial/"><img src="https://i.imgur.com/SRkDlFX.png" alt="react native chat" width="60%" /></a>
|
|
5
|
+
</p>
|
|
6
|
+
|
|
7
|
+
> The official React components for Stream Chat, a service for
|
|
8
|
+
> building chat applications.
|
|
9
|
+
|
|
10
|
+
[](https://www.npmjs.com/package/stream-chat-react)
|
|
11
|
+
[](https://github.com/GetStream/stream-chat-react/actions)
|
|
12
|
+
[](https://getstream.io/chat/docs/sdk/react/)
|
|
13
|
+
[](https://codecov.io/gh/GetStream/stream-chat-react)
|
|
14
|
+
|
|
15
|
+
<img align="right" src="https://getstream.imgix.net/images/chat/chattutorialart@3x.png?auto=format,enhance" width="50%" />
|
|
16
|
+
|
|
17
|
+
**Quick Links**
|
|
18
|
+
|
|
19
|
+
- [Register](https://getstream.io/chat/trial/) to get an API key for Stream Chat
|
|
20
|
+
- [React Chat Tutorial](https://getstream.io/chat/react-chat/tutorial/)
|
|
21
|
+
- [Demo Apps](https://getstream.io/chat/demos/)
|
|
22
|
+
- [Component Docs](https://getstream.io/chat/docs/sdk/react/)
|
|
23
|
+
- [Chat UI Kit](https://getstream.io/chat/ui-kit/)
|
|
24
|
+
- [Internationalization](#internationalization)
|
|
25
|
+
|
|
26
|
+
With our component library, you can build a variety of chat use cases, including:
|
|
27
|
+
|
|
28
|
+
- Livestream like Twitch or YouTube
|
|
29
|
+
- In-game chat like Overwatch or Fortnite
|
|
30
|
+
- Team-style chat like Slack
|
|
31
|
+
- Messaging-style chat like WhatsApp or Facebook's Messenger
|
|
32
|
+
- Customer support chat like Drift or Intercom
|
|
33
|
+
|
|
34
|
+
## React Chat Tutorial
|
|
35
|
+
|
|
36
|
+
The best way to get started is to follow the [React Chat Tutorial](https://getstream.io/chat/react-chat/tutorial/). It shows you how to use this SDK to build a fully functional chat application and includes common customizations.
|
|
37
|
+
|
|
38
|
+
## Free for Makers
|
|
39
|
+
|
|
40
|
+
Stream is free for most side and hobby projects. To qualify, your project/company must have no more than 5 team members and earn less than $10k in monthly revenue.
|
|
41
|
+
For complete pricing and details visit our [Chat Pricing Page](https://getstream.io/chat/pricing/).
|
|
42
|
+
|
|
43
|
+
## Installation
|
|
44
|
+
|
|
45
|
+
### Install with NPM
|
|
46
|
+
|
|
47
|
+
`npm install react react-dom stream-chat stream-chat-react`
|
|
48
|
+
|
|
49
|
+
### Install with Yarn
|
|
50
|
+
|
|
51
|
+
`yarn add react react-dom stream-chat stream-chat-react`
|
|
52
|
+
|
|
53
|
+
### Install via CDN
|
|
54
|
+
|
|
55
|
+
```
|
|
56
|
+
<script src="https://cdn.jsdelivr.net/npm/react@16.13.1/umd/react.production.min.js"></script>
|
|
57
|
+
<script src="https://cdn.jsdelivr.net/npm/react-dom@16/umd/react-dom.production.min.js"></script>
|
|
58
|
+
<script src="https://cdn.jsdelivr.net/npm/stream-chat"></script>
|
|
59
|
+
<script src="https://cdn.jsdelivr.net/npm/stream-chat-react"></script>
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
## Example Apps
|
|
63
|
+
|
|
64
|
+
We have built five demo applications showcasing a variety of chat use cases, including social messaging, team collaboration, customer support, livestream gaming, and virtual event. You can preview these [demos](https://getstream.io/chat/demos/) on our website. Also, the code is [open source](https://github.com/GetStream/website-react-examples/).
|
|
65
|
+
|
|
66
|
+
## Docs
|
|
67
|
+
|
|
68
|
+
We use a doc generator to build our [component documentation](https://getstream.io/chat/docs/sdk/react/). We provide a brief description of each chat component and define all of the props it accepts.
|
|
69
|
+
|
|
70
|
+
The React components are created using the [stream-chat-js](https://github.com/getstream/stream-chat-js) library. If you're customizing the components, it's likely you'll need to make additional calls to our Chat API using our JavaScript client, which has [documentation](https://getstream.io/chat/docs/js/) on our website.
|
|
71
|
+
|
|
72
|
+
## TypeScript Support
|
|
73
|
+
|
|
74
|
+
As of version `5.0.0`, the component library has been converted to TypeScript. Please read the [TypeScript guide](https://github.com/GetStream/stream-chat-react/wiki/Typescript-support) for details and implementation assistance.
|
|
75
|
+
|
|
76
|
+
## Component Reusability
|
|
77
|
+
|
|
78
|
+
For components that implement significant logic, it's helpful to split the component into two parts: a top-level component which handles functionality and a lower level component which renders the UI. This way you can swap UI without altering the logic that gives the component its functionality. We use this provider/consumer pattern frequently in the library, and the below example shows how to swap out the `Message` UI component with `MessageTeam`, without affecting any logic in the app.
|
|
79
|
+
|
|
80
|
+
```jsx
|
|
81
|
+
<Channel Message={MessageTeam}>
|
|
82
|
+
<Window>
|
|
83
|
+
<ChannelHeader />
|
|
84
|
+
<MessageList />
|
|
85
|
+
<MessageInput />
|
|
86
|
+
</Window>
|
|
87
|
+
<Thread />
|
|
88
|
+
</Channel>
|
|
89
|
+
```
|
|
90
|
+
|
|
91
|
+
### Customizing Styles
|
|
92
|
+
|
|
93
|
+
The preferred method for overriding the pre-defined styles in the library is to two-step process. First, import our bundled CSS into the file where you instantiate your chat application. Second, locate any Stream styles you want to override using either the browser inspector or by viewing the library code. You can then add selectors to your local CSS file to override our defaults. For example:
|
|
94
|
+
|
|
95
|
+
```js
|
|
96
|
+
import 'stream-chat-react/dist/css/v2/index.css';
|
|
97
|
+
import './App.css';
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
## Internationalization
|
|
101
|
+
|
|
102
|
+
Our library supports auto-translation for various user languages. Please read our internationalization [documentation](https://getstream.io/chat/docs/sdk/react/customization/translations/) for further details and setup guidance.
|
|
103
|
+
|
|
104
|
+
## Contributing
|
|
105
|
+
|
|
106
|
+
We welcome code changes that improve this library or fix a problem. Please make sure to follow all best practices and add tests, if applicable, before submitting a pull request on GitHub. We are pleased to merge your code into the official repository if it meets a need. Make sure to sign our [Contributor License Agreement (CLA)](https://docs.google.com/forms/d/e/1FAIpQLScFKsKkAJI7mhCr7K9rEIOpqIDThrWxuvxnwUq2XkHyG154vQ/viewform) first. See our license file for more details.
|
|
107
|
+
|
|
108
|
+
## We are hiring!
|
|
109
|
+
We recently closed a [$38 million Series B funding round](https://techcrunch.com/2021/03/04/stream-raises-38m-as-its-chat-and-activity-feed-apis-power-communications-for-1b-users/) and are actively growing.
|
|
110
|
+
Our APIs are used by more than a billion end-users, and by working at Stream, you have the chance to make a huge impact on a team of very strong engineers.
|
|
111
|
+
|
|
112
|
+
Check out our current openings and apply via [Stream's website](https://getstream.io/team/#jobs).
|
|
113
|
+
|
|
114
|
+
## Acknowledgements
|
|
115
|
+
|
|
116
|
+
### Lamejs
|
|
117
|
+
|
|
118
|
+
This project uses `lamejs` library under the LGPL license to convert the recorded audio to mp3 format.
|
|
119
|
+
The library source code is dynamically imported and used only if audio recording is enabled.
|
|
120
|
+
|
|
121
|
+
You can obtain the source code for `lamejs` from the [lamejs repository](https://github.com/gideonstele/lamejs) that is a fork of [the original JS library](https://github.com/zhuker/lamejs).
|
|
122
|
+
You can find the source code for LAME at https://lame.sourceforge.net and its license at: https://lame.sourceforge.net/license.txt
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
<?xml version="1.0" standalone="no"?>
|
|
2
|
+
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
|
|
3
|
+
<svg xmlns="http://www.w3.org/2000/svg">
|
|
4
|
+
<metadata>Copyright (C) 2024 by original authors @ fontello.com</metadata>
|
|
5
|
+
<defs>
|
|
6
|
+
<font id="stream-chat-icons" horiz-adv-x="1000" >
|
|
7
|
+
<font-face font-family="stream-chat-icons" font-weight="400" font-stretch="normal" units-per-em="1000" ascent="850" descent="-150" />
|
|
8
|
+
<missing-glyph horiz-adv-x="1000" />
|
|
9
|
+
<glyph glyph-name="action" unicode="" d="M500 517c46 0 83 37 83 83 0 46-37 83-83 83-46 0-83-37-83-83 0-46 37-83 83-83z m0-84c-46 0-83-37-83-83 0-46 37-83 83-83 46 0 83 37 83 83 0 46-37 83-83 83z m0-250c-46 0-83-37-83-83 0-46 37-83 83-83 46 0 83 37 83 83 0 46-37 83-83 83z" horiz-adv-x="1000" />
|
|
10
|
+
|
|
11
|
+
<glyph glyph-name="arrow-down" unicode="" d="M309 504l191-190 191 190 59-58-250-250-250 250 59 58z" horiz-adv-x="1000" />
|
|
12
|
+
|
|
13
|
+
<glyph glyph-name="arrow-left" unicode="" d="M654 541l-58 59-250-250 250-250 58 59-190 191 190 191z" horiz-adv-x="1000" />
|
|
14
|
+
|
|
15
|
+
<glyph glyph-name="arrow-right" unicode="" d="M404 600l-58-59 191-191-191-191 58-59 250 250-250 250z" horiz-adv-x="1000" />
|
|
16
|
+
|
|
17
|
+
<glyph glyph-name="close" unicode="" d="M792 583l-59 59-233-233-233 233-59-59 233-233-233-233 59-59 233 233 233-233 59 59-233 233 233 233z" horiz-adv-x="1000" />
|
|
18
|
+
|
|
19
|
+
<glyph glyph-name="arrow-up" unicode="" d="M691 196l-191 191-191-191-59 58 250 250 250-250-59-58z" horiz-adv-x="1000" />
|
|
20
|
+
|
|
21
|
+
<glyph glyph-name="chat-bubble" unicode="" d="M779 670h-558c-39 0-70-32-70-70v-629l139 140h489c39 0 70 32 70 70v419c0 38-31 70-70 70z m0-489h-489l-69-70v489h558v-419z" horiz-adv-x="1000" />
|
|
22
|
+
|
|
23
|
+
<glyph glyph-name="pause" unicode="" d="M250 58h167v584h-167v-584z m333 584v-584h167v584h-167z" horiz-adv-x="1000" />
|
|
24
|
+
|
|
25
|
+
<glyph glyph-name="download" unicode="" d="M806 432c-28 143-154 251-306 251-120 0-225-68-277-168-125-13-223-120-223-248 0-138 112-250 250-250h542c115 0 208 93 208 208 0 110-85 199-194 207z m-14-332h-542c-92 0-167 75-167 167 0 85 64 156 149 165l44 5 21 39c40 77 117 124 203 124 109 0 203-77 225-185l12-62 64-5c65-4 116-58 116-123 0-69-57-125-125-125z m-232 333h-120v-125h-107l167-166 167 166h-107v125z" horiz-adv-x="1000" />
|
|
26
|
+
|
|
27
|
+
<glyph glyph-name="delivered" unicode="" d="M375 175l-175 175-58-58 233-234 500 500-58 59-442-442z" horiz-adv-x="1000" />
|
|
28
|
+
|
|
29
|
+
<glyph glyph-name="reaction" unicode="" d="M500 767c-230 0-417-187-417-417 0-230 187-417 417-417 230 0 417 187 417 417 0 230-187 417-417 417z m0-750c-184 0-333 149-333 333 0 184 149 333 333 333 184 0 333-149 333-333 0-184-149-333-333-333z m146 375c34 0 62 28 62 62 0 35-28 63-62 63-35 0-63-28-63-63 0-34 28-62 63-62z m-292 0c35 0 63 28 63 62 0 35-28 63-63 63-34 0-62-28-62-63 0-34 28-62 62-62z m146-271c97 0 180 61 213 146h-426c33-85 116-146 213-146z" horiz-adv-x="1000" />
|
|
30
|
+
|
|
31
|
+
<glyph glyph-name="error" unicode="" d="M500 767c-230 0-417-187-417-417 0-230 187-417 417-417 230 0 417 187 417 417 0 230-187 417-417 417z m42-625h-84v83h84v-83z m0 166h-84v250h84v-250z" horiz-adv-x="1000" />
|
|
32
|
+
|
|
33
|
+
<glyph glyph-name="read" unicode="" d="M749 571l-59 58-264-264 58-58 265 264z m176 58l-441-440-174 173-58-58 232-233 500 500-59 58z m-909-325l233-233 58 58-232 233-59-58z" horiz-adv-x="1000" />
|
|
34
|
+
|
|
35
|
+
<glyph glyph-name="retry" unicode="" d="M735 585c-60 61-143 98-235 98-184 0-333-149-333-333 0-184 149-333 333-333 155 0 285 106 322 250h-87c-34-97-126-167-235-167-138 0-250 112-250 250 0 138 112 250 250 250 69 0 131-29 176-74l-134-134h291v291l-98-98z" horiz-adv-x="1000" />
|
|
36
|
+
|
|
37
|
+
<glyph glyph-name="reply-in-thread" unicode="" d="M417 496v167l-292-292 292-292v171c208 0 354-67 458-212-42 208-167 416-458 458z" horiz-adv-x="1000" />
|
|
38
|
+
|
|
39
|
+
<glyph glyph-name="send" unicode="" d="M167-67l833 417-833 417 0-324 595-93-595-93 0-324z" horiz-adv-x="1000" />
|
|
40
|
+
|
|
41
|
+
<glyph glyph-name="attach" unicode="" d="M542 558h-84v-166h-166v-84h166v-166h84v166h166v84h-166v166z m-42 209c-230 0-417-187-417-417 0-230 187-417 417-417 230 0 417 187 417 417 0 230-187 417-417 417z m0-750c-184 0-333 149-333 333 0 184 149 333 333 333 184 0 333-149 333-333 0-184-149-333-333-333z" horiz-adv-x="1000" />
|
|
42
|
+
|
|
43
|
+
<glyph glyph-name="mic" unicode="" d="M350 225c83 0 150 67 150 150v300c0 83-67 150-150 150-83 0-150-67-150-150v-300c0-83 67-150 150-150z m250 150c0-138-112-250-250-250-138 0-250 112-250 250h-100c0-176 131-321 300-346v-154h100v154c170 25 300 170 300 346h-100z" horiz-adv-x="700" />
|
|
44
|
+
|
|
45
|
+
<glyph glyph-name="bin" unicode="" d="M250 58c0-45 38-83 83-83h334c46 0 83 38 83 83v417c0 46-37 83-83 83h-334c-45 0-83-37-83-83v-417z m500 625h-104l-30 30c-7 7-18 12-29 12h-174c-11 0-22-5-29-12l-30-30h-104c-23 0-42-18-42-41 0-23 19-42 42-42h500c23 0 42 19 42 42 0 23-19 41-42 41z" horiz-adv-x="1000" />
|
|
46
|
+
|
|
47
|
+
<glyph glyph-name="play" unicode="" d="M398 640c-28 19-65-1-65-34v-511c0-34 37-54 65-35l383 255c25 17 25 53 0 70l-383 255z" horiz-adv-x="1000" />
|
|
48
|
+
</font>
|
|
49
|
+
</defs>
|
|
50
|
+
</svg>
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { Channel } from 'stream-chat';
|
|
3
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
4
|
+
export type AIStateIndicatorProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
5
|
+
channel?: Channel<StreamChatGenerics>;
|
|
6
|
+
};
|
|
7
|
+
export declare const AIStateIndicator: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channel: channelFromProps, }: AIStateIndicatorProps<StreamChatGenerics>) => React.JSX.Element | null;
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { AIStates, useAIState } from './hooks/useAIState';
|
|
3
|
+
import { useChannelStateContext, useTranslationContext } from '../../context';
|
|
4
|
+
export const AIStateIndicator = ({ channel: channelFromProps, }) => {
|
|
5
|
+
const { t } = useTranslationContext();
|
|
6
|
+
const { channel: channelFromContext } = useChannelStateContext('AIStateIndicator');
|
|
7
|
+
const channel = channelFromProps || channelFromContext;
|
|
8
|
+
const { aiState } = useAIState(channel);
|
|
9
|
+
const allowedStates = {
|
|
10
|
+
[AIStates.Thinking]: t('Thinking...'),
|
|
11
|
+
[AIStates.Generating]: t('Generating...'),
|
|
12
|
+
};
|
|
13
|
+
return aiState in allowedStates ? (React.createElement("div", { className: 'str-chat__ai-state-indicator-container' },
|
|
14
|
+
React.createElement("p", { className: 'str-chat__ai-state-indicator-text' }, allowedStates[aiState]))) : null;
|
|
15
|
+
};
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { AIState, Channel } from 'stream-chat';
|
|
2
|
+
import type { DefaultStreamChatGenerics } from '../../../types/types';
|
|
3
|
+
export declare const AIStates: {
|
|
4
|
+
Error: string;
|
|
5
|
+
ExternalSources: string;
|
|
6
|
+
Generating: string;
|
|
7
|
+
Idle: string;
|
|
8
|
+
Thinking: string;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* A hook that returns the current state of the AI.
|
|
12
|
+
* @param {Channel} channel - The channel for which we want to know the AI state.
|
|
13
|
+
* @returns {{ aiState: AIState }} The current AI state for the given channel.
|
|
14
|
+
*/
|
|
15
|
+
export declare const useAIState: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(channel?: Channel<StreamChatGenerics>) => {
|
|
16
|
+
aiState: AIState;
|
|
17
|
+
};
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { useEffect, useState } from 'react';
|
|
2
|
+
export const AIStates = {
|
|
3
|
+
Error: 'AI_STATE_ERROR',
|
|
4
|
+
ExternalSources: 'AI_STATE_EXTERNAL_SOURCES',
|
|
5
|
+
Generating: 'AI_STATE_GENERATING',
|
|
6
|
+
Idle: 'AI_STATE_IDLE',
|
|
7
|
+
Thinking: 'AI_STATE_THINKING',
|
|
8
|
+
};
|
|
9
|
+
/**
|
|
10
|
+
* A hook that returns the current state of the AI.
|
|
11
|
+
* @param {Channel} channel - The channel for which we want to know the AI state.
|
|
12
|
+
* @returns {{ aiState: AIState }} The current AI state for the given channel.
|
|
13
|
+
*/
|
|
14
|
+
export const useAIState = (channel) => {
|
|
15
|
+
const [aiState, setAiState] = useState(AIStates.Idle);
|
|
16
|
+
useEffect(() => {
|
|
17
|
+
if (!channel) {
|
|
18
|
+
return;
|
|
19
|
+
}
|
|
20
|
+
const indicatorChangedListener = channel.on('ai_indicator.update', (event) => {
|
|
21
|
+
const { cid } = event;
|
|
22
|
+
const state = event.ai_state;
|
|
23
|
+
if (channel.cid === cid) {
|
|
24
|
+
setAiState(state);
|
|
25
|
+
}
|
|
26
|
+
});
|
|
27
|
+
const indicatorClearedListener = channel.on('ai_indicator.clear', (event) => {
|
|
28
|
+
const { cid } = event;
|
|
29
|
+
if (channel.cid === cid) {
|
|
30
|
+
setAiState(AIStates.Idle);
|
|
31
|
+
}
|
|
32
|
+
});
|
|
33
|
+
return () => {
|
|
34
|
+
indicatorChangedListener.unsubscribe();
|
|
35
|
+
indicatorClearedListener.unsubscribe();
|
|
36
|
+
};
|
|
37
|
+
}, [channel]);
|
|
38
|
+
return { aiState };
|
|
39
|
+
};
|
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import type { ReactPlayerProps } from 'react-player';
|
|
3
|
+
import type { Attachment as StreamAttachment } from 'stream-chat';
|
|
4
|
+
import type { AttachmentActionsProps } from './AttachmentActions';
|
|
5
|
+
import type { AudioProps } from './Audio';
|
|
6
|
+
import type { VoiceRecordingProps } from './VoiceRecording';
|
|
7
|
+
import type { CardProps } from './Card';
|
|
8
|
+
import type { FileAttachmentProps } from './FileAttachment';
|
|
9
|
+
import type { GalleryProps, ImageProps } from '../Gallery';
|
|
10
|
+
import type { UnsupportedAttachmentProps } from './UnsupportedAttachment';
|
|
11
|
+
import type { ActionHandlerReturnType } from '../Message/hooks/useActionHandler';
|
|
12
|
+
import type { DefaultStreamChatGenerics } from '../../types/types';
|
|
13
|
+
export declare const ATTACHMENT_GROUPS_ORDER: readonly ["card", "gallery", "image", "media", "audio", "voiceRecording", "file", "unsupported"];
|
|
14
|
+
export type AttachmentProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
|
|
15
|
+
/** The message attachments to render, see [attachment structure](https://getstream.io/chat/docs/javascript/message_format/?language=javascript) **/
|
|
16
|
+
attachments: StreamAttachment<StreamChatGenerics>[];
|
|
17
|
+
/** The handler function to call when an action is performed on an attachment, examples include canceling a \/giphy command or shuffling the results. */
|
|
18
|
+
actionHandler?: ActionHandlerReturnType;
|
|
19
|
+
/** Custom UI component for displaying attachment actions, defaults to and accepts same props as: [AttachmentActions](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/AttachmentActions.tsx) */
|
|
20
|
+
AttachmentActions?: React.ComponentType<AttachmentActionsProps<StreamChatGenerics>>;
|
|
21
|
+
/** Custom UI component for displaying an audio type attachment, defaults to and accepts same props as: [Audio](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Audio.tsx) */
|
|
22
|
+
Audio?: React.ComponentType<AudioProps<StreamChatGenerics>>;
|
|
23
|
+
/** Custom UI component for displaying a card type attachment, defaults to and accepts same props as: [Card](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/Card.tsx) */
|
|
24
|
+
Card?: React.ComponentType<CardProps>;
|
|
25
|
+
/** Custom UI component for displaying a file type attachment, defaults to and accepts same props as: [File](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/FileAttachment.tsx) */
|
|
26
|
+
File?: React.ComponentType<FileAttachmentProps<StreamChatGenerics>>;
|
|
27
|
+
/** Custom UI component for displaying a gallery of image type attachments, defaults to and accepts same props as: [Gallery](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/Gallery.tsx) */
|
|
28
|
+
Gallery?: React.ComponentType<GalleryProps<StreamChatGenerics>>;
|
|
29
|
+
/** Custom UI component for displaying an image type attachment, defaults to and accepts same props as: [Image](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Gallery/Image.tsx) */
|
|
30
|
+
Image?: React.ComponentType<ImageProps>;
|
|
31
|
+
/** Optional flag to signal that an attachment is a displayed as a part of a quoted message */
|
|
32
|
+
isQuoted?: boolean;
|
|
33
|
+
/** Custom UI component for displaying a media type attachment, defaults to `ReactPlayer` from 'react-player' */
|
|
34
|
+
Media?: React.ComponentType<ReactPlayerProps>;
|
|
35
|
+
/** Custom UI component for displaying unsupported attachment types, defaults to NullComponent */
|
|
36
|
+
UnsupportedAttachment?: React.ComponentType<UnsupportedAttachmentProps>;
|
|
37
|
+
/** Custom UI component for displaying an audio recording attachment, defaults to and accepts same props as: [VoiceRecording](https://github.com/GetStream/stream-chat-react/blob/master/src/components/Attachment/VoiceRecording.tsx) */
|
|
38
|
+
VoiceRecording?: React.ComponentType<VoiceRecordingProps<StreamChatGenerics>>;
|
|
39
|
+
};
|
|
40
|
+
/**
|
|
41
|
+
* A component used for rendering message attachments. By default, the component supports: AttachmentActions, Audio, Card, File, Gallery, Image, and Video
|
|
42
|
+
*/
|
|
43
|
+
export declare const Attachment: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: AttachmentProps<StreamChatGenerics>) => React.JSX.Element;
|
|
@@ -0,0 +1,85 @@
|
|
|
1
|
+
import React, { useMemo } from 'react';
|
|
2
|
+
import { isAudioAttachment, isFileAttachment, isMediaAttachment, isScrapedContent, isUploadedImage, isVoiceRecordingAttachment, } from './utils';
|
|
3
|
+
import { AudioContainer, CardContainer, FileContainer, GalleryContainer, ImageContainer, MediaContainer, UnsupportedAttachmentContainer, VoiceRecordingContainer, } from './AttachmentContainer';
|
|
4
|
+
const CONTAINER_MAP = {
|
|
5
|
+
audio: AudioContainer,
|
|
6
|
+
card: CardContainer,
|
|
7
|
+
file: FileContainer,
|
|
8
|
+
media: MediaContainer,
|
|
9
|
+
unsupported: UnsupportedAttachmentContainer,
|
|
10
|
+
voiceRecording: VoiceRecordingContainer,
|
|
11
|
+
};
|
|
12
|
+
export const ATTACHMENT_GROUPS_ORDER = [
|
|
13
|
+
'card',
|
|
14
|
+
'gallery',
|
|
15
|
+
'image',
|
|
16
|
+
'media',
|
|
17
|
+
'audio',
|
|
18
|
+
'voiceRecording',
|
|
19
|
+
'file',
|
|
20
|
+
'unsupported',
|
|
21
|
+
];
|
|
22
|
+
/**
|
|
23
|
+
* A component used for rendering message attachments. By default, the component supports: AttachmentActions, Audio, Card, File, Gallery, Image, and Video
|
|
24
|
+
*/
|
|
25
|
+
export const Attachment = (props) => {
|
|
26
|
+
const { attachments } = props;
|
|
27
|
+
// eslint-disable-next-line react-hooks/exhaustive-deps
|
|
28
|
+
const groupedAttachments = useMemo(() => renderGroupedAttachments(props), [attachments]);
|
|
29
|
+
return (React.createElement("div", { className: 'str-chat__attachment-list' }, ATTACHMENT_GROUPS_ORDER.reduce((acc, groupName) => [...acc, ...groupedAttachments[groupName]], [])));
|
|
30
|
+
};
|
|
31
|
+
const renderGroupedAttachments = ({ attachments, ...rest }) => {
|
|
32
|
+
const uploadedImages = attachments.filter((attachment) => isUploadedImage(attachment));
|
|
33
|
+
const containers = attachments
|
|
34
|
+
.filter((attachment) => !isUploadedImage(attachment))
|
|
35
|
+
.reduce((typeMap, attachment) => {
|
|
36
|
+
const attachmentType = getAttachmentType(attachment);
|
|
37
|
+
const Container = CONTAINER_MAP[attachmentType];
|
|
38
|
+
typeMap[attachmentType].push(React.createElement(Container, { key: `${attachmentType}-${typeMap[attachmentType].length}`, ...rest, attachment: attachment }));
|
|
39
|
+
return typeMap;
|
|
40
|
+
}, {
|
|
41
|
+
audio: [],
|
|
42
|
+
card: [],
|
|
43
|
+
file: [],
|
|
44
|
+
media: [],
|
|
45
|
+
unsupported: [],
|
|
46
|
+
// not used in reduce
|
|
47
|
+
// eslint-disable-next-line sort-keys
|
|
48
|
+
image: [],
|
|
49
|
+
// eslint-disable-next-line sort-keys
|
|
50
|
+
gallery: [],
|
|
51
|
+
voiceRecording: [],
|
|
52
|
+
});
|
|
53
|
+
if (uploadedImages.length > 1) {
|
|
54
|
+
containers['gallery'] = [
|
|
55
|
+
React.createElement(GalleryContainer, { key: 'gallery-container', ...rest, attachment: {
|
|
56
|
+
images: uploadedImages,
|
|
57
|
+
type: 'gallery',
|
|
58
|
+
} }),
|
|
59
|
+
];
|
|
60
|
+
}
|
|
61
|
+
else if (uploadedImages.length === 1) {
|
|
62
|
+
containers['image'] = [
|
|
63
|
+
React.createElement(ImageContainer, { key: 'image-container', ...rest, attachment: uploadedImages[0] }),
|
|
64
|
+
];
|
|
65
|
+
}
|
|
66
|
+
return containers;
|
|
67
|
+
};
|
|
68
|
+
const getAttachmentType = (attachment) => {
|
|
69
|
+
if (isScrapedContent(attachment)) {
|
|
70
|
+
return 'card';
|
|
71
|
+
}
|
|
72
|
+
else if (isMediaAttachment(attachment)) {
|
|
73
|
+
return 'media';
|
|
74
|
+
}
|
|
75
|
+
else if (isAudioAttachment(attachment)) {
|
|
76
|
+
return 'audio';
|
|
77
|
+
}
|
|
78
|
+
else if (isVoiceRecordingAttachment(attachment)) {
|
|
79
|
+
return 'voiceRecording';
|
|
80
|
+
}
|
|
81
|
+
else if (isFileAttachment(attachment)) {
|
|
82
|
+
return 'file';
|
|
83
|
+
}
|
|
84
|
+
return 'unsupported';
|
|
85
|
+
};
|