@kesha-antonov/react-native-chat 5.0.0 → 6.0.0
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 +533 -179
- package/lib/Actions.d.ts.map +1 -1
- package/lib/Actions.js +121 -42
- package/lib/Actions.js.map +1 -1
- package/lib/Avatar.d.ts.map +1 -1
- package/lib/Avatar.js +171 -86
- package/lib/Avatar.js.map +1 -1
- package/lib/Bubble/BubbleBody.d.ts +15 -0
- package/lib/Bubble/BubbleBody.d.ts.map +1 -0
- package/lib/Bubble/BubbleBody.js +218 -0
- package/lib/Bubble/BubbleBody.js.map +1 -0
- package/lib/Bubble/BubbleContent.d.ts +23 -0
- package/lib/Bubble/BubbleContent.d.ts.map +1 -0
- package/lib/Bubble/BubbleContent.js +446 -0
- package/lib/Bubble/BubbleContent.js.map +1 -0
- package/lib/Bubble/BubbleMenu.d.ts +45 -0
- package/lib/Bubble/BubbleMenu.d.ts.map +1 -0
- package/lib/Bubble/BubbleMenu.js +289 -0
- package/lib/Bubble/BubbleMenu.js.map +1 -0
- package/lib/Bubble/BubbleMeta.d.ts +17 -0
- package/lib/Bubble/BubbleMeta.d.ts.map +1 -0
- package/lib/Bubble/BubbleMeta.js +453 -0
- package/lib/Bubble/BubbleMeta.js.map +1 -0
- package/lib/Bubble/LiftedBubble.d.ts +18 -0
- package/lib/Bubble/LiftedBubble.d.ts.map +1 -0
- package/lib/Bubble/LiftedBubble.js +109 -0
- package/lib/Bubble/LiftedBubble.js.map +1 -0
- package/lib/Bubble/PressableBubbleRow.d.ts +33 -0
- package/lib/Bubble/PressableBubbleRow.d.ts.map +1 -0
- package/lib/Bubble/PressableBubbleRow.js +172 -0
- package/lib/Bubble/PressableBubbleRow.js.map +1 -0
- package/lib/Bubble/index.d.ts +6 -0
- package/lib/Bubble/index.d.ts.map +1 -1
- package/lib/Bubble/index.js +380 -494
- package/lib/Bubble/index.js.map +1 -1
- package/lib/Bubble/layout.d.ts +47 -0
- package/lib/Bubble/layout.d.ts.map +1 -0
- package/lib/Bubble/layout.js +258 -0
- package/lib/Bubble/layout.js.map +1 -0
- package/lib/Bubble/styles.d.ts +108 -16
- package/lib/Bubble/styles.d.ts.map +1 -1
- package/lib/Bubble/styles.js +227 -107
- package/lib/Bubble/styles.js.map +1 -1
- package/lib/Bubble/types.d.ts +19 -3
- package/lib/Bubble/types.d.ts.map +1 -1
- package/lib/Bubble/types.js.map +1 -1
- package/lib/Chat/Chat.d.ts +5 -0
- package/lib/Chat/Chat.d.ts.map +1 -0
- package/lib/Chat/Chat.js +464 -0
- package/lib/Chat/Chat.js.map +1 -0
- package/lib/Chat/ChatBackground.d.ts +16 -0
- package/lib/Chat/ChatBackground.d.ts.map +1 -0
- package/lib/Chat/ChatBackground.js +43 -0
- package/lib/Chat/ChatBackground.js.map +1 -0
- package/lib/Chat/ChatKeyboardAvoidingView.js +19 -4
- package/lib/Chat/ChatKeyboardAvoidingView.js.map +1 -1
- package/lib/Chat/ChatMessageList.d.ts +27 -0
- package/lib/Chat/ChatMessageList.d.ts.map +1 -0
- package/lib/Chat/ChatMessageList.js +220 -0
- package/lib/Chat/ChatMessageList.js.map +1 -0
- package/lib/Chat/ChatProviders.d.ts +18 -0
- package/lib/Chat/ChatProviders.d.ts.map +1 -0
- package/lib/Chat/ChatProviders.js +87 -0
- package/lib/Chat/ChatProviders.js.map +1 -0
- package/lib/Chat/ChatSafeAreaProvider.d.ts +35 -0
- package/lib/Chat/ChatSafeAreaProvider.d.ts.map +1 -0
- package/lib/Chat/ChatSafeAreaProvider.js +123 -0
- package/lib/Chat/ChatSafeAreaProvider.js.map +1 -0
- package/lib/Chat/ChatSelectionBar.d.ts +20 -0
- package/lib/Chat/ChatSelectionBar.d.ts.map +1 -0
- package/lib/Chat/ChatSelectionBar.js +141 -0
- package/lib/Chat/ChatSelectionBar.js.map +1 -0
- package/lib/Chat/ChatWrapper.d.ts +11 -0
- package/lib/Chat/ChatWrapper.d.ts.map +1 -0
- package/lib/Chat/ChatWrapper.js +98 -0
- package/lib/Chat/ChatWrapper.js.map +1 -0
- package/lib/Chat/ComposerHost.d.ts +20 -0
- package/lib/Chat/ComposerHost.d.ts.map +1 -0
- package/lib/Chat/ComposerHost.js +118 -0
- package/lib/Chat/ComposerHost.js.map +1 -0
- package/lib/Chat/index.d.ts +1 -8
- package/lib/Chat/index.d.ts.map +1 -1
- package/lib/Chat/index.js +1 -337
- package/lib/Chat/index.js.map +1 -1
- package/lib/Chat/styles.d.ts +14 -2
- package/lib/Chat/styles.d.ts.map +1 -1
- package/lib/Chat/styles.js +19 -9
- package/lib/Chat/styles.js.map +1 -1
- package/lib/Chat/types.d.ts +145 -11
- package/lib/Chat/types.d.ts.map +1 -1
- package/lib/Chat/types.js.map +1 -1
- package/lib/Chat/useChatContextValue.d.ts +19 -0
- package/lib/Chat/useChatContextValue.d.ts.map +1 -0
- package/lib/Chat/useChatContextValue.js +158 -0
- package/lib/Chat/useChatContextValue.js.map +1 -0
- package/lib/Chat/useChatMedia.d.ts +22 -0
- package/lib/Chat/useChatMedia.d.ts.map +1 -0
- package/lib/Chat/useChatMedia.js +127 -0
- package/lib/Chat/useChatMedia.js.map +1 -0
- package/lib/Chat/useChatSelection.d.ts +15 -0
- package/lib/Chat/useChatSelection.d.ts.map +1 -0
- package/lib/Chat/useChatSelection.js +106 -0
- package/lib/Chat/useChatSelection.js.map +1 -0
- package/lib/Chat/useComposerHandlers.d.ts +34 -0
- package/lib/Chat/useComposerHandlers.d.ts.map +1 -0
- package/lib/Chat/useComposerHandlers.js +330 -0
- package/lib/Chat/useComposerHandlers.js.map +1 -0
- package/lib/Chat/useComposerState.d.ts +27 -0
- package/lib/Chat/useComposerState.d.ts.map +1 -0
- package/lib/Chat/useComposerState.js +272 -0
- package/lib/Chat/useComposerState.js.map +1 -0
- package/lib/Chat/useInitialLayout.d.ts +19 -0
- package/lib/Chat/useInitialLayout.d.ts.map +1 -0
- package/lib/Chat/useInitialLayout.js +70 -0
- package/lib/Chat/useInitialLayout.js.map +1 -0
- package/lib/Chat/useMessageActions.d.ts +37 -0
- package/lib/Chat/useMessageActions.d.ts.map +1 -0
- package/lib/Chat/useMessageActions.js +323 -0
- package/lib/Chat/useMessageActions.js.map +1 -0
- package/lib/Chat/useMessageNavigation.d.ts +21 -0
- package/lib/Chat/useMessageNavigation.d.ts.map +1 -0
- package/lib/Chat/useMessageNavigation.js +149 -0
- package/lib/Chat/useMessageNavigation.js.map +1 -0
- package/lib/Chat/useOptionalPeerHints.d.ts +6 -0
- package/lib/Chat/useOptionalPeerHints.d.ts.map +1 -0
- package/lib/Chat/useOptionalPeerHints.js +63 -0
- package/lib/Chat/useOptionalPeerHints.js.map +1 -0
- package/lib/Chat/useResolvedReactions.d.ts +31 -0
- package/lib/Chat/useResolvedReactions.d.ts.map +1 -0
- package/lib/Chat/useResolvedReactions.js +95 -0
- package/lib/Chat/useResolvedReactions.js.map +1 -0
- package/lib/ChatAvatar.d.ts.map +1 -1
- package/lib/ChatAvatar.js +229 -84
- package/lib/ChatAvatar.js.map +1 -1
- package/lib/ChatContext.js +20 -10
- package/lib/ChatContext.js.map +1 -1
- package/lib/ChatList/ChatListAvatar.d.ts +21 -0
- package/lib/ChatList/ChatListAvatar.d.ts.map +1 -0
- package/lib/ChatList/ChatListAvatar.js +178 -0
- package/lib/ChatList/ChatListAvatar.js.map +1 -0
- package/lib/ChatList/ChatListCell.d.ts +16 -0
- package/lib/ChatList/ChatListCell.d.ts.map +1 -0
- package/lib/ChatList/ChatListCell.js +506 -0
- package/lib/ChatList/ChatListCell.js.map +1 -0
- package/lib/ChatList/ChatListShimmer.d.ts +3 -0
- package/lib/ChatList/ChatListShimmer.d.ts.map +1 -0
- package/lib/ChatList/ChatListShimmer.js +235 -0
- package/lib/ChatList/ChatListShimmer.js.map +1 -0
- package/lib/ChatList/index.d.ts +16 -0
- package/lib/ChatList/index.d.ts.map +1 -0
- package/lib/ChatList/index.js +1301 -0
- package/lib/ChatList/index.js.map +1 -0
- package/lib/ChatList/types.d.ts +128 -0
- package/lib/ChatList/types.d.ts.map +1 -0
- package/lib/ChatList/types.js +2 -0
- package/lib/ChatList/types.js.map +1 -0
- package/lib/ChatList/useChatList.d.ts +30 -0
- package/lib/ChatList/useChatList.d.ts.map +1 -0
- package/lib/ChatList/useChatList.js +211 -0
- package/lib/ChatList/useChatList.js.map +1 -0
- package/lib/ChatList/utils.d.ts +28 -0
- package/lib/ChatList/utils.d.ts.map +1 -0
- package/lib/ChatList/utils.js +60 -0
- package/lib/ChatList/utils.js.map +1 -0
- package/lib/Color.js +19 -19
- package/lib/Color.js.map +1 -1
- package/lib/Composer.d.ts.map +1 -1
- package/lib/Composer.js +148 -70
- package/lib/Composer.js.map +1 -1
- package/lib/Constant.js +4 -4
- package/lib/Constant.js.map +1 -1
- package/lib/Day/index.d.ts.map +1 -1
- package/lib/Day/index.js +115 -28
- package/lib/Day/index.js.map +1 -1
- package/lib/Day/styles.d.ts +3 -3
- package/lib/Day/styles.d.ts.map +1 -1
- package/lib/Day/styles.js +20 -17
- package/lib/Day/styles.js.map +1 -1
- package/lib/Day/types.js.map +1 -1
- package/lib/Icons.d.ts +1 -1
- package/lib/Icons.d.ts.map +1 -1
- package/lib/Icons.js.map +1 -1
- package/lib/InputToolbar/FieldGroup.d.ts +28 -0
- package/lib/InputToolbar/FieldGroup.d.ts.map +1 -0
- package/lib/InputToolbar/FieldGroup.js +143 -0
- package/lib/InputToolbar/FieldGroup.js.map +1 -0
- package/lib/InputToolbar/TakePreviewBar.d.ts +17 -0
- package/lib/InputToolbar/TakePreviewBar.d.ts.map +1 -0
- package/lib/InputToolbar/TakePreviewBar.js +126 -0
- package/lib/InputToolbar/TakePreviewBar.js.map +1 -0
- package/lib/InputToolbar/animations.d.ts +105 -0
- package/lib/InputToolbar/animations.d.ts.map +1 -0
- package/lib/InputToolbar/animations.js +238 -0
- package/lib/InputToolbar/animations.js.map +1 -0
- package/lib/InputToolbar/fragments.d.ts +13 -0
- package/lib/InputToolbar/fragments.d.ts.map +1 -0
- package/lib/InputToolbar/fragments.js +207 -0
- package/lib/InputToolbar/fragments.js.map +1 -0
- package/lib/InputToolbar/index.d.ts +7 -0
- package/lib/InputToolbar/index.d.ts.map +1 -0
- package/lib/InputToolbar/index.js +444 -0
- package/lib/InputToolbar/index.js.map +1 -0
- package/lib/InputToolbar/recordingOptions.d.ts +14 -0
- package/lib/InputToolbar/recordingOptions.d.ts.map +1 -0
- package/lib/InputToolbar/recordingOptions.js +38 -0
- package/lib/InputToolbar/recordingOptions.js.map +1 -0
- package/lib/InputToolbar/styles.d.ts +118 -0
- package/lib/InputToolbar/styles.d.ts.map +1 -0
- package/lib/InputToolbar/styles.js +139 -0
- package/lib/InputToolbar/styles.js.map +1 -0
- package/lib/InputToolbar/types.d.ts +77 -0
- package/lib/InputToolbar/types.d.ts.map +1 -0
- package/lib/InputToolbar/types.js +2 -0
- package/lib/InputToolbar/types.js.map +1 -0
- package/lib/InputToolbar/useActionsFragment.d.ts +6 -0
- package/lib/InputToolbar/useActionsFragment.d.ts.map +1 -0
- package/lib/InputToolbar/useActionsFragment.js +139 -0
- package/lib/InputToolbar/useActionsFragment.js.map +1 -0
- package/lib/InputToolbar/useComposerEditing.d.ts +11 -0
- package/lib/InputToolbar/useComposerEditing.d.ts.map +1 -0
- package/lib/InputToolbar/useComposerEditing.js +116 -0
- package/lib/InputToolbar/useComposerEditing.js.map +1 -0
- package/lib/InputToolbar/useEmojiButton.d.ts +14 -0
- package/lib/InputToolbar/useEmojiButton.d.ts.map +1 -0
- package/lib/InputToolbar/useEmojiButton.js +120 -0
- package/lib/InputToolbar/useEmojiButton.js.map +1 -0
- package/lib/InputToolbar/useKeyboardInset.d.ts +9 -0
- package/lib/InputToolbar/useKeyboardInset.d.ts.map +1 -0
- package/lib/InputToolbar/useKeyboardInset.js +25 -0
- package/lib/InputToolbar/useKeyboardInset.js.map +1 -0
- package/lib/InputToolbar/useRecordMode.d.ts +19 -0
- package/lib/InputToolbar/useRecordMode.d.ts.map +1 -0
- package/lib/InputToolbar/useRecordMode.js +124 -0
- package/lib/InputToolbar/useRecordMode.js.map +1 -0
- package/lib/InputToolbar/useRecordTake.d.ts +46 -0
- package/lib/InputToolbar/useRecordTake.d.ts.map +1 -0
- package/lib/InputToolbar/useRecordTake.js +315 -0
- package/lib/InputToolbar/useRecordTake.js.map +1 -0
- package/lib/InputToolbar/useReturnAnimations.d.ts +18 -0
- package/lib/InputToolbar/useReturnAnimations.d.ts.map +1 -0
- package/lib/InputToolbar/useReturnAnimations.js +30 -0
- package/lib/InputToolbar/useReturnAnimations.js.map +1 -0
- package/lib/InputToolbar/useRightControl.d.ts +40 -0
- package/lib/InputToolbar/useRightControl.d.ts.map +1 -0
- package/lib/InputToolbar/useRightControl.js +129 -0
- package/lib/InputToolbar/useRightControl.js.map +1 -0
- package/lib/LoadEarlierMessages.d.ts +2 -0
- package/lib/LoadEarlierMessages.d.ts.map +1 -1
- package/lib/LoadEarlierMessages.js +153 -40
- package/lib/LoadEarlierMessages.js.map +1 -1
- package/lib/Message/SwipeToReply.d.ts +23 -0
- package/lib/Message/SwipeToReply.d.ts.map +1 -0
- package/lib/Message/SwipeToReply.js +337 -0
- package/lib/Message/SwipeToReply.js.map +1 -0
- package/lib/Message/index.d.ts.map +1 -1
- package/lib/Message/index.js +415 -176
- package/lib/Message/index.js.map +1 -1
- package/lib/Message/styles.d.ts +2 -2
- package/lib/Message/styles.js +14 -14
- package/lib/Message/styles.js.map +1 -1
- package/lib/Message/types.d.ts +5 -0
- package/lib/Message/types.d.ts.map +1 -1
- package/lib/Message/types.js.map +1 -1
- package/lib/MessageAudio.d.ts.map +1 -1
- package/lib/MessageAudio.js +647 -107
- package/lib/MessageAudio.js.map +1 -1
- package/lib/MessageFile.d.ts +11 -0
- package/lib/MessageFile.d.ts.map +1 -0
- package/lib/MessageFile.js +315 -0
- package/lib/MessageFile.js.map +1 -0
- package/lib/MessageImage.d.ts +2 -0
- package/lib/MessageImage.d.ts.map +1 -1
- package/lib/MessageImage.js +430 -156
- package/lib/MessageImage.js.map +1 -1
- package/lib/MessageLocation.d.ts.map +1 -1
- package/lib/MessageLocation.js +180 -68
- package/lib/MessageLocation.js.map +1 -1
- package/lib/MessageText.d.ts +8 -1
- package/lib/MessageText.d.ts.map +1 -1
- package/lib/MessageText.js +261 -69
- package/lib/MessageText.js.map +1 -1
- package/lib/MessageVideo/ExpoVideoPlayer.d.ts +6 -0
- package/lib/MessageVideo/ExpoVideoPlayer.d.ts.map +1 -0
- package/lib/MessageVideo/ExpoVideoPlayer.js +68 -0
- package/lib/MessageVideo/ExpoVideoPlayer.js.map +1 -0
- package/lib/MessageVideo/MirroredVideo.d.ts +17 -0
- package/lib/MessageVideo/MirroredVideo.d.ts.map +1 -0
- package/lib/MessageVideo/MirroredVideo.js +223 -0
- package/lib/MessageVideo/MirroredVideo.js.map +1 -0
- package/lib/MessageVideo/RoundNotePlayer.d.ts +4 -0
- package/lib/MessageVideo/RoundNotePlayer.d.ts.map +1 -0
- package/lib/MessageVideo/RoundNotePlayer.js +560 -0
- package/lib/MessageVideo/RoundNotePlayer.js.map +1 -0
- package/lib/MessageVideo/RoundTranscription.d.ts +27 -0
- package/lib/MessageVideo/RoundTranscription.d.ts.map +1 -0
- package/lib/MessageVideo/RoundTranscription.js +151 -0
- package/lib/MessageVideo/RoundTranscription.js.map +1 -0
- package/lib/MessageVideo/VideoTransferOverlay.d.ts +11 -0
- package/lib/MessageVideo/VideoTransferOverlay.d.ts.map +1 -0
- package/lib/MessageVideo/VideoTransferOverlay.js +88 -0
- package/lib/MessageVideo/VideoTransferOverlay.js.map +1 -0
- package/lib/MessageVideo/constants.d.ts +13 -0
- package/lib/MessageVideo/constants.d.ts.map +1 -0
- package/lib/MessageVideo/constants.js +15 -0
- package/lib/MessageVideo/constants.js.map +1 -0
- package/lib/{MessageVideo.d.ts → MessageVideo/index.d.ts} +2 -2
- package/lib/MessageVideo/index.d.ts.map +1 -0
- package/lib/MessageVideo/index.js +92 -0
- package/lib/MessageVideo/index.js.map +1 -0
- package/lib/MessageVideo/liftedMedia.d.ts +13 -0
- package/lib/MessageVideo/liftedMedia.d.ts.map +1 -0
- package/lib/MessageVideo/liftedMedia.js +106 -0
- package/lib/MessageVideo/liftedMedia.js.map +1 -0
- package/lib/MessageVideo/styles.d.ts +71 -0
- package/lib/MessageVideo/styles.d.ts.map +1 -0
- package/lib/MessageVideo/styles.js +78 -0
- package/lib/MessageVideo/styles.js.map +1 -0
- package/lib/MessageVideo/types.d.ts +27 -0
- package/lib/MessageVideo/types.d.ts.map +1 -0
- package/lib/MessageVideo/types.js +2 -0
- package/lib/MessageVideo/types.js.map +1 -0
- package/lib/MessageVideo/useNoteGrow.d.ts +16 -0
- package/lib/MessageVideo/useNoteGrow.d.ts.map +1 -0
- package/lib/MessageVideo/useNoteGrow.js +122 -0
- package/lib/MessageVideo/useNoteGrow.js.map +1 -0
- package/lib/MessageVideo/useNotePlayer.d.ts +14 -0
- package/lib/MessageVideo/useNotePlayer.d.ts.map +1 -0
- package/lib/MessageVideo/useNotePlayer.js +142 -0
- package/lib/MessageVideo/useNotePlayer.js.map +1 -0
- package/lib/MessageVideo/useRingSeek.d.ts +16 -0
- package/lib/MessageVideo/useRingSeek.d.ts.map +1 -0
- package/lib/MessageVideo/useRingSeek.js +157 -0
- package/lib/MessageVideo/useRingSeek.js.map +1 -0
- package/lib/MessageVideo/useRoundNotePlayback.d.ts +46 -0
- package/lib/MessageVideo/useRoundNotePlayback.d.ts.map +1 -0
- package/lib/MessageVideo/useRoundNotePlayback.js +508 -0
- package/lib/MessageVideo/useRoundNotePlayback.js.map +1 -0
- package/lib/MessageVideo/useSendFlightReveal.d.ts +9 -0
- package/lib/MessageVideo/useSendFlightReveal.d.ts.map +1 -0
- package/lib/MessageVideo/useSendFlightReveal.js +85 -0
- package/lib/MessageVideo/useSendFlightReveal.js.map +1 -0
- package/lib/MessageVideo/videoPlayers.d.ts +8 -0
- package/lib/MessageVideo/videoPlayers.d.ts.map +1 -0
- package/lib/MessageVideo/videoPlayers.js +33 -0
- package/lib/MessageVideo/videoPlayers.js.map +1 -0
- package/lib/MessagesContainer/components/DayAnimated/debug.js +38 -24
- package/lib/MessagesContainer/components/DayAnimated/debug.js.map +1 -1
- package/lib/MessagesContainer/components/DayAnimated/index.d.ts +1 -1
- package/lib/MessagesContainer/components/DayAnimated/index.d.ts.map +1 -1
- package/lib/MessagesContainer/components/DayAnimated/index.js +244 -112
- package/lib/MessagesContainer/components/DayAnimated/index.js.map +1 -1
- package/lib/MessagesContainer/components/DayAnimated/styles.d.ts +3 -3
- package/lib/MessagesContainer/components/DayAnimated/styles.js +8 -8
- package/lib/MessagesContainer/components/DayAnimated/styles.js.map +1 -1
- package/lib/MessagesContainer/components/DayAnimated/types.d.ts +4 -2
- package/lib/MessagesContainer/components/DayAnimated/types.d.ts.map +1 -1
- package/lib/MessagesContainer/components/DayAnimated/types.js.map +1 -1
- package/lib/MessagesContainer/components/DayAnimated/useScrollGatedOpacity.d.ts.map +1 -1
- package/lib/MessagesContainer/components/DayAnimated/useScrollGatedOpacity.js +34 -25
- package/lib/MessagesContainer/components/DayAnimated/useScrollGatedOpacity.js.map +1 -1
- package/lib/MessagesContainer/components/Item/index.d.ts +3 -4
- package/lib/MessagesContainer/components/Item/index.d.ts.map +1 -1
- package/lib/MessagesContainer/components/Item/index.js +290 -99
- package/lib/MessagesContainer/components/Item/index.js.map +1 -1
- package/lib/MessagesContainer/components/Item/types.d.ts +5 -0
- package/lib/MessagesContainer/components/Item/types.d.ts.map +1 -1
- package/lib/MessagesContainer/components/Item/types.js.map +1 -1
- package/lib/MessagesContainer/components/PageDownCounter.d.ts +14 -0
- package/lib/MessagesContainer/components/PageDownCounter.d.ts.map +1 -0
- package/lib/MessagesContainer/components/PageDownCounter.js +209 -0
- package/lib/MessagesContainer/components/PageDownCounter.js.map +1 -0
- package/lib/MessagesContainer/components/ScrollToBottomButton.d.ts +21 -0
- package/lib/MessagesContainer/components/ScrollToBottomButton.d.ts.map +1 -0
- package/lib/MessagesContainer/components/ScrollToBottomButton.js +195 -0
- package/lib/MessagesContainer/components/ScrollToBottomButton.js.map +1 -0
- package/lib/MessagesContainer/components/dayLayout.d.ts +2 -2
- package/lib/MessagesContainer/components/dayLayout.d.ts.map +1 -1
- package/lib/MessagesContainer/components/dayLayout.js +18 -13
- package/lib/MessagesContainer/components/dayLayout.js.map +1 -1
- package/lib/MessagesContainer/index.d.ts.map +1 -1
- package/lib/MessagesContainer/index.js +361 -420
- package/lib/MessagesContainer/index.js.map +1 -1
- package/lib/MessagesContainer/listState.d.ts +18 -0
- package/lib/MessagesContainer/listState.d.ts.map +1 -0
- package/lib/MessagesContainer/listState.js +25 -0
- package/lib/MessagesContainer/listState.js.map +1 -0
- package/lib/MessagesContainer/listTransitions.d.ts +10 -0
- package/lib/MessagesContainer/listTransitions.d.ts.map +1 -0
- package/lib/MessagesContainer/listTransitions.js +12 -0
- package/lib/MessagesContainer/listTransitions.js.map +1 -0
- package/lib/MessagesContainer/pageDownReturn.d.ts +11 -0
- package/lib/MessagesContainer/pageDownReturn.d.ts.map +1 -0
- package/lib/MessagesContainer/pageDownReturn.js +9 -0
- package/lib/MessagesContainer/pageDownReturn.js.map +1 -0
- package/lib/MessagesContainer/rowConfig.d.ts +39 -0
- package/lib/MessagesContainer/rowConfig.d.ts.map +1 -0
- package/lib/MessagesContainer/rowConfig.js +161 -0
- package/lib/MessagesContainer/rowConfig.js.map +1 -0
- package/lib/MessagesContainer/rowStore.d.ts +37 -0
- package/lib/MessagesContainer/rowStore.d.ts.map +1 -0
- package/lib/MessagesContainer/rowStore.js +140 -0
- package/lib/MessagesContainer/rowStore.js.map +1 -0
- package/lib/MessagesContainer/styles.d.ts +37 -31
- package/lib/MessagesContainer/styles.d.ts.map +1 -1
- package/lib/MessagesContainer/styles.js +75 -54
- package/lib/MessagesContainer/styles.js.map +1 -1
- package/lib/MessagesContainer/types.d.ts +33 -30
- package/lib/MessagesContainer/types.d.ts.map +1 -1
- package/lib/MessagesContainer/types.js +1 -9
- package/lib/MessagesContainer/types.js.map +1 -1
- package/lib/MessagesContainer/useCellLayouts.d.ts +17 -0
- package/lib/MessagesContainer/useCellLayouts.d.ts.map +1 -0
- package/lib/MessagesContainer/useCellLayouts.js +133 -0
- package/lib/MessagesContainer/useCellLayouts.js.map +1 -0
- package/lib/MessagesContainer/useDaysPositions.d.ts +18 -0
- package/lib/MessagesContainer/useDaysPositions.d.ts.map +1 -0
- package/lib/MessagesContainer/useDaysPositions.js +109 -0
- package/lib/MessagesContainer/useDaysPositions.js.map +1 -0
- package/lib/MessagesContainer/useListChrome.d.ts +14 -0
- package/lib/MessagesContainer/useListChrome.d.ts.map +1 -0
- package/lib/MessagesContainer/useListChrome.js +176 -0
- package/lib/MessagesContainer/useListChrome.js.map +1 -0
- package/lib/MessagesContainer/useListMetrics.d.ts +32 -0
- package/lib/MessagesContainer/useListMetrics.d.ts.map +1 -0
- package/lib/MessagesContainer/useListMetrics.js +176 -0
- package/lib/MessagesContainer/useListMetrics.js.map +1 -0
- package/lib/MessagesContainer/useMessageRows.d.ts +46 -0
- package/lib/MessagesContainer/useMessageRows.d.ts.map +1 -0
- package/lib/MessagesContainer/useMessageRows.js +228 -0
- package/lib/MessagesContainer/useMessageRows.js.map +1 -0
- package/lib/MessagesContainer/usePageDownUnread.d.ts +27 -0
- package/lib/MessagesContainer/usePageDownUnread.d.ts.map +1 -0
- package/lib/MessagesContainer/usePageDownUnread.js +152 -0
- package/lib/MessagesContainer/usePageDownUnread.js.map +1 -0
- package/lib/MessagesContainer/useScrollActivity.d.ts +13 -0
- package/lib/MessagesContainer/useScrollActivity.d.ts.map +1 -0
- package/lib/MessagesContainer/useScrollActivity.js +84 -0
- package/lib/MessagesContainer/useScrollActivity.js.map +1 -0
- package/lib/MessagesContainer/useScrollToBottom.d.ts +26 -0
- package/lib/MessagesContainer/useScrollToBottom.d.ts.map +1 -0
- package/lib/MessagesContainer/useScrollToBottom.js +164 -0
- package/lib/MessagesContainer/useScrollToBottom.js.map +1 -0
- package/lib/MessagesContainer/useTapToClosePanels.d.ts +7 -0
- package/lib/MessagesContainer/useTapToClosePanels.d.ts.map +1 -0
- package/lib/MessagesContainer/useTapToClosePanels.js +55 -0
- package/lib/MessagesContainer/useTapToClosePanels.js.map +1 -0
- package/lib/MessagesContainer/viewability.d.ts +9 -0
- package/lib/MessagesContainer/viewability.d.ts.map +1 -0
- package/lib/MessagesContainer/viewability.js +110 -0
- package/lib/MessagesContainer/viewability.js.map +1 -0
- package/lib/Models.d.ts +188 -3
- package/lib/Models.d.ts.map +1 -1
- package/lib/Models.js.map +1 -1
- package/lib/QuickReplies.js +234 -101
- package/lib/QuickReplies.js.map +1 -1
- package/lib/Reactions/MessageReactions.d.ts +5 -0
- package/lib/Reactions/MessageReactions.d.ts.map +1 -1
- package/lib/Reactions/MessageReactions.js +359 -80
- package/lib/Reactions/MessageReactions.js.map +1 -1
- package/lib/Reactions/ReactionPicker.d.ts +5 -3
- package/lib/Reactions/ReactionPicker.d.ts.map +1 -1
- package/lib/Reactions/ReactionPicker.js +68 -82
- package/lib/Reactions/ReactionPicker.js.map +1 -1
- package/lib/Reactions/index.js +1 -0
- package/lib/Reactions/index.js.map +1 -1
- package/lib/Reactions/types.d.ts +49 -5
- package/lib/Reactions/types.d.ts.map +1 -1
- package/lib/Reactions/types.js.map +1 -1
- package/lib/Reply/index.js.map +1 -1
- package/lib/Reply/types.d.ts +19 -3
- package/lib/Reply/types.d.ts.map +1 -1
- package/lib/Reply/types.js.map +1 -1
- package/lib/Send.d.ts +2 -2
- package/lib/Send.d.ts.map +1 -1
- package/lib/Send.js +218 -47
- package/lib/Send.js.map +1 -1
- package/lib/SystemMessage.d.ts.map +1 -1
- package/lib/SystemMessage.js +106 -37
- package/lib/SystemMessage.js.map +1 -1
- package/lib/Theme.d.ts +320 -23
- package/lib/Theme.d.ts.map +1 -1
- package/lib/Theme.js +548 -119
- package/lib/Theme.js.map +1 -1
- package/lib/Time.d.ts +7 -0
- package/lib/Time.d.ts.map +1 -1
- package/lib/Time.js +122 -30
- package/lib/Time.js.map +1 -1
- package/lib/TypingIndicator/index.d.ts +9 -1
- package/lib/TypingIndicator/index.d.ts.map +1 -1
- package/lib/TypingIndicator/index.js +318 -94
- package/lib/TypingIndicator/index.js.map +1 -1
- package/lib/TypingIndicator/styles.d.ts +6 -2
- package/lib/TypingIndicator/styles.d.ts.map +1 -1
- package/lib/TypingIndicator/styles.js +22 -18
- package/lib/TypingIndicator/styles.js.map +1 -1
- package/lib/TypingIndicator/types.js.map +1 -1
- package/lib/attachments/AttachmentButton.d.ts +18 -0
- package/lib/attachments/AttachmentButton.d.ts.map +1 -0
- package/lib/attachments/AttachmentButton.js +110 -0
- package/lib/attachments/AttachmentButton.js.map +1 -0
- package/lib/attachments/AttachmentMenu/CaptionBar.d.ts +15 -0
- package/lib/attachments/AttachmentMenu/CaptionBar.d.ts.map +1 -0
- package/lib/attachments/AttachmentMenu/CaptionBar.js +165 -0
- package/lib/attachments/AttachmentMenu/CaptionBar.js.map +1 -0
- package/lib/attachments/AttachmentMenu/GalleryCell.d.ts +14 -0
- package/lib/attachments/AttachmentMenu/GalleryCell.d.ts.map +1 -0
- package/lib/attachments/AttachmentMenu/GalleryCell.js +267 -0
- package/lib/attachments/AttachmentMenu/GalleryCell.js.map +1 -0
- package/lib/attachments/AttachmentMenu/GalleryGrid.d.ts +18 -0
- package/lib/attachments/AttachmentMenu/GalleryGrid.d.ts.map +1 -0
- package/lib/attachments/AttachmentMenu/GalleryGrid.js +184 -0
- package/lib/attachments/AttachmentMenu/GalleryGrid.js.map +1 -0
- package/lib/attachments/AttachmentMenu/TabBar.d.ts +14 -0
- package/lib/attachments/AttachmentMenu/TabBar.d.ts.map +1 -0
- package/lib/attachments/AttachmentMenu/TabBar.js +127 -0
- package/lib/attachments/AttachmentMenu/TabBar.js.map +1 -0
- package/lib/attachments/AttachmentMenu/TabButton.d.ts +15 -0
- package/lib/attachments/AttachmentMenu/TabButton.d.ts.map +1 -0
- package/lib/attachments/AttachmentMenu/TabButton.js +219 -0
- package/lib/attachments/AttachmentMenu/TabButton.js.map +1 -0
- package/lib/attachments/AttachmentMenu/TabPanel.d.ts +17 -0
- package/lib/attachments/AttachmentMenu/TabPanel.d.ts.map +1 -0
- package/lib/attachments/AttachmentMenu/TabPanel.js +170 -0
- package/lib/attachments/AttachmentMenu/TabPanel.js.map +1 -0
- package/lib/attachments/AttachmentMenu/constants.d.ts +54 -0
- package/lib/attachments/AttachmentMenu/constants.d.ts.map +1 -0
- package/lib/attachments/AttachmentMenu/constants.js +79 -0
- package/lib/attachments/AttachmentMenu/constants.js.map +1 -0
- package/lib/attachments/AttachmentMenu/index.d.ts +16 -0
- package/lib/attachments/AttachmentMenu/index.d.ts.map +1 -0
- package/lib/attachments/AttachmentMenu/index.js +498 -0
- package/lib/attachments/AttachmentMenu/index.js.map +1 -0
- package/lib/attachments/AttachmentMenu/styles.d.ts +259 -0
- package/lib/attachments/AttachmentMenu/styles.d.ts.map +1 -0
- package/lib/attachments/AttachmentMenu/styles.js +262 -0
- package/lib/attachments/AttachmentMenu/styles.js.map +1 -0
- package/lib/attachments/AttachmentMenu/useSheetPresence.d.ts +14 -0
- package/lib/attachments/AttachmentMenu/useSheetPresence.d.ts.map +1 -0
- package/lib/attachments/AttachmentMenu/useSheetPresence.js +74 -0
- package/lib/attachments/AttachmentMenu/useSheetPresence.js.map +1 -0
- package/lib/attachments/buildMessages.d.ts +36 -0
- package/lib/attachments/buildMessages.d.ts.map +1 -0
- package/lib/attachments/buildMessages.js +192 -0
- package/lib/attachments/buildMessages.js.map +1 -0
- package/lib/attachments/gallery.d.ts +28 -0
- package/lib/attachments/gallery.d.ts.map +1 -0
- package/lib/attachments/gallery.js +245 -0
- package/lib/attachments/gallery.js.map +1 -0
- package/lib/attachments/types.d.ts +69 -0
- package/lib/attachments/types.d.ts.map +1 -0
- package/lib/attachments/types.js +2 -0
- package/lib/attachments/types.js.map +1 -0
- package/lib/colorUtils.d.ts +24 -0
- package/lib/colorUtils.d.ts.map +1 -0
- package/lib/colorUtils.js +71 -0
- package/lib/colorUtils.js.map +1 -0
- package/lib/components/AttachmentSheet.d.ts +1 -1
- package/lib/components/AttachmentSheet.d.ts.map +1 -1
- package/lib/components/AttachmentSheet.js +515 -155
- package/lib/components/AttachmentSheet.js.map +1 -1
- package/lib/components/BasicMarkdown.d.ts +7 -1
- package/lib/components/BasicMarkdown.d.ts.map +1 -1
- package/lib/components/BasicMarkdown.js +234 -184
- package/lib/components/BasicMarkdown.js.map +1 -1
- package/lib/components/BubbleBackground.d.ts +55 -0
- package/lib/components/BubbleBackground.d.ts.map +1 -0
- package/lib/components/BubbleBackground.js +513 -0
- package/lib/components/BubbleBackground.js.map +1 -0
- package/lib/components/ChatEmpty.d.ts +18 -0
- package/lib/components/ChatEmpty.d.ts.map +1 -0
- package/lib/components/ChatEmpty.js +125 -0
- package/lib/components/ChatEmpty.js.map +1 -0
- package/lib/components/ChatLoadingOverlay.d.ts +10 -0
- package/lib/components/ChatLoadingOverlay.d.ts.map +1 -0
- package/lib/components/ChatLoadingOverlay.js +89 -0
- package/lib/components/ChatLoadingOverlay.js.map +1 -0
- package/lib/components/ChatOverlay.d.ts +9 -0
- package/lib/components/ChatOverlay.d.ts.map +1 -0
- package/lib/components/ChatOverlay.js +60 -0
- package/lib/components/ChatOverlay.js.map +1 -0
- package/lib/components/ChatWallpaper.d.ts +32 -0
- package/lib/components/ChatWallpaper.d.ts.map +1 -0
- package/lib/components/ChatWallpaper.js +277 -0
- package/lib/components/ChatWallpaper.js.map +1 -0
- package/lib/components/ContextMenu/MenuCard.d.ts +21 -0
- package/lib/components/ContextMenu/MenuCard.d.ts.map +1 -0
- package/lib/components/ContextMenu/MenuCard.js +265 -0
- package/lib/components/ContextMenu/MenuCard.js.map +1 -0
- package/lib/components/ContextMenu/ReactionButton.d.ts +15 -0
- package/lib/components/ContextMenu/ReactionButton.d.ts.map +1 -0
- package/lib/components/ContextMenu/ReactionButton.js +116 -0
- package/lib/components/ContextMenu/ReactionButton.js.map +1 -0
- package/lib/components/ContextMenu/ReactionFlight.d.ts +14 -0
- package/lib/components/ContextMenu/ReactionFlight.d.ts.map +1 -0
- package/lib/components/ContextMenu/ReactionFlight.js +111 -0
- package/lib/components/ContextMenu/ReactionFlight.js.map +1 -0
- package/lib/components/ContextMenu/ReactionsBar.d.ts +35 -0
- package/lib/components/ContextMenu/ReactionsBar.d.ts.map +1 -0
- package/lib/components/ContextMenu/ReactionsBar.js +354 -0
- package/lib/components/ContextMenu/ReactionsBar.js.map +1 -0
- package/lib/components/ContextMenu/constants.d.ts +68 -0
- package/lib/components/ContextMenu/constants.d.ts.map +1 -0
- package/lib/components/ContextMenu/constants.js +105 -0
- package/lib/components/ContextMenu/constants.js.map +1 -0
- package/lib/components/ContextMenu/index.d.ts +12 -0
- package/lib/components/ContextMenu/index.d.ts.map +1 -0
- package/lib/components/ContextMenu/index.js +476 -0
- package/lib/components/ContextMenu/index.js.map +1 -0
- package/lib/components/ContextMenu/placement.d.ts +50 -0
- package/lib/components/ContextMenu/placement.d.ts.map +1 -0
- package/lib/components/ContextMenu/placement.js +117 -0
- package/lib/components/ContextMenu/placement.js.map +1 -0
- package/lib/components/ContextMenu/styles.d.ts +199 -0
- package/lib/components/ContextMenu/styles.d.ts.map +1 -0
- package/lib/components/ContextMenu/styles.js +169 -0
- package/lib/components/ContextMenu/styles.js.map +1 -0
- package/lib/components/ContextMenu/types.d.ts +62 -0
- package/lib/components/ContextMenu/types.d.ts.map +1 -0
- package/lib/components/ContextMenu/types.js +2 -0
- package/lib/components/ContextMenu/types.js.map +1 -0
- package/lib/components/ContextMenu/useExpandPanel.d.ts +11 -0
- package/lib/components/ContextMenu/useExpandPanel.d.ts.map +1 -0
- package/lib/components/ContextMenu/useExpandPanel.js +81 -0
- package/lib/components/ContextMenu/useExpandPanel.js.map +1 -0
- package/lib/components/ContextMenu/useMenuPresence.d.ts +17 -0
- package/lib/components/ContextMenu/useMenuPresence.d.ts.map +1 -0
- package/lib/components/ContextMenu/useMenuPresence.js +125 -0
- package/lib/components/ContextMenu/useMenuPresence.js.map +1 -0
- package/lib/components/FloatingRoundNote.d.ts +13 -0
- package/lib/components/FloatingRoundNote.d.ts.map +1 -0
- package/lib/components/FloatingRoundNote.js +541 -0
- package/lib/components/FloatingRoundNote.js.map +1 -0
- package/lib/components/GlassSurface.d.ts +16 -0
- package/lib/components/GlassSurface.d.ts.map +1 -0
- package/lib/components/GlassSurface.js +114 -0
- package/lib/components/GlassSurface.js.map +1 -0
- package/lib/components/Icon.js +57 -8
- package/lib/components/Icon.js.map +1 -1
- package/lib/components/LinkPreviewCard.d.ts +36 -0
- package/lib/components/LinkPreviewCard.d.ts.map +1 -0
- package/lib/components/LinkPreviewCard.js +416 -0
- package/lib/components/LinkPreviewCard.js.map +1 -0
- package/lib/components/LucideIcon.d.ts.map +1 -1
- package/lib/components/LucideIcon.js +103 -106
- package/lib/components/LucideIcon.js.map +1 -1
- package/lib/components/MarkdownMessageText.d.ts +17 -2
- package/lib/components/MarkdownMessageText.d.ts.map +1 -1
- package/lib/components/MarkdownMessageText.js +270 -22
- package/lib/components/MarkdownMessageText.js.map +1 -1
- package/lib/components/MediaCard.d.ts.map +1 -1
- package/lib/components/MediaCard.js +223 -85
- package/lib/components/MediaCard.js.map +1 -1
- package/lib/components/MediaControls.js +1094 -450
- package/lib/components/MediaControls.js.map +1 -1
- package/lib/components/MediaLoader.d.ts +21 -0
- package/lib/components/MediaLoader.d.ts.map +1 -0
- package/lib/components/MediaLoader.js +61 -0
- package/lib/components/MediaLoader.js.map +1 -0
- package/lib/components/MessageReply.d.ts +2 -2
- package/lib/components/MessageReply.d.ts.map +1 -1
- package/lib/components/MessageReply.js +266 -83
- package/lib/components/MessageReply.js.map +1 -1
- package/lib/components/MessageStatus.d.ts +23 -0
- package/lib/components/MessageStatus.d.ts.map +1 -0
- package/lib/components/MessageStatus.js +499 -0
- package/lib/components/MessageStatus.js.map +1 -0
- package/lib/components/NoteIndicators.d.ts +25 -0
- package/lib/components/NoteIndicators.d.ts.map +1 -0
- package/lib/components/NoteIndicators.js +206 -0
- package/lib/components/NoteIndicators.js.map +1 -0
- package/lib/components/NowPlayingBar.d.ts +15 -0
- package/lib/components/NowPlayingBar.d.ts.map +1 -0
- package/lib/components/NowPlayingBar.js +261 -0
- package/lib/components/NowPlayingBar.js.map +1 -0
- package/lib/components/PlayPauseIcon.d.ts +13 -0
- package/lib/components/PlayPauseIcon.d.ts.map +1 -0
- package/lib/components/PlayPauseIcon.js +187 -0
- package/lib/components/PlayPauseIcon.js.map +1 -0
- package/lib/components/PlaybackSpeedPill.d.ts +11 -0
- package/lib/components/PlaybackSpeedPill.d.ts.map +1 -0
- package/lib/components/PlaybackSpeedPill.js +350 -0
- package/lib/components/PlaybackSpeedPill.js.map +1 -0
- package/lib/components/RadialProgress.d.ts +70 -0
- package/lib/components/RadialProgress.d.ts.map +1 -0
- package/lib/components/RadialProgress.js +864 -0
- package/lib/components/RadialProgress.js.map +1 -0
- package/lib/components/RecordButton/LockPill.d.ts +27 -0
- package/lib/components/RecordButton/LockPill.d.ts.map +1 -0
- package/lib/components/RecordButton/LockPill.js +182 -0
- package/lib/components/RecordButton/LockPill.js.map +1 -0
- package/lib/components/RecordButton/ModeButton.d.ts +18 -0
- package/lib/components/RecordButton/ModeButton.d.ts.map +1 -0
- package/lib/components/RecordButton/ModeButton.js +154 -0
- package/lib/components/RecordButton/ModeButton.js.map +1 -0
- package/lib/components/RecordButton/ResumeButton.d.ts +20 -0
- package/lib/components/RecordButton/ResumeButton.d.ts.map +1 -0
- package/lib/components/RecordButton/ResumeButton.js +63 -0
- package/lib/components/RecordButton/ResumeButton.js.map +1 -0
- package/lib/components/RecordButton/Tooltips.d.ts +20 -0
- package/lib/components/RecordButton/Tooltips.d.ts.map +1 -0
- package/lib/components/RecordButton/Tooltips.js +191 -0
- package/lib/components/RecordButton/Tooltips.js.map +1 -0
- package/lib/components/RecordButton/ViewOnceButton.d.ts +16 -0
- package/lib/components/RecordButton/ViewOnceButton.d.ts.map +1 -0
- package/lib/components/RecordButton/ViewOnceButton.js +96 -0
- package/lib/components/RecordButton/ViewOnceButton.js.map +1 -0
- package/lib/components/RecordButton/constants.d.ts +52 -0
- package/lib/components/RecordButton/constants.d.ts.map +1 -0
- package/lib/components/RecordButton/constants.js +58 -0
- package/lib/components/RecordButton/constants.js.map +1 -0
- package/lib/components/RecordButton/index.d.ts +14 -0
- package/lib/components/RecordButton/index.d.ts.map +1 -0
- package/lib/components/RecordButton/index.js +382 -0
- package/lib/components/RecordButton/index.js.map +1 -0
- package/lib/components/RecordButton/styles.d.ts +155 -0
- package/lib/components/RecordButton/styles.d.ts.map +1 -0
- package/lib/components/RecordButton/styles.js +161 -0
- package/lib/components/RecordButton/styles.js.map +1 -0
- package/lib/components/RecordButton/types.d.ts +63 -0
- package/lib/components/RecordButton/types.d.ts.map +1 -0
- package/lib/components/RecordButton/types.js +2 -0
- package/lib/components/RecordButton/types.js.map +1 -0
- package/lib/components/RecordButton/useRecordGesture.d.ts +28 -0
- package/lib/components/RecordButton/useRecordGesture.d.ts.map +1 -0
- package/lib/components/RecordButton/useRecordGesture.js +263 -0
- package/lib/components/RecordButton/useRecordGesture.js.map +1 -0
- package/lib/components/RecordButton/useRecordHints.d.ts +27 -0
- package/lib/components/RecordButton/useRecordHints.d.ts.map +1 -0
- package/lib/components/RecordButton/useRecordHints.js +210 -0
- package/lib/components/RecordButton/useRecordHints.js.map +1 -0
- package/lib/components/RecordButton/useRecordSlideDistance.d.ts +3 -0
- package/lib/components/RecordButton/useRecordSlideDistance.d.ts.map +1 -0
- package/lib/components/RecordButton/useRecordSlideDistance.js +15 -0
- package/lib/components/RecordButton/useRecordSlideDistance.js.map +1 -0
- package/lib/components/RecordButton/useRecordTake.d.ts +41 -0
- package/lib/components/RecordButton/useRecordTake.d.ts.map +1 -0
- package/lib/components/RecordButton/useRecordTake.js +349 -0
- package/lib/components/RecordButton/useRecordTake.js.map +1 -0
- package/lib/components/RecordButton/useSendFlight.d.ts +25 -0
- package/lib/components/RecordButton/useSendFlight.d.ts.map +1 -0
- package/lib/components/RecordButton/useSendFlight.js +162 -0
- package/lib/components/RecordButton/useSendFlight.js.map +1 -0
- package/lib/components/RecordCircle.d.ts +92 -0
- package/lib/components/RecordCircle.d.ts.map +1 -0
- package/lib/components/RecordCircle.js +629 -0
- package/lib/components/RecordCircle.js.map +1 -0
- package/lib/components/RecordingBar.d.ts +24 -0
- package/lib/components/RecordingBar.d.ts.map +1 -0
- package/lib/components/RecordingBar.js +766 -0
- package/lib/components/RecordingBar.js.map +1 -0
- package/lib/components/ReplyPreview.js +318 -135
- package/lib/components/ReplyPreview.js.map +1 -1
- package/lib/components/SelectionBar.d.ts +17 -0
- package/lib/components/SelectionBar.d.ts.map +1 -0
- package/lib/components/SelectionBar.js +214 -0
- package/lib/components/SelectionBar.js.map +1 -0
- package/lib/components/SelectionCheckbox.d.ts +12 -0
- package/lib/components/SelectionCheckbox.d.ts.map +1 -0
- package/lib/components/SelectionCheckbox.js +104 -0
- package/lib/components/SelectionCheckbox.js.map +1 -0
- package/lib/components/SendIcon.js +60 -26
- package/lib/components/SendIcon.js.map +1 -1
- package/lib/components/ServiceSpinner.d.ts +17 -0
- package/lib/components/ServiceSpinner.d.ts.map +1 -0
- package/lib/components/ServiceSpinner.js +77 -0
- package/lib/components/ServiceSpinner.js.map +1 -0
- package/lib/components/Spinner.d.ts +18 -0
- package/lib/components/Spinner.d.ts.map +1 -0
- package/lib/components/Spinner.js +169 -0
- package/lib/components/Spinner.js.map +1 -0
- package/lib/components/StreamingCursor.js +54 -9
- package/lib/components/StreamingCursor.js.map +1 -1
- package/lib/components/Ticks.d.ts +6 -5
- package/lib/components/Ticks.d.ts.map +1 -1
- package/lib/components/Ticks.js +272 -82
- package/lib/components/Ticks.js.map +1 -1
- package/lib/components/TouchableOpacity.d.ts.map +1 -1
- package/lib/components/TouchableOpacity.js +154 -48
- package/lib/components/TouchableOpacity.js.map +1 -1
- package/lib/components/TranscribeButton.d.ts +45 -0
- package/lib/components/TranscribeButton.d.ts.map +1 -0
- package/lib/components/TranscribeButton.js +549 -0
- package/lib/components/TranscribeButton.js.map +1 -0
- package/lib/components/TypingStatus.d.ts +29 -0
- package/lib/components/TypingStatus.d.ts.map +1 -0
- package/lib/components/TypingStatus.js +446 -0
- package/lib/components/TypingStatus.js.map +1 -0
- package/lib/components/UnreadSeparator.d.ts +8 -0
- package/lib/components/UnreadSeparator.d.ts.map +1 -0
- package/lib/components/UnreadSeparator.js +101 -0
- package/lib/components/UnreadSeparator.js.map +1 -0
- package/lib/components/VideoNoteCapture/ProgressRing.d.ts +16 -0
- package/lib/components/VideoNoteCapture/ProgressRing.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/ProgressRing.js +75 -0
- package/lib/components/VideoNoteCapture/ProgressRing.js.map +1 -0
- package/lib/components/VideoNoteCapture/VideoNoteCaptureView.d.ts +31 -0
- package/lib/components/VideoNoteCapture/VideoNoteCaptureView.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/VideoNoteCaptureView.js +500 -0
- package/lib/components/VideoNoteCapture/VideoNoteCaptureView.js.map +1 -0
- package/lib/components/VideoNoteCapture/VideoNotePreviewView.d.ts +12 -0
- package/lib/components/VideoNoteCapture/VideoNotePreviewView.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/VideoNotePreviewView.js +105 -0
- package/lib/components/VideoNoteCapture/VideoNotePreviewView.js.map +1 -0
- package/lib/components/VideoNoteCapture/VideoNoteStage.d.ts +12 -0
- package/lib/components/VideoNoteCapture/VideoNoteStage.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/VideoNoteStage.js +95 -0
- package/lib/components/VideoNoteCapture/VideoNoteStage.js.map +1 -0
- package/lib/components/VideoNoteCapture/constants.d.ts +50 -0
- package/lib/components/VideoNoteCapture/constants.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/constants.js +53 -0
- package/lib/components/VideoNoteCapture/constants.js.map +1 -0
- package/lib/components/VideoNoteCapture/index.d.ts +3 -0
- package/lib/components/VideoNoteCapture/index.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/index.js +2 -0
- package/lib/components/VideoNoteCapture/index.js.map +1 -0
- package/lib/components/VideoNoteCapture/optional.d.ts +6 -0
- package/lib/components/VideoNoteCapture/optional.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/optional.js +15 -0
- package/lib/components/VideoNoteCapture/optional.js.map +1 -0
- package/lib/components/VideoNoteCapture/sessionState.d.ts +10 -0
- package/lib/components/VideoNoteCapture/sessionState.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/sessionState.js +19 -0
- package/lib/components/VideoNoteCapture/sessionState.js.map +1 -0
- package/lib/components/VideoNoteCapture/styles.d.ts +84 -0
- package/lib/components/VideoNoteCapture/styles.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/styles.js +86 -0
- package/lib/components/VideoNoteCapture/styles.js.map +1 -0
- package/lib/components/VideoNoteCapture/types.d.ts +54 -0
- package/lib/components/VideoNoteCapture/types.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/types.js +2 -0
- package/lib/components/VideoNoteCapture/types.js.map +1 -0
- package/lib/components/VideoNoteCapture/useRoundAnimation.d.ts +47 -0
- package/lib/components/VideoNoteCapture/useRoundAnimation.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/useRoundAnimation.js +216 -0
- package/lib/components/VideoNoteCapture/useRoundAnimation.js.map +1 -0
- package/lib/components/VideoNoteCapture/useRoundLayout.d.ts +14 -0
- package/lib/components/VideoNoteCapture/useRoundLayout.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/useRoundLayout.js +61 -0
- package/lib/components/VideoNoteCapture/useRoundLayout.js.map +1 -0
- package/lib/components/VideoNoteCapture/useVideoNoteSession.d.ts +25 -0
- package/lib/components/VideoNoteCapture/useVideoNoteSession.d.ts.map +1 -0
- package/lib/components/VideoNoteCapture/useVideoNoteSession.js +611 -0
- package/lib/components/VideoNoteCapture/useVideoNoteSession.js.map +1 -0
- package/lib/components/VideoNoteOverlay.d.ts +42 -11
- package/lib/components/VideoNoteOverlay.d.ts.map +1 -1
- package/lib/components/VideoNoteOverlay.js +722 -135
- package/lib/components/VideoNoteOverlay.js.map +1 -1
- package/lib/components/VideoNoteRecorder/LiveVideoNote.d.ts +6 -0
- package/lib/components/VideoNoteRecorder/LiveVideoNote.d.ts.map +1 -0
- package/lib/components/VideoNoteRecorder/LiveVideoNote.js +205 -0
- package/lib/components/VideoNoteRecorder/LiveVideoNote.js.map +1 -0
- package/lib/components/VideoNoteRecorder/RecorderChrome.d.ts +35 -0
- package/lib/components/VideoNoteRecorder/RecorderChrome.d.ts.map +1 -0
- package/lib/components/VideoNoteRecorder/RecorderChrome.js +350 -0
- package/lib/components/VideoNoteRecorder/RecorderChrome.js.map +1 -0
- package/lib/components/VideoNoteRecorder/UnavailableVideoNote.d.ts +10 -0
- package/lib/components/VideoNoteRecorder/UnavailableVideoNote.d.ts.map +1 -0
- package/lib/components/VideoNoteRecorder/UnavailableVideoNote.js +52 -0
- package/lib/components/VideoNoteRecorder/UnavailableVideoNote.js.map +1 -0
- package/lib/components/VideoNoteRecorder/constants.d.ts +16 -0
- package/lib/components/VideoNoteRecorder/constants.d.ts.map +1 -0
- package/lib/components/VideoNoteRecorder/constants.js +30 -0
- package/lib/components/VideoNoteRecorder/constants.js.map +1 -0
- package/lib/components/{VideoNoteRecorder.d.ts → VideoNoteRecorder/index.d.ts} +5 -10
- package/lib/components/VideoNoteRecorder/index.d.ts.map +1 -0
- package/lib/components/VideoNoteRecorder/index.js +26 -0
- package/lib/components/VideoNoteRecorder/index.js.map +1 -0
- package/lib/components/VideoNoteRecorder/styles.d.ts +159 -0
- package/lib/components/VideoNoteRecorder/styles.d.ts.map +1 -0
- package/lib/components/VideoNoteRecorder/styles.js +170 -0
- package/lib/components/VideoNoteRecorder/styles.js.map +1 -0
- package/lib/components/VideoNoteRecorder/types.d.ts +7 -0
- package/lib/components/VideoNoteRecorder/types.d.ts.map +1 -0
- package/lib/components/VideoNoteRecorder/types.js +2 -0
- package/lib/components/VideoNoteRecorder/types.js.map +1 -0
- package/lib/components/VideoNoteRecorder/useRecordingTimer.d.ts +10 -0
- package/lib/components/VideoNoteRecorder/useRecordingTimer.d.ts.map +1 -0
- package/lib/components/VideoNoteRecorder/useRecordingTimer.js +134 -0
- package/lib/components/VideoNoteRecorder/useRecordingTimer.js.map +1 -0
- package/lib/components/VideoNoteRecorder/useVideoNoteRecording.d.ts +28 -0
- package/lib/components/VideoNoteRecorder/useVideoNoteRecording.d.ts.map +1 -0
- package/lib/components/VideoNoteRecorder/useVideoNoteRecording.js +287 -0
- package/lib/components/VideoNoteRecorder/useVideoNoteRecording.js.map +1 -0
- package/lib/components/VideoNoteRecorder/visionCameraHooks.d.ts +6 -0
- package/lib/components/VideoNoteRecorder/visionCameraHooks.d.ts.map +1 -0
- package/lib/components/VideoNoteRecorder/visionCameraHooks.js +11 -0
- package/lib/components/VideoNoteRecorder/visionCameraHooks.js.map +1 -0
- package/lib/components/VideoRecordButton.d.ts +1 -1
- package/lib/components/VideoRecordButton.d.ts.map +1 -1
- package/lib/components/VideoRecordButton.js +221 -92
- package/lib/components/VideoRecordButton.js.map +1 -1
- package/lib/components/ViewOnceBadge.d.ts +23 -0
- package/lib/components/ViewOnceBadge.d.ts.map +1 -0
- package/lib/components/ViewOnceBadge.js +233 -0
- package/lib/components/ViewOnceBadge.js.map +1 -0
- package/lib/components/VoiceMessageInput/RecordedVoicePreview.d.ts +16 -0
- package/lib/components/VoiceMessageInput/RecordedVoicePreview.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/RecordedVoicePreview.js +503 -0
- package/lib/components/VoiceMessageInput/RecordedVoicePreview.js.map +1 -0
- package/lib/components/VoiceMessageInput/constants.d.ts +16 -0
- package/lib/components/VoiceMessageInput/constants.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/constants.js +22 -0
- package/lib/components/VoiceMessageInput/constants.js.map +1 -0
- package/lib/components/VoiceMessageInput/formatElapsed.d.ts +2 -0
- package/lib/components/VoiceMessageInput/formatElapsed.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/formatElapsed.js +7 -0
- package/lib/components/VoiceMessageInput/formatElapsed.js.map +1 -0
- package/lib/components/VoiceMessageInput/index.d.ts +9 -0
- package/lib/components/VoiceMessageInput/index.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/index.js +148 -0
- package/lib/components/VoiceMessageInput/index.js.map +1 -0
- package/lib/components/VoiceMessageInput/previewStyles.d.ts +77 -0
- package/lib/components/VoiceMessageInput/previewStyles.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/previewStyles.js +80 -0
- package/lib/components/VoiceMessageInput/previewStyles.js.map +1 -0
- package/lib/components/VoiceMessageInput/previewWaveform.d.ts +15 -0
- package/lib/components/VoiceMessageInput/previewWaveform.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/previewWaveform.js +27 -0
- package/lib/components/VoiceMessageInput/previewWaveform.js.map +1 -0
- package/lib/components/VoiceMessageInput/recorder.d.ts +18 -0
- package/lib/components/VoiceMessageInput/recorder.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/recorder.js +80 -0
- package/lib/components/VoiceMessageInput/recorder.js.map +1 -0
- package/lib/components/VoiceMessageInput/types.d.ts +56 -0
- package/lib/components/VoiceMessageInput/types.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/types.js +2 -0
- package/lib/components/VoiceMessageInput/types.js.map +1 -0
- package/lib/components/VoiceMessageInput/useLazyRecorder.d.ts +7 -0
- package/lib/components/VoiceMessageInput/useLazyRecorder.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/useLazyRecorder.js +61 -0
- package/lib/components/VoiceMessageInput/useLazyRecorder.js.map +1 -0
- package/lib/components/VoiceMessageInput/useStateReport.d.ts +16 -0
- package/lib/components/VoiceMessageInput/useStateReport.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/useStateReport.js +81 -0
- package/lib/components/VoiceMessageInput/useStateReport.js.map +1 -0
- package/lib/components/VoiceMessageInput/useTakePreviewActions.d.ts +34 -0
- package/lib/components/VoiceMessageInput/useTakePreviewActions.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/useTakePreviewActions.js +207 -0
- package/lib/components/VoiceMessageInput/useTakePreviewActions.js.map +1 -0
- package/lib/components/VoiceMessageInput/useVoiceTake.d.ts +25 -0
- package/lib/components/VoiceMessageInput/useVoiceTake.d.ts.map +1 -0
- package/lib/components/VoiceMessageInput/useVoiceTake.js +424 -0
- package/lib/components/VoiceMessageInput/useVoiceTake.js.map +1 -0
- package/lib/components/WaveformPlayer/Bars.d.ts +30 -0
- package/lib/components/WaveformPlayer/Bars.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/Bars.js +171 -0
- package/lib/components/WaveformPlayer/Bars.js.map +1 -0
- package/lib/components/WaveformPlayer/VoiceButton.d.ts +23 -0
- package/lib/components/WaveformPlayer/VoiceButton.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/VoiceButton.js +111 -0
- package/lib/components/WaveformPlayer/VoiceButton.js.map +1 -0
- package/lib/components/WaveformPlayer/WaveformTrack.d.ts +31 -0
- package/lib/components/WaveformPlayer/WaveformTrack.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/WaveformTrack.js +199 -0
- package/lib/components/WaveformPlayer/WaveformTrack.js.map +1 -0
- package/lib/components/WaveformPlayer/audio.d.ts +23 -0
- package/lib/components/WaveformPlayer/audio.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/audio.js +97 -0
- package/lib/components/WaveformPlayer/audio.js.map +1 -0
- package/lib/components/WaveformPlayer/index.d.ts +13 -0
- package/lib/components/WaveformPlayer/index.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/index.js +475 -0
- package/lib/components/WaveformPlayer/index.js.map +1 -0
- package/lib/components/WaveformPlayer/styles.d.ts +257 -0
- package/lib/components/WaveformPlayer/styles.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/styles.js +120 -0
- package/lib/components/WaveformPlayer/styles.js.map +1 -0
- package/lib/components/WaveformPlayer/types.d.ts +32 -0
- package/lib/components/WaveformPlayer/types.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/types.js +2 -0
- package/lib/components/WaveformPlayer/types.js.map +1 -0
- package/lib/components/WaveformPlayer/useSendFlightReveal.d.ts +21 -0
- package/lib/components/WaveformPlayer/useSendFlightReveal.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/useSendFlightReveal.js +105 -0
- package/lib/components/WaveformPlayer/useSendFlightReveal.js.map +1 -0
- package/lib/components/WaveformPlayer/useVoicePlayback.d.ts +39 -0
- package/lib/components/WaveformPlayer/useVoicePlayback.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/useVoicePlayback.js +401 -0
- package/lib/components/WaveformPlayer/useVoicePlayback.js.map +1 -0
- package/lib/components/WaveformPlayer/useVoiceSource.d.ts +38 -0
- package/lib/components/WaveformPlayer/useVoiceSource.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/useVoiceSource.js +244 -0
- package/lib/components/WaveformPlayer/useVoiceSource.js.map +1 -0
- package/lib/components/WaveformPlayer/useWaveformMotion.d.ts +16 -0
- package/lib/components/WaveformPlayer/useWaveformMotion.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/useWaveformMotion.js +135 -0
- package/lib/components/WaveformPlayer/useWaveformMotion.js.map +1 -0
- package/lib/components/WaveformPlayer/useWaveformScrub.d.ts +16 -0
- package/lib/components/WaveformPlayer/useWaveformScrub.d.ts.map +1 -0
- package/lib/components/WaveformPlayer/useWaveformScrub.js +168 -0
- package/lib/components/WaveformPlayer/useWaveformScrub.js.map +1 -0
- package/lib/components/composerPanels.d.ts +13 -0
- package/lib/components/composerPanels.d.ts.map +1 -0
- package/lib/components/composerPanels.js +22 -0
- package/lib/components/composerPanels.js.map +1 -0
- package/lib/components/defaultMessageActions.d.ts +30 -0
- package/lib/components/defaultMessageActions.d.ts.map +1 -0
- package/lib/components/defaultMessageActions.js +124 -0
- package/lib/components/defaultMessageActions.js.map +1 -0
- package/lib/components/earpiece.d.ts +56 -0
- package/lib/components/earpiece.d.ts.map +1 -0
- package/lib/components/earpiece.js +218 -0
- package/lib/components/earpiece.js.map +1 -0
- package/lib/components/floatingNoteMath.d.ts +66 -0
- package/lib/components/floatingNoteMath.d.ts.map +1 -0
- package/lib/components/floatingNoteMath.js +143 -0
- package/lib/components/floatingNoteMath.js.map +1 -0
- package/lib/components/haptics.d.ts +5 -0
- package/lib/components/haptics.d.ts.map +1 -0
- package/lib/components/haptics.js +26 -0
- package/lib/components/haptics.js.map +1 -0
- package/lib/components/mediaDownload.d.ts +14 -0
- package/lib/components/mediaDownload.d.ts.map +1 -0
- package/lib/components/mediaDownload.js +43 -0
- package/lib/components/mediaDownload.js.map +1 -0
- package/lib/components/mediaPalette.d.ts +7 -2
- package/lib/components/mediaPalette.d.ts.map +1 -1
- package/lib/components/mediaPalette.js +27 -15
- package/lib/components/mediaPalette.js.map +1 -1
- package/lib/components/mediaPlayback.d.ts +204 -5
- package/lib/components/mediaPlayback.d.ts.map +1 -1
- package/lib/components/mediaPlayback.js +746 -17
- package/lib/components/mediaPlayback.js.map +1 -1
- package/lib/components/mediaTransfer.d.ts +29 -0
- package/lib/components/mediaTransfer.d.ts.map +1 -0
- package/lib/components/mediaTransfer.js +52 -0
- package/lib/components/mediaTransfer.js.map +1 -0
- package/lib/components/mediaViewer/MediaViewer.d.ts +17 -0
- package/lib/components/mediaViewer/MediaViewer.d.ts.map +1 -0
- package/lib/components/mediaViewer/MediaViewer.js +347 -0
- package/lib/components/mediaViewer/MediaViewer.js.map +1 -0
- package/lib/components/mediaViewer/MediaViewerChrome.d.ts +14 -0
- package/lib/components/mediaViewer/MediaViewerChrome.d.ts.map +1 -0
- package/lib/components/mediaViewer/MediaViewerChrome.js +164 -0
- package/lib/components/mediaViewer/MediaViewerChrome.js.map +1 -0
- package/lib/components/mediaViewer/MediaViewerHost.d.ts +10 -0
- package/lib/components/mediaViewer/MediaViewerHost.d.ts.map +1 -0
- package/lib/components/mediaViewer/MediaViewerHost.js +76 -0
- package/lib/components/mediaViewer/MediaViewerHost.js.map +1 -0
- package/lib/components/mediaViewer/MediaViewerPage.d.ts +25 -0
- package/lib/components/mediaViewer/MediaViewerPage.d.ts.map +1 -0
- package/lib/components/mediaViewer/MediaViewerPage.js +194 -0
- package/lib/components/mediaViewer/MediaViewerPage.js.map +1 -0
- package/lib/components/mediaViewer/gallery.d.ts +27 -0
- package/lib/components/mediaViewer/gallery.d.ts.map +1 -0
- package/lib/components/mediaViewer/gallery.js +41 -0
- package/lib/components/mediaViewer/gallery.js.map +1 -0
- package/lib/components/messageHighlight.d.ts +41 -0
- package/lib/components/messageHighlight.d.ts.map +1 -0
- package/lib/components/messageHighlight.js +157 -0
- package/lib/components/messageHighlight.js.map +1 -0
- package/lib/components/messagePress.d.ts +14 -0
- package/lib/components/messagePress.d.ts.map +1 -0
- package/lib/components/messagePress.js +18 -0
- package/lib/components/messagePress.js.map +1 -0
- package/lib/components/messageSelection.d.ts +39 -0
- package/lib/components/messageSelection.d.ts.map +1 -0
- package/lib/components/messageSelection.js +135 -0
- package/lib/components/messageSelection.js.map +1 -0
- package/lib/components/recordingFeedback.d.ts +22 -0
- package/lib/components/recordingFeedback.d.ts.map +1 -0
- package/lib/components/recordingFeedback.js +80 -0
- package/lib/components/recordingFeedback.js.map +1 -0
- package/lib/components/recordingMeter.d.ts +19 -0
- package/lib/components/recordingMeter.d.ts.map +1 -0
- package/lib/components/recordingMeter.js +21 -0
- package/lib/components/recordingMeter.js.map +1 -0
- package/lib/components/roundNoteChrome.d.ts +107 -0
- package/lib/components/roundNoteChrome.d.ts.map +1 -0
- package/lib/components/roundNoteChrome.js +249 -0
- package/lib/components/roundNoteChrome.js.map +1 -0
- package/lib/components/roundNotePlayers.d.ts +78 -0
- package/lib/components/roundNotePlayers.d.ts.map +1 -0
- package/lib/components/roundNotePlayers.js +230 -0
- package/lib/components/roundNotePlayers.js.map +1 -0
- package/lib/components/sendFlight.d.ts +88 -0
- package/lib/components/sendFlight.d.ts.map +1 -0
- package/lib/components/sendFlight.js +146 -0
- package/lib/components/sendFlight.js.map +1 -0
- package/lib/components/viewOnce.d.ts +27 -0
- package/lib/components/viewOnce.d.ts.map +1 -0
- package/lib/components/viewOnce.js +168 -0
- package/lib/components/viewOnce.js.map +1 -0
- package/lib/components/visionCamera.d.ts +45 -0
- package/lib/components/visionCamera.d.ts.map +1 -0
- package/lib/components/visionCamera.js +117 -0
- package/lib/components/visionCamera.js.map +1 -0
- package/lib/components/voiceEditing.d.ts +34 -0
- package/lib/components/voiceEditing.d.ts.map +1 -0
- package/lib/components/voiceEditing.js +159 -0
- package/lib/components/voiceEditing.js.map +1 -0
- package/lib/components/voiceWaveform.d.ts +108 -0
- package/lib/components/voiceWaveform.d.ts.map +1 -0
- package/lib/components/voiceWaveform.js +165 -0
- package/lib/components/voiceWaveform.js.map +1 -0
- package/lib/components/wallpaperGradient.d.ts +16 -0
- package/lib/components/wallpaperGradient.d.ts.map +1 -0
- package/lib/components/wallpaperGradient.js +186 -0
- package/lib/components/wallpaperGradient.js.map +1 -0
- package/lib/components/windowInsets.d.ts +11 -0
- package/lib/components/windowInsets.d.ts.map +1 -0
- package/lib/components/windowInsets.js +44 -0
- package/lib/components/windowInsets.js.map +1 -0
- package/lib/dayjsLocales.js +15 -2
- package/lib/dayjsLocales.js.map +1 -1
- package/lib/emoji/EmojiGrid/BackspaceButton.d.ts +11 -0
- package/lib/emoji/EmojiGrid/BackspaceButton.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/BackspaceButton.js +111 -0
- package/lib/emoji/EmojiGrid/BackspaceButton.js.map +1 -0
- package/lib/emoji/EmojiGrid/EmojiRow.d.ts +15 -0
- package/lib/emoji/EmojiGrid/EmojiRow.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/EmojiRow.js +71 -0
- package/lib/emoji/EmojiGrid/EmojiRow.js.map +1 -0
- package/lib/emoji/EmojiGrid/Search.d.ts +29 -0
- package/lib/emoji/EmojiGrid/Search.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/Search.js +234 -0
- package/lib/emoji/EmojiGrid/Search.js.map +1 -0
- package/lib/emoji/EmojiGrid/TabStrip.d.ts +16 -0
- package/lib/emoji/EmojiGrid/TabStrip.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/TabStrip.js +237 -0
- package/lib/emoji/EmojiGrid/TabStrip.js.map +1 -0
- package/lib/emoji/EmojiGrid/TonePopup.d.ts +12 -0
- package/lib/emoji/EmojiGrid/TonePopup.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/TonePopup.js +137 -0
- package/lib/emoji/EmojiGrid/TonePopup.js.map +1 -0
- package/lib/emoji/EmojiGrid/constants.d.ts +29 -0
- package/lib/emoji/EmojiGrid/constants.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/constants.js +65 -0
- package/lib/emoji/EmojiGrid/constants.js.map +1 -0
- package/lib/emoji/EmojiGrid/index.d.ts +10 -0
- package/lib/emoji/EmojiGrid/index.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/index.js +450 -0
- package/lib/emoji/EmojiGrid/index.js.map +1 -0
- package/lib/emoji/EmojiGrid/items.d.ts +25 -0
- package/lib/emoji/EmojiGrid/items.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/items.js +75 -0
- package/lib/emoji/EmojiGrid/items.js.map +1 -0
- package/lib/emoji/EmojiGrid/styles.d.ts +181 -0
- package/lib/emoji/EmojiGrid/styles.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/styles.js +184 -0
- package/lib/emoji/EmojiGrid/styles.js.map +1 -0
- package/lib/emoji/EmojiGrid/types.d.ts +53 -0
- package/lib/emoji/EmojiGrid/types.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/types.js +2 -0
- package/lib/emoji/EmojiGrid/types.js.map +1 -0
- package/lib/emoji/EmojiGrid/useTabScroll.d.ts +19 -0
- package/lib/emoji/EmojiGrid/useTabScroll.d.ts.map +1 -0
- package/lib/emoji/EmojiGrid/useTabScroll.js +124 -0
- package/lib/emoji/EmojiGrid/useTabScroll.js.map +1 -0
- package/lib/emoji/EmojiKeyboard.d.ts +79 -0
- package/lib/emoji/EmojiKeyboard.d.ts.map +1 -0
- package/lib/emoji/EmojiKeyboard.js +445 -0
- package/lib/emoji/EmojiKeyboard.js.map +1 -0
- package/lib/emoji/defaultExpandedPicker.d.ts +5 -0
- package/lib/emoji/defaultExpandedPicker.d.ts.map +1 -0
- package/lib/emoji/defaultExpandedPicker.js +11 -0
- package/lib/emoji/defaultExpandedPicker.js.map +1 -0
- package/lib/emoji/emojiData.d.ts +2 -0
- package/lib/emoji/emojiData.d.ts.map +1 -0
- package/lib/emoji/emojiData.js +5 -0
- package/lib/emoji/emojiData.js.map +1 -0
- package/lib/emoji/emojiStore.d.ts +70 -0
- package/lib/emoji/emojiStore.d.ts.map +1 -0
- package/lib/emoji/emojiStore.js +246 -0
- package/lib/emoji/emojiStore.js.map +1 -0
- package/lib/emoji/textEditing.d.ts +20 -0
- package/lib/emoji/textEditing.d.ts.map +1 -0
- package/lib/emoji/textEditing.js +97 -0
- package/lib/emoji/textEditing.js.map +1 -0
- package/lib/emojiOnly.d.ts +11 -0
- package/lib/emojiOnly.d.ts.map +1 -0
- package/lib/emojiOnly.js +79 -0
- package/lib/emojiOnly.js.map +1 -0
- package/lib/gestures/useRowSwipe.d.ts +43 -0
- package/lib/gestures/useRowSwipe.d.ts.map +1 -0
- package/lib/gestures/useRowSwipe.js +74 -0
- package/lib/gestures/useRowSwipe.js.map +1 -0
- package/lib/hooks/useAnimatedPresence.d.ts +22 -0
- package/lib/hooks/useAnimatedPresence.d.ts.map +1 -0
- package/lib/hooks/useAnimatedPresence.js +97 -0
- package/lib/hooks/useAnimatedPresence.js.map +1 -0
- package/lib/hooks/useChatMessages.d.ts +39 -0
- package/lib/hooks/useChatMessages.d.ts.map +1 -0
- package/lib/hooks/useChatMessages.js +125 -0
- package/lib/hooks/useChatMessages.js.map +1 -0
- package/lib/hooks/useColorScheme.d.ts +7 -1
- package/lib/hooks/useColorScheme.d.ts.map +1 -1
- package/lib/hooks/useColorScheme.js +46 -8
- package/lib/hooks/useColorScheme.js.map +1 -1
- package/lib/hooks/useHasKeyboardProvider.js +18 -7
- package/lib/hooks/useHasKeyboardProvider.js.map +1 -1
- package/lib/hooks/useIcons.js +15 -2
- package/lib/hooks/useIcons.js.map +1 -1
- package/lib/hooks/useIsKeyboardVisible.js +39 -17
- package/lib/hooks/useIsKeyboardVisible.js.map +1 -1
- package/lib/hooks/useIsRTL.js +15 -2
- package/lib/hooks/useIsRTL.js.map +1 -1
- package/lib/hooks/useKeyboardVerticalOffset.d.ts +5 -3
- package/lib/hooks/useKeyboardVerticalOffset.d.ts.map +1 -1
- package/lib/hooks/useKeyboardVerticalOffset.js +52 -18
- package/lib/hooks/useKeyboardVerticalOffset.js.map +1 -1
- package/lib/hooks/useLabels.js +15 -2
- package/lib/hooks/useLabels.js.map +1 -1
- package/lib/hooks/useStreamingMessages.js +200 -86
- package/lib/hooks/useStreamingMessages.js.map +1 -1
- package/lib/hooks/useTheme.js +56 -7
- package/lib/hooks/useTheme.js.map +1 -1
- package/lib/hooks/useUpdateLayoutEffect.d.ts.map +1 -1
- package/lib/hooks/useUpdateLayoutEffect.js +35 -11
- package/lib/hooks/useUpdateLayoutEffect.js.map +1 -1
- package/lib/i18n.d.ts +182 -0
- package/lib/i18n.d.ts.map +1 -1
- package/lib/i18n.js +121 -23
- package/lib/i18n.js.map +1 -1
- package/lib/index.d.ts +31 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +18 -1
- package/lib/index.js.map +1 -1
- package/lib/linkParser.d.ts +2 -1
- package/lib/linkParser.d.ts.map +1 -1
- package/lib/linkParser.js +323 -185
- package/lib/linkParser.js.map +1 -1
- package/lib/locales/ar.d.ts.map +1 -1
- package/lib/locales/ar.js +110 -19
- package/lib/locales/ar.js.map +1 -1
- package/lib/locales/de.d.ts.map +1 -1
- package/lib/locales/de.js +110 -19
- package/lib/locales/de.js.map +1 -1
- package/lib/locales/es.d.ts.map +1 -1
- package/lib/locales/es.js +110 -19
- package/lib/locales/es.js.map +1 -1
- package/lib/locales/fr.d.ts.map +1 -1
- package/lib/locales/fr.js +110 -19
- package/lib/locales/fr.js.map +1 -1
- package/lib/locales/hi.d.ts.map +1 -1
- package/lib/locales/hi.js +110 -19
- package/lib/locales/hi.js.map +1 -1
- package/lib/locales/id.d.ts.map +1 -1
- package/lib/locales/id.js +110 -19
- package/lib/locales/id.js.map +1 -1
- package/lib/locales/index.js +19 -5
- package/lib/locales/index.js.map +1 -1
- package/lib/locales/it.d.ts.map +1 -1
- package/lib/locales/it.js +110 -19
- package/lib/locales/it.js.map +1 -1
- package/lib/locales/ja.d.ts.map +1 -1
- package/lib/locales/ja.js +110 -19
- package/lib/locales/ja.js.map +1 -1
- package/lib/locales/ko.d.ts.map +1 -1
- package/lib/locales/ko.js +110 -19
- package/lib/locales/ko.js.map +1 -1
- package/lib/locales/nl.d.ts.map +1 -1
- package/lib/locales/nl.js +110 -19
- package/lib/locales/nl.js.map +1 -1
- package/lib/locales/pl.d.ts.map +1 -1
- package/lib/locales/pl.js +110 -19
- package/lib/locales/pl.js.map +1 -1
- package/lib/locales/pt.d.ts.map +1 -1
- package/lib/locales/pt.js +110 -19
- package/lib/locales/pt.js.map +1 -1
- package/lib/locales/ru.d.ts.map +1 -1
- package/lib/locales/ru.js +110 -19
- package/lib/locales/ru.js.map +1 -1
- package/lib/locales/tr.d.ts.map +1 -1
- package/lib/locales/tr.js +110 -19
- package/lib/locales/tr.js.map +1 -1
- package/lib/locales/zh.d.ts.map +1 -1
- package/lib/locales/zh.js +110 -19
- package/lib/locales/zh.js.map +1 -1
- package/lib/logging.d.ts +5 -0
- package/lib/logging.d.ts.map +1 -1
- package/lib/logging.js +13 -1
- package/lib/logging.js.map +1 -1
- package/lib/messageUtils.d.ts +19 -0
- package/lib/messageUtils.d.ts.map +1 -0
- package/lib/messageUtils.js +61 -0
- package/lib/messageUtils.js.map +1 -0
- package/lib/motion.d.ts +21 -0
- package/lib/motion.d.ts.map +1 -0
- package/lib/motion.js +30 -0
- package/lib/motion.js.map +1 -0
- package/lib/optional/index.d.ts +99 -0
- package/lib/optional/index.d.ts.map +1 -0
- package/lib/optional/index.js +284 -0
- package/lib/optional/index.js.map +1 -0
- package/lib/rtl.js +7 -5
- package/lib/rtl.js.map +1 -1
- package/lib/store.d.ts +40 -0
- package/lib/store.d.ts.map +1 -0
- package/lib/store.js +127 -0
- package/lib/store.js.map +1 -0
- package/lib/styles.d.ts +2 -2
- package/lib/styles.d.ts.map +1 -1
- package/lib/styles.js +15 -15
- package/lib/styles.js.map +1 -1
- package/lib/types.js +1 -0
- package/lib/types.js.map +1 -1
- package/lib/utils.d.ts +15 -0
- package/lib/utils.d.ts.map +1 -1
- package/lib/utils.js +199 -94
- package/lib/utils.js.map +1 -1
- package/llms.txt +133 -31
- package/package.json +89 -46
- package/lib/InputToolbar.d.ts +0 -49
- package/lib/InputToolbar.d.ts.map +0 -1
- package/lib/InputToolbar.js +0 -338
- package/lib/InputToolbar.js.map +0 -1
- package/lib/MessageVideo.d.ts.map +0 -1
- package/lib/MessageVideo.js +0 -162
- package/lib/MessageVideo.js.map +0 -1
- package/lib/MessagesContainer/FlashList.d.ts +0 -9
- package/lib/MessagesContainer/FlashList.d.ts.map +0 -1
- package/lib/MessagesContainer/FlashList.js +0 -23
- package/lib/MessagesContainer/FlashList.js.map +0 -1
- package/lib/components/ContextMenu.d.ts +0 -25
- package/lib/components/ContextMenu.d.ts.map +0 -1
- package/lib/components/ContextMenu.js +0 -122
- package/lib/components/ContextMenu.js.map +0 -1
- package/lib/components/VideoNoteRecorder.d.ts.map +0 -1
- package/lib/components/VideoNoteRecorder.js +0 -634
- package/lib/components/VideoNoteRecorder.js.map +0 -1
- package/lib/components/VoiceMessageInput.d.ts +0 -33
- package/lib/components/VoiceMessageInput.d.ts.map +0 -1
- package/lib/components/VoiceMessageInput.js +0 -403
- package/lib/components/VoiceMessageInput.js.map +0 -1
- package/lib/components/WaveformPlayer.d.ts +0 -19
- package/lib/components/WaveformPlayer.d.ts.map +0 -1
- package/lib/components/WaveformPlayer.js +0 -367
- package/lib/components/WaveformPlayer.js.map +0 -1
|
@@ -0,0 +1,157 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import React, { createContext, useContext, useEffect } from 'react';
|
|
3
|
+
import { StyleSheet } from 'react-native';
|
|
4
|
+
import Animated, { Easing, useAnimatedStyle, useSharedValue, withDelay, withTiming } from 'react-native-reanimated';
|
|
5
|
+
import { createKeyedStore, useKeyedValue } from '../store';
|
|
6
|
+
|
|
7
|
+
/**
|
|
8
|
+
* Which message is flashing, the highlight after jumping to a quoted message. Each row reads
|
|
9
|
+
* its own token, so a flash wakes the row it lands on and the one it leaves.
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/** Covers the jump to the message plus the flash itself. */
|
|
13
|
+
const HIGHLIGHT_LIFETIME_MS = 2000;
|
|
14
|
+
export function createMessageHighlightStore() {
|
|
15
|
+
const tokens = createKeyedStore();
|
|
16
|
+
let counter = 0;
|
|
17
|
+
let timer;
|
|
18
|
+
return {
|
|
19
|
+
subscribe: tokens.subscribe,
|
|
20
|
+
getToken: messageId => tokens.get(messageId) ?? 0,
|
|
21
|
+
highlight: messageId => {
|
|
22
|
+
counter += 1;
|
|
23
|
+
tokens.keys().forEach(id => {
|
|
24
|
+
if (id !== messageId) tokens.delete(id);
|
|
25
|
+
});
|
|
26
|
+
tokens.set(messageId, counter);
|
|
27
|
+
// Kept a while, so a row that only mounts once the list has scrolled to it still flashes.
|
|
28
|
+
clearTimeout(timer);
|
|
29
|
+
timer = setTimeout(tokens.clear, HIGHLIGHT_LIFETIME_MS);
|
|
30
|
+
},
|
|
31
|
+
dispose: () => {
|
|
32
|
+
clearTimeout(timer);
|
|
33
|
+
},
|
|
34
|
+
tokens
|
|
35
|
+
};
|
|
36
|
+
}
|
|
37
|
+
export const MessageHighlightContext = createContext(null);
|
|
38
|
+
|
|
39
|
+
/** The flash count for this message (0 when it is not flashing, or outside a `Chat`). */
|
|
40
|
+
export function useMessageHighlightToken(messageId) {
|
|
41
|
+
const store = useContext(MessageHighlightContext);
|
|
42
|
+
return useKeyedValue(store?.tokens, messageId) ?? 0;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
// A jumped-to message stays highlighted for 1000ms, then fades out over 300ms.
|
|
46
|
+
const HIGHLIGHT_HOLD_MS = 1000;
|
|
47
|
+
const HIGHLIGHT_FADE_MS = 300;
|
|
48
|
+
// The selected background is 0x280a90f0: the accent at 0x28 / 0xff.
|
|
49
|
+
const HIGHLIGHT_OPACITY = 0x28 / 0xff;
|
|
50
|
+
|
|
51
|
+
/** Shows at once, holds, then fades out - restarted by every new token. */
|
|
52
|
+
const useHighlightFade = (token, peak) => {
|
|
53
|
+
const $ = _c(7);
|
|
54
|
+
const opacity = useSharedValue(peak);
|
|
55
|
+
let t0;
|
|
56
|
+
if ($[0] !== opacity || $[1] !== peak) {
|
|
57
|
+
t0 = () => {
|
|
58
|
+
opacity.value = peak;
|
|
59
|
+
opacity.value = withDelay(HIGHLIGHT_HOLD_MS, withTiming(0, {
|
|
60
|
+
duration: HIGHLIGHT_FADE_MS,
|
|
61
|
+
easing: Easing.linear
|
|
62
|
+
}));
|
|
63
|
+
};
|
|
64
|
+
$[0] = opacity;
|
|
65
|
+
$[1] = peak;
|
|
66
|
+
$[2] = t0;
|
|
67
|
+
} else {
|
|
68
|
+
t0 = $[2];
|
|
69
|
+
}
|
|
70
|
+
let t1;
|
|
71
|
+
if ($[3] !== opacity || $[4] !== peak || $[5] !== token) {
|
|
72
|
+
t1 = [token, opacity, peak];
|
|
73
|
+
$[3] = opacity;
|
|
74
|
+
$[4] = peak;
|
|
75
|
+
$[5] = token;
|
|
76
|
+
$[6] = t1;
|
|
77
|
+
} else {
|
|
78
|
+
t1 = $[6];
|
|
79
|
+
}
|
|
80
|
+
useEffect(t0, t1);
|
|
81
|
+
return useAnimatedStyle(() => ({
|
|
82
|
+
opacity: opacity.value
|
|
83
|
+
}));
|
|
84
|
+
};
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The band across the whole row behind a highlighted message. It shows at once and
|
|
88
|
+
* fades out. Mounted only while its message is flashing, so the rest of the list carries no
|
|
89
|
+
* shared value for it. `Message` passes `colors.selectionBackground`, which carries its own
|
|
90
|
+
* alpha, at `opacity` 1; the default draws a plain accent at 0x28 alpha.
|
|
91
|
+
*/
|
|
92
|
+
export const HighlightOverlay = t0 => {
|
|
93
|
+
const $ = _c(5);
|
|
94
|
+
const {
|
|
95
|
+
token,
|
|
96
|
+
color,
|
|
97
|
+
opacity: t1
|
|
98
|
+
} = t0;
|
|
99
|
+
const opacity = t1 === undefined ? HIGHLIGHT_OPACITY : t1;
|
|
100
|
+
const style = useHighlightFade(token, opacity);
|
|
101
|
+
let t2;
|
|
102
|
+
if ($[0] !== color) {
|
|
103
|
+
t2 = {
|
|
104
|
+
backgroundColor: color
|
|
105
|
+
};
|
|
106
|
+
$[0] = color;
|
|
107
|
+
$[1] = t2;
|
|
108
|
+
} else {
|
|
109
|
+
t2 = $[1];
|
|
110
|
+
}
|
|
111
|
+
let t3;
|
|
112
|
+
if ($[2] !== style || $[3] !== t2) {
|
|
113
|
+
t3 = <Animated.View testID="message-highlight" pointerEvents="none" style={[StyleSheet.absoluteFill, t2, style]} />;
|
|
114
|
+
$[2] = style;
|
|
115
|
+
$[3] = t2;
|
|
116
|
+
$[4] = t3;
|
|
117
|
+
} else {
|
|
118
|
+
t3 = $[4];
|
|
119
|
+
}
|
|
120
|
+
return t3;
|
|
121
|
+
};
|
|
122
|
+
|
|
123
|
+
/**
|
|
124
|
+
* The bubble's own part of the flash: it swaps to its selected color for as long as
|
|
125
|
+
* the row band shows.
|
|
126
|
+
*/
|
|
127
|
+
export const BubbleHighlightTint = t0 => {
|
|
128
|
+
const $ = _c(6);
|
|
129
|
+
const {
|
|
130
|
+
token,
|
|
131
|
+
color,
|
|
132
|
+
cornerStyle
|
|
133
|
+
} = t0;
|
|
134
|
+
const style = useHighlightFade(token, 1);
|
|
135
|
+
let t1;
|
|
136
|
+
if ($[0] !== color) {
|
|
137
|
+
t1 = {
|
|
138
|
+
backgroundColor: color
|
|
139
|
+
};
|
|
140
|
+
$[0] = color;
|
|
141
|
+
$[1] = t1;
|
|
142
|
+
} else {
|
|
143
|
+
t1 = $[1];
|
|
144
|
+
}
|
|
145
|
+
let t2;
|
|
146
|
+
if ($[2] !== cornerStyle || $[3] !== style || $[4] !== t1) {
|
|
147
|
+
t2 = <Animated.View testID="bubble-highlight" pointerEvents="none" style={[StyleSheet.absoluteFill, t1, cornerStyle, style]} />;
|
|
148
|
+
$[2] = cornerStyle;
|
|
149
|
+
$[3] = style;
|
|
150
|
+
$[4] = t1;
|
|
151
|
+
$[5] = t2;
|
|
152
|
+
} else {
|
|
153
|
+
t2 = $[5];
|
|
154
|
+
}
|
|
155
|
+
return t2;
|
|
156
|
+
};
|
|
157
|
+
//# sourceMappingURL=messageHighlight.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messageHighlight.js","names":["React","createContext","useContext","useEffect","StyleSheet","Animated","Easing","useAnimatedStyle","useSharedValue","withDelay","withTiming","createKeyedStore","useKeyedValue","HIGHLIGHT_LIFETIME_MS","createMessageHighlightStore","tokens","counter","timer","subscribe","getToken","messageId","get","highlight","keys","forEach","id","delete","set","clearTimeout","setTimeout","clear","dispose","MessageHighlightContext","useMessageHighlightToken","store","HIGHLIGHT_HOLD_MS","HIGHLIGHT_FADE_MS","HIGHLIGHT_OPACITY","useHighlightFade","token","peak","$","_c","opacity","t0","value","duration","easing","linear","t1","HighlightOverlay","color","undefined","style","t2","backgroundColor","t3","absoluteFill","BubbleHighlightTint","cornerStyle"],"sources":["../../src/components/messageHighlight.tsx"],"sourcesContent":["import React, { createContext, useContext, useEffect } from 'react'\nimport { StyleProp, StyleSheet, ViewStyle } from 'react-native'\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useSharedValue,\n withDelay,\n withTiming,\n} from 'react-native-reanimated'\n\nimport { createKeyedStore, KeyedStore, useKeyedValue } from '../store'\n\n/**\n * Which message is flashing, the highlight after jumping to a quoted message. Each row reads\n * its own token, so a flash wakes the row it lands on and the one it leaves.\n */\nexport interface MessageHighlightStore {\n subscribe: (listener: () => void) => () => void\n /** The flash count for this message, 0 when it is not flashing. */\n getToken: (messageId: string | number) => number\n highlight: (messageId: string | number) => void\n dispose: () => void\n /** @internal The flash token by message id, read by each row. */\n tokens: KeyedStore<string | number, number>\n}\n\n/** Covers the jump to the message plus the flash itself. */\nconst HIGHLIGHT_LIFETIME_MS = 2000\n\nexport function createMessageHighlightStore (): MessageHighlightStore {\n const tokens = createKeyedStore<string | number, number>()\n let counter = 0\n let timer: ReturnType<typeof setTimeout> | undefined\n\n return {\n subscribe: tokens.subscribe,\n getToken: messageId => tokens.get(messageId) ?? 0,\n highlight: messageId => {\n counter += 1\n tokens.keys().forEach(id => {\n if (id !== messageId)\n tokens.delete(id)\n })\n tokens.set(messageId, counter)\n // Kept a while, so a row that only mounts once the list has scrolled to it still flashes.\n clearTimeout(timer)\n timer = setTimeout(tokens.clear, HIGHLIGHT_LIFETIME_MS)\n },\n dispose: () => {\n clearTimeout(timer)\n },\n tokens,\n }\n}\n\nexport const MessageHighlightContext = createContext<MessageHighlightStore | null>(null)\n\n/** The flash count for this message (0 when it is not flashing, or outside a `Chat`). */\nexport function useMessageHighlightToken (messageId: string | number | undefined): number {\n const store = useContext(MessageHighlightContext)\n return useKeyedValue(store?.tokens, messageId) ?? 0\n}\n\n// A jumped-to message stays highlighted for 1000ms, then fades out over 300ms.\nconst HIGHLIGHT_HOLD_MS = 1000\nconst HIGHLIGHT_FADE_MS = 300\n// The selected background is 0x280a90f0: the accent at 0x28 / 0xff.\nconst HIGHLIGHT_OPACITY = 0x28 / 0xff\n\n/** Shows at once, holds, then fades out - restarted by every new token. */\nconst useHighlightFade = (token: number, peak: number) => {\n const opacity = useSharedValue(peak)\n\n useEffect(() => {\n opacity.value = peak\n opacity.value = withDelay(\n HIGHLIGHT_HOLD_MS,\n withTiming(0, { duration: HIGHLIGHT_FADE_MS, easing: Easing.linear })\n )\n }, [token, opacity, peak])\n\n return useAnimatedStyle(() => ({ opacity: opacity.value }))\n}\n\n/**\n * The band across the whole row behind a highlighted message. It shows at once and\n * fades out. Mounted only while its message is flashing, so the rest of the list carries no\n * shared value for it. `Message` passes `colors.selectionBackground`, which carries its own\n * alpha, at `opacity` 1; the default draws a plain accent at 0x28 alpha.\n */\nexport const HighlightOverlay = ({ token, color, opacity = HIGHLIGHT_OPACITY }: { token: number, color: string, opacity?: number }) => {\n const style = useHighlightFade(token, opacity)\n\n return (\n <Animated.View\n testID='message-highlight'\n pointerEvents='none'\n style={[StyleSheet.absoluteFill, { backgroundColor: color }, style]}\n />\n )\n}\n\n/**\n * The bubble's own part of the flash: it swaps to its selected color for as long as\n * the row band shows.\n */\nexport const BubbleHighlightTint = ({ token, color, cornerStyle }: { token: number, color: string, cornerStyle: StyleProp<ViewStyle> }) => {\n const style = useHighlightFade(token, 1)\n\n return (\n <Animated.View\n testID='bubble-highlight'\n pointerEvents='none'\n style={[StyleSheet.absoluteFill, { backgroundColor: color }, cornerStyle, style]}\n />\n )\n}\n"],"mappings":";AAAA,OAAOA,KAAK,IAAIC,aAAa,EAAEC,UAAU,EAAEC,SAAS,QAAQ,OAAO;AACnE,SAAoBC,UAAU,QAAmB,cAAc;AAC/D,OAAOC,QAAQ,IACbC,MAAM,EACNC,gBAAgB,EAChBC,cAAc,EACdC,SAAS,EACTC,UAAU,QACL,yBAAyB;AAEhC,SAASC,gBAAgB,EAAcC,aAAa,QAAQ,UAAU;;AAEtE;AACA;A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A,kBACS,MAAkB,CAAlB,kBAAkB,CACX,aAAM,CAAN,MAAM,CACb,KAAyE,CAAzE,EAAClD,UAAU,CAAAqD,YAAa,EAAER,EAA0B,EAAEU,WAAW,EAAEN,KAAK,EAAC,GAChF;IAAAZ,CAAA,MAAAkB,WAAA;IAAAlB,CAAA,MAAAY,KAAA;IAAAZ,CAAA,MAAAQ,EAAA;IAAAR,CAAA,MAAAa,EAAA;EAAA;IAAAA,EAAA,GAAAb,CAAA;EAAA;EAAA,OAJFa,EAIE;AAAA,CAEL","ignoreList":[]}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
export declare const PRESS_HOLD_MS = 400;
|
|
2
|
+
/**
|
|
3
|
+
* Spread onto a tappable inside a bubble (photo, location card, play button...).
|
|
4
|
+
* Holding it as long as the message long-press takes counts as a long-press, so
|
|
5
|
+
* letting go no longer fires its `onPress`: a long-press opens the menu, and
|
|
6
|
+
* never also opens the photo viewer or starts playback on release.
|
|
7
|
+
* `Pressable` and gesture-handler's `BaseButton` both skip `onPress` once their
|
|
8
|
+
* own `onLongPress` has fired.
|
|
9
|
+
*/
|
|
10
|
+
export declare const suppressPressAfterHold: {
|
|
11
|
+
readonly onLongPress: () => void;
|
|
12
|
+
readonly delayLongPress: 400;
|
|
13
|
+
};
|
|
14
|
+
//# sourceMappingURL=messagePress.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messagePress.d.ts","sourceRoot":"","sources":["../../src/components/messagePress.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,aAAa,MAAM,CAAA;AAIhC;;;;;;;GAOG;AACH,eAAO,MAAM,sBAAsB;;;CAGzB,CAAA"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
// The long-press fires after the system long-press timeout (400ms), with no
|
|
2
|
+
// shrink or lift on the way - the message stays where it is and the menu opens beside the finger.
|
|
3
|
+
export const PRESS_HOLD_MS = 400;
|
|
4
|
+
const noop = () => {};
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Spread onto a tappable inside a bubble (photo, location card, play button...).
|
|
8
|
+
* Holding it as long as the message long-press takes counts as a long-press, so
|
|
9
|
+
* letting go no longer fires its `onPress`: a long-press opens the menu, and
|
|
10
|
+
* never also opens the photo viewer or starts playback on release.
|
|
11
|
+
* `Pressable` and gesture-handler's `BaseButton` both skip `onPress` once their
|
|
12
|
+
* own `onLongPress` has fired.
|
|
13
|
+
*/
|
|
14
|
+
export const suppressPressAfterHold = {
|
|
15
|
+
onLongPress: noop,
|
|
16
|
+
delayLongPress: PRESS_HOLD_MS
|
|
17
|
+
};
|
|
18
|
+
//# sourceMappingURL=messagePress.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messagePress.js","names":["PRESS_HOLD_MS","noop","suppressPressAfterHold","onLongPress","delayLongPress"],"sources":["../../src/components/messagePress.ts"],"sourcesContent":["// The long-press fires after the system long-press timeout (400ms), with no\n// shrink or lift on the way - the message stays where it is and the menu opens beside the finger.\nexport const PRESS_HOLD_MS = 400\n\nconst noop = () => {}\n\n/**\n * Spread onto a tappable inside a bubble (photo, location card, play button...).\n * Holding it as long as the message long-press takes counts as a long-press, so\n * letting go no longer fires its `onPress`: a long-press opens the menu, and\n * never also opens the photo viewer or starts playback on release.\n * `Pressable` and gesture-handler's `BaseButton` both skip `onPress` once their\n * own `onLongPress` has fired.\n */\nexport const suppressPressAfterHold = {\n onLongPress: noop,\n delayLongPress: PRESS_HOLD_MS,\n} as const\n"],"mappings":"AAAA;AACA;AACA,OAAO,MAAMA,aAAa,GAAG,GAAG;AAEhC,MAAMC,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;;AAErB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,sBAAsB,GAAG;EACpCC,WAAW,EAAEF,IAAI;EACjBG,cAAc,EAAEJ;AAClB,CAAU","ignoreList":[]}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { KeyedStore } from '../store';
|
|
2
|
+
/**
|
|
3
|
+
* Multi-select mode: which messages are checked. A row reads the mode flag and its own checked
|
|
4
|
+
* state, so checking a message wakes that row alone, and entering or leaving the mode
|
|
5
|
+
* re-renders each row once.
|
|
6
|
+
*/
|
|
7
|
+
export interface MessageSelectionStore {
|
|
8
|
+
subscribe: (listener: () => void) => () => void;
|
|
9
|
+
isActive: () => boolean;
|
|
10
|
+
isSelected: (messageId: string | number) => boolean;
|
|
11
|
+
/** The checked ids, in the order they were checked. */
|
|
12
|
+
getSelectedIds: () => (string | number)[];
|
|
13
|
+
/** Enters the mode with this message checked. */
|
|
14
|
+
start: (messageId: string | number) => void;
|
|
15
|
+
/** Checks or unchecks a message; unchecking the last one leaves the mode. */
|
|
16
|
+
toggle: (messageId: string | number) => void;
|
|
17
|
+
/** Drops ids that are no longer in the chat (deleted messages). */
|
|
18
|
+
retain: (messageIds: Set<string | number>) => void;
|
|
19
|
+
clear: () => void;
|
|
20
|
+
/** @internal Per-message checked flags, read by each row. */
|
|
21
|
+
checked: KeyedStore<string | number, true>;
|
|
22
|
+
}
|
|
23
|
+
export declare function createMessageSelectionStore(): MessageSelectionStore;
|
|
24
|
+
export declare const MessageSelectionContext: import("react").Context<MessageSelectionStore | null>;
|
|
25
|
+
export interface MessageSelectionState {
|
|
26
|
+
isActive: boolean;
|
|
27
|
+
isSelected: boolean;
|
|
28
|
+
toggle: () => void;
|
|
29
|
+
}
|
|
30
|
+
/** Whether the chat is selecting messages and whether this one is checked. */
|
|
31
|
+
export declare function useMessageSelection(messageId: string | number | undefined): MessageSelectionState;
|
|
32
|
+
/** Whether the chat is selecting messages; re-renders only when that flips. */
|
|
33
|
+
export declare function useIsSelectionActive(store: MessageSelectionStore | null): boolean;
|
|
34
|
+
/**
|
|
35
|
+
* The checked ids; re-renders on every change. The store swaps in a new array on each change,
|
|
36
|
+
* so the array itself is the snapshot (a compiler that memoizes on inputs sees it change).
|
|
37
|
+
*/
|
|
38
|
+
export declare function useSelectedIds(store: MessageSelectionStore | null): (string | number)[];
|
|
39
|
+
//# sourceMappingURL=messageSelection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messageSelection.d.ts","sourceRoot":"","sources":["../../src/components/messageSelection.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiC,UAAU,EAAiB,MAAM,UAAU,CAAA;AAEnF;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,SAAS,EAAE,CAAC,QAAQ,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAA;IAC/C,QAAQ,EAAE,MAAM,OAAO,CAAA;IACvB,UAAU,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,KAAK,OAAO,CAAA;IACnD,uDAAuD;IACvD,cAAc,EAAE,MAAM,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAAA;IACzC,iDAAiD;IACjD,KAAK,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAA;IAC3C,6EAA6E;IAC7E,MAAM,EAAE,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,KAAK,IAAI,CAAA;IAC5C,mEAAmE;IACnE,MAAM,EAAE,CAAC,UAAU,EAAE,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,KAAK,IAAI,CAAA;IAClD,KAAK,EAAE,MAAM,IAAI,CAAA;IACjB,6DAA6D;IAC7D,OAAO,EAAE,UAAU,CAAC,MAAM,GAAG,MAAM,EAAE,IAAI,CAAC,CAAA;CAC3C;AASD,wBAAgB,2BAA2B,IAAK,qBAAqB,CAsCpE;AAED,eAAO,MAAM,uBAAuB,uDAAoD,CAAA;AAIxF,MAAM,WAAW,qBAAqB;IACpC,QAAQ,EAAE,OAAO,CAAA;IACjB,UAAU,EAAE,OAAO,CAAA;IACnB,MAAM,EAAE,MAAM,IAAI,CAAA;CACnB;AAED,8EAA8E;AAC9E,wBAAgB,mBAAmB,CAAE,SAAS,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,qBAAqB,CAUlG;AAED,+EAA+E;AAC/E,wBAAgB,oBAAoB,CAAE,KAAK,EAAE,qBAAqB,GAAG,IAAI,GAAG,OAAO,CAMlF;AAID;;;GAGG;AACH,wBAAgB,cAAc,CAAE,KAAK,EAAE,qBAAqB,GAAG,IAAI,GAAG,CAAC,MAAM,GAAG,MAAM,CAAC,EAAE,CAMxF"}
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { createContext, useCallback, useContext, useSyncExternalStore } from 'react';
|
|
3
|
+
import { createKeyedStore, createStore, useKeyedValue } from '../store';
|
|
4
|
+
|
|
5
|
+
/**
|
|
6
|
+
* Multi-select mode: which messages are checked. A row reads the mode flag and its own checked
|
|
7
|
+
* state, so checking a message wakes that row alone, and entering or leaving the mode
|
|
8
|
+
* re-renders each row once.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
const IDLE = {
|
|
12
|
+
active: false,
|
|
13
|
+
ids: []
|
|
14
|
+
};
|
|
15
|
+
export function createMessageSelectionStore() {
|
|
16
|
+
const state = createStore(IDLE);
|
|
17
|
+
const checked = createKeyedStore();
|
|
18
|
+
|
|
19
|
+
// The per-message flags change before the mode flag, so a row woken by either sees both new.
|
|
20
|
+
const apply = ids => {
|
|
21
|
+
const next = new Set(ids);
|
|
22
|
+
checked.keys().forEach(id => {
|
|
23
|
+
if (!next.has(id)) checked.delete(id);
|
|
24
|
+
});
|
|
25
|
+
ids.forEach(id => checked.set(id, true));
|
|
26
|
+
state.set(ids.length ? {
|
|
27
|
+
active: true,
|
|
28
|
+
ids
|
|
29
|
+
} : IDLE);
|
|
30
|
+
};
|
|
31
|
+
return {
|
|
32
|
+
subscribe: state.subscribe,
|
|
33
|
+
isActive: () => state.get().active,
|
|
34
|
+
isSelected: messageId => checked.has(messageId),
|
|
35
|
+
getSelectedIds: () => state.get().ids,
|
|
36
|
+
start: messageId => apply([messageId]),
|
|
37
|
+
toggle: messageId => {
|
|
38
|
+
const {
|
|
39
|
+
active,
|
|
40
|
+
ids
|
|
41
|
+
} = state.get();
|
|
42
|
+
if (!active) return;
|
|
43
|
+
apply(ids.includes(messageId) ? ids.filter(id => id !== messageId) : [...ids, messageId]);
|
|
44
|
+
},
|
|
45
|
+
retain: messageIds => {
|
|
46
|
+
const {
|
|
47
|
+
active,
|
|
48
|
+
ids
|
|
49
|
+
} = state.get();
|
|
50
|
+
if (!active) return;
|
|
51
|
+
const next = ids.filter(id => messageIds.has(id));
|
|
52
|
+
if (next.length !== ids.length) apply(next);
|
|
53
|
+
},
|
|
54
|
+
clear: () => apply([]),
|
|
55
|
+
checked
|
|
56
|
+
};
|
|
57
|
+
}
|
|
58
|
+
export const MessageSelectionContext = createContext(null);
|
|
59
|
+
const noopSubscribe = () => () => {};
|
|
60
|
+
/** Whether the chat is selecting messages and whether this one is checked. */
|
|
61
|
+
export function useMessageSelection(messageId) {
|
|
62
|
+
const $ = _c(7);
|
|
63
|
+
const store = useContext(MessageSelectionContext);
|
|
64
|
+
const isActive = useIsSelectionActive(store);
|
|
65
|
+
const isChecked = useKeyedValue(store?.checked, messageId) === true;
|
|
66
|
+
let t0;
|
|
67
|
+
if ($[0] !== messageId || $[1] !== store) {
|
|
68
|
+
t0 = () => {
|
|
69
|
+
if (store && messageId != null) {
|
|
70
|
+
store.toggle(messageId);
|
|
71
|
+
}
|
|
72
|
+
};
|
|
73
|
+
$[0] = messageId;
|
|
74
|
+
$[1] = store;
|
|
75
|
+
$[2] = t0;
|
|
76
|
+
} else {
|
|
77
|
+
t0 = $[2];
|
|
78
|
+
}
|
|
79
|
+
const toggle = t0;
|
|
80
|
+
const t1 = isActive && isChecked;
|
|
81
|
+
let t2;
|
|
82
|
+
if ($[3] !== isActive || $[4] !== t1 || $[5] !== toggle) {
|
|
83
|
+
t2 = {
|
|
84
|
+
isActive,
|
|
85
|
+
isSelected: t1,
|
|
86
|
+
toggle
|
|
87
|
+
};
|
|
88
|
+
$[3] = isActive;
|
|
89
|
+
$[4] = t1;
|
|
90
|
+
$[5] = toggle;
|
|
91
|
+
$[6] = t2;
|
|
92
|
+
} else {
|
|
93
|
+
t2 = $[6];
|
|
94
|
+
}
|
|
95
|
+
return t2;
|
|
96
|
+
}
|
|
97
|
+
|
|
98
|
+
/** Whether the chat is selecting messages; re-renders only when that flips. */
|
|
99
|
+
export function useIsSelectionActive(store) {
|
|
100
|
+
const $ = _c(2);
|
|
101
|
+
let t0;
|
|
102
|
+
if ($[0] !== store) {
|
|
103
|
+
t0 = () => !!store?.isActive();
|
|
104
|
+
$[0] = store;
|
|
105
|
+
$[1] = t0;
|
|
106
|
+
} else {
|
|
107
|
+
t0 = $[1];
|
|
108
|
+
}
|
|
109
|
+
return useSyncExternalStore(store?.subscribe ?? noopSubscribe, t0, _temp);
|
|
110
|
+
}
|
|
111
|
+
function _temp() {
|
|
112
|
+
return false;
|
|
113
|
+
}
|
|
114
|
+
const NO_IDS = [];
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* The checked ids; re-renders on every change. The store swaps in a new array on each change,
|
|
118
|
+
* so the array itself is the snapshot (a compiler that memoizes on inputs sees it change).
|
|
119
|
+
*/
|
|
120
|
+
export function useSelectedIds(store) {
|
|
121
|
+
const $ = _c(2);
|
|
122
|
+
let t0;
|
|
123
|
+
if ($[0] !== store) {
|
|
124
|
+
t0 = () => store?.getSelectedIds() ?? NO_IDS;
|
|
125
|
+
$[0] = store;
|
|
126
|
+
$[1] = t0;
|
|
127
|
+
} else {
|
|
128
|
+
t0 = $[1];
|
|
129
|
+
}
|
|
130
|
+
return useSyncExternalStore(store?.subscribe ?? noopSubscribe, t0, _temp2);
|
|
131
|
+
}
|
|
132
|
+
function _temp2() {
|
|
133
|
+
return NO_IDS;
|
|
134
|
+
}
|
|
135
|
+
//# sourceMappingURL=messageSelection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"messageSelection.js","names":["createContext","useCallback","useContext","useSyncExternalStore","createKeyedStore","createStore","useKeyedValue","IDLE","active","ids","createMessageSelectionStore","state","checked","apply","next","Set","keys","forEach","id","has","delete","set","length","subscribe","isActive","get","isSelected","messageId","getSelectedIds","start","toggle","includes","filter","retain","messageIds","clear","MessageSelectionContext","noopSubscribe","useMessageSelection","$","_c","store","useIsSelectionActive","isChecked","t0","t1","t2","_temp","NO_IDS","useSelectedIds","_temp2"],"sources":["../../src/components/messageSelection.tsx"],"sourcesContent":["import { createContext, useCallback, useContext, useSyncExternalStore } from 'react'\n\nimport { createKeyedStore, createStore, KeyedStore, useKeyedValue } from '../store'\n\n/**\n * Multi-select mode: which messages are checked. A row reads the mode flag and its own checked\n * state, so checking a message wakes that row alone, and entering or leaving the mode\n * re-renders each row once.\n */\nexport interface MessageSelectionStore {\n subscribe: (listener: () => void) => () => void\n isActive: () => boolean\n isSelected: (messageId: string | number) => boolean\n /** The checked ids, in the order they were checked. */\n getSelectedIds: () => (string | number)[]\n /** Enters the mode with this message checked. */\n start: (messageId: string | number) => void\n /** Checks or unchecks a message; unchecking the last one leaves the mode. */\n toggle: (messageId: string | number) => void\n /** Drops ids that are no longer in the chat (deleted messages). */\n retain: (messageIds: Set<string | number>) => void\n clear: () => void\n /** @internal Per-message checked flags, read by each row. */\n checked: KeyedStore<string | number, true>\n}\n\ninterface SelectionState {\n active: boolean\n ids: (string | number)[]\n}\n\nconst IDLE: SelectionState = { active: false, ids: [] }\n\nexport function createMessageSelectionStore (): MessageSelectionStore {\n const state = createStore<SelectionState>(IDLE)\n const checked = createKeyedStore<string | number, true>()\n\n // The per-message flags change before the mode flag, so a row woken by either sees both new.\n const apply = (ids: (string | number)[]) => {\n const next = new Set(ids)\n checked.keys().forEach(id => {\n if (!next.has(id))\n checked.delete(id)\n })\n ids.forEach(id => checked.set(id, true))\n state.set(ids.length ? { active: true, ids } : IDLE)\n }\n\n return {\n subscribe: state.subscribe,\n isActive: () => state.get().active,\n isSelected: messageId => checked.has(messageId),\n getSelectedIds: () => state.get().ids,\n start: messageId => apply([messageId]),\n toggle: messageId => {\n const { active, ids } = state.get()\n if (!active)\n return\n apply(ids.includes(messageId) ? ids.filter(id => id !== messageId) : [...ids, messageId])\n },\n retain: messageIds => {\n const { active, ids } = state.get()\n if (!active)\n return\n const next = ids.filter(id => messageIds.has(id))\n if (next.length !== ids.length)\n apply(next)\n },\n clear: () => apply([]),\n checked,\n }\n}\n\nexport const MessageSelectionContext = createContext<MessageSelectionStore | null>(null)\n\nconst noopSubscribe = () => () => {}\n\nexport interface MessageSelectionState {\n isActive: boolean\n isSelected: boolean\n toggle: () => void\n}\n\n/** Whether the chat is selecting messages and whether this one is checked. */\nexport function useMessageSelection (messageId: string | number | undefined): MessageSelectionState {\n const store = useContext(MessageSelectionContext)\n const isActive = useIsSelectionActive(store)\n const isChecked = useKeyedValue(store?.checked, messageId) === true\n const toggle = useCallback(() => {\n if (store && messageId != null)\n store.toggle(messageId)\n }, [store, messageId])\n\n return { isActive, isSelected: isActive && isChecked, toggle }\n}\n\n/** Whether the chat is selecting messages; re-renders only when that flips. */\nexport function useIsSelectionActive (store: MessageSelectionStore | null): boolean {\n return useSyncExternalStore(\n store?.subscribe ?? noopSubscribe,\n () => !!store?.isActive(),\n () => false\n )\n}\n\nconst NO_IDS: (string | number)[] = []\n\n/**\n * The checked ids; re-renders on every change. The store swaps in a new array on each change,\n * so the array itself is the snapshot (a compiler that memoizes on inputs sees it change).\n */\nexport function useSelectedIds (store: MessageSelectionStore | null): (string | number)[] {\n return useSyncExternalStore(\n store?.subscribe ?? noopSubscribe,\n () => store?.getSelectedIds() ?? NO_IDS,\n () => NO_IDS\n )\n}\n"],"mappings":";AAAA,SAASA,aAAa,EAAEC,WAAW,EAAEC,UAAU,EAAEC,oBAAoB,QAAQ,OAAO;AAEpF,SAASC,gBAAgB,EAAEC,WAAW,EAAcC,aAAa,QAAQ,UAAU;;AAEnF;AACA;AACA;AACA;AACA;;AAuBA,MAAMC,IAAoB,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AAkB,CAAS,CAAC,IAAjCoB,MAAiC;IAAAT,CAAA,MAAAE,KAAA;IAAAF,CAAA,MAAAK,EAAA;EAAA;IAAAA,EAAA,GAAAL,CAAA;EAAA;EAAA,OAFlCpC,oBAAoB,CACzBsC,KAAK,EAAAlB,SAA4B,IAAjCc,aAAiC,EACjCO,EAAuC,EACvCM,MACF,CAAC;AAAA;AALI,SAAAA,OAAA;EAAA,OAIGF,MAAM;AAAA","ignoreList":[]}
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Recording uses a single light keyboard-tap haptic
|
|
3
|
+
* (record start and stop, lock, the tap that switches voice / video, video
|
|
4
|
+
* start and resume).
|
|
5
|
+
*/
|
|
6
|
+
export declare const recordingHaptic: () => void;
|
|
7
|
+
export declare const shouldShowLockHint: () => boolean;
|
|
8
|
+
export declare const countLockHint: () => void;
|
|
9
|
+
export declare const retireLockHint: () => void;
|
|
10
|
+
export declare const shouldShowPauseHint: () => boolean;
|
|
11
|
+
export declare const countPauseHint: () => void;
|
|
12
|
+
export declare const retirePauseHint: () => void;
|
|
13
|
+
export declare const shouldConfirmTrimOnResume: () => boolean;
|
|
14
|
+
export declare const confirmTrimOnResume: () => void;
|
|
15
|
+
export declare const getLastRecordMode: () => "video" | "voice";
|
|
16
|
+
export declare const setLastRecordMode: (mode: "voice" | "video") => void;
|
|
17
|
+
/**
|
|
18
|
+
* `m:ss,t` with tenths, the recording timer - the moving decimal is what
|
|
19
|
+
* tells you the recorder is live.
|
|
20
|
+
*/
|
|
21
|
+
export declare const formatRecordingTime: (ms: number) => string;
|
|
22
|
+
//# sourceMappingURL=recordingFeedback.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordingFeedback.d.ts","sourceRoot":"","sources":["../../src/components/recordingFeedback.ts"],"names":[],"mappings":"AAQA;;;;GAIG;AACH,eAAO,MAAM,eAAe,YAA8B,CAAA;AAU1D,eAAO,MAAM,kBAAkB,eAAwC,CAAA;AAEvE,eAAO,MAAM,aAAa,YAEzB,CAAA;AAED,eAAO,MAAM,cAAc,YAE1B,CAAA;AASD,eAAO,MAAM,mBAAmB,eAA0C,CAAA;AAE1E,eAAO,MAAM,cAAc,YAE1B,CAAA;AAED,eAAO,MAAM,eAAe,YAE3B,CAAA;AAQD,eAAO,MAAM,yBAAyB,eAAiC,CAAA;AAEvE,eAAO,MAAM,mBAAmB,YAE/B,CAAA;AASD,eAAO,MAAM,iBAAiB,yBAAuB,CAAA;AAErD,eAAO,MAAM,iBAAiB,GAAI,MAAM,OAAO,GAAG,OAAO,SAExD,CAAA;AAED;;;GAGG;AACH,eAAO,MAAM,mBAAmB,GAAI,IAAI,MAAM,WAS7C,CAAA"}
|
|
@@ -0,0 +1,80 @@
|
|
|
1
|
+
/*
|
|
2
|
+
* Small pieces of recording behavior that live outside any one
|
|
3
|
+
* component: the haptic tick, the per-session hint counters and the
|
|
4
|
+
* remembered voice / video choice.
|
|
5
|
+
*/
|
|
6
|
+
|
|
7
|
+
import { impactHaptic } from './haptics';
|
|
8
|
+
|
|
9
|
+
/**
|
|
10
|
+
* Recording uses a single light keyboard-tap haptic
|
|
11
|
+
* (record start and stop, lock, the tap that switches voice / video, video
|
|
12
|
+
* start and resume).
|
|
13
|
+
*/
|
|
14
|
+
export const recordingHaptic = () => impactHaptic('Light');
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* "Slide up to lock" shows for the first three takes and never again
|
|
18
|
+
* once the user has locked one. The
|
|
19
|
+
* library has no storage of its own, so the count lasts for the app session.
|
|
20
|
+
*/
|
|
21
|
+
const LOCK_HINT_LIMIT = 3;
|
|
22
|
+
let lockHintCount = 0;
|
|
23
|
+
export const shouldShowLockHint = () => lockHintCount < LOCK_HINT_LIMIT;
|
|
24
|
+
export const countLockHint = () => {
|
|
25
|
+
lockHintCount++;
|
|
26
|
+
};
|
|
27
|
+
export const retireLockHint = () => {
|
|
28
|
+
lockHintCount = LOCK_HINT_LIMIT;
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
/**
|
|
32
|
+
* "Pause to trim or replay" by the pause button of a locked voice take, for
|
|
33
|
+
* the first few locks (`showPauseHint`, `voicepausehint`); a pause retires it.
|
|
34
|
+
*/
|
|
35
|
+
const PAUSE_HINT_LIMIT = 3;
|
|
36
|
+
let pauseHintCount = 0;
|
|
37
|
+
export const shouldShowPauseHint = () => pauseHintCount < PAUSE_HINT_LIMIT;
|
|
38
|
+
export const countPauseHint = () => {
|
|
39
|
+
pauseHintCount++;
|
|
40
|
+
};
|
|
41
|
+
export const retirePauseHint = () => {
|
|
42
|
+
pauseHintCount = PAUSE_HINT_LIMIT;
|
|
43
|
+
};
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Resuming a trimmed take throws the cut audio away, so ask first,
|
|
47
|
+
* once.
|
|
48
|
+
*/
|
|
49
|
+
let isTrimOnResumeConfirmed = false;
|
|
50
|
+
export const shouldConfirmTrimOnResume = () => !isTrimOnResumeConfirmed;
|
|
51
|
+
export const confirmTrimOnResume = () => {
|
|
52
|
+
isTrimOnResumeConfirmed = true;
|
|
53
|
+
};
|
|
54
|
+
|
|
55
|
+
/**
|
|
56
|
+
* The voice / video choice of the shared record button, voice by default. It
|
|
57
|
+
* lasts for
|
|
58
|
+
* the app session, so every chat opens on the mode used last.
|
|
59
|
+
*/
|
|
60
|
+
let lastRecordMode = 'voice';
|
|
61
|
+
export const getLastRecordMode = () => lastRecordMode;
|
|
62
|
+
export const setLastRecordMode = mode => {
|
|
63
|
+
lastRecordMode = mode;
|
|
64
|
+
};
|
|
65
|
+
|
|
66
|
+
/**
|
|
67
|
+
* `m:ss,t` with tenths, the recording timer - the moving decimal is what
|
|
68
|
+
* tells you the recorder is live.
|
|
69
|
+
*/
|
|
70
|
+
export const formatRecordingTime = ms => {
|
|
71
|
+
const tenthsTotal = Math.max(0, Math.floor(ms / 100));
|
|
72
|
+
const tenths = tenthsTotal % 10;
|
|
73
|
+
const totalSeconds = Math.floor(tenthsTotal / 10);
|
|
74
|
+
const secs = totalSeconds % 60;
|
|
75
|
+
const mins = Math.floor(totalSeconds / 60) % 60;
|
|
76
|
+
const hours = Math.floor(totalSeconds / 3600);
|
|
77
|
+
const mm = hours > 0 ? mins.toString().padStart(2, '0') : String(mins);
|
|
78
|
+
return `${hours > 0 ? `${hours}:` : ''}${mm}:${secs.toString().padStart(2, '0')},${tenths}`;
|
|
79
|
+
};
|
|
80
|
+
//# sourceMappingURL=recordingFeedback.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordingFeedback.js","names":["impactHaptic","recordingHaptic","LOCK_HINT_LIMIT","lockHintCount","shouldShowLockHint","countLockHint","retireLockHint","PAUSE_HINT_LIMIT","pauseHintCount","shouldShowPauseHint","countPauseHint","retirePauseHint","isTrimOnResumeConfirmed","shouldConfirmTrimOnResume","confirmTrimOnResume","lastRecordMode","getLastRecordMode","setLastRecordMode","mode","formatRecordingTime","ms","tenthsTotal","Math","max","floor","tenths","totalSeconds","secs","mins","hours","mm","toString","padStart","String"],"sources":["../../src/components/recordingFeedback.ts"],"sourcesContent":["/*\n * Small pieces of recording behavior that live outside any one\n * component: the haptic tick, the per-session hint counters and the\n * remembered voice / video choice.\n */\n\nimport { impactHaptic } from './haptics'\n\n/**\n * Recording uses a single light keyboard-tap haptic\n * (record start and stop, lock, the tap that switches voice / video, video\n * start and resume).\n */\nexport const recordingHaptic = () => impactHaptic('Light')\n\n/**\n * \"Slide up to lock\" shows for the first three takes and never again\n * once the user has locked one. The\n * library has no storage of its own, so the count lasts for the app session.\n */\nconst LOCK_HINT_LIMIT = 3\nlet lockHintCount = 0\n\nexport const shouldShowLockHint = () => lockHintCount < LOCK_HINT_LIMIT\n\nexport const countLockHint = () => {\n lockHintCount++\n}\n\nexport const retireLockHint = () => {\n lockHintCount = LOCK_HINT_LIMIT\n}\n\n/**\n * \"Pause to trim or replay\" by the pause button of a locked voice take, for\n * the first few locks (`showPauseHint`, `voicepausehint`); a pause retires it.\n */\nconst PAUSE_HINT_LIMIT = 3\nlet pauseHintCount = 0\n\nexport const shouldShowPauseHint = () => pauseHintCount < PAUSE_HINT_LIMIT\n\nexport const countPauseHint = () => {\n pauseHintCount++\n}\n\nexport const retirePauseHint = () => {\n pauseHintCount = PAUSE_HINT_LIMIT\n}\n\n/**\n * Resuming a trimmed take throws the cut audio away, so ask first,\n * once.\n */\nlet isTrimOnResumeConfirmed = false\n\nexport const shouldConfirmTrimOnResume = () => !isTrimOnResumeConfirmed\n\nexport const confirmTrimOnResume = () => {\n isTrimOnResumeConfirmed = true\n}\n\n/**\n * The voice / video choice of the shared record button, voice by default. It\n * lasts for\n * the app session, so every chat opens on the mode used last.\n */\nlet lastRecordMode: 'voice' | 'video' = 'voice'\n\nexport const getLastRecordMode = () => lastRecordMode\n\nexport const setLastRecordMode = (mode: 'voice' | 'video') => {\n lastRecordMode = mode\n}\n\n/**\n * `m:ss,t` with tenths, the recording timer - the moving decimal is what\n * tells you the recorder is live.\n */\nexport const formatRecordingTime = (ms: number) => {\n const tenthsTotal = Math.max(0, Math.floor(ms / 100))\n const tenths = tenthsTotal % 10\n const totalSeconds = Math.floor(tenthsTotal / 10)\n const secs = totalSeconds % 60\n const mins = Math.floor(totalSeconds / 60) % 60\n const hours = Math.floor(totalSeconds / 3600)\n const mm = hours > 0 ? mins.toString().padStart(2, '0') : String(mins)\n return `${hours > 0 ? `${hours}:` : ''}${mm}:${secs.toString().padStart(2, '0')},${tenths}`\n}\n"],"mappings":"AAAA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,WAAW;;AAExC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAGA,CAAA,KAAMD,YAAY,CAAC,OAAO,CAAC;;AAE1D;AACA;AACA;AACA;AACA;AACA,MAAME,eAAe,GAAG,CAAC;AACzB,IAAIC,aAAa,GAAG,CAAC;AAErB,OAAO,MAAMC,kBAAkB,GAAGA,CAAA,KAAMD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AAY,GAAG,EAAE;EAC9B,MAAME,IAAI,GAAGN,IAAI,CAACE,KAAK,CAACE,YAAY,GAAG,EAAE,CAAC,GAAG,EAAE;EAC/C,MAAMG,KAAK,GAAGP,IAAI,CAACE,KAAK,CAACE,YAAY,GAAG,IAAI,CAAC;EAC7C,MAAMI,EAAE,GAAGD,KAAK,GAAG,CAAC,GAAGD,IAAI,CAACG,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,GAAGC,MAAM,CAACL,IAAI,CAAC;EACtE,OAAO,GAAGC,KAAK,GAAG,CAAC,GAAG,GAAGA,KAAK,GAAG,GAAG,EAAE,GAAGC,EAAE,IAAIH,IAAI,CAACI,QAAQ,CAAC,CAAC,CAACC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,IAAIP,MAAM,EAAE;AAC7F,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { Store } from '../store';
|
|
2
|
+
/**
|
|
3
|
+
* A take's running time and loudness, which tick ten times a second while recording. They live
|
|
4
|
+
* in stores rather than in component state so that a tick re-renders only the timer that shows
|
|
5
|
+
* it (and moves the record button's halo without a render), not the composer around them.
|
|
6
|
+
*
|
|
7
|
+
* `elapsed` keeps the last take's time after it ends, so the bar that lingers after a cancel
|
|
8
|
+
* still shows when the take stopped; a new take resets it.
|
|
9
|
+
*/
|
|
10
|
+
export interface RecordingMeter {
|
|
11
|
+
elapsed: Store<number>;
|
|
12
|
+
/** The latest metering level, 0..1. */
|
|
13
|
+
level: Store<number>;
|
|
14
|
+
}
|
|
15
|
+
export declare const createRecordingMeter: () => RecordingMeter;
|
|
16
|
+
/** The composer's meter; a recorder outside a composer keeps its own. */
|
|
17
|
+
export declare const RecordingMeterContext: import("react").Context<RecordingMeter | null>;
|
|
18
|
+
export declare const sameNumber: (value: number) => number;
|
|
19
|
+
//# sourceMappingURL=recordingMeter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordingMeter.d.ts","sourceRoot":"","sources":["../../src/components/recordingMeter.ts"],"names":[],"mappings":"AAEA,OAAO,EAAe,KAAK,EAAE,MAAM,UAAU,CAAA;AAE7C;;;;;;;GAOG;AACH,MAAM,WAAW,cAAc;IAC7B,OAAO,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;IACtB,uCAAuC;IACvC,KAAK,EAAE,KAAK,CAAC,MAAM,CAAC,CAAA;CACrB;AAED,eAAO,MAAM,oBAAoB,QAAO,cAGtC,CAAA;AAEF,yEAAyE;AACzE,eAAO,MAAM,qBAAqB,gDAA6C,CAAA;AAE/E,eAAO,MAAM,UAAU,GAAI,OAAO,MAAM,WAAU,CAAA"}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import { createContext } from 'react';
|
|
2
|
+
import { createStore } from '../store';
|
|
3
|
+
|
|
4
|
+
/**
|
|
5
|
+
* A take's running time and loudness, which tick ten times a second while recording. They live
|
|
6
|
+
* in stores rather than in component state so that a tick re-renders only the timer that shows
|
|
7
|
+
* it (and moves the record button's halo without a render), not the composer around them.
|
|
8
|
+
*
|
|
9
|
+
* `elapsed` keeps the last take's time after it ends, so the bar that lingers after a cancel
|
|
10
|
+
* still shows when the take stopped; a new take resets it.
|
|
11
|
+
*/
|
|
12
|
+
|
|
13
|
+
export const createRecordingMeter = () => ({
|
|
14
|
+
elapsed: createStore(0),
|
|
15
|
+
level: createStore(0)
|
|
16
|
+
});
|
|
17
|
+
|
|
18
|
+
/** The composer's meter; a recorder outside a composer keeps its own. */
|
|
19
|
+
export const RecordingMeterContext = createContext(null);
|
|
20
|
+
export const sameNumber = value => value;
|
|
21
|
+
//# sourceMappingURL=recordingMeter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"recordingMeter.js","names":["createContext","createStore","createRecordingMeter","elapsed","level","RecordingMeterContext","sameNumber","value"],"sources":["../../src/components/recordingMeter.ts"],"sourcesContent":["import { createContext } from 'react'\n\nimport { createStore, Store } from '../store'\n\n/**\n * A take's running time and loudness, which tick ten times a second while recording. They live\n * in stores rather than in component state so that a tick re-renders only the timer that shows\n * it (and moves the record button's halo without a render), not the composer around them.\n *\n * `elapsed` keeps the last take's time after it ends, so the bar that lingers after a cancel\n * still shows when the take stopped; a new take resets it.\n */\nexport interface RecordingMeter {\n elapsed: Store<number>\n /** The latest metering level, 0..1. */\n level: Store<number>\n}\n\nexport const createRecordingMeter = (): RecordingMeter => ({\n elapsed: createStore(0),\n level: createStore(0),\n})\n\n/** The composer's meter; a recorder outside a composer keeps its own. */\nexport const RecordingMeterContext = createContext<RecordingMeter | null>(null)\n\nexport const sameNumber = (value: number) => value\n"],"mappings":"AAAA,SAASA,aAAa,QAAQ,OAAO;AAErC,SAASC,WAAW,QAAe,UAAU;;AAE7C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,OAAO,MAAMC,oBAAoB,GAAGA,CAAA,MAAuB;EACzDC,OAAO,EAAEF,WAAW,CAAC,CAAC,CAAC;EACvBG,KAAK,EAAEH,WAAW,CAAC,CAAC;AACtB,CAAC,CAAC;;AAEF;AACA,OAAO,MAAMI,qBAAqB,GAAGL,aAAa,CAAwB,IAAI,CAAC;AAE/E,OAAO,MAAMM,UAAU,GAAIC,KAAa,IAAKA,KAAK","ignoreList":[]}
|