@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.
Files changed (187) hide show
  1. package/lib/module/components/ThreadCard/ThreadCard.js +2 -0
  2. package/lib/module/components/ThreadCard/ThreadCard.js.map +1 -1
  3. package/lib/module/components/messages/ExpandableMessageText.js +112 -0
  4. package/lib/module/components/messages/ExpandableMessageText.js.map +1 -0
  5. package/lib/module/components/messages/PreviewScrollableText.js +80 -0
  6. package/lib/module/components/messages/PreviewScrollableText.js.map +1 -0
  7. package/lib/module/components/messages/fileMessage/index.js +9 -2
  8. package/lib/module/components/messages/fileMessage/index.js.map +1 -1
  9. package/lib/module/components/messages/linkMessage/index.js +21 -12
  10. package/lib/module/components/messages/linkMessage/index.js.map +1 -1
  11. package/lib/module/components/messages/quotedMessage/index.js +18 -3
  12. package/lib/module/components/messages/quotedMessage/index.js.map +1 -1
  13. package/lib/module/components/messages/textMessage/index.js +7 -1
  14. package/lib/module/components/messages/textMessage/index.js.map +1 -1
  15. package/lib/module/components/messages/types.js.map +1 -1
  16. package/lib/module/context/TimelinePressGuardContext.js +14 -0
  17. package/lib/module/context/TimelinePressGuardContext.js.map +1 -0
  18. package/lib/module/hooks/useConversationList.js +4 -0
  19. package/lib/module/hooks/useConversationList.js.map +1 -1
  20. package/lib/module/hooks/useDismissKeyboardFirst.js +19 -0
  21. package/lib/module/hooks/useDismissKeyboardFirst.js.map +1 -0
  22. package/lib/module/hooks/useExpandableText.js +125 -0
  23. package/lib/module/hooks/useExpandableText.js.map +1 -0
  24. package/lib/module/hooks/useGuardedPress.js +19 -0
  25. package/lib/module/hooks/useGuardedPress.js.map +1 -0
  26. package/lib/module/screens/chat-detail/ChatComposer.js +89 -498
  27. package/lib/module/screens/chat-detail/ChatComposer.js.map +1 -1
  28. package/lib/module/screens/chat-detail/ChatDetail.js +49 -20
  29. package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
  30. package/lib/module/screens/chat-detail/ChatListLegend.js +113 -76
  31. package/lib/module/screens/chat-detail/ChatListLegend.js.map +1 -1
  32. package/lib/module/screens/chat-detail/PinnedMessagesSheet.js +7 -0
  33. package/lib/module/screens/chat-detail/PinnedMessagesSheet.js.map +1 -1
  34. package/lib/module/screens/chat-detail/components/ChatComposerAccessorySlot.js +47 -0
  35. package/lib/module/screens/chat-detail/components/ChatComposerAccessorySlot.js.map +1 -0
  36. package/lib/module/screens/chat-detail/components/ChatComposerInputArea.js +149 -0
  37. package/lib/module/screens/chat-detail/components/ChatComposerInputArea.js.map +1 -0
  38. package/lib/module/screens/chat-detail/components/ChatComposerStatusBanner.js +104 -0
  39. package/lib/module/screens/chat-detail/components/ChatComposerStatusBanner.js.map +1 -0
  40. package/lib/module/screens/chat-detail/hooks/useChatComposerAnimation.js +0 -17
  41. package/lib/module/screens/chat-detail/hooks/useChatComposerAnimation.js.map +1 -1
  42. package/lib/module/screens/chat-detail/hooks/useChatComposerState.js +16 -2
  43. package/lib/module/screens/chat-detail/hooks/useChatComposerState.js.map +1 -1
  44. package/lib/module/screens/chat-detail/hooks/useComposerBotMenu.js +122 -0
  45. package/lib/module/screens/chat-detail/hooks/useComposerBotMenu.js.map +1 -0
  46. package/lib/module/screens/chat-detail/hooks/useComposerPanelActions.js +46 -0
  47. package/lib/module/screens/chat-detail/hooks/useComposerPanelActions.js.map +1 -0
  48. package/lib/module/screens/chat-detail/hooks/useComposerPanelDismiss.js +75 -0
  49. package/lib/module/screens/chat-detail/hooks/useComposerPanelDismiss.js.map +1 -0
  50. package/lib/module/screens/chat-detail/hooks/useComposerPanels.js +136 -0
  51. package/lib/module/screens/chat-detail/hooks/useComposerPanels.js.map +1 -0
  52. package/lib/module/screens/chat-detail/hooks/useComposerSend.js +74 -0
  53. package/lib/module/screens/chat-detail/hooks/useComposerSend.js.map +1 -0
  54. package/lib/module/screens/chat-detail/legend/LegendChatMessage.js +12 -3
  55. package/lib/module/screens/chat-detail/legend/LegendChatMessage.js.map +1 -1
  56. package/lib/module/screens/chat-detail/messageToolbox/MessageToolboxOverlay.js +11 -2
  57. package/lib/module/screens/chat-detail/messageToolbox/MessageToolboxOverlay.js.map +1 -1
  58. package/lib/module/screens/chat-detail/messageToolbox/MessageToolboxWrapper.js +79 -6
  59. package/lib/module/screens/chat-detail/messageToolbox/MessageToolboxWrapper.js.map +1 -1
  60. package/lib/module/screens/chat-detail/messageToolbox/useClonePreview.js +30 -0
  61. package/lib/module/screens/chat-detail/messageToolbox/useClonePreview.js.map +1 -0
  62. package/lib/module/screens/chat-detail/types.js +5 -0
  63. package/lib/module/screens/chat-detail/types.js.map +1 -1
  64. package/lib/module/store/expandedMessage.js +28 -0
  65. package/lib/module/store/expandedMessage.js.map +1 -0
  66. package/lib/module/store/message.js +14 -0
  67. package/lib/module/store/message.js.map +1 -1
  68. package/lib/module/utils/composerPanelDismissGesture.js +52 -0
  69. package/lib/module/utils/composerPanelDismissGesture.js.map +1 -0
  70. package/lib/module/utils/expandableText.js +41 -0
  71. package/lib/module/utils/expandableText.js.map +1 -0
  72. package/lib/module/utils/inlineTruncation.js +51 -0
  73. package/lib/module/utils/inlineTruncation.js.map +1 -0
  74. package/lib/module/utils/perf-marker.js +44 -0
  75. package/lib/module/utils/perf-marker.js.map +1 -0
  76. package/lib/module/utils/truncateTextChildren.js +38 -0
  77. package/lib/module/utils/truncateTextChildren.js.map +1 -0
  78. package/lib/typescript/src/components/ThreadCard/ThreadCard.d.ts.map +1 -1
  79. package/lib/typescript/src/components/messages/ExpandableMessageText.d.ts +25 -0
  80. package/lib/typescript/src/components/messages/ExpandableMessageText.d.ts.map +1 -0
  81. package/lib/typescript/src/components/messages/PreviewScrollableText.d.ts +29 -0
  82. package/lib/typescript/src/components/messages/PreviewScrollableText.d.ts.map +1 -0
  83. package/lib/typescript/src/components/messages/fileMessage/index.d.ts.map +1 -1
  84. package/lib/typescript/src/components/messages/linkMessage/index.d.ts +1 -1
  85. package/lib/typescript/src/components/messages/linkMessage/index.d.ts.map +1 -1
  86. package/lib/typescript/src/components/messages/quotedMessage/index.d.ts.map +1 -1
  87. package/lib/typescript/src/components/messages/textMessage/index.d.ts +1 -1
  88. package/lib/typescript/src/components/messages/textMessage/index.d.ts.map +1 -1
  89. package/lib/typescript/src/components/messages/types.d.ts +18 -0
  90. package/lib/typescript/src/components/messages/types.d.ts.map +1 -1
  91. package/lib/typescript/src/context/TimelinePressGuardContext.d.ts +3 -0
  92. package/lib/typescript/src/context/TimelinePressGuardContext.d.ts.map +1 -0
  93. package/lib/typescript/src/hooks/useConversationList.d.ts.map +1 -1
  94. package/lib/typescript/src/hooks/useDismissKeyboardFirst.d.ts +8 -0
  95. package/lib/typescript/src/hooks/useDismissKeyboardFirst.d.ts.map +1 -0
  96. package/lib/typescript/src/hooks/useExpandableText.d.ts +13 -0
  97. package/lib/typescript/src/hooks/useExpandableText.d.ts.map +1 -0
  98. package/lib/typescript/src/hooks/useGuardedPress.d.ts +9 -0
  99. package/lib/typescript/src/hooks/useGuardedPress.d.ts.map +1 -0
  100. package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts +7 -3
  101. package/lib/typescript/src/screens/chat-detail/ChatComposer.d.ts.map +1 -1
  102. package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
  103. package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts +5 -1
  104. package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts.map +1 -1
  105. package/lib/typescript/src/screens/chat-detail/PinnedMessagesSheet.d.ts.map +1 -1
  106. package/lib/typescript/src/screens/chat-detail/components/ChatComposerAccessorySlot.d.ts +12 -0
  107. package/lib/typescript/src/screens/chat-detail/components/ChatComposerAccessorySlot.d.ts.map +1 -0
  108. package/lib/typescript/src/screens/chat-detail/components/ChatComposerInputArea.d.ts +30 -0
  109. package/lib/typescript/src/screens/chat-detail/components/ChatComposerInputArea.d.ts.map +1 -0
  110. package/lib/typescript/src/screens/chat-detail/components/ChatComposerStatusBanner.d.ts +19 -0
  111. package/lib/typescript/src/screens/chat-detail/components/ChatComposerStatusBanner.d.ts.map +1 -0
  112. package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerAnimation.d.ts +0 -1
  113. package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerAnimation.d.ts.map +1 -1
  114. package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerState.d.ts +7 -0
  115. package/lib/typescript/src/screens/chat-detail/hooks/useChatComposerState.d.ts.map +1 -1
  116. package/lib/typescript/src/screens/chat-detail/hooks/useComposerBotMenu.d.ts +7 -0
  117. package/lib/typescript/src/screens/chat-detail/hooks/useComposerBotMenu.d.ts.map +1 -0
  118. package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanelActions.d.ts +17 -0
  119. package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanelActions.d.ts.map +1 -0
  120. package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanelDismiss.d.ts +12 -0
  121. package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanelDismiss.d.ts.map +1 -0
  122. package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanels.d.ts +25 -0
  123. package/lib/typescript/src/screens/chat-detail/hooks/useComposerPanels.d.ts.map +1 -0
  124. package/lib/typescript/src/screens/chat-detail/hooks/useComposerSend.d.ts +16 -0
  125. package/lib/typescript/src/screens/chat-detail/hooks/useComposerSend.d.ts.map +1 -0
  126. package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts +11 -1
  127. package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts.map +1 -1
  128. package/lib/typescript/src/screens/chat-detail/messageToolbox/MessageToolboxOverlay.d.ts.map +1 -1
  129. package/lib/typescript/src/screens/chat-detail/messageToolbox/MessageToolboxWrapper.d.ts +14 -1
  130. package/lib/typescript/src/screens/chat-detail/messageToolbox/MessageToolboxWrapper.d.ts.map +1 -1
  131. package/lib/typescript/src/screens/chat-detail/messageToolbox/useClonePreview.d.ts +18 -0
  132. package/lib/typescript/src/screens/chat-detail/messageToolbox/useClonePreview.d.ts.map +1 -0
  133. package/lib/typescript/src/screens/chat-detail/types.d.ts +8 -0
  134. package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
  135. package/lib/typescript/src/store/expandedMessage.d.ts +15 -0
  136. package/lib/typescript/src/store/expandedMessage.d.ts.map +1 -0
  137. package/lib/typescript/src/store/message.d.ts.map +1 -1
  138. package/lib/typescript/src/utils/composerPanelDismissGesture.d.ts +33 -0
  139. package/lib/typescript/src/utils/composerPanelDismissGesture.d.ts.map +1 -0
  140. package/lib/typescript/src/utils/expandableText.d.ts +18 -0
  141. package/lib/typescript/src/utils/expandableText.d.ts.map +1 -0
  142. package/lib/typescript/src/utils/inlineTruncation.d.ts +24 -0
  143. package/lib/typescript/src/utils/inlineTruncation.d.ts.map +1 -0
  144. package/lib/typescript/src/utils/perf-marker.d.ts +8 -0
  145. package/lib/typescript/src/utils/perf-marker.d.ts.map +1 -0
  146. package/lib/typescript/src/utils/truncateTextChildren.d.ts +3 -0
  147. package/lib/typescript/src/utils/truncateTextChildren.d.ts.map +1 -0
  148. package/package.json +2 -1
  149. package/src/components/ThreadCard/ThreadCard.tsx +2 -0
  150. package/src/components/messages/ExpandableMessageText.tsx +145 -0
  151. package/src/components/messages/PreviewScrollableText.tsx +98 -0
  152. package/src/components/messages/fileMessage/index.tsx +17 -3
  153. package/src/components/messages/linkMessage/index.tsx +30 -21
  154. package/src/components/messages/quotedMessage/index.tsx +19 -3
  155. package/src/components/messages/textMessage/index.tsx +11 -2
  156. package/src/components/messages/types.ts +18 -0
  157. package/src/context/TimelinePressGuardContext.tsx +15 -0
  158. package/src/hooks/useConversationList.ts +2 -0
  159. package/src/hooks/useDismissKeyboardFirst.ts +19 -0
  160. package/src/hooks/useExpandableText.ts +143 -0
  161. package/src/hooks/useGuardedPress.ts +20 -0
  162. package/src/screens/chat-detail/ChatComposer.tsx +105 -631
  163. package/src/screens/chat-detail/ChatDetail.tsx +49 -20
  164. package/src/screens/chat-detail/ChatListLegend.tsx +122 -71
  165. package/src/screens/chat-detail/PinnedMessagesSheet.tsx +8 -0
  166. package/src/screens/chat-detail/components/ChatComposerAccessorySlot.tsx +61 -0
  167. package/src/screens/chat-detail/components/ChatComposerInputArea.tsx +198 -0
  168. package/src/screens/chat-detail/components/ChatComposerStatusBanner.tsx +116 -0
  169. package/src/screens/chat-detail/hooks/useChatComposerAnimation.ts +0 -29
  170. package/src/screens/chat-detail/hooks/useChatComposerState.ts +25 -2
  171. package/src/screens/chat-detail/hooks/useComposerBotMenu.tsx +140 -0
  172. package/src/screens/chat-detail/hooks/useComposerPanelActions.ts +57 -0
  173. package/src/screens/chat-detail/hooks/useComposerPanelDismiss.ts +111 -0
  174. package/src/screens/chat-detail/hooks/useComposerPanels.ts +197 -0
  175. package/src/screens/chat-detail/hooks/useComposerSend.ts +98 -0
  176. package/src/screens/chat-detail/legend/LegendChatMessage.tsx +24 -2
  177. package/src/screens/chat-detail/messageToolbox/MessageToolboxOverlay.tsx +20 -1
  178. package/src/screens/chat-detail/messageToolbox/MessageToolboxWrapper.tsx +111 -5
  179. package/src/screens/chat-detail/messageToolbox/useClonePreview.ts +34 -0
  180. package/src/screens/chat-detail/types.ts +9 -0
  181. package/src/store/expandedMessage.ts +42 -0
  182. package/src/store/message.ts +14 -0
  183. package/src/utils/composerPanelDismissGesture.ts +72 -0
  184. package/src/utils/expandableText.ts +51 -0
  185. package/src/utils/inlineTruncation.ts +65 -0
  186. package/src/utils/perf-marker.ts +39 -0
  187. package/src/utils/truncateTextChildren.ts +46 -0
@@ -0,0 +1,51 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Cut-point arithmetic for the inline `... Xem thêm` preview. Everything here
5
+ * works on the lines RN reports from `onTextLayout`, whose `text` includes the
6
+ * line's trailing break — so joining them reproduces the rendered string and a
7
+ * running length is a valid character offset into it.
8
+ */
9
+
10
+ // How far back a shrink may look for a word boundary before accepting a
11
+ // mid-word cut. One long unbroken token (a URL) must still be cuttable.
12
+ const WORD_SNAP_WINDOW = 20;
13
+ const isSpace = char => !!char && /\s/.test(char);
14
+ const isHighSurrogate = code => code >= 0xd800 && code <= 0xdbff;
15
+ export const joinLines = lines => lines.map(line => line.text).join('');
16
+
17
+ /**
18
+ * Backs `cut` off trailing whitespace — a kept `\n` would push the suffix onto
19
+ * a line of its own — and off half an emoji, which would render as a tofu box.
20
+ */
21
+ export const settleCut = (full, cut) => {
22
+ let next = Math.max(0, Math.min(cut, full.length));
23
+ if (next > 0 && isHighSurrogate(full.charCodeAt(next - 1))) next -= 1;
24
+ while (next > 0 && isSpace(full[next - 1])) next -= 1;
25
+ return next;
26
+ };
27
+
28
+ /** First guess: everything on the first `maxLines` lines. */
29
+ export const initialCut = (lines, maxLines) => {
30
+ const full = joinLines(lines);
31
+ return settleCut(full, joinLines(lines.slice(0, maxLines)).length);
32
+ };
33
+
34
+ /**
35
+ * The suffix did not fit and wrapped past `maxLines`. Drop at least as many
36
+ * characters as spilled over — the spill includes the suffix itself, so this
37
+ * converges in one or two passes — then prefer ending on a word.
38
+ */
39
+ export const shrinkCut = (full, cut, fittedLines, maxLines) => {
40
+ const overflow = joinLines(fittedLines.slice(maxLines)).length;
41
+ let next = Math.max(0, cut - Math.max(overflow, 1));
42
+ const floor = Math.max(0, next - WORD_SNAP_WINDOW);
43
+ for (let i = next; i > floor; i -= 1) {
44
+ if (isSpace(full[i - 1])) {
45
+ next = i;
46
+ break;
47
+ }
48
+ }
49
+ return settleCut(full, next);
50
+ };
51
+ //# sourceMappingURL=inlineTruncation.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["WORD_SNAP_WINDOW","isSpace","char","test","isHighSurrogate","code","joinLines","lines","map","line","text","join","settleCut","full","cut","next","Math","max","min","length","charCodeAt","initialCut","maxLines","slice","shrinkCut","fittedLines","overflow","floor","i"],"sourceRoot":"../../../src","sources":["utils/inlineTruncation.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA,MAAMA,gBAAgB,GAAG,EAAE;AAE3B,MAAMC,OAAO,GAAIC,IAAwB,IAAK,CAAC,CAACA,IAAI,IAAI,IAAI,CAACC,IAAI,CAACD,IAAI,CAAC;AAEvE,MAAME,eAAe,GAAIC,IAAY,IAAKA,IAAI,IAAI,MAAM,IAAIA,IAAI,IAAI,MAAM;AAE1E,OAAO,MAAMC,SAAS,GAAIC,KAA8B,IACtDA,KAAK,CAACC,GAAG,CAAEC,IAAI,IAAKA,IAAI,CAACC,IAAI,CAAC,CAACC,IAAI,CAAC,EAAE,CAAC;;AAEzC;AACA;AACA;AACA;AACA,OAAO,MAAMC,SAAS,GAAGA,CAACC,IAAY,EAAEC,GAAW,KAAK;EACtD,IAAIC,IAAI,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAED,IAAI,CAACE,GAAG,CAACJ,GAAG,EAAED,IAAI,CAACM,MAAM,CAAC,CAAC;EAClD,IAAIJ,IAAI,GAAG,CAAC,IAAIX,eAAe,CAACS,IAAI,CAACO,UAAU,CAACL,IAAI,GAAG,CAAC,CAAC,CAAC,EAAEA,IAAI,IAAI,CAAC;EACrE,OAAOA,IAAI,GAAG,CAAC,IAAId,OAAO,CAACY,IAAI,CAACE,IAAI,GAAG,CAAC,CAAC,CAAC,EAAEA,IAAI,IAAI,CAAC;EACrD,OAAOA,IAAI;AACb,CAAC;;AAED;AACA,OAAO,MAAMM,UAAU,GAAGA,CACxBd,KAA8B,EAC9Be,QAAgB,KACb;EACH,MAAMT,IAAI,GAAGP,SAAS,CAACC,KAAK,CAAC;EAC7B,OAAOK,SAAS,CAACC,IAAI,EAAEP,SAAS,CAACC,KAAK,CAACgB,KAAK,CAAC,CAAC,EAAED,QAAQ,CAAC,CAAC,CAACH,MAAM,CAAC;AACpE,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMK,SAAS,GAAGA,CACvBX,IAAY,EACZC,GAAW,EACXW,WAAoC,EACpCH,QAAgB,KACb;EACH,MAAMI,QAAQ,GAAGpB,SAAS,CAACmB,WAAW,CAACF,KAAK,CAACD,QAAQ,CAAC,CAAC,CAACH,MAAM;EAC9D,IAAIJ,IAAI,GAAGC,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEH,GAAG,GAAGE,IAAI,CAACC,GAAG,CAACS,QAAQ,EAAE,CAAC,CAAC,CAAC;EAEnD,MAAMC,KAAK,GAAGX,IAAI,CAACC,GAAG,CAAC,CAAC,EAAEF,IAAI,GAAGf,gBAAgB,CAAC;EAClD,KAAK,IAAI4B,CAAC,GAAGb,IAAI,EAAEa,CAAC,GAAGD,KAAK,EAAEC,CAAC,IAAI,CAAC,EAAE;IACpC,IAAI3B,OAAO,CAACY,IAAI,CAACe,CAAC,GAAG,CAAC,CAAC,CAAC,EAAE;MACxBb,IAAI,GAAGa,CAAC;MACR;IACF;EACF;EAEA,OAAOhB,SAAS,CAACC,IAAI,EAAEE,IAAI,CAAC;AAC9B,CAAC","ignoreList":[]}
@@ -0,0 +1,44 @@
1
+ "use strict";
2
+
3
+ /**
4
+ * Opt-in performance markers for the local perf framework (`performance/`).
5
+ *
6
+ * Internal, not exported from the package: only exampleLegacy (the perf harness) imports `enablePerfMarkers` directly.
7
+ * Disabled by default, so every call is a no-op in consumer apps. When enabled, markers are written as
8
+ * `[PERF] {"name":..,"t":<epoch ms>,...}` through console.log, which the perf runner reads from the device log.
9
+ * Durations are computed between markers on the device clock, so no host/device clock sync is needed.
10
+ */
11
+ let enabled = false;
12
+ const FLUSH_INTERVAL_MS = 500;
13
+ let renderCounts = {};
14
+ let flushTimer = null;
15
+ export const enablePerfMarkers = (on = true) => {
16
+ enabled = on;
17
+ };
18
+ export const perfMark = (name, data) => {
19
+ if (!enabled) return;
20
+ console.log(`[PERF] ${JSON.stringify({
21
+ name,
22
+ t: Date.now(),
23
+ ...data
24
+ })}`);
25
+ };
26
+ const flushRenderCounts = () => {
27
+ flushTimer = null;
28
+ const counts = renderCounts;
29
+ renderCounts = {};
30
+ perfMark('render_counts', {
31
+ counts
32
+ });
33
+ };
34
+
35
+ /**
36
+ * Counts render-function invocations of `component`, including renders React later discards.
37
+ * Counts are batched and emitted as a delta every ~500 ms, so logging never happens per render.
38
+ */
39
+ export const perfCountRender = component => {
40
+ if (!enabled) return;
41
+ renderCounts[component] = (renderCounts[component] ?? 0) + 1;
42
+ if (!flushTimer) flushTimer = setTimeout(flushRenderCounts, FLUSH_INTERVAL_MS);
43
+ };
44
+ //# sourceMappingURL=perf-marker.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["enabled","FLUSH_INTERVAL_MS","renderCounts","flushTimer","enablePerfMarkers","on","perfMark","name","data","console","log","JSON","stringify","t","Date","now","flushRenderCounts","counts","perfCountRender","component","setTimeout"],"sourceRoot":"../../../src","sources":["utils/perf-marker.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAIA,OAAO,GAAG,KAAK;AACnB,MAAMC,iBAAiB,GAAG,GAAG;AAC7B,IAAIC,YAAoC,GAAG,CAAC,CAAC;AAC7C,IAAIC,UAAgD,GAAG,IAAI;AAE3D,OAAO,MAAMC,iBAAiB,GAAGA,CAACC,EAAE,GAAG,IAAI,KAAK;EAC9CL,OAAO,GAAGK,EAAE;AACd,CAAC;AAED,OAAO,MAAMC,QAAQ,GAAGA,CAACC,IAAY,EAAEC,IAA8B,KAAK;EACxE,IAAI,CAACR,OAAO,EAAE;EACdS,OAAO,CAACC,GAAG,CAAC,UAAUC,IAAI,CAACC,SAAS,CAAC;IAAEL,IAAI;IAAEM,CAAC,EAAEC,IAAI,CAACC,GAAG,CAAC,CAAC;IAAE,GAAGP;EAAK,CAAC,CAAC,EAAE,CAAC;AAC3E,CAAC;AAED,MAAMQ,iBAAiB,GAAGA,CAAA,KAAM;EAC9Bb,UAAU,GAAG,IAAI;EACjB,MAAMc,MAAM,GAAGf,YAAY;EAC3BA,YAAY,GAAG,CAAC,CAAC;EACjBI,QAAQ,CAAC,eAAe,EAAE;IAAEW;EAAO,CAAC,CAAC;AACvC,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMC,eAAe,GAAIC,SAAiB,IAAK;EACpD,IAAI,CAACnB,OAAO,EAAE;EACdE,YAAY,CAACiB,SAAS,CAAC,GAAG,CAACjB,YAAY,CAACiB,SAAS,CAAC,IAAI,CAAC,IAAI,CAAC;EAC5D,IAAI,CAAChB,UAAU,EACbA,UAAU,GAAGiB,UAAU,CAACJ,iBAAiB,EAAEf,iBAAiB,CAAC;AACjE,CAAC","ignoreList":[]}
@@ -0,0 +1,38 @@
1
+ "use strict";
2
+
3
+ import { cloneElement, isValidElement } from 'react';
4
+ /**
5
+ * Walks a `<Text>` children tree — plain strings, mention runs, linkified
6
+ * runs, nested `<Text>` — and keeps the first `budget` characters of rendered
7
+ * text, preserving every element's styling and press handler up to the cut.
8
+ * Character counts line up with `onTextLayout` because RN renders exactly the
9
+ * concatenation of the string leaves.
10
+ */
11
+ const take = (node, budget) => {
12
+ if (budget <= 0 || node == null || typeof node === 'boolean') {
13
+ return [null, 0];
14
+ }
15
+ if (typeof node === 'string' || typeof node === 'number') {
16
+ const text = String(node);
17
+ return text.length <= budget ? [node, text.length] : [text.slice(0, budget), budget];
18
+ }
19
+ if (Array.isArray(node)) {
20
+ const kept = [];
21
+ let used = 0;
22
+ for (const child of node) {
23
+ if (used >= budget) break;
24
+ const [part, count] = take(child, budget - used);
25
+ kept.push(part);
26
+ used += count;
27
+ }
28
+ return [kept, used];
29
+ }
30
+ if (/*#__PURE__*/isValidElement(node)) {
31
+ if (node.props.children === undefined) return [node, 0];
32
+ const [children, used] = take(node.props.children, budget);
33
+ return [/*#__PURE__*/cloneElement(node, undefined, children), used];
34
+ }
35
+ return [node, 0];
36
+ };
37
+ export const truncateTextChildren = (node, limit) => take(node, limit)[0];
38
+ //# sourceMappingURL=truncateTextChildren.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["cloneElement","isValidElement","take","node","budget","text","String","length","slice","Array","isArray","kept","used","child","part","count","push","props","children","undefined","truncateTextChildren","limit"],"sourceRoot":"../../../src","sources":["utils/truncateTextChildren.ts"],"mappings":";;AAAA,SAASA,YAAY,EAAEC,cAAc,QAAwB,OAAO;AAIpE;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAMC,IAAI,GAAGA,CAACC,IAAe,EAAEC,MAAc,KAAY;EACvD,IAAIA,MAAM,IAAI,CAAC,IAAID,IAAI,IAAI,IAAI,IAAI,OAAOA,IAAI,KAAK,SAAS,EAAE;IAC5D,OAAO,CAAC,IAAI,EAAE,CAAC,CAAC;EAClB;EAEA,IAAI,OAAOA,IAAI,KAAK,QAAQ,IAAI,OAAOA,IAAI,KAAK,QAAQ,EAAE;IACxD,MAAME,IAAI,GAAGC,MAAM,CAACH,IAAI,CAAC;IACzB,OAAOE,IAAI,CAACE,MAAM,IAAIH,MAAM,GACxB,CAACD,IAAI,EAAEE,IAAI,CAACE,MAAM,CAAC,GACnB,CAACF,IAAI,CAACG,KAAK,CAAC,CAAC,EAAEJ,MAAM,CAAC,EAAEA,MAAM,CAAC;EACrC;EAEA,IAAIK,KAAK,CAACC,OAAO,CAACP,IAAI,CAAC,EAAE;IACvB,MAAMQ,IAAiB,GAAG,EAAE;IAC5B,IAAIC,IAAI,GAAG,CAAC;IACZ,KAAK,MAAMC,KAAK,IAAIV,IAAI,EAAE;MACxB,IAAIS,IAAI,IAAIR,MAAM,EAAE;MACpB,MAAM,CAACU,IAAI,EAAEC,KAAK,CAAC,GAAGb,IAAI,CAACW,KAAK,EAAET,MAAM,GAAGQ,IAAI,CAAC;MAChDD,IAAI,CAACK,IAAI,CAACF,IAAI,CAAC;MACfF,IAAI,IAAIG,KAAK;IACf;IACA,OAAO,CAACJ,IAAI,EAAEC,IAAI,CAAC;EACrB;EAEA,iBAAIX,cAAc,CAA2BE,IAAI,CAAC,EAAE;IAClD,IAAIA,IAAI,CAACc,KAAK,CAACC,QAAQ,KAAKC,SAAS,EAAE,OAAO,CAAChB,IAAI,EAAE,CAAC,CAAC;IACvD,MAAM,CAACe,QAAQ,EAAEN,IAAI,CAAC,GAAGV,IAAI,CAACC,IAAI,CAACc,KAAK,CAACC,QAAQ,EAAEd,MAAM,CAAC;IAC1D,OAAO,cAACJ,YAAY,CAACG,IAAI,EAAEgB,SAAS,EAAED,QAAQ,CAAC,EAAEN,IAAI,CAAC;EACxD;EAEA,OAAO,CAACT,IAAI,EAAE,CAAC,CAAC;AAClB,CAAC;AAED,OAAO,MAAMiB,oBAAoB,GAAGA,CAACjB,IAAe,EAAEkB,KAAa,KACjEnB,IAAI,CAACC,IAAI,EAAEkB,KAAK,CAAC,CAAC,CAAC,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"file":"ThreadCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/ThreadCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAe1D,OAAO,EAIL,KAAK,gBAAgB,EAEtB,MAAM,+BAA+B,CAAC;AAMvC,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE;QACjB,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACxB,KAAK,EAAE,qBAAqB,CAAC;KAC9B,KAAK,IAAI,CAAC;CACZ;AAED,QAAA,MAAM,UAAU,0DAA4B,eAAe,iCA6KzD,CAAC;AAIH,eAAe,UAAU,CAAC"}
1
+ {"version":3,"file":"ThreadCard.d.ts","sourceRoot":"","sources":["../../../../../src/components/ThreadCard/ThreadCard.tsx"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,qBAAqB,EAAE,MAAM,cAAc,CAAC;AAe1D,OAAO,EAIL,KAAK,gBAAgB,EAEtB,MAAM,+BAA+B,CAAC;AAOvC,UAAU,eAAe;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,CAAC,MAAM,EAAE;QACjB,IAAI,CAAC,EAAE,gBAAgB,CAAC;QACxB,KAAK,EAAE,qBAAqB,CAAC;KAC9B,KAAK,IAAI,CAAC;CACZ;AAED,QAAA,MAAM,UAAU,0DAA4B,eAAe,iCA8KzD,CAAC;AAIH,eAAe,UAAU,CAAC"}
@@ -0,0 +1,25 @@
1
+ import type { ComponentProps, ReactNode } from 'react';
2
+ import { KLabel } from '@droppii/libs';
3
+ import type { MessageSurface } from '../../store/expandedMessage';
4
+ type TypoType = ComponentProps<typeof KLabel.Text>['typo'];
5
+ interface ExpandableMessageTextProps {
6
+ messageId: string;
7
+ surface: MessageSurface;
8
+ /** Raw body text — drives the length/newline pre-check only. */
9
+ text: string;
10
+ /**
11
+ * The already-rendered body. Taken as children rather than re-derived from
12
+ * `text` because the three call sites build structurally different bodies
13
+ * (plain run, mention segments, linkified runs) and re-tokenising them here
14
+ * would duplicate three parsers.
15
+ */
16
+ children: ReactNode;
17
+ typo?: TypoType;
18
+ color?: string;
19
+ }
20
+ export declare const ExpandableMessageText: {
21
+ ({ messageId, surface, text, children, typo, color, }: ExpandableMessageTextProps): import("react").JSX.Element;
22
+ displayName: string;
23
+ };
24
+ export {};
25
+ //# sourceMappingURL=ExpandableMessageText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExpandableMessageText.d.ts","sourceRoot":"","sources":["../../../../../src/components/messages/ExpandableMessageText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvD,OAAO,EAAuB,MAAM,EAAE,MAAM,eAAe,CAAC;AAQ5D,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,KAAK,QAAQ,GAAG,cAAc,CAAC,OAAO,MAAM,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC,CAAC;AAe3D,UAAU,0BAA0B;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,cAAc,CAAC;IACxB,gEAAgE;IAChE,IAAI,EAAE,MAAM,CAAC;IACb;;;;;OAKG;IACH,QAAQ,EAAE,SAAS,CAAC;IACpB,IAAI,CAAC,EAAE,QAAQ,CAAC;IAChB,KAAK,CAAC,EAAE,MAAM,CAAC;CAChB;AAED,eAAO,MAAM,qBAAqB;2DAO/B,0BAA0B;;CA0E5B,CAAC"}
@@ -0,0 +1,29 @@
1
+ import { type ReactNode } from 'react';
2
+ /**
3
+ * Set by the toolbox overlay around its clone. `maxHeight` is the space the
4
+ * clone may take; `contentHeight` is how tall the clone currently is.
5
+ * `onScrollableChange` reports whether the text is capped (and so scrolls),
6
+ * because the overlay's tap-to-dismiss would otherwise block that scroll.
7
+ */
8
+ export interface ClonePreviewBudget {
9
+ maxHeight: number;
10
+ contentHeight: number;
11
+ onScrollableChange: (scrollable: boolean) => void;
12
+ }
13
+ export declare const ClonePreviewBudgetContext: import("react").Context<ClonePreviewBudget>;
14
+ /**
15
+ * An expanded message can be taller than the overlay. Scrolling the whole
16
+ * clone clips the bubble along a straight edge — square corners — so inside
17
+ * the overlay the text region scrolls instead and the bubble keeps its shape.
18
+ *
19
+ * Budget: whatever the rest of the clone (padding, quote strip, link card,
20
+ * time row) does not use. `contentHeight` and this box's height arrive from
21
+ * native at different moments, and mixing a fresh one with a stale one makes
22
+ * the cap swing between two sizes indefinitely. So the rest is read only from
23
+ * a consistent pair — while uncapped, when the box equals the natural height —
24
+ * and frozen once a cap is applied, which breaks the feedback loop.
25
+ */
26
+ export declare const PreviewScrollableText: ({ children, }: {
27
+ children: ReactNode;
28
+ }) => import("react").JSX.Element;
29
+ //# sourceMappingURL=PreviewScrollableText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PreviewScrollableText.d.ts","sourceRoot":"","sources":["../../../../../src/components/messages/PreviewScrollableText.tsx"],"names":[],"mappings":"AAAA,OAAO,EAML,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAGf;;;;;GAKG;AACH,MAAM,WAAW,kBAAkB;IACjC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,EAAE,MAAM,CAAC;IACtB,kBAAkB,EAAE,CAAC,UAAU,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD;AAED,eAAO,MAAM,yBAAyB,6CACU,CAAC;AAKjD;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,qBAAqB,GAAI,eAEnC;IACD,QAAQ,EAAE,SAAS,CAAC;CACrB,gCAqDA,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/fileMessage/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAQvD,eAAO,MAAM,WAAW,+EACmB,sBAAsB,iCAuIhE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/fileMessage/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAWvD,eAAO,MAAM,WAAW,+EACmB,sBAAsB,iCAkJhE,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { type BaseLegendMessageProps } from '../types';
2
- export declare const LinkMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime, onPressUrl, isHighlighted, isTimeRevealed, groupPosition, }: BaseLegendMessageProps & {
2
+ export declare const LinkMessage: import("react").MemoExoticComponent<({ message, messageId, surface, isOutgoing, createdAtTime, onPressUrl, isHighlighted, isTimeRevealed, groupPosition, }: BaseLegendMessageProps & {
3
3
  onPressUrl?: (url: string) => void;
4
4
  }) => import("react").JSX.Element>;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/linkMessage/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAmC1E,eAAO,MAAM,WAAW,0IASnB,sBAAsB,GAAG;IAAE,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,iCAgDnE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/linkMessage/index.tsx"],"names":[],"mappings":"AAGA,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAmC1E,eAAO,MAAM,WAAW,8JAWnB,sBAAsB,GAAG;IAAE,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,iCAuDnE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/quotedMessage/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAwB1E,UAAU,kBAAmB,SAAQ,sBAAsB;IACzD,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,QAAA,MAAM,aAAa,8CAAgB,kBAAkB,iCAkJnD,CAAC;AAIH,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/quotedMessage/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AA0B1E,UAAU,kBAAmB,SAAQ,sBAAsB;IACzD,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAC;CACpC;AAED,QAAA,MAAM,aAAa,8CAAgB,kBAAkB,iCAgKnD,CAAC;AAIH,eAAe,aAAa,CAAC"}
@@ -1,5 +1,5 @@
1
1
  import { type BaseLegendMessageProps } from '../types';
2
- export declare const TextMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime, isHighlighted, isTimeRevealed, onPressUrl, groupPosition, }: BaseLegendMessageProps & {
2
+ export declare const TextMessage: import("react").MemoExoticComponent<({ message, messageId, surface, isOutgoing, createdAtTime, isHighlighted, isTimeRevealed, onPressUrl, groupPosition, }: BaseLegendMessageProps & {
3
3
  onPressUrl?: (url: string) => void;
4
4
  }) => import("react").JSX.Element>;
5
5
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/textMessage/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAkB1E,eAAO,MAAM,WAAW,0IASnB,sBAAsB,GAAG;IAAE,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,iCA6HnE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/textMessage/index.tsx"],"names":[],"mappings":"AASA,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAmB1E,eAAO,MAAM,WAAW,8JAWnB,sBAAsB,GAAG;IAAE,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,iCAmInE,CAAC"}
@@ -1,8 +1,26 @@
1
1
  import type { MediaItem } from '../../hooks/useMediaViewer';
2
2
  import type { MessageItem } from '@droppii/openim-rn-client-sdk';
3
3
  import type { GroupPosition } from '../../utils/legendListMessage';
4
+ import type { MessageSurface } from '../../store/expandedMessage';
4
5
  export interface BaseLegendMessageProps {
5
6
  message: MessageItem;
7
+ /**
8
+ * Resolved once by the caller and threaded down — never re-derived here.
9
+ * The timeline, the pin sheet and the toolbox overlay each compute a
10
+ * message's id differently, and a mismatch silently splits its expansion
11
+ * state across surfaces.
12
+ */
13
+ messageId: string;
14
+ /** Expansion is scoped per surface (BR-003): the same message collapsed in
15
+ * Pin Management while expanded in the timeline, and vice versa. */
16
+ surface: MessageSurface;
17
+ /**
18
+ * Rendered as the toolbox overlay's clone. The clone is touchable so that
19
+ * `Xem thêm` works there (D1), which makes every other press target in the
20
+ * bubble live too — components with a self-contained handler must disable
21
+ * it when this is set.
22
+ */
23
+ isPreview?: boolean;
6
24
  isOutgoing: boolean;
7
25
  createdAtTime: number;
8
26
  isHighlighted?: boolean;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/messages/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,WAAW,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wEAAwE;IACxE,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7D;AAED,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,WAWlD,CAAC"}
1
+ {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../src/components/messages/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,4BAA4B,CAAC;AAC5D,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,+BAA+B,CAAC;AACjE,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AACnE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,6BAA6B,CAAC;AAElE,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,WAAW,CAAC;IACrB;;;;;OAKG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB;wEACoE;IACpE,OAAO,EAAE,cAAc,CAAC;IACxB;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,wEAAwE;IACxE,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B,YAAY,CAAC,EAAE,CAAC,KAAK,EAAE,SAAS,EAAE,EAAE,KAAK,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;CAC7D;AAED,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,WAWlD,CAAC"}
@@ -0,0 +1,3 @@
1
+ export declare const TimelinePressGuardProvider: import("react").Provider<() => boolean>;
2
+ export declare const useTimelinePressGuard: () => () => boolean;
3
+ //# sourceMappingURL=TimelinePressGuardContext.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TimelinePressGuardContext.d.ts","sourceRoot":"","sources":["../../../../src/context/TimelinePressGuardContext.tsx"],"names":[],"mappings":"AAWA,eAAO,MAAM,0BAA0B,iCAFe,OAAO,CAEe,CAAC;AAE7E,eAAO,MAAM,qBAAqB,cAJoB,OAKf,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useConversationList.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useConversationList.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAE1D,KAAK,MAAM,GAAG;IACZ,eAAe,EAAE,oBAAoB,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAClC,eAAe,EACf,IAAQ,EACR,OAAc,GACf,EAAE,MAAM,8HAgCR"}
1
+ {"version":3,"file":"useConversationList.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useConversationList.ts"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAG1D,KAAK,MAAM,GAAG;IACZ,eAAe,EAAE,oBAAoB,CAAC;IACtC,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,CAAC,EAAE,OAAO,CAAC;CACnB,CAAC;AAEF,wBAAgB,mBAAmB,CAAC,EAClC,eAAe,EACf,IAAQ,EACR,OAAc,GACf,EAAE,MAAM,8HAiCR"}
@@ -0,0 +1,8 @@
1
+ /**
2
+ * Wraps a press that leaves the timeline (media viewer, link, file viewer) so
3
+ * the keyboard is dismissed first. The timeline uses
4
+ * `keyboardShouldPersistTaps="handled"`, so the keyboard would otherwise stay
5
+ * up over the screen the press opens. An absent handler stays absent.
6
+ */
7
+ export declare const useDismissKeyboardFirst: <A extends unknown[]>(handler: ((...args: A) => unknown) | undefined) => ((...args: A) => void) | undefined;
8
+ //# sourceMappingURL=useDismissKeyboardFirst.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useDismissKeyboardFirst.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useDismissKeyboardFirst.ts"],"names":[],"mappings":"AAGA;;;;;GAKG;AACH,eAAO,MAAM,uBAAuB,GAAI,CAAC,SAAS,OAAO,EAAE,EACzD,SAAS,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,SAAS,KAC7C,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,SAOb,CAAC"}
@@ -0,0 +1,13 @@
1
+ import { type TextLayoutEvent } from 'react-native';
2
+ import { COLLAPSED_LINES, type MessageSurface } from '../utils/expandableText';
3
+ export { COLLAPSED_LINES };
4
+ export declare const clearExpandableTextCache: () => void;
5
+ export type ExpandableTextMode = 'plain' | 'measuring' | 'fitting' | 'collapsed';
6
+ export declare function useExpandableText(messageId: string, text: string, surface: MessageSurface): {
7
+ mode: ExpandableTextMode;
8
+ cut: number;
9
+ expand: () => void;
10
+ onMeasureTextLayout: ({ nativeEvent: { lines } }: TextLayoutEvent) => void;
11
+ onFitTextLayout: ({ nativeEvent: { lines } }: TextLayoutEvent) => void;
12
+ };
13
+ //# sourceMappingURL=useExpandableText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useExpandableText.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useExpandableText.ts"],"names":[],"mappings":"AACA,OAAO,EAAuB,KAAK,eAAe,EAAE,MAAM,cAAc,CAAC;AAGzE,OAAO,EACL,eAAe,EAGf,KAAK,cAAc,EACpB,MAAM,yBAAyB,CAAC;AAGjC,OAAO,EAAE,eAAe,EAAE,CAAC;AAiB3B,eAAO,MAAM,wBAAwB,YAA6B,CAAC;AAsBnE,MAAM,MAAM,kBAAkB,GAC1B,OAAO,GACP,WAAW,GACX,SAAS,GACT,WAAW,CAAC;AAEhB,wBAAgB,iBAAiB,CAC/B,SAAS,EAAE,MAAM,EACjB,IAAI,EAAE,MAAM,EACZ,OAAO,EAAE,cAAc;;;;sDAwCQ,eAAe;kDAgBf,eAAe;EA0B/C"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Wraps a timeline press handler so it is skipped while `shouldSwallow()` is
3
+ * true — the tap-outside panel dismiss (useComposerPanelDismiss) swallows the
4
+ * press of a touch that began with a composer panel open. An absent handler
5
+ * stays absent, so "not tappable" rows keep behaving as before. The wrapper's
6
+ * return value is dropped: press handlers are fire-and-forget.
7
+ */
8
+ export declare const useGuardedPress: <A extends unknown[]>(handler: ((...args: A) => unknown) | undefined, shouldSwallow: (() => boolean) | undefined) => ((...args: A) => void) | undefined;
9
+ //# sourceMappingURL=useGuardedPress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGuardedPress.d.ts","sourceRoot":"","sources":["../../../../src/hooks/useGuardedPress.ts"],"names":[],"mappings":"AAEA;;;;;;GAMG;AACH,eAAO,MAAM,eAAe,GAAI,CAAC,SAAS,OAAO,EAAE,EACjD,SAAS,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,OAAO,CAAC,GAAG,SAAS,EAC9C,eAAe,CAAC,MAAM,OAAO,CAAC,GAAG,SAAS,KACzC,CAAC,CAAC,GAAG,IAAI,EAAE,CAAC,KAAK,IAAI,CAAC,GAAG,SAOE,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import { type RefObject } from 'react';
2
- import { type LayoutChangeEvent, type View } from 'react-native';
3
- import { type DChatPannelAction } from './types';
2
+ import type { LayoutChangeEvent, View } from 'react-native';
3
+ import type { ComposerPanelController, DChatPannelAction } from './types';
4
4
  interface ChatComposerInternalProps {
5
5
  isEmptyMessage?: boolean;
6
6
  pannelActions?: DChatPannelAction[];
@@ -9,7 +9,11 @@ interface ChatComposerInternalProps {
9
9
  onComposerLayout?: (event: LayoutChangeEvent) => void;
10
10
  onPressJoinGroup?: () => void;
11
11
  isJoiningGroup?: boolean;
12
+ /** @internal Filled with the panel controller for tap-outside dismiss. */
13
+ panelControllerRef?: RefObject<ComposerPanelController | null>;
14
+ /** @internal Reports whether the attachment/sticker panel is open. */
15
+ onPanelOpenChange?: (open: boolean) => void;
12
16
  }
13
- export declare const ChatComposer: import("react").MemoExoticComponent<({ isEmptyMessage, pannelActions, isComposeDisabled, composerRef, onComposerLayout, onPressJoinGroup, isJoiningGroup, }: ChatComposerInternalProps) => import("react").JSX.Element>;
17
+ export declare const ChatComposer: import("react").MemoExoticComponent<({ isEmptyMessage, pannelActions, isComposeDisabled, composerRef, onComposerLayout, onPressJoinGroup, isJoiningGroup, panelControllerRef, onPanelOpenChange, }: ChatComposerInternalProps) => import("react").JSX.Element>;
14
18
  export {};
15
19
  //# sourceMappingURL=ChatComposer.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AACf,OAAO,EAIL,KAAK,iBAAiB,EACtB,KAAK,IAAI,EACV,MAAM,cAAc,CAAC;AA8BtB,OAAO,EAA6B,KAAK,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAgC5E,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACrC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACtD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;CAC1B;AAED,eAAO,MAAM,YAAY,+JASpB,yBAAyB,iCA6oB7B,CAAC"}
1
+ {"version":3,"file":"ChatComposer.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatComposer.tsx"],"names":[],"mappings":"AAAA,OAAO,EAA8B,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AACnE,OAAO,KAAK,EAAE,iBAAiB,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAQ5D,OAAO,KAAK,EAAE,uBAAuB,EAAE,iBAAiB,EAAE,MAAM,SAAS,CAAC;AAqB1E,UAAU,yBAAyB;IACjC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,WAAW,CAAC,EAAE,SAAS,CAAC,IAAI,GAAG,IAAI,CAAC,CAAC;IACrC,gBAAgB,CAAC,EAAE,CAAC,KAAK,EAAE,iBAAiB,KAAK,IAAI,CAAC;IACtD,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,0EAA0E;IAC1E,kBAAkB,CAAC,EAAE,SAAS,CAAC,uBAAuB,GAAG,IAAI,CAAC,CAAC;IAC/D,sEAAsE;IACtE,iBAAiB,CAAC,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;CAC7C;AAED,eAAO,MAAM,YAAY,sMAWpB,yBAAyB,iCA2L7B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatDetail.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatDetail.tsx"],"names":[],"mappings":"AAwBA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AAkV/C,QAAA,MAAM,YAAY,GAAI,OAAO,eAAe,gCAS3C,CAAC;AAEF,eAAe,YAAY,CAAC"}
1
+ {"version":3,"file":"ChatDetail.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatDetail.tsx"],"names":[],"mappings":"AA4BA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,SAAS,CAAC;AA2W/C,QAAA,MAAM,YAAY,GAAI,OAAO,eAAe,gCAS3C,CAAC;AAEF,eAAe,YAAY,CAAC"}
@@ -2,6 +2,7 @@ import { type RefObject } from 'react';
2
2
  import { type SharedValue } from 'react-native-reanimated';
3
3
  import { type LegendListRef } from '@legendapp/list/react-native';
4
4
  import type { ChatListProps } from './types';
5
+ import type { DismissAreaTouchProps } from './hooks/useComposerPanelDismiss';
5
6
  interface ChatListLegendInternalProps extends ChatListProps {
6
7
  listRef: RefObject<LegendListRef | null>;
7
8
  freeze: SharedValue<boolean>;
@@ -10,7 +11,10 @@ interface ChatListLegendInternalProps extends ChatListProps {
10
11
  closeKeyboard: boolean;
11
12
  }) => Promise<void>;
12
13
  keyboardOffset: number;
14
+ dismissAreaTouchProps?: DismissAreaTouchProps;
15
+ isComposerPanelOpen?: boolean;
16
+ onDismissAreaScrollBeginDrag?: () => void;
13
17
  }
14
- export declare const ChatListLegend: import("react").MemoExoticComponent<({ messages, conversationId, customMessageItemFactory, onLoadMoreOld, moreOldLoading, hasMoreOld, onLoadMoreNew, hasMoreNew, onMediaPress, onPressUrl, onLongPress, listRef, freeze, scrollMessageToEnd, keyboardOffset, isLoading, renderConversationViewHeader, }: ChatListLegendInternalProps) => import("react").JSX.Element>;
18
+ export declare const ChatListLegend: import("react").MemoExoticComponent<({ messages, conversationId, customMessageItemFactory, onLoadMoreOld, moreOldLoading, hasMoreOld, onLoadMoreNew, hasMoreNew, onMediaPress: onMediaPressProp, onPressUrl: onPressUrlProp, onLongPress, listRef, freeze, scrollMessageToEnd, keyboardOffset, isLoading, renderConversationViewHeader, dismissAreaTouchProps, isComposerPanelOpen, onDismissAreaScrollBeginDrag, }: ChatListLegendInternalProps) => import("react").JSX.Element>;
15
19
  export {};
16
20
  //# sourceMappingURL=ChatListLegend.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatListLegend.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatListLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,OAAiB,EAKf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,8BAA8B,CAAC;AActC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAoF7C,UAAU,2BAA4B,SAAQ,aAAa;IACzD,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACzC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,kBAAkB,EAAE,CAAC,IAAI,EAAE;QACzB,QAAQ,EAAE,OAAO,CAAC;QAClB,aAAa,EAAE,OAAO,CAAC;KACxB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;CACxB;AAED,eAAO,MAAM,cAAc,2SAmBtB,2BAA2B,iCAq2B/B,CAAC"}
1
+ {"version":3,"file":"ChatListLegend.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatListLegend.tsx"],"names":[],"mappings":"AAAA,OAAO,EAOL,KAAK,SAAS,EACf,MAAM,OAAO,CAAC;AAQf,OAAiB,EAKf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAMjC,OAAO,EACL,KAAK,aAAa,EAEnB,MAAM,8BAA8B,CAAC;AActC,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA0B7C,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,iCAAiC,CAAC;AA+D7E,UAAU,2BAA4B,SAAQ,aAAa;IACzD,OAAO,EAAE,SAAS,CAAC,aAAa,GAAG,IAAI,CAAC,CAAC;IACzC,MAAM,EAAE,WAAW,CAAC,OAAO,CAAC,CAAC;IAC7B,kBAAkB,EAAE,CAAC,IAAI,EAAE;QACzB,QAAQ,EAAE,OAAO,CAAC;QAClB,aAAa,EAAE,OAAO,CAAC;KACxB,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACpB,cAAc,EAAE,MAAM,CAAC;IAGvB,qBAAqB,CAAC,EAAE,qBAAqB,CAAC;IAE9C,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,4BAA4B,CAAC,EAAE,MAAM,IAAI,CAAC;CAC3C;AAED,eAAO,MAAM,cAAc,uZAsBtB,2BAA2B,iCAu4B/B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"PinnedMessagesSheet.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/PinnedMessagesSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AAwL9E,MAAM,WAAW,6BAA6B;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,wBAAwB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,SAAS,CAAC;IAC5D,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CACjD;AAED,eAAO,MAAM,uBAAuB,GAAI,4EAKrC,6BAA6B,SAmB/B,CAAC"}
1
+ {"version":3,"file":"PinnedMessagesSheet.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/PinnedMessagesSheet.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAEvC,OAAO,EAAe,KAAK,WAAW,EAAE,MAAM,+BAA+B,CAAC;AA0L9E,MAAM,WAAW,6BAA6B;IAC5C,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,YAAY,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IAC7D,wBAAwB,CAAC,EAAE,CAAC,IAAI,EAAE,WAAW,KAAK,SAAS,CAAC;IAC5D,cAAc,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,KAAK,IAAI,CAAC;CACjD;AAED,eAAO,MAAM,uBAAuB,GAAI,4EAKrC,6BAA6B,SAyB/B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ActivePanelType } from '../hooks/useChatComposerState';
2
+ import type { DChatPannelAction } from '../types';
3
+ interface ChatComposerAccessorySlotProps {
4
+ visible: boolean;
5
+ accessorySlotStyle: any;
6
+ isAttachmentOpen: boolean;
7
+ activePanelType: ActivePanelType;
8
+ pannelActions: DChatPannelAction[];
9
+ }
10
+ export declare const ChatComposerAccessorySlot: ({ visible, accessorySlotStyle, isAttachmentOpen, activePanelType, pannelActions, }: ChatComposerAccessorySlotProps) => import("react").JSX.Element;
11
+ export {};
12
+ //# sourceMappingURL=ChatComposerAccessorySlot.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatComposerAccessorySlot.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/components/ChatComposerAccessorySlot.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAElD,UAAU,8BAA8B;IACtC,OAAO,EAAE,OAAO,CAAC;IACjB,kBAAkB,EAAE,GAAG,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,eAAe,EAAE,eAAe,CAAC;IACjC,aAAa,EAAE,iBAAiB,EAAE,CAAC;CACpC;AAID,eAAO,MAAM,yBAAyB,GAAI,oFAMvC,8BAA8B,gCAyBhC,CAAC"}
@@ -0,0 +1,30 @@
1
+ import { type RefObject } from 'react';
2
+ import type { ActivePanelType } from '../hooks/useChatComposerState';
3
+ import type { useMentionComposer } from '../hooks/useMentionComposer';
4
+ import type { useChatCompose } from '../../../hooks/useChatCompose';
5
+ interface ChatComposerInputAreaProps {
6
+ compose: ReturnType<typeof useChatCompose>;
7
+ mentionComposer: ReturnType<typeof useMentionComposer>;
8
+ activePanelType: ActivePanelType;
9
+ isAttachmentOpen: boolean;
10
+ isInputFocused: boolean;
11
+ isMultilineInput: boolean;
12
+ inputRef: RefObject<any>;
13
+ onToggleAttachment: () => void;
14
+ onToggleSticker: () => void;
15
+ onChangeText: (text?: string) => void;
16
+ onInputFocus: () => void;
17
+ onInputBlur: () => void;
18
+ onInputContentSizeChange: (event: {
19
+ nativeEvent: {
20
+ contentSize: {
21
+ height: number;
22
+ };
23
+ };
24
+ }) => void;
25
+ onOpenBotMenu?: () => void;
26
+ onSend: () => void;
27
+ }
28
+ export declare const ChatComposerInputArea: ({ compose, mentionComposer, activePanelType, isAttachmentOpen, isInputFocused, isMultilineInput, inputRef, onToggleAttachment, onToggleSticker, onChangeText, onInputFocus, onInputBlur, onInputContentSizeChange, onOpenBotMenu, onSend, }: ChatComposerInputAreaProps) => import("react").JSX.Element;
29
+ export {};
30
+ //# sourceMappingURL=ChatComposerInputArea.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatComposerInputArea.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/components/ChatComposerInputArea.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAwB,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAe7D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,+BAA+B,CAAC;AACrE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,6BAA6B,CAAC;AACtE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,+BAA+B,CAAC;AAGpE,UAAU,0BAA0B;IAClC,OAAO,EAAE,UAAU,CAAC,OAAO,cAAc,CAAC,CAAC;IAC3C,eAAe,EAAE,UAAU,CAAC,OAAO,kBAAkB,CAAC,CAAC;IACvD,eAAe,EAAE,eAAe,CAAC;IACjC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,OAAO,CAAC;IACxB,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC;IACzB,kBAAkB,EAAE,MAAM,IAAI,CAAC;IAC/B,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B,YAAY,EAAE,CAAC,IAAI,CAAC,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,YAAY,EAAE,MAAM,IAAI,CAAC;IACzB,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,wBAAwB,EAAE,CAAC,KAAK,EAAE;QAChC,WAAW,EAAE;YAAE,WAAW,EAAE;gBAAE,MAAM,EAAE,MAAM,CAAA;aAAE,CAAA;SAAE,CAAC;KAClD,KAAK,IAAI,CAAC;IACX,aAAa,CAAC,EAAE,MAAM,IAAI,CAAC;IAC3B,MAAM,EAAE,MAAM,IAAI,CAAC;CACpB;AAID,eAAO,MAAM,qBAAqB,GAAI,6OAgBnC,0BAA0B,gCA4H5B,CAAC"}
@@ -0,0 +1,19 @@
1
+ export type ComposerStatusVariant = 'sellerInactive' | 'botStart' | 'notInGroup' | 'sendDenied';
2
+ export declare const getComposerStatusVariant: ({ isDisableCompose, isGroupConversation, isNewBotConversation, isNotInGroup, isSendMessageAllowed, }: {
3
+ isDisableCompose: boolean;
4
+ isGroupConversation: boolean;
5
+ isNewBotConversation: boolean;
6
+ isNotInGroup: boolean;
7
+ isSendMessageAllowed: boolean;
8
+ }) => ComposerStatusVariant | null;
9
+ interface ChatComposerStatusBannerProps {
10
+ variant: ComposerStatusVariant;
11
+ isRunFlowPending?: boolean;
12
+ onStartConversationFlow?: () => void;
13
+ isJoiningGroup?: boolean;
14
+ onPressJoinGroup?: () => void;
15
+ sendDeniedReason?: string;
16
+ }
17
+ export declare const ChatComposerStatusBanner: ({ variant, isRunFlowPending, onStartConversationFlow, isJoiningGroup, onPressJoinGroup, sendDeniedReason, }: ChatComposerStatusBannerProps) => import("react").JSX.Element;
18
+ export {};
19
+ //# sourceMappingURL=ChatComposerStatusBanner.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ChatComposerStatusBanner.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/components/ChatComposerStatusBanner.tsx"],"names":[],"mappings":"AAIA,MAAM,MAAM,qBAAqB,GAC7B,gBAAgB,GAChB,UAAU,GACV,YAAY,GACZ,YAAY,CAAC;AAGjB,eAAO,MAAM,wBAAwB,GAAI,sGAMtC;IACD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,YAAY,EAAE,OAAO,CAAC;IACtB,oBAAoB,EAAE,OAAO,CAAC;CAC/B,KAAG,qBAAqB,GAAG,IAM3B,CAAC;AAEF,UAAU,6BAA6B;IACrC,OAAO,EAAE,qBAAqB,CAAC;IAC/B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,uBAAuB,CAAC,EAAE,MAAM,IAAI,CAAC;IACrC,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;IAC9B,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAgBD,eAAO,MAAM,wBAAwB,GAAI,6GAOtC,6BAA6B,gCAsD/B,CAAC"}
@@ -5,7 +5,6 @@ interface UseChatComposerAnimationProps {
5
5
  interface UseChatComposerAnimationReturn {
6
6
  attachmentHeightSV: any;
7
7
  accessorySlotStyle: any;
8
- toggleAttachmentVisibility: () => void;
9
8
  openAttachment: () => void;
10
9
  openWithHeight: (height: number) => void;
11
10
  closeAttachment: (speedUp?: boolean, immediate?: boolean) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useChatComposerAnimation.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useChatComposerAnimation.ts"],"names":[],"mappings":"AAWA,UAAU,6BAA6B;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD;AAED,UAAU,8BAA8B;IACtC,kBAAkB,EAAE,GAAG,CAAC;IACxB,kBAAkB,EAAE,GAAG,CAAC;IACxB,0BAA0B,EAAE,MAAM,IAAI,CAAC;IACvC,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACnE;AAED,eAAO,MAAM,wBAAwB,GAAI,0CAGtC,6BAA6B,KAAG,8BA4ElC,CAAC"}
1
+ {"version":3,"file":"useChatComposerAnimation.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useChatComposerAnimation.ts"],"names":[],"mappings":"AASA,UAAU,6BAA6B;IACrC,WAAW,EAAE,MAAM,CAAC;IACpB,sBAAsB,EAAE,CAAC,MAAM,EAAE,OAAO,KAAK,IAAI,CAAC;CACnD;AAED,UAAU,8BAA8B;IACtC,kBAAkB,EAAE,GAAG,CAAC;IACxB,kBAAkB,EAAE,GAAG,CAAC;IACxB,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,cAAc,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,OAAO,CAAC,EAAE,OAAO,EAAE,SAAS,CAAC,EAAE,OAAO,KAAK,IAAI,CAAC;CACnE;AAED,eAAO,MAAM,wBAAwB,GAAI,0CAGtC,6BAA6B,KAAG,8BAkDlC,CAAC"}
@@ -9,6 +9,13 @@ interface UseChatComposerStateReturn {
9
9
  isInputWrapped: boolean;
10
10
  setIsInputWrapped: (wrapped: boolean) => void;
11
11
  isMultilineInput: boolean;
12
+ handleInputContentSizeChange: (event: {
13
+ nativeEvent: {
14
+ contentSize: {
15
+ height: number;
16
+ };
17
+ };
18
+ }) => void;
12
19
  inputRef: React.RefObject<any>;
13
20
  }
14
21
  export declare const useChatComposerState: (value: string) => UseChatComposerStateReturn;
@@ -1 +1 @@
1
- {"version":3,"file":"useChatComposerState.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useChatComposerState.ts"],"names":[],"mappings":"AAQA,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;AAE1E,UAAU,0BAA0B;IAClC,eAAe,EAAE,eAAe,CAAC;IACjC,kBAAkB,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CAChC;AAED,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,KACZ,0BA2BF,CAAC"}
1
+ {"version":3,"file":"useChatComposerState.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useChatComposerState.ts"],"names":[],"mappings":"AAeA,MAAM,MAAM,eAAe,GAAG,YAAY,GAAG,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;AAE1E,UAAU,0BAA0B;IAClC,eAAe,EAAE,eAAe,CAAC;IACjC,kBAAkB,EAAE,CAAC,IAAI,EAAE,eAAe,KAAK,IAAI,CAAC;IACpD,gBAAgB,EAAE,OAAO,CAAC;IAC1B,mBAAmB,EAAE,CAAC,IAAI,EAAE,OAAO,KAAK,IAAI,CAAC;IAC7C,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,cAAc,EAAE,OAAO,CAAC;IACxB,iBAAiB,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,IAAI,CAAC;IAC9C,gBAAgB,EAAE,OAAO,CAAC;IAC1B,4BAA4B,EAAE,CAAC,KAAK,EAAE;QACpC,WAAW,EAAE;YAAE,WAAW,EAAE;gBAAE,MAAM,EAAE,MAAM,CAAA;aAAE,CAAA;SAAE,CAAC;KAClD,KAAK,IAAI,CAAC;IACX,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CAChC;AAED,eAAO,MAAM,oBAAoB,GAC/B,OAAO,MAAM,KACZ,0BAwCF,CAAC"}
@@ -0,0 +1,7 @@
1
+ export declare const useComposerBotMenu: () => {
2
+ hasBotMenuOptions: boolean;
3
+ handleOpenBotMenu: () => void;
4
+ onStartConversationFlow: () => void;
5
+ isRunFlowPending: boolean;
6
+ };
7
+ //# sourceMappingURL=useComposerBotMenu.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useComposerBotMenu.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useComposerBotMenu.tsx"],"names":[],"mappings":"AAgBA,eAAO,MAAM,kBAAkB;;;;;CA2H9B,CAAC"}
@@ -0,0 +1,17 @@
1
+ import { DChatPannelActionItemType, type DChatPannelAction } from '../types';
2
+ interface UseComposerPanelActionsProps {
3
+ pannelActions?: DChatPannelAction[];
4
+ addImages?: () => void;
5
+ addFiles?: () => void;
6
+ }
7
+ export declare const useComposerPanelActions: ({ pannelActions, addImages, addFiles, }: UseComposerPanelActionsProps) => {
8
+ onPress: any;
9
+ id: DChatPannelActionItemType;
10
+ label: string;
11
+ iconName: string;
12
+ iconProvider?: import("..").DChatActionIconProvider;
13
+ disabled?: boolean;
14
+ meta?: Record<string, unknown>;
15
+ }[];
16
+ export {};
17
+ //# sourceMappingURL=useComposerPanelActions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useComposerPanelActions.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/hooks/useComposerPanelActions.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,yBAAyB,EAAE,KAAK,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7E,UAAU,4BAA4B;IACpC,aAAa,CAAC,EAAE,iBAAiB,EAAE,CAAC;IACpC,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;IACvB,QAAQ,CAAC,EAAE,MAAM,IAAI,CAAC;CACvB;AAID,eAAO,MAAM,uBAAuB,GAAI,yCAIrC,4BAA4B;;;;;;;;GAsC9B,CAAC"}
@@ -0,0 +1,12 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { ComposerPanelController } from '../types';
3
+ export type DismissAreaTouchProps = Pick<ViewProps, 'onTouchStart' | 'onTouchMove' | 'onTouchEnd' | 'onTouchCancel'>;
4
+ export declare const useComposerPanelDismiss: () => {
5
+ panelControllerRef: import("react").RefObject<ComposerPanelController>;
6
+ isComposerPanelOpen: boolean;
7
+ onComposerPanelOpenChange: import("react").Dispatch<import("react").SetStateAction<boolean>>;
8
+ dismissAreaTouchProps: DismissAreaTouchProps;
9
+ notifyScrollBeginDrag: () => void;
10
+ shouldSwallowPress: () => boolean;
11
+ };
12
+ //# sourceMappingURL=useComposerPanelDismiss.d.ts.map