@adminide-stack/yantra-mobile 12.0.103-alpha.0 → 12.0.103-alpha.2

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 (101) hide show
  1. package/lib/components/CustomDrawer.js +4 -2
  2. package/lib/components/CustomDrawer.js.map +1 -1
  3. package/lib/features/expenses/ExpensesExperience.js +11 -1
  4. package/lib/features/expenses/ExpensesExperience.js.map +1 -1
  5. package/lib/features/expenses/components/ClaimForm.js +144 -23
  6. package/lib/features/expenses/components/ClaimForm.js.map +1 -1
  7. package/lib/features/expenses/receiptScan.js +36 -5
  8. package/lib/features/expenses/receiptScan.js.map +1 -1
  9. package/lib/features/expenses/starterCategories.js +7 -0
  10. package/lib/features/expenses/starterCategories.js.map +1 -0
  11. package/lib/features/health/HealthSyncRunner.js +13 -13
  12. package/lib/features/health/HealthSyncRunner.js.map +1 -1
  13. package/lib/features/health/buildDays.js +188 -113
  14. package/lib/features/health/buildDays.js.map +1 -1
  15. package/lib/features/health/fitnessClient.js +5 -5
  16. package/lib/features/health/fitnessClient.js.map +1 -1
  17. package/lib/features/health/healthConnectMapping.js +57 -29
  18. package/lib/features/health/healthConnectMapping.js.map +1 -1
  19. package/lib/features/health/healthConnectReader.js +23 -5
  20. package/lib/features/health/healthConnectReader.js.map +1 -1
  21. package/lib/features/health/healthSyncStore.js +5 -1
  22. package/lib/features/health/healthSyncStore.js.map +1 -1
  23. package/lib/features/health/healthkitMapping.js +115 -25
  24. package/lib/features/health/healthkitMapping.js.map +1 -1
  25. package/lib/features/health/healthkitReader.js +49 -39
  26. package/lib/features/health/healthkitReader.js.map +1 -1
  27. package/lib/features/health/healthkitWriter.js +3 -6
  28. package/lib/features/health/healthkitWriter.js.map +1 -1
  29. package/lib/features/health/hostHealth.js +3 -1
  30. package/lib/features/health/hostHealth.js.map +1 -1
  31. package/lib/features/health/intraday.js +115 -0
  32. package/lib/features/health/intraday.js.map +1 -0
  33. package/lib/features/health/model.js +3 -0
  34. package/lib/features/health/model.js.map +1 -1
  35. package/lib/features/health/reader.js +15 -0
  36. package/lib/features/health/reader.js.map +1 -1
  37. package/lib/features/health/sleep.js +59 -3
  38. package/lib/features/health/sleep.js.map +1 -1
  39. package/lib/features/health/syncEngine.js +35 -31
  40. package/lib/features/health/syncEngine.js.map +1 -1
  41. package/lib/features/health/syncState.js.map +1 -1
  42. package/lib/features/health/time.js +52 -52
  43. package/lib/features/health/time.js.map +1 -1
  44. package/lib/features/health/types.js +21 -4
  45. package/lib/features/health/types.js.map +1 -1
  46. package/lib/features/health/writeMapping.js +12 -12
  47. package/lib/features/health/writeMapping.js.map +1 -1
  48. package/lib/features/health/zones.js +1 -2
  49. package/lib/features/health/zones.js.map +1 -1
  50. package/lib/features/messaging/ActionSheet.js +104 -0
  51. package/lib/features/messaging/ActionSheet.js.map +1 -0
  52. package/lib/features/messaging/ChatAttachments.js +2 -6
  53. package/lib/features/messaging/ChatAttachments.js.map +1 -1
  54. package/lib/features/messaging/ChatComponents.js +512 -244
  55. package/lib/features/messaging/ChatComponents.js.map +1 -1
  56. package/lib/features/messaging/ChatInfoScreen.js +314 -0
  57. package/lib/features/messaging/ChatInfoScreen.js.map +1 -0
  58. package/lib/features/messaging/ContactsScreen.js +28 -11
  59. package/lib/features/messaging/ContactsScreen.js.map +1 -1
  60. package/lib/features/messaging/ConversationListScreen.js +274 -14
  61. package/lib/features/messaging/ConversationListScreen.js.map +1 -1
  62. package/lib/features/messaging/ForwardScreen.js +203 -0
  63. package/lib/features/messaging/ForwardScreen.js.map +1 -0
  64. package/lib/features/messaging/InviteSheet.js +43 -39
  65. package/lib/features/messaging/InviteSheet.js.map +1 -1
  66. package/lib/features/messaging/LinkPreviewCard.js +52 -24
  67. package/lib/features/messaging/LinkPreviewCard.js.map +1 -1
  68. package/lib/features/messaging/MessageActions.js +11 -15
  69. package/lib/features/messaging/MessageActions.js.map +1 -1
  70. package/lib/features/messaging/MessageInfoScreen.js +218 -0
  71. package/lib/features/messaging/MessageInfoScreen.js.map +1 -0
  72. package/lib/features/messaging/NativeChatExperience.js +248 -28
  73. package/lib/features/messaging/NativeChatExperience.js.map +1 -1
  74. package/lib/features/messaging/NotificationSettingsScreen.js +288 -0
  75. package/lib/features/messaging/NotificationSettingsScreen.js.map +1 -0
  76. package/lib/features/messaging/StarredMessagesScreen.js +161 -0
  77. package/lib/features/messaging/StarredMessagesScreen.js.map +1 -0
  78. package/lib/features/messaging/TapRow.js +46 -0
  79. package/lib/features/messaging/TapRow.js.map +1 -0
  80. package/lib/features/messaging/ThreadScreen.js +704 -81
  81. package/lib/features/messaging/ThreadScreen.js.map +1 -1
  82. package/lib/features/messaging/chatModel.js +217 -11
  83. package/lib/features/messaging/chatModel.js.map +1 -1
  84. package/lib/features/messaging/chatNotificationPrefs.js +47 -0
  85. package/lib/features/messaging/chatNotificationPrefs.js.map +1 -0
  86. package/lib/features/messaging/chatOperations.js +102 -2
  87. package/lib/features/messaging/chatOperations.js.map +1 -1
  88. package/lib/features/messaging/chatPushToken.js +25 -0
  89. package/lib/features/messaging/chatPushToken.js.map +1 -0
  90. package/lib/features/messaging/nativeChatChannelQuery.js.map +1 -1
  91. package/lib/features/messaging/useChatData.js +364 -15
  92. package/lib/features/messaging/useChatData.js.map +1 -1
  93. package/lib/features/messaging/usePressed.js +8 -0
  94. package/lib/features/messaging/usePressed.js.map +1 -0
  95. package/lib/index.js +1 -1
  96. package/lib/index.js.map +1 -1
  97. package/lib/screens/ChatNative/index.js +2 -1
  98. package/lib/screens/ChatNative/index.js.map +1 -1
  99. package/lib/screens/Health/index.js +20 -5
  100. package/lib/screens/Health/index.js.map +1 -1
  101. package/package.json +4 -4
@@ -1,28 +1,88 @@
1
- import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {StyleSheet,View,Text,Pressable}from'react-native';import {Image}from'expo-image';import {MaterialCommunityIcons}from'@expo/vector-icons';import {mobileColors}from'../../theme/mobileTokens.js';import {initialsOf,timeLabel,relativeLabel}from'./chatModel.js';import {MessageAttachments}from'./ChatAttachments.js';import {splitLinks,firstLink,isOnlyALink}from'./chatLinks.js';import {useLinkPreview,LinkPreviewCard}from'./LinkPreviewCard.js';function buildChatTheme(isDark) {
2
- const c = mobileColors(isDark);
3
- return {
4
- bg: c.bg,
5
- surface: isDark ? c.surface : "#f8fafc",
6
- border: c.border,
7
- text: c.text,
8
- textMuted: c.textMuted,
9
- accent: c.primary,
10
- onAccent: "#ffffff",
11
- bubbleMine: isDark ? c.primarySoft : c.surfaceMuted,
12
- bubbleTheirs: isDark ? c.surface : c.bg,
13
- bubbleMineText: c.text,
14
- bubbleTheirsText: c.text,
15
- threadBg: c.bg,
16
- composerBar: isDark ? c.surface : "#f8fafc",
17
- danger: c.dangerText,
18
- unread: c.primary,
19
- headerBg: c.bg
20
- };
21
- }
1
+ import {jsxs,jsx}from'react/jsx-runtime';import*as React from'react';import {StyleSheet,View,Text,Pressable,ActivityIndicator}from'react-native';import {Image}from'expo-image';import {MaterialCommunityIcons}from'@expo/vector-icons';import {initialsOf,timeLabel,isMuted,relativeLabel}from'./chatModel.js';import {MessageAttachments}from'./ChatAttachments.js';import {splitLinks,firstLink,isOnlyALink}from'./chatLinks.js';import {useLinkPreview,LinkPreviewCard}from'./LinkPreviewCard.js';import {usePressed}from'./usePressed.js';var __defProp = Object.defineProperty;
2
+ var __defProps = Object.defineProperties;
3
+ var __getOwnPropDescs = Object.getOwnPropertyDescriptors;
4
+ var __getOwnPropSymbols = Object.getOwnPropertySymbols;
5
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
6
+ var __propIsEnum = Object.prototype.propertyIsEnumerable;
7
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
8
+ var __spreadValues = (a, b) => {
9
+ for (var prop in b || (b = {}))
10
+ if (__hasOwnProp.call(b, prop))
11
+ __defNormalProp(a, prop, b[prop]);
12
+ if (__getOwnPropSymbols)
13
+ for (var prop of __getOwnPropSymbols(b)) {
14
+ if (__propIsEnum.call(b, prop))
15
+ __defNormalProp(a, prop, b[prop]);
16
+ }
17
+ return a;
18
+ };
19
+ var __spreadProps = (a, b) => __defProps(a, __getOwnPropDescs(b));
22
20
  const chatThemes = {
23
- light: buildChatTheme(false),
24
- dark: buildChatTheme(true)
21
+ light: {
22
+ isDark: false,
23
+ bg: "#ffffff",
24
+ surface: "#f0f2f5",
25
+ border: "#e9edef",
26
+ text: "#111b21",
27
+ textMuted: "#667781",
28
+ accent: "#00a884",
29
+ onAccent: "#ffffff",
30
+ bubbleMine: "#d9fdd3",
31
+ bubbleTheirs: "#ffffff",
32
+ bubbleMineText: "#111b21",
33
+ bubbleTheirsText: "#111b21",
34
+ metaMine: "#667781",
35
+ metaTheirs: "#667781",
36
+ readTick: "#53bdeb",
37
+ threadBg: "#efeae2",
38
+ composerBar: "#f0f2f5",
39
+ composerField: "#ffffff",
40
+ chipBg: "#ffffff",
41
+ chipText: "#54656f",
42
+ quoteBg: "rgba(11, 20, 26, 0.05)",
43
+ danger: "#ea0038",
44
+ unread: "#25d366",
45
+ headerBg: "#f0f2f5"
46
+ },
47
+ dark: {
48
+ isDark: true,
49
+ bg: "#111b21",
50
+ surface: "#202c33",
51
+ border: "#222d34",
52
+ text: "#e9edef",
53
+ textMuted: "#8696a0",
54
+ accent: "#00a884",
55
+ onAccent: "#111b21",
56
+ bubbleMine: "#005c4b",
57
+ bubbleTheirs: "#202c33",
58
+ bubbleMineText: "#e9edef",
59
+ bubbleTheirsText: "#e9edef",
60
+ metaMine: "rgba(233, 237, 239, 0.6)",
61
+ metaTheirs: "#8696a0",
62
+ readTick: "#53bdeb",
63
+ threadBg: "#0b141a",
64
+ composerBar: "#1f2c34",
65
+ composerField: "#2a3942",
66
+ chipBg: "#182229",
67
+ chipText: "#8696a0",
68
+ quoteBg: "rgba(0, 0, 0, 0.2)",
69
+ danger: "#f15c6d",
70
+ unread: "#00a884",
71
+ headerBg: "#1f2c34"
72
+ }
25
73
  };
74
+ const PERSON_COLORS_LIGHT = ["#1fa855", "#d88e00", "#b05cc2", "#0f7ec5", "#e2546b", "#029d95", "#7f66ff", "#c76f00"];
75
+ const PERSON_COLORS_DARK = ["#53bdeb", "#ffb84d", "#e28af0", "#5bc0f8", "#ff7a93", "#3fd3c6", "#a391ff", "#f0a43a"];
76
+ const AVATAR_COLORS = ["#7e57c2", "#26a69a", "#ef6c00", "#5c6bc0", "#ec407a", "#43a047", "#8d6e63", "#00897b"];
77
+ function hashOf(key) {
78
+ let h = 7;
79
+ for (let i = 0; i < key.length; i += 1) h = (h * 31 + key.charCodeAt(i)) % 1000000007;
80
+ return h;
81
+ }
82
+ function personColor(key, theme) {
83
+ const palette = theme.isDark ? PERSON_COLORS_DARK : PERSON_COLORS_LIGHT;
84
+ return palette[hashOf(key || "?") % palette.length];
85
+ }
26
86
  const AVATAR_PLATE = "#dfe5e7";
27
87
  const AVATAR_ICON = "#ffffff";
28
88
  function Avatar({
@@ -49,7 +109,7 @@ function Avatar({
49
109
  width: size,
50
110
  height: size,
51
111
  borderRadius: radius,
52
- backgroundColor: theme.accent,
112
+ backgroundColor: AVATAR_COLORS[hashOf(name) % AVATAR_COLORS.length],
53
113
  alignItems: "center",
54
114
  justifyContent: "center"
55
115
  }, children: /* @__PURE__ */ jsx(Text, { style: {
@@ -62,42 +122,74 @@ function Avatar({
62
122
  width: size,
63
123
  height: size,
64
124
  borderRadius: radius,
65
- backgroundColor: AVATAR_PLATE,
125
+ backgroundColor: theme.isDark ? "#6a7175" : AVATAR_PLATE,
66
126
  alignItems: "center",
67
127
  justifyContent: "center"
68
- }, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "account", size: Math.round(size * 0.58), color: AVATAR_ICON }) });
128
+ }, children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "account", size: Math.round(size * 0.62), color: AVATAR_ICON }) });
69
129
  }
70
130
  function UnreadBadge({
71
131
  count,
72
- theme
132
+ theme,
133
+ muted
73
134
  }) {
74
135
  if (count <= 0) return null;
75
136
  return /* @__PURE__ */ jsx(View, { style: [styles.badge, {
76
- backgroundColor: theme.unread
77
- }], children: /* @__PURE__ */ jsx(Text, { style: styles.badgeText, children: count > 99 ? "99+" : count }) });
137
+ backgroundColor: muted ? theme.textMuted : theme.unread
138
+ }], children: /* @__PURE__ */ jsx(Text, { style: [styles.badgeText, {
139
+ color: theme.isDark ? "#111b21" : "#ffffff"
140
+ }], children: count > 999 ? "999+" : count }) });
141
+ }
142
+ function MessageTicks({
143
+ status,
144
+ theme,
145
+ mine = true,
146
+ size = 16
147
+ }) {
148
+ const gray = mine ? theme.metaMine : theme.metaTheirs;
149
+ if (status === "sending") {
150
+ return /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "clock-outline", size: size - 3, color: gray, accessibilityLabel: "Sending", style: styles.tick });
151
+ }
152
+ if (status === "failed") {
153
+ return /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "alert-circle", size: size - 2, color: theme.danger, accessibilityLabel: "Not sent", style: styles.tick });
154
+ }
155
+ const read = status === "read";
156
+ const delivered = status === "delivered";
157
+ let label = "Sent";
158
+ if (read) label = "Read";
159
+ else if (delivered) label = "Delivered";
160
+ return /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: read || delivered ? "check-all" : "check", size, color: read ? theme.readTick : gray, accessibilityLabel: label, style: styles.tick });
78
161
  }
79
162
  function ConversationRow({
80
163
  conversation,
81
164
  theme,
82
165
  now,
83
- onPress
166
+ onPress,
167
+ onLongPress
84
168
  }) {
169
+ var _a;
170
+ const [pressed, pressHandlers] = usePressed();
85
171
  const unread = conversation.unreadCount > 0;
172
+ const muted = isMuted(conversation, now);
86
173
  const preview = conversation.subtitle.trim();
87
- const timeColor = unread ? theme.unread : theme.textMuted;
88
- return /* @__PURE__ */ jsx(Pressable, { onPress, accessibilityRole: "button", accessibilityLabel: unread ? `${conversation.title}, ${conversation.unreadCount} unread messages` : conversation.title, style: ({
89
- pressed
90
- }) => ({
174
+ const draft = ((_a = conversation.draft) != null ? _a : "").trim();
175
+ const author = !conversation.isDirect && conversation.lastAuthorName ? `${conversation.lastAuthorName}: ` : "";
176
+ const at = conversation.lastMessageAt;
177
+ let status = "sent";
178
+ if (at > 0 && conversation.readWatermark > 0 && at <= conversation.readWatermark) status = "read";
179
+ else if (at > 0 && conversation.deliveredWatermark > 0 && at <= conversation.deliveredWatermark) {
180
+ status = "delivered";
181
+ }
182
+ return /* @__PURE__ */ jsx(Pressable, __spreadProps(__spreadValues({ onPress, onLongPress, delayLongPress: 350 }, pressHandlers), { accessibilityRole: "button", accessibilityHint: onLongPress ? "Long press for options" : void 0, accessibilityLabel: [conversation.title, unread ? `${conversation.unreadCount} unread messages` : "", muted ? "muted" : ""].filter(Boolean).join(", "), style: {
91
183
  backgroundColor: pressed ? theme.surface : theme.bg,
92
184
  width: "100%"
93
- }), testID: `chat-conversation-${conversation.id}`, children: /* @__PURE__ */ jsxs(View, { style: {
185
+ }, testID: `chat-conversation-${conversation.id}`, children: /* @__PURE__ */ jsxs(View, { style: {
94
186
  flexDirection: "row",
95
187
  alignItems: "center",
96
188
  width: "100%",
97
- paddingLeft: 14,
189
+ paddingLeft: 16,
98
190
  paddingRight: 16,
99
191
  paddingVertical: 10,
100
- minHeight: 72
192
+ minHeight: 76
101
193
  }, children: [
102
194
  /* @__PURE__ */ jsx(Avatar, { name: conversation.title, uri: conversation.avatarUrl, theme, size: 52, variant: "initials" }),
103
195
  /* @__PURE__ */ jsxs(View, { style: {
@@ -109,97 +201,172 @@ function ConversationRow({
109
201
  /* @__PURE__ */ jsxs(View, { style: {
110
202
  flexDirection: "row",
111
203
  alignItems: "center",
112
- justifyContent: "space-between",
113
204
  width: "100%"
114
205
  }, children: [
115
206
  /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: {
116
207
  flex: 1,
117
208
  fontSize: 17,
118
- fontWeight: unread ? "700" : "600",
209
+ fontWeight: "600",
119
210
  color: theme.text,
120
211
  marginRight: 8
121
212
  }, children: conversation.title }),
122
213
  /* @__PURE__ */ jsx(Text, { style: {
123
- fontSize: 12,
124
- color: timeColor,
214
+ fontSize: 13,
215
+ color: unread && !muted ? theme.unread : theme.textMuted,
216
+ fontWeight: unread ? "600" : "400",
125
217
  flexShrink: 0
126
218
  }, children: relativeLabel(conversation.lastActivity, now) })
127
219
  ] }),
128
- (preview || unread) && /* @__PURE__ */ jsxs(View, { style: {
220
+ /* @__PURE__ */ jsxs(View, { style: {
129
221
  flexDirection: "row",
130
- alignItems: "center",
131
- marginTop: 3,
222
+ alignItems: "flex-start",
223
+ marginTop: 2,
132
224
  width: "100%"
133
225
  }, children: [
134
- /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: {
226
+ draft ? (
227
+ // An unsent draft wins over the last message, as in WhatsApp.
228
+ /* @__PURE__ */ jsxs(Text, { numberOfLines: 2, style: {
229
+ flex: 1,
230
+ fontSize: 15,
231
+ lineHeight: 20,
232
+ color: theme.textMuted,
233
+ marginRight: 8
234
+ }, testID: `chat-conversation-draft-${conversation.id}`, children: [
235
+ /* @__PURE__ */ jsx(Text, { style: {
236
+ color: theme.accent,
237
+ fontWeight: "600"
238
+ }, children: "Draft: " }),
239
+ draft
240
+ ] })
241
+ ) : /* @__PURE__ */ jsxs(View, { style: {
135
242
  flex: 1,
136
- fontSize: 15,
137
- color: unread ? theme.text : theme.textMuted,
138
- fontWeight: unread ? "600" : "400",
243
+ flexDirection: "row",
244
+ alignItems: "flex-start",
139
245
  marginRight: 8
140
- }, children: preview }),
141
- /* @__PURE__ */ jsx(UnreadBadge, { count: conversation.unreadCount, theme })
246
+ }, children: [
247
+ conversation.lastMessageMine && preview && !conversation.lastMessageDeleted ? /* @__PURE__ */ jsx(View, { style: {
248
+ marginTop: 2,
249
+ marginRight: 2
250
+ }, children: /* @__PURE__ */ jsx(MessageTicks, { status, theme, mine: false, size: 17 }) }) : null,
251
+ conversation.lastMessageDeleted ? /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "cancel", size: 15, color: theme.textMuted, style: {
252
+ marginTop: 2,
253
+ marginRight: 4
254
+ } }) : null,
255
+ /* @__PURE__ */ jsxs(Text, { numberOfLines: 2, style: {
256
+ flex: 1,
257
+ fontSize: 15,
258
+ lineHeight: 20,
259
+ color: theme.textMuted,
260
+ fontStyle: conversation.lastMessageDeleted ? "italic" : "normal"
261
+ }, children: [
262
+ author ? /* @__PURE__ */ jsx(Text, { style: {
263
+ color: theme.textMuted,
264
+ fontWeight: "500"
265
+ }, children: author }) : null,
266
+ preview
267
+ ] })
268
+ ] }),
269
+ /* @__PURE__ */ jsxs(View, { style: {
270
+ flexDirection: "row",
271
+ alignItems: "center",
272
+ marginTop: 2
273
+ }, children: [
274
+ muted ? /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "bell-off", size: 16, color: theme.textMuted, accessibilityLabel: "Muted", style: {
275
+ marginLeft: 4
276
+ } }) : null,
277
+ conversation.pinnedAt > 0 ? /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "pin", size: 16, color: theme.textMuted, accessibilityLabel: "Pinned", style: styles.pinIcon }) : null,
278
+ /* @__PURE__ */ jsx(UnreadBadge, { count: conversation.unreadCount, theme, muted })
279
+ ] })
142
280
  ] })
143
281
  ] })
144
- ] }) });
282
+ ] }) }));
283
+ }
284
+ function ReplyQuote({
285
+ reply,
286
+ theme,
287
+ viewerId,
288
+ onPress,
289
+ compact
290
+ }) {
291
+ var _a;
292
+ const color = personColor((_a = reply.authorId) != null ? _a : reply.authorName, theme);
293
+ const isYou = Boolean(viewerId && reply.authorId && reply.authorId === viewerId);
294
+ return /* @__PURE__ */ jsxs(Pressable, { onPress, disabled: !onPress, accessibilityRole: onPress ? "button" : void 0, accessibilityLabel: `Reply to ${isYou ? "you" : reply.authorName}: ${reply.body}`, style: [styles.quote, compact ? null : styles.quoteInBubble, {
295
+ backgroundColor: theme.quoteBg,
296
+ flexDirection: "row"
297
+ }], children: [
298
+ /* @__PURE__ */ jsx(View, { style: [styles.quoteBar, {
299
+ backgroundColor: color
300
+ }] }),
301
+ /* @__PURE__ */ jsxs(View, { style: styles.quoteBody, children: [
302
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles.quoteAuthor, {
303
+ color
304
+ }], children: isYou ? "You" : reply.authorName }),
305
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 2, style: [styles.quoteText, {
306
+ color: theme.textMuted
307
+ }], children: reply.body || "Message" })
308
+ ] })
309
+ ] });
310
+ }
311
+ function BubbleTail({
312
+ mine,
313
+ color
314
+ }) {
315
+ return /* @__PURE__ */ jsx(View, { pointerEvents: "none", style: mine ? [styles.tail, styles.tailMine, {
316
+ borderTopColor: color
317
+ }] : [styles.tail, styles.tailTheirs, {
318
+ borderTopColor: color
319
+ }] });
145
320
  }
146
321
  function MessageBubble({
147
322
  message,
148
323
  theme,
324
+ status,
149
325
  showAuthor,
150
326
  groupWithPrevious,
151
- groupWithNext,
327
+ viewerId,
152
328
  onRetry,
153
329
  onLongPress,
330
+ onPressQuote,
331
+ highlighted,
154
332
  fileBaseUrl,
155
333
  audio,
156
334
  onOpenImage,
157
335
  linkPreviews,
158
336
  onOpenLink
159
337
  }) {
160
- var _a;
338
+ var _a, _b;
161
339
  const bubbleRef = React.useRef(null);
162
340
  const reactions = (_a = message.reactions) != null ? _a : [];
163
341
  const mine = message.isMine;
164
342
  const failed = message.sendState === "failed";
165
- const sending = message.sendState === "sending";
166
- const showTimestamp = !groupWithNext;
167
343
  const body = message.body.trim();
168
344
  const parts = React.useMemo(() => splitLinks(body), [body]);
169
345
  const cardUrl = React.useMemo(() => message.isDeleted ? null : firstLink(body), [body, message.isDeleted]);
170
346
  const preview = useLinkPreview(cardUrl, linkPreviews);
171
347
  const onlyLink = Boolean(preview) && !message.attachments.length && isOnlyALink(body);
172
348
  const textColor = mine ? theme.bubbleMineText : theme.bubbleTheirsText;
173
- const radii = React.useMemo(() => {
174
- const R = 18;
175
- const tail = 6;
176
- const join = 6;
177
- if (mine) {
178
- return {
179
- borderTopLeftRadius: R,
180
- borderTopRightRadius: groupWithPrevious ? join : R,
181
- borderBottomLeftRadius: R,
182
- borderBottomRightRadius: groupWithNext ? join : tail
183
- };
184
- }
185
- return {
186
- borderTopLeftRadius: groupWithPrevious ? join : R,
187
- borderTopRightRadius: R,
188
- borderBottomLeftRadius: groupWithNext ? join : tail,
189
- borderBottomRightRadius: R
190
- };
191
- }, [mine, groupWithPrevious, groupWithNext]);
349
+ const metaColor = mine ? theme.metaMine : theme.metaTheirs;
350
+ const fill = mine ? theme.bubbleMine : theme.bubbleTheirs;
351
+ const firstInRun = !groupWithPrevious;
352
+ const time = timeLabel(message.createdAt);
353
+ const meta = `${message.isEdited ? "Edited " : ""}${time}`;
354
+ const showTicks = mine && Boolean(status);
355
+ const attachmentOnly = message.attachments.length > 0 && !body && !onlyLink;
356
+ const metaOnMedia = attachmentOnly && message.attachments.every((a) => a.kind === "image");
192
357
  if (message.isDeleted) {
193
- return /* @__PURE__ */ jsx(View, { style: [styles.bubbleWrap, mine ? styles.alignEnd : styles.alignStart], children: /* @__PURE__ */ jsx(View, { style: [styles.bubble, styles.bubbleDeleted, {
194
- borderColor: theme.border
195
- }], children: /* @__PURE__ */ jsx(Text, { style: [styles.deletedText, {
196
- color: theme.textMuted
197
- }], children: "Message deleted" }) }) });
358
+ return /* @__PURE__ */ jsx(View, { style: [styles.bubbleWrap, mine ? styles.alignEnd : styles.alignStart, firstInRun && styles.runStart], children: /* @__PURE__ */ jsxs(View, { style: [styles.bubble, {
359
+ backgroundColor: fill,
360
+ flexDirection: "row",
361
+ alignItems: "center"
362
+ }], children: [
363
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "cancel", size: 15, color: metaColor }),
364
+ /* @__PURE__ */ jsx(Text, { style: [styles.deletedText, {
365
+ color: metaColor
366
+ }], children: mine ? "You deleted this message" : "This message was deleted" })
367
+ ] }) });
198
368
  }
199
- return /* @__PURE__ */ jsxs(View, { style: [styles.bubbleWrap, mine ? styles.alignEnd : styles.alignStart, groupWithNext ? styles.bubbleWrapGrouped : null], children: [
200
- showAuthor && !mine ? /* @__PURE__ */ jsx(Text, { style: [styles.author, {
201
- color: theme.textMuted
202
- }], children: message.authorName }) : null,
369
+ return /* @__PURE__ */ jsxs(View, { style: [styles.bubbleWrap, mine ? styles.alignEnd : styles.alignStart, firstInRun && styles.runStart], children: [
203
370
  /* @__PURE__ */ jsxs(Pressable, { onLongPress: onLongPress ? () => {
204
371
  var _a2;
205
372
  return (_a2 = bubbleRef.current) == null ? void 0 : _a2.measureInWindow((x, y, width, height) => onLongPress({
@@ -209,62 +376,71 @@ function MessageBubble({
209
376
  height
210
377
  }));
211
378
  } : void 0, delayLongPress: 280, disabled: !onLongPress, accessibilityHint: onLongPress ? "Long press for reactions and options" : void 0, style: [styles.bubblePress, reactions.length ? styles.bubbleReacted : null], children: [
212
- /* @__PURE__ */ jsxs(View, { ref: bubbleRef, collapsable: false, style: [styles.bubble, styles.bubbleFill, radii, {
213
- backgroundColor: mine ? theme.bubbleMine : theme.bubbleTheirs
379
+ /* @__PURE__ */ jsxs(View, { ref: bubbleRef, collapsable: false, style: [styles.bubble, firstInRun && (mine ? styles.cornerMine : styles.cornerTheirs), {
380
+ backgroundColor: fill
381
+ }, highlighted && {
382
+ opacity: 0.75
214
383
  }, failed && {
215
384
  borderWidth: 1,
216
385
  borderColor: theme.danger
217
- }, sending && !message.attachments.length && styles.bubbleSending, message.attachments.length || onlyLink ? styles.bubbleWithMedia : null], children: [
218
- message.attachments.length ? /* @__PURE__ */ jsx(MessageAttachments, { attachments: message.attachments, mine, theme, fileBaseUrl, audio, uploading: sending, onOpenImage }) : null,
219
- body && !onlyLink ? /* @__PURE__ */ jsx(Text, { style: [styles.bubbleText, {
220
- color: textColor
221
- }, message.attachments.length ? styles.bubbleCaption : null], children: parts.map((part, i) => part.kind === "link" ? /* @__PURE__ */ jsx(Text, { style: [styles.linkText, {
386
+ }, message.attachments.length || onlyLink ? styles.bubbleWithMedia : null], children: [
387
+ firstInRun ? /* @__PURE__ */ jsx(BubbleTail, { mine, color: fill }) : null,
388
+ message.forwarded ? /* @__PURE__ */ jsxs(View, { style: [styles.forwarded, {
389
+ flexDirection: "row",
390
+ alignItems: "center"
391
+ }], children: [
392
+ /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "share", size: 14, color: metaColor }),
393
+ /* @__PURE__ */ jsx(Text, { style: [styles.forwardedText, {
394
+ color: metaColor
395
+ }], children: "Forwarded" })
396
+ ] }) : null,
397
+ showAuthor && !mine ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: [styles.author, message.attachments.length || onlyLink ? styles.authorOverMedia : null, {
398
+ color: personColor((_b = message.authorId) != null ? _b : message.authorName, theme)
399
+ }], children: message.authorName }) : null,
400
+ message.replyTo ? /* @__PURE__ */ jsx(ReplyQuote, { reply: message.replyTo, theme, viewerId, onPress: onPressQuote ? () => onPressQuote(message.replyTo.id) : void 0 }) : null,
401
+ message.attachments.length ? /* @__PURE__ */ jsx(MessageAttachments, { attachments: message.attachments, mine, theme, fileBaseUrl, audio, uploading: message.sendState === "sending", onOpenImage }) : null,
402
+ body && !onlyLink ? /* @__PURE__ */ jsxs(Text, { style: [styles.bubbleText, {
222
403
  color: textColor
223
- }], onPress: onOpenLink ? () => onOpenLink(part.url) : void 0, accessibilityRole: "link", children: part.text }, i) : part.text) }) : null,
224
- preview ? /* @__PURE__ */ jsx(View, { style: onlyLink ? null : styles.cardBelowText, children: /* @__PURE__ */ jsx(LinkPreviewCard, { preview, theme, onOpen: onOpenLink }) }) : null
225
- ] }),
226
- reactions.length ? (
227
- // iMessage puts the Tapback on the bubble's top corner facing the other person.
228
- /* @__PURE__ */ jsx(View, { style: [styles.reactionBadge, mine ? styles.reactionBadgeMine : styles.reactionBadgeTheirs, {
229
- backgroundColor: theme.surface,
230
- borderColor: theme.bg,
231
- flexDirection: "row"
232
- }], accessibilityLabel: reactions.map((r) => `${r.reaction} ${r.count}`).join(", "), children: reactions.map((r) => /* @__PURE__ */ jsxs(View, { style: {
404
+ }, message.attachments.length ? styles.bubbleCaption : null], children: [
405
+ parts.map((part, i) => part.kind === "link" ? /* @__PURE__ */ jsx(Text, { style: [styles.linkText, {
406
+ color: theme.isDark ? "#53bdeb" : "#027eb5"
407
+ }], onPress: onOpenLink ? () => onOpenLink(part.url) : void 0, accessibilityRole: "link", children: part.text }, i) : part.text),
408
+ /* @__PURE__ */ jsx(Text, { style: styles.metaSpacer, children: `\u2002\u2002${message.starred ? "\u2003" : ""}${meta}${showTicks ? "\u2003\u2002" : ""}` })
409
+ ] }) : null,
410
+ preview ? /* @__PURE__ */ jsx(View, { style: onlyLink ? null : styles.cardBelowText, children: /* @__PURE__ */ jsx(LinkPreviewCard, { preview, theme, onOpen: onOpenLink }) }) : null,
411
+ onlyLink || attachmentOnly && !metaOnMedia ? /* @__PURE__ */ jsx(View, { style: styles.metaRowSpace }) : null,
412
+ /* @__PURE__ */ jsxs(View, { style: [styles.meta, metaOnMedia ? styles.metaOnMedia : null, {
233
413
  flexDirection: "row",
234
414
  alignItems: "center"
235
- }, children: [
236
- /* @__PURE__ */ jsx(Text, { style: styles.reactionEmoji, children: r.reaction }),
237
- r.count > 1 ? /* @__PURE__ */ jsx(Text, { style: [styles.reactionCount, {
238
- color: r.mine ? theme.accent : theme.textMuted
239
- }], children: r.count }) : null
240
- ] }, r.reaction)) })
241
- ) : null
242
- ] }),
243
- showTimestamp ? /* @__PURE__ */ jsxs(View, { style: [styles.timestampRow, mine ? styles.alignEnd : styles.alignStart], children: [
244
- message.isEdited ? /* @__PURE__ */ jsx(Text, { style: [styles.timestampText, {
245
- color: theme.textMuted
246
- }], children: "Edited \xB7 " }) : null,
247
- /* @__PURE__ */ jsx(Text, { style: [styles.timestampText, {
248
- color: theme.textMuted
249
- }], children: timeLabel(message.createdAt) }),
250
- failed ? /* @__PURE__ */ jsxs(Pressable, { onPress: onRetry, accessibilityRole: "button", style: {
251
- flexDirection: "row",
252
- alignItems: "center",
253
- marginLeft: 6
254
- }, children: [
255
- /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "alert-circle-outline", size: 12, color: theme.danger }),
256
- /* @__PURE__ */ jsx(Text, { style: [styles.retryText, {
257
- color: theme.danger
258
- }], children: " Not Delivered" })
415
+ }], pointerEvents: "none", children: [
416
+ message.starred ? /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "star", size: 11, color: metaOnMedia ? "#ffffff" : metaColor, accessibilityLabel: "Starred", style: styles.metaStar }) : null,
417
+ /* @__PURE__ */ jsx(Text, { style: [styles.metaText, {
418
+ color: metaOnMedia ? "#ffffff" : metaColor
419
+ }], children: meta }),
420
+ showTicks && status ? /* @__PURE__ */ jsx(MessageTicks, { status, theme: metaOnMedia ? __spreadProps(__spreadValues({}, theme), {
421
+ metaMine: "#ffffff"
422
+ }) : theme }) : null
423
+ ] })
424
+ ] }),
425
+ reactions.length ? /* @__PURE__ */ jsxs(View, { style: [styles.reactionPill, mine ? styles.reactionPillMine : styles.reactionPillTheirs, {
426
+ backgroundColor: theme.isDark ? theme.surface : theme.bg,
427
+ borderColor: theme.threadBg,
428
+ flexDirection: "row"
429
+ }], accessibilityLabel: reactions.map((r) => `${r.reaction} ${r.count}`).join(", "), children: [
430
+ reactions.map((r) => /* @__PURE__ */ jsx(Text, { style: styles.reactionEmoji, children: r.reaction }, r.reaction)),
431
+ reactions.reduce((n, r) => n + r.count, 0) > 1 ? /* @__PURE__ */ jsx(Text, { style: [styles.reactionCount, {
432
+ color: theme.textMuted
433
+ }], children: reactions.reduce((n, r) => n + r.count, 0) }) : null
259
434
  ] }) : null
260
- ] }) : failed ? /* @__PURE__ */ jsxs(Pressable, { onPress: onRetry, accessibilityRole: "button", style: [styles.retry, {
435
+ ] }),
436
+ failed ? /* @__PURE__ */ jsxs(Pressable, { onPress: onRetry, accessibilityRole: "button", hitSlop: 8, style: [styles.retry, {
261
437
  flexDirection: "row",
262
438
  alignItems: "center"
263
439
  }], children: [
264
440
  /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "refresh", size: 13, color: theme.danger }),
265
441
  /* @__PURE__ */ jsx(Text, { style: [styles.retryText, {
266
442
  color: theme.danger
267
- }], children: "Not Delivered \xB7 tap to retry" })
443
+ }], children: "Not sent. Tap to try again." })
268
444
  ] }) : null
269
445
  ] });
270
446
  }
@@ -275,11 +451,23 @@ function DaySeparator({
275
451
  if (!label) return null;
276
452
  return /* @__PURE__ */ jsx(View, { style: [styles.daySep, {
277
453
  flexDirection: "row",
278
- alignItems: "center",
279
454
  justifyContent: "center"
455
+ }], children: /* @__PURE__ */ jsx(View, { style: [styles.dayChip, {
456
+ backgroundColor: theme.chipBg
280
457
  }], children: /* @__PURE__ */ jsx(Text, { style: [styles.dayText, {
281
- color: theme.textMuted
282
- }], children: label }) });
458
+ color: theme.chipText
459
+ }], children: label }) }) });
460
+ }
461
+ function UnreadDivider({
462
+ count,
463
+ theme
464
+ }) {
465
+ if (count <= 0) return null;
466
+ return /* @__PURE__ */ jsx(View, { style: [styles.unreadBand, {
467
+ backgroundColor: theme.isDark ? "rgba(32, 44, 51, 0.85)" : "rgba(255, 255, 255, 0.7)"
468
+ }], testID: "chat-unread-divider", children: /* @__PURE__ */ jsx(Text, { style: [styles.unreadBandText, {
469
+ color: theme.chipText
470
+ }], children: count === 1 ? "1 unread message" : `${count} unread messages` }) });
283
471
  }
284
472
  function InlineBanner({
285
473
  message,
@@ -293,7 +481,7 @@ function InlineBanner({
293
481
  alignItems: "center"
294
482
  }], children: [
295
483
  /* @__PURE__ */ jsx(Text, { style: styles.bannerText, numberOfLines: 2, children: message }),
296
- onDismiss ? /* @__PURE__ */ jsx(Pressable, { onPress: onDismiss, hitSlop: 8, accessibilityRole: "button", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close", size: 16, color: "#fff" }) }) : null
484
+ onDismiss ? /* @__PURE__ */ jsx(Pressable, { onPress: onDismiss, hitSlop: 8, accessibilityRole: "button", accessibilityLabel: "Dismiss", children: /* @__PURE__ */ jsx(MaterialCommunityIcons, { name: "close", size: 16, color: "#fff" }) }) : null
297
485
  ] });
298
486
  }
299
487
  function ConnectionBanner({
@@ -302,9 +490,15 @@ function ConnectionBanner({
302
490
  }) {
303
491
  if (state === "connected") return null;
304
492
  const offline = state === "offline";
305
- return /* @__PURE__ */ jsx(View, { style: [styles.connBanner, {
306
- backgroundColor: offline ? theme.danger : theme.textMuted
307
- }], children: /* @__PURE__ */ jsx(Text, { style: styles.bannerText, children: offline ? "Waiting for network" : "Connecting\u2026" }) });
493
+ return /* @__PURE__ */ jsxs(View, { style: [styles.connBanner, {
494
+ backgroundColor: offline ? theme.danger : theme.textMuted,
495
+ flexDirection: "row"
496
+ }], children: [
497
+ offline ? null : /* @__PURE__ */ jsx(ActivityIndicator, { size: "small", color: "#fff", style: {
498
+ marginRight: 8
499
+ } }),
500
+ /* @__PURE__ */ jsx(Text, { style: styles.connText, children: offline ? "Waiting for network" : "Connecting\u2026" })
501
+ ] });
308
502
  }
309
503
  function EmptyState({
310
504
  icon,
@@ -330,15 +524,9 @@ function EmptyState({
330
524
  }], children: action.label }) }) : null
331
525
  ] });
332
526
  }
527
+ const TAIL_W = 8;
528
+ const TAIL_H = 13;
333
529
  const styles = StyleSheet.create({
334
- avatarFallback: {
335
- alignItems: "center",
336
- justifyContent: "center"
337
- },
338
- avatarInitials: {
339
- color: "#fff",
340
- fontWeight: "700"
341
- },
342
530
  badge: {
343
531
  minWidth: 20,
344
532
  height: 20,
@@ -346,56 +534,40 @@ const styles = StyleSheet.create({
346
534
  paddingHorizontal: 6,
347
535
  alignItems: "center",
348
536
  justifyContent: "center",
349
- marginLeft: 8
537
+ marginLeft: 6
350
538
  },
351
539
  badgeText: {
352
- fontSize: 11,
353
- fontWeight: "700",
354
- color: "#fff"
355
- },
356
- row: {
357
- minHeight: 72,
358
- paddingLeft: 16,
359
- paddingRight: 0,
360
- paddingVertical: 8,
361
- backgroundColor: "transparent"
362
- },
363
- avatarSlot: {
364
- marginRight: 12,
365
- flexShrink: 0
366
- },
367
- rowBody: {
368
- paddingRight: 16,
369
- justifyContent: "center"
540
+ fontSize: 12,
541
+ fontWeight: "700"
370
542
  },
371
- rowTop: {
372
- marginBottom: 4
543
+ tick: {
544
+ marginLeft: 3
373
545
  },
374
- rowBottom: {},
375
- rowTitle: {
376
- fontSize: 17,
377
- fontWeight: "600",
378
- marginRight: 8
546
+ pinIcon: {
547
+ marginLeft: 4,
548
+ transform: [{
549
+ rotate: "45deg"
550
+ }]
379
551
  },
380
- rowTitleUnread: {
381
- fontWeight: "700"
552
+ forwarded: {
553
+ marginBottom: 2
382
554
  },
383
- rowTime: {
384
- fontSize: 12,
385
- flexShrink: 0
555
+ forwardedText: {
556
+ fontSize: 13,
557
+ fontStyle: "italic",
558
+ marginLeft: 3
386
559
  },
387
- rowSubtitle: {
388
- fontSize: 15,
389
- marginRight: 8,
390
- marginTop: 2
560
+ metaStar: {
561
+ marginRight: 3
391
562
  },
392
563
  bubbleWrap: {
393
- paddingHorizontal: 12,
394
- marginVertical: 1,
564
+ paddingHorizontal: 16,
565
+ marginTop: 2,
395
566
  maxWidth: "100%"
396
567
  },
397
- bubbleWrapGrouped: {
398
- marginVertical: 0
568
+ /** A new sender's run starts a little lower, as in WhatsApp. */
569
+ runStart: {
570
+ marginTop: 8
399
571
  },
400
572
  alignEnd: {
401
573
  alignItems: "flex-end"
@@ -403,112 +575,202 @@ const styles = StyleSheet.create({
403
575
  alignStart: {
404
576
  alignItems: "flex-start"
405
577
  },
406
- author: {
407
- fontSize: 11,
408
- fontWeight: "500",
409
- marginBottom: 4,
410
- marginLeft: 12
411
- },
412
- bubble: {
413
- maxWidth: "75%",
414
- paddingHorizontal: 14,
415
- paddingVertical: 8
416
- },
417
- bubbleSending: {
418
- opacity: 0.72
419
- },
420
- /** Carries the 75% width cap now that the bubble sits inside a Pressable. */
421
578
  bubblePress: {
422
- maxWidth: "75%"
423
- },
424
- bubbleFill: {
425
- maxWidth: "100%"
579
+ maxWidth: "82%"
426
580
  },
427
- /** Room above the bubble for the Tapback badge so it never covers the message above. */
581
+ bubble: {
582
+ maxWidth: "100%",
583
+ minWidth: 64,
584
+ borderRadius: 8,
585
+ paddingHorizontal: 8,
586
+ paddingTop: 6,
587
+ paddingBottom: 7,
588
+ shadowColor: "#0b141a",
589
+ shadowOpacity: 0.13,
590
+ shadowRadius: 0.5,
591
+ shadowOffset: {
592
+ width: 0,
593
+ height: 1
594
+ },
595
+ elevation: 1
596
+ },
597
+ /** The tail replaces the rounded outer top corner. */
598
+ cornerMine: {
599
+ borderTopRightRadius: 0
600
+ },
601
+ cornerTheirs: {
602
+ borderTopLeftRadius: 0
603
+ },
604
+ tail: {
605
+ position: "absolute",
606
+ top: 0,
607
+ width: 0,
608
+ height: 0,
609
+ borderTopWidth: TAIL_H,
610
+ borderStyle: "solid"
611
+ },
612
+ tailMine: {
613
+ right: -8,
614
+ borderRightWidth: TAIL_W,
615
+ borderRightColor: "transparent"
616
+ },
617
+ tailTheirs: {
618
+ left: -8,
619
+ borderLeftWidth: TAIL_W,
620
+ borderLeftColor: "transparent"
621
+ },
622
+ /** Room under the bubble for the reaction pill. */
428
623
  bubbleReacted: {
429
- marginTop: 14
624
+ marginBottom: 16
430
625
  },
431
- reactionBadge: {
626
+ reactionPill: {
432
627
  position: "absolute",
433
- top: -14,
628
+ bottom: -18,
434
629
  alignItems: "center",
435
630
  paddingHorizontal: 6,
436
- paddingVertical: 2,
437
- borderRadius: 14,
438
- borderWidth: 2,
439
- minHeight: 26
631
+ height: 26,
632
+ borderRadius: 13,
633
+ borderWidth: 2
440
634
  },
441
- reactionBadgeMine: {
442
- left: -8
635
+ reactionPillMine: {
636
+ right: 10
443
637
  },
444
- reactionBadgeTheirs: {
445
- right: -8
638
+ reactionPillTheirs: {
639
+ left: 10
446
640
  },
447
641
  reactionEmoji: {
448
- fontSize: 14
642
+ fontSize: 14,
643
+ marginHorizontal: 1
449
644
  },
450
645
  reactionCount: {
451
646
  fontSize: 12,
452
647
  fontWeight: "600",
453
- marginLeft: 2,
454
- marginRight: 2
455
- },
456
- bubbleDeleted: {
457
- borderWidth: StyleSheet.hairlineWidth,
458
- backgroundColor: "transparent",
459
- borderRadius: 18
648
+ marginLeft: 3,
649
+ marginRight: 1
460
650
  },
461
651
  deletedText: {
652
+ fontSize: 15,
653
+ fontStyle: "italic",
654
+ marginLeft: 6,
655
+ marginRight: 4
656
+ },
657
+ author: {
462
658
  fontSize: 13,
463
- fontStyle: "italic"
659
+ fontWeight: "600",
660
+ marginBottom: 2
661
+ },
662
+ authorOverMedia: {
663
+ marginHorizontal: 4,
664
+ marginTop: 2
464
665
  },
465
666
  bubbleText: {
466
- fontSize: 17,
467
- lineHeight: 22
667
+ fontSize: 16,
668
+ lineHeight: 21
468
669
  },
469
670
  linkText: {
470
671
  textDecorationLine: "underline"
471
672
  },
673
+ /** Invisible copy of the meta, sized like it, so text never runs under the time. */
674
+ metaSpacer: {
675
+ fontSize: 11,
676
+ color: "transparent"
677
+ },
678
+ meta: {
679
+ position: "absolute",
680
+ right: 7,
681
+ bottom: 4
682
+ },
683
+ metaOnMedia: {
684
+ right: 10,
685
+ bottom: 10,
686
+ backgroundColor: "rgba(11, 20, 26, 0.45)",
687
+ borderRadius: 10,
688
+ paddingHorizontal: 6,
689
+ paddingVertical: 1
690
+ },
691
+ metaText: {
692
+ fontSize: 11
693
+ },
694
+ metaRowSpace: {
695
+ height: 16
696
+ },
472
697
  /** A card under the text keeps the bubble's padding and sits a line below it. */
473
698
  cardBelowText: {
474
699
  marginTop: 8,
475
- marginBottom: 4
700
+ marginBottom: 18
476
701
  },
477
- /** Photos sit close to the bubble edge, like iMessage. */
702
+ /** Photos sit close to the bubble edge. */
478
703
  bubbleWithMedia: {
479
- paddingHorizontal: 4,
480
- paddingVertical: 4
704
+ paddingHorizontal: 3,
705
+ paddingTop: 3,
706
+ paddingBottom: 3
481
707
  },
482
708
  bubbleCaption: {
483
- paddingHorizontal: 8,
709
+ paddingHorizontal: 5,
484
710
  paddingTop: 4,
485
711
  paddingBottom: 2
486
712
  },
487
- timestampRow: {
488
- flexDirection: "row",
489
- alignItems: "center",
490
- marginTop: 2,
491
- marginHorizontal: 4,
492
- marginBottom: 6
493
- },
494
- timestampText: {
495
- fontSize: 11
496
- },
497
713
  retry: {
498
714
  marginTop: 3,
499
715
  marginRight: 4
500
716
  },
501
717
  retryText: {
502
- fontSize: 11,
718
+ fontSize: 12,
503
719
  marginLeft: 4
504
720
  },
721
+ quote: {
722
+ borderRadius: 6,
723
+ overflow: "hidden",
724
+ minHeight: 44
725
+ },
726
+ quoteInBubble: {
727
+ marginBottom: 4
728
+ },
729
+ quoteBar: {
730
+ width: 4
731
+ },
732
+ quoteBody: {
733
+ flex: 1,
734
+ paddingHorizontal: 8,
735
+ paddingVertical: 5
736
+ },
737
+ quoteAuthor: {
738
+ fontSize: 13,
739
+ fontWeight: "600"
740
+ },
741
+ quoteText: {
742
+ fontSize: 13,
743
+ lineHeight: 17,
744
+ marginTop: 1
745
+ },
505
746
  daySep: {
506
- paddingHorizontal: 24,
507
- marginVertical: 14
747
+ marginVertical: 10
748
+ },
749
+ dayChip: {
750
+ paddingHorizontal: 12,
751
+ paddingVertical: 5,
752
+ borderRadius: 8,
753
+ shadowColor: "#0b141a",
754
+ shadowOpacity: 0.1,
755
+ shadowRadius: 0.5,
756
+ shadowOffset: {
757
+ width: 0,
758
+ height: 1
759
+ },
760
+ elevation: 1
508
761
  },
509
762
  dayText: {
510
- fontSize: 12,
511
- fontWeight: "600"
763
+ fontSize: 12.5,
764
+ fontWeight: "500"
765
+ },
766
+ unreadBand: {
767
+ marginVertical: 10,
768
+ paddingVertical: 6,
769
+ alignItems: "center"
770
+ },
771
+ unreadBandText: {
772
+ fontSize: 12.5,
773
+ fontWeight: "500"
512
774
  },
513
775
  banner: {
514
776
  paddingHorizontal: 14,
@@ -523,7 +785,13 @@ const styles = StyleSheet.create({
523
785
  connBanner: {
524
786
  paddingHorizontal: 14,
525
787
  paddingVertical: 6,
526
- alignItems: "center"
788
+ alignItems: "center",
789
+ justifyContent: "center"
790
+ },
791
+ connText: {
792
+ color: "#fff",
793
+ fontSize: 12,
794
+ fontWeight: "500"
527
795
  },
528
796
  empty: {
529
797
  flex: 1,
@@ -561,4 +829,4 @@ const styles = StyleSheet.create({
561
829
  fontSize: 15,
562
830
  fontWeight: "700"
563
831
  }
564
- });export{Avatar,ConnectionBanner,ConversationRow,DaySeparator,EmptyState,InlineBanner,MessageBubble,UnreadBadge,chatThemes};//# sourceMappingURL=ChatComponents.js.map
832
+ });export{Avatar,ConnectionBanner,ConversationRow,DaySeparator,EmptyState,InlineBanner,MessageBubble,MessageTicks,ReplyQuote,UnreadBadge,UnreadDivider,chatThemes,personColor};//# sourceMappingURL=ChatComponents.js.map