stream-chat-react-native-core 5.44.2 → 6.0.0-beta.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -2
- package/lib/commonjs/components/Attachment/Attachment.js +1 -1
- package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/Card.js +6 -6
- package/lib/commonjs/components/Attachment/Card.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachment.js +5 -5
- package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +1 -1
- package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/commonjs/components/Attachment/Gallery.js +32 -23
- package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/Giphy.js +8 -8
- package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js +7 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +3 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +3 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +4 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js +2 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +2 -0
- package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +2 -2
- package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +40 -136
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +9 -6
- package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -2
- package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/commonjs/components/Avatar/Avatar.js +4 -0
- package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
- package/lib/commonjs/components/Avatar/GroupAvatar.js +4 -0
- package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/commonjs/components/Channel/Channel.js +576 -1262
- package/lib/commonjs/components/Channel/Channel.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useChannelDataState.js +174 -0
- package/lib/commonjs/components/Channel/hooks/useChannelDataState.js.map +1 -0
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +0 -8
- package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -2
- package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +26 -10
- package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js +3 -3
- package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/components/Channel/hooks/useMessageListPagination.js +324 -0
- package/lib/commonjs/components/Channel/hooks/useMessageListPagination.js.map +1 -0
- package/lib/commonjs/components/ChannelList/ChannelList.js +0 -2
- package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
- package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/ChannelList/Skeleton.js +7 -3
- package/lib/commonjs/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js +8 -18
- package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +85 -46
- package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/commonjs/components/Chat/Chat.js +31 -16
- package/lib/commonjs/components/Chat/Chat.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js +312 -173
- package/lib/commonjs/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js +31 -18
- package/lib/commonjs/components/Chat/hooks/useAppSettings.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +0 -2
- package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js +16 -13
- package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/ImageGallery.js +57 -96
- package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +14 -35
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js +17 -35
- package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +72 -64
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +38 -39
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
- package/lib/commonjs/components/ImageGallery/hooks/useAnimatedGalleryStyle.js +54 -0
- package/lib/commonjs/components/ImageGallery/hooks/useAnimatedGalleryStyle.js.map +1 -0
- package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js +230 -225
- package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js +1 -1
- package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/commonjs/components/Message/Message.js +136 -192
- package/lib/commonjs/components/Message/Message.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageBounce.js +23 -6
- package/lib/commonjs/components/Message/MessageSimple/MessageBounce.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +40 -145
- package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +0 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +20 -34
- package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +182 -44
- package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +1 -1
- package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListBottom.js +234 -0
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListBottom.js.map +1 -0
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListTop.js +195 -0
- package/lib/commonjs/components/Message/MessageSimple/ReactionList/ReactionListTop.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +4 -16
- package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageActions.js +36 -72
- package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/commonjs/components/Message/hooks/useMessageData.js +38 -0
- package/lib/commonjs/components/Message/hooks/useMessageData.js.map +1 -0
- package/lib/commonjs/components/Message/hooks/useProcessReactions.js +3 -3
- package/lib/commonjs/components/Message/hooks/useProcessReactions.js.map +1 -1
- package/lib/commonjs/components/Message/utils/messageActions.js +4 -6
- package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js +1 -1
- package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/commonjs/components/MessageInput/MessageInput.js +1 -2
- package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +1 -0
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js +1 -2
- package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js.map +1 -1
- package/lib/commonjs/components/MessageInput/components/NativeAttachmentPicker.js +8 -5
- package/lib/commonjs/components/MessageInput/components/NativeAttachmentPicker.js.map +1 -1
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js +46 -64
- package/lib/commonjs/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/commonjs/components/MessageList/MessageList.js +67 -60
- package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js +1 -1
- package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/commonjs/components/MessageMenu/MessageActionList.js +35 -0
- package/lib/commonjs/components/MessageMenu/MessageActionList.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageActionListItem.js +60 -0
- package/lib/commonjs/components/MessageMenu/MessageActionListItem.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageMenu.js +70 -0
- package/lib/commonjs/components/MessageMenu/MessageMenu.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageReactionPicker.js +81 -0
- package/lib/commonjs/components/MessageMenu/MessageReactionPicker.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js +169 -0
- package/lib/commonjs/components/MessageMenu/MessageUserReactions.js.map +1 -0
- package/lib/commonjs/components/{MessageOverlay/OverlayReactionsAvatar.js → MessageMenu/MessageUserReactionsAvatar.js} +5 -6
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsAvatar.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js +112 -0
- package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js.map +1 -0
- package/lib/commonjs/components/MessageMenu/ReactionButton.js +59 -0
- package/lib/commonjs/components/MessageMenu/ReactionButton.js.map +1 -0
- package/lib/commonjs/components/{MessageOverlay → MessageMenu}/hooks/useFetchReactions.js +65 -41
- package/lib/commonjs/components/MessageMenu/hooks/useFetchReactions.js.map +1 -0
- package/lib/commonjs/components/Poll/CreatePollContent.js +14 -9
- package/lib/commonjs/components/Poll/CreatePollContent.js.map +1 -1
- package/lib/commonjs/components/Poll/Poll.js +2 -8
- package/lib/commonjs/components/Poll/Poll.js.map +1 -1
- package/lib/commonjs/components/Poll/components/Button.js +9 -474
- package/lib/commonjs/components/Poll/components/Button.js.map +1 -1
- package/lib/commonjs/components/Poll/components/CreatePollIcon.js +2 -2
- package/lib/commonjs/components/Poll/components/CreatePollIcon.js.map +1 -1
- package/lib/commonjs/components/Poll/components/CreatePollOptions.js +9 -4
- package/lib/commonjs/components/Poll/components/CreatePollOptions.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollAnswersList.js +99 -26
- package/lib/commonjs/components/Poll/components/PollAnswersList.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollButtons.js +291 -0
- package/lib/commonjs/components/Poll/components/PollButtons.js.map +1 -0
- package/lib/commonjs/components/Poll/components/PollInputDialog.js +14 -4
- package/lib/commonjs/components/Poll/components/PollInputDialog.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollModalHeader.js +7 -1
- package/lib/commonjs/components/Poll/components/PollModalHeader.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollOption.js +88 -6
- package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js +2 -2
- package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollResultItem.js +62 -67
- package/lib/commonjs/components/Poll/components/PollResults/PollResultItem.js.map +1 -1
- package/lib/commonjs/components/Poll/components/PollResults/PollVote.js +89 -0
- package/lib/commonjs/components/Poll/components/PollResults/PollVote.js.map +1 -0
- package/lib/commonjs/components/Poll/components/index.js +11 -0
- package/lib/commonjs/components/Poll/components/index.js.map +1 -1
- package/lib/commonjs/components/ProgressControl/ProgressControl.js +21 -28
- package/lib/commonjs/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/commonjs/components/ProgressControl/WaveProgressBar.js +22 -27
- package/lib/commonjs/components/ProgressControl/WaveProgressBar.js.map +1 -1
- package/lib/commonjs/components/Reply/Reply.js +6 -2
- package/lib/commonjs/components/Reply/Reply.js.map +1 -1
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js +158 -0
- package/lib/commonjs/components/UIComponents/BottomSheetModal.js.map +1 -0
- package/lib/commonjs/components/{ImageBackground.js → UIComponents/ImageBackground.js} +1 -1
- package/lib/commonjs/components/UIComponents/ImageBackground.js.map +1 -0
- package/lib/{module/components/Spinner → commonjs/components/UIComponents}/Spinner.js +1 -1
- package/lib/commonjs/components/UIComponents/Spinner.js.map +1 -0
- package/lib/commonjs/components/UIComponents/index.js +37 -0
- package/lib/commonjs/components/UIComponents/index.js.map +1 -0
- package/lib/commonjs/components/docs/data.js.map +1 -1
- package/lib/commonjs/components/index.js +56 -45
- package/lib/commonjs/components/index.js.map +1 -1
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +1 -13
- package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -11
- package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/commonjs/contexts/channelContext/ChannelContext.js +1 -11
- package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +1 -11
- package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +1 -46
- package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js +7 -84
- package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/commonjs/contexts/chatConfigContext/ChatConfigContext.js +33 -0
- package/lib/commonjs/contexts/chatConfigContext/ChatConfigContext.js.map +1 -0
- package/lib/commonjs/contexts/chatContext/ChatContext.js +1 -11
- package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +1 -11
- package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/commonjs/contexts/index.js +11 -11
- package/lib/commonjs/contexts/index.js.map +1 -1
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +1 -11
- package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/commonjs/contexts/messageContext/MessageContext.js +1 -11
- package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +52 -51
- package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +1 -1
- package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js +1 -11
- package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -14
- package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +18 -54
- package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +1 -11
- package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +1 -11
- package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/commonjs/contexts/themeContext/utils/theme.js +75 -49
- package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/commonjs/contexts/threadContext/ThreadContext.js +1 -11
- package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/commonjs/contexts/translationContext/TranslationContext.js +1 -11
- package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/commonjs/contexts/typingContext/TypingContext.js +1 -11
- package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/commonjs/hooks/useTranslatedMessage.js +1 -4
- package/lib/commonjs/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/commonjs/icons/PinHeader.js +17 -6
- package/lib/commonjs/icons/PinHeader.js.map +1 -1
- package/lib/commonjs/index.js +4 -23
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/mock-builders/DB/mock.js +159 -88
- package/lib/commonjs/mock-builders/DB/mock.js.map +1 -1
- package/lib/commonjs/native.js +38 -26
- package/lib/commonjs/native.js.map +1 -1
- package/lib/commonjs/store/SqliteClient.js +330 -0
- package/lib/commonjs/store/SqliteClient.js.map +1 -0
- package/lib/commonjs/store/apis/addPendingTask.js +56 -30
- package/lib/commonjs/store/apis/addPendingTask.js.map +1 -1
- package/lib/commonjs/store/apis/deleteChannel.js +36 -17
- package/lib/commonjs/store/apis/deleteChannel.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMember.js +38 -20
- package/lib/commonjs/store/apis/deleteMember.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMessage.js +36 -17
- package/lib/commonjs/store/apis/deleteMessage.js.map +1 -1
- package/lib/commonjs/store/apis/deleteMessagesForChannel.js +36 -17
- package/lib/commonjs/store/apis/deleteMessagesForChannel.js.map +1 -1
- package/lib/commonjs/store/apis/deletePendingTask.js +31 -12
- package/lib/commonjs/store/apis/deletePendingTask.js.map +1 -1
- package/lib/commonjs/store/apis/deleteReaction.js +39 -22
- package/lib/commonjs/store/apis/deleteReaction.js.map +1 -1
- package/lib/commonjs/store/apis/deleteReactions.js +36 -17
- package/lib/commonjs/store/apis/deleteReactions.js.map +1 -1
- package/lib/commonjs/store/apis/getAllChannelIds.js +28 -8
- package/lib/commonjs/store/apis/getAllChannelIds.js.map +1 -1
- package/lib/commonjs/store/apis/getAppSettings.js +31 -11
- package/lib/commonjs/store/apis/getAppSettings.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelMessages.js +77 -52
- package/lib/commonjs/store/apis/getChannelMessages.js.map +1 -1
- package/lib/commonjs/store/apis/getChannels.js +58 -30
- package/lib/commonjs/store/apis/getChannels.js.map +1 -1
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js +58 -26
- package/lib/commonjs/store/apis/getChannelsForFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/getLastSyncedAt.js +31 -11
- package/lib/commonjs/store/apis/getLastSyncedAt.js.map +1 -1
- package/lib/commonjs/store/apis/getMembers.js +36 -16
- package/lib/commonjs/store/apis/getMembers.js.map +1 -1
- package/lib/commonjs/store/apis/getPendingTasks.js +37 -14
- package/lib/commonjs/store/apis/getPendingTasks.js.map +1 -1
- package/lib/commonjs/store/apis/getReactions.js +2 -2
- package/lib/commonjs/store/apis/getReactions.js.map +1 -1
- package/lib/commonjs/store/apis/getReactionsforFilterSort.js +54 -22
- package/lib/commonjs/store/apis/getReactionsforFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/getReads.js +36 -16
- package/lib/commonjs/store/apis/getReads.js.map +1 -1
- package/lib/commonjs/store/apis/insertReaction.js +41 -23
- package/lib/commonjs/store/apis/insertReaction.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js +36 -17
- package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectChannels.js +44 -19
- package/lib/commonjs/store/apis/queries/selectChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectMembersForChannels.js +37 -17
- package/lib/commonjs/store/apis/queries/selectMembersForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js +37 -17
- package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js +37 -17
- package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js.map +1 -1
- package/lib/commonjs/store/apis/queries/selectReadsForChannels.js +37 -17
- package/lib/commonjs/store/apis/queries/selectReadsForChannels.js.map +1 -1
- package/lib/commonjs/store/apis/updateMessage.js +71 -47
- package/lib/commonjs/store/apis/updateMessage.js.map +1 -1
- package/lib/commonjs/store/apis/updatePollMessage.js +68 -59
- package/lib/commonjs/store/apis/updatePollMessage.js.map +1 -1
- package/lib/commonjs/store/apis/updateReaction.js +53 -38
- package/lib/commonjs/store/apis/updateReaction.js.map +1 -1
- package/lib/commonjs/store/apis/upsertAppSettings.js +37 -20
- package/lib/commonjs/store/apis/upsertAppSettings.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannelData.js +35 -16
- package/lib/commonjs/store/apis/upsertChannelData.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannelDataFromChannel.js +37 -13
- package/lib/commonjs/store/apis/upsertChannelDataFromChannel.js.map +1 -1
- package/lib/commonjs/store/apis/upsertChannels.js +115 -60
- package/lib/commonjs/store/apis/upsertChannels.js.map +1 -1
- package/lib/commonjs/store/apis/upsertCidsForQuery.js +43 -26
- package/lib/commonjs/store/apis/upsertCidsForQuery.js.map +1 -1
- package/lib/commonjs/store/apis/upsertMembers.js +51 -33
- package/lib/commonjs/store/apis/upsertMembers.js.map +1 -1
- package/lib/commonjs/store/apis/upsertMessages.js +62 -44
- package/lib/commonjs/store/apis/upsertMessages.js.map +1 -1
- package/lib/commonjs/store/apis/upsertReads.js +51 -34
- package/lib/commonjs/store/apis/upsertReads.js.map +1 -1
- package/lib/commonjs/store/apis/upsertUserSyncStatus.js +31 -14
- package/lib/commonjs/store/apis/upsertUserSyncStatus.js.map +1 -1
- package/lib/commonjs/test-utils/BetterSqlite.js +40 -15
- package/lib/commonjs/test-utils/BetterSqlite.js.map +1 -1
- package/lib/commonjs/utils/DBSyncManager.js +238 -152
- package/lib/commonjs/utils/DBSyncManager.js.map +1 -1
- package/lib/commonjs/utils/getResizedImageUrl.js +5 -3
- package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -1
- package/lib/commonjs/utils/utils.js +1 -1
- package/lib/commonjs/utils/utils.js.map +1 -1
- package/lib/commonjs/version.json +1 -1
- package/lib/module/components/Attachment/Attachment.js +1 -1
- package/lib/module/components/Attachment/Attachment.js.map +1 -1
- package/lib/module/components/Attachment/Card.js +6 -6
- package/lib/module/components/Attachment/Card.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachment.js +5 -5
- package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js +1 -1
- package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
- package/lib/module/components/Attachment/Gallery.js +32 -23
- package/lib/module/components/Attachment/Gallery.js.map +1 -1
- package/lib/module/components/Attachment/Giphy.js +8 -8
- package/lib/module/components/Attachment/Giphy.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js +7 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +3 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +3 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +4 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +2 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +2 -0
- package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js +2 -2
- package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +40 -136
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +9 -6
- package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +1 -2
- package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
- package/lib/module/components/Avatar/Avatar.js +4 -0
- package/lib/module/components/Avatar/Avatar.js.map +1 -1
- package/lib/module/components/Avatar/GroupAvatar.js +4 -0
- package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
- package/lib/module/components/Channel/Channel.js +576 -1262
- package/lib/module/components/Channel/Channel.js.map +1 -1
- package/lib/module/components/Channel/hooks/useChannelDataState.js +174 -0
- package/lib/module/components/Channel/hooks/useChannelDataState.js.map +1 -0
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js +0 -8
- package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -2
- package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +26 -10
- package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js +3 -3
- package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
- package/lib/module/components/Channel/hooks/useMessageListPagination.js +324 -0
- package/lib/module/components/Channel/hooks/useMessageListPagination.js.map +1 -0
- package/lib/module/components/ChannelList/ChannelList.js +0 -2
- package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +1 -1
- package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
- package/lib/module/components/ChannelList/Skeleton.js +7 -3
- package/lib/module/components/ChannelList/Skeleton.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js +8 -18
- package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +85 -46
- package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
- package/lib/module/components/Chat/Chat.js +31 -16
- package/lib/module/components/Chat/Chat.js.map +1 -1
- package/lib/module/components/Chat/hooks/handleEventToSyncDB.js +312 -173
- package/lib/module/components/Chat/hooks/handleEventToSyncDB.js.map +1 -1
- package/lib/module/components/Chat/hooks/useAppSettings.js +31 -18
- package/lib/module/components/Chat/hooks/useAppSettings.js.map +1 -1
- package/lib/module/components/Chat/hooks/useCreateChatContext.js +0 -2
- package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
- package/lib/module/components/Chat/hooks/useIsOnline.js +16 -13
- package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
- package/lib/module/components/ImageGallery/ImageGallery.js +57 -96
- package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +14 -35
- package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js +17 -35
- package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +72 -64
- package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +38 -39
- package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
- package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
- package/lib/module/components/ImageGallery/hooks/useAnimatedGalleryStyle.js +54 -0
- package/lib/module/components/ImageGallery/hooks/useAnimatedGalleryStyle.js.map +1 -0
- package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js +230 -225
- package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js +1 -1
- package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
- package/lib/module/components/Message/Message.js +136 -192
- package/lib/module/components/Message/Message.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageBounce.js +23 -6
- package/lib/module/components/Message/MessageSimple/MessageBounce.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageContent.js +40 -145
- package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js +0 -1
- package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +20 -34
- package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageSimple.js +182 -44
- package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +1 -1
- package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListBottom.js +234 -0
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListBottom.js.map +1 -0
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListTop.js +195 -0
- package/lib/module/components/Message/MessageSimple/ReactionList/ReactionListTop.js.map +1 -0
- package/lib/module/components/Message/hooks/useCreateMessageContext.js +4 -16
- package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageActions.js +36 -72
- package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
- package/lib/module/components/Message/hooks/useMessageData.js +38 -0
- package/lib/module/components/Message/hooks/useMessageData.js.map +1 -0
- package/lib/module/components/Message/hooks/useProcessReactions.js +3 -3
- package/lib/module/components/Message/hooks/useProcessReactions.js.map +1 -1
- package/lib/module/components/Message/utils/messageActions.js +4 -6
- package/lib/module/components/Message/utils/messageActions.js.map +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js +1 -1
- package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
- package/lib/module/components/MessageInput/MessageInput.js +1 -2
- package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js +1 -0
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingButton.js.map +1 -1
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js +1 -2
- package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.js.map +1 -1
- package/lib/module/components/MessageInput/components/NativeAttachmentPicker.js +8 -5
- package/lib/module/components/MessageInput/components/NativeAttachmentPicker.js.map +1 -1
- package/lib/module/components/MessageInput/hooks/useAudioController.js +46 -64
- package/lib/module/components/MessageInput/hooks/useAudioController.js.map +1 -1
- package/lib/module/components/MessageList/MessageList.js +67 -60
- package/lib/module/components/MessageList/MessageList.js.map +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js +1 -1
- package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
- package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
- package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
- package/lib/module/components/MessageMenu/MessageActionList.js +35 -0
- package/lib/module/components/MessageMenu/MessageActionList.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageActionListItem.js +60 -0
- package/lib/module/components/MessageMenu/MessageActionListItem.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageMenu.js +70 -0
- package/lib/module/components/MessageMenu/MessageMenu.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageReactionPicker.js +81 -0
- package/lib/module/components/MessageMenu/MessageReactionPicker.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageUserReactions.js +169 -0
- package/lib/module/components/MessageMenu/MessageUserReactions.js.map +1 -0
- package/lib/module/components/{MessageOverlay/OverlayReactionsAvatar.js → MessageMenu/MessageUserReactionsAvatar.js} +5 -6
- package/lib/module/components/MessageMenu/MessageUserReactionsAvatar.js.map +1 -0
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js +112 -0
- package/lib/module/components/MessageMenu/MessageUserReactionsItem.js.map +1 -0
- package/lib/module/components/MessageMenu/ReactionButton.js +59 -0
- package/lib/module/components/MessageMenu/ReactionButton.js.map +1 -0
- package/lib/module/components/{MessageOverlay → MessageMenu}/hooks/useFetchReactions.js +65 -41
- package/lib/module/components/MessageMenu/hooks/useFetchReactions.js.map +1 -0
- package/lib/module/components/Poll/CreatePollContent.js +14 -9
- package/lib/module/components/Poll/CreatePollContent.js.map +1 -1
- package/lib/module/components/Poll/Poll.js +2 -8
- package/lib/module/components/Poll/Poll.js.map +1 -1
- package/lib/module/components/Poll/components/Button.js +9 -474
- package/lib/module/components/Poll/components/Button.js.map +1 -1
- package/lib/module/components/Poll/components/CreatePollIcon.js +2 -2
- package/lib/module/components/Poll/components/CreatePollIcon.js.map +1 -1
- package/lib/module/components/Poll/components/CreatePollOptions.js +9 -4
- package/lib/module/components/Poll/components/CreatePollOptions.js.map +1 -1
- package/lib/module/components/Poll/components/PollAnswersList.js +99 -26
- package/lib/module/components/Poll/components/PollAnswersList.js.map +1 -1
- package/lib/module/components/Poll/components/PollButtons.js +291 -0
- package/lib/module/components/Poll/components/PollButtons.js.map +1 -0
- package/lib/module/components/Poll/components/PollInputDialog.js +14 -4
- package/lib/module/components/Poll/components/PollInputDialog.js.map +1 -1
- package/lib/module/components/Poll/components/PollModalHeader.js +7 -1
- package/lib/module/components/Poll/components/PollModalHeader.js.map +1 -1
- package/lib/module/components/Poll/components/PollOption.js +88 -6
- package/lib/module/components/Poll/components/PollOption.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js +2 -2
- package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollResultItem.js +62 -67
- package/lib/module/components/Poll/components/PollResults/PollResultItem.js.map +1 -1
- package/lib/module/components/Poll/components/PollResults/PollVote.js +89 -0
- package/lib/module/components/Poll/components/PollResults/PollVote.js.map +1 -0
- package/lib/module/components/Poll/components/index.js +11 -0
- package/lib/module/components/Poll/components/index.js.map +1 -1
- package/lib/module/components/ProgressControl/ProgressControl.js +21 -28
- package/lib/module/components/ProgressControl/ProgressControl.js.map +1 -1
- package/lib/module/components/ProgressControl/WaveProgressBar.js +22 -27
- package/lib/module/components/ProgressControl/WaveProgressBar.js.map +1 -1
- package/lib/module/components/Reply/Reply.js +6 -2
- package/lib/module/components/Reply/Reply.js.map +1 -1
- package/lib/module/components/UIComponents/BottomSheetModal.js +158 -0
- package/lib/module/components/UIComponents/BottomSheetModal.js.map +1 -0
- package/lib/module/components/{ImageBackground.js → UIComponents/ImageBackground.js} +1 -1
- package/lib/module/components/UIComponents/ImageBackground.js.map +1 -0
- package/lib/{commonjs/components/Spinner → module/components/UIComponents}/Spinner.js +1 -1
- package/lib/module/components/UIComponents/Spinner.js.map +1 -0
- package/lib/module/components/UIComponents/index.js +37 -0
- package/lib/module/components/UIComponents/index.js.map +1 -0
- package/lib/module/components/docs/data.js.map +1 -1
- package/lib/module/components/index.js +56 -45
- package/lib/module/components/index.js.map +1 -1
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +1 -13
- package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -11
- package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
- package/lib/module/contexts/channelContext/ChannelContext.js +1 -11
- package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
- package/lib/module/contexts/channelsContext/ChannelsContext.js +1 -11
- package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +1 -46
- package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
- package/lib/module/contexts/channelsStateContext/useChannelState.js +7 -84
- package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
- package/lib/module/contexts/chatConfigContext/ChatConfigContext.js +33 -0
- package/lib/module/contexts/chatConfigContext/ChatConfigContext.js.map +1 -0
- package/lib/module/contexts/chatContext/ChatContext.js +1 -11
- package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +1 -11
- package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
- package/lib/module/contexts/index.js +11 -11
- package/lib/module/contexts/index.js.map +1 -1
- package/lib/module/contexts/keyboardContext/KeyboardContext.js +1 -11
- package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
- package/lib/module/contexts/messageContext/MessageContext.js +1 -11
- package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/MessageInputContext.js +52 -51
- package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +1 -1
- package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
- package/lib/module/contexts/messagesContext/MessagesContext.js +1 -11
- package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayContext.js +1 -14
- package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
- package/lib/module/contexts/overlayContext/OverlayProvider.js +18 -54
- package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +1 -11
- package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +1 -11
- package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
- package/lib/module/contexts/themeContext/utils/theme.js +75 -49
- package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
- package/lib/module/contexts/threadContext/ThreadContext.js +1 -11
- package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
- package/lib/module/contexts/translationContext/TranslationContext.js +1 -11
- package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
- package/lib/module/contexts/typingContext/TypingContext.js +1 -11
- package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
- package/lib/module/hooks/useTranslatedMessage.js +1 -4
- package/lib/module/hooks/useTranslatedMessage.js.map +1 -1
- package/lib/module/icons/PinHeader.js +17 -6
- package/lib/module/icons/PinHeader.js.map +1 -1
- package/lib/module/index.js +4 -23
- package/lib/module/index.js.map +1 -1
- package/lib/module/mock-builders/DB/mock.js +159 -88
- package/lib/module/mock-builders/DB/mock.js.map +1 -1
- package/lib/module/native.js +38 -26
- package/lib/module/native.js.map +1 -1
- package/lib/module/store/SqliteClient.js +330 -0
- package/lib/module/store/SqliteClient.js.map +1 -0
- package/lib/module/store/apis/addPendingTask.js +56 -30
- package/lib/module/store/apis/addPendingTask.js.map +1 -1
- package/lib/module/store/apis/deleteChannel.js +36 -17
- package/lib/module/store/apis/deleteChannel.js.map +1 -1
- package/lib/module/store/apis/deleteMember.js +38 -20
- package/lib/module/store/apis/deleteMember.js.map +1 -1
- package/lib/module/store/apis/deleteMessage.js +36 -17
- package/lib/module/store/apis/deleteMessage.js.map +1 -1
- package/lib/module/store/apis/deleteMessagesForChannel.js +36 -17
- package/lib/module/store/apis/deleteMessagesForChannel.js.map +1 -1
- package/lib/module/store/apis/deletePendingTask.js +31 -12
- package/lib/module/store/apis/deletePendingTask.js.map +1 -1
- package/lib/module/store/apis/deleteReaction.js +39 -22
- package/lib/module/store/apis/deleteReaction.js.map +1 -1
- package/lib/module/store/apis/deleteReactions.js +36 -17
- package/lib/module/store/apis/deleteReactions.js.map +1 -1
- package/lib/module/store/apis/getAllChannelIds.js +28 -8
- package/lib/module/store/apis/getAllChannelIds.js.map +1 -1
- package/lib/module/store/apis/getAppSettings.js +31 -11
- package/lib/module/store/apis/getAppSettings.js.map +1 -1
- package/lib/module/store/apis/getChannelMessages.js +77 -52
- package/lib/module/store/apis/getChannelMessages.js.map +1 -1
- package/lib/module/store/apis/getChannels.js +58 -30
- package/lib/module/store/apis/getChannels.js.map +1 -1
- package/lib/module/store/apis/getChannelsForFilterSort.js +58 -26
- package/lib/module/store/apis/getChannelsForFilterSort.js.map +1 -1
- package/lib/module/store/apis/getLastSyncedAt.js +31 -11
- package/lib/module/store/apis/getLastSyncedAt.js.map +1 -1
- package/lib/module/store/apis/getMembers.js +36 -16
- package/lib/module/store/apis/getMembers.js.map +1 -1
- package/lib/module/store/apis/getPendingTasks.js +37 -14
- package/lib/module/store/apis/getPendingTasks.js.map +1 -1
- package/lib/module/store/apis/getReactions.js +2 -2
- package/lib/module/store/apis/getReactions.js.map +1 -1
- package/lib/module/store/apis/getReactionsforFilterSort.js +54 -22
- package/lib/module/store/apis/getReactionsforFilterSort.js.map +1 -1
- package/lib/module/store/apis/getReads.js +36 -16
- package/lib/module/store/apis/getReads.js.map +1 -1
- package/lib/module/store/apis/insertReaction.js +41 -23
- package/lib/module/store/apis/insertReaction.js.map +1 -1
- package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js +36 -17
- package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
- package/lib/module/store/apis/queries/selectChannels.js +44 -19
- package/lib/module/store/apis/queries/selectChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectMembersForChannels.js +37 -17
- package/lib/module/store/apis/queries/selectMembersForChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectMessagesForChannels.js +37 -17
- package/lib/module/store/apis/queries/selectMessagesForChannels.js.map +1 -1
- package/lib/module/store/apis/queries/selectReactionsForMessages.js +37 -17
- package/lib/module/store/apis/queries/selectReactionsForMessages.js.map +1 -1
- package/lib/module/store/apis/queries/selectReadsForChannels.js +37 -17
- package/lib/module/store/apis/queries/selectReadsForChannels.js.map +1 -1
- package/lib/module/store/apis/updateMessage.js +71 -47
- package/lib/module/store/apis/updateMessage.js.map +1 -1
- package/lib/module/store/apis/updatePollMessage.js +68 -59
- package/lib/module/store/apis/updatePollMessage.js.map +1 -1
- package/lib/module/store/apis/updateReaction.js +53 -38
- package/lib/module/store/apis/updateReaction.js.map +1 -1
- package/lib/module/store/apis/upsertAppSettings.js +37 -20
- package/lib/module/store/apis/upsertAppSettings.js.map +1 -1
- package/lib/module/store/apis/upsertChannelData.js +35 -16
- package/lib/module/store/apis/upsertChannelData.js.map +1 -1
- package/lib/module/store/apis/upsertChannelDataFromChannel.js +37 -13
- package/lib/module/store/apis/upsertChannelDataFromChannel.js.map +1 -1
- package/lib/module/store/apis/upsertChannels.js +115 -60
- package/lib/module/store/apis/upsertChannels.js.map +1 -1
- package/lib/module/store/apis/upsertCidsForQuery.js +43 -26
- package/lib/module/store/apis/upsertCidsForQuery.js.map +1 -1
- package/lib/module/store/apis/upsertMembers.js +51 -33
- package/lib/module/store/apis/upsertMembers.js.map +1 -1
- package/lib/module/store/apis/upsertMessages.js +62 -44
- package/lib/module/store/apis/upsertMessages.js.map +1 -1
- package/lib/module/store/apis/upsertReads.js +51 -34
- package/lib/module/store/apis/upsertReads.js.map +1 -1
- package/lib/module/store/apis/upsertUserSyncStatus.js +31 -14
- package/lib/module/store/apis/upsertUserSyncStatus.js.map +1 -1
- package/lib/module/test-utils/BetterSqlite.js +40 -15
- package/lib/module/test-utils/BetterSqlite.js.map +1 -1
- package/lib/module/utils/DBSyncManager.js +238 -152
- package/lib/module/utils/DBSyncManager.js.map +1 -1
- package/lib/module/utils/getResizedImageUrl.js +5 -3
- package/lib/module/utils/getResizedImageUrl.js.map +1 -1
- package/lib/module/utils/utils.js +1 -1
- package/lib/module/utils/utils.js.map +1 -1
- package/lib/module/version.json +1 -1
- package/lib/typescript/components/Attachment/Card.d.ts +2 -2
- package/lib/typescript/components/Attachment/Card.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts +1 -1
- package/lib/typescript/components/Attachment/FileAttachment.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
- package/lib/typescript/components/Attachment/Gallery.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/Giphy.d.ts +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +2 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +2 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +2 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +2 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +4 -2
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts.map +1 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +2 -1
- package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.d.ts +2 -2
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerItem.d.ts.map +1 -1
- package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerSelectionBar.d.ts.map +1 -1
- package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/Avatar.d.ts.map +1 -1
- package/lib/typescript/components/Avatar/GroupAvatar.d.ts.map +1 -1
- package/lib/typescript/components/Channel/Channel.d.ts +5 -5
- package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useChannelDataState.d.ts +75 -0
- package/lib/typescript/components/Channel/hooks/useChannelDataState.d.ts.map +1 -0
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +22 -14
- package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +1 -1
- package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts.map +1 -1
- package/lib/typescript/components/Channel/hooks/useMessageListPagination.d.ts +28 -0
- package/lib/typescript/components/Channel/hooks/useMessageListPagination.d.ts.map +1 -0
- package/lib/typescript/components/ChannelList/ChannelList.d.ts +0 -12
- package/lib/typescript/components/ChannelList/ChannelList.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/Skeleton.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +1 -2
- package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts.map +1 -1
- package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts.map +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts +1 -1
- package/lib/typescript/components/Chat/Chat.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/handleEventToSyncDB.d.ts +1 -1
- package/lib/typescript/components/Chat/hooks/handleEventToSyncDB.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useAppSettings.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
- package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
- package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/ImageGallery.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts +5 -5
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts +5 -5
- package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +3 -3
- package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +3 -3
- package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/components/ImageGalleryOverlay.d.ts +2 -2
- package/lib/typescript/components/ImageGallery/components/ImageGalleryOverlay.d.ts.map +1 -1
- package/lib/typescript/components/ImageGallery/hooks/useAnimatedGalleryStyle.d.ts +37 -0
- package/lib/typescript/components/ImageGallery/hooks/useAnimatedGalleryStyle.d.ts.map +1 -0
- package/lib/typescript/components/ImageGallery/hooks/useImageGalleryGestures.d.ts +4 -5
- package/lib/typescript/components/ImageGallery/hooks/useImageGalleryGestures.d.ts.map +1 -1
- package/lib/typescript/components/Message/Message.d.ts +4 -40
- package/lib/typescript/components/Message/Message.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +11 -5
- package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +2 -6
- package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +1 -2
- package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts.map +1 -1
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListBottom.d.ts +12 -0
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListBottom.d.ts.map +1 -0
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListTop.d.ts +20 -0
- package/lib/typescript/components/Message/MessageSimple/ReactionList/ReactionListTop.d.ts.map +1 -0
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
- package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +5 -6
- package/lib/typescript/components/Message/hooks/useMessageActions.d.ts.map +1 -1
- package/lib/typescript/components/Message/hooks/useMessageData.d.ts +12 -0
- package/lib/typescript/components/Message/hooks/useMessageData.d.ts.map +1 -0
- package/lib/typescript/components/Message/hooks/useProcessReactions.d.ts +11 -3
- package/lib/typescript/components/Message/hooks/useProcessReactions.d.ts.map +1 -1
- package/lib/typescript/components/Message/utils/messageActions.d.ts +6 -14
- package/lib/typescript/components/Message/utils/messageActions.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/MessageInput.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingButton.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/components/NativeAttachmentPicker.d.ts.map +1 -1
- package/lib/typescript/components/MessageInput/hooks/useAudioController.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts +1 -1
- package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts.map +1 -1
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +1 -1
- package/lib/typescript/components/MessageList/utils/getReadStates.d.ts.map +1 -1
- package/lib/typescript/components/MessageMenu/MessageActionList.d.ts +16 -0
- package/lib/typescript/components/MessageMenu/MessageActionList.d.ts.map +1 -0
- package/lib/typescript/components/{MessageOverlay → MessageMenu}/MessageActionListItem.d.ts +2 -8
- package/lib/typescript/components/MessageMenu/MessageActionListItem.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageMenu.d.ts +32 -0
- package/lib/typescript/components/MessageMenu/MessageMenu.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageReactionPicker.d.ts +30 -0
- package/lib/typescript/components/MessageMenu/MessageReactionPicker.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts +21 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactionsAvatar.d.ts +11 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactionsAvatar.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts +16 -0
- package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/ReactionButton.d.ts +25 -0
- package/lib/typescript/components/MessageMenu/ReactionButton.d.ts.map +1 -0
- package/lib/typescript/components/MessageMenu/hooks/useFetchReactions.d.ts.map +1 -0
- package/lib/typescript/components/Poll/Poll.d.ts +0 -1
- package/lib/typescript/components/Poll/Poll.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/Button.d.ts +0 -17
- package/lib/typescript/components/Poll/components/Button.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/CreatePollOptions.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollAnswersList.d.ts +2 -0
- package/lib/typescript/components/Poll/components/PollAnswersList.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollButtons.d.ts +10 -0
- package/lib/typescript/components/Poll/components/PollButtons.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/PollInputDialog.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollOption.d.ts +2 -0
- package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollResults/PollResultItem.d.ts +11 -4
- package/lib/typescript/components/Poll/components/PollResults/PollResultItem.d.ts.map +1 -1
- package/lib/typescript/components/Poll/components/PollResults/PollVote.d.ts +6 -0
- package/lib/typescript/components/Poll/components/PollResults/PollVote.d.ts.map +1 -0
- package/lib/typescript/components/Poll/components/index.d.ts +1 -0
- package/lib/typescript/components/Poll/components/index.d.ts.map +1 -1
- package/lib/typescript/components/ProgressControl/ProgressControl.d.ts.map +1 -1
- package/lib/typescript/components/ProgressControl/WaveProgressBar.d.ts.map +1 -1
- package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
- package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts +21 -0
- package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts.map +1 -0
- package/lib/typescript/components/UIComponents/ImageBackground.d.ts.map +1 -0
- package/lib/typescript/components/UIComponents/Spinner.d.ts.map +1 -0
- package/lib/typescript/components/UIComponents/index.d.ts +4 -0
- package/lib/typescript/components/UIComponents/index.d.ts.map +1 -0
- package/lib/typescript/components/index.d.ts +11 -10
- package/lib/typescript/components/index.d.ts.map +1 -1
- package/lib/typescript/contexts/activeChannelsRefContext/ActiveChannelsRefContext.d.ts +0 -11
- package/lib/typescript/contexts/activeChannelsRefContext/ActiveChannelsRefContext.d.ts.map +1 -1
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +1 -11
- package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +28 -62
- package/lib/typescript/contexts/channelContext/ChannelContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +1 -11
- package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +1 -27
- package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts.map +1 -1
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +7 -13
- package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts.map +1 -1
- package/lib/typescript/contexts/chatConfigContext/ChatConfigContext.d.ts +16 -0
- package/lib/typescript/contexts/chatConfigContext/ChatConfigContext.d.ts.map +1 -0
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts +1 -15
- package/lib/typescript/contexts/chatContext/ChatContext.d.ts.map +1 -1
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +0 -10
- package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts.map +1 -1
- package/lib/typescript/contexts/index.d.ts +1 -1
- package/lib/typescript/contexts/index.d.ts.map +1 -1
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +0 -11
- package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts +21 -56
- package/lib/typescript/contexts/messageContext/MessageContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +2 -12
- package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts.map +1 -1
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +78 -38
- package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +2 -27
- package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts.map +1 -1
- package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts.map +1 -1
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +18 -27
- package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts.map +1 -1
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +1 -11
- package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts.map +1 -1
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts +69 -44
- package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +1 -11
- package/lib/typescript/contexts/threadContext/ThreadContext.d.ts.map +1 -1
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +0 -11
- package/lib/typescript/contexts/translationContext/TranslationContext.d.ts.map +1 -1
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts +1 -11
- package/lib/typescript/contexts/typingContext/TypingContext.d.ts.map +1 -1
- package/lib/typescript/hooks/useTranslatedMessage.d.ts.map +1 -1
- package/lib/typescript/icons/PinHeader.d.ts +5 -1
- package/lib/typescript/icons/PinHeader.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +2 -3
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/native.d.ts +11 -13
- package/lib/typescript/native.d.ts.map +1 -1
- package/lib/typescript/store/SqliteClient.d.ts +27 -0
- package/lib/typescript/store/SqliteClient.d.ts.map +1 -0
- package/lib/typescript/store/apis/addPendingTask.d.ts +1 -1
- package/lib/typescript/store/apis/addPendingTask.d.ts.map +1 -1
- package/lib/typescript/store/apis/deleteChannel.d.ts +1 -1
- package/lib/typescript/store/apis/deleteChannel.d.ts.map +1 -1
- package/lib/typescript/store/apis/deleteMember.d.ts +1 -1
- package/lib/typescript/store/apis/deleteMember.d.ts.map +1 -1
- package/lib/typescript/store/apis/deleteMessage.d.ts +1 -1
- package/lib/typescript/store/apis/deleteMessage.d.ts.map +1 -1
- package/lib/typescript/store/apis/deleteMessagesForChannel.d.ts +1 -1
- package/lib/typescript/store/apis/deleteMessagesForChannel.d.ts.map +1 -1
- package/lib/typescript/store/apis/deletePendingTask.d.ts +1 -1
- package/lib/typescript/store/apis/deletePendingTask.d.ts.map +1 -1
- package/lib/typescript/store/apis/deleteReaction.d.ts +1 -1
- package/lib/typescript/store/apis/deleteReaction.d.ts.map +1 -1
- package/lib/typescript/store/apis/deleteReactions.d.ts +1 -1
- package/lib/typescript/store/apis/deleteReactions.d.ts.map +1 -1
- package/lib/typescript/store/apis/getAllChannelIds.d.ts +1 -1
- package/lib/typescript/store/apis/getAllChannelIds.d.ts.map +1 -1
- package/lib/typescript/store/apis/getAppSettings.d.ts +1 -1
- package/lib/typescript/store/apis/getAppSettings.d.ts.map +1 -1
- package/lib/typescript/store/apis/getChannelMessages.d.ts +1 -1
- package/lib/typescript/store/apis/getChannelMessages.d.ts.map +1 -1
- package/lib/typescript/store/apis/getChannels.d.ts +1 -1
- package/lib/typescript/store/apis/getChannels.d.ts.map +1 -1
- package/lib/typescript/store/apis/getChannelsForFilterSort.d.ts +1 -1
- package/lib/typescript/store/apis/getChannelsForFilterSort.d.ts.map +1 -1
- package/lib/typescript/store/apis/getLastSyncedAt.d.ts +1 -1
- package/lib/typescript/store/apis/getLastSyncedAt.d.ts.map +1 -1
- package/lib/typescript/store/apis/getMembers.d.ts +1 -1
- package/lib/typescript/store/apis/getMembers.d.ts.map +1 -1
- package/lib/typescript/store/apis/getPendingTasks.d.ts +1 -1
- package/lib/typescript/store/apis/getPendingTasks.d.ts.map +1 -1
- package/lib/typescript/store/apis/getReactionsforFilterSort.d.ts +1 -1
- package/lib/typescript/store/apis/getReactionsforFilterSort.d.ts.map +1 -1
- package/lib/typescript/store/apis/getReads.d.ts +1 -1
- package/lib/typescript/store/apis/getReads.d.ts.map +1 -1
- package/lib/typescript/store/apis/insertReaction.d.ts +1 -1
- package/lib/typescript/store/apis/insertReaction.d.ts.map +1 -1
- package/lib/typescript/store/apis/queries/selectChannelIdsForFilterSort.d.ts +1 -1
- package/lib/typescript/store/apis/queries/selectChannelIdsForFilterSort.d.ts.map +1 -1
- package/lib/typescript/store/apis/queries/selectChannels.d.ts +2 -2
- package/lib/typescript/store/apis/queries/selectChannels.d.ts.map +1 -1
- package/lib/typescript/store/apis/queries/selectMembersForChannels.d.ts +1 -1
- package/lib/typescript/store/apis/queries/selectMembersForChannels.d.ts.map +1 -1
- package/lib/typescript/store/apis/queries/selectMessagesForChannels.d.ts +1 -1
- package/lib/typescript/store/apis/queries/selectMessagesForChannels.d.ts.map +1 -1
- package/lib/typescript/store/apis/queries/selectReactionsForMessages.d.ts +1 -1
- package/lib/typescript/store/apis/queries/selectReactionsForMessages.d.ts.map +1 -1
- package/lib/typescript/store/apis/queries/selectReadsForChannels.d.ts +1 -1
- package/lib/typescript/store/apis/queries/selectReadsForChannels.d.ts.map +1 -1
- package/lib/typescript/store/apis/updateMessage.d.ts +1 -1
- package/lib/typescript/store/apis/updateMessage.d.ts.map +1 -1
- package/lib/typescript/store/apis/updatePollMessage.d.ts +1 -1
- package/lib/typescript/store/apis/updatePollMessage.d.ts.map +1 -1
- package/lib/typescript/store/apis/updateReaction.d.ts +1 -1
- package/lib/typescript/store/apis/updateReaction.d.ts.map +1 -1
- package/lib/typescript/store/apis/upsertAppSettings.d.ts +1 -1
- package/lib/typescript/store/apis/upsertAppSettings.d.ts.map +1 -1
- package/lib/typescript/store/apis/upsertChannelData.d.ts +1 -1
- package/lib/typescript/store/apis/upsertChannelData.d.ts.map +1 -1
- package/lib/typescript/store/apis/upsertChannelDataFromChannel.d.ts +1 -1
- package/lib/typescript/store/apis/upsertChannelDataFromChannel.d.ts.map +1 -1
- package/lib/typescript/store/apis/upsertChannels.d.ts +1 -1
- package/lib/typescript/store/apis/upsertChannels.d.ts.map +1 -1
- package/lib/typescript/store/apis/upsertCidsForQuery.d.ts +1 -1
- package/lib/typescript/store/apis/upsertCidsForQuery.d.ts.map +1 -1
- package/lib/typescript/store/apis/upsertMembers.d.ts +1 -1
- package/lib/typescript/store/apis/upsertMembers.d.ts.map +1 -1
- package/lib/typescript/store/apis/upsertMessages.d.ts +1 -1
- package/lib/typescript/store/apis/upsertMessages.d.ts.map +1 -1
- package/lib/typescript/store/apis/upsertReads.d.ts +1 -1
- package/lib/typescript/store/apis/upsertReads.d.ts.map +1 -1
- package/lib/typescript/store/apis/upsertUserSyncStatus.d.ts +1 -1
- package/lib/typescript/store/apis/upsertUserSyncStatus.d.ts.map +1 -1
- package/lib/typescript/test-utils/BetterSqlite.d.ts +2 -2
- package/lib/typescript/test-utils/BetterSqlite.d.ts.map +1 -1
- package/lib/typescript/types/types.d.ts +8 -0
- package/lib/typescript/types/types.d.ts.map +1 -1
- package/lib/typescript/utils/DBSyncManager.d.ts +1 -1
- package/lib/typescript/utils/DBSyncManager.d.ts.map +1 -1
- package/lib/typescript/utils/getResizedImageUrl.d.ts +3 -2
- package/lib/typescript/utils/getResizedImageUrl.d.ts.map +1 -1
- package/lib/typescript/utils/utils.d.ts.map +1 -1
- package/package.json +14 -14
- package/src/__tests__/offline-support/offline-feature.js +220 -176
- package/src/__tests__/offline-support/optimistic-update.js +27 -23
- package/src/components/Attachment/Attachment.tsx +2 -2
- package/src/components/Attachment/Card.tsx +10 -10
- package/src/components/Attachment/FileAttachment.tsx +8 -16
- package/src/components/Attachment/FileAttachmentGroup.tsx +2 -2
- package/src/components/Attachment/Gallery.tsx +21 -18
- package/src/components/Attachment/Giphy.tsx +14 -14
- package/src/components/Attachment/__tests__/Attachment.test.js +4 -2
- package/src/components/Attachment/__tests__/Gallery.test.js +0 -2
- package/src/components/Attachment/utils/buildGallery/buildGallery.ts +10 -1
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +4 -1
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +5 -1
- package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +6 -1
- package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +13 -6
- package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +5 -1
- package/src/components/AttachmentPicker/AttachmentPicker.tsx +7 -2
- package/src/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.tsx +2 -2
- package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx +17 -33
- package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx +18 -17
- package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +1 -1
- package/src/components/Avatar/Avatar.tsx +3 -0
- package/src/components/Avatar/GroupAvatar.tsx +4 -0
- package/src/components/Channel/Channel.tsx +299 -982
- package/src/components/Channel/__tests__/Channel.test.js +244 -13
- package/src/components/Channel/__tests__/ownCapabilities.test.js +57 -57
- package/src/components/Channel/__tests__/useMessageListPagination.test.js +419 -0
- package/src/components/Channel/hooks/useChannelDataState.ts +235 -0
- package/src/components/Channel/hooks/useCreateChannelContext.ts +0 -8
- package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +2 -6
- package/src/components/Channel/hooks/useCreateMessagesContext.ts +26 -10
- package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +3 -10
- package/src/components/Channel/hooks/useMessageListPagination.tsx +246 -0
- package/src/components/ChannelList/ChannelList.tsx +0 -17
- package/src/components/ChannelList/ChannelListFooterLoadingIndicator.tsx +1 -1
- package/src/components/ChannelList/Skeleton.tsx +9 -1
- package/src/components/ChannelList/__tests__/ChannelList.test.js +5 -5
- package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +2 -11
- package/src/components/ChannelList/hooks/usePaginatedChannels.ts +20 -13
- package/src/components/Chat/Chat.tsx +23 -18
- package/src/components/Chat/__tests__/Chat.test.js +199 -178
- package/src/components/Chat/hooks/handleEventToSyncDB.ts +18 -16
- package/src/components/Chat/hooks/useAppSettings.ts +3 -2
- package/src/components/Chat/hooks/useCreateChatContext.ts +0 -2
- package/src/components/Chat/hooks/useIsOnline.ts +13 -10
- package/src/components/ImageGallery/ImageGallery.tsx +71 -121
- package/src/components/ImageGallery/__tests__/AnimatedVideoGallery.test.tsx +0 -11
- package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +3 -4
- package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +3 -5
- package/src/components/ImageGallery/__tests__/ImageGalleryGrid.test.tsx +1 -1
- package/src/components/ImageGallery/__tests__/ImageGalleryGridHandle.test.tsx +1 -1
- package/src/components/ImageGallery/__tests__/ImageGalleryHeader.test.tsx +3 -5
- package/src/components/ImageGallery/__tests__/ImageGalleryOverlay.test.tsx +0 -3
- package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +17 -56
- package/src/components/ImageGallery/components/AnimatedGalleryVideo.tsx +21 -56
- package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +73 -59
- package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +46 -45
- package/src/components/ImageGallery/components/ImageGalleryOverlay.tsx +2 -1
- package/src/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.tsx +3 -4
- package/src/components/ImageGallery/hooks/useAnimatedGalleryStyle.tsx +83 -0
- package/src/components/ImageGallery/hooks/useImageGalleryGestures.tsx +495 -470
- package/src/components/Indicators/LoadingIndicator.tsx +1 -1
- package/src/components/Message/Message.tsx +113 -215
- package/src/components/Message/MessageSimple/MessageAvatar.tsx +1 -0
- package/src/components/Message/MessageSimple/MessageBounce.tsx +2 -2
- package/src/components/Message/MessageSimple/MessageContent.tsx +28 -155
- package/src/components/Message/MessageSimple/MessageDeleted.tsx +1 -1
- package/src/components/Message/MessageSimple/MessageFooter.tsx +1 -1
- package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +21 -66
- package/src/components/Message/MessageSimple/MessageSimple.tsx +245 -54
- package/src/components/Message/MessageSimple/MessageTextContainer.tsx +3 -4
- package/src/components/Message/MessageSimple/ReactionList/ReactionListBottom.tsx +295 -0
- package/src/components/Message/MessageSimple/ReactionList/ReactionListTop.tsx +271 -0
- package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +1 -2
- package/src/components/Message/MessageSimple/__tests__/MessageSimple.test.js +208 -0
- package/src/components/Message/MessageSimple/__tests__/MessageTextContainer.test.tsx +3 -3
- package/src/components/Message/MessageSimple/__tests__/ReactionListBottom.test.js +166 -0
- package/src/components/Message/MessageSimple/__tests__/ReactionListTop.test.js +92 -0
- package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessagePinnedHeader.test.js.snap +23 -19
- package/src/components/Message/hooks/useCreateMessageContext.ts +4 -16
- package/src/components/Message/hooks/useMessageActions.tsx +48 -68
- package/src/components/Message/hooks/useMessageData.ts +59 -0
- package/src/components/Message/hooks/useProcessReactions.ts +17 -10
- package/src/components/Message/utils/messageActions.ts +10 -20
- package/src/components/MessageInput/FileUploadPreview.tsx +2 -2
- package/src/components/MessageInput/MessageInput.tsx +0 -1
- package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewExpo.test.tsx +1 -4
- package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewNative.test.tsx +1 -4
- package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +3 -5
- package/src/components/MessageInput/__tests__/MessageInput.test.js +116 -2
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingButton.tsx +7 -1
- package/src/components/MessageInput/components/AudioRecorder/AudioRecordingLockIndicator.tsx +0 -1
- package/src/components/MessageInput/components/NativeAttachmentPicker.tsx +8 -1
- package/src/components/MessageInput/hooks/useAudioController.tsx +4 -7
- package/src/components/MessageList/MessageList.tsx +53 -83
- package/src/components/MessageList/ScrollToBottomButton.tsx +1 -1
- package/src/components/MessageList/__tests__/MessageList.test.js +174 -23
- package/src/components/MessageList/__tests__/ScrollToBottomButton.test.js +3 -3
- package/src/components/MessageList/__tests__/__snapshots__/ScrollToBottomButton.test.js.snap +1 -1
- package/src/components/MessageList/hooks/useMessageList.ts +2 -5
- package/src/components/MessageList/utils/getReadStates.ts +3 -2
- package/src/components/MessageMenu/MessageActionList.tsx +49 -0
- package/src/components/MessageMenu/MessageActionListItem.tsx +86 -0
- package/src/components/MessageMenu/MessageMenu.tsx +123 -0
- package/src/components/MessageMenu/MessageReactionPicker.tsx +122 -0
- package/src/components/MessageMenu/MessageUserReactions.tsx +207 -0
- package/src/components/{MessageOverlay/OverlayReactionsAvatar.tsx → MessageMenu/MessageUserReactionsAvatar.tsx} +6 -6
- package/src/components/MessageMenu/MessageUserReactionsItem.tsx +132 -0
- package/src/components/MessageMenu/ReactionButton.tsx +72 -0
- package/src/components/MessageMenu/__tests__/MessageActionList.test.tsx +48 -0
- package/src/components/MessageMenu/__tests__/MessageActionListItem.test.tsx +48 -0
- package/src/components/MessageMenu/__tests__/MessageReactionPicker.test.tsx +101 -0
- package/src/components/MessageMenu/__tests__/MessageUserReactions.test.tsx +186 -0
- package/src/components/MessageMenu/__tests__/MessageUserReactionsAvatar.test.tsx +35 -0
- package/src/components/MessageMenu/__tests__/MessageUserReactionsItem.test.tsx +81 -0
- package/src/components/MessageMenu/__tests__/ReactionButton.test.tsx +77 -0
- package/src/components/{MessageOverlay → MessageMenu}/hooks/useFetchReactions.ts +4 -2
- package/src/components/Poll/CreatePollContent.tsx +4 -4
- package/src/components/Poll/Poll.tsx +1 -20
- package/src/components/Poll/components/Button.tsx +8 -420
- package/src/components/Poll/components/CreatePollIcon.tsx +1 -1
- package/src/components/Poll/components/CreatePollOptions.tsx +9 -4
- package/src/components/Poll/components/PollAnswersList.tsx +66 -3
- package/src/components/Poll/components/PollButtons.tsx +241 -0
- package/src/components/Poll/components/PollInputDialog.tsx +9 -6
- package/src/components/Poll/components/PollModalHeader.tsx +3 -3
- package/src/components/Poll/components/PollOption.tsx +74 -4
- package/src/components/Poll/components/PollResults/PollOptionFullResults.tsx +1 -1
- package/src/components/Poll/components/PollResults/PollResultItem.tsx +68 -52
- package/src/components/Poll/components/PollResults/PollVote.tsx +68 -0
- package/src/components/Poll/components/index.ts +1 -0
- package/src/components/ProgressControl/ProgressControl.tsx +28 -38
- package/src/components/ProgressControl/WaveProgressBar.tsx +29 -37
- package/src/components/Reply/Reply.tsx +5 -2
- package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +936 -796
- package/src/components/UIComponents/BottomSheetModal.tsx +174 -0
- package/src/components/UIComponents/index.ts +3 -0
- package/src/components/docs/data.js +13 -27
- package/src/components/index.ts +11 -10
- package/src/contexts/__tests__/index.test.tsx +0 -5
- package/src/contexts/activeChannelsRefContext/ActiveChannelsRefContext.tsx +0 -27
- package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +1 -29
- package/src/contexts/channelContext/ChannelContext.tsx +33 -79
- package/src/contexts/channelsContext/ChannelsContext.tsx +1 -28
- package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +2 -97
- package/src/contexts/channelsStateContext/useChannelState.ts +6 -108
- package/src/contexts/chatConfigContext/ChatConfigContext.tsx +33 -0
- package/src/contexts/chatContext/ChatContext.tsx +1 -30
- package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +0 -29
- package/src/contexts/index.ts +1 -1
- package/src/contexts/keyboardContext/KeyboardContext.tsx +0 -30
- package/src/contexts/messageContext/MessageContext.tsx +22 -75
- package/src/contexts/messageInputContext/MessageInputContext.tsx +12 -39
- package/src/contexts/messageInputContext/__tests__/isValidMessage.test.tsx +2 -3
- package/src/contexts/messageInputContext/__tests__/uploadFile.test.tsx +1 -2
- package/src/contexts/messageInputContext/__tests__/uploadImage.test.tsx +1 -2
- package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +1 -5
- package/src/contexts/messagesContext/MessagesContext.tsx +84 -57
- package/src/contexts/overlayContext/OverlayContext.tsx +2 -55
- package/src/contexts/overlayContext/OverlayProvider.tsx +23 -64
- package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +18 -46
- package/src/contexts/suggestionsContext/SuggestionsContext.tsx +1 -30
- package/src/contexts/themeContext/utils/theme.ts +141 -92
- package/src/contexts/threadContext/ThreadContext.tsx +1 -28
- package/src/contexts/translationContext/TranslationContext.tsx +0 -29
- package/src/contexts/typingContext/TypingContext.tsx +1 -28
- package/src/hooks/__tests__/useTranslatedMessage.test.tsx +3 -9
- package/src/hooks/useTranslatedMessage.ts +1 -4
- package/src/icons/PinHeader.tsx +13 -7
- package/src/index.ts +2 -3
- package/src/mock-builders/DB/mock.ts +70 -87
- package/src/native.ts +18 -29
- package/src/store/SqliteClient.ts +210 -0
- package/src/store/apis/addPendingTask.ts +7 -7
- package/src/store/apis/deleteChannel.ts +4 -4
- package/src/store/apis/deleteMember.ts +4 -4
- package/src/store/apis/deleteMessage.ts +4 -4
- package/src/store/apis/deleteMessagesForChannel.ts +4 -4
- package/src/store/apis/deletePendingTask.ts +4 -4
- package/src/store/apis/deleteReaction.ts +4 -4
- package/src/store/apis/deleteReactions.ts +3 -3
- package/src/store/apis/getAllChannelIds.ts +4 -4
- package/src/store/apis/getAppSettings.ts +5 -5
- package/src/store/apis/getChannelMessages.ts +6 -6
- package/src/store/apis/getChannels.ts +8 -8
- package/src/store/apis/getChannelsForFilterSort.ts +6 -6
- package/src/store/apis/getLastSyncedAt.ts +5 -5
- package/src/store/apis/getMembers.ts +4 -4
- package/src/store/apis/getPendingTasks.ts +4 -4
- package/src/store/apis/getReactions.ts +2 -2
- package/src/store/apis/getReactionsforFilterSort.ts +8 -6
- package/src/store/apis/getReads.ts +4 -4
- package/src/store/apis/insertReaction.ts +4 -4
- package/src/store/apis/queries/selectChannelIdsForFilterSort.ts +5 -5
- package/src/store/apis/queries/selectChannels.ts +6 -6
- package/src/store/apis/queries/selectMembersForChannels.ts +6 -4
- package/src/store/apis/queries/selectMessagesForChannels.ts +7 -5
- package/src/store/apis/queries/selectReactionsForMessages.ts +5 -5
- package/src/store/apis/queries/selectReadsForChannels.ts +7 -5
- package/src/store/apis/updateMessage.ts +5 -5
- package/src/store/apis/updatePollMessage.ts +5 -5
- package/src/store/apis/updateReaction.ts +4 -4
- package/src/store/apis/upsertAppSettings.ts +4 -4
- package/src/store/apis/upsertChannelData.ts +5 -4
- package/src/store/apis/upsertChannelDataFromChannel.ts +3 -3
- package/src/store/apis/upsertChannels.ts +8 -8
- package/src/store/apis/upsertCidsForQuery.ts +4 -4
- package/src/store/apis/upsertMembers.ts +4 -4
- package/src/store/apis/upsertMessages.ts +4 -4
- package/src/store/apis/upsertReads.ts +4 -4
- package/src/store/apis/upsertUserSyncStatus.ts +4 -4
- package/src/test-utils/BetterSqlite.js +4 -12
- package/src/types/types.ts +9 -0
- package/src/utils/DBSyncManager.ts +49 -44
- package/src/utils/__tests__/getResizedImageUrl.test.ts +1 -2
- package/src/utils/getResizedImageUrl.ts +7 -5
- package/src/utils/utils.ts +1 -1
- package/src/version.json +1 -1
- package/lib/commonjs/components/ImageBackground.js.map +0 -1
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +0 -305
- package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js +0 -112
- package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +0 -87
- package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +0 -461
- package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +0 -24
- package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +0 -305
- package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +0 -188
- package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsItem.js +0 -166
- package/lib/commonjs/components/MessageOverlay/OverlayReactionsItem.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/hooks/useFetchReactions.js.map +0 -1
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js +0 -34
- package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +0 -1
- package/lib/commonjs/components/Spinner/Spinner.js.map +0 -1
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +0 -45
- package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +0 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js +0 -27
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js.map +0 -1
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +0 -67
- package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +0 -1
- package/lib/commonjs/store/QuickSqliteClient.js +0 -158
- package/lib/commonjs/store/QuickSqliteClient.js.map +0 -1
- package/lib/commonjs/utils/StreamChatRN.js +0 -25
- package/lib/commonjs/utils/StreamChatRN.js.map +0 -1
- package/lib/module/components/ImageBackground.js.map +0 -1
- package/lib/module/components/Message/MessageSimple/ReactionList.js +0 -305
- package/lib/module/components/Message/MessageSimple/ReactionList.js.map +0 -1
- package/lib/module/components/MessageOverlay/MessageActionList.js +0 -112
- package/lib/module/components/MessageOverlay/MessageActionList.js.map +0 -1
- package/lib/module/components/MessageOverlay/MessageActionListItem.js +0 -87
- package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +0 -1
- package/lib/module/components/MessageOverlay/MessageOverlay.js +0 -461
- package/lib/module/components/MessageOverlay/MessageOverlay.js.map +0 -1
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js +0 -24
- package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +0 -1
- package/lib/module/components/MessageOverlay/OverlayReactionList.js +0 -305
- package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +0 -1
- package/lib/module/components/MessageOverlay/OverlayReactions.js +0 -188
- package/lib/module/components/MessageOverlay/OverlayReactions.js.map +0 -1
- package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js.map +0 -1
- package/lib/module/components/MessageOverlay/OverlayReactionsItem.js +0 -166
- package/lib/module/components/MessageOverlay/OverlayReactionsItem.js.map +0 -1
- package/lib/module/components/MessageOverlay/hooks/useFetchReactions.js.map +0 -1
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js +0 -34
- package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +0 -1
- package/lib/module/components/Spinner/Spinner.js.map +0 -1
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +0 -45
- package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +0 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js +0 -27
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js.map +0 -1
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +0 -67
- package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +0 -1
- package/lib/module/store/QuickSqliteClient.js +0 -158
- package/lib/module/store/QuickSqliteClient.js.map +0 -1
- package/lib/module/utils/StreamChatRN.js +0 -25
- package/lib/module/utils/StreamChatRN.js.map +0 -1
- package/lib/typescript/components/ImageBackground.d.ts.map +0 -1
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +0 -32
- package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +0 -14
- package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +0 -15
- package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts +0 -8
- package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +0 -36
- package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +0 -31
- package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts +0 -11
- package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/OverlayReactionsItem.d.ts +0 -11
- package/lib/typescript/components/MessageOverlay/OverlayReactionsItem.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/hooks/useFetchReactions.d.ts.map +0 -1
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +0 -11
- package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts.map +0 -1
- package/lib/typescript/components/Spinner/Spinner.d.ts.map +0 -1
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +0 -80
- package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts.map +0 -1
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts +0 -13
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts.map +0 -1
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts +0 -2
- package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts.map +0 -1
- package/lib/typescript/store/QuickSqliteClient.d.ts +0 -26
- package/lib/typescript/store/QuickSqliteClient.d.ts.map +0 -1
- package/lib/typescript/utils/StreamChatRN.d.ts +0 -23
- package/lib/typescript/utils/StreamChatRN.d.ts.map +0 -1
- package/src/components/Message/MessageSimple/ReactionList.tsx +0 -398
- package/src/components/MessageOverlay/MessageActionList.tsx +0 -171
- package/src/components/MessageOverlay/MessageActionListItem.tsx +0 -144
- package/src/components/MessageOverlay/MessageOverlay.tsx +0 -648
- package/src/components/MessageOverlay/OverlayBackdrop.tsx +0 -18
- package/src/components/MessageOverlay/OverlayReactionList.tsx +0 -447
- package/src/components/MessageOverlay/OverlayReactions.tsx +0 -252
- package/src/components/MessageOverlay/OverlayReactionsItem.tsx +0 -188
- package/src/components/MessageOverlay/hooks/useMessageActionAnimation.tsx +0 -44
- package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +0 -148
- package/src/contexts/messageOverlayContext/hooks/useResettableState.test.tsx +0 -48
- package/src/contexts/messageOverlayContext/hooks/useResettableState.ts +0 -22
- package/src/store/QuickSqliteClient.ts +0 -187
- package/src/utils/StreamChatRN.ts +0 -27
- /package/lib/typescript/components/{MessageOverlay → MessageMenu}/hooks/useFetchReactions.d.ts +0 -0
- /package/lib/typescript/components/{ImageBackground.d.ts → UIComponents/ImageBackground.d.ts} +0 -0
- /package/lib/typescript/components/{Spinner → UIComponents}/Spinner.d.ts +0 -0
- /package/src/components/{ImageBackground.tsx → UIComponents/ImageBackground.tsx} +0 -0
- /package/src/components/{Spinner → UIComponents}/Spinner.tsx +0 -0
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
Object.defineProperty(exports, "__esModule", {
|
|
2
|
+
value: true
|
|
3
|
+
});
|
|
4
|
+
exports.useAnimatedGalleryStyle = void 0;
|
|
5
|
+
var _reactNativeReanimated = require("react-native-reanimated");
|
|
6
|
+
var _useViewport2 = require("../../../hooks/useViewport");
|
|
7
|
+
var oneEighth = 1 / 8;
|
|
8
|
+
var useAnimatedGalleryStyle = function useAnimatedGalleryStyle(_ref) {
|
|
9
|
+
var index = _ref.index,
|
|
10
|
+
offsetScale = _ref.offsetScale,
|
|
11
|
+
previous = _ref.previous,
|
|
12
|
+
scale = _ref.scale,
|
|
13
|
+
screenHeight = _ref.screenHeight,
|
|
14
|
+
selected = _ref.selected,
|
|
15
|
+
translateX = _ref.translateX,
|
|
16
|
+
translateY = _ref.translateY;
|
|
17
|
+
var _useViewport = (0, _useViewport2.useViewport)(),
|
|
18
|
+
vw = _useViewport.vw;
|
|
19
|
+
var screenWidth = vw(100);
|
|
20
|
+
var halfScreenWidth = vw(50);
|
|
21
|
+
var animatedGalleryStyle = (0, _reactNativeReanimated.useAnimatedStyle)(function () {
|
|
22
|
+
var xScaleOffset = -7 * screenWidth * (0.5 + index);
|
|
23
|
+
var yScaleOffset = -screenHeight * 3.5;
|
|
24
|
+
return {
|
|
25
|
+
transform: [{
|
|
26
|
+
translateX: selected ? translateX.value + xScaleOffset : scale.value < 1 || scale.value !== offsetScale.value ? xScaleOffset : previous ? translateX.value - halfScreenWidth * (scale.value - 1) + xScaleOffset : translateX.value + halfScreenWidth * (scale.value - 1) + xScaleOffset
|
|
27
|
+
}, {
|
|
28
|
+
translateY: selected ? translateY.value + yScaleOffset : yScaleOffset
|
|
29
|
+
}, {
|
|
30
|
+
scale: selected ? scale.value / 8 : oneEighth
|
|
31
|
+
}, {
|
|
32
|
+
scaleX: -1
|
|
33
|
+
}]
|
|
34
|
+
};
|
|
35
|
+
}, [previous, selected]);
|
|
36
|
+
var animatedStyles = (0, _reactNativeReanimated.useAnimatedStyle)(function () {
|
|
37
|
+
var xScaleOffset = -7 * screenWidth * (0.5 + index);
|
|
38
|
+
var yScaleOffset = -screenHeight * 3.5;
|
|
39
|
+
return {
|
|
40
|
+
transform: [{
|
|
41
|
+
scaleX: -1
|
|
42
|
+
}, {
|
|
43
|
+
translateY: yScaleOffset
|
|
44
|
+
}, {
|
|
45
|
+
translateX: -xScaleOffset
|
|
46
|
+
}, {
|
|
47
|
+
scale: oneEighth
|
|
48
|
+
}]
|
|
49
|
+
};
|
|
50
|
+
}, [index]);
|
|
51
|
+
return [animatedGalleryStyle, animatedStyles];
|
|
52
|
+
};
|
|
53
|
+
exports.useAnimatedGalleryStyle = useAnimatedGalleryStyle;
|
|
54
|
+
//# sourceMappingURL=useAnimatedGalleryStyle.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNativeReanimated","require","_useViewport2","oneEighth","useAnimatedGalleryStyle","_ref","index","offsetScale","previous","scale","screenHeight","selected","translateX","translateY","_useViewport","useViewport","vw","screenWidth","halfScreenWidth","animatedGalleryStyle","useAnimatedStyle","xScaleOffset","yScaleOffset","transform","value","scaleX","animatedStyles","exports"],"sourceRoot":"../../../../../src","sources":["components/ImageGallery/hooks/useAnimatedGalleryStyle.tsx"],"mappings":";;;;AACA,IAAAA,sBAAA,GAAAC,OAAA;AAEA,IAAAC,aAAA,GAAAD,OAAA;AAaA,IAAME,SAAS,GAAG,CAAC,GAAG,CAAC;AAEhB,IAAMC,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAAC,IAAA,EASvB;EAAA,IARXC,KAAK,GAAAD,IAAA,CAALC,KAAK;IACLC,WAAW,GAAAF,IAAA,CAAXE,WAAW;IACXC,QAAQ,GAAAH,IAAA,CAARG,QAAQ;IACRC,KAAK,GAAAJ,IAAA,CAALI,KAAK;IACLC,YAAY,GAAAL,IAAA,CAAZK,YAAY;IACZC,QAAQ,GAAAN,IAAA,CAARM,QAAQ;IACRC,UAAU,GAAAP,IAAA,CAAVO,UAAU;IACVC,UAAU,GAAAR,IAAA,CAAVQ,UAAU;EAEV,IAAAC,YAAA,GAAe,IAAAC,yBAAW,EAAC,CAAC;IAApBC,EAAE,GAAAF,YAAA,CAAFE,EAAE;EAEV,IAAMC,WAAW,GAAGD,EAAE,CAAC,GAAG,CAAC;EAC3B,IAAME,eAAe,GAAGF,EAAE,CAAC,EAAE,CAAC;EAU9B,IAAMG,oBAAoB,GAAG,IAAAC,uCAAgB,EAAa,YAAM;IAC9D,IAAMC,YAAY,GAAG,CAAC,CAAC,GAAGJ,WAAW,IAAI,GAAG,GAAGX,KAAK,CAAC;IACrD,IAAMgB,YAAY,GAAG,CAACZ,YAAY,GAAG,GAAG;IACxC,OAAO;MACLa,SAAS,EAAE,CACT;QACEX,UAAU,EAAED,QAAQ,GAChBC,UAAU,CAACY,KAAK,GAAGH,YAAY,GAC/BZ,KAAK,CAACe,KAAK,GAAG,CAAC,IAAIf,KAAK,CAACe,KAAK,KAAKjB,WAAW,CAACiB,KAAK,GACpDH,YAAY,GACZb,QAAQ,GACRI,UAAU,CAACY,KAAK,GAAGN,eAAe,IAAIT,KAAK,CAACe,KAAK,GAAG,CAAC,CAAC,GAAGH,YAAY,GACrET,UAAU,CAACY,KAAK,GAAGN,eAAe,IAAIT,KAAK,CAACe,KAAK,GAAG,CAAC,CAAC,GAAGH;MAC/D,CAAC,EACD;QACER,UAAU,EAAEF,QAAQ,GAAGE,UAAU,CAACW,KAAK,GAAGF,YAAY,GAAGA;MAC3D,CAAC,EACD;QACEb,KAAK,EAAEE,QAAQ,GAAGF,KAAK,CAACe,KAAK,GAAG,CAAC,GAAGrB;MACtC,CAAC,EACD;QAAEsB,MAAM,EAAE,CAAC;MAAE,CAAC;IAElB,CAAC;EACH,CAAC,EAAE,CAACjB,QAAQ,EAAEG,QAAQ,CAAC,CAAC;EAExB,IAAMe,cAAc,GAAG,IAAAN,uCAAgB,EAAC,YAAM;IAC5C,IAAMC,YAAY,GAAG,CAAC,CAAC,GAAGJ,WAAW,IAAI,GAAG,GAAGX,KAAK,CAAC;IACrD,IAAMgB,YAAY,GAAG,CAACZ,YAAY,GAAG,GAAG;IACxC,OAAO;MACLa,SAAS,EAAE,CACT;QAAEE,MAAM,EAAE,CAAC;MAAE,CAAC,EACd;QAAEZ,UAAU,EAAES;MAAa,CAAC,EAC5B;QACEV,UAAU,EAAE,CAACS;MACf,CAAC,EACD;QAAEZ,KAAK,EAAEN;MAAU,CAAC;IAExB,CAAC;EACH,CAAC,EAAE,CAACG,KAAK,CAAC,CAAC;EAEX,OAAO,CAACa,oBAAoB,EAAEO,cAAc,CAAC;AAC/C,CAAC;AAACC,OAAA,CAAAvB,uBAAA,GAAAA,uBAAA","ignoreList":[]}
|
|
@@ -1,9 +1,14 @@
|
|
|
1
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
1
2
|
Object.defineProperty(exports, "__esModule", {
|
|
2
3
|
value: true
|
|
3
4
|
});
|
|
4
5
|
exports.useImageGalleryGestures = exports.clamp = exports.IsSwiping = exports.HasPinched = void 0;
|
|
6
|
+
var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
|
|
7
|
+
var _react = require("react");
|
|
5
8
|
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeGestureHandler = require("react-native-gesture-handler");
|
|
6
10
|
var _reactNativeReanimated = require("react-native-reanimated");
|
|
11
|
+
var _ImageGalleryContext = require("../../../contexts/imageGalleryContext/ImageGalleryContext");
|
|
7
12
|
var _OverlayContext = require("../../../contexts/overlayContext/OverlayContext");
|
|
8
13
|
var _native = require("../../../native");
|
|
9
14
|
var HasPinched = function (HasPinched) {
|
|
@@ -36,7 +41,19 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
36
41
|
translateX = _ref.translateX,
|
|
37
42
|
translateY = _ref.translateY,
|
|
38
43
|
translationX = _ref.translationX;
|
|
44
|
+
var _useState = (0, _react.useState)(selectedIndex),
|
|
45
|
+
_useState2 = (0, _slicedToArray2["default"])(_useState, 2),
|
|
46
|
+
index = _useState2[0],
|
|
47
|
+
setIndex = _useState2[1];
|
|
48
|
+
var _useImageGalleryConte = (0, _ImageGalleryContext.useImageGalleryContext)(),
|
|
49
|
+
setMessages = _useImageGalleryConte.setMessages,
|
|
50
|
+
setSelectedMessage = _useImageGalleryConte.setSelectedMessage;
|
|
51
|
+
var doubleTapRef = (0, _react.useRef)(undefined);
|
|
52
|
+
var panRef = (0, _react.useRef)(undefined);
|
|
53
|
+
var pinchRef = (0, _react.useRef)(undefined);
|
|
54
|
+
var singleTapRef = (0, _react.useRef)(undefined);
|
|
39
55
|
var _useOverlayContext = (0, _OverlayContext.useOverlayContext)(),
|
|
56
|
+
overlay = _useOverlayContext.overlay,
|
|
40
57
|
setOverlay = _useOverlayContext.setOverlay;
|
|
41
58
|
var isAndroid = _reactNative.Platform.OS === 'android';
|
|
42
59
|
var hasHitBottomScale = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
@@ -47,10 +64,9 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
47
64
|
var oldFocalY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
48
65
|
var focalX = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
49
66
|
var focalY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
}
|
|
67
|
+
(0, _react.useEffect)(function () {
|
|
68
|
+
setIndex(selectedIndex);
|
|
69
|
+
}, [selectedIndex]);
|
|
54
70
|
var offsetX = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
55
71
|
var offsetY = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
56
72
|
var focalOffsetX = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
@@ -86,250 +102,239 @@ var useImageGalleryGestures = function useImageGalleryGestures(_ref) {
|
|
|
86
102
|
scale.value = 1;
|
|
87
103
|
offsetScale.value = 1;
|
|
88
104
|
};
|
|
89
|
-
var
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
105
|
+
var pan = _reactNativeGestureHandler.Gesture.Pan().enabled(overlay === 'gallery').maxPointers(isAndroid ? 0 : 1).minDistance(10).onStart(function () {
|
|
106
|
+
if (!isPinch.value) {
|
|
107
|
+
(0, _reactNativeReanimated.cancelAnimation)(translateX);
|
|
108
|
+
(0, _reactNativeReanimated.cancelAnimation)(translateY);
|
|
109
|
+
(0, _reactNativeReanimated.cancelAnimation)(scale);
|
|
110
|
+
offsetX.value = translateX.value;
|
|
111
|
+
offsetY.value = translateY.value;
|
|
112
|
+
}
|
|
113
|
+
hasPinched.value = HasPinched.FALSE;
|
|
114
|
+
}).onChange(function (event) {
|
|
115
|
+
if (event.numberOfPointers === 1 && !isPinch.value) {
|
|
116
|
+
if (isAndroid && hasPinched.value === HasPinched.TRUE) {
|
|
117
|
+
hasPinched.value = HasPinched.FALSE;
|
|
118
|
+
isSwiping.value = IsSwiping.FALSE;
|
|
119
|
+
offsetX.value = translateX.value + event.translationX;
|
|
120
|
+
offsetY.value = translateY.value - event.translationY;
|
|
121
|
+
}
|
|
122
|
+
if (isSwiping.value === IsSwiping.UNDETERMINED) {
|
|
123
|
+
var maxXYRatio = isAndroid ? 1 : 0.25;
|
|
124
|
+
if (Math.abs(event.translationX / event.translationY) > maxXYRatio && (Math.abs(-halfScreenWidth * (scale.value - 1) - offsetX.value) < 3 || Math.abs(halfScreenWidth * (scale.value - 1) - offsetX.value) < 3)) {
|
|
125
|
+
isSwiping.value = IsSwiping.TRUE;
|
|
97
126
|
}
|
|
98
|
-
if (
|
|
99
|
-
|
|
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)) {
|
|
101
|
-
isSwiping.value = IsSwiping.TRUE;
|
|
102
|
-
}
|
|
103
|
-
if (Math.abs(evt.translationY) > 25) {
|
|
104
|
-
isSwiping.value = IsSwiping.FALSE;
|
|
105
|
-
}
|
|
127
|
+
if (Math.abs(event.translationY) > 25) {
|
|
128
|
+
isSwiping.value = IsSwiping.FALSE;
|
|
106
129
|
}
|
|
107
|
-
var localEvtScale = scale.value / offsetScale.value;
|
|
108
|
-
translateX.value = scale.value !== offsetScale.value ? offsetX.value * localEvtScale - evt.translationX : offsetX.value - evt.translationX;
|
|
109
|
-
translateY.value = isSwiping.value !== IsSwiping.TRUE ? scale.value !== offsetScale.value ? offsetY.value * localEvtScale + evt.translationY : offsetY.value + evt.translationY : translateY.value;
|
|
110
|
-
scale.value = currentImageHeight * offsetScale.value < screenHeight && translateY.value > 0 ? offsetScale.value * (1 - 1 / 3 * (translateY.value / screenHeight)) : currentImageHeight * offsetScale.value > screenHeight && translateY.value > currentImageHeight / 2 * offsetScale.value - halfScreenHeight ? offsetScale.value * (1 - 1 / 3 * ((translateY.value - (currentImageHeight / 2 * offsetScale.value - halfScreenHeight)) / screenHeight)) : scale.value;
|
|
111
|
-
overlayOpacity.value = localEvtScale;
|
|
112
130
|
}
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
}
|
|
129
|
-
(
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
133
|
-
}, function () {
|
|
134
|
-
resetMovementValues();
|
|
135
|
-
index.value = index.value - 1;
|
|
136
|
-
(0, _reactNativeReanimated.runOnJS)(setSelectedIndex)(index.value);
|
|
137
|
-
});
|
|
138
|
-
}
|
|
139
|
-
translateX.value = scale.value < 1 ? (0, _reactNativeReanimated.withTiming)(0) : translateX.value > halfScreenWidth * (scale.value - 1) ? (0, _reactNativeReanimated.withTiming)(halfScreenWidth * (scale.value - 1), {
|
|
140
|
-
duration: 200
|
|
141
|
-
}) : translateX.value < -halfScreenWidth * (scale.value - 1) ? (0, _reactNativeReanimated.withTiming)(-halfScreenWidth * (scale.value - 1), {
|
|
142
|
-
duration: 200
|
|
143
|
-
}) : (0, _reactNativeReanimated.withDecay)({
|
|
144
|
-
clamp: [-halfScreenWidth * (scale.value - 1), halfScreenWidth * (scale.value - 1)],
|
|
145
|
-
deceleration: 0.99,
|
|
146
|
-
velocity: -evt.velocityX
|
|
131
|
+
var localEvtScale = scale.value / offsetScale.value;
|
|
132
|
+
translateX.value = scale.value !== offsetScale.value ? offsetX.value * localEvtScale - event.translationX : offsetX.value - event.translationX;
|
|
133
|
+
translateY.value = isSwiping.value !== IsSwiping.TRUE ? scale.value !== offsetScale.value ? offsetY.value * localEvtScale + event.translationY : offsetY.value + event.translationY : translateY.value;
|
|
134
|
+
scale.value = currentImageHeight * offsetScale.value < screenHeight && translateY.value > 0 ? offsetScale.value * (1 - 1 / 3 * (translateY.value / screenHeight)) : currentImageHeight * offsetScale.value > screenHeight && translateY.value > currentImageHeight / 2 * offsetScale.value - halfScreenHeight ? offsetScale.value * (1 - 1 / 3 * ((translateY.value - (currentImageHeight / 2 * offsetScale.value - halfScreenHeight)) / screenHeight)) : scale.value;
|
|
135
|
+
overlayOpacity.value = localEvtScale;
|
|
136
|
+
}
|
|
137
|
+
}).onEnd(function (event) {
|
|
138
|
+
if (!isPinch.value && event.numberOfPointers < 2) {
|
|
139
|
+
var finalXPosition = event.translationX - event.velocityX * 0.3;
|
|
140
|
+
var finalYPosition = event.translationY + event.velocityY * 0.1;
|
|
141
|
+
if (index < photoLength - 1 && Math.abs(halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 && translateX.value < 0 && finalXPosition < -halfScreenWidth && isSwiping.value === IsSwiping.TRUE) {
|
|
142
|
+
(0, _reactNativeReanimated.cancelAnimation)(translationX);
|
|
143
|
+
translationX.value = (0, _reactNativeReanimated.withTiming)(-(screenWidth + MARGIN) * (index + 1), {
|
|
144
|
+
duration: 200,
|
|
145
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
146
|
+
}, function () {
|
|
147
|
+
resetMovementValues();
|
|
148
|
+
(0, _reactNativeReanimated.runOnJS)(setIndex)(index + 1);
|
|
149
|
+
(0, _reactNativeReanimated.runOnJS)(setSelectedIndex)(index + 1);
|
|
147
150
|
});
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
151
|
+
} else if (index > 0 && Math.abs(-halfScreenWidth * (scale.value - 1) + offsetX.value) < 3 && translateX.value > 0 && finalXPosition > halfScreenWidth && isSwiping.value === IsSwiping.TRUE) {
|
|
152
|
+
(0, _reactNativeReanimated.cancelAnimation)(translationX);
|
|
153
|
+
translationX.value = (0, _reactNativeReanimated.withTiming)(-(screenWidth + MARGIN) * (index - 1), {
|
|
154
|
+
duration: 200,
|
|
155
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
156
|
+
}, function () {
|
|
157
|
+
resetMovementValues();
|
|
158
|
+
(0, _reactNativeReanimated.runOnJS)(setIndex)(index - 1);
|
|
159
|
+
(0, _reactNativeReanimated.runOnJS)(setSelectedIndex)(index - 1);
|
|
152
160
|
});
|
|
153
|
-
resetTouchValues();
|
|
154
|
-
scale.value = scale.value !== offsetScale.value ? (0, _reactNativeReanimated.withTiming)(offsetScale.value) : offsetScale.value;
|
|
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)) {
|
|
156
|
-
(0, _reactNativeReanimated.cancelAnimation)(translateX);
|
|
157
|
-
(0, _reactNativeReanimated.cancelAnimation)(translateY);
|
|
158
|
-
(0, _reactNativeReanimated.cancelAnimation)(scale);
|
|
159
|
-
overlayOpacity.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
160
|
-
duration: 200,
|
|
161
|
-
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
162
|
-
}, function () {
|
|
163
|
-
(0, _reactNativeReanimated.runOnJS)(setOverlay)('none');
|
|
164
|
-
});
|
|
165
|
-
scale.value = (0, _reactNativeReanimated.withTiming)(0.6, {
|
|
166
|
-
duration: 200,
|
|
167
|
-
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
168
|
-
});
|
|
169
|
-
translateY.value = evt.velocityY > 1000 ? (0, _reactNativeReanimated.withDecay)({
|
|
170
|
-
velocity: evt.velocityY
|
|
171
|
-
}) : (0, _reactNativeReanimated.withTiming)(halfScreenHeight + currentImageHeight / 2 * scale.value, {
|
|
172
|
-
duration: 200,
|
|
173
|
-
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
174
|
-
});
|
|
175
|
-
translateX.value = (0, _reactNativeReanimated.withDecay)({
|
|
176
|
-
velocity: -evt.velocityX
|
|
177
|
-
});
|
|
178
|
-
}
|
|
179
161
|
}
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
162
|
+
translateX.value = scale.value < 1 ? (0, _reactNativeReanimated.withTiming)(0) : translateX.value > halfScreenWidth * (scale.value - 1) ? (0, _reactNativeReanimated.withTiming)(halfScreenWidth * (scale.value - 1), {
|
|
163
|
+
duration: 200
|
|
164
|
+
}) : translateX.value < -halfScreenWidth * (scale.value - 1) ? (0, _reactNativeReanimated.withTiming)(-halfScreenWidth * (scale.value - 1), {
|
|
165
|
+
duration: 200
|
|
166
|
+
}) : (0, _reactNativeReanimated.withDecay)({
|
|
167
|
+
clamp: [-halfScreenWidth * (scale.value - 1), halfScreenWidth * (scale.value - 1)],
|
|
168
|
+
deceleration: 0.99,
|
|
169
|
+
velocity: -event.velocityX
|
|
170
|
+
});
|
|
171
|
+
translateY.value = currentImageHeight * scale.value < screenHeight ? (0, _reactNativeReanimated.withTiming)(0) : translateY.value > currentImageHeight / 2 * scale.value - halfScreenHeight ? (0, _reactNativeReanimated.withTiming)(currentImageHeight / 2 * scale.value - halfScreenHeight) : translateY.value < -currentImageHeight / 2 * scale.value + halfScreenHeight ? (0, _reactNativeReanimated.withTiming)(-currentImageHeight / 2 * scale.value + halfScreenHeight) : (0, _reactNativeReanimated.withDecay)({
|
|
172
|
+
clamp: [-currentImageHeight / 2 * scale.value + halfScreenHeight, currentImageHeight / 2 * scale.value - halfScreenHeight],
|
|
173
|
+
deceleration: 0.99,
|
|
174
|
+
velocity: event.velocityY
|
|
175
|
+
});
|
|
176
|
+
resetTouchValues();
|
|
177
|
+
scale.value = scale.value !== offsetScale.value ? (0, _reactNativeReanimated.withTiming)(offsetScale.value) : offsetScale.value;
|
|
178
|
+
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)) {
|
|
183
179
|
(0, _reactNativeReanimated.cancelAnimation)(translateX);
|
|
184
180
|
(0, _reactNativeReanimated.cancelAnimation)(translateY);
|
|
185
181
|
(0, _reactNativeReanimated.cancelAnimation)(scale);
|
|
186
|
-
|
|
187
|
-
|
|
182
|
+
overlayOpacity.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
183
|
+
duration: 200,
|
|
184
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
185
|
+
}, function () {
|
|
186
|
+
(0, _reactNativeReanimated.runOnJS)(setSelectedMessage)(undefined);
|
|
187
|
+
(0, _reactNativeReanimated.runOnJS)(setMessages)([]);
|
|
188
|
+
(0, _reactNativeReanimated.runOnJS)(setOverlay)('none');
|
|
189
|
+
});
|
|
190
|
+
scale.value = (0, _reactNativeReanimated.withTiming)(0.6, {
|
|
191
|
+
duration: 200,
|
|
192
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
193
|
+
});
|
|
194
|
+
translateY.value = event.velocityY > 1000 ? (0, _reactNativeReanimated.withDecay)({
|
|
195
|
+
velocity: event.velocityY
|
|
196
|
+
}) : (0, _reactNativeReanimated.withTiming)(halfScreenHeight + currentImageHeight / 2 * scale.value, {
|
|
197
|
+
duration: 200,
|
|
198
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
199
|
+
});
|
|
200
|
+
translateX.value = (0, _reactNativeReanimated.withDecay)({
|
|
201
|
+
velocity: -event.velocityX
|
|
202
|
+
});
|
|
188
203
|
}
|
|
189
|
-
hasPinched.value = HasPinched.FALSE;
|
|
190
204
|
}
|
|
191
|
-
}
|
|
192
|
-
var
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
(0, _reactNativeReanimated.cancelAnimation)(translateY);
|
|
198
|
-
(0, _reactNativeReanimated.cancelAnimation)(scale);
|
|
199
|
-
isSwiping.value = IsSwiping.UNDETERMINED;
|
|
200
|
-
numberOfPinchFingers.value = evt.numberOfPointers;
|
|
201
|
-
offsetX.value = translateX.value;
|
|
202
|
-
offsetY.value = translateY.value;
|
|
203
|
-
adjustedFocalX.value = evt.focalX - (halfScreenWidth - offsetX.value);
|
|
204
|
-
adjustedFocalY.value = evt.focalY - (halfScreenHeight + offsetY.value);
|
|
205
|
-
originX.value = adjustedFocalX.value;
|
|
206
|
-
originY.value = adjustedFocalY.value;
|
|
207
|
-
offsetScale.value = scale.value;
|
|
208
|
-
}
|
|
205
|
+
}).simultaneousWithExternalGesture(pinchRef).withRef(panRef);
|
|
206
|
+
var pinch = _reactNativeGestureHandler.Gesture.Pinch().onStart(function (event) {
|
|
207
|
+
if (!isAndroid) {
|
|
208
|
+
(0, _reactNativeReanimated.cancelAnimation)(translateX);
|
|
209
|
+
(0, _reactNativeReanimated.cancelAnimation)(translateY);
|
|
210
|
+
(0, _reactNativeReanimated.cancelAnimation)(scale);
|
|
209
211
|
isPinch.value = true;
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
|
|
229
|
-
|
|
230
|
-
|
|
231
|
-
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
212
|
+
isSwiping.value = IsSwiping.UNDETERMINED;
|
|
213
|
+
numberOfPinchFingers.value = event.numberOfPointers;
|
|
214
|
+
offsetX.value = translateX.value;
|
|
215
|
+
offsetY.value = translateY.value;
|
|
216
|
+
adjustedFocalX.value = event.focalX - (halfScreenWidth - offsetX.value);
|
|
217
|
+
adjustedFocalY.value = event.focalY - (halfScreenHeight + offsetY.value);
|
|
218
|
+
originX.value = adjustedFocalX.value;
|
|
219
|
+
originY.value = adjustedFocalY.value;
|
|
220
|
+
offsetScale.value = scale.value;
|
|
221
|
+
}
|
|
222
|
+
hasPinched.value = HasPinched.FALSE;
|
|
223
|
+
}).onChange(function (event) {
|
|
224
|
+
if (!isPinch.value && isAndroid) {
|
|
225
|
+
hasPinched.value = HasPinched.TRUE;
|
|
226
|
+
(0, _reactNativeReanimated.cancelAnimation)(translateX);
|
|
227
|
+
(0, _reactNativeReanimated.cancelAnimation)(translateY);
|
|
228
|
+
(0, _reactNativeReanimated.cancelAnimation)(scale);
|
|
229
|
+
isSwiping.value = IsSwiping.UNDETERMINED;
|
|
230
|
+
numberOfPinchFingers.value = event.numberOfPointers;
|
|
231
|
+
offsetX.value = translateX.value;
|
|
232
|
+
offsetY.value = translateY.value;
|
|
233
|
+
adjustedFocalX.value = event.focalX - (halfScreenWidth - offsetX.value);
|
|
234
|
+
adjustedFocalY.value = event.focalY - (halfScreenHeight + offsetY.value);
|
|
235
|
+
originX.value = adjustedFocalX.value;
|
|
236
|
+
originY.value = adjustedFocalY.value;
|
|
237
|
+
offsetScale.value = scale.value;
|
|
238
|
+
}
|
|
239
|
+
isPinch.value = true;
|
|
240
|
+
scale.value = clamp(offsetScale.value * event.scale, 1, 8);
|
|
241
|
+
var localEvtScale = scale.value / offsetScale.value;
|
|
242
|
+
if (scale.value !== 8 && scale.value !== 1) {
|
|
243
|
+
hasHitTopScale.value = 0;
|
|
244
|
+
hasHitBottomScale.value = 0;
|
|
245
|
+
} else if (scale.value === 8 && hasHitTopScale.value === 0) {
|
|
246
|
+
hasHitTopScale.value = 1;
|
|
247
|
+
(0, _reactNativeReanimated.runOnJS)(_native.triggerHaptic)('impactLight');
|
|
248
|
+
} else if (scale.value === 1 && hasHitBottomScale.value === 0) {
|
|
249
|
+
hasHitBottomScale.value = 1;
|
|
250
|
+
(0, _reactNativeReanimated.runOnJS)(_native.triggerHaptic)('impactLight');
|
|
251
|
+
}
|
|
252
|
+
adjustedFocalX.value = event.focalX - (halfScreenWidth - offsetX.value);
|
|
253
|
+
adjustedFocalY.value = event.focalY - (halfScreenHeight + offsetY.value);
|
|
254
|
+
if (numberOfPinchFingers.value !== event.numberOfPointers) {
|
|
255
|
+
numberOfPinchFingers.value = event.numberOfPointers;
|
|
256
|
+
if (event.numberOfPointers === 1) {
|
|
257
|
+
focalOffsetX.value = oldFocalX.value - adjustedFocalX.value;
|
|
258
|
+
focalOffsetY.value = oldFocalY.value - adjustedFocalY.value;
|
|
239
259
|
} else if (numberOfPinchFingers.value > 1) {
|
|
240
|
-
|
|
241
|
-
|
|
242
|
-
translateX.value = offsetX.value - adjustedFocalX.value + localEvtScale * originX.value;
|
|
243
|
-
translateY.value = offsetY.value + adjustedFocalY.value - localEvtScale * originY.value;
|
|
244
|
-
}
|
|
245
|
-
},
|
|
246
|
-
onFinish: function onFinish() {
|
|
247
|
-
if (isPinch.value) {
|
|
248
|
-
translateX.value = scale.value < 1 ? (0, _reactNativeReanimated.withTiming)(0) : translateX.value > halfScreenWidth * (scale.value - 1) ? (0, _reactNativeReanimated.withTiming)(halfScreenWidth * (scale.value - 1)) : translateX.value < -halfScreenWidth * (scale.value - 1) ? (0, _reactNativeReanimated.withTiming)(-halfScreenWidth * (scale.value - 1)) : translateX.value;
|
|
249
|
-
translateY.value = currentImageHeight * scale.value < screenHeight ? (0, _reactNativeReanimated.withTiming)(0) : translateY.value > currentImageHeight / 2 * scale.value - screenHeight / 2 ? (0, _reactNativeReanimated.withTiming)(currentImageHeight / 2 * scale.value - screenHeight / 2) : translateY.value < -currentImageHeight / 2 * scale.value + screenHeight / 2 ? (0, _reactNativeReanimated.withTiming)(-currentImageHeight / 2 * scale.value + screenHeight / 2) : translateY.value;
|
|
250
|
-
offsetScale.value = scale.value < 1 ? 1 : scale.value;
|
|
251
|
-
scale.value = scale.value < 1 ? (0, _reactNativeReanimated.withTiming)(1) : scale.value;
|
|
252
|
-
resetTouchValues();
|
|
260
|
+
originX.value = originX.value - (oldFocalX.value / localEvtScale - adjustedFocalX.value / localEvtScale);
|
|
261
|
+
originY.value = originY.value - (oldFocalY.value / localEvtScale - adjustedFocalY.value / localEvtScale);
|
|
253
262
|
}
|
|
254
|
-
},
|
|
255
|
-
onStart: function onStart(evt) {
|
|
256
|
-
if (!isAndroid) {
|
|
257
|
-
(0, _reactNativeReanimated.cancelAnimation)(translateX);
|
|
258
|
-
(0, _reactNativeReanimated.cancelAnimation)(translateY);
|
|
259
|
-
(0, _reactNativeReanimated.cancelAnimation)(scale);
|
|
260
|
-
isPinch.value = true;
|
|
261
|
-
isSwiping.value = IsSwiping.UNDETERMINED;
|
|
262
|
-
numberOfPinchFingers.value = evt.numberOfPointers;
|
|
263
|
-
offsetX.value = translateX.value;
|
|
264
|
-
offsetY.value = translateY.value;
|
|
265
|
-
adjustedFocalX.value = evt.focalX - (halfScreenWidth - offsetX.value);
|
|
266
|
-
adjustedFocalY.value = evt.focalY - (halfScreenHeight + offsetY.value);
|
|
267
|
-
originX.value = adjustedFocalX.value;
|
|
268
|
-
originY.value = adjustedFocalY.value;
|
|
269
|
-
offsetScale.value = scale.value;
|
|
270
|
-
}
|
|
271
|
-
hasPinched.value = HasPinched.FALSE;
|
|
272
263
|
}
|
|
273
|
-
|
|
274
|
-
|
|
275
|
-
|
|
276
|
-
|
|
277
|
-
|
|
264
|
+
if (numberOfPinchFingers.value === 1) {
|
|
265
|
+
oldFocalX.value = adjustedFocalX.value + focalOffsetX.value;
|
|
266
|
+
oldFocalY.value = adjustedFocalY.value + focalOffsetY.value;
|
|
267
|
+
translateX.value = offsetX.value - oldFocalX.value + localEvtScale * originX.value;
|
|
268
|
+
translateY.value = offsetY.value + oldFocalY.value - localEvtScale * originY.value;
|
|
269
|
+
} else if (numberOfPinchFingers.value > 1) {
|
|
270
|
+
oldFocalX.value = adjustedFocalX.value;
|
|
271
|
+
oldFocalY.value = adjustedFocalY.value;
|
|
272
|
+
translateX.value = offsetX.value - adjustedFocalX.value + localEvtScale * originX.value;
|
|
273
|
+
translateY.value = offsetY.value + adjustedFocalY.value - localEvtScale * originY.value;
|
|
278
274
|
}
|
|
279
|
-
})
|
|
280
|
-
|
|
281
|
-
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
295
|
-
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
310
|
-
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
311
|
-
});
|
|
312
|
-
translateY.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
275
|
+
}).onEnd(function () {
|
|
276
|
+
if (isPinch.value) {
|
|
277
|
+
translateX.value = scale.value < 1 ? (0, _reactNativeReanimated.withTiming)(0) : translateX.value > halfScreenWidth * (scale.value - 1) ? (0, _reactNativeReanimated.withTiming)(halfScreenWidth * (scale.value - 1)) : translateX.value < -halfScreenWidth * (scale.value - 1) ? (0, _reactNativeReanimated.withTiming)(-halfScreenWidth * (scale.value - 1)) : translateX.value;
|
|
278
|
+
translateY.value = currentImageHeight * scale.value < screenHeight ? (0, _reactNativeReanimated.withTiming)(0) : translateY.value > currentImageHeight / 2 * scale.value - screenHeight / 2 ? (0, _reactNativeReanimated.withTiming)(currentImageHeight / 2 * scale.value - screenHeight / 2) : translateY.value < -currentImageHeight / 2 * scale.value + screenHeight / 2 ? (0, _reactNativeReanimated.withTiming)(-currentImageHeight / 2 * scale.value + screenHeight / 2) : translateY.value;
|
|
279
|
+
offsetScale.value = scale.value < 1 ? 1 : scale.value;
|
|
280
|
+
scale.value = scale.value < 1 ? (0, _reactNativeReanimated.withTiming)(1) : scale.value;
|
|
281
|
+
resetTouchValues();
|
|
282
|
+
}
|
|
283
|
+
}).withRef(pinchRef).simultaneousWithExternalGesture(panRef);
|
|
284
|
+
var singleTap = _reactNativeGestureHandler.Gesture.Tap().minPointers(1).numberOfTaps(1).onEnd(function () {
|
|
285
|
+
(0, _reactNativeReanimated.cancelAnimation)(headerFooterVisible);
|
|
286
|
+
headerFooterVisible.value = headerFooterVisible.value > 0 ? (0, _reactNativeReanimated.withTiming)(0) : (0, _reactNativeReanimated.withTiming)(1);
|
|
287
|
+
}).requireExternalGestureToFail(panRef, pinchRef, doubleTapRef).withRef(singleTapRef);
|
|
288
|
+
var doubleTap = _reactNativeGestureHandler.Gesture.Tap().maxDeltaX(8).maxDeltaY(8).maxDistance(8).minPointers(1).numberOfTaps(2).onStart(function (event) {
|
|
289
|
+
tapX.value = event.absoluteX;
|
|
290
|
+
tapY.value = event.absoluteY;
|
|
291
|
+
}).onEnd(function (event) {
|
|
292
|
+
if (Math.abs(tapX.value - event.absoluteX) < 64 && Math.abs(tapY.value - event.absoluteY) < 64) {
|
|
293
|
+
if (offsetScale.value === 1 && offsetX.value === 0 && offsetY.value === 0) {
|
|
294
|
+
offsetScale.value = 2;
|
|
295
|
+
scale.value = (0, _reactNativeReanimated.withTiming)(2, {
|
|
296
|
+
duration: 200,
|
|
297
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
298
|
+
});
|
|
299
|
+
translateX.value = (0, _reactNativeReanimated.withTiming)(event.absoluteX - halfScreenWidth, {
|
|
300
|
+
duration: 200,
|
|
301
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
302
|
+
});
|
|
303
|
+
if (currentImageHeight * 2 > screenHeight) {
|
|
304
|
+
var translateYTopBottom = event.absoluteY > halfScreenHeight ? -(currentImageHeight * 2 - screenHeight) / 2 : (currentImageHeight * 2 - screenHeight) / 2;
|
|
305
|
+
translateY.value = (0, _reactNativeReanimated.withTiming)(translateYTopBottom, {
|
|
313
306
|
duration: 200,
|
|
314
307
|
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
315
308
|
});
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
|
|
319
|
-
|
|
309
|
+
}
|
|
310
|
+
} else {
|
|
311
|
+
offsetScale.value = 1;
|
|
312
|
+
scale.value = (0, _reactNativeReanimated.withTiming)(1, {
|
|
313
|
+
duration: 200,
|
|
314
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
315
|
+
});
|
|
316
|
+
offsetX.value = 0;
|
|
317
|
+
offsetY.value = 0;
|
|
318
|
+
translateX.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
319
|
+
duration: 200,
|
|
320
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
321
|
+
});
|
|
322
|
+
translateY.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
323
|
+
duration: 200,
|
|
324
|
+
easing: _reactNativeReanimated.Easing.out(_reactNativeReanimated.Easing.ease)
|
|
325
|
+
});
|
|
326
|
+
if (headerFooterVisible.value !== 0) {
|
|
327
|
+
(0, _reactNativeReanimated.cancelAnimation)(headerFooterVisible);
|
|
328
|
+
headerFooterVisible.value = (0, _reactNativeReanimated.withTiming)(0);
|
|
320
329
|
}
|
|
321
330
|
}
|
|
322
|
-
},
|
|
323
|
-
onStart: function onStart(evt) {
|
|
324
|
-
tapX.value = evt.absoluteX;
|
|
325
|
-
tapY.value = evt.absoluteY;
|
|
326
331
|
}
|
|
327
|
-
});
|
|
332
|
+
}).withRef(doubleTapRef);
|
|
328
333
|
return {
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
334
|
+
doubleTap: doubleTap,
|
|
335
|
+
pan: pan,
|
|
336
|
+
pinch: pinch,
|
|
337
|
+
singleTap: singleTap
|
|
333
338
|
};
|
|
334
339
|
};
|
|
335
340
|
exports.useImageGalleryGestures = useImageGalleryGestures;
|