@kesha-antonov/react-native-chat 5.0.1 → 6.0.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +486 -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 -13
- package/lib/Bubble/index.d.ts.map +1 -1
- package/lib/Bubble/index.js +379 -509
- 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 -161
- 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 +289 -119
- 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 +153 -51
- 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.js +318 -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
|
@@ -1,34 +1,763 @@
|
|
|
1
|
+
import { c as _c } from "react/compiler-runtime";
|
|
2
|
+
import { createContext, useContext, useEffect, useLayoutEffect, useRef, useSyncExternalStore } from 'react';
|
|
3
|
+
import { createNotePlayerCache, detachRoundNote } from './roundNotePlayers';
|
|
4
|
+
|
|
1
5
|
/**
|
|
2
6
|
* Module-level registry so only one piece of media plays at a time.
|
|
3
7
|
*
|
|
4
8
|
* Every voice note and round video note owns its own player, and nothing
|
|
5
9
|
* coordinated them: starting a second note left the first one playing, and a
|
|
6
|
-
* chat with several round notes played all of them at once.
|
|
7
|
-
*
|
|
10
|
+
* chat with several round notes played all of them at once. Now the current
|
|
11
|
+
* one always stops when a new one starts.
|
|
8
12
|
*
|
|
9
13
|
* Deliberately not React context - bubbles are recycled by the list, and the
|
|
10
14
|
* registry has to outlive individual mounts to stop a player whose row has
|
|
11
15
|
* already scrolled away.
|
|
12
16
|
*/
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Why a player is told to stop. `replaced`: another note started, so this one
|
|
20
|
+
* is no longer current and resets its progress. `paused`: something else took the audio (a
|
|
21
|
+
* recording), so it pauses and stays current.
|
|
22
|
+
*/
|
|
23
|
+
|
|
13
24
|
const players = new Map();
|
|
25
|
+
|
|
14
26
|
/**
|
|
15
27
|
* Claim playback for `id`, stopping whatever else was playing.
|
|
16
|
-
* Call when a player actually starts.
|
|
28
|
+
* Call when a player actually starts. A paused note may keep its claim, so a
|
|
29
|
+
* later note can still reset it.
|
|
17
30
|
*/
|
|
18
31
|
export const claimPlayback = (id, stop) => {
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
32
|
+
for (const [otherId, stopOther] of players) if (otherId !== id) try {
|
|
33
|
+
stopOther('replaced');
|
|
34
|
+
} catch {
|
|
35
|
+
// a player that fails to stop must not block the new one
|
|
36
|
+
}
|
|
37
|
+
players.clear();
|
|
38
|
+
players.set(id, stop);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
/** Give up the claim (on completion, reset or unmount). */
|
|
42
|
+
export const releasePlayback = id => {
|
|
43
|
+
players.delete(id);
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* Pause whatever is playing. Recording calls this first: opening the mic takes
|
|
48
|
+
* audio focus, which pauses the playing note - otherwise it would bleed straight into the new take. The
|
|
49
|
+
* paused note keeps its claim and stays current.
|
|
50
|
+
*/
|
|
51
|
+
export const stopAllPlayback = () => {
|
|
52
|
+
for (const stop of [...players.values()]) try {
|
|
53
|
+
stop('paused');
|
|
54
|
+
} catch {
|
|
55
|
+
// a player that fails to stop must not block the others
|
|
56
|
+
}
|
|
57
|
+
};
|
|
58
|
+
|
|
59
|
+
/** A tap of the speed pill cycles through these. */
|
|
60
|
+
export const PLAYBACK_RATES = [1, 1.5, 2];
|
|
61
|
+
|
|
62
|
+
/**
|
|
63
|
+
* The presets a long press on the speed pill offers: Slow, Normal, Medium,
|
|
64
|
+
* Fast, Very fast and Super fast.
|
|
65
|
+
*/
|
|
66
|
+
export const PLAYBACK_RATE_PRESETS = [0.5, 1, 1.2, 1.5, 1.7, 2];
|
|
67
|
+
|
|
68
|
+
/*
|
|
69
|
+
* One playback speed for every voice and round note: picking 2x on one note keeps 2x for
|
|
70
|
+
* the next instead of resetting each bubble to 1x. Module-level so it survives
|
|
71
|
+
* rows being recycled; apps that want it across launches persist it through
|
|
72
|
+
* `mediaPlayback.onPlaybackRateChange` and hand it back as `playbackRate`.
|
|
73
|
+
*/
|
|
74
|
+
let playbackRate = 1;
|
|
75
|
+
const rateListeners = new Set();
|
|
76
|
+
export const getPlaybackRate = () => playbackRate;
|
|
77
|
+
export const setPlaybackRate = rate => {
|
|
78
|
+
if (!Number.isFinite(rate) || rate <= 0 || rate === playbackRate) return;
|
|
79
|
+
playbackRate = rate;
|
|
80
|
+
for (const listener of rateListeners) listener();
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/** The next step on the speed pill after `rate`. */
|
|
84
|
+
export const nextPlaybackRate = rate => {
|
|
85
|
+
const index = PLAYBACK_RATES.indexOf(rate);
|
|
86
|
+
return PLAYBACK_RATES[(index + 1) % PLAYBACK_RATES.length];
|
|
87
|
+
};
|
|
88
|
+
const subscribeRate = listener => {
|
|
89
|
+
rateListeners.add(listener);
|
|
90
|
+
return () => {
|
|
91
|
+
rateListeners.delete(listener);
|
|
92
|
+
};
|
|
93
|
+
};
|
|
94
|
+
|
|
95
|
+
/** The shared playback speed, re-rendering when any note changes it. */
|
|
96
|
+
export const usePlaybackRate = () => {
|
|
97
|
+
return useSyncExternalStore(subscribeRate, getPlaybackRate, getPlaybackRate);
|
|
98
|
+
};
|
|
99
|
+
export const subscribePlaybackRate = listener => subscribeRate(() => listener(playbackRate));
|
|
100
|
+
|
|
101
|
+
/** What a message needs for the "play the next note" lookup. */
|
|
102
|
+
|
|
103
|
+
/** Chat-level playback options, from the `mediaPlayback` prop. */
|
|
104
|
+
|
|
105
|
+
/** A mounted player the controller can start when the previous note ends. */
|
|
106
|
+
|
|
107
|
+
/**
|
|
108
|
+
* Per-chat coordinator for auto-playing the next note. When a voice or round
|
|
109
|
+
* note finishes on its own, playback moves on to the next newer voice/round
|
|
110
|
+
* message in the chat, so a run of notes plays as one.
|
|
111
|
+
*
|
|
112
|
+
* The chat feeds it the current messages on every render (a ref write, no
|
|
113
|
+
* re-render), and players register by message id while they are mounted. The
|
|
114
|
+
* next note can only be started if its row is mounted - the list virtualizes,
|
|
115
|
+
* but the next note sits right below the current one, so it nearly always is.
|
|
116
|
+
*/
|
|
117
|
+
|
|
118
|
+
/** What the "now playing" bar shows and controls. */
|
|
119
|
+
|
|
120
|
+
const isPlayableNote = message => !!message.audio || !!message.video && !!message.videoNote;
|
|
121
|
+
export const createMediaPlaybackController = () => {
|
|
122
|
+
let messages = [];
|
|
123
|
+
let isInverted = true;
|
|
124
|
+
let options = {
|
|
125
|
+
isAutoPlayNextEnabled: true,
|
|
126
|
+
isRoundVideoAutoplayEnabled: false
|
|
127
|
+
};
|
|
128
|
+
const entries = new Map();
|
|
129
|
+
const nearEarListeners = new Set();
|
|
130
|
+
let grownNote = null;
|
|
131
|
+
let grownTimeShift = 0;
|
|
132
|
+
const grownListeners = new Set();
|
|
133
|
+
let scroller = null;
|
|
134
|
+
let nowPlaying = null;
|
|
135
|
+
const nowPlayingListeners = new Set();
|
|
136
|
+
const notifyNowPlaying = () => nowPlayingListeners.forEach(listener => listener());
|
|
137
|
+
let viewable = null;
|
|
138
|
+
const viewableListeners = new Set();
|
|
139
|
+
let floatingNote = null;
|
|
140
|
+
const floatingListeners = new Set();
|
|
141
|
+
const notePlayers = createNotePlayerCache();
|
|
142
|
+
return {
|
|
143
|
+
notePlayers,
|
|
144
|
+
setViewableMessages(messageIds) {
|
|
145
|
+
const next = new Set(messageIds);
|
|
146
|
+
if (viewable && viewable.size === next.size && [...next].every(id => viewable.has(id))) return;
|
|
147
|
+
viewable = next;
|
|
148
|
+
viewableListeners.forEach(listener => listener());
|
|
149
|
+
},
|
|
150
|
+
isMessageViewable(messageId) {
|
|
151
|
+
return viewable ? viewable.has(messageId) : undefined;
|
|
152
|
+
},
|
|
153
|
+
subscribeViewable(listener) {
|
|
154
|
+
viewableListeners.add(listener);
|
|
155
|
+
return () => {
|
|
156
|
+
viewableListeners.delete(listener);
|
|
157
|
+
};
|
|
158
|
+
},
|
|
159
|
+
setFloatingNote(messageId) {
|
|
160
|
+
if (floatingNote === messageId) return;
|
|
161
|
+
floatingNote = messageId;
|
|
162
|
+
floatingListeners.forEach(listener => listener());
|
|
163
|
+
},
|
|
164
|
+
getFloatingNote() {
|
|
165
|
+
return floatingNote;
|
|
166
|
+
},
|
|
167
|
+
subscribeFloatingNote(listener) {
|
|
168
|
+
floatingListeners.add(listener);
|
|
169
|
+
return () => {
|
|
170
|
+
floatingListeners.delete(listener);
|
|
171
|
+
};
|
|
172
|
+
},
|
|
173
|
+
setNowPlaying(entry) {
|
|
174
|
+
nowPlaying = entry;
|
|
175
|
+
notifyNowPlaying();
|
|
176
|
+
},
|
|
177
|
+
clearNowPlaying(messageId) {
|
|
178
|
+
if (nowPlaying?.messageId !== messageId) return;
|
|
179
|
+
nowPlaying = null;
|
|
180
|
+
notifyNowPlaying();
|
|
181
|
+
},
|
|
182
|
+
getNowPlaying() {
|
|
183
|
+
return nowPlaying;
|
|
184
|
+
},
|
|
185
|
+
subscribeNowPlaying(listener) {
|
|
186
|
+
nowPlayingListeners.add(listener);
|
|
187
|
+
return () => {
|
|
188
|
+
nowPlayingListeners.delete(listener);
|
|
189
|
+
};
|
|
190
|
+
},
|
|
191
|
+
getMessage(messageId) {
|
|
192
|
+
return messages.find(message => message._id === messageId);
|
|
193
|
+
},
|
|
194
|
+
setScroller(next) {
|
|
195
|
+
scroller = next;
|
|
196
|
+
},
|
|
197
|
+
scrollToMessage(messageId) {
|
|
198
|
+
scroller?.(messageId);
|
|
199
|
+
},
|
|
200
|
+
setGrownNote(messageId, timeShift = 0) {
|
|
201
|
+
if (grownNote === messageId && grownTimeShift === timeShift) return;
|
|
202
|
+
grownTimeShift = messageId == null ? 0 : timeShift;
|
|
203
|
+
grownNote = messageId;
|
|
204
|
+
grownListeners.forEach(listener => listener());
|
|
205
|
+
},
|
|
206
|
+
getGrownTimeShift() {
|
|
207
|
+
return grownTimeShift;
|
|
208
|
+
},
|
|
209
|
+
getGrownNote() {
|
|
210
|
+
return grownNote;
|
|
211
|
+
},
|
|
212
|
+
subscribeGrownNote(listener) {
|
|
213
|
+
grownListeners.add(listener);
|
|
214
|
+
return () => {
|
|
215
|
+
grownListeners.delete(listener);
|
|
216
|
+
};
|
|
217
|
+
},
|
|
218
|
+
setMessages(next, inverted) {
|
|
219
|
+
messages = next;
|
|
220
|
+
isInverted = inverted;
|
|
221
|
+
},
|
|
222
|
+
setOptions(next) {
|
|
223
|
+
const wasNearEar = !!options.isNearEar;
|
|
224
|
+
options = next;
|
|
225
|
+
// Rows do not re-render when the chat's options change, so the sensor
|
|
226
|
+
// reaches players through a subscription.
|
|
227
|
+
if (wasNearEar !== !!next.isNearEar) nearEarListeners.forEach(listener => listener());
|
|
228
|
+
},
|
|
229
|
+
subscribeNearEar(listener) {
|
|
230
|
+
nearEarListeners.add(listener);
|
|
231
|
+
return () => {
|
|
232
|
+
nearEarListeners.delete(listener);
|
|
233
|
+
};
|
|
234
|
+
},
|
|
235
|
+
getOptions() {
|
|
236
|
+
return options;
|
|
237
|
+
},
|
|
238
|
+
markRead(messageId) {
|
|
239
|
+
const message = messages.find(m => m._id === messageId);
|
|
240
|
+
if (message?.isMediaUnread) options.onMediaRead?.(message);
|
|
241
|
+
},
|
|
242
|
+
register(messageId, entry) {
|
|
243
|
+
entries.set(messageId, entry);
|
|
244
|
+
return () => {
|
|
245
|
+
if (entries.get(messageId) === entry) entries.delete(messageId);
|
|
246
|
+
};
|
|
247
|
+
},
|
|
248
|
+
onEnded(messageId) {
|
|
249
|
+
if (!options.isAutoPlayNextEnabled) return;
|
|
250
|
+
const index = messages.findIndex(message => message._id === messageId);
|
|
251
|
+
if (index < 0) return;
|
|
252
|
+
|
|
253
|
+
// An inverted list keeps the newest message first, so "newer" walks
|
|
254
|
+
// towards index 0; a non-inverted one walks the other way.
|
|
255
|
+
const step = isInverted ? -1 : 1;
|
|
256
|
+
for (let i = index + step; i >= 0 && i < messages.length; i += step) {
|
|
257
|
+
const message = messages[i];
|
|
258
|
+
if (!isPlayableNote(message)) continue;
|
|
259
|
+
entries.get(message._id)?.play();
|
|
260
|
+
return;
|
|
261
|
+
}
|
|
262
|
+
}
|
|
263
|
+
};
|
|
264
|
+
};
|
|
265
|
+
export const MediaPlaybackContext = createContext(null);
|
|
266
|
+
|
|
267
|
+
/**
|
|
268
|
+
* Inside the long-press copy of a message: the chat's playback, to show (never drive). The copy
|
|
269
|
+
* sits over its hidden original while the menu is open; its media mirrors what the original is
|
|
270
|
+
* playing, as Telegram's lifted message does, instead of starting a player of its own.
|
|
271
|
+
*/
|
|
272
|
+
export const LiftedPlaybackContext = createContext(null);
|
|
273
|
+
|
|
274
|
+
/**
|
|
275
|
+
* The horizontal shift of each grown round note, by its player key, so a lifted copy of it sits
|
|
276
|
+
* exactly over the original.
|
|
277
|
+
*/
|
|
278
|
+
export const noteGrowShifts = new Map();
|
|
279
|
+
|
|
280
|
+
// Media a lifted copy is showing, by player key. On Android a player draws into one view at a
|
|
281
|
+
// time, so the hidden original lets go of it while the copy holds it, and takes it back after.
|
|
282
|
+
const liftedMedia = new Set();
|
|
283
|
+
const liftedListeners = new Set();
|
|
284
|
+
const subscribeLifted = listener => {
|
|
285
|
+
liftedListeners.add(listener);
|
|
286
|
+
return () => {
|
|
287
|
+
liftedListeners.delete(listener);
|
|
288
|
+
};
|
|
289
|
+
};
|
|
290
|
+
|
|
291
|
+
/** A lifted copy started (or stopped) showing the media under `key`. */
|
|
292
|
+
export const setMediaLifted = (key, isLifted) => {
|
|
293
|
+
if (isLifted) liftedMedia.add(key);else liftedMedia.delete(key);
|
|
294
|
+
liftedListeners.forEach(listener => listener());
|
|
295
|
+
};
|
|
296
|
+
|
|
297
|
+
/** Whether a lifted copy is showing the media under `key`. */
|
|
298
|
+
export const useIsMediaLifted = key => {
|
|
299
|
+
const $ = _c(2);
|
|
300
|
+
let t0;
|
|
301
|
+
if ($[0] !== key) {
|
|
302
|
+
t0 = () => liftedMedia.has(key);
|
|
303
|
+
$[0] = key;
|
|
304
|
+
$[1] = t0;
|
|
305
|
+
} else {
|
|
306
|
+
t0 = $[1];
|
|
307
|
+
}
|
|
308
|
+
return useSyncExternalStore(subscribeLifted, t0, _temp);
|
|
309
|
+
};
|
|
310
|
+
|
|
311
|
+
/** The chat's controller, or, inside a lifted copy, the one it mirrors. Read-only uses only. */
|
|
312
|
+
const useReadablePlayback = () => {
|
|
313
|
+
const controller = useContext(MediaPlaybackContext);
|
|
314
|
+
const lifted = useContext(LiftedPlaybackContext);
|
|
315
|
+
return controller ?? lifted;
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
/**
|
|
319
|
+
* Registers a player for auto-play-next and returns the `onEnded` callback it
|
|
320
|
+
* should fire when its note finishes on its own. A no-op outside a `Chat`, or
|
|
321
|
+
* when the message id is unknown.
|
|
322
|
+
*/
|
|
323
|
+
export const usePlaylistEntry = (messageId, play) => {
|
|
324
|
+
const $ = _c(9);
|
|
325
|
+
const controller = useContext(MediaPlaybackContext);
|
|
326
|
+
const playRef = useRef(play);
|
|
327
|
+
let t0;
|
|
328
|
+
if ($[0] !== play) {
|
|
329
|
+
t0 = () => {
|
|
330
|
+
playRef.current = play;
|
|
331
|
+
};
|
|
332
|
+
$[0] = play;
|
|
333
|
+
$[1] = t0;
|
|
334
|
+
} else {
|
|
335
|
+
t0 = $[1];
|
|
336
|
+
}
|
|
337
|
+
useLayoutEffect(t0);
|
|
338
|
+
let t1;
|
|
339
|
+
let t2;
|
|
340
|
+
if ($[2] !== controller || $[3] !== messageId) {
|
|
341
|
+
t1 = () => {
|
|
342
|
+
if (!controller || messageId == null) {
|
|
343
|
+
return;
|
|
344
|
+
}
|
|
345
|
+
return controller.register(messageId, {
|
|
346
|
+
play: () => playRef.current()
|
|
347
|
+
});
|
|
348
|
+
};
|
|
349
|
+
t2 = [controller, messageId];
|
|
350
|
+
$[2] = controller;
|
|
351
|
+
$[3] = messageId;
|
|
352
|
+
$[4] = t1;
|
|
353
|
+
$[5] = t2;
|
|
354
|
+
} else {
|
|
355
|
+
t1 = $[4];
|
|
356
|
+
t2 = $[5];
|
|
357
|
+
}
|
|
358
|
+
useEffect(t1, t2);
|
|
359
|
+
const onEndedRef = useRef(_temp2);
|
|
360
|
+
let t3;
|
|
361
|
+
if ($[6] !== controller || $[7] !== messageId) {
|
|
362
|
+
t3 = () => {
|
|
363
|
+
onEndedRef.current = () => {
|
|
364
|
+
if (controller && messageId != null) {
|
|
365
|
+
controller.onEnded(messageId);
|
|
366
|
+
}
|
|
367
|
+
};
|
|
368
|
+
};
|
|
369
|
+
$[6] = controller;
|
|
370
|
+
$[7] = messageId;
|
|
371
|
+
$[8] = t3;
|
|
372
|
+
} else {
|
|
373
|
+
t3 = $[8];
|
|
374
|
+
}
|
|
375
|
+
useLayoutEffect(t3);
|
|
376
|
+
return onEndedRef;
|
|
377
|
+
};
|
|
378
|
+
|
|
379
|
+
/**
|
|
380
|
+
* Whether round notes loop silently in the list, and a callback that reports
|
|
381
|
+
* an incoming unread note as read. Both are no-ops outside a `Chat`.
|
|
382
|
+
*/
|
|
383
|
+
export const useNotePlaybackOptions = messageId => {
|
|
384
|
+
const $ = _c(10);
|
|
385
|
+
const controller = useContext(MediaPlaybackContext);
|
|
386
|
+
const markReadRef = useRef(_temp3);
|
|
387
|
+
let t0;
|
|
388
|
+
if ($[0] !== controller || $[1] !== messageId) {
|
|
389
|
+
t0 = () => {
|
|
390
|
+
markReadRef.current = () => {
|
|
391
|
+
if (controller && messageId != null) {
|
|
392
|
+
controller.markRead(messageId);
|
|
393
|
+
}
|
|
394
|
+
};
|
|
395
|
+
};
|
|
396
|
+
$[0] = controller;
|
|
397
|
+
$[1] = messageId;
|
|
398
|
+
$[2] = t0;
|
|
399
|
+
} else {
|
|
400
|
+
t0 = $[2];
|
|
401
|
+
}
|
|
402
|
+
useLayoutEffect(t0);
|
|
403
|
+
let t1;
|
|
404
|
+
if ($[3] !== controller) {
|
|
405
|
+
t1 = controller?.getOptions();
|
|
406
|
+
$[3] = controller;
|
|
407
|
+
$[4] = t1;
|
|
408
|
+
} else {
|
|
409
|
+
t1 = $[4];
|
|
410
|
+
}
|
|
411
|
+
const options = t1;
|
|
412
|
+
const t2 = options?.isRoundVideoAutoplayEnabled ?? false;
|
|
413
|
+
const t3 = options?.isNearEar ?? false;
|
|
414
|
+
const t4 = options?.onTranscribe;
|
|
415
|
+
const t5 = options?.onViewOnceEnd;
|
|
416
|
+
let t6;
|
|
417
|
+
if ($[5] !== t2 || $[6] !== t3 || $[7] !== t4 || $[8] !== t5) {
|
|
418
|
+
t6 = {
|
|
419
|
+
isRoundVideoAutoplayEnabled: t2,
|
|
420
|
+
isNearEar: t3,
|
|
421
|
+
onTranscribe: t4,
|
|
422
|
+
onViewOnceEnd: t5,
|
|
423
|
+
markReadRef
|
|
424
|
+
};
|
|
425
|
+
$[5] = t2;
|
|
426
|
+
$[6] = t3;
|
|
427
|
+
$[7] = t4;
|
|
428
|
+
$[8] = t5;
|
|
429
|
+
$[9] = t6;
|
|
430
|
+
} else {
|
|
431
|
+
t6 = $[9];
|
|
432
|
+
}
|
|
433
|
+
return t6;
|
|
434
|
+
};
|
|
435
|
+
const noSubscription = () => () => {};
|
|
436
|
+
|
|
437
|
+
/** Whether this message's round note is grown to play; false outside a `Chat`. */
|
|
438
|
+
export const useIsNoteGrown = messageId => {
|
|
439
|
+
const $ = _c(3);
|
|
440
|
+
const controller = useReadablePlayback();
|
|
441
|
+
let t0;
|
|
442
|
+
if ($[0] !== controller || $[1] !== messageId) {
|
|
443
|
+
t0 = () => messageId != null && controller?.getGrownNote() === messageId;
|
|
444
|
+
$[0] = controller;
|
|
445
|
+
$[1] = messageId;
|
|
446
|
+
$[2] = t0;
|
|
447
|
+
} else {
|
|
448
|
+
t0 = $[2];
|
|
449
|
+
}
|
|
450
|
+
return useSyncExternalStore(controller?.subscribeGrownNote ?? noSubscription, t0, _temp4);
|
|
451
|
+
};
|
|
452
|
+
|
|
453
|
+
/** Reports this note growing or shrinking back, so its row can hide the avatar. */
|
|
454
|
+
export const useReportNoteGrown = (messageId, isGrown, t0) => {
|
|
455
|
+
const $ = _c(11);
|
|
456
|
+
const timeShift = t0 === undefined ? 0 : t0;
|
|
457
|
+
const controller = useContext(MediaPlaybackContext);
|
|
458
|
+
let t1;
|
|
459
|
+
let t2;
|
|
460
|
+
if ($[0] !== controller || $[1] !== isGrown || $[2] !== messageId || $[3] !== timeShift) {
|
|
461
|
+
t1 = () => {
|
|
462
|
+
if (!controller || messageId == null || !isGrown) {
|
|
463
|
+
return;
|
|
464
|
+
}
|
|
465
|
+
controller.setGrownNote(messageId, timeShift);
|
|
466
|
+
};
|
|
467
|
+
t2 = [controller, messageId, isGrown, timeShift];
|
|
468
|
+
$[0] = controller;
|
|
469
|
+
$[1] = isGrown;
|
|
470
|
+
$[2] = messageId;
|
|
471
|
+
$[3] = timeShift;
|
|
472
|
+
$[4] = t1;
|
|
473
|
+
$[5] = t2;
|
|
474
|
+
} else {
|
|
475
|
+
t1 = $[4];
|
|
476
|
+
t2 = $[5];
|
|
477
|
+
}
|
|
478
|
+
useEffect(t1, t2);
|
|
479
|
+
let t3;
|
|
480
|
+
let t4;
|
|
481
|
+
if ($[6] !== controller || $[7] !== isGrown || $[8] !== messageId) {
|
|
482
|
+
t3 = () => {
|
|
483
|
+
if (!controller || messageId == null || !isGrown) {
|
|
484
|
+
return;
|
|
485
|
+
}
|
|
486
|
+
return () => {
|
|
487
|
+
if (controller.getGrownNote() === messageId) {
|
|
488
|
+
controller.setGrownNote(null);
|
|
489
|
+
}
|
|
490
|
+
};
|
|
491
|
+
};
|
|
492
|
+
t4 = [controller, messageId, isGrown];
|
|
493
|
+
$[6] = controller;
|
|
494
|
+
$[7] = isGrown;
|
|
495
|
+
$[8] = messageId;
|
|
496
|
+
$[9] = t3;
|
|
497
|
+
$[10] = t4;
|
|
498
|
+
} else {
|
|
499
|
+
t3 = $[9];
|
|
500
|
+
t4 = $[10];
|
|
501
|
+
}
|
|
502
|
+
useEffect(t3, t4);
|
|
503
|
+
};
|
|
504
|
+
|
|
505
|
+
/** How far this message's grown round note moved its right edge; 0 at rest. */
|
|
506
|
+
export const useNoteTimeShift = messageId => {
|
|
507
|
+
const $ = _c(3);
|
|
508
|
+
const controller = useReadablePlayback();
|
|
509
|
+
let t0;
|
|
510
|
+
if ($[0] !== controller || $[1] !== messageId) {
|
|
511
|
+
t0 = () => messageId != null && controller?.getGrownNote() === messageId ? controller.getGrownTimeShift() : 0;
|
|
512
|
+
$[0] = controller;
|
|
513
|
+
$[1] = messageId;
|
|
514
|
+
$[2] = t0;
|
|
515
|
+
} else {
|
|
516
|
+
t0 = $[2];
|
|
517
|
+
}
|
|
518
|
+
return useSyncExternalStore(controller?.subscribeGrownNote ?? noSubscription, t0, _temp5);
|
|
519
|
+
};
|
|
520
|
+
|
|
521
|
+
/**
|
|
522
|
+
* Puts this note in the "now playing" bar while it owns playback, playing or
|
|
523
|
+
* paused, and takes it out when it stops, is replaced or unmounts.
|
|
524
|
+
*/
|
|
525
|
+
export const useReportNowPlaying = (messageId, kind, isCurrent, isPlaying, toggle, stop, player) => {
|
|
526
|
+
const $ = _c(19);
|
|
527
|
+
const controller = useContext(MediaPlaybackContext);
|
|
528
|
+
let t0;
|
|
529
|
+
if ($[0] !== stop || $[1] !== toggle) {
|
|
530
|
+
t0 = {
|
|
531
|
+
toggle,
|
|
532
|
+
stop
|
|
533
|
+
};
|
|
534
|
+
$[0] = stop;
|
|
535
|
+
$[1] = toggle;
|
|
536
|
+
$[2] = t0;
|
|
537
|
+
} else {
|
|
538
|
+
t0 = $[2];
|
|
539
|
+
}
|
|
540
|
+
const actionsRef = useRef(t0);
|
|
541
|
+
let t1;
|
|
542
|
+
if ($[3] !== stop || $[4] !== toggle) {
|
|
543
|
+
t1 = () => {
|
|
544
|
+
actionsRef.current = {
|
|
545
|
+
toggle,
|
|
546
|
+
stop
|
|
547
|
+
};
|
|
548
|
+
};
|
|
549
|
+
$[3] = stop;
|
|
550
|
+
$[4] = toggle;
|
|
551
|
+
$[5] = t1;
|
|
552
|
+
} else {
|
|
553
|
+
t1 = $[5];
|
|
554
|
+
}
|
|
555
|
+
useLayoutEffect(t1);
|
|
556
|
+
let t2;
|
|
557
|
+
let t3;
|
|
558
|
+
if ($[6] !== controller || $[7] !== isCurrent || $[8] !== isPlaying || $[9] !== kind || $[10] !== messageId || $[11] !== player) {
|
|
559
|
+
t2 = () => {
|
|
560
|
+
if (!controller || messageId == null || !isCurrent) {
|
|
561
|
+
return;
|
|
562
|
+
}
|
|
563
|
+
controller.setNowPlaying({
|
|
564
|
+
messageId,
|
|
565
|
+
kind,
|
|
566
|
+
isPlaying,
|
|
567
|
+
toggle: () => actionsRef.current.toggle(),
|
|
568
|
+
stop: () => actionsRef.current.stop(),
|
|
569
|
+
player
|
|
570
|
+
});
|
|
571
|
+
};
|
|
572
|
+
t3 = [controller, messageId, kind, isCurrent, isPlaying, player];
|
|
573
|
+
$[6] = controller;
|
|
574
|
+
$[7] = isCurrent;
|
|
575
|
+
$[8] = isPlaying;
|
|
576
|
+
$[9] = kind;
|
|
577
|
+
$[10] = messageId;
|
|
578
|
+
$[11] = player;
|
|
579
|
+
$[12] = t2;
|
|
580
|
+
$[13] = t3;
|
|
581
|
+
} else {
|
|
582
|
+
t2 = $[12];
|
|
583
|
+
t3 = $[13];
|
|
584
|
+
}
|
|
585
|
+
useEffect(t2, t3);
|
|
586
|
+
let t4;
|
|
587
|
+
let t5;
|
|
588
|
+
if ($[14] !== controller || $[15] !== isCurrent || $[16] !== messageId) {
|
|
589
|
+
t4 = () => {
|
|
590
|
+
if (!controller || messageId == null || !isCurrent) {
|
|
591
|
+
return;
|
|
592
|
+
}
|
|
593
|
+
return () => controller.clearNowPlaying(messageId);
|
|
594
|
+
};
|
|
595
|
+
t5 = [controller, messageId, isCurrent];
|
|
596
|
+
$[14] = controller;
|
|
597
|
+
$[15] = isCurrent;
|
|
598
|
+
$[16] = messageId;
|
|
599
|
+
$[17] = t4;
|
|
600
|
+
$[18] = t5;
|
|
601
|
+
} else {
|
|
602
|
+
t4 = $[17];
|
|
603
|
+
t5 = $[18];
|
|
604
|
+
}
|
|
605
|
+
useEffect(t4, t5);
|
|
606
|
+
};
|
|
607
|
+
|
|
608
|
+
/** Centres a message in the chat's list; a no-op outside a `Chat`. */
|
|
609
|
+
export const useScrollToMessage = () => {
|
|
610
|
+
const $ = _c(2);
|
|
611
|
+
const controller = useContext(MediaPlaybackContext);
|
|
612
|
+
let t0;
|
|
613
|
+
if ($[0] !== controller) {
|
|
614
|
+
t0 = messageId => {
|
|
615
|
+
if (controller && messageId != null) {
|
|
616
|
+
controller.scrollToMessage(messageId);
|
|
617
|
+
}
|
|
618
|
+
};
|
|
619
|
+
$[0] = controller;
|
|
620
|
+
$[1] = t0;
|
|
621
|
+
} else {
|
|
622
|
+
t0 = $[1];
|
|
623
|
+
}
|
|
624
|
+
return t0;
|
|
625
|
+
};
|
|
626
|
+
|
|
627
|
+
/** The note in the "now playing" bar, or null; null outside a `Chat`. */
|
|
628
|
+
export const useNowPlaying = () => {
|
|
629
|
+
const $ = _c(2);
|
|
630
|
+
const controller = useContext(MediaPlaybackContext);
|
|
631
|
+
let t0;
|
|
632
|
+
if ($[0] !== controller) {
|
|
633
|
+
t0 = () => controller?.getNowPlaying() ?? null;
|
|
634
|
+
$[0] = controller;
|
|
635
|
+
$[1] = t0;
|
|
636
|
+
} else {
|
|
637
|
+
t0 = $[1];
|
|
638
|
+
}
|
|
639
|
+
return useSyncExternalStore(controller?.subscribeNowPlaying ?? noSubscription, t0, _temp6);
|
|
640
|
+
};
|
|
641
|
+
|
|
642
|
+
/** The phone is held to the ear (raise to listen); false outside a `Chat`. */
|
|
643
|
+
export const useIsNearEar = () => {
|
|
644
|
+
const $ = _c(2);
|
|
645
|
+
const controller = useContext(MediaPlaybackContext);
|
|
646
|
+
let t0;
|
|
647
|
+
if ($[0] !== controller) {
|
|
648
|
+
t0 = () => !!controller?.getOptions().isNearEar;
|
|
649
|
+
$[0] = controller;
|
|
650
|
+
$[1] = t0;
|
|
651
|
+
} else {
|
|
652
|
+
t0 = $[1];
|
|
653
|
+
}
|
|
654
|
+
return useSyncExternalStore(controller?.subscribeNearEar ?? noSubscription, t0, _temp7);
|
|
655
|
+
};
|
|
656
|
+
|
|
657
|
+
/**
|
|
658
|
+
* Whether a message's row is on screen: `undefined` outside a `Chat` or before
|
|
659
|
+
* the list has reported, so callers can tell "scrolled away" from "unknown".
|
|
660
|
+
*/
|
|
661
|
+
export const useIsMessageViewable = messageId => {
|
|
662
|
+
const $ = _c(3);
|
|
663
|
+
const controller = useContext(MediaPlaybackContext);
|
|
664
|
+
let t0;
|
|
665
|
+
if ($[0] !== controller || $[1] !== messageId) {
|
|
666
|
+
t0 = () => controller && messageId != null ? controller.isMessageViewable(messageId) : undefined;
|
|
667
|
+
$[0] = controller;
|
|
668
|
+
$[1] = messageId;
|
|
669
|
+
$[2] = t0;
|
|
670
|
+
} else {
|
|
671
|
+
t0 = $[2];
|
|
672
|
+
}
|
|
673
|
+
return useSyncExternalStore(controller?.subscribeViewable ?? noSubscription, t0, _temp8);
|
|
674
|
+
};
|
|
675
|
+
|
|
676
|
+
/** Whether this message's round note is currently drawn floating over the list. */
|
|
677
|
+
export const useIsNoteFloating = messageId => {
|
|
678
|
+
const $ = _c(3);
|
|
679
|
+
const controller = useContext(MediaPlaybackContext);
|
|
680
|
+
let t0;
|
|
681
|
+
if ($[0] !== controller || $[1] !== messageId) {
|
|
682
|
+
t0 = () => messageId != null && controller?.getFloatingNote() === messageId;
|
|
683
|
+
$[0] = controller;
|
|
684
|
+
$[1] = messageId;
|
|
685
|
+
$[2] = t0;
|
|
686
|
+
} else {
|
|
687
|
+
t0 = $[2];
|
|
688
|
+
}
|
|
689
|
+
return useSyncExternalStore(controller?.subscribeFloatingNote ?? noSubscription, t0, _temp9);
|
|
690
|
+
};
|
|
691
|
+
|
|
692
|
+
// Round notes rendered outside a `Chat` still borrow their players from a
|
|
693
|
+
// cache, so React's strict effects (unmount, mount again) do not release a
|
|
694
|
+
// player that is still on screen.
|
|
695
|
+
const sharedNotePlayers = createNotePlayerCache();
|
|
696
|
+
|
|
697
|
+
/** The chat's round note players, or a shared cache outside a `Chat`. */
|
|
698
|
+
export const useNotePlayerCache = () => {
|
|
699
|
+
const controller = useContext(MediaPlaybackContext);
|
|
700
|
+
return controller?.notePlayers ?? sharedNotePlayers;
|
|
701
|
+
};
|
|
702
|
+
|
|
703
|
+
/**
|
|
704
|
+
* Hands a current round note whose row is unmounting over to a detached
|
|
705
|
+
* session, so it keeps playing (and floating) until it ends, another note
|
|
706
|
+
* starts, or its row mounts again and takes it back. Without a `Chat`, or
|
|
707
|
+
* while the chat itself is going away, the note just stops.
|
|
708
|
+
*/
|
|
709
|
+
export const detachRoundNoteFromRow = (controller, cache, cacheKey, messageId, player, isPlaying, /** False for a note that must not outlive its row (a view-once one). */
|
|
710
|
+
canFloat = true) => {
|
|
711
|
+
if (!canFloat || !controller || messageId == null || !cache.isActive() || controller.getOptions().isFloatingRoundNoteEnabled === false) {
|
|
712
|
+
try {
|
|
713
|
+
player.pause();
|
|
714
|
+
} catch {
|
|
715
|
+
// already torn down
|
|
716
|
+
}
|
|
717
|
+
cache.keep(cacheKey, false);
|
|
718
|
+
return;
|
|
719
|
+
}
|
|
720
|
+
detachRoundNote(cacheKey, player, isPlaying, {
|
|
721
|
+
cache,
|
|
722
|
+
claim: claimPlayback,
|
|
723
|
+
unclaim: releasePlayback,
|
|
724
|
+
getRate: getPlaybackRate,
|
|
725
|
+
subscribeRate: subscribePlaybackRate,
|
|
726
|
+
report: state => {
|
|
727
|
+
if (state) controller.setNowPlaying({
|
|
728
|
+
messageId,
|
|
729
|
+
kind: 'round',
|
|
730
|
+
player,
|
|
731
|
+
...state
|
|
732
|
+
});else controller.clearNowPlaying(messageId);
|
|
733
|
+
},
|
|
734
|
+
onEnded: () => controller.onEnded(messageId)
|
|
735
|
+
});
|
|
736
|
+
};
|
|
737
|
+
|
|
738
|
+
/** The chat's playback controller, or `null` outside a `Chat`. */
|
|
739
|
+
export const useMediaPlaybackController = () => {
|
|
740
|
+
return useContext(MediaPlaybackContext);
|
|
33
741
|
};
|
|
742
|
+
function _temp() {
|
|
743
|
+
return false;
|
|
744
|
+
}
|
|
745
|
+
function _temp2() {}
|
|
746
|
+
function _temp3() {}
|
|
747
|
+
function _temp4() {
|
|
748
|
+
return false;
|
|
749
|
+
}
|
|
750
|
+
function _temp5() {
|
|
751
|
+
return 0;
|
|
752
|
+
}
|
|
753
|
+
function _temp6() {
|
|
754
|
+
return null;
|
|
755
|
+
}
|
|
756
|
+
function _temp7() {
|
|
757
|
+
return false;
|
|
758
|
+
}
|
|
759
|
+
function _temp8() {}
|
|
760
|
+
function _temp9() {
|
|
761
|
+
return false;
|
|
762
|
+
}
|
|
34
763
|
//# sourceMappingURL=mediaPlayback.js.map
|