@droppii-org/chat-mobile 0.2.78 → 0.2.80

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 (140) hide show
  1. package/lib/module/components/messages/BubbleTail.js +31 -0
  2. package/lib/module/components/messages/BubbleTail.js.map +1 -0
  3. package/lib/module/components/messages/BubbleTailRow.js +46 -0
  4. package/lib/module/components/messages/BubbleTailRow.js.map +1 -0
  5. package/lib/module/components/messages/bubbleTail.utils.js +19 -0
  6. package/lib/module/components/messages/bubbleTail.utils.js.map +1 -0
  7. package/lib/module/components/messages/fileMessage/index.js +72 -65
  8. package/lib/module/components/messages/fileMessage/index.js.map +1 -1
  9. package/lib/module/components/messages/imageMessage/index.js +23 -17
  10. package/lib/module/components/messages/imageMessage/index.js.map +1 -1
  11. package/lib/module/components/messages/linkMessage/index.js +11 -23
  12. package/lib/module/components/messages/linkMessage/index.js.map +1 -1
  13. package/lib/module/components/messages/mergedMessage/index.js +14 -7
  14. package/lib/module/components/messages/mergedMessage/index.js.map +1 -1
  15. package/lib/module/components/messages/quotedMessage/index.js +11 -23
  16. package/lib/module/components/messages/quotedMessage/index.js.map +1 -1
  17. package/lib/module/components/messages/revokedMessage/index.js +14 -7
  18. package/lib/module/components/messages/revokedMessage/index.js.map +1 -1
  19. package/lib/module/components/messages/stickerMessage/index.js +13 -7
  20. package/lib/module/components/messages/stickerMessage/index.js.map +1 -1
  21. package/lib/module/components/messages/textMessage/index.js +11 -26
  22. package/lib/module/components/messages/textMessage/index.js.map +1 -1
  23. package/lib/module/components/messages/types.js.map +1 -1
  24. package/lib/module/components/messages/videoMessage/index.js +16 -8
  25. package/lib/module/components/messages/videoMessage/index.js.map +1 -1
  26. package/lib/module/core/useChatListener.js +11 -0
  27. package/lib/module/core/useChatListener.js.map +1 -1
  28. package/lib/module/hooks/groups/useDismissGroup.js +2 -1
  29. package/lib/module/hooks/groups/useDismissGroup.js.map +1 -1
  30. package/lib/module/hooks/groups/useGroupAccessGuard.js +145 -0
  31. package/lib/module/hooks/groups/useGroupAccessGuard.js.map +1 -0
  32. package/lib/module/screens/ChatInfo/ChatInfoDescriptionRow.js +4 -1
  33. package/lib/module/screens/ChatInfo/ChatInfoDescriptionRow.js.map +1 -1
  34. package/lib/module/screens/chat-detail/ChatDetail.js +12 -10
  35. package/lib/module/screens/chat-detail/ChatDetail.js.map +1 -1
  36. package/lib/module/screens/chat-detail/ChatDetailHeader.js +3 -9
  37. package/lib/module/screens/chat-detail/ChatDetailHeader.js.map +1 -1
  38. package/lib/module/screens/chat-detail/ChatListLegend.js +71 -21
  39. package/lib/module/screens/chat-detail/ChatListLegend.js.map +1 -1
  40. package/lib/module/screens/chat-detail/legend/LegendChatDay.js +8 -2
  41. package/lib/module/screens/chat-detail/legend/LegendChatDay.js.map +1 -1
  42. package/lib/module/screens/chat-detail/legend/LegendChatMessage.js +38 -13
  43. package/lib/module/screens/chat-detail/legend/LegendChatMessage.js.map +1 -1
  44. package/lib/module/screens/inbox/CommunityTab.js +5 -2
  45. package/lib/module/screens/inbox/CommunityTab.js.map +1 -1
  46. package/lib/module/screens/inbox/MessagesTab.js +2 -2
  47. package/lib/module/screens/inbox/MessagesTab.js.map +1 -1
  48. package/lib/module/store/conversation.js +18 -20
  49. package/lib/module/store/conversation.js.map +1 -1
  50. package/lib/module/translation/resources/i18n.js +4 -1
  51. package/lib/module/translation/resources/i18n.js.map +1 -1
  52. package/lib/module/utils/conversation.js +4 -1
  53. package/lib/module/utils/conversation.js.map +1 -1
  54. package/lib/module/utils/legendListMessage.js +86 -12
  55. package/lib/module/utils/legendListMessage.js.map +1 -1
  56. package/lib/module/utils/message.js +19 -1
  57. package/lib/module/utils/message.js.map +1 -1
  58. package/lib/module/utils/messageUtils.js +7 -1
  59. package/lib/module/utils/messageUtils.js.map +1 -1
  60. package/lib/typescript/src/components/messages/BubbleTail.d.ts +13 -0
  61. package/lib/typescript/src/components/messages/BubbleTail.d.ts.map +1 -0
  62. package/lib/typescript/src/components/messages/BubbleTailRow.d.ts +25 -0
  63. package/lib/typescript/src/components/messages/BubbleTailRow.d.ts.map +1 -0
  64. package/lib/typescript/src/components/messages/bubbleTail.utils.d.ts +11 -0
  65. package/lib/typescript/src/components/messages/bubbleTail.utils.d.ts.map +1 -0
  66. package/lib/typescript/src/components/messages/fileMessage/index.d.ts +1 -1
  67. package/lib/typescript/src/components/messages/fileMessage/index.d.ts.map +1 -1
  68. package/lib/typescript/src/components/messages/imageMessage/index.d.ts +1 -1
  69. package/lib/typescript/src/components/messages/imageMessage/index.d.ts.map +1 -1
  70. package/lib/typescript/src/components/messages/linkMessage/index.d.ts +1 -1
  71. package/lib/typescript/src/components/messages/linkMessage/index.d.ts.map +1 -1
  72. package/lib/typescript/src/components/messages/mergedMessage/index.d.ts +1 -1
  73. package/lib/typescript/src/components/messages/mergedMessage/index.d.ts.map +1 -1
  74. package/lib/typescript/src/components/messages/quotedMessage/index.d.ts.map +1 -1
  75. package/lib/typescript/src/components/messages/revokedMessage/index.d.ts +1 -1
  76. package/lib/typescript/src/components/messages/revokedMessage/index.d.ts.map +1 -1
  77. package/lib/typescript/src/components/messages/stickerMessage/index.d.ts +1 -1
  78. package/lib/typescript/src/components/messages/stickerMessage/index.d.ts.map +1 -1
  79. package/lib/typescript/src/components/messages/textMessage/index.d.ts +1 -1
  80. package/lib/typescript/src/components/messages/textMessage/index.d.ts.map +1 -1
  81. package/lib/typescript/src/components/messages/types.d.ts +3 -0
  82. package/lib/typescript/src/components/messages/types.d.ts.map +1 -1
  83. package/lib/typescript/src/components/messages/videoMessage/index.d.ts +1 -1
  84. package/lib/typescript/src/components/messages/videoMessage/index.d.ts.map +1 -1
  85. package/lib/typescript/src/core/useChatListener.d.ts.map +1 -1
  86. package/lib/typescript/src/hooks/groups/useDismissGroup.d.ts.map +1 -1
  87. package/lib/typescript/src/hooks/groups/useGroupAccessGuard.d.ts +10 -0
  88. package/lib/typescript/src/hooks/groups/useGroupAccessGuard.d.ts.map +1 -0
  89. package/lib/typescript/src/screens/ChatInfo/ChatInfoDescriptionRow.d.ts.map +1 -1
  90. package/lib/typescript/src/screens/chat-detail/ChatDetail.d.ts.map +1 -1
  91. package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts +1 -1
  92. package/lib/typescript/src/screens/chat-detail/ChatDetailHeader.d.ts.map +1 -1
  93. package/lib/typescript/src/screens/chat-detail/ChatListLegend.d.ts.map +1 -1
  94. package/lib/typescript/src/screens/chat-detail/legend/LegendChatDay.d.ts +6 -1
  95. package/lib/typescript/src/screens/chat-detail/legend/LegendChatDay.d.ts.map +1 -1
  96. package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts +14 -1
  97. package/lib/typescript/src/screens/chat-detail/legend/LegendChatMessage.d.ts.map +1 -1
  98. package/lib/typescript/src/screens/chat-detail/types.d.ts +0 -1
  99. package/lib/typescript/src/screens/chat-detail/types.d.ts.map +1 -1
  100. package/lib/typescript/src/store/conversation.d.ts.map +1 -1
  101. package/lib/typescript/src/translation/resources/i18n.d.ts.map +1 -1
  102. package/lib/typescript/src/utils/conversation.d.ts.map +1 -1
  103. package/lib/typescript/src/utils/legendListMessage.d.ts +19 -4
  104. package/lib/typescript/src/utils/legendListMessage.d.ts.map +1 -1
  105. package/lib/typescript/src/utils/message.d.ts +17 -0
  106. package/lib/typescript/src/utils/message.d.ts.map +1 -1
  107. package/lib/typescript/src/utils/messageUtils.d.ts +1 -0
  108. package/lib/typescript/src/utils/messageUtils.d.ts.map +1 -1
  109. package/package.json +1 -1
  110. package/src/components/messages/BubbleTail.tsx +35 -0
  111. package/src/components/messages/BubbleTailRow.tsx +64 -0
  112. package/src/components/messages/bubbleTail.utils.ts +21 -0
  113. package/src/components/messages/fileMessage/index.tsx +90 -83
  114. package/src/components/messages/imageMessage/index.tsx +26 -23
  115. package/src/components/messages/linkMessage/index.tsx +6 -18
  116. package/src/components/messages/mergedMessage/index.tsx +27 -15
  117. package/src/components/messages/quotedMessage/index.tsx +7 -19
  118. package/src/components/messages/revokedMessage/index.tsx +23 -14
  119. package/src/components/messages/stickerMessage/index.tsx +16 -11
  120. package/src/components/messages/textMessage/index.tsx +6 -22
  121. package/src/components/messages/types.ts +3 -0
  122. package/src/components/messages/videoMessage/index.tsx +13 -10
  123. package/src/core/useChatListener.ts +14 -0
  124. package/src/hooks/groups/useDismissGroup.tsx +1 -0
  125. package/src/hooks/groups/useGroupAccessGuard.ts +182 -0
  126. package/src/screens/ChatInfo/ChatInfoDescriptionRow.tsx +5 -1
  127. package/src/screens/chat-detail/ChatDetail.tsx +11 -13
  128. package/src/screens/chat-detail/ChatDetailHeader.tsx +2 -6
  129. package/src/screens/chat-detail/ChatListLegend.tsx +97 -28
  130. package/src/screens/chat-detail/legend/LegendChatDay.tsx +25 -15
  131. package/src/screens/chat-detail/legend/LegendChatMessage.tsx +62 -12
  132. package/src/screens/chat-detail/types.ts +0 -1
  133. package/src/screens/inbox/CommunityTab.tsx +2 -2
  134. package/src/screens/inbox/MessagesTab.tsx +1 -1
  135. package/src/store/conversation.ts +14 -18
  136. package/src/translation/resources/i18n.ts +4 -0
  137. package/src/utils/conversation.ts +6 -3
  138. package/src/utils/legendListMessage.ts +123 -14
  139. package/src/utils/message.ts +19 -1
  140. package/src/utils/messageUtils.ts +9 -1
@@ -1,6 +1,8 @@
1
1
  "use strict";
2
2
 
3
3
  import { MessageType } from '@droppii/openim-rn-client-sdk';
4
+ import { GROUP_NOTIFICATION_TYPES } from "./messageUtils.js";
5
+ import { getMessageRenderId, getMessageTime } from "./message.js";
4
6
 
5
7
  /**
6
8
  * Extract message text based on content type
@@ -40,26 +42,98 @@ export const getMessageText = message => {
40
42
  return message.content || '';
41
43
  }
42
44
  };
45
+
46
+ /** Where a message sits inside its run of consecutive same-sender messages. */
47
+
48
+ /** Two messages further apart than this never share a cluster. */
49
+ const GROUP_TIME_GAP = 300_000; // 5 minutes
50
+
51
+ /** Virtual sender for bot conversations — see getGroupKey. */
52
+ const BOT_GROUP_KEY = '__bot__';
53
+ const startOfDay = timestamp => {
54
+ const date = new Date(timestamp);
55
+ date.setHours(0, 0, 0, 0);
56
+ return date.getTime();
57
+ };
58
+
43
59
  /**
44
- * Precompute all message rendering data in single pass O(n)
45
- * Eliminates redundant Date creation and type resolution during render
60
+ * System banners (group created/renamed/member changes) and anything without a
61
+ * sender are not user-authored, so they never join a cluster and always break
62
+ * the runs on both sides of them.
63
+ */
64
+ const isSystemMessage = message => GROUP_NOTIFICATION_TYPES.includes(message.contentType) || !message.sendID;
65
+
66
+ /**
67
+ * Identity two messages must share to cluster together. In a bot conversation
68
+ * every incoming message is treated as one virtual sender: replies come from
69
+ * the bot and from human agents under different sendIDs, but read as a single
70
+ * continuous voice.
71
+ */
72
+ const getGroupKey = (message, isBotConversation, currentUserId) => {
73
+ const isOutgoing = message.sendID === currentUserId;
74
+ if (isBotConversation && !isOutgoing) return BOT_GROUP_KEY;
75
+ return message.sendID;
76
+ };
77
+ /**
78
+ * Precompute per-message render data (day dividers + cluster position) so
79
+ * renderItem stays allocation-free.
46
80
  *
47
- * Returns: Map of messageId -> {dayStart, messageType, createdAt}
81
+ * Runs in two passes: day starts first, because cluster boundaries depend on
82
+ * them — a divider between two messages separates them however close in time
83
+ * they are.
48
84
  */
49
- export const precomputeLegendListData = messages => {
85
+ export const precomputeLegendListData = (messages, {
86
+ isBotConversation = false,
87
+ currentUserId
88
+ } = {}) => {
50
89
  const dataMap = new Map();
90
+
91
+ // Pass 1 — identity, timestamp, day divider.
92
+ const dayStarts = [];
93
+ const ids = [];
94
+ // Resolved timestamps, reused by pass 2. Shared with the list's sort key so
95
+ // cluster boundaries are computed over the same ordering that gets rendered.
96
+ const timestamps = [];
51
97
  let lastDay = null;
52
98
  messages.forEach((message, index) => {
53
- // Get message ID - use timestamp as fallback for newly sent messages
54
- const messageId = message.clientMsgID || message.serverMsgID || `temp-${message.sendTime || message.createTime}-${index}`;
55
- const createdAt = message.sendTime || message.createTime;
56
- const day = new Date(createdAt).getDate();
99
+ const messageId = getMessageRenderId(message, index);
100
+
101
+ // A message still in flight can reach us with no usable timestamp at all.
102
+ // Left as 0 it lands on the epoch, which reads as a different calendar day
103
+ // from its neighbours — that inserts a bogus divider AND splits the cluster,
104
+ // stranding a tail on the message before it. Anchor it to the previous
105
+ // message instead, which is where it belongs in both senses.
106
+ const rawCreatedAt = getMessageTime(message);
107
+ const createdAt = rawCreatedAt > 0 ? rawCreatedAt : timestamps[index - 1] ?? rawCreatedAt;
108
+ const day = startOfDay(createdAt);
109
+ const prevTimestamp = timestamps[index - 1];
110
+ ids[index] = messageId;
111
+ timestamps[index] = createdAt;
112
+ dayStarts[index] = lastDay !== day;
113
+ lastDay = day;
57
114
  dataMap.set(messageId, {
58
115
  messageId,
59
- dayStart: lastDay !== day,
60
- createdAt
116
+ dayStart: dayStarts[index],
117
+ timeBreak: prevTimestamp !== undefined && createdAt - prevTimestamp > GROUP_TIME_GAP,
118
+ createdAt,
119
+ groupPosition: 'solo'
61
120
  });
62
- lastDay = day;
121
+ });
122
+
123
+ // Pass 2 — cluster position, now that every day divider is known.
124
+ messages.forEach((message, index) => {
125
+ const entry = dataMap.get(ids[index]);
126
+ if (!entry) return;
127
+ if (isSystemMessage(message)) return; // stays 'solo'
128
+
129
+ const key = getGroupKey(message, isBotConversation, currentUserId);
130
+ const prev = messages[index - 1];
131
+ const next = messages[index + 1];
132
+ const joinsPrev = !!prev && !isSystemMessage(prev) && getGroupKey(prev, isBotConversation, currentUserId) === key && timestamps[index] - timestamps[index - 1] <= GROUP_TIME_GAP &&
133
+ // A divider above THIS message separates it from the one before it.
134
+ !dayStarts[index];
135
+ const joinsNext = !!next && !isSystemMessage(next) && getGroupKey(next, isBotConversation, currentUserId) === key && timestamps[index + 1] - timestamps[index] <= GROUP_TIME_GAP && !dayStarts[index + 1];
136
+ entry.groupPosition = joinsPrev ? joinsNext ? 'middle' : 'last' : joinsNext ? 'first' : 'solo';
63
137
  });
64
138
  return dataMap;
65
139
  };
@@ -72,7 +146,7 @@ export const computeDayStarts = messages => {
72
146
  const dayStartMap = new Map();
73
147
  let lastDay = null;
74
148
  messages.forEach(message => {
75
- const day = new Date(message.sendTime || message.createTime).getDate();
149
+ const day = startOfDay(getMessageTime(message));
76
150
  const messageId = message.clientMsgID || message.serverMsgID || '';
77
151
  dayStartMap.set(messageId, lastDay !== day);
78
152
  lastDay = day;
@@ -1 +1 @@
1
- {"version":3,"names":["MessageType","getMessageText","message","contentType","TextMessage","textElem","content","AtTextMessage","atTextElem","text","QuoteMessage","quoteElem","PictureMessage","VoiceMessage","soundElem","sourceUrl","VideoMessage","videoElem","videoUrl","FileMessage","fileElem","fileName","CardMessage","cardElem","nickname","LocationMessage","locationElem","description","CustomMessage","customElem","FaceMessage","notificationElem","detail","precomputeLegendListData","messages","dataMap","Map","lastDay","forEach","index","messageId","clientMsgID","serverMsgID","sendTime","createTime","createdAt","day","Date","getDate","set","dayStart","computeDayStarts","dayStartMap"],"sourceRoot":"../../../src","sources":["utils/legendListMessage.ts"],"mappings":";;AAAA,SAASA,WAAW,QAA0B,+BAA+B;;AAE7E;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAIC,OAAoB,IAAa;EAC9D,QAAQA,OAAO,CAACC,WAAW;IACzB,KAAKH,WAAW,CAACI,WAAW;MAC1B,OAAOF,OAAO,CAACG,QAAQ,EAAEC,OAAO,IAAIJ,OAAO,CAACI,OAAO;IACrD,KAAKN,WAAW,CAACO,aAAa;MAC5B,OAAOL,OAAO,CAACM,UAAU,EAAEC,IAAI,IAAIP,OAAO,CAACI,OAAO;IACpD,KAAKN,WAAW,CAACU,YAAY;MAC3B,OAAOR,OAAO,CAACS,SAAS,EAAEF,IAAI,IAAIP,OAAO,CAACI,OAAO;IACnD,KAAKN,WAAW,CAACY,cAAc;MAC7B,OAAO,EAAE;IACX,KAAKZ,WAAW,CAACa,YAAY;MAC3B,OAAOX,OAAO,CAACY,SAAS,EAAEC,SAAS,GAAG,EAAE,GAAG,kBAAkB;IAC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AME,GAAG,GAAG,IAAIC,IAAI,CAACF,SAAS,CAAC,CAACG,OAAO,CAAC,CAAC;IAEzCb,OAAO,CAACc,GAAG,CAACT,SAAS,EAAE;MACrBA,SAAS;MACTU,QAAQ,EAAEb,OAAO,KAAKS,GAAG;MACzBD;IACF,CAAC,CAAC;IAEFR,OAAO,GAAGS,GAAG;EACf,CAAC,CAAC;EAEF,OAAOX,OAAO;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA,OAAO,MAAMgB,gBAAgB,GAC3BjB,QAAuB,IACE;EACzB,MAAMkB,WAAW,GAAG,IAAIhB,GAAG,CAAkB,CAAC;EAC9C,IAAIC,OAAsB,GAAG,IAAI;EAEjCH,QAAQ,CAACI,OAAO,CAAEpC,OAAO,IAAK;IAC5B,MAAM4C,GAAG,GAAG,IAAIC,IAAI,CAAC7C,OAAO,CAACyC,QAAQ,IAAIzC,OAAO,CAAC0C,UAAU,CAAC,CAACI,OAAO,CAAC,CAAC;IACtE,MAAMR,SAAS,GAAGtC,OAAO,CAACuC,WAAW,IAAIvC,OAAO,CAACwC,WAAW,IAAI,EAAE;IAClEU,WAAW,CAACH,GAAG,CAACT,SAAS,EAAEH,OAAO,KAAKS,GAAG,CAAC;IAC3CT,OAAO,GAAGS,GAAG;EACf,CAAC,CAAC;EAEF,OAAOM,WAAW;AACpB,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["MessageType","GROUP_NOTIFICATION_TYPES","getMessageRenderId","getMessageTime","getMessageText","message","contentType","TextMessage","textElem","content","AtTextMessage","atTextElem","text","QuoteMessage","quoteElem","PictureMessage","VoiceMessage","soundElem","sourceUrl","VideoMessage","videoElem","videoUrl","FileMessage","fileElem","fileName","CardMessage","cardElem","nickname","LocationMessage","locationElem","description","CustomMessage","customElem","FaceMessage","notificationElem","detail","GROUP_TIME_GAP","BOT_GROUP_KEY","startOfDay","timestamp","date","Date","setHours","getTime","isSystemMessage","includes","sendID","getGroupKey","isBotConversation","currentUserId","isOutgoing","precomputeLegendListData","messages","dataMap","Map","dayStarts","ids","timestamps","lastDay","forEach","index","messageId","rawCreatedAt","createdAt","day","prevTimestamp","set","dayStart","timeBreak","undefined","groupPosition","entry","get","key","prev","next","joinsPrev","joinsNext","computeDayStarts","dayStartMap","clientMsgID","serverMsgID"],"sourceRoot":"../../../src","sources":["utils/legendListMessage.ts"],"mappings":";;AAAA,SAASA,WAAW,QAA0B,+BAA+B;AAC7E,SAASC,wBAAwB,QAAQ,mBAAgB;AACzD,SAASC,kBAAkB,EAAEC,cAAc,QAAQ,cAAW;;AAE9D;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAIC,OAAoB,IAAa;EAC9D,QAAQA,OAAO,CAACC,WAAW;IACzB,KAAKN,WAAW,CAACO,WAAW;MAC1B,OAAOF,OAAO,CAACG,QAAQ,EAAEC,OAAO,IAAIJ,OAAO,CAACI,OAAO;IACrD,KAAKT,WAAW,CAACU,aAAa;MAC5B,OAAOL,OAAO,CAACM,UAAU,EAAEC,IAAI,IAAIP,OAAO,CAACI,OAAO;IACpD,KAAKT,WAAW,CAACa,YAAY;MAC3B,OAAOR,OAAO,CAACS,SAAS,EAAEF,IAAI,IAAIP,OAAO,CAACI,OAAO;IACnD,KAAKT,WAAW,CAACe,cAAc;MAC7B,OAAO,EAAE;IACX,KAAKf,WAAW,CAACgB,YAAY;MAC3B,OAAOX,OAAO,CAACY,SAAS,EAAEC,SAAS,GAAG,EAAE,GAAG,kBAAkB;IAC/D,KAAKlB,WAAW,CAACmB,YAAY;MAC3B,OAAOd,OAAO,CAACe,SAAS,EAAEC,QAAQ,GAAG,EAAE,GAAG,SAAS;IACrD,KAAKrB,WAAW,CAACsB,WAAW;MAC1B,OAAOjB,OAAO,CAACkB,QAAQ,EAAEC,QAAQ,IAAInB,OAAO,CAACI,OAAO;IACtD,KAAKT,WAAW,CAACyB,WAAW;MAC1B,OAAOpB,OAAO,CAACqB,QAAQ,EAAEC,QAAQ,IAAItB,OAAO,CAACI,OAAO;IACtD,KA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AMyB,gBAAgB,GAC3B1B,QAAuB,IACE;EACzB,MAAM2B,WAAW,GAAG,IAAIzB,GAAG,CAAkB,CAAC;EAC9C,IAAII,OAAsB,GAAG,IAAI;EAEjCN,QAAQ,CAACO,OAAO,CAAEtD,OAAO,IAAK;IAC5B,MAAM2D,GAAG,GAAG1B,UAAU,CAACnC,cAAc,CAACE,OAAO,CAAC,CAAC;IAC/C,MAAMwD,SAAS,GAAGxD,OAAO,CAAC2E,WAAW,IAAI3E,OAAO,CAAC4E,WAAW,IAAI,EAAE;IAClEF,WAAW,CAACb,GAAG,CAACL,SAAS,EAAEH,OAAO,KAAKM,GAAG,CAAC;IAC3CN,OAAO,GAAGM,GAAG;EACf,CAAC,CAAC;EAEF,OAAOe,WAAW;AACpB,CAAC","ignoreList":[]}
@@ -2,8 +2,26 @@
2
2
 
3
3
  import { PeerType, SessionType } from '@droppii/openim-rn-client-sdk';
4
4
  import { getConversationID } from "./conversation.js";
5
- const getMessageTime = message => message.sendTime || message.createTime || 0;
5
+
6
+ /**
7
+ * Canonical timestamp for a message. `sendTime` is 0 until the SDK stamps an
8
+ * outgoing message, so `createTime` covers the in-flight window. This is the
9
+ * key the list is sorted by — anything reasoning about message order must use
10
+ * it too, or it will disagree with the order actually rendered.
11
+ */
12
+ export const getMessageTime = message => message.sendTime || message.createTime || 0;
6
13
  const getMessageKey = message => message.clientMsgID || message.serverMsgID;
14
+
15
+ /**
16
+ * Stable id for a message inside a rendered list.
17
+ *
18
+ * A message that has not round-tripped through the server yet may carry
19
+ * neither id, so position and timestamp stand in. Every consumer that looks a
20
+ * message up by id must derive it the same way — the precompute map is keyed
21
+ * on this, so a divergent formula silently misses and the message renders
22
+ * without its day divider or cluster position.
23
+ */
24
+ export const getMessageRenderId = (message, index) => getMessageKey(message) || `temp-${getMessageTime(message)}-${index}`;
7
25
  export const mergeMessages = (current, incoming) => {
8
26
  const map = new Map();
9
27
  for (const message of [...current, ...incoming]) {
@@ -1 +1 @@
1
- {"version":3,"names":["PeerType","SessionType","getConversationID","getMessageTime","message","sendTime","createTime","getMessageKey","clientMsgID","serverMsgID","mergeMessages","current","incoming","map","Map","key","set","Array","from","values","sort","a","b","normalizeCreatedMessage","normalized","JSON","parse","Error","resolveHistoryLastMinSeq","history","fallbackMessage","lastMinSeq","seq","getHistoryPaginationAnchor","messages","length","oldest","reduce","prev","curr","hasNewHistoryMessages","currentKeys","Set","filter","Boolean","some","has","belongsToConversation","conversationId","targetUserId","sessionType","Single","forwardId","sendID","recvID","reverseId","Group","groupID","getReceiverId","conversation","peerType","conversationID","slice","userID"],"sourceRoot":"../../../src","sources":["utils/message.ts"],"mappings":";;AAAA,SACEA,QAAQ,EACRC,WAAW,QAGN,+BAA+B;AACtC,SAASC,iBAAiB,QAAQ,mBAAgB;AAElD,MAAMC,cAAc,GAAIC,OAAoB,IAC1CA,OAAO,CAACC,QAAQ,IAAID,OAAO,CAACE,UAAU,IAAI,CAAC;AAE7C,MAAMC,aAAa,GAAIH,OAAoB,IACzCA,OAAO,CAACI,WAAW,IAAIJ,OAAO,CAACK,WAAW;AAE5C,OAAO,MAAMC,aAAa,GAAGA,CAC3BC,OAAsB,EACtBC,QAAuB,KACL;EAClB,MAAMC,GAAG,GAAG,IAAIC,GAAG,CAAsB,CAAC;EAE1C,KAAK,MAAMV,OAAO,IAAI,CAAC,GAAGO,OAAO,EAAE,GAAGC,QAAQ,CAAC,EAAE;IAC/C,MAAMG,GAAG,GAAGR,aAAa,CAACH,OAAO,CAAC;IAClC,IAAIW,GAAG,EAAE;MACPF,GAAG,CAACG,GAAG,CAACD,GAAG,EAAEX,OAAO,CAAC;IACvB;EACF;EAEA,OAAOa,KAAK,CAACC,IAAI,CAACL,GAAG,CAACM,MAAM,CAAC,CAAC,CAAC,CAACC,IAAI,CAClC,CAACC,CAAC,EAAEC,CAAC,KAAKnB,cAAc,CAACkB,CAAC,CAAC,GAAGlB,cAAc,CAACmB,CAAC,CAChD,CAAC;AACH,CAAC;AAED,OAAO,MAA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E,cAAc,CAACC,KAAK,CAAC,CAAC,CAAC;IAC9D,OAAO;MAAEL,OAAO,EAAEA,OAAO,IAAI,EAAE;MAAEH,MAAM,EAAE;IAAG,CAAC;EAC/C;EAEA,OAAO;IAAEG,OAAO,EAAE,EAAE;IAAEH,MAAM,EAAEK,YAAY,CAACI,MAAM,IAAI;EAAG,CAAC;AAC3D,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["PeerType","SessionType","getConversationID","getMessageTime","message","sendTime","createTime","getMessageKey","clientMsgID","serverMsgID","getMessageRenderId","index","mergeMessages","current","incoming","map","Map","key","set","Array","from","values","sort","a","b","normalizeCreatedMessage","normalized","JSON","parse","Error","resolveHistoryLastMinSeq","history","fallbackMessage","lastMinSeq","seq","getHistoryPaginationAnchor","messages","length","oldest","reduce","prev","curr","hasNewHistoryMessages","currentKeys","Set","filter","Boolean","some","has","belongsToConversation","conversationId","targetUserId","sessionType","Single","forwardId","sendID","recvID","reverseId","Group","groupID","getReceiverId","conversation","peerType","conversationID","slice","userID"],"sourceRoot":"../../../src","sources":["utils/message.ts"],"mappings":";;AAAA,SACEA,QAAQ,EACRC,WAAW,QAGN,+BAA+B;AACtC,SAASC,iBAAiB,QAAQ,mBAAgB;;AAElD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAIC,OAAoB,IACjDA,OAAO,CAACC,QAAQ,IAAID,OAAO,CAACE,UAAU,IAAI,CAAC;AAE7C,MAAMC,aAAa,GAAIH,OAAoB,IACzCA,OAAO,CAACI,WAAW,IAAIJ,OAAO,CAACK,WAAW;;AAE5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,kBAAkB,GAAGA,CAACN,OAAoB,EAAEO,KAAa,KACpEJ,aAAa,CAACH,OAAO,CAAC,IAAI,QAAQD,cAAc,CAACC,OAAO,CAAC,IAAIO,KAAK,EAAE;AAEtE,OAAO,MAAMC,aAAa,GAAGA,CAC3BC,OAAsB,EACtBC,Q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D,MAAM,KAAKJ,YAAY,IAAI/C,OAAO,CAACoD,MAAM,KAAKL,YAAY,GAClE,KAAK;MACb;IAEA,KAAKlD,WAAW,CAACyD,KAAK;MAAE;QACtB,OAAOR,cAAc,KAAK,MAAM9C,OAAO,CAACuD,OAAO,EAAE;MACnD;IAEA;MACE,OAAO,KAAK;EAChB;AACF,CAAC;AAED,OAAO,MAAMC,aAAa,GAAIC,YAA+B,IAAK;EAChE,IAAIA,YAAY,IAAI,IAAI,EAAE,OAAO;IAAEF,OAAO,EAAE,EAAE;IAAEH,MAAM,EAAE;EAAG,CAAC;EAE5D,IAAIK,YAAY,CAACC,QAAQ,KAAK9D,QAAQ,CAAC0D,KAAK,EAAE;IAC5C;IACA,MAAMC,OAAO,GACXE,YAAY,CAACF,OAAO,IAAIE,YAAY,CAACE,cAAc,CAACC,KAAK,CAAC,CAAC,CAAC;IAC9D,OAAO;MAAEL,OAAO,EAAEA,OAAO,IAAI,EAAE;MAAEH,MAAM,EAAE;IAAG,CAAC;EAC/C;EAEA,OAAO;IAAEG,OAAO,EAAE,EAAE;IAAEH,MAAM,EAAEK,YAAY,CAACI,MAAM,IAAI;EAAG,CAAC;AAC3D,CAAC","ignoreList":[]}
@@ -82,6 +82,12 @@ export const GROUP_NOTIFICATION_TEXT = {
82
82
  bySenderKey: 'chat:group_message_unpinned_by'
83
83
  }
84
84
  };
85
+
86
+ // The content types above, as a plain list. Both the chat list (to decide
87
+ // whether a message renders as a system banner) and the grouping precompute
88
+ // (system messages never join a sender cluster) need this, so it is derived
89
+ // once here rather than in each consumer.
90
+ export const GROUP_NOTIFICATION_TYPES = Object.keys(GROUP_NOTIFICATION_TEXT).map(Number);
85
91
  const parseNotificationDetail = message => {
86
92
  if (!message.notificationElem?.detail) return undefined;
87
93
  try {
@@ -207,7 +213,7 @@ export const getMessagePreview = message => {
207
213
  {
208
214
  const fileName = message?.fileElem?.fileName;
209
215
  if (fileName) {
210
- return `[File] ${fileName}`;
216
+ return `[File] ${truncateMiddle(fileName, 20)}`;
211
217
  }
212
218
  return '[File]';
213
219
  }
@@ -1 +1 @@
1
- {"version":3,"names":["MessageType","PeerType","formatDuration","getFileIcon","getMimeType","trans","isMessageRevoked","message","contentType","RevokeMessage","GROUP_NOTIFICATION_TEXT","GroupCreated","previewKey","bySenderKey","GroupInfoUpdated","MemberQuit","GroupOwnerTransferred","MemberKicked","MemberInvited","MemberEnter","GroupDismissed","GroupMemberMuted","GroupMemberCancelMuted","GroupMuted","GroupCancelMuted","GroupAnnouncementUpdated","GroupNameUpdated","GroupMemberSetToAdmin","PinMsg","parseNotificationDetail","notificationElem","detail","undefined","JSON","parse","formatMemberNames","members","names","map","member","nickname","filter","length","join","resolveNotificationText","base","params","newGroupName","group","groupName","invitedUserList","kickedUserList","memberName","newGroupOwner","changedUser","isPinned","extractTextContent","textElem","content","parsed","text","description","getMessagePreview","TextMessage","PictureMessage","VideoMessage","videoData","videoElem","duration","durationStr","FileMessage","fileName","fileElem","MergeMessage","mergeData","mergeElem","multiMessage","imageCount","msg","UrlTextMessage","urlText","urlTextElem","urls","AtTextMessage","QuoteMessage","quoteElem","CustomMessage","customElem","StickerMessage","FriendAdded","OANotification","BurnMessageChange","resolved","getMessagePreviewTextProps","ellipsizeMode","getMessagePreviewParts","textProps","getImageUrl","pictureElem","snapshotPicture","url","bigPicture","sourcePicture","getUrlMetadata","ex","urlMetadata","getPinnedMessagePreview","thumbnailUrl","mediaType","subtitleKey","snapshotUrl","fileIcon","image","firstImage","find","getNotificationOpUserNickname","opUser","quitUser","getSenderName","currentUserId","conversation","sender","sendID","senderNickname","peerType","Bot","showName","getLastMessageText","hideSenderPrefixForDirectChat","preview","resolvedNotification","hideSenderPrefix","User","getReplySenderName","isSent","parseUrlMetadata","truncateMiddle","name","maxLength","dotIndex","lastIndexOf","baseName","slice","ext","headLen","Math","ceil","tailLen","floor"],"sourceRoot":"../../../src","sources":["utils/messageUtils.ts"],"mappings":";;AAAA;AACA;AACA;;AAEA,SACEA,WA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GF,IAAI,CAACK,KAAK,CAACH,QAAQ,CAAC,GAAG,EAAE;EAEvD,IAAIE,QAAQ,CAACnG,MAAM,IAAIgG,SAAS,EAAE,OAAOD,IAAI;EAE7C,MAAMO,OAAO,GAAGC,IAAI,CAACC,IAAI,CAAC,CAACR,SAAS,GAAG,CAAC,IAAI,CAAC,CAAC;EAC9C,MAAMS,OAAO,GAAGF,IAAI,CAACG,KAAK,CAAC,CAACV,SAAS,GAAG,CAAC,IAAI,CAAC,CAAC;EAC/C,OAAO,GAAGG,QAAQ,CAACC,KAAK,CAAC,CAAC,EAAEE,OAAO,CAAC,MAAMG,OAAO,GAAG,CAAC,GAAGN,QAAQ,CAACC,KAAK,CAAC,CAACK,OAAO,CAAC,GAAG,EAAE,GAAGJ,GAAG,EAAE;AAC/F,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["MessageType","PeerType","formatDuration","getFileIcon","getMimeType","trans","isMessageRevoked","message","contentType","RevokeMessage","GROUP_NOTIFICATION_TEXT","GroupCreated","previewKey","bySenderKey","GroupInfoUpdated","MemberQuit","GroupOwnerTransferred","MemberKicked","MemberInvited","MemberEnter","GroupDismissed","GroupMemberMuted","GroupMemberCancelMuted","GroupMuted","GroupCancelMuted","GroupAnnouncementUpdated","GroupNameUpdated","GroupMemberSetToAdmin","PinMsg","GROUP_NOTIFICATION_TYPES","Object","keys","map","Number","parseNotificationDetail","notificationElem","detail","undefined","JSON","parse","formatMemberNames","members","names","member","nickname","filter","length","join","resolveNotificationText","base","params","newGroupName","group","groupName","invitedUserList","kickedUserList","memberName","newGroupOwner","changedUser","isPinned","extractTextContent","textElem","content","parsed","text","description","getMessagePreview","TextMessage","PictureMessage","VideoMessage","videoData","videoElem","duration","durationStr","FileMessage","fileName","fileElem","truncateMiddle","MergeMessage","mergeData","mergeElem","multiMessage","imageCount","msg","UrlTextMessage","urlText","urlTextElem","urls","AtTextMessage","QuoteMessage","quoteElem","CustomMessage","customElem","StickerMessage","FriendAdded","OANotification","BurnMessageChange","resolved","getMessagePreviewTextProps","ellipsizeMode","getMessagePreviewParts","textProps","getImageUrl","pictureElem","snapshotPicture","url","bigPicture","sourcePicture","getUrlMetadata","ex","urlMetadata","getPinnedMessagePreview","thumbnailUrl","mediaType","subtitleKey","snapshotUrl","fileIcon","image","firstImage","find","getNotificationOpUserNickname","opUser","quitUser","getSenderName","currentUserId","conversation","sender","sendID","senderNickname","peerType","Bot","showName","getLastMessageText","hideSenderPrefixForDirectChat","preview","resolvedNotification","hideSenderPrefix","User","getReplySenderName","isSent","parseUrlMetadata","name","maxLength","dotIndex","lastIndexOf","baseName","slice","ext","headLen","Math","ceil","tailLen","floor"],"sourceRoot":"../../../src","sources":["utils/messageUtils.ts"],"mappings":";;AAAA;AACA;AACA;;AAEA,SACEA,WAAW,EACXC,QAAQ,QAGH,+BAA+B;AACtC,SAASC,cAAc,QAAQ,oBAAiB;AAChD,SAASC,WAAW,EAAEC,WAAW,QAAQ,iBAAc;AACvD,SAASC,KAAK,QAAQ,yBAAgB;AAItC,OAAO,MAAMC,gBAAgB,GAAIC,OAAoB,IACnDA,OAAO,CAACC,WAAW,KAAKR,WAAW,CAACS,aAAa;;AAEnD;AACA;AACA;AACA,OAAO,MAAMC,uBAEZ,GAAG;EACF,CAACV,WAAW,CAACW,YAAY,GAAG;IAC1BC,UAAU,EAAE,wBAAwB;IACpCC,WAAW,EAAE;EACf,CAAC;EACD,CAACb,WAAW,CAACc,gBAAgB,GAAG;IAC9BF,UAAU,EAAE,6BAA6B;IACzCC,WAAW,EAAE;EACf,CAAC;EACD,CAACb,WAAW,CAACe,UAAU,GAAG;IACxBH,UAAU,EAAE,sBAAsB;IAClCC,WAAW,EAAE;EACf,CAAC;EACD,CAACb,WAAW,CAACgB,qBAAqB,GAAG;IACnCJ,UAAU,EAAE,kCAAkC;IAC9CC,WAAW,EAAE;EACf,CAAC;EACD,CAACb,WAAW,CAACiB,YAAY,GAAG;IAC1BL,UAAU,EAAE,wBAAwB;IACpCC,WAAW,E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Props {
3
+ /**
4
+ * Solid bubble colour. The export carries fill-opacity 0.1, but
5
+ * CHAT_BUBBLE_COLORS is already flattened — reusing the translucent fill here
6
+ * would render the tail a different shade from the bubble it joins.
7
+ */
8
+ color: string;
9
+ /** Side of the bubble the tail hangs off. */
10
+ side: 'left' | 'right';
11
+ }
12
+ export declare const BubbleTail: import("react").MemoExoticComponent<({ color, side }: BubbleTailProps) => import("react").JSX.Element>;
13
+ //# sourceMappingURL=BubbleTail.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BubbleTail.d.ts","sourceRoot":"","sources":["../../../../../src/components/messages/BubbleTail.tsx"],"names":[],"mappings":"AAGA,eAAO,MAAM,UAAU,IAAI,CAAC;AAQ5B,MAAM,WAAW,eAAe;IAC9B;;;;OAIG;IACH,KAAK,EAAE,MAAM,CAAC;IACd,6CAA6C;IAC7C,IAAI,EAAE,MAAM,GAAG,OAAO,CAAC;CACxB;AAED,eAAO,MAAM,UAAU,wDAA0B,eAAe,iCAU9D,CAAC"}
@@ -0,0 +1,25 @@
1
+ import { type PropsWithChildren } from 'react';
2
+ import type { GroupPosition } from '../../utils/legendListMessage';
3
+ export type BubbleTailRowProps = PropsWithChildren<{
4
+ isOutgoing: boolean;
5
+ groupPosition?: GroupPosition;
6
+ /**
7
+ * Set false for media bubbles, which carry no tail but still need the gutter
8
+ * so they line up with the text bubbles around them.
9
+ */
10
+ withTail?: boolean;
11
+ }>;
12
+ /**
13
+ * Places the tail beside the bubble that closes a cluster.
14
+ *
15
+ * The gutter on the tail side is always TAIL_WIDTH wide, whether or not it
16
+ * actually holds a tail. That keeps every bubble in a cluster starting at the
17
+ * same offset while leaving the row's own padding intact — the tail occupies
18
+ * reserved space rather than overhanging into the margin.
19
+ *
20
+ * The tail is a real sibling rather than an absolutely positioned overlay: it
21
+ * sits outside the bubble's edge, and `overflow: visible` is unreliable on
22
+ * Android for views carrying elevation — which the neighbouring pin badge does.
23
+ */
24
+ export declare const BubbleTailRow: import("react").MemoExoticComponent<({ isOutgoing, groupPosition, withTail, children, }: BubbleTailRowProps) => import("react").JSX.Element>;
25
+ //# sourceMappingURL=BubbleTailRow.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"BubbleTailRow.d.ts","sourceRoot":"","sources":["../../../../../src/components/messages/BubbleTailRow.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAQ,KAAK,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAMrD,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,MAAM,MAAM,kBAAkB,GAAG,iBAAiB,CAAC;IACjD,UAAU,EAAE,OAAO,CAAC;IACpB,aAAa,CAAC,EAAE,aAAa,CAAC;IAC9B;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB,CAAC,CAAC;AAEH;;;;;;;;;;;GAWG;AACH,eAAO,MAAM,aAAa,2FAMrB,kBAAkB,iCAqBtB,CAAC"}
@@ -0,0 +1,11 @@
1
+ import type { ViewStyle } from 'react-native';
2
+ import type { GroupPosition } from '../../utils/legendListMessage';
3
+ /** Only the message closing a cluster carries a tail. */
4
+ export declare const hasBubbleTail: (position?: GroupPosition) => boolean;
5
+ /**
6
+ * The corner the tail hangs off must be square, otherwise the tail's straight
7
+ * 18px edge meets the bubble's rounded corner and leaves a visible notch.
8
+ * Every other corner keeps its normal radius.
9
+ */
10
+ export declare const getTailCornerStyle: (isOutgoing: boolean, position?: GroupPosition) => ViewStyle | undefined;
11
+ //# sourceMappingURL=bubbleTail.utils.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"bubbleTail.utils.d.ts","sourceRoot":"","sources":["../../../../../src/components/messages/bubbleTail.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,+BAA+B,CAAC;AAEnE,yDAAyD;AACzD,eAAO,MAAM,aAAa,GAAI,WAAW,aAAa,KAAG,OACb,CAAC;AAE7C;;;;GAIG;AACH,eAAO,MAAM,kBAAkB,GAC7B,YAAY,OAAO,EACnB,WAAW,aAAa,KACvB,SAAS,GAAG,SAKd,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { BaseLegendMessageProps } from '../types';
2
- export declare const FileMessage: import("react").MemoExoticComponent<({ message, isOutgoing }: BaseLegendMessageProps) => import("react").JSX.Element>;
2
+ export declare const FileMessage: import("react").MemoExoticComponent<({ message, isOutgoing, groupPosition }: BaseLegendMessageProps) => import("react").JSX.Element>;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/fileMessage/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAQvD,eAAO,MAAM,WAAW,gEACI,sBAAsB,iCAkIjD,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;AAQvD,eAAO,MAAM,WAAW,+EACmB,sBAAsB,iCAuIhE,CAAC"}
@@ -11,5 +11,5 @@ export declare const resolveImageDisplayDims: (message: unknown, windowWidth: nu
11
11
  width: number;
12
12
  height: number;
13
13
  };
14
- export declare const ImageMessage: import("react").MemoExoticComponent<({ message, onMediaPress }: BaseLegendMessageProps) => import("react").JSX.Element>;
14
+ export declare const ImageMessage: import("react").MemoExoticComponent<({ message, isOutgoing, onMediaPress }: BaseLegendMessageProps) => import("react").JSX.Element>;
15
15
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/imageMessage/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAgCvD;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,OAAO,EAChB,aAAa,MAAM,KAClB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAuBjC,CAAC;AAEF,eAAO,MAAM,YAAY,kEACK,sBAAsB,iCAkFnD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/imageMessage/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAgCvD;;;;;;;GAOG;AACH,eAAO,MAAM,uBAAuB,GAClC,SAAS,OAAO,EAChB,aAAa,MAAM,KAClB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAuBjC,CAAC;AAEF,eAAO,MAAM,YAAY,8EACiB,sBAAsB,iCAoF/D,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, }: BaseLegendMessageProps & {
2
+ export declare const LinkMessage: import("react").MemoExoticComponent<({ message, isOutgoing, onPressUrl, isHighlighted, 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":"AAUA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAiDvD,eAAO,MAAM,WAAW,2GAOnB,sBAAsB,GAAG;IAAE,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,iCAkFnE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/linkMessage/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAmDvD,eAAO,MAAM,WAAW,2GAOnB,sBAAsB,GAAG;IAAE,UAAU,CAAC,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,IAAI,CAAA;CAAE,iCAsEnE,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { BaseLegendMessageProps } from '../types';
2
- export declare const MergedMessage: import("react").MemoExoticComponent<({ message, isOutgoing, onMediaPress }: BaseLegendMessageProps) => import("react").JSX.Element>;
2
+ export declare const MergedMessage: import("react").MemoExoticComponent<({ message, isOutgoing, onMediaPress, groupPosition, }: BaseLegendMessageProps) => import("react").JSX.Element>;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/mergedMessage/index.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACvD,eAAO,MAAM,aAAa,8EACgB,sBAAsB,iCA6B/D,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/mergedMessage/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACvD,eAAO,MAAM,aAAa,8FAMrB,sBAAsB,iCAkC1B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/quotedMessage/index.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAqB,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAsB1E,UAAU,kBAAmB,SAAQ,sBAAsB;CAAG;AAE9D,QAAA,MAAM,aAAa,8CAAgB,kBAAkB,iCAsHnD,CAAC;AAIH,eAAe,aAAa,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/quotedMessage/index.tsx"],"names":[],"mappings":"AAIA,OAAO,EAAE,KAAK,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAsBvD,UAAU,kBAAmB,SAAQ,sBAAsB;CAAG;AAE9D,QAAA,MAAM,aAAa,8CAAgB,kBAAkB,iCAyGnD,CAAC;AAIH,eAAe,aAAa,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { BaseLegendMessageProps } from '../types';
2
- export declare const RevokedMessage: import("react").MemoExoticComponent<({ isOutgoing }: BaseLegendMessageProps) => import("react").JSX.Element>;
2
+ export declare const RevokedMessage: import("react").MemoExoticComponent<({ isOutgoing, groupPosition }: BaseLegendMessageProps) => import("react").JSX.Element>;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/revokedMessage/index.tsx"],"names":[],"mappings":"AAKA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD,eAAO,MAAM,cAAc,uDAAyB,sBAAsB,iCAaxE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/revokedMessage/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD,eAAO,MAAM,cAAc,sEACO,sBAAsB,iCAmBvD,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { BaseLegendMessageProps } from '../types';
2
2
  export declare const STICKER_SIZE = 120;
3
- export declare const StickerMessage: import("react").MemoExoticComponent<({ message }: BaseLegendMessageProps) => import("react").JSX.Element>;
3
+ export declare const StickerMessage: import("react").MemoExoticComponent<({ message, isOutgoing }: BaseLegendMessageProps) => import("react").JSX.Element>;
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/stickerMessage/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAIvD,eAAO,MAAM,YAAY,MAAM,CAAC;AAChC,eAAO,MAAM,cAAc,oDAAsB,sBAAsB,iCAUrE,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/stickerMessage/index.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAKvD,eAAO,MAAM,YAAY,MAAM,CAAC;AAChC,eAAO,MAAM,cAAc,gEACC,sBAAsB,iCAajD,CAAC"}
@@ -1,3 +1,3 @@
1
1
  import type { BaseLegendMessageProps } from '../types';
2
- export declare const TextMessage: import("react").MemoExoticComponent<({ message, isOutgoing, createdAtTime, isHighlighted, }: BaseLegendMessageProps) => import("react").JSX.Element>;
2
+ export declare const TextMessage: import("react").MemoExoticComponent<({ message, isOutgoing, isHighlighted, groupPosition, }: BaseLegendMessageProps) => import("react").JSX.Element>;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/textMessage/index.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAEvD,eAAO,MAAM,WAAW,+FAMnB,sBAAsB,iCAsC1B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/textMessage/index.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AACvD,eAAO,MAAM,WAAW,+FAMnB,sBAAsB,iCA0B1B,CAAC"}
@@ -1,10 +1,13 @@
1
1
  import type { MediaItem } from '../../hooks/useMediaViewer';
2
2
  import type { MessageItem } from '@droppii/openim-rn-client-sdk';
3
+ import type { GroupPosition } from '../../utils/legendListMessage';
3
4
  export interface BaseLegendMessageProps {
4
5
  message: MessageItem;
5
6
  isOutgoing: boolean;
6
7
  createdAtTime: number;
7
8
  isHighlighted?: boolean;
9
+ /** Position within its same-sender cluster — drives the bubble tail. */
10
+ groupPosition?: GroupPosition;
8
11
  onMediaPress?: (items: MediaItem[], index?: number) => void;
9
12
  }
10
13
  export declare const formatMessageTime: (createdAt: number) => string;
@@ -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;AAEjE,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,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;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,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,3 +1,3 @@
1
1
  import type { BaseLegendMessageProps } from '../types';
2
- export declare const VideoMessage: import("react").MemoExoticComponent<({ message, onMediaPress }: BaseLegendMessageProps) => import("react").JSX.Element>;
2
+ export declare const VideoMessage: import("react").MemoExoticComponent<({ message, isOutgoing, onMediaPress }: BaseLegendMessageProps) => import("react").JSX.Element>;
3
3
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/videoMessage/index.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAQvD,eAAO,MAAM,YAAY,kEACK,sBAAsB,iCAoEnD,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/components/messages/videoMessage/index.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAE,sBAAsB,EAAE,MAAM,UAAU,CAAC;AAQvD,eAAO,MAAM,YAAY,8EACiB,sBAAsB,iCAsE/D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useChatListener.d.ts","sourceRoot":"","sources":["../../../../src/core/useChatListener.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,eAAe,YAuY3B,CAAC"}
1
+ {"version":3,"file":"useChatListener.d.ts","sourceRoot":"","sources":["../../../../src/core/useChatListener.ts"],"names":[],"mappings":"AA6BA,eAAO,MAAM,eAAe,YAqZ3B,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"useDismissGroup.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/groups/useDismissGroup.tsx"],"names":[],"mappings":"AAMA,UAAU,oBAAoB;IAC5B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AACD,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,EAAE,oBAAoB;6BA0C9C,MAAM;EA4B1B"}
1
+ {"version":3,"file":"useDismissGroup.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/groups/useDismissGroup.tsx"],"names":[],"mappings":"AAMA,UAAU,oBAAoB;IAC5B,SAAS,CAAC,EAAE,MAAM,IAAI,CAAC;CACxB;AACD,wBAAgB,eAAe,CAAC,EAAE,SAAS,EAAE,EAAE,oBAAoB;6BA2C9C,MAAM;EA4B1B"}
@@ -0,0 +1,10 @@
1
+ type Params = {
2
+ groupID?: string;
3
+ /** Navigate away from the chat screen. Called once, after the block modal. */
4
+ onBlocked: () => void;
5
+ };
6
+ export declare const useGroupAccessGuard: ({ groupID, onBlocked }: Params) => {
7
+ isCheckingAccess: boolean;
8
+ };
9
+ export {};
10
+ //# sourceMappingURL=useGroupAccessGuard.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useGroupAccessGuard.d.ts","sourceRoot":"","sources":["../../../../../src/hooks/groups/useGroupAccessGuard.ts"],"names":[],"mappings":"AA0CA,KAAK,MAAM,GAAG;IACZ,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,8EAA8E;IAC9E,SAAS,EAAE,MAAM,IAAI,CAAC;CACvB,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAAI,wBAAwB,MAAM;;CAqIjE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"ChatInfoDescriptionRow.d.ts","sourceRoot":"","sources":["../../../../../src/screens/ChatInfo/ChatInfoDescriptionRow.tsx"],"names":[],"mappings":"AAOA,UAAU,2BAA2B;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,QAAA,MAAM,sBAAsB,sDACV,2BAA2B,iCA6E5C,CAAC;AAEF,eAAe,sBAAsB,CAAC"}
1
+ {"version":3,"file":"ChatInfoDescriptionRow.d.ts","sourceRoot":"","sources":["../../../../../src/screens/ChatInfo/ChatInfoDescriptionRow.tsx"],"names":[],"mappings":"AAOA,UAAU,2BAA2B;IACnC,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB;AAKD,QAAA,MAAM,sBAAsB,sDACV,2BAA2B,iCAiF5C,CAAC;AAEF,eAAe,sBAAsB,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;AAiB/C,QAAA,MAAM,UAAU,wQAgBX,eAAe,iCA8LnB,CAAC;AAIF,eAAe,UAAU,CAAC"}
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;AAkB/C,QAAA,MAAM,UAAU,wQAgBX,eAAe,iCA2LnB,CAAC;AAIF,eAAe,UAAU,CAAC"}
@@ -1,4 +1,4 @@
1
1
  import type { ChatDetailHeaderProps } from './types';
2
- declare const ChatDetailHeader: import("react").MemoExoticComponent<({ showAddMember, conversationId, targetUserId, onBack, onPressSearch, onPressAddMember, onPressMenu, onPressAvatar, targetGroupId, }: ChatDetailHeaderProps) => import("react").JSX.Element>;
2
+ declare const ChatDetailHeader: import("react").MemoExoticComponent<({ showAddMember, conversationId, targetUserId, onBack, onPressSearch, onPressAddMember, onPressMenu, onPressAvatar, }: ChatDetailHeaderProps) => import("react").JSX.Element>;
3
3
  export default ChatDetailHeader;
4
4
  //# sourceMappingURL=ChatDetailHeader.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"ChatDetailHeader.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatDetailHeader.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAMrD,QAAA,MAAM,gBAAgB,6KAWjB,qBAAqB,iCA+HzB,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
1
+ {"version":3,"file":"ChatDetailHeader.d.ts","sourceRoot":"","sources":["../../../../../src/screens/chat-detail/ChatDetailHeader.tsx"],"names":[],"mappings":"AAUA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,SAAS,CAAC;AAMrD,QAAA,MAAM,gBAAgB,8JAUjB,qBAAqB,iCA4HzB,CAAC;AAIF,eAAe,gBAAgB,CAAC"}
@@ -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;AASf,OAAiB,EAKf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAU9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AAqC7C,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,6RAmBtB,2BAA2B,iCAmd/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;AASf,OAAiB,EAKf,KAAK,WAAW,EACjB,MAAM,yBAAyB,CAAC;AAEjC,OAAO,EAAc,KAAK,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAc9E,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,SAAS,CAAC;AA8C7C,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,6RAmBtB,2BAA2B,iCA2gB/B,CAAC"}
@@ -1,6 +1,11 @@
1
1
  interface LegendChatDayProps {
2
2
  createdAt: number;
3
+ /**
4
+ * Render just the clock time, without the day. Used where a cluster broke on
5
+ * elapsed time inside a single day — the date is already on screen above.
6
+ */
7
+ timeOnly?: boolean;
3
8
  }
4
- export declare const LegendChatDay: import("react").MemoExoticComponent<({ createdAt }: LegendChatDayProps) => import("react").JSX.Element>;
9
+ export declare const LegendChatDay: import("react").MemoExoticComponent<({ createdAt, timeOnly }: LegendChatDayProps) => import("react").JSX.Element>;
5
10
  export {};
6
11
  //# sourceMappingURL=LegendChatDay.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"LegendChatDay.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/LegendChatDay.tsx"],"names":[],"mappings":"AA8CA,UAAU,kBAAkB;IAC1B,SAAS,EAAE,MAAM,CAAC;CACnB;AAED,eAAO,MAAM,aAAa,sDAAwB,kBAAkB,iCAiBlE,CAAC"}
1
+ {"version":3,"file":"LegendChatDay.d.ts","sourceRoot":"","sources":["../../../../../../src/screens/chat-detail/legend/LegendChatDay.tsx"],"names":[],"mappings":"AA8CA,UAAU,kBAAkB;IAC1B,SAAS,EAAE,MAAM,CAAC;IAClB;;;OAGG;IACH,QAAQ,CAAC,EAAE,OAAO,CAAC;CACpB;AAED,eAAO,MAAM,aAAa,gEACU,kBAAkB,iCAqBrD,CAAC"}