stream-chat-react 14.11.1 → 15.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/ListItemLayout.60c3b287.js +2181 -0
- package/dist/cjs/ListItemLayout.60c3b287.js.map +1 -0
- package/dist/cjs/{ReactPlayerWrapper.a94a0cd1.js → ReactPlayerWrapper.f04b1d06.js} +5 -5
- package/dist/cjs/{ReactPlayerWrapper.a94a0cd1.js.map → ReactPlayerWrapper.f04b1d06.js.map} +1 -1
- package/dist/cjs/SlotLayout.de45be2d.js +1672 -0
- package/dist/cjs/SlotLayout.de45be2d.js.map +1 -0
- package/dist/cjs/Thread.373af587.js +7479 -0
- package/dist/cjs/Thread.373af587.js.map +1 -0
- package/dist/cjs/channel-detail.js +409 -389
- package/dist/cjs/channel-detail.js.map +1 -1
- package/dist/cjs/emojis.js +18 -16
- package/dist/cjs/emojis.js.map +1 -1
- package/dist/cjs/index.js +14474 -20038
- package/dist/cjs/index.js.map +1 -1
- package/dist/cjs/slot-geometry.js +145 -0
- package/dist/cjs/slot-geometry.js.map +1 -0
- package/dist/cjs/slot-layout.js +37 -0
- package/dist/cjs/useChannel.1004ed4c.js +18 -0
- package/dist/cjs/useChannel.1004ed4c.js.map +1 -0
- package/dist/cjs/useComponentContextIcons.d16834d9.js +1729 -0
- package/dist/cjs/useComponentContextIcons.d16834d9.js.map +1 -0
- package/dist/cjs/useIsCooldownActive.1f778bc1.js +110 -0
- package/dist/cjs/useIsCooldownActive.1f778bc1.js.map +1 -0
- package/dist/css/channel-detail.css.map +1 -1
- package/dist/css/index.css +228 -64
- package/dist/css/index.css.map +1 -1
- package/dist/es/_virtual/_rolldown/runtime.mjs +13 -0
- package/dist/es/a11y/a11yUtils.mjs +42 -0
- package/dist/es/a11y/a11yUtils.mjs.map +1 -0
- package/dist/es/a11y/accessibleLabel.mjs +31 -0
- package/dist/es/a11y/accessibleLabel.mjs.map +1 -0
- package/dist/es/a11y/hooks/useAriaIdentifiers.mjs +25 -0
- package/dist/es/a11y/hooks/useAriaIdentifiers.mjs.map +1 -0
- package/dist/es/a11y/hooks/useListboxKeyboardNavigation.mjs +85 -0
- package/dist/es/a11y/hooks/useListboxKeyboardNavigation.mjs.map +1 -0
- package/dist/es/a11y/hooks/useResolvedModalAriaProps.mjs +32 -0
- package/dist/es/a11y/hooks/useResolvedModalAriaProps.mjs.map +1 -0
- package/dist/es/a11y/hooks/useVirtualizedListboxKeyboardNavigation.mjs +68 -0
- package/dist/es/a11y/hooks/useVirtualizedListboxKeyboardNavigation.mjs.map +1 -0
- package/dist/es/channel-detail.mjs +29 -3020
- package/dist/es/components/AIStateIndicator/AIStateIndicator.mjs +27 -0
- package/dist/es/components/AIStateIndicator/AIStateIndicator.mjs.map +1 -0
- package/dist/es/components/AIStateIndicator/hooks/useAIState.mjs +20 -0
- package/dist/es/components/AIStateIndicator/hooks/useAIState.mjs.map +1 -0
- package/dist/es/components/Accessibility/AriaLiveAnnouncerProvider.mjs +144 -0
- package/dist/es/components/Accessibility/AriaLiveAnnouncerProvider.mjs.map +1 -0
- package/dist/es/components/Accessibility/AriaLiveOutlet.mjs +58 -0
- package/dist/es/components/Accessibility/AriaLiveOutlet.mjs.map +1 -0
- package/dist/es/components/Accessibility/AriaLiveOutletContext.mjs +8 -0
- package/dist/es/components/Accessibility/AriaLiveOutletContext.mjs.map +1 -0
- package/dist/es/components/Accessibility/NotificationAnnouncer.mjs +86 -0
- package/dist/es/components/Accessibility/NotificationAnnouncer.mjs.map +1 -0
- package/dist/es/components/Accessibility/hooks/useAudioPlaybackChangeAnnouncements.mjs +20 -0
- package/dist/es/components/Accessibility/hooks/useAudioPlaybackChangeAnnouncements.mjs.map +1 -0
- package/dist/es/components/Accessibility/hooks/useFocusReturn.mjs +37 -0
- package/dist/es/components/Accessibility/hooks/useFocusReturn.mjs.map +1 -0
- package/dist/es/components/Accessibility/hooks/useIncomingMessageAnnouncements.mjs +89 -0
- package/dist/es/components/Accessibility/hooks/useIncomingMessageAnnouncements.mjs.map +1 -0
- package/dist/es/components/Accessibility/hooks/useInertWhenHidden.mjs +85 -0
- package/dist/es/components/Accessibility/hooks/useInertWhenHidden.mjs.map +1 -0
- package/dist/es/components/Accessibility/hooks/useInteractionAnnouncements.mjs +165 -0
- package/dist/es/components/Accessibility/hooks/useInteractionAnnouncements.mjs.map +1 -0
- package/dist/es/components/Accessibility/scheduling/useAnnouncementQueue.mjs +43 -0
- package/dist/es/components/Accessibility/scheduling/useAnnouncementQueue.mjs.map +1 -0
- package/dist/es/components/Accessibility/scheduling/useDebouncedAnnounce.mjs +78 -0
- package/dist/es/components/Accessibility/scheduling/useDebouncedAnnounce.mjs.map +1 -0
- package/dist/es/components/Accessibility/scheduling/useSettledAnnouncement.mjs +90 -0
- package/dist/es/components/Accessibility/scheduling/useSettledAnnouncement.mjs.map +1 -0
- package/dist/es/components/Accessibility/useAriaLiveAnnouncer.mjs +13 -0
- package/dist/es/components/Accessibility/useAriaLiveAnnouncer.mjs.map +1 -0
- package/dist/es/components/Attachment/Attachment.mjs +89 -0
- package/dist/es/components/Attachment/Attachment.mjs.map +1 -0
- package/dist/es/components/Attachment/AttachmentActions.mjs +110 -0
- package/dist/es/components/Attachment/AttachmentActions.mjs.map +1 -0
- package/dist/es/components/Attachment/AttachmentContainer.mjs +269 -0
- package/dist/es/components/Attachment/AttachmentContainer.mjs.map +1 -0
- package/dist/es/components/Attachment/Audio.mjs +109 -0
- package/dist/es/components/Attachment/Audio.mjs.map +1 -0
- package/dist/es/components/Attachment/FileAttachment.mjs +46 -0
- package/dist/es/components/Attachment/FileAttachment.mjs.map +1 -0
- package/dist/es/components/Attachment/Geolocation.mjs +89 -0
- package/dist/es/components/Attachment/Geolocation.mjs.map +1 -0
- package/dist/es/components/Attachment/Giphy.mjs +62 -0
- package/dist/es/components/Attachment/Giphy.mjs.map +1 -0
- package/dist/es/components/Attachment/Image.mjs +19 -0
- package/dist/es/components/Attachment/Image.mjs.map +1 -0
- package/dist/es/components/Attachment/LinkPreview/Card.mjs +93 -0
- package/dist/es/components/Attachment/LinkPreview/Card.mjs.map +1 -0
- package/dist/es/components/Attachment/LinkPreview/UnableToRenderCard.mjs +22 -0
- package/dist/es/components/Attachment/LinkPreview/UnableToRenderCard.mjs.map +1 -0
- package/dist/es/components/Attachment/ModalGallery.mjs +178 -0
- package/dist/es/components/Attachment/ModalGallery.mjs.map +1 -0
- package/dist/es/components/Attachment/UnsupportedAttachment.mjs +25 -0
- package/dist/es/components/Attachment/UnsupportedAttachment.mjs.map +1 -0
- package/dist/es/components/Attachment/VideoAttachment.mjs +56 -0
- package/dist/es/components/Attachment/VideoAttachment.mjs.map +1 -0
- package/dist/es/components/Attachment/VisibilityDisclaimer.mjs +17 -0
- package/dist/es/components/Attachment/VisibilityDisclaimer.mjs.map +1 -0
- package/dist/es/components/Attachment/VoiceRecording.mjs +139 -0
- package/dist/es/components/Attachment/VoiceRecording.mjs.map +1 -0
- package/dist/es/components/Attachment/attachment-sizing.mjs +73 -0
- package/dist/es/components/Attachment/attachment-sizing.mjs.map +1 -0
- package/dist/es/components/Attachment/audioSampling.mjs +74 -0
- package/dist/es/components/Attachment/audioSampling.mjs.map +1 -0
- package/dist/es/components/Attachment/components/AttachmentUploadProgressIndicator.mjs +38 -0
- package/dist/es/components/Attachment/components/AttachmentUploadProgressIndicator.mjs.map +1 -0
- package/dist/es/components/Attachment/components/DownloadButton.mjs +35 -0
- package/dist/es/components/Attachment/components/DownloadButton.mjs.map +1 -0
- package/dist/es/components/Attachment/components/FileSizeIndicator.mjs +17 -0
- package/dist/es/components/Attachment/components/FileSizeIndicator.mjs.map +1 -0
- package/dist/es/components/Attachment/giphyAccessibility.mjs +15 -0
- package/dist/es/components/Attachment/giphyAccessibility.mjs.map +1 -0
- package/dist/es/components/Attachment/hooks/useAttachmentUploadState.mjs +80 -0
- package/dist/es/components/Attachment/hooks/useAttachmentUploadState.mjs.map +1 -0
- package/dist/es/components/Attachment/hooks/useLocalVideoDimensions.mjs +79 -0
- package/dist/es/components/Attachment/hooks/useLocalVideoDimensions.mjs.map +1 -0
- package/dist/es/components/Attachment/icons.mjs +13 -0
- package/dist/es/components/Attachment/icons.mjs.map +1 -0
- package/dist/es/components/Attachment/utils.mjs +41 -0
- package/dist/es/components/Attachment/utils.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/AudioPlaybackArbiter.mjs +57 -0
- package/dist/es/components/AudioPlayback/AudioPlaybackArbiter.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/AudioPlayer.mjs +472 -0
- package/dist/es/components/AudioPlayback/AudioPlayer.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/AudioPlayerPool.mjs +73 -0
- package/dist/es/components/AudioPlayback/AudioPlayerPool.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/WithAudioPlayback.mjs +86 -0
- package/dist/es/components/AudioPlayback/WithAudioPlayback.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/components/DurationDisplay.mjs +33 -0
- package/dist/es/components/AudioPlayback/components/DurationDisplay.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/components/PlaybackRateButton.mjs +15 -0
- package/dist/es/components/AudioPlayback/components/PlaybackRateButton.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/components/ProgressBar.mjs +56 -0
- package/dist/es/components/AudioPlayback/components/ProgressBar.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/components/WaveProgressBar.mjs +107 -0
- package/dist/es/components/AudioPlayback/components/WaveProgressBar.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/components/formatTime.mjs +14 -0
- package/dist/es/components/AudioPlayback/components/formatTime.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/components/keyboardSeek.mjs +36 -0
- package/dist/es/components/AudioPlayback/components/keyboardSeek.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/components/progressBarA11y.mjs +19 -0
- package/dist/es/components/AudioPlayback/components/progressBarA11y.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/components/useInteractiveProgressBar.mjs +77 -0
- package/dist/es/components/AudioPlayback/components/useInteractiveProgressBar.mjs.map +1 -0
- package/dist/es/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.mjs +33 -0
- package/dist/es/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.mjs.map +1 -0
- package/dist/es/components/Avatar/Avatar.mjs +62 -0
- package/dist/es/components/Avatar/Avatar.mjs.map +1 -0
- package/dist/es/components/Avatar/AvatarStack.mjs +32 -0
- package/dist/es/components/Avatar/AvatarStack.mjs.map +1 -0
- package/dist/es/components/Avatar/ChannelAvatar.mjs +25 -0
- package/dist/es/components/Avatar/ChannelAvatar.mjs.map +1 -0
- package/dist/es/components/Avatar/GroupAvatar.mjs +53 -0
- package/dist/es/components/Avatar/GroupAvatar.mjs.map +1 -0
- package/dist/es/components/Avatar/utils.mjs +10 -0
- package/dist/es/components/Avatar/utils.mjs.map +1 -0
- package/dist/es/components/Badge/Badge.mjs +28 -0
- package/dist/es/components/Badge/Badge.mjs.map +1 -0
- package/dist/es/components/Badge/MediaBadge.mjs +21 -0
- package/dist/es/components/Badge/MediaBadge.mjs.map +1 -0
- package/dist/es/components/BaseImage/BaseImage.mjs +35 -0
- package/dist/es/components/BaseImage/BaseImage.mjs.map +1 -0
- package/dist/es/components/BaseImage/ImagePlaceholder.mjs +21 -0
- package/dist/es/components/BaseImage/ImagePlaceholder.mjs.map +1 -0
- package/dist/es/components/BaseImage/toBaseImageDescriptors.mjs +57 -0
- package/dist/es/components/BaseImage/toBaseImageDescriptors.mjs.map +1 -0
- package/dist/es/components/Button/Button.mjs +36 -0
- package/dist/es/components/Button/Button.mjs.map +1 -0
- package/dist/es/components/Button/PlayButton.mjs +26 -0
- package/dist/es/components/Button/PlayButton.mjs.map +1 -0
- package/dist/es/components/Button/WorkspaceNavigationButtons.mjs +94 -0
- package/dist/es/components/Button/WorkspaceNavigationButtons.mjs.map +1 -0
- package/dist/es/components/Channel/Channel.mjs +66 -0
- package/dist/es/components/Channel/Channel.mjs.map +1 -0
- package/dist/es/components/Channel/constants.mjs +6 -0
- package/dist/es/components/Channel/constants.mjs.map +1 -0
- package/dist/es/components/Channel/hooks/useChannelCapabilities.mjs +21 -0
- package/dist/es/components/Channel/hooks/useChannelCapabilities.mjs.map +1 -0
- package/dist/es/components/Channel/hooks/useChannelContainerClasses.mjs +20 -0
- package/dist/es/components/Channel/hooks/useChannelContainerClasses.mjs.map +1 -0
- package/dist/es/components/ChannelHeader/ChannelHeader.mjs +71 -0
- package/dist/es/components/ChannelHeader/ChannelHeader.mjs.map +1 -0
- package/dist/es/components/ChannelHeader/hooks/useChannelHasMembersOnline.mjs +26 -0
- package/dist/es/components/ChannelHeader/hooks/useChannelHasMembersOnline.mjs.map +1 -0
- package/dist/es/components/ChannelHeader/hooks/useChannelHeaderOnlineStatus.mjs +31 -0
- package/dist/es/components/ChannelHeader/hooks/useChannelHeaderOnlineStatus.mjs.map +1 -0
- package/dist/es/components/ChannelList/ChannelList.mjs +72 -0
- package/dist/es/components/ChannelList/ChannelList.mjs.map +1 -0
- package/dist/es/components/ChannelList/ChannelListHeader.mjs +22 -0
- package/dist/es/components/ChannelList/ChannelListHeader.mjs.map +1 -0
- package/dist/es/components/ChannelList/ChannelLists.mjs +31 -0
- package/dist/es/components/ChannelList/ChannelLists.mjs.map +1 -0
- package/dist/es/components/ChannelList/ChannelNavigation.mjs +36 -0
- package/dist/es/components/ChannelList/ChannelNavigation.mjs.map +1 -0
- package/dist/es/components/ChannelList/hooks/useChannelListKeyboardNavigation.mjs +82 -0
- package/dist/es/components/ChannelList/hooks/useChannelListKeyboardNavigation.mjs.map +1 -0
- package/dist/es/components/ChannelList/hooks/useChannelMembersState.mjs +23 -0
- package/dist/es/components/ChannelList/hooks/useChannelMembersState.mjs.map +1 -0
- package/dist/es/components/ChannelList/hooks/useChannelMembershipState.mjs +15 -0
- package/dist/es/components/ChannelList/hooks/useChannelMembershipState.mjs.map +1 -0
- package/dist/es/components/ChannelList/hooks/useChannelPaginatorState.mjs +21 -0
- package/dist/es/components/ChannelList/hooks/useChannelPaginatorState.mjs.map +1 -0
- package/dist/es/components/ChannelList/hooks/useSelectedChannelState.mjs +24 -0
- package/dist/es/components/ChannelList/hooks/useSelectedChannelState.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/ChannelListItem.mjs +65 -0
- package/dist/es/components/ChannelListItem/ChannelListItem.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.defaults.mjs +432 -0
- package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.defaults.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.mjs +67 -0
- package/dist/es/components/ChannelListItem/ChannelListItemActionButtons.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/ChannelListItemTimestamp.mjs +31 -0
- package/dist/es/components/ChannelListItem/ChannelListItemTimestamp.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/ChannelListItemUI.mjs +120 -0
- package/dist/es/components/ChannelListItem/ChannelListItemUI.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/hooks/useChannelDisplayName.mjs +56 -0
- package/dist/es/components/ChannelListItem/hooks/useChannelDisplayName.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/hooks/useChannelPreviewInfo.mjs +51 -0
- package/dist/es/components/ChannelListItem/hooks/useChannelPreviewInfo.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/hooks/useIsChannelMuted.mjs +15 -0
- package/dist/es/components/ChannelListItem/hooks/useIsChannelMuted.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/hooks/useIsUserMuted.mjs +11 -0
- package/dist/es/components/ChannelListItem/hooks/useIsUserMuted.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/hooks/useMessageDeliveryStatus.mjs +36 -0
- package/dist/es/components/ChannelListItem/hooks/useMessageDeliveryStatus.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/utils.a11y.mjs +135 -0
- package/dist/es/components/ChannelListItem/utils.a11y.mjs.map +1 -0
- package/dist/es/components/ChannelListItem/utils.mjs +196 -0
- package/dist/es/components/ChannelListItem/utils.mjs.map +1 -0
- package/dist/es/components/Chat/Chat.mjs +89 -0
- package/dist/es/components/Chat/Chat.mjs.map +1 -0
- package/dist/es/components/Chat/hooks/useChat.mjs +44 -0
- package/dist/es/components/Chat/hooks/useChat.mjs.map +1 -0
- package/dist/es/components/Chat/hooks/useCreateChatClient.mjs +36 -0
- package/dist/es/components/Chat/hooks/useCreateChatClient.mjs.map +1 -0
- package/dist/es/components/Chat/hooks/useCreateChatContext.mjs +30 -0
- package/dist/es/components/Chat/hooks/useCreateChatContext.mjs.map +1 -0
- package/dist/es/components/Chat/hooks/useNetworkConnectionState.mjs +46 -0
- package/dist/es/components/Chat/hooks/useNetworkConnectionState.mjs.map +1 -0
- package/dist/es/components/Chat/hooks/useReportLostConnectionSystemNotification.mjs +139 -0
- package/dist/es/components/Chat/hooks/useReportLostConnectionSystemNotification.mjs.map +1 -0
- package/dist/es/components/Chat/hooks/useSplitActionSet.mjs +21 -0
- package/dist/es/components/Chat/hooks/useSplitActionSet.mjs.map +1 -0
- package/dist/es/components/Chat/hooks/useWSConnectionState.mjs +31 -0
- package/dist/es/components/Chat/hooks/useWSConnectionState.mjs.map +1 -0
- package/dist/es/components/DateSeparator/DateSeparator.mjs +36 -0
- package/dist/es/components/DateSeparator/DateSeparator.mjs.map +1 -0
- package/dist/es/components/Dialog/components/Alert.mjs +53 -0
- package/dist/es/components/Dialog/components/Alert.mjs.map +1 -0
- package/dist/es/components/Dialog/components/Callout.mjs +57 -0
- package/dist/es/components/Dialog/components/Callout.mjs.map +1 -0
- package/dist/es/components/Dialog/components/ContextMenu.mjs +551 -0
- package/dist/es/components/Dialog/components/ContextMenu.mjs.map +1 -0
- package/dist/es/components/Dialog/components/Prompt.mjs +112 -0
- package/dist/es/components/Dialog/components/Prompt.mjs.map +1 -0
- package/dist/es/components/Dialog/components/Viewer.mjs +100 -0
- package/dist/es/components/Dialog/components/Viewer.mjs.map +1 -0
- package/dist/es/components/Dialog/hooks/useDialog.mjs +53 -0
- package/dist/es/components/Dialog/hooks/useDialog.mjs.map +1 -0
- package/dist/es/components/Dialog/hooks/usePopoverPosition.mjs +57 -0
- package/dist/es/components/Dialog/hooks/usePopoverPosition.mjs.map +1 -0
- package/dist/es/components/Dialog/service/DialogAnchor.mjs +175 -0
- package/dist/es/components/Dialog/service/DialogAnchor.mjs.map +1 -0
- package/dist/es/components/Dialog/service/DialogManager.mjs +172 -0
- package/dist/es/components/Dialog/service/DialogManager.mjs.map +1 -0
- package/dist/es/components/Dialog/service/DialogPortal.mjs +63 -0
- package/dist/es/components/Dialog/service/DialogPortal.mjs.map +1 -0
- package/dist/es/components/DragAndDrop/DragAndDropContainer.mjs +90 -0
- package/dist/es/components/DragAndDrop/DragAndDropContainer.mjs.map +1 -0
- package/dist/es/components/EmptyStateIndicator/EmptyStateIndicator.mjs +39 -0
- package/dist/es/components/EmptyStateIndicator/EmptyStateIndicator.mjs.map +1 -0
- package/dist/es/components/EventComponent/EventComponent.mjs +27 -0
- package/dist/es/components/EventComponent/EventComponent.mjs.map +1 -0
- package/dist/es/components/FileIcon/FileIcon.mjs +43 -0
- package/dist/es/components/FileIcon/FileIcon.mjs.map +1 -0
- package/dist/es/components/FileIcon/FileIconSet.mjs +407 -0
- package/dist/es/components/FileIcon/FileIconSet.mjs.map +1 -0
- package/dist/es/components/FileIcon/iconMap.mjs +41 -0
- package/dist/es/components/FileIcon/iconMap.mjs.map +1 -0
- package/dist/es/components/FileIcon/mimeTypes.mjs +242 -0
- package/dist/es/components/FileIcon/mimeTypes.mjs.map +1 -0
- package/dist/es/components/Form/Checkbox.mjs +15 -0
- package/dist/es/components/Form/Checkbox.mjs.map +1 -0
- package/dist/es/components/Form/Dropdown.mjs +135 -0
- package/dist/es/components/Form/Dropdown.mjs.map +1 -0
- package/dist/es/components/Form/FieldError.mjs +13 -0
- package/dist/es/components/Form/FieldError.mjs.map +1 -0
- package/dist/es/components/Form/NumericInput.mjs +126 -0
- package/dist/es/components/Form/NumericInput.mjs.map +1 -0
- package/dist/es/components/Form/SwitchField.mjs +103 -0
- package/dist/es/components/Form/SwitchField.mjs.map +1 -0
- package/dist/es/components/Form/TextInput.mjs +113 -0
- package/dist/es/components/Form/TextInput.mjs.map +1 -0
- package/dist/es/components/Form/TextInputFieldSet.mjs +21 -0
- package/dist/es/components/Form/TextInputFieldSet.mjs.map +1 -0
- package/dist/es/components/Form/hooks/useFormState.mjs +54 -0
- package/dist/es/components/Form/hooks/useFormState.mjs.map +1 -0
- package/dist/es/components/Gallery/Gallery.mjs +60 -0
- package/dist/es/components/Gallery/Gallery.mjs.map +1 -0
- package/dist/es/components/Gallery/GalleryContext.mjs +15 -0
- package/dist/es/components/Gallery/GalleryContext.mjs.map +1 -0
- package/dist/es/components/Gallery/GalleryHeader.mjs +92 -0
- package/dist/es/components/Gallery/GalleryHeader.mjs.map +1 -0
- package/dist/es/components/Gallery/GalleryUI.mjs +206 -0
- package/dist/es/components/Gallery/GalleryUI.mjs.map +1 -0
- package/dist/es/components/Icons/BaseIcon.mjs +20 -0
- package/dist/es/components/Icons/BaseIcon.mjs.map +1 -0
- package/dist/es/components/Icons/createIcon.mjs +23 -0
- package/dist/es/components/Icons/createIcon.mjs.map +1 -0
- package/dist/es/components/Icons/icons.mjs +802 -0
- package/dist/es/components/Icons/icons.mjs.map +1 -0
- package/dist/es/components/InfiniteScrollPaginator/InfiniteScroll.mjs +81 -0
- package/dist/es/components/InfiniteScrollPaginator/InfiniteScroll.mjs.map +1 -0
- package/dist/es/components/InfiniteScrollPaginator/InfiniteScrollPaginator.mjs +75 -0
- package/dist/es/components/InfiniteScrollPaginator/InfiniteScrollPaginator.mjs.map +1 -0
- package/dist/es/components/InfiniteScrollPaginator/InfiniteScrollWithComponents.mjs +43 -0
- package/dist/es/components/InfiniteScrollPaginator/InfiniteScrollWithComponents.mjs.map +1 -0
- package/dist/es/components/InfiniteScrollPaginator/hooks/useCursorPaginator.mjs +47 -0
- package/dist/es/components/InfiniteScrollPaginator/hooks/useCursorPaginator.mjs.map +1 -0
- package/dist/es/components/ListItemLayout/ListItemLayout.mjs +62 -0
- package/dist/es/components/ListItemLayout/ListItemLayout.mjs.map +1 -0
- package/dist/es/components/LoadMore/LoadMoreButton.mjs +28 -0
- package/dist/es/components/LoadMore/LoadMoreButton.mjs.map +1 -0
- package/dist/es/components/LoadMore/LoadMorePaginator.mjs +20 -0
- package/dist/es/components/LoadMore/LoadMorePaginator.mjs.map +1 -0
- package/dist/es/components/Loading/AttachmentUploadedSizeIndicator.mjs +24 -0
- package/dist/es/components/Loading/AttachmentUploadedSizeIndicator.mjs.map +1 -0
- package/dist/es/components/Loading/LoadingChannel.mjs +59 -0
- package/dist/es/components/Loading/LoadingChannel.mjs.map +1 -0
- package/dist/es/components/Loading/LoadingChannels.mjs +28 -0
- package/dist/es/components/Loading/LoadingChannels.mjs.map +1 -0
- package/dist/es/components/Loading/LoadingErrorIndicator.mjs +17 -0
- package/dist/es/components/Loading/LoadingErrorIndicator.mjs.map +1 -0
- package/dist/es/components/Loading/LoadingIndicator.mjs +15 -0
- package/dist/es/components/Loading/LoadingIndicator.mjs.map +1 -0
- package/dist/es/components/Loading/UploadProgressIndicator.mjs +15 -0
- package/dist/es/components/Loading/UploadProgressIndicator.mjs.map +1 -0
- package/dist/es/components/Loading/UploadedSizeIndicator.mjs +22 -0
- package/dist/es/components/Loading/UploadedSizeIndicator.mjs.map +1 -0
- package/dist/es/components/Loading/progress-indicators.mjs +50 -0
- package/dist/es/components/Loading/progress-indicators.mjs.map +1 -0
- package/dist/es/components/Location/ShareLocationDialog.mjs +206 -0
- package/dist/es/components/Location/ShareLocationDialog.mjs.map +1 -0
- package/dist/es/components/Location/hooks/useLiveLocationSharingManager.mjs +58 -0
- package/dist/es/components/Location/hooks/useLiveLocationSharingManager.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorder.mjs +32 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorder.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorderRecordingControls.mjs +77 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecorderRecordingControls.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification.mjs +58 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPlayback.mjs +71 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPlayback.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.mjs +65 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/RecordingTimer.mjs +13 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/RecordingTimer.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/hooks/useTimeElapsed.mjs +40 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/hooks/useTimeElapsed.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/recordingStateIdentity.mjs +8 -0
- package/dist/es/components/MediaRecorder/AudioRecorder/recordingStateIdentity.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/RecordingPermissionDeniedNotification.mjs +31 -0
- package/dist/es/components/MediaRecorder/RecordingPermissionDeniedNotification.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/classes/AmplitudeRecorder.mjs +81 -0
- package/dist/es/components/MediaRecorder/classes/AmplitudeRecorder.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/classes/BrowserPermission.mjs +63 -0
- package/dist/es/components/MediaRecorder/classes/BrowserPermission.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/classes/MediaRecorderController.mjs +251 -0
- package/dist/es/components/MediaRecorder/classes/MediaRecorderController.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/hooks/useMediaRecorder.mjs +75 -0
- package/dist/es/components/MediaRecorder/hooks/useMediaRecorder.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/observable/BehaviorSubject.mjs +28 -0
- package/dist/es/components/MediaRecorder/observable/BehaviorSubject.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/observable/Observable.mjs +24 -0
- package/dist/es/components/MediaRecorder/observable/Observable.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/observable/Observer.mjs +8 -0
- package/dist/es/components/MediaRecorder/observable/Observer.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/observable/Subject.mjs +55 -0
- package/dist/es/components/MediaRecorder/observable/Subject.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/observable/Subscription.mjs +16 -0
- package/dist/es/components/MediaRecorder/observable/Subscription.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/transcode/audioProcessing.mjs +34 -0
- package/dist/es/components/MediaRecorder/transcode/audioProcessing.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/transcode/index.mjs +12 -0
- package/dist/es/components/MediaRecorder/transcode/index.mjs.map +1 -0
- package/dist/es/components/MediaRecorder/transcode/wav.mjs +99 -0
- package/dist/es/components/MediaRecorder/transcode/wav.mjs.map +1 -0
- package/dist/es/components/Message/Message.mjs +113 -0
- package/dist/es/components/Message/Message.mjs.map +1 -0
- package/dist/es/components/Message/MessageAlsoSentInChannelIndicator.mjs +35 -0
- package/dist/es/components/Message/MessageAlsoSentInChannelIndicator.mjs.map +1 -0
- package/dist/es/components/Message/MessageBlocked.mjs +27 -0
- package/dist/es/components/Message/MessageBlocked.mjs.map +1 -0
- package/dist/es/components/Message/MessageBubble.mjs +12 -0
- package/dist/es/components/Message/MessageBubble.mjs.map +1 -0
- package/dist/es/components/Message/MessageDeletedBubble.mjs +21 -0
- package/dist/es/components/Message/MessageDeletedBubble.mjs.map +1 -0
- package/dist/es/components/Message/MessageEditedIndicator.mjs +42 -0
- package/dist/es/components/Message/MessageEditedIndicator.mjs.map +1 -0
- package/dist/es/components/Message/MessageRepliesCountButton.mjs +71 -0
- package/dist/es/components/Message/MessageRepliesCountButton.mjs.map +1 -0
- package/dist/es/components/Message/MessageStatus.mjs +87 -0
- package/dist/es/components/Message/MessageStatus.mjs.map +1 -0
- package/dist/es/components/Message/MessageText.mjs +101 -0
- package/dist/es/components/Message/MessageText.mjs.map +1 -0
- package/dist/es/components/Message/MessageTimestamp.mjs +21 -0
- package/dist/es/components/Message/MessageTimestamp.mjs.map +1 -0
- package/dist/es/components/Message/MessageTranslationIndicator.mjs +53 -0
- package/dist/es/components/Message/MessageTranslationIndicator.mjs.map +1 -0
- package/dist/es/components/Message/MessageUI.mjs +186 -0
- package/dist/es/components/Message/MessageUI.mjs.map +1 -0
- package/dist/es/components/Message/PinIndicator.mjs +34 -0
- package/dist/es/components/Message/PinIndicator.mjs.map +1 -0
- package/dist/es/components/Message/QuotedMessage.mjs +26 -0
- package/dist/es/components/Message/QuotedMessage.mjs.map +1 -0
- package/dist/es/components/Message/ReminderNotification.mjs +58 -0
- package/dist/es/components/Message/ReminderNotification.mjs.map +1 -0
- package/dist/es/components/Message/StreamedMessageText.mjs +36 -0
- package/dist/es/components/Message/StreamedMessageText.mjs.map +1 -0
- package/dist/es/components/Message/Timestamp.mjs +41 -0
- package/dist/es/components/Message/Timestamp.mjs.map +1 -0
- package/dist/es/components/Message/emojiRegex.mjs +20 -0
- package/dist/es/components/Message/emojiRegex.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useActionHandler.mjs +31 -0
- package/dist/es/components/Message/hooks/useActionHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useDeleteHandler.mjs +40 -0
- package/dist/es/components/Message/hooks/useDeleteHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useFlagHandler.mjs +20 -0
- package/dist/es/components/Message/hooks/useFlagHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useMarkUnreadHandler.mjs +22 -0
- package/dist/es/components/Message/hooks/useMarkUnreadHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useMentionsHandler.mjs +20 -0
- package/dist/es/components/Message/hooks/useMentionsHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useMessageAlsoSentInChannelNavigation.mjs +72 -0
- package/dist/es/components/Message/hooks/useMessageAlsoSentInChannelNavigation.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useMessageReminder.mjs +14 -0
- package/dist/es/components/Message/hooks/useMessageReminder.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useMessageTextStreaming.mjs +48 -0
- package/dist/es/components/Message/hooks/useMessageTextStreaming.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useMuteHandler.mjs +41 -0
- package/dist/es/components/Message/hooks/useMuteHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useOpenThreadHandler.mjs +25 -0
- package/dist/es/components/Message/hooks/useOpenThreadHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/usePinHandler.mjs +50 -0
- package/dist/es/components/Message/hooks/usePinHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useReactionHandler.mjs +98 -0
- package/dist/es/components/Message/hooks/useReactionHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useReactionsFetcher.mjs +31 -0
- package/dist/es/components/Message/hooks/useReactionsFetcher.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useRetryHandler.mjs +15 -0
- package/dist/es/components/Message/hooks/useRetryHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useUserHandler.mjs +15 -0
- package/dist/es/components/Message/hooks/useUserHandler.mjs.map +1 -0
- package/dist/es/components/Message/hooks/useUserRole.mjs +51 -0
- package/dist/es/components/Message/hooks/useUserRole.mjs.map +1 -0
- package/dist/es/components/Message/renderText/componentRenderers/Anchor.mjs +20 -0
- package/dist/es/components/Message/renderText/componentRenderers/Anchor.mjs.map +1 -0
- package/dist/es/components/Message/renderText/componentRenderers/Emoji.mjs +12 -0
- package/dist/es/components/Message/renderText/componentRenderers/Emoji.mjs.map +1 -0
- package/dist/es/components/Message/renderText/componentRenderers/Mention.mjs +14 -0
- package/dist/es/components/Message/renderText/componentRenderers/Mention.mjs.map +1 -0
- package/dist/es/components/Message/renderText/regex.mjs +22 -0
- package/dist/es/components/Message/renderText/regex.mjs.map +1 -0
- package/dist/es/components/Message/renderText/rehypePlugins/emojiMarkdownPlugin.mjs +16 -0
- package/dist/es/components/Message/renderText/rehypePlugins/emojiMarkdownPlugin.mjs.map +1 -0
- package/dist/es/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.mjs +111 -0
- package/dist/es/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.mjs.map +1 -0
- package/dist/es/components/Message/renderText/remarkPlugins/htmlToTextPlugin.mjs +14 -0
- package/dist/es/components/Message/renderText/remarkPlugins/htmlToTextPlugin.mjs.map +1 -0
- package/dist/es/components/Message/renderText/remarkPlugins/imageToLink.mjs +33 -0
- package/dist/es/components/Message/renderText/remarkPlugins/imageToLink.mjs.map +1 -0
- package/dist/es/components/Message/renderText/remarkPlugins/keepLineBreaksPlugin.mjs +44 -0
- package/dist/es/components/Message/renderText/remarkPlugins/keepLineBreaksPlugin.mjs.map +1 -0
- package/dist/es/components/Message/renderText/remarkPlugins/plusPlusToEmphasis.mjs +68 -0
- package/dist/es/components/Message/renderText/remarkPlugins/plusPlusToEmphasis.mjs.map +1 -0
- package/dist/es/components/Message/renderText/remarkPlugins/remarkIgnoreMarkdown.mjs +19 -0
- package/dist/es/components/Message/renderText/remarkPlugins/remarkIgnoreMarkdown.mjs.map +1 -0
- package/dist/es/components/Message/renderText/renderText.mjs +131 -0
- package/dist/es/components/Message/renderText/renderText.mjs.map +1 -0
- package/dist/es/components/Message/utils.mjs +114 -0
- package/dist/es/components/Message/utils.mjs.map +1 -0
- package/dist/es/components/MessageActions/DeleteMessageAlert.mjs +43 -0
- package/dist/es/components/MessageActions/DeleteMessageAlert.mjs.map +1 -0
- package/dist/es/components/MessageActions/DownloadSubmenu.mjs +52 -0
- package/dist/es/components/MessageActions/DownloadSubmenu.mjs.map +1 -0
- package/dist/es/components/MessageActions/MessageActions.defaults.mjs +643 -0
- package/dist/es/components/MessageActions/MessageActions.defaults.mjs.map +1 -0
- package/dist/es/components/MessageActions/MessageActions.mjs +61 -0
- package/dist/es/components/MessageActions/MessageActions.mjs.map +1 -0
- package/dist/es/components/MessageActions/QuickMessageActionButton.mjs +20 -0
- package/dist/es/components/MessageActions/QuickMessageActionButton.mjs.map +1 -0
- package/dist/es/components/MessageActions/RemindMeSubmenu.mjs +71 -0
- package/dist/es/components/MessageActions/RemindMeSubmenu.mjs.map +1 -0
- package/dist/es/components/MessageActions/downloadUtils.mjs +65 -0
- package/dist/es/components/MessageActions/downloadUtils.mjs.map +1 -0
- package/dist/es/components/MessageActions/hooks/useBaseMessageActionSetFilter.mjs +67 -0
- package/dist/es/components/MessageActions/hooks/useBaseMessageActionSetFilter.mjs.map +1 -0
- package/dist/es/components/MessageBounce/MessageBounceModal.mjs +18 -0
- package/dist/es/components/MessageBounce/MessageBounceModal.mjs.map +1 -0
- package/dist/es/components/MessageBounce/MessageBouncePrompt.mjs +67 -0
- package/dist/es/components/MessageBounce/MessageBouncePrompt.mjs.map +1 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/AttachmentPreviewList.mjs +91 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/AttachmentPreviewList.mjs.map +1 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.mjs +131 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.mjs.map +1 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.mjs +82 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.mjs.map +1 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.mjs +53 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.mjs.map +1 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.mjs +96 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.mjs.map +1 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/UnsupportedAttachmentPreview.mjs +36 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/UnsupportedAttachmentPreview.mjs.map +1 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/VoiceRecordingPreviewSlot.mjs +29 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/VoiceRecordingPreviewSlot.mjs.map +1 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/utils/AttachmentPreviewRoot.mjs +53 -0
- package/dist/es/components/MessageComposer/AttachmentPreviewList/utils/AttachmentPreviewRoot.mjs.map +1 -0
- package/dist/es/components/MessageComposer/AttachmentSelector/AttachmentSelector.mjs +311 -0
- package/dist/es/components/MessageComposer/AttachmentSelector/AttachmentSelector.mjs.map +1 -0
- package/dist/es/components/MessageComposer/AttachmentSelector/CommandsMenu.mjs +99 -0
- package/dist/es/components/MessageComposer/AttachmentSelector/CommandsMenu.mjs.map +1 -0
- package/dist/es/components/MessageComposer/CommandChip.mjs +37 -0
- package/dist/es/components/MessageComposer/CommandChip.mjs.map +1 -0
- package/dist/es/components/MessageComposer/CooldownTimer.mjs +15 -0
- package/dist/es/components/MessageComposer/CooldownTimer.mjs.map +1 -0
- package/dist/es/components/MessageComposer/EditedMessagePreview.mjs +17 -0
- package/dist/es/components/MessageComposer/EditedMessagePreview.mjs.map +1 -0
- package/dist/es/components/MessageComposer/LinkPreviewList.mjs +78 -0
- package/dist/es/components/MessageComposer/LinkPreviewList.mjs.map +1 -0
- package/dist/es/components/MessageComposer/MessageComposer.mjs +61 -0
- package/dist/es/components/MessageComposer/MessageComposer.mjs.map +1 -0
- package/dist/es/components/MessageComposer/MessageComposerActions.mjs +75 -0
- package/dist/es/components/MessageComposer/MessageComposerActions.mjs.map +1 -0
- package/dist/es/components/MessageComposer/MessageComposerUI.mjs +100 -0
- package/dist/es/components/MessageComposer/MessageComposerUI.mjs.map +1 -0
- package/dist/es/components/MessageComposer/QuotedMessageIndicator.mjs +9 -0
- package/dist/es/components/MessageComposer/QuotedMessageIndicator.mjs.map +1 -0
- package/dist/es/components/MessageComposer/QuotedMessagePreview.mjs +325 -0
- package/dist/es/components/MessageComposer/QuotedMessagePreview.mjs.map +1 -0
- package/dist/es/components/MessageComposer/RemoveAttachmentPreviewButton.mjs +25 -0
- package/dist/es/components/MessageComposer/RemoveAttachmentPreviewButton.mjs.map +1 -0
- package/dist/es/components/MessageComposer/SendButton.mjs +29 -0
- package/dist/es/components/MessageComposer/SendButton.mjs.map +1 -0
- package/dist/es/components/MessageComposer/SendToChannelCheckbox.mjs +51 -0
- package/dist/es/components/MessageComposer/SendToChannelCheckbox.mjs.map +1 -0
- package/dist/es/components/MessageComposer/StopAIGenerationButton.mjs +18 -0
- package/dist/es/components/MessageComposer/StopAIGenerationButton.mjs.map +1 -0
- package/dist/es/components/MessageComposer/WithDragAndDropUpload.mjs +105 -0
- package/dist/es/components/MessageComposer/WithDragAndDropUpload.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useAttachmentManagerState.mjs +37 -0
- package/dist/es/components/MessageComposer/hooks/useAttachmentManagerState.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useAttachmentsForPreview.mjs +21 -0
- package/dist/es/components/MessageComposer/hooks/useAttachmentsForPreview.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useCanCreatePoll.mjs +15 -0
- package/dist/es/components/MessageComposer/hooks/useCanCreatePoll.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useCooldownRemaining.mjs +18 -0
- package/dist/es/components/MessageComposer/hooks/useCooldownRemaining.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useCreateMessageComposerContext.mjs +33 -0
- package/dist/es/components/MessageComposer/hooks/useCreateMessageComposerContext.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useIsCooldownActive.mjs +11 -0
- package/dist/es/components/MessageComposer/hooks/useIsCooldownActive.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useMessageComposerBindings.mjs +23 -0
- package/dist/es/components/MessageComposer/hooks/useMessageComposerBindings.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useMessageComposerCommands.mjs +27 -0
- package/dist/es/components/MessageComposer/hooks/useMessageComposerCommands.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useMessageComposerController.mjs +30 -0
- package/dist/es/components/MessageComposer/hooks/useMessageComposerController.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useMessageComposerHasSendableData.mjs +13 -0
- package/dist/es/components/MessageComposer/hooks/useMessageComposerHasSendableData.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useMessageComposerSubmitFn.mjs +16 -0
- package/dist/es/components/MessageComposer/hooks/useMessageComposerSubmitFn.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useMessageContentIsEmpty.mjs +13 -0
- package/dist/es/components/MessageComposer/hooks/useMessageContentIsEmpty.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/usePasteHandler.mjs +34 -0
- package/dist/es/components/MessageComposer/hooks/usePasteHandler.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/useTextareaRef.mjs +14 -0
- package/dist/es/components/MessageComposer/hooks/useTextareaRef.mjs.map +1 -0
- package/dist/es/components/MessageComposer/hooks/utils.mjs +16 -0
- package/dist/es/components/MessageComposer/hooks/utils.mjs.map +1 -0
- package/dist/es/components/MessageComposer/icons.mjs +62 -0
- package/dist/es/components/MessageComposer/icons.mjs.map +1 -0
- package/dist/es/components/MessageComposer/preEditSnapshot.mjs +39 -0
- package/dist/es/components/MessageComposer/preEditSnapshot.mjs.map +1 -0
- package/dist/es/components/MessageList/FloatingDateSeparator.mjs +46 -0
- package/dist/es/components/MessageList/FloatingDateSeparator.mjs.map +1 -0
- package/dist/es/components/MessageList/GiphyPreviewMessage.mjs +15 -0
- package/dist/es/components/MessageList/GiphyPreviewMessage.mjs.map +1 -0
- package/dist/es/components/MessageList/MessageList.mjs +284 -0
- package/dist/es/components/MessageList/MessageList.mjs.map +1 -0
- package/dist/es/components/MessageList/MessageListMainPanel.mjs +12 -0
- package/dist/es/components/MessageList/MessageListMainPanel.mjs.map +1 -0
- package/dist/es/components/MessageList/NewMessageNotification.mjs +36 -0
- package/dist/es/components/MessageList/NewMessageNotification.mjs.map +1 -0
- package/dist/es/components/MessageList/ScrollToLatestMessageButton.mjs +83 -0
- package/dist/es/components/MessageList/ScrollToLatestMessageButton.mjs.map +1 -0
- package/dist/es/components/MessageList/UnreadMessagesNotification.mjs +49 -0
- package/dist/es/components/MessageList/UnreadMessagesNotification.mjs.map +1 -0
- package/dist/es/components/MessageList/UnreadMessagesSeparator.mjs +44 -0
- package/dist/es/components/MessageList/UnreadMessagesSeparator.mjs.map +1 -0
- package/dist/es/components/MessageList/VirtualizedMessageList.mjs +358 -0
- package/dist/es/components/MessageList/VirtualizedMessageList.mjs.map +1 -0
- package/dist/es/components/MessageList/VirtualizedMessageListComponents.mjs +93 -0
- package/dist/es/components/MessageList/VirtualizedMessageListComponents.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/MessageList/useEnrichedMessages.mjs +38 -0
- package/dist/es/components/MessageList/hooks/MessageList/useEnrichedMessages.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/MessageList/useFloatingDateSeparatorMessageList.mjs +74 -0
- package/dist/es/components/MessageList/hooks/MessageList/useFloatingDateSeparatorMessageList.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/MessageList/useMessageListElements.mjs +66 -0
- package/dist/es/components/MessageList/hooks/MessageList/useMessageListElements.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/MessageList/useMessageListScrollManager.mjs +143 -0
- package/dist/es/components/MessageList/hooks/MessageList/useMessageListScrollManager.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/MessageList/useScrollLocationLogic.mjs +100 -0
- package/dist/es/components/MessageList/hooks/MessageList/useScrollLocationLogic.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.mjs +86 -0
- package/dist/es/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useFloatingDateSeparator.mjs +70 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useFloatingDateSeparator.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.mjs +24 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useGiphyPreview.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useMessageSetKey.mjs +18 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useMessageSetKey.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.mjs +45 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.mjs +41 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/usePrependMessagesCount.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useScrollToBottomOnNewMessage.mjs +33 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useScrollToBottomOnNewMessage.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useShouldForceScrollToBottom.mjs +27 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useShouldForceScrollToBottom.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.mjs +48 -0
- package/dist/es/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/useCanPaginateReplies.mjs +47 -0
- package/dist/es/components/MessageList/hooks/useCanPaginateReplies.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/useLastDeliveredData.mjs +11 -0
- package/dist/es/components/MessageList/hooks/useLastDeliveredData.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/useLastOwnMessage.mjs +8 -0
- package/dist/es/components/MessageList/hooks/useLastOwnMessage.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/useLastReadData.mjs +11 -0
- package/dist/es/components/MessageList/hooks/useLastReadData.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/useMarkRead.mjs +105 -0
- package/dist/es/components/MessageList/hooks/useMarkRead.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/useReceiptsByMessageId.mjs +71 -0
- package/dist/es/components/MessageList/hooks/useReceiptsByMessageId.mjs.map +1 -0
- package/dist/es/components/MessageList/hooks/useThreadHead.mjs +26 -0
- package/dist/es/components/MessageList/hooks/useThreadHead.mjs.map +1 -0
- package/dist/es/components/MessageList/messageSourceKey.mjs +37 -0
- package/dist/es/components/MessageList/messageSourceKey.mjs.map +1 -0
- package/dist/es/components/MessageList/renderMessages.mjs +76 -0
- package/dist/es/components/MessageList/renderMessages.mjs.map +1 -0
- package/dist/es/components/MessageList/utils.mjs +162 -0
- package/dist/es/components/MessageList/utils.mjs.map +1 -0
- package/dist/es/components/Modal/GlobalModal.mjs +157 -0
- package/dist/es/components/Modal/GlobalModal.mjs.map +1 -0
- package/dist/es/components/Notifications/Notification.mjs +92 -0
- package/dist/es/components/Notifications/Notification.mjs.map +1 -0
- package/dist/es/components/Notifications/NotificationConfigurationContext.mjs +19 -0
- package/dist/es/components/Notifications/NotificationConfigurationContext.mjs.map +1 -0
- package/dist/es/components/Notifications/NotificationList.mjs +300 -0
- package/dist/es/components/Notifications/NotificationList.mjs.map +1 -0
- package/dist/es/components/Notifications/hooks/useNotificationApi.mjs +114 -0
- package/dist/es/components/Notifications/hooks/useNotificationApi.mjs.map +1 -0
- package/dist/es/components/Notifications/hooks/useNotificationTarget.mjs +21 -0
- package/dist/es/components/Notifications/hooks/useNotificationTarget.mjs.map +1 -0
- package/dist/es/components/Notifications/hooks/useNotifications.mjs +39 -0
- package/dist/es/components/Notifications/hooks/useNotifications.mjs.map +1 -0
- package/dist/es/components/Notifications/hooks/useSystemNotifications.mjs +22 -0
- package/dist/es/components/Notifications/hooks/useSystemNotifications.mjs.map +1 -0
- package/dist/es/components/Notifications/notificationTarget.mjs +53 -0
- package/dist/es/components/Notifications/notificationTarget.mjs.map +1 -0
- package/dist/es/components/Poll/Poll.mjs +18 -0
- package/dist/es/components/Poll/Poll.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/AddCommentPrompt.mjs +79 -0
- package/dist/es/components/Poll/PollActions/AddCommentPrompt.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/EndPollAlert.mjs +61 -0
- package/dist/es/components/Poll/PollActions/EndPollAlert.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/PollAction.mjs +27 -0
- package/dist/es/components/Poll/PollActions/PollAction.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/PollActions.mjs +98 -0
- package/dist/es/components/Poll/PollActions/PollActions.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/PollAnswerList.mjs +70 -0
- package/dist/es/components/Poll/PollActions/PollAnswerList.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/PollOptionsFullList.mjs +32 -0
- package/dist/es/components/Poll/PollActions/PollOptionsFullList.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/PollQuestion.mjs +20 -0
- package/dist/es/components/Poll/PollActions/PollQuestion.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotes.mjs +51 -0
- package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotes.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.mjs +48 -0
- package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesList.mjs +39 -0
- package/dist/es/components/Poll/PollActions/PollResults/PollOptionWithVotesList.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/PollResults/PollResults.mjs +79 -0
- package/dist/es/components/Poll/PollActions/PollResults/PollResults.mjs.map +1 -0
- package/dist/es/components/Poll/PollActions/SuggestPollOptionPrompt.mjs +82 -0
- package/dist/es/components/Poll/PollActions/SuggestPollOptionPrompt.mjs.map +1 -0
- package/dist/es/components/Poll/PollContent.mjs +28 -0
- package/dist/es/components/Poll/PollContent.mjs.map +1 -0
- package/dist/es/components/Poll/PollCreationDialog/MultipleAnswersField.mjs +86 -0
- package/dist/es/components/Poll/PollCreationDialog/MultipleAnswersField.mjs.map +1 -0
- package/dist/es/components/Poll/PollCreationDialog/NameField.mjs +42 -0
- package/dist/es/components/Poll/PollCreationDialog/NameField.mjs.map +1 -0
- package/dist/es/components/Poll/PollCreationDialog/OptionFieldSet.mjs +194 -0
- package/dist/es/components/Poll/PollCreationDialog/OptionFieldSet.mjs.map +1 -0
- package/dist/es/components/Poll/PollCreationDialog/PollCreationDialog.mjs +77 -0
- package/dist/es/components/Poll/PollCreationDialog/PollCreationDialog.mjs.map +1 -0
- package/dist/es/components/Poll/PollCreationDialog/PollCreationDialogControls.mjs +53 -0
- package/dist/es/components/Poll/PollCreationDialog/PollCreationDialogControls.mjs.map +1 -0
- package/dist/es/components/Poll/PollCreationDialog/PollOptionReorderHandle.mjs +79 -0
- package/dist/es/components/Poll/PollCreationDialog/PollOptionReorderHandle.mjs.map +1 -0
- package/dist/es/components/Poll/PollHeader.mjs +50 -0
- package/dist/es/components/Poll/PollHeader.mjs.map +1 -0
- package/dist/es/components/Poll/PollOptionList.mjs +45 -0
- package/dist/es/components/Poll/PollOptionList.mjs.map +1 -0
- package/dist/es/components/Poll/PollOptionSelector.mjs +105 -0
- package/dist/es/components/Poll/PollOptionSelector.mjs.map +1 -0
- package/dist/es/components/Poll/PollVote.mjs +60 -0
- package/dist/es/components/Poll/PollVote.mjs.map +1 -0
- package/dist/es/components/Poll/hooks/useManagePollVotesRealtime.mjs +36 -0
- package/dist/es/components/Poll/hooks/useManagePollVotesRealtime.mjs.map +1 -0
- package/dist/es/components/Poll/hooks/usePollAnswerPagination.mjs +44 -0
- package/dist/es/components/Poll/hooks/usePollAnswerPagination.mjs.map +1 -0
- package/dist/es/components/Poll/hooks/usePollOptionVotesPagination.mjs +45 -0
- package/dist/es/components/Poll/hooks/usePollOptionVotesPagination.mjs.map +1 -0
- package/dist/es/components/Portal/Portal.mjs +17 -0
- package/dist/es/components/Portal/Portal.mjs.map +1 -0
- package/dist/es/components/ReactFileUtilities/UploadButton.mjs +54 -0
- package/dist/es/components/ReactFileUtilities/UploadButton.mjs.map +1 -0
- package/dist/es/{audioProcessing.766ca76c.mjs → components/ReactFileUtilities/utils.mjs} +2 -32
- package/dist/es/components/ReactFileUtilities/utils.mjs.map +1 -0
- package/dist/es/components/Reactions/MessageReactions.mjs +150 -0
- package/dist/es/components/Reactions/MessageReactions.mjs.map +1 -0
- package/dist/es/components/Reactions/MessageReactionsDetail.mjs +157 -0
- package/dist/es/components/Reactions/MessageReactionsDetail.mjs.map +1 -0
- package/dist/es/components/Reactions/ReactionSelector.mjs +134 -0
- package/dist/es/components/Reactions/ReactionSelector.mjs.map +1 -0
- package/dist/es/components/Reactions/ReactionSelectorWithButton.mjs +51 -0
- package/dist/es/components/Reactions/ReactionSelectorWithButton.mjs.map +1 -0
- package/dist/es/components/Reactions/SpriteImage.mjs +34 -0
- package/dist/es/components/Reactions/SpriteImage.mjs.map +1 -0
- package/dist/es/components/Reactions/hooks/useFetchReactions.mjs +61 -0
- package/dist/es/components/Reactions/hooks/useFetchReactions.mjs.map +1 -0
- package/dist/es/components/Reactions/hooks/useProcessReactions.mjs +83 -0
- package/dist/es/components/Reactions/hooks/useProcessReactions.mjs.map +1 -0
- package/dist/es/components/Reactions/reactionOptions.mjs +79 -0
- package/dist/es/components/Reactions/reactionOptions.mjs.map +1 -0
- package/dist/es/components/Reactions/utils/utils.mjs +13 -0
- package/dist/es/components/Reactions/utils/utils.mjs.map +1 -0
- package/dist/es/components/SafeAnchor/SafeAnchor.mjs +21 -0
- package/dist/es/components/SafeAnchor/SafeAnchor.mjs.map +1 -0
- package/dist/es/components/Search/Search.mjs +40 -0
- package/dist/es/components/Search/Search.mjs.map +1 -0
- package/dist/es/components/Search/SearchBar/SearchBar.mjs +114 -0
- package/dist/es/components/Search/SearchBar/SearchBar.mjs.map +1 -0
- package/dist/es/components/Search/SearchContext.mjs +17 -0
- package/dist/es/components/Search/SearchContext.mjs.map +1 -0
- package/dist/es/components/Search/SearchResults/SearchResultItem.mjs +130 -0
- package/dist/es/components/Search/SearchResults/SearchResultItem.mjs.map +1 -0
- package/dist/es/components/Search/SearchResults/SearchResults.mjs +37 -0
- package/dist/es/components/Search/SearchResults/SearchResults.mjs.map +1 -0
- package/dist/es/components/Search/SearchResults/SearchResultsHeader.mjs +55 -0
- package/dist/es/components/Search/SearchResults/SearchResultsHeader.mjs.map +1 -0
- package/dist/es/components/Search/SearchResults/SearchResultsPresearch.mjs +15 -0
- package/dist/es/components/Search/SearchResults/SearchResultsPresearch.mjs.map +1 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResultList.mjs +31 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResultList.mjs.map +1 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResultListFooter.mjs +31 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResultListFooter.mjs.map +1 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResults.mjs +30 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResults.mjs.map +1 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResultsEmpty.mjs +15 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResultsEmpty.mjs.map +1 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResultsHeader.mjs +6 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResultsHeader.mjs.map +1 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResultsLoadingIndicator.mjs +18 -0
- package/dist/es/components/Search/SearchResults/SearchSourceResultsLoadingIndicator.mjs.map +1 -0
- package/dist/es/components/Search/SearchSourceResultsContext.mjs +17 -0
- package/dist/es/components/Search/SearchSourceResultsContext.mjs.map +1 -0
- package/dist/es/components/Search/hooks/useAnnounceSearchResultCount.mjs +57 -0
- package/dist/es/components/Search/hooks/useAnnounceSearchResultCount.mjs.map +1 -0
- package/dist/es/components/Search/hooks/useSearchQueriesInProgress.mjs +24 -0
- package/dist/es/components/Search/hooks/useSearchQueriesInProgress.mjs.map +1 -0
- package/dist/es/components/Search/hooks/useSearchResultsKeyboardNavigation.mjs +28 -0
- package/dist/es/components/Search/hooks/useSearchResultsKeyboardNavigation.mjs.map +1 -0
- package/dist/es/components/SkipNavigation/SkipNavigation.mjs +64 -0
- package/dist/es/components/SkipNavigation/SkipNavigation.mjs.map +1 -0
- package/dist/es/components/SummarizedMessagePreview/SummarizedMessagePreview.mjs +55 -0
- package/dist/es/components/SummarizedMessagePreview/SummarizedMessagePreview.mjs.map +1 -0
- package/dist/es/components/SummarizedMessagePreview/hooks/useLatestMessagePreview.mjs +141 -0
- package/dist/es/components/SummarizedMessagePreview/hooks/useLatestMessagePreview.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/CommandItem.mjs +26 -0
- package/dist/es/components/TextareaComposer/SuggestionList/CommandItem.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/EmoticonItem.mjs +26 -0
- package/dist/es/components/TextareaComposer/SuggestionList/EmoticonItem.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.mjs +32 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/MentionItem.mjs +39 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/MentionItem.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/MentionSuggestionTitle.mjs +7 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/MentionSuggestionTitle.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.mjs +34 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/SpecialMentionItem.mjs +6 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/SpecialMentionItem.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/UserGroupItem.mjs +31 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/UserGroupItem.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/UserItem.mjs +50 -0
- package/dist/es/components/TextareaComposer/SuggestionList/MentionItem/UserItem.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/SuggestionList.mjs +198 -0
- package/dist/es/components/TextareaComposer/SuggestionList/SuggestionList.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/SuggestionListItem.mjs +46 -0
- package/dist/es/components/TextareaComposer/SuggestionList/SuggestionListItem.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/SuggestionList/TokenizedSuggestionParts.mjs +30 -0
- package/dist/es/components/TextareaComposer/SuggestionList/TokenizedSuggestionParts.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/TextareaComposer.mjs +290 -0
- package/dist/es/components/TextareaComposer/TextareaComposer.mjs.map +1 -0
- package/dist/es/components/TextareaComposer/hooks/useTextareaPlaceholder.mjs +31 -0
- package/dist/es/components/TextareaComposer/hooks/useTextareaPlaceholder.mjs.map +1 -0
- package/dist/es/components/Thread/Thread.mjs +103 -0
- package/dist/es/components/Thread/Thread.mjs.map +1 -0
- package/dist/es/components/Thread/ThreadHead.mjs +27 -0
- package/dist/es/components/Thread/ThreadHead.mjs.map +1 -0
- package/dist/es/components/Thread/ThreadHeader.mjs +78 -0
- package/dist/es/components/Thread/ThreadHeader.mjs.map +1 -0
- package/dist/es/components/Thread/ThreadStart.mjs +25 -0
- package/dist/es/components/Thread/ThreadStart.mjs.map +1 -0
- package/dist/es/components/Threads/ThreadContext.mjs +13 -0
- package/dist/es/components/Threads/ThreadContext.mjs.map +1 -0
- package/dist/es/components/Threads/ThreadList/ThreadList.mjs +112 -0
- package/dist/es/components/Threads/ThreadList/ThreadList.mjs.map +1 -0
- package/dist/es/components/Threads/ThreadList/ThreadListEmptyPlaceholder.mjs +17 -0
- package/dist/es/components/Threads/ThreadList/ThreadListEmptyPlaceholder.mjs.map +1 -0
- package/dist/es/components/Threads/ThreadList/ThreadListHeader.mjs +22 -0
- package/dist/es/components/Threads/ThreadList/ThreadListHeader.mjs.map +1 -0
- package/dist/es/components/Threads/ThreadList/ThreadListItem.mjs +18 -0
- package/dist/es/components/Threads/ThreadList/ThreadListItem.mjs.map +1 -0
- package/dist/es/components/Threads/ThreadList/ThreadListItemUI.mjs +160 -0
- package/dist/es/components/Threads/ThreadList/ThreadListItemUI.mjs.map +1 -0
- package/dist/es/components/Threads/ThreadList/ThreadListLoadingIndicator.mjs +22 -0
- package/dist/es/components/Threads/ThreadList/ThreadListLoadingIndicator.mjs.map +1 -0
- package/dist/es/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.mjs +34 -0
- package/dist/es/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.mjs.map +1 -0
- package/dist/es/components/Threads/ThreadList/useThreadHighlighting.mjs +47 -0
- package/dist/es/components/Threads/ThreadList/useThreadHighlighting.mjs.map +1 -0
- package/dist/es/components/Threads/ThreadList/utils.a11y.mjs +91 -0
- package/dist/es/components/Threads/ThreadList/utils.a11y.mjs.map +1 -0
- package/dist/es/components/Threads/UnreadCountBadge.mjs +16 -0
- package/dist/es/components/Threads/UnreadCountBadge.mjs.map +1 -0
- package/dist/es/components/Threads/hooks/useCloseThread.mjs +30 -0
- package/dist/es/components/Threads/hooks/useCloseThread.mjs.map +1 -0
- package/dist/es/components/Tooltip/Tooltip.mjs +39 -0
- package/dist/es/components/Tooltip/Tooltip.mjs.map +1 -0
- package/dist/es/components/Tooltip/hooks/useEnterLeaveHandlers.mjs +20 -0
- package/dist/es/components/Tooltip/hooks/useEnterLeaveHandlers.mjs.map +1 -0
- package/dist/es/components/TypingIndicator/TypingIndicator.mjs +85 -0
- package/dist/es/components/TypingIndicator/TypingIndicator.mjs.map +1 -0
- package/dist/es/components/TypingIndicator/TypingIndicatorDots.mjs +33 -0
- package/dist/es/components/TypingIndicator/TypingIndicatorDots.mjs.map +1 -0
- package/dist/es/components/TypingIndicator/TypingIndicatorHeader.mjs +48 -0
- package/dist/es/components/TypingIndicator/TypingIndicatorHeader.mjs.map +1 -0
- package/dist/es/components/TypingIndicator/hooks/useDebouncedTypingActive.mjs +53 -0
- package/dist/es/components/TypingIndicator/hooks/useDebouncedTypingActive.mjs.map +1 -0
- package/dist/es/components/TypingIndicator/utils/getTypingStatusMessage.mjs +19 -0
- package/dist/es/components/TypingIndicator/utils/getTypingStatusMessage.mjs.map +1 -0
- package/dist/es/components/UtilityComponents/ErrorBoundary.mjs +22 -0
- package/dist/es/components/UtilityComponents/ErrorBoundary.mjs.map +1 -0
- package/dist/es/components/UtilityComponents/hooks/useMutationObserver.mjs +45 -0
- package/dist/es/components/UtilityComponents/hooks/useMutationObserver.mjs.map +1 -0
- package/dist/es/components/UtilityComponents/useStableId.mjs +20 -0
- package/dist/es/components/UtilityComponents/useStableId.mjs.map +1 -0
- package/dist/es/{ReactPlayerWrapper.d2ae5941.mjs → components/VideoPlayer/ReactPlayerWrapper.mjs} +3 -3
- package/dist/es/components/VideoPlayer/ReactPlayerWrapper.mjs.map +1 -0
- package/dist/es/components/VideoPlayer/VideoPlayer.mjs +30 -0
- package/dist/es/components/VideoPlayer/VideoPlayer.mjs.map +1 -0
- package/dist/es/components/VideoPlayer/VideoThumbnail.mjs +35 -0
- package/dist/es/components/VideoPlayer/VideoThumbnail.mjs.map +1 -0
- package/dist/es/components/VisuallyHidden/VisuallyHidden.mjs +29 -0
- package/dist/es/components/VisuallyHidden/VisuallyHidden.mjs.map +1 -0
- package/dist/es/constants/messageTypes.mjs +9 -0
- package/dist/es/constants/messageTypes.mjs.map +1 -0
- package/dist/es/context/AttachmentContext.mjs +16 -0
- package/dist/es/context/AttachmentContext.mjs.map +1 -0
- package/dist/es/context/AttachmentSelectorContext.mjs +13 -0
- package/dist/es/context/AttachmentSelectorContext.mjs.map +1 -0
- package/dist/es/context/ChannelInstanceContext.mjs +17 -0
- package/dist/es/context/ChannelInstanceContext.mjs.map +1 -0
- package/dist/es/context/ChannelListContext.mjs +17 -0
- package/dist/es/context/ChannelListContext.mjs.map +1 -0
- package/dist/es/context/ChatContext.mjs +14 -0
- package/dist/es/context/ChatContext.mjs.map +1 -0
- package/dist/es/context/ComponentContext.mjs +13 -0
- package/dist/es/context/ComponentContext.mjs.map +1 -0
- package/dist/es/context/DialogManagerContext.mjs +119 -0
- package/dist/es/context/DialogManagerContext.mjs.map +1 -0
- package/dist/es/context/MessageBounceContext.mjs +51 -0
- package/dist/es/context/MessageBounceContext.mjs.map +1 -0
- package/dist/es/context/MessageComposerContext.mjs +19 -0
- package/dist/es/context/MessageComposerContext.mjs.map +1 -0
- package/dist/es/context/MessageComposerControllerContext.mjs +19 -0
- package/dist/es/context/MessageComposerControllerContext.mjs.map +1 -0
- package/dist/es/context/MessageContext.mjs +14 -0
- package/dist/es/context/MessageContext.mjs.map +1 -0
- package/dist/es/context/MessageListContext.mjs +17 -0
- package/dist/es/context/MessageListContext.mjs.map +1 -0
- package/dist/es/context/MessageTranslationViewContext.mjs +73 -0
- package/dist/es/context/MessageTranslationViewContext.mjs.map +1 -0
- package/dist/es/context/ModalContext.mjs +18 -0
- package/dist/es/context/ModalContext.mjs.map +1 -0
- package/dist/es/context/PollContext.mjs +14 -0
- package/dist/es/context/PollContext.mjs.map +1 -0
- package/dist/es/context/TranslationContext.mjs +17 -0
- package/dist/es/context/TranslationContext.mjs.map +1 -0
- package/dist/es/context/VirtualizedMessageListContext.mjs +17 -0
- package/dist/es/context/VirtualizedMessageListContext.mjs.map +1 -0
- package/dist/es/context/WithComponents.mjs +23 -0
- package/dist/es/context/WithComponents.mjs.map +1 -0
- package/dist/es/context/WorkspaceNavigationContext.mjs +45 -0
- package/dist/es/context/WorkspaceNavigationContext.mjs.map +1 -0
- package/dist/es/context/requireContext.mjs +17 -0
- package/dist/es/context/requireContext.mjs.map +1 -0
- package/dist/es/context/useChannel.mjs +14 -0
- package/dist/es/context/useChannel.mjs.map +1 -0
- package/dist/es/context/useComponentContextIcons.mjs +26 -0
- package/dist/es/context/useComponentContextIcons.mjs.map +1 -0
- package/dist/es/emojis.mjs +2 -229
- package/dist/es/hooks/useIsDmChannel.mjs +30 -0
- package/dist/es/hooks/useIsDmChannel.mjs.map +1 -0
- package/dist/es/hooks/useMessagePaginator.mjs +14 -0
- package/dist/es/hooks/useMessagePaginator.mjs.map +1 -0
- package/dist/es/i18n/Streami18n.mjs +62 -0
- package/dist/es/i18n/Streami18n.mjs.map +1 -0
- package/dist/es/i18n/TranslationBuilder/index.mjs +3 -0
- package/dist/es/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.mjs +49 -0
- package/dist/es/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.mjs.map +1 -0
- package/dist/es/i18n/TranslationBuilder/notifications/translators.mjs +36 -0
- package/dist/es/i18n/TranslationBuilder/notifications/translators.mjs.map +1 -0
- package/dist/es/i18n/TranslationBuilder/notifications/translatorsByNotificationType.mjs +51 -0
- package/dist/es/i18n/TranslationBuilder/notifications/translatorsByNotificationType.mjs.map +1 -0
- package/dist/es/i18n/runtimeDefaults.mjs +41 -0
- package/dist/es/i18n/runtimeDefaults.mjs.map +1 -0
- package/dist/es/i18n/useStreami18n.mjs +41 -0
- package/dist/es/i18n/useStreami18n.mjs.map +1 -0
- package/dist/es/i18n/utils.mjs +14 -0
- package/dist/es/i18n/utils.mjs.map +1 -0
- package/dist/es/index.mjs +318 -20870
- package/dist/es/mp3-encoder.mjs +1 -1
- package/dist/es/plugins/ChannelDetail/AvatarWithChannelDetail.mjs +40 -0
- package/dist/es/plugins/ChannelDetail/AvatarWithChannelDetail.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetail.mjs +105 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetail.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetailContext.mjs +20 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetailContext.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetailEmptyList.mjs +14 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetailEmptyList.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetailListLoadingIndicator.mjs +20 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetailListLoadingIndicator.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetailNavButton.mjs +26 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetailNavButton.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetailSearchInput.mjs +35 -0
- package/dist/es/plugins/ChannelDetail/ChannelDetailSearchInput.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/SectionNavigator/SectionNavigator.mjs +164 -0
- package/dist/es/plugins/ChannelDetail/SectionNavigator/SectionNavigator.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/SectionNavigator/SectionNavigatorHeader.mjs +49 -0
- package/dist/es/plugins/ChannelDetail/SectionNavigator/SectionNavigatorHeader.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesEmptyList.mjs +25 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesEmptyList.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.mjs +131 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.utils.mjs +64 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.utils.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/useChannelFilesSearch.mjs +47 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelFilesView/useChannelFilesSearch.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementActions.defaults.mjs +568 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementActions.defaults.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.mjs +324 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaEmptyList.mjs +25 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaEmptyList.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.mjs +215 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.utils.mjs +42 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.utils.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/useChannelMediaSearch.mjs +47 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMediaView/useChannelMediaSearch.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberActions.defaults.mjs +454 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberActions.defaults.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberDetail.mjs +77 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberDetail.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersAddView.mjs +190 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersAddView.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.mjs +111 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersHeaderActions.defaults.mjs +120 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersHeaderActions.defaults.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.mjs +95 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.utils.mjs +11 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.utils.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMemberCount.mjs +22 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMemberCount.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMemberIds.mjs +23 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMemberIds.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMembersSearch.mjs +52 -0
- package/dist/es/plugins/ChannelDetail/Views/ChannelMembersView/useChannelMembersSearch.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesEmptyList.mjs +25 -0
- package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesEmptyList.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesView.mjs +143 -0
- package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesView.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesCount.mjs +16 -0
- package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesCount.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesSearch.mjs +68 -0
- package/dist/es/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesSearch.mjs.map +1 -0
- package/dist/es/plugins/ChannelDetail/VirtualizedList/VirtualizedList.mjs +42 -0
- package/dist/es/plugins/ChannelDetail/VirtualizedList/VirtualizedList.mjs.map +1 -0
- package/dist/es/plugins/Emojis/EmojiPicker.mjs +96 -0
- package/dist/es/plugins/Emojis/EmojiPicker.mjs.map +1 -0
- package/dist/es/plugins/Emojis/Picker.mjs +23 -0
- package/dist/es/plugins/Emojis/Picker.mjs.map +1 -0
- package/dist/es/plugins/Emojis/middleware/textComposerEmojiMiddleware.mjs +127 -0
- package/dist/es/plugins/Emojis/middleware/textComposerEmojiMiddleware.mjs.map +1 -0
- package/dist/es/plugins/SlotGeometry/SlotGeometry.mjs +141 -0
- package/dist/es/plugins/SlotGeometry/SlotGeometry.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/ChannelSlot.mjs +30 -0
- package/dist/es/plugins/SlotLayout/ChannelSlot.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/ChatView.a11y.utility.mjs +13 -0
- package/dist/es/plugins/SlotLayout/ChatView.a11y.utility.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/ChatView.mjs +277 -0
- package/dist/es/plugins/SlotLayout/ChatView.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/ChatViewNavigationContext.mjs +239 -0
- package/dist/es/plugins/SlotLayout/ChatViewNavigationContext.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/ThreadListSlot.mjs +42 -0
- package/dist/es/plugins/SlotLayout/ThreadListSlot.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/ThreadSlot.mjs +34 -0
- package/dist/es/plugins/SlotLayout/ThreadSlot.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/hooks/useLayoutViewState.mjs +26 -0
- package/dist/es/plugins/SlotLayout/hooks/useLayoutViewState.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/hooks/useSlotEntity.mjs +167 -0
- package/dist/es/plugins/SlotLayout/hooks/useSlotEntity.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/layout/Slot.mjs +46 -0
- package/dist/es/plugins/SlotLayout/layout/Slot.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/layout/WorkspaceLayout.mjs +23 -0
- package/dist/es/plugins/SlotLayout/layout/WorkspaceLayout.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/layoutController/LayoutController.mjs +376 -0
- package/dist/es/plugins/SlotLayout/layoutController/LayoutController.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/layoutController/serialization.mjs +80 -0
- package/dist/es/plugins/SlotLayout/layoutController/serialization.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/slotBinding.mjs +15 -0
- package/dist/es/plugins/SlotLayout/slotBinding.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/slotRegistry.mjs +64 -0
- package/dist/es/plugins/SlotLayout/slotRegistry.mjs.map +1 -0
- package/dist/es/plugins/SlotLayout/workspaceNavigationAdapter.mjs +130 -0
- package/dist/es/plugins/SlotLayout/workspaceNavigationAdapter.mjs.map +1 -0
- package/dist/es/slot-geometry.mjs +2 -0
- package/dist/es/slot-layout.mjs +14 -0
- package/dist/es/store/hooks/useStateStore.mjs +32 -0
- package/dist/es/store/hooks/useStateStore.mjs.map +1 -0
- package/dist/es/utils/findReverse.mjs +8 -0
- package/dist/es/utils/findReverse.mjs.map +1 -0
- package/dist/es/utils/getChannel.mjs +41 -0
- package/dist/es/utils/getChannel.mjs.map +1 -0
- package/dist/es/utils/getTextareaCaretRect.mjs +45 -0
- package/dist/es/utils/getTextareaCaretRect.mjs.map +1 -0
- package/dist/es/utils/getWholeChar.mjs +20 -0
- package/dist/es/utils/getWholeChar.mjs.map +1 -0
- package/dist/es/utils/isDmChannel.mjs +9 -0
- package/dist/es/utils/isDmChannel.mjs.map +1 -0
- package/dist/es/utils/mergeDeep.mjs +8 -0
- package/dist/es/utils/mergeDeep.mjs.map +1 -0
- package/dist/es/utils/useStableCallback.mjs +34 -0
- package/dist/es/utils/useStableCallback.mjs.map +1 -0
- package/dist/types/a11y/accessibleLabel.d.ts.map +1 -1
- package/dist/types/components/AIStateIndicator/AIStateIndicator.d.ts.map +1 -1
- package/dist/types/components/AIStateIndicator/hooks/useAIState.d.ts +3 -8
- package/dist/types/components/AIStateIndicator/hooks/useAIState.d.ts.map +1 -1
- package/dist/types/components/Accessibility/NotificationAnnouncer.d.ts +1 -2
- package/dist/types/components/Accessibility/NotificationAnnouncer.d.ts.map +1 -1
- package/dist/types/components/Accessibility/hooks/useIncomingMessageAnnouncements.d.ts.map +1 -1
- package/dist/types/components/Accessibility/hooks/useInteractionAnnouncements.d.ts.map +1 -1
- package/dist/types/components/Accessibility/useAriaLiveAnnouncer.d.ts +4 -0
- package/dist/types/components/Accessibility/useAriaLiveAnnouncer.d.ts.map +1 -1
- package/dist/types/components/Attachment/Attachment.d.ts +13 -2
- package/dist/types/components/Attachment/Attachment.d.ts.map +1 -1
- package/dist/types/components/Attachment/AttachmentActions.d.ts.map +1 -1
- package/dist/types/components/Attachment/AttachmentContainer.d.ts +2 -2
- package/dist/types/components/Attachment/AttachmentContainer.d.ts.map +1 -1
- package/dist/types/components/Attachment/Audio.d.ts.map +1 -1
- package/dist/types/components/Attachment/FileAttachment.d.ts.map +1 -1
- package/dist/types/components/Attachment/Geolocation.d.ts +3 -3
- package/dist/types/components/Attachment/Geolocation.d.ts.map +1 -1
- package/dist/types/components/Attachment/Giphy.d.ts.map +1 -1
- package/dist/types/components/Attachment/LinkPreview/Card.d.ts.map +1 -1
- package/dist/types/components/Attachment/LinkPreview/CardAudio.d.ts +1 -1
- package/dist/types/components/Attachment/LinkPreview/CardAudio.d.ts.map +1 -1
- package/dist/types/components/Attachment/ModalGallery.d.ts.map +1 -1
- package/dist/types/components/Attachment/UnsupportedAttachment.d.ts.map +1 -1
- package/dist/types/components/Attachment/VideoAttachment.d.ts.map +1 -1
- package/dist/types/components/Attachment/VisibilityDisclaimer.d.ts.map +1 -1
- package/dist/types/components/Attachment/VoiceRecording.d.ts.map +1 -1
- package/dist/types/components/Attachment/components/AttachmentUploadProgressIndicator.d.ts +32 -0
- package/dist/types/components/Attachment/components/AttachmentUploadProgressIndicator.d.ts.map +1 -0
- package/dist/types/components/Attachment/components/DownloadButton.d.ts.map +1 -1
- package/dist/types/components/Attachment/components/index.d.ts +1 -0
- package/dist/types/components/Attachment/components/index.d.ts.map +1 -1
- package/dist/types/components/Attachment/hooks/useAttachmentUploadState.d.ts +61 -0
- package/dist/types/components/Attachment/hooks/useAttachmentUploadState.d.ts.map +1 -0
- package/dist/types/components/Attachment/hooks/useLocalVideoDimensions.d.ts +16 -0
- package/dist/types/components/Attachment/hooks/useLocalVideoDimensions.d.ts.map +1 -0
- package/dist/types/components/Attachment/index.d.ts +1 -0
- package/dist/types/components/Attachment/index.d.ts.map +1 -1
- package/dist/types/components/Attachment/utils.d.ts +2 -2
- package/dist/types/components/Attachment/utils.d.ts.map +1 -1
- package/dist/types/components/AudioPlayback/AudioPlaybackArbiter.d.ts +37 -0
- package/dist/types/components/AudioPlayback/AudioPlaybackArbiter.d.ts.map +1 -0
- package/dist/types/components/AudioPlayback/AudioPlayer.d.ts +1 -1
- package/dist/types/components/AudioPlayback/AudioPlayer.d.ts.map +1 -1
- package/dist/types/components/AudioPlayback/AudioPlayerPool.d.ts +19 -31
- package/dist/types/components/AudioPlayback/AudioPlayerPool.d.ts.map +1 -1
- package/dist/types/components/AudioPlayback/WithAudioPlayback.d.ts +17 -2
- package/dist/types/components/AudioPlayback/WithAudioPlayback.d.ts.map +1 -1
- package/dist/types/components/AudioPlayback/components/ProgressBar.d.ts.map +1 -1
- package/dist/types/components/AudioPlayback/components/WaveProgressBar.d.ts.map +1 -1
- package/dist/types/components/AudioPlayback/components/progressBarA11y.d.ts +2 -2
- package/dist/types/components/AudioPlayback/components/progressBarA11y.d.ts.map +1 -1
- package/dist/types/components/AudioPlayback/index.d.ts.map +1 -1
- package/dist/types/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.d.ts +2 -2
- package/dist/types/components/AudioPlayback/plugins/AudioPlayerNotificationsPlugin.d.ts.map +1 -1
- package/dist/types/components/Avatar/Avatar.d.ts +1 -5
- package/dist/types/components/Avatar/Avatar.d.ts.map +1 -1
- package/dist/types/components/Badge/Badge.d.ts.map +1 -1
- package/dist/types/components/Badge/MediaBadge.d.ts.map +1 -1
- package/dist/types/components/BaseImage/ImagePlaceholder.d.ts.map +1 -1
- package/dist/types/components/Button/PlayButton.d.ts.map +1 -1
- package/dist/types/components/Button/WorkspaceNavigationButtons.d.ts +11 -0
- package/dist/types/components/Button/WorkspaceNavigationButtons.d.ts.map +1 -0
- package/dist/types/components/Button/index.d.ts +1 -0
- package/dist/types/components/Button/index.d.ts.map +1 -1
- package/dist/types/components/Channel/Channel.d.ts +9 -57
- package/dist/types/components/Channel/Channel.d.ts.map +1 -1
- package/dist/types/components/Channel/hooks/useChannelCapabilities.d.ts +4 -0
- package/dist/types/components/Channel/hooks/useChannelCapabilities.d.ts.map +1 -0
- package/dist/types/components/Channel/index.d.ts +1 -2
- package/dist/types/components/Channel/index.d.ts.map +1 -1
- package/dist/types/components/ChannelHeader/ChannelHeader.d.ts +12 -0
- package/dist/types/components/ChannelHeader/ChannelHeader.d.ts.map +1 -1
- package/dist/types/components/ChannelHeader/hooks/useChannelHasMembersOnline.d.ts +8 -0
- package/dist/types/components/ChannelHeader/hooks/useChannelHasMembersOnline.d.ts.map +1 -1
- package/dist/types/components/ChannelHeader/hooks/useChannelHeaderOnlineStatus.d.ts +7 -8
- package/dist/types/components/ChannelHeader/hooks/useChannelHeaderOnlineStatus.d.ts.map +1 -1
- package/dist/types/components/ChannelList/ChannelList.d.ts +11 -78
- package/dist/types/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/dist/types/components/ChannelList/ChannelListHeader.d.ts.map +1 -1
- package/dist/types/components/ChannelList/ChannelLists.d.ts +10 -0
- package/dist/types/components/ChannelList/ChannelLists.d.ts.map +1 -0
- package/dist/types/components/ChannelList/ChannelNavigation.d.ts +9 -0
- package/dist/types/components/ChannelList/ChannelNavigation.d.ts.map +1 -0
- package/dist/types/components/ChannelList/hooks/index.d.ts +1 -2
- package/dist/types/components/ChannelList/hooks/index.d.ts.map +1 -1
- package/dist/types/components/ChannelList/hooks/useChannelMembersState.d.ts.map +1 -1
- package/dist/types/components/ChannelList/hooks/useChannelMembershipState.d.ts.map +1 -1
- package/dist/types/components/ChannelList/hooks/useChannelPaginatorState.d.ts +18 -0
- package/dist/types/components/ChannelList/hooks/useChannelPaginatorState.d.ts.map +1 -0
- package/dist/types/components/ChannelList/hooks/useSelectedChannelState.d.ts +3 -3
- package/dist/types/components/ChannelList/hooks/useSelectedChannelState.d.ts.map +1 -1
- package/dist/types/components/ChannelList/index.d.ts +3 -2
- package/dist/types/components/ChannelList/index.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/ChannelListItem.d.ts +9 -18
- package/dist/types/components/ChannelListItem/ChannelListItem.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/ChannelListItemActionButtons.defaults.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/ChannelListItemTimestamp.d.ts +3 -3
- package/dist/types/components/ChannelListItem/ChannelListItemTimestamp.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/ChannelListItemUI.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/hooks/useChannelDisplayName.d.ts +1 -1
- package/dist/types/components/ChannelListItem/hooks/useChannelDisplayName.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/hooks/useIsChannelMuted.d.ts +8 -5
- package/dist/types/components/ChannelListItem/hooks/useIsChannelMuted.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/hooks/useMessageDeliveryStatus.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/utils.a11y.d.ts +14 -5
- package/dist/types/components/ChannelListItem/utils.a11y.d.ts.map +1 -1
- package/dist/types/components/ChannelListItem/utils.d.ts +1 -1
- package/dist/types/components/ChannelListItem/utils.d.ts.map +1 -1
- package/dist/types/components/Chat/Chat.d.ts +1 -4
- package/dist/types/components/Chat/Chat.d.ts.map +1 -1
- package/dist/types/components/Chat/hooks/useChat.d.ts +4 -16
- package/dist/types/components/Chat/hooks/useChat.d.ts.map +1 -1
- package/dist/types/components/Chat/hooks/useCreateChatClient.d.ts +2 -2
- package/dist/types/components/Chat/hooks/useCreateChatClient.d.ts.map +1 -1
- package/dist/types/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
- package/dist/types/components/Chat/hooks/useNetworkConnectionState.d.ts +34 -0
- package/dist/types/components/Chat/hooks/useNetworkConnectionState.d.ts.map +1 -0
- package/dist/types/components/Chat/hooks/useReportLostConnectionSystemNotification.d.ts +26 -2
- package/dist/types/components/Chat/hooks/useReportLostConnectionSystemNotification.d.ts.map +1 -1
- package/dist/types/components/Chat/hooks/useWSConnectionState.d.ts +22 -0
- package/dist/types/components/Chat/hooks/useWSConnectionState.d.ts.map +1 -0
- package/dist/types/components/Chat/index.d.ts +2 -0
- package/dist/types/components/Chat/index.d.ts.map +1 -1
- package/dist/types/components/Dialog/components/ContextMenu.d.ts +0 -4
- package/dist/types/components/Dialog/components/ContextMenu.d.ts.map +1 -1
- package/dist/types/components/Dialog/hooks/usePopoverPosition.d.ts +2 -2
- package/dist/types/components/Dialog/hooks/usePopoverPosition.d.ts.map +1 -1
- package/dist/types/components/Dialog/service/DialogAnchor.d.ts +8 -1
- package/dist/types/components/Dialog/service/DialogAnchor.d.ts.map +1 -1
- package/dist/types/components/Dialog/service/DialogManager.d.ts +1 -1
- package/dist/types/components/Dialog/service/DialogManager.d.ts.map +1 -1
- package/dist/types/components/EmptyStateIndicator/EmptyStateIndicator.d.ts.map +1 -1
- package/dist/types/components/Form/Dropdown.d.ts +4 -1
- package/dist/types/components/Form/Dropdown.d.ts.map +1 -1
- package/dist/types/components/Form/NumericInput.d.ts.map +1 -1
- package/dist/types/components/Gallery/GalleryContext.d.ts +5 -0
- package/dist/types/components/Gallery/GalleryContext.d.ts.map +1 -1
- package/dist/types/components/Gallery/GalleryHeader.d.ts.map +1 -1
- package/dist/types/components/Gallery/GalleryUI.d.ts.map +1 -1
- package/dist/types/components/Icons/index.d.ts +1 -1
- package/dist/types/components/Icons/index.d.ts.map +1 -1
- package/dist/types/components/Icons/slots.d.ts +18 -7
- package/dist/types/components/Icons/slots.d.ts.map +1 -1
- package/dist/types/components/InfiniteScrollPaginator/InfiniteScrollPaginator.d.ts +8 -2
- package/dist/types/components/InfiniteScrollPaginator/InfiniteScrollPaginator.d.ts.map +1 -1
- package/dist/types/components/InfiniteScrollPaginator/InfiniteScrollWithComponents.d.ts +43 -0
- package/dist/types/components/InfiniteScrollPaginator/InfiniteScrollWithComponents.d.ts.map +1 -0
- package/dist/types/components/InfiniteScrollPaginator/hooks/useCursorPaginator.d.ts +1 -1
- package/dist/types/components/InfiniteScrollPaginator/hooks/useCursorPaginator.d.ts.map +1 -1
- package/dist/types/components/LoadMore/LoadMoreButton.d.ts.map +1 -1
- package/dist/types/components/Loading/AttachmentUploadedSizeIndicator.d.ts +23 -0
- package/dist/types/components/Loading/AttachmentUploadedSizeIndicator.d.ts.map +1 -0
- package/dist/types/components/Loading/LoadingErrorIndicator.d.ts.map +1 -1
- package/dist/types/components/Loading/LoadingIndicator.d.ts +2 -3
- package/dist/types/components/Loading/LoadingIndicator.d.ts.map +1 -1
- package/dist/types/components/Loading/UploadProgressIndicator.d.ts +7 -1
- package/dist/types/components/Loading/UploadProgressIndicator.d.ts.map +1 -1
- package/dist/types/components/Loading/index.d.ts +1 -0
- package/dist/types/components/Loading/index.d.ts.map +1 -1
- package/dist/types/components/Loading/progress-indicators.d.ts.map +1 -1
- package/dist/types/components/Location/ShareLocationDialog.d.ts.map +1 -1
- package/dist/types/components/Location/hooks/useLiveLocationSharingManager.d.ts.map +1 -1
- package/dist/types/components/MediaRecorder/AudioRecorder/AudioRecorderRecordingControls.d.ts.map +1 -1
- package/dist/types/components/MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification.d.ts.map +1 -1
- package/dist/types/components/MediaRecorder/AudioRecorder/AudioRecordingPlayback.d.ts.map +1 -1
- package/dist/types/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.d.ts.map +1 -1
- package/dist/types/components/MediaRecorder/RecordingPermissionDeniedNotification.d.ts.map +1 -1
- package/dist/types/components/MediaRecorder/classes/MediaRecorderController.d.ts.map +1 -1
- package/dist/types/components/MediaRecorder/hooks/useMediaRecorder.d.ts +2 -2
- package/dist/types/components/MediaRecorder/hooks/useMediaRecorder.d.ts.map +1 -1
- package/dist/types/components/Message/Message.d.ts.map +1 -1
- package/dist/types/components/Message/MessageAlsoSentInChannelIndicator.d.ts +11 -1
- package/dist/types/components/Message/MessageAlsoSentInChannelIndicator.d.ts.map +1 -1
- package/dist/types/components/Message/MessageDeletedBubble.d.ts.map +1 -1
- package/dist/types/components/Message/MessageEditedIndicator.d.ts.map +1 -1
- package/dist/types/components/Message/MessageRepliesCountButton.d.ts.map +1 -1
- package/dist/types/components/Message/MessageStatus.d.ts.map +1 -1
- package/dist/types/components/Message/MessageText.d.ts.map +1 -1
- package/dist/types/components/Message/MessageTimestamp.d.ts.map +1 -1
- package/dist/types/components/Message/MessageTranslationIndicator.d.ts.map +1 -1
- package/dist/types/components/Message/MessageUI.d.ts.map +1 -1
- package/dist/types/components/Message/ReminderNotification.d.ts.map +1 -1
- package/dist/types/components/Message/StreamedMessageText.d.ts.map +1 -1
- package/dist/types/components/Message/Timestamp.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/index.d.ts +1 -0
- package/dist/types/components/Message/hooks/index.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useActionHandler.d.ts +1 -1
- package/dist/types/components/Message/hooks/useActionHandler.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useDeleteHandler.d.ts +6 -2
- package/dist/types/components/Message/hooks/useDeleteHandler.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useMarkUnreadHandler.d.ts +6 -1
- package/dist/types/components/Message/hooks/useMarkUnreadHandler.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useMentionsHandler.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useMessageAlsoSentInChannelNavigation.d.ts +22 -0
- package/dist/types/components/Message/hooks/useMessageAlsoSentInChannelNavigation.d.ts.map +1 -0
- package/dist/types/components/Message/hooks/useMuteHandler.d.ts +7 -2
- package/dist/types/components/Message/hooks/useMuteHandler.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useOpenThreadHandler.d.ts +1 -0
- package/dist/types/components/Message/hooks/useOpenThreadHandler.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/usePinHandler.d.ts +23 -2
- package/dist/types/components/Message/hooks/usePinHandler.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useReactionHandler.d.ts +1 -1
- package/dist/types/components/Message/hooks/useReactionHandler.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useReactionsFetcher.d.ts +2 -2
- package/dist/types/components/Message/hooks/useReactionsFetcher.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useRetryHandler.d.ts +3 -2
- package/dist/types/components/Message/hooks/useRetryHandler.d.ts.map +1 -1
- package/dist/types/components/Message/hooks/useUserRole.d.ts +1 -0
- package/dist/types/components/Message/hooks/useUserRole.d.ts.map +1 -1
- package/dist/types/components/Message/types.d.ts +11 -20
- package/dist/types/components/Message/types.d.ts.map +1 -1
- package/dist/types/components/Message/utils.d.ts +7 -38
- package/dist/types/components/Message/utils.d.ts.map +1 -1
- package/dist/types/components/MessageActions/DeleteMessageAlert.d.ts.map +1 -1
- package/dist/types/components/MessageActions/DownloadSubmenu.d.ts.map +1 -1
- package/dist/types/components/MessageActions/MessageActions.d.ts +6 -2
- package/dist/types/components/MessageActions/MessageActions.d.ts.map +1 -1
- package/dist/types/components/MessageActions/MessageActions.defaults.d.ts.map +1 -1
- package/dist/types/components/MessageActions/RemindMeSubmenu.d.ts.map +1 -1
- package/dist/types/components/MessageActions/hooks/useBaseMessageActionSetFilter.d.ts.map +1 -1
- package/dist/types/components/MessageBounce/MessageBouncePrompt.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/UnsupportedAttachmentPreview.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/index.d.ts +1 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/index.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/utils/AttachmentPreviewRoot.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentSelector/AttachmentSelector.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/AttachmentSelector/CommandsMenu.d.ts +5 -5
- package/dist/types/components/MessageComposer/AttachmentSelector/CommandsMenu.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/CommandChip.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/EditMessageForm.d.ts +1 -0
- package/dist/types/components/MessageComposer/EditMessageForm.d.ts.map +1 -0
- package/dist/types/components/MessageComposer/MessageComposer.d.ts +1 -17
- package/dist/types/components/MessageComposer/MessageComposer.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/MessageComposerActions.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/MessageComposerUI.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/QuotedMessagePreview.d.ts +3 -3
- package/dist/types/components/MessageComposer/QuotedMessagePreview.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/RemoveAttachmentPreviewButton.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/SendButton.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/SendToChannelCheckbox.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/StopAIGenerationButton.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/WithDragAndDropUpload.d.ts +2 -5
- package/dist/types/components/MessageComposer/WithDragAndDropUpload.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/hooks/index.d.ts +1 -0
- package/dist/types/components/MessageComposer/hooks/index.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/hooks/useAttachmentManagerState.d.ts +5 -1
- package/dist/types/components/MessageComposer/hooks/useAttachmentManagerState.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/hooks/useAttachmentsForPreview.d.ts +1 -2
- package/dist/types/components/MessageComposer/hooks/useAttachmentsForPreview.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/hooks/useCreateMessageComposerContext.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/hooks/useMessageComposerBindings.d.ts +0 -1
- package/dist/types/components/MessageComposer/hooks/useMessageComposerBindings.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/hooks/useMessageComposerCommands.d.ts +2 -2
- package/dist/types/components/MessageComposer/hooks/useMessageComposerCommands.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/hooks/useMessageComposerController.d.ts +1 -1
- package/dist/types/components/MessageComposer/hooks/useMessageComposerController.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/hooks/useMessageComposerSubmitFn.d.ts +7 -0
- package/dist/types/components/MessageComposer/hooks/useMessageComposerSubmitFn.d.ts.map +1 -0
- package/dist/types/components/MessageComposer/hooks/utils.d.ts.map +1 -1
- package/dist/types/components/MessageComposer/index.d.ts +2 -1
- package/dist/types/components/MessageComposer/index.d.ts.map +1 -1
- package/dist/types/components/MessageList/FloatingDateSeparator.d.ts +1 -1
- package/dist/types/components/MessageList/FloatingDateSeparator.d.ts.map +1 -1
- package/dist/types/components/MessageList/MessageList.d.ts +24 -25
- package/dist/types/components/MessageList/MessageList.d.ts.map +1 -1
- package/dist/types/components/MessageList/NewMessageNotification.d.ts.map +1 -1
- package/dist/types/components/MessageList/ScrollToLatestMessageButton.d.ts +0 -1
- package/dist/types/components/MessageList/ScrollToLatestMessageButton.d.ts.map +1 -1
- package/dist/types/components/MessageList/UnreadMessagesNotification.d.ts +1 -4
- package/dist/types/components/MessageList/UnreadMessagesNotification.d.ts.map +1 -1
- package/dist/types/components/MessageList/UnreadMessagesSeparator.d.ts.map +1 -1
- package/dist/types/components/MessageList/VirtualizedMessageList.d.ts +23 -42
- package/dist/types/components/MessageList/VirtualizedMessageList.d.ts.map +1 -1
- package/dist/types/components/MessageList/VirtualizedMessageListComponents.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/MessageList/useEnrichedMessages.d.ts +3 -3
- package/dist/types/components/MessageList/hooks/MessageList/useEnrichedMessages.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/MessageList/useFloatingDateSeparatorMessageList.d.ts +2 -2
- package/dist/types/components/MessageList/hooks/MessageList/useFloatingDateSeparatorMessageList.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/MessageList/useMessageListElements.d.ts +1 -3
- package/dist/types/components/MessageList/hooks/MessageList/useMessageListElements.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/MessageList/useMessageListScrollManager.d.ts +1 -0
- package/dist/types/components/MessageList/hooks/MessageList/useMessageListScrollManager.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/MessageList/useScrollLocationLogic.d.ts +6 -25
- package/dist/types/components/MessageList/hooks/MessageList/useScrollLocationLogic.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.d.ts +1 -1
- package/dist/types/components/MessageList/hooks/MessageList/useUnreadMessagesNotification.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useFloatingDateSeparator.d.ts +2 -2
- package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useFloatingDateSeparator.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.d.ts +1 -1
- package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useNewMessageNotification.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.d.ts +1 -5
- package/dist/types/components/MessageList/hooks/VirtualizedMessageList/useUnreadMessagesNotificationVirtualized.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/useCanPaginateReplies.d.ts +32 -0
- package/dist/types/components/MessageList/hooks/useCanPaginateReplies.d.ts.map +1 -0
- package/dist/types/components/MessageList/hooks/useLastDeliveredData.d.ts +1 -0
- package/dist/types/components/MessageList/hooks/useLastDeliveredData.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/useLastReadData.d.ts +1 -0
- package/dist/types/components/MessageList/hooks/useLastReadData.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/useMarkRead.d.ts +5 -9
- package/dist/types/components/MessageList/hooks/useMarkRead.d.ts.map +1 -1
- package/dist/types/components/MessageList/hooks/useReceiptsByMessageId.d.ts +12 -0
- package/dist/types/components/MessageList/hooks/useReceiptsByMessageId.d.ts.map +1 -0
- package/dist/types/components/MessageList/hooks/useThreadHead.d.ts +9 -0
- package/dist/types/components/MessageList/hooks/useThreadHead.d.ts.map +1 -0
- package/dist/types/components/MessageList/messageSourceKey.d.ts +14 -0
- package/dist/types/components/MessageList/messageSourceKey.d.ts.map +1 -0
- package/dist/types/components/MessageList/renderMessages.d.ts +11 -9
- package/dist/types/components/MessageList/renderMessages.d.ts.map +1 -1
- package/dist/types/components/MessageList/utils.d.ts +22 -13
- package/dist/types/components/MessageList/utils.d.ts.map +1 -1
- package/dist/types/components/Modal/CloseButtonOnModalOverlay.d.ts.map +1 -1
- package/dist/types/components/Notifications/Notification.d.ts.map +1 -1
- package/dist/types/components/Notifications/NotificationList.d.ts.map +1 -1
- package/dist/types/components/Notifications/hooks/useNotificationApi.d.ts +3 -0
- package/dist/types/components/Notifications/hooks/useNotificationApi.d.ts.map +1 -1
- package/dist/types/components/Notifications/hooks/useNotificationTarget.d.ts.map +1 -1
- package/dist/types/components/Notifications/notificationTarget.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/AddCommentPrompt.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/EndPollAlert.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/PollActions.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/PollAnswerList.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/PollOptionsFullList.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/PollQuestion.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotes.d.ts +2 -2
- package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotes.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.d.ts +2 -2
- package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotesHeader.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotesList.d.ts +2 -2
- package/dist/types/components/Poll/PollActions/PollResults/PollOptionWithVotesList.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/PollResults/PollResults.d.ts.map +1 -1
- package/dist/types/components/Poll/PollActions/SuggestPollOptionPrompt.d.ts.map +1 -1
- package/dist/types/components/Poll/PollCreationDialog/MultipleAnswersField.d.ts.map +1 -1
- package/dist/types/components/Poll/PollCreationDialog/NameField.d.ts.map +1 -1
- package/dist/types/components/Poll/PollCreationDialog/OptionFieldSet.d.ts.map +1 -1
- package/dist/types/components/Poll/PollCreationDialog/PollCreationDialog.d.ts.map +1 -1
- package/dist/types/components/Poll/PollCreationDialog/PollCreationDialogControls.d.ts.map +1 -1
- package/dist/types/components/Poll/PollCreationDialog/PollOptionReorderHandle.d.ts.map +1 -1
- package/dist/types/components/Poll/PollHeader.d.ts.map +1 -1
- package/dist/types/components/Poll/PollOptionList.d.ts.map +1 -1
- package/dist/types/components/Poll/PollOptionSelector.d.ts +2 -2
- package/dist/types/components/Poll/PollOptionSelector.d.ts.map +1 -1
- package/dist/types/components/Poll/PollVote.d.ts +1 -1
- package/dist/types/components/Poll/PollVote.d.ts.map +1 -1
- package/dist/types/components/Poll/hooks/useManagePollVotesRealtime.d.ts +2 -2
- package/dist/types/components/Poll/hooks/useManagePollVotesRealtime.d.ts.map +1 -1
- package/dist/types/components/Poll/hooks/usePollAnswerPagination.d.ts +2 -2
- package/dist/types/components/Poll/hooks/usePollAnswerPagination.d.ts.map +1 -1
- package/dist/types/components/Poll/hooks/usePollOptionVotesPagination.d.ts +2 -2
- package/dist/types/components/Poll/hooks/usePollOptionVotesPagination.d.ts.map +1 -1
- package/dist/types/components/Reactions/MessageReactions.d.ts.map +1 -1
- package/dist/types/components/Reactions/MessageReactionsDetail.d.ts +2 -2
- package/dist/types/components/Reactions/MessageReactionsDetail.d.ts.map +1 -1
- package/dist/types/components/Reactions/ReactionSelector.d.ts.map +1 -1
- package/dist/types/components/Reactions/ReactionSelectorWithButton.d.ts +0 -5
- package/dist/types/components/Reactions/ReactionSelectorWithButton.d.ts.map +1 -1
- package/dist/types/components/Reactions/hooks/useFetchReactions.d.ts +2 -2
- package/dist/types/components/Reactions/hooks/useFetchReactions.d.ts.map +1 -1
- package/dist/types/components/Reactions/hooks/useProcessReactions.d.ts +1 -3
- package/dist/types/components/Reactions/hooks/useProcessReactions.d.ts.map +1 -1
- package/dist/types/components/Search/SearchBar/SearchBar.d.ts.map +1 -1
- package/dist/types/components/Search/SearchContext.d.ts.map +1 -1
- package/dist/types/components/Search/SearchResults/SearchResultItem.d.ts +20 -6
- package/dist/types/components/Search/SearchResults/SearchResultItem.d.ts.map +1 -1
- package/dist/types/components/Search/SearchResults/SearchResultsHeader.d.ts.map +1 -1
- package/dist/types/components/Search/SearchResults/SearchSourceResultsEmpty.d.ts.map +1 -1
- package/dist/types/components/Search/SearchResults/SearchSourceResultsLoadingIndicator.d.ts.map +1 -1
- package/dist/types/components/Search/SearchSourceResultsContext.d.ts.map +1 -1
- package/dist/types/components/Search/hooks/index.d.ts +0 -1
- package/dist/types/components/Search/hooks/index.d.ts.map +1 -1
- package/dist/types/components/SummarizedMessagePreview/SummarizedMessagePreview.d.ts +6 -0
- package/dist/types/components/SummarizedMessagePreview/SummarizedMessagePreview.d.ts.map +1 -1
- package/dist/types/components/SummarizedMessagePreview/hooks/useLatestMessagePreview.d.ts.map +1 -1
- package/dist/types/components/TextareaComposer/SuggestionList/CommandItem.d.ts +2 -2
- package/dist/types/components/TextareaComposer/SuggestionList/CommandItem.d.ts.map +1 -1
- package/dist/types/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.d.ts.map +1 -1
- package/dist/types/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.d.ts.map +1 -1
- package/dist/types/components/TextareaComposer/SuggestionList/MentionItem/UserGroupItem.d.ts.map +1 -1
- package/dist/types/components/TextareaComposer/SuggestionList/SuggestionList.d.ts.map +1 -1
- package/dist/types/components/TextareaComposer/TextareaComposer.d.ts.map +1 -1
- package/dist/types/components/TextareaComposer/hooks/useTextareaPlaceholder.d.ts.map +1 -1
- package/dist/types/components/Thread/Thread.d.ts +31 -27
- package/dist/types/components/Thread/Thread.d.ts.map +1 -1
- package/dist/types/components/Thread/ThreadHead.d.ts.map +1 -1
- package/dist/types/components/Thread/ThreadHeader.d.ts +13 -6
- package/dist/types/components/Thread/ThreadHeader.d.ts.map +1 -1
- package/dist/types/components/Thread/ThreadStart.d.ts.map +1 -1
- package/dist/types/components/Thread/index.d.ts +0 -1
- package/dist/types/components/Thread/index.d.ts.map +1 -1
- package/dist/types/components/Threads/ThreadContext.d.ts.map +1 -1
- package/dist/types/components/Threads/ThreadList/ThreadList.d.ts.map +1 -1
- package/dist/types/components/Threads/ThreadList/ThreadListEmptyPlaceholder.d.ts.map +1 -1
- package/dist/types/components/Threads/ThreadList/ThreadListHeader.d.ts.map +1 -1
- package/dist/types/components/Threads/ThreadList/ThreadListItemUI.d.ts.map +1 -1
- package/dist/types/components/Threads/ThreadList/ThreadListUnseenThreadsBanner.d.ts.map +1 -1
- package/dist/types/components/Threads/ThreadList/useThreadHighlighting.d.ts +15 -0
- package/dist/types/components/Threads/ThreadList/useThreadHighlighting.d.ts.map +1 -0
- package/dist/types/components/Threads/ThreadList/utils.a11y.d.ts.map +1 -1
- package/dist/types/components/Threads/hooks/useCloseThread.d.ts +9 -0
- package/dist/types/components/Threads/hooks/useCloseThread.d.ts.map +1 -0
- package/dist/types/components/Threads/index.d.ts +1 -0
- package/dist/types/components/Threads/index.d.ts.map +1 -1
- package/dist/types/components/TypingIndicator/TypingIndicator.d.ts +4 -5
- package/dist/types/components/TypingIndicator/TypingIndicator.d.ts.map +1 -1
- package/dist/types/components/TypingIndicator/TypingIndicatorHeader.d.ts +1 -1
- package/dist/types/components/TypingIndicator/TypingIndicatorHeader.d.ts.map +1 -1
- package/dist/types/components/TypingIndicator/hooks/useDebouncedTypingActive.d.ts +2 -2
- package/dist/types/components/TypingIndicator/hooks/useDebouncedTypingActive.d.ts.map +1 -1
- package/dist/types/components/TypingIndicator/utils/getTypingStatusMessage.d.ts +2 -3
- package/dist/types/components/TypingIndicator/utils/getTypingStatusMessage.d.ts.map +1 -1
- package/dist/types/components/VideoPlayer/ReactPlayerWrapper.d.ts +1 -1
- package/dist/types/components/VideoPlayer/ReactPlayerWrapper.d.ts.map +1 -1
- package/dist/types/components/VideoPlayer/VideoPlayer.d.ts +7 -1
- package/dist/types/components/VideoPlayer/VideoPlayer.d.ts.map +1 -1
- package/dist/types/components/VideoPlayer/VideoThumbnail.d.ts.map +1 -1
- package/dist/types/components/index.d.ts +0 -2
- package/dist/types/components/index.d.ts.map +1 -1
- package/dist/types/context/AttachmentContext.d.ts +19 -0
- package/dist/types/context/AttachmentContext.d.ts.map +1 -0
- package/dist/types/context/ChannelInstanceContext.d.ts +16 -0
- package/dist/types/context/ChannelInstanceContext.d.ts.map +1 -0
- package/dist/types/context/ChannelListContext.d.ts +9 -18
- package/dist/types/context/ChannelListContext.d.ts.map +1 -1
- package/dist/types/context/ChatContext.d.ts +10 -23
- package/dist/types/context/ChatContext.d.ts.map +1 -1
- package/dist/types/context/ComponentContext.d.ts +30 -20
- package/dist/types/context/ComponentContext.d.ts.map +1 -1
- package/dist/types/context/DialogManagerContext.d.ts.map +1 -1
- package/dist/types/context/MessageBounceContext.d.ts +1 -1
- package/dist/types/context/MessageBounceContext.d.ts.map +1 -1
- package/dist/types/context/MessageComposerContext.d.ts +7 -2
- package/dist/types/context/MessageComposerContext.d.ts.map +1 -1
- package/dist/types/context/MessageComposerControllerContext.d.ts +13 -0
- package/dist/types/context/MessageComposerControllerContext.d.ts.map +1 -0
- package/dist/types/context/MessageContext.d.ts +8 -21
- package/dist/types/context/MessageContext.d.ts.map +1 -1
- package/dist/types/context/MessageListContext.d.ts +2 -2
- package/dist/types/context/MessageListContext.d.ts.map +1 -1
- package/dist/types/context/MessageTranslationViewContext.d.ts.map +1 -1
- package/dist/types/context/ModalContext.d.ts +4 -0
- package/dist/types/context/ModalContext.d.ts.map +1 -1
- package/dist/types/context/PollContext.d.ts.map +1 -1
- package/dist/types/context/TranslationContext.d.ts +21 -11
- package/dist/types/context/TranslationContext.d.ts.map +1 -1
- package/dist/types/context/VirtualizedMessageListContext.d.ts.map +1 -1
- package/dist/types/context/WithComponents.d.ts.map +1 -1
- package/dist/types/context/WorkspaceNavigationContext.d.ts +128 -0
- package/dist/types/context/WorkspaceNavigationContext.d.ts.map +1 -0
- package/dist/types/context/index.d.ts +6 -4
- package/dist/types/context/index.d.ts.map +1 -1
- package/dist/types/context/requireContext.d.ts +10 -0
- package/dist/types/context/requireContext.d.ts.map +1 -0
- package/dist/types/context/useChannel.d.ts +3 -0
- package/dist/types/context/useChannel.d.ts.map +1 -0
- package/dist/types/context/useComponentContextIcons.d.ts +4 -6
- package/dist/types/context/useComponentContextIcons.d.ts.map +1 -1
- package/dist/types/hooks/index.d.ts +3 -0
- package/dist/types/hooks/index.d.ts.map +1 -0
- package/dist/types/hooks/useIsDmChannel.d.ts +13 -0
- package/dist/types/hooks/useIsDmChannel.d.ts.map +1 -0
- package/dist/types/hooks/useMessagePaginator.d.ts +6 -0
- package/dist/types/hooks/useMessagePaginator.d.ts.map +1 -0
- package/dist/types/i18n/Streami18n.d.ts +48 -847
- package/dist/types/i18n/Streami18n.d.ts.map +1 -1
- package/dist/types/i18n/TranslationBuilder/index.d.ts +6 -1
- package/dist/types/i18n/TranslationBuilder/index.d.ts.map +1 -1
- package/dist/types/i18n/TranslationBuilder/notifications/NotificationTranslationTopic.d.ts.map +1 -1
- package/dist/types/i18n/TranslationBuilder/notifications/translators.d.ts.map +1 -1
- package/dist/types/i18n/TranslationBuilder/notifications/translatorsByNotificationType.d.ts +3 -1
- package/dist/types/i18n/TranslationBuilder/notifications/translatorsByNotificationType.d.ts.map +1 -1
- package/dist/types/i18n/index.d.ts +2 -2
- package/dist/types/i18n/index.d.ts.map +1 -1
- package/dist/types/i18n/keys.d.ts +583 -0
- package/dist/types/i18n/keys.d.ts.map +1 -0
- package/dist/types/i18n/runtimeDefaults.d.ts +37 -0
- package/dist/types/i18n/runtimeDefaults.d.ts.map +1 -0
- package/dist/types/i18n/types.d.ts +34 -104
- package/dist/types/i18n/types.d.ts.map +1 -1
- package/dist/types/i18n/useStreami18n.d.ts +19 -0
- package/dist/types/i18n/useStreami18n.d.ts.map +1 -0
- package/dist/types/i18n/utils.d.ts +18 -14
- package/dist/types/i18n/utils.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/AvatarWithChannelDetail.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/ChannelDetail.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/ChannelDetailEmptyList.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/ChannelDetailSearchInput.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/SectionNavigator/SectionNavigatorHeader.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesEmptyList.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelFilesView/ChannelFilesView.utils.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementActions.defaults.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelManagementView/ChannelManagementView.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaEmptyList.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMediaView/ChannelMediaView.utils.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberActions.defaults.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMemberDetailView/ChannelMemberDetail.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersAddView.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersBrowseView.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersHeaderActions.defaults.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/ChannelMembersView/ChannelMembersView.utils.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesEmptyList.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/PinnedMessagesView/PinnedMessagesView.d.ts.map +1 -1
- package/dist/types/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesCount.d.ts +5 -1
- package/dist/types/plugins/ChannelDetail/Views/PinnedMessagesView/usePinnedMessagesCount.d.ts.map +1 -1
- package/dist/types/plugins/Emojis/EmojiPicker.d.ts +0 -4
- package/dist/types/plugins/Emojis/EmojiPicker.d.ts.map +1 -1
- package/dist/types/plugins/SlotGeometry/SlotGeometry.d.ts +72 -0
- package/dist/types/plugins/SlotGeometry/SlotGeometry.d.ts.map +1 -0
- package/dist/types/plugins/SlotGeometry/index.d.ts +3 -0
- package/dist/types/plugins/SlotGeometry/index.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/ChannelSlot.d.ts +24 -0
- package/dist/types/plugins/SlotLayout/ChannelSlot.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/ChatView.a11y.utility.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/ChatView.d.ts +113 -0
- package/dist/types/plugins/SlotLayout/ChatView.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/ChatViewNavigationContext.d.ts +111 -0
- package/dist/types/plugins/SlotLayout/ChatViewNavigationContext.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/ThreadListSlot.d.ts +8 -0
- package/dist/types/plugins/SlotLayout/ThreadListSlot.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/ThreadSlot.d.ts +10 -0
- package/dist/types/plugins/SlotLayout/ThreadSlot.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/hooks/index.d.ts +3 -0
- package/dist/types/plugins/SlotLayout/hooks/index.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/hooks/useLayoutViewState.d.ts +5 -0
- package/dist/types/plugins/SlotLayout/hooks/useLayoutViewState.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/hooks/useSlotEntity.d.ts +162 -0
- package/dist/types/plugins/SlotLayout/hooks/useSlotEntity.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/index.d.ts +12 -0
- package/dist/types/plugins/SlotLayout/index.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/layout/Slot.d.ts +8 -0
- package/dist/types/plugins/SlotLayout/layout/Slot.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/layout/WorkspaceLayout.d.ts +11 -0
- package/dist/types/plugins/SlotLayout/layout/WorkspaceLayout.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/layoutController/LayoutController.d.ts +25 -0
- package/dist/types/plugins/SlotLayout/layoutController/LayoutController.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/layoutController/layoutControllerTypes.d.ts +121 -0
- package/dist/types/plugins/SlotLayout/layoutController/layoutControllerTypes.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/layoutController/serialization.d.ts +6 -0
- package/dist/types/plugins/SlotLayout/layoutController/serialization.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/slotBinding.d.ts +85 -0
- package/dist/types/plugins/SlotLayout/slotBinding.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/slotRegistry.d.ts +60 -0
- package/dist/types/plugins/SlotLayout/slotRegistry.d.ts.map +1 -0
- package/dist/types/plugins/SlotLayout/workspaceNavigationAdapter.d.ts +26 -0
- package/dist/types/plugins/SlotLayout/workspaceNavigationAdapter.d.ts.map +1 -0
- package/dist/types/store/hooks/useStateStore.d.ts +1 -1
- package/dist/types/store/hooks/useStateStore.d.ts.map +1 -1
- package/dist/types/types/index.d.ts +0 -1
- package/dist/types/types/index.d.ts.map +1 -1
- package/dist/types/types/types.d.ts +0 -10
- package/dist/types/types/types.d.ts.map +1 -1
- package/dist/types/utils/getChannel.d.ts +2 -2
- package/dist/types/utils/getChannel.d.ts.map +1 -1
- package/dist/types/utils/useStableCallback.d.ts +1 -1
- package/package.json +34 -20
- package/dist/cjs/NotificationList.6abbee1c.js +0 -9459
- package/dist/cjs/NotificationList.6abbee1c.js.map +0 -1
- package/dist/cjs/useChannelHeaderOnlineStatus.7e17671e.js +0 -961
- package/dist/cjs/useChannelHeaderOnlineStatus.7e17671e.js.map +0 -1
- package/dist/cjs/useInertWhenHidden.22151beb.js +0 -6426
- package/dist/cjs/useInertWhenHidden.22151beb.js.map +0 -1
- package/dist/es/NotificationList.db01a56d.mjs +0 -7703
- package/dist/es/NotificationList.db01a56d.mjs.map +0 -1
- package/dist/es/ReactPlayerWrapper.d2ae5941.mjs.map +0 -1
- package/dist/es/audioProcessing.766ca76c.mjs.map +0 -1
- package/dist/es/channel-detail.mjs.map +0 -1
- package/dist/es/emojis.mjs.map +0 -1
- package/dist/es/index.mjs.map +0 -1
- package/dist/es/useChannelHeaderOnlineStatus.a9357343.mjs +0 -771
- package/dist/es/useChannelHeaderOnlineStatus.a9357343.mjs.map +0 -1
- package/dist/es/useInertWhenHidden.3d5fbdba.mjs +0 -5765
- package/dist/es/useInertWhenHidden.3d5fbdba.mjs.map +0 -1
- package/dist/types/components/Channel/channelState.d.ts +0 -90
- package/dist/types/components/Channel/channelState.d.ts.map +0 -1
- package/dist/types/components/Channel/hooks/useCreateChannelStateContext.d.ts +0 -6
- package/dist/types/components/Channel/hooks/useCreateChannelStateContext.d.ts.map +0 -1
- package/dist/types/components/Channel/hooks/useCreateTypingContext.d.ts +0 -3
- package/dist/types/components/Channel/hooks/useCreateTypingContext.d.ts.map +0 -1
- package/dist/types/components/Channel/hooks/useEditMessageHandler.d.ts +0 -5
- package/dist/types/components/Channel/hooks/useEditMessageHandler.d.ts.map +0 -1
- package/dist/types/components/Channel/hooks/useMentionsHandlers.d.ts +0 -10
- package/dist/types/components/Channel/hooks/useMentionsHandlers.d.ts.map +0 -1
- package/dist/types/components/Channel/utils.d.ts +0 -33
- package/dist/types/components/Channel/utils.d.ts.map +0 -1
- package/dist/types/components/ChannelList/ChannelListUI.d.ts +0 -18
- package/dist/types/components/ChannelList/ChannelListUI.d.ts.map +0 -1
- package/dist/types/components/ChannelList/hooks/useChannelListShape.d.ts +0 -61
- package/dist/types/components/ChannelList/hooks/useChannelListShape.d.ts.map +0 -1
- package/dist/types/components/ChannelList/hooks/useConnectionRecoveredListener.d.ts +0 -2
- package/dist/types/components/ChannelList/hooks/useConnectionRecoveredListener.d.ts.map +0 -1
- package/dist/types/components/ChannelList/hooks/usePaginatedChannels.d.ts +0 -29
- package/dist/types/components/ChannelList/hooks/usePaginatedChannels.d.ts.map +0 -1
- package/dist/types/components/ChannelList/utils.d.ts +0 -46
- package/dist/types/components/ChannelList/utils.d.ts.map +0 -1
- package/dist/types/components/Chat/hooks/useChannelsQueryState.d.ts +0 -12
- package/dist/types/components/Chat/hooks/useChannelsQueryState.d.ts.map +0 -1
- package/dist/types/components/ChatView/ChatView.a11y.utility.d.ts.map +0 -1
- package/dist/types/components/ChatView/ChatView.d.ts +0 -59
- package/dist/types/components/ChatView/ChatView.d.ts.map +0 -1
- package/dist/types/components/ChatView/index.d.ts +0 -2
- package/dist/types/components/ChatView/index.d.ts.map +0 -1
- package/dist/types/components/MessageComposer/AttachmentPreviewList/AttachmentUploadedSizeIndicator.d.ts +0 -14
- package/dist/types/components/MessageComposer/AttachmentPreviewList/AttachmentUploadedSizeIndicator.d.ts.map +0 -1
- package/dist/types/components/MessageComposer/hooks/useSubmitHandler.d.ts +0 -5
- package/dist/types/components/MessageComposer/hooks/useSubmitHandler.d.ts.map +0 -1
- package/dist/types/components/Search/hooks/useSearchFocusedMessage.d.ts +0 -2
- package/dist/types/components/Search/hooks/useSearchFocusedMessage.d.ts.map +0 -1
- package/dist/types/components/Thread/LegacyThreadContext.d.ts +0 -9
- package/dist/types/components/Thread/LegacyThreadContext.d.ts.map +0 -1
- package/dist/types/components/Window/Window.d.ts +0 -13
- package/dist/types/components/Window/Window.d.ts.map +0 -1
- package/dist/types/components/Window/index.d.ts +0 -2
- package/dist/types/components/Window/index.d.ts.map +0 -1
- package/dist/types/context/ChannelActionContext.d.ts +0 -46
- package/dist/types/context/ChannelActionContext.d.ts.map +0 -1
- package/dist/types/context/ChannelStateContext.d.ts +0 -51
- package/dist/types/context/ChannelStateContext.d.ts.map +0 -1
- package/dist/types/context/TypingContext.d.ts +0 -12
- package/dist/types/context/TypingContext.d.ts.map +0 -1
- package/dist/types/i18n/TranslationBuilder/TranslationBuilder.d.ts +0 -36
- package/dist/types/i18n/TranslationBuilder/TranslationBuilder.d.ts.map +0 -1
- package/dist/types/i18n/translations.d.ts +0 -14
- package/dist/types/i18n/translations.d.ts.map +0 -1
- package/dist/types/utils/getChannelConfig.d.ts +0 -8
- package/dist/types/utils/getChannelConfig.d.ts.map +0 -1
- /package/dist/types/{components/ChatView → plugins/SlotLayout}/ChatView.a11y.utility.d.ts +0 -0
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"useInertWhenHidden.22151beb.js","names":[],"sources":["../../src/components/AIStateIndicator/hooks/useAIState.ts","../../src/context/AttachmentSelectorContext.tsx","../../src/components/MessageComposer/preEditSnapshot.ts","../../src/context/MessageComposerContext.tsx","../../src/components/Accessibility/scheduling/useSettledAnnouncement.ts","../../src/components/Button/PlayButton.tsx","../../src/components/Loading/progress-indicators.tsx","../../src/components/Loading/UploadProgressIndicator.tsx","../../src/components/Loading/UploadedSizeIndicator.tsx","../../src/components/Dialog/components/Callout.tsx","../../src/components/Tooltip/Tooltip.tsx","../../src/components/Tooltip/hooks/useEnterLeaveHandlers.ts","../../src/components/Message/renderText/regex.ts","../../src/components/Message/renderText/rehypePlugins/mentionsMarkdownPlugin.ts","../../src/components/AudioPlayback/components/DurationDisplay.tsx","../../src/components/AudioPlayback/components/PlaybackRateButton.tsx","../../src/components/AudioPlayback/components/keyboardSeek.ts","../../src/components/AudioPlayback/components/progressBarA11y.ts","../../src/components/AudioPlayback/components/useInteractiveProgressBar.ts","../../src/components/Attachment/utils.tsx","../../src/components/Attachment/audioSampling.ts","../../src/components/AudioPlayback/components/WaveProgressBar.tsx","../../src/components/MessageComposer/hooks/useAttachmentManagerState.ts","../../src/components/MessageComposer/hooks/useAttachmentsForPreview.ts","../../src/components/MessageComposer/hooks/useCanCreatePoll.ts","../../src/components/MessageComposer/hooks/useCooldownRemaining.tsx","../../src/components/MessageComposer/hooks/useTextareaRef.ts","../../src/components/MessageComposer/hooks/useSubmitHandler.ts","../../src/components/ReactFileUtilities/UploadButton.tsx","../../src/components/MessageComposer/hooks/usePasteHandler.ts","../../src/components/MediaRecorder/observable/Subscription.ts","../../src/components/MediaRecorder/observable/Observer.ts","../../src/components/MediaRecorder/observable/Observable.ts","../../src/components/MediaRecorder/observable/Subject.ts","../../src/components/MediaRecorder/observable/BehaviorSubject.ts","../../src/components/MediaRecorder/classes/BrowserPermission.ts","../../src/utils/mergeDeep.ts","../../src/components/MediaRecorder/classes/AmplitudeRecorder.ts","../../src/components/MediaRecorder/transcode/wav.ts","../../src/components/MediaRecorder/transcode/index.ts","../../src/components/MediaRecorder/classes/MediaRecorderController.ts","../../src/components/MediaRecorder/hooks/useMediaRecorder.ts","../../src/components/MessageComposer/hooks/useMessageComposerBindings.ts","../../src/components/MessageComposer/hooks/useMessageComposerCommands.ts","../../src/components/MessageComposer/hooks/useMessageComposerHasSendableData.ts","../../src/components/MessageComposer/hooks/useMessageContentIsEmpty.ts","../../src/components/MessageComposer/RemoveAttachmentPreviewButton.tsx","../../src/components/MessageComposer/QuotedMessageIndicator.tsx","../../src/components/MessageComposer/QuotedMessagePreview.tsx","../../src/components/Form/Dropdown.tsx","../../src/components/Location/ShareLocationDialog.tsx","../../src/components/Form/NumericInput.tsx","../../src/components/DragAndDrop/DragAndDropContainer.tsx","../../src/components/Form/TextInputFieldSet.tsx","../../src/components/InfiniteScrollPaginator/InfiniteScrollPaginator.tsx","../../src/components/Poll/PollCreationDialog/MultipleAnswersField.tsx","../../src/components/Poll/PollCreationDialog/NameField.tsx","../../src/components/Poll/PollCreationDialog/PollOptionReorderHandle.tsx","../../src/components/Poll/PollCreationDialog/OptionFieldSet.tsx","../../src/components/Poll/PollCreationDialog/PollCreationDialogControls.tsx","../../src/components/Poll/PollCreationDialog/PollCreationDialog.tsx","../../src/components/MessageComposer/hooks/useIsCooldownActive.ts","../../src/components/MessageComposer/AttachmentSelector/CommandsMenu.tsx","../../src/components/MessageComposer/AttachmentSelector/AttachmentSelector.tsx","../../src/components/MessageComposer/AttachmentPreviewList/UnsupportedAttachmentPreview.tsx","../../src/components/MessageComposer/AttachmentPreviewList/AttachmentUploadedSizeIndicator.tsx","../../src/components/MessageComposer/AttachmentPreviewList/utils/AttachmentPreviewRoot.tsx","../../src/components/MessageComposer/AttachmentPreviewList/FileAttachmentPreview.tsx","../../src/components/MessageComposer/AttachmentPreviewList/AudioAttachmentPreview.tsx","../../src/components/Badge/MediaBadge.tsx","../../src/components/MessageComposer/AttachmentPreviewList/MediaAttachmentPreview.tsx","../../src/components/MessageComposer/AttachmentPreviewList/AttachmentPreviewList.tsx","../../src/components/MessageComposer/AttachmentPreviewList/VoiceRecordingPreviewSlot.tsx","../../src/components/MessageComposer/CommandChip.tsx","../../src/components/MessageComposer/CooldownTimer.tsx","../../src/components/MessageComposer/icons.tsx","../../src/components/MessageComposer/LinkPreviewList.tsx","../../src/components/MediaRecorder/RecordingPermissionDeniedNotification.tsx","../../src/components/MediaRecorder/AudioRecorder/AudioRecordingPlayback.tsx","../../src/components/MediaRecorder/AudioRecorder/hooks/useTimeElapsed.ts","../../src/components/MediaRecorder/AudioRecorder/RecordingTimer.tsx","../../src/components/MediaRecorder/AudioRecorder/AudioRecordingPreview.tsx","../../src/components/MediaRecorder/AudioRecorder/recordingStateIdentity.ts","../../src/components/MediaRecorder/AudioRecorder/AudioRecorderRecordingControls.tsx","../../src/components/MediaRecorder/AudioRecorder/AudioRecorder.tsx","../../src/components/MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification.tsx","../../src/components/MessageComposer/EditedMessagePreview.tsx","../../src/components/MessageComposer/SendToChannelCheckbox.tsx","../../src/components/TextareaComposer/SuggestionList/CommandItem.tsx","../../src/components/TextareaComposer/SuggestionList/EmoticonItem.tsx","../../src/components/TextareaComposer/SuggestionList/MentionItem/MentionSuggestionTitle.tsx","../../src/components/TextareaComposer/SuggestionList/MentionItem/BroadcastMentionItem.tsx","../../src/components/TextareaComposer/SuggestionList/TokenizedSuggestionParts.tsx","../../src/components/TextareaComposer/SuggestionList/MentionItem/RoleItem.tsx","../../src/components/TextareaComposer/SuggestionList/MentionItem/SpecialMentionItem.tsx","../../src/components/TextareaComposer/SuggestionList/MentionItem/UserGroupItem.tsx","../../src/components/TextareaComposer/SuggestionList/MentionItem/UserItem.tsx","../../src/components/TextareaComposer/SuggestionList/MentionItem/MentionItem.tsx","../../src/components/TextareaComposer/SuggestionList/SuggestionListItem.tsx","../../src/utils/getTextareaCaretRect.ts","../../src/components/TextareaComposer/SuggestionList/SuggestionList.tsx","../../src/components/TextareaComposer/hooks/useTextareaPlaceholder.ts","../../src/components/TextareaComposer/TextareaComposer.tsx","../../src/components/MessageComposer/WithDragAndDropUpload.tsx","../../src/components/MessageComposer/StopAIGenerationButton.tsx","../../src/components/MessageComposer/SendButton.tsx","../../src/components/MessageComposer/MessageComposerActions.tsx","../../src/components/MessageComposer/AttachmentPreviewList/GeolocationPreview.tsx","../../src/components/MessageComposer/MessageComposerUI.tsx","../../src/components/MessageComposer/hooks/useCreateMessageComposerContext.ts","../../src/components/MessageComposer/MessageComposer.tsx","../../src/components/MessageComposer/hooks/useMessageComposerController.ts","../../src/components/Accessibility/hooks/useInertWhenHidden.ts"],"sourcesContent":["import { useEffect, useState } from 'react';\nimport type { AIState, Channel, Event } from 'stream-chat';\n\nexport const AIStates = {\n Error: 'AI_STATE_ERROR',\n ExternalSources: 'AI_STATE_EXTERNAL_SOURCES',\n Generating: 'AI_STATE_GENERATING',\n Idle: 'AI_STATE_IDLE',\n Stop: 'AI_STATE_STOP',\n Thinking: 'AI_STATE_THINKING',\n};\n\n/**\n * A hook that returns the current state of the AI.\n * @param {Channel} channel - The channel for which we want to know the AI state.\n * @returns {{ aiState: AIState }} The current AI state for the given channel.\n */\nexport const useAIState = (channel?: Channel): { aiState: AIState } => {\n const [aiState, setAiState] = useState<AIState>(AIStates.Idle);\n\n useEffect(() => {\n if (!channel) {\n return;\n }\n\n const indicatorChangedListener = channel.on('ai_indicator.update', (event: Event) => {\n const { cid } = event;\n const state = event.ai_state as AIState;\n if (channel.cid === cid) {\n setAiState(state);\n }\n });\n\n const indicatorClearedListener = channel.on('ai_indicator.clear', (event) => {\n const { cid } = event;\n if (channel.cid === cid) {\n setAiState(AIStates.Idle);\n }\n });\n\n const indicatorStoppedListener = channel.on('ai_indicator.stop', (event) => {\n const { cid } = event;\n if (channel.cid === cid) {\n setAiState(AIStates.Stop);\n }\n });\n\n return () => {\n indicatorChangedListener.unsubscribe();\n indicatorClearedListener.unsubscribe();\n indicatorStoppedListener.unsubscribe();\n };\n }, [channel]);\n\n return { aiState };\n};\n","import type { PropsWithChildren } from 'react';\nimport React, { createContext, useContext } from 'react';\n\nexport type AttachmentSelectorContextValue = {\n fileInput: HTMLInputElement | null;\n};\n\nconst AttachmentSelectorContext = createContext<AttachmentSelectorContextValue>({\n fileInput: null,\n});\n\nexport const AttachmentSelectorContextProvider = ({\n children,\n value,\n}: PropsWithChildren<{ value: AttachmentSelectorContextValue }>) => (\n <AttachmentSelectorContext.Provider value={value}>\n {children}\n </AttachmentSelectorContext.Provider>\n);\n\nexport const useAttachmentSelectorContext = () => useContext(AttachmentSelectorContext);\n","import type { MessageComposer } from 'stream-chat';\n\ntype RestoreFunction = () => void;\n\nconst snapshots = new WeakMap<MessageComposer, RestoreFunction>();\n\n/**\n * Captures a full state snapshot of the composer before entering edit mode.\n * Does nothing if a snapshot already exists (e.g. switching between edits).\n */\nexport const savePreEditSnapshot = (messageComposer: MessageComposer) => {\n if (snapshots.has(messageComposer)) return;\n\n const composerState = messageComposer.state.getLatestValue();\n const textState = messageComposer.textComposer.state.getLatestValue();\n const attachmentState = messageComposer.attachmentManager.state.getLatestValue();\n const linkPreviewState = messageComposer.linkPreviewsManager.state.getLatestValue();\n const locationState = messageComposer.locationComposer.state.getLatestValue();\n const pollState = messageComposer.pollComposer.state.getLatestValue();\n const customDataState = messageComposer.customDataManager.state.getLatestValue();\n\n snapshots.set(messageComposer, () => {\n messageComposer.state.next(composerState);\n messageComposer.textComposer.state.next(textState);\n messageComposer.attachmentManager.state.next(attachmentState);\n messageComposer.linkPreviewsManager.state.next(linkPreviewState);\n messageComposer.locationComposer.state.next(locationState);\n messageComposer.pollComposer.state.next(pollState);\n messageComposer.customDataManager.state.next(customDataState);\n });\n};\n\n/**\n * Restores the composer to the state captured before editing began.\n * Falls back to `clear()` if no snapshot exists.\n */\nexport const restorePreEditSnapshot = (messageComposer: MessageComposer) => {\n const restore = snapshots.get(messageComposer);\n snapshots.delete(messageComposer);\n if (restore) {\n restore();\n } else {\n messageComposer.clear();\n }\n};\n\n/**\n * Discards the snapshot without restoring (e.g. after a successful edit save).\n */\nexport const discardPreEditSnapshot = (messageComposer: MessageComposer) => {\n snapshots.delete(messageComposer);\n};\n","import React, { createContext, useContext } from 'react';\nimport type { PropsWithChildren } from 'react';\n\nimport type { MessageComposerProps } from '../components/MessageComposer';\nimport type { UseMessageComposerBindingsParams } from '../components/MessageComposer/hooks/useMessageComposerBindings';\n\nexport type MessageComposerContextValue = UseMessageComposerBindingsParams &\n Omit<MessageComposerProps, 'Input'>;\n\nexport const MessageComposerContext = createContext<\n UseMessageComposerBindingsParams | undefined\n>(undefined);\n\nexport const MessageComposerContextProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: MessageComposerContextValue;\n}>) => (\n <MessageComposerContext.Provider\n value={value as unknown as MessageComposerContextValue}\n >\n {children}\n </MessageComposerContext.Provider>\n);\n\nexport const useMessageComposerContext = (\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n componentName?: string,\n) => {\n const contextValue = useContext(MessageComposerContext);\n\n if (!contextValue) {\n return {} as MessageComposerContextValue;\n }\n\n return contextValue as unknown as MessageComposerContextValue;\n};\n","import { useEffect, useRef } from 'react';\n\nimport type { AriaLiveAnnounce, AriaLivePriority } from '../useAriaLiveAnnouncer';\n\nexport type UseSettledAnnouncementParams = {\n /**\n * While `true`, the announcement is (re)scheduled; when it flips back to `false` the armed/spoken\n * state resets, so the message can fire again the next time `active` becomes `true`.\n */\n active: boolean;\n /** The message to announce. The latest value is used when the announcement fires. */\n message: string;\n /**\n * A value whose identity changes whenever the surrounding UI is still \"in motion\" — e.g. the\n * array/string being edited, or a counter you bump on each relevant change. Every change restarts\n * the idle timer, so the announcement only fires once activity has stopped. Pass a value that is\n * stable between changes (an immutably-updated array/string works; avoid a fresh object literal\n * each render, which would reset the timer forever).\n */\n settleKey: unknown;\n /** Idle window (ms) the `settleKey` must be unchanged before announcing. Default `1500`. */\n idleMs?: number;\n /** Announce at most once per `active` epoch. When `false`, re-announces each time it settles again\n * while still active. Default `true`. */\n once?: boolean;\n /** Live-region priority. Default `'polite'`. */\n priority?: AriaLivePriority;\n};\n\n/**\n * Announce a message via a live region, but only after the surrounding UI has gone idle.\n *\n * Use this when an immediate announcement would be **swallowed by the screen reader's own speech** —\n * its typing echo, or the field/group re-read it performs when nearby DOM mutates. Such a read-out\n * supersedes a competing live-region update *at any priority*, so the fix is not to fight it but to\n * wait it out: each change to `settleKey` restarts an idle timer, and the message is announced only\n * once the user has paused and the screen reader has fallen quiet — landing in a calm moment instead\n * of being cut off.\n *\n * Typical shape: `active` is the condition that makes the announcement relevant (e.g. some controls\n * just became available), and `settleKey` is the thing still changing (e.g. the list/text being\n * edited). The announcement fires once per `active` epoch and re-arms when `active` goes false.\n *\n * Composable L2 policy over `announce` (from `useAriaLiveAnnouncer`), like\n * {@link useDebouncedAnnounce}. React 17/18/19 compatible — `useEffect`/`useRef` only; the pending\n * timer is cleared on unmount.\n *\n * ## When to use this vs. {@link useDebouncedAnnounce}\n *\n * Both wait out screen-reader noise (the typing echo / field re-read) before speaking, but they\n * model different problems:\n *\n * - **`useSettledAnnouncement` — a declarative ONE-SHOT cue for a STATE CHANGE.** You pass\n * `{ active, message, settleKey }` and it reacts: it announces *once* when `active`, deferred\n * until `settleKey` stops changing, then stays silent until `active` flips false and true again.\n * The message is fixed; the point is \"say this single fact once the UI settles\". Canonical case:\n * \"the reorder/remove controls just became available\" once the option list stops mutating.\n *\n * - **{@link useDebouncedAnnounce} — an imperative throttle for a value you announce REPEATEDLY.**\n * You call `announce(key, message, ...)` yourself whenever you have a fresh value; rapid calls on\n * a key collapse to the last. The message typically *changes* and it fires *again and again* (once\n * per pause). Canonical case: the autocomplete result count re-announced as the user keeps typing.\n * It has no notion of `active`/`once`/re-arming.\n *\n * | | `useDebouncedAnnounce` | `useSettledAnnouncement` |\n * | --- | --- | --- |\n * | Style | Imperative — you call `announce(key, …)` | Declarative — reacts to `{ active, message, settleKey }` |\n * | Repetition | Fires repeatedly, once per pause | Once per `active` epoch (re-arms on reset) |\n * | Message | Typically changes each time | Fixed fact |\n * | Timer reset | Each explicit call | Each `settleKey` change |\n * | Streams | Many, independent per `key` | One logical cue |\n * | Canonical case | Autocomplete count while typing | \"Controls just became available\" |\n *\n * Rule of thumb: announcing a **fixed fact once, after things settle** → this hook. Announcing the\n * **latest value of a changing thing** (repeatedly) → `useDebouncedAnnounce`.\n */\nexport const useSettledAnnouncement = (\n announce: AriaLiveAnnounce,\n {\n active,\n idleMs = 1500,\n message,\n once = true,\n priority = 'polite',\n settleKey,\n }: UseSettledAnnouncementParams,\n) => {\n const announcedRef = useRef(false);\n const timeoutRef = useRef<ReturnType<typeof setTimeout> | null>(null);\n\n // Keep the latest announce/message without making them reset the idle timer (only `settleKey`\n // should do that).\n const announceRef = useRef(announce);\n announceRef.current = announce;\n const messageRef = useRef(message);\n messageRef.current = message;\n\n useEffect(() => {\n const clearPending = () => {\n if (timeoutRef.current) {\n clearTimeout(timeoutRef.current);\n timeoutRef.current = null;\n }\n };\n\n if (!active) {\n announcedRef.current = false;\n clearPending();\n return;\n }\n\n if (once && announcedRef.current) return;\n\n // Restart the idle timer on every `settleKey` change so the message lands only after activity\n // stops (after the screen reader's typing echo / field re-read, not during it).\n clearPending();\n timeoutRef.current = setTimeout(() => {\n timeoutRef.current = null;\n announcedRef.current = true;\n announceRef.current(messageRef.current, { priority });\n }, idleMs);\n }, [active, idleMs, once, priority, settleKey]);\n\n useEffect(\n () => () => {\n if (timeoutRef.current) clearTimeout(timeoutRef.current);\n },\n [],\n );\n};\n","import React from 'react';\nimport { Button } from './Button';\nimport type { ComponentProps } from 'react';\nimport clsx from 'clsx';\nimport { useComponentContextIcons, useTranslationContext } from '../../context';\n\nexport type PlayButtonProps = ComponentProps<'button'> & {\n isPlaying: boolean;\n};\n\nexport const PlayButton = ({ className, isPlaying, ...props }: PlayButtonProps) => {\n const { IconPauseFill, IconPlayFill } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n return (\n <Button\n appearance='outline'\n aria-label={isPlaying ? t('aria/Pause') : t('aria/Play')}\n circular\n className={clsx('str-chat__button-play', className)}\n data-testid={isPlaying ? 'pause-audio' : 'play-audio'}\n size='sm'\n variant='secondary'\n {...props}\n >\n {isPlaying ? <IconPauseFill /> : <IconPlayFill />}\n </Button>\n );\n};\n","import React from 'react';\n\nimport { useTranslationContext } from '../../context/TranslationContext';\n\nexport type ProgressIndicatorProps = {\n /** Clamped 0–100 completion. */\n percent: number;\n};\n\nconst RING_RADIUS = 12;\nconst RING_CIRCUMFERENCE = 2 * Math.PI * RING_RADIUS;\n\n/** Circular progress indicator with input from 0 to 100. */\nexport const CircularProgressIndicator = ({ percent }: ProgressIndicatorProps) => {\n const { t } = useTranslationContext('CircularProgressIndicator');\n const dashOffset = RING_CIRCUMFERENCE * (1 - percent / 100);\n\n return (\n <div className='str-chat__circular-progress-indicator str-chat__progress-indicator'>\n <svg\n aria-label={t('aria/Percent complete', { percent })}\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={percent}\n data-testid='circular-progress-ring'\n height='100%'\n role='progressbar'\n viewBox='0 0 32 32'\n width='100%'\n xmlns='http://www.w3.org/2000/svg'\n >\n <circle\n cx='16'\n cy='16'\n fill='none'\n r={RING_RADIUS}\n stroke='currentColor'\n strokeOpacity={0.35}\n strokeWidth='2.5'\n />\n <circle\n cx='16'\n cy='16'\n fill='none'\n r={RING_RADIUS}\n stroke='currentColor'\n strokeDasharray={RING_CIRCUMFERENCE}\n strokeDashoffset={dashOffset}\n strokeLinecap='round'\n strokeWidth='2.5'\n transform='rotate(-90 16 16)'\n />\n </svg>\n </div>\n );\n};\n","import React from 'react';\n\nimport { useComponentContext } from '../../context';\nimport { CircularProgressIndicator as DefaultProgressIndicator } from './progress-indicators';\nimport { LoadingIndicator as DefaultLoadingIndicator } from './LoadingIndicator';\n\nexport type UploadProgressIndicatorProps = {\n uploadProgress?: number;\n};\n\nexport const UploadProgressIndicator = ({\n uploadProgress,\n}: UploadProgressIndicatorProps) => {\n const {\n LoadingIndicator = DefaultLoadingIndicator,\n ProgressIndicator = DefaultProgressIndicator,\n } = useComponentContext();\n\n if (uploadProgress === undefined) {\n return <LoadingIndicator data-testid='loading-indicator' />;\n }\n\n return <ProgressIndicator percent={uploadProgress} />;\n};\n","import React from 'react';\n\nimport { useComponentContext } from '../../context';\nimport { FileSizeIndicator as DefaultFileSizeIndicator } from '../Attachment/components/FileSizeIndicator';\n\nexport type UploadedSizeIndicatorProps = {\n fullBytes: number;\n uploadedBytes: number;\n};\n\nexport const UploadedSizeIndicator = ({\n fullBytes,\n uploadedBytes,\n}: UploadedSizeIndicatorProps) => {\n const { FileSizeIndicator = DefaultFileSizeIndicator } = useComponentContext();\n return (\n <div\n className='str-chat__attachment-preview-file__upload-size-fraction'\n data-testid='upload-size-fraction'\n >\n <FileSizeIndicator fileSize={uploadedBytes} /> {` / `}\n <FileSizeIndicator fileSize={fullBytes} />\n </div>\n );\n};\n","import React, { type PropsWithChildren } from 'react';\nimport { DialogAnchor, type DialogAnchorProps } from '../service';\nimport { useDialogIsOpen } from '../hooks';\nimport { Button } from '../../Button';\nimport clsx from 'clsx';\nimport {\n useComponentContext,\n useComponentContextIcons,\n useTranslationContext,\n} from '../../../context';\n\nexport type CalloutProps = PropsWithChildren<\n DialogAnchorProps & {\n onClose: () => void;\n className?: string;\n }\n>;\n\n/**\n * Callout is a general purpose component that displays content in dialog that has been previously opened by clicking on a reference element\n * and has to be dismissed to disappear.\n * Tooltip on the other side is a dialog that appears upon pointer device cursor hovering above a reference element.\n * @param children\n * @param className\n * @param dialogManagerId\n * @param dialogId\n * @param onClose\n * @param anchorProps\n * @constructor\n */\n\nexport const Callout = ({\n children,\n className,\n dialogManagerId,\n id: dialogId,\n onClose,\n ...anchorProps\n}: CalloutProps) => {\n const { CalloutDialog = DefaultCalloutDialog } = useComponentContext();\n\n const dialogIsOpen = useDialogIsOpen(dialogId, dialogManagerId);\n return (\n <DialogAnchor {...anchorProps} dialogManagerId={dialogManagerId} id={dialogId}>\n {dialogIsOpen && (\n <CalloutDialog className={className} onClose={onClose}>\n {children}\n </CalloutDialog>\n )}\n </DialogAnchor>\n );\n};\n\nexport type CalloutDialogProps = Pick<CalloutProps, 'children' | 'className' | 'onClose'>;\n\nconst DefaultCalloutDialog = ({ children, className, onClose }: CalloutDialogProps) => {\n const { IconXmark } = useComponentContextIcons();\n const { t } = useTranslationContext();\n\n return (\n <div className='str-chat__callout'>\n {children}\n <Button\n appearance='ghost'\n aria-label={t('aria/Close callout dialog')}\n circular\n className={clsx(className, 'str-chat__callout__close-button')}\n onClick={onClose}\n size='sm'\n variant='secondary'\n >\n <IconXmark />\n </Button>\n </div>\n );\n};\n","import type { ComponentProps } from 'react';\nimport React, { useEffect, useState } from 'react';\nimport type { PopperLikePlacement } from '../Dialog';\nimport { usePopoverPosition } from '../Dialog/hooks/usePopoverPosition';\nimport clsx from 'clsx';\n\nexport const Tooltip = ({ children, className, ...rest }: ComponentProps<'div'>) => (\n <div className={clsx('str-chat__tooltip', className)} {...rest}>\n {children}\n </div>\n);\n\nexport type PopperTooltipProps<T extends HTMLElement> = React.PropsWithChildren<{\n /** Reference element to which the tooltip should attach to */\n referenceElement: T | null;\n /** Custom class to be merged along the defaults */\n className?: string;\n /** Popper's modifier (offset) property - [xAxis offset, yAxis offset], default [0, 10] */\n offset?: [number, number];\n /** Popper's placement property defining default position of the tooltip, default 'top' */\n placement?: PopperLikePlacement;\n /** Tells component whether to render its contents */\n visible?: boolean;\n}>;\n\nexport const PopperTooltip = <T extends HTMLElement>({\n children,\n className,\n offset = [0, 10],\n placement = 'top',\n referenceElement,\n visible = false,\n}: PopperTooltipProps<T>) => {\n const [popperElement, setPopperElement] = useState<HTMLDivElement | null>(null);\n const {\n placement: resolvedPlacement,\n refs,\n strategy,\n x,\n y,\n } = usePopoverPosition({\n offset,\n placement,\n });\n\n useEffect(() => {\n refs.setReference(referenceElement);\n }, [referenceElement, refs]);\n\n useEffect(() => {\n refs.setFloating(popperElement);\n }, [popperElement, refs]);\n\n if (!visible) return null;\n\n return (\n <div\n className={clsx('str-chat__tooltip', className)}\n data-placement={resolvedPlacement}\n ref={setPopperElement}\n style={{ left: x ?? 0, position: strategy, top: y ?? 0 }}\n >\n {children}\n </div>\n );\n};\n","import type React from 'react';\nimport { useCallback, useState } from 'react';\n\nexport const useEnterLeaveHandlers = <T extends HTMLElement>({\n onMouseEnter,\n onMouseLeave,\n}: Partial<Record<'onMouseEnter' | 'onMouseLeave', React.MouseEventHandler<T>>> = {}) => {\n const [tooltipVisible, setTooltipVisible] = useState(false);\n\n const handleEnter: React.MouseEventHandler<T> = useCallback(\n (e) => {\n setTooltipVisible(true);\n onMouseEnter?.(e);\n },\n [onMouseEnter],\n );\n\n const handleLeave: React.MouseEventHandler<T> = useCallback(\n (e) => {\n setTooltipVisible(false);\n onMouseLeave?.(e);\n },\n [onMouseLeave],\n );\n\n return { handleEnter, handleLeave, tooltipVisible };\n};\n","export function escapeRegExp(text: string) {\n return text.replace(/[-[\\]{}()*+?.,/\\\\^$|#]/g, '\\\\$&');\n}\n\nexport const detectHttp = /(http(s?):\\/\\/)?(www\\.)?/i;\n\n// Regexes are hoisted to module scope so they are compiled once rather than on\n// every call. `codeRegex`/`regexMdLinks` are only used with `String#match`\n// (which resets `lastIndex`) and `singleMatch` is non-global (`.exec` ignores\n// `lastIndex`), so sharing the instances is safe.\nconst codeRegex = /```[a-z]*\\n[\\s\\S]*?\\n```|`[a-z]*[\\s\\S]*?`/gm;\nconst regexMdLinks = /\\[([^[]+)\\](\\(.*\\))/gm;\nconst singleMatch = /\\[([^[]+)\\]\\((.*)\\)/;\n\nexport const messageCodeBlocks = (message: string) => {\n const matches = message.match(codeRegex);\n return matches || [];\n};\n\nexport const matchMarkdownLinks = (message: string) => {\n const matches = message.match(regexMdLinks);\n\n const links = matches\n ? matches.map((match) => {\n const i = singleMatch.exec(match);\n return i && [i[1], i[2]];\n })\n : [];\n\n return links.flat();\n};\n","import { escapeRegExp } from '../regex';\nimport type { ReplaceFunction } from 'hast-util-find-and-replace';\nimport { findAndReplace } from 'hast-util-find-and-replace';\nimport { u } from 'unist-builder';\nimport { visit } from 'unist-util-visit';\n\nimport type { Element } from 'hast';\nimport type { LocalMessage, UserGroupResponse, UserResponse } from 'stream-chat';\n\nexport type RenderTextMentionEntity =\n | (UserResponse & {\n mentionType: 'user';\n })\n | {\n id: 'channel';\n mentionType: 'channel';\n name?: 'channel';\n }\n | {\n id: 'here';\n mentionType: 'here';\n name?: 'here';\n }\n | {\n id: string;\n mentionType: 'role';\n name?: string;\n }\n | {\n id: string;\n mentionType: 'user_group';\n name?: string;\n };\n\nexport type RenderTextMentionMetadata = Pick<\n Partial<LocalMessage>,\n | 'mentioned_channel'\n | 'mentioned_groups'\n | 'mentioned_here'\n | 'mentioned_roles'\n | 'mentioned_users'\n>;\n\ntype MentionReplacement = {\n entity: RenderTextMentionEntity;\n mentionDisplayText: string;\n};\n\ntype MentionLookup = {\n mentionDisplayTextSet: Set<string>;\n mentionReplacementMap: Map<string, MentionReplacement>;\n mentionReplacements: MentionReplacement[];\n mentionsRegex: RegExp | null;\n};\n\ntype MentionPluginAndDisplayTextSet = {\n mentionDisplayTextSet: Set<string>;\n plugin: () => (tree: HastTree) => void;\n};\n\ntype HastTree = Parameters<typeof findAndReplace>[0];\ntype MentionTraversalParent = {\n children: unknown[];\n};\ntype TextNode = {\n type: 'text';\n value: string;\n};\n\n// Mention matches may end at the end of the string, before whitespace,\n// or before common trailing punctuation that should stay outside the mention node.\nconst MENTION_TRAILING_BOUNDARY = String.raw`(?=$|\\s|[!,.?;:'\")\\]}])`;\n\nconst isUserMentionEntity = (\n entity: RenderTextMentionEntity,\n): entity is Extract<RenderTextMentionEntity, { mentionType: 'user' }> =>\n entity.mentionType === 'user';\n\n// Mention display text is the exact substring found in the message text and wrapped by the mention renderer.\nexport const getMentionDisplayTexts = (entity: RenderTextMentionEntity) => {\n if (entity.mentionType === 'user') {\n return [entity.name || entity.id].filter(Boolean);\n }\n\n if (entity.mentionType === 'channel' || entity.mentionType === 'here') {\n return [entity.name || entity.id];\n }\n\n return Array.from(new Set([entity.name, entity.id].filter(Boolean)));\n};\n\nexport const getRenderTextMentionEntities = (\n metadata?: RenderTextMentionMetadata,\n): RenderTextMentionEntity[] => {\n if (!metadata) return [];\n\n const mentions: RenderTextMentionEntity[] = (metadata.mentioned_users ?? []).map(\n (user) => ({\n ...user,\n mentionType: 'user',\n }),\n );\n\n if (metadata.mentioned_channel) {\n mentions.push({\n id: 'channel',\n mentionType: 'channel',\n name: 'channel',\n });\n }\n\n if (metadata.mentioned_here) {\n mentions.push({\n id: 'here',\n mentionType: 'here',\n name: 'here',\n });\n }\n\n if (metadata.mentioned_roles?.length) {\n mentions.push(\n ...metadata.mentioned_roles.map((role) => ({\n id: role,\n mentionType: 'role' as const,\n name: role,\n })),\n );\n }\n\n if (metadata.mentioned_groups?.length) {\n mentions.push(\n ...metadata.mentioned_groups.map((group: UserGroupResponse) => ({\n id: group.id,\n mentionType: 'user_group' as const,\n name: group.name,\n })),\n );\n }\n\n return mentions;\n};\n\nconst toRenderTextMentionEntities = (\n mentionEntities: RenderTextMentionEntity[] | UserResponse[],\n): RenderTextMentionEntity[] =>\n mentionEntities.map((entity) =>\n 'mentionType' in entity\n ? entity\n : {\n ...entity,\n mentionType: 'user',\n },\n );\n\nconst createMentionLookup = (\n mentionEntitiesOrUsers: RenderTextMentionEntity[] | UserResponse[],\n): MentionLookup => {\n const mentionEntities = toRenderTextMentionEntities(mentionEntitiesOrUsers);\n const mentionReplacementMap = mentionEntities.reduce((replacementMap, entity) => {\n getMentionDisplayTexts(entity).forEach((mentionDisplayText) => {\n const prefixedMentionDisplayText = `@${mentionDisplayText}`;\n\n if (!replacementMap.has(prefixedMentionDisplayText)) {\n replacementMap.set(prefixedMentionDisplayText, {\n entity,\n mentionDisplayText: prefixedMentionDisplayText,\n });\n }\n });\n\n return replacementMap;\n }, new Map<string, MentionReplacement>());\n const mentionReplacements = Array.from(mentionReplacementMap.values()).sort(\n (a, b) => b.mentionDisplayText.length - a.mentionDisplayText.length,\n );\n\n return {\n mentionDisplayTextSet: new Set(mentionReplacementMap.keys()),\n mentionReplacementMap,\n mentionReplacements,\n mentionsRegex: mentionReplacements.length\n ? new RegExp(\n `(?:${mentionReplacements\n .map(({ mentionDisplayText }) => escapeRegExp(mentionDisplayText))\n .join('|')})${MENTION_TRAILING_BOUNDARY}`,\n 'g',\n )\n : null,\n };\n};\n\nexport const mentionsMarkdownPluginFromLookup =\n ({\n mentionDisplayTextSet,\n mentionReplacementMap,\n mentionReplacements,\n mentionsRegex,\n }: MentionLookup) =>\n () => {\n const replace: ReplaceFunction = (mentionDisplayText) => {\n const replacement = mentionReplacementMap.get(mentionDisplayText);\n\n if (!replacement) return mentionDisplayText;\n\n return u(\n 'element',\n isUserMentionEntity(replacement.entity)\n ? {\n mentionedEntity: replacement.entity,\n mentionedUser: replacement.entity,\n properties: {},\n tagName: 'mention',\n }\n : {\n mentionedEntity: replacement.entity,\n properties: {},\n tagName: 'mention',\n },\n [u('text', mentionDisplayText)],\n );\n };\n\n const transform = (tree: HastTree) => {\n if (!mentionReplacements.length || !mentionsRegex) return;\n\n // handles special cases of mentions where the mention display text\n // looks like an e-mail-like token\n // Remark GFM translates all e-mail-like text nodes to links creating\n // two separate child nodes \"@\" and \"your.name@as.email\" instead of\n // keeping it as one text node with value \"@your.name@as.email\"\n // this piece finds these two separated nodes and merges them together\n // before \"replace\" function takes over\n if (mentionDisplayTextSet.size) {\n visit(\n tree,\n (node: unknown, index, parent: MentionTraversalParent | undefined) => {\n if (typeof index === 'undefined') return;\n if (!parent) return;\n\n const nextChild = parent.children.at(index + 1) as Element;\n const nextChildHref = nextChild?.properties?.href as string | undefined;\n const textNode = node as TextNode;\n\n if (\n textNode.type === 'text' &&\n // text value has to have @ sign at the end of the string\n // and no other characters except whitespace can precede it\n // valid cases: \"text @\", \"@\", \" @\"\n // invalid cases: \"text@\", \"@text\",\n /.?\\s?@$|^@$/.test(textNode.value) &&\n nextChildHref?.startsWith('mailto:')\n ) {\n const newTextValue = textNode.value.replace(/@$/, '');\n const rawDisplayName = nextChildHref.replace('mailto:', '');\n const mentionDisplayText = `@${rawDisplayName}`;\n if (!mentionDisplayTextSet.has(mentionDisplayText)) return;\n parent.children[index] = u('text', newTextValue);\n parent.children[index + 1] = u('text', mentionDisplayText);\n }\n },\n );\n }\n\n findAndReplace(tree, [mentionsRegex, replace]);\n };\n\n return transform;\n };\n\nexport const createMentionPluginAndDisplayTextSet = (\n mentionEntitiesOrUsers: RenderTextMentionEntity[] | UserResponse[],\n): MentionPluginAndDisplayTextSet => {\n const mentionLookup = createMentionLookup(mentionEntitiesOrUsers);\n\n return {\n mentionDisplayTextSet: mentionLookup.mentionDisplayTextSet,\n plugin: mentionsMarkdownPluginFromLookup(mentionLookup),\n };\n};\n\nexport function mentionsMarkdownPlugin(\n mentionedUsers: UserResponse[],\n): () => (tree: HastTree) => void;\nexport function mentionsMarkdownPlugin(\n mentionEntities: RenderTextMentionEntity[],\n): () => (tree: HastTree) => void;\nexport function mentionsMarkdownPlugin(\n mentionEntitiesOrUsers: RenderTextMentionEntity[] | UserResponse[],\n) {\n return createMentionPluginAndDisplayTextSet(mentionEntitiesOrUsers).plugin;\n}\n","import React from 'react';\nimport clsx from 'clsx';\nimport { formatTime } from './formatTime';\n\ntype DurationDisplayProps = {\n /** Whether audio is currently playing */\n isPlaying: boolean;\n /** Optional className for styling */\n className?: string;\n /** Total duration in seconds */\n duration?: number;\n /** Elapsed time in seconds */\n secondsElapsed?: number;\n /** Show remaining time instead of elapsed when possible */\n showRemaining?: boolean;\n};\n\nexport function DurationDisplay({\n className,\n duration,\n isPlaying,\n secondsElapsed,\n showRemaining = false,\n}: DurationDisplayProps) {\n const remainingSeconds =\n duration != null && secondsElapsed != null\n ? Math.max(0, duration - secondsElapsed)\n : undefined;\n const formattedDuration = formatTime(duration);\n const formattedSecondsElapsed = formatTime(secondsElapsed);\n const formattedRemaining = formatTime(remainingSeconds);\n\n const shouldShowElapsed =\n !!secondsElapsed && secondsElapsed > 0 && secondsElapsed < (duration || 0);\n const canShowRemaining = showRemaining && duration != null && secondsElapsed != null;\n const primaryValue = showRemaining ? formattedRemaining : formattedSecondsElapsed;\n const showPrimary = (canShowRemaining || shouldShowElapsed) && !!primaryValue;\n const showDuration = !showPrimary && !!formattedDuration;\n\n return (\n <div\n className={clsx(\n 'str-chat__duration-display',\n {\n 'str-chat__duration-display--hasProgress': !!secondsElapsed,\n 'str-chat__duration-display--isPlaying': isPlaying,\n },\n className,\n )}\n >\n {showPrimary && (\n <span className='str-chat__duration-display__time-elapsed'>{primaryValue}</span>\n )}\n {showDuration && (\n <span className='str-chat__duration-display__duration'>{formattedDuration}</span>\n )}\n </div>\n );\n}\n","import React from 'react';\nimport { Button } from '../../Button';\nimport clsx from 'clsx';\n\nexport type PlaybackRateButtonProps = React.ComponentProps<'button'>;\n\nexport const PlaybackRateButton = ({\n children,\n className,\n ...rest\n}: PlaybackRateButtonProps) => (\n <Button\n data-testid='playback-rate-button'\n {...rest}\n className={clsx('str-chat__playback-rate-button', className)}\n >\n {children}\n </Button>\n);\n","import type { KeyboardEvent } from 'react';\nimport type { SeekFn as AudioPlayerSeekFn } from '../AudioPlayer';\n\ntype SeekParams = Parameters<AudioPlayerSeekFn>[0];\n\nconst DEFAULT_KEYBOARD_PROGRESS_STEP = 5;\nconst DEFAULT_KEYBOARD_PROGRESS_LARGE_STEP = 10;\n\nconst getNextProgressByKey = ({\n key,\n largeStep,\n progress,\n step,\n}: {\n key: string;\n largeStep: number;\n progress: number;\n step: number;\n}) => {\n switch (key) {\n case 'ArrowRight':\n case 'ArrowUp':\n return Math.min(100, progress + step);\n case 'ArrowLeft':\n case 'ArrowDown':\n return Math.max(0, progress - step);\n case 'PageUp':\n return Math.min(100, progress + largeStep);\n case 'PageDown':\n return Math.max(0, progress - largeStep);\n case 'Home':\n return 0;\n case 'End':\n return 100;\n default:\n return null;\n }\n};\n\nexport const handleProgressBarKeyboardSeek = ({\n event,\n largeStep = DEFAULT_KEYBOARD_PROGRESS_LARGE_STEP,\n progress,\n seek,\n step = DEFAULT_KEYBOARD_PROGRESS_STEP,\n}: {\n event: KeyboardEvent<HTMLDivElement>;\n largeStep?: number;\n progress: number;\n seek: (params: SeekParams) => void;\n step?: number;\n}) => {\n const nextProgress = getNextProgressByKey({\n key: event.key,\n largeStep,\n progress,\n step,\n });\n\n if (nextProgress === null) return;\n\n event.preventDefault();\n const currentTarget = event.currentTarget;\n const { width, x } = currentTarget.getBoundingClientRect();\n\n seek({\n clientX: x + (width * nextProgress) / 100,\n currentTarget,\n });\n};\n","import type { TFunction } from 'i18next';\nimport { formatTime } from './formatTime';\n\ntype GetAudioTrackSliderAriaValueTextParams = {\n durationSeconds?: number;\n progress: number;\n secondsElapsed?: number;\n t: TFunction;\n};\n\nexport const getAudioTrackSliderAriaValueText = ({\n durationSeconds,\n progress,\n secondsElapsed,\n t,\n}: GetAudioTrackSliderAriaValueTextParams) => {\n const normalizedProgress = Math.max(0, Math.min(100, progress));\n\n if (typeof durationSeconds === 'number' && Number.isFinite(durationSeconds)) {\n const normalizedDuration = Math.max(0, durationSeconds);\n const elapsed =\n typeof secondsElapsed === 'number' && Number.isFinite(secondsElapsed)\n ? Math.max(0, Math.min(secondsElapsed, normalizedDuration))\n : (normalizedDuration * normalizedProgress) / 100;\n const formattedElapsed = formatTime(elapsed, 'floor');\n const formattedDuration = formatTime(normalizedDuration, 'floor');\n\n if (formattedElapsed && formattedDuration) {\n return t('aria/Audio position {{ elapsed }} of {{ duration }}', {\n duration: formattedDuration,\n elapsed: formattedElapsed,\n });\n }\n }\n\n return t('aria/Audio position {{ progress }} percent', {\n progress: Math.round(normalizedProgress),\n });\n};\n","import type { PointerEventHandler } from 'react';\nimport { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';\nimport type { SeekFn as AudioPlayerSeekFn } from '../AudioPlayer';\n\ntype SeekParams = Parameters<AudioPlayerSeekFn>[0];\n\ntype UseInteractiveProgressBarParams = {\n progress?: number;\n seek: (params: SeekParams) => void;\n};\n\nconst getAvailableTrackWidth = (trackRoot: HTMLDivElement | null) => {\n if (!trackRoot) return 0;\n\n const parent = trackRoot.parentElement;\n if (!parent) return trackRoot.getBoundingClientRect().width;\n\n const parentWidth = parent.getBoundingClientRect().width;\n const computedStyle = window.getComputedStyle(parent);\n const paddingLeft = parseFloat(computedStyle.paddingLeft) || 0;\n const paddingRight = parseFloat(computedStyle.paddingRight) || 0;\n const rawColumnGap = computedStyle.columnGap || computedStyle.gap;\n const parsedColumnGap = parseFloat(rawColumnGap);\n const columnGap = Number.isNaN(parsedColumnGap) ? 0 : parsedColumnGap;\n const gapCount = Math.max(0, parent.children.length - 1);\n const totalGapsWidth = columnGap * gapCount;\n const siblingsWidth = Array.from(parent.children).reduce((total, child) => {\n if (child === trackRoot) return total;\n return total + child.getBoundingClientRect().width;\n }, 0);\n\n return Math.max(\n 0,\n parentWidth - paddingLeft - paddingRight - totalGapsWidth - siblingsWidth,\n );\n};\n\nexport const useInteractiveProgressBar = ({\n progress = 0,\n seek,\n}: UseInteractiveProgressBarParams) => {\n const isDragging = useRef(false);\n const [availableTrackWidth, setAvailableTrackWidth] = useState(0);\n const [root, setRoot] = useState<HTMLDivElement | null>(null);\n const [progressIndicator, setProgressIndicator] = useState<HTMLDivElement | null>(null);\n const lastIndicatorWidth = useRef(0);\n\n const handleDragStart: PointerEventHandler<HTMLDivElement> = (e) => {\n e.preventDefault();\n if (!progressIndicator) return;\n\n isDragging.current = true;\n progressIndicator.style.cursor = 'grabbing';\n root?.classList.add('str-chat__wave-progress-bar__track--dragging');\n };\n\n const handleDrag: PointerEventHandler<HTMLDivElement> = (e) => {\n if (!isDragging.current) return;\n // Snapshot the event because seek is throttled.\n seek({ ...e });\n };\n\n const handleDragStop = useCallback(() => {\n if (!progressIndicator) return;\n\n isDragging.current = false;\n progressIndicator.style.removeProperty('cursor');\n root?.classList.remove('str-chat__wave-progress-bar__track--dragging');\n }, [progressIndicator, root]);\n\n useEffect(() => {\n document.addEventListener('pointerup', handleDragStop);\n\n return () => {\n document.removeEventListener('pointerup', handleDragStop);\n };\n }, [handleDragStop]);\n\n useEffect(() => {\n if (!root || typeof ResizeObserver === 'undefined') return;\n\n const observer = new ResizeObserver(([entry]) => {\n const nextAvailableWidth = getAvailableTrackWidth(entry.target as HTMLDivElement);\n setAvailableTrackWidth(nextAvailableWidth || entry.contentRect.width);\n });\n\n observer.observe(root);\n\n return () => {\n observer.disconnect();\n };\n }, [root]);\n\n useLayoutEffect(() => {\n if (root) {\n setAvailableTrackWidth(getAvailableTrackWidth(root));\n }\n\n if (progressIndicator) {\n lastIndicatorWidth.current = progressIndicator.getBoundingClientRect().width;\n }\n }, [progressIndicator, root]);\n\n const indicatorLeft =\n progress === 0 || !progressIndicator\n ? 0\n : Math.max(0, availableTrackWidth - lastIndicatorWidth.current) * (progress / 100) +\n 1;\n\n return {\n availableTrackWidth,\n handleDrag,\n handleDragStart,\n handleDragStop,\n indicatorLeft,\n root,\n setProgressIndicator,\n setRoot,\n };\n};\n","import type { ReactNode } from 'react';\nimport type { Attachment, SharedLocationResponse } from 'stream-chat';\nimport type { ATTACHMENT_GROUPS_ORDER, AttachmentProps } from './Attachment';\nimport * as linkify from 'linkifyjs';\n\nexport const SUPPORTED_VIDEO_FORMATS = [\n 'video/mp4',\n 'video/ogg',\n 'video/webm',\n 'video/quicktime',\n];\n\nexport type AttachmentComponentType =\n | 'card'\n | 'gallery'\n | 'giphy'\n | 'image'\n | 'media'\n | 'audio'\n | 'voiceRecording'\n | 'file'\n | 'geolocation'\n | 'unsupported';\n\nexport type AttachmentContainerType = (typeof ATTACHMENT_GROUPS_ORDER)[number];\n\nexport type GroupedRenderedAttachment = Record<AttachmentContainerType, ReactNode[]>;\n\nexport type GalleryAttachment = {\n items: Attachment[];\n type: 'gallery';\n};\n\nexport type RenderAttachmentProps = Omit<AttachmentProps, 'attachments'> & {\n attachment: Attachment;\n};\n\nexport type RenderGalleryProps = Omit<AttachmentProps, 'attachments'> & {\n attachment: GalleryAttachment;\n};\n\nexport type RenderMediaProps = Omit<AttachmentProps, 'attachments'> & {\n attachments: Attachment[];\n};\n\nexport type GeolocationContainerProps = Omit<AttachmentProps, 'attachments'> & {\n location: SharedLocationResponse;\n};\n\n// This identity function determines attachment type specific to React.\n// Once made sure other SDKs support the same logic, move to stream-chat-js\nexport const isGalleryAttachmentType = (\n attachment: Attachment | GalleryAttachment,\n): attachment is GalleryAttachment =>\n Array.isArray((attachment as GalleryAttachment).items);\n\nexport const isSvgAttachment = (attachment: Attachment) => {\n const filename = attachment.fallback || '';\n return filename.toLowerCase().endsWith('.svg');\n};\n\nexport const divMod = (num: number, divisor: number) => [\n Math.floor(num / divisor),\n num % divisor,\n];\n\nexport const displayDuration = (totalSeconds?: number) => {\n if (!totalSeconds || totalSeconds < 0) return '00:00';\n\n const [hours, hoursLeftover] = divMod(totalSeconds, 3600);\n const [minutes, seconds] = divMod(hoursLeftover, 60);\n const roundedSeconds = Math.ceil(seconds);\n const prependHrsZero = String(hours).padStart(2, '0');\n const prependMinZero = String(minutes).padStart(2, '0');\n const prependSecZero = String(roundedSeconds).padStart(2, '0');\n const minSec = `${prependMinZero}:${prependSecZero}`;\n\n return hours ? `${prependHrsZero}:` + minSec : minSec;\n};\nexport function getCssDimensionsVariables(url: string) {\n const cssVars = {\n '--original-height': 1000000,\n '--original-width': 1000000,\n } as Record<string, number>;\n\n if (linkify.test(url, 'url')) {\n const urlParams = new URL(url).searchParams;\n const oh = Number(urlParams.get('oh'));\n const ow = Number(urlParams.get('ow'));\n const originalHeight = oh > 1 ? oh : 1000000;\n const originalWidth = ow > 1 ? ow : 1000000;\n cssVars['--original-width'] = originalWidth;\n cssVars['--original-height'] = originalHeight;\n }\n\n return cssVars;\n}\n","import { divMod } from './utils';\n\nexport const resampleWaveformData = (waveformData: number[], amplitudesCount: number) =>\n waveformData.length === amplitudesCount\n ? waveformData\n : waveformData.length > amplitudesCount\n ? downSample(waveformData, amplitudesCount)\n : upSample(waveformData, amplitudesCount);\n\n/**\n * The downSample function uses the Largest-Triangle-Three-Buckets (LTTB) algorithm.\n * See the thesis Downsampling Time Series for Visual Representation by Sveinn Steinarsson for more (https://skemman.is/bitstream/1946/15343/3/SS_MSthesis.pdf)\n * @param data\n * @param targetOutputSize\n */\nexport function downSample(data: number[], targetOutputSize: number): number[] {\n if (data.length <= targetOutputSize || targetOutputSize === 0) {\n return data;\n }\n\n if (targetOutputSize === 1) return [mean(data)];\n\n const result: number[] = [];\n // bucket size adjusted due to the fact that the first and the last item in the original data array is kept in target output\n const bucketSize = (data.length - 2) / (targetOutputSize - 2);\n let lastSelectedPointIndex = 0;\n result.push(data[lastSelectedPointIndex]); // Always add the first point\n let maxAreaPoint, maxArea, triangleArea;\n\n for (let bucketIndex = 1; bucketIndex < targetOutputSize - 1; bucketIndex++) {\n const previousBucketRefPoint = data[lastSelectedPointIndex];\n const nextBucketMean = getNextBucketMean(data, bucketIndex, bucketSize);\n\n const currentBucketStartIndex = Math.floor((bucketIndex - 1) * bucketSize) + 1;\n const nextBucketStartIndex = Math.floor(bucketIndex * bucketSize) + 1;\n const countUnitsBetweenAtoC = 1 + nextBucketStartIndex - currentBucketStartIndex;\n\n maxArea = triangleArea = -1;\n\n for (\n let currentPointIndex = currentBucketStartIndex;\n currentPointIndex < nextBucketStartIndex;\n currentPointIndex++\n ) {\n const countUnitsBetweenAtoB =\n Math.abs(currentPointIndex - currentBucketStartIndex) + 1;\n const countUnitsBetweenBtoC = countUnitsBetweenAtoC - countUnitsBetweenAtoB;\n const currentPointValue = data[currentPointIndex];\n\n triangleArea = triangleAreaHeron(\n triangleBase(\n Math.abs(previousBucketRefPoint - currentPointValue),\n countUnitsBetweenAtoB,\n ),\n triangleBase(Math.abs(currentPointValue - nextBucketMean), countUnitsBetweenBtoC),\n triangleBase(\n Math.abs(previousBucketRefPoint - nextBucketMean),\n countUnitsBetweenAtoC,\n ),\n );\n\n if (triangleArea > maxArea) {\n maxArea = triangleArea;\n maxAreaPoint = data[currentPointIndex];\n lastSelectedPointIndex = currentPointIndex;\n }\n }\n\n if (typeof maxAreaPoint !== 'undefined') result.push(maxAreaPoint);\n }\n\n result.push(data[data.length - 1]); // Always add the last point\n\n return result;\n}\n\nconst triangleAreaHeron = (a: number, b: number, c: number) => {\n const s = (a + b + c) / 2;\n return Math.sqrt(s * (s - a) * (s - b) * (s - c));\n};\nconst triangleBase = (a: number, b: number) => Math.sqrt(Math.pow(a, 2) + Math.pow(b, 2));\nconst mean = (values: number[]) =>\n values.reduce((acc, value) => acc + value, 0) / values.length;\nconst getNextBucketMean = (\n data: number[],\n currentBucketIndex: number,\n bucketSize: number,\n) => {\n const nextBucketStartIndex = Math.floor(currentBucketIndex * bucketSize) + 1;\n let nextNextBucketStartIndex = Math.floor((currentBucketIndex + 1) * bucketSize) + 1;\n nextNextBucketStartIndex =\n nextNextBucketStartIndex < data.length ? nextNextBucketStartIndex : data.length;\n\n return mean(data.slice(nextBucketStartIndex, nextNextBucketStartIndex));\n};\nexport const upSample = (values: number[], targetSize: number) => {\n if (!values.length) {\n console.warn('Cannot extend empty array of amplitudes.');\n return values;\n }\n\n if (values.length > targetSize) {\n console.warn(\n 'Requested to extend the waveformData that is longer than the target list size',\n );\n return values;\n }\n\n if (targetSize === values.length) return values;\n\n // eslint-disable-next-line prefer-const\n let [bucketSize, remainder] = divMod(targetSize, values.length);\n const result: number[] = [];\n\n for (let i = 0; i < values.length; i++) {\n const extra = remainder && remainder-- ? 1 : 0;\n result.push(...Array(bucketSize + extra).fill(values[i]));\n }\n return result;\n};\n","import throttle from 'lodash.throttle';\nimport React, { useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport clsx from 'clsx';\nimport { resampleWaveformData } from '../../Attachment/audioSampling';\nimport type { SeekFn as AudioPlayerSeekFn } from '../AudioPlayer';\nimport { handleProgressBarKeyboardSeek } from './keyboardSeek';\nimport { getAudioTrackSliderAriaValueText } from './progressBarA11y';\nimport { useInteractiveProgressBar } from './useInteractiveProgressBar';\nimport { useTranslationContext } from '../../../context';\n\ntype SeekParams = Parameters<AudioPlayerSeekFn>[0];\n\ntype WaveProgressBarProps = {\n /** Function that allows to change the track progress */\n seek: (params: SeekParams) => void;\n /** The array of fractional number values between 0 and 1 representing the height of amplitudes */\n waveformData: number[];\n /** Progress expressed in fractional number value btw 0 and 100. */\n progress?: number;\n /** Total track duration in seconds. */\n durationSeconds?: number;\n /** Current elapsed position in seconds. */\n secondsElapsed?: number;\n /** Absolute gap width between bars in px (overrides computed gap var). */\n amplitudeBarGapWidthPx?: number;\n relativeAmplitudeBarWidth?: number;\n relativeAmplitudeGap?: number;\n};\n\nexport const WaveProgressBar = ({\n amplitudeBarGapWidthPx,\n durationSeconds,\n progress = 0,\n relativeAmplitudeBarWidth = 2,\n relativeAmplitudeGap = 1,\n secondsElapsed,\n seek,\n waveformData,\n}: WaveProgressBarProps) => {\n const { t } = useTranslationContext('WaveProgressBar');\n const [trackAxisX, setTrackAxisX] = useState<{\n barCount: number;\n barWidth: number;\n gap: number;\n }>();\n const lastAvailableTrackWidth = useRef<number>(0);\n const minAmplitudeBarWidthRef = useRef<number | null>(null);\n const lastMinAmplitudeBarWidthUsed = useRef<number | null>(null);\n const {\n availableTrackWidth,\n handleDrag,\n handleDragStart,\n handleDragStop,\n indicatorLeft,\n root,\n setProgressIndicator,\n setRoot,\n } = useInteractiveProgressBar({ progress, seek });\n const normalizedProgress = Math.max(0, Math.min(100, progress));\n\n const getTrackAxisX = useMemo(\n () =>\n throttle((availableWidth: number) => {\n const minAmplitudeBarWidth = minAmplitudeBarWidthRef.current;\n const hasMinWidthChanged =\n minAmplitudeBarWidth !== lastMinAmplitudeBarWidthUsed.current;\n if (availableWidth === lastAvailableTrackWidth.current && !hasMinWidthChanged) {\n return;\n }\n lastAvailableTrackWidth.current = availableWidth;\n lastMinAmplitudeBarWidthUsed.current = minAmplitudeBarWidth;\n const possibleAmpCount = Math.floor(\n availableWidth / (relativeAmplitudeGap + relativeAmplitudeBarWidth),\n );\n const amplitudeBarWidthToGapRatio =\n relativeAmplitudeBarWidth / (relativeAmplitudeBarWidth + relativeAmplitudeGap);\n const maxCountByMinWidth =\n typeof minAmplitudeBarWidth === 'number' && minAmplitudeBarWidth > 0\n ? Math.floor(\n (availableWidth * amplitudeBarWidthToGapRatio) / minAmplitudeBarWidth,\n )\n : possibleAmpCount;\n const barCount = Math.max(0, Math.min(possibleAmpCount, maxCountByMinWidth));\n const barWidth =\n barCount && (availableWidth / barCount) * amplitudeBarWidthToGapRatio;\n\n setTrackAxisX({\n barCount,\n barWidth,\n gap: barWidth * (relativeAmplitudeGap / relativeAmplitudeBarWidth),\n });\n }, 1),\n [relativeAmplitudeBarWidth, relativeAmplitudeGap],\n );\n\n const resampledWaveformData = useMemo(\n () => (trackAxisX ? resampleWaveformData(waveformData, trackAxisX.barCount) : []),\n [trackAxisX, waveformData],\n );\n\n useLayoutEffect(() => {\n if (availableTrackWidth > 0) {\n getTrackAxisX(availableTrackWidth);\n }\n }, [availableTrackWidth, getTrackAxisX]);\n\n useLayoutEffect(() => {\n if (!root || typeof window === 'undefined') return;\n const amplitudeBar = root.querySelector<HTMLElement>(\n '.str-chat__wave-progress-bar__amplitude-bar',\n );\n if (!amplitudeBar) return;\n const computedStyle = window.getComputedStyle(amplitudeBar);\n const parsedMinWidth = parseFloat(computedStyle.minWidth);\n if (!Number.isNaN(parsedMinWidth) && parsedMinWidth > 0) {\n minAmplitudeBarWidthRef.current = parsedMinWidth;\n }\n if (availableTrackWidth > 0) {\n getTrackAxisX(availableTrackWidth);\n }\n }, [availableTrackWidth, getTrackAxisX, root, trackAxisX?.barCount]);\n\n if (!waveformData.length || trackAxisX?.barCount === 0) return null;\n\n const amplitudeGapWidth = amplitudeBarGapWidthPx ?? trackAxisX?.gap;\n const ariaValueText = getAudioTrackSliderAriaValueText({\n durationSeconds,\n progress: normalizedProgress,\n secondsElapsed,\n t,\n });\n\n return (\n <div\n aria-label={t('aria/Seek audio position')}\n aria-orientation='horizontal'\n aria-valuemax={100}\n aria-valuemin={0}\n aria-valuenow={Math.round(normalizedProgress)}\n aria-valuetext={ariaValueText}\n className={clsx('str-chat__wave-progress-bar__track', {\n 'str-chat__wave-progress-bar__track--playback-initiated': normalizedProgress > 0,\n })}\n data-testid='wave-progress-bar-track'\n onClick={seek}\n onKeyDown={(event) =>\n handleProgressBarKeyboardSeek({ event, progress: normalizedProgress, seek })\n }\n onPointerDown={handleDragStart}\n onPointerMove={handleDrag}\n onPointerUp={handleDragStop}\n ref={setRoot}\n role='slider'\n style={\n {\n '--str-chat__voice-recording-amplitude-bar-gap-width':\n typeof amplitudeGapWidth === 'number' ? `${amplitudeGapWidth}px` : undefined,\n } as React.CSSProperties\n }\n tabIndex={0}\n >\n {resampledWaveformData.map((amplitude, i) => (\n <div\n aria-hidden='true'\n className={clsx('str-chat__wave-progress-bar__amplitude-bar', {\n ['str-chat__wave-progress-bar__amplitude-bar--active']:\n normalizedProgress > (i / resampledWaveformData.length) * 100,\n })}\n data-testid='amplitude-bar'\n key={`amplitude-${i}`}\n style={\n {\n '--str-chat__voice-recording-amplitude-bar-width':\n trackAxisX?.barWidth + 'px',\n '--str-chat__wave-progress-bar__amplitude-bar-height': amplitude\n ? amplitude * 100 + '%'\n : '0%',\n } as React.CSSProperties\n }\n />\n ))}\n <div\n aria-hidden='true'\n className='str-chat__wave-progress-bar__progress-indicator'\n data-testid='wave-progress-bar-progress-indicator'\n ref={setProgressIndicator}\n style={{\n insetInlineStart: `${indicatorLeft}px`,\n }}\n />\n </div>\n );\n};\n","import { useMessageComposerController } from './useMessageComposerController';\nimport { useStateStore } from '../../../store';\nimport type { AttachmentManagerState } from 'stream-chat';\n\nconst stateSelector = (state: AttachmentManagerState) => ({\n attachments: state.attachments,\n});\n\nexport const useAttachmentManagerState = () => {\n const { attachmentManager } = useMessageComposerController();\n const { attachments } = useStateStore(attachmentManager.state, stateSelector);\n return {\n attachments,\n availableUploadSlots: attachmentManager.availableUploadSlots,\n blockedUploadsCount: attachmentManager.blockedUploadsCount,\n failedUploadsCount: attachmentManager.failedUploadsCount,\n hasAvailableUploadSlots: attachmentManager.hasAvailableUploadSlots,\n hasCustomDoUploadRequest: attachmentManager.hasCustomDoUploadRequest,\n isUploadEnabled: attachmentManager.isUploadEnabled,\n pendingUploadsCount: attachmentManager.pendingUploadsCount,\n successfulUploadsCount: attachmentManager.successfulUploadsCount,\n uploadsInProgressCount: attachmentManager.uploadsInProgressCount,\n };\n};\n","import { useMessageComposerController } from './useMessageComposerController';\nimport { useStateStore } from '../../../store';\nimport type {\n AttachmentManagerState,\n LocationComposerState,\n PollComposerState,\n} from 'stream-chat';\n\nconst attachmentManagerStateSelector = (state: AttachmentManagerState) => ({\n attachments: state.attachments,\n});\nconst pollComposerStateSelector = (state: PollComposerState) => ({\n poll: state.data,\n});\nconst locationComposerStateSelector = (state: LocationComposerState) => ({\n location: state.location,\n});\n\nexport const useAttachmentsForPreview = () => {\n const { attachmentManager, locationComposer, pollComposer } =\n useMessageComposerController();\n const { attachments } = useStateStore(\n attachmentManager.state,\n attachmentManagerStateSelector,\n );\n const { poll } = useStateStore(pollComposer.state, pollComposerStateSelector);\n const { location } = useStateStore(\n locationComposer.state,\n locationComposerStateSelector,\n );\n\n return {\n attachments,\n location,\n poll,\n };\n};\n","import { useMessageComposerController } from './useMessageComposerController';\nimport { useEffect, useState } from 'react';\n\nexport const useCanCreatePoll = () => {\n const { pollComposer } = useMessageComposerController();\n const [canCreatePoll, setCanCreatePoll] = useState(pollComposer.canCreatePoll);\n useEffect(\n () =>\n pollComposer.state.subscribe(() => {\n setCanCreatePoll(pollComposer.canCreatePoll);\n }),\n [pollComposer],\n );\n return canCreatePoll;\n};\n","import { type CooldownTimerState } from 'stream-chat';\n\nimport { useChannelStateContext } from '../../../context';\nimport { useStateStore } from '../../../store';\n\nconst cooldownTimerStateSelector = (state: CooldownTimerState) => ({\n cooldownRemaining: state.cooldownRemaining,\n});\n\n/**\n * Provides and initial value of cooldown, from which the countdown should start, e.g.:\n *\n * The value of channel.data.cooldown is 100s but 30s has already elapsed, user reloads the page,\n * the initial value is now 70s from which the countdown will continue using useTimer() hook.\n */\nexport const useCooldownRemaining = (): number => {\n const { channel } = useChannelStateContext();\n return (\n useStateStore(channel.cooldownTimer.state, cooldownTimerStateSelector)\n .cooldownRemaining ?? 0\n );\n};\n","import { useEffect, useRef } from 'react';\nimport type { MessageComposerProps } from '../MessageComposer';\n\nexport const useTextareaRef = (props: MessageComposerProps) => {\n const { focus } = props;\n const textareaRef = useRef<HTMLTextAreaElement>(undefined);\n // Focus\n useEffect(() => {\n if (focus && textareaRef.current) {\n textareaRef.current.focus();\n }\n }, [focus]);\n\n return {\n textareaRef,\n };\n};\n","import { useCallback } from 'react';\nimport { MessageComposer } from 'stream-chat';\nimport { useMessageComposerController } from './useMessageComposerController';\nimport { useChannelActionContext } from '../../../context/ChannelActionContext';\nimport { useTranslationContext } from '../../../context/TranslationContext';\nimport { useNotificationApi } from '../../Notifications';\nimport { discardPreEditSnapshot } from '../preEditSnapshot';\n\nimport type { MessageComposerProps } from '../MessageComposer';\n\nconst takeStateSnapshot = (messageComposer: MessageComposer) => {\n const textComposerState = messageComposer.textComposer.state.getLatestValue();\n const attachmentManagerState = messageComposer.attachmentManager.state.getLatestValue();\n const linkPreviewsManagerState =\n messageComposer.linkPreviewsManager.state.getLatestValue();\n const pollComposerState = messageComposer.pollComposer.state.getLatestValue();\n const customDataManagerState = messageComposer.customDataManager.state.getLatestValue();\n const state = messageComposer.state.getLatestValue();\n\n return () => {\n messageComposer.state.next(state);\n messageComposer.textComposer.state.next(textComposerState);\n messageComposer.attachmentManager.state.next(attachmentManagerState);\n messageComposer.linkPreviewsManager.state.next(linkPreviewsManagerState);\n messageComposer.pollComposer.state.next(pollComposerState);\n messageComposer.customDataManager.state.next(customDataManagerState);\n };\n};\n\nexport const useSubmitHandler = (props: MessageComposerProps) => {\n const { overrideSubmitHandler } = props;\n\n const { addNotification } = useNotificationApi();\n const { editMessage, sendMessage } = useChannelActionContext('useSubmitHandler');\n const { t } = useTranslationContext('useSubmitHandler');\n const messageComposer = useMessageComposerController();\n\n const handleSubmit = useCallback(\n async (event?: React.BaseSyntheticEvent) => {\n event?.preventDefault();\n const composition = await messageComposer.compose();\n if (!composition || !composition.message) return;\n\n const { localMessage, message, sendOptions } = composition;\n\n if (messageComposer.editedMessage && localMessage.type !== 'error') {\n try {\n await editMessage(localMessage, sendOptions);\n discardPreEditSnapshot(messageComposer);\n messageComposer.clear();\n } catch (err) {\n addNotification({\n emitter: 'MessageComposer',\n incident: {\n domain: 'api',\n entity: 'message',\n operation: 'edit',\n },\n message: t('Edit message request failed'),\n severity: 'error',\n });\n }\n } else {\n const restoreComposerStateSnapshot = takeStateSnapshot(messageComposer);\n try {\n // FIXME: once MessageComposer has sendMessage method, then the following condition should be encapsulated by it\n // keep attachments, text, quoted message (treat them as draft) ... if sending a poll\n const sentPollMessage = !!message.poll_id;\n if (sentPollMessage) {\n messageComposer.state.partialNext({\n id: MessageComposer.generateId(),\n pollId: null,\n });\n } else {\n messageComposer.clear();\n }\n // todo: get rid of overrideSubmitHandler once MessageComposer supports submission flow\n if (overrideSubmitHandler) {\n await overrideSubmitHandler({\n cid: messageComposer.channel.cid,\n localMessage,\n message,\n sendOptions,\n });\n } else {\n await sendMessage({ localMessage, message, options: sendOptions });\n }\n if (messageComposer.config.text.publishTypingEvents)\n await messageComposer.channel.stopTyping();\n } catch (err) {\n restoreComposerStateSnapshot();\n addNotification({\n emitter: 'MessageComposer',\n incident: {\n domain: 'api',\n entity: 'message',\n operation: 'send',\n },\n message: t('Send message request failed'),\n severity: 'error',\n });\n }\n }\n },\n [\n addNotification,\n editMessage,\n messageComposer,\n overrideSubmitHandler,\n sendMessage,\n t,\n ],\n );\n\n return { handleSubmit };\n};\n","import clsx from 'clsx';\nimport { nanoid } from 'nanoid';\nimport type { ComponentProps } from 'react';\nimport React, { forwardRef, useCallback, useMemo } from 'react';\n\nimport { useHandleFileChangeWrapper } from './utils';\nimport { useMessageComposerContext, useTranslationContext } from '../../context';\nimport { useMessageComposerController } from '../MessageComposer/hooks/useMessageComposerController';\nimport { useStateStore } from '../../store';\nimport type { MessageComposerConfig } from 'stream-chat';\nimport type { PartialSelected } from '../../types/types';\n\nconst attachmentManagerConfigStateSelector = (state: MessageComposerConfig) => ({\n acceptedFiles: state.attachments.acceptedFiles,\n maxNumberOfFilesPerMessage: state.attachments.maxNumberOfFilesPerMessage,\n});\n\nexport type FileInputProps = {\n onFileChange: (files: Array<File>) => void;\n resetOnChange?: boolean;\n} & Omit<ComponentProps<'input'>, 'type' | 'onChange'>;\n\nexport const FileInput = forwardRef(function FileInput(\n { onFileChange, resetOnChange = true, ...rest }: FileInputProps,\n ref: React.ForwardedRef<HTMLInputElement>,\n) {\n const handleInputChange = useHandleFileChangeWrapper(resetOnChange, onFileChange);\n\n return <input onChange={handleInputChange} ref={ref} type='file' {...rest} />;\n});\n\nexport const UploadFileInput = forwardRef(function UploadFileInput(\n {\n className,\n onFileChange: onFileChangeCustom,\n ...props\n }: PartialSelected<FileInputProps, 'onFileChange'>,\n ref: React.ForwardedRef<HTMLInputElement>,\n) {\n const { t } = useTranslationContext('UploadFileInput');\n const { textareaRef } = useMessageComposerContext();\n const messageComposer = useMessageComposerController();\n const { attachmentManager } = messageComposer;\n const { acceptedFiles, maxNumberOfFilesPerMessage } = useStateStore(\n messageComposer.configState,\n attachmentManagerConfigStateSelector,\n );\n const id = useMemo(() => nanoid(), []);\n\n const onFileChange = useCallback(\n (files: Array<File>) => {\n attachmentManager.uploadFiles(files);\n textareaRef.current?.focus();\n onFileChangeCustom?.(files);\n },\n [onFileChangeCustom, attachmentManager, textareaRef],\n );\n\n return (\n <FileInput\n accept={acceptedFiles?.join(',')}\n aria-label={t('aria/File upload')}\n data-testid='file-input'\n id={id}\n multiple={maxNumberOfFilesPerMessage > 1}\n {...props}\n className={clsx('str-chat__file-input', className)}\n onFileChange={onFileChange}\n ref={ref}\n />\n );\n});\n","import { useCallback } from 'react';\nimport { useMessageComposerController } from './useMessageComposerController';\nimport { dataTransferItemsToFiles } from '../../ReactFileUtilities';\n\nexport const usePasteHandler = () => {\n const { attachmentManager, textComposer } = useMessageComposerController();\n const onPaste = useCallback(\n (clipboardEvent: React.ClipboardEvent<HTMLTextAreaElement>) => {\n (async (event) => {\n const { items } = event.clipboardData;\n event.preventDefault();\n // Get a promise for the plain text in case no files are\n // found. This needs to be done here because chrome cleans\n // up the DataTransferItems after resolving of a promise.\n let plainTextPromise: Promise<string> | undefined = undefined;\n for (let i = 0; i < items.length; i++) {\n const item = items[i];\n if (item.kind === 'string' && item.type === 'text/plain') {\n plainTextPromise = new Promise((resolve) => {\n item.getAsString((string) => {\n resolve(string);\n });\n });\n break;\n }\n }\n\n const fileLikes = await dataTransferItemsToFiles(Array.from(items));\n\n if (plainTextPromise) {\n const pastedText = await plainTextPromise;\n textComposer.insertText({ text: pastedText });\n } else {\n attachmentManager.uploadFiles(fileLikes);\n }\n })(clipboardEvent);\n },\n [attachmentManager, textComposer],\n );\n\n return { onPaste };\n};\n","export interface SubscriptionLike {\n closed: boolean;\n\n unsubscribe(): void;\n}\n\nexport class Subscription implements SubscriptionLike {\n closed = false;\n private _unsubscribe: (() => void) | undefined;\n\n constructor(unsubscribe?: () => void) {\n this._unsubscribe = unsubscribe;\n }\n\n unsubscribe() {\n this.closed = true;\n this._unsubscribe?.();\n }\n}\n","type Next<T> = (value: T) => void;\nexport type Observer<T> = {\n next(value: T): void;\n complete?(): void;\n error?(error: Error): void;\n};\nexport type ObserverOrNext<T> = Next<T> | Observer<T>;\n\nexport function createObserver<T>(observerOrNext: ObserverOrNext<T>): Observer<T> {\n return typeof observerOrNext === 'function' ? { next: observerOrNext } : observerOrNext;\n}\n","import type { ObserverOrNext } from './Observer';\nimport { createObserver } from './Observer';\nimport { Subscription } from './Subscription';\n\nexport interface Unsubscribable {\n unsubscribe(): void;\n}\n\ntype Producer<T> = (observer: ObserverOrNext<T>) => Subscription;\n\nexport interface Subscribable<T> {\n subscribe(observerOrNext: ObserverOrNext<T>): Unsubscribable;\n}\n\nexport class Observable<T> implements Subscribable<T> {\n protected _closed = false;\n private _producer: Producer<T> | undefined;\n\n constructor(producer?: Producer<T>) {\n if (producer) this._producer = producer;\n }\n\n get closed() {\n return this._closed;\n }\n\n subscribe(observerOrNext: ObserverOrNext<T>): Subscription {\n const observer = createObserver<T>(observerOrNext);\n if (!this.closed) {\n this._producer?.(observer);\n }\n return new Subscription(() => {\n this._closed = true;\n });\n }\n}\n","import { Observable } from './Observable';\nimport type { SubscriptionLike } from './Subscription';\nimport { Subscription } from './Subscription';\nimport type { Observer, ObserverOrNext } from './Observer';\nimport { createObserver } from './Observer';\n\nexport class Subject<T> extends Observable<T> implements SubscriptionLike {\n private _observers: Map<number, Observer<T>> = new Map();\n private _observerCounter = 0;\n thrownError: Error | undefined;\n\n constructor() {\n super();\n }\n\n get observers() {\n return Array.from(this._observers.values());\n }\n\n next(value: T) {\n if (this.closed) return;\n const observers = this.observers;\n for (let i = 0; i < observers.length; i++) {\n observers[i].next(value);\n }\n }\n\n error(err: Error) {\n if (this.closed) return;\n this.thrownError = err;\n const { observers } = this;\n for (let i = 0; i < observers.length; i++) {\n observers[i].error?.(err);\n }\n this._observers.clear();\n }\n\n complete() {\n if (this.closed) return;\n this._closed = true;\n const { observers } = this;\n for (let i = 0; i < observers.length; i++) {\n observers[i].complete?.();\n }\n this._observers.clear();\n }\n\n subscribe(observerOrNext: ObserverOrNext<T>): Subscription {\n const observer = createObserver<T>(observerOrNext);\n if (this.thrownError || this.closed) {\n const subscription = new Subscription();\n subscription.closed = true;\n return subscription;\n }\n\n const observerId = this._observerCounter++;\n this._observers.set(observerId, observer);\n return new Subscription(() => {\n this._observers.delete(observerId);\n });\n }\n\n unsubscribe(): void {\n this._closed = true;\n this._observers.clear();\n }\n}\n","import { Subject } from './Subject';\nimport type { ObserverOrNext } from './Observer';\nimport { createObserver } from './Observer';\nimport type { Subscription } from './Subscription';\n\nexport class BehaviorSubject<T> extends Subject<T> {\n constructor(private _value: T) {\n super();\n }\n\n get value(): T {\n const { _value, thrownError } = this;\n if (thrownError) {\n throw thrownError;\n }\n return _value;\n }\n\n subscribe(observerOrNext: ObserverOrNext<T>): Subscription {\n const observer = createObserver<T>(observerOrNext);\n const subscription = super.subscribe(observerOrNext);\n if (!subscription.closed) observer.next(this._value);\n return subscription;\n }\n\n next(value: T): void {\n super.next((this._value = value));\n }\n}\n","import type { RecordedMediaType } from '../../ReactFileUtilities';\nimport type { ChangeEvent } from 'react';\nimport { Subscription } from '../observable/Subscription';\nimport { Subject } from '../observable/Subject';\nimport { BehaviorSubject } from '../observable/BehaviorSubject';\n\nexport enum RecordingPermission {\n CAM = 'camera',\n MIC = 'microphone',\n}\n\nconst MEDIA_TO_PERMISSION: Record<RecordedMediaType, RecordingPermission> = {\n audio: RecordingPermission.MIC,\n video: RecordingPermission.CAM,\n};\n\nexport type BrowserPermissionOptions = {\n mediaType: RecordedMediaType;\n};\n\nexport class BrowserPermission {\n name: string;\n state = new BehaviorSubject<PermissionState | undefined>(undefined);\n status = new BehaviorSubject<PermissionStatus | undefined>(undefined);\n error = new Subject<Error | undefined>();\n\n private changeSubscriptions: Subscription[] = [];\n\n constructor({ mediaType }: BrowserPermissionOptions) {\n this.name = MEDIA_TO_PERMISSION[mediaType];\n }\n\n get isWatching() {\n return this.changeSubscriptions.some((subscription) => !subscription.closed);\n }\n\n async watch() {\n if (!this.status.value) {\n await this.check();\n if (!this.status.value) return;\n }\n\n const status = this.status.value;\n const handlePermissionChange = (e: Event) => {\n const { state } = (e as unknown as ChangeEvent<PermissionStatus>).target;\n this.state.next(state);\n };\n status.addEventListener('change', handlePermissionChange);\n\n this.changeSubscriptions.push(\n new Subscription(() => {\n status.removeEventListener('change', handlePermissionChange);\n }),\n );\n }\n\n unwatch() {\n this.changeSubscriptions.forEach((subscription) => subscription.unsubscribe());\n }\n\n async check() {\n if (!this.name) {\n this.error.next(new Error('Unknown media recording permission'));\n return;\n }\n\n let permissionState: PermissionState;\n try {\n const permissionStatus = await navigator.permissions.query({\n name: this.name as unknown as PermissionName,\n });\n permissionState = permissionStatus.state;\n this.status.next(permissionStatus);\n } catch (e) {\n // permission does not exist - cannot be queried\n // an example would be Firefox - camera, neither microphone perms can be queried\n permissionState = 'granted' as PermissionState;\n }\n this.state.next(permissionState);\n }\n}\n","import mergeWith from 'lodash.mergewith';\n\nconst overrideEverything = (_: unknown, source: unknown) => source;\n\nexport const mergeDeep = <TObject, TSource>(target: TObject, source: TSource) =>\n mergeWith<TObject, TSource>(target, source, overrideEverything);\n\nconst overrideUndefinedOnly = (object: unknown, source: unknown) => object ?? source;\n\nexport const mergeDeepUndefined = <TObject, TSource>(target: TObject, source: TSource) =>\n mergeWith<TObject, TSource>(target, source, overrideUndefinedOnly);\n","import { BehaviorSubject } from '../observable/BehaviorSubject';\nimport { Subject } from '../observable/Subject';\nimport { mergeDeepUndefined } from '../../../utils/mergeDeep';\n\nconst MAX_FREQUENCY_AMPLITUDE = 255 as const;\n\nconst logError = (e?: Error) => e && console.error('[AMPLITUDE RECORDER ERROR]', e);\n\nconst rootMeanSquare = (values: Uint8Array) =>\n Math.sqrt(values.reduce((acc, val) => acc + Math.pow(val, 2), 0) / values.length);\n\n/**\n * fftSize\n * An unsigned integer, representing the window size of the FFT, given in number of samples.\n * A higher value will result in more details in the frequency domain but fewer details\n * in the amplitude domain.\n *\n * Must be a power of 2 between 2^5 and 2^15, so one of: 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, and 32768.\n * Defaults to 32.\n *\n * maxDecibels\n * A double, representing the maximum decibel value for scaling the FFT analysis data,\n * where 0 dB is the loudest possible sound, -10 dB is a 10th of that, etc.\n * The default value is -30 dB.\n *\n * minDecibels\n * A double, representing the minimum decibel value for scaling the FFT analysis data,\n * where 0 dB is the loudest possible sound, -10 dB is a 10th of that, etc.\n * The default value is -100 dB.\n */\nexport type AmplitudeAnalyserConfig = Pick<\n AnalyserNode,\n 'fftSize' | 'maxDecibels' | 'minDecibels'\n>;\nexport type AmplitudeRecorderConfig = {\n analyserConfig: AmplitudeAnalyserConfig;\n sampleCount: number;\n samplingFrequencyMs: number;\n};\n\nexport const DEFAULT_AMPLITUDE_RECORDER_CONFIG: AmplitudeRecorderConfig = {\n analyserConfig: {\n fftSize: 32,\n maxDecibels: 0,\n minDecibels: -100,\n } as AmplitudeAnalyserConfig,\n sampleCount: 100,\n samplingFrequencyMs: 60,\n};\n\ntype AmplitudeAnalyserOptions = {\n stream: MediaStream;\n config?: AmplitudeRecorderConfig;\n};\n\nexport enum AmplitudeRecorderState {\n CLOSED = 'closed',\n RECORDING = 'recording',\n STOPPED = 'stopped',\n}\n\nexport class AmplitudeRecorder {\n audioContext: AudioContext | undefined;\n analyserNode: AnalyserNode | undefined;\n microphone: MediaStreamAudioSourceNode | undefined;\n stream: MediaStream;\n\n config: AmplitudeRecorderConfig;\n\n amplitudeSamplingInterval: ReturnType<typeof setInterval> | undefined;\n\n amplitudes = new BehaviorSubject<number[]>([]);\n state = new BehaviorSubject<AmplitudeRecorderState | undefined>(undefined);\n error = new Subject<Error | undefined>();\n\n constructor({ config, stream }: AmplitudeAnalyserOptions) {\n this.config = mergeDeepUndefined({ ...config }, DEFAULT_AMPLITUDE_RECORDER_CONFIG);\n this.stream = stream;\n }\n\n init() {\n this.audioContext = new AudioContext();\n this.analyserNode = this.audioContext.createAnalyser();\n const { analyserConfig } = this.config;\n this.analyserNode.fftSize = analyserConfig.fftSize;\n this.analyserNode.maxDecibels = analyserConfig.maxDecibels;\n this.analyserNode.minDecibels = analyserConfig.minDecibels;\n\n this.microphone = this.audioContext.createMediaStreamSource(this.stream);\n this.microphone.connect(this.analyserNode);\n }\n\n stop() {\n clearInterval(this.amplitudeSamplingInterval);\n this.amplitudeSamplingInterval = undefined;\n this.state.next(AmplitudeRecorderState.STOPPED);\n }\n\n start = () => {\n if (this.state.value === AmplitudeRecorderState.CLOSED) return;\n if (!this.stream) {\n throw new Error(\n 'Missing MediaStream instance. Cannot to start amplitude recording',\n );\n }\n\n if (this.state.value === AmplitudeRecorderState.RECORDING) this.stop();\n\n if (!this.analyserNode) {\n if (!this.stream) return;\n this.init();\n }\n\n this.state.next(AmplitudeRecorderState.RECORDING);\n\n this.amplitudeSamplingInterval = setInterval(() => {\n if (!(this.analyserNode && this.state.value === AmplitudeRecorderState.RECORDING))\n return;\n const frequencyBins = new Uint8Array(this.analyserNode.frequencyBinCount);\n try {\n this.analyserNode.getByteFrequencyData(frequencyBins);\n } catch (e) {\n logError(e as Error);\n this.error.next(e as Error);\n return;\n }\n const normalizedSignalStrength =\n rootMeanSquare(frequencyBins) / MAX_FREQUENCY_AMPLITUDE;\n this.amplitudes.next([...this.amplitudes.value, normalizedSignalStrength]);\n }, this.config.samplingFrequencyMs);\n };\n\n close() {\n if (this.state.value !== AmplitudeRecorderState.STOPPED) this.stop();\n this.state.next(AmplitudeRecorderState.CLOSED);\n this.amplitudes.next([]);\n this.microphone?.disconnect();\n this.analyserNode?.disconnect();\n if (this.audioContext?.state !== 'closed') this.audioContext?.close();\n }\n}\n","import { renderAudio, toAudioBuffer } from './audioProcessing';\n\nconst WAV_HEADER_LENGTH_BYTES = 44 as const;\nconst BYTES_PER_SAMPLE = 2 as const;\nconst RIFF_FILE_MAX_BYTES = 4294967295 as const;\n\nconst HEADER = {\n AUDIO_FORMAT: { offset: 20, value: 1 }, // PCM = 1\n BITS_PER_SAMPLE: { offset: 34, value: BYTES_PER_SAMPLE * 8 }, // 16 bits encoding\n BLOCK_ALIGN: { offset: 32 },\n BYTE_RATE: { offset: 28 },\n CHANNEL_COUNT: { offset: 22 }, // 1 - mono, 2 - stereo\n CHUNK_ID: { offset: 0, value: 0x52494646 }, // hex representation of string \"RIFF\" (Resource Interchange File Format) - identifies the file structure that defines a class of more specific file formats, e.g. WAVE\n CHUNK_SIZE: { offset: 4 },\n FILE_FORMAT: { offset: 8, value: 0x57415645 }, // hex representation of string \"WAVE\"\n SAMPLE_RATE: { offset: 24 },\n SUBCHUNK1_ID: { offset: 12, value: 0x666d7420 }, // hex representation of string \"fmt \" - identifies the start of \"format\" section of the header\n SUBCHUNK1_SIZE: { offset: 16, value: 16 }, // Subchunk1 Size without SUBCHUNK1_ID and SUBCHUNK1_SIZE fields\n SUBCHUNK2_ID: { offset: 36, value: 0x64617461 }, // hex representation of string \"data\" - identifies the start of actual audio data section\n SUBCHUNK2_SIZE: { offset: 40 }, // actual audio data size\n} as const;\n\nconst fourCharsToInt = (chars: string) =>\n (chars.charCodeAt(0) << 24) |\n (chars.charCodeAt(1) << 16) |\n (chars.charCodeAt(2) << 8) |\n chars.charCodeAt(3);\n\nconst WAV_HEADER_FLAGS = {\n data: fourCharsToInt('data'),\n fmt: fourCharsToInt('fmt '),\n RIFF: fourCharsToInt('RIFF'),\n WAVE: fourCharsToInt('WAVE'),\n};\n\ntype WriteWaveHeaderParams = {\n arrayBuffer: ArrayBuffer;\n // 1 - mono, 2 - stereo\n channelCount: number;\n // Number of samples per second, e.g. 44100Hz\n sampleRate: number;\n};\nconst writeWavHeader = ({\n arrayBuffer,\n channelCount,\n sampleRate,\n}: WriteWaveHeaderParams) => {\n const byteRate = sampleRate * channelCount * BYTES_PER_SAMPLE; // bytes/sec\n const blockAlign = channelCount * BYTES_PER_SAMPLE;\n\n const dataView = new DataView(arrayBuffer);\n /*\n * The maximum size of a RIFF file is 4294967295 bytes and since the header takes up 44 bytes there are 4294967251 bytes left for the\n * data chunk.\n */\n const dataChunkSize = Math.min(\n dataView.byteLength - WAV_HEADER_LENGTH_BYTES,\n RIFF_FILE_MAX_BYTES - WAV_HEADER_LENGTH_BYTES,\n );\n\n dataView.setUint32(HEADER.CHUNK_ID.offset, HEADER.CHUNK_ID.value); // \"RIFF\"\n dataView.setUint32(HEADER.CHUNK_SIZE.offset, arrayBuffer.byteLength - 8, true); // adjustment for the first two headers - chunk id + file size\n dataView.setUint32(HEADER.FILE_FORMAT.offset, HEADER.FILE_FORMAT.value); // \"WAVE\"\n\n dataView.setUint32(HEADER.SUBCHUNK1_ID.offset, HEADER.SUBCHUNK1_ID.value); // \"fmt \"\n dataView.setUint32(HEADER.SUBCHUNK1_SIZE.offset, HEADER.SUBCHUNK1_SIZE.value, true);\n dataView.setUint16(HEADER.AUDIO_FORMAT.offset, HEADER.AUDIO_FORMAT.value, true);\n dataView.setUint16(HEADER.CHANNEL_COUNT.offset, channelCount, true);\n dataView.setUint32(HEADER.SAMPLE_RATE.offset, sampleRate, true);\n dataView.setUint32(HEADER.BYTE_RATE.offset, byteRate, true);\n dataView.setUint16(HEADER.BLOCK_ALIGN.offset, blockAlign, true);\n dataView.setUint16(HEADER.BITS_PER_SAMPLE.offset, HEADER.BITS_PER_SAMPLE.value, true);\n\n dataView.setUint32(HEADER.SUBCHUNK2_ID.offset, HEADER.SUBCHUNK2_ID.value); // \"data\"\n dataView.setUint32(HEADER.SUBCHUNK2_SIZE.offset, dataChunkSize, true);\n};\n\nexport const readWavHeader = (dataView: DataView) => {\n const header = dataView.getUint32(0, false);\n if (WAV_HEADER_FLAGS.RIFF !== header) {\n console.error('Missing RIFF header in WAVE file');\n return;\n }\n if (WAV_HEADER_FLAGS.WAVE !== dataView.getUint32(HEADER.FILE_FORMAT.offset, false)) {\n console.error('Missing WAVE header in WAVE file');\n return;\n }\n if (WAV_HEADER_FLAGS.fmt !== dataView.getUint32(HEADER.SUBCHUNK1_ID.offset, false)) {\n console.error('Missing fmt header in WAVE file');\n return;\n }\n\n return {\n audioDataSizeBytes: dataView.getUint32(HEADER.SUBCHUNK2_SIZE.offset, true),\n audioDataStartOffset: WAV_HEADER_LENGTH_BYTES,\n channelCount: dataView.getUint16(HEADER.CHANNEL_COUNT.offset, true),\n sampleRate: dataView.getUint32(HEADER.SAMPLE_RATE.offset, true),\n };\n};\n\nconst splitDataByChannel = (audioBuffer: AudioBuffer) =>\n Array.from({ length: audioBuffer.numberOfChannels }, (_, i) =>\n audioBuffer.getChannelData(i),\n );\n\ntype WriteAudioDataParams = {\n arrayBuffer: ArrayBuffer;\n dataByChannel: Float32Array[];\n};\n\n/**\n * In a WAV file, samples for each channel are usually interleaved, meaning samples from each channel are grouped together sequentially.\n * For example, in a stereo audio file (2 channels), samples alternate between the left and right channels.\n * @param arrayBuffer\n * @param dataByChannel\n */\nconst writeWavAudioData = ({ arrayBuffer, dataByChannel }: WriteAudioDataParams) => {\n const dataView = new DataView(arrayBuffer);\n const channelCount = dataByChannel.length;\n\n dataByChannel.forEach((channelData, channelIndex) => {\n let writeOffset = WAV_HEADER_LENGTH_BYTES + channelCount * channelIndex;\n\n channelData.forEach((float32Value) => {\n dataView.setInt16(\n writeOffset,\n float32Value < 0\n ? Math.max(-1, float32Value) * 32768\n : Math.min(1, float32Value) * 32767,\n true,\n );\n writeOffset += channelCount * BYTES_PER_SAMPLE;\n });\n });\n};\n\nexport const encodeToWaw = async (file: File, sampleRate: number) => {\n const audioBuffer = await renderAudio(await toAudioBuffer(file), sampleRate);\n const numberOfSamples = audioBuffer.duration * sampleRate;\n const fileSizeBytes =\n numberOfSamples * audioBuffer.numberOfChannels * BYTES_PER_SAMPLE +\n WAV_HEADER_LENGTH_BYTES;\n\n const arrayBuffer = new ArrayBuffer(fileSizeBytes);\n writeWavHeader({ arrayBuffer, channelCount: audioBuffer.numberOfChannels, sampleRate });\n writeWavAudioData({ arrayBuffer, dataByChannel: splitDataByChannel(audioBuffer) });\n return new Blob([arrayBuffer], { type: 'audio/wav' });\n};\n","import { encodeToWaw } from './wav';\nimport { createFileFromBlobs, getExtensionFromMimeType } from '../../ReactFileUtilities';\n\nexport type TranscoderConfig = {\n // defaults to 16000Hz\n sampleRate: number;\n // Custom encoder function that converts the recorded audio file into a blob with the desired MIME type\n encoder?: (file: File, sampleRate: number) => Promise<Blob>;\n};\n\nexport type TranscodeParams = TranscoderConfig & {\n blob: Blob;\n};\n\nexport const transcode = ({\n blob,\n encoder = encodeToWaw,\n sampleRate,\n}: TranscodeParams): Promise<Blob> =>\n encoder(\n createFileFromBlobs({\n blobsArray: [blob],\n fileName: `audio_recording_${new Date().toISOString()}.${getExtensionFromMimeType(\n blob.type,\n )}`,\n mimeType: blob.type,\n }),\n sampleRate,\n );\n","import fixWebmDuration from 'fix-webm-duration';\nimport { nanoid } from 'nanoid';\nimport {\n AmplitudeRecorder,\n DEFAULT_AMPLITUDE_RECORDER_CONFIG,\n} from './AmplitudeRecorder';\nimport { BrowserPermission } from './BrowserPermission';\nimport { BehaviorSubject, Subject } from '../observable';\nimport type { TranscoderConfig } from '../transcode';\nimport { transcode } from '../transcode';\nimport { resampleWaveformData } from '../../Attachment';\nimport type { RecordedMediaType } from '../../ReactFileUtilities';\nimport {\n createFileFromBlobs,\n getExtensionFromMimeType,\n getRecordedMediaTypeFromMimeType,\n} from '../../ReactFileUtilities';\nimport { defaultTranslatorFunction } from '../../../i18n';\nimport { mergeDeepUndefined } from '../../../utils/mergeDeep';\nimport type { LocalVoiceRecordingAttachment } from 'stream-chat';\nimport type { AmplitudeRecorderConfig } from './AmplitudeRecorder';\nimport type { TranslationContextValue } from '../../../context';\n\nexport const RECORDED_MIME_TYPE_BY_BROWSER = {\n audio: {\n others: 'audio/webm',\n safari: 'audio/mp4;codecs=mp4a.40.2',\n },\n} as const;\n\nexport const DEFAULT_AUDIO_TRANSCODER_CONFIG: TranscoderConfig = {\n sampleRate: 16000,\n} as const;\n\nconst disposeOfMediaStream = (stream?: MediaStream) => {\n if (!stream?.active) return;\n stream.getTracks().forEach((track) => {\n track.stop();\n stream.removeTrack(track);\n });\n};\n\nconst logError = (e?: Error) => e && console.error('[MEDIA RECORDER ERROR]', e);\n\ntype MediaRecorderConfig = Omit<MediaRecorderOptions, 'mimeType'> &\n Required<Pick<MediaRecorderOptions, 'mimeType'>>;\n\nexport type AudioRecorderConfig = {\n amplitudeRecorderConfig: AmplitudeRecorderConfig;\n mediaRecorderConfig: MediaRecorderOptions;\n transcoderConfig: TranscoderConfig;\n};\n\ntype PartialValues<T> = { [P in keyof T]?: Partial<T[P]> };\n\nexport type CustomAudioRecordingConfig = PartialValues<AudioRecorderConfig>;\n\nexport type AudioRecorderOptions = {\n config?: CustomAudioRecordingConfig;\n generateRecordingTitle?: (mimeType: string) => string;\n t?: TranslationContextValue['t'];\n};\n\nexport enum MediaRecordingState {\n PAUSED = 'paused',\n RECORDING = 'recording',\n STOPPED = 'stopped',\n}\n\nexport enum RecordingAttachmentType {\n VOICE_RECORDING = 'voiceRecording',\n}\n\nexport class MediaRecorderController {\n permission: BrowserPermission;\n mediaRecorder: MediaRecorder | undefined;\n amplitudeRecorder: AmplitudeRecorder | undefined;\n\n amplitudeRecorderConfig: AmplitudeRecorderConfig;\n mediaRecorderConfig: MediaRecorderConfig;\n transcoderConfig: TranscoderConfig;\n\n startTime: number | undefined;\n recordedChunkDurations: number[] = [];\n recordedData: Blob[] = [];\n recordingUri: string | undefined;\n mediaType: RecordedMediaType;\n\n signalRecordingReady: ((r: LocalVoiceRecordingAttachment) => void) | undefined;\n\n recordingState = new BehaviorSubject<MediaRecordingState | undefined>(undefined);\n recording = new BehaviorSubject<LocalVoiceRecordingAttachment | undefined>(undefined);\n error = new Subject<Error | undefined>();\n notification = new Subject<{ text: string; type: 'success' | 'error' } | undefined>();\n\n customGenerateRecordingTitle: ((mimeType: string) => string) | undefined;\n t: TranslationContextValue['t'];\n\n constructor({ config, generateRecordingTitle, t }: AudioRecorderOptions = {}) {\n this.t = t || defaultTranslatorFunction;\n\n this.amplitudeRecorderConfig = mergeDeepUndefined(\n { ...config?.amplitudeRecorderConfig },\n DEFAULT_AMPLITUDE_RECORDER_CONFIG,\n );\n\n this.mediaRecorderConfig = mergeDeepUndefined(\n { ...config?.mediaRecorderConfig },\n {\n mimeType: MediaRecorder.isTypeSupported('audio/webm')\n ? RECORDED_MIME_TYPE_BY_BROWSER.audio.others\n : RECORDED_MIME_TYPE_BY_BROWSER.audio.safari,\n },\n );\n\n this.transcoderConfig = mergeDeepUndefined(\n { ...config?.transcoderConfig },\n DEFAULT_AUDIO_TRANSCODER_CONFIG,\n );\n\n const mediaType = getRecordedMediaTypeFromMimeType(this.mediaRecorderConfig.mimeType);\n if (!mediaType) {\n throw new Error(\n `Unsupported media type (supported audio or video only). Provided mimeType: ${this.mediaRecorderConfig.mimeType}`,\n );\n }\n this.mediaType = mediaType;\n\n this.permission = new BrowserPermission({ mediaType });\n\n this.customGenerateRecordingTitle = generateRecordingTitle;\n }\n\n get durationMs() {\n return this.recordedChunkDurations.reduce((acc, val) => acc + val, 0);\n }\n\n generateRecordingTitle = (mimeType: string) => {\n if (this.customGenerateRecordingTitle) {\n return this.customGenerateRecordingTitle(mimeType);\n }\n return `${this.mediaType}_recording_${new Date().toISOString()}.${getExtensionFromMimeType(\n mimeType,\n )}`; // extension needed so that desktop Safari can play the asset\n };\n\n makeVoiceRecording = async () => {\n if (this.recordingUri) URL.revokeObjectURL(this.recordingUri);\n\n if (!this.recordedData.length) return;\n const { mimeType } = this.mediaRecorderConfig;\n let blob = new Blob(this.recordedData, { type: mimeType });\n if (mimeType.match('audio/webm')) {\n // The browser does not include duration metadata with the recorded blob\n blob = await fixWebmDuration(blob, this.durationMs, {\n logger: () => null, // prevents polluting the browser console\n });\n }\n if (!mimeType.match('audio/mp4')) {\n blob = await transcode({\n blob,\n ...this.transcoderConfig,\n });\n }\n\n if (!blob) return;\n\n this.recordingUri = URL.createObjectURL(blob);\n const file = createFileFromBlobs({\n blobsArray: [blob],\n fileName: this.generateRecordingTitle(blob.type),\n mimeType: blob.type,\n });\n\n return {\n asset_url: this.recordingUri,\n duration: this.durationMs / 1000,\n file_size: blob.size,\n localMetadata: {\n file,\n id: nanoid(),\n },\n mime_type: blob.type,\n title: file.name,\n type: RecordingAttachmentType.VOICE_RECORDING,\n waveform_data: resampleWaveformData(\n this.amplitudeRecorder?.amplitudes.value ?? [],\n this.amplitudeRecorderConfig.sampleCount,\n ),\n } as LocalVoiceRecordingAttachment;\n };\n\n handleErrorEvent = (e: Event) => {\n const { error } = e as ErrorEvent;\n logError(error);\n this.error.next(error);\n this.notification.next({\n text: this.t('An error has occurred during recording'),\n type: 'error',\n });\n };\n\n handleDataavailableEvent = async (e: BlobEvent) => {\n if (!e.data.size) return;\n if (this.mediaType !== 'audio') return;\n try {\n this.recordedData.push(e.data);\n const recording = await this.makeVoiceRecording();\n if (!recording) return;\n this.signalRecordingReady?.(recording);\n this.recording.next(recording);\n } catch (e) {\n logError(e as Error);\n this.error.next(e as Error);\n this.notification.next({\n text: this.t('An error has occurred during the recording processing'),\n type: 'error',\n });\n }\n };\n\n resetRecordingState = () => {\n this.recordedData = [];\n this.recording.next(undefined);\n this.recordingState.next(undefined);\n this.recordedChunkDurations = [];\n this.startTime = undefined;\n };\n\n cleanUp = () => {\n this.resetRecordingState();\n if (this.recordingUri) URL.revokeObjectURL(this.recordingUri);\n this.amplitudeRecorder?.close();\n if (this.mediaRecorder) {\n disposeOfMediaStream(this.mediaRecorder.stream);\n this.mediaRecorder.removeEventListener(\n 'dataavailable',\n this.handleDataavailableEvent,\n );\n this.mediaRecorder.removeEventListener('error', this.handleErrorEvent);\n }\n };\n\n start = async () => {\n if (\n [MediaRecordingState.RECORDING, MediaRecordingState.PAUSED].includes(\n this.recordingState.value as MediaRecordingState,\n )\n ) {\n const error = new Error('Cannot start recording. Recording already in progress');\n logError(error);\n this.error.next(error);\n return;\n }\n\n // account for requirement on iOS as per this bug report: https://bugs.webkit.org/show_bug.cgi?id=252303\n if (!navigator.mediaDevices) {\n const error = new Error('Media recording is not supported');\n logError(error);\n this.error.next(error);\n this.notification.next({ text: this.t('Error starting recording'), type: 'error' });\n return;\n }\n\n if (this.mediaType === 'video') {\n const error = new Error(\n `Video recording is not supported. Provided MIME type: ${this.mediaRecorderConfig.mimeType}`,\n );\n logError(error);\n this.error.next(error);\n this.notification.next({ text: this.t('Error starting recording'), type: 'error' });\n return;\n }\n\n if (!this.permission.state.value) {\n await this.permission.check();\n }\n\n if (this.permission.state.value === 'denied') {\n logError(new Error('Permission denied'));\n return;\n }\n\n try {\n const stream = await navigator.mediaDevices.getUserMedia({ audio: true });\n this.mediaRecorder = new MediaRecorder(stream, this.mediaRecorderConfig);\n\n this.mediaRecorder.addEventListener('dataavailable', this.handleDataavailableEvent);\n this.mediaRecorder.addEventListener('error', this.handleErrorEvent);\n\n this.startTime = new Date().getTime();\n this.mediaRecorder.start();\n\n if (this.mediaType === 'audio' && stream) {\n this.amplitudeRecorder = new AmplitudeRecorder({\n config: this.amplitudeRecorderConfig,\n stream,\n });\n this.amplitudeRecorder.start();\n }\n\n this.recordingState.next(MediaRecordingState.RECORDING);\n } catch (error) {\n logError(error as Error);\n this.cancel();\n this.error.next(error as Error);\n this.notification.next({ text: this.t('Error starting recording'), type: 'error' });\n }\n };\n\n pause = () => {\n if (this.recordingState.value !== MediaRecordingState.RECORDING) return;\n // The native recorder can transition to 'inactive' on its own (e.g. iOS Safari\n // interruptions or a preceding stop) while recordingState still reads RECORDING.\n // Calling pause() on a non-recording recorder throws InvalidStateError.\n if (this.mediaRecorder?.state !== 'recording') return;\n if (this.startTime) {\n this.recordedChunkDurations.push(new Date().getTime() - this.startTime);\n this.startTime = undefined;\n }\n this.mediaRecorder?.pause();\n // Flush current chunk so preview is available while paused.\n this.mediaRecorder?.requestData();\n this.amplitudeRecorder?.stop();\n this.recordingState.next(MediaRecordingState.PAUSED);\n };\n\n resume = () => {\n if (this.recordingState.value !== MediaRecordingState.PAUSED) return;\n // resume() is only valid on a 'paused' recorder; the native recorder may have gone\n // inactive while recordingState still reads PAUSED, which would throw InvalidStateError.\n if (this.mediaRecorder?.state !== 'paused') return;\n this.startTime = new Date().getTime();\n this.mediaRecorder?.resume();\n this.amplitudeRecorder?.start();\n this.recordingState.next(MediaRecordingState.RECORDING);\n };\n\n stop = () => {\n const recording = this.recording.value;\n if (recording && this.mediaRecorder?.state === 'inactive')\n return Promise.resolve(recording);\n\n if (\n ![MediaRecordingState.PAUSED, MediaRecordingState.RECORDING].includes(\n (this.mediaRecorder?.state || '') as MediaRecordingState,\n )\n )\n return Promise.resolve(undefined);\n\n if (this.startTime) {\n this.recordedChunkDurations.push(new Date().getTime() - this.startTime);\n this.startTime = undefined;\n }\n const result = new Promise<LocalVoiceRecordingAttachment>((res) => {\n this.signalRecordingReady = res;\n });\n this.mediaRecorder?.stop();\n this.amplitudeRecorder?.stop();\n this.recordingState.next(MediaRecordingState.STOPPED);\n return result;\n };\n\n cancel = () => {\n this.stop();\n this.cleanUp();\n };\n}\n","import { useCallback, useEffect, useMemo, useRef, useState } from 'react';\nimport { MediaRecorderController, MediaRecordingState } from '../classes';\nimport { useTranslationContext } from '../../../context';\nimport { useMessageComposerController } from '../../MessageComposer/hooks/useMessageComposerController';\nimport { useInteractionAnnouncements } from '../../Accessibility';\n\nimport type { LocalVoiceRecordingAttachment } from 'stream-chat';\nimport type { CustomAudioRecordingConfig } from '../classes';\nimport type { MessageComposerContextValue } from '../../../context';\n\nexport type RecordingController = {\n completeRecording: () => void;\n permissionState?: PermissionState;\n recorder?: MediaRecorderController;\n recording?: LocalVoiceRecordingAttachment;\n recordingState?: MediaRecordingState;\n};\n\ntype UseMediaRecorderParams = Pick<\n MessageComposerContextValue,\n 'asyncMessagesMultiSendEnabled' | 'handleSubmit'\n> & {\n enabled: boolean;\n generateRecordingTitle?: (mimeType: string) => string;\n recordingConfig?: CustomAudioRecordingConfig;\n};\n\nexport const useMediaRecorder = ({\n asyncMessagesMultiSendEnabled,\n enabled,\n generateRecordingTitle,\n handleSubmit,\n recordingConfig,\n}: UseMediaRecorderParams): RecordingController => {\n const { t } = useTranslationContext('useMediaRecorder');\n const { announceInteraction } = useInteractionAnnouncements();\n const messageComposer = useMessageComposerController();\n const [recording, setRecording] = useState<LocalVoiceRecordingAttachment>();\n const [recordingState, setRecordingState] = useState<MediaRecordingState>();\n const [permissionState, setPermissionState] = useState<PermissionState>();\n const [isScheduledForSubmit, scheduleForSubmit] = useState(false);\n\n const recorder = useMemo(\n () =>\n enabled\n ? new MediaRecorderController({\n config: recordingConfig ?? {},\n generateRecordingTitle,\n t,\n })\n : undefined,\n [recordingConfig, enabled, generateRecordingTitle, t],\n );\n\n const completeRecording = useCallback(async () => {\n if (!recorder) return;\n const recording = await recorder.stop();\n if (!recording) return;\n await messageComposer.attachmentManager.uploadAttachment(recording);\n if (!asyncMessagesMultiSendEnabled) {\n // FIXME: cannot call handleSubmit() directly as the function has stale reference to attachments\n scheduleForSubmit(true);\n announceInteraction('voiceRecording.sent');\n } else {\n announceInteraction('voiceRecording.attached');\n }\n recorder.cleanUp();\n }, [announceInteraction, asyncMessagesMultiSendEnabled, messageComposer, recorder]);\n\n const previousRecordingStateRef = useRef(recordingState);\n useEffect(() => {\n const previous = previousRecordingStateRef.current;\n previousRecordingStateRef.current = recordingState;\n if (previous === recordingState) return;\n if (recordingState === MediaRecordingState.RECORDING) {\n announceInteraction(\n previous === MediaRecordingState.PAUSED\n ? 'voiceRecording.resumed'\n : 'voiceRecording.started',\n );\n } else if (recordingState === MediaRecordingState.PAUSED) {\n announceInteraction('voiceRecording.paused');\n }\n }, [announceInteraction, recordingState]);\n\n useEffect(() => {\n if (!isScheduledForSubmit) return;\n handleSubmit();\n scheduleForSubmit(false);\n }, [handleSubmit, isScheduledForSubmit]);\n\n useEffect(() => {\n if (!recorder) return;\n recorder.permission.watch();\n const recordingSubscription = recorder.recording.subscribe(setRecording);\n const recordingStateSubscription =\n recorder.recordingState.subscribe(setRecordingState);\n const permissionStateSubscription =\n recorder.permission.state.subscribe(setPermissionState);\n\n return () => {\n recorder.cancel();\n recorder.permission.unwatch();\n recordingSubscription.unsubscribe();\n recordingStateSubscription.unsubscribe();\n permissionStateSubscription.unsubscribe();\n };\n }, [recorder]);\n\n return {\n completeRecording,\n permissionState,\n recorder,\n recording,\n recordingState,\n };\n};\n","import type React from 'react';\nimport { useTextareaRef } from './useTextareaRef';\nimport { useSubmitHandler } from './useSubmitHandler';\nimport { usePasteHandler } from './usePasteHandler';\nimport type { RecordingController } from '../../MediaRecorder/hooks/useMediaRecorder';\nimport { useMediaRecorder } from '../../MediaRecorder/hooks/useMediaRecorder';\nimport type { MessageComposerProps } from '../MessageComposer';\n\nexport type UseMessageComposerBindingsParams = {\n handleSubmit: (event?: React.BaseSyntheticEvent) => void;\n onPaste: (event: React.ClipboardEvent<HTMLTextAreaElement>) => void;\n recordingController: RecordingController;\n textareaRef: React.RefObject<HTMLTextAreaElement | null | undefined>;\n};\n\nexport const useMessageComposerBindings = (\n props: MessageComposerProps,\n): UseMessageComposerBindingsParams => {\n const { asyncMessagesMultiSendEnabled, audioRecordingConfig, audioRecordingEnabled } =\n props;\n\n const { textareaRef } = useTextareaRef(props);\n\n const { handleSubmit } = useSubmitHandler(props);\n\n const recordingController = useMediaRecorder({\n asyncMessagesMultiSendEnabled,\n enabled: !!audioRecordingEnabled,\n handleSubmit,\n recordingConfig: audioRecordingConfig,\n });\n\n const { onPaste } = usePasteHandler();\n\n return {\n handleSubmit,\n onPaste,\n recordingController,\n textareaRef,\n };\n};\n","import { useMemo } from 'react';\nimport type { CommandResponse, MessageComposerState } from 'stream-chat';\n\nimport { useStateStore } from '../../../store';\nimport { getChannelConfig } from '../../../utils/getChannelConfig';\nimport { useMessageComposerController } from './useMessageComposerController';\n\nconst messageComposerStateSelector = ({\n editedMessage,\n quotedMessage,\n}: MessageComposerState) => ({\n editedMessage,\n quotedMessage,\n});\n\nexport type MessageComposerCommand = {\n command: CommandResponse & { name: string };\n enabled: boolean;\n};\n\nexport const useMessageComposerCommands = () => {\n const messageComposer = useMessageComposerController();\n const channelConfig = getChannelConfig(messageComposer.channel);\n const { editedMessage, quotedMessage } = useStateStore(\n messageComposer.state,\n messageComposerStateSelector,\n );\n\n return useMemo<MessageComposerCommand[]>(\n () =>\n (channelConfig?.commands ?? [])\n .filter(\n (command): command is CommandResponse & { name: string } => !!command.name,\n )\n .map((command) => ({\n command,\n enabled: !messageComposer.isCommandDisabled(command),\n })),\n // editedMessage and quotedMessage are necessary in deps for reactivity\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [channelConfig, editedMessage, messageComposer, quotedMessage],\n );\n};\n","import { useMessageComposerController } from './useMessageComposerController';\nimport { useStateStore } from '../../../store';\nimport type { EditingAuditState } from 'stream-chat';\n\nconst editingAuditStateStateSelector = (state: EditingAuditState) => state;\n\nexport const useMessageComposerHasSendableData = () => {\n const messageComposer = useMessageComposerController();\n useStateStore(messageComposer.editingAuditState, editingAuditStateStateSelector);\n return messageComposer.hasSendableData;\n};\n","import type { EditingAuditState } from 'stream-chat';\nimport { useMessageComposerController } from './useMessageComposerController';\nimport { useStateStore } from '../../../store';\n\nconst editingAuditStateStateSelector = (state: EditingAuditState) => state;\n\nexport const useMessageContentIsEmpty = () => {\n const messageComposer = useMessageComposerController();\n useStateStore(messageComposer.editingAuditState, editingAuditStateStateSelector);\n return messageComposer.contentIsEmpty;\n};\n","import clsx from 'clsx';\nimport { Button } from '../Button';\nimport React, { type ComponentProps } from 'react';\nimport { useComponentContextIcons, useTranslationContext } from '../../context';\nimport type { AttachmentLoadingState } from 'stream-chat';\n\nexport const RemoveAttachmentPreviewButton = ({\n className,\n uploadState,\n ...props\n}: ComponentProps<'button'> & {\n uploadState?: AttachmentLoadingState;\n}) => {\n const { IconXmarkSmall } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n return (\n <Button\n aria-label={t('aria/Remove attachment')}\n circular\n className={clsx('str-chat__attachment-preview__remove-button', className)}\n data-testid='preview-item-delete-button'\n disabled={uploadState === 'uploading'}\n {...props}\n >\n <IconXmarkSmall />\n </Button>\n );\n};\n","import React from 'react';\nimport clsx from 'clsx';\n\nexport const QuotedMessageIndicator = ({ isOwnMessage }: { isOwnMessage?: boolean }) => (\n <div\n className={clsx('str-chat__quoted-message-indicator', {\n 'str-chat__quoted-message-indicator--own-message': isOwnMessage,\n })}\n />\n);\n","import React, {\n type ComponentType,\n type KeyboardEvent,\n type MouseEventHandler,\n type ReactElement,\n type ReactNode,\n useMemo,\n} from 'react';\n\nimport { displayDuration, SUPPORTED_VIDEO_FORMATS } from '../Attachment';\n\nimport { useChatContext } from '../../context/ChatContext';\nimport { useTranslationContext } from '../../context/TranslationContext';\n\nimport { useStateStore } from '../../store';\nimport { useMessageComposerController } from './hooks';\nimport {\n type Attachment,\n type GiphyVersions,\n isAudioAttachment,\n isFileAttachment,\n isGiphyAttachment,\n isImageAttachment,\n isScrapedContent,\n isVideoAttachment,\n isVoiceRecordingAttachment,\n type LocalMessage,\n type LocalMessageBase,\n type MessageComposerState,\n type PollResponse,\n type SharedLocationResponse,\n type TranslationLanguages,\n} from 'stream-chat';\nimport { useChannelStateContext } from '../../context/ChannelStateContext';\nimport type { MessageContextValue } from '../../context';\nimport { RemoveAttachmentPreviewButton } from './RemoveAttachmentPreviewButton';\nimport { useComponentContextIcons } from '../../context';\nimport clsx from 'clsx';\nimport { BaseImage } from '../BaseImage';\nimport { FileIcon } from '../FileIcon';\nimport { QuotedMessageIndicator } from './QuotedMessageIndicator';\nimport { getRenderTextMentionEntities } from '../Message/renderText/rehypePlugins';\n\nconst messageComposerStateStoreSelector = (state: MessageComposerState) => ({\n quotedMessage: state.quotedMessage,\n});\n\nexport type QuotedMessagePreviewProps = {\n getQuotedMessageAuthor?: (message: LocalMessage) => string;\n renderText?: MessageContextValue['renderText'];\n};\n\nconst NullAttachmentIcon = () => null;\n\nconst QUOTED_GIPHY_PREVIEW_LABEL = 'Giphy';\n\ntype AttachmentType = 'documents' | 'images' | 'links' | 'videos' | 'voiceRecordings';\n\n/** Giphy GIFs: only native type (e.g. /giphy command) is recognized as Giphy. */\nconst isQuotedGiphyAttachment = (attachment: Attachment) => isGiphyAttachment(attachment);\n\nconst getAttachmentType = (attachment: Attachment) => {\n if (isQuotedGiphyAttachment(attachment)) {\n return 'giphy';\n }\n if (isScrapedContent(attachment)) {\n return 'link';\n } else if (isVideoAttachment(attachment, SUPPORTED_VIDEO_FORMATS)) {\n return 'video';\n } else if (isImageAttachment(attachment)) {\n return 'image';\n } else if (isAudioAttachment(attachment)) {\n return 'audio';\n } else if (isVoiceRecordingAttachment(attachment)) {\n return 'voiceRecording';\n } else if (isFileAttachment(attachment, SUPPORTED_VIDEO_FORMATS)) {\n return 'file';\n }\n\n return 'unsupported';\n};\n\ntype GroupedAttachments = Record<AttachmentType, Attachment[]> & {\n giphies: Attachment[];\n locations: SharedLocationResponse[];\n polls: PollResponse[];\n total: number;\n};\n\nconst getGroupedAttachments = (quotedMessage: LocalMessage | null) => {\n const groupedAttachments = {\n documents: [],\n giphies: [],\n images: [],\n links: [],\n locations: [],\n polls: [],\n total: 0,\n videos: [],\n voiceRecordings: [],\n };\n\n if (!quotedMessage || !quotedMessage.attachments) return groupedAttachments;\n\n const result = quotedMessage.attachments.reduce<GroupedAttachments>(\n (count, attachment) => {\n switch (getAttachmentType(attachment)) {\n case 'giphy':\n count.giphies.push(attachment);\n count.total += 1;\n break;\n case 'link':\n count.links.push(attachment);\n count.total += 1;\n break;\n case 'video':\n count.videos.push(attachment);\n count.total += 1;\n break;\n case 'voiceRecording':\n count.voiceRecordings.push(attachment);\n count.total += 1;\n break;\n case 'audio':\n case 'file':\n count.documents.push(attachment);\n count.total += 1;\n break;\n default:\n if (isImageAttachment(attachment)) {\n count.images.push(attachment);\n count.total += 1;\n }\n }\n\n return count;\n },\n groupedAttachments,\n );\n if (quotedMessage.shared_location) {\n result.locations.push(quotedMessage.shared_location);\n result.total += 1;\n } else if (quotedMessage.poll) {\n result.polls.push(quotedMessage.poll);\n result.total += 1;\n }\n\n return result;\n};\n\ntype PreviewType =\n | 'voice'\n | 'file'\n | 'image'\n | 'giphy'\n | 'link'\n | 'location'\n | 'poll'\n | 'video'\n | 'mixed';\n\ntype IconSet = Record<\n | 'IconCamera'\n | 'IconFile'\n | 'IconLink'\n | 'IconLocation'\n | 'IconPlayFill'\n | 'IconPoll'\n | 'IconVideo'\n | 'IconVoice',\n ComponentType\n>;\n\nconst getAttachmentIconWithType = (\n quotedMessage: LocalMessage | null,\n giphyVersionName: GiphyVersions,\n {\n IconCamera,\n IconFile,\n IconLink,\n IconLocation,\n IconPlayFill,\n IconPoll,\n IconVideo,\n IconVoice,\n }: IconSet,\n): {\n groupedAttachments: GroupedAttachments;\n Icon: ComponentType;\n PreviewImage: ReactElement | null;\n previewType: PreviewType | null;\n} => {\n const groupedAttachments = getGroupedAttachments(quotedMessage);\n const result = {\n groupedAttachments,\n Icon: NullAttachmentIcon,\n PreviewImage: null,\n previewType: null,\n };\n if (!groupedAttachments.total) return result;\n if (groupedAttachments.polls.length > 0)\n return { ...result, Icon: IconPoll, previewType: 'poll' };\n if (groupedAttachments.locations.length > 0)\n // todo: we do not generate the location preview image\n return { ...result, Icon: IconLocation, previewType: 'location' };\n if (\n groupedAttachments.giphies.length > 0 &&\n groupedAttachments.giphies.length === groupedAttachments.total\n ) {\n const giphyAttachment = groupedAttachments.giphies[0] as Attachment & {\n giphy?: Record<string, { url?: string } | undefined>;\n };\n const giphyVersion =\n giphyAttachment.giphy?.[giphyVersionName as keyof NonNullable<Attachment['giphy']>];\n const src =\n giphyVersion?.url || giphyAttachment.thumb_url || giphyAttachment.image_url || '';\n return {\n ...result,\n Icon: IconFile,\n PreviewImage: (\n <BaseImage\n alt={QUOTED_GIPHY_PREVIEW_LABEL}\n className='str-chat__attachment-preview__thumbnail'\n src={src}\n title={QUOTED_GIPHY_PREVIEW_LABEL}\n />\n ),\n previewType: 'giphy',\n };\n }\n if (\n groupedAttachments.documents.length === groupedAttachments.total &&\n groupedAttachments.documents.length === 1\n ) {\n const fileAttachment = groupedAttachments.documents[0] as Attachment;\n return {\n ...result,\n Icon: IconFile,\n PreviewImage: (\n <FileIcon fileName={fileAttachment.title} mimeType={fileAttachment.mime_type} />\n ),\n previewType: 'file',\n };\n }\n if (groupedAttachments.links.length === groupedAttachments.total) {\n const linkAttachment = groupedAttachments.links[0];\n return {\n ...result,\n Icon: IconLink,\n PreviewImage: (\n <BaseImage\n alt={linkAttachment.title}\n className='str-chat__attachment-preview__thumbnail'\n src={linkAttachment.thumb_url || linkAttachment.image_url}\n title={linkAttachment.title}\n />\n ),\n previewType: 'link',\n };\n }\n if (groupedAttachments.videos.length === groupedAttachments.total) {\n const videoAttachment = groupedAttachments.videos[0];\n return {\n ...result,\n Icon: IconVideo,\n PreviewImage: (\n <>\n <BaseImage\n alt={videoAttachment.asset_url}\n className='str-chat__attachment-preview__thumbnail'\n src={videoAttachment.thumb_url}\n title={videoAttachment.title}\n />\n <div className='str-chat__attachment-preview__thumbnail__play-indicator'>\n <IconPlayFill />\n </div>\n </>\n ),\n previewType: 'video',\n };\n }\n if (groupedAttachments.images.length === groupedAttachments.total) {\n const imageAttachment = groupedAttachments.images[0];\n return {\n ...result,\n Icon: IconCamera,\n PreviewImage: (\n <BaseImage\n alt={imageAttachment.fallback}\n className='str-chat__attachment-preview__thumbnail'\n src={imageAttachment.image_url}\n title={imageAttachment.title}\n />\n ),\n previewType: 'image',\n };\n }\n if (groupedAttachments.voiceRecordings.length === groupedAttachments.total)\n return { ...result, Icon: IconVoice, previewType: 'voice' };\n\n return { ...result, Icon: IconFile, previewType: 'mixed' };\n};\n\nexport const QuotedMessagePreview = ({\n getQuotedMessageAuthor,\n renderText,\n}: QuotedMessagePreviewProps) => {\n const messageComposer = useMessageComposerController();\n const { quotedMessage } = useStateStore(\n messageComposer.state,\n messageComposerStateStoreSelector,\n );\n\n return quotedMessage ? (\n <div className='str-chat__message-composer__quoted-message-preview-slot'>\n <QuotedMessagePreviewUI\n getQuotedMessageAuthor={getQuotedMessageAuthor}\n onRemove={() => messageComposer.setQuotedMessage(null)}\n quotedMessage={quotedMessage}\n renderText={renderText}\n />\n </div>\n ) : null;\n};\n\ntype QuotedMessagePreviewUIProps = QuotedMessagePreviewProps & {\n quotedMessage: LocalMessageBase;\n authorLabel?: ReactNode;\n className?: string;\n onClick?: MouseEventHandler<HTMLDivElement>;\n onRemove?: () => void;\n};\n\nexport const QuotedMessagePreviewUI = ({\n authorLabel,\n className,\n getQuotedMessageAuthor,\n onClick,\n onRemove,\n quotedMessage,\n renderText,\n}: QuotedMessagePreviewUIProps) => {\n const { client } = useChatContext();\n const { t, userLanguage } = useTranslationContext();\n const { giphyVersion: giphyVersionName = 'fixed_height' } =\n useChannelStateContext('QuotedMessagePreview');\n const {\n IconCamera,\n IconFile,\n IconLink,\n IconLocation,\n IconPlayFill,\n IconPoll,\n IconVideo,\n IconVoice,\n } = useComponentContextIcons();\n\n const iconSet = useMemo(\n () => ({\n IconCamera,\n IconFile,\n IconLink,\n IconLocation,\n IconPlayFill,\n IconPoll,\n IconVideo,\n IconVoice,\n }),\n [\n IconCamera,\n IconFile,\n IconLink,\n IconLocation,\n IconPlayFill,\n IconPoll,\n IconVideo,\n IconVoice,\n ],\n );\n\n const quotedMessageText = useMemo(\n () =>\n quotedMessage?.i18n?.[`${userLanguage}_text` as `${TranslationLanguages}_text`] ||\n quotedMessage?.text,\n [quotedMessage?.i18n, quotedMessage?.text, userLanguage],\n );\n const quotedMessageMentionEntities = useMemo(\n () =>\n getRenderTextMentionEntities({\n mentioned_channel: quotedMessage?.mentioned_channel,\n mentioned_groups: quotedMessage?.mentioned_groups,\n mentioned_here: quotedMessage?.mentioned_here,\n mentioned_roles: quotedMessage?.mentioned_roles,\n mentioned_users: quotedMessage?.mentioned_users,\n }),\n [\n quotedMessage?.mentioned_channel,\n quotedMessage?.mentioned_groups,\n quotedMessage?.mentioned_here,\n quotedMessage?.mentioned_roles,\n quotedMessage?.mentioned_users,\n ],\n );\n\n const { AttachmentIcon, PreviewImage, renderedText } = useMemo(() => {\n if (!quotedMessage) return { AttachmentIcon: NullAttachmentIcon, renderedText: null };\n\n const {\n groupedAttachments,\n Icon: AttachmentIcon,\n PreviewImage,\n previewType,\n } = getAttachmentIconWithType(quotedMessage, giphyVersionName, iconSet);\n\n let renderedText: ReactNode | undefined;\n\n if (!quotedMessageText) {\n if (previewType === 'poll') {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n renderedText = quotedMessage.poll!.name;\n } else if (previewType === 'location') {\n renderedText = t('Live location');\n } else if (previewType === 'voice') {\n {\n const voiceRecording = groupedAttachments.voiceRecordings[0];\n renderedText = t('Voice message {{ duration }}', {\n // eslint-disable-next-line @typescript-eslint/no-non-null-assertion\n duration: displayDuration(voiceRecording!.duration),\n });\n }\n } else if (previewType === 'giphy') {\n renderedText = QUOTED_GIPHY_PREVIEW_LABEL;\n } else if (previewType === 'link') {\n renderedText = groupedAttachments.links[0].title;\n } else if (previewType === 'mixed') {\n renderedText = t('{{ count }} files', { count: groupedAttachments.total });\n } else if (previewType === 'video') {\n renderedText =\n groupedAttachments.videos.length === 1\n ? t('Video')\n : t('{{ count }} videos', {\n count: groupedAttachments.videos.length,\n });\n } else if (previewType === 'file') {\n renderedText = groupedAttachments.documents[0].title;\n } else if (previewType === 'image') {\n renderedText =\n groupedAttachments.images.length === 1\n ? t('Photo')\n : t('{{ count }} photos', {\n count: groupedAttachments.images.length,\n });\n }\n } else if (renderText) {\n renderedText = renderText(quotedMessageText, quotedMessage?.mentioned_users, {\n messageMentionEntities: quotedMessageMentionEntities,\n });\n } else {\n renderedText = quotedMessageText;\n }\n\n return {\n AttachmentIcon,\n PreviewImage,\n renderedText,\n };\n }, [\n giphyVersionName,\n iconSet,\n quotedMessage,\n quotedMessageMentionEntities,\n quotedMessageText,\n renderText,\n t,\n ]);\n\n const isOwnMessage = client.user?.id === quotedMessage?.user?.id;\n const isInteractive = !!onClick;\n\n const handleKeyDown = (event: KeyboardEvent<HTMLDivElement>) => {\n if (!onClick || (event.key !== 'Enter' && event.key !== ' ')) return;\n\n event.preventDefault();\n onClick(event as unknown as Parameters<NonNullable<typeof onClick>>[0]);\n };\n\n if (!renderedText && !AttachmentIcon && !PreviewImage) return null;\n\n const authorName = getQuotedMessageAuthor?.(quotedMessage) ?? quotedMessage.user?.name;\n return (\n <div\n aria-label={isInteractive ? t('aria/Jump to quoted message') : undefined}\n className={clsx('str-chat__quoted-message-preview', className, {\n 'str-chat__quoted-message-preview--own': isOwnMessage,\n })}\n data-testid='quoted-message-preview'\n onClick={onClick}\n onKeyDown={isInteractive ? handleKeyDown : undefined}\n role={isInteractive ? 'button' : undefined}\n tabIndex={isInteractive ? 0 : undefined}\n >\n <QuotedMessageIndicator isOwnMessage={isOwnMessage} />\n <div className='str-chat__quoted-message-preview__content'>\n <div className='str-chat__quoted-message-preview__author'>\n {authorLabel ??\n (isOwnMessage\n ? t('You')\n : authorName\n ? t('Reply to {{ authorName }}', { authorName })\n : t('Reply'))}\n </div>\n\n <div\n className='str-chat__quoted-message-preview__message'\n data-testid='quoted-message-text'\n >\n <AttachmentIcon />\n <div className='str-chat__quoted-message-preview__message-text'>\n {renderedText}\n </div>\n </div>\n </div>\n {PreviewImage && (\n <div className='str-chat__quoted-message-preview__image'>{PreviewImage}</div>\n )}\n\n {onRemove && (\n <RemoveAttachmentPreviewButton\n aria-label={t('aria/Cancel Reply')}\n data-testid='quoted-message-preview-dismiss-btn'\n onClick={onRemove}\n />\n )}\n </div>\n );\n};\n","import { FocusScope } from '@react-aria/focus';\nimport clsx from 'clsx';\nimport type {\n ComponentProps,\n ComponentType,\n PropsWithChildren,\n ReactNode,\n Ref,\n} from 'react';\nimport React, { useCallback, useEffect, useMemo, useRef, useState } from 'react';\n\nimport { createRovingFocusKeyDownHandler } from '../../a11y/a11yUtils';\nimport {\n type PopperLikePlacement,\n usePopoverPosition,\n} from '../Dialog/hooks/usePopoverPosition';\n\nconst DEFAULT_DROPDOWN_ITEM_SELECTOR =\n '[role=\"option\"]:not(:disabled), [role=\"menuitem\"]:not(:disabled), button:not(:disabled), a:not(:disabled)';\n\nconst isEditableTarget = (target: EventTarget | null) =>\n target instanceof HTMLInputElement ||\n target instanceof HTMLTextAreaElement ||\n (target instanceof HTMLElement && target.isContentEditable);\n\ntype DropdownContextValue = {\n close(): void;\n};\n\nconst DropdownContext = React.createContext<DropdownContextValue>({\n close: () => null,\n});\n\ntype DropdownContextProviderProps = DropdownContextValue;\n\nconst DropdownContextProvider = ({\n children,\n ...props\n}: PropsWithChildren<DropdownContextProviderProps>) => (\n <DropdownContext.Provider value={props}>{children}</DropdownContext.Provider>\n);\n\nexport const useDropdownContext = () => React.useContext(DropdownContext);\n\nexport type DropdownTriggerProps = Pick<\n ComponentProps<'button'>,\n 'aria-expanded' | 'onClick'\n> & {\n children?: ReactNode;\n referenceRef?: Ref<HTMLElement>;\n};\n\nexport type DropdownProps = PropsWithChildren<{\n className?: string;\n matchReferenceWidth?: boolean;\n onClose?: () => void;\n onOpen?: () => void;\n placement?: PopperLikePlacement;\n TriggerComponent?: ComponentType<DropdownTriggerProps>;\n triggerProps?: Omit<DropdownTriggerProps, 'aria-expanded' | 'onClick' | 'referenceRef'>;\n referenceElement?: HTMLElement | null;\n}>;\n\nexport const Dropdown = ({\n children,\n className,\n matchReferenceWidth = false,\n onClose,\n onOpen,\n placement = 'bottom',\n referenceElement,\n TriggerComponent,\n triggerProps,\n}: DropdownProps) => {\n const [mountedReferenceElement, setMountedReferenceElement] =\n useState<HTMLElement | null>(null);\n const resolvedReferenceElement = TriggerComponent\n ? mountedReferenceElement\n : (referenceElement ?? null);\n const [isOpen, setIsOpen] = useState(!TriggerComponent);\n const [floatingElement, setFloatingElement] = useState<HTMLDivElement | null>(null);\n const { refs, strategy, update, x, y } = usePopoverPosition({\n placement,\n });\n\n useEffect(() => {\n if (!TriggerComponent) return;\n setIsOpen(false);\n }, [TriggerComponent]);\n\n const close = useCallback(() => {\n setIsOpen(false);\n onClose?.();\n }, [onClose]);\n\n const open = useCallback(() => {\n setIsOpen(true);\n onOpen?.();\n }, [onOpen]);\n\n const toggle = useCallback(() => {\n if (isOpen) {\n close();\n return;\n }\n open();\n }, [close, isOpen, open]);\n\n useEffect(() => {\n refs.setReference(resolvedReferenceElement);\n }, [refs, resolvedReferenceElement]);\n\n useEffect(() => {\n refs.setFloating(floatingElement);\n }, [floatingElement, refs]);\n\n useEffect(() => {\n if (!isOpen || !floatingElement || !resolvedReferenceElement) return;\n update?.();\n }, [floatingElement, isOpen, resolvedReferenceElement, update]);\n\n useEffect(() => {\n if (!isOpen) return;\n\n const handleClickOutside = (event: MouseEvent) => {\n if (!(event.target instanceof Node)) return;\n if (floatingElement?.contains(event.target)) return;\n if (resolvedReferenceElement?.contains(event.target)) return;\n close();\n };\n\n document.addEventListener('mousedown', handleClickOutside);\n\n return () => {\n document.removeEventListener('mousedown', handleClickOutside);\n };\n }, [close, floatingElement, isOpen, resolvedReferenceElement]);\n\n const rovingFocusKeyDownHandler = useMemo(\n () =>\n createRovingFocusKeyDownHandler<HTMLElement>({\n getItems: (event) =>\n Array.from(\n event.currentTarget.querySelectorAll<HTMLElement>(\n DEFAULT_DROPDOWN_ITEM_SELECTOR,\n ),\n ),\n }),\n [],\n );\n\n const escapeConsumedRef = useRef(false);\n\n const handleKeyDown = useCallback(\n (event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'Escape') {\n event.preventDefault();\n event.stopPropagation();\n escapeConsumedRef.current = true;\n close();\n return;\n }\n if (isEditableTarget(event.target)) {\n return;\n }\n rovingFocusKeyDownHandler(event);\n },\n [close, rovingFocusKeyDownHandler],\n );\n\n const suppressEscapeKeyUp = useCallback((event: React.KeyboardEvent<HTMLElement>) => {\n if (event.key === 'Escape' && escapeConsumedRef.current) {\n escapeConsumedRef.current = false;\n event.stopPropagation();\n }\n }, []);\n\n const DropdownTriggerComponent = TriggerComponent;\n\n const trigger = DropdownTriggerComponent ? (\n <DropdownTriggerComponent\n aria-expanded={isOpen}\n onClick={toggle}\n referenceRef={setMountedReferenceElement}\n {...triggerProps}\n />\n ) : null;\n\n const content =\n isOpen && resolvedReferenceElement ? (\n <FocusScope autoFocus restoreFocus>\n <DropdownContextProvider close={close}>\n <div\n className={clsx('str-chat__dropdown__items', className)}\n onClick={close}\n onKeyDown={handleKeyDown}\n onKeyUpCapture={suppressEscapeKeyUp}\n ref={setFloatingElement}\n role='menu'\n style={{\n left: x ?? 0,\n minWidth: matchReferenceWidth\n ? resolvedReferenceElement.getBoundingClientRect().width\n : undefined,\n position: strategy,\n top: y ?? 0,\n }}\n >\n {children}\n </div>\n </DropdownContextProvider>\n </FocusScope>\n ) : null;\n\n return (\n <div className='str-chat__dropdown'>\n {trigger}\n {content}\n </div>\n );\n};\n","import React, {\n type ComponentType,\n useCallback,\n useEffect,\n useMemo,\n useState,\n} from 'react';\nimport { useComponentContextIcons, useTranslationContext } from '../../context';\nimport { ContextMenuBody, ContextMenuButton, ContextMenuRoot, Prompt } from '../Dialog';\nimport {\n Dropdown,\n type DropdownTriggerProps,\n useDropdownContext,\n} from '../Form/Dropdown';\nimport { useMessageComposerController } from '../MessageComposer/hooks/useMessageComposerController';\nimport { SwitchField } from '../Form/SwitchField';\nimport { useNotificationApi } from '../Notifications';\nimport type { Coords } from 'stream-chat';\nimport { Button } from '../Button';\nimport clsx from 'clsx';\n\nconst MIN_LIVE_LOCATION_SHARE_DURATION = 60 * 1000; // 1 minute;\n\nconst DEFAULT_SHARE_LOCATION_DURATIONS = [\n 15 * 60 * 1000, // 15 minutes\n 60 * 60 * 1000, // 1 hour\n 8 * 60 * 60 * 1000, // 8 hours\n];\n\nexport type ShareGeolocationMapProps = Partial<Coords> & {\n loadingLocation: boolean;\n restartLocationWatching: () => void;\n geolocationPositionError?: GeolocationPositionError;\n};\n\nexport type ShareLocationDialogProps = {\n close: () => void;\n shareDurations?: number[];\n GeolocationMap?: ComponentType<ShareGeolocationMapProps>;\n DurationDropdownItems?: ComponentType<DurationDropdownItemsProps>;\n};\n\nconst DefaultGeolocationMap = () => null;\n\nconst LiveLocationDurationTrigger = ({\n children,\n onClick,\n referenceRef,\n ...props\n}: DropdownTriggerProps) => (\n <Button\n {...props}\n className='str-chat__live-location-sharing-duration-selector__button'\n onClick={onClick}\n ref={referenceRef as React.Ref<HTMLButtonElement>}\n type='button'\n >\n {children}\n </Button>\n);\n\nexport const ShareLocationDialog = ({\n close,\n GeolocationMap = DefaultGeolocationMap,\n shareDurations = DEFAULT_SHARE_LOCATION_DURATIONS,\n}: ShareLocationDialogProps) => {\n const { IconChevronDown } = useComponentContextIcons();\n\n const { addNotification } = useNotificationApi();\n const { t } = useTranslationContext();\n const messageComposer = useMessageComposerController();\n const [durations, setDurations] = useState<number[]>([]);\n const [selectedDuration, setSelectedDuration] = useState<number | undefined>(undefined);\n const [geolocationPosition, setGeolocationPosition] =\n useState<GeolocationPosition | null>(null);\n const [loadingLocation, setLoadingLocation] = useState<boolean>(false);\n const [geolocationPositionError, setGeolocationPositionError] = useState<\n GeolocationPositionError | undefined\n >(undefined);\n\n const validShareDurations = useMemo(\n () => shareDurations.filter((d) => d >= MIN_LIVE_LOCATION_SHARE_DURATION),\n [shareDurations],\n );\n\n const selectedDurationLabel = useMemo(\n () =>\n durations.length > 0\n ? t('duration/Share Location', {\n milliseconds: selectedDuration ?? durations[0],\n })\n : undefined,\n [durations, selectedDuration, t],\n );\n\n const durationTriggerProps = useMemo(\n () => ({\n children: selectedDurationLabel ? (\n <>\n <span>{selectedDurationLabel}</span>\n <IconChevronDown />\n </>\n ) : null,\n }),\n [IconChevronDown, selectedDurationLabel],\n );\n\n const getPosition = useCallback(\n (): Promise<GeolocationPosition> =>\n new Promise((resolve, reject) => {\n navigator.geolocation.getCurrentPosition(\n (position) => {\n resolve(position);\n },\n (positionError) => {\n console.warn(positionError);\n reject(positionError);\n },\n { timeout: 1000 },\n );\n }),\n [],\n );\n\n const setupPositionWatching = useCallback(() => {\n setLoadingLocation(true);\n const watch = navigator.geolocation.watchPosition(\n (position) => {\n setGeolocationPosition(position);\n setLoadingLocation(false);\n setGeolocationPositionError(undefined);\n },\n (error) => {\n setGeolocationPosition(null);\n setLoadingLocation(false);\n setGeolocationPositionError(error);\n },\n { timeout: 1000 },\n );\n\n return () => {\n navigator.geolocation.clearWatch(watch);\n };\n }, []);\n\n useEffect(() => setupPositionWatching(), [setupPositionWatching]);\n\n const liveLocationSwitchEnabled = durations.length > 0;\n return (\n <Prompt.Root\n className='str-chat__share-location-dialog'\n data-testid='share-location-dialog'\n >\n <Prompt.Header\n close={close}\n description={t(\n 'Select your current location and optionally enable live location sharing',\n )}\n title={t('Share Location')}\n />\n <Prompt.Body>\n <GeolocationMap\n geolocationPositionError={geolocationPositionError}\n latitude={geolocationPosition?.coords.latitude}\n loadingLocation={loadingLocation}\n longitude={geolocationPosition?.coords.longitude}\n restartLocationWatching={setupPositionWatching}\n />\n {validShareDurations.length > 0 && (\n <div\n className={clsx('str-chat__live-location-activation', {\n 'str-chat__live-location-activation--expanded': liveLocationSwitchEnabled,\n })}\n >\n <SwitchField\n checked={liveLocationSwitchEnabled}\n data-testid='share-location-dialog-live-location-switch'\n disabled={!geolocationPosition}\n onChange={(e) => {\n e.stopPropagation();\n if (liveLocationSwitchEnabled) {\n setDurations([]);\n setSelectedDuration(undefined);\n } else {\n setDurations(validShareDurations);\n setSelectedDuration(validShareDurations[0]);\n }\n }}\n title={t('Share live location for')}\n />\n {liveLocationSwitchEnabled && selectedDurationLabel && (\n <div className='str-chat__live-location-sharing-duration-selector'>\n <Dropdown\n placement='bottom-start'\n TriggerComponent={LiveLocationDurationTrigger}\n triggerProps={durationTriggerProps}\n >\n <DurationDropdownItems\n durations={durations}\n selectDuration={setSelectedDuration}\n selectedDuration={selectedDuration}\n />\n </Dropdown>\n </div>\n )}\n </div>\n )}\n </Prompt.Body>\n <Prompt.Footer>\n <Prompt.FooterControls>\n <Prompt.FooterControlsButtonSecondary\n className='str-chat__prompt__footer__controls-button--cancel'\n onClick={() => {\n messageComposer.locationComposer.initState();\n close();\n }}\n >\n {t('Cancel')}\n </Prompt.FooterControlsButtonSecondary>\n <Prompt.FooterControlsButtonSecondary\n className='str-chat__prompt__footer__controls-button--submit'\n disabled={!geolocationPosition}\n onClick={async () => {\n let coords = geolocationPosition && {\n latitude: geolocationPosition.coords.latitude,\n longitude: geolocationPosition.coords.longitude,\n };\n if (!coords) {\n coords = (await getPosition()).coords;\n }\n messageComposer.locationComposer.setData({\n ...coords,\n durationMs: selectedDuration,\n });\n close();\n }}\n type='submit'\n >\n {t('Attach')}\n </Prompt.FooterControlsButtonSecondary>\n <Prompt.FooterControlsButtonPrimary\n className='str-chat__prompt__footer__controls-button--submit'\n disabled={!geolocationPosition}\n onClick={async () => {\n let coords = geolocationPosition && {\n latitude: geolocationPosition.coords.latitude,\n longitude: geolocationPosition.coords.longitude,\n };\n if (!coords) {\n try {\n coords = (await getPosition()).coords;\n } catch (e) {\n addNotification({\n emitter: 'ShareLocationDialog',\n error: e instanceof Error ? e : undefined,\n message: t('Failed to retrieve location'),\n severity: 'error',\n type: 'browser:location:get:failed',\n });\n return;\n }\n }\n\n messageComposer.locationComposer.setData({\n ...coords,\n durationMs: selectedDuration,\n });\n try {\n await messageComposer.sendLocation();\n } catch (err) {\n addNotification({\n emitter: 'ShareLocationDialog',\n error: err instanceof Error ? err : undefined,\n message: t('Failed to share location'),\n severity: 'error',\n type: 'api:location:share:failed',\n });\n return;\n }\n close();\n }}\n type='submit'\n >\n {t('Share')}\n </Prompt.FooterControlsButtonPrimary>\n </Prompt.FooterControls>\n </Prompt.Footer>\n </Prompt.Root>\n );\n};\n\nexport type DurationDropdownItemsProps = {\n durations: number[];\n selectedDuration?: number;\n selectDuration: (duration: number) => void;\n};\nconst DurationDropdownItems = ({\n durations,\n selectDuration,\n selectedDuration,\n}: DurationDropdownItemsProps) => {\n const { t } = useTranslationContext();\n const { close } = useDropdownContext();\n return (\n <ContextMenuRoot>\n <ContextMenuBody>\n {durations.map((duration) => (\n <ContextMenuButton\n aria-checked={selectedDuration === duration}\n className='str-chat__live-location-sharing-duration-option'\n key={`duration-${duration}`}\n onClick={() => {\n selectDuration(duration);\n close();\n }}\n role='menuitemradio'\n >\n {t('duration/Share Location', { milliseconds: duration })}\n </ContextMenuButton>\n ))}\n </ContextMenuBody>\n </ContextMenuRoot>\n );\n};\n","import clsx from 'clsx';\nimport React, { forwardRef, useCallback } from 'react';\nimport type { ChangeEvent, ComponentProps, KeyboardEvent } from 'react';\nimport { useComponentContextIcons, useTranslationContext } from '../../context';\nimport { useStableId } from '../UtilityComponents/useStableId';\nimport { Button } from '../Button';\n\nexport type NumericInputProps = Omit<\n ComponentProps<'input'>,\n 'className' | 'type' | 'value' | 'onChange'\n> & {\n value: string;\n onChange: (e: ChangeEvent<HTMLInputElement>) => void;\n /** Optional label above the input */\n label?: string;\n /** Minimum value (stepper) */\n min?: number;\n /** Maximum value (stepper) */\n max?: number;\n /** Step for increment/decrement (default 1) */\n step?: number;\n className?: string;\n};\n\nconst parseNumeric = (s: string): number | null => {\n const trimmed = s.trim();\n if (trimmed === '') return null;\n const n = Number(trimmed);\n return Number.isFinite(n) ? n : null;\n};\n\nconst clamp = (n: number, min: number, max: number): number =>\n Math.min(Math.max(n, min), max);\n\nexport const NumericInput = forwardRef<HTMLInputElement, NumericInputProps>(\n function NumericInput(\n {\n className,\n disabled = false,\n id: idProp,\n label,\n max,\n min,\n onChange,\n step = 1,\n value,\n ...inputProps\n },\n ref,\n ) {\n const generatedId = useStableId();\n const id = idProp ?? generatedId;\n const { t } = useTranslationContext();\n const { IconMinus, IconPlusSmall } = useComponentContextIcons();\n\n const num = parseNumeric(value);\n const minDef = min ?? -Infinity;\n const maxDef = max ?? Infinity;\n const atMin = num !== null && num <= minDef;\n const atMax = num !== null && num >= maxDef;\n\n const handleInputChange = useCallback(\n (e: ChangeEvent<HTMLInputElement>) => {\n const next = e.target.value;\n if (next === '' || /^\\d+$/.test(next)) {\n onChange(e);\n }\n },\n [onChange],\n );\n\n const createChangeEvent = useCallback(\n (newValue: string): ChangeEvent<HTMLInputElement> =>\n ({\n currentTarget: { value: newValue },\n target: { value: newValue },\n }) as ChangeEvent<HTMLInputElement>,\n [],\n );\n\n const handleDecrement = useCallback(() => {\n if (disabled || atMin) return;\n const next = num !== null ? clamp(num - step, minDef, maxDef) : minDef;\n onChange(createChangeEvent(String(next)));\n }, [disabled, atMin, num, step, minDef, maxDef, onChange, createChangeEvent]);\n\n const handleIncrement = useCallback(() => {\n if (disabled || atMax) return;\n const next = num !== null ? clamp(num + step, minDef, maxDef) : minDef;\n onChange(createChangeEvent(String(next)));\n }, [disabled, atMax, num, step, minDef, maxDef, onChange, createChangeEvent]);\n\n const handleKeyDown = useCallback(\n (e: KeyboardEvent<HTMLInputElement>) => {\n if (e.key === 'ArrowDown') {\n e.preventDefault();\n handleDecrement();\n } else if (e.key === 'ArrowUp') {\n e.preventDefault();\n handleIncrement();\n }\n },\n [handleDecrement, handleIncrement],\n );\n\n return (\n <div\n className={clsx(\n 'str-chat__form-numeric-input',\n disabled && 'str-chat__form-numeric-input--disabled',\n className,\n )}\n >\n {!!label && (\n <label className='str-chat__form-numeric-input__label' htmlFor={id}>\n {label}\n </label>\n )}\n <div className={clsx('str-chat__form-numeric-input__wrapper')}>\n <Button\n appearance='outline'\n aria-label={t('aria/Decrease value')}\n circular\n className={clsx(\n 'str-chat__form-numeric-input__stepper str-chat__form-numeric-input__stepper--decrement',\n )}\n disabled={disabled || atMin}\n onClick={handleDecrement}\n size='xs'\n variant='secondary'\n >\n <IconMinus className='str-chat__form-numeric-input__stepper-icon' />\n </Button>\n <input\n aria-valuemax={Number.isFinite(maxDef) ? maxDef : undefined}\n aria-valuemin={Number.isFinite(minDef) ? minDef : undefined}\n aria-valuenow={num ?? undefined}\n className='str-chat__form-numeric-input__input'\n disabled={disabled}\n id={id}\n inputMode='numeric'\n onChange={handleInputChange}\n onKeyDown={handleKeyDown}\n ref={ref}\n role='spinbutton'\n type='text'\n value={value}\n {...inputProps}\n />\n <Button\n appearance='outline'\n aria-label={t('aria/Increase value')}\n circular\n className={clsx(\n 'str-chat__form-numeric-input__stepper str-chat__form-numeric-input__stepper--increment',\n )}\n disabled={disabled || atMax}\n onClick={handleIncrement}\n size='xs'\n variant='secondary'\n >\n <IconPlusSmall className='str-chat__form-numeric-input__stepper-icon' />\n </Button>\n </div>\n </div>\n );\n },\n);\n","import type { PropsWithChildren } from 'react';\nimport React, { useEffect, useState } from 'react';\nimport clsx from 'clsx';\n\nexport type DragAndDropContainerProps = PropsWithChildren<{\n className?: string;\n draggable?: boolean;\n onSetNewOrder?: (newOrder: number[]) => void;\n}>;\n\nexport const DragAndDropContainer = ({\n children,\n className,\n draggable,\n onSetNewOrder,\n}: DragAndDropContainerProps) => {\n const [order, setOrder] = useState<number[]>([]);\n const [dragStartIndex, setDragStartIndex] = useState<number | null>(null);\n const [dragOverIndex, setDragOverIndex] = useState<number | null>(null);\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n\n const moveDirection =\n dragStartIndex === null || dragOverIndex === null\n ? undefined\n : dragStartIndex <= dragOverIndex\n ? 'down'\n : 'up';\n\n const childrenArray = React.Children.toArray(children);\n\n useEffect(() => {\n setOrder(React.Children.map(children, (_, index) => index) || []);\n }, [children]);\n\n useEffect(() => {\n if (!container) return;\n\n const handleDragStart = (e: DragEvent) => {\n const target = e.target as HTMLElement;\n const draggableItem = target.closest('.str-chat__drag-and-drop-container__item');\n if (e.dataTransfer) {\n e.dataTransfer.effectAllowed = 'move';\n }\n\n if (draggableItem instanceof HTMLElement) {\n const index = Array.from(draggableItem.parentElement?.children || []).indexOf(\n draggableItem,\n );\n setDragStartIndex(index);\n e.dataTransfer?.setData('text/plain', index.toString());\n draggableItem.style.opacity = '0.3';\n }\n };\n\n const handleDragOver = (e: DragEvent) => {\n e.preventDefault();\n const target = e.target as HTMLElement;\n const draggableItem = target.closest('.str-chat__drag-and-drop-container__item');\n if (draggableItem instanceof HTMLElement) {\n const index = Array.from(draggableItem.parentElement?.children || []).indexOf(\n draggableItem,\n );\n setDragOverIndex(index);\n }\n };\n\n const handleDragLeave = () => {\n setDragOverIndex(null);\n };\n\n const handleDrop = (e: DragEvent) => {\n e.preventDefault();\n const draggedIndex = parseInt(e.dataTransfer?.getData('text/plain') || '-1', 10);\n const target = e.target as HTMLElement;\n const draggableItem = target.closest('.str-chat__drag-and-drop-container__item');\n if (draggableItem instanceof HTMLElement) {\n const dropIndex = Array.from(draggableItem.parentElement?.children || []).indexOf(\n draggableItem,\n );\n if (draggedIndex !== -1 && draggedIndex !== dropIndex) {\n setOrder((prevOrder) => {\n const newOrder = [...prevOrder];\n const [removed] = newOrder.splice(draggedIndex, 1);\n newOrder.splice(dropIndex, 0, removed);\n onSetNewOrder?.(newOrder);\n return newOrder;\n });\n }\n }\n setDragStartIndex(null);\n setDragOverIndex(null);\n };\n\n const handleDragEnd = (e: DragEvent) => {\n const target = e.target as HTMLElement;\n if (target instanceof HTMLElement) {\n target.style.opacity = '';\n }\n setDragStartIndex(null);\n setDragOverIndex(null);\n };\n\n container.addEventListener('dragstart', handleDragStart);\n container.addEventListener('dragover', handleDragOver);\n container.addEventListener('dragleave', handleDragLeave);\n container.addEventListener('drop', handleDrop);\n container.addEventListener('dragend', handleDragEnd);\n\n return () => {\n container.removeEventListener('dragstart', handleDragStart);\n container.removeEventListener('dragover', handleDragOver);\n container.removeEventListener('dragleave', handleDragLeave);\n container.removeEventListener('drop', handleDrop);\n container.removeEventListener('dragend', handleDragEnd);\n };\n }, [container, onSetNewOrder]);\n\n return (\n <div\n className={clsx('str-chat__drag-and-drop-container', className)}\n ref={setContainer}\n >\n {order.map((originalIndex, currentIndex) => {\n const child = childrenArray[originalIndex];\n return (\n <div\n className={clsx('str-chat__drag-and-drop-container__item', {\n 'str-chat__drag-and-drop-container__item--dragged-over-from-bottom':\n moveDirection === 'up' && dragOverIndex === currentIndex,\n 'str-chat__drag-and-drop-container__item--dragged-over-from-top':\n moveDirection === 'down' && dragOverIndex === currentIndex,\n })}\n draggable={draggable}\n key={\n React.isValidElement(child) ? child.key : `draggable-item-${originalIndex}`\n }\n >\n {child}\n </div>\n );\n })}\n </div>\n );\n};\n","import React from 'react';\nimport clsx from 'clsx';\nimport {\n DragAndDropContainer,\n type DragAndDropContainerProps,\n} from '../DragAndDrop/DragAndDropContainer';\n\nexport type TextInputFieldSetProps = DragAndDropContainerProps & {\n label?: string;\n};\n\nexport const TextInputFieldSet = ({\n children,\n className,\n draggable,\n label,\n onSetNewOrder,\n}: TextInputFieldSetProps) => (\n <fieldset className={clsx('str-chat__form__input-fieldset', className)}>\n <legend className='str-chat__form__input-fieldset__label'>{label}</legend>\n <DragAndDropContainer\n className='str-chat__form__input-fieldset__values'\n draggable={draggable}\n onSetNewOrder={onSetNewOrder}\n >\n {children}\n </DragAndDropContainer>\n </fieldset>\n);\n","import clsx from 'clsx';\nimport debounce from 'lodash.debounce';\nimport type { PropsWithChildren } from 'react';\nimport React, { useEffect, useMemo, useRef } from 'react';\nimport { DEFAULT_LOAD_PAGE_SCROLL_THRESHOLD } from '../../constants/limits';\n\n/**\n * Prevents Chrome hangups\n * See: https://stackoverflow.com/questions/47524205/random-high-content-download-time-in-chrome/47684257#47684257\n */\nconst mousewheelListener = (event: Event) => {\n if (event instanceof WheelEvent && event.deltaY === 1) {\n event.preventDefault();\n }\n};\n\nexport type InfiniteScrollPaginatorProps = React.ComponentProps<'div'> & {\n /**\n * Props spread onto the inner content wrapper (the element that directly wraps\n * `children`). Use this to e.g. mark the wrapper `role=\"presentation\"` so it stays\n * transparent in the accessibility tree and does not break the ownership between an\n * ancestor (`listbox`/`menu`) and its `option`/`menuitem` children.\n */\n contentProps?: React.ComponentProps<'div'>;\n listenToScroll?: (\n distanceFromBottom: number,\n distanceFromTop: number,\n threshold: number,\n ) => void;\n loadNextDebounceMs?: number;\n loadNextOnScrollToBottom?: () => void;\n loadNextOnScrollToTop?: () => void;\n /** Offset from when to start the loadNextPage call */\n threshold?: number;\n useCapture?: boolean;\n};\n\nexport const InfiniteScrollPaginator = (\n props: PropsWithChildren<InfiniteScrollPaginatorProps>,\n) => {\n const {\n children,\n className,\n contentProps,\n listenToScroll,\n loadNextDebounceMs = 500,\n loadNextOnScrollToBottom,\n loadNextOnScrollToTop,\n threshold = DEFAULT_LOAD_PAGE_SCROLL_THRESHOLD,\n useCapture = false,\n ...componentProps\n } = props;\n const { className: contentClassName, ...contentRestProps } = contentProps ?? {};\n\n const rootRef = useRef<HTMLDivElement | null>(null);\n const childRef = useRef<HTMLDivElement | null>(null);\n\n const scrollListener = useMemo(\n () =>\n debounce(() => {\n const root = rootRef.current;\n const child = childRef.current;\n if (!root || root.offsetParent === null || !child) {\n return;\n }\n\n const distanceFromBottom =\n child.scrollHeight - root.scrollTop - root.clientHeight;\n const distanceFromTop = root.scrollTop;\n\n if (listenToScroll) {\n listenToScroll(distanceFromBottom, distanceFromTop, threshold);\n }\n\n if (distanceFromTop < Number(threshold)) {\n loadNextOnScrollToTop?.();\n }\n\n if (distanceFromBottom < Number(threshold)) {\n loadNextOnScrollToBottom?.();\n }\n }, loadNextDebounceMs),\n [\n listenToScroll,\n loadNextDebounceMs,\n loadNextOnScrollToBottom,\n loadNextOnScrollToTop,\n threshold,\n ],\n );\n\n useEffect(() => {\n const scrollElement = rootRef.current;\n if (!scrollElement) return;\n\n scrollElement.addEventListener('scroll', scrollListener, useCapture);\n\n return () => {\n scrollElement.removeEventListener('scroll', scrollListener, useCapture);\n };\n }, [scrollListener, useCapture]);\n\n useEffect(() => {\n const root = rootRef.current;\n if (!root || typeof ResizeObserver === 'undefined' || !scrollListener) return;\n const observer = new ResizeObserver(scrollListener);\n observer.observe(root as Element);\n\n return () => {\n observer.disconnect();\n };\n }, [scrollListener]);\n\n useEffect(() => {\n const root = rootRef.current;\n if (root) {\n root.addEventListener('wheel', mousewheelListener, { passive: false });\n }\n return () => {\n if (root) {\n root.removeEventListener('wheel', mousewheelListener, useCapture);\n }\n };\n }, [useCapture]);\n\n return (\n <div\n {...componentProps}\n className={clsx('str-chat__infinite-scroll-paginator', className)}\n ref={rootRef}\n >\n <div\n {...contentRestProps}\n className={clsx('str-chat__infinite-scroll-paginator__content', contentClassName)}\n ref={childRef}\n >\n {children}\n </div>\n </div>\n );\n};\n","import React, { useMemo, useRef, useState } from 'react';\nimport { NumericInput } from '../../Form/NumericInput';\nimport { SwitchField, SwitchFieldLabel } from '../../Form/SwitchField';\nimport { useTranslationContext } from '../../../context';\nimport { useMessageComposerController } from '../../MessageComposer/hooks/useMessageComposerController';\nimport { useStateStore } from '../../../store';\nimport type { PollComposerState } from 'stream-chat';\n\nconst pollComposerStateSelector = (state: PollComposerState) => ({\n enforce_unique_vote: state.data.enforce_unique_vote,\n error: state.errors.max_votes_allowed,\n max_votes_allowed: state.data.max_votes_allowed,\n});\n\nexport const MultipleAnswersField = () => {\n const { t } = useTranslationContext();\n const { pollComposer } = useMessageComposerController();\n const { enforce_unique_vote, error, max_votes_allowed } = useStateStore(\n pollComposer.state,\n pollComposerStateSelector,\n );\n const [voteLimitEnabled, setVoteLimitEnabled] = useState(false);\n const maxVotesInputRef = useRef<HTMLInputElement | null>(null);\n\n const knownValidationErrors = useMemo<Record<string, string>>(\n () => ({\n 'Enforce unique vote is enabled': t('Enforce unique vote is enabled'),\n 'Type a number from 2 to 10': t('Type a number from 2 to 10'),\n }),\n [t],\n );\n\n const multipleVotesEnabled = !enforce_unique_vote;\n const errorText = error && knownValidationErrors[error];\n const voteLimitSwitchId = 'max_votes_allowed_enabled';\n const voteLimitSwitchLabelId = `${voteLimitSwitchId}-label`;\n\n return (\n <div className='str-chat__form__switch-fieldset'>\n <SwitchField\n checked={multipleVotesEnabled}\n description={t('Select more than one option')}\n id='enforce_unique_vote'\n onChange={(e) => {\n setVoteLimitEnabled(false);\n pollComposer.updateFields({ enforce_unique_vote: !e.target.checked });\n }}\n title={t('Multiple votes')}\n />\n {multipleVotesEnabled && (\n <SwitchField\n aria-labelledby={voteLimitSwitchLabelId}\n checked={voteLimitEnabled}\n fieldClassName='str-chat__multiple-answers-field__votes-limit-field'\n id={voteLimitSwitchId}\n onChange={(event) => {\n const nextVoteLimitEnabled = event.target.checked;\n setVoteLimitEnabled(nextVoteLimitEnabled);\n pollComposer.updateFields({ max_votes_allowed: '2' });\n if (!nextVoteLimitEnabled) return;\n requestAnimationFrame(() => {\n maxVotesInputRef.current?.focus();\n });\n }}\n >\n <div className='str-chat__multiple-answers-field__votes-limit-field__numeric-field'>\n <SwitchFieldLabel\n asError={!!errorText}\n description={t('Choose between 2 to 10 options')}\n htmlFor={voteLimitSwitchId}\n id={voteLimitSwitchLabelId}\n title={t('Limit votes per person')}\n />\n {voteLimitEnabled && (\n <NumericInput\n aria-label={t('Maximum votes per person')}\n id='max_votes_allowed'\n max={10}\n min={2}\n onBlur={() => {\n pollComposer.handleFieldBlur('max_votes_allowed');\n }}\n onChange={(e) => {\n const raw = e.target.value;\n const nativeFieldValidation =\n raw !== '' && !/^\\d+$/.test(raw)\n ? { max_votes_allowed: t('Only numbers are allowed') }\n : undefined;\n pollComposer.updateFields(\n {\n max_votes_allowed: nativeFieldValidation\n ? pollComposer.max_votes_allowed\n : raw,\n },\n nativeFieldValidation,\n );\n }}\n ref={maxVotesInputRef}\n value={max_votes_allowed ?? ''}\n />\n )}\n </div>\n </SwitchField>\n )}\n </div>\n );\n};\n","import React, { useMemo } from 'react';\nimport { TextInput } from '../../Form';\nimport { useTranslationContext } from '../../../context';\nimport { useMessageComposerController } from '../../MessageComposer/hooks/useMessageComposerController';\nimport { useStateStore } from '../../../store';\nimport type { PollComposerState } from 'stream-chat';\n\nconst pollComposerStateSelector = (state: PollComposerState) => ({\n error: state.errors.name,\n name: state.data.name,\n});\n\nexport const NameField = () => {\n const { t } = useTranslationContext();\n const { pollComposer } = useMessageComposerController();\n const { error, name } = useStateStore(pollComposer.state, pollComposerStateSelector);\n const knownValidationErrors = useMemo<Record<string, string>>(\n () => ({\n 'Question is required': t('Question is required'),\n }),\n [t],\n );\n\n return (\n // `data-autofocus` marks this as the dialog's default field. Initial focus stays on the dialog\n // surface so the SR announces the dialog identity/description; pressing Enter on the surface\n // then moves focus here (see GlobalModal's keydown handling) so the user can start typing.\n <TextInput\n className='str-chat__form__input-field__value'\n data-autofocus\n error={!!error}\n errorMessage={\n error ? (\n <span data-testid='poll-name-input-field-error'>\n {knownValidationErrors[error] ?? t('Error')}\n </span>\n ) : undefined\n }\n id='name'\n label={t('Question')}\n onBlur={() => {\n pollComposer.handleFieldBlur('name');\n }}\n onChange={(e) => {\n pollComposer.updateFields({ name: e.target.value });\n }}\n placeholder={t('Ask a question')}\n type='text'\n value={name}\n />\n );\n};\n","import type { KeyboardEvent as ReactKeyboardEvent } from 'react';\nimport React, { useEffect, useRef } from 'react';\nimport type { PollComposerOption } from 'stream-chat';\n\nimport { useAriaLiveAnnouncer } from '../../Accessibility';\nimport { useComponentContextIcons, useTranslationContext } from '../../../context';\n\ntype PollOptionReorderHandleProps = {\n index: number;\n isActive: boolean;\n onActivate: (optionId: string) => void;\n onDeselect: () => void;\n onMove: (direction: -1 | 1) => void;\n option: PollComposerOption;\n registerRef: (index: number, element: HTMLButtonElement | null) => void;\n /** Total number of options. Used to embed \"position N of total\" into the\n * active handle's aria-label so VoiceOver's native focus announcement after a\n * move carries the new position instead of just \"Reorder option N\". */\n totalOptionCount: number;\n};\n\nexport const PollOptionReorderHandle = ({\n index,\n isActive,\n onActivate,\n onDeselect,\n onMove,\n option,\n registerRef,\n totalOptionCount,\n}: PollOptionReorderHandleProps) => {\n const { IconReorder } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const announce = useAriaLiveAnnouncer();\n const hasAnnouncedFocusRef = useRef(false);\n const focusAnnouncementFrameRef = useRef<number | null>(null);\n\n const position = index + 1;\n const optionLabel = option.text.trim() || t('aria/Option {{ position }}', { position });\n // While picked up, fold the option text + new position into the aria-label\n // so VoiceOver speaks \"Reorder 'option B' at position 1 of 3\" on the focus\n // event triggered by ArrowUp/ArrowDown. That replaces the otherwise\n // redundant \"Reorder option N, selected, toggle button\" native announcement\n // and removes the need for a duplicate live-region \"moved to position\"\n // message.\n const ariaLabel = isActive\n ? t('aria/Reorder \"{{ option }}\" at position {{ position }} of {{ total }}', {\n option: optionLabel,\n position,\n total: totalOptionCount,\n })\n : t('aria/Reorder option {{ position }}', { position });\n\n useEffect(\n () => () => {\n if (focusAnnouncementFrameRef.current === null) return;\n cancelAnimationFrame(focusAnnouncementFrameRef.current);\n },\n [],\n );\n\n const onKeyDown = (event: ReactKeyboardEvent<HTMLButtonElement>) => {\n if (!isActive) return;\n\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n onMove(-1);\n return;\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n onMove(1);\n return;\n }\n if (event.key === 'Escape' || event.key === 'Esc') {\n event.preventDefault();\n onDeselect();\n }\n };\n\n return (\n <button\n aria-label={ariaLabel}\n aria-pressed={isActive}\n className='str-chat__drag-handle-button'\n onBlur={() => {\n if (focusAnnouncementFrameRef.current !== null) {\n cancelAnimationFrame(focusAnnouncementFrameRef.current);\n focusAnnouncementFrameRef.current = null;\n }\n hasAnnouncedFocusRef.current = false;\n if (isActive) {\n // Tabbing or clicking away while picked up drops the option.\n onDeselect();\n }\n }}\n onClick={() => {\n if (isActive) {\n onDeselect();\n return;\n }\n onActivate(option.id);\n }}\n onFocus={() => {\n if (isActive || hasAnnouncedFocusRef.current) return;\n\n hasAnnouncedFocusRef.current = true;\n focusAnnouncementFrameRef.current = requestAnimationFrame(() => {\n announce(\n t(\n 'aria/Press Space to select this option, use the Up and Down arrow keys to move it, then press Space again to deselect it.',\n ),\n { priority: 'assertive' },\n );\n focusAnnouncementFrameRef.current = null;\n });\n }}\n onKeyDown={onKeyDown}\n ref={(element) => {\n registerRef(index, element);\n }}\n type='button'\n >\n <IconReorder className='str-chat__drag-handle' />\n </button>\n );\n};\n","import clsx from 'clsx';\nimport React, { useCallback, useLayoutEffect, useMemo, useRef, useState } from 'react';\nimport { TextInput } from '../../Form/TextInput';\nimport { useComponentContextIcons, useTranslationContext } from '../../../context';\nimport { useMessageComposerController } from '../../MessageComposer/hooks/useMessageComposerController';\nimport { useStateStore } from '../../../store';\nimport type { PollComposerOption, PollComposerState } from 'stream-chat';\nimport { Button, type ButtonProps } from '../../Button';\nimport { TextInputFieldSet } from '../../Form/TextInputFieldSet';\nimport { VisuallyHidden } from '../../VisuallyHidden';\nimport { useStableId } from '../../UtilityComponents/useStableId';\nimport {\n useAriaLiveAnnouncer,\n useInteractionAnnouncements,\n useSettledAnnouncement,\n} from '../../Accessibility';\nimport { PollOptionReorderHandle } from './PollOptionReorderHandle';\n\nconst pollComposerStateSelector = (state: PollComposerState) => ({\n errors: state.errors.options,\n options: state.data.options,\n});\n\n// Option pickup/drop/removed confirmations go through the shared {@link useInteractionAnnouncements}\n// registry (poll.optionPickedUp / poll.optionDropped / poll.optionRemoved), while the one-shot\n// \"controls are now available\" cue uses {@link useSettledAnnouncement}. Both ultimately deliver via\n// `useAriaLiveAnnouncer`, which routes to the modal {@link AriaLiveOutlet} the poll-creation dialog\n// mounts (the Modal/Dialog system renders an outlet inside the active `aria-modal` subtree). Screen\n// readers suppress live regions outside an active aria-modal container, so the modal outlet keeps\n// these announcements in scope.\nexport const OptionFieldSet = () => {\n const { pollComposer } = useMessageComposerController();\n const { errors, options } = useStateStore(\n pollComposer.state,\n pollComposerStateSelector,\n );\n const { t } = useTranslationContext('OptionFieldSet');\n const announce = useAriaLiveAnnouncer();\n const { announceInteraction } = useInteractionAnnouncements();\n const optionInputRefs = useRef<Array<HTMLInputElement | null>>([]);\n const handleRefs = useRef<Array<HTMLButtonElement | null>>([]);\n const pendingFocusIndexRef = useRef<number | null>(null);\n const [activeOptionId, setActiveOptionId] = useState<string | null>(null);\n\n const knownValidationErrors = useMemo<Record<string, string>>(\n () => ({\n 'Option already exists': t('Option already exists'),\n 'Option is empty': t('Option is empty'),\n }),\n [t],\n );\n\n const labelForOption = useCallback(\n (option: PollComposerOption, position: number) =>\n option.text.trim() || t('aria/Option {{ position }}', { position }),\n [t],\n );\n\n const registerHandleRef = useCallback(\n (index: number, element: HTMLButtonElement | null) => {\n handleRefs.current[index] = element;\n },\n [],\n );\n\n const onSetNewOrder = useCallback(\n (newOrder: number[]) => {\n const prevOptions = pollComposer.options;\n pollComposer.updateFields({ options: newOrder.map((index) => prevOptions[index]) });\n },\n [pollComposer],\n );\n\n const clearOption = useCallback(\n (removedOptionId: string) => {\n const nextOptions = [...pollComposer.options];\n if (!nextOptions.length) return;\n\n const removedOptionIndex = pollComposer.options.findIndex(\n (option) => option.id === removedOptionId,\n );\n\n if (removedOptionIndex === -1) return;\n const [removedOption] = nextOptions.splice(removedOptionIndex, 1);\n\n pollComposer.updateFields({\n options: nextOptions,\n });\n\n // Confirm the removal, naming the option by its text (or its positional fallback). The\n // registry maps this to a polite message so it queues behind the focus move to the next field\n // (below) instead of interrupting it.\n announceInteraction('poll.optionRemoved', {\n option: labelForOption(removedOption, removedOptionIndex + 1),\n });\n\n if (activeOptionId === removedOptionId) {\n setActiveOptionId(null);\n }\n\n if (!nextOptions.length) return;\n const nextFocusedOptionIndex = Math.min(removedOptionIndex, nextOptions.length - 1);\n requestAnimationFrame(() => {\n optionInputRefs.current[nextFocusedOptionIndex]?.focus();\n });\n },\n [activeOptionId, announceInteraction, labelForOption, pollComposer],\n );\n\n const handleActivate = useCallback(\n (optionId: string) => {\n const idx = pollComposer.options.findIndex((option) => option.id === optionId);\n if (idx === -1) return;\n const option = pollComposer.options[idx];\n setActiveOptionId(optionId);\n announceInteraction('poll.optionPickedUp', {\n option: labelForOption(option, idx + 1),\n });\n },\n [announceInteraction, labelForOption, pollComposer],\n );\n\n const handleDeselect = useCallback(() => {\n if (!activeOptionId) return;\n const idx = pollComposer.options.findIndex((option) => option.id === activeOptionId);\n const option = idx === -1 ? null : pollComposer.options[idx];\n\n setActiveOptionId(null);\n\n if (!option) return;\n\n announceInteraction('poll.optionDropped', {\n option: labelForOption(option, idx + 1),\n position: idx + 1,\n });\n }, [activeOptionId, announceInteraction, labelForOption, pollComposer]);\n\n const handleMove = useCallback(\n (direction: -1 | 1) => {\n if (!activeOptionId) return;\n const currentIndex = pollComposer.options.findIndex(\n (option) => option.id === activeOptionId,\n );\n if (currentIndex === -1) return;\n const targetIndex = currentIndex + direction;\n if (targetIndex < 0 || targetIndex >= pollComposer.options.length) return;\n\n const nextOptions = [...pollComposer.options];\n const [moved] = nextOptions.splice(currentIndex, 1);\n nextOptions.splice(targetIndex, 0, moved);\n pollComposer.updateFields({ options: nextOptions });\n\n pendingFocusIndexRef.current = targetIndex;\n // No live-region announcement here on purpose. Once the focus moves to\n // the active option's new handle (in the layout effect below), VoiceOver\n // will speak that handle's aria-label, which already encodes the option\n // text and the new position (\"Reorder 'option B' at position 1 of 3\").\n // Emitting an additional polite \"moved to position\" message would just\n // duplicate that information.\n },\n [activeOptionId, pollComposer],\n );\n\n useLayoutEffect(() => {\n if (pendingFocusIndexRef.current === null) return;\n const idx = pendingFocusIndexRef.current;\n pendingFocusIndexRef.current = null;\n handleRefs.current[idx]?.focus();\n }, [options]);\n\n const draggable = options.length > 1;\n\n // The reorder handle and remove button only exist once there are 2+ options. Conveying that uses\n // two complementary mechanisms:\n //\n // 1. A persistent affordance: each option input's `aria-describedby` points at the hidden text\n // below, so the description is part of the field's accessible name/description (read on focus,\n // and again whenever the screen reader re-reads the field). Correct in the a11y tree and read\n // by screen readers that voice descriptions (e.g. NVDA).\n // 2. A spoken cue: VoiceOver does NOT reliably speak `aria-describedby` (\"hints\" are often delayed\n // or disabled), so additionally announce availability once via a polite live region. Announcing\n // it at the exact 1→2 moment fails — the screen reader re-reads the focused option field when\n // the list mutates, and that read-out supersedes any live message at any priority. So the cue\n // is deferred until the option list goes idle (keyed on `options`), landing in a calm moment.\n // See `useSettledAnnouncement`.\n const optionsHintId = useStableId();\n\n useSettledAnnouncement(announce, {\n active: draggable,\n message: t('aria/Options can now be reordered and removed.'),\n settleKey: options,\n });\n\n return (\n <>\n <TextInputFieldSet\n draggable={draggable}\n label={t('Options')}\n onSetNewOrder={onSetNewOrder}\n >\n {options.map((option, i) => {\n const error = errors?.[option.id];\n return (\n <div\n className={clsx('str-chat__form__input-field', {\n 'str-chat__form__input-field--draggable': draggable,\n 'str-chat__form__input-field--has-error': error,\n })}\n key={`option-row-${i}`}\n >\n <TextInput\n aria-describedby={draggable ? optionsHintId : undefined}\n className='str-chat__form__input-field__value'\n error={!!error}\n fieldMessagePlacement='inside'\n id={option.id}\n leading={\n draggable ? (\n <PollOptionReorderHandle\n index={i}\n isActive={option.id === activeOptionId}\n onActivate={handleActivate}\n onDeselect={handleDeselect}\n onMove={handleMove}\n option={option}\n registerRef={registerHandleRef}\n totalOptionCount={options.length}\n />\n ) : undefined\n }\n message={\n error ? (\n <span data-testid='poll-option-input-field-error'>\n {knownValidationErrors[error] ?? t('Error')}\n </span>\n ) : undefined\n }\n onBlur={() => {\n pollComposer.handleFieldBlur('options');\n }}\n onChange={(e) => {\n pollComposer.updateFields({\n options: { index: i, text: e.target.value },\n });\n }}\n onKeyUp={(event) => {\n const isFocusedLastOptionField = i === options.length - 1;\n if (event.key === 'Enter' && !isFocusedLastOptionField) {\n optionInputRefs.current[i + 1]?.focus();\n }\n }}\n placeholder={t('Add an option')}\n ref={(element) => {\n optionInputRefs.current[i] = element;\n }}\n trailing={\n draggable ? (\n <RemoveOptionButton\n // Name each button by its option so SR users can tell the rows apart.\n aria-label={t('aria/Remove option: {{ option }}', {\n option: labelForOption(option, i + 1),\n })}\n onClick={() => clearOption(option.id)}\n />\n ) : undefined\n }\n type='text'\n value={option.text}\n />\n </div>\n );\n })}\n </TextInputFieldSet>\n {draggable && (\n <VisuallyHidden id={optionsHintId}>\n {t('aria/This option can be reordered and removed.')}\n </VisuallyHidden>\n )}\n </>\n );\n};\n\nconst RemoveOptionButton = ({ className, ...props }: ButtonProps) => {\n const { IconMinusCircle } = useComponentContextIcons();\n return (\n <Button\n appearance='ghost'\n circular\n className={clsx('str-chat__form__remove-option-button', className)}\n size='xs'\n variant='secondary'\n {...props}\n >\n <IconMinusCircle />\n </Button>\n );\n};\n","import React from 'react';\nimport { flushSync } from 'react-dom';\nimport { useCanCreatePoll } from '../../MessageComposer/hooks/useCanCreatePoll';\nimport { useMessageComposerController } from '../../MessageComposer/hooks/useMessageComposerController';\nimport {\n useComponentContextIcons,\n useMessageComposerContext,\n useTranslationContext,\n} from '../../../context';\nimport clsx from 'clsx';\nimport { Prompt } from '../../Dialog';\nimport { useNotificationApi } from '../../Notifications';\n\nexport type PollCreationDialogControlsProps = {\n close: () => void;\n};\n\nexport const PollCreationDialogControls = ({\n close,\n}: PollCreationDialogControlsProps) => {\n const { IconSend } = useComponentContextIcons();\n\n const { t } = useTranslationContext('PollCreationDialogControls');\n const { handleSubmit: handleSubmitMessage, textareaRef } = useMessageComposerContext();\n const messageComposer = useMessageComposerController();\n const canCreatePoll = useCanCreatePoll();\n const { addNotification } = useNotificationApi();\n\n return (\n <Prompt.Footer>\n <Prompt.FooterControls>\n <Prompt.FooterControlsButtonSecondary\n className={clsx('str-chat__prompt__footer__controls-button--cancel')}\n onClick={close}\n type='button'\n >\n {t('Cancel')}\n </Prompt.FooterControlsButtonSecondary>\n <Prompt.FooterControlsButtonPrimary\n className={clsx('str-chat__prompt__footer__controls-button--submit')}\n disabled={!canCreatePoll}\n onClick={async () => {\n // Close optimistically and move focus to the composer in the SAME synchronous turn,\n // BEFORE the async work starts. `flushSync` unmounts the modal now; we then focus the\n // textarea immediately, so it is the active element before any focus-restore runs.\n // Both restorers (react-aria's FocusScope and AttachmentSelector's trigger restore)\n // only act if focus fell to <body>, so moving it to the composer first suppresses\n // them — avoiding a focus blip through the attachment \"+\" trigger (a screen reader\n // would otherwise announce that extra jump before landing in the composer). Closing\n // first also avoids the Send→Close button blip while createPoll() is in flight.\n flushSync(() => close());\n textareaRef?.current?.focus();\n try {\n await messageComposer.createPoll();\n } catch {\n // createPoll() in stream-chat-js already publishes an\n // `api:poll:create:failed` notification (with the underlying error\n // `reason`) via client.notifications.addError, so we swallow the\n // rethrown error here only to avoid an unhandled rejection. The poll\n // was not created, so do not attempt to send the message.\n return;\n }\n // The poll exists now; sending the message is a separate step. Keep it in its own\n // try/catch so a send failure is surfaced (createPoll's self-notification only covers\n // poll creation) instead of being swallowed alongside it.\n try {\n await handleSubmitMessage();\n } catch {\n addNotification({\n emitter: 'PollCreationDialog',\n message: t('Send message request failed'),\n severity: 'error',\n type: 'api:message:send:failed',\n });\n return;\n }\n addNotification({\n // Announce assertively: focus has just returned to the composer, so a polite\n // \"Poll sent\" would be queued behind the textarea's focus announcement and read\n // last (confusing). Assertive lets the confirmation be heard promptly.\n ariaLive: 'assertive',\n emitter: 'PollCreationDialog',\n message: t('Poll sent'),\n severity: 'success',\n type: 'api:poll:create:success',\n });\n }}\n type='submit'\n >\n <IconSend />\n {t('Send poll')}\n </Prompt.FooterControlsButtonPrimary>\n </Prompt.FooterControls>\n </Prompt.Footer>\n );\n};\n","import React, { useEffect } from 'react';\nimport type { PollComposerState } from 'stream-chat';\nimport { VotingVisibility } from 'stream-chat';\nimport { MultipleAnswersField } from './MultipleAnswersField';\nimport { NameField } from './NameField';\nimport { OptionFieldSet } from './OptionFieldSet';\nimport { PollCreationDialogControls } from './PollCreationDialogControls';\nimport { Prompt } from '../../Dialog';\nimport { SwitchField } from '../../Form/SwitchField';\nimport { useInteractionAnnouncements } from '../../Accessibility';\nimport { useMessageComposerController } from '../../MessageComposer/hooks/useMessageComposerController';\nimport { useTranslationContext } from '../../../context';\nimport { useStateStore } from '../../../store';\n\nexport type PollCreationDialogProps = {\n close: () => void;\n};\n\nconst pollComposerStateSelector = (state: PollComposerState) => ({\n allow_answers: state.data.allow_answers,\n allow_user_suggested_options: state.data.allow_user_suggested_options,\n voting_visibility: state.data.voting_visibility,\n});\n\nexport const PollCreationDialog = ({ close }: PollCreationDialogProps) => {\n const { t } = useTranslationContext();\n const { announceInteraction } = useInteractionAnnouncements();\n const { pollComposer } = useMessageComposerController();\n const { allow_answers, allow_user_suggested_options, voting_visibility } =\n useStateStore(pollComposer.state, pollComposerStateSelector);\n\n useEffect(() => {\n announceInteraction('poll.dialogOpened');\n }, [announceInteraction]);\n\n return (\n <Prompt.Root\n className='str-chat__poll-creation-dialog'\n data-testid='poll-creation-dialog'\n >\n <Prompt.Header\n close={close}\n description={t('Create a question, add options, and configure poll settings')}\n title={t('Create poll')}\n />\n <Prompt.Body>\n <form autoComplete='off'>\n <NameField />\n <OptionFieldSet />\n <div className='str-chat__poll-creation-dialog__features-selectors'>\n <MultipleAnswersField />\n <SwitchField\n checked={voting_visibility === 'anonymous'}\n description={t('Hide who voted')}\n id='voting_visibility'\n onChange={(e) =>\n pollComposer.updateFields({\n voting_visibility: e.target.checked\n ? VotingVisibility.anonymous\n : VotingVisibility.public,\n })\n }\n title={t('Anonymous poll')}\n />\n <SwitchField\n checked={allow_user_suggested_options}\n description={t('Let others add options')}\n id='allow_user_suggested_options'\n onChange={(e) =>\n pollComposer.updateFields({\n allow_user_suggested_options: e.target.checked,\n })\n }\n title={t('Suggest an option')}\n />\n <SwitchField\n checked={allow_answers}\n description={t('Allow others to add comments')}\n id='allow_answers'\n onChange={(e) =>\n pollComposer.updateFields({ allow_answers: e.target.checked })\n }\n title={t('Add a comment')}\n />\n </div>\n </form>\n </Prompt.Body>\n <PollCreationDialogControls close={close} />\n </Prompt.Root>\n );\n};\n","import { useChannelStateContext } from '../../../context';\nimport { useStateStore } from '../../../store';\nimport type { CooldownTimerState } from 'stream-chat';\n\nconst cooldownTimerStateSelector = (state: CooldownTimerState) => ({\n isCooldownActive: !!state.cooldownRemaining,\n});\n\nexport const useIsCooldownActive = () => {\n const { channel } = useChannelStateContext();\n return useStateStore(channel.cooldownTimer.state, cooldownTimerStateSelector)\n .isCooldownActive;\n};\n","import React, { type ComponentProps, type ComponentType, useMemo } from 'react';\nimport type { CommandResponse } from 'stream-chat';\nimport {\n useComponentContextIcons,\n useMessageComposerContext,\n useTranslationContext,\n} from '../../../context';\nimport { useMessageComposerCommands, useMessageComposerController } from '../hooks';\nimport {\n ContextMenuBackButton,\n ContextMenuButton,\n ContextMenuHeader,\n useContextMenuContext,\n} from '../../Dialog';\nimport { useInteractionAnnouncements } from '../../Accessibility';\nimport clsx from 'clsx';\n\nexport const CommandsMenuClassName = 'str-chat__context-menu--commands';\n\nexport const CommandsSubmenuHeader = () => {\n const { IconChevronLeft } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const { returnToParentMenu } = useContextMenuContext();\n return (\n <ContextMenuHeader className='str-chat__context-menu__header--commands str-chat__context-menu__header--submenu-commands'>\n <ContextMenuBackButton\n aria-label={t('aria/Back to attachments')}\n onClick={returnToParentMenu}\n >\n <IconChevronLeft />\n <span>{t('Instant commands')}</span>\n </ContextMenuBackButton>\n </ContextMenuHeader>\n );\n};\n\nexport const CommandsMenuHeader = () => {\n const { t } = useTranslationContext();\n return (\n <ContextMenuHeader className='str-chat__context-menu__header--commands'>\n <span>{t('Instant commands')}</span>\n </ContextMenuHeader>\n );\n};\n\nexport const CommandsMenu = () => {\n const { closeMenu } = useContextMenuContext();\n const { announceInteraction } = useInteractionAnnouncements();\n const messageComposer = useMessageComposerController();\n const { textareaRef } = useMessageComposerContext();\n // Render commands in the channel config's own order (no client re-sort) — matches the composer's\n // suggestion list, which likewise trusts the SDK's ordering.\n const commands = useMessageComposerCommands();\n\n return (\n <>\n {commands.map(({ command, enabled }) => (\n <CommandContextMenuItem\n command={command}\n enabled={enabled}\n key={command.name}\n onClick={() => {\n if (!command.name || !enabled) return;\n messageComposer.textComposer.setCommand(command);\n closeMenu();\n // Defer the focus to the next frame so it wins over FocusScope's restore-to-attachment-selector-button behavior.\n requestAnimationFrame(() => textareaRef.current?.focus());\n announceInteraction('command.selected', { command: command.name });\n }}\n />\n ))}\n </>\n );\n};\n\nexport const useCommandTranslation = (command: CommandResponse) => {\n const { t } = useTranslationContext();\n\n const knownArgsTranslations = useMemo<Record<string, string>>(\n () => ({\n ban: t('ban-command-args'),\n giphy: t('giphy-command-args'),\n mute: t('mute-command-args'),\n unban: t('unban-command-args'),\n unmute: t('unmute-command-args'),\n }),\n [t],\n );\n const knownDescriptionTranslations = useMemo<Record<string, string>>(\n () => ({\n ban: t('ban-command-description'),\n giphy: t('giphy-command-description'),\n mute: t('mute-command-description'),\n unban: t('unban-command-description'),\n unmute: t('unmute-command-description'),\n }),\n [t],\n );\n\n const args =\n command.args && (knownArgsTranslations[command.name ?? ''] ?? t(command.args));\n const description =\n command.description &&\n (knownDescriptionTranslations[command.name ?? ''] ?? t(command.description));\n\n return { args, description };\n};\n\nexport const CommandContextMenuItem = ({\n className,\n command,\n enabled = true,\n ...props\n}: ComponentProps<'button'> & {\n command: CommandResponse & { name: string };\n enabled?: boolean;\n}) => {\n const { args, description } = useCommandTranslation(command);\n const { IconAudio, IconFlag, IconGiphy, IconMute, IconUserAdd, IconUserRemove } =\n useComponentContextIcons();\n\n const icons = useMemo<Record<string, ComponentType>>(\n () => ({\n ban: IconUserRemove,\n flag: IconFlag,\n giphy: IconGiphy,\n mute: IconMute,\n unban: IconUserAdd,\n unmute: IconAudio,\n }),\n [IconAudio, IconFlag, IconGiphy, IconMute, IconUserAdd, IconUserRemove],\n );\n\n // todo: retrieve the command trigger char from textComposer - needed adjustment in LLC\n const details = useMemo(\n () => (args ? `/${command.name} ${args}` : `/${command.name}`),\n [args, command.name],\n );\n const ariaLabel = useMemo(\n () => (description ? `${description}, ${details}` : details),\n [description, details],\n );\n\n return (\n <ContextMenuButton\n aria-label={ariaLabel}\n {...props}\n className={clsx('str-chat__context-menu__button--command', className)}\n details={details}\n disabled={!enabled}\n Icon={icons[command.name]}\n key={command.name}\n label={command.name}\n />\n );\n};\n","import React, {\n type ComponentType,\n forwardRef,\n useCallback,\n useEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport {\n useAttachmentManagerState,\n useMessageComposerCommands,\n useMessageComposerController,\n} from '../hooks';\nimport { CHANNEL_CONTAINER_ID } from '../../Channel/constants';\nimport {\n ContextMenu,\n ContextMenuButton,\n type ContextMenuHeaderComponent,\n type ContextMenuSubmenu,\n useContextMenuContext,\n useDialogIsOpen,\n useDialogOnNearestManager,\n} from '../../Dialog';\nimport { GlobalModal } from '../../Modal';\nimport { ShareLocationDialog as DefaultLocationDialog } from '../../Location';\nimport { PollCreationDialog as DefaultPollCreationDialog } from '../../Poll';\nimport { Portal } from '../../Portal/Portal';\nimport { UploadFileInput } from '../../ReactFileUtilities';\nimport {\n useChannelStateContext,\n useComponentContext,\n useComponentContextIcons,\n useTranslationContext,\n} from '../../../context';\nimport {\n AttachmentSelectorContextProvider,\n useAttachmentSelectorContext,\n} from '../../../context/AttachmentSelectorContext';\nimport { getChannelConfig } from '../../../utils/getChannelConfig';\nimport { useStableId } from '../../UtilityComponents/useStableId';\nimport { useInertWhenHidden } from '../../Accessibility';\nimport { useStateStore } from '../../../store';\nimport type { TextComposerState } from 'stream-chat';\nimport clsx from 'clsx';\nimport { Button, type ButtonProps } from '../../Button';\nimport { useIsCooldownActive } from '../hooks/useIsCooldownActive';\nimport {\n CommandsMenu,\n CommandsMenuClassName,\n CommandsSubmenuHeader,\n} from './CommandsMenu';\n\nconst textComposerStateSelector = ({ command }: TextComposerState) => ({ command });\n\nconst AttachmentSelectorMenuInitButtonIcon = ({ className }: { className?: string }) => {\n const { IconPlus } = useComponentContextIcons();\n const { AttachmentSelectorInitiationButtonContents } = useComponentContext();\n\n if (AttachmentSelectorInitiationButtonContents) {\n return (\n <span className={className}>\n <AttachmentSelectorInitiationButtonContents />\n </span>\n );\n }\n\n return (\n <IconPlus\n className={clsx('str-chat__attachment-selector__menu-button__icon', className)}\n />\n );\n};\n\nexport const AttachmentSelectorButton = forwardRef<\n HTMLButtonElement,\n ButtonProps & { iconClassName?: string }\n>(function AttachmentSelectorButton({ className, iconClassName, ...props }, ref) {\n return (\n <Button\n appearance='outline'\n circular\n className={clsx('str-chat__attachment-selector__menu-button', className)}\n data-testid='invoke-attachment-selector-button'\n size='lg'\n variant='secondary'\n {...props}\n ref={ref}\n >\n <AttachmentSelectorMenuInitButtonIcon className={iconClassName} />\n </Button>\n );\n});\n\ntype SimpleAttachmentSelectorProps = {\n buttonProps?: Omit<ButtonProps, 'onClick'>;\n};\n\nexport const SimpleAttachmentSelector = ({\n buttonProps,\n}: SimpleAttachmentSelectorProps = {}) => {\n const { channelCapabilities } = useChannelStateContext();\n const { t } = useTranslationContext();\n const inputRef = useRef<HTMLInputElement | null>(null);\n const [buttonElement, setButtonElement] = useState<HTMLButtonElement | null>(null);\n const id = useStableId();\n const isCooldownActive = useIsCooldownActive();\n const messageComposer = useMessageComposerController();\n const { command } = useStateStore(\n messageComposer.textComposer.state,\n textComposerStateSelector,\n );\n // Visually hidden via a CSS transition while a command is active; keep it out\n // of the a11y tree and tab order without setting `display: none`.\n const inertProps = useInertWhenHidden(!!command, { setHiddenAttribute: false });\n\n useEffect(() => {\n if (!buttonElement) return;\n const handleKeyUp = (event: KeyboardEvent) => {\n if (![' ', 'Enter'].includes(event.key) || !inputRef.current) return;\n event.preventDefault();\n inputRef.current.click();\n };\n buttonElement.addEventListener('keyup', handleKeyUp);\n return () => {\n buttonElement.removeEventListener('keyup', handleKeyUp);\n };\n }, [buttonElement]);\n\n if (!channelCapabilities['upload-file']) return null;\n\n return (\n <div className='str-chat__attachment-selector' {...inertProps}>\n <AttachmentSelectorButton\n {...buttonProps}\n aria-label={t('aria/Open Attachment Selector')}\n disabled={isCooldownActive}\n onClick={() => inputRef.current?.click()}\n ref={setButtonElement}\n />\n <UploadFileInput id={id} ref={inputRef} />\n </div>\n );\n};\n\nexport type AttachmentSelectorModalContentProps = {\n close: () => void;\n};\n\nexport type AttachmentSelectorAction = {\n ActionButton: ComponentType<AttachmentSelectorActionProps>;\n id?: string;\n ModalContent?: React.ComponentType<AttachmentSelectorModalContentProps>;\n Submenu?: ContextMenuSubmenu;\n Header?: ContextMenuHeaderComponent;\n type: 'uploadFile' | 'createPoll' | 'addLocation' | 'selectCommand' | (string & {});\n};\n\nexport type AttachmentSelectorActionProps = {\n openModalForAction: (actionType: AttachmentSelectorAction['type']) => void;\n submenuItems?: ContextMenuSubmenu;\n submenuHeader?: ContextMenuHeaderComponent;\n};\n\nexport const DefaultAttachmentSelectorComponents = {\n Command({ submenuHeader, submenuItems }: AttachmentSelectorActionProps) {\n const { t } = useTranslationContext();\n const { IconCommand } = useComponentContextIcons();\n const { openSubmenu } = useContextMenuContext();\n const commands = useMessageComposerCommands();\n const hasEnabledCommands = commands.some(({ enabled }) => enabled);\n const hasSubmenu = !!submenuItems;\n\n return (\n <ContextMenuButton\n className='str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__commands-button'\n disabled={!hasEnabledCommands}\n hasSubMenu={hasSubmenu}\n Icon={IconCommand}\n onClick={(event) => {\n if (!hasSubmenu) return;\n openSubmenu({\n focusReturnTarget: event.currentTarget,\n Header: submenuHeader,\n menuClassName: CommandsMenuClassName,\n Submenu: submenuItems,\n });\n }}\n >\n {t('Commands')}\n </ContextMenuButton>\n );\n },\n File() {\n const { IconAttachment } = useComponentContextIcons();\n const { t } = useTranslationContext();\n const { fileInput } = useAttachmentSelectorContext();\n const { closeMenu } = useContextMenuContext();\n\n return (\n <ContextMenuButton\n className='str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__upload-file-button'\n Icon={IconAttachment}\n onClick={() => {\n fileInput?.click();\n closeMenu();\n }}\n >\n {t('File')}\n </ContextMenuButton>\n );\n },\n Location({ openModalForAction }: AttachmentSelectorActionProps) {\n const { t } = useTranslationContext();\n const { IconLocation } = useComponentContextIcons();\n const { closeMenu } = useContextMenuContext();\n return (\n <ContextMenuButton\n className='str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__add-location-button'\n Icon={IconLocation}\n onClick={() => {\n openModalForAction('addLocation');\n closeMenu();\n }}\n >\n {t('Location')}\n </ContextMenuButton>\n );\n },\n Poll({ openModalForAction }: AttachmentSelectorActionProps) {\n const { t } = useTranslationContext();\n const { IconPoll } = useComponentContextIcons();\n const { closeMenu } = useContextMenuContext();\n return (\n <ContextMenuButton\n className='str-chat__attachment-selector-actions-menu__button str-chat__attachment-selector-actions-menu__create-poll-button'\n Icon={IconPoll}\n onClick={() => {\n openModalForAction('createPoll');\n closeMenu();\n }}\n >\n {t('Poll')}\n </ContextMenuButton>\n );\n },\n};\n\n/**\n * Order of AttachmentSelectorAction objects defines the order in the context menu width index 0 being at the top.\n */\nexport const defaultAttachmentSelectorActionSet: AttachmentSelectorAction[] = [\n {\n ActionButton: DefaultAttachmentSelectorComponents.File,\n type: 'uploadFile',\n },\n {\n ActionButton: DefaultAttachmentSelectorComponents.Poll,\n type: 'createPoll',\n },\n {\n ActionButton: DefaultAttachmentSelectorComponents.Location,\n type: 'addLocation',\n },\n {\n ActionButton: DefaultAttachmentSelectorComponents.Command,\n Header: CommandsSubmenuHeader,\n Submenu: CommandsMenu,\n type: 'selectCommand',\n },\n];\n\nexport type AttachmentSelectorProps = {\n attachmentSelectorActionSet?: AttachmentSelectorAction[];\n buttonProps?: Omit<ButtonProps, 'onClick'>;\n getModalPortalDestination?: () => HTMLElement | null;\n};\n\nconst useAttachmentSelectorActionsFiltered = (original: AttachmentSelectorAction[]) => {\n const {\n PollCreationDialog = DefaultPollCreationDialog,\n ShareLocationDialog = DefaultLocationDialog,\n } = useComponentContext();\n const { channelCapabilities } = useChannelStateContext();\n const { isUploadEnabled } = useAttachmentManagerState();\n const messageComposer = useMessageComposerController();\n const channelConfig = getChannelConfig(messageComposer.channel);\n\n return useMemo(\n () =>\n original\n .filter((action) => {\n if (action.type === 'uploadFile')\n return (\n channelCapabilities['upload-file'] &&\n channelConfig?.uploads &&\n isUploadEnabled\n );\n\n if (action.type === 'createPoll')\n return (\n channelCapabilities['send-poll'] &&\n !messageComposer.threadId &&\n channelConfig?.polls\n );\n\n if (action.type === 'addLocation') {\n return channelConfig?.shared_locations && !messageComposer.threadId;\n }\n\n if (action.type === 'selectCommand') {\n return !!channelConfig?.commands?.some((command) => !!command.name);\n }\n\n return true;\n })\n .map((action) => {\n if (action.type === 'createPoll' && !action.ModalContent) {\n return { ...action, ModalContent: PollCreationDialog };\n }\n if (action.type === 'addLocation' && !action.ModalContent) {\n return { ...action, ModalContent: ShareLocationDialog };\n }\n return action;\n }),\n [\n PollCreationDialog,\n ShareLocationDialog,\n channelCapabilities,\n channelConfig,\n isUploadEnabled,\n messageComposer.threadId,\n original,\n ],\n );\n};\n\nexport const AttachmentSelector = ({\n attachmentSelectorActionSet = defaultAttachmentSelectorActionSet,\n buttonProps,\n getModalPortalDestination,\n}: AttachmentSelectorProps) => {\n const { t } = useTranslationContext();\n const { ContextMenu: ContextMenuComponent = ContextMenu, Modal = GlobalModal } =\n useComponentContext();\n const messageComposer = useMessageComposerController();\n const isCooldownActive = useIsCooldownActive();\n const { command } = useStateStore(\n messageComposer.textComposer.state,\n textComposerStateSelector,\n );\n // The selector is visually hidden via a CSS transition while a command is\n // active; keep it out of the a11y tree and tab order without setting\n // `display: none` (which would break the transition).\n const inertProps = useInertWhenHidden(!!command, { setHiddenAttribute: false });\n const actions = useAttachmentSelectorActionsFiltered(attachmentSelectorActionSet);\n\n const menuDialogId = `attachment-actions-menu${messageComposer.threadId ? '-thread' : ''}`;\n const { dialog: menuDialog, dialogManager } = useDialogOnNearestManager({\n id: menuDialogId,\n });\n const menuDialogIsOpen = useDialogIsOpen(menuDialogId, dialogManager?.id);\n\n const [modalContentAction, setModalContentActionAction] =\n useState<AttachmentSelectorAction>();\n const shouldRestoreFocusToTriggerRef = useRef(false);\n const openModalForAction = useCallback(\n (actionType: AttachmentSelectorAction['type']) => {\n const action = actions.find((a) => a.type === actionType);\n if (!action?.ModalContent) return;\n // Reset composer state when the dialog is opened (not on close), so every\n // open starts from a fresh form without flashing cleared fields right\n // before the modal unmounts on cancel/submit.\n if (actionType === 'createPoll') {\n messageComposer.pollComposer.initState();\n }\n setModalContentActionAction(action);\n },\n [actions, messageComposer],\n );\n\n const closeModal = useCallback(() => {\n shouldRestoreFocusToTriggerRef.current = true;\n setModalContentActionAction(undefined);\n }, []);\n\n const [fileInput, setFileInput] = useState<HTMLInputElement | null>(null);\n const menuButtonRef = useRef<HTMLButtonElement>(null);\n\n useEffect(() => {\n if (modalContentAction || !shouldRestoreFocusToTriggerRef.current) return;\n\n const frame = requestAnimationFrame(() => {\n shouldRestoreFocusToTriggerRef.current = false;\n // Only restore focus to the trigger if focus actually fell to <body> when the dialog closed\n // (the cancel/escape case). If the dialog content purposefully moved focus elsewhere — e.g.\n // the poll dialog returns focus to the composer on a successful send — leave it there. This\n // mirrors react-aria FocusScope's own restore guard and prevents a focus blip through the\n // trigger before the content's intended target.\n const active = document.activeElement;\n if (active && active !== document.body) return;\n menuButtonRef.current?.focus();\n });\n\n return () => cancelAnimationFrame(frame);\n }, [modalContentAction]);\n\n const contextMenuItems = useMemo(\n () =>\n actions.map((action) => (\n <action.ActionButton\n key={action.type}\n openModalForAction={openModalForAction}\n submenuHeader={action.Header}\n submenuItems={action.Submenu}\n />\n )),\n [actions, openModalForAction],\n );\n\n const getDefaultPortalDestination = useCallback(\n () => document.getElementById(CHANNEL_CONTAINER_ID),\n [],\n );\n\n if (actions.length === 0) return null;\n\n if (actions.length === 1 && actions[0].type === 'uploadFile')\n return <SimpleAttachmentSelector buttonProps={buttonProps} />;\n\n const ModalContent = modalContentAction?.ModalContent;\n const modalIsOpen = !!ModalContent;\n return (\n <AttachmentSelectorContextProvider value={{ fileInput }}>\n <div className='str-chat__attachment-selector' {...inertProps}>\n <UploadFileInput ref={setFileInput} />\n <AttachmentSelectorButton\n {...buttonProps}\n aria-expanded={menuDialogIsOpen}\n aria-haspopup='true'\n aria-label={t('aria/Open Attachment Selector')}\n disabled={isCooldownActive}\n iconClassName={clsx('str-chat__prepare-rotate45', {\n 'str-chat__rotate45': menuDialogIsOpen,\n })}\n onClick={() => menuDialog?.toggle()}\n ref={menuButtonRef}\n />\n <ContextMenuComponent\n allowFlip\n aria-label={t('aria/Attachment Actions')}\n backLabel={t('Back')}\n className='str-chat__attachment-selector-actions-menu'\n data-testid='attachment-selector-actions-menu'\n dialogManagerId={dialogManager?.id}\n id={menuDialogId}\n onClose={menuDialog.close}\n placement='top-start'\n referenceElement={menuButtonRef.current}\n tabIndex={-1}\n >\n {contextMenuItems}\n </ContextMenuComponent>\n <Portal\n getPortalDestination={getModalPortalDestination ?? getDefaultPortalDestination}\n isOpen={modalIsOpen}\n >\n <Modal\n className={clsx({\n 'str-chat__create-poll-modal': modalContentAction?.type === 'createPoll',\n 'str-chat__share-location-modal':\n modalContentAction?.type === 'addLocation',\n })}\n // Focus the dialog surface on open (not a field): a field's focus would supersede the\n // screen reader's dialog identity/description announcement. The user then presses Enter\n // to step into the dialog's default field (see GlobalModal's `[data-autofocus]`\n // handling).\n initialFocusStrategy='dialog'\n onClose={closeModal}\n open={modalIsOpen}\n >\n {ModalContent && <ModalContent close={closeModal} />}\n </Modal>\n </Portal>\n </div>\n </AttachmentSelectorContextProvider>\n );\n};\n","import React from 'react';\nimport type { AnyLocalAttachment, LocalUploadAttachment } from 'stream-chat';\nimport { useComponentContextIcons, useTranslationContext } from '../../../context';\nimport { RemoveAttachmentPreviewButton } from '../RemoveAttachmentPreviewButton';\n\nexport type UnsupportedAttachmentPreviewProps<\n CustomLocalMetadata = Record<string, unknown>,\n> = {\n attachment: AnyLocalAttachment<CustomLocalMetadata>;\n handleRetry: (\n attachment: LocalUploadAttachment,\n ) => void | Promise<LocalUploadAttachment | undefined>;\n removeAttachments: (ids: string[]) => void;\n};\n\nexport const UnsupportedAttachmentPreview = ({\n attachment,\n removeAttachments,\n}: UnsupportedAttachmentPreviewProps) => {\n const { IconUnsupportedAttachment } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const { id } = attachment.localMetadata ?? {};\n\n return (\n <div\n className='str-chat__attachment-preview-unsupported'\n data-testid='attachment-preview-unsupported'\n >\n <IconUnsupportedAttachment />\n <div className='str-chat__attachment-preview-unsupported__metadata'>\n <div\n className='str-chat__attachment-preview-unsupported__title'\n data-testid='unsupported-attachment-preview-title'\n >\n {t('Unsupported attachment')}\n </div>\n </div>\n <RemoveAttachmentPreviewButton\n data-testid='file-preview-item-delete-button'\n onClick={() => {\n if (id) removeAttachments([id]);\n }}\n />\n </div>\n );\n};\n","import React from 'react';\n\nimport { useComponentContext } from '../../../context';\nimport { FileSizeIndicator as DefaultFileSizeIndicator } from '../../Attachment/components/FileSizeIndicator';\nimport { UploadedSizeIndicator as DefaultUploadedSizeIndicator } from '../../Loading/UploadedSizeIndicator';\n\nfunction resolveAttachmentFullByteSize(attachment: {\n file_size?: number | string;\n localMetadata?: { file?: { size?: unknown } } | null;\n}): number | undefined {\n const fromFile = attachment.localMetadata?.file?.size;\n if (typeof fromFile === 'number' && Number.isFinite(fromFile) && fromFile >= 0) {\n return fromFile;\n }\n const raw = attachment.file_size;\n if (typeof raw === 'number' && Number.isFinite(raw) && raw >= 0) return raw;\n if (typeof raw === 'string') {\n const n = parseFloat(raw);\n if (Number.isFinite(n) && n >= 0) return n;\n }\n return undefined;\n}\n\nexport type AttachmentUploadedSizeIndicatorProps = {\n attachment: {\n file_size?: number | string;\n localMetadata?: {\n file?: { size?: unknown };\n uploadProgress?: number;\n uploadState?: string;\n } | null;\n };\n};\n\nexport const AttachmentUploadedSizeIndicator = ({\n attachment,\n}: AttachmentUploadedSizeIndicatorProps) => {\n const {\n FileSizeIndicator = DefaultFileSizeIndicator,\n UploadedSizeIndicator = DefaultUploadedSizeIndicator,\n } = useComponentContext();\n const { uploadProgress, uploadState } = attachment.localMetadata ?? {};\n const fullBytes = resolveAttachmentFullByteSize(attachment);\n const uploaded =\n uploadProgress !== undefined && fullBytes !== undefined\n ? Math.round((uploadProgress / 100) * fullBytes)\n : undefined;\n\n if (uploadState === 'uploading' && uploaded !== undefined && fullBytes !== undefined) {\n return <UploadedSizeIndicator fullBytes={fullBytes} uploadedBytes={uploaded} />;\n }\n\n if (uploadState === 'finished') {\n return <FileSizeIndicator fileSize={attachment.file_size} />;\n }\n\n return null;\n};\n","import React, {\n type ComponentProps,\n type KeyboardEvent,\n type MouseEvent,\n useState,\n} from 'react';\nimport { useTranslationContext } from '../../../../context';\nimport {\n isImageAttachment,\n isVideoAttachment,\n type LocalUploadAttachment,\n} from 'stream-chat';\n\ntype AttachmentPreviewRootProps = Omit<ComponentProps<'div'>, 'onClick' | 'onKeyDown'> & {\n attachment: LocalUploadAttachment;\n /**\n * Called when the attachment preview is pressed and can be previewed.\n * The parent is responsible for opening the gallery at the correct index.\n */\n openPreview?: () => void;\n /**\n * Returns boolean value to signal whether the event handling should be terminated immediately (return false)\n * or default logic can be executed next (return true)\n */\n onPressed?: (e: MouseEvent<Element> | KeyboardEvent<Element>) => boolean;\n};\n\nconst INTERACTIVE_SELECTOR =\n 'button, a, input, textarea, select, [role=\"button\"], [role=\"link\"], [data-interactive=\"true\"]';\n\nfunction hasInteractiveAncestorBeforeRoot(\n target: EventTarget | null,\n root: HTMLElement | null,\n): boolean {\n if (!(target instanceof Element) || !root) return false;\n\n let el: Element | null = target;\n while (el && el !== root) {\n if (el.matches(INTERACTIVE_SELECTOR)) return true;\n el = el.parentElement;\n }\n return false;\n}\n\n// todo: use this component for all the attachment previews\nexport const AttachmentPreviewRoot = ({\n attachment,\n onPressed,\n openPreview,\n tabIndex = 0,\n ...props\n}: AttachmentPreviewRootProps) => {\n const { t } = useTranslationContext();\n const [root, setRoot] = useState<HTMLDivElement | null>(null);\n const url =\n attachment.asset_url || attachment.image_url || attachment.localMetadata.previewUri;\n\n const canDownloadAttachment = false; //!!url;\n\n const canPreviewAttachment =\n !!openPreview &&\n ((!!url && isImageAttachment(attachment)) || isVideoAttachment(attachment));\n\n const handlePressed = (e: MouseEvent<Element> | KeyboardEvent<Element>) => {\n if (e.defaultPrevented) return;\n\n if (hasInteractiveAncestorBeforeRoot(e.target as Element, root)) return;\n\n if (onPressed) {\n const shouldContinue = onPressed(e);\n if (!shouldContinue) return;\n }\n\n if (canPreviewAttachment) {\n openPreview();\n return;\n }\n\n if (canDownloadAttachment) {\n window.open(url, '_blank', 'noopener,noreferrer');\n }\n };\n\n const isInteractive = canPreviewAttachment || canDownloadAttachment;\n\n return (\n <div\n aria-label={\n isInteractive\n ? t(canPreviewAttachment ? 'aria/Show preview' : 'aria/Download attachment')\n : undefined\n }\n {...props}\n onClick={handlePressed}\n onKeyDown={\n isInteractive\n ? (e) => {\n if (e.key !== 'Enter' && e.key !== ' ') return;\n handlePressed(e);\n e.preventDefault();\n }\n : undefined\n }\n ref={setRoot}\n role={isInteractive ? 'button' : undefined}\n tabIndex={isInteractive ? tabIndex : -1}\n >\n {props.children}\n </div>\n );\n};\n","import React from 'react';\nimport { useComponentContextIcons, useTranslationContext } from '../../../context';\nimport { FileIcon } from '../../FileIcon';\nimport { UploadProgressIndicator } from '../../Loading/UploadProgressIndicator';\nimport { AttachmentUploadedSizeIndicator } from './AttachmentUploadedSizeIndicator';\nimport type { LocalAudioAttachment, LocalFileAttachment } from 'stream-chat';\nimport type { UploadAttachmentPreviewProps } from './types';\nimport { RemoveAttachmentPreviewButton } from '../RemoveAttachmentPreviewButton';\nimport { AttachmentPreviewRoot } from './utils/AttachmentPreviewRoot';\n\nexport type FileAttachmentPreviewProps<CustomLocalMetadata = unknown> =\n UploadAttachmentPreviewProps<\n LocalFileAttachment<CustomLocalMetadata> | LocalAudioAttachment<CustomLocalMetadata>\n >;\n\nexport const FileAttachmentPreview = ({\n attachment,\n handleRetry,\n removeAttachments,\n}: FileAttachmentPreviewProps) => {\n const { IconExclamationMark, IconExclamationTriangleFill } = useComponentContextIcons();\n\n const { t } = useTranslationContext('FilePreview');\n const { id, uploadPermissionCheck, uploadProgress, uploadState } =\n attachment.localMetadata ?? {};\n\n const hasSizeLimitError = uploadPermissionCheck?.reason === 'size_limit';\n const hasFatalError = uploadState === 'blocked' || hasSizeLimitError;\n const hasRetriableError = uploadState === 'failed' && !!handleRetry;\n\n return (\n <AttachmentPreviewRoot\n attachment={attachment}\n className='str-chat__attachment-preview-file'\n data-testid='attachment-preview-file'\n >\n <div className='str-chat__attachment-preview-file__icon'>\n <FileIcon fileName={attachment.title} mimeType={attachment.mime_type} />\n </div>\n\n <div className='str-chat__attachment-preview-file__info'>\n <div className='str-chat__attachment-preview-file-name' title={attachment.title}>\n {attachment.title}\n </div>\n <div className='str-chat__attachment-preview-file__data'>\n {uploadState === 'uploading' && (\n <UploadProgressIndicator uploadProgress={uploadProgress} />\n )}\n <AttachmentUploadedSizeIndicator attachment={attachment} />\n {hasFatalError && (\n <div className='str-chat__attachment-preview-file__fatal-error'>\n <IconExclamationMark />\n <span>\n {hasSizeLimitError\n ? t('File too large')\n : uploadState === 'blocked'\n ? t('Upload blocked')\n : t('Upload failed')}\n </span>\n </div>\n )}\n {hasRetriableError && (\n <div className='str-chat__attachment-preview-file__retriable-error'>\n <IconExclamationTriangleFill />\n <span>{t('Upload error')}</span>\n <button\n aria-label={t('aria/Retry upload')}\n className='str-chat__attachment-preview-file__retry-upload-button'\n data-testid='file-preview-item-retry-button'\n onClick={() => {\n handleRetry(attachment);\n }}\n type='button'\n >\n {t('Retry upload')}\n </button>\n </div>\n )}\n </div>\n </div>\n\n <RemoveAttachmentPreviewButton\n data-testid='file-preview-item-delete-button'\n onClick={() => {\n if (id) removeAttachments([id]);\n }}\n uploadState={uploadState}\n />\n </AttachmentPreviewRoot>\n );\n};\n","import type { UploadAttachmentPreviewProps } from './types';\nimport {\n isVoiceRecordingAttachment,\n type LocalAudioAttachment,\n type LocalVoiceRecordingAttachment,\n} from 'stream-chat';\nimport { useComponentContextIcons, useTranslationContext } from '../../../context';\nimport React, { useEffect } from 'react';\nimport clsx from 'clsx';\nimport { UploadProgressIndicator } from '../../Loading/UploadProgressIndicator';\nimport { RemoveAttachmentPreviewButton } from '../RemoveAttachmentPreviewButton';\nimport { AttachmentPreviewRoot } from './utils/AttachmentPreviewRoot';\nimport { PlayButton } from '../../Button';\nimport {\n type AudioPlayerState,\n DurationDisplay,\n PlaybackRateButton,\n WaveProgressBar,\n} from '../../AudioPlayback';\nimport { useAudioPlayer } from '../../AudioPlayback/WithAudioPlayback';\nimport { useStateStore } from '../../../store';\nimport { AttachmentUploadedSizeIndicator } from './AttachmentUploadedSizeIndicator';\n\nexport type AudioAttachmentPreviewProps<CustomLocalMetadata = Record<string, unknown>> =\n UploadAttachmentPreviewProps<\n | LocalAudioAttachment<CustomLocalMetadata>\n | LocalVoiceRecordingAttachment<CustomLocalMetadata>\n >;\n\nconst audioPlayerStateSelector = (state: AudioPlayerState) => ({\n canPlayRecord: state.canPlayRecord,\n isPlaying: state.isPlaying,\n playbackRate: state.currentPlaybackRate,\n progressPercent: state.progressPercent,\n secondsElapsed: state.secondsElapsed,\n});\n\nexport const AudioAttachmentPreview = ({\n attachment,\n handleRetry,\n removeAttachments,\n}: AudioAttachmentPreviewProps) => {\n const { IconExclamationMark, IconExclamationTriangleFill } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const { id, previewUri, uploadPermissionCheck, uploadProgress, uploadState } =\n attachment.localMetadata ?? {};\n const url = attachment.asset_url || previewUri;\n\n const audioPlayer = useAudioPlayer({\n fileSize: attachment.localMetadata.file?.size ?? attachment.file_size,\n mimeType: attachment.localMetadata.file?.type ?? attachment.mime_type,\n requester: attachment.localMetadata.id,\n src: url,\n title: attachment.title,\n waveformData: attachment.waveform_data,\n });\n\n useEffect(() => {\n audioPlayer?.cancelScheduledRemoval();\n return () => {\n audioPlayer?.scheduleRemoval();\n };\n }, [audioPlayer]);\n\n const { canPlayRecord, isPlaying, playbackRate, progressPercent, secondsElapsed } =\n useStateStore(audioPlayer?.state, audioPlayerStateSelector) ?? {};\n\n const resolvedDuration = audioPlayer?.durationSeconds ?? attachment.duration;\n\n const hasWaveform = !!audioPlayer?.waveformData?.length;\n const hasSizeLimitError = uploadPermissionCheck?.reason === 'size_limit';\n const hasFatalError = uploadState === 'blocked' || hasSizeLimitError;\n const hasRetriableError = uploadState === 'failed' && !!handleRetry;\n const hasError = hasRetriableError || hasFatalError;\n\n const showProgressControls = !hasError || (hasError && isPlaying);\n\n return (\n <AttachmentPreviewRoot\n attachment={attachment}\n className={clsx('str-chat__attachment-preview-audio')}\n data-testid='attachment-preview-audio'\n >\n <PlayButton\n isPlaying={Boolean(isPlaying)}\n onClick={() => {\n audioPlayer?.togglePlay();\n }}\n />\n\n <div className='str-chat__attachment-preview-file__info'>\n <div className='str-chat__attachment-preview-file-name' title={attachment.title}>\n {isVoiceRecordingAttachment(attachment) ? t('Voice message') : attachment.title}\n </div>\n <div className='str-chat__attachment-preview-file__data'>\n {uploadState === 'uploading' && (\n <UploadProgressIndicator uploadProgress={uploadProgress} />\n )}\n {showProgressControls ? (\n <>\n {!resolvedDuration && !progressPercent && !isPlaying && (\n <AttachmentUploadedSizeIndicator attachment={attachment} />\n )}\n {hasWaveform ? (\n <>\n <DurationDisplay\n duration={resolvedDuration}\n isPlaying={Boolean(isPlaying)}\n secondsElapsed={secondsElapsed}\n showRemaining\n />\n <WaveProgressBar\n durationSeconds={resolvedDuration}\n progress={progressPercent}\n relativeAmplitudeBarWidth={1}\n relativeAmplitudeGap={1}\n secondsElapsed={secondsElapsed}\n seek={audioPlayer.seek}\n waveformData={audioPlayer.waveformData}\n />\n </>\n ) : (\n <DurationDisplay\n duration={resolvedDuration}\n isPlaying={Boolean(isPlaying)}\n secondsElapsed={secondsElapsed}\n />\n )}\n </>\n ) : hasFatalError ? (\n <div className='str-chat__attachment-preview-file__fatal-error'>\n <IconExclamationMark />\n <span>\n {hasSizeLimitError\n ? t('File too large')\n : uploadState === 'blocked'\n ? t('Upload blocked')\n : t('Upload failed')}\n </span>\n </div>\n ) : (\n <div className='str-chat__attachment-preview-file__retriable-error'>\n <IconExclamationTriangleFill />\n <span>{t('Upload error')}</span>\n <button\n aria-label={t('aria/Retry upload')}\n className='str-chat__attachment-preview-file__retry-upload-button'\n data-testid='file-preview-item-retry-button'\n onClick={() => {\n handleRetry(attachment);\n }}\n type='button'\n >\n {t('Retry upload')}\n </button>\n </div>\n )}\n </div>\n </div>\n {audioPlayer && canPlayRecord && (\n <PlaybackRateButton\n aria-label={t('Playback speed {{ rate }}x', {\n rate: playbackRate?.toString() ?? '1',\n })}\n onClick={audioPlayer.increasePlaybackRate}\n >\n x{playbackRate?.toString()}\n </PlaybackRateButton>\n )}\n <RemoveAttachmentPreviewButton\n data-testid='audio-preview-item-delete-button'\n onClick={() => {\n if (id) removeAttachments([id]);\n }}\n uploadState={uploadState}\n />\n </AttachmentPreviewRoot>\n );\n};\n","import { useComponentContextIcons } from '../../context';\nimport React, { type ComponentType } from 'react';\nimport type { LocalAttachment } from 'stream-chat';\nimport clsx from 'clsx';\n\nexport type MediaBadgeVariant = 'video' | 'voice-recording' | string;\n\nexport type MediaBadgeProps = {\n attachment: LocalAttachment;\n variant: 'video' | 'voice-recording' | string;\n};\n\nexport const MediaBadge = ({ attachment, variant }: MediaBadgeProps) => {\n const { IconMicrophoneSolid, IconVideoFill } = useComponentContextIcons();\n\n const mediaBadgeVariantToIcon: Record<MediaBadgeVariant, ComponentType> = {\n video: IconVideoFill,\n voiceRecording: IconMicrophoneSolid,\n };\n\n const Icon = mediaBadgeVariantToIcon[variant];\n return (\n <div\n className={clsx('str-chat__media-badge', {\n [`str-chat__media-badge--${variant}`]: variant,\n })}\n >\n {Icon && <Icon />}\n {attachment.duration ? <div>{attachment.duration}</div> : null}\n </div>\n );\n};\n","import type { UploadAttachmentPreviewProps } from './types';\nimport {\n isVideoAttachment,\n type LocalImageAttachment,\n type LocalVideoAttachment,\n} from 'stream-chat';\nimport {\n useComponentContext,\n useComponentContextIcons,\n useTranslationContext,\n} from '../../../context';\nimport { BaseImage as DefaultBaseImage } from '../../BaseImage';\nimport React, {\n type KeyboardEvent,\n type MouseEvent,\n useCallback,\n useMemo,\n useState,\n} from 'react';\nimport clsx from 'clsx';\nimport { RemoveAttachmentPreviewButton } from '../RemoveAttachmentPreviewButton';\nimport { Button } from '../../Button';\nimport { UploadProgressIndicator } from '../../Loading/UploadProgressIndicator';\nimport { AttachmentPreviewRoot } from './utils/AttachmentPreviewRoot';\nimport { MediaBadge } from '../../Badge/MediaBadge';\n\nexport type MediaAttachmentPreviewProps<CustomLocalMetadata = Record<string, unknown>> =\n UploadAttachmentPreviewProps<\n LocalVideoAttachment<CustomLocalMetadata> | LocalImageAttachment<CustomLocalMetadata>\n > & {\n openPreview?: () => void;\n };\n\nexport const MediaAttachmentPreview = ({\n attachment,\n handleRetry,\n openPreview,\n removeAttachments,\n}: MediaAttachmentPreviewProps) => {\n const { IconExclamationMark, IconRetry } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const { BaseImage = DefaultBaseImage } = useComponentContext();\n const [thumbnailPreviewError, setThumbnailPreviewError] = useState(false);\n\n const { id, uploadPermissionCheck, uploadProgress, uploadState } =\n attachment.localMetadata ?? {};\n\n const isUploading = uploadState === 'uploading';\n const handleThumbnailLoadError = useCallback(() => setThumbnailPreviewError(true), []);\n const hasSizeLimitError = uploadPermissionCheck?.reason === 'size_limit';\n const hasFatalError = uploadState === 'blocked' || hasSizeLimitError;\n const hasRetriableError = uploadState === 'failed' && !!handleRetry;\n const hasUploadError = hasRetriableError || hasFatalError;\n\n const retry = (e: MouseEvent<Element> | KeyboardEvent<Element>) => {\n e.stopPropagation();\n handleRetry(attachment);\n return false;\n };\n\n const thumbnail = useMemo(\n () =>\n isVideoAttachment(attachment)\n ? {\n alt: attachment.title,\n title: attachment.title,\n url: attachment.thumb_url,\n }\n : {\n alt: attachment.fallback,\n title: attachment.fallback,\n url: attachment.image_url || attachment.localMetadata.previewUri,\n },\n [attachment],\n );\n\n return (\n <AttachmentPreviewRoot\n attachment={attachment}\n className={clsx('str-chat__attachment-preview-media', {\n 'str-chat__attachment-preview-media--thumbnail-preview-error':\n thumbnailPreviewError,\n 'str-chat__attachment-preview-media--upload-error': hasUploadError,\n 'str-chat__attachment-preview-media--uploading': isUploading,\n })}\n data-testid='attachment-preview-media'\n onPressed={hasRetriableError ? retry : undefined}\n openPreview={!isUploading && !hasUploadError ? openPreview : undefined}\n >\n <div className='str-chat__attachment-preview-media__thumbnail-wrapper'>\n {thumbnail.url && (\n <BaseImage\n alt={thumbnail.alt}\n className='str-chat__attachment-preview-media__thumbnail'\n onError={handleThumbnailLoadError}\n src={thumbnail.url}\n title={thumbnail.title}\n />\n )}\n\n <div className={clsx('str-chat__attachment-preview-media__overlay')}>\n {isUploading && <UploadProgressIndicator uploadProgress={uploadProgress} />}\n\n {isVideoAttachment(attachment) &&\n !hasUploadError &&\n uploadState !== 'uploading' && (\n <MediaBadge attachment={attachment} variant='video' />\n )}\n\n {hasFatalError && <IconExclamationMark />}\n\n {hasRetriableError && (\n <Button\n appearance='solid'\n aria-label={t('aria/Retry upload')}\n circular\n className='str-chat__attachment-preview-media__retry-upload-button'\n data-testid='video-preview-item-retry-button'\n onClick={retry}\n size='sm'\n variant='danger'\n >\n <IconRetry />\n </Button>\n )}\n </div>\n </div>\n\n <RemoveAttachmentPreviewButton\n data-testid='video-preview-item-delete-button'\n onClick={() => {\n if (id) removeAttachments([id]);\n }}\n uploadState={uploadState}\n />\n </AttachmentPreviewRoot>\n );\n};\n","import React, { type ComponentType, useCallback, useMemo, useRef, useState } from 'react';\nimport {\n isLocalAttachment,\n isLocalAudioAttachment,\n isLocalFileAttachment,\n isLocalImageAttachment,\n isLocalVideoAttachment,\n isLocalVoiceRecordingAttachment,\n isScrapedContent,\n isVoiceRecordingAttachment,\n} from 'stream-chat';\nimport {\n UnsupportedAttachmentPreview as DefaultUnknownAttachmentPreview,\n type UnsupportedAttachmentPreviewProps,\n} from './UnsupportedAttachmentPreview';\nimport {\n FileAttachmentPreview as DefaultFileAttachmentPreview,\n type FileAttachmentPreviewProps,\n} from './FileAttachmentPreview';\nimport { type AudioAttachmentPreviewProps } from './AudioAttachmentPreview';\nimport { type ImageAttachmentPreviewProps } from './ImageAttachmentPreview';\nimport { useAttachmentsForPreview, useMessageComposerController } from '../hooks';\nimport {\n MediaAttachmentPreview,\n type MediaAttachmentPreviewProps,\n} from './MediaAttachmentPreview';\nimport { toBaseImageDescriptors } from '../../BaseImage';\nimport { Gallery } from '../../Gallery';\nimport { GlobalModal, type ModalCloseSource } from '../../Modal';\nimport { useComponentContext } from '../../../context';\n\nexport type AttachmentPreviewListProps = {\n AudioAttachmentPreview?:\n | ComponentType<AudioAttachmentPreviewProps>\n | ComponentType<FileAttachmentPreviewProps>;\n FileAttachmentPreview?: ComponentType<FileAttachmentPreviewProps>;\n ImageAttachmentPreview?: ComponentType<ImageAttachmentPreviewProps>;\n UnsupportedAttachmentPreview?: ComponentType<UnsupportedAttachmentPreviewProps>;\n VideoAttachmentPreview?: ComponentType<MediaAttachmentPreviewProps>;\n};\n\nexport const AttachmentPreviewList = ({\n AudioAttachmentPreview = DefaultFileAttachmentPreview,\n FileAttachmentPreview = DefaultFileAttachmentPreview,\n ImageAttachmentPreview = MediaAttachmentPreview,\n UnsupportedAttachmentPreview = DefaultUnknownAttachmentPreview,\n VideoAttachmentPreview = MediaAttachmentPreview,\n}: AttachmentPreviewListProps) => {\n const messageComposer = useMessageComposerController();\n const { Modal = GlobalModal } = useComponentContext();\n const [showPreview, setShowPreview] = useState(false);\n const initialIndexRef = useRef(0);\n const preventOverlayClose = useCallback(\n (source: ModalCloseSource) => source !== 'overlay',\n [],\n );\n\n const { attachments } = useAttachmentsForPreview();\n const filteredAttachments = useMemo(\n () => attachments.filter((a) => !isVoiceRecordingAttachment(a)),\n [attachments],\n );\n\n const { galleryItems, previewIndexById } = useMemo(() => {\n const items: NonNullable<ReturnType<typeof toBaseImageDescriptors>>[] = [];\n const indexById: Record<string, number> = {};\n for (const a of attachments) {\n if (isLocalImageAttachment(a) || isLocalVideoAttachment(a)) {\n const descriptor = toBaseImageDescriptors(a);\n if (descriptor) {\n indexById[a.localMetadata.id] = items.length;\n items.push(descriptor);\n }\n }\n }\n return { galleryItems: items, previewIndexById: indexById };\n }, [attachments]);\n\n const openPreviewAtIndex = useCallback((index: number) => {\n initialIndexRef.current = index;\n setShowPreview(true);\n }, []);\n\n if (!filteredAttachments.length) return null;\n\n return (\n <div\n className='str-chat__attachment-preview-list'\n data-testid='attachment-preview-list'\n >\n {attachments.map((attachment) => {\n if (isScrapedContent(attachment)) return null;\n // Voice recordings are rendered in the dedicated slot above (VoiceRecordingPreviewSlot)\n if (isLocalVoiceRecordingAttachment(attachment)) return null;\n if (isLocalAudioAttachment(attachment)) {\n return (\n <AudioAttachmentPreview\n attachment={attachment}\n handleRetry={messageComposer.attachmentManager.uploadAttachment}\n key={attachment.localMetadata.id || attachment.asset_url}\n removeAttachments={messageComposer.attachmentManager.removeAttachments}\n />\n );\n } else if (isLocalVideoAttachment(attachment)) {\n return (\n <VideoAttachmentPreview\n attachment={attachment}\n handleRetry={messageComposer.attachmentManager.uploadAttachment}\n key={attachment.localMetadata.id || attachment.asset_url}\n openPreview={() =>\n openPreviewAtIndex(previewIndexById[attachment.localMetadata.id] ?? 0)\n }\n removeAttachments={messageComposer.attachmentManager.removeAttachments}\n />\n );\n } else if (isLocalImageAttachment(attachment)) {\n return (\n <ImageAttachmentPreview\n attachment={attachment}\n handleRetry={messageComposer.attachmentManager.uploadAttachment}\n key={attachment.localMetadata.id || attachment.image_url}\n openPreview={() =>\n openPreviewAtIndex(previewIndexById[attachment.localMetadata.id] ?? 0)\n }\n removeAttachments={messageComposer.attachmentManager.removeAttachments}\n />\n );\n } else if (isLocalFileAttachment(attachment)) {\n return (\n <FileAttachmentPreview\n attachment={attachment}\n handleRetry={messageComposer.attachmentManager.uploadAttachment}\n key={attachment.localMetadata.id || attachment.asset_url}\n removeAttachments={messageComposer.attachmentManager.removeAttachments}\n />\n );\n } else if (isLocalAttachment(attachment)) {\n return (\n <UnsupportedAttachmentPreview\n attachment={attachment}\n handleRetry={messageComposer.attachmentManager.uploadAttachment}\n key={attachment.localMetadata.id}\n removeAttachments={messageComposer.attachmentManager.removeAttachments}\n />\n );\n }\n return null;\n })}\n {galleryItems.length > 0 && (\n <Modal\n className='str-chat__gallery-modal'\n onClose={() => setShowPreview(false)}\n onCloseAttempt={preventOverlayClose}\n open={showPreview}\n >\n <Gallery initialIndex={initialIndexRef.current} items={galleryItems} />\n </Modal>\n )}\n </div>\n );\n};\n","import type { ComponentType } from 'react';\nimport React from 'react';\nimport {\n isLocalVoiceRecordingAttachment,\n type LocalVoiceRecordingAttachment,\n} from 'stream-chat';\nimport { useAttachmentsForPreview, useMessageComposerController } from '../hooks';\nimport { AudioAttachmentPreview } from './AudioAttachmentPreview';\nimport type { UploadAttachmentPreviewProps } from './types';\n\nexport type VoiceRecordingPreviewProps<CustomLocalMetadata = Record<string, unknown>> =\n UploadAttachmentPreviewProps<LocalVoiceRecordingAttachment<CustomLocalMetadata>>;\n\nexport type VoiceRecordingPreviewSlotProps = {\n /** Custom UI component for each voice recording preview in the slot; defaults to AudioAttachmentPreview */\n VoiceRecordingPreview?: ComponentType<VoiceRecordingPreviewProps>;\n};\n\n/**\n * Dedicated slot for voice recording preview(s), rendered apart from the main attachment preview list\n */\nexport const VoiceRecordingPreviewSlot = ({\n VoiceRecordingPreview = AudioAttachmentPreview,\n}: VoiceRecordingPreviewSlotProps) => {\n const messageComposer = useMessageComposerController();\n const { attachments } = useAttachmentsForPreview();\n\n const voiceAttachments = attachments.filter(isLocalVoiceRecordingAttachment);\n const firstVoice = voiceAttachments[0];\n if (!firstVoice) return null;\n\n return (\n <div\n className='str-chat__message-composer-voice-preview-slot'\n data-testid='voice-preview-slot'\n >\n <VoiceRecordingPreview\n attachment={firstVoice}\n handleRetry={messageComposer.attachmentManager.uploadAttachment}\n removeAttachments={messageComposer.attachmentManager.removeAttachments}\n />\n </div>\n );\n};\n","import { useMessageComposerController } from './hooks';\nimport type { TextComposerState } from 'stream-chat';\nimport {\n useComponentContextIcons,\n useMessageComposerContext,\n useTranslationContext,\n} from '../../context';\n\nexport type CommandChipProps = {\n command?: TextComposerState['command'];\n};\n\nexport const CommandChip = ({ command }: CommandChipProps) => {\n const { IconBolt, IconXmark } = useComponentContextIcons();\n\n const { textComposer } = useMessageComposerController();\n const { textareaRef } = useMessageComposerContext();\n const { t } = useTranslationContext();\n if (!command) return null;\n\n return (\n <div className='str-chat__command-chip'>\n <IconBolt />\n <span aria-hidden='true' tabIndex={-1}>\n {command.name}\n </span>\n <button\n aria-label={t('Exit command {{ command }}', { command: command.name })}\n className={'str-chat__command-chip__close-button'}\n onClick={() => {\n textComposer.setCommand(null);\n textareaRef.current?.focus();\n }}\n >\n <IconXmark />\n </button>\n </div>\n );\n};\n","import React from 'react';\nimport { useCooldownRemaining } from './hooks';\n\nexport const CooldownTimer = () => {\n const secondsLeft = useCooldownRemaining();\n\n return (\n <div className='str-chat__message-composer-cooldown' data-testid='cooldown-timer'>\n {secondsLeft}\n </div>\n );\n};\n","import { useTranslationContext } from '../../context/TranslationContext';\n\nexport const UploadIcon = () => {\n const { t } = useTranslationContext('UploadIcon');\n return (\n <svg\n data-testid='attach-icon'\n fill='none'\n height='24'\n viewBox='0 0 24 24'\n width='24'\n xmlns='http://www.w3.org/2000/svg'\n >\n <title>{t('Attach files')}</title>\n <g clipPath='url(#clip0_10878_5)'>\n <path\n d='M12.9997 6.99993L10.9997 6.99993L10.9997 10.9999L6.99972 10.9999L6.99972 12.9999L10.9997 12.9999L10.9997 16.9999L12.9997 16.9999L12.9997 12.9999L16.9997 12.9999L16.9997 10.9999L12.9997 10.9999L12.9997 6.99993ZM11.9997 1.99992C6.47972 1.99992 1.99972 6.47993 1.99972 11.9999C1.99972 17.5199 6.47972 21.9999 11.9997 21.9999C17.5197 21.9999 21.9997 17.5199 21.9997 11.9999C21.9997 6.47993 17.5197 1.99992 11.9997 1.99992ZM11.9997 19.9999C7.58972 19.9999 3.99972 16.4099 3.99972 11.9999C3.99972 7.58993 7.58972 3.99993 11.9997 3.99993C16.4097 3.99993 19.9997 7.58993 19.9997 11.9999C19.9997 16.4099 16.4097 19.9999 11.9997 19.9999Z'\n fill='black'\n />\n </g>\n <defs>\n <clipPath id='clip0_10878_5'>\n <rect fill='white' height='24' width='24' />\n </clipPath>\n </defs>\n </svg>\n );\n};\n\nexport const BinIcon = () => (\n <svg fill='currentColor' viewBox='0 0 32 32' xmlns='http://www.w3.org/2000/svg'>\n <path d='M8.00033 25.3333C8.00033 26.8 9.20033 28 10.667 28H21.3337C22.8003 28 24.0003 26.8 24.0003 25.3333V12C24.0003 10.5333 22.8003 9.33333 21.3337 9.33333H10.667C9.20033 9.33333 8.00033 10.5333 8.00033 12V25.3333ZM24.0003 5.33333H20.667L19.7203 4.38667C19.4803 4.14667 19.1337 4 18.787 4H13.2137C12.867 4 12.5203 4.14667 12.2803 4.38667L11.3337 5.33333H8.00033C7.26699 5.33333 6.66699 5.93333 6.66699 6.66667C6.66699 7.4 7.26699 8 8.00033 8H24.0003C24.7337 8 25.3337 7.4 25.3337 6.66667C25.3337 5.93333 24.7337 5.33333 24.0003 5.33333Z' />\n </svg>\n);\n\nexport const PauseIcon = () => (\n <svg\n data-testid='str-chat__pause-icon'\n fill='currentColor'\n viewBox='0 0 16 20'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M0 19.3333H5.33333V0.666626H0V19.3333ZM10.6667 0.666626V19.3333H16V0.666626H10.6667Z' />\n </svg>\n);\n\nexport const PlayIcon = () => (\n <svg\n data-testid='str-chat__play-icon'\n fill='currentColor'\n viewBox='0 0 14 18'\n xmlns='http://www.w3.org/2000/svg'\n >\n <path d='M0.236328 2.09338V15.9067C0.236328 16.9601 1.39633 17.6001 2.28966 17.0267L13.143 10.1201C13.9697 9.60005 13.9697 8.40005 13.143 7.86672L2.28966 0.973385C1.39633 0.400051 0.236328 1.04005 0.236328 2.09338Z' />\n </svg>\n);\n\nexport const CheckSignIcon = () => (\n <svg fill='currentColor' viewBox='0 0 18 14' xmlns='http://www.w3.org/2000/svg'>\n <path d='M5.79457 10.875L2.32457 7.40502C1.93457 7.01502 1.30457 7.01502 0.91457 7.40502C0.52457 7.79502 0.52457 8.42502 0.91457 8.81502L5.09457 12.995C5.48457 13.385 6.11457 13.385 6.50457 12.995L17.0846 2.41502C17.4746 2.02502 17.4746 1.39502 17.0846 1.00502C16.6946 0.615024 16.0646 0.615024 15.6746 1.00502L5.79457 10.875Z' />\n </svg>\n);\n","import clsx from 'clsx';\nimport React, { useState } from 'react';\nimport type { LinkPreview, LinkPreviewsManagerState } from 'stream-chat';\nimport { LinkPreviewsManager } from 'stream-chat';\nimport { useStateStore } from '../../store';\nimport { PopperTooltip } from '../Tooltip';\nimport { useEnterLeaveHandlers } from '../Tooltip/hooks';\nimport { useMessageComposerController } from './hooks';\nimport { BaseImage } from '../BaseImage';\nimport { RemoveAttachmentPreviewButton } from './RemoveAttachmentPreviewButton';\nimport { useComponentContextIcons } from '../../context';\n\nexport type LinkPreviewListProps = {\n displayLinkCount?: number;\n};\n\nconst linkPreviewsManagerStateSelector = (state: LinkPreviewsManagerState) => ({\n linkPreviews: Array.from(state.previews.values()).filter(\n (preview) =>\n LinkPreviewsManager.previewIsLoaded(preview) ||\n LinkPreviewsManager.previewIsLoading(preview),\n ),\n});\n\nexport const LinkPreviewList = ({ displayLinkCount = 1 }: LinkPreviewListProps) => {\n const messageComposer = useMessageComposerController();\n const { linkPreviewsManager } = messageComposer;\n const { linkPreviews } = useStateStore(\n linkPreviewsManager.state,\n linkPreviewsManagerStateSelector,\n );\n\n if (linkPreviews.length === 0) return null;\n\n return (\n <div className='str-chat__link-preview-list'>\n {linkPreviews.slice(0, displayLinkCount).map((linkPreview) => (\n <LinkPreviewCard key={linkPreview.og_scrape_url} linkPreview={linkPreview} />\n ))}\n </div>\n );\n};\n\ntype LinkPreviewProps = {\n linkPreview: LinkPreview;\n};\n\nexport const LinkPreviewCard = ({ linkPreview }: LinkPreviewProps) => {\n const { IconLink } = useComponentContextIcons();\n const { linkPreviewsManager } = useMessageComposerController();\n const { handleEnter, handleLeave, tooltipVisible } =\n useEnterLeaveHandlers<HTMLDivElement>();\n const [referenceElement, setReferenceElement] = useState<HTMLDivElement | null>(null);\n const { image_url, thumb_url, title, title_link } = linkPreview;\n\n if (\n !LinkPreviewsManager.previewIsLoaded(linkPreview) &&\n !LinkPreviewsManager.previewIsLoading(linkPreview)\n )\n return null;\n\n const previewImageSrc = title_link || image_url || thumb_url;\n return (\n <div\n className={clsx('str-chat__link-preview-card', {\n 'str-chat__link-preview-card--loading':\n LinkPreviewsManager.previewIsLoading(linkPreview),\n })}\n data-testid='link-preview-card'\n onMouseEnter={handleEnter}\n onMouseLeave={handleLeave}\n ref={setReferenceElement}\n >\n <PopperTooltip\n offset={[0, 5]}\n referenceElement={referenceElement}\n visible={tooltipVisible}\n >\n {linkPreview.og_scrape_url}\n </PopperTooltip>\n\n {previewImageSrc && (\n <BaseImage\n alt={title}\n className='str-chat__attachment-preview__thumbnail'\n src={previewImageSrc}\n title={title}\n />\n )}\n <div className='str-chat__link-preview-card__content'>\n <div className='str-chat__link-preview-card__content-title'>\n {linkPreview.title}\n </div>\n <div className='str-chat__link-preview-card__content-description'>\n {linkPreview.text}\n </div>\n <div className='str-chat__link-preview-card__content__url'>\n <IconLink />\n <span>{linkPreview.og_scrape_url}</span>\n </div>\n </div>\n\n <RemoveAttachmentPreviewButton\n className='str-chat__link-preview-card__dismiss-button'\n data-testid='link-preview-card-dismiss-btn'\n onClick={() => linkPreviewsManager.dismissPreview(linkPreview.og_scrape_url)}\n />\n </div>\n );\n};\n","import React from 'react';\nimport { useTranslationContext } from '../../context';\nimport type { RecordingPermission } from './classes/BrowserPermission';\n\nexport type RecordingPermissionDeniedNotificationProps = {\n permissionName: RecordingPermission;\n};\n\nexport const RecordingPermissionDeniedNotification = ({\n permissionName,\n}: RecordingPermissionDeniedNotificationProps) => {\n const { t } = useTranslationContext();\n const permissionTranslations = {\n body: {\n camera: t('To start recording, allow the camera access in your browser'),\n microphone: t('To start recording, allow the microphone access in your browser'),\n },\n heading: {\n camera: t('Allow access to camera'),\n microphone: t('Allow access to microphone'),\n },\n };\n\n return (\n <div className='str-chat__recording-permission-denied-notification'>\n <div className='str-chat__recording-permission-denied-notification__heading'>\n {permissionTranslations.heading[permissionName]}\n </div>\n <p className='str-chat__recording-permission-denied-notification__message'>\n {permissionTranslations.body[permissionName]}\n </p>\n </div>\n );\n};\n","import React, { useEffect } from 'react';\nimport { DurationDisplay, WaveProgressBar } from '../../AudioPlayback';\nimport type { AudioPlayerState } from '../../AudioPlayback/AudioPlayer';\nimport { useAudioPlayer } from '../../AudioPlayback/WithAudioPlayback';\nimport { useStateStore } from '../../../store';\nimport { Button } from '../../Button';\nimport { useComponentContextIcons, useTranslationContext } from '../../../context';\nimport clsx from 'clsx';\n\nconst audioPlayerStateSelector = (state: AudioPlayerState) => ({\n isPlaying: state.isPlaying,\n progress: state.progressPercent,\n secondsElapsed: state.secondsElapsed,\n});\n\nexport type AudioRecordingPlayerProps = {\n durationSeconds: number;\n mimeType?: string;\n src?: string;\n waveformData?: number[];\n};\n\nexport const AudioRecordingPlayback = ({\n durationSeconds,\n mimeType,\n src,\n waveformData,\n}: AudioRecordingPlayerProps) => {\n const { IconPauseFill, IconPlayFill } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const audioPlayer = useAudioPlayer({\n durationSeconds,\n mimeType,\n src,\n waveformData,\n });\n\n const { isPlaying, progress, secondsElapsed } =\n useStateStore(audioPlayer?.state, audioPlayerStateSelector) ?? {};\n\n const displayedDuration = secondsElapsed || durationSeconds;\n\n useEffect(() => {\n audioPlayer?.cancelScheduledRemoval();\n return () => {\n audioPlayer?.scheduleRemoval();\n };\n }, [audioPlayer]);\n\n if (!audioPlayer) return null;\n\n return (\n <div\n className={clsx('str-chat__audio-recorder__recording-playback', {\n 'str-chat__audio-recorder__recording-playback--isPlaying': isPlaying,\n })}\n >\n <Button\n appearance='ghost'\n aria-label={isPlaying ? t('aria/Pause') : t('aria/Play')}\n circular\n className='str-chat__audio_recorder__toggle-playback-button'\n data-testid='audio-recording-preview-toggle-play-btn'\n onClick={audioPlayer.togglePlay}\n size='sm'\n variant='secondary'\n >\n {isPlaying ? <IconPauseFill /> : <IconPlayFill />}\n </Button>\n <DurationDisplay\n className={clsx('str-chat__recording-timer', {\n 'str-chat__recording-timer--hours': displayedDuration >= 3600,\n })}\n duration={durationSeconds}\n isPlaying={!!isPlaying}\n secondsElapsed={secondsElapsed}\n />\n <div className='str-chat__wave-progress-bar__track-container'>\n <WaveProgressBar\n durationSeconds={durationSeconds}\n progress={progress}\n secondsElapsed={secondsElapsed}\n seek={audioPlayer.seek}\n waveformData={waveformData || []}\n />\n </div>\n </div>\n );\n};\n","import { useCallback, useEffect, useRef, useState } from 'react';\n\ntype UseTimeElapsedParams = {\n initialSeconds?: number;\n startOnMount?: boolean;\n};\n\n// todo: provide start timestamp\nexport const useTimeElapsed = ({\n initialSeconds = 0,\n startOnMount,\n}: UseTimeElapsedParams = {}) => {\n const [secondsElapsed, setSecondsElapsed] = useState<number>(initialSeconds);\n const updateInterval = useRef<ReturnType<typeof setInterval>>(undefined);\n\n const startCounter = useCallback(() => {\n if (updateInterval.current) return;\n updateInterval.current = setInterval(() => {\n setSecondsElapsed((prev) => prev + 1);\n }, 1000);\n }, []);\n\n const stopCounter = useCallback(() => {\n clearInterval(updateInterval.current);\n updateInterval.current = undefined;\n }, []);\n\n useEffect(() => {\n if (updateInterval.current) return;\n setSecondsElapsed(initialSeconds);\n }, [initialSeconds]);\n\n useEffect(() => {\n if (!startOnMount) return;\n startCounter();\n return () => {\n stopCounter();\n };\n }, [startCounter, startOnMount, stopCounter]);\n\n return {\n secondsElapsed,\n startCounter,\n stopCounter,\n };\n};\n","import clsx from 'clsx';\nimport { displayDuration } from '../../Attachment';\nimport React from 'react';\n\nexport type RecordingTimerProps = {\n durationSeconds: number;\n};\n\nexport const RecordingTimer = ({ durationSeconds }: RecordingTimerProps) => (\n <div\n className={clsx('str-chat__recording-timer', {\n 'str-chat__recording-timer--hours': durationSeconds >= 3600,\n })}\n >\n {displayDuration(durationSeconds)}\n </div>\n);\n","import React, { useEffect, useState } from 'react';\nimport { useTimeElapsed } from './hooks/useTimeElapsed';\nimport { useComponentContextIcons, useMessageComposerContext } from '../../../context';\nimport { RecordingTimer } from './RecordingTimer';\n\ntype WaveformProps = {\n maxDataPointsDrawn?: number;\n};\n\nconst AudioRecordingWaveform = ({ maxDataPointsDrawn = 200 }: WaveformProps) => {\n const {\n recordingController: { recorder },\n } = useMessageComposerContext();\n\n const [amplitudes, setAmplitudes] = useState<number[]>([]);\n\n useEffect(() => {\n if (!recorder?.amplitudeRecorder) return;\n const amplitudesSubscription =\n recorder.amplitudeRecorder.amplitudes.subscribe(setAmplitudes);\n return () => {\n amplitudesSubscription.unsubscribe();\n };\n }, [recorder]);\n\n if (!recorder) return null;\n\n return (\n <div className='str-chat__waveform-box-container'>\n <div className='str-chat__wave-progress-bar__track'>\n {amplitudes.slice(-maxDataPointsDrawn).map((amplitude, i) => (\n <div\n className='str-chat__wave-progress-bar__amplitude-bar'\n key={`amplitude-${i}-voice-recording`}\n style={\n {\n '--str-chat__wave-progress-bar__amplitude-bar-height': amplitude\n ? amplitude * 100 + '%'\n : '0%',\n } as React.CSSProperties\n }\n />\n ))}\n </div>\n </div>\n );\n};\nexport const AudioRecordingPreview = () => {\n const { IconVoice } = useComponentContextIcons();\n\n const {\n recordingController: { recorder },\n } = useMessageComposerContext();\n\n const initialSeconds = recorder?.durationMs ? recorder.durationMs / 1000 : 0;\n const { secondsElapsed, startCounter, stopCounter } = useTimeElapsed({\n initialSeconds,\n });\n\n useEffect(() => {\n if (!recorder?.mediaRecorder) return;\n const { mediaRecorder } = recorder;\n\n if (mediaRecorder.state === 'recording') {\n startCounter();\n }\n\n mediaRecorder.addEventListener('start', startCounter);\n mediaRecorder.addEventListener('resume', startCounter);\n mediaRecorder.addEventListener('stop', stopCounter);\n mediaRecorder.addEventListener('pause', stopCounter);\n\n return () => {\n mediaRecorder.removeEventListener('start', startCounter);\n mediaRecorder.removeEventListener('resume', startCounter);\n mediaRecorder.removeEventListener('stop', stopCounter);\n mediaRecorder.removeEventListener('pause', stopCounter);\n };\n }, [recorder, startCounter, stopCounter]);\n\n return (\n <div className='str-chat__audio-recorder__recording-preview'>\n <IconVoice />\n <RecordingTimer durationSeconds={secondsElapsed} />\n <AudioRecordingWaveform />\n </div>\n );\n};\n","import { MediaRecordingState } from '../classes';\n\nexport const isPaused = (recordingState?: MediaRecordingState) =>\n recordingState === MediaRecordingState.PAUSED;\nexport const isStopped = (recordingState?: MediaRecordingState) =>\n recordingState === MediaRecordingState.STOPPED;\nexport const isRecording = (recordingState?: MediaRecordingState) =>\n recordingState === MediaRecordingState.RECORDING;\n","import { CheckSignIcon } from '../../MessageComposer/icons';\nimport React from 'react';\nimport {\n useComponentContextIcons,\n useMessageComposerContext,\n useTranslationContext,\n} from '../../../context';\nimport { isRecording } from './recordingStateIdentity';\nimport { Button } from '../../Button';\nimport { useNotificationApi } from '../../Notifications';\nimport { UploadProgressIndicator } from '../../Loading/UploadProgressIndicator';\n\nconst ToggleRecordingButton = () => {\n const { IconPauseFill, IconVoice } = useComponentContextIcons();\n const { t } = useTranslationContext();\n const {\n recordingController: { recorder, recordingState },\n } = useMessageComposerContext();\n\n const recording = isRecording(recordingState);\n\n return (\n <Button\n appearance='outline'\n aria-label={recording ? t('aria/Pause recording') : t('aria/Resume recording')}\n circular\n className='str-chat__audio_recorder__toggle-recording-button'\n onClick={() => (recording ? recorder?.pause() : recorder?.resume())}\n size='sm'\n variant='secondary'\n >\n {recording ? <IconPauseFill /> : <IconVoice />}\n </Button>\n );\n};\n\nexport const AudioRecorderRecordingControls = () => {\n const { IconDelete } = useComponentContextIcons();\n\n const { addNotification } = useNotificationApi();\n const { t } = useTranslationContext();\n const {\n recordingController: { completeRecording, recorder, recording, recordingState },\n } = useMessageComposerContext();\n const isUploadingFile = recording?.localMetadata?.uploadState === 'uploading';\n const uploadProgress = recording?.localMetadata?.uploadProgress;\n\n if (!recorder) return null;\n\n return (\n <div className='str-chat__audio_recorder__recording-controls'>\n {!isRecording(recordingState) && (\n <Button\n appearance='ghost'\n aria-label={t('aria/Cancel recording')}\n circular\n className='str-chat__audio_recorder__cancel-button'\n data-testid={'cancel-recording-audio-button'}\n disabled={isUploadingFile}\n onClick={() => {\n recorder.cancel();\n addNotification({\n emitter: 'AudioRecorder',\n message: t('Voice message deleted'),\n severity: 'info',\n type: 'audioRecording:cancel:success',\n });\n }}\n size='sm'\n variant='secondary'\n >\n <IconDelete />\n </Button>\n )}\n <ToggleRecordingButton />\n <Button\n appearance='solid'\n aria-label={t('aria/Complete recording')}\n circular\n className='str-chat__audio_recorder__stop-button'\n data-testid='audio-recorder-stop-button'\n onClick={completeRecording}\n size='sm'\n variant='primary'\n >\n {isUploadingFile ? (\n <UploadProgressIndicator uploadProgress={uploadProgress} />\n ) : (\n <CheckSignIcon />\n )}\n </Button>\n </div>\n );\n};\n","import React, { useMemo } from 'react';\nimport { AudioRecordingPlayback } from './AudioRecordingPlayback';\nimport { AudioRecordingPreview } from './AudioRecordingPreview';\nimport { MediaRecordingState } from '../classes';\nimport { useMessageComposerContext } from '../../../context/MessageComposerContext';\nimport { AudioRecorderRecordingControls } from './AudioRecorderRecordingControls';\nimport { isStopped } from './recordingStateIdentity';\n\nexport const AudioRecorder = () => {\n const {\n recordingController: { recorder, recording, recordingState },\n } = useMessageComposerContext();\n\n const state = useMemo(\n () => ({\n paused: recordingState === MediaRecordingState.PAUSED,\n recording: recordingState === MediaRecordingState.RECORDING,\n stopped: recordingState === MediaRecordingState.STOPPED,\n }),\n [recordingState],\n );\n\n if (!recorder) return null;\n\n return (\n <div className='str-chat__audio_recorder' data-testid={'audio-recorder'}>\n {(isStopped(recordingState) || state.paused) && recording?.asset_url ? (\n <AudioRecordingPlayback\n durationSeconds={recording.duration ?? 0}\n mimeType={recording.mime_type}\n src={recording.asset_url}\n waveformData={recording.waveform_data}\n />\n ) : state.recording ? (\n <AudioRecordingPreview />\n ) : null}\n\n <AudioRecorderRecordingControls />\n </div>\n );\n};\n","import { RecordingAttachmentType, RecordingPermission } from '../classes';\nimport { RecordingPermissionDeniedNotification as DefaultRecordingPermissionDeniedNotification } from '../RecordingPermissionDeniedNotification';\nimport React, { forwardRef, useRef } from 'react';\nimport { useAttachmentManagerState } from '../../MessageComposer/hooks/useAttachmentManagerState';\nimport {\n useComponentContext,\n useComponentContextIcons,\n useMessageComposerContext,\n useTranslationContext,\n} from '../../../context';\nimport { Callout, useDialogOnNearestManager } from '../../Dialog';\nimport { Button } from '../../Button';\n\nconst dialogId = 'recording-permission-denied-notification';\n\nexport const AudioRecordingButtonWithNotification = () => {\n const {\n RecordingPermissionDeniedNotification = DefaultRecordingPermissionDeniedNotification,\n StartRecordingAudioButton = DefaultStartRecordingAudioButton,\n } = useComponentContext();\n const { asyncMessagesMultiSendEnabled, recordingController } =\n useMessageComposerContext();\n const { attachments } = useAttachmentManagerState();\n\n const { dialog, dialogManager } = useDialogOnNearestManager({ id: dialogId });\n\n const audioRecordingBtnRef = useRef<HTMLButtonElement | null>(null);\n const isRecording = !!recordingController.recordingState;\n\n return (\n <>\n <StartRecordingAudioButton\n disabled={\n isRecording ||\n (!asyncMessagesMultiSendEnabled &&\n attachments.some((a) => a.type === RecordingAttachmentType.VOICE_RECORDING))\n }\n onClick={() => {\n recordingController.recorder?.start();\n\n const recordingEnabled = !!(\n recordingController.recorder && navigator.mediaDevices\n );\n\n const shouldShowNotification =\n recordingEnabled && recordingController.permissionState === 'denied';\n if (shouldShowNotification) dialog.open();\n }}\n ref={audioRecordingBtnRef}\n />\n <Callout\n className='str-chat__recording-permission-denied-notification'\n dialogManagerId={dialogManager?.id}\n id={dialogId}\n onClose={dialog.close}\n placement={'top-start'}\n referenceElement={audioRecordingBtnRef.current}\n >\n <RecordingPermissionDeniedNotification permissionName={RecordingPermission.MIC} />\n </Callout>\n </>\n );\n};\n\nexport type StartRecordingAudioButtonProps = React.ComponentProps<'button'>;\n\nexport const DefaultStartRecordingAudioButton = forwardRef<\n HTMLButtonElement,\n StartRecordingAudioButtonProps\n>(function StartRecordingAudioButton(props, ref) {\n const { t } = useTranslationContext();\n const { IconVoice } = useComponentContextIcons();\n\n return (\n <Button\n appearance='ghost'\n aria-label={t('aria/Start recording audio')}\n circular\n className='str-chat__start-recording-audio-button'\n data-testid='start-recording-audio-button'\n size='sm'\n variant='secondary'\n {...props}\n ref={ref}\n >\n <IconVoice />\n </Button>\n );\n});\n","import React from 'react';\nimport { QuotedMessagePreviewUI } from './QuotedMessagePreview';\nimport type { LocalMessage } from 'stream-chat';\nimport { useTranslationContext } from '../../context';\n\nexport type EditedMessagePreviewProps = {\n message: LocalMessage;\n onCancel: () => void;\n};\n\nexport const EditedMessagePreview = ({\n message,\n onCancel,\n}: EditedMessagePreviewProps) => {\n const { t } = useTranslationContext();\n\n return (\n <QuotedMessagePreviewUI\n authorLabel={t('Edit Message')}\n onRemove={onCancel}\n quotedMessage={message}\n />\n );\n};\n","import clsx from 'clsx';\nimport React from 'react';\nimport { useMessageComposerController } from './hooks';\nimport type { MessageComposerState } from 'stream-chat';\nimport { useStateStore } from '../../store';\nimport { useComponentContextIcons, useTranslationContext } from '../../context';\n\nconst stateSelector = (state: MessageComposerState) => ({\n showReplyInChannel: state.showReplyInChannel,\n});\n\nexport const SendToChannelCheckbox = () => {\n const { IconCheckmark } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const messageComposer = useMessageComposerController();\n const { showReplyInChannel } = useStateStore(messageComposer.state, stateSelector);\n\n if (messageComposer.editedMessage || !messageComposer.threadId) return null;\n\n const labelText =\n Object.keys(messageComposer.channel.state.members).length === 2\n ? t('Also send as a direct message')\n : t('Also send in channel');\n\n return (\n <div\n className={clsx('str-chat__send-to-channel-checkbox__container', {\n 'str-chat__send-to-channel-checkbox__container--checked': showReplyInChannel,\n })}\n data-testid='send-to-channel-checkbox'\n >\n <label\n className='str-chat__send-to-channel-checkbox__field'\n htmlFor='send-to-channel-checkbox'\n >\n <input\n aria-checked={showReplyInChannel}\n checked={showReplyInChannel}\n className='str-chat__send-to-channel-checkbox__input'\n id='send-to-channel-checkbox'\n onChange={() => messageComposer.toggleShowReplyInChannel()}\n type='checkbox'\n />\n <span aria-hidden className='str-chat__send-to-channel-checkbox__visual'>\n <span className='str-chat__send-to-channel-checkbox__checkmark'>\n <IconCheckmark />\n </span>\n </span>\n <span className='str-chat__send-to-channel-checkbox__label'>{labelText}</span>\n </label>\n </div>\n );\n};\n","import type { ComponentProps, PropsWithChildren } from 'react';\nimport React from 'react';\nimport type { CommandResponse, MessageComposerState } from 'stream-chat';\nimport { CommandContextMenuItem } from '../../MessageComposer/AttachmentSelector/CommandsMenu';\nimport { useStateStore } from '../../../store';\nimport { useMessageComposerController } from '../../MessageComposer/hooks';\n\nexport type CommandItemProps = {\n entity: CommandResponse;\n enabled?: boolean;\n focused?: boolean;\n} & ComponentProps<'button'>;\n\nconst messageComposerStateSelector = ({\n editedMessage,\n quotedMessage,\n}: MessageComposerState) => ({\n editedMessage,\n quotedMessage,\n});\n\nexport const CommandItem = (props: PropsWithChildren<CommandItemProps>) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { enabled, entity, focused: _, ...buttonProps } = props;\n const messageComposer = useMessageComposerController();\n useStateStore(messageComposer.state, messageComposerStateSelector);\n\n if (!entity.name) return null;\n\n const resolvedEnabled =\n enabled ??\n !messageComposer.isCommandDisabled(entity as CommandResponse & { name: string });\n\n return (\n <CommandContextMenuItem\n {...buttonProps}\n command={entity as CommandResponse & { name: string }}\n enabled={resolvedEnabled}\n />\n );\n};\n","import clsx from 'clsx';\nimport type { ComponentProps } from 'react';\nimport React from 'react';\nimport { EmojiContextMenuButton } from '../../Dialog';\n\nexport type EmoticonItemProps = {\n entity: {\n /** Name for emoticon */\n name: string;\n /** Native value or actual emoticon */\n native: string;\n /** The parts of the Name property of the entity (or id if no name) that can be matched to the user input value.\n * Default is bold for matches, but can be overwritten in css.\n * */\n tokenizedDisplayName: { token: string; parts: string[] };\n };\n focused?: boolean;\n} & ComponentProps<'button'>;\n\nexport const EmoticonItem = (props: EmoticonItemProps) => {\n // eslint-disable-next-line @typescript-eslint/no-unused-vars\n const { className, entity, focused: _, ...buttonProps } = props;\n const hasEntity = Object.keys(entity).length;\n if (!hasEntity) return null;\n\n const { parts, token } = entity.tokenizedDisplayName ?? ({} as EmoticonItemProps);\n\n return (\n <EmojiContextMenuButton\n {...buttonProps}\n className={clsx('str-chat__emoji-item', className)}\n emoji={entity.native}\n >\n {parts?.map((part, i) =>\n part.toLowerCase() === token ? (\n <span className='str-chat__emoji-item--highlight' key={`part-${i}`}>\n {part}\n </span>\n ) : (\n <span className='str-chat__emoji-item--part' key={`part-${i}`}>\n {part}\n </span>\n ),\n ) ?? null}\n </EmojiContextMenuButton>\n );\n};\n","import type { ReactNode } from 'react';\n\nexport type MentionSuggestionTitleProps = {\n children: ReactNode;\n};\n\nexport const MentionSuggestionTitle = ({ children }: MentionSuggestionTitleProps) => (\n <>@{children}</>\n);\n","import clsx from 'clsx';\nimport React from 'react';\nimport type { ChannelMentionSuggestion, HereMentionSuggestion } from 'stream-chat';\nimport { ListItemLayout } from '../../../ListItemLayout';\nimport { useComponentContextIcons, useTranslationContext } from '../../../../context';\nimport { MentionSuggestionTitle } from './MentionSuggestionTitle';\nimport type { MentionItemComponentProps } from './types';\n\nexport type BroadcastMentionItemProps = MentionItemComponentProps<\n ChannelMentionSuggestion | HereMentionSuggestion\n>;\n\nexport const BroadcastMentionItem = ({\n entity,\n focused,\n ...buttonProps\n}: BroadcastMentionItemProps) => {\n const { IconMegaphone } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const description =\n entity.mentionType === 'channel'\n ? t('mention/Channel Description')\n : t('mention/Here Description');\n\n return (\n <ListItemLayout\n contentClassName='str-chat__suggestion-list__item-content'\n description={description}\n descriptionClassName='str-chat__suggestion-list__item-details'\n LeadingIcon={IconMegaphone}\n RootElement='button'\n rootProps={{\n ...buttonProps,\n className: clsx(\n 'str-chat__context-menu__button',\n buttonProps.className,\n 'str-chat__suggestion-list__mention',\n ),\n role: buttonProps.role ?? 'menuitem',\n title: `@${entity.name}`,\n }}\n selected={focused}\n title={<MentionSuggestionTitle>{entity.name}</MentionSuggestionTitle>}\n titleClassName='str-chat__suggestion-list__item-title str-chat__suggestion-list__mention-item-title'\n />\n );\n};\n","import clsx from 'clsx';\nimport React from 'react';\n\nexport type TokenizedSuggestionDisplayName = {\n token: string;\n parts: string[];\n};\n\nexport type TokenizedSuggestionPartsProps = {\n tokenizedDisplayName: TokenizedSuggestionDisplayName;\n};\n\nconst HTML_SPACE = '\\u00A0';\n\nconst isWhitespace = (char: string) => char.trim() === '';\n\nconst replaceBoundaryWhitespaceWithHTMLSpace = (part: string) => {\n if (!part) return part;\n\n let startIndex = 0;\n while (startIndex < part.length && isWhitespace(part[startIndex])) {\n startIndex += 1;\n }\n\n if (startIndex === part.length) return HTML_SPACE;\n\n let endIndex = part.length - 1;\n while (endIndex >= startIndex && isWhitespace(part[endIndex])) {\n endIndex -= 1;\n }\n\n return `${startIndex > 0 ? HTML_SPACE : ''}${part.slice(startIndex, endIndex + 1)}${\n endIndex < part.length - 1 ? HTML_SPACE : ''\n }`;\n};\n\nexport const TokenizedSuggestionParts = ({\n tokenizedDisplayName,\n}: TokenizedSuggestionPartsProps) =>\n tokenizedDisplayName.parts.map((part, i) => {\n const matches = part.toLowerCase() === tokenizedDisplayName.token;\n const partWithHTMLSpacesAround = replaceBoundaryWhitespaceWithHTMLSpace(part);\n\n return (\n <span\n className={clsx({\n 'str-chat__emoji-item-part': !matches,\n 'str-chat__suggestion-item-part--match': matches,\n })}\n key={`part-${i}`}\n >\n {partWithHTMLSpacesAround}\n </span>\n );\n });\n","import clsx from 'clsx';\nimport React from 'react';\nimport type { RoleMentionSuggestion } from 'stream-chat';\nimport { ListItemLayout } from '../../../ListItemLayout';\nimport { useComponentContextIcons, useTranslationContext } from '../../../../context';\nimport { MentionSuggestionTitle } from './MentionSuggestionTitle';\nimport type { MentionItemComponentProps } from './types';\nimport { TokenizedSuggestionParts } from '../TokenizedSuggestionParts';\n\nexport type RoleItemProps = MentionItemComponentProps<RoleMentionSuggestion>;\n\nexport const RoleItem = ({ entity, focused, ...buttonProps }: RoleItemProps) => {\n const { IconShield } = useComponentContextIcons();\n\n void focused;\n const { t } = useTranslationContext();\n const role = entity.name;\n\n return (\n <ListItemLayout\n contentClassName='str-chat__suggestion-list__item-content'\n LeadingIcon={IconShield}\n RootElement='button'\n rootProps={{\n ...buttonProps,\n className: clsx(\n 'str-chat__context-menu__button',\n buttonProps.className,\n 'str-chat__suggestion-list__mention',\n ),\n role: buttonProps.role ?? 'menuitem',\n title: `@${role}`,\n }}\n selected={focused}\n subtitle={t('Notify all {{ role }} members', { role })}\n subtitleClassName='str-chat__suggestion-list__item-details'\n title={\n <MentionSuggestionTitle>\n <TokenizedSuggestionParts tokenizedDisplayName={entity.tokenizedDisplayName} />\n </MentionSuggestionTitle>\n }\n titleClassName='str-chat__suggestion-list__item-title str-chat__suggestion-list__mention-item-title'\n />\n );\n};\n","import type { MentionItemComponentProps } from './types';\n\ntype MinimalMentionEntity = {\n id: string;\n mentionType: string;\n name?: string;\n};\n\nexport type SpecialMentionItemProps = MentionItemComponentProps<MinimalMentionEntity>;\n\nexport const SpecialMentionItem = () => null;\n","import clsx from 'clsx';\nimport React from 'react';\nimport type { UserGroupMentionSuggestion } from 'stream-chat';\nimport { useComponentContextIcons } from '../../../../context';\nimport { ListItemLayout } from '../../../ListItemLayout';\nimport { MentionSuggestionTitle } from './MentionSuggestionTitle';\nimport type { MentionItemComponentProps } from './types';\nimport { TokenizedSuggestionParts } from '../TokenizedSuggestionParts';\n\nexport type UserGroupItemProps = MentionItemComponentProps<UserGroupMentionSuggestion>;\n\nexport const UserGroupItem = ({\n entity,\n focused,\n ...buttonProps\n}: UserGroupItemProps) => {\n const { IconUsers } = useComponentContextIcons();\n\n void focused;\n\n return (\n <ListItemLayout\n contentClassName='str-chat__suggestion-list__item-content'\n LeadingIcon={IconUsers}\n RootElement='button'\n rootProps={{\n ...buttonProps,\n className: clsx(\n 'str-chat__context-menu__button',\n buttonProps.className,\n 'str-chat__suggestion-list__mention',\n ),\n role: buttonProps.role ?? 'menuitem',\n title: `@${entity.name}`,\n }}\n selected={focused}\n subtitle={entity.description}\n subtitleClassName='str-chat__suggestion-list__item-details'\n title={\n <MentionSuggestionTitle>\n <TokenizedSuggestionParts tokenizedDisplayName={entity.tokenizedDisplayName} />\n </MentionSuggestionTitle>\n }\n titleClassName='str-chat__suggestion-list__item-title str-chat__suggestion-list__mention-item-title'\n />\n );\n};\n","import clsx from 'clsx';\nimport React, { useMemo } from 'react';\nimport type { UserSuggestion } from 'stream-chat';\nimport { Avatar as DefaultAvatar } from '../../../Avatar';\nimport { extractDisplayInfo as defaultExtractDisplayInfo } from '../../../Avatar/utils';\nimport { ListItemLayout } from '../../../ListItemLayout';\nimport { useComponentContext } from '../../../../context';\nimport type { MentionItemComponentProps } from './types';\nimport {\n type TokenizedSuggestionDisplayName,\n TokenizedSuggestionParts,\n} from '../TokenizedSuggestionParts';\n\ntype LegacyUserSuggestionEntity = {\n tokenizedDisplayName: TokenizedSuggestionDisplayName;\n id?: string;\n image?: string;\n mentionType?: 'user';\n name?: string;\n};\n\nexport type UserItemProps = MentionItemComponentProps<\n LegacyUserSuggestionEntity | UserSuggestion\n>;\n\n/**\n * UI component for mentions rendered in suggestion list\n */\nexport const UserItem = ({ entity, focused, ...buttonProps }: UserItemProps) => {\n const { Avatar = DefaultAvatar, extractDisplayInfo = defaultExtractDisplayInfo } =\n useComponentContext();\n const hasEntity = !!Object.keys(entity).length;\n\n const titleAttribute = entity.name || entity.id || '';\n const LeadingSlot = useMemo(() => {\n const displayInfo = extractDisplayInfo({ user: entity });\n\n return function UserItemAvatar() {\n // Decorative: the option's accessible name already carries the user's name (title +\n // tokenized display name), so the avatar's fallback initials/role would only add noise.\n return <Avatar {...displayInfo} aria-hidden size='md' />;\n };\n }, [Avatar, entity, extractDisplayInfo]);\n\n if (!hasEntity) return null;\n\n return (\n <ListItemLayout\n contentClassName='str-chat__context-menu__button__label'\n LeadingSlot={LeadingSlot}\n RootElement='button'\n rootProps={{\n ...buttonProps,\n className: clsx(\n 'str-chat__context-menu__button',\n 'str-chat__user-context-menu__button',\n buttonProps.className,\n 'str-chat__suggestion-list__mention',\n ),\n role: buttonProps.role ?? 'menuitem',\n title: titleAttribute,\n }}\n selected={focused}\n title={\n <TokenizedSuggestionParts tokenizedDisplayName={entity.tokenizedDisplayName} />\n }\n titleClassName='str-chat__suggestion-list__mention-item-title'\n />\n );\n};\n","import React from 'react';\nimport type { MentionSuggestion } from 'stream-chat';\nimport {\n type BroadcastMentionItemProps,\n BroadcastMentionItem as DefaultBroadcastMentionItem,\n} from './BroadcastMentionItem';\nimport { RoleItem as DefaultRoleItem, type RoleItemProps } from './RoleItem';\nimport {\n SpecialMentionItem as DefaultSpecialMentionItem,\n type SpecialMentionItemProps,\n} from './SpecialMentionItem';\nimport {\n UserGroupItem as DefaultUserGroupItem,\n type UserGroupItemProps,\n} from './UserGroupItem';\nimport { UserItem as DefaultUserItem, type UserItemProps } from './UserItem';\nimport type { MentionItemComponentProps } from './types';\n\nexport type MentionItemProps = MentionItemComponentProps<MentionSuggestion> & {\n BroadcastMentionItem?: React.ComponentType<BroadcastMentionItemProps>;\n RoleItem?: React.ComponentType<RoleItemProps>;\n SpecialMentionItem?: React.ComponentType<SpecialMentionItemProps>;\n UserGroupItem?: React.ComponentType<UserGroupItemProps>;\n UserItem?: React.ComponentType<UserItemProps>;\n};\n\nexport const MentionItem = ({\n BroadcastMentionItem = DefaultBroadcastMentionItem,\n entity,\n focused,\n RoleItem = DefaultRoleItem,\n SpecialMentionItem = DefaultSpecialMentionItem,\n UserGroupItem = DefaultUserGroupItem,\n UserItem = DefaultUserItem,\n ...buttonProps\n}: MentionItemProps) => {\n if (entity.mentionType === 'user') {\n return <UserItem {...buttonProps} entity={entity} focused={focused} />;\n }\n\n if (entity.mentionType === 'role') {\n return <RoleItem {...buttonProps} entity={entity} focused={focused} />;\n }\n\n if (entity.mentionType === 'user_group') {\n return <UserGroupItem {...buttonProps} entity={entity} focused={focused} />;\n }\n\n if (entity.mentionType === 'channel' || entity.mentionType === 'here') {\n return <BroadcastMentionItem {...buttonProps} entity={entity} focused={focused} />;\n }\n\n return <SpecialMentionItem {...buttonProps} entity={entity} focused={focused} />;\n};\n","import clsx from 'clsx';\nimport { type ComponentProps, useRef } from 'react';\nimport React, { useCallback, useLayoutEffect } from 'react';\nimport { useMessageComposerController } from '../../MessageComposer/hooks/useMessageComposerController';\nimport type { TextComposerSuggestion } from 'stream-chat';\nimport type { CommandItemProps } from './CommandItem';\nimport type { EmoticonItemProps } from './EmoticonItem';\nimport type { MentionItemProps } from './MentionItem';\nimport { useMessageComposerContext } from '../../../context';\n\nexport type DefaultSuggestionListItemEntity =\n | MentionItemProps['entity']\n | CommandItemProps['entity']\n | EmoticonItemProps['entity'];\n\nexport type SuggestionListItemComponentProps = {\n entity: DefaultSuggestionListItemEntity | unknown;\n focused: boolean;\n} & ComponentProps<'button'>;\n\nexport type SuggestionItemProps = ComponentProps<'button'> & {\n component: React.ComponentType<SuggestionListItemComponentProps>;\n item: TextComposerSuggestion;\n focused: boolean;\n};\n\nexport const SuggestionListItem = ({\n className,\n component: Component,\n focused,\n item,\n onClick,\n onKeyDown,\n onMouseEnter,\n ...restProps\n}: SuggestionItemProps) => {\n const { textComposer } = useMessageComposerController();\n const { textareaRef } = useMessageComposerContext();\n const componentRef = useRef<HTMLButtonElement | null>(null);\n\n const handleSelect = useCallback(() => {\n textComposer.handleSelect(item);\n textareaRef.current?.focus();\n }, [item, textareaRef, textComposer]);\n\n useLayoutEffect(() => {\n if (!focused) return;\n componentRef.current?.scrollIntoView({ behavior: 'instant', block: 'nearest' });\n }, [focused]);\n\n return (\n <Component\n {...restProps}\n className={clsx('str-chat__suggestion-list-item', className, {\n 'str-chat__suggestion-list-item--selected': focused,\n })}\n entity={item}\n focused={focused}\n onClick={(e) => {\n handleSelect();\n onClick?.(e);\n }}\n onKeyDown={(event) => {\n if (event.key === 'Enter') handleSelect();\n onKeyDown?.(event);\n }}\n onMouseEnter={onMouseEnter}\n ref={componentRef}\n />\n );\n};\n","const CARET_MIRROR_CLASS = 'str-chat__textarea-caret-mirror';\nconst CARET_MARKER_CLASS = 'str-chat__textarea-caret-marker';\n\nexport type TextareaCaretRect = DOMRect | null;\n\n/**\n * Returns the caret rectangle for a textarea using a mirror-measure hack.\n * It clones computed styles and content into a hidden element to infer the\n * caret position because textarea doesn't expose caret geometry.\n */\n\nexport const getTextareaCaretRect = (\n textarea: HTMLTextAreaElement | null,\n selectionEnd?: number,\n): TextareaCaretRect => {\n if (!textarea || typeof window === 'undefined') return null;\n\n const caretIndex = Math.max(0, selectionEnd ?? textarea.selectionEnd ?? 0);\n const value = textarea.value ?? '';\n const valueBeforeCaret = value.slice(0, caretIndex);\n const valueAfterCaret = value.slice(caretIndex);\n\n const computedStyle = window.getComputedStyle(textarea);\n const mirror = document.createElement('div');\n mirror.className = CARET_MIRROR_CLASS;\n mirror.style.position = 'absolute';\n mirror.style.visibility = 'hidden';\n mirror.style.top = '0';\n mirror.style.left = '-9999px';\n mirror.style.whiteSpace = 'pre-wrap';\n mirror.style.wordWrap = 'break-word';\n\n for (const property of computedStyle) {\n mirror.style.setProperty(property, computedStyle.getPropertyValue(property));\n }\n\n mirror.textContent = valueBeforeCaret;\n\n const caretMarker = document.createElement('span');\n caretMarker.className = CARET_MARKER_CLASS;\n caretMarker.textContent = valueAfterCaret.length ? valueAfterCaret : '.';\n mirror.appendChild(caretMarker);\n\n document.body.appendChild(mirror);\n mirror.scrollTop = textarea.scrollTop;\n mirror.scrollLeft = textarea.scrollLeft;\n\n const textareaRect = textarea.getBoundingClientRect();\n const mirrorRect = mirror.getBoundingClientRect();\n const caretRect = caretMarker.getBoundingClientRect();\n\n document.body.removeChild(mirror);\n\n const left = textareaRect.left + (caretRect.left - mirrorRect.left);\n const top = textareaRect.top + (caretRect.top - mirrorRect.top);\n const height = caretRect.height || parseFloat(computedStyle.lineHeight) || 0;\n\n return new DOMRect(left, top, 0, height);\n};\n","import clsx from 'clsx';\nimport React, {\n useCallback,\n useEffect,\n useLayoutEffect,\n useMemo,\n useRef,\n useState,\n} from 'react';\nimport type { VirtualElement } from '@floating-ui/react';\nimport type { CommandItemProps } from './CommandItem';\nimport { CommandItem } from './CommandItem';\nimport type { EmoticonItemProps } from './EmoticonItem';\nimport { EmoticonItem } from './EmoticonItem';\nimport { MentionItem } from './MentionItem';\nimport type { SuggestionListItemComponentProps } from './SuggestionListItem';\nimport { SuggestionListItem as DefaultSuggestionListItem } from './SuggestionListItem';\nimport { useInteractionAnnouncements } from '../../Accessibility';\nimport { useComponentContext } from '../../../context/ComponentContext';\nimport { useMessageComposerContext } from '../../../context/MessageComposerContext';\nimport { useStateStore } from '../../../store';\nimport { useStableId } from '../../UtilityComponents/useStableId';\nimport { getTextareaCaretRect } from '../../../utils/getTextareaCaretRect';\nimport type { ContextMenuItemComponent, ContextMenuItemProps } from '../../Dialog';\nimport { ContextMenu } from '../../Dialog';\nimport { usePopoverPosition } from '../../Dialog/hooks/usePopoverPosition';\nimport { InfiniteScrollPaginator } from '../../InfiniteScrollPaginator/InfiniteScrollPaginator';\nimport {\n useMessageComposerCommands,\n useMessageComposerController,\n} from '../../MessageComposer/hooks';\nimport { useTranslationContext } from '../../../context';\nimport type {\n MentionSuggestion,\n SearchSourceState,\n TextComposerState,\n TextComposerSuggestion,\n} from 'stream-chat';\nimport {\n CommandsMenuClassName,\n CommandsMenuHeader,\n} from '../../MessageComposer/AttachmentSelector/CommandsMenu';\n\ntype SuggestionTrigger = '/' | ':' | '@' | string;\n\nexport type SuggestionListProps = Partial<{\n suggestionItemComponents: Record<\n SuggestionTrigger,\n React.ComponentType<SuggestionListItemComponentProps>\n >;\n className?: string;\n closeOnClickOutside?: boolean;\n containerClassName?: string;\n focusedItemIndex: number;\n /**\n * Id applied to the listbox element. The controlling combobox (the composer textarea)\n * points its `aria-controls`/`aria-activedescendant` at this id and at the derived\n * per-option ids (`{listboxId}-option-{index}`), so the value must be shared between\n * the textarea and this list. When omitted, a stable id is generated locally.\n */\n listboxId?: string;\n setFocusedItemIndex: (index: number) => void;\n}>;\n\nconst textComposerStateSelector = ({ selection, suggestions }: TextComposerState) => ({\n selection,\n suggestions,\n});\n\nconst searchSourceStateSelector = (\n nextValue: SearchSourceState<TextComposerSuggestion>,\n): { items: TextComposerSuggestion[] } => ({\n items: nextValue.items ?? [],\n});\n\nexport const defaultComponents: Record<\n SuggestionTrigger,\n React.ComponentType<SuggestionListItemComponentProps>\n> = {\n '/': (props: SuggestionListItemComponentProps) => (\n <CommandItem {...props} entity={props.entity as CommandItemProps['entity']} />\n ),\n ':': (props: SuggestionListItemComponentProps) => (\n <EmoticonItem {...props} entity={props.entity as EmoticonItemProps['entity']} />\n ),\n '@': (props: SuggestionListItemComponentProps) => (\n <MentionItem {...props} entity={props.entity as MentionSuggestion} />\n ),\n} as const;\n\n/**\n * Whether the suggestion listbox should be considered shown for a given source.\n * For command suggestions the list is suppressed when every command is disabled.\n * Shared with {@link TextareaComposer} so the textarea's `aria-controls`/\n * `aria-activedescendant` are only set while the listbox is actually rendered\n * (otherwise they would reference a non-existent element).\n */\nexport const hasEnabledCommandSuggestions = ({\n commands,\n type,\n}: {\n commands: Array<{ enabled?: boolean }>;\n type?: string;\n}) => type !== 'commands' || commands.some((command) => command.enabled);\n\nexport const SuggestionList = ({\n className,\n closeOnClickOutside = true,\n containerClassName,\n focusedItemIndex,\n listboxId,\n setFocusedItemIndex,\n suggestionItemComponents = defaultComponents,\n}: SuggestionListProps) => {\n const { t } = useTranslationContext();\n const generatedListboxId = useStableId();\n const resolvedListboxId = listboxId ?? generatedListboxId;\n const { announceInteraction } = useInteractionAnnouncements();\n const {\n AutocompleteSuggestionItem = DefaultSuggestionListItem,\n ContextMenu: ContextMenuComponent = ContextMenu,\n } = useComponentContext();\n const { textareaRef } = useMessageComposerContext();\n const messageComposer = useMessageComposerController();\n const commands = useMessageComposerCommands();\n const { textComposer } = messageComposer;\n const { selection, suggestions } = useStateStore(\n textComposer.state,\n textComposerStateSelector,\n );\n const { items } =\n useStateStore(suggestions?.searchSource.state, searchSourceStateSelector) ?? {};\n const commandSuggestionsEnabled = useMemo(\n () =>\n hasEnabledCommandSuggestions({ commands, type: suggestions?.searchSource.type }),\n [commands, suggestions?.searchSource.type],\n );\n\n const [container, setContainer] = useState<HTMLDivElement | null>(null);\n const caretRectRef = useRef<DOMRect | null>(null);\n const virtualCaretReference = useMemo<VirtualElement>(\n () => ({\n getBoundingClientRect: () => caretRectRef.current ?? new DOMRect(),\n }),\n [],\n );\n\n const { refs, strategy, update, x, y } = usePopoverPosition({\n allowFlip: false,\n offset: 8,\n placement: 'top-start',\n // For top placements, the cross-axis is X; we need this to allow flipping the list to the right when it overflows the right edge.\n shiftOptions: { crossAxis: true },\n });\n\n const component = suggestions?.trigger\n ? suggestionItemComponents[suggestions?.trigger]\n : undefined;\n\n const contextMenuItems = useMemo<ContextMenuItemComponent[]>(() => {\n if (!component) return [];\n // Render in the search source's own order — the SDK already orders results (commands by\n // prefix-match relevance, then alphabetically), so we neither re-sort here nor in the composer's\n // Enter handler; both index into the same `searchSource.items`, keeping the highlighted option\n // and the inserted one in sync.\n return (items ?? []).map((item, i) => {\n const Item: ContextMenuItemComponent = ({ ...props }: ContextMenuItemProps) => (\n <AutocompleteSuggestionItem\n {...props}\n aria-selected={focusedItemIndex === i}\n component={component}\n focused={focusedItemIndex === i}\n id={`${resolvedListboxId}-option-${i}`}\n item={item}\n key={item.id.toString()}\n onMouseEnter={() => setFocusedItemIndex?.(i)}\n role='option'\n />\n );\n return Item;\n });\n }, [\n items,\n component,\n focusedItemIndex,\n resolvedListboxId,\n setFocusedItemIndex,\n AutocompleteSuggestionItem,\n ]);\n\n const ItemsWrapper = useCallback(\n ({ children }: React.ComponentProps<'div'>) => (\n <InfiniteScrollPaginator\n contentProps={{ role: 'presentation' }}\n loadNextOnScrollToBottom={suggestions?.searchSource.search}\n role='presentation'\n threshold={100}\n >\n {children}\n </InfiniteScrollPaginator>\n ),\n [suggestions?.searchSource.search],\n );\n\n useEffect(() => {\n if (!closeOnClickOutside || !suggestions || !container) return;\n const handleClick = (event: MouseEvent) => {\n if (container.contains(event.target as Node)) return;\n textComposer.closeSuggestions();\n };\n document.addEventListener('click', handleClick);\n return () => {\n document.removeEventListener('click', handleClick);\n };\n }, [closeOnClickOutside, suggestions, container, textComposer]);\n\n useEffect(() => {\n refs.setFloating(container);\n }, [container, refs]);\n\n useLayoutEffect(() => {\n if (!suggestions || !update) return;\n const updatePosition = () => {\n const rect = getTextareaCaretRect(textareaRef.current ?? null, selection?.end);\n if (!rect) {\n caretRectRef.current = null;\n refs.setReference(null);\n return;\n }\n caretRectRef.current = rect;\n virtualCaretReference.contextElement = textareaRef.current ?? undefined;\n refs.setReference(virtualCaretReference);\n update();\n };\n\n updatePosition();\n }, [\n container,\n items?.length,\n refs,\n selection?.end,\n suggestions,\n textareaRef,\n update,\n virtualCaretReference,\n ]);\n\n const showSuggestionsList = !!(\n suggestions &&\n items?.length &&\n component &&\n commandSuggestionsEnabled\n );\n\n // A single localized label per suggestion type, used BOTH as the listbox's aria-label and\n // in the count announcement (\"5 Command Suggestions\") — one source of truth, no second key.\n // NOTE: the type strings must match the SDK search-source `type` values exactly — `commands`\n // and `mentions` are plural, but the emoji source (EmojiSearchSource) uses the singular\n // `emoji`. A mismatch silently falls through to the generic \"Suggestions\" label.\n const suggestionMenuLabel = useMemo(() => {\n switch (suggestions?.searchSource.type) {\n case 'commands':\n return t('aria/Command Suggestions');\n case 'emoji':\n return t('aria/Emoji Suggestions');\n case 'mentions':\n return t('aria/Mention Suggestions');\n default:\n return t('aria/Suggestions');\n }\n }, [suggestions?.searchSource.type, t]);\n\n // Announce the visible result count to assistive technology whenever the menu appears or the\n // result set changes as the query filters. We depend on `items` (not just its length) so the\n // count re-announces on every genuine re-filter even when the number is unchanged — e.g. emoji\n // results are capped at a constant N, so without this the user would type and hear nothing\n // after the first announcement. `announceInteraction('suggestions.count')` debounces (300ms),\n // so continuous typing collapses to a single announcement once the user pauses; it no longer\n // dedupes unchanged values (that policy moved here, where \"did the results actually change?\"\n // is knowable). We deliberately do not announce while the list is hidden (count 0 / closed).\n useEffect(() => {\n if (!showSuggestionsList) return;\n announceInteraction('suggestions.count', {\n count: items?.length ?? 0,\n suggestionsLabel: suggestionMenuLabel,\n });\n }, [announceInteraction, items, showSuggestionsList, suggestionMenuLabel]);\n\n if (!showSuggestionsList) return null;\n\n return (\n <div\n aria-label={suggestionMenuLabel}\n className={clsx('str-chat__suggestion-list-container', containerClassName)}\n id={resolvedListboxId}\n ref={setContainer}\n role='listbox'\n style={{\n left: x ?? 0,\n position: strategy,\n top: y ?? 0,\n visibility: x == null || y == null ? 'hidden' : undefined,\n zIndex: 1000,\n }}\n >\n <ContextMenuComponent\n className={clsx('str-chat__suggestion-list', className)}\n Header={\n suggestions.searchSource.type === 'commands' ? CommandsMenuHeader : undefined\n }\n items={contextMenuItems}\n ItemsWrapper={ItemsWrapper}\n menuClassName={\n suggestions.searchSource.type === 'commands' ? CommandsMenuClassName : undefined\n }\n role='presentation'\n />\n </div>\n );\n};\n","import { useMemo } from 'react';\nimport type { TextComposerState } from 'stream-chat';\nimport { useMessageComposerContext, useTranslationContext } from '../../../context';\nimport { useStateStore } from '../../../store';\nimport { useCooldownRemaining } from '../../MessageComposer/hooks/useCooldownRemaining';\nimport { useMessageComposerController } from '../../MessageComposer/hooks/useMessageComposerController';\n\ntype UseTextareaPlaceholderProps = {\n placeholder?: string;\n};\n\nconst textComposerStateSelector = ({ command }: TextComposerState) => ({ command });\n\nexport const useTextareaPlaceholder = ({\n placeholder,\n}: UseTextareaPlaceholderProps = {}) => {\n const { t } = useTranslationContext();\n const { additionalTextareaProps } = useMessageComposerContext();\n const cooldownRemaining = useCooldownRemaining();\n const messageComposer = useMessageComposerController();\n const { command } = useStateStore(\n messageComposer.textComposer.state,\n textComposerStateSelector,\n );\n\n const knownArgsTranslations = useMemo<Record<string, string>>(\n () => ({\n ban: t('ban-command-args'),\n giphy: t('giphy-command-args'),\n mute: t('mute-command-args'),\n unban: t('unban-command-args'),\n unmute: t('unmute-command-args'),\n }),\n [t],\n );\n\n const commandArgs =\n command?.args && (knownArgsTranslations[command.name ?? ''] ?? t(command.args));\n const commandPlaceholder =\n command?.name === 'giphy' ? t('Search GIFs') : (commandArgs ?? undefined);\n\n const defaultPlaceholder =\n placeholder ?? additionalTextareaProps?.placeholder ?? t('Send a message');\n\n if (cooldownRemaining) {\n return t('Slow mode, wait {{ seconds }}s...', { seconds: cooldownRemaining });\n }\n\n return commandPlaceholder ?? defaultPlaceholder;\n};\n","import clsx from 'clsx';\nimport React, {\n type ChangeEventHandler,\n type SyntheticEvent,\n type TextareaHTMLAttributes,\n type UIEventHandler,\n useCallback,\n useEffect,\n useLayoutEffect,\n useRef,\n useState,\n} from 'react';\nimport Textarea from 'react-textarea-autosize';\nimport { useCooldownRemaining } from '../MessageComposer/hooks/useCooldownRemaining';\nimport { useMessageComposerCommands } from '../MessageComposer/hooks/useMessageComposerCommands';\nimport { useMessageComposerController } from '../MessageComposer/hooks/useMessageComposerController';\nimport type {\n AttachmentManagerState,\n MessageComposerConfig,\n MessageComposerState,\n SearchSourceState,\n TextComposerState,\n} from 'stream-chat';\nimport {\n useComponentContext,\n useMessageComposerContext,\n useTranslationContext,\n} from '../../context';\nimport { useStateStore } from '../../store';\nimport { useStableId } from '../UtilityComponents/useStableId';\nimport {\n SuggestionList as DefaultSuggestionList,\n hasEnabledCommandSuggestions,\n} from './SuggestionList';\nimport { useTextareaPlaceholder } from './hooks/useTextareaPlaceholder';\nimport { useAriaLiveAnnouncer, useInteractionAnnouncements } from '../Accessibility';\n\nconst textComposerStateSelector = (state: TextComposerState) => ({\n selection: state.selection,\n suggestions: state.suggestions,\n text: state.text,\n});\n\nconst searchSourceStateSelector = (state: SearchSourceState) => ({\n isLoadingItems: state.isLoading,\n items: state.items,\n});\n\nconst configStateSelector = (state: MessageComposerConfig) => ({\n enabled: state.text.enabled,\n});\n\nconst messageComposerStateSelector = (state: MessageComposerState) => ({\n quotedMessage: state.quotedMessage,\n});\n\nconst attachmentManagerStateSelector = (state: AttachmentManagerState) => ({\n attachments: state.attachments,\n});\n\n/**\n * isComposing prevents double submissions in Korean and other languages.\n * starting point for a read:\n * https://developer.mozilla.org/en-US/docs/Web/API/KeyboardEvent/isComposing\n * In the long term, the fix should happen by handling keypress, but changing this has unknown implications.\n */\nconst defaultShouldSubmit = (event: React.KeyboardEvent<HTMLTextAreaElement>) =>\n event.key === 'Enter' && !event.shiftKey && !event.nativeEvent.isComposing;\n\nexport const shouldBackspaceExitCommandMode = (text: string) => text.length === 0;\n\nexport type TextareaComposerProps = Omit<\n TextareaHTMLAttributes<HTMLTextAreaElement>,\n 'style' | 'defaultValue' | 'disabled' | 'value'\n> & {\n closeSuggestionsOnClickOutside?: boolean;\n containerClassName?: string;\n listClassName?: string;\n maxRows?: number;\n minRows?: number;\n shouldSubmit?: (event: React.KeyboardEvent<HTMLTextAreaElement>) => boolean;\n};\n\n/**\n * Announces composer-mode changes (e.g. activating the `/giphy` command) via\n * `useAriaLiveAnnouncer`. The live region itself is provided by the nearest\n * {@link AriaLiveOutlet} – the root outlet mounted at `Chat`, or a modal outlet\n * when the composer is rendered inside an `aria-modal` dialog (assistive\n * technologies suppress live regions outside an active modal subtree, so the\n * modal outlet ensures announcements land inside the active scope).\n */\nexport const TextareaComposer = (props: TextareaComposerProps) => (\n <TextareaComposerWithLiveAnnouncements {...props} />\n);\n\nconst TextareaComposerWithLiveAnnouncements = ({\n className,\n closeSuggestionsOnClickOutside,\n containerClassName,\n listClassName,\n maxRows: maxRowsProp,\n minRows: minRowsProp,\n onBlur,\n onChange,\n onKeyDown,\n onScroll,\n onSelect,\n placeholder: placeholderProp,\n shouldSubmit: shouldSubmitProp,\n ...restTextareaProps\n}: TextareaComposerProps) => {\n const { AutocompleteSuggestionList = DefaultSuggestionList } = useComponentContext();\n const {\n additionalTextareaProps,\n focus,\n handleSubmit,\n maxRows: maxRowsContext,\n minRows: minRowsContext,\n onPaste,\n shouldSubmit: shouldSubmitContext,\n textareaRef,\n } = useMessageComposerContext();\n const cooldownRemaining = useCooldownRemaining();\n\n const { t } = useTranslationContext('TextareaComposer');\n const placeholder = useTextareaPlaceholder({ placeholder: placeholderProp });\n const announce = useAriaLiveAnnouncer();\n const { announceInteraction } = useInteractionAnnouncements();\n\n const maxRows = maxRowsProp ?? maxRowsContext ?? 10;\n const minRows = minRowsProp ?? minRowsContext;\n\n const shouldSubmit = shouldSubmitProp ?? shouldSubmitContext ?? defaultShouldSubmit;\n\n const messageComposer = useMessageComposerController();\n const { textComposer } = messageComposer;\n const { selection, suggestions, text } = useStateStore(\n textComposer.state,\n textComposerStateSelector,\n );\n // Explicit, stable accessible name for the textarea. Naming the field explicitly\n // prevents it from inheriting an unrelated name from an ancestor (e.g. the\n // \"Channels, tab panel\" of the ChatView tabpanel) via accessible-name computation.\n // While the field is empty we expose the visible placeholder as the name so the\n // announced name matches what the user sees. Once the field has content we switch\n // to a stable label instead of the placeholder, which may be a command-specific\n // template (e.g. mention/command args) that would otherwise be re-announced as a\n // stale name even though the field already holds real content.\n const ariaLabel = text ? t('aria/Message input') : placeholder;\n\n // react-textarea-autosize can measure placeholder content as multi-line in narrow layouts,\n // producing an inflated initial height (e.g. 2 rows) before the user types.\n // Clamp to a single row only while empty unless the integrator explicitly set minRows.\n const autosizeRows = !text && minRows == null ? 1 : undefined;\n const textareaStyle = text\n ? undefined\n : ({\n overflow: 'hidden',\n textOverflow: 'ellipsis',\n whiteSpace: 'nowrap',\n } satisfies React.CSSProperties);\n\n const { enabled } = useStateStore(messageComposer.configState, configStateSelector);\n const { quotedMessage } = useStateStore(\n messageComposer.state,\n messageComposerStateSelector,\n );\n const { attachments } = useStateStore(\n messageComposer.attachmentManager.state,\n attachmentManagerStateSelector,\n );\n\n const { isLoadingItems, items } =\n useStateStore(suggestions?.searchSource.state, searchSourceStateSelector) ?? {};\n\n const containerRef = useRef<HTMLDivElement>(null);\n const [focusedItemIndex, setFocusedItemIndex] = useState(0);\n // Whether the active option was reached via keyboard navigation (Arrow keys) within the\n // current suggestion session. Filtering resets `focusedItemIndex` to 0 on every keystroke,\n // so if we always exposed `aria-activedescendant` the screen reader would re-read the first\n // option on each character typed. We therefore expose the active option to AT ONLY after the\n // user actually navigates, and clear it again as soon as they type (see `changeHandler`).\n // While typing, the debounced polite count (\"N suggestions\") conveys that results changed.\n const [activeOptionFromKeyboard, setActiveOptionFromKeyboard] = useState(false);\n\n // Autocomplete wiring. The suggestion list is exposed as a `listbox` whose active\n // `option` this field tracks. We deliberately do NOT set `role=\"combobox\"`/`aria-expanded`\n // here: ARIA-in-HTML disallows the `combobox` role on a multiline `<textarea>` (and\n // `aria-expanded` is not a supported attribute on the implicit `textbox` role), so axe\n // rejects them. Instead we use the `aria-activedescendant` autocomplete pattern that IS\n // valid on a textbox — `aria-autocomplete=\"list\"` + `aria-controls` → the listbox +\n // `aria-activedescendant` → the active option — which screen readers voice on navigation.\n //\n // `aria-controls` is set whenever the list is open (so the listbox is discoverable) but\n // `aria-activedescendant` is set only once the user has navigated with the keyboard — so the\n // SR announces an option on Arrow nav, not the auto-reset first option on every keystroke.\n // Both never dangle: \"open\" mirrors the keyboard-navigation gate below (`suggestions` present\n // + at least one loaded item), which is also what `SuggestionList` renders on. The shared\n // `listboxId` is owned here because the relationship attributes live on the textarea; it is\n // passed down to the list, which derives per-option ids as `{listboxId}-option-{index}`.\n const listboxId = useStableId();\n const commands = useMessageComposerCommands();\n const suggestionsOpen = !!(\n suggestions &&\n items?.length &&\n hasEnabledCommandSuggestions({ commands, type: suggestions?.searchSource.type })\n );\n const activeDescendantId =\n suggestionsOpen && activeOptionFromKeyboard\n ? `${listboxId}-option-${focusedItemIndex}`\n : undefined;\n\n const [isComposing, setIsComposing] = useState(false);\n\n const changeHandler: ChangeEventHandler<HTMLTextAreaElement> = useCallback(\n (e) => {\n // Typing re-filters the list and resets the highlight to the first item; stop exposing\n // the active option to AT until the user navigates again, so the SR does not re-read the\n // first option on every keystroke.\n setActiveOptionFromKeyboard(false);\n if (onChange) {\n onChange(e);\n return;\n }\n if (!textareaRef.current) return;\n textComposer.handleChange({\n selection: {\n end: textareaRef.current.selectionEnd,\n start: textareaRef.current.selectionStart,\n },\n text: e.target.value,\n });\n },\n [onChange, textComposer, textareaRef],\n );\n\n const onCompositionEnd = useCallback(() => {\n setIsComposing(false);\n }, []);\n\n const onCompositionStart = useCallback(() => {\n setIsComposing(true);\n }, []);\n\n const keyDownHandler = useCallback(\n (event: React.KeyboardEvent<HTMLTextAreaElement>) => {\n if (onKeyDown) {\n onKeyDown(event);\n return;\n }\n\n // use the textarea value directly as the composer state is a step behind\n const textareaValue = textareaRef.current?.value ?? event.currentTarget.value;\n\n if (\n textComposer.suggestions &&\n textComposer.suggestions.searchSource.items?.length\n ) {\n if (event.key === 'Escape') return textComposer.closeSuggestions();\n // The list renders `searchSource.items` in the SDK's own order (no client re-sort), so\n // `focusedItemIndex` — which drives `aria-activedescendant` — indexes the same array here;\n // the option the screen reader announces is the one Enter inserts.\n const loadedItems = textComposer.suggestions.searchSource.items;\n if (event.key === 'Enter') {\n event.preventDefault();\n const selectedItem = loadedItems[focusedItemIndex];\n if (selectedItem) {\n textComposer.handleSelect(selectedItem);\n }\n }\n if (event.key === 'ArrowUp') {\n event.preventDefault();\n setActiveOptionFromKeyboard(true);\n setFocusedItemIndex((prev) => {\n let nextIndex = prev - 1;\n if (nextIndex < 0) {\n nextIndex = loadedItems.length - 1;\n }\n return nextIndex;\n });\n }\n if (event.key === 'ArrowDown') {\n event.preventDefault();\n setActiveOptionFromKeyboard(true);\n setFocusedItemIndex((prev) => {\n let nextIndex = prev + 1;\n if (nextIndex >= loadedItems.length) {\n nextIndex = 0;\n }\n\n return nextIndex;\n });\n }\n } else if (\n textComposer.command &&\n (event.key === 'Escape' ||\n (event.key === 'Backspace' && shouldBackspaceExitCommandMode(textareaValue)))\n ) {\n event.preventDefault();\n textComposer.clearCommand();\n } else if (\n shouldSubmit(event) &&\n textareaRef.current &&\n messageComposer.hasSendableData\n ) {\n if (event.key === 'Enter') {\n // prevent adding newline when submitting a message with\n event.preventDefault();\n }\n handleSubmit();\n }\n },\n [\n focusedItemIndex,\n handleSubmit,\n messageComposer,\n onKeyDown,\n shouldSubmit,\n textComposer,\n textareaRef,\n ],\n );\n\n const scrollHandler: UIEventHandler<HTMLTextAreaElement> = useCallback(\n (event) => {\n if (onScroll) {\n onScroll(event);\n } else {\n textComposer.closeSuggestions();\n }\n },\n [onScroll, textComposer],\n );\n\n const setSelection = useCallback(\n (e: SyntheticEvent<HTMLTextAreaElement>) => {\n onSelect?.(e);\n textComposer.setSelection({\n end: (e.target as HTMLTextAreaElement).selectionEnd,\n start: (e.target as HTMLTextAreaElement).selectionStart,\n });\n },\n [onSelect, textComposer],\n );\n\n useEffect(() => {\n if (textComposer.suggestions) {\n setFocusedItemIndex(0);\n }\n }, [textComposer.suggestions]);\n\n useEffect(() => {\n const suggestionItems = suggestions?.searchSource.items;\n if (!suggestionItems?.length) return;\n\n setFocusedItemIndex((prev) =>\n prev >= suggestionItems.length ? suggestionItems.length - 1 : prev,\n );\n }, [suggestions?.searchSource.items]);\n\n useEffect(() => {\n const textareaIsFocused = textareaRef.current?.matches(':focus');\n if (!textareaRef.current || textareaIsFocused || !focus) return;\n textareaRef.current.focus();\n }, [attachments, focus, quotedMessage, textareaRef]);\n\n // Announce textarea-mode changes (e.g. activating the `/giphy` command) over\n // the polite live region when the textarea is already focused at the moment\n // the command activates.\n //\n // When focus is elsewhere (e.g. on a command menu item or a suggestion list\n // item that calls `textareaRef.current.focus()` right after selecting the\n // command), the subsequent focus shift to the textarea is what causes\n // assistive tech to re-announce the field with its new accessible name –\n // announcing here too would duplicate the message.\n //\n // We subscribe to the state store synchronously rather than via\n // `useStateStore` + `useEffect` so that the `document.activeElement` check\n // runs before any `focus()` call that follows `textComposer.handleSelect`\n // inside the same event handler (e.g. mouse-click on a suggestion item).\n //\n // The announcement itself is deferred to `requestAnimationFrame` so the\n // textarea DOM node already reflects the command-specific placeholder /\n // `aria-label` produced by the React render that follows this state change.\n useEffect(() => {\n const pendingFrames = new Set<number>();\n const unsubscribe = textComposer.state.subscribeWithSelector(\n (state) => ({ commandName: state.command?.name ?? null }),\n ({ commandName }, previous) => {\n if (!previous) return;\n if (!commandName || commandName === previous.commandName) return;\n if (document.activeElement !== textareaRef.current) return;\n\n const frame = window.requestAnimationFrame(() => {\n pendingFrames.delete(frame);\n const label = textareaRef.current?.placeholder;\n if (label) announce(label, { priority: 'polite' });\n });\n pendingFrames.add(frame);\n },\n );\n return () => {\n unsubscribe();\n pendingFrames.forEach(window.cancelAnimationFrame);\n };\n }, [announce, textComposer.state, textareaRef]);\n\n // Announce a one-shot confirmation when a user is picked from the @-mention\n // autocomplete. Fire only when a *new* user is appended, so unrelated state\n // changes (text edits, command activation, removing a mention) do not re-trigger.\n //\n // Dedupe against a component-instance ref rather than `subscribeWithSelector`'s\n // per-call `previous`: the listener can be invoked more than once for a single\n // selection, and `previous` is per-invocation, so two calls both see growth and\n // announce twice. The shared ref makes the second call observe the already-updated\n // count and skip — at most one announcement per selection.\n const lastMentionCountRef = useRef<number | null>(null);\n useEffect(() => {\n lastMentionCountRef.current =\n textComposer.state.getLatestValue().mentionedUsers?.length ?? 0;\n const unsubscribe = textComposer.state.subscribeWithSelector(\n (state) => ({ mentionedUsers: state.mentionedUsers }),\n ({ mentionedUsers }) => {\n const previousCount = lastMentionCountRef.current ?? mentionedUsers.length;\n lastMentionCountRef.current = mentionedUsers.length;\n if (mentionedUsers.length <= previousCount) return;\n const addedUser = mentionedUsers[mentionedUsers.length - 1];\n if (!addedUser) return;\n announceInteraction('user.selected', { user: addedUser.name ?? addedUser.id });\n },\n );\n return unsubscribe;\n }, [announceInteraction, textComposer.state]);\n\n useLayoutEffect(() => {\n /**\n * It is important to perform set text and after that the range\n * to prevent cursor reset to the end of the textarea if doing it in separate effects.\n */\n const textarea = textareaRef.current;\n if (!textarea || isComposing) return;\n\n /**\n * The textarea value has to be overridden outside the render cycle so that the events like compositionend can be triggered.\n * If we have overridden the value during the component rendering, the compositionend event would not be triggered, and\n * it would not be possible to type composed characters (ô).\n * On the other hand, just removing the value override via prop (value={text}) would not allow us to change the text based on\n * middleware results (e.g. replace characters with emojis)\n */\n if (textarea.value !== text) {\n textarea.value = text;\n }\n\n const length = textarea.value.length;\n const start = Math.max(0, Math.min(selection.start, length));\n const end = Math.max(start, Math.min(selection.end, length));\n\n if (textarea.selectionStart === start && textarea.selectionEnd === end) return;\n\n textarea.setSelectionRange(start, end, 'forward');\n }, [text, selection.start, selection.end, isComposing, textareaRef]);\n\n return (\n <div\n className={clsx('rta', 'str-chat__textarea', containerClassName, {\n ['rta--loading']: isLoadingItems,\n })}\n ref={containerRef}\n >\n <Textarea\n {...{ ...additionalTextareaProps, ...restTextareaProps }}\n aria-activedescendant={activeDescendantId}\n aria-autocomplete='list'\n aria-controls={suggestionsOpen ? listboxId : undefined}\n aria-label={ariaLabel}\n className={clsx(\n 'rta__textarea',\n 'str-chat__textarea__textarea str-chat__message-textarea',\n className,\n )}\n data-testid='message-input'\n disabled={!enabled || !!cooldownRemaining}\n maxRows={autosizeRows ?? maxRows}\n minRows={autosizeRows ?? minRows}\n onBlur={onBlur}\n onChange={changeHandler}\n onCompositionEnd={onCompositionEnd}\n onCompositionStart={onCompositionStart}\n onKeyDown={keyDownHandler}\n onPaste={onPaste}\n onScroll={scrollHandler}\n onSelect={setSelection}\n placeholder={placeholder}\n ref={(ref) => {\n textareaRef.current = ref;\n }}\n style={textareaStyle}\n />\n {/* todo: X document the layout change for the accessibility purpose (tabIndex) */}\n {!isComposing && (\n <AutocompleteSuggestionList\n className={listClassName}\n closeOnClickOutside={closeSuggestionsOnClickOutside}\n focusedItemIndex={focusedItemIndex}\n listboxId={listboxId}\n setFocusedItemIndex={setFocusedItemIndex}\n />\n )}\n </div>\n );\n};\n","import type { CSSProperties, ElementType, PropsWithChildren } from 'react';\nimport React, { useCallback, useContext, useEffect, useMemo, useRef } from 'react';\nimport { useDropzone } from 'react-dropzone';\nimport clsx from 'clsx';\nimport type { MessageComposerConfig } from 'stream-chat';\n\nimport {\n useComponentContextIcons,\n useMessageComposerContext,\n useTranslationContext,\n} from '../../context';\nimport { useAttachmentManagerState, useMessageComposerController } from './hooks';\nimport { useStateStore } from '../../store';\nimport { useIsCooldownActive } from './hooks/useIsCooldownActive';\n\nconst DragAndDropUploadContext = React.createContext<{\n subscribeToDrop: ((fn: (files: File[]) => void) => () => void) | null;\n}>({\n subscribeToDrop: null,\n});\n\nexport const useDragAndDropUploadContext = () => useContext(DragAndDropUploadContext);\n\n/**\n * @private This hook should be used only once directly in the `MessageComposerProvider` to\n * register `uploadNewFiles` functions of the rendered message composers. Each `MessageComposer`\n * will then be notified when the drop event occurs from within the `WithDragAndDropUpload`\n * component.\n */\nexport const useRegisterDropHandlers = () => {\n const { subscribeToDrop } = useDragAndDropUploadContext();\n\n const messageComposer = useMessageComposerController();\n\n useEffect(() => {\n const unsubscribe = subscribeToDrop?.(messageComposer.attachmentManager.uploadFiles);\n\n return unsubscribe;\n }, [subscribeToDrop, messageComposer]);\n};\n\nconst attachmentManagerConfigStateSelector = (state: MessageComposerConfig) => ({\n acceptedFiles: state.attachments.acceptedFiles,\n multipleUploads: state.attachments.maxNumberOfFilesPerMessage > 1,\n});\n\n/**\n * Wrapper to replace now deprecated `Channel.dragAndDropWindow` option.\n *\n * @example\n * ```tsx\n * <Channel>\n * <WithDragAndDropUpload component=\"section\" className=\"message-list-dnd-wrapper\">\n * <Window>\n * <MessageList />\n * <MessageComposer />\n * </Window>\n * </WithDragAndDropUpload>\n * <Thread />\n * <Channel>\n * ```\n */\nexport const WithDragAndDropUpload = ({\n children,\n className,\n component: Component = 'div',\n style,\n}: PropsWithChildren<{\n acceptedFiles?: string[];\n /**\n * @description An element to render as a wrapper onto which drag & drop functionality will be applied.\n * @default 'div'\n */\n component?: ElementType;\n className?: string;\n style?: CSSProperties;\n}>) => {\n const dropHandlersRef = useRef<Set<(f: File[]) => void>>(new Set());\n const messageComposerContext = useMessageComposerContext();\n const dragAndDropUploadContext = useDragAndDropUploadContext();\n const messageComposer = useMessageComposerController();\n const { isUploadEnabled } = useAttachmentManagerState();\n const { acceptedFiles, multipleUploads } = useStateStore(\n messageComposer.configState,\n attachmentManagerConfigStateSelector,\n );\n\n const isCooldownActive = useIsCooldownActive();\n // if message composer context is available, there's no need to use the queue\n const isWithinMessageComposerContext = Object.keys(messageComposerContext).length > 0;\n\n const accept = useMemo(\n () =>\n acceptedFiles.reduce<Record<string, Array<string>>>((mediaTypeMap, mediaType) => {\n mediaTypeMap[mediaType] ??= [];\n return mediaTypeMap;\n }, {}),\n [acceptedFiles],\n );\n\n const subscribeToDrop = useCallback((fn: (files: File[]) => void) => {\n dropHandlersRef.current.add(fn);\n\n return () => {\n dropHandlersRef.current.delete(fn);\n };\n }, []);\n\n const handleDrop = useCallback((files: File[]) => {\n dropHandlersRef.current.forEach((fn) => fn(files));\n }, []);\n\n const {\n getRootProps,\n isDragActive,\n isDragReject: isDragRejected,\n } = useDropzone({\n accept,\n // apply `disabled` rules if available, otherwise allow anything and\n // let the `uploadNewFiles` handle the limitations internally\n disabled: isWithinMessageComposerContext\n ? !isUploadEnabled || isCooldownActive\n : false,\n multiple: multipleUploads,\n noClick: true,\n noKeyboard: true,\n onDrop: isWithinMessageComposerContext\n ? messageComposer.attachmentManager.uploadFiles\n : handleDrop,\n });\n\n // nested WithDragAndDropUpload components render wrappers without functionality\n // (MessageComposerUI has a default WithDragAndDropUpload)\n if (dragAndDropUploadContext.subscribeToDrop !== null) {\n return <Component className={className}>{children}</Component>;\n }\n\n const rootClassName = clsx('str-chat__dropzone-root', className);\n\n return (\n <DragAndDropUploadContext.Provider value={{ subscribeToDrop }}>\n <Component {...getRootProps({ className: rootClassName, style })}>\n {isDragActive && (\n <div\n className={clsx('str-chat__dropzone-container', {\n 'str-chat__dropzone-container--not-accepted': isDragRejected,\n })}\n role='presentation'\n >\n <FileDragAndDropContent isDragRejected={isDragRejected} />\n </div>\n )}\n {children}\n </Component>\n </DragAndDropUploadContext.Provider>\n );\n};\n\nexport type FileDragAndDropContentProps = {\n isDragRejected: boolean;\n};\n\nexport const FileDragAndDropContent = ({\n isDragRejected,\n}: FileDragAndDropContentProps) => {\n const { t } = useTranslationContext();\n const { IconUpload } = useComponentContextIcons();\n return (\n <div className='str-chat__dropzone-container__content'>\n {isDragRejected ? (\n <p>{t('Some of the files will not be accepted')}</p>\n ) : (\n <>\n <IconUpload />\n <p>{t('Drag your files here')}</p>\n </>\n )}\n </div>\n );\n};\n","import React from 'react';\nimport { useTranslationContext } from '../../context';\n\nexport type StopAIGenerationButtonProps = React.ComponentProps<'button'>;\n\nexport const StopAIGenerationButton = ({\n onClick,\n ...restProps\n}: StopAIGenerationButtonProps) => {\n const { t } = useTranslationContext();\n return (\n <button\n aria-label={t('aria/Stop AI Generation')}\n className='str-chat__stop-ai-generation-button'\n data-testid='stop-ai-generation-button'\n onClick={onClick}\n {...restProps}\n />\n );\n};\n","import React from 'react';\nimport { useMessageComposerHasSendableData } from './hooks';\nimport { useComponentContextIcons, useTranslationContext } from '../../context';\nimport { Button } from '../Button';\n\nexport type SendButtonProps = {\n sendMessage: (event: React.BaseSyntheticEvent) => void;\n} & React.ComponentProps<'button'>;\n\nexport const SendButton = ({ children, sendMessage, ...rest }: SendButtonProps) => {\n const { IconSend } = useComponentContextIcons();\n\n const { t } = useTranslationContext();\n const hasSendableData = useMessageComposerHasSendableData();\n return (\n <Button\n appearance='solid'\n aria-label={t('aria/Send')}\n circular\n className='str-chat__send-button'\n data-testid='send-button'\n disabled={!hasSendableData}\n onClick={sendMessage}\n size='sm'\n variant='primary'\n {...rest}\n >\n {children ?? <IconSend />}\n </Button>\n );\n};\n","import React, { useCallback } from 'react';\nimport { StopAIGenerationButton as DefaultStopAIGenerationButton } from './StopAIGenerationButton';\nimport { CooldownTimer as DefaultCooldownTimer } from './CooldownTimer';\nimport { SendButton as DefaultSendButton } from './SendButton';\nimport {\n useChannelStateContext,\n useComponentContext,\n useComponentContextIcons,\n useMessageComposerContext,\n} from '../../context';\nimport { AIStates, useAIState } from '../AIStateIndicator';\nimport { useMessageComposerController, useMessageContentIsEmpty } from './hooks';\nimport { AudioRecordingButtonWithNotification } from '../MediaRecorder/AudioRecorder/AudioRecordingButtonWithNotification';\nimport { useIsCooldownActive } from './hooks/useIsCooldownActive';\nimport type { MessageComposerState, TextComposerState } from 'stream-chat';\nimport { useStateStore } from '../../store';\nimport { useInertWhenHidden } from '../Accessibility';\n\nconst messageComposerStateSelector = ({ editedMessage }: MessageComposerState) => ({\n editedMessage,\n});\n\nconst textComposerStateSelector = ({ command, text }: TextComposerState) => ({\n command,\n text,\n});\n\nexport const MessageComposerActions = () => {\n const { IconCheckmark, IconSend } = useComponentContextIcons();\n\n const { channel } = useChannelStateContext();\n const { hideSendButton } = useMessageComposerContext();\n const messageComposer = useMessageComposerController();\n const {\n CooldownTimer = DefaultCooldownTimer,\n SendButton,\n StopAIGenerationButton: StopAIGenerationButtonOverride,\n } = useComponentContext();\n\n const { editedMessage } = useStateStore(\n messageComposer.state,\n messageComposerStateSelector,\n );\n\n const { command } = useStateStore(\n messageComposer.textComposer.state,\n textComposerStateSelector,\n );\n\n const contentIsEmpty = useMessageContentIsEmpty();\n /**\n * This bit here is needed to make sure that we can get rid of the default behaviour\n * if need be. Essentially, this allows us to pass StopAIGenerationButton={null} and\n * completely circumvent the default logic if it's not what we want. We need it as a\n * prop because there is no other trivial way to override the SendMessage button otherwise.\n */\n const StopAIGenerationButton =\n StopAIGenerationButtonOverride === undefined\n ? DefaultStopAIGenerationButton\n : StopAIGenerationButtonOverride;\n\n const { handleSubmit, recordingController } = useMessageComposerContext();\n const isCooldownActive = useIsCooldownActive();\n\n const { aiState } = useAIState(channel);\n const stopGenerating = useCallback(() => channel?.stopAIResponse(), [channel]);\n const shouldDisplayStopAIGeneration =\n [AIStates.Thinking, AIStates.Generating].includes(aiState) &&\n !!StopAIGenerationButton;\n\n const recordingEnabled = !!(recordingController.recorder && navigator.mediaDevices); // account for requirement on iOS as per this bug report: https://bugs.webkit.org/show_bug.cgi?id=252303\n\n let content = SendButton ? (\n <SendButton sendMessage={handleSubmit} />\n ) : (\n <DefaultSendButton sendMessage={handleSubmit}>\n {editedMessage || command ? <IconCheckmark /> : <IconSend />}\n </DefaultSendButton>\n );\n\n if (shouldDisplayStopAIGeneration) {\n content = <StopAIGenerationButton onClick={stopGenerating} />;\n } else if (hideSendButton) return null;\n\n if (isCooldownActive) {\n content = <CooldownTimer />;\n } else if (contentIsEmpty && !editedMessage && !command && recordingEnabled) {\n content = <AudioRecordingButtonWithNotification />;\n }\n\n return <div className='str-chat__message-composer__actions'>{content}</div>;\n};\n\nexport const AdditionalMessageComposerActions = () => {\n const { EmojiPicker } = useComponentContext();\n const isCooldownActive = useIsCooldownActive();\n const messageComposer = useMessageComposerController();\n const { command } = useStateStore(\n messageComposer.textComposer.state,\n textComposerStateSelector,\n );\n // The additional actions are visually hidden via a CSS transition while a\n // command is active; keep them removed from the a11y tree and tab order\n // without setting `display: none` (which would kill the transition).\n const inertProps = useInertWhenHidden(!!command, { setHiddenAttribute: false });\n\n return (\n <div className='str-chat__message-composer__additional-actions' {...inertProps}>\n {!isCooldownActive && EmojiPicker ? <EmojiPicker /> : null}\n </div>\n );\n};\n","import type { LiveLocationPreview, StaticLocationPreview } from 'stream-chat';\nimport type { ComponentType } from 'react';\nimport React from 'react';\nimport { useComponentContextIcons, useTranslationContext } from '../../../context';\nimport { RemoveAttachmentPreviewButton } from '../RemoveAttachmentPreviewButton';\n\ntype GeolocationPreviewImageProps = {\n location: StaticLocationPreview | LiveLocationPreview;\n};\n\nconst GeolocationPreviewImage = () => {\n const { IconLocation } = useComponentContextIcons();\n return (\n <div className='str-chat__location-preview-image'>\n <IconLocation />\n </div>\n );\n};\n\nexport type GeolocationPreviewProps = {\n location: StaticLocationPreview | LiveLocationPreview;\n PreviewImage?: ComponentType<GeolocationPreviewImageProps>;\n remove?: () => void;\n};\n\nexport const GeolocationPreview = ({\n location,\n PreviewImage = GeolocationPreviewImage,\n remove,\n}: GeolocationPreviewProps) => {\n const { t } = useTranslationContext();\n const shareDuration = (location as LiveLocationPreview).durationMs;\n const title = shareDuration ? t('Live location') : t('Current location');\n\n return (\n <div className='str-chat__location-preview' data-testid='location-preview'>\n <PreviewImage location={location} />\n <div className='str-chat__location-preview__data'>\n <div\n className='str-chat__location-preview__data__title'\n title={t('Shared location')}\n >\n {title}\n </div>\n <div className='str-chat__location-preview__data__subtitle'>\n {t('Location: {{ coordinates }}', {\n coordinates: `${location.latitude}, ${location.longitude}`,\n })}\n </div>\n {shareDuration && (\n <div className='str-chat__location-preview__data__sharing-duration'>\n {t('Live for {{duration}}', {\n duration: t('duration/Share Location', {\n milliseconds: shareDuration,\n }),\n })}\n </div>\n )}\n </div>\n {remove && (\n <RemoveAttachmentPreviewButton\n aria-label={t('aria/Remove location attachment')}\n className='str-chat__attachment-preview__remove-button'\n data-testid='location-preview-item-delete-button'\n onClick={remove}\n />\n )}\n </div>\n );\n};\n","import React from 'react';\nimport clsx from 'clsx';\n\nimport {\n AttachmentSelector as DefaultAttachmentSelector,\n SimpleAttachmentSelector,\n} from './AttachmentSelector/AttachmentSelector';\nimport {\n AttachmentPreviewList as DefaultAttachmentPreviewList,\n VoiceRecordingPreviewSlot as DefaultVoiceRecordingPreviewSlot,\n} from './AttachmentPreviewList';\nimport { AudioRecorder as DefaultAudioRecorder } from '../MediaRecorder';\nimport { EditedMessagePreview as DefaultEditedMessagePreview } from './EditedMessagePreview';\nimport { QuotedMessagePreview as DefaultQuotedMessagePreview } from './QuotedMessagePreview';\nimport { LinkPreviewList as DefaultLinkPreviewList } from './LinkPreviewList';\nimport { SendToChannelCheckbox as DefaultSendToChannelCheckbox } from './SendToChannelCheckbox';\nimport { TextareaComposer as DefaultTextareaComposer } from '../TextareaComposer';\nimport { useMessageComposerContext as useMessageComposerContext } from '../../context/MessageComposerContext';\nimport { useComponentContext } from '../../context/ComponentContext';\nimport { useMessageContext } from '../../context';\nimport { restorePreEditSnapshot } from './preEditSnapshot';\nimport { WithDragAndDropUpload } from './WithDragAndDropUpload';\nimport {\n AdditionalMessageComposerActions as DefaultAdditionalMessageComposerActions,\n MessageComposerActions,\n} from './MessageComposerActions';\nimport { useMessageComposerController } from './hooks';\nimport { useStateStore } from '../../store';\nimport {\n type AttachmentManagerState,\n LinkPreviewsManager,\n type LinkPreviewsManagerState,\n type LocationComposerState,\n type MessageComposerState,\n type TextComposerState,\n} from 'stream-chat';\nimport { CommandChip as DefaultCommandChip } from './CommandChip';\nimport { GeolocationPreview } from './AttachmentPreviewList/GeolocationPreview';\n\nconst messageComposerStateSelector = ({\n editedMessage,\n quotedMessage,\n}: MessageComposerState) => ({\n editedMessage,\n quotedMessage,\n});\n\nconst attachmentManagerStateSelector = (state: AttachmentManagerState) => ({\n attachments: state.attachments,\n});\n\nconst linkPreviewsManagerStateSelector = (state: LinkPreviewsManagerState) => ({\n linkPreviews: Array.from(state.previews.values()).filter(\n (preview) =>\n LinkPreviewsManager.previewIsLoaded(preview) ||\n LinkPreviewsManager.previewIsLoading(preview),\n ),\n});\n\nconst locationComposerStateSelector = (state: LocationComposerState) => ({\n location: state.location,\n});\n\nconst textComposerCommandSelector = ({ command }: TextComposerState) => ({ command });\n\nconst MessageComposerPreviews = () => {\n const {\n AttachmentPreviewList = DefaultAttachmentPreviewList,\n EditedMessagePreview = DefaultEditedMessagePreview,\n LinkPreviewList = DefaultLinkPreviewList,\n QuotedMessagePreview = DefaultQuotedMessagePreview,\n VoiceRecordingPreviewSlot = DefaultVoiceRecordingPreviewSlot,\n } = useComponentContext();\n\n const messageComposer = useMessageComposerController();\n const { editedMessage, quotedMessage } = useStateStore(\n messageComposer.state,\n messageComposerStateSelector,\n );\n\n const { attachments } = useStateStore(\n messageComposer.attachmentManager.state,\n attachmentManagerStateSelector,\n );\n\n const { location } = useStateStore(\n messageComposer.locationComposer.state,\n locationComposerStateSelector,\n );\n\n const { linkPreviewsManager } = messageComposer;\n const { linkPreviews } = useStateStore(\n linkPreviewsManager.state,\n linkPreviewsManagerStateSelector,\n );\n\n if (\n !quotedMessage &&\n attachments.length === 0 &&\n linkPreviews.length === 0 &&\n !location &&\n !editedMessage\n )\n return null;\n\n // todo: pass the entity arrays from here so that the preview lists do not have to subscribe to the composer state changes too?\n return (\n <div className='str-chat__message-composer-previews'>\n {editedMessage ? (\n <div className='str-chat__message-composer-previews'>\n <EditedMessagePreview\n message={editedMessage}\n onCancel={() => {\n restorePreEditSnapshot(messageComposer);\n }}\n />\n </div>\n ) : (\n <QuotedMessagePreview />\n )}\n <VoiceRecordingPreviewSlot />\n <AttachmentPreviewList />\n <LinkPreviewList />\n {location && (\n <GeolocationPreview\n location={location}\n // It is not possible to nullify shared_location field so we do not show a preview when editing\n // to prevent a user from wanting to remove the location\n remove={\n messageComposer.editedMessage\n ? undefined\n : messageComposer.locationComposer.initState\n }\n />\n )}\n </div>\n );\n};\n\nexport const MessageComposerUI = () => {\n const { message } = useMessageContext();\n const { recordingController } = useMessageComposerContext();\n const messageComposerController = useMessageComposerController();\n const { command } = useStateStore(\n messageComposerController.textComposer.state,\n textComposerCommandSelector,\n );\n\n const {\n AdditionalMessageComposerActions = DefaultAdditionalMessageComposerActions,\n AttachmentSelector = message ? SimpleAttachmentSelector : DefaultAttachmentSelector,\n AudioRecorder = DefaultAudioRecorder,\n CommandChip = DefaultCommandChip,\n SendToChannelCheckbox = DefaultSendToChannelCheckbox,\n TextareaComposer = DefaultTextareaComposer,\n } = useComponentContext();\n\n return (\n <WithDragAndDropUpload\n className='str-chat__message-composer-container'\n component='div'\n >\n <div\n className={clsx('str-chat__message-composer', {\n 'str-chat__message-composer--command-active': !!command,\n })}\n >\n {recordingController.recordingState ? (\n <AudioRecorder />\n ) : (\n <>\n <AttachmentSelector />\n <div className='str-chat__message-composer-compose-area'>\n <MessageComposerPreviews />\n <div className='str-chat__message-composer-controls'>\n <div className='str-chat__message-composer-controls__text-composition-controls'>\n <div className='str-chat__message-composer-controls__text-composition-controls__text'>\n {command && (\n <div className='str-chat__message-composer-controls__text-composition-controls__command-chip-container'>\n <CommandChip command={command} />\n </div>\n )}\n <TextareaComposer />\n </div>\n <SendToChannelCheckbox />\n </div>\n <AdditionalMessageComposerActions />\n <MessageComposerActions />\n </div>\n </div>\n </>\n )}\n </div>\n </WithDragAndDropUpload>\n );\n};\n","import { useMemo } from 'react';\n\nimport type { MessageComposerContextValue } from '../../../context/MessageComposerContext';\n\nexport const useCreateMessageComposerContext = (value: MessageComposerContextValue) => {\n const {\n additionalTextareaProps,\n asyncMessagesMultiSendEnabled,\n audioRecordingEnabled,\n emojiSearchIndex,\n focus,\n handleSubmit,\n hideSendButton,\n maxRows,\n minRows,\n onPaste,\n parent,\n recordingController,\n shouldSubmit,\n textareaRef,\n } = value;\n\n const parentId = parent?.id;\n\n const messageComposerContext: MessageComposerContextValue = useMemo(\n () => ({\n additionalTextareaProps,\n asyncMessagesMultiSendEnabled,\n audioRecordingEnabled,\n emojiSearchIndex,\n focus,\n handleSubmit,\n hideSendButton,\n maxRows,\n minRows,\n onPaste,\n parent,\n recordingController,\n shouldSubmit,\n textareaRef,\n }),\n // eslint-disable-next-line react-hooks/exhaustive-deps\n [\n asyncMessagesMultiSendEnabled,\n audioRecordingEnabled,\n emojiSearchIndex,\n handleSubmit,\n hideSendButton,\n minRows,\n parentId,\n recordingController,\n ],\n );\n\n return messageComposerContext;\n};\n","import type { PropsWithChildren } from 'react';\nimport React, { useContext, useEffect } from 'react';\n\nimport { MessageComposerUI as DefaultMessageComposerUI } from './MessageComposerUI';\nimport { useMessageComposerController } from './hooks';\nimport { useCreateMessageComposerContext } from './hooks/useCreateMessageComposerContext';\nimport { useMessageComposerBindings } from './hooks/useMessageComposerBindings';\nimport type { ComponentContextValue } from '../../context/ComponentContext';\nimport { useComponentContext } from '../../context/ComponentContext';\nimport { MessageComposerContextProvider } from '../../context/MessageComposerContext';\nimport { DialogManagerProvider } from '../../context';\nimport { useStableId } from '../UtilityComponents/useStableId';\n\nimport type {\n LocalMessage,\n Message,\n MessageComposer as MessageComposerController,\n SendMessageOptions,\n} from 'stream-chat';\n\nimport type { CustomAudioRecordingConfig } from '../MediaRecorder';\nimport { useRegisterDropHandlers } from './WithDragAndDropUpload';\n\nconst MessageComposerControllerContext = React.createContext<\n MessageComposerController | undefined\n>(undefined);\n\nexport const MessageComposerControllerProvider = ({\n children,\n messageComposerController,\n}: PropsWithChildren<{\n messageComposerController?: MessageComposerController;\n}>) => (\n <MessageComposerControllerContext.Provider value={messageComposerController}>\n {children}\n </MessageComposerControllerContext.Provider>\n);\n\nexport const useMessageComposerControllerContext = () =>\n useContext(MessageComposerControllerContext);\n\nexport type EmojiSearchIndexResult = {\n id: string;\n name: string;\n skins: Array<{ native: string }>;\n emoticons?: Array<string>;\n native?: string;\n};\n\nexport interface EmojiSearchIndex {\n search: (\n query: string,\n ) => PromiseLike<Array<EmojiSearchIndexResult>> | Array<EmojiSearchIndexResult> | null;\n}\n\nexport type MessageComposerProps = {\n /**\n * Additional props to be passed to the underlying `AutoCompleteTextarea` component.\n * Default value is handled via MessageComposer.\n * [Available props](https://www.npmjs.com/package/react-textarea-autosize)\n */\n additionalTextareaProps?: Omit<\n React.TextareaHTMLAttributes<HTMLTextAreaElement>,\n 'defaultValue' | 'style' | 'disabled' | 'value'\n >;\n /**\n * When enabled, recorded messages won’t be sent immediately.\n * Instead, they will “stack up” with other attachments in the message composer allowing the user to send multiple attachments as part of the same message.\n */\n asyncMessagesMultiSendEnabled?: boolean;\n /** Allows to configure the audio recording parameters for voice messages. */\n audioRecordingConfig?: CustomAudioRecordingConfig;\n /** Controls whether the users will be provided with the UI to record voice messages. */\n audioRecordingEnabled?: boolean;\n /** Mechanism to be used with autocomplete and text replace features of the `MessageComposer` component, see [emoji-mart `SearchIndex`](https://github.com/missive/emoji-mart#%EF%B8%8F%EF%B8%8F-headless-search) */\n emojiSearchIndex?: ComponentContextValue['emojiSearchIndex'];\n /** If true, focuses the text input on component mount */\n focus?: boolean;\n // todo: what sense does hideSendButton prop make, when we have message composer actions (recording, send msg). Can we remove it?\n // /** Allows to hide MessageComposer's send button. */\n hideSendButton?: boolean;\n /** Max number of rows the underlying `textarea` component is allowed to grow */\n maxRows?: number;\n /** Min number of rows the underlying `textarea` will start with. The `grow` on MessageComposer prop has to be enabled for `minRows` to take effect. */\n minRows?: number;\n /** Function to override the default message sending process. Not message updating process. */\n overrideSubmitHandler?: (params: {\n cid: string;\n localMessage: LocalMessage;\n message: Message;\n sendOptions: SendMessageOptions;\n }) => Promise<void> | void;\n /** When replying in a thread, the parent message object */\n parent?: LocalMessage;\n /**\n * Currently, `Enter` is the default submission key and `Shift`+`Enter` is the default combination for the new line.\n * If specified, this function overrides the default behavior specified previously.\n *\n * Example of default behavior:\n * ```tsx\n * const defaultShouldSubmit = (event) => event.key === \"Enter\" && !event.shiftKey;\n * ```\n */\n shouldSubmit?: (event: React.KeyboardEvent<HTMLTextAreaElement>) => boolean;\n /**\n * When set to `true` disables clearing established state of the MessageComposerController upon component unmount.\n */\n preventClearingOnUnmount?: boolean;\n};\n\nconst MessageComposerProvider = (props: PropsWithChildren<MessageComposerProps>) => {\n const messageComposerBindings = useMessageComposerBindings(props);\n const { emojiSearchIndex } = useComponentContext('MessageComposer');\n\n const messageComposerContextValue = useCreateMessageComposerContext({\n ...messageComposerBindings,\n ...props,\n emojiSearchIndex: props.emojiSearchIndex ?? emojiSearchIndex,\n });\n\n const messageComposer = useMessageComposerController();\n\n useEffect(\n () => () => {\n // both createDraft() and clear() reach channel.getConfig(), which throws\n // for a disconnected channel\n if (messageComposer.channel.disconnected) return;\n\n const promise = messageComposer.config.drafts.enabled\n ? messageComposer.createDraft().catch(console.error)\n : Promise.resolve();\n\n if (props.preventClearingOnUnmount) return;\n\n promise.finally(() => messageComposer.clear());\n },\n [messageComposer, props.preventClearingOnUnmount],\n );\n\n useEffect(() => {\n const threadId = messageComposer.threadId;\n if (\n !threadId ||\n !messageComposer.channel ||\n !messageComposer.contentIsEmpty ||\n !messageComposer.config.drafts.enabled\n )\n return;\n // get draft data for legacy thead composer\n messageComposer.channel\n .getDraft({ parent_id: threadId })\n .then(({ draft }) => {\n if (draft) {\n messageComposer.initState({ composition: draft });\n }\n })\n .catch(console.error);\n }, [messageComposer]);\n\n useRegisterDropHandlers();\n\n return (\n <MessageComposerContextProvider value={messageComposerContextValue}>\n {props.children}\n </MessageComposerContextProvider>\n );\n};\n\nconst UnMemoizedMessageComposer = (props: MessageComposerProps) => {\n const { MessageComposerUI = DefaultMessageComposerUI } =\n useComponentContext('MessageComposer');\n const messageComposer = useMessageComposerController();\n const id = useStableId();\n\n const dialogManagerId = messageComposer.threadId\n ? `message-input-dialog-manager-thread-${id}`\n : `message-input-dialog-manager-${id}`;\n\n return (\n <DialogManagerProvider id={dialogManagerId}>\n <MessageComposerProvider {...props}>\n <MessageComposerUI />\n </MessageComposerProvider>\n </DialogManagerProvider>\n );\n};\n\n/**\n * A high level component that has provides all functionality to the Input it renders.\n */\nexport const MessageComposer = React.memo(\n UnMemoizedMessageComposer,\n) as typeof UnMemoizedMessageComposer;\n","import { useEffect, useMemo } from 'react';\nimport { MessageComposer as MessageComposerController } from 'stream-chat';\nimport { useThreadContext } from '../../Threads';\nimport { useChannelStateContext, useChatContext } from '../../../context';\nimport { useLegacyThreadContext } from '../../Thread';\nimport { useMessageComposerControllerContext } from '../MessageComposer';\n\nexport const useMessageComposerController = () => {\n const { client } = useChatContext();\n const { messageComposerCache: queueCache } = client;\n const { channel } = useChannelStateContext();\n const { legacyThread: parentMessage } = useLegacyThreadContext();\n const threadInstance = useThreadContext();\n // custom supplied composer overriding default composer retrieval behavior\n const composerFromOverrideContext = useMessageComposerControllerContext();\n\n const cachedParentMessage = useMemo(() => {\n if (!parentMessage) return undefined;\n\n return parentMessage;\n // eslint-disable-next-line react-hooks/exhaustive-deps\n }, [parentMessage?.id]);\n\n // composer hierarchy\n // edited message (always new) -> thread instance (own) -> thread message (always new) -> channel (own)\n // editedMessage ?? thread ?? parentMessage ?? channel;\n const messageComposer = useMemo(() => {\n if (composerFromOverrideContext) return composerFromOverrideContext;\n\n if (threadInstance) {\n return threadInstance.messageComposer;\n } else if (cachedParentMessage) {\n const compositionContext = {\n ...cachedParentMessage,\n legacyThreadId: cachedParentMessage.id,\n };\n\n const tag = MessageComposerController.constructTag(compositionContext);\n\n const cachedComposer = queueCache.get(tag);\n if (cachedComposer) return cachedComposer;\n\n return new MessageComposerController({\n client,\n compositionContext,\n });\n } else {\n return channel.messageComposer;\n }\n }, [\n cachedParentMessage,\n channel.messageComposer,\n client,\n composerFromOverrideContext,\n queueCache,\n threadInstance,\n ]);\n\n if (\n (['legacy_thread', 'message'] as MessageComposerController['contextType'][]).includes(\n messageComposer.contextType,\n ) &&\n !queueCache.peek(messageComposer.tag)\n ) {\n queueCache.add(messageComposer.tag, messageComposer);\n }\n\n useEffect(() => {\n const unsubscribe = messageComposer.registerSubscriptions();\n return () => {\n unsubscribe();\n };\n }, [messageComposer]);\n\n return messageComposer;\n};\n","import React, { useMemo } from 'react';\n\n/**\n * The set of props returned by {@link useInertWhenHidden}, to be spread onto the\n * element that must remain mounted while visually hidden.\n *\n * `inert` is typed as `boolean | undefined` so the object spreads cleanly onto a\n * JSX host element (React 19 types `inert?: boolean`; React 17/18 don't declare\n * it at all, so an extra prop via spread is accepted). The RUNTIME value differs\n * by React major version (string `'true'` on 17/18) — see the implementation\n * note on {@link useInertWhenHidden} — and is cast to `boolean` at the source so\n * the public type stays spread-safe. Consumers spread it; they never read it.\n */\nexport type InertWhenHiddenProps = {\n 'aria-hidden': true | undefined;\n hidden: boolean | undefined;\n inert: boolean | undefined;\n tabIndex: number | undefined;\n};\n\n/**\n * React 19 recognizes `inert` as a native boolean prop and renders\n * `inert={true}` to the DOM attribute `inert=\"\"` (no warning). React 17/18 do\n * NOT know `inert`; they forward it only as a string, rendering `inert=\"true\"`\n * (a valid present boolean attribute) with no warning. Passing a boolean to\n * React 17/18, or an empty string to React 19, produces a console warning and/or\n * drops the attribute — so we select the warning-free form per major version.\n */\nconst REACT_MAJOR = parseInt(React.version, 10);\n// Runtime value differs by React major (boolean on 19, the string 'true' on 17/18), but the\n// public type is `boolean | undefined` so the props spread cleanly onto JSX. The string form\n// is cast here — it is the only place the type/runtime divergence is reconciled.\nconst INERT_PRESENT = (REACT_MAJOR >= 19 ? true : 'true') as unknown as boolean;\n\nconst SHOWN_PROPS: InertWhenHiddenProps = {\n 'aria-hidden': undefined,\n hidden: undefined,\n inert: undefined,\n tabIndex: undefined,\n};\n\nconst HIDDEN_PROPS: InertWhenHiddenProps = {\n 'aria-hidden': true,\n hidden: true,\n inert: INERT_PRESENT,\n tabIndex: -1,\n};\n\nconst HIDDEN_PROPS_WITHOUT_HIDDEN_ATTRIBUTE: InertWhenHiddenProps = {\n 'aria-hidden': true,\n hidden: undefined,\n inert: INERT_PRESENT,\n tabIndex: -1,\n};\n\n/**\n * Options for {@link useInertWhenHidden}.\n */\nexport type UseInertWhenHiddenOptions = {\n /**\n * Whether to set the HTML `hidden` attribute (which applies `display: none`)\n * when `hidden` is `true`. Defaults to `true`.\n *\n * Set to `false` for elements whose visual hiding is already handled by CSS\n * (e.g. an opacity/scale/`max-width` transition) — the `hidden` attribute\n * would force `display: none` and kill the transition. With `false`, the hook\n * still applies `aria-hidden`, `inert`, and `tabIndex={-1}` so the element is\n * removed from the accessibility tree and tab order while staying laid out.\n */\n setHiddenAttribute?: boolean;\n};\n\n/**\n * Canonical way to fully hide a control from assistive technology AND the tab\n * order while it must stay mounted.\n *\n * @remarks\n * **Prefer not rendering.** The simplest and most robust fix for a control that\n * should be unavailable is to *not render it at all* when it is hidden. Reach\n * for this hook only when the element MUST stay mounted — e.g. to preserve\n * internal state, layout measurements, or enter/exit transitions.\n *\n * @example\n * ```tsx\n * const Toolbar = ({ collapsed }: { collapsed: boolean }) => {\n * const inertProps = useInertWhenHidden(collapsed);\n * return <button {...inertProps}>Add attachment</button>;\n * };\n * ```\n *\n * When `hidden === true`, the returned props make the element:\n * - absent from the accessibility tree (`aria-hidden`, `hidden`),\n * - unreachable via Tab (`tabIndex={-1}`, `inert`),\n * - non-interactive (`inert`).\n *\n * When `hidden === false`, every returned attribute is `undefined`, so spreading\n * the object is a no-op and the element behaves exactly as normal. In\n * particular, `aria-hidden` is omitted entirely (never emitted as\n * `aria-hidden=\"false\"`).\n *\n * Exact attribute values rendered to the DOM:\n * - hidden: `aria-hidden=\"\"(true)`, `hidden`, `tabindex=\"-1\"`, `inert`\n * - shown: none of the above attributes present\n *\n * **Cross-React-version handling of `inert`:** React 19 supports `inert` as a\n * native boolean prop (`inert={true}` → DOM `inert=\"\"`). React 17/18 do not\n * recognize it and only forward it as a string (`inert=\"true\"` → DOM\n * `inert=\"true\"`). Either of the *other* forms (a boolean on React 17/18, or an\n * empty string on React 19) emits a console warning and/or drops the attribute.\n * We therefore pick the correct form per major version via `React.version`. The\n * resulting DOM attribute is present and falls back to `tabIndex={-1}` +\n * `aria-hidden` on the rare engines lacking `inert` support.\n *\n * **Styling is out of scope.** The HTML `hidden` attribute applies\n * `display: none`. If a consumer needs the element to remain *visible in the\n * layout* (e.g. hidden purely via CSS or kept for transitions), pass\n * `{ setHiddenAttribute: false }` so the `hidden` attribute is omitted while the\n * a11y/focus semantics (`aria-hidden`, `inert`, `tabIndex={-1}`) still apply.\n * The remaining styling is then the consumer's concern.\n *\n * @param hidden Whether the control is currently hidden.\n * @param options Behavior options — see {@link UseInertWhenHiddenOptions}. Use\n * `{ setHiddenAttribute: false }` for elements hidden via CSS/transition.\n * @returns A stable, memoized props object to spread onto the element.\n */\nexport const useInertWhenHidden = (\n hidden: boolean,\n options?: UseInertWhenHiddenOptions,\n): InertWhenHiddenProps => {\n const setHiddenAttribute = options?.setHiddenAttribute ?? true;\n return useMemo(() => {\n if (!hidden) return SHOWN_PROPS;\n return setHiddenAttribute ? HIDDEN_PROPS : HIDDEN_PROPS_WITHOUT_HIDDEN_ATTRIBUTE;\n }, [hidden, setHiddenAttribute]);\n};\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;AAGA,IAAa,WAAW;CACtB,OAAO;CACP,iBAAiB;CACjB,YAAY;CACZ,MAAM;CACN,MAAM;CACN,UAAU;AACZ;;;;;;AAOA,IAAa,cAAc,YAA4C;CACrE,MAAM,CAAC,SAAS,eAAA,GAAA,MAAA,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