@droppii-org/chat-mobile 0.2.106 → 0.2.108
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/module/components/ThreadCard/ThreadCard.js +2 -0
- package/lib/module/components/ThreadCard/ThreadCard.js.map +1 -1
- package/lib/module/components/messages/ExpandableMessageText.js +112 -0
- package/lib/module/components/messages/ExpandableMessageText.js.map +1 -0
- package/lib/module/components/messages/PreviewScrollableText.js +80 -0
- package/lib/module/components/messages/PreviewScrollableText.js.map +1 -0
- package/lib/module/components/messages/fileMessage/index.js +9 -2
- package/lib/module/components/messages/fileMessage/index.js.map +1 -1
- package/lib/module/components/messages/linkMessage/index.js +21 -12
- package/lib/module/components/messages/linkMessage/index.js.map +1 -1
- package/lib/module/components/messages/quotedMessage/index.js +18 -3
- package/lib/module/components/messages/quotedMessage/index.js.map +1 -1
- package/lib/module/components/messages/textMessage/index.js +7 -1
- package/lib/module/components/messages/textMessage/index.js.map +1 -1
- package/lib/module/components/messages/types.js.map +1 -1
- package/lib/module/context/TimelinePressGuardContext.js +14 -0
- package/lib/module/context/TimelinePressGuardContext.js.map +1 -0
- package/lib/module/hooks/useConversationList.js +4 -0
- package/lib/module/hooks/useConversationList.js.map +1 -1
- package/lib/module/hooks/useDismissKeyboardFirst.js +19 -0
- package/lib/module/hooks/useDismissKeyboardFirst.js.map +1 -0
- package/lib/module/hooks/useExpandableText.js +125 -0
- package/lib/module/hooks/useExpandableText.js.map +1 -0
- package/lib/module/hooks/useGuardedPress.js +19 -0
- package/lib/module/hooks/useGuardedPress.js.map +1 -0
- package/lib/module/screens/chat-detail/ChatComposer.js +89 -498
- package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatDetail.js +49 -20
- package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
- package/lib/module/screens/chat-detail/ChatListLegend.js +113 -76
- package/lib/module/screens/chat-detail/ChatListLegend.js.map +1 -1
- package/lib/module/screens/chat-detail/PinnedMessagesSheet.js +7 -0
- package/lib/module/screens/chat-detail/PinnedMessagesSheet.js.map +1 -1
- package/lib/module/screens/chat-detail/components/ChatComposerAccessorySlot.js +47 -0
- package/lib/module/screens/chat-detail/components/ChatComposerAccessorySlot.js.map +1 -0
- package/lib/module/screens/chat-detail/components/ChatComposerInputArea.js +149 -0
- package/lib/module/screens/chat-detail/components/ChatComposerInputArea.js.map +1 -0
- package/lib/module/screens/chat-detail/components/ChatComposerStatusBanner.js +104 -0
- package/lib/module/screens/chat-detail/components/ChatComposerStatusBanner.js.map +1 -0
- package/lib/module/screens/chat-detail/hooks/useChatComposerAnimation.js +0 -17
- package/lib/module/screens/chat-detail/hooks/useChatComposerAnimation.js.map +1 -1
- package/lib/module/screens/chat-detail/hooks/useChatComposerState.js +16 -2
- package/lib/module/screens/chat-detail/hooks/useChatComposerState.js.map +1 -1
- package/lib/module/screens/chat-detail/hooks/useComposerBotMenu.js +122 -0
- package/lib/module/screens/chat-detail/hooks/useComposerBotMenu.js.map +1 -0
- package/lib/module/screens/chat-detail/hooks/useComposerPanelActions.js +46 -0
- package/lib/module/screens/chat-detail/hooks/useComposerPanelActions.js.map +1 -0
- package/lib/module/screens/chat-detail/hooks/useComposerPanelDismiss.js +75 -0
- package/lib/module/screens/chat-detail/hooks/useComposerPanelDismiss.js.map +1 -0
- package/lib/module/screens/chat-detail/hooks/useComposerPanels.js +136 -0
- package/lib/module/screens/chat-detail/hooks/useComposerPanels.js.map +1 -0
- package/lib/module/screens/chat-detail/hooks/useComposerSend.js +74 -0
- package/lib/module/screens/chat-detail/hooks/useComposerSend.js.map +1 -0
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js +12 -3
- package/lib/module/screens/chat-detail/legend/LegendChatMessage.js.map +1 -1
- package/lib/module/screens/chat-detail/messageToolbox/MessageToolboxOverlay.js +11 -2
- package/lib/module/screens/chat-detail/messageToolbox/MessageToolboxOverlay.js.map +1 -1
- package/lib/module/screens/chat-detail/messageToolbox/MessageToolboxWrapper.js +79 -6
- package/lib/module/screens/chat-detail/messageToolbox/MessageToolboxWrapper.js.map +1 -1
- package/lib/module/screens/chat-detail/messageToolbox/useClonePreview.js +30 -0
- package/lib/module/screens/chat-detail/messageToolbox/useClonePreview.js.map +1 -0
- package/lib/module/screens/chat-detail/types.js +5 -0
- package/lib/module/screens/chat-detail/types.js.map +1 -1
- package/lib/module/store/expandedMessage.js +28 -0
- package/lib/module/store/expandedMessage.js.map +1 -0
- package/lib/module/store/message.js +14 -0
- package/lib/module/store/message.js.map +1 -1
- package/lib/module/utils/composerPanelDismissGesture.js +52 -0
- package/lib/module/utils/composerPanelDismissGesture.js.map +1 -0
- package/lib/module/utils/expandableText.js +41 -0
- package/lib/module/utils/expandableText.js.map +1 -0
- package/lib/module/utils/inlineTruncation.js +51 -0
- package/lib/module/utils/inlineTruncation.js.map +1 -0
- package/lib/module/utils/perf-marker.js +44 -0
- package/lib/module/utils/perf-marker.js.map +1 -0
- package/lib/module/utils/truncateTextChildren.js +38 -0
- package/lib/module/utils/truncateTextChildren.js.map +1 -0
- package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts.map +1 -1
- package/lib/typescript/src/components/messages/ExpandableMessageText.d.ts +25 -0
- package/lib/typescript/src/components/messages/ExpandableMessageText.d.ts.map +1 -0
- package/lib/typescript/src/components/messages/PreviewScrollableText.d.ts +29 -0
- package/lib/typescript/src/components/messages/PreviewScrollableText.d.ts.map +1 -0
- package/lib/typescript/src/components/messages/fileMessage/index.d.ts.map +1 -1
- package/lib/typescript/src/components/messages/linkMessage/index.d.ts +1 -1
- package/lib/typescript/src/components/messages/linkMessage/index.d.ts.map +1 -1
- package/lib/typescript/src/components/messages/quotedMessage/index.d.ts.map +1 -1
- package/lib/typescript/src/components/messages/textMessage/index.d.ts +1 -1
- package/lib/typescript/src/components/messages/textMessage/index.d.ts.map +1 -1
- package/lib/typescript/src/components/messages/types.d.ts +18 -0
- package/lib/typescript/src/components/messages/types.d.ts.map +1 -1
- package/lib/typescript/src/context/TimelinePressGuardContext.d.ts +3 -0
- package/lib/typescript/src/context/TimelinePressGuardContext.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useConversationList.d.ts.map +1 -1
- package/lib/typescript/src/hooks/useDismissKeyboardFirst.d.ts +8 -0
- package/lib/typescript/src/hooks/useDismissKeyboardFirst.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useExpandableText.d.ts +13 -0
- package/lib/typescript/src/hooks/useExpandableText.d.ts.map +1 -0
- package/lib/typescript/src/hooks/useGuardedPress.d.ts +9 -0
- package/lib/typescript/src/hooks/useGuardedPress.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts +7 -3
- package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts +5 -1
- package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/PinnedMessagesSheet.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/components/ChatComposerAccessorySlot.d.ts +12 -0
- package/lib/typescript/src/screens/chat-detail/components/ChatComposerAccessorySlot.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/components/ChatComposerInputArea.d.ts +30 -0
- package/lib/typescript/src/screens/chat-detail/components/ChatComposerInputArea.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/components/ChatComposerStatusBanner.d.ts +19 -0
- package/lib/typescript/src/screens/chat-detail/components/ChatComposerStatusBanner.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerAnimation.d.ts +0 -1
- package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerAnimation.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerState.d.ts +7 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerState.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/hooks/useComposerBotMenu.d.ts +7 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useComposerBotMenu.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanelActions.d.ts +17 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanelActions.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanelDismiss.d.ts +12 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanelDismiss.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanels.d.ts +25 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanels.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useComposerSend.d.ts +16 -0
- package/lib/typescript/src/screens/chat-detail/hooks/useComposerSend.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts +11 -1
- package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/messageToolbox/MessageToolboxOverlay.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/messageToolbox/MessageToolboxWrapper.d.ts +14 -1
- package/lib/typescript/src/screens/chat-detail/messageToolbox/MessageToolboxWrapper.d.ts.map +1 -1
- package/lib/typescript/src/screens/chat-detail/messageToolbox/useClonePreview.d.ts +18 -0
- package/lib/typescript/src/screens/chat-detail/messageToolbox/useClonePreview.d.ts.map +1 -0
- package/lib/typescript/src/screens/chat-detail/types.d.ts +8 -0
- package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
- package/lib/typescript/src/store/expandedMessage.d.ts +15 -0
- package/lib/typescript/src/store/expandedMessage.d.ts.map +1 -0
- package/lib/typescript/src/store/message.d.ts.map +1 -1
- package/lib/typescript/src/utils/composerPanelDismissGesture.d.ts +33 -0
- package/lib/typescript/src/utils/composerPanelDismissGesture.d.ts.map +1 -0
- package/lib/typescript/src/utils/expandableText.d.ts +18 -0
- package/lib/typescript/src/utils/expandableText.d.ts.map +1 -0
- package/lib/typescript/src/utils/inlineTruncation.d.ts +24 -0
- package/lib/typescript/src/utils/inlineTruncation.d.ts.map +1 -0
- package/lib/typescript/src/utils/perf-marker.d.ts +8 -0
- package/lib/typescript/src/utils/perf-marker.d.ts.map +1 -0
- package/lib/typescript/src/utils/truncateTextChildren.d.ts +3 -0
- package/lib/typescript/src/utils/truncateTextChildren.d.ts.map +1 -0
- package/package.json +2 -1
- package/src/components/ThreadCard/ThreadCard.tsx +2 -0
- package/src/components/messages/ExpandableMessageText.tsx +145 -0
- package/src/components/messages/PreviewScrollableText.tsx +98 -0
- package/src/components/messages/fileMessage/index.tsx +17 -3
- package/src/components/messages/linkMessage/index.tsx +30 -21
- package/src/components/messages/quotedMessage/index.tsx +19 -3
- package/src/components/messages/textMessage/index.tsx +11 -2
- package/src/components/messages/types.ts +18 -0
- package/src/context/TimelinePressGuardContext.tsx +15 -0
- package/src/hooks/useConversationList.ts +2 -0
- package/src/hooks/useDismissKeyboardFirst.ts +19 -0
- package/src/hooks/useExpandableText.ts +143 -0
- package/src/hooks/useGuardedPress.ts +20 -0
- package/src/screens/chat-detail/ChatComposer.tsx +105 -631
- package/src/screens/chat-detail/ChatDetail.tsx +49 -20
- package/src/screens/chat-detail/ChatListLegend.tsx +122 -71
- package/src/screens/chat-detail/PinnedMessagesSheet.tsx +8 -0
- package/src/screens/chat-detail/components/ChatComposerAccessorySlot.tsx +61 -0
- package/src/screens/chat-detail/components/ChatComposerInputArea.tsx +198 -0
- package/src/screens/chat-detail/components/ChatComposerStatusBanner.tsx +116 -0
- package/src/screens/chat-detail/hooks/useChatComposerAnimation.ts +0 -29
- package/src/screens/chat-detail/hooks/useChatComposerState.ts +25 -2
- package/src/screens/chat-detail/hooks/useComposerBotMenu.tsx +140 -0
- package/src/screens/chat-detail/hooks/useComposerPanelActions.ts +57 -0
- package/src/screens/chat-detail/hooks/useComposerPanelDismiss.ts +111 -0
- package/src/screens/chat-detail/hooks/useComposerPanels.ts +197 -0
- package/src/screens/chat-detail/hooks/useComposerSend.ts +98 -0
- package/src/screens/chat-detail/legend/LegendChatMessage.tsx +24 -2
- package/src/screens/chat-detail/messageToolbox/MessageToolboxOverlay.tsx +20 -1
- package/src/screens/chat-detail/messageToolbox/MessageToolboxWrapper.tsx +111 -5
- package/src/screens/chat-detail/messageToolbox/useClonePreview.ts +34 -0
- package/src/screens/chat-detail/types.ts +9 -0
- package/src/store/expandedMessage.ts +42 -0
- package/src/store/message.ts +14 -0
- package/src/utils/composerPanelDismissGesture.ts +72 -0
- package/src/utils/expandableText.ts +51 -0
- package/src/utils/inlineTruncation.ts +65 -0
- package/src/utils/perf-marker.ts +39 -0
- package/src/utils/truncateTextChildren.ts +46 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["KContainer","KImage","KColors","KLabel","KSpacingValue","StyleSheet","memo","useCallback","useMemo","MessageType","Gesture","GestureDetector","runOnJS","TextMessage","ImageMessage","VideoMessage","FileMessage","LinkMessage","MergedMessage","RevokedMessage","GroupNotificationMessage","MessageStatusIndicator","messageStyles","QuotedMessage","StickerMessage","GROUP_NOTIFICATION_TYPES","Avatar","TAIL_WIDTH","jsx","_jsx","jsxs","_jsxs","messageComponentMap","AtTextMessage","QuoteMessage","UrlTextMessage","PictureMessage","MergeMessage","RevokeMessage","Object","fromEntries","map","type","MEDIA_TYPES","SYSTEM_MESSAGE_TYPES","TIME_REVEAL_EXCLUDED_TYPES","LegendChatMessage","message","messageId","isOutgoing","createdAtTime","onMediaPress","onPressUrl","onRetry","onPress","alwaysHandlePress","onLongPress","customMessageItemFactory","isHighlighted","isTimeRevealed","showName","showAvatar","showSenderGutter","groupPosition","handlePress","handleLongPress","customNode","includes","contentType","SystemMessageComponent","View","center","style","styles","systemMessageWrapper","children","MessageComponent","effectiveOnMediaPress","undefined","hasMediaPress","hasUrlPress","canRevealTime","shouldHandlePress","wrapper","row","alignItems","avatarGutter","size","source","senderFaceUrl","fullName","senderNickname","content","Text","typo","color","gray","normal","numberOfLines","marginB","senderName","LongPressWrapper","isPinned","pinBadge","VectorIcons","name","primary","displayName","AVATAR_SIZE","create","position","marginLeft","width","marginRight","alignSelf","marginVertical","top","right","height","borderRadius","justifyContent","backgroundColor","pageBackground","shadowColor","black","shadowOffset","shadowOpacity","shadowRadius","elevation","borderWidth","borderColor","white","zIndex","Number","MAX_SAFE_INTEGER","gesture","gestures","LongPress","onStart","Tap","filter","Boolean","length","Race"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/legend/LegendChatMessage.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,MAAM,EACNC,OAAO,EACPC,MAAM,EACNC,aAAa,QACR,eAAe;AACtB,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,IAAI,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAElD,SAASC,WAAW,QAAQ,+BAA+B;AAE3D,SAASC,OAAO,EAAEC,eAAe,QAAQ,8BAA8B;AACvE,SAASC,OAAO,QAAQ,yBAAyB;AAEjD,SAASC,WAAW,QAAQ,mDAA0C;AACtE,SAASC,YAAY,QAAQ,oDAA2C;AACxE,SAASC,YAAY,QAAQ,oDAA2C;AACxE,SAASC,WAAW,QAAQ,mDAA0C;AACtE,SAASC,WAAW,QAAQ,mDAA0C;AACtE,SAASC,aAAa,QAAQ,qDAA4C;AAC1E,SAASC,cAAc,QAAQ,sDAA6C;AAC5E,SAASC,wBAAwB,QAAQ,gEAAuD;AAChG,SAASC,sBAAsB,QAAQ,wDAAqD;AAE5F,SAASC,aAAa,QAAQ,mBAAgB;AAC9C,OAAOC,aAAa,MAAM,qDAA4C;AACtE,SAASC,cAAc,QAAQ,sDAA6C;AAC5E,SAASC,wBAAwB,QAAQ,gCAA6B;
|
|
1
|
+
{"version":3,"names":["KContainer","KImage","KColors","KLabel","KSpacingValue","StyleSheet","memo","useCallback","useMemo","MessageType","Gesture","GestureDetector","runOnJS","TextMessage","ImageMessage","VideoMessage","FileMessage","LinkMessage","MergedMessage","RevokedMessage","GroupNotificationMessage","MessageStatusIndicator","messageStyles","QuotedMessage","StickerMessage","GROUP_NOTIFICATION_TYPES","Avatar","TAIL_WIDTH","perfCountRender","jsx","_jsx","jsxs","_jsxs","messageComponentMap","AtTextMessage","QuoteMessage","UrlTextMessage","PictureMessage","MergeMessage","RevokeMessage","Object","fromEntries","map","type","MEDIA_TYPES","SYSTEM_MESSAGE_TYPES","TIME_REVEAL_EXCLUDED_TYPES","LegendChatMessage","message","messageId","isOutgoing","createdAtTime","onMediaPress","onPressUrl","onRetry","onPress","alwaysHandlePress","onLongPress","customMessageItemFactory","isHighlighted","isTimeRevealed","showName","showAvatar","showSenderGutter","groupPosition","surface","isPreview","handlePress","handleLongPress","customNode","includes","contentType","SystemMessageComponent","View","center","style","styles","systemMessageWrapper","children","MessageComponent","effectiveOnMediaPress","undefined","hasMediaPress","hasUrlPress","canRevealTime","shouldHandlePress","wrapper","row","alignItems","avatarGutter","size","source","senderFaceUrl","fullName","senderNickname","content","Text","typo","color","gray","normal","numberOfLines","marginB","senderName","LongPressWrapper","isPinned","pinBadge","VectorIcons","name","primary","displayName","AVATAR_SIZE","create","position","marginLeft","width","marginRight","alignSelf","marginVertical","top","right","height","borderRadius","justifyContent","backgroundColor","pageBackground","shadowColor","black","shadowOffset","shadowOpacity","shadowRadius","elevation","borderWidth","borderColor","white","zIndex","Number","MAX_SAFE_INTEGER","gesture","gestures","LongPress","onStart","Tap","filter","Boolean","length","Race"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/legend/LegendChatMessage.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,MAAM,EACNC,OAAO,EACPC,MAAM,EACNC,aAAa,QACR,eAAe;AACtB,SAASC,UAAU,QAAQ,cAAc;AACzC,SAASC,IAAI,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AAElD,SAASC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ChChD,IAAA,CAAC9B,UAAU,CAACyE,IAAI;MAAAK,QAAA,EAAEA;IAAQ,CAAkB;EAAC,CAC9B,CAAC;AAEtB,CAAC","ignoreList":[]}
|
|
@@ -11,7 +11,7 @@ import { getCopyableMessageText, getMessageToolboxItems } from "./messageToolbox
|
|
|
11
11
|
import { MessageToolboxWrapper } from "./MessageToolboxWrapper.js";
|
|
12
12
|
import { useSendMessage } from "../../../hooks/message/useSendMessage.js";
|
|
13
13
|
import { useChatContext, useChatDetailContext } from "../../../context/index.js";
|
|
14
|
-
import { GroupPermission } from '@droppii/openim-rn-client-sdk';
|
|
14
|
+
import { GroupPermission, MessageType } from '@droppii/openim-rn-client-sdk';
|
|
15
15
|
import { useHasGroupPermission } from "../../../hooks/useGroupPermission.js";
|
|
16
16
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
17
17
|
// Android only: this Modal's native window is added/removed asynchronously
|
|
@@ -23,6 +23,7 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
23
23
|
// delayed spurious event is still suppressed instead of replaying a stale
|
|
24
24
|
// scrollTo. See `show`/`hide` below for the observed sequence.
|
|
25
25
|
const UNFREEZE_DELAY_MS = 300;
|
|
26
|
+
const EXPANDABLE_TYPES = [MessageType.TextMessage, MessageType.AtTextMessage, MessageType.UrlTextMessage, MessageType.QuoteMessage];
|
|
26
27
|
export const MessageToolboxOverlay = /*#__PURE__*/forwardRef(({
|
|
27
28
|
currentUserId = '',
|
|
28
29
|
customMessageItemFactory,
|
|
@@ -149,10 +150,15 @@ export const MessageToolboxOverlay = /*#__PURE__*/forwardRef(({
|
|
|
149
150
|
setQuotedMessage(message);
|
|
150
151
|
hide();
|
|
151
152
|
}, [message, hide, setQuotedMessage]);
|
|
153
|
+
const overlayMessageId = message?.clientMsgID || message?.serverMsgID || '';
|
|
152
154
|
if (!visible || !message || !rect) {
|
|
153
155
|
return null;
|
|
154
156
|
}
|
|
155
157
|
const isOutgoing = message.sendID === currentUserId;
|
|
158
|
+
// Only the types that can show `Xem thêm` get a touchable clone. File
|
|
159
|
+
// download and consumer custom nodes carry their own handlers and stay
|
|
160
|
+
// inert.
|
|
161
|
+
const isCloneInteractive = EXPANDABLE_TYPES.includes(message.contentType) && !customMessageItemFactory?.(message);
|
|
156
162
|
const showSenderGutter = isGroupConversation && !isOutgoing;
|
|
157
163
|
const showName = showSenderGutter && (groupPosition === 'first' || groupPosition === 'solo');
|
|
158
164
|
const showAvatar = showSenderGutter && (groupPosition === 'last' || groupPosition === 'solo');
|
|
@@ -168,9 +174,12 @@ export const MessageToolboxOverlay = /*#__PURE__*/forwardRef(({
|
|
|
168
174
|
}), /*#__PURE__*/_jsx(MessageToolboxWrapper, {
|
|
169
175
|
rect: rect,
|
|
170
176
|
isOutgoing: isOutgoing,
|
|
177
|
+
isCloneInteractive: isCloneInteractive,
|
|
178
|
+
onDismiss: hide,
|
|
171
179
|
message: /*#__PURE__*/_jsx(LegendChatMessage, {
|
|
172
180
|
message: message,
|
|
173
|
-
messageId:
|
|
181
|
+
messageId: overlayMessageId,
|
|
182
|
+
isPreview: true,
|
|
174
183
|
isOutgoing: isOutgoing,
|
|
175
184
|
createdAtTime: message.sendTime || message.createTime,
|
|
176
185
|
customMessageItemFactory: customMessageItemFactory,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["forwardRef","useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","Modal","Pressable","StyleSheet","Clipboard","UIUtils","trans","LegendChatMessage","MessageToolboxMenu","getCopyableMessageText","getMessageToolboxItems","MessageToolboxWrapper","useSendMessage","useChatContext","useChatDetailContext","GroupPermission","useHasGroupPermission","jsx","_jsx","jsxs","_jsxs","UNFREEZE_DELAY_MS","MessageToolboxOverlay","currentUserId","customMessageItemFactory","onPinMessage","onUnpinMessage","freeze","ref","setQuotedMessage","conversation","isGroupConversation","generateChatDetailLink","visible","setVisible","message","setMessage","undefined","rect","setRect","groupPosition","setGroupPosition","toolboxItems","retryMessage","revokeMessage","isPinAllowed","PinMessage","unfreezeTimeoutRef","clearPendingUnfreeze","current","clearTimeout","hide","setTimeout","value","show","msg","msgRect","msgGroupPosition","toolboxNotAvailable","Object","values","filter","Boolean","length","handleCopyMessage","text","setString","toast","open","title","theme","handleCopyMessageLink","link","targetConversationId","conversationID","targetMessageId","clientMsgID","handleRetryMessage","handleRevokeMessage","error","console","handlePinMessage","handleUnpinMessage","handleQuoteMessage","isOutgoing","sendID","showSenderGutter","showName","showAvatar","transparent","statusBarTranslucent","animationType","onRequestClose","children","style","styles","backdrop","onPress","messageId","
|
|
1
|
+
{"version":3,"names":["forwardRef","useCallback","useEffect","useImperativeHandle","useMemo","useRef","useState","Modal","Pressable","StyleSheet","Clipboard","UIUtils","trans","LegendChatMessage","MessageToolboxMenu","getCopyableMessageText","getMessageToolboxItems","MessageToolboxWrapper","useSendMessage","useChatContext","useChatDetailContext","GroupPermission","MessageType","useHasGroupPermission","jsx","_jsx","jsxs","_jsxs","UNFREEZE_DELAY_MS","EXPANDABLE_TYPES","TextMessage","AtTextMessage","UrlTextMessage","QuoteMessage","MessageToolboxOverlay","currentUserId","customMessageItemFactory","onPinMessage","onUnpinMessage","freeze","ref","setQuotedMessage","conversation","isGroupConversation","generateChatDetailLink","visible","setVisible","message","setMessage","undefined","rect","setRect","groupPosition","setGroupPosition","toolboxItems","retryMessage","revokeMessage","isPinAllowed","PinMessage","unfreezeTimeoutRef","clearPendingUnfreeze","current","clearTimeout","hide","setTimeout","value","show","msg","msgRect","msgGroupPosition","toolboxNotAvailable","Object","values","filter","Boolean","length","handleCopyMessage","text","setString","toast","open","title","theme","handleCopyMessageLink","link","targetConversationId","conversationID","targetMessageId","clientMsgID","handleRetryMessage","handleRevokeMessage","error","console","handlePinMessage","handleUnpinMessage","handleQuoteMessage","overlayMessageId","serverMsgID","isOutgoing","sendID","isCloneInteractive","includes","contentType","showSenderGutter","showName","showAvatar","transparent","statusBarTranslucent","animationType","onRequestClose","children","style","styles","backdrop","onPress","onDismiss","messageId","isPreview","createdAtTime","sendTime","createTime","toolbox","showCopyMessageLink","showPinMessage","showUnpinMessage","onCopyMessage","onCopyMessageLink","onRetryMessage","onRevokeMessage","onQuoteMessage","displayName","create","position","top","left","right","bottom","backgroundColor"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/messageToolbox/MessageToolboxOverlay.tsx"],"mappings":";;AAAA,SACEA,UAAU,EACVC,WAAW,EACXC,SAAS,EACTC,mBAAmB,EACnBC,OAAO,EACPC,MAAM,EACNC,QAAQ,QACH,OAAO;AACd,SAASC,KAAK,EAAEC,SAAS,EAAEC,UAAU,QAAQ,cAAc;AAC3D,OAAOC,SAAS,MAAM,mCAAmC;AACzD,SAASC,OAAO,QAAQ,2BAAwB;AAChD,SAASC,KAAK,QAAQ,+BAAsB;AAC5C,SAASC,iBAAiB,QAAQ,gCAA6B;AAC/D,SAASC,kBAAkB,QAAQ,yBAAsB;AACzD,SACEC,sBAAsB,EACtBC,sBAAsB,QACjB,2BAAwB;AAM/B,SAASC,qBAAqB,QAAQ,4BAAyB;AAG/D,SAASC,cAAc,QAAQ,0CAAuC;AACtE,SAASC,cAAc,EAAEC,oBAAoB,QAAQ,2BAAkB;AACvE,SACEC,eAAe,EACfC,WAAW,QAEN,+BAA+B;AACtC,SAASC,qBAAqB,QAAQ,sCAAmC;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAG1E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,iBAAiB,GAAG,GAAG;AAE7B,MAAMC,gBAA0B,GAAG,CACjCP,WAAW,CAACQ,WAAW,EACvBR,WAAW,CAACS,aAAa,EACzBT,WAAW,CAACU,cAAc,EAC1BV,WAAW,CAACW,YAAY,CACzB;AAaD,OAAO,MAAMC,qBAAqB,gBAAGlC,UAAU,CAI7C,CACE;EACEmC,aAAa,GAAG,EAAE;EAClBC,wBAAwB;EACxBC,YAAY;EACZC,cAA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X,kBAAkB;QAAA,GACbwC,YAAY;QAChBoE,mBAAmB,EACjBpE,YAAY,CAACoE,mBAAmB,IAAI,CAAC,CAAC9E,sBACvC;QACD+E,cAAc,EAAErE,YAAY,CAACqE,cAAc,IAAIlE,YAAa;QAC5DmE,gBAAgB,EAAEtE,YAAY,CAACsE,gBAAgB,IAAInE,YAAa;QAChEoE,aAAa,EAAEjD,iBAAkB;QACjCkD,iBAAiB,EAAE3C,qBAAsB;QACzC9C,YAAY,EAAEwD,gBAAiB;QAC/BvD,cAAc,EAAEwD,kBAAmB;QACnCiC,cAAc,EAAEtC,kBAAmB;QACnCuC,eAAe,EAAEtC,mBAAoB;QACrCuC,cAAc,EAAElC;MAAmB,CACpC;IACF,CACF,CAAC;EAAA,CACG,CAAC;AAEZ,CACF,CAAC;AAED7D,qBAAqB,CAACgG,WAAW,GAAG,uBAAuB;AAE3D,MAAMlB,MAAM,GAAGvG,UAAU,CAAC0H,MAAM,CAAC;EAC/BlB,QAAQ,EAAE;IACRmB,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,eAAe,EAAE;EACnB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,17 +1,24 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useCallback, memo } from 'react';
|
|
4
|
-
import { View, Platform, useWindowDimensions } from 'react-native';
|
|
3
|
+
import { useCallback, memo, useState } from 'react';
|
|
4
|
+
import { View, ScrollView, Pressable, StyleSheet, Platform, useWindowDimensions } from 'react-native';
|
|
5
5
|
import { useAnimatedStyle, useDerivedValue, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
6
6
|
import { messageStyles } from "../legend/messageTypes.js";
|
|
7
7
|
import Animated from 'react-native-reanimated';
|
|
8
8
|
import { useSafeAreaInsets } from 'react-native-safe-area-context';
|
|
9
|
+
import { ClonePreviewBudgetContext } from "../../../components/messages/PreviewScrollableText.js";
|
|
10
|
+
import { useClonePreview } from "./useClonePreview.js";
|
|
9
11
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
10
12
|
const MENU_GAP = 8;
|
|
13
|
+
// A clone is never squeezed below this, even if the toolbox is unusually tall —
|
|
14
|
+
// better to overflow slightly than to render a sliver of a message.
|
|
15
|
+
const MIN_CLONE_HEIGHT = 120;
|
|
11
16
|
export const MessageToolboxWrapper = /*#__PURE__*/memo(({
|
|
12
17
|
isOutgoing,
|
|
13
18
|
rect,
|
|
14
19
|
message,
|
|
20
|
+
isCloneInteractive,
|
|
21
|
+
onDismiss,
|
|
15
22
|
reaction,
|
|
16
23
|
toolbox
|
|
17
24
|
}) => {
|
|
@@ -23,6 +30,14 @@ export const MessageToolboxWrapper = /*#__PURE__*/memo(({
|
|
|
23
30
|
const {
|
|
24
31
|
height: windowHeight
|
|
25
32
|
} = useWindowDimensions();
|
|
33
|
+
|
|
34
|
+
// Mirrors `toolboxHeight` on the JS side. Deriving the clone's maxHeight
|
|
35
|
+
// from the shared value instead would close a loop — maxHeight feeds the
|
|
36
|
+
// clone's height, which feeds `messageHeight`, which feeds `translateY`.
|
|
37
|
+
// The toolbox's own height does not depend on the clone, so reading it
|
|
38
|
+
// here settles in one pass. Not ratcheted: the menu's item set varies with
|
|
39
|
+
// permissions, and a high-water mark could never shrink back.
|
|
40
|
+
const [chromeHeight, setChromeHeight] = useState(0);
|
|
26
41
|
const onMessageCloneLayout = useCallback(({
|
|
27
42
|
nativeEvent
|
|
28
43
|
}) => {
|
|
@@ -32,12 +47,20 @@ export const MessageToolboxWrapper = /*#__PURE__*/memo(({
|
|
|
32
47
|
nativeEvent
|
|
33
48
|
}) => {
|
|
34
49
|
toolboxHeight.value = nativeEvent.layout.height;
|
|
50
|
+
setChromeHeight(nativeEvent.layout.height);
|
|
35
51
|
}, [toolboxHeight]);
|
|
36
52
|
const onReactionLayout = useCallback(({
|
|
37
53
|
nativeEvent
|
|
38
54
|
}) => {
|
|
39
55
|
reactionHeight.value = nativeEvent.layout.height;
|
|
40
56
|
}, [reactionHeight]);
|
|
57
|
+
|
|
58
|
+
// Same quantities `translateY` below subtracts, so the clone is never
|
|
59
|
+
// allowed to be taller than the space that shift can actually recover —
|
|
60
|
+
// `translateY` only moves up, so an over-tall clone pushes the toolbox off
|
|
61
|
+
// the bottom of the screen with no way back.
|
|
62
|
+
const maxCloneHeight = Math.max(windowHeight - insets.top - topOffset - (insets.bottom || 32) - chromeHeight - 3 * MENU_GAP, MIN_CLONE_HEIGHT);
|
|
63
|
+
const preview = useClonePreview(maxCloneHeight);
|
|
41
64
|
const translateY = useDerivedValue(() => {
|
|
42
65
|
const menuGap = (reactionHeight.value > 0 ? MENU_GAP : 0) + (toolboxHeight.value > 0 ? MENU_GAP : 0);
|
|
43
66
|
const overflowBottom = Math.max(rect.y, insets.top) + topOffset + messageHeight.value + toolboxHeight.value + (insets.bottom || 32) + menuGap - windowHeight;
|
|
@@ -50,16 +73,39 @@ export const MessageToolboxWrapper = /*#__PURE__*/memo(({
|
|
|
50
73
|
gap: MENU_GAP,
|
|
51
74
|
transform: [{
|
|
52
75
|
translateY: translateY.value
|
|
53
|
-
}]
|
|
76
|
+
}],
|
|
77
|
+
// Until the toolbox has measured, the clone's budget is over-large and
|
|
78
|
+
// `translateY` is computed against a toolbox height of 0, which produces
|
|
79
|
+
// a visible two-stage slide on every open. Lay out, then reveal.
|
|
80
|
+
opacity: chromeHeight > 0 ? 1 : 0
|
|
54
81
|
}));
|
|
55
82
|
return /*#__PURE__*/_jsxs(Animated.View, {
|
|
56
83
|
pointerEvents: "box-none",
|
|
57
84
|
style: [isOutgoing ? messageStyles.messageRowRight : messageStyles.messageRowLeft, containerStyles],
|
|
58
|
-
children: [/*#__PURE__*/_jsx(
|
|
59
|
-
|
|
85
|
+
children: [/*#__PURE__*/_jsx(ScrollView, {
|
|
86
|
+
style: [styles.clone, {
|
|
87
|
+
maxHeight: maxCloneHeight
|
|
88
|
+
}],
|
|
60
89
|
collapsable: false,
|
|
61
90
|
onLayout: onMessageCloneLayout,
|
|
62
|
-
|
|
91
|
+
onContentSizeChange: preview.onContentSizeChange,
|
|
92
|
+
bounces: false,
|
|
93
|
+
showsVerticalScrollIndicator: false,
|
|
94
|
+
children: /*#__PURE__*/_jsx(Pressable, {
|
|
95
|
+
onPress: onDismiss,
|
|
96
|
+
disabled: preview.dismissDisabled,
|
|
97
|
+
children: /*#__PURE__*/_jsxs(View, {
|
|
98
|
+
pointerEvents: isCloneInteractive ? 'box-none' : 'none',
|
|
99
|
+
style: isOutgoing ? styles.rowEnd : styles.rowStart,
|
|
100
|
+
children: [preview.dismissDisabled && /*#__PURE__*/_jsx(Pressable, {
|
|
101
|
+
style: StyleSheet.absoluteFill,
|
|
102
|
+
onPress: onDismiss
|
|
103
|
+
}), /*#__PURE__*/_jsx(ClonePreviewBudgetContext.Provider, {
|
|
104
|
+
value: preview.budget,
|
|
105
|
+
children: message
|
|
106
|
+
})]
|
|
107
|
+
})
|
|
108
|
+
})
|
|
63
109
|
}), /*#__PURE__*/_jsx(View, {
|
|
64
110
|
collapsable: false,
|
|
65
111
|
onLayout: onReactionLayout,
|
|
@@ -72,4 +118,31 @@ export const MessageToolboxWrapper = /*#__PURE__*/memo(({
|
|
|
72
118
|
});
|
|
73
119
|
});
|
|
74
120
|
MessageToolboxWrapper.displayName = 'MessageToolboxWrapper';
|
|
121
|
+
const styles = StyleSheet.create({
|
|
122
|
+
// maxHeight belongs on the ScrollView itself — inside an auto-height parent a
|
|
123
|
+
// ScrollView collapses to zero.
|
|
124
|
+
//
|
|
125
|
+
// `rowStart`/`rowEnd` reproduce the contract `LegendChatMessage` gets from
|
|
126
|
+
// the real list row: its root (`maxWidth: '80%'`) must be the DIRECT child
|
|
127
|
+
// of a definite-width, non-stretching (`alignItems`) View. Any auto-width
|
|
128
|
+
// node in between (an extra View, a non-stretched Pressable) leaves the 80%
|
|
129
|
+
// with no definite basis, and Yoga collapses the bubble toward min-content —
|
|
130
|
+
// on device, "M2" wrapping to "M" / "2". The Pressable sits outside this
|
|
131
|
+
// View, stretched by the ScrollView's content container, so the chain from
|
|
132
|
+
// the clone's measured width down to the bubble stays definite throughout.
|
|
133
|
+
// Not `messageRowLeft/Right` directly: the outer Animated.View already
|
|
134
|
+
// applies their padding, which would double up here.
|
|
135
|
+
clone: {
|
|
136
|
+
flexGrow: 0,
|
|
137
|
+
width: '100%'
|
|
138
|
+
},
|
|
139
|
+
rowStart: {
|
|
140
|
+
width: '100%',
|
|
141
|
+
alignItems: 'flex-start'
|
|
142
|
+
},
|
|
143
|
+
rowEnd: {
|
|
144
|
+
width: '100%',
|
|
145
|
+
alignItems: 'flex-end'
|
|
146
|
+
}
|
|
147
|
+
});
|
|
75
148
|
//# sourceMappingURL=MessageToolboxWrapper.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","memo","View","Platform","useWindowDimensions","useAnimatedStyle","useDerivedValue","useSharedValue","withTiming","messageStyles","Animated","useSafeAreaInsets","jsx","_jsx","jsxs","_jsxs","MENU_GAP","MessageToolboxWrapper","isOutgoing","rect","message","reaction","toolbox","insets","messageHeight","reactionHeight","toolboxHeight","topOffset","OS","top","height","windowHeight","onMessageCloneLayout","nativeEvent","value","layout","onToolboxLayout","onReactionLayout","
|
|
1
|
+
{"version":3,"names":["useCallback","memo","useState","View","ScrollView","Pressable","StyleSheet","Platform","useWindowDimensions","useAnimatedStyle","useDerivedValue","useSharedValue","withTiming","messageStyles","Animated","useSafeAreaInsets","ClonePreviewBudgetContext","useClonePreview","jsx","_jsx","jsxs","_jsxs","MENU_GAP","MIN_CLONE_HEIGHT","MessageToolboxWrapper","isOutgoing","rect","message","isCloneInteractive","onDismiss","reaction","toolbox","insets","messageHeight","reactionHeight","toolboxHeight","topOffset","OS","top","height","windowHeight","chromeHeight","setChromeHeight","onMessageCloneLayout","nativeEvent","value","layout","onToolboxLayout","onReactionLayout","maxCloneHeight","Math","max","bottom","preview","translateY","menuGap","overflowBottom","y","min","containerStyles","left","x","width","gap","transform","opacity","pointerEvents","style","messageRowRight","messageRowLeft","children","styles","clone","maxHeight","collapsable","onLayout","onContentSizeChange","bounces","showsVerticalScrollIndicator","onPress","disabled","dismissDisabled","rowEnd","rowStart","absoluteFill","Provider","budget","displayName","create","flexGrow","alignItems"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/messageToolbox/MessageToolboxWrapper.tsx"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,IAAI,EAAEC,QAAQ,QAAQ,OAAO;AACnD,SACEC,IAAI,EACJC,UAAU,EACVC,SAAS,EACTC,UAAU,EACVC,QAAQ,EACRC,mBAAmB,QAEd,cAAc;AACrB,SACEC,gBAAgB,EAChBC,eAAe,EACfC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAEhC,SAASC,aAAa,QAAQ,2BAAwB;AACtD,OAAOC,QAAQ,MAAM,yBAAyB;AAC9C,SAASC,iBAAiB,QAAQ,gCAAgC;AAClE,SAASC,yBAAyB,QAAQ,uDAAoD;AAC9F,SAASC,eAAe,QAAQ,sBAAmB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAEpD,MAAMC,QAAQ,GAAG,CAAC;AAClB;AACA;AACA,MAAMC,gBAAgB,GAAG,GAAG;AAuB5B,OAAO,MAAMC,qBAAqB,gBAAGvB,IAAI,CACvC,CAAC;EACCwB,UAAU;EACVC,IAAI;EACJC,OAAO;EACPC,kBAAkB;EAClBC,SAAS;EACTC,QAAQ;EACRC;AAC0B,CAAC,KAAK;EAChC,MAAMC,MAAM,GAAGjB,iBAAiB,CAAC,CAAC;EAClC,MAAMkB,aAAa,GAAGtB,cAAc,CAAC,CAAC,CAAC;EACvC,MAAMuB,cAAc,GAAGvB,cAAc,CAAC,CAAC,CAAC;EACxC,MAAMwB,aAAa,GAAGxB,cAAc,CAAC,CAAC,CAAC;EACvC,MAAM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C;IACX3B,KAAK,EAAE;EACT,CAAC;EACDqB,QAAQ,EAAE;IACRrB,KAAK,EAAE,MAAM;IACb4B,UAAU,EAAE;EACd,CAAC;EACDR,MAAM,EAAE;IACNpB,KAAK,EAAE,MAAM;IACb4B,UAAU,EAAE;EACd;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { useCallback, useMemo, useState } from 'react';
|
|
4
|
+
/**
|
|
5
|
+
* Wiring between the overlay's clone and the expanded text that scrolls
|
|
6
|
+
* inside it (see `PreviewScrollableText`).
|
|
7
|
+
*
|
|
8
|
+
* `dismissDisabled`: the clone sits in a tap-to-dismiss Pressable. On iOS a
|
|
9
|
+
* ScrollView refuses to scroll while an ANCESTOR holds the JS responder
|
|
10
|
+
* (`RCTScrollView _shouldDisableScrollInteraction`), so with the Pressable
|
|
11
|
+
* enabled a drag on the text never scrolls — it ends as a tap and closes the
|
|
12
|
+
* overlay. While the text is scrollable the Pressable stands down; the
|
|
13
|
+
* backdrop and the menu still dismiss.
|
|
14
|
+
*/
|
|
15
|
+
export const useClonePreview = maxHeight => {
|
|
16
|
+
const [contentHeight, setContentHeight] = useState(0);
|
|
17
|
+
const [textScrollable, setTextScrollable] = useState(false);
|
|
18
|
+
const onContentSizeChange = useCallback((_width, height) => setContentHeight(height), []);
|
|
19
|
+
const budget = useMemo(() => ({
|
|
20
|
+
maxHeight,
|
|
21
|
+
contentHeight,
|
|
22
|
+
onScrollableChange: setTextScrollable
|
|
23
|
+
}), [maxHeight, contentHeight]);
|
|
24
|
+
return {
|
|
25
|
+
budget,
|
|
26
|
+
onContentSizeChange,
|
|
27
|
+
dismissDisabled: textScrollable
|
|
28
|
+
};
|
|
29
|
+
};
|
|
30
|
+
//# sourceMappingURL=useClonePreview.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useMemo","useState","useClonePreview","maxHeight","contentHeight","setContentHeight","textScrollable","setTextScrollable","onContentSizeChange","_width","height","budget","onScrollableChange","dismissDisabled"],"sourceRoot":"../../../../../src","sources":["screens/chat-detail/messageToolbox/useClonePreview.ts"],"mappings":";;AAAA,SAASA,WAAW,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAGtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAIC,SAAiB,IAAK;EACpD,MAAM,CAACC,aAAa,EAAEC,gBAAgB,CAAC,GAAGJ,QAAQ,CAAC,CAAC,CAAC;EACrD,MAAM,CAACK,cAAc,EAAEC,iBAAiB,CAAC,GAAGN,QAAQ,CAAC,KAAK,CAAC;EAE3D,MAAMO,mBAAmB,GAAGT,WAAW,CACrC,CAACU,MAAc,EAAEC,MAAc,KAAKL,gBAAgB,CAACK,MAAM,CAAC,EAC5D,EACF,CAAC;EAED,MAAMC,MAAM,GAAGX,OAAO,CACpB,OAAO;IACLG,SAAS;IACTC,aAAa;IACbQ,kBAAkB,EAAEL;EACtB,CAAC,CAAC,EACF,CAACJ,SAAS,EAAEC,aAAa,CAC3B,CAAC;EAED,OAAO;IAAEO,MAAM;IAAEH,mBAAmB;IAAEK,eAAe,EAAEP;EAAe,CAAC;AACzE,CAAC","ignoreList":[]}
|
|
@@ -15,4 +15,9 @@ export let DChatQuickActionItemType = /*#__PURE__*/function (DChatQuickActionIte
|
|
|
15
15
|
DChatQuickActionItemType["ScamWarning"] = "ScamWarning";
|
|
16
16
|
return DChatQuickActionItemType;
|
|
17
17
|
}({});
|
|
18
|
+
|
|
19
|
+
/**
|
|
20
|
+
* @internal Imperative handle to the composer's attachment/sticker panel,
|
|
21
|
+
* used by ChatDetail for tap-outside dismiss. Not part of the public API.
|
|
22
|
+
*/
|
|
18
23
|
//# sourceMappingURL=types.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["DChatPannelActionItemType","DChatQuickActionItemType"],"sourceRoot":"../../../../src","sources":["screens/chat-detail/types.ts"],"mappings":";;AAUA,WAAYA,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA;AASrC,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA","ignoreList":[]}
|
|
1
|
+
{"version":3,"names":["DChatPannelActionItemType","DChatQuickActionItemType"],"sourceRoot":"../../../../src","sources":["screens/chat-detail/types.ts"],"mappings":";;AAUA,WAAYA,yBAAyB,0BAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAzBA,yBAAyB;EAAA,OAAzBA,yBAAyB;AAAA;AASrC,WAAYC,wBAAwB,0BAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAxBA,wBAAwB;EAAA,OAAxBA,wBAAwB;AAAA;;AA2FpC;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -0,0 +1,28 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { create } from 'zustand';
|
|
4
|
+
import { expandedKey, withoutSurface } from "../utils/expandableText.js";
|
|
5
|
+
export { expandedKey };
|
|
6
|
+
export const useExpandedMessageStore = create()((set, get) => ({
|
|
7
|
+
expanded: {},
|
|
8
|
+
expand: (surface, messageId) => {
|
|
9
|
+
// A message with no id would alias onto `${surface}:` and expand every
|
|
10
|
+
// other id-less message with it.
|
|
11
|
+
if (!messageId) return;
|
|
12
|
+
const key = expandedKey(surface, messageId);
|
|
13
|
+
if (get().expanded[key]) return;
|
|
14
|
+
set({
|
|
15
|
+
expanded: {
|
|
16
|
+
...get().expanded,
|
|
17
|
+
[key]: true
|
|
18
|
+
}
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
clearSurface: surface => {
|
|
22
|
+
const next = withoutSurface(get().expanded, surface);
|
|
23
|
+
if (next !== get().expanded) set({
|
|
24
|
+
expanded: next
|
|
25
|
+
});
|
|
26
|
+
}
|
|
27
|
+
}));
|
|
28
|
+
//# sourceMappingURL=expandedMessage.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["create","expandedKey","withoutSurface","useExpandedMessageStore","set","get","expanded","expand","surface","messageId","key","clearSurface","next"],"sourceRoot":"../../../src","sources":["store/expandedMessage.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAChC,SACEC,WAAW,EACXC,cAAc,QAET,4BAAyB;AAGhC,SAASD,WAAW;AAapB,OAAO,MAAME,uBAAuB,GAAGH,MAAM,CAAuB,CAAC,CACnE,CAACI,GAAG,EAAEC,GAAG,MAAM;EACbC,QAAQ,EAAE,CAAC,CAAC;EAEZC,MAAM,EAAEA,CAACC,OAAO,EAAEC,SAAS,KAAK;IAC9B;IACA;IACA,IAAI,CAACA,SAAS,EAAE;IAEhB,MAAMC,GAAG,GAAGT,WAAW,CAACO,OAAO,EAAEC,SAAS,CAAC;IAC3C,IAAIJ,GAAG,CAAC,CAAC,CAACC,QAAQ,CAACI,GAAG,CAAC,EAAE;IAEzBN,GAAG,CAAC;MAAEE,QAAQ,EAAE;QAAE,GAAGD,GAAG,CAAC,CAAC,CAACC,QAAQ;QAAE,CAACI,GAAG,GAAG;MAAK;IAAE,CAAC,CAAC;EACvD,CAAC;EAEDC,YAAY,EAAGH,OAAO,IAAK;IACzB,MAAMI,IAAI,GAAGV,cAAc,CAACG,GAAG,CAAC,CAAC,CAACC,QAAQ,EAAEE,OAAO,CAAC;IACpD,IAAII,IAAI,KAAKP,GAAG,CAAC,CAAC,CAACC,QAAQ,EAAEF,GAAG,CAAC;MAAEE,QAAQ,EAAEM;IAAK,CAAC,CAAC;EACtD;AACF,CAAC,CACH,CAAC","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ import { ChatEvent } from "../types/events.js";
|
|
|
7
7
|
import { mergeMessages } from "../utils/message.js";
|
|
8
8
|
import { isMessageRevoked } from "../utils/messageUtils.js";
|
|
9
9
|
import { useConversationStore } from "./conversation.js";
|
|
10
|
+
import { perfMark } from "../utils/perf-marker.js";
|
|
10
11
|
|
|
11
12
|
// Smaller than a typical "load more" page size elsewhere in the app on
|
|
12
13
|
// purpose: each page becomes a single prepend batch in ChatListLegend, and a
|
|
@@ -73,7 +74,16 @@ export const useMessageStore = create()((set, get) => ({
|
|
|
73
74
|
viewType: ViewType.History,
|
|
74
75
|
applicationType: applicationType
|
|
75
76
|
};
|
|
77
|
+
perfMark('history_page_request', {
|
|
78
|
+
loadMore: !!loadMore,
|
|
79
|
+
loaded: get().messages.length
|
|
80
|
+
});
|
|
76
81
|
const res = await OpenIMSDK.getAdvancedHistoryMessageListApp(params);
|
|
82
|
+
perfMark('history_page_response', {
|
|
83
|
+
loadMore: !!loadMore,
|
|
84
|
+
received: res.messageList?.length ?? 0,
|
|
85
|
+
isEnd: !!res.isEnd
|
|
86
|
+
});
|
|
77
87
|
if (conversationId === useConversationStore.getState().currentConversationId) {
|
|
78
88
|
set(state => ({
|
|
79
89
|
messages: loadMore ? mergeMessages(state.messages, res.messageList || []) : res.messageList || [],
|
|
@@ -81,6 +91,10 @@ export const useMessageStore = create()((set, get) => ({
|
|
|
81
91
|
initLoading: false,
|
|
82
92
|
moreOldLoading: false
|
|
83
93
|
}));
|
|
94
|
+
perfMark('history_list_update', {
|
|
95
|
+
loadMore: !!loadMore,
|
|
96
|
+
total: get().messages.length
|
|
97
|
+
});
|
|
84
98
|
}
|
|
85
99
|
} catch (error) {
|
|
86
100
|
console.log('Failed to get more old messages', error);
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["create","DeviceEventEmitter","OpenIMSDK","MessageType","ViewType","ChatEvent","mergeMessages","isMessageRevoked","useConversationStore","PAGE_SIZE","useMessageStore","set","get","messages","hasMoreOld","hasMoreNew","initLoading","moreOldLoading","moreNewLoading","setMessages","hasMore","pushNewMessage","message","state","updateOneMessage","tmpList","idx","findIndex","msg","clientMsgID","deleteOneMessage","filter","getMoreOldMessages","loadMore","applicationType","conversationId","params","count","startClientMsgID","conversationID","viewType","History","
|
|
1
|
+
{"version":3,"names":["create","DeviceEventEmitter","OpenIMSDK","MessageType","ViewType","ChatEvent","mergeMessages","isMessageRevoked","useConversationStore","perfMark","PAGE_SIZE","useMessageStore","set","get","messages","hasMoreOld","hasMoreNew","initLoading","moreOldLoading","moreNewLoading","setMessages","hasMore","pushNewMessage","message","state","updateOneMessage","tmpList","idx","findIndex","msg","clientMsgID","deleteOneMessage","filter","getMoreOldMessages","loadMore","applicationType","conversationId","params","count","startClientMsgID","conversationID","viewType","History","loaded","length","res","getAdvancedHistoryMessageListApp","received","messageList","isEnd","getState","currentConversationId","total","error","console","log","getMoreNewMessages","getAdvancedHistoryMessageListReverseApp","Promise","resolve","setTimeout","emit","ScrollToBottom","searchMessages","startClientMsgId","searchPrevParams","Search","searchNextParams","searchCurrentParams","clientMsgIDList","findMessageList","searchPrevRes","searchNextRes","currentMessages","findResultItems","find","item","newMessages","targetMessage","TargetMessageUnavailable","ScrollToMessage","clientMessageId","reset","markMessageRevoked","alreadyRevoked","some","contentType","RevokeMessage","MessageRevoked","revokeQuotedReferences","forEach","quoteElem","quoteMessage","atTextElem"],"sourceRoot":"../../../src","sources":["store/message.ts"],"mappings":";;AAAA,SAASA,MAAM,QAAQ,SAAS;AAChC,SAASC,kBAAkB,QAAQ,cAAc;AACjD,OAAOC,SAAS,IACdC,WAAW,EACXC,QAAQ,QACH,+BAA+B;AACtC,SAASC,SAAS,QAAQ,oBAAiB;AAO3C,SAASC,aAAa,QAAQ,qBAAkB;AAChD,SAASC,gBAAgB,QAAQ,0BAAuB;AACxD,SAASC,oBAAoB,QAAQ,mBAAgB;AACrD,S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EAAiB,CAAC,GAAGd,eAAe,CAACuC,QAAQ,CAAC,CAAC;EAEjEpC,QAAQ,CAAC4E,OAAO,CAAE7D,GAAG,IAAK;IACxB,IAAIA,GAAG,CAAC8D,SAAS,EAAEC,YAAY,EAAE9D,WAAW,KAAKA,WAAW,EAAE;MAC5DL,gBAAgB,CAAC;QACfK,WAAW,EAAED,GAAG,CAACC,WAAW;QAC5B6D,SAAS,EAAE;UACT,GAAG9D,GAAG,CAAC8D,SAAS;UAChBC,YAAY,EAAE;YACZ,GAAG/D,GAAG,CAAC8D,SAAS,CAACC,YAAY;YAC7BN,WAAW,EAAEnF,WAAW,CAACoF;UAC3B;QACF;MACF,CAAC,CAAC;IACJ;IAEA,IAAI1D,GAAG,CAACgE,UAAU,EAAED,YAAY,EAAE9D,WAAW,KAAKA,WAAW,EAAE;MAC7DL,gBAAgB,CAAC;QACfK,WAAW,EAAED,GAAG,CAACC,WAAW;QAC5B+D,UAAU,EAAE;UACV,GAAGhE,GAAG,CAACgE,UAAU;UACjBD,YAAY,EAAE;YACZ,GAAG/D,GAAG,CAACgE,UAAU,CAACD,YAAY;YAC9BN,WAAW,EAAEnF,WAAW,CAACoF;UAC3B;QACF;MACF,CAAC,CAAC;IACJ;EACF,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Per-touch state for dismissing the composer's attachment/sticker panel by
|
|
5
|
+
* tapping the chat timeline: a touch that began while the panel was open and
|
|
6
|
+
* ended without dragging is a dismiss tap. Drag detection is explicit — a
|
|
7
|
+
* movement threshold or the list's scroll-begin — since the touch is only
|
|
8
|
+
* observed (touch events), never claimed as the JS responder.
|
|
9
|
+
*/
|
|
10
|
+
export const DISMISS_DRAG_THRESHOLD_PX = 10;
|
|
11
|
+
export const IDLE_DISMISS_TOUCH = {
|
|
12
|
+
panelOpenAtStart: false,
|
|
13
|
+
dragged: false,
|
|
14
|
+
startX: 0,
|
|
15
|
+
startY: 0
|
|
16
|
+
};
|
|
17
|
+
export const startDismissTouch = (panelOpen, x, y) => ({
|
|
18
|
+
panelOpenAtStart: panelOpen,
|
|
19
|
+
dragged: false,
|
|
20
|
+
startX: x,
|
|
21
|
+
startY: y
|
|
22
|
+
});
|
|
23
|
+
export const moveDismissTouch = (touch, x, y) => {
|
|
24
|
+
if (touch.dragged) return touch;
|
|
25
|
+
const movedBeyondThreshold = Math.abs(x - touch.startX) > DISMISS_DRAG_THRESHOLD_PX || Math.abs(y - touch.startY) > DISMISS_DRAG_THRESHOLD_PX;
|
|
26
|
+
return movedBeyondThreshold ? {
|
|
27
|
+
...touch,
|
|
28
|
+
dragged: true
|
|
29
|
+
} : touch;
|
|
30
|
+
};
|
|
31
|
+
export const markDismissTouchDragged = touch => touch.dragged ? touch : {
|
|
32
|
+
...touch,
|
|
33
|
+
dragged: true
|
|
34
|
+
};
|
|
35
|
+
|
|
36
|
+
/** Whether releasing this touch should close the panel. */
|
|
37
|
+
export const shouldDismissOnRelease = touch => touch.panelOpenAtStart && !touch.dragged;
|
|
38
|
+
|
|
39
|
+
/**
|
|
40
|
+
* How long after the finger lifts a press still belongs to the dismissing
|
|
41
|
+
* touch. RNGH Tap and JS onPress callbacks land right after touchEnd; a later
|
|
42
|
+
* press (e.g. a screen-reader activation, which sends no touch events) must
|
|
43
|
+
* not be swallowed by a stale flag.
|
|
44
|
+
*/
|
|
45
|
+
export const SWALLOW_AFTER_RELEASE_MS = 500;
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Whether a timeline press must be swallowed. `releasedAt` is null while the
|
|
49
|
+
* dismissing touch is still down.
|
|
50
|
+
*/
|
|
51
|
+
export const isPressSwallowed = (swallow, releasedAt, now) => swallow && (releasedAt === null || now - releasedAt < SWALLOW_AFTER_RELEASE_MS);
|
|
52
|
+
//# sourceMappingURL=composerPanelDismissGesture.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DISMISS_DRAG_THRESHOLD_PX","IDLE_DISMISS_TOUCH","panelOpenAtStart","dragged","startX","startY","startDismissTouch","panelOpen","x","y","moveDismissTouch","touch","movedBeyondThreshold","Math","abs","markDismissTouchDragged","shouldDismissOnRelease","SWALLOW_AFTER_RELEASE_MS","isPressSwallowed","swallow","releasedAt","now"],"sourceRoot":"../../../src","sources":["utils/composerPanelDismissGesture.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,yBAAyB,GAAG,EAAE;AAS3C,OAAO,MAAMC,kBAAgC,GAAG;EAC9CC,gBAAgB,EAAE,KAAK;EACvBC,OAAO,EAAE,KAAK;EACdC,MAAM,EAAE,CAAC;EACTC,MAAM,EAAE;AACV,CAAC;AAED,OAAO,MAAMC,iBAAiB,GAAGA,CAC/BC,SAAkB,EAClBC,CAAS,EACTC,CAAS,MACS;EAClBP,gBAAgB,EAAEK,SAAS;EAC3BJ,OAAO,EAAE,KAAK;EACdC,MAAM,EAAEI,CAAC;EACTH,MAAM,EAAEI;AACV,CAAC,CAAC;AAEF,OAAO,MAAMC,gBAAgB,GAAGA,CAC9BC,KAAmB,EACnBH,CAAS,EACTC,CAAS,KACQ;EACjB,IAAIE,KAAK,CAACR,OAAO,EAAE,OAAOQ,KAAK;EAC/B,MAAMC,oBAAoB,GACxBC,IAAI,CAACC,GAAG,CAACN,CAAC,GAAGG,KAAK,CAACP,MAAM,CAAC,GAAGJ,yBAAyB,IACtDa,IAAI,CAACC,GAAG,CAACL,CAAC,GAAGE,KAAK,CAACN,MAAM,CAAC,GAAGL,yBAAyB;EACxD,OAAOY,oBAAoB,GAAG;IAAE,GAAGD,KAAK;IAAER,OAAO,EAAE;EAAK,CAAC,GAAGQ,KAAK;AACnE,CAAC;AAED,OAAO,MAAMI,uBAAuB,GAAIJ,KAAmB,IACzDA,KAAK,CAACR,OAAO,GAAGQ,KAAK,GAAG;EAAE,GAAGA,KAAK;EAAER,OAAO,EAAE;AAAK,CAAC;;AAErD;AACA,OAAO,MAAMa,sBAAsB,GAAIL,KAAmB,IACxDA,KAAK,CAACT,gBAAgB,IAAI,CAACS,KAAK,CAACR,OAAO;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMc,wBAAwB,GAAG,GAAG;;AAE3C;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAGA,CAC9BC,OAAgB,EAChBC,UAAyB,EACzBC,GAAW,KAEXF,OAAO,KACNC,UAAU,KAAK,IAAI,IAAIC,GAAG,GAAGD,UAAU,GAAGH,wBAAwB,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
export const COLLAPSED_LINES = 5;
|
|
4
|
+
const MEASURE_THRESHOLD_CHARS = 100;
|
|
5
|
+
export const expandedKey = (surface, messageId) => `${surface}:${messageId}`;
|
|
6
|
+
const countNewlines = text => {
|
|
7
|
+
let count = 0;
|
|
8
|
+
for (let i = 0; i < text.length; i += 1) {
|
|
9
|
+
if (text.charCodeAt(i) === 10) count += 1;
|
|
10
|
+
}
|
|
11
|
+
return count;
|
|
12
|
+
};
|
|
13
|
+
|
|
14
|
+
/**
|
|
15
|
+
* Character count alone is not an approximation of rendered lines — it is
|
|
16
|
+
* wrong for the shapes this chat carries most (pasted addresses, order lists),
|
|
17
|
+
* where an eight-line message can be under 70 characters. Newlines cost one
|
|
18
|
+
* character and a whole line, so both signals are needed. Message text is
|
|
19
|
+
* sender-controlled, so a length-only gate is also trivially defeated.
|
|
20
|
+
*/
|
|
21
|
+
export const isMeasurementCandidate = text => text.length >= MEASURE_THRESHOLD_CHARS || countNewlines(text) >= COLLAPSED_LINES;
|
|
22
|
+
|
|
23
|
+
/**
|
|
24
|
+
* Returns a copy without the entries belonging to `surface`, or the original
|
|
25
|
+
* reference when nothing matched — callers use that identity to skip a
|
|
26
|
+
* pointless store update.
|
|
27
|
+
*/
|
|
28
|
+
export const withoutSurface = (expanded, surface) => {
|
|
29
|
+
const prefix = `${surface}:`;
|
|
30
|
+
const next = {};
|
|
31
|
+
let removed = false;
|
|
32
|
+
for (const key in expanded) {
|
|
33
|
+
if (key.startsWith(prefix)) {
|
|
34
|
+
removed = true;
|
|
35
|
+
} else {
|
|
36
|
+
next[key] = true;
|
|
37
|
+
}
|
|
38
|
+
}
|
|
39
|
+
return removed ? next : expanded;
|
|
40
|
+
};
|
|
41
|
+
//# sourceMappingURL=expandableText.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["COLLAPSED_LINES","MEASURE_THRESHOLD_CHARS","expandedKey","surface","messageId","countNewlines","text","count","i","length","charCodeAt","isMeasurementCandidate","withoutSurface","expanded","prefix","next","removed","key","startsWith"],"sourceRoot":"../../../src","sources":["utils/expandableText.ts"],"mappings":";;AAEA,OAAO,MAAMA,eAAe,GAAG,CAAC;AAEhC,MAAMC,uBAAuB,GAAG,GAAG;AAEnC,OAAO,MAAMC,WAAW,GAAGA,CAACC,OAAuB,EAAEC,SAAiB,KACpE,GAAGD,OAAO,IAAIC,SAAS,EAAE;AAE3B,MAAMC,aAAa,GAAIC,IAAY,IAAK;EACtC,IAAIC,KAAK,GAAG,CAAC;EACb,KAAK,IAAIC,CAAC,GAAG,CAAC,EAAEA,CAAC,GAAGF,IAAI,CAACG,MAAM,EAAED,CAAC,IAAI,CAAC,EAAE;IACvC,IAAIF,IAAI,CAACI,UAAU,CAACF,CAAC,CAAC,KAAK,EAAE,EAAED,KAAK,IAAI,CAAC;EAC3C;EACA,OAAOA,KAAK;AACd,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,sBAAsB,GAAIL,IAAY,IACjDA,IAAI,CAACG,MAAM,IAAIR,uBAAuB,IACtCI,aAAa,CAACC,IAAI,CAAC,IAAIN,eAAe;;AAExC;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMY,cAAc,GAAGA,CAC5BC,QAA8B,EAC9BV,OAAuB,KACE;EACzB,MAAMW,MAAM,GAAG,GAAGX,OAAO,GAAG;EAC5B,MAAMY,IAA0B,GAAG,CAAC,CAAC;EACrC,IAAIC,OAAO,GAAG,KAAK;EAEnB,KAAK,MAAMC,GAAG,IAAIJ,QAAQ,EAAE;IAC1B,IAAII,GAAG,CAACC,UAAU,CAACJ,MAAM,CAAC,EAAE;MAC1BE,OAAO,GAAG,IAAI;IAChB,CAAC,MAAM;MACLD,IAAI,CAACE,GAAG,CAAC,GAAG,IAAI;IAClB;EACF;EAEA,OAAOD,OAAO,GAAGD,IAAI,GAAGF,QAAQ;AAClC,CAAC","ignoreList":[]}
|