stream-chat-react-native-core 5.8.0-beta.5 → 5.8.0-beta.7
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/lib/commonjs/components/Attachment/Attachment.js +45 -56
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/AttachmentActions.js +25 -43
- package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/commonjs/components/Attachment/AudioAttachment.js +114 -191
- package/lib/commonjs/components/Attachment/AudioAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +53 -80
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +30 -57
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +19 -50
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileIcon.js +3 -45
- package/lib/commonjs/components/Attachment/FileIcon.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +121 -162
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/GalleryImage.js +5 -23
- package/lib/commonjs/components/Attachment/GalleryImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +76 -109
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/ImageLoadingFailedIndicator.js +7 -23
- package/lib/commonjs/components/Attachment/ImageLoadingFailedIndicator.js.map +1 -1
- package/lib/commonjs/components/Attachment/ImageLoadingIndicator.js +3 -15
- package/lib/commonjs/components/Attachment/ImageLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/Attachment/VideoThumbnail.js +10 -20
- package/lib/commonjs/components/Attachment/VideoThumbnail.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js +1 -10
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +8 -24
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +22 -35
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +1 -7
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js +4 -7
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +5 -9
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/types.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js +0 -2
- package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js +12 -14
- package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/getGiphyMimeType.js +0 -2
- package/lib/commonjs/components/Attachment/utils/getGiphyMimeType.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/openUrlSafely.js +19 -33
- package/lib/commonjs/components/Attachment/utils/openUrlSafely.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +74 -123
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +4 -18
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerError.js +33 -56
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerError.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +2 -10
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerErrorImage.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +71 -117
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js +33 -59
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/CameraSelectorIcon.js +2 -10
- package/lib/commonjs/components/AttachmentPicker/components/CameraSelectorIcon.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/FileSelectorIcon.js +2 -10
- package/lib/commonjs/components/AttachmentPicker/components/FileSelectorIcon.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +4 -14
- package/lib/commonjs/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/ImageSelectorIcon.js +4 -13
- package/lib/commonjs/components/AttachmentPicker/components/ImageSelectorIcon.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +177 -285
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +6 -24
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +12 -30
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +30 -47
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +21 -49
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +22 -42
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +15 -33
- package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +1136 -1586
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +31 -34
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +40 -43
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +81 -84
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js +1 -11
- package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js +9 -13
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js +9 -13
- package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js +0 -3
- package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useTargetedMessage.js +3 -12
- package/lib/commonjs/components/Channel/hooks/useTargetedMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelList.js +71 -110
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +2 -12
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js +12 -24
- package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +9 -20
- package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js +6 -17
- package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +55 -84
- package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelList/Skeleton.js +16 -33
- package/lib/commonjs/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +28 -50
- package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js +2 -14
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js +2 -14
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js +4 -12
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js +2 -16
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js +28 -49
- package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js +2 -17
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js +28 -50
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js +2 -12
- package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js +1 -12
- package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js +29 -34
- package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +141 -219
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/ChannelList/utils.js +13 -26
- package/lib/commonjs/components/ChannelList/utils.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +3 -19
- package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +14 -44
- package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +4 -15
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +35 -60
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +7 -18
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +10 -24
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +4 -14
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +7 -17
- package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js +4 -27
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js +12 -36
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js +4 -21
- package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js +22 -68
- package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +26 -69
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js +0 -26
- package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js +42 -69
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +8 -11
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js +19 -50
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useMutedUsers.js +3 -11
- package/lib/commonjs/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useSyncDatabase.js +1 -8
- package/lib/commonjs/components/Chat/hooks/useSyncDatabase.js.map +1 -1
- package/lib/commonjs/components/ImageBackground.js +7 -21
- package/lib/commonjs/components/ImageBackground.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +53 -131
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +12 -27
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js +21 -52
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +79 -125
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +26 -56
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js +12 -32
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js +14 -27
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +16 -38
- package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +12 -26
- package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js +15 -52
- package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
- package/lib/commonjs/components/Indicators/EmptyStateIndicator.js +10 -25
- package/lib/commonjs/components/Indicators/EmptyStateIndicator.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingDot.js +10 -21
- package/lib/commonjs/components/Indicators/LoadingDot.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingDots.js +11 -21
- package/lib/commonjs/components/Indicators/LoadingDots.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js +16 -33
- package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +8 -26
- package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js +9 -67
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +22 -68
- package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +246 -335
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +20 -40
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +113 -164
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +27 -49
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +55 -68
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +11 -34
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +37 -57
- package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +13 -30
- package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +37 -57
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +16 -40
- package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +30 -51
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +56 -84
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +23 -37
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js +0 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +22 -66
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +97 -127
- package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +37 -42
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js +108 -171
- package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +141 -225
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/messageActions.js +15 -30
- package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
- package/lib/commonjs/components/MessageInput/AttachButton.js +15 -33
- package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CommandsButton.js +13 -31
- package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/CooldownTimer.js +8 -20
- package/lib/commonjs/components/MessageInput/CooldownTimer.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +48 -86
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +25 -57
- package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/InputButtons.js +47 -69
- package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +176 -236
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +9 -25
- package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendButton.js +15 -33
- package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js +9 -20
- package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +27 -50
- package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js +9 -28
- package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/InputEditingStateHeader.js +14 -34
- package/lib/commonjs/components/MessageInput/components/InputEditingStateHeader.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js +20 -41
- package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/InputReplyStateHeader.js +14 -34
- package/lib/commonjs/components/MessageInput/components/InputReplyStateHeader.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js +6 -24
- package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useCountdown.js +3 -16
- package/lib/commonjs/components/MessageInput/hooks/useCountdown.js.map +1 -1
- package/lib/commonjs/components/MessageList/DateHeader.js +8 -18
- package/lib/commonjs/components/MessageList/DateHeader.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js +9 -22
- package/lib/commonjs/components/MessageList/InlineDateSeparator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +3 -21
- package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -21
- package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -21
- package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js +10 -26
- package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +239 -355
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageSystem.js +14 -27
- package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/commonjs/components/MessageList/NetworkDownIndicator.js +9 -26
- package/lib/commonjs/components/MessageList/NetworkDownIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +16 -27
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicator.js +8 -19
- package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +8 -29
- package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js +10 -34
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js +4 -18
- package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/filterTypingUsers.js +2 -10
- package/lib/commonjs/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js +3 -11
- package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js +5 -18
- package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js +1 -9
- package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getReadStates.js +1 -22
- package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +16 -39
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +16 -36
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +75 -127
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +3 -12
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +39 -77
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +31 -53
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js +5 -14
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -1
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js +2 -5
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -1
- package/lib/commonjs/components/ProgressControl/ProgressControl.js +9 -26
- package/lib/commonjs/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/commonjs/components/RTLComponents/WritingDirectionAwareText.js +3 -13
- package/lib/commonjs/components/RTLComponents/WritingDirectionAwareText.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +37 -79
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/Spinner/Spinner.js +6 -20
- package/lib/commonjs/components/Spinner/Spinner.js.map +1 -1
- package/lib/commonjs/components/Thread/Thread.js +28 -57
- package/lib/commonjs/components/Thread/Thread.js.map +1 -1
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +15 -43
- package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/commonjs/components/docs/data.js +0 -7
- package/lib/commonjs/components/docs/data.js.map +1 -1
- package/lib/commonjs/components/index.js +0 -284
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +2 -18
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +20 -50
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +2 -23
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +2 -23
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +4 -37
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js +63 -81
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -23
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/debugContext/DebugContext.js +3 -17
- package/lib/commonjs/contexts/debugContext/DebugContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +7 -32
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/index.js +0 -48
- package/lib/commonjs/contexts/index.js.map +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +2 -20
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -20
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +531 -762
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +88 -91
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js +19 -44
- package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +2 -24
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js +3 -12
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +40 -52
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -23
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -20
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +76 -124
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +2 -18
- package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -23
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +11 -46
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/ThemeContext.js +5 -28
- package/lib/commonjs/contexts/themeContext/ThemeContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +0 -4
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +2 -23
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +2 -26
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +2 -23
- package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/commonjs/contexts/utils/defaultBaseContextValue.js.map +1 -1
- package/lib/commonjs/contexts/utils/getDisplayName.js +0 -2
- package/lib/commonjs/contexts/utils/getDisplayName.js.map +1 -1
- package/lib/commonjs/contexts/utils/isTestEnvironment.js +0 -2
- package/lib/commonjs/contexts/utils/isTestEnvironment.js.map +1 -1
- package/lib/commonjs/emoji-data/compile.js +2 -4
- package/lib/commonjs/emoji-data/compile.js.map +1 -1
- package/lib/commonjs/emoji-data/compiled.js.map +1 -1
- package/lib/commonjs/emoji-data/emojiNames.js.map +1 -1
- package/lib/commonjs/emoji-data/emojis.js.map +1 -1
- package/lib/commonjs/emoji-data/index.js +1 -7
- package/lib/commonjs/emoji-data/index.js.map +1 -1
- package/lib/commonjs/hooks/index.js +0 -4
- package/lib/commonjs/hooks/index.js.map +1 -1
- package/lib/commonjs/hooks/useAppStateListener.js +0 -7
- package/lib/commonjs/hooks/useAppStateListener.js.map +1 -1
- package/lib/commonjs/hooks/useIsMountedRef.js +0 -3
- package/lib/commonjs/hooks/useIsMountedRef.js.map +1 -1
- package/lib/commonjs/hooks/useLoadingImage.js +7 -16
- package/lib/commonjs/hooks/useLoadingImage.js.map +1 -1
- package/lib/commonjs/hooks/useStreami18n.js +4 -16
- package/lib/commonjs/hooks/useStreami18n.js.map +1 -1
- package/lib/commonjs/hooks/useTranslatedMessage.js +1 -11
- package/lib/commonjs/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/commonjs/icons/ArrowRight.js +1 -8
- package/lib/commonjs/icons/ArrowRight.js.map +1 -1
- package/lib/commonjs/icons/AtMentions.js +1 -8
- package/lib/commonjs/icons/AtMentions.js.map +1 -1
- package/lib/commonjs/icons/Attach.js +1 -8
- package/lib/commonjs/icons/Attach.js.map +1 -1
- package/lib/commonjs/icons/Audio.js +1 -9
- package/lib/commonjs/icons/Audio.js.map +1 -1
- package/lib/commonjs/icons/CSV.js +1 -8
- package/lib/commonjs/icons/CSV.js.map +1 -1
- package/lib/commonjs/icons/Camera.js +1 -8
- package/lib/commonjs/icons/Camera.js.map +1 -1
- package/lib/commonjs/icons/Check.js +1 -8
- package/lib/commonjs/icons/Check.js.map +1 -1
- package/lib/commonjs/icons/CheckAll.js +1 -8
- package/lib/commonjs/icons/CheckAll.js.map +1 -1
- package/lib/commonjs/icons/CheckSend.js +1 -8
- package/lib/commonjs/icons/CheckSend.js.map +1 -1
- package/lib/commonjs/icons/CircleClose.js +1 -8
- package/lib/commonjs/icons/CircleClose.js.map +1 -1
- package/lib/commonjs/icons/CirclePlus.js +1 -8
- package/lib/commonjs/icons/CirclePlus.js.map +1 -1
- package/lib/commonjs/icons/CircleRight.js +1 -8
- package/lib/commonjs/icons/CircleRight.js.map +1 -1
- package/lib/commonjs/icons/Close.js +1 -8
- package/lib/commonjs/icons/Close.js.map +1 -1
- package/lib/commonjs/icons/Copy.js +1 -8
- package/lib/commonjs/icons/Copy.js.map +1 -1
- package/lib/commonjs/icons/CurveLineLeftUp.js +1 -8
- package/lib/commonjs/icons/CurveLineLeftUp.js.map +1 -1
- package/lib/commonjs/icons/DOC.js +1 -9
- package/lib/commonjs/icons/DOC.js.map +1 -1
- package/lib/commonjs/icons/DOCX.js +1 -9
- package/lib/commonjs/icons/DOCX.js.map +1 -1
- package/lib/commonjs/icons/Delete.js +1 -8
- package/lib/commonjs/icons/Delete.js.map +1 -1
- package/lib/commonjs/icons/Down.js +1 -8
- package/lib/commonjs/icons/Down.js.map +1 -1
- package/lib/commonjs/icons/DownloadArrow.js +1 -8
- package/lib/commonjs/icons/DownloadArrow.js.map +1 -1
- package/lib/commonjs/icons/DownloadCloud.js +1 -8
- package/lib/commonjs/icons/DownloadCloud.js.map +1 -1
- package/lib/commonjs/icons/Edit.js +1 -8
- package/lib/commonjs/icons/Edit.js.map +1 -1
- package/lib/commonjs/icons/Error.js +1 -8
- package/lib/commonjs/icons/Error.js.map +1 -1
- package/lib/commonjs/icons/Eye.js +1 -8
- package/lib/commonjs/icons/Eye.js.map +1 -1
- package/lib/commonjs/icons/Flag.js +1 -8
- package/lib/commonjs/icons/Flag.js.map +1 -1
- package/lib/commonjs/icons/Folder.js +1 -8
- package/lib/commonjs/icons/Folder.js.map +1 -1
- package/lib/commonjs/icons/GenericFile.js +1 -9
- package/lib/commonjs/icons/GenericFile.js.map +1 -1
- package/lib/commonjs/icons/GiphyIcon.js +1 -8
- package/lib/commonjs/icons/GiphyIcon.js.map +1 -1
- package/lib/commonjs/icons/Grid.js +1 -8
- package/lib/commonjs/icons/Grid.js.map +1 -1
- package/lib/commonjs/icons/Group.js +1 -8
- package/lib/commonjs/icons/Group.js.map +1 -1
- package/lib/commonjs/icons/HTML.js +1 -8
- package/lib/commonjs/icons/HTML.js.map +1 -1
- package/lib/commonjs/icons/Imgur.js +1 -9
- package/lib/commonjs/icons/Imgur.js.map +1 -1
- package/lib/commonjs/icons/LOLReaction.js +1 -8
- package/lib/commonjs/icons/LOLReaction.js.map +1 -1
- package/lib/commonjs/icons/Lightning.js +1 -8
- package/lib/commonjs/icons/Lightning.js.map +1 -1
- package/lib/commonjs/icons/Link.js +1 -8
- package/lib/commonjs/icons/Link.js.map +1 -1
- package/lib/commonjs/icons/Loading.js +12 -20
- package/lib/commonjs/icons/Loading.js.map +1 -1
- package/lib/commonjs/icons/Logo.js +1 -8
- package/lib/commonjs/icons/Logo.js.map +1 -1
- package/lib/commonjs/icons/LoveReaction.js +1 -8
- package/lib/commonjs/icons/LoveReaction.js.map +1 -1
- package/lib/commonjs/icons/MD.js +1 -8
- package/lib/commonjs/icons/MD.js.map +1 -1
- package/lib/commonjs/icons/MailOpen.js +1 -8
- package/lib/commonjs/icons/MailOpen.js.map +1 -1
- package/lib/commonjs/icons/MenuPointHorizontal.js +1 -8
- package/lib/commonjs/icons/MenuPointHorizontal.js.map +1 -1
- package/lib/commonjs/icons/MenuPointVertical.js +1 -8
- package/lib/commonjs/icons/MenuPointVertical.js.map +1 -1
- package/lib/commonjs/icons/MessageFlag.js +1 -8
- package/lib/commonjs/icons/MessageFlag.js.map +1 -1
- package/lib/commonjs/icons/MessageIcon.js +1 -8
- package/lib/commonjs/icons/MessageIcon.js.map +1 -1
- package/lib/commonjs/icons/Mute.js +1 -8
- package/lib/commonjs/icons/Mute.js.map +1 -1
- package/lib/commonjs/icons/Notification.js +1 -8
- package/lib/commonjs/icons/Notification.js.map +1 -1
- package/lib/commonjs/icons/ODT.js +1 -8
- package/lib/commonjs/icons/ODT.js.map +1 -1
- package/lib/commonjs/icons/PDF.js +1 -8
- package/lib/commonjs/icons/PDF.js.map +1 -1
- package/lib/commonjs/icons/PPT.js +1 -9
- package/lib/commonjs/icons/PPT.js.map +1 -1
- package/lib/commonjs/icons/PPTX.js +1 -9
- package/lib/commonjs/icons/PPTX.js.map +1 -1
- package/lib/commonjs/icons/Pause.js +2 -10
- package/lib/commonjs/icons/Pause.js.map +1 -1
- package/lib/commonjs/icons/Picture.js +1 -8
- package/lib/commonjs/icons/Picture.js.map +1 -1
- package/lib/commonjs/icons/Pin.js +1 -8
- package/lib/commonjs/icons/Pin.js.map +1 -1
- package/lib/commonjs/icons/PinHeader.js +1 -8
- package/lib/commonjs/icons/PinHeader.js.map +1 -1
- package/lib/commonjs/icons/Play.js +1 -8
- package/lib/commonjs/icons/Play.js.map +1 -1
- package/lib/commonjs/icons/RAR.js +1 -8
- package/lib/commonjs/icons/RAR.js.map +1 -1
- package/lib/commonjs/icons/RTF.js +1 -8
- package/lib/commonjs/icons/RTF.js.map +1 -1
- package/lib/commonjs/icons/Recorder.js +1 -8
- package/lib/commonjs/icons/Recorder.js.map +1 -1
- package/lib/commonjs/icons/Refresh.js +1 -8
- package/lib/commonjs/icons/Refresh.js.map +1 -1
- package/lib/commonjs/icons/SEVEN_Z.js +1 -8
- package/lib/commonjs/icons/SEVEN_Z.js.map +1 -1
- package/lib/commonjs/icons/Search.js +1 -8
- package/lib/commonjs/icons/Search.js.map +1 -1
- package/lib/commonjs/icons/SendRight.js +1 -8
- package/lib/commonjs/icons/SendRight.js.map +1 -1
- package/lib/commonjs/icons/SendUp.js +1 -8
- package/lib/commonjs/icons/SendUp.js.map +1 -1
- package/lib/commonjs/icons/Share.js +1 -9
- package/lib/commonjs/icons/Share.js.map +1 -1
- package/lib/commonjs/icons/ShareRightArrow.js +1 -8
- package/lib/commonjs/icons/ShareRightArrow.js.map +1 -1
- package/lib/commonjs/icons/Smile.js +1 -8
- package/lib/commonjs/icons/Smile.js.map +1 -1
- package/lib/commonjs/icons/Sound.js +1 -8
- package/lib/commonjs/icons/Sound.js.map +1 -1
- package/lib/commonjs/icons/TAR.js +1 -8
- package/lib/commonjs/icons/TAR.js.map +1 -1
- package/lib/commonjs/icons/TXT.js +1 -8
- package/lib/commonjs/icons/TXT.js.map +1 -1
- package/lib/commonjs/icons/ThreadReply.js +1 -8
- package/lib/commonjs/icons/ThreadReply.js.map +1 -1
- package/lib/commonjs/icons/ThumbsDownReaction.js +1 -8
- package/lib/commonjs/icons/ThumbsDownReaction.js.map +1 -1
- package/lib/commonjs/icons/ThumbsUpReaction.js +1 -8
- package/lib/commonjs/icons/ThumbsUpReaction.js.map +1 -1
- package/lib/commonjs/icons/Time.js +1 -8
- package/lib/commonjs/icons/Time.js.map +1 -1
- package/lib/commonjs/icons/Unknown.js +1 -8
- package/lib/commonjs/icons/Unknown.js.map +1 -1
- package/lib/commonjs/icons/Unpin.js +1 -8
- package/lib/commonjs/icons/Unpin.js.map +1 -1
- package/lib/commonjs/icons/User.js +1 -8
- package/lib/commonjs/icons/User.js.map +1 -1
- package/lib/commonjs/icons/UserAdd.js +1 -8
- package/lib/commonjs/icons/UserAdd.js.map +1 -1
- package/lib/commonjs/icons/UserAdmin.js +3 -12
- package/lib/commonjs/icons/UserAdmin.js.map +1 -1
- package/lib/commonjs/icons/UserDelete.js +1 -8
- package/lib/commonjs/icons/UserDelete.js.map +1 -1
- package/lib/commonjs/icons/UserMinus.js +1 -8
- package/lib/commonjs/icons/UserMinus.js.map +1 -1
- package/lib/commonjs/icons/Video.js +1 -8
- package/lib/commonjs/icons/Video.js.map +1 -1
- package/lib/commonjs/icons/Warning.js +1 -8
- package/lib/commonjs/icons/Warning.js.map +1 -1
- package/lib/commonjs/icons/WutReaction.js +1 -8
- package/lib/commonjs/icons/WutReaction.js.map +1 -1
- package/lib/commonjs/icons/XLS.js +1 -9
- package/lib/commonjs/icons/XLS.js.map +1 -1
- package/lib/commonjs/icons/XLSX.js +1 -9
- package/lib/commonjs/icons/XLSX.js.map +1 -1
- package/lib/commonjs/icons/ZIP.js +1 -8
- package/lib/commonjs/icons/ZIP.js.map +1 -1
- package/lib/commonjs/icons/index.js +0 -168
- package/lib/commonjs/icons/index.js.map +1 -1
- package/lib/commonjs/icons/utils/base.js +11 -25
- package/lib/commonjs/icons/utils/base.js.map +1 -1
- package/lib/commonjs/index.js +0 -35
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/init.js +0 -3
- package/lib/commonjs/init.js.map +1 -1
- package/lib/commonjs/mock-builders/DB/consts.js.map +1 -1
- package/lib/commonjs/mock-builders/DB/mock.js +0 -11
- package/lib/commonjs/mock-builders/DB/mock.js.map +1 -1
- package/lib/commonjs/mock-builders/api/channelMocks.js +0 -2
- package/lib/commonjs/mock-builders/api/channelMocks.js.map +1 -1
- package/lib/commonjs/mock-builders/api/deleteMessage.js +0 -4
- package/lib/commonjs/mock-builders/api/deleteMessage.js.map +1 -1
- package/lib/commonjs/mock-builders/api/deleteReaction.js +0 -4
- package/lib/commonjs/mock-builders/api/deleteReaction.js.map +1 -1
- package/lib/commonjs/mock-builders/api/error.js +0 -12
- package/lib/commonjs/mock-builders/api/error.js.map +1 -1
- package/lib/commonjs/mock-builders/api/getOrCreateChannel.js +0 -3
- package/lib/commonjs/mock-builders/api/getOrCreateChannel.js.map +1 -1
- package/lib/commonjs/mock-builders/api/queryChannels.js +0 -3
- package/lib/commonjs/mock-builders/api/queryChannels.js.map +1 -1
- package/lib/commonjs/mock-builders/api/queryMembers.js +0 -3
- package/lib/commonjs/mock-builders/api/queryMembers.js.map +1 -1
- package/lib/commonjs/mock-builders/api/sendMessage.js +0 -4
- package/lib/commonjs/mock-builders/api/sendMessage.js.map +1 -1
- package/lib/commonjs/mock-builders/api/sendReaction.js +0 -4
- package/lib/commonjs/mock-builders/api/sendReaction.js.map +1 -1
- package/lib/commonjs/mock-builders/api/threadReplies.js +0 -3
- package/lib/commonjs/mock-builders/api/threadReplies.js.map +1 -1
- package/lib/commonjs/mock-builders/api/useMockedApis.js +1 -3
- package/lib/commonjs/mock-builders/api/useMockedApis.js.map +1 -1
- package/lib/commonjs/mock-builders/api/utils.js +0 -2
- package/lib/commonjs/mock-builders/api/utils.js.map +1 -1
- package/lib/commonjs/mock-builders/event/channelDeleted.js +0 -2
- package/lib/commonjs/mock-builders/event/channelDeleted.js.map +1 -1
- package/lib/commonjs/mock-builders/event/channelHidden.js +0 -2
- package/lib/commonjs/mock-builders/event/channelHidden.js.map +1 -1
- package/lib/commonjs/mock-builders/event/channelTruncated.js +0 -2
- package/lib/commonjs/mock-builders/event/channelTruncated.js.map +1 -1
- package/lib/commonjs/mock-builders/event/channelUpdated.js +0 -2
- package/lib/commonjs/mock-builders/event/channelUpdated.js.map +1 -1
- package/lib/commonjs/mock-builders/event/connectionChanged.js +0 -2
- package/lib/commonjs/mock-builders/event/connectionChanged.js.map +1 -1
- package/lib/commonjs/mock-builders/event/connectionRecovered.js +0 -2
- package/lib/commonjs/mock-builders/event/connectionRecovered.js.map +1 -1
- package/lib/commonjs/mock-builders/event/memberAdded.js +0 -2
- package/lib/commonjs/mock-builders/event/memberAdded.js.map +1 -1
- package/lib/commonjs/mock-builders/event/memberRemoved.js +0 -2
- package/lib/commonjs/mock-builders/event/memberRemoved.js.map +1 -1
- package/lib/commonjs/mock-builders/event/memberUpdated.js +0 -2
- package/lib/commonjs/mock-builders/event/memberUpdated.js.map +1 -1
- package/lib/commonjs/mock-builders/event/messageDeleted.js +0 -2
- package/lib/commonjs/mock-builders/event/messageDeleted.js.map +1 -1
- package/lib/commonjs/mock-builders/event/messageNew.js +0 -2
- package/lib/commonjs/mock-builders/event/messageNew.js.map +1 -1
- package/lib/commonjs/mock-builders/event/messageRead.js +0 -2
- package/lib/commonjs/mock-builders/event/messageRead.js.map +1 -1
- package/lib/commonjs/mock-builders/event/messageUpdated.js +0 -2
- package/lib/commonjs/mock-builders/event/messageUpdated.js.map +1 -1
- package/lib/commonjs/mock-builders/event/notificationAddedToChannel.js +0 -2
- package/lib/commonjs/mock-builders/event/notificationAddedToChannel.js.map +1 -1
- package/lib/commonjs/mock-builders/event/notificationMessageNew.js +0 -2
- package/lib/commonjs/mock-builders/event/notificationMessageNew.js.map +1 -1
- package/lib/commonjs/mock-builders/event/notificationMutesUpdated.js +0 -4
- package/lib/commonjs/mock-builders/event/notificationMutesUpdated.js.map +1 -1
- package/lib/commonjs/mock-builders/event/notificationRemovedFromChannel.js +0 -2
- package/lib/commonjs/mock-builders/event/notificationRemovedFromChannel.js.map +1 -1
- package/lib/commonjs/mock-builders/event/reactionDeleted.js +0 -2
- package/lib/commonjs/mock-builders/event/reactionDeleted.js.map +1 -1
- package/lib/commonjs/mock-builders/event/reactionNew.js +0 -2
- package/lib/commonjs/mock-builders/event/reactionNew.js.map +1 -1
- package/lib/commonjs/mock-builders/event/reactionUpdated.js +0 -2
- package/lib/commonjs/mock-builders/event/reactionUpdated.js.map +1 -1
- package/lib/commonjs/mock-builders/event/typing.js +0 -2
- package/lib/commonjs/mock-builders/event/typing.js.map +1 -1
- package/lib/commonjs/mock-builders/event/userPresence.js +0 -2
- package/lib/commonjs/mock-builders/event/userPresence.js.map +1 -1
- package/lib/commonjs/mock-builders/event/userUpdated.js +0 -2
- package/lib/commonjs/mock-builders/event/userUpdated.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/attachment.js +0 -24
- package/lib/commonjs/mock-builders/generator/attachment.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/channel.js +13 -28
- package/lib/commonjs/mock-builders/generator/channel.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/member.js +0 -5
- package/lib/commonjs/mock-builders/generator/member.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/message.js +0 -8
- package/lib/commonjs/mock-builders/generator/message.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/reaction.js +0 -5
- package/lib/commonjs/mock-builders/generator/reaction.js.map +1 -1
- package/lib/commonjs/mock-builders/generator/user.js +0 -10
- package/lib/commonjs/mock-builders/generator/user.js.map +1 -1
- package/lib/commonjs/mock-builders/mock.js +23 -47
- package/lib/commonjs/mock-builders/mock.js.map +1 -1
- package/lib/commonjs/mock-builders/native/react-native-mock.js.map +1 -1
- package/lib/commonjs/native.js +0 -23
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/store/QuickSqliteClient.js +2 -49
- package/lib/commonjs/store/QuickSqliteClient.js.map +1 -1
- package/lib/commonjs/store/QuickSqliteClient_v4.js +12 -41
- package/lib/commonjs/store/QuickSqliteClient_v4.js.map +1 -1
- package/lib/commonjs/store/apis/addPendingTask.js +3 -12
- package/lib/commonjs/store/apis/addPendingTask.js.map +1 -1
- package/lib/commonjs/store/apis/deleteChannel.js +2 -8
- package/lib/commonjs/store/apis/deleteChannel.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMember.js +3 -9
- package/lib/commonjs/store/apis/deleteMember.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMessage.js +2 -8
- package/lib/commonjs/store/apis/deleteMessage.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMessagesForChannel.js +2 -8
- package/lib/commonjs/store/apis/deleteMessagesForChannel.js.map +1 -1
- package/lib/commonjs/store/apis/deletePendingTask.js +0 -6
- package/lib/commonjs/store/apis/deletePendingTask.js.map +1 -1
- package/lib/commonjs/store/apis/deleteReaction.js +4 -10
- package/lib/commonjs/store/apis/deleteReaction.js.map +1 -1
- package/lib/commonjs/store/apis/deleteReactions.js +2 -8
- package/lib/commonjs/store/apis/deleteReactions.js.map +1 -1
- package/lib/commonjs/store/apis/getAllChannelIds.js +0 -3
- package/lib/commonjs/store/apis/getAllChannelIds.js.map +1 -1
- package/lib/commonjs/store/apis/getAppSettings.js +0 -7
- package/lib/commonjs/store/apis/getAppSettings.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelMessages.js +1 -8
- package/lib/commonjs/store/apis/getChannelMessages.js.map +1 -1
- package/lib/commonjs/store/apis/getChannels.js +1 -10
- package/lib/commonjs/store/apis/getChannels.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js +2 -10
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/getLastSyncedAt.js +0 -7
- package/lib/commonjs/store/apis/getLastSyncedAt.js.map +1 -1
- package/lib/commonjs/store/apis/getMembers.js +0 -5
- package/lib/commonjs/store/apis/getMembers.js.map +1 -1
- package/lib/commonjs/store/apis/getPendingTasks.js +0 -7
- package/lib/commonjs/store/apis/getPendingTasks.js.map +1 -1
- package/lib/commonjs/store/apis/getReads.js +0 -5
- package/lib/commonjs/store/apis/getReads.js.map +1 -1
- package/lib/commonjs/store/apis/index.js +0 -46
- package/lib/commonjs/store/apis/index.js.map +1 -1
- package/lib/commonjs/store/apis/insertReaction.js +2 -9
- package/lib/commonjs/store/apis/insertReaction.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js +1 -9
- package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectChannels.js +1 -8
- package/lib/commonjs/store/apis/queries/selectChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectMembersForChannels.js +0 -6
- package/lib/commonjs/store/apis/queries/selectMembersForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js +0 -6
- package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js +0 -6
- package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectReadsForChannels.js +0 -6
- package/lib/commonjs/store/apis/queries/selectReadsForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/updateMessage.js +2 -22
- package/lib/commonjs/store/apis/updateMessage.js.map +1 -1
- package/lib/commonjs/store/apis/updateReaction.js +4 -18
- package/lib/commonjs/store/apis/updateReaction.js.map +1 -1
- package/lib/commonjs/store/apis/upsertAppSettings.js +3 -8
- package/lib/commonjs/store/apis/upsertAppSettings.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannelData.js +2 -9
- package/lib/commonjs/store/apis/upsertChannelData.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannels.js +8 -26
- package/lib/commonjs/store/apis/upsertChannels.js.map +1 -1
- package/lib/commonjs/store/apis/upsertCidsForQuery.js +4 -11
- package/lib/commonjs/store/apis/upsertCidsForQuery.js.map +1 -1
- package/lib/commonjs/store/apis/upsertLastSyncedAt.js +1 -6
- package/lib/commonjs/store/apis/upsertLastSyncedAt.js.map +1 -1
- package/lib/commonjs/store/apis/upsertMembers.js +3 -12
- package/lib/commonjs/store/apis/upsertMembers.js.map +1 -1
- package/lib/commonjs/store/apis/upsertMessages.js +2 -16
- package/lib/commonjs/store/apis/upsertMessages.js.map +1 -1
- package/lib/commonjs/store/apis/upsertReads.js +3 -12
- package/lib/commonjs/store/apis/upsertReads.js.map +1 -1
- package/lib/commonjs/store/apis/utils/convertFilterSortToQuery.js +1 -3
- package/lib/commonjs/store/apis/utils/convertFilterSortToQuery.js.map +1 -1
- package/lib/commonjs/store/constants.js.map +1 -1
- package/lib/commonjs/store/mappers/mapChannelDataToStorable.js +23 -29
- package/lib/commonjs/store/mappers/mapChannelDataToStorable.js.map +1 -1
- package/lib/commonjs/store/mappers/mapDateTimeToStorable.js +0 -2
- package/lib/commonjs/store/mappers/mapDateTimeToStorable.js.map +1 -1
- package/lib/commonjs/store/mappers/mapMemberToStorable.js +11 -14
- package/lib/commonjs/store/mappers/mapMemberToStorable.js.map +1 -1
- package/lib/commonjs/store/mappers/mapMessageToStorable.js +12 -18
- package/lib/commonjs/store/mappers/mapMessageToStorable.js.map +1 -1
- package/lib/commonjs/store/mappers/mapReactionToStorable.js +6 -12
- package/lib/commonjs/store/mappers/mapReactionToStorable.js.map +1 -1
- package/lib/commonjs/store/mappers/mapReadToStorable.js +3 -6
- package/lib/commonjs/store/mappers/mapReadToStorable.js.map +1 -1
- package/lib/commonjs/store/mappers/mapStorableToChannel.js +23 -27
- package/lib/commonjs/store/mappers/mapStorableToChannel.js.map +1 -1
- package/lib/commonjs/store/mappers/mapStorableToMember.js +11 -14
- package/lib/commonjs/store/mappers/mapStorableToMember.js.map +1 -1
- package/lib/commonjs/store/mappers/mapStorableToMessage.js +8 -17
- package/lib/commonjs/store/mappers/mapStorableToMessage.js.map +1 -1
- package/lib/commonjs/store/mappers/mapStorableToReaction.js +6 -11
- package/lib/commonjs/store/mappers/mapStorableToReaction.js.map +1 -1
- package/lib/commonjs/store/mappers/mapStorableToRead.js +2 -5
- package/lib/commonjs/store/mappers/mapStorableToRead.js.map +1 -1
- package/lib/commonjs/store/mappers/mapStorableToTask.js +4 -6
- package/lib/commonjs/store/mappers/mapStorableToTask.js.map +1 -1
- package/lib/commonjs/store/mappers/mapStorableToUser.js +7 -11
- package/lib/commonjs/store/mappers/mapStorableToUser.js.map +1 -1
- package/lib/commonjs/store/mappers/mapTaskToStorable.js +0 -4
- package/lib/commonjs/store/mappers/mapTaskToStorable.js.map +1 -1
- package/lib/commonjs/store/mappers/mapUserToStorable.js +7 -12
- package/lib/commonjs/store/mappers/mapUserToStorable.js.map +1 -1
- package/lib/commonjs/store/schema.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/appendOrderByClause.js +0 -5
- package/lib/commonjs/store/sqlite-utils/appendOrderByClause.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/appendWhereCluase.js +0 -8
- package/lib/commonjs/store/sqlite-utils/appendWhereCluase.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/createCreateTableQuery.js +2 -10
- package/lib/commonjs/store/sqlite-utils/createCreateTableQuery.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/createDeleteQuery.js +0 -3
- package/lib/commonjs/store/sqlite-utils/createDeleteQuery.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/createSelectQuery.js +5 -14
- package/lib/commonjs/store/sqlite-utils/createSelectQuery.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/createUpdateQuery.js +3 -11
- package/lib/commonjs/store/sqlite-utils/createUpdateQuery.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/createUpsertQuery.js +0 -5
- package/lib/commonjs/store/sqlite-utils/createUpsertQuery.js.map +1 -1
- package/lib/commonjs/store/sqlite-utils/printRow.js +0 -5
- package/lib/commonjs/store/sqlite-utils/printRow.js.map +1 -1
- package/lib/commonjs/store/types.js.map +1 -1
- package/lib/commonjs/test-utils/BetterSqlite.js +0 -11
- package/lib/commonjs/test-utils/BetterSqlite.js.map +1 -1
- package/lib/commonjs/types/types.js.map +1 -1
- package/lib/commonjs/utils/DBSyncManager.js +217 -321
- package/lib/commonjs/utils/DBSyncManager.js.map +1 -1
- package/lib/commonjs/utils/Streami18n.js +74 -181
- package/lib/commonjs/utils/Streami18n.js.map +1 -1
- package/lib/commonjs/utils/addReactionToLocalState.js +4 -21
- package/lib/commonjs/utils/addReactionToLocalState.js.map +1 -1
- package/lib/commonjs/utils/date.js +0 -2
- package/lib/commonjs/utils/date.js.map +1 -1
- package/lib/commonjs/utils/getResizedImageUrl.js +4 -10
- package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -1
- package/lib/commonjs/utils/getUrlOfImageAttachment.js +0 -1
- package/lib/commonjs/utils/getUrlOfImageAttachment.js.map +1 -1
- package/lib/commonjs/utils/patchMessageTextCommand.js +0 -6
- package/lib/commonjs/utils/patchMessageTextCommand.js.map +1 -1
- package/lib/commonjs/utils/removeReactionFromLocalState.js +3 -9
- package/lib/commonjs/utils/removeReactionFromLocalState.js.map +1 -1
- package/lib/commonjs/utils/removeReservedFields.js +0 -4
- package/lib/commonjs/utils/removeReservedFields.js.map +1 -1
- package/lib/commonjs/utils/utils.js +86 -179
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +45 -56
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/AttachmentActions.js +25 -43
- package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
- package/lib/module/components/Attachment/AudioAttachment.js +114 -191
- package/lib/module/components/Attachment/AudioAttachment.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +53 -80
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +30 -57
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +19 -50
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/FileIcon.js +3 -45
- package/lib/module/components/Attachment/FileIcon.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +121 -162
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/GalleryImage.js +5 -23
- package/lib/module/components/Attachment/GalleryImage.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +76 -109
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/ImageLoadingFailedIndicator.js +7 -23
- package/lib/module/components/Attachment/ImageLoadingFailedIndicator.js.map +1 -1
- package/lib/module/components/Attachment/ImageLoadingIndicator.js +3 -15
- package/lib/module/components/Attachment/ImageLoadingIndicator.js.map +1 -1
- package/lib/module/components/Attachment/VideoThumbnail.js +10 -20
- package/lib/module/components/Attachment/VideoThumbnail.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js +1 -10
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +8 -24
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +22 -35
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +1 -7
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +4 -7
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +5 -9
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/types.js.map +1 -1
- package/lib/module/components/Attachment/utils/getAspectRatio.js +0 -2
- package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -1
- package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js +12 -14
- package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -1
- package/lib/module/components/Attachment/utils/getGiphyMimeType.js +0 -2
- package/lib/module/components/Attachment/utils/getGiphyMimeType.js.map +1 -1
- package/lib/module/components/Attachment/utils/openUrlSafely.js +19 -33
- package/lib/module/components/Attachment/utils/openUrlSafely.js.map +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +74 -123
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js +4 -18
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerError.js +33 -56
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerError.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerErrorImage.js +2 -10
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerErrorImage.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +71 -117
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js +33 -59
- package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/CameraSelectorIcon.js +2 -10
- package/lib/module/components/AttachmentPicker/components/CameraSelectorIcon.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/FileSelectorIcon.js +2 -10
- package/lib/module/components/AttachmentPicker/components/FileSelectorIcon.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js +4 -14
- package/lib/module/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/ImageSelectorIcon.js +4 -13
- package/lib/module/components/AttachmentPicker/components/ImageSelectorIcon.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +177 -285
- package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +6 -24
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +12 -30
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +30 -47
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +21 -49
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Avatar/Avatar.js +22 -42
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +15 -33
- package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +1136 -1586
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js +31 -34
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +40 -43
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +81 -84
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js +1 -11
- package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js +9 -13
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js +9 -13
- package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateTypingContext.js +0 -3
- package/lib/module/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useTargetedMessage.js +3 -12
- package/lib/module/components/Channel/hooks/useTargetedMessage.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelList.js +71 -110
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +2 -12
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js +12 -24
- package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +9 -20
- package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js +6 -17
- package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListMessenger.js +55 -84
- package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
- package/lib/module/components/ChannelList/Skeleton.js +16 -33
- package/lib/module/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +28 -50
- package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js +2 -14
- package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js +2 -14
- package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js +4 -12
- package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js +2 -16
- package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js +28 -49
- package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js +2 -17
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js +28 -50
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js +2 -12
- package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js +1 -12
- package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js +29 -34
- package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +141 -219
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/ChannelList/utils.js +13 -26
- package/lib/module/components/ChannelList/utils.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelAvatar.js +3 -19
- package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreview.js +14 -44
- package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +4 -15
- package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +35 -60
- package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +7 -18
- package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +10 -24
- package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +4 -14
- package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +7 -17
- package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js +4 -27
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js +12 -36
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js +4 -21
- package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js +22 -68
- package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +26 -69
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/handleEventToSyncDB.js +0 -26
- package/lib/module/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
- package/lib/module/components/Chat/hooks/useAppSettings.js +42 -69
- package/lib/module/components/Chat/hooks/useAppSettings.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +8 -11
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js +19 -50
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/Chat/hooks/useMutedUsers.js +3 -11
- package/lib/module/components/Chat/hooks/useMutedUsers.js.map +1 -1
- package/lib/module/components/Chat/hooks/useSyncDatabase.js +1 -8
- package/lib/module/components/Chat/hooks/useSyncDatabase.js.map +1 -1
- package/lib/module/components/ImageBackground.js +7 -21
- package/lib/module/components/ImageBackground.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +53 -131
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +12 -27
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js +21 -52
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +79 -125
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +26 -56
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js +12 -32
- package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js +14 -27
- package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGrid.js +16 -38
- package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js +12 -26
- package/lib/module/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
- package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js +15 -52
- package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
- package/lib/module/components/Indicators/EmptyStateIndicator.js +10 -25
- package/lib/module/components/Indicators/EmptyStateIndicator.js.map +1 -1
- package/lib/module/components/Indicators/LoadingDot.js +10 -21
- package/lib/module/components/Indicators/LoadingDot.js.map +1 -1
- package/lib/module/components/Indicators/LoadingDots.js +11 -21
- package/lib/module/components/Indicators/LoadingDots.js.map +1 -1
- package/lib/module/components/Indicators/LoadingErrorIndicator.js +16 -33
- package/lib/module/components/Indicators/LoadingErrorIndicator.js.map +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +8 -26
- package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js +9 -67
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js +22 -68
- package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js.map +1 -1
- package/lib/module/components/Message/Message.js +246 -335
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js +20 -40
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +113 -164
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +27 -49
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +55 -68
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +11 -34
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageReplies.js +37 -57
- package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +13 -30
- package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +37 -57
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageStatus.js +16 -40
- package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +30 -51
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +56 -84
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +23 -37
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js +0 -1
- package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.js +22 -66
- package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +97 -127
- package/lib/module/components/Message/MessageSimple/utils/renderText.test.js.map +1 -1
- package/lib/module/components/Message/hooks/useCreateMessageContext.js +37 -42
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js +108 -171
- package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +141 -225
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/components/Message/utils/messageActions.js +15 -30
- package/lib/module/components/Message/utils/messageActions.js.map +1 -1
- package/lib/module/components/MessageInput/AttachButton.js +15 -33
- package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
- package/lib/module/components/MessageInput/CommandsButton.js +13 -31
- package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
- package/lib/module/components/MessageInput/CooldownTimer.js +8 -20
- package/lib/module/components/MessageInput/CooldownTimer.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +48 -86
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/ImageUploadPreview.js +25 -57
- package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/InputButtons.js +47 -69
- package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +176 -236
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/MoreOptionsButton.js +9 -25
- package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendButton.js +15 -33
- package/lib/module/components/MessageInput/SendButton.js.map +1 -1
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js +9 -20
- package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -1
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +27 -50
- package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
- package/lib/module/components/MessageInput/UploadProgressIndicator.js +9 -28
- package/lib/module/components/MessageInput/UploadProgressIndicator.js.map +1 -1
- package/lib/module/components/MessageInput/components/InputEditingStateHeader.js +14 -34
- package/lib/module/components/MessageInput/components/InputEditingStateHeader.js.map +1 -1
- package/lib/module/components/MessageInput/components/InputGiphySearch.js +20 -41
- package/lib/module/components/MessageInput/components/InputGiphySearch.js.map +1 -1
- package/lib/module/components/MessageInput/components/InputReplyStateHeader.js +14 -34
- package/lib/module/components/MessageInput/components/InputReplyStateHeader.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useCooldown.js +6 -24
- package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useCountdown.js +3 -16
- package/lib/module/components/MessageInput/hooks/useCountdown.js.map +1 -1
- package/lib/module/components/MessageList/DateHeader.js +8 -18
- package/lib/module/components/MessageList/DateHeader.js.map +1 -1
- package/lib/module/components/MessageList/InlineDateSeparator.js +9 -22
- package/lib/module/components/MessageList/InlineDateSeparator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +3 -21
- package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -21
- package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -21
- package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
- package/lib/module/components/MessageList/InlineUnreadIndicator.js +10 -26
- package/lib/module/components/MessageList/InlineUnreadIndicator.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +239 -355
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/MessageSystem.js +14 -27
- package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
- package/lib/module/components/MessageList/NetworkDownIndicator.js +9 -26
- package/lib/module/components/MessageList/NetworkDownIndicator.js.map +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +16 -27
- package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicator.js +8 -19
- package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
- package/lib/module/components/MessageList/TypingIndicatorContainer.js +8 -29
- package/lib/module/components/MessageList/TypingIndicatorContainer.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js +10 -34
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useTypingString.js +4 -18
- package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
- package/lib/module/components/MessageList/utils/filterTypingUsers.js +2 -10
- package/lib/module/components/MessageList/utils/filterTypingUsers.js.map +1 -1
- package/lib/module/components/MessageList/utils/getDateSeparators.js +3 -11
- package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
- package/lib/module/components/MessageList/utils/getGroupStyles.js +5 -18
- package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js +1 -9
- package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
- package/lib/module/components/MessageList/utils/getReadStates.js +1 -22
- package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +16 -39
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +16 -36
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +75 -127
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js +3 -12
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +39 -77
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +31 -53
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js +5 -14
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -1
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js +2 -5
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -1
- package/lib/module/components/ProgressControl/ProgressControl.js +9 -26
- package/lib/module/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/module/components/RTLComponents/WritingDirectionAwareText.js +3 -13
- package/lib/module/components/RTLComponents/WritingDirectionAwareText.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +37 -79
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/Spinner/Spinner.js +6 -20
- package/lib/module/components/Spinner/Spinner.js.map +1 -1
- package/lib/module/components/Thread/Thread.js +28 -57
- package/lib/module/components/Thread/Thread.js.map +1 -1
- package/lib/module/components/Thread/components/ThreadFooterComponent.js +15 -43
- package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
- package/lib/module/components/docs/data.js +0 -7
- package/lib/module/components/docs/data.js.map +1 -1
- package/lib/module/components/index.js +0 -284
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +2 -18
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +20 -50
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +2 -23
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +2 -23
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +4 -37
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js +63 -81
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/chatContext/ChatContext.js +2 -23
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/debugContext/DebugContext.js +3 -17
- package/lib/module/contexts/debugContext/DebugContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +7 -32
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/index.js +0 -48
- package/lib/module/contexts/index.js.map +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +2 -20
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +2 -20
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +531 -762
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +88 -91
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js +19 -44
- package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +2 -24
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js +3 -12
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +40 -52
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js +2 -23
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +1 -20
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +76 -124
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +2 -18
- package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -23
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +11 -46
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/themeContext/ThemeContext.js +5 -28
- package/lib/module/contexts/themeContext/ThemeContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +0 -4
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +2 -23
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +2 -26
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +2 -23
- package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/module/contexts/utils/defaultBaseContextValue.js.map +1 -1
- package/lib/module/contexts/utils/getDisplayName.js +0 -2
- package/lib/module/contexts/utils/getDisplayName.js.map +1 -1
- package/lib/module/contexts/utils/isTestEnvironment.js +0 -2
- package/lib/module/contexts/utils/isTestEnvironment.js.map +1 -1
- package/lib/module/emoji-data/compile.js +2 -4
- package/lib/module/emoji-data/compile.js.map +1 -1
- package/lib/module/emoji-data/compiled.js.map +1 -1
- package/lib/module/emoji-data/emojiNames.js.map +1 -1
- package/lib/module/emoji-data/emojis.js.map +1 -1
- package/lib/module/emoji-data/index.js +1 -7
- package/lib/module/emoji-data/index.js.map +1 -1
- package/lib/module/hooks/index.js +0 -4
- package/lib/module/hooks/index.js.map +1 -1
- package/lib/module/hooks/useAppStateListener.js +0 -7
- package/lib/module/hooks/useAppStateListener.js.map +1 -1
- package/lib/module/hooks/useIsMountedRef.js +0 -3
- package/lib/module/hooks/useIsMountedRef.js.map +1 -1
- package/lib/module/hooks/useLoadingImage.js +7 -16
- package/lib/module/hooks/useLoadingImage.js.map +1 -1
- package/lib/module/hooks/useStreami18n.js +4 -16
- package/lib/module/hooks/useStreami18n.js.map +1 -1
- package/lib/module/hooks/useTranslatedMessage.js +1 -11
- package/lib/module/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/module/icons/ArrowRight.js +1 -8
- package/lib/module/icons/ArrowRight.js.map +1 -1
- package/lib/module/icons/AtMentions.js +1 -8
- package/lib/module/icons/AtMentions.js.map +1 -1
- package/lib/module/icons/Attach.js +1 -8
- package/lib/module/icons/Attach.js.map +1 -1
- package/lib/module/icons/Audio.js +1 -9
- package/lib/module/icons/Audio.js.map +1 -1
- package/lib/module/icons/CSV.js +1 -8
- package/lib/module/icons/CSV.js.map +1 -1
- package/lib/module/icons/Camera.js +1 -8
- package/lib/module/icons/Camera.js.map +1 -1
- package/lib/module/icons/Check.js +1 -8
- package/lib/module/icons/Check.js.map +1 -1
- package/lib/module/icons/CheckAll.js +1 -8
- package/lib/module/icons/CheckAll.js.map +1 -1
- package/lib/module/icons/CheckSend.js +1 -8
- package/lib/module/icons/CheckSend.js.map +1 -1
- package/lib/module/icons/CircleClose.js +1 -8
- package/lib/module/icons/CircleClose.js.map +1 -1
- package/lib/module/icons/CirclePlus.js +1 -8
- package/lib/module/icons/CirclePlus.js.map +1 -1
- package/lib/module/icons/CircleRight.js +1 -8
- package/lib/module/icons/CircleRight.js.map +1 -1
- package/lib/module/icons/Close.js +1 -8
- package/lib/module/icons/Close.js.map +1 -1
- package/lib/module/icons/Copy.js +1 -8
- package/lib/module/icons/Copy.js.map +1 -1
- package/lib/module/icons/CurveLineLeftUp.js +1 -8
- package/lib/module/icons/CurveLineLeftUp.js.map +1 -1
- package/lib/module/icons/DOC.js +1 -9
- package/lib/module/icons/DOC.js.map +1 -1
- package/lib/module/icons/DOCX.js +1 -9
- package/lib/module/icons/DOCX.js.map +1 -1
- package/lib/module/icons/Delete.js +1 -8
- package/lib/module/icons/Delete.js.map +1 -1
- package/lib/module/icons/Down.js +1 -8
- package/lib/module/icons/Down.js.map +1 -1
- package/lib/module/icons/DownloadArrow.js +1 -8
- package/lib/module/icons/DownloadArrow.js.map +1 -1
- package/lib/module/icons/DownloadCloud.js +1 -8
- package/lib/module/icons/DownloadCloud.js.map +1 -1
- package/lib/module/icons/Edit.js +1 -8
- package/lib/module/icons/Edit.js.map +1 -1
- package/lib/module/icons/Error.js +1 -8
- package/lib/module/icons/Error.js.map +1 -1
- package/lib/module/icons/Eye.js +1 -8
- package/lib/module/icons/Eye.js.map +1 -1
- package/lib/module/icons/Flag.js +1 -8
- package/lib/module/icons/Flag.js.map +1 -1
- package/lib/module/icons/Folder.js +1 -8
- package/lib/module/icons/Folder.js.map +1 -1
- package/lib/module/icons/GenericFile.js +1 -9
- package/lib/module/icons/GenericFile.js.map +1 -1
- package/lib/module/icons/GiphyIcon.js +1 -8
- package/lib/module/icons/GiphyIcon.js.map +1 -1
- package/lib/module/icons/Grid.js +1 -8
- package/lib/module/icons/Grid.js.map +1 -1
- package/lib/module/icons/Group.js +1 -8
- package/lib/module/icons/Group.js.map +1 -1
- package/lib/module/icons/HTML.js +1 -8
- package/lib/module/icons/HTML.js.map +1 -1
- package/lib/module/icons/Imgur.js +1 -9
- package/lib/module/icons/Imgur.js.map +1 -1
- package/lib/module/icons/LOLReaction.js +1 -8
- package/lib/module/icons/LOLReaction.js.map +1 -1
- package/lib/module/icons/Lightning.js +1 -8
- package/lib/module/icons/Lightning.js.map +1 -1
- package/lib/module/icons/Link.js +1 -8
- package/lib/module/icons/Link.js.map +1 -1
- package/lib/module/icons/Loading.js +12 -20
- package/lib/module/icons/Loading.js.map +1 -1
- package/lib/module/icons/Logo.js +1 -8
- package/lib/module/icons/Logo.js.map +1 -1
- package/lib/module/icons/LoveReaction.js +1 -8
- package/lib/module/icons/LoveReaction.js.map +1 -1
- package/lib/module/icons/MD.js +1 -8
- package/lib/module/icons/MD.js.map +1 -1
- package/lib/module/icons/MailOpen.js +1 -8
- package/lib/module/icons/MailOpen.js.map +1 -1
- package/lib/module/icons/MenuPointHorizontal.js +1 -8
- package/lib/module/icons/MenuPointHorizontal.js.map +1 -1
- package/lib/module/icons/MenuPointVertical.js +1 -8
- package/lib/module/icons/MenuPointVertical.js.map +1 -1
- package/lib/module/icons/MessageFlag.js +1 -8
- package/lib/module/icons/MessageFlag.js.map +1 -1
- package/lib/module/icons/MessageIcon.js +1 -8
- package/lib/module/icons/MessageIcon.js.map +1 -1
- package/lib/module/icons/Mute.js +1 -8
- package/lib/module/icons/Mute.js.map +1 -1
- package/lib/module/icons/Notification.js +1 -8
- package/lib/module/icons/Notification.js.map +1 -1
- package/lib/module/icons/ODT.js +1 -8
- package/lib/module/icons/ODT.js.map +1 -1
- package/lib/module/icons/PDF.js +1 -8
- package/lib/module/icons/PDF.js.map +1 -1
- package/lib/module/icons/PPT.js +1 -9
- package/lib/module/icons/PPT.js.map +1 -1
- package/lib/module/icons/PPTX.js +1 -9
- package/lib/module/icons/PPTX.js.map +1 -1
- package/lib/module/icons/Pause.js +2 -10
- package/lib/module/icons/Pause.js.map +1 -1
- package/lib/module/icons/Picture.js +1 -8
- package/lib/module/icons/Picture.js.map +1 -1
- package/lib/module/icons/Pin.js +1 -8
- package/lib/module/icons/Pin.js.map +1 -1
- package/lib/module/icons/PinHeader.js +1 -8
- package/lib/module/icons/PinHeader.js.map +1 -1
- package/lib/module/icons/Play.js +1 -8
- package/lib/module/icons/Play.js.map +1 -1
- package/lib/module/icons/RAR.js +1 -8
- package/lib/module/icons/RAR.js.map +1 -1
- package/lib/module/icons/RTF.js +1 -8
- package/lib/module/icons/RTF.js.map +1 -1
- package/lib/module/icons/Recorder.js +1 -8
- package/lib/module/icons/Recorder.js.map +1 -1
- package/lib/module/icons/Refresh.js +1 -8
- package/lib/module/icons/Refresh.js.map +1 -1
- package/lib/module/icons/SEVEN_Z.js +1 -8
- package/lib/module/icons/SEVEN_Z.js.map +1 -1
- package/lib/module/icons/Search.js +1 -8
- package/lib/module/icons/Search.js.map +1 -1
- package/lib/module/icons/SendRight.js +1 -8
- package/lib/module/icons/SendRight.js.map +1 -1
- package/lib/module/icons/SendUp.js +1 -8
- package/lib/module/icons/SendUp.js.map +1 -1
- package/lib/module/icons/Share.js +1 -9
- package/lib/module/icons/Share.js.map +1 -1
- package/lib/module/icons/ShareRightArrow.js +1 -8
- package/lib/module/icons/ShareRightArrow.js.map +1 -1
- package/lib/module/icons/Smile.js +1 -8
- package/lib/module/icons/Smile.js.map +1 -1
- package/lib/module/icons/Sound.js +1 -8
- package/lib/module/icons/Sound.js.map +1 -1
- package/lib/module/icons/TAR.js +1 -8
- package/lib/module/icons/TAR.js.map +1 -1
- package/lib/module/icons/TXT.js +1 -8
- package/lib/module/icons/TXT.js.map +1 -1
- package/lib/module/icons/ThreadReply.js +1 -8
- package/lib/module/icons/ThreadReply.js.map +1 -1
- package/lib/module/icons/ThumbsDownReaction.js +1 -8
- package/lib/module/icons/ThumbsDownReaction.js.map +1 -1
- package/lib/module/icons/ThumbsUpReaction.js +1 -8
- package/lib/module/icons/ThumbsUpReaction.js.map +1 -1
- package/lib/module/icons/Time.js +1 -8
- package/lib/module/icons/Time.js.map +1 -1
- package/lib/module/icons/Unknown.js +1 -8
- package/lib/module/icons/Unknown.js.map +1 -1
- package/lib/module/icons/Unpin.js +1 -8
- package/lib/module/icons/Unpin.js.map +1 -1
- package/lib/module/icons/User.js +1 -8
- package/lib/module/icons/User.js.map +1 -1
- package/lib/module/icons/UserAdd.js +1 -8
- package/lib/module/icons/UserAdd.js.map +1 -1
- package/lib/module/icons/UserAdmin.js +3 -12
- package/lib/module/icons/UserAdmin.js.map +1 -1
- package/lib/module/icons/UserDelete.js +1 -8
- package/lib/module/icons/UserDelete.js.map +1 -1
- package/lib/module/icons/UserMinus.js +1 -8
- package/lib/module/icons/UserMinus.js.map +1 -1
- package/lib/module/icons/Video.js +1 -8
- package/lib/module/icons/Video.js.map +1 -1
- package/lib/module/icons/Warning.js +1 -8
- package/lib/module/icons/Warning.js.map +1 -1
- package/lib/module/icons/WutReaction.js +1 -8
- package/lib/module/icons/WutReaction.js.map +1 -1
- package/lib/module/icons/XLS.js +1 -9
- package/lib/module/icons/XLS.js.map +1 -1
- package/lib/module/icons/XLSX.js +1 -9
- package/lib/module/icons/XLSX.js.map +1 -1
- package/lib/module/icons/ZIP.js +1 -8
- package/lib/module/icons/ZIP.js.map +1 -1
- package/lib/module/icons/index.js +0 -168
- package/lib/module/icons/index.js.map +1 -1
- package/lib/module/icons/utils/base.js +11 -25
- package/lib/module/icons/utils/base.js.map +1 -1
- package/lib/module/index.js +0 -35
- package/lib/module/index.js.map +1 -1
- package/lib/module/init.js +0 -3
- package/lib/module/init.js.map +1 -1
- package/lib/module/mock-builders/DB/consts.js.map +1 -1
- package/lib/module/mock-builders/DB/mock.js +0 -11
- package/lib/module/mock-builders/DB/mock.js.map +1 -1
- package/lib/module/mock-builders/api/channelMocks.js +0 -2
- package/lib/module/mock-builders/api/channelMocks.js.map +1 -1
- package/lib/module/mock-builders/api/deleteMessage.js +0 -4
- package/lib/module/mock-builders/api/deleteMessage.js.map +1 -1
- package/lib/module/mock-builders/api/deleteReaction.js +0 -4
- package/lib/module/mock-builders/api/deleteReaction.js.map +1 -1
- package/lib/module/mock-builders/api/error.js +0 -12
- package/lib/module/mock-builders/api/error.js.map +1 -1
- package/lib/module/mock-builders/api/getOrCreateChannel.js +0 -3
- package/lib/module/mock-builders/api/getOrCreateChannel.js.map +1 -1
- package/lib/module/mock-builders/api/queryChannels.js +0 -3
- package/lib/module/mock-builders/api/queryChannels.js.map +1 -1
- package/lib/module/mock-builders/api/queryMembers.js +0 -3
- package/lib/module/mock-builders/api/queryMembers.js.map +1 -1
- package/lib/module/mock-builders/api/sendMessage.js +0 -4
- package/lib/module/mock-builders/api/sendMessage.js.map +1 -1
- package/lib/module/mock-builders/api/sendReaction.js +0 -4
- package/lib/module/mock-builders/api/sendReaction.js.map +1 -1
- package/lib/module/mock-builders/api/threadReplies.js +0 -3
- package/lib/module/mock-builders/api/threadReplies.js.map +1 -1
- package/lib/module/mock-builders/api/useMockedApis.js +1 -3
- package/lib/module/mock-builders/api/useMockedApis.js.map +1 -1
- package/lib/module/mock-builders/api/utils.js +0 -2
- package/lib/module/mock-builders/api/utils.js.map +1 -1
- package/lib/module/mock-builders/event/channelDeleted.js +0 -2
- package/lib/module/mock-builders/event/channelDeleted.js.map +1 -1
- package/lib/module/mock-builders/event/channelHidden.js +0 -2
- package/lib/module/mock-builders/event/channelHidden.js.map +1 -1
- package/lib/module/mock-builders/event/channelTruncated.js +0 -2
- package/lib/module/mock-builders/event/channelTruncated.js.map +1 -1
- package/lib/module/mock-builders/event/channelUpdated.js +0 -2
- package/lib/module/mock-builders/event/channelUpdated.js.map +1 -1
- package/lib/module/mock-builders/event/connectionChanged.js +0 -2
- package/lib/module/mock-builders/event/connectionChanged.js.map +1 -1
- package/lib/module/mock-builders/event/connectionRecovered.js +0 -2
- package/lib/module/mock-builders/event/connectionRecovered.js.map +1 -1
- package/lib/module/mock-builders/event/memberAdded.js +0 -2
- package/lib/module/mock-builders/event/memberAdded.js.map +1 -1
- package/lib/module/mock-builders/event/memberRemoved.js +0 -2
- package/lib/module/mock-builders/event/memberRemoved.js.map +1 -1
- package/lib/module/mock-builders/event/memberUpdated.js +0 -2
- package/lib/module/mock-builders/event/memberUpdated.js.map +1 -1
- package/lib/module/mock-builders/event/messageDeleted.js +0 -2
- package/lib/module/mock-builders/event/messageDeleted.js.map +1 -1
- package/lib/module/mock-builders/event/messageNew.js +0 -2
- package/lib/module/mock-builders/event/messageNew.js.map +1 -1
- package/lib/module/mock-builders/event/messageRead.js +0 -2
- package/lib/module/mock-builders/event/messageRead.js.map +1 -1
- package/lib/module/mock-builders/event/messageUpdated.js +0 -2
- package/lib/module/mock-builders/event/messageUpdated.js.map +1 -1
- package/lib/module/mock-builders/event/notificationAddedToChannel.js +0 -2
- package/lib/module/mock-builders/event/notificationAddedToChannel.js.map +1 -1
- package/lib/module/mock-builders/event/notificationMessageNew.js +0 -2
- package/lib/module/mock-builders/event/notificationMessageNew.js.map +1 -1
- package/lib/module/mock-builders/event/notificationMutesUpdated.js +0 -4
- package/lib/module/mock-builders/event/notificationMutesUpdated.js.map +1 -1
- package/lib/module/mock-builders/event/notificationRemovedFromChannel.js +0 -2
- package/lib/module/mock-builders/event/notificationRemovedFromChannel.js.map +1 -1
- package/lib/module/mock-builders/event/reactionDeleted.js +0 -2
- package/lib/module/mock-builders/event/reactionDeleted.js.map +1 -1
- package/lib/module/mock-builders/event/reactionNew.js +0 -2
- package/lib/module/mock-builders/event/reactionNew.js.map +1 -1
- package/lib/module/mock-builders/event/reactionUpdated.js +0 -2
- package/lib/module/mock-builders/event/reactionUpdated.js.map +1 -1
- package/lib/module/mock-builders/event/typing.js +0 -2
- package/lib/module/mock-builders/event/typing.js.map +1 -1
- package/lib/module/mock-builders/event/userPresence.js +0 -2
- package/lib/module/mock-builders/event/userPresence.js.map +1 -1
- package/lib/module/mock-builders/event/userUpdated.js +0 -2
- package/lib/module/mock-builders/event/userUpdated.js.map +1 -1
- package/lib/module/mock-builders/generator/attachment.js +0 -24
- package/lib/module/mock-builders/generator/attachment.js.map +1 -1
- package/lib/module/mock-builders/generator/channel.js +13 -28
- package/lib/module/mock-builders/generator/channel.js.map +1 -1
- package/lib/module/mock-builders/generator/member.js +0 -5
- package/lib/module/mock-builders/generator/member.js.map +1 -1
- package/lib/module/mock-builders/generator/message.js +0 -8
- package/lib/module/mock-builders/generator/message.js.map +1 -1
- package/lib/module/mock-builders/generator/reaction.js +0 -5
- package/lib/module/mock-builders/generator/reaction.js.map +1 -1
- package/lib/module/mock-builders/generator/user.js +0 -10
- package/lib/module/mock-builders/generator/user.js.map +1 -1
- package/lib/module/mock-builders/mock.js +23 -47
- package/lib/module/mock-builders/mock.js.map +1 -1
- package/lib/module/mock-builders/native/react-native-mock.js.map +1 -1
- package/lib/module/native.js +0 -23
- package/lib/module/native.js.map +1 -1
- package/lib/module/store/QuickSqliteClient.js +2 -49
- package/lib/module/store/QuickSqliteClient.js.map +1 -1
- package/lib/module/store/QuickSqliteClient_v4.js +12 -41
- package/lib/module/store/QuickSqliteClient_v4.js.map +1 -1
- package/lib/module/store/apis/addPendingTask.js +3 -12
- package/lib/module/store/apis/addPendingTask.js.map +1 -1
- package/lib/module/store/apis/deleteChannel.js +2 -8
- package/lib/module/store/apis/deleteChannel.js.map +1 -1
- package/lib/module/store/apis/deleteMember.js +3 -9
- package/lib/module/store/apis/deleteMember.js.map +1 -1
- package/lib/module/store/apis/deleteMessage.js +2 -8
- package/lib/module/store/apis/deleteMessage.js.map +1 -1
- package/lib/module/store/apis/deleteMessagesForChannel.js +2 -8
- package/lib/module/store/apis/deleteMessagesForChannel.js.map +1 -1
- package/lib/module/store/apis/deletePendingTask.js +0 -6
- package/lib/module/store/apis/deletePendingTask.js.map +1 -1
- package/lib/module/store/apis/deleteReaction.js +4 -10
- package/lib/module/store/apis/deleteReaction.js.map +1 -1
- package/lib/module/store/apis/deleteReactions.js +2 -8
- package/lib/module/store/apis/deleteReactions.js.map +1 -1
- package/lib/module/store/apis/getAllChannelIds.js +0 -3
- package/lib/module/store/apis/getAllChannelIds.js.map +1 -1
- package/lib/module/store/apis/getAppSettings.js +0 -7
- package/lib/module/store/apis/getAppSettings.js.map +1 -1
- package/lib/module/store/apis/getChannelMessages.js +1 -8
- package/lib/module/store/apis/getChannelMessages.js.map +1 -1
- package/lib/module/store/apis/getChannels.js +1 -10
- package/lib/module/store/apis/getChannels.js.map +1 -1
- package/lib/module/store/apis/getChannelsForFilterSort.js +2 -10
- package/lib/module/store/apis/getChannelsForFilterSort.js.map +1 -1
- package/lib/module/store/apis/getLastSyncedAt.js +0 -7
- package/lib/module/store/apis/getLastSyncedAt.js.map +1 -1
- package/lib/module/store/apis/getMembers.js +0 -5
- package/lib/module/store/apis/getMembers.js.map +1 -1
- package/lib/module/store/apis/getPendingTasks.js +0 -7
- package/lib/module/store/apis/getPendingTasks.js.map +1 -1
- package/lib/module/store/apis/getReads.js +0 -5
- package/lib/module/store/apis/getReads.js.map +1 -1
- package/lib/module/store/apis/index.js +0 -46
- package/lib/module/store/apis/index.js.map +1 -1
- package/lib/module/store/apis/insertReaction.js +2 -9
- package/lib/module/store/apis/insertReaction.js.map +1 -1
- package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js +1 -9
- package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
- package/lib/module/store/apis/queries/selectChannels.js +1 -8
- package/lib/module/store/apis/queries/selectChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectMembersForChannels.js +0 -6
- package/lib/module/store/apis/queries/selectMembersForChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectMessagesForChannels.js +0 -6
- package/lib/module/store/apis/queries/selectMessagesForChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectReactionsForMessages.js +0 -6
- package/lib/module/store/apis/queries/selectReactionsForMessages.js.map +1 -1
- package/lib/module/store/apis/queries/selectReadsForChannels.js +0 -6
- package/lib/module/store/apis/queries/selectReadsForChannels.js.map +1 -1
- package/lib/module/store/apis/updateMessage.js +2 -22
- package/lib/module/store/apis/updateMessage.js.map +1 -1
- package/lib/module/store/apis/updateReaction.js +4 -18
- package/lib/module/store/apis/updateReaction.js.map +1 -1
- package/lib/module/store/apis/upsertAppSettings.js +3 -8
- package/lib/module/store/apis/upsertAppSettings.js.map +1 -1
- package/lib/module/store/apis/upsertChannelData.js +2 -9
- package/lib/module/store/apis/upsertChannelData.js.map +1 -1
- package/lib/module/store/apis/upsertChannels.js +8 -26
- package/lib/module/store/apis/upsertChannels.js.map +1 -1
- package/lib/module/store/apis/upsertCidsForQuery.js +4 -11
- package/lib/module/store/apis/upsertCidsForQuery.js.map +1 -1
- package/lib/module/store/apis/upsertLastSyncedAt.js +1 -6
- package/lib/module/store/apis/upsertLastSyncedAt.js.map +1 -1
- package/lib/module/store/apis/upsertMembers.js +3 -12
- package/lib/module/store/apis/upsertMembers.js.map +1 -1
- package/lib/module/store/apis/upsertMessages.js +2 -16
- package/lib/module/store/apis/upsertMessages.js.map +1 -1
- package/lib/module/store/apis/upsertReads.js +3 -12
- package/lib/module/store/apis/upsertReads.js.map +1 -1
- package/lib/module/store/apis/utils/convertFilterSortToQuery.js +1 -3
- package/lib/module/store/apis/utils/convertFilterSortToQuery.js.map +1 -1
- package/lib/module/store/constants.js.map +1 -1
- package/lib/module/store/mappers/mapChannelDataToStorable.js +23 -29
- package/lib/module/store/mappers/mapChannelDataToStorable.js.map +1 -1
- package/lib/module/store/mappers/mapDateTimeToStorable.js +0 -2
- package/lib/module/store/mappers/mapDateTimeToStorable.js.map +1 -1
- package/lib/module/store/mappers/mapMemberToStorable.js +11 -14
- package/lib/module/store/mappers/mapMemberToStorable.js.map +1 -1
- package/lib/module/store/mappers/mapMessageToStorable.js +12 -18
- package/lib/module/store/mappers/mapMessageToStorable.js.map +1 -1
- package/lib/module/store/mappers/mapReactionToStorable.js +6 -12
- package/lib/module/store/mappers/mapReactionToStorable.js.map +1 -1
- package/lib/module/store/mappers/mapReadToStorable.js +3 -6
- package/lib/module/store/mappers/mapReadToStorable.js.map +1 -1
- package/lib/module/store/mappers/mapStorableToChannel.js +23 -27
- package/lib/module/store/mappers/mapStorableToChannel.js.map +1 -1
- package/lib/module/store/mappers/mapStorableToMember.js +11 -14
- package/lib/module/store/mappers/mapStorableToMember.js.map +1 -1
- package/lib/module/store/mappers/mapStorableToMessage.js +8 -17
- package/lib/module/store/mappers/mapStorableToMessage.js.map +1 -1
- package/lib/module/store/mappers/mapStorableToReaction.js +6 -11
- package/lib/module/store/mappers/mapStorableToReaction.js.map +1 -1
- package/lib/module/store/mappers/mapStorableToRead.js +2 -5
- package/lib/module/store/mappers/mapStorableToRead.js.map +1 -1
- package/lib/module/store/mappers/mapStorableToTask.js +4 -6
- package/lib/module/store/mappers/mapStorableToTask.js.map +1 -1
- package/lib/module/store/mappers/mapStorableToUser.js +7 -11
- package/lib/module/store/mappers/mapStorableToUser.js.map +1 -1
- package/lib/module/store/mappers/mapTaskToStorable.js +0 -4
- package/lib/module/store/mappers/mapTaskToStorable.js.map +1 -1
- package/lib/module/store/mappers/mapUserToStorable.js +7 -12
- package/lib/module/store/mappers/mapUserToStorable.js.map +1 -1
- package/lib/module/store/schema.js.map +1 -1
- package/lib/module/store/sqlite-utils/appendOrderByClause.js +0 -5
- package/lib/module/store/sqlite-utils/appendOrderByClause.js.map +1 -1
- package/lib/module/store/sqlite-utils/appendWhereCluase.js +0 -8
- package/lib/module/store/sqlite-utils/appendWhereCluase.js.map +1 -1
- package/lib/module/store/sqlite-utils/createCreateTableQuery.js +2 -10
- package/lib/module/store/sqlite-utils/createCreateTableQuery.js.map +1 -1
- package/lib/module/store/sqlite-utils/createDeleteQuery.js +0 -3
- package/lib/module/store/sqlite-utils/createDeleteQuery.js.map +1 -1
- package/lib/module/store/sqlite-utils/createSelectQuery.js +5 -14
- package/lib/module/store/sqlite-utils/createSelectQuery.js.map +1 -1
- package/lib/module/store/sqlite-utils/createUpdateQuery.js +3 -11
- package/lib/module/store/sqlite-utils/createUpdateQuery.js.map +1 -1
- package/lib/module/store/sqlite-utils/createUpsertQuery.js +0 -5
- package/lib/module/store/sqlite-utils/createUpsertQuery.js.map +1 -1
- package/lib/module/store/sqlite-utils/printRow.js +0 -5
- package/lib/module/store/sqlite-utils/printRow.js.map +1 -1
- package/lib/module/store/types.js.map +1 -1
- package/lib/module/test-utils/BetterSqlite.js +0 -11
- package/lib/module/test-utils/BetterSqlite.js.map +1 -1
- package/lib/module/types/types.js.map +1 -1
- package/lib/module/utils/DBSyncManager.js +217 -321
- package/lib/module/utils/DBSyncManager.js.map +1 -1
- package/lib/module/utils/Streami18n.js +74 -181
- package/lib/module/utils/Streami18n.js.map +1 -1
- package/lib/module/utils/addReactionToLocalState.js +4 -21
- package/lib/module/utils/addReactionToLocalState.js.map +1 -1
- package/lib/module/utils/date.js +0 -2
- package/lib/module/utils/date.js.map +1 -1
- package/lib/module/utils/getResizedImageUrl.js +4 -10
- package/lib/module/utils/getResizedImageUrl.js.map +1 -1
- package/lib/module/utils/getUrlOfImageAttachment.js +0 -1
- package/lib/module/utils/getUrlOfImageAttachment.js.map +1 -1
- package/lib/module/utils/patchMessageTextCommand.js +0 -6
- package/lib/module/utils/patchMessageTextCommand.js.map +1 -1
- package/lib/module/utils/removeReactionFromLocalState.js +3 -9
- package/lib/module/utils/removeReactionFromLocalState.js.map +1 -1
- package/lib/module/utils/removeReservedFields.js +0 -4
- package/lib/module/utils/removeReservedFields.js.map +1 -1
- package/lib/module/utils/utils.js +86 -179
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Attachment.d.ts +1 -0
- package/lib/typescript/components/Attachment/AttachmentActions.d.ts +1 -0
- package/lib/typescript/components/Attachment/AudioAttachment.d.ts +1 -0
- package/lib/typescript/components/Attachment/Card.d.ts +1 -0
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +1 -0
- package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +1 -0
- package/lib/typescript/components/Attachment/Gallery.d.ts +1 -0
- package/lib/typescript/components/Attachment/Giphy.d.ts +1 -0
- package/lib/typescript/components/Attachment/ImageLoadingFailedIndicator.d.ts +1 -0
- package/lib/typescript/components/Attachment/ImageLoadingIndicator.d.ts +1 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +1 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.d.ts +1 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +1 -0
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +1 -0
- package/lib/typescript/components/ChannelList/ChannelListMessenger.d.ts +1 -0
- package/lib/typescript/components/ChannelPreview/ChannelAvatar.d.ts +1 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +1 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +1 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +1 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +1 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +1 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreviewTitle.d.ts +1 -0
- package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts +1 -0
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +1 -0
- package/lib/typescript/components/Message/Message.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/MessageReplies.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/MessageRepliesAvatars.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +1 -0
- package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +1 -0
- package/lib/typescript/components/MessageInput/AttachButton.d.ts +1 -0
- package/lib/typescript/components/MessageInput/CommandsButton.d.ts +1 -0
- package/lib/typescript/components/MessageInput/CooldownTimer.d.ts +1 -0
- package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +1 -0
- package/lib/typescript/components/MessageInput/ImageUploadPreview.d.ts +1 -0
- package/lib/typescript/components/MessageInput/InputButtons.d.ts +1 -0
- package/lib/typescript/components/MessageInput/MessageInput.d.ts +1 -0
- package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +1 -0
- package/lib/typescript/components/MessageInput/SendButton.d.ts +1 -0
- package/lib/typescript/components/MessageInput/SendMessageDisallowedIndicator.d.ts +1 -0
- package/lib/typescript/components/MessageInput/components/InputEditingStateHeader.d.ts +1 -0
- package/lib/typescript/components/MessageInput/components/InputGiphySearch.d.ts +1 -0
- package/lib/typescript/components/MessageInput/components/InputReplyStateHeader.d.ts +1 -0
- package/lib/typescript/components/MessageList/MessageSystem.d.ts +1 -0
- package/lib/typescript/components/MessageList/NetworkDownIndicator.d.ts +1 -0
- package/lib/typescript/components/MessageList/TypingIndicator.d.ts +1 -0
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +1 -0
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +1 -0
- package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts +1 -0
- package/lib/typescript/components/Reply/Reply.d.ts +1 -0
- package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts +1 -0
- package/package.json +7 -4
- package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap +6 -0
- package/src/components/MessageInput/__tests__/__snapshots__/SendButton.test.js.snap +12 -0
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +9 -0
- package/src/version.json +1 -1
|
@@ -2,54 +2,42 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
2
2
|
value: true
|
|
3
3
|
});
|
|
4
4
|
exports.useImageGalleryGestures = exports.clamp = exports.IsSwiping = exports.HasPinched = void 0;
|
|
5
|
-
|
|
6
5
|
var _reactNative = require("react-native");
|
|
7
|
-
|
|
8
6
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
9
|
-
|
|
10
7
|
var _OverlayContext = require("../../../contexts/overlayContext/OverlayContext");
|
|
11
|
-
|
|
12
8
|
var _native = require("../../../native");
|
|
13
|
-
|
|
14
9
|
var HasPinched;
|
|
15
10
|
exports.HasPinched = HasPinched;
|
|
16
|
-
|
|
17
11
|
(function (HasPinched) {
|
|
18
12
|
HasPinched[HasPinched["FALSE"] = 0] = "FALSE";
|
|
19
13
|
HasPinched[HasPinched["TRUE"] = 1] = "TRUE";
|
|
20
14
|
})(HasPinched || (exports.HasPinched = HasPinched = {}));
|
|
21
|
-
|
|
22
15
|
var IsSwiping;
|
|
23
16
|
exports.IsSwiping = IsSwiping;
|
|
24
|
-
|
|
25
17
|
(function (IsSwiping) {
|
|
26
18
|
IsSwiping[IsSwiping["UNDETERMINED"] = 0] = "UNDETERMINED";
|
|
27
19
|
IsSwiping[IsSwiping["TRUE"] = 1] = "TRUE";
|
|
28
20
|
IsSwiping[IsSwiping["FALSE"] = 2] = "FALSE";
|
|
29
21
|
})(IsSwiping || (exports.IsSwiping = IsSwiping = {}));
|
|
30
|
-
|
|
31
22
|
var MARGIN = 32;
|
|
32
|
-
|
|
33
23
|
var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
34
24
|
var currentImageHeight = _ref.currentImageHeight,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
25
|
+
halfScreenHeight = _ref.halfScreenHeight,
|
|
26
|
+
halfScreenWidth = _ref.halfScreenWidth,
|
|
27
|
+
headerFooterVisible = _ref.headerFooterVisible,
|
|
28
|
+
offsetScale = _ref.offsetScale,
|
|
29
|
+
overlayOpacity = _ref.overlayOpacity,
|
|
30
|
+
photoLength = _ref.photoLength,
|
|
31
|
+
scale = _ref.scale,
|
|
32
|
+
screenHeight = _ref.screenHeight,
|
|
33
|
+
screenWidth = _ref.screenWidth,
|
|
34
|
+
selectedIndex = _ref.selectedIndex,
|
|
35
|
+
setSelectedIndex = _ref.setSelectedIndex,
|
|
36
|
+
translateX = _ref.translateX,
|
|
37
|
+
translateY = _ref.translateY,
|
|
38
|
+
translationX = _ref.translationX;
|
|
50
39
|
var _useOverlayContext = (0, _OverlayContext.useOverlayContext)(),
|
|
51
|
-
|
|
52
|
-
|
|
40
|
+
setOverlay = _useOverlayContext.setOverlay;
|
|
53
41
|
var isAndroid = _reactNative.Platform.OS === 'android';
|
|
54
42
|
var hasHitBottomScale = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
55
43
|
var hasHitTopScale = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
@@ -60,11 +48,9 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
60
48
|
var focalX = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
61
49
|
var focalY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
62
50
|
var index = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
63
|
-
|
|
64
51
|
if (index.value !== selectedIndex) {
|
|
65
52
|
index.value = selectedIndex;
|
|
66
53
|
}
|
|
67
|
-
|
|
68
54
|
var offsetX = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
69
55
|
var offsetY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
70
56
|
var focalOffsetX = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
@@ -77,7 +63,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
77
63
|
var isSwiping = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
78
64
|
var isPinch = (0, _reactNativeReanimated.useSharedValue)(false);
|
|
79
65
|
var hasPinched = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
80
|
-
|
|
81
66
|
var resetTouchValues = function resetTouchValues() {
|
|
82
67
|
'worklet';
|
|
83
68
|
|
|
@@ -93,7 +78,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
93
78
|
isPinch.value = false;
|
|
94
79
|
isSwiping.value = IsSwiping.UNDETERMINED;
|
|
95
80
|
};
|
|
96
|
-
|
|
97
81
|
var resetMovementValues = function resetMovementValues() {
|
|
98
82
|
'worklet';
|
|
99
83
|
|
|
@@ -102,7 +86,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
102
86
|
scale.value = 1;
|
|
103
87
|
offsetScale.value = 1;
|
|
104
88
|
};
|
|
105
|
-
|
|
106
89
|
var onPan = (0, _reactNativeReanimated.useAnimatedGestureHandler)({
|
|
107
90
|
onActive: function onActive(evt) {
|
|
108
91
|
if (evt.numberOfPointers === 1 && !isPinch.value) {
|
|
@@ -112,19 +95,15 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
112
95
|
offsetX.value = translateX.value + evt.translationX;
|
|
113
96
|
offsetY.value = translateY.value - evt.translationY;
|
|
114
97
|
}
|
|
115
|
-
|
|
116
98
|
if (isSwiping.value === IsSwiping.UNDETERMINED) {
|
|
117
99
|
var maxXYRatio = isAndroid ? 1 : 0.25;
|
|
118
|
-
|
|
119
100
|
if (Math.abs(evt.translationX / evt.translationY) > maxXYRatio && (Math.abs(-halfScreenWidth * (scale.value - 1) - offsetX.value) < 3 || Math.abs(halfScreenWidth * (scale.value - 1) - offsetX.value) < 3)) {
|
|
120
101
|
isSwiping.value = IsSwiping.TRUE;
|
|
121
102
|
}
|
|
122
|
-
|
|
123
103
|
if (Math.abs(evt.translationY) > 25) {
|
|
124
104
|
isSwiping.value = IsSwiping.FALSE;
|
|
125
105
|
}
|
|
126
106
|
}
|
|
127
|
-
|
|
128
107
|
var localEvtScale = scale.value / offsetScale.value;
|
|
129
108
|
translateX.value = scale.value !== offsetScale.value ? offsetX.value * localEvtScale - evt.translationX : offsetX.value - evt.translationX;
|
|
130
109
|
translateY.value = isSwiping.value !== IsSwiping.TRUE ? scale.value !== offsetScale.value ? offsetY.value * localEvtScale + evt.translationY : offsetY.value + evt.translationY : translateY.value;
|
|
@@ -136,7 +115,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
136
115
|
if (!isPinch.value && evt.numberOfPointers < 2) {
|
|
137
116
|
var finalXPosition = evt.translationX - evt.velocityX * 0.3;
|
|
138
117
|
var finalYPosition = evt.translationY + evt.velocityY * 0.1;
|
|
139
|
-
|
|
140
118
|
if (index.value < photoLength - 1 && Math.abs(halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 && translateX.value < 0 && finalXPosition < -halfScreenWidth && isSwiping.value === IsSwiping.TRUE) {
|
|
141
119
|
(0, _reactNativeReanimated.cancelAnimation)(translationX);
|
|
142
120
|
translationX.value = (0, _reactNativeReanimated.withTiming)(-(screenWidth + MARGIN) * (index.value + 1), {
|
|
@@ -158,7 +136,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
158
136
|
(0, _reactNativeReanimated.runOnJS)(setSelectedIndex)(index.value);
|
|
159
137
|
});
|
|
160
138
|
}
|
|
161
|
-
|
|
162
139
|
translateX.value = scale.value < 1 ? (0, _reactNativeReanimated.withTiming)(0) : translateX.value > halfScreenWidth * (scale.value - 1) ? (0, _reactNativeReanimated.withTiming)(halfScreenWidth * (scale.value - 1), {
|
|
163
140
|
duration: 200
|
|
164
141
|
}) : translateX.value < -halfScreenWidth * (scale.value - 1) ? (0, _reactNativeReanimated.withTiming)(-halfScreenWidth * (scale.value - 1), {
|
|
@@ -175,7 +152,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
175
152
|
});
|
|
176
153
|
resetTouchValues();
|
|
177
154
|
scale.value = scale.value !== offsetScale.value ? (0, _reactNativeReanimated.withTiming)(offsetScale.value) : offsetScale.value;
|
|
178
|
-
|
|
179
155
|
if (finalYPosition > halfScreenHeight && offsetY.value + 8 >= currentImageHeight / 2 * scale.value - halfScreenHeight && isSwiping.value !== IsSwiping.TRUE && translateY.value !== 0 && !(Math.abs(halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 && translateX.value < 0 && finalXPosition < -halfScreenWidth) && !(Math.abs(-halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 && translateX.value > 0 && finalXPosition > halfScreenWidth)) {
|
|
180
156
|
(0, _reactNativeReanimated.cancelAnimation)(translateX);
|
|
181
157
|
(0, _reactNativeReanimated.cancelAnimation)(translateY);
|
|
@@ -210,7 +186,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
210
186
|
offsetX.value = translateX.value;
|
|
211
187
|
offsetY.value = translateY.value;
|
|
212
188
|
}
|
|
213
|
-
|
|
214
189
|
hasPinched.value = HasPinched.FALSE;
|
|
215
190
|
}
|
|
216
191
|
}, [currentImageHeight, photoLength]);
|
|
@@ -231,11 +206,9 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
231
206
|
originY.value = adjustedFocalY.value;
|
|
232
207
|
offsetScale.value = scale.value;
|
|
233
208
|
}
|
|
234
|
-
|
|
235
209
|
isPinch.value = true;
|
|
236
210
|
scale.value = clamp(offsetScale.value * evt.scale, 1, 8);
|
|
237
211
|
var localEvtScale = scale.value / offsetScale.value;
|
|
238
|
-
|
|
239
212
|
if (scale.value !== 8 && scale.value !== 1) {
|
|
240
213
|
hasHitTopScale.value = 0;
|
|
241
214
|
hasHitBottomScale.value = 0;
|
|
@@ -246,13 +219,10 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
246
219
|
hasHitBottomScale.value = 1;
|
|
247
220
|
(0, _reactNativeReanimated.runOnJS)(_native.triggerHaptic)('impactLight');
|
|
248
221
|
}
|
|
249
|
-
|
|
250
222
|
adjustedFocalX.value = evt.focalX - (halfScreenWidth - offsetX.value);
|
|
251
223
|
adjustedFocalY.value = evt.focalY - (halfScreenHeight + offsetY.value);
|
|
252
|
-
|
|
253
224
|
if (numberOfPinchFingers.value !== evt.numberOfPointers) {
|
|
254
225
|
numberOfPinchFingers.value = evt.numberOfPointers;
|
|
255
|
-
|
|
256
226
|
if (evt.numberOfPointers === 1) {
|
|
257
227
|
focalOffsetX.value = oldFocalX.value - adjustedFocalX.value;
|
|
258
228
|
focalOffsetY.value = oldFocalY.value - adjustedFocalY.value;
|
|
@@ -261,7 +231,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
261
231
|
originY.value = originY.value - (oldFocalY.value / localEvtScale - adjustedFocalY.value / localEvtScale);
|
|
262
232
|
}
|
|
263
233
|
}
|
|
264
|
-
|
|
265
234
|
if (numberOfPinchFingers.value === 1) {
|
|
266
235
|
oldFocalX.value = adjustedFocalX.value + focalOffsetX.value;
|
|
267
236
|
oldFocalY.value = adjustedFocalY.value + focalOffsetY.value;
|
|
@@ -299,7 +268,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
299
268
|
originY.value = adjustedFocalY.value;
|
|
300
269
|
offsetScale.value = scale.value;
|
|
301
270
|
}
|
|
302
|
-
|
|
303
271
|
hasPinched.value = HasPinched.FALSE;
|
|
304
272
|
}
|
|
305
273
|
}, [currentImageHeight]);
|
|
@@ -322,7 +290,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
322
290
|
duration: 200,
|
|
323
291
|
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
324
292
|
});
|
|
325
|
-
|
|
326
293
|
if (currentImageHeight * 2 > screenHeight) {
|
|
327
294
|
var translateYTopBottom = evt.absoluteY > halfScreenHeight ? -(currentImageHeight * 2 - screenHeight) / 2 : (currentImageHeight * 2 - screenHeight) / 2;
|
|
328
295
|
translateY.value = (0, _reactNativeReanimated.withTiming)(translateYTopBottom, {
|
|
@@ -346,7 +313,6 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
346
313
|
duration: 200,
|
|
347
314
|
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
348
315
|
});
|
|
349
|
-
|
|
350
316
|
if (headerFooterVisible.value !== 0) {
|
|
351
317
|
(0, _reactNativeReanimated.cancelAnimation)(headerFooterVisible);
|
|
352
318
|
headerFooterVisible.value = (0, _reactNativeReanimated.withTiming)(0);
|
|
@@ -366,14 +332,11 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
366
332
|
onSingleTap: onSingleTap
|
|
367
333
|
};
|
|
368
334
|
};
|
|
369
|
-
|
|
370
335
|
exports.useImageGalleryGestures = useImageGalleryGestures;
|
|
371
|
-
|
|
372
336
|
var clamp = function clamp(value, lowerBound, upperBound) {
|
|
373
337
|
'worklet';
|
|
374
338
|
|
|
375
339
|
return Math.min(Math.max(lowerBound, value), upperBound);
|
|
376
340
|
};
|
|
377
|
-
|
|
378
341
|
exports.clamp = clamp;
|
|
379
342
|
//# sourceMappingURL=useImageGalleryGestures.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["useImageGalleryGestures.tsx"],"names":["HasPinched","IsSwiping","MARGIN","useImageGalleryGestures","currentImageHeight","halfScreenHeight","halfScreenWidth","headerFooterVisible","offsetScale","overlayOpacity","photoLength","scale","screenHeight","screenWidth","selectedIndex","setSelectedIndex","translateX","translateY","translationX","setOverlay","isAndroid","Platform","OS","hasHitBottomScale","hasHitTopScale","originX","originY","oldFocalX","oldFocalY","focalX","focalY","index","value","offsetX","offsetY","focalOffsetX","focalOffsetY","adjustedFocalX","adjustedFocalY","tapX","tapY","numberOfPinchFingers","isSwiping","isPinch","hasPinched","resetTouchValues","UNDETERMINED","resetMovementValues","onPan","onActive","evt","numberOfPointers","TRUE","FALSE","translationY","maxXYRatio","Math","abs","localEvtScale","onFinish","finalXPosition","velocityX","finalYPosition","velocityY","duration","easing","Easing","out","ease","clamp","deceleration","velocity","onStart","onPinch","triggerHaptic","onSingleTap","onDoubleTap","absoluteX","absoluteY","translateYTopBottom","lowerBound","upperBound","min","max"],"mappings":";;;;;AAAA;;AAMA;;AAWA;;AACA;;IAEYA,U;;;WAAAA,U;AAAAA,EAAAA,U,CAAAA,U;AAAAA,EAAAA,U,CAAAA,U;GAAAA,U,0BAAAA,U;;IAKAC,S;;;WAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;AAAAA,EAAAA,S,CAAAA,S;G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XA,WADK;AAEL5B,IAAAA,KAAK,EAALA,KAFK;AAGLyB,IAAAA,OAAO,EAAPA,OAHK;AAILE,IAAAA,WAAW,EAAXA;AAJK,GAAP;AAMD,CAxrBM;;;;AA6rBA,IAAMN,KAAK,GAAG,SAARA,KAAQ,CAACrC,KAAD,EAAgBgD,UAAhB,EAAoCC,UAApC,EAA2D;AAC9E;;AACA,SAAOzB,IAAI,CAAC0B,GAAL,CAAS1B,IAAI,CAAC2B,GAAL,CAASH,UAAT,EAAqBhD,KAArB,CAAT,EAAsCiD,UAAtC,CAAP;AACD,CAHM","sourcesContent":["import { Platform } from 'react-native';\nimport type {\n PanGestureHandlerGestureEvent,\n PinchGestureHandlerGestureEvent,\n TapGestureHandlerGestureEvent,\n} from 'react-native-gesture-handler';\nimport {\n cancelAnimation,\n Easing,\n runOnJS,\n SharedValue,\n useAnimatedGestureHandler,\n useSharedValue,\n withDecay,\n withTiming,\n} from 'react-native-reanimated';\n\nimport { useOverlayContext } from '../../../contexts/overlayContext/OverlayContext';\nimport { triggerHaptic } from '../../../native';\n\nexport enum HasPinched {\n FALSE = 0,\n TRUE,\n}\n\nexport enum IsSwiping {\n UNDETERMINED = 0,\n TRUE,\n FALSE,\n}\n\nconst MARGIN = 32;\n\nexport const useImageGalleryGestures = ({\n currentImageHeight,\n halfScreenHeight,\n halfScreenWidth,\n headerFooterVisible,\n offsetScale,\n overlayOpacity,\n photoLength,\n scale,\n screenHeight,\n screenWidth,\n selectedIndex,\n setSelectedIndex,\n translateX,\n translateY,\n translationX,\n}: {\n currentImageHeight: number;\n halfScreenHeight: number;\n halfScreenWidth: number;\n headerFooterVisible: SharedValue<number>;\n offsetScale: SharedValue<number>;\n overlayOpacity: SharedValue<number>;\n photoLength: number;\n scale: SharedValue<number>;\n screenHeight: number;\n screenWidth: number;\n selectedIndex: number;\n setSelectedIndex: React.Dispatch<React.SetStateAction<number>>;\n translateX: SharedValue<number>;\n translateY: SharedValue<number>;\n translationX: SharedValue<number>;\n}) => {\n const { setOverlay } = useOverlayContext();\n const isAndroid = Platform.OS === 'android';\n\n /**\n * Values to track scale for haptic feedback firing\n */\n const hasHitBottomScale = useSharedValue(1);\n const hasHitTopScale = useSharedValue(0);\n\n /**\n * Shared values for touch tracking\n */\n const originX = useSharedValue(0);\n const originY = useSharedValue(0);\n const oldFocalX = useSharedValue(0);\n const oldFocalY = useSharedValue(0);\n const focalX = useSharedValue(0);\n const focalY = useSharedValue(0);\n const index = useSharedValue(0);\n\n /**\n * if a specific image index > 0 has been passed in\n * while creating the hook, set the value of the index\n * reference to its value.\n *\n * This makes it possible to seelct an image in the list,\n * and scroll/pan as normal. Prior to this,\n * it was always assumed that one started at index 0 in the\n * gallery.\n * */\n if (index.value !== selectedIndex) {\n index.value = selectedIndex;\n }\n\n /**\n * Shared values for movement\n */\n const offsetX = useSharedValue(0);\n const offsetY = useSharedValue(0);\n\n /**\n * Shared values for touch tracking\n */\n const focalOffsetX = useSharedValue(0);\n const focalOffsetY = useSharedValue(0);\n const adjustedFocalX = useSharedValue(0);\n const adjustedFocalY = useSharedValue(0);\n const tapX = useSharedValue(0);\n const tapY = useSharedValue(0);\n\n /**\n * Shared values for gesture tracking\n */\n const numberOfPinchFingers = useSharedValue(0);\n const isSwiping = useSharedValue(0);\n const isPinch = useSharedValue(false);\n const hasPinched = useSharedValue(0);\n\n /**\n * Reset gesture values for use on touch release\n */\n const resetTouchValues = () => {\n 'worklet';\n focalX.value = 0;\n focalY.value = 0;\n oldFocalX.value = 0;\n oldFocalY.value = 0;\n originX.value = 0;\n originY.value = 0;\n focalOffsetX.value = 0;\n focalOffsetY.value = 0;\n numberOfPinchFingers.value = 0;\n isPinch.value = false;\n isSwiping.value = IsSwiping.UNDETERMINED;\n };\n\n /**\n * Reset movement values for use on selected photo change\n */\n const resetMovementValues = () => {\n 'worklet';\n translateX.value = 0;\n translateY.value = 0;\n scale.value = 1;\n offsetScale.value = 1;\n };\n\n /**\n * We use simultaneousHandlers to allow pan and pinch gesture handlers\n * depending on the gesture. The touch is fully handled by the pinch\n * gesture handler once it has began so all interactions by the pan\n * handler are blocked if isPinch.value is true\n */\n const onPan = useAnimatedGestureHandler<PanGestureHandlerGestureEvent>(\n {\n onActive: (evt) => {\n if (evt.numberOfPointers === 1 && !isPinch.value) {\n /**\n * If Android where a second finger cannot be added back and\n * removing one finger returns to Pan Handler then adjust origin\n * on finger remove and set swiping false\n */\n if (isAndroid && hasPinched.value === HasPinched.TRUE) {\n hasPinched.value = HasPinched.FALSE;\n isSwiping.value = IsSwiping.FALSE;\n offsetX.value = translateX.value + evt.translationX;\n offsetY.value = translateY.value - evt.translationY;\n }\n\n /**\n * isSwiping is used to prevent Y movement if a clear swipe to next\n * or previous is begun when at the edge of a photo. The value is\n * either 0, 1, or 2, via the IsSwiping enum designating undetermined,\n * true, or false and is reset on releasing the touch\n */\n if (isSwiping.value === IsSwiping.UNDETERMINED) {\n const maxXYRatio = isAndroid ? 1 : 0.25;\n if (\n Math.abs(evt.translationX / evt.translationY) > maxXYRatio &&\n (Math.abs(-halfScreenWidth * (scale.value - 1) - offsetX.value) < 3 ||\n Math.abs(halfScreenWidth * (scale.value - 1) - offsetX.value) < 3)\n ) {\n isSwiping.value = IsSwiping.TRUE;\n }\n if (Math.abs(evt.translationY) > 25) {\n isSwiping.value = IsSwiping.FALSE;\n }\n }\n\n /**\n * localEvtScale is used for swipe away\n */\n const localEvtScale = scale.value / offsetScale.value;\n\n /**\n * If not swiping translate the image in X and Y to the event\n * translation plus offset. If swiping only translate X, if\n * swiping down when at top of screen or centered balance scale\n * using offset to a degree (this needs improvement the calculation\n * is incorrect but likely needs origin use to be 100%)\n */\n translateX.value =\n scale.value !== offsetScale.value\n ? offsetX.value * localEvtScale - evt.translationX\n : offsetX.value - evt.translationX;\n translateY.value =\n isSwiping.value !== IsSwiping.TRUE\n ? scale.value !== offsetScale.value\n ? offsetY.value * localEvtScale + evt.translationY\n : offsetY.value + evt.translationY\n : translateY.value;\n\n /**\n * If swiping down start scaling down the image for swipe\n * away effect\n */\n scale.value =\n currentImageHeight * offsetScale.value < screenHeight && translateY.value > 0\n ? offsetScale.value * (1 - (1 / 3) * (translateY.value / screenHeight))\n : currentImageHeight * offsetScale.value > screenHeight &&\n translateY.value > (currentImageHeight / 2) * offsetScale.value - halfScreenHeight\n ? offsetScale.value *\n (1 -\n (1 / 3) *\n ((translateY.value -\n ((currentImageHeight / 2) * offsetScale.value - halfScreenHeight)) /\n screenHeight))\n : scale.value;\n\n overlayOpacity.value = localEvtScale;\n }\n },\n onFinish: (evt) => {\n if (!isPinch.value && evt.numberOfPointers < 2) {\n /**\n * To determine if the fling should page to the next image we\n * calculate a final position based on the current position and\n * event velocity\n */\n const finalXPosition = evt.translationX - evt.velocityX * 0.3;\n const finalYPosition = evt.translationY + evt.velocityY * 0.1;\n\n /**\n * If there is a next photo, the image is lined up to the right\n * edge, the swipe is to the left, and the final position is more\n * than half the screen width, move to the next image\n */\n if (\n index.value < photoLength - 1 &&\n Math.abs(halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 &&\n translateX.value < 0 &&\n finalXPosition < -halfScreenWidth &&\n isSwiping.value === IsSwiping.TRUE\n ) {\n cancelAnimation(translationX);\n translationX.value = withTiming(\n -(screenWidth + MARGIN) * (index.value + 1),\n {\n duration: 200,\n easing: Easing.out(Easing.ease),\n },\n () => {\n resetMovementValues();\n index.value = index.value + 1;\n runOnJS(setSelectedIndex)(index.value);\n },\n );\n\n /**\n * If there is a previous photo, the image is lined up to the left\n * edge, the swipe is to the right, and the final position is more\n * than half the screen width, move to the previous image\n */\n } else if (\n index.value > 0 &&\n Math.abs(-halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 &&\n translateX.value > 0 &&\n finalXPosition > halfScreenWidth &&\n isSwiping.value === IsSwiping.TRUE\n ) {\n cancelAnimation(translationX);\n translationX.value = withTiming(\n -(screenWidth + MARGIN) * (index.value - 1),\n {\n duration: 200,\n easing: Easing.out(Easing.ease),\n },\n () => {\n resetMovementValues();\n index.value = index.value - 1;\n runOnJS(setSelectedIndex)(index.value);\n },\n );\n }\n\n /**\n * When the pan is finished if the scale is less than 1 return the\n * photo to center, if the photo is inside the edges of the screen\n * return the photo to line up with the edges, otherwise use decay\n * with a clamping at the edges to give the effect the image is\n * sliding along using velocity and friction\n */\n translateX.value =\n scale.value < 1\n ? withTiming(0)\n : translateX.value > halfScreenWidth * (scale.value - 1)\n ? withTiming(halfScreenWidth * (scale.value - 1), {\n duration: 200,\n })\n : translateX.value < -halfScreenWidth * (scale.value - 1)\n ? withTiming(-halfScreenWidth * (scale.value - 1), {\n duration: 200,\n })\n : withDecay({\n clamp: [\n -halfScreenWidth * (scale.value - 1),\n halfScreenWidth * (scale.value - 1),\n ],\n deceleration: 0.99,\n velocity: -evt.velocityX,\n });\n\n /**\n * When the pan is finished if the height is less than the screen\n * height return the photo to center, if the photo is inside the\n * edges of the screen return the photo to line up with the edges,\n * otherwise use decay with a clamping at the edges to give the effect\n * the image is sliding along using velocity and friction\n */\n translateY.value =\n currentImageHeight * scale.value < screenHeight\n ? withTiming(0)\n : translateY.value > (currentImageHeight / 2) * scale.value - halfScreenHeight\n ? withTiming((currentImageHeight / 2) * scale.value - halfScreenHeight)\n : translateY.value < (-currentImageHeight / 2) * scale.value + halfScreenHeight\n ? withTiming((-currentImageHeight / 2) * scale.value + halfScreenHeight)\n : withDecay({\n clamp: [\n (-currentImageHeight / 2) * scale.value + halfScreenHeight,\n (currentImageHeight / 2) * scale.value - halfScreenHeight,\n ],\n deceleration: 0.99,\n velocity: evt.velocityY,\n });\n\n resetTouchValues();\n\n /**\n * If the scale has been reduced below one, i.e. zoomed out, translate\n * the zoom back to one\n */\n scale.value =\n scale.value !== offsetScale.value ? withTiming(offsetScale.value) : offsetScale.value;\n\n /**\n * If the photo is centered or at the top of the screen if scaled larger\n * than the screen, and not paging left or right, and the final Y position\n * is greater than half the screen using swipe velocity and position, close\n * the overlay\n */\n if (\n finalYPosition > halfScreenHeight &&\n offsetY.value + 8 >= (currentImageHeight / 2) * scale.value - halfScreenHeight &&\n isSwiping.value !== IsSwiping.TRUE &&\n translateY.value !== 0 &&\n !(\n Math.abs(halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 &&\n translateX.value < 0 &&\n finalXPosition < -halfScreenWidth\n ) &&\n !(\n Math.abs(-halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 &&\n translateX.value > 0 &&\n finalXPosition > halfScreenWidth\n )\n ) {\n cancelAnimation(translateX);\n cancelAnimation(translateY);\n cancelAnimation(scale);\n overlayOpacity.value = withTiming(\n 0,\n {\n duration: 200,\n easing: Easing.out(Easing.ease),\n },\n () => {\n runOnJS(setOverlay)('none');\n },\n );\n scale.value = withTiming(0.6, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n translateY.value =\n evt.velocityY > 1000\n ? withDecay({\n velocity: evt.velocityY,\n })\n : withTiming(halfScreenHeight + (currentImageHeight / 2) * scale.value, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n translateX.value = withDecay({\n velocity: -evt.velocityX,\n });\n }\n }\n },\n onStart: () => {\n if (!isPinch.value) {\n /**\n * Cancel any previous motion animation on translations when a touch\n * begins to interrupt the animation and take over the position handling\n */\n cancelAnimation(translateX);\n cancelAnimation(translateY);\n cancelAnimation(scale);\n offsetX.value = translateX.value;\n offsetY.value = translateY.value;\n }\n\n /**\n * Reset hasPinched for Android single finger offset\n */\n hasPinched.value = HasPinched.FALSE;\n },\n },\n [currentImageHeight, photoLength],\n );\n\n /**\n * On pinch is run when two or more fingers touch the screen, it then takes over\n * all touch handling even if the number of fingers is reduced to one until the\n * touch is complete\n */\n const onPinch = useAnimatedGestureHandler<PinchGestureHandlerGestureEvent>(\n {\n onActive: (evt) => {\n /**\n * Android starts with a zero event with 1 touch instead of two\n * we therefore must wait to capture starting info until the double\n * touch begins\n */\n if (!isPinch.value && isAndroid) {\n /**\n * Set hasPinched to true so when removing one finger the pan active\n * state adjusts the offset\n */\n hasPinched.value = HasPinched.TRUE;\n\n /**\n * Cancel any previous motion animation on translations when a touch\n * begins to interrupt the animation and take over the position handling\n */\n cancelAnimation(translateX);\n cancelAnimation(translateY);\n cancelAnimation(scale);\n\n /**\n * Reset isSwiping as now the pan gesture handler is no longer running\n */\n isSwiping.value = IsSwiping.UNDETERMINED;\n\n /**\n * Set initial values for pinch gesture interaction handler\n */\n numberOfPinchFingers.value = evt.numberOfPointers;\n offsetX.value = translateX.value;\n offsetY.value = translateY.value;\n adjustedFocalX.value = evt.focalX - (halfScreenWidth - offsetX.value);\n adjustedFocalY.value = evt.focalY - (halfScreenHeight + offsetY.value);\n originX.value = adjustedFocalX.value;\n originY.value = adjustedFocalY.value;\n offsetScale.value = scale.value;\n }\n\n /**\n * Set pinch to true to stop all pan gesture interactions, we do this\n * again here for Android outside the check that creates type\n */\n isPinch.value = true;\n\n /**\n * The scale is clamped to a minimum of 1 and maximum of 8 for aesthetics.\n * We use the clamped value to determine a local event scale so the focal\n * point does not become out of sync with the actual photo scaling, e.g.\n * evt.scale is 20 but scale is 8, using evt.scale for offset will put the\n * photo and calculations out of sync\n */\n scale.value = clamp(offsetScale.value * evt.scale, 1, 8);\n const localEvtScale = scale.value / offsetScale.value;\n\n /**\n * When we hit the top or bottom of the scale clamping we run a haptic\n * trigger, we track if it has been run to not spam the trigger\n */\n if (scale.value !== 8 && scale.value !== 1) {\n hasHitTopScale.value = 0;\n hasHitBottomScale.value = 0;\n } else if (scale.value === 8 && hasHitTopScale.value === 0) {\n hasHitTopScale.value = 1;\n runOnJS(triggerHaptic)('impactLight');\n } else if (scale.value === 1 && hasHitBottomScale.value === 0) {\n hasHitBottomScale.value = 1;\n runOnJS(triggerHaptic)('impactLight');\n }\n\n /**\n * We calculate the adjusted focal point on the photo using the events\n * focal position on the screen, screen size, and current photo offset\n */\n adjustedFocalX.value = evt.focalX - (halfScreenWidth - offsetX.value);\n adjustedFocalY.value = evt.focalY - (halfScreenHeight + offsetY.value);\n\n /**\n * If the number of fingers on the screen changes, the position of the\n * focal point will change and this needs to be accounted for, e.g. if\n * two fingers are on the screen the focal is between them, but if one is\n * then removed the focal is now at the remaining fingers touch position.\n * If this happens without accounting for the change the image will jump\n * around, we keep track of the previous two finger focal to adjust for this\n * change in a reduction from two fingers to one, then if another finger\n * is added again we adjust the origin to account for the difference between\n * the original two finger touch and the new two finger touch position.\n */\n if (numberOfPinchFingers.value !== evt.numberOfPointers) {\n numberOfPinchFingers.value = evt.numberOfPointers;\n if (evt.numberOfPointers === 1) {\n focalOffsetX.value = oldFocalX.value - adjustedFocalX.value;\n focalOffsetY.value = oldFocalY.value - adjustedFocalY.value;\n } else if (numberOfPinchFingers.value > 1) {\n originX.value =\n originX.value -\n (oldFocalX.value / localEvtScale - adjustedFocalX.value / localEvtScale);\n originY.value =\n originY.value -\n (oldFocalY.value / localEvtScale - adjustedFocalY.value / localEvtScale);\n }\n }\n\n /**\n * If pinch handler has been activated via two fingers then the fingers\n * reduced to one we keep track of the old focal using the focal offset\n * from when the number of fingers was two. We then translate the photo\n * taking into account the offset, focal, focal offset, origin, and scale.\n */\n if (numberOfPinchFingers.value === 1) {\n oldFocalX.value = adjustedFocalX.value + focalOffsetX.value;\n oldFocalY.value = adjustedFocalY.value + focalOffsetY.value;\n translateX.value = offsetX.value - oldFocalX.value + localEvtScale * originX.value;\n translateY.value = offsetY.value + oldFocalY.value - localEvtScale * originY.value;\n\n /**\n * If the number of fingers in the gesture is greater than one the\n * adjusted focal point is saved as the old focal and the photo is\n * translated taking into account the offset, focal, origin, and scale.\n */\n } else if (numberOfPinchFingers.value > 1) {\n oldFocalX.value = adjustedFocalX.value;\n oldFocalY.value = adjustedFocalY.value;\n translateX.value = offsetX.value - adjustedFocalX.value + localEvtScale * originX.value;\n translateY.value = offsetY.value + adjustedFocalY.value - localEvtScale * originY.value;\n }\n },\n onFinish: () => {\n if (isPinch.value) {\n /**\n * When the pinch is finished if the scale is less than 1 return the\n * photo to center, if the photo is inside the edges of the screen\n * return the photo to line up with the edges, otherwise leave the\n * photo in its current position\n */\n translateX.value =\n scale.value < 1\n ? withTiming(0)\n : translateX.value > halfScreenWidth * (scale.value - 1)\n ? withTiming(halfScreenWidth * (scale.value - 1))\n : translateX.value < -halfScreenWidth * (scale.value - 1)\n ? withTiming(-halfScreenWidth * (scale.value - 1))\n : translateX.value;\n\n /**\n * When the pinch is finished if the height is less than the screen\n * height return the photo to center, if the photo is inside the\n * edges of the screen return the photo to line up with the edges,\n * otherwise leave the photo in its current position\n */\n translateY.value =\n currentImageHeight * scale.value < screenHeight\n ? withTiming(0)\n : translateY.value > (currentImageHeight / 2) * scale.value - screenHeight / 2\n ? withTiming((currentImageHeight / 2) * scale.value - screenHeight / 2)\n : translateY.value < (-currentImageHeight / 2) * scale.value + screenHeight / 2\n ? withTiming((-currentImageHeight / 2) * scale.value + screenHeight / 2)\n : translateY.value;\n\n /**\n * If the scale has been reduced below one, i.e. zoomed out, translate\n * the zoom back to one\n */\n offsetScale.value = scale.value < 1 ? 1 : scale.value;\n scale.value = scale.value < 1 ? withTiming(1) : scale.value;\n resetTouchValues();\n }\n },\n onStart: (evt) => {\n /**\n * Android starts with a zero event with 1 touch instead of two\n * we therefore must wait to capture starting info until the double\n * touch begins\n */\n if (!isAndroid) {\n /**\n * Cancel any previous motion animation on translations when a touch\n * begins to interrupt the animation and take over the position handling\n */\n cancelAnimation(translateX);\n cancelAnimation(translateY);\n cancelAnimation(scale);\n\n /**\n * Set pinch to true to stop all pan gesture interactions\n */\n isPinch.value = true;\n\n /**\n * Reset isSwiping as now the pan gesture handler is no longer running\n */\n isSwiping.value = IsSwiping.UNDETERMINED;\n\n /**\n * Set initial values for pinch gesture interaction handler\n */\n numberOfPinchFingers.value = evt.numberOfPointers;\n offsetX.value = translateX.value;\n offsetY.value = translateY.value;\n adjustedFocalX.value = evt.focalX - (halfScreenWidth - offsetX.value);\n adjustedFocalY.value = evt.focalY - (halfScreenHeight + offsetY.value);\n originX.value = adjustedFocalX.value;\n originY.value = adjustedFocalY.value;\n offsetScale.value = scale.value;\n }\n\n /**\n * Reset hasPinched for Android single finger offset\n */\n hasPinched.value = HasPinched.FALSE;\n },\n },\n [currentImageHeight],\n );\n\n /**\n * Single tap handler for header hiding and showing\n */\n const onSingleTap = useAnimatedGestureHandler<TapGestureHandlerGestureEvent>({\n onActive: () => {\n cancelAnimation(headerFooterVisible);\n headerFooterVisible.value = headerFooterVisible.value > 0 ? withTiming(0) : withTiming(1);\n },\n });\n\n /**\n * Double tap handler to zoom back out and hide header and footer\n */\n const onDoubleTap = useAnimatedGestureHandler<TapGestureHandlerGestureEvent>({\n onActive: (evt) => {\n if (Math.abs(tapX.value - evt.absoluteX) < 64 && Math.abs(tapY.value - evt.absoluteY) < 64) {\n if (offsetScale.value === 1 && offsetX.value === 0 && offsetY.value === 0) {\n offsetScale.value = 2;\n scale.value = withTiming(2, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n translateX.value = withTiming(evt.absoluteX - halfScreenWidth, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n if (currentImageHeight * 2 > screenHeight) {\n const translateYTopBottom =\n evt.absoluteY > halfScreenHeight\n ? -(currentImageHeight * 2 - screenHeight) / 2\n : (currentImageHeight * 2 - screenHeight) / 2;\n translateY.value = withTiming(translateYTopBottom, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n }\n } else {\n offsetScale.value = 1;\n scale.value = withTiming(1, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n offsetX.value = 0;\n offsetY.value = 0;\n translateX.value = withTiming(0, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n translateY.value = withTiming(0, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n if (headerFooterVisible.value !== 0) {\n cancelAnimation(headerFooterVisible);\n headerFooterVisible.value = withTiming(0);\n }\n }\n }\n },\n onStart: (evt) => {\n tapX.value = evt.absoluteX;\n tapY.value = evt.absoluteY;\n },\n });\n\n return {\n onDoubleTap,\n onPan,\n onPinch,\n onSingleTap,\n };\n};\n\n/**\n * Clamping worklet to clamp the scaling\n */\nexport const clamp = (value: number, lowerBound: number, upperBound: number) => {\n 'worklet';\n return Math.min(Math.max(lowerBound, value), upperBound);\n};\n"]}
|
|
1
|
+
{"version":3,"names":["HasPinched","IsSwiping","MARGIN","useImageGalleryGestures","currentImageHeight","halfScreenHeight","halfScreenWidth","headerFooterVisible","offsetScale","overlayOpacity","photoLength","scale","screenHeight","screenWidth","selectedIndex","setSelectedIndex","translateX","translateY","translationX","useOverlayContext","setOverlay","isAndroid","Platform","OS","hasHitBottomScale","useSharedValue","hasHitTopScale","originX","originY","oldFocalX","oldFocalY","focalX","focalY","index","value","offsetX","offsetY","focalOffsetX","focalOffsetY","adjustedFocalX","adjustedFocalY","tapX","tapY","numberOfPinchFingers","isSwiping","isPinch","hasPinched","resetTouchValues","UNDETERMINED","resetMovementValues","onPan","useAnimatedGestureHandler","onActive","evt","numberOfPointers","TRUE","FALSE","translationY","maxXYRatio","Math","abs","localEvtScale","onFinish","finalXPosition","velocityX","finalYPosition","velocityY","cancelAnimation","withTiming","duration","easing","Easing","out","ease","runOnJS","withDecay","clamp","deceleration","velocity","onStart","onPinch","triggerHaptic","onSingleTap","onDoubleTap","absoluteX","absoluteY","translateYTopBottom","lowerBound","upperBound","min","max"],"sources":["useImageGalleryGestures.tsx"],"sourcesContent":["import { Platform } from 'react-native';\nimport type {\n PanGestureHandlerGestureEvent,\n PinchGestureHandlerGestureEvent,\n TapGestureHandlerGestureEvent,\n} from 'react-native-gesture-handler';\nimport {\n cancelAnimation,\n Easing,\n runOnJS,\n SharedValue,\n useAnimatedGestureHandler,\n useSharedValue,\n withDecay,\n withTiming,\n} from 'react-native-reanimated';\n\nimport { useOverlayContext } from '../../../contexts/overlayContext/OverlayContext';\nimport { triggerHaptic } from '../../../native';\n\nexport enum HasPinched {\n FALSE = 0,\n TRUE,\n}\n\nexport enum IsSwiping {\n UNDETERMINED = 0,\n TRUE,\n FALSE,\n}\n\nconst MARGIN = 32;\n\nexport const useImageGalleryGestures = ({\n currentImageHeight,\n halfScreenHeight,\n halfScreenWidth,\n headerFooterVisible,\n offsetScale,\n overlayOpacity,\n photoLength,\n scale,\n screenHeight,\n screenWidth,\n selectedIndex,\n setSelectedIndex,\n translateX,\n translateY,\n translationX,\n}: {\n currentImageHeight: number;\n halfScreenHeight: number;\n halfScreenWidth: number;\n headerFooterVisible: SharedValue<number>;\n offsetScale: SharedValue<number>;\n overlayOpacity: SharedValue<number>;\n photoLength: number;\n scale: SharedValue<number>;\n screenHeight: number;\n screenWidth: number;\n selectedIndex: number;\n setSelectedIndex: React.Dispatch<React.SetStateAction<number>>;\n translateX: SharedValue<number>;\n translateY: SharedValue<number>;\n translationX: SharedValue<number>;\n}) => {\n const { setOverlay } = useOverlayContext();\n const isAndroid = Platform.OS === 'android';\n\n /**\n * Values to track scale for haptic feedback firing\n */\n const hasHitBottomScale = useSharedValue(1);\n const hasHitTopScale = useSharedValue(0);\n\n /**\n * Shared values for touch tracking\n */\n const originX = useSharedValue(0);\n const originY = useSharedValue(0);\n const oldFocalX = useSharedValue(0);\n const oldFocalY = useSharedValue(0);\n const focalX = useSharedValue(0);\n const focalY = useSharedValue(0);\n const index = useSharedValue(0);\n\n /**\n * if a specific image index > 0 has been passed in\n * while creating the hook, set the value of the index\n * reference to its value.\n *\n * This makes it possible to seelct an image in the list,\n * and scroll/pan as normal. Prior to this,\n * it was always assumed that one started at index 0 in the\n * gallery.\n * */\n if (index.value !== selectedIndex) {\n index.value = selectedIndex;\n }\n\n /**\n * Shared values for movement\n */\n const offsetX = useSharedValue(0);\n const offsetY = useSharedValue(0);\n\n /**\n * Shared values for touch tracking\n */\n const focalOffsetX = useSharedValue(0);\n const focalOffsetY = useSharedValue(0);\n const adjustedFocalX = useSharedValue(0);\n const adjustedFocalY = useSharedValue(0);\n const tapX = useSharedValue(0);\n const tapY = useSharedValue(0);\n\n /**\n * Shared values for gesture tracking\n */\n const numberOfPinchFingers = useSharedValue(0);\n const isSwiping = useSharedValue(0);\n const isPinch = useSharedValue(false);\n const hasPinched = useSharedValue(0);\n\n /**\n * Reset gesture values for use on touch release\n */\n const resetTouchValues = () => {\n 'worklet';\n focalX.value = 0;\n focalY.value = 0;\n oldFocalX.value = 0;\n oldFocalY.value = 0;\n originX.value = 0;\n originY.value = 0;\n focalOffsetX.value = 0;\n focalOffsetY.value = 0;\n numberOfPinchFingers.value = 0;\n isPinch.value = false;\n isSwiping.value = IsSwiping.UNDETERMINED;\n };\n\n /**\n * Reset movement values for use on selected photo change\n */\n const resetMovementValues = () => {\n 'worklet';\n translateX.value = 0;\n translateY.value = 0;\n scale.value = 1;\n offsetScale.value = 1;\n };\n\n /**\n * We use simultaneousHandlers to allow pan and pinch gesture handlers\n * depending on the gesture. The touch is fully handled by the pinch\n * gesture handler once it has began so all interactions by the pan\n * handler are blocked if isPinch.value is true\n */\n const onPan = useAnimatedGestureHandler<PanGestureHandlerGestureEvent>(\n {\n onActive: (evt) => {\n if (evt.numberOfPointers === 1 && !isPinch.value) {\n /**\n * If Android where a second finger cannot be added back and\n * removing one finger returns to Pan Handler then adjust origin\n * on finger remove and set swiping false\n */\n if (isAndroid && hasPinched.value === HasPinched.TRUE) {\n hasPinched.value = HasPinched.FALSE;\n isSwiping.value = IsSwiping.FALSE;\n offsetX.value = translateX.value + evt.translationX;\n offsetY.value = translateY.value - evt.translationY;\n }\n\n /**\n * isSwiping is used to prevent Y movement if a clear swipe to next\n * or previous is begun when at the edge of a photo. The value is\n * either 0, 1, or 2, via the IsSwiping enum designating undetermined,\n * true, or false and is reset on releasing the touch\n */\n if (isSwiping.value === IsSwiping.UNDETERMINED) {\n const maxXYRatio = isAndroid ? 1 : 0.25;\n if (\n Math.abs(evt.translationX / evt.translationY) > maxXYRatio &&\n (Math.abs(-halfScreenWidth * (scale.value - 1) - offsetX.value) < 3 ||\n Math.abs(halfScreenWidth * (scale.value - 1) - offsetX.value) < 3)\n ) {\n isSwiping.value = IsSwiping.TRUE;\n }\n if (Math.abs(evt.translationY) > 25) {\n isSwiping.value = IsSwiping.FALSE;\n }\n }\n\n /**\n * localEvtScale is used for swipe away\n */\n const localEvtScale = scale.value / offsetScale.value;\n\n /**\n * If not swiping translate the image in X and Y to the event\n * translation plus offset. If swiping only translate X, if\n * swiping down when at top of screen or centered balance scale\n * using offset to a degree (this needs improvement the calculation\n * is incorrect but likely needs origin use to be 100%)\n */\n translateX.value =\n scale.value !== offsetScale.value\n ? offsetX.value * localEvtScale - evt.translationX\n : offsetX.value - evt.translationX;\n translateY.value =\n isSwiping.value !== IsSwiping.TRUE\n ? scale.value !== offsetScale.value\n ? offsetY.value * localEvtScale + evt.translationY\n : offsetY.value + evt.translationY\n : translateY.value;\n\n /**\n * If swiping down start scaling down the image for swipe\n * away effect\n */\n scale.value =\n currentImageHeight * offsetScale.value < screenHeight && translateY.value > 0\n ? offsetScale.value * (1 - (1 / 3) * (translateY.value / screenHeight))\n : currentImageHeight * offsetScale.value > screenHeight &&\n translateY.value > (currentImageHeight / 2) * offsetScale.value - halfScreenHeight\n ? offsetScale.value *\n (1 -\n (1 / 3) *\n ((translateY.value -\n ((currentImageHeight / 2) * offsetScale.value - halfScreenHeight)) /\n screenHeight))\n : scale.value;\n\n overlayOpacity.value = localEvtScale;\n }\n },\n onFinish: (evt) => {\n if (!isPinch.value && evt.numberOfPointers < 2) {\n /**\n * To determine if the fling should page to the next image we\n * calculate a final position based on the current position and\n * event velocity\n */\n const finalXPosition = evt.translationX - evt.velocityX * 0.3;\n const finalYPosition = evt.translationY + evt.velocityY * 0.1;\n\n /**\n * If there is a next photo, the image is lined up to the right\n * edge, the swipe is to the left, and the final position is more\n * than half the screen width, move to the next image\n */\n if (\n index.value < photoLength - 1 &&\n Math.abs(halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 &&\n translateX.value < 0 &&\n finalXPosition < -halfScreenWidth &&\n isSwiping.value === IsSwiping.TRUE\n ) {\n cancelAnimation(translationX);\n translationX.value = withTiming(\n -(screenWidth + MARGIN) * (index.value + 1),\n {\n duration: 200,\n easing: Easing.out(Easing.ease),\n },\n () => {\n resetMovementValues();\n index.value = index.value + 1;\n runOnJS(setSelectedIndex)(index.value);\n },\n );\n\n /**\n * If there is a previous photo, the image is lined up to the left\n * edge, the swipe is to the right, and the final position is more\n * than half the screen width, move to the previous image\n */\n } else if (\n index.value > 0 &&\n Math.abs(-halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 &&\n translateX.value > 0 &&\n finalXPosition > halfScreenWidth &&\n isSwiping.value === IsSwiping.TRUE\n ) {\n cancelAnimation(translationX);\n translationX.value = withTiming(\n -(screenWidth + MARGIN) * (index.value - 1),\n {\n duration: 200,\n easing: Easing.out(Easing.ease),\n },\n () => {\n resetMovementValues();\n index.value = index.value - 1;\n runOnJS(setSelectedIndex)(index.value);\n },\n );\n }\n\n /**\n * When the pan is finished if the scale is less than 1 return the\n * photo to center, if the photo is inside the edges of the screen\n * return the photo to line up with the edges, otherwise use decay\n * with a clamping at the edges to give the effect the image is\n * sliding along using velocity and friction\n */\n translateX.value =\n scale.value < 1\n ? withTiming(0)\n : translateX.value > halfScreenWidth * (scale.value - 1)\n ? withTiming(halfScreenWidth * (scale.value - 1), {\n duration: 200,\n })\n : translateX.value < -halfScreenWidth * (scale.value - 1)\n ? withTiming(-halfScreenWidth * (scale.value - 1), {\n duration: 200,\n })\n : withDecay({\n clamp: [\n -halfScreenWidth * (scale.value - 1),\n halfScreenWidth * (scale.value - 1),\n ],\n deceleration: 0.99,\n velocity: -evt.velocityX,\n });\n\n /**\n * When the pan is finished if the height is less than the screen\n * height return the photo to center, if the photo is inside the\n * edges of the screen return the photo to line up with the edges,\n * otherwise use decay with a clamping at the edges to give the effect\n * the image is sliding along using velocity and friction\n */\n translateY.value =\n currentImageHeight * scale.value < screenHeight\n ? withTiming(0)\n : translateY.value > (currentImageHeight / 2) * scale.value - halfScreenHeight\n ? withTiming((currentImageHeight / 2) * scale.value - halfScreenHeight)\n : translateY.value < (-currentImageHeight / 2) * scale.value + halfScreenHeight\n ? withTiming((-currentImageHeight / 2) * scale.value + halfScreenHeight)\n : withDecay({\n clamp: [\n (-currentImageHeight / 2) * scale.value + halfScreenHeight,\n (currentImageHeight / 2) * scale.value - halfScreenHeight,\n ],\n deceleration: 0.99,\n velocity: evt.velocityY,\n });\n\n resetTouchValues();\n\n /**\n * If the scale has been reduced below one, i.e. zoomed out, translate\n * the zoom back to one\n */\n scale.value =\n scale.value !== offsetScale.value ? withTiming(offsetScale.value) : offsetScale.value;\n\n /**\n * If the photo is centered or at the top of the screen if scaled larger\n * than the screen, and not paging left or right, and the final Y position\n * is greater than half the screen using swipe velocity and position, close\n * the overlay\n */\n if (\n finalYPosition > halfScreenHeight &&\n offsetY.value + 8 >= (currentImageHeight / 2) * scale.value - halfScreenHeight &&\n isSwiping.value !== IsSwiping.TRUE &&\n translateY.value !== 0 &&\n !(\n Math.abs(halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 &&\n translateX.value < 0 &&\n finalXPosition < -halfScreenWidth\n ) &&\n !(\n Math.abs(-halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 &&\n translateX.value > 0 &&\n finalXPosition > halfScreenWidth\n )\n ) {\n cancelAnimation(translateX);\n cancelAnimation(translateY);\n cancelAnimation(scale);\n overlayOpacity.value = withTiming(\n 0,\n {\n duration: 200,\n easing: Easing.out(Easing.ease),\n },\n () => {\n runOnJS(setOverlay)('none');\n },\n );\n scale.value = withTiming(0.6, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n translateY.value =\n evt.velocityY > 1000\n ? withDecay({\n velocity: evt.velocityY,\n })\n : withTiming(halfScreenHeight + (currentImageHeight / 2) * scale.value, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n translateX.value = withDecay({\n velocity: -evt.velocityX,\n });\n }\n }\n },\n onStart: () => {\n if (!isPinch.value) {\n /**\n * Cancel any previous motion animation on translations when a touch\n * begins to interrupt the animation and take over the position handling\n */\n cancelAnimation(translateX);\n cancelAnimation(translateY);\n cancelAnimation(scale);\n offsetX.value = translateX.value;\n offsetY.value = translateY.value;\n }\n\n /**\n * Reset hasPinched for Android single finger offset\n */\n hasPinched.value = HasPinched.FALSE;\n },\n },\n [currentImageHeight, photoLength],\n );\n\n /**\n * On pinch is run when two or more fingers touch the screen, it then takes over\n * all touch handling even if the number of fingers is reduced to one until the\n * touch is complete\n */\n const onPinch = useAnimatedGestureHandler<PinchGestureHandlerGestureEvent>(\n {\n onActive: (evt) => {\n /**\n * Android starts with a zero event with 1 touch instead of two\n * we therefore must wait to capture starting info until the double\n * touch begins\n */\n if (!isPinch.value && isAndroid) {\n /**\n * Set hasPinched to true so when removing one finger the pan active\n * state adjusts the offset\n */\n hasPinched.value = HasPinched.TRUE;\n\n /**\n * Cancel any previous motion animation on translations when a touch\n * begins to interrupt the animation and take over the position handling\n */\n cancelAnimation(translateX);\n cancelAnimation(translateY);\n cancelAnimation(scale);\n\n /**\n * Reset isSwiping as now the pan gesture handler is no longer running\n */\n isSwiping.value = IsSwiping.UNDETERMINED;\n\n /**\n * Set initial values for pinch gesture interaction handler\n */\n numberOfPinchFingers.value = evt.numberOfPointers;\n offsetX.value = translateX.value;\n offsetY.value = translateY.value;\n adjustedFocalX.value = evt.focalX - (halfScreenWidth - offsetX.value);\n adjustedFocalY.value = evt.focalY - (halfScreenHeight + offsetY.value);\n originX.value = adjustedFocalX.value;\n originY.value = adjustedFocalY.value;\n offsetScale.value = scale.value;\n }\n\n /**\n * Set pinch to true to stop all pan gesture interactions, we do this\n * again here for Android outside the check that creates type\n */\n isPinch.value = true;\n\n /**\n * The scale is clamped to a minimum of 1 and maximum of 8 for aesthetics.\n * We use the clamped value to determine a local event scale so the focal\n * point does not become out of sync with the actual photo scaling, e.g.\n * evt.scale is 20 but scale is 8, using evt.scale for offset will put the\n * photo and calculations out of sync\n */\n scale.value = clamp(offsetScale.value * evt.scale, 1, 8);\n const localEvtScale = scale.value / offsetScale.value;\n\n /**\n * When we hit the top or bottom of the scale clamping we run a haptic\n * trigger, we track if it has been run to not spam the trigger\n */\n if (scale.value !== 8 && scale.value !== 1) {\n hasHitTopScale.value = 0;\n hasHitBottomScale.value = 0;\n } else if (scale.value === 8 && hasHitTopScale.value === 0) {\n hasHitTopScale.value = 1;\n runOnJS(triggerHaptic)('impactLight');\n } else if (scale.value === 1 && hasHitBottomScale.value === 0) {\n hasHitBottomScale.value = 1;\n runOnJS(triggerHaptic)('impactLight');\n }\n\n /**\n * We calculate the adjusted focal point on the photo using the events\n * focal position on the screen, screen size, and current photo offset\n */\n adjustedFocalX.value = evt.focalX - (halfScreenWidth - offsetX.value);\n adjustedFocalY.value = evt.focalY - (halfScreenHeight + offsetY.value);\n\n /**\n * If the number of fingers on the screen changes, the position of the\n * focal point will change and this needs to be accounted for, e.g. if\n * two fingers are on the screen the focal is between them, but if one is\n * then removed the focal is now at the remaining fingers touch position.\n * If this happens without accounting for the change the image will jump\n * around, we keep track of the previous two finger focal to adjust for this\n * change in a reduction from two fingers to one, then if another finger\n * is added again we adjust the origin to account for the difference between\n * the original two finger touch and the new two finger touch position.\n */\n if (numberOfPinchFingers.value !== evt.numberOfPointers) {\n numberOfPinchFingers.value = evt.numberOfPointers;\n if (evt.numberOfPointers === 1) {\n focalOffsetX.value = oldFocalX.value - adjustedFocalX.value;\n focalOffsetY.value = oldFocalY.value - adjustedFocalY.value;\n } else if (numberOfPinchFingers.value > 1) {\n originX.value =\n originX.value -\n (oldFocalX.value / localEvtScale - adjustedFocalX.value / localEvtScale);\n originY.value =\n originY.value -\n (oldFocalY.value / localEvtScale - adjustedFocalY.value / localEvtScale);\n }\n }\n\n /**\n * If pinch handler has been activated via two fingers then the fingers\n * reduced to one we keep track of the old focal using the focal offset\n * from when the number of fingers was two. We then translate the photo\n * taking into account the offset, focal, focal offset, origin, and scale.\n */\n if (numberOfPinchFingers.value === 1) {\n oldFocalX.value = adjustedFocalX.value + focalOffsetX.value;\n oldFocalY.value = adjustedFocalY.value + focalOffsetY.value;\n translateX.value = offsetX.value - oldFocalX.value + localEvtScale * originX.value;\n translateY.value = offsetY.value + oldFocalY.value - localEvtScale * originY.value;\n\n /**\n * If the number of fingers in the gesture is greater than one the\n * adjusted focal point is saved as the old focal and the photo is\n * translated taking into account the offset, focal, origin, and scale.\n */\n } else if (numberOfPinchFingers.value > 1) {\n oldFocalX.value = adjustedFocalX.value;\n oldFocalY.value = adjustedFocalY.value;\n translateX.value = offsetX.value - adjustedFocalX.value + localEvtScale * originX.value;\n translateY.value = offsetY.value + adjustedFocalY.value - localEvtScale * originY.value;\n }\n },\n onFinish: () => {\n if (isPinch.value) {\n /**\n * When the pinch is finished if the scale is less than 1 return the\n * photo to center, if the photo is inside the edges of the screen\n * return the photo to line up with the edges, otherwise leave the\n * photo in its current position\n */\n translateX.value =\n scale.value < 1\n ? withTiming(0)\n : translateX.value > halfScreenWidth * (scale.value - 1)\n ? withTiming(halfScreenWidth * (scale.value - 1))\n : translateX.value < -halfScreenWidth * (scale.value - 1)\n ? withTiming(-halfScreenWidth * (scale.value - 1))\n : translateX.value;\n\n /**\n * When the pinch is finished if the height is less than the screen\n * height return the photo to center, if the photo is inside the\n * edges of the screen return the photo to line up with the edges,\n * otherwise leave the photo in its current position\n */\n translateY.value =\n currentImageHeight * scale.value < screenHeight\n ? withTiming(0)\n : translateY.value > (currentImageHeight / 2) * scale.value - screenHeight / 2\n ? withTiming((currentImageHeight / 2) * scale.value - screenHeight / 2)\n : translateY.value < (-currentImageHeight / 2) * scale.value + screenHeight / 2\n ? withTiming((-currentImageHeight / 2) * scale.value + screenHeight / 2)\n : translateY.value;\n\n /**\n * If the scale has been reduced below one, i.e. zoomed out, translate\n * the zoom back to one\n */\n offsetScale.value = scale.value < 1 ? 1 : scale.value;\n scale.value = scale.value < 1 ? withTiming(1) : scale.value;\n resetTouchValues();\n }\n },\n onStart: (evt) => {\n /**\n * Android starts with a zero event with 1 touch instead of two\n * we therefore must wait to capture starting info until the double\n * touch begins\n */\n if (!isAndroid) {\n /**\n * Cancel any previous motion animation on translations when a touch\n * begins to interrupt the animation and take over the position handling\n */\n cancelAnimation(translateX);\n cancelAnimation(translateY);\n cancelAnimation(scale);\n\n /**\n * Set pinch to true to stop all pan gesture interactions\n */\n isPinch.value = true;\n\n /**\n * Reset isSwiping as now the pan gesture handler is no longer running\n */\n isSwiping.value = IsSwiping.UNDETERMINED;\n\n /**\n * Set initial values for pinch gesture interaction handler\n */\n numberOfPinchFingers.value = evt.numberOfPointers;\n offsetX.value = translateX.value;\n offsetY.value = translateY.value;\n adjustedFocalX.value = evt.focalX - (halfScreenWidth - offsetX.value);\n adjustedFocalY.value = evt.focalY - (halfScreenHeight + offsetY.value);\n originX.value = adjustedFocalX.value;\n originY.value = adjustedFocalY.value;\n offsetScale.value = scale.value;\n }\n\n /**\n * Reset hasPinched for Android single finger offset\n */\n hasPinched.value = HasPinched.FALSE;\n },\n },\n [currentImageHeight],\n );\n\n /**\n * Single tap handler for header hiding and showing\n */\n const onSingleTap = useAnimatedGestureHandler<TapGestureHandlerGestureEvent>({\n onActive: () => {\n cancelAnimation(headerFooterVisible);\n headerFooterVisible.value = headerFooterVisible.value > 0 ? withTiming(0) : withTiming(1);\n },\n });\n\n /**\n * Double tap handler to zoom back out and hide header and footer\n */\n const onDoubleTap = useAnimatedGestureHandler<TapGestureHandlerGestureEvent>({\n onActive: (evt) => {\n if (Math.abs(tapX.value - evt.absoluteX) < 64 && Math.abs(tapY.value - evt.absoluteY) < 64) {\n if (offsetScale.value === 1 && offsetX.value === 0 && offsetY.value === 0) {\n offsetScale.value = 2;\n scale.value = withTiming(2, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n translateX.value = withTiming(evt.absoluteX - halfScreenWidth, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n if (currentImageHeight * 2 > screenHeight) {\n const translateYTopBottom =\n evt.absoluteY > halfScreenHeight\n ? -(currentImageHeight * 2 - screenHeight) / 2\n : (currentImageHeight * 2 - screenHeight) / 2;\n translateY.value = withTiming(translateYTopBottom, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n }\n } else {\n offsetScale.value = 1;\n scale.value = withTiming(1, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n offsetX.value = 0;\n offsetY.value = 0;\n translateX.value = withTiming(0, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n translateY.value = withTiming(0, {\n duration: 200,\n easing: Easing.out(Easing.ease),\n });\n if (headerFooterVisible.value !== 0) {\n cancelAnimation(headerFooterVisible);\n headerFooterVisible.value = withTiming(0);\n }\n }\n }\n },\n onStart: (evt) => {\n tapX.value = evt.absoluteX;\n tapY.value = evt.absoluteY;\n },\n });\n\n return {\n onDoubleTap,\n onPan,\n onPinch,\n onSingleTap,\n };\n};\n\n/**\n * Clamping worklet to clamp the scaling\n */\nexport const clamp = (value: number, lowerBound: number, upperBound: number) => {\n 'worklet';\n return Math.min(Math.max(lowerBound, value), upperBound);\n};\n"],"mappings":";;;;AAAA;AAMA;AAWA;AACA;AAAgD,IAEpCA,UAAU;AAAA;AAAA,WAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;EAAVA,UAAU,CAAVA,UAAU;AAAA,GAAVA,UAAU,0BAAVA,UAAU;AAAA,IAKVC,SAAS;AAAA;AAAA,WAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;EAATA,SAAS,CAATA,SAAS;AAAA,GAATA,SAAS,yBAATA,SAAS;AAMrB,IAAMC,MAAM,GAAG,EAAE;AAEV,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuB,OAgC9B;EAAA,IA/BJC,kBAAkB,QAAlBA,kBAAkB;IAClBC,gBAAgB,QAAhBA,gBAAgB;IAChBC,eAAe,QAAfA,eAAe;IACfC,mBAAmB,QAAnBA,mBAAmB;IACnBC,WAAW,QAAXA,WAAW;IACXC,cAAc,QAAdA,cAAc;IACdC,WAAW,QAAXA,WAAW;IACXC,KAAK,QAALA,KAAK;I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CAAC,EAAE;YAC/BC,QAAQ,EAAE,GAAG;YACbC,MAAM,EAAEC,6BAAM,CAACC,GAAG,CAACD,6BAAM,CAACE,IAAI;UAChC,CAAC,CAAC;UACFxD,UAAU,CAACiB,KAAK,GAAG,IAAAkC,iCAAU,EAAC,CAAC,EAAE;YAC/BC,QAAQ,EAAE,GAAG;YACbC,MAAM,EAAEC,6BAAM,CAACC,GAAG,CAACD,6BAAM,CAACE,IAAI;UAChC,CAAC,CAAC;UACF,IAAIlE,mBAAmB,CAAC2B,KAAK,KAAK,CAAC,EAAE;YACnC,IAAAiC,sCAAe,EAAC5D,mBAAmB,CAAC;YACpCA,mBAAmB,CAAC2B,KAAK,GAAG,IAAAkC,iCAAU,EAAC,CAAC,CAAC;UAC3C;QACF;MACF;IACF,CAAC;IACDW,OAAO,EAAE,iBAAC1B,GAAG,EAAK;MAChBZ,IAAI,CAACP,KAAK,GAAGmB,GAAG,CAAC+B,SAAS;MAC1B1C,IAAI,CAACR,KAAK,GAAGmB,GAAG,CAACgC,SAAS;IAC5B;EACF,CAAC,CAAC;EAEF,OAAO;IACLF,WAAW,EAAXA,WAAW;IACXjC,KAAK,EAALA,KAAK;IACL8B,OAAO,EAAPA,OAAO;IACPE,WAAW,EAAXA;EACF,CAAC;AACH,CAAC;AAAC;AAKK,IAAMN,KAAK,GAAG,SAARA,KAAK,CAAI1C,KAAa,EAAEqD,UAAkB,EAAEC,UAAkB,EAAK;EAC9E,SAAS;;EACT,OAAO7B,IAAI,CAAC8B,GAAG,CAAC9B,IAAI,CAAC+B,GAAG,CAACH,UAAU,EAAErD,KAAK,CAAC,EAAEsD,UAAU,CAAC;AAC1D,CAAC;AAAC"}
|
|
@@ -1,25 +1,16 @@
|
|
|
1
1
|
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
2
|
-
|
|
3
2
|
Object.defineProperty(exports, "__esModule", {
|
|
4
3
|
value: true
|
|
5
4
|
});
|
|
6
5
|
exports.EmptyStateIndicator = void 0;
|
|
7
|
-
|
|
8
6
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
-
|
|
10
7
|
var _reactNative = require("react-native");
|
|
11
|
-
|
|
12
8
|
var _ThemeContext = require("../../contexts/themeContext/ThemeContext");
|
|
13
|
-
|
|
14
9
|
var _MessageIcon = require("../../icons/MessageIcon");
|
|
15
|
-
|
|
16
10
|
var _utils = require("../../utils/utils");
|
|
17
|
-
|
|
18
11
|
var _this = this,
|
|
19
|
-
|
|
20
|
-
|
|
12
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Indicators/EmptyStateIndicator.tsx";
|
|
21
13
|
var width = (0, _utils.vw)(33);
|
|
22
|
-
|
|
23
14
|
var styles = _reactNative.StyleSheet.create({
|
|
24
15
|
channelContainer: {
|
|
25
16
|
alignItems: 'center',
|
|
@@ -37,21 +28,18 @@ var styles = _reactNative.StyleSheet.create({
|
|
|
37
28
|
paddingTop: 16
|
|
38
29
|
}
|
|
39
30
|
});
|
|
40
|
-
|
|
41
31
|
var EmptyStateIndicator = function EmptyStateIndicator(_ref) {
|
|
42
32
|
var listType = _ref.listType;
|
|
43
|
-
|
|
44
33
|
var _useTheme = (0, _ThemeContext.useTheme)(),
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
34
|
+
_useTheme$theme = _useTheme.theme,
|
|
35
|
+
_useTheme$theme$color = _useTheme$theme.colors,
|
|
36
|
+
black = _useTheme$theme$color.black,
|
|
37
|
+
grey = _useTheme$theme$color.grey,
|
|
38
|
+
grey_gainsboro = _useTheme$theme$color.grey_gainsboro,
|
|
39
|
+
_useTheme$theme$empty = _useTheme$theme.emptyStateIndicator,
|
|
40
|
+
channelContainer = _useTheme$theme$empty.channelContainer,
|
|
41
|
+
channelDetails = _useTheme$theme$empty.channelDetails,
|
|
42
|
+
channelTitle = _useTheme$theme$empty.channelTitle;
|
|
55
43
|
switch (listType) {
|
|
56
44
|
case 'channel':
|
|
57
45
|
return _react["default"].createElement(_reactNative.View, {
|
|
@@ -95,10 +83,8 @@ var EmptyStateIndicator = function EmptyStateIndicator(_ref) {
|
|
|
95
83
|
columnNumber: 11
|
|
96
84
|
}
|
|
97
85
|
}, 'How about sending your first message to a friend?'));
|
|
98
|
-
|
|
99
86
|
case 'message':
|
|
100
87
|
return null;
|
|
101
|
-
|
|
102
88
|
default:
|
|
103
89
|
return _react["default"].createElement(_reactNative.Text, {
|
|
104
90
|
style: {
|
|
@@ -113,6 +99,5 @@ var EmptyStateIndicator = function EmptyStateIndicator(_ref) {
|
|
|
113
99
|
}, "No items exist");
|
|
114
100
|
}
|
|
115
101
|
};
|
|
116
|
-
|
|
117
102
|
exports.EmptyStateIndicator = EmptyStateIndicator;
|
|
118
103
|
//# sourceMappingURL=EmptyStateIndicator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["width","vw","styles","StyleSheet","create","channelContainer","alignItems","flex","justifyContent","channelDetails","fontSize","textAlign","channelTitle","paddingBottom","paddingTop","EmptyStateIndicator","listType","useTheme","theme","colors","black","grey","grey_gainsboro","emptyStateIndicator","color"],"sources":["EmptyStateIndicator.tsx"],"sourcesContent":["import React from 'react';\nimport { StyleSheet, Text, View } from 'react-native';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { MessageIcon } from '../../icons/MessageIcon';\nimport { vw } from '../../utils/utils';\n\nconst width = vw(33);\n\nconst styles = StyleSheet.create({\n channelContainer: {\n alignItems: 'center',\n flex: 1,\n justifyContent: 'center',\n },\n channelDetails: {\n fontSize: 14,\n textAlign: 'center',\n width: vw(66),\n },\n channelTitle: {\n fontSize: 16,\n paddingBottom: 8,\n paddingTop: 16,\n },\n});\n\nexport type EmptyStateProps = {\n listType?: 'channel' | 'message' | 'default';\n};\n\nexport const EmptyStateIndicator: React.FC<EmptyStateProps> = ({ listType }) => {\n const {\n theme: {\n colors: { black, grey, grey_gainsboro },\n emptyStateIndicator: { channelContainer, channelDetails, channelTitle },\n },\n } = useTheme();\n\n switch (listType) {\n case 'channel':\n return (\n <View style={[styles.channelContainer, channelContainer]}>\n <MessageIcon height={width} pathFill={grey_gainsboro} width={width} />\n <Text\n style={[styles.channelTitle, { color: black }, channelTitle]}\n testID='empty-channel-state-title'\n >\n {\"Let's start chatting!\"}\n </Text>\n <Text\n style={[styles.channelDetails, { color: grey }, channelDetails]}\n testID='empty-channel-state-details'\n >\n {'How about sending your first message to a friend?'}\n </Text>\n </View>\n );\n case 'message':\n return null;\n default:\n return <Text style={{ color: black }}>No items exist</Text>;\n }\n};\n"],"mappings":";;;;;AAAA;AACA;AAEA;AACA;AACA;AAAuC;EAAA;AAEvC,IAAMA,KAAK,GAAG,IAAAC,SAAE,EAAC,EAAE,CAAC;AAEpB,IAAMC,MAAM,GAAGC,uBAAU,CAACC,MAAM,CAAC;EAC/BC,gBAAgB,EAAE;IAChBC,UAAU,EAAE,QAAQ;IACpBC,IAAI,EAAE,CAAC;IACPC,cAAc,EAAE;EAClB,CAAC;EACDC,cAAc,EAAE;IACdC,QAAQ,EAAE,EAAE;IACZC,SAAS,EAAE,QAAQ;IACnBX,KAAK,EAAE,IAAAC,SAAE,EAAC,EAAE;EACd,CAAC;EACDW,YAAY,EAAE;IACZF,QAAQ,EAAE,EAAE;IACZG,aAAa,EAAE,CAAC;IAChBC,UAAU,EAAE;EACd;AACF,CAAC,CAAC;AAMK,IAAMC,mBAA8C,GAAG,SAAjDA,mBAA8C,OAAqB;EAAA,IAAfC,QAAQ,QAARA,QAAQ;EACvE,gBAKI,IAAAC,sBAAQ,GAAE;IAAA,4BAJZC,KAAK;IAAA,wCACHC,MAAM;IAAIC,KAAK,yBAALA,KAAK;IAAEC,IAAI,yBAAJA,IAAI;IAAEC,cAAc,yBAAdA,cAAc;IAAA,wCACrCC,mBAAmB;IAAIlB,gBA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var _react = _interopRequireWildcard(require("react"));
|
|
9
|
-
|
|
10
7
|
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
11
|
-
|
|
12
8
|
var _ThemeContext = require("../../contexts/themeContext/ThemeContext");
|
|
13
|
-
|
|
14
9
|
var _this = this,
|
|
15
|
-
|
|
16
|
-
|
|
10
|
+
_jsxFileName = "/home/runner/work/stream-chat-react-native/stream-chat-react-native/package/src/components/Indicators/LoadingDot.tsx";
|
|
17
11
|
function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
|
|
18
|
-
|
|
19
12
|
function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
|
|
20
|
-
|
|
21
13
|
var LoadingDot = function LoadingDot(props) {
|
|
22
14
|
var _props$diameter = props.diameter,
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
15
|
+
diameter = _props$diameter === void 0 ? 4 : _props$diameter,
|
|
16
|
+
_props$duration = props.duration,
|
|
17
|
+
duration = _props$duration === void 0 ? 1500 : _props$duration,
|
|
18
|
+
_props$offset = props.offset,
|
|
19
|
+
offset = _props$offset === void 0 ? 0 : _props$offset,
|
|
20
|
+
style = props.style;
|
|
29
21
|
var halfDuration = duration / 2;
|
|
30
22
|
var startingOffset = halfDuration - offset;
|
|
31
|
-
|
|
32
23
|
var _useTheme = (0, _ThemeContext.useTheme)(),
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
24
|
+
_useTheme$theme = _useTheme.theme,
|
|
25
|
+
black = _useTheme$theme.colors.black,
|
|
26
|
+
loadingDot = _useTheme$theme.loadingDots.loadingDot;
|
|
37
27
|
var opacity = (0, _reactNativeReanimated.useSharedValue)(startingOffset / halfDuration);
|
|
38
28
|
(0, _react.useEffect)(function () {
|
|
39
29
|
opacity.value = (0, _reactNativeReanimated.withSequence)((0, _reactNativeReanimated.withTiming)(0, {
|
|
@@ -67,6 +57,5 @@ var LoadingDot = function LoadingDot(props) {
|
|
|
67
57
|
}
|
|
68
58
|
});
|
|
69
59
|
};
|
|
70
|
-
|
|
71
60
|
exports.LoadingDot = LoadingDot;
|
|
72
61
|
//# sourceMappingURL=LoadingDot.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"
|
|
1
|
+
{"version":3,"names":["LoadingDot","props","diameter","duration","offset","style","halfDuration","startingOffset","useTheme","theme","black","colors","loadingDot","loadingDots","opacity","useSharedValue","useEffect","value","withSequence","withTiming","easing","Easing","linear","withRepeat","dotStyle","useAnimatedStyle","backgroundColor","borderRadius","height","width"],"sources":["LoadingDot.tsx"],"sourcesContent":["import React, { useEffect } from 'react';\nimport type { StyleProp, ViewStyle } from 'react-native';\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withSequence,\n withTiming,\n} from 'react-native-reanimated';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\n\ntype Props = {\n diameter?: number;\n duration?: number;\n offset?: number;\n style?: StyleProp<ViewStyle>;\n};\n\nexport const LoadingDot: React.FC<Props> = (props) => {\n const { diameter = 4, duration = 1500, offset = 0, style } = props;\n const halfDuration = duration / 2;\n const startingOffset = halfDuration - offset;\n\n const {\n theme: {\n colors: { black },\n loadingDots: { loadingDot },\n },\n } = useTheme();\n const opacity = useSharedValue(startingOffset / halfDuration);\n\n useEffect(() => {\n opacity.value = withSequence(\n withTiming(0, { duration: startingOffset, easing: Easing.linear }),\n withRepeat(\n withSequence(\n withTiming(1, { duration: halfDuration, easing: Easing.linear }),\n withTiming(0, { duration: halfDuration, easing: Easing.linear }),\n ),\n -1,\n ),\n );\n }, []);\n\n const dotStyle = useAnimatedStyle<ViewStyle>(\n () => ({\n opacity: opacity.value,\n }),\n [],\n );\n\n return (\n <Animated.View\n style={[\n {\n backgroundColor: black,\n borderRadius: diameter / 2,\n height: diameter,\n width: diameter,\n },\n style,\n loadingDot,\n dotStyle,\n ]}\n />\n );\n};\n"],"mappings":";;;;;AAAA;AAEA;AASA;AAAoE;EAAA;AAAA;AAAA;AAS7D,IAAMA,UAA2B,GAAG,SAA9BA,UAA2B,CAAIC,KAAK,EAAK;EACpD,sBAA6DA,KAAK,CAA1DC,QAAQ;IAARA,QAAQ,gCAAG,CAAC;IAAA,kBAAyCD,KAAK,CAA5CE,QAAQ;IAARA,QAAQ,gCAAG,IAAI;IAAA,gBAAwBF,KAAK,CAA3BG,MAAM;IAANA,MAAM,8BAAG,CAAC;IAAEC,KAAK,GAAKJ,KAAK,CAAfI,KAAK;EACxD,IAAMC,YAAY,GAAGH,QAAQ,GAAG,CAAC;EACjC,IAAMI,cAAc,GAAGD,YAAY,GAAGF,MAAM;EAE5C,gBAKI,IAAAI,sBAAQ,GAAE;IAAA,4BAJZC,KAAK;IACOC,KAAK,mBAAfC,MAAM,CAAID,KAAK;IACAE,UAAU,mBAAzBC,WAAW,CAAID,UAAU;EAG7B,IAAME,OAAO,GAAG,IAAAC,qCAAc,EAACR,cAAc,GAAGD,YAAY,CAAC;EAE7D,IAAAU,gBAAS,EAAC,YAAM;IACdF,OAAO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