@poolse/react-native 2.24.0 → 2.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,12 @@
1
- import { useUser, useMe, useConversations, useAttachmentUpload, useConversation, useMembers, usePresence, useMessages, useTyping, useRealtimeStatus, computeGroupPosition, formatDayLabel, useReactions, sameDay, useThread, useAttachmentUrl, usePoolse, useVoiceRoom, useCalls, useCallRoom } from '@poolse/react';
2
- import { createContext, forwardRef, useRef, useState, useEffect, useImperativeHandle, useMemo, useCallback, useContext, createElement } from 'react';
3
- import { StyleSheet, Keyboard, Platform, View, Pressable, TextInput, Text, useWindowDimensions, Animated, Easing, PanResponder, Image, ScrollView, ActivityIndicator, FlatList, AppState, KeyboardAvoidingView, Modal, Dimensions, Linking, StatusBar } from 'react-native';
1
+ import { useUser, useMe, useConversations, formatCallLogPreview, useAttachmentUpload, useConversation, useMembers, usePresence, useMessages, useTyping, useRealtimeStatus, isMessageVisibleTo, computeGroupPosition, formatDayLabel, callLogDisplayFor, sameDay, useReactions, useThread, useAttachmentUrl, usePoolse, useVoiceRoom, useCalls, useCallRoom } from '@poolse/react';
2
+ import { createContext, forwardRef, useRef, useState, useImperativeHandle, useEffect, useMemo, useCallback, useContext, createElement } from 'react';
3
+ import { StyleSheet, View, Pressable, TextInput, Text, useWindowDimensions, Animated, Easing, PanResponder, Image, Keyboard, Platform, ScrollView, ActivityIndicator, FlatList, AppState, KeyboardAvoidingView, Modal, Linking, StatusBar } from 'react-native';
4
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
5
  import Svg2, { SvgXml, Svg, Path, Circle, G, Defs, RadialGradient, Stop, Rect } from 'react-native-svg';
6
+ import { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';
6
7
  import * as ImagePicker from 'expo-image-picker';
7
8
  import * as DocumentPicker from 'expo-document-picker';
8
9
  import { manipulateAsync, SaveFormat } from 'expo-image-manipulator';
9
- import { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';
10
10
  import * as Clipboard from 'expo-clipboard';
11
11
  import Markdown, { MarkdownIt } from 'react-native-markdown-display';
12
12
 
@@ -619,6 +619,13 @@ var styles2 = StyleSheet.create({
619
619
  padding: 6
620
620
  }
621
621
  });
622
+
623
+ // src/internal/edgeToEdge.ts
624
+ var EDGE_TO_EDGE_MODAL = {
625
+ statusBarTranslucent: true,
626
+ navigationBarTranslucent: true
627
+ };
628
+ var useSafeInsets = useSafeAreaInsets;
622
629
  function useDismissableSheet({ onClose, sheetHeight, dismissThreshold = 0.22 }) {
623
630
  const translateY = useRef(new Animated.Value(0)).current;
624
631
  const panResponder = useMemo(
@@ -673,6 +680,7 @@ function GroupDetailsSheet({
673
680
  const theme = usePoolseTheme();
674
681
  const { conversation } = useConversation(conversationId);
675
682
  const { members } = useMembers(conversationId);
683
+ const insets = useSafeInsets();
676
684
  const { height: screenHeight } = useWindowDimensions();
677
685
  const { translateY, panHandlers } = useDismissableSheet({
678
686
  onClose,
@@ -687,7 +695,7 @@ function GroupDetailsSheet({
687
695
  transparent: true,
688
696
  animationType: "slide",
689
697
  onRequestClose: onClose,
690
- statusBarTranslucent: true,
698
+ ...EDGE_TO_EDGE_MODAL,
691
699
  children: /* @__PURE__ */ jsxs(View, { style: styles3.modalRoot, children: [
692
700
  /* @__PURE__ */ jsx(
693
701
  Pressable,
@@ -706,6 +714,11 @@ function GroupDetailsSheet({
706
714
  backgroundColor: theme.colors.paper,
707
715
  borderTopLeftRadius: theme.radii.xl,
708
716
  borderTopRightRadius: theme.radii.xl,
717
+ // Header stays below the status bar even on short screens.
718
+ maxHeight: screenHeight - insets.top - 8,
719
+ paddingBottom: insets.bottom,
720
+ paddingLeft: insets.left,
721
+ paddingRight: insets.right,
709
722
  transform: [{ translateY }]
710
723
  },
711
724
  theme.shadows.lg
@@ -993,6 +1006,7 @@ function ConversationList({
993
1006
  const auto = useConversations();
994
1007
  const { me } = useMe();
995
1008
  const meExternalId = me?.external_id ?? null;
1009
+ const meId = me?.id ?? null;
996
1010
  const isControlled = controlled !== void 0;
997
1011
  const conversations = isControlled ? controlled : auto.conversations;
998
1012
  const loading = isControlled ? controlledLoading ?? false : auto.loading;
@@ -1024,6 +1038,7 @@ function ConversationList({
1024
1038
  conv: item,
1025
1039
  selected,
1026
1040
  meExternalId,
1041
+ meId,
1027
1042
  unread: counts?.[item.id] ?? 0,
1028
1043
  ...labelFor ? { labelFor } : {},
1029
1044
  ...avatarFor ? { avatarFor } : {},
@@ -1038,6 +1053,7 @@ function ConversationRow({
1038
1053
  conv,
1039
1054
  selected,
1040
1055
  meExternalId,
1056
+ meId = null,
1041
1057
  unread,
1042
1058
  labelFor,
1043
1059
  avatarFor,
@@ -1071,7 +1087,7 @@ function ConversationRow({
1071
1087
  children: title
1072
1088
  }
1073
1089
  ),
1074
- conv.last_message_preview ? /* @__PURE__ */ jsx(Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: conv.last_message_preview }) : conv.last_message_at ? /* @__PURE__ */ jsx(Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: formatRelative(conv.last_message_at) }) : null
1090
+ conv.last_message_preview ? /* @__PURE__ */ jsx(Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview }) : conv.last_message_at ? /* @__PURE__ */ jsx(Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: formatRelative(conv.last_message_at) }) : null
1075
1091
  ] }),
1076
1092
  unread > 0 ? /* @__PURE__ */ jsx(View, { style: [styles5.unreadPill, { backgroundColor: theme.colors.unreadPill }], children: /* @__PURE__ */ jsx(Text, { style: [styles5.unreadText, { color: theme.colors.unreadPillText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
1077
1093
  ]
@@ -1165,6 +1181,7 @@ function AttachmentPicker({
1165
1181
  camera = true
1166
1182
  }) {
1167
1183
  const theme = usePoolseTheme();
1184
+ const insets = useSafeInsets();
1168
1185
  const upload = useSharedUpload();
1169
1186
  const { setPreview } = useUploadPreview();
1170
1187
  const pickFromKind = async (kind) => {
@@ -1184,35 +1201,49 @@ function AttachmentPicker({
1184
1201
  onClose();
1185
1202
  }
1186
1203
  };
1187
- return /* @__PURE__ */ jsx(Modal, { visible, transparent: true, animationType: "slide", onRequestClose: onClose, children: /* @__PURE__ */ jsx(Pressable, { style: styles6.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
1188
- View,
1204
+ return /* @__PURE__ */ jsx(
1205
+ Modal,
1189
1206
  {
1190
- style: [
1191
- styles6.sheet,
1207
+ visible,
1208
+ transparent: true,
1209
+ animationType: "slide",
1210
+ onRequestClose: onClose,
1211
+ ...EDGE_TO_EDGE_MODAL,
1212
+ children: /* @__PURE__ */ jsx(Pressable, { style: styles6.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
1213
+ View,
1192
1214
  {
1193
- backgroundColor: theme.colors.surface,
1194
- borderTopLeftRadius: theme.radii.lg,
1195
- borderTopRightRadius: theme.radii.lg
1196
- },
1197
- theme.shadows.lg
1198
- ],
1199
- children: [
1200
- camera ? /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("camera"), children: [
1201
- /* @__PURE__ */ jsx(PoolseIcon, { name: "camera", size: 20, color: theme.colors.ink2 }),
1202
- /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Camera" })
1203
- ] }) : null,
1204
- /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("image"), children: [
1205
- /* @__PURE__ */ jsx(PoolseIcon, { name: "image", size: 20, color: theme.colors.ink2 }),
1206
- /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Photo or video" })
1207
- ] }),
1208
- /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("document"), children: [
1209
- /* @__PURE__ */ jsx(PoolseIcon, { name: "attachment", size: 20, color: theme.colors.ink2 }),
1210
- /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "File" })
1211
- ] }),
1212
- /* @__PURE__ */ jsx(Pressable, { style: styles6.cancel, onPress: onClose, children: /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.brand }], children: "Cancel" }) })
1213
- ]
1215
+ style: [
1216
+ styles6.sheet,
1217
+ {
1218
+ backgroundColor: theme.colors.surface,
1219
+ borderTopLeftRadius: theme.radii.lg,
1220
+ borderTopRightRadius: theme.radii.lg,
1221
+ // Cancel must sit above the nav bar / home indicator.
1222
+ paddingBottom: 24 + insets.bottom,
1223
+ paddingLeft: insets.left,
1224
+ paddingRight: insets.right
1225
+ },
1226
+ theme.shadows.lg
1227
+ ],
1228
+ children: [
1229
+ camera ? /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("camera"), children: [
1230
+ /* @__PURE__ */ jsx(PoolseIcon, { name: "camera", size: 20, color: theme.colors.ink2 }),
1231
+ /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Camera" })
1232
+ ] }) : null,
1233
+ /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("image"), children: [
1234
+ /* @__PURE__ */ jsx(PoolseIcon, { name: "image", size: 20, color: theme.colors.ink2 }),
1235
+ /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Photo or video" })
1236
+ ] }),
1237
+ /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("document"), children: [
1238
+ /* @__PURE__ */ jsx(PoolseIcon, { name: "attachment", size: 20, color: theme.colors.ink2 }),
1239
+ /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "File" })
1240
+ ] }),
1241
+ /* @__PURE__ */ jsx(Pressable, { style: styles6.cancel, onPress: onClose, children: /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.brand }], children: "Cancel" }) })
1242
+ ]
1243
+ }
1244
+ ) })
1214
1245
  }
1215
- ) }) });
1246
+ );
1216
1247
  }
1217
1248
  async function uriToBlob(uri) {
1218
1249
  const res = await fetch(uri);
@@ -1638,7 +1669,24 @@ var styles8 = StyleSheet.create({
1638
1669
  fontWeight: "700"
1639
1670
  }
1640
1671
  });
1641
- var useSafeInsets = useSafeAreaInsets;
1672
+ function useKeyboardOpen() {
1673
+ const [open, setOpen] = useState(false);
1674
+ useEffect(() => {
1675
+ const show = Keyboard.addListener(
1676
+ Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
1677
+ () => setOpen(true)
1678
+ );
1679
+ const hide = Keyboard.addListener(
1680
+ Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
1681
+ () => setOpen(false)
1682
+ );
1683
+ return () => {
1684
+ show.remove();
1685
+ hide.remove();
1686
+ };
1687
+ }, []);
1688
+ return open;
1689
+ }
1642
1690
  var MessageComposer = forwardRef(
1643
1691
  function MessageComposer2({
1644
1692
  onSend,
@@ -1659,23 +1707,9 @@ var MessageComposer = forwardRef(
1659
1707
  const inputRef = useRef(null);
1660
1708
  const [value, setValue] = useState("");
1661
1709
  const [sending, setSending] = useState(false);
1662
- const [keyboardOpen, setKeyboardOpen] = useState(false);
1710
+ const keyboardOpen = useKeyboardOpen();
1663
1711
  const upload = useSharedUpload();
1664
1712
  const insets = useSafeInsets();
1665
- useEffect(() => {
1666
- const show = Keyboard.addListener(
1667
- Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
1668
- () => setKeyboardOpen(true)
1669
- );
1670
- const hide = Keyboard.addListener(
1671
- Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
1672
- () => setKeyboardOpen(false)
1673
- );
1674
- return () => {
1675
- show.remove();
1676
- hide.remove();
1677
- };
1678
- }, []);
1679
1713
  useImperativeHandle(
1680
1714
  ref,
1681
1715
  () => ({
@@ -1931,6 +1965,8 @@ var styles9 = StyleSheet.create({
1931
1965
  });
1932
1966
  function MentionInput({ conversationId, onSend, ...composerProps }) {
1933
1967
  const theme = usePoolseTheme();
1968
+ const insets = useSafeInsets();
1969
+ const keyboardOpen = useKeyboardOpen();
1934
1970
  const { members } = useMembers(conversationId);
1935
1971
  const [pickerOpen, setPickerOpen] = useState(false);
1936
1972
  const [pickerQuery, _setPickerQuery] = useState("");
@@ -1969,7 +2005,8 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
1969
2005
  transparent: true,
1970
2006
  animationType: "slide",
1971
2007
  onRequestClose: () => setPickerOpen(false),
1972
- children: /* @__PURE__ */ jsx(Pressable, { style: styles10.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxs(
2008
+ ...EDGE_TO_EDGE_MODAL,
2009
+ children: /* @__PURE__ */ jsx(KeyboardAvoidingView, { style: styles10.kav, behavior: "padding", children: /* @__PURE__ */ jsx(Pressable, { style: styles10.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxs(
1973
2010
  View,
1974
2011
  {
1975
2012
  style: [
@@ -1977,7 +2014,12 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
1977
2014
  {
1978
2015
  backgroundColor: theme.colors.surface,
1979
2016
  borderTopLeftRadius: theme.radii.lg,
1980
- borderTopRightRadius: theme.radii.lg
2017
+ borderTopRightRadius: theme.radii.lg,
2018
+ // Clear the nav bar — unless the keyboard is covering
2019
+ // it, where the inset would just be a gap.
2020
+ paddingBottom: 12 + (keyboardOpen ? 0 : insets.bottom),
2021
+ paddingLeft: insets.left,
2022
+ paddingRight: insets.right
1981
2023
  }
1982
2024
  ],
1983
2025
  children: [
@@ -1993,6 +2035,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
1993
2035
  {
1994
2036
  data: filteredMembers,
1995
2037
  keyExtractor: (m) => m.user_id,
2038
+ keyboardShouldPersistTaps: "handled",
1996
2039
  renderItem: ({ item }) => /* @__PURE__ */ jsx(
1997
2040
  MentionRow,
1998
2041
  {
@@ -2008,7 +2051,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
2008
2051
  )
2009
2052
  ]
2010
2053
  }
2011
- ) })
2054
+ ) }) })
2012
2055
  }
2013
2056
  )
2014
2057
  ] });
@@ -2021,6 +2064,9 @@ function MentionRow({ member, onPress }) {
2021
2064
  ] });
2022
2065
  }
2023
2066
  var styles10 = StyleSheet.create({
2067
+ kav: {
2068
+ flex: 1
2069
+ },
2024
2070
  backdrop: {
2025
2071
  flex: 1,
2026
2072
  backgroundColor: "rgba(0,0,0,0.35)",
@@ -2177,6 +2223,87 @@ var styles11 = StyleSheet.create({
2177
2223
  fontWeight: "600"
2178
2224
  }
2179
2225
  });
2226
+ function CallLogRow({ msg, meId }) {
2227
+ const theme = usePoolseTheme();
2228
+ const display = callLogDisplayFor(msg, meId);
2229
+ if (!display) return null;
2230
+ const accent = display.missed ? theme.colors.error : theme.colors.ink3;
2231
+ const time = formatTime(msg.inserted_at);
2232
+ const label = [display.title, display.detail, time].filter(Boolean).join(", ");
2233
+ const metaStyle = [styles12.meta, { color: theme.colors.ink3, fontFamily: theme.type.fontBody }];
2234
+ return /* @__PURE__ */ jsx(View, { style: styles12.wrap, accessible: true, accessibilityLabel: label, children: /* @__PURE__ */ jsxs(
2235
+ View,
2236
+ {
2237
+ style: [
2238
+ styles12.chip,
2239
+ {
2240
+ backgroundColor: theme.colors.surface2,
2241
+ borderColor: theme.colors.border
2242
+ }
2243
+ ],
2244
+ children: [
2245
+ /* @__PURE__ */ jsx(PoolseIcon, { name: display.media === "video" ? "video" : "phone", size: 13, color: accent }),
2246
+ /* @__PURE__ */ jsx(
2247
+ Text,
2248
+ {
2249
+ style: [
2250
+ styles12.title,
2251
+ {
2252
+ color: display.missed ? theme.colors.error : theme.colors.ink2,
2253
+ fontFamily: theme.type.fontBody
2254
+ }
2255
+ ],
2256
+ numberOfLines: 1,
2257
+ children: display.title
2258
+ }
2259
+ ),
2260
+ display.detail ? /* @__PURE__ */ jsxs(Text, { style: metaStyle, children: [
2261
+ "\xB7 ",
2262
+ display.detail
2263
+ ] }) : null,
2264
+ time ? /* @__PURE__ */ jsxs(Text, { style: metaStyle, children: [
2265
+ "\xB7 ",
2266
+ time
2267
+ ] }) : null
2268
+ ]
2269
+ }
2270
+ ) });
2271
+ }
2272
+ function formatTime(iso) {
2273
+ const d = new Date(iso);
2274
+ if (Number.isNaN(d.getTime())) return "";
2275
+ return d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
2276
+ }
2277
+ var styles12 = StyleSheet.create({
2278
+ wrap: {
2279
+ alignItems: "center",
2280
+ alignSelf: "stretch",
2281
+ marginVertical: 6,
2282
+ paddingHorizontal: 16
2283
+ },
2284
+ chip: {
2285
+ flexDirection: "row",
2286
+ alignItems: "center",
2287
+ gap: 6,
2288
+ maxWidth: "100%",
2289
+ paddingHorizontal: 12,
2290
+ paddingVertical: 4,
2291
+ borderRadius: 999,
2292
+ borderWidth: StyleSheet.hairlineWidth
2293
+ },
2294
+ title: {
2295
+ fontSize: 11,
2296
+ fontWeight: "600",
2297
+ letterSpacing: 0.3,
2298
+ flexShrink: 1
2299
+ },
2300
+ meta: {
2301
+ fontSize: 11,
2302
+ fontWeight: "500",
2303
+ letterSpacing: 0.3,
2304
+ fontVariant: ["tabular-nums"]
2305
+ }
2306
+ });
2180
2307
  var DEFAULT_REACTION_EMOJIS = ["\u{1F44D}", "\u2764\uFE0F", "\u{1F602}", "\u{1F389}", "\u{1F64F}", "\u{1F525}"];
2181
2308
  function MessageActions({
2182
2309
  visible,
@@ -2192,6 +2319,7 @@ function MessageActions({
2192
2319
  onCopy
2193
2320
  }) {
2194
2321
  const theme = usePoolseTheme();
2322
+ const insets = useSafeInsets();
2195
2323
  const items = [];
2196
2324
  if (onReply) items.push({ label: "Reply", icon: "reply", onPress: onReply });
2197
2325
  if (onQuote) items.push({ label: "Quote reply", icon: "reply", onPress: onQuote });
@@ -2202,61 +2330,75 @@ function MessageActions({
2202
2330
  if (isSelf && onDelete)
2203
2331
  items.push({ label: "Delete", icon: "trash", onPress: onDelete, danger: true });
2204
2332
  const showEmojiRow = !!onPickReaction && emojis.length > 0;
2205
- return /* @__PURE__ */ jsx(Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsx(Pressable, { style: styles12.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
2206
- View,
2333
+ return /* @__PURE__ */ jsx(
2334
+ Modal,
2207
2335
  {
2208
- style: [
2209
- styles12.sheet,
2336
+ visible,
2337
+ transparent: true,
2338
+ animationType: "fade",
2339
+ onRequestClose: onClose,
2340
+ ...EDGE_TO_EDGE_MODAL,
2341
+ children: /* @__PURE__ */ jsx(Pressable, { style: styles13.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
2342
+ View,
2210
2343
  {
2211
- backgroundColor: theme.colors.surface,
2212
- borderTopLeftRadius: theme.radii.lg,
2213
- borderTopRightRadius: theme.radii.lg
2214
- },
2215
- theme.shadows.lg
2216
- ],
2217
- children: [
2218
- showEmojiRow ? /* @__PURE__ */ jsx(View, { style: [styles12.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsx(
2219
- Pressable,
2220
- {
2221
- onPress: () => {
2222
- onPickReaction(emoji);
2223
- onClose();
2224
- },
2225
- style: styles12.emojiBtn,
2226
- hitSlop: 6,
2227
- accessibilityLabel: `React with ${emoji}`,
2228
- children: /* @__PURE__ */ jsx(Text, { style: styles12.emoji, children: emoji })
2229
- },
2230
- emoji
2231
- )) }) : null,
2232
- items.map((item) => /* @__PURE__ */ jsxs(Pressable, { onPress: item.onPress, style: styles12.item, children: [
2233
- /* @__PURE__ */ jsx(
2234
- PoolseIcon,
2235
- {
2236
- name: item.icon,
2237
- size: 18,
2238
- color: item.danger ? theme.colors.error : theme.colors.ink2
2239
- }
2240
- ),
2241
- /* @__PURE__ */ jsx(
2242
- Text,
2344
+ style: [
2345
+ styles13.sheet,
2243
2346
  {
2244
- style: [
2245
- styles12.itemText,
2347
+ backgroundColor: theme.colors.surface,
2348
+ borderTopLeftRadius: theme.radii.lg,
2349
+ borderTopRightRadius: theme.radii.lg,
2350
+ // Last action row must sit above the nav bar / home indicator.
2351
+ paddingBottom: 24 + insets.bottom,
2352
+ paddingLeft: insets.left,
2353
+ paddingRight: insets.right
2354
+ },
2355
+ theme.shadows.lg
2356
+ ],
2357
+ children: [
2358
+ showEmojiRow ? /* @__PURE__ */ jsx(View, { style: [styles13.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsx(
2359
+ Pressable,
2360
+ {
2361
+ onPress: () => {
2362
+ onPickReaction(emoji);
2363
+ onClose();
2364
+ },
2365
+ style: styles13.emojiBtn,
2366
+ hitSlop: 6,
2367
+ accessibilityLabel: `React with ${emoji}`,
2368
+ children: /* @__PURE__ */ jsx(Text, { style: styles13.emoji, children: emoji })
2369
+ },
2370
+ emoji
2371
+ )) }) : null,
2372
+ items.map((item) => /* @__PURE__ */ jsxs(Pressable, { onPress: item.onPress, style: styles13.item, children: [
2373
+ /* @__PURE__ */ jsx(
2374
+ PoolseIcon,
2246
2375
  {
2247
- color: item.danger ? theme.colors.error : theme.colors.ink,
2248
- fontFamily: theme.type.fontBody
2376
+ name: item.icon,
2377
+ size: 18,
2378
+ color: item.danger ? theme.colors.error : theme.colors.ink2
2249
2379
  }
2250
- ],
2251
- children: item.label
2252
- }
2253
- )
2254
- ] }, item.label))
2255
- ]
2380
+ ),
2381
+ /* @__PURE__ */ jsx(
2382
+ Text,
2383
+ {
2384
+ style: [
2385
+ styles13.itemText,
2386
+ {
2387
+ color: item.danger ? theme.colors.error : theme.colors.ink,
2388
+ fontFamily: theme.type.fontBody
2389
+ }
2390
+ ],
2391
+ children: item.label
2392
+ }
2393
+ )
2394
+ ] }, item.label))
2395
+ ]
2396
+ }
2397
+ ) })
2256
2398
  }
2257
- ) }) });
2399
+ );
2258
2400
  }
2259
- var styles12 = StyleSheet.create({
2401
+ var styles13 = StyleSheet.create({
2260
2402
  backdrop: {
2261
2403
  flex: 1,
2262
2404
  backgroundColor: "rgba(0,0,0,0.35)",
@@ -2326,7 +2468,7 @@ function AttachmentPreview({
2326
2468
  View,
2327
2469
  {
2328
2470
  style: [
2329
- styles13.imagePlaceholder,
2471
+ styles14.imagePlaceholder,
2330
2472
  {
2331
2473
  width: maxWidth,
2332
2474
  height: 200,
@@ -2346,7 +2488,7 @@ function AttachmentPreview({
2346
2488
  onPress,
2347
2489
  disabled: !onPress,
2348
2490
  style: [
2349
- styles13.fileCard,
2491
+ styles14.fileCard,
2350
2492
  {
2351
2493
  backgroundColor: onBrand ? "rgba(255,255,255,0.18)" : theme.colors.surface2,
2352
2494
  borderColor: onBrand ? "transparent" : theme.colors.border,
@@ -2359,12 +2501,12 @@ function AttachmentPreview({
2359
2501
  /* @__PURE__ */ jsx(
2360
2502
  Text,
2361
2503
  {
2362
- style: [styles13.fileName, { color: ink, fontFamily: theme.type.fontBody }],
2504
+ style: [styles14.fileName, { color: ink, fontFamily: theme.type.fontBody }],
2363
2505
  numberOfLines: 1,
2364
2506
  children: attachment.original_filename ?? "file"
2365
2507
  }
2366
2508
  ),
2367
- /* @__PURE__ */ jsx(Text, { style: [styles13.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes2(attachment.byte_size) })
2509
+ /* @__PURE__ */ jsx(Text, { style: [styles14.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes2(attachment.byte_size) })
2368
2510
  ] })
2369
2511
  ]
2370
2512
  }
@@ -2376,7 +2518,7 @@ function formatBytes2(n) {
2376
2518
  if (n < 1024 * 1024 * 1024) return `${(n / 1024 / 1024).toFixed(1)} MB`;
2377
2519
  return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
2378
2520
  }
2379
- var styles13 = StyleSheet.create({
2521
+ var styles14 = StyleSheet.create({
2380
2522
  imagePlaceholder: {},
2381
2523
  fileCard: {
2382
2524
  flexDirection: "row",
@@ -2412,7 +2554,7 @@ function ImageMosaic({
2412
2554
  View,
2413
2555
  {
2414
2556
  style: [
2415
- styles14.root,
2557
+ styles15.root,
2416
2558
  {
2417
2559
  borderTopLeftRadius: r,
2418
2560
  borderTopRightRadius: r,
@@ -2433,18 +2575,18 @@ function ImageMosaic({
2433
2575
  {
2434
2576
  onLongPress,
2435
2577
  attachment: visible[0],
2436
- style: styles14.tileFull,
2578
+ style: styles15.tileFull,
2437
2579
  onPress: () => setViewerIndex(0),
2438
2580
  overlay: null
2439
2581
  }
2440
2582
  ) : null,
2441
- n === 2 ? /* @__PURE__ */ jsxs(View, { style: styles14.rowEven, children: [
2583
+ n === 2 ? /* @__PURE__ */ jsxs(View, { style: styles15.rowEven, children: [
2442
2584
  /* @__PURE__ */ jsx(
2443
2585
  Tile,
2444
2586
  {
2445
2587
  onLongPress,
2446
2588
  attachment: visible[0],
2447
- style: styles14.tileHalfSquare,
2589
+ style: styles15.tileHalfSquare,
2448
2590
  onPress: () => setViewerIndex(0),
2449
2591
  overlay: null
2450
2592
  }
@@ -2454,7 +2596,7 @@ function ImageMosaic({
2454
2596
  {
2455
2597
  onLongPress,
2456
2598
  attachment: visible[1],
2457
- style: styles14.tileHalfSquare,
2599
+ style: styles15.tileHalfSquare,
2458
2600
  onPress: () => setViewerIndex(1),
2459
2601
  overlay: null
2460
2602
  }
@@ -2466,18 +2608,18 @@ function ImageMosaic({
2466
2608
  {
2467
2609
  onLongPress,
2468
2610
  attachment: visible[0],
2469
- style: styles14.tileHero,
2611
+ style: styles15.tileHero,
2470
2612
  onPress: () => setViewerIndex(0),
2471
2613
  overlay: null
2472
2614
  }
2473
2615
  ),
2474
- /* @__PURE__ */ jsxs(View, { style: [styles14.rowEven, { marginTop: 2 }], children: [
2616
+ /* @__PURE__ */ jsxs(View, { style: [styles15.rowEven, { marginTop: 2 }], children: [
2475
2617
  /* @__PURE__ */ jsx(
2476
2618
  Tile,
2477
2619
  {
2478
2620
  onLongPress,
2479
2621
  attachment: visible[1],
2480
- style: styles14.tileHalfSquare,
2622
+ style: styles15.tileHalfSquare,
2481
2623
  onPress: () => setViewerIndex(1),
2482
2624
  overlay: null
2483
2625
  }
@@ -2487,7 +2629,7 @@ function ImageMosaic({
2487
2629
  {
2488
2630
  onLongPress,
2489
2631
  attachment: visible[2],
2490
- style: styles14.tileHalfSquare,
2632
+ style: styles15.tileHalfSquare,
2491
2633
  onPress: () => setViewerIndex(2),
2492
2634
  overlay: null
2493
2635
  }
@@ -2495,13 +2637,13 @@ function ImageMosaic({
2495
2637
  ] })
2496
2638
  ] }) : null,
2497
2639
  n === 4 ? /* @__PURE__ */ jsxs(Fragment, { children: [
2498
- /* @__PURE__ */ jsxs(View, { style: styles14.rowEven, children: [
2640
+ /* @__PURE__ */ jsxs(View, { style: styles15.rowEven, children: [
2499
2641
  /* @__PURE__ */ jsx(
2500
2642
  Tile,
2501
2643
  {
2502
2644
  onLongPress,
2503
2645
  attachment: visible[0],
2504
- style: styles14.tileHalfSquare,
2646
+ style: styles15.tileHalfSquare,
2505
2647
  onPress: () => setViewerIndex(0),
2506
2648
  overlay: null
2507
2649
  }
@@ -2511,19 +2653,19 @@ function ImageMosaic({
2511
2653
  {
2512
2654
  onLongPress,
2513
2655
  attachment: visible[1],
2514
- style: styles14.tileHalfSquare,
2656
+ style: styles15.tileHalfSquare,
2515
2657
  onPress: () => setViewerIndex(1),
2516
2658
  overlay: null
2517
2659
  }
2518
2660
  )
2519
2661
  ] }),
2520
- /* @__PURE__ */ jsxs(View, { style: [styles14.rowEven, { marginTop: 2 }], children: [
2662
+ /* @__PURE__ */ jsxs(View, { style: [styles15.rowEven, { marginTop: 2 }], children: [
2521
2663
  /* @__PURE__ */ jsx(
2522
2664
  Tile,
2523
2665
  {
2524
2666
  onLongPress,
2525
2667
  attachment: visible[2],
2526
- style: styles14.tileHalfSquare,
2668
+ style: styles15.tileHalfSquare,
2527
2669
  onPress: () => setViewerIndex(2),
2528
2670
  overlay: null
2529
2671
  }
@@ -2533,7 +2675,7 @@ function ImageMosaic({
2533
2675
  {
2534
2676
  onLongPress,
2535
2677
  attachment: visible[3],
2536
- style: styles14.tileHalfSquare,
2678
+ style: styles15.tileHalfSquare,
2537
2679
  onPress: () => setViewerIndex(3),
2538
2680
  overlay: overflow > 0 ? `+${overflow}` : null
2539
2681
  }
@@ -2550,6 +2692,7 @@ function ImageMosaic({
2550
2692
  transparent: true,
2551
2693
  animationType: "fade",
2552
2694
  onRequestClose: () => setViewerIndex(null),
2695
+ ...EDGE_TO_EDGE_MODAL,
2553
2696
  children: viewerIndex !== null ? /* @__PURE__ */ jsx(
2554
2697
  FullScreenViewer,
2555
2698
  {
@@ -2570,18 +2713,18 @@ function Tile({
2570
2713
  }) {
2571
2714
  const theme = usePoolseTheme();
2572
2715
  const { url } = useAttachmentUrl(attachment.id);
2573
- return /* @__PURE__ */ jsxs(Pressable, { onPress, onLongPress, style: [styles14.tileBase, style], children: [
2716
+ return /* @__PURE__ */ jsxs(Pressable, { onPress, onLongPress, style: [styles15.tileBase, style], children: [
2574
2717
  url ? /* @__PURE__ */ jsx(
2575
2718
  Image,
2576
2719
  {
2577
2720
  source: { uri: url },
2578
- style: [styles14.tileImage, { backgroundColor: theme.colors.surface2 }],
2721
+ style: [styles15.tileImage, { backgroundColor: theme.colors.surface2 }],
2579
2722
  resizeMode: "cover",
2580
2723
  accessible: true,
2581
2724
  accessibilityLabel: attachment.original_filename ?? "image"
2582
2725
  }
2583
- ) : /* @__PURE__ */ jsx(View, { style: [styles14.tileImage, { backgroundColor: theme.colors.surface2 }] }),
2584
- overlay ? /* @__PURE__ */ jsx(View, { style: styles14.overflow, children: /* @__PURE__ */ jsx(Text, { style: styles14.overflowText, children: overlay }) }) : null
2726
+ ) : /* @__PURE__ */ jsx(View, { style: [styles15.tileImage, { backgroundColor: theme.colors.surface2 }] }),
2727
+ overlay ? /* @__PURE__ */ jsx(View, { style: styles15.overflow, children: /* @__PURE__ */ jsx(Text, { style: styles15.overflowText, children: overlay }) }) : null
2585
2728
  ] });
2586
2729
  }
2587
2730
  function FullScreenViewer({
@@ -2589,8 +2732,9 @@ function FullScreenViewer({
2589
2732
  onClose
2590
2733
  }) {
2591
2734
  const { url } = useAttachmentUrl(attachment.id);
2592
- const { width, height } = Dimensions.get("window");
2593
- return /* @__PURE__ */ jsxs(Pressable, { style: styles14.viewer, onPress: onClose, children: [
2735
+ const { width, height } = useWindowDimensions();
2736
+ const insets = useSafeInsets();
2737
+ return /* @__PURE__ */ jsxs(Pressable, { style: styles15.viewer, onPress: onClose, children: [
2594
2738
  url ? /* @__PURE__ */ jsx(
2595
2739
  Image,
2596
2740
  {
@@ -2606,14 +2750,14 @@ function FullScreenViewer({
2606
2750
  {
2607
2751
  onPress: onClose,
2608
2752
  hitSlop: 12,
2609
- style: styles14.closeBtn,
2753
+ style: [styles15.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
2610
2754
  accessibilityLabel: "Close viewer",
2611
2755
  children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
2612
2756
  }
2613
2757
  )
2614
2758
  ] });
2615
2759
  }
2616
- var styles14 = StyleSheet.create({
2760
+ var styles15 = StyleSheet.create({
2617
2761
  root: {
2618
2762
  width: "100%",
2619
2763
  overflow: "hidden",
@@ -2665,8 +2809,6 @@ var styles14 = StyleSheet.create({
2665
2809
  },
2666
2810
  closeBtn: {
2667
2811
  position: "absolute",
2668
- top: 48,
2669
- right: 16,
2670
2812
  padding: 8,
2671
2813
  backgroundColor: "rgba(0,0,0,0.5)",
2672
2814
  borderRadius: 20
@@ -2787,7 +2929,7 @@ function MessageBubble({
2787
2929
  const isEdited = !!message.edited_at && !isDeleted;
2788
2930
  const trimmable = maxBodyLength > 0 && body.length > maxBodyLength;
2789
2931
  const truncated = trimmable && !expanded ? body.slice(0, maxBodyLength) + "\u2026" : body;
2790
- const time = formatTime(message.inserted_at);
2932
+ const time = formatTime2(message.inserted_at);
2791
2933
  const images = showAttachments && !isDeleted ? (message.attachments ?? []).filter((a) => isImageContentType(a.content_type)) : [];
2792
2934
  const files = showAttachments && !isDeleted ? (message.attachments ?? []).filter((a) => !isImageContentType(a.content_type)) : [];
2793
2935
  const hasMedia = images.length > 0;
@@ -2804,22 +2946,22 @@ function MessageBubble({
2804
2946
  View,
2805
2947
  {
2806
2948
  style: [
2807
- styles15.metaRow,
2808
- variant === "inline" && styles15.metaInline,
2809
- variant === "wrapped" && styles15.metaWrapped,
2810
- variant === "overlay" && styles15.metaOverlay,
2811
- variant === "block" && styles15.metaBlock,
2949
+ styles16.metaRow,
2950
+ variant === "inline" && styles16.metaInline,
2951
+ variant === "wrapped" && styles16.metaWrapped,
2952
+ variant === "overlay" && styles16.metaOverlay,
2953
+ variant === "block" && styles16.metaBlock,
2812
2954
  // File-only bubble: the meta row follows the cards directly —
2813
2955
  // give it air so the time doesn't sit glued to the card.
2814
- variant === "block" && hasFiles && !hasBody && styles15.metaBlockAfterFiles,
2815
- variant === "jumbo" && styles15.metaJumbo
2956
+ variant === "block" && hasFiles && !hasBody && styles16.metaBlockAfterFiles,
2957
+ variant === "jumbo" && styles16.metaJumbo
2816
2958
  ],
2817
2959
  onLayout: variant === "inline" || variant === "wrapped" ? (e) => setMetaWidth(e.nativeEvent.layout.width) : void 0,
2818
2960
  pointerEvents: "none",
2819
2961
  children: [
2820
- isEdited ? /* @__PURE__ */ jsx(Text, { style: [styles15.editedTag, { color, opacity: 0.8 }], children: "edited" }) : null,
2821
- /* @__PURE__ */ jsx(Text, { style: [styles15.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
2822
- isSelf && readState ? /* @__PURE__ */ jsx(View, { style: styles15.readTick, children: /* @__PURE__ */ jsx(
2962
+ isEdited ? /* @__PURE__ */ jsx(Text, { style: [styles16.editedTag, { color, opacity: 0.8 }], children: "edited" }) : null,
2963
+ /* @__PURE__ */ jsx(Text, { style: [styles16.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
2964
+ isSelf && readState ? /* @__PURE__ */ jsx(View, { style: styles16.readTick, children: /* @__PURE__ */ jsx(
2823
2965
  PoolseIcon,
2824
2966
  {
2825
2967
  name: readState === "read" ? "check-double" : "check",
@@ -2831,7 +2973,7 @@ function MessageBubble({
2831
2973
  }
2832
2974
  );
2833
2975
  };
2834
- return /* @__PURE__ */ jsxs(View, { style: [styles15.wrap, { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }], children: [
2976
+ return /* @__PURE__ */ jsxs(View, { style: [styles16.wrap, { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }], children: [
2835
2977
  /* @__PURE__ */ jsxs(
2836
2978
  View,
2837
2979
  {
@@ -2851,7 +2993,7 @@ function MessageBubble({
2851
2993
  showSenderName && !isSelf && jumboCount === 0 && (groupPosition === "first" || groupPosition === "standalone") ? /* @__PURE__ */ jsx(
2852
2994
  Text,
2853
2995
  {
2854
- style: [styles15.senderName, { color: senderTint, fontFamily: theme.type.fontBody }],
2996
+ style: [styles16.senderName, { color: senderTint, fontFamily: theme.type.fontBody }],
2855
2997
  children: senderLabel
2856
2998
  }
2857
2999
  ) : null,
@@ -2868,7 +3010,7 @@ function MessageBubble({
2868
3010
  // 3px of bubble color framing the picture; the mosaic clips
2869
3011
  // itself 3px tighter than the bubble so the curves stay
2870
3012
  // concentric.
2871
- /* @__PURE__ */ jsxs(View, { style: styles15.mediaFrame, children: [
3013
+ /* @__PURE__ */ jsxs(View, { style: styles16.mediaFrame, children: [
2872
3014
  /* @__PURE__ */ jsx(
2873
3015
  ImageMosaic,
2874
3016
  {
@@ -2882,7 +3024,7 @@ function MessageBubble({
2882
3024
  metaOverlay ? metaRow("overlay") : null
2883
3025
  ] })
2884
3026
  ) : null,
2885
- hasFiles ? /* @__PURE__ */ jsx(View, { style: styles15.filesBlock, children: files.map((att) => /* @__PURE__ */ jsx(
3027
+ hasFiles ? /* @__PURE__ */ jsx(View, { style: styles16.filesBlock, children: files.map((att) => /* @__PURE__ */ jsx(
2886
3028
  AttachmentPreview,
2887
3029
  {
2888
3030
  attachment: att,
@@ -2891,7 +3033,7 @@ function MessageBubble({
2891
3033
  },
2892
3034
  att.id
2893
3035
  )) }) : null,
2894
- isDeleted ? /* @__PURE__ */ jsx(View, { style: [styles15.textBlock, sectionAbove && styles15.textBlockAfter], children: /* @__PURE__ */ jsx(
3036
+ isDeleted ? /* @__PURE__ */ jsx(View, { style: [styles16.textBlock, sectionAbove && styles16.textBlockAfter], children: /* @__PURE__ */ jsx(
2895
3037
  Text,
2896
3038
  {
2897
3039
  style: {
@@ -2905,7 +3047,7 @@ function MessageBubble({
2905
3047
  children: "Message deleted"
2906
3048
  }
2907
3049
  ) }) : null,
2908
- hasBody && jumboCount > 0 ? /* @__PURE__ */ jsx(View, { style: styles15.jumboBlock, children: /* @__PURE__ */ jsx(
3050
+ hasBody && jumboCount > 0 ? /* @__PURE__ */ jsx(View, { style: styles16.jumboBlock, children: /* @__PURE__ */ jsx(
2909
3051
  Text,
2910
3052
  {
2911
3053
  style: { fontSize: emojiFontSize(jumboCount), lineHeight: emojiFontSize(jumboCount) + 8 },
@@ -2915,7 +3057,7 @@ function MessageBubble({
2915
3057
  hasBody && jumboCount === 0 ? /* @__PURE__ */ jsxs(
2916
3058
  View,
2917
3059
  {
2918
- style: [styles15.textBlock, sectionAbove && styles15.textBlockAfter],
3060
+ style: [styles16.textBlock, sectionAbove && styles16.textBlockAfter],
2919
3061
  onLayout: inlineMeta ? (e) => setTextBoxWidth(e.nativeEvent.layout.width - 24) : void 0,
2920
3062
  children: [
2921
3063
  markdown && !inlineMeta ? renderMarkdown(truncated, {
@@ -2949,7 +3091,7 @@ function MessageBubble({
2949
3091
  Text,
2950
3092
  {
2951
3093
  style: [
2952
- styles15.readMore,
3094
+ styles16.readMore,
2953
3095
  { color: isSelf ? theme.colors.onBrand : theme.colors.brand }
2954
3096
  ],
2955
3097
  children: expanded ? "Show less" : "Read more"
@@ -2960,7 +3102,7 @@ function MessageBubble({
2960
3102
  }
2961
3103
  ) : null,
2962
3104
  !inlineMeta && !metaOverlay && jumboCount === 0 ? metaRow("block") : null,
2963
- actionsTrigger ? /* @__PURE__ */ jsx(View, { style: styles15.actionsSlot, children: actionsTrigger }) : null
3105
+ actionsTrigger ? /* @__PURE__ */ jsx(View, { style: styles16.actionsSlot, children: actionsTrigger }) : null
2964
3106
  ]
2965
3107
  }
2966
3108
  ),
@@ -2985,15 +3127,15 @@ function QuotedCard({
2985
3127
  onPress,
2986
3128
  disabled: !onPress,
2987
3129
  style: [
2988
- styles15.quoted,
3130
+ styles16.quoted,
2989
3131
  {
2990
3132
  backgroundColor: bg,
2991
3133
  borderLeftColor: accent
2992
3134
  }
2993
3135
  ],
2994
3136
  children: [
2995
- /* @__PURE__ */ jsx(Text, { style: [styles15.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
2996
- /* @__PURE__ */ jsx(Text, { style: [styles15.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
3137
+ /* @__PURE__ */ jsx(Text, { style: [styles16.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
3138
+ /* @__PURE__ */ jsx(Text, { style: [styles16.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
2997
3139
  ]
2998
3140
  }
2999
3141
  );
@@ -3002,7 +3144,7 @@ function isImageContentType(ct) {
3002
3144
  if (!ct) return false;
3003
3145
  return ct.startsWith("image/");
3004
3146
  }
3005
- function formatTime(iso) {
3147
+ function formatTime2(iso) {
3006
3148
  try {
3007
3149
  const d = new Date(iso);
3008
3150
  const now = /* @__PURE__ */ new Date();
@@ -3025,7 +3167,7 @@ function formatTime(iso) {
3025
3167
  function isSameDay(a, b) {
3026
3168
  return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
3027
3169
  }
3028
- var styles15 = StyleSheet.create({
3170
+ var styles16 = StyleSheet.create({
3029
3171
  wrap: {
3030
3172
  marginBottom: 2
3031
3173
  },
@@ -3152,7 +3294,7 @@ function ReactionStrip({
3152
3294
  });
3153
3295
  const entries = Object.entries(reactions);
3154
3296
  if (entries.length === 0) return null;
3155
- return /* @__PURE__ */ jsx(View, { style: styles16.strip, children: entries.map(([emoji, userIds]) => {
3297
+ return /* @__PURE__ */ jsx(View, { style: styles17.strip, children: entries.map(([emoji, userIds]) => {
3156
3298
  const userArr = Array.isArray(userIds) ? userIds : [];
3157
3299
  const meReacted = meId !== null && userArr.includes(meId);
3158
3300
  return /* @__PURE__ */ jsxs(
@@ -3160,7 +3302,7 @@ function ReactionStrip({
3160
3302
  {
3161
3303
  onPress: () => meReacted ? removeReaction(emoji) : addReaction(emoji),
3162
3304
  style: [
3163
- styles16.chip,
3305
+ styles17.chip,
3164
3306
  {
3165
3307
  backgroundColor: meReacted ? theme.colors.brandSoft : theme.colors.surface2,
3166
3308
  borderColor: meReacted ? theme.colors.brand : theme.colors.border,
@@ -3169,12 +3311,12 @@ function ReactionStrip({
3169
3311
  }
3170
3312
  ],
3171
3313
  children: [
3172
- /* @__PURE__ */ jsx(Text, { style: styles16.emoji, children: emoji }),
3314
+ /* @__PURE__ */ jsx(Text, { style: styles17.emoji, children: emoji }),
3173
3315
  /* @__PURE__ */ jsx(
3174
3316
  Text,
3175
3317
  {
3176
3318
  style: [
3177
- styles16.count,
3319
+ styles17.count,
3178
3320
  {
3179
3321
  color: meReacted ? theme.colors.brand : theme.colors.ink2,
3180
3322
  fontWeight: meReacted ? "700" : "600"
@@ -3196,33 +3338,51 @@ function ReactionPicker({
3196
3338
  emojis = DEFAULT_EMOJIS
3197
3339
  }) {
3198
3340
  const theme = usePoolseTheme();
3199
- return /* @__PURE__ */ jsx(Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsx(Pressable, { style: styles16.backdrop, onPress: onClose, children: /* @__PURE__ */ jsx(
3200
- View,
3341
+ const insets = useSafeInsets();
3342
+ return /* @__PURE__ */ jsx(
3343
+ Modal,
3201
3344
  {
3202
- style: [
3203
- styles16.sheet,
3204
- {
3205
- backgroundColor: theme.colors.surface,
3206
- borderRadius: theme.radii.lg
3207
- },
3208
- theme.shadows.lg
3209
- ],
3210
- children: emojis.map((emoji) => /* @__PURE__ */ jsx(
3345
+ visible,
3346
+ transparent: true,
3347
+ animationType: "fade",
3348
+ onRequestClose: onClose,
3349
+ ...EDGE_TO_EDGE_MODAL,
3350
+ children: /* @__PURE__ */ jsx(
3211
3351
  Pressable,
3212
3352
  {
3213
- style: styles16.emojiBtn,
3214
- onPress: () => {
3215
- onPick(emoji);
3216
- onClose();
3217
- },
3218
- children: /* @__PURE__ */ jsx(Text, { style: styles16.bigEmoji, children: emoji })
3219
- },
3220
- emoji
3221
- ))
3353
+ style: [styles17.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
3354
+ onPress: onClose,
3355
+ children: /* @__PURE__ */ jsx(
3356
+ View,
3357
+ {
3358
+ style: [
3359
+ styles17.sheet,
3360
+ {
3361
+ backgroundColor: theme.colors.surface,
3362
+ borderRadius: theme.radii.lg
3363
+ },
3364
+ theme.shadows.lg
3365
+ ],
3366
+ children: emojis.map((emoji) => /* @__PURE__ */ jsx(
3367
+ Pressable,
3368
+ {
3369
+ style: styles17.emojiBtn,
3370
+ onPress: () => {
3371
+ onPick(emoji);
3372
+ onClose();
3373
+ },
3374
+ children: /* @__PURE__ */ jsx(Text, { style: styles17.bigEmoji, children: emoji })
3375
+ },
3376
+ emoji
3377
+ ))
3378
+ }
3379
+ )
3380
+ }
3381
+ )
3222
3382
  }
3223
- ) }) });
3383
+ );
3224
3384
  }
3225
- var styles16 = StyleSheet.create({
3385
+ var styles17 = StyleSheet.create({
3226
3386
  strip: {
3227
3387
  flexDirection: "row",
3228
3388
  flexWrap: "wrap",
@@ -3279,7 +3439,14 @@ var styles16 = StyleSheet.create({
3279
3439
  }
3280
3440
  });
3281
3441
  var SWIPE_REPLY_THRESHOLD = 50;
3282
- function MessageRow({
3442
+ function MessageRow(props) {
3443
+ const callLog = callLogDisplayFor(props.msg, props.meId);
3444
+ if (callLog !== void 0) {
3445
+ return callLog ? /* @__PURE__ */ jsx(CallLogRow, { msg: props.msg, meId: props.meId }) : null;
3446
+ }
3447
+ return /* @__PURE__ */ jsx(BubbleMessageRow, { ...props });
3448
+ }
3449
+ function BubbleMessageRow({
3283
3450
  msg,
3284
3451
  meId,
3285
3452
  reactions = true,
@@ -3390,15 +3557,15 @@ function MessageRow({
3390
3557
  View,
3391
3558
  {
3392
3559
  style: [
3393
- styles17.row,
3560
+ styles18.row,
3394
3561
  { alignSelf: isSelf ? "flex-end" : "flex-start" },
3395
3562
  // Lift this row above the dim backdrop the parent renders
3396
3563
  // during edit mode. zIndex covers iOS / web; elevation does
3397
3564
  // the equivalent on Android.
3398
- isEditing ? styles17.rowEditing : null
3565
+ isEditing ? styles18.rowEditing : null
3399
3566
  ],
3400
3567
  children: [
3401
- showAvatarSlot ? /* @__PURE__ */ jsx(View, { style: styles17.avatarSlot, children: showAvatarRender ? /* @__PURE__ */ jsx(
3568
+ showAvatarSlot ? /* @__PURE__ */ jsx(View, { style: styles18.avatarSlot, children: showAvatarRender ? /* @__PURE__ */ jsx(
3402
3569
  Avatar,
3403
3570
  {
3404
3571
  src: avatarUrl ?? null,
@@ -3407,14 +3574,14 @@ function MessageRow({
3407
3574
  size: "sm"
3408
3575
  }
3409
3576
  ) : null }) : null,
3410
- /* @__PURE__ */ jsxs(View, { style: styles17.bubbleCol, children: [
3577
+ /* @__PURE__ */ jsxs(View, { style: styles18.bubbleCol, children: [
3411
3578
  swipeEnabled ? /* @__PURE__ */ jsx(
3412
3579
  Animated.View,
3413
3580
  {
3414
3581
  pointerEvents: "none",
3415
3582
  style: [
3416
- styles17.replyHint,
3417
- isSelf ? styles17.replyHintRight : styles17.replyHintLeft,
3583
+ styles18.replyHint,
3584
+ isSelf ? styles18.replyHintRight : styles18.replyHintLeft,
3418
3585
  {
3419
3586
  opacity: replyIconOpacity,
3420
3587
  transform: [{ scale: replyIconScale }],
@@ -3460,13 +3627,13 @@ function MessageRow({
3460
3627
  )
3461
3628
  }
3462
3629
  ),
3463
- threads && (msg.reply_count ?? 0) > 0 && onOpenThread ? /* @__PURE__ */ jsx(Pressable, { onPress: onOpenThread, style: styles17.threadPill, children: /* @__PURE__ */ jsxs(Text, { style: [styles17.threadPillText, { color: theme.colors.brand }], children: [
3630
+ threads && (msg.reply_count ?? 0) > 0 && onOpenThread ? /* @__PURE__ */ jsx(Pressable, { onPress: onOpenThread, style: styles18.threadPill, children: /* @__PURE__ */ jsxs(Text, { style: [styles18.threadPillText, { color: theme.colors.brand }], children: [
3464
3631
  "\u{1F4AC} ",
3465
3632
  msg.reply_count,
3466
3633
  " ",
3467
3634
  msg.reply_count === 1 ? "reply" : "replies"
3468
3635
  ] }) }) : null,
3469
- reactions ? /* @__PURE__ */ jsx(View, { style: [styles17.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsx(
3636
+ reactions ? /* @__PURE__ */ jsx(View, { style: [styles18.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsx(
3470
3637
  ReactionStrip,
3471
3638
  {
3472
3639
  messageId: msg.id,
@@ -3525,7 +3692,7 @@ function MessageRow({
3525
3692
  }
3526
3693
  );
3527
3694
  }
3528
- var styles17 = StyleSheet.create({
3695
+ var styles18 = StyleSheet.create({
3529
3696
  row: {
3530
3697
  flexDirection: "row",
3531
3698
  alignItems: "flex-end",
@@ -3600,7 +3767,7 @@ function ThreadView({
3600
3767
  transparent: true,
3601
3768
  animationType: "slide",
3602
3769
  onRequestClose: onClose,
3603
- statusBarTranslucent: true,
3770
+ ...EDGE_TO_EDGE_MODAL,
3604
3771
  children: /* @__PURE__ */ jsx(UploadProvider, { children: /* @__PURE__ */ jsx(
3605
3772
  ThreadSheet,
3606
3773
  {
@@ -3632,8 +3799,14 @@ function ThreadSheet({
3632
3799
  loadMore,
3633
3800
  hasMore
3634
3801
  } = useThread(conversationId, rootMessage.id);
3635
- const { height: screenHeight } = useWindowDimensions();
3636
- const sheetHeight = Math.round(screenHeight * SHEET_HEIGHT_FRACTION);
3802
+ const insets = useSafeInsets();
3803
+ const { height: windowHeight } = useWindowDimensions();
3804
+ const [rootHeight, setRootHeight] = useState(0);
3805
+ const screenHeight = rootHeight || windowHeight;
3806
+ const sheetHeight = Math.min(
3807
+ Math.round(screenHeight * SHEET_HEIGHT_FRACTION),
3808
+ screenHeight - insets.top - 8
3809
+ );
3637
3810
  const gutter = screenHeight - sheetHeight;
3638
3811
  const { translateY, panHandlers } = useDismissableSheet({ onClose, sheetHeight });
3639
3812
  const [pickerOpen, setPickerOpen] = useState(false);
@@ -3685,93 +3858,102 @@ function ThreadSheet({
3685
3858
  ),
3686
3859
  [rootMessage, meId, labelFor, avatarFor]
3687
3860
  );
3688
- return /* @__PURE__ */ jsxs(View, { style: styles18.modalRoot, children: [
3689
- /* @__PURE__ */ jsx(Pressable, { style: styles18.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
3690
- /* @__PURE__ */ jsxs(
3691
- Animated.View,
3692
- {
3693
- style: [
3694
- styles18.sheet,
3861
+ return /* @__PURE__ */ jsxs(
3862
+ View,
3863
+ {
3864
+ style: styles19.modalRoot,
3865
+ onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
3866
+ children: [
3867
+ /* @__PURE__ */ jsx(Pressable, { style: styles19.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
3868
+ /* @__PURE__ */ jsxs(
3869
+ Animated.View,
3695
3870
  {
3696
- height: sheetHeight,
3697
- backgroundColor: theme.colors.paper,
3698
- borderTopLeftRadius: theme.radii.xl,
3699
- borderTopRightRadius: theme.radii.xl,
3700
- transform: [{ translateY }]
3701
- },
3702
- theme.shadows.lg
3703
- ],
3704
- children: [
3705
- /* @__PURE__ */ jsxs(View, { ...panHandlers, children: [
3706
- /* @__PURE__ */ jsx(View, { style: styles18.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles18.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
3707
- /* @__PURE__ */ jsxs(View, { style: [styles18.header, { borderBottomColor: theme.colors.border }], children: [
3708
- /* @__PURE__ */ jsx(
3709
- Pressable,
3871
+ style: [
3872
+ styles19.sheet,
3873
+ {
3874
+ height: sheetHeight,
3875
+ backgroundColor: theme.colors.paper,
3876
+ borderTopLeftRadius: theme.radii.xl,
3877
+ borderTopRightRadius: theme.radii.xl,
3878
+ paddingLeft: insets.left,
3879
+ paddingRight: insets.right,
3880
+ transform: [{ translateY }]
3881
+ },
3882
+ theme.shadows.lg
3883
+ ],
3884
+ children: [
3885
+ /* @__PURE__ */ jsxs(View, { ...panHandlers, children: [
3886
+ /* @__PURE__ */ jsx(View, { style: styles19.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles19.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
3887
+ /* @__PURE__ */ jsxs(View, { style: [styles19.header, { borderBottomColor: theme.colors.border }], children: [
3888
+ /* @__PURE__ */ jsx(
3889
+ Pressable,
3890
+ {
3891
+ onPress: onClose,
3892
+ hitSlop: 16,
3893
+ style: [styles19.closeBtn, { backgroundColor: theme.colors.surface2 }],
3894
+ accessibilityLabel: "Close thread",
3895
+ children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
3896
+ }
3897
+ ),
3898
+ /* @__PURE__ */ jsx(
3899
+ Text,
3900
+ {
3901
+ style: [
3902
+ styles19.title,
3903
+ { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
3904
+ ],
3905
+ children: "Thread"
3906
+ }
3907
+ )
3908
+ ] })
3909
+ ] }),
3910
+ /* @__PURE__ */ jsxs(
3911
+ KeyboardAvoidingView,
3710
3912
  {
3711
- onPress: onClose,
3712
- hitSlop: 16,
3713
- style: [styles18.closeBtn, { backgroundColor: theme.colors.surface2 }],
3714
- accessibilityLabel: "Close thread",
3715
- children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
3913
+ style: styles19.kavBody,
3914
+ behavior: "padding",
3915
+ keyboardVerticalOffset: gutter,
3916
+ children: [
3917
+ /* @__PURE__ */ jsx(View, { style: [styles19.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
3918
+ /* @__PURE__ */ jsx(View, { style: styles19.listWrap, children: /* @__PURE__ */ jsx(
3919
+ MessageList,
3920
+ {
3921
+ messages: replies,
3922
+ hasMore,
3923
+ onLoadMore: loadMore,
3924
+ renderItem: renderReply
3925
+ }
3926
+ ) }),
3927
+ /* @__PURE__ */ jsx(
3928
+ MessageComposer,
3929
+ {
3930
+ onSend: async (body, opts) => {
3931
+ await sendReply({ body, ...opts });
3932
+ },
3933
+ placeholder: "Reply to thread\u2026",
3934
+ attachments: true,
3935
+ onAttachPress: () => setPickerOpen(true),
3936
+ editingMessage,
3937
+ onCancelEdit: () => setEditingId(null),
3938
+ onSaveEdit: async (body) => {
3939
+ if (!editingId) return;
3940
+ await edit(editingId, body);
3941
+ setEditingId(null);
3942
+ }
3943
+ }
3944
+ )
3945
+ ]
3716
3946
  }
3717
3947
  ),
3718
- /* @__PURE__ */ jsx(
3719
- Text,
3720
- {
3721
- style: [
3722
- styles18.title,
3723
- { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
3724
- ],
3725
- children: "Thread"
3726
- }
3727
- )
3728
- ] })
3729
- ] }),
3730
- /* @__PURE__ */ jsxs(
3731
- KeyboardAvoidingView,
3732
- {
3733
- style: styles18.kavBody,
3734
- behavior: Platform.OS === "ios" ? "padding" : "height",
3735
- keyboardVerticalOffset: Platform.OS === "ios" ? gutter : 0,
3736
- children: [
3737
- /* @__PURE__ */ jsx(View, { style: [styles18.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
3738
- /* @__PURE__ */ jsx(View, { style: styles18.listWrap, children: /* @__PURE__ */ jsx(
3739
- MessageList,
3740
- {
3741
- messages: replies,
3742
- hasMore,
3743
- onLoadMore: loadMore,
3744
- renderItem: renderReply
3745
- }
3746
- ) }),
3747
- /* @__PURE__ */ jsx(
3748
- MessageComposer,
3749
- {
3750
- onSend: async (body, opts) => {
3751
- await sendReply({ body, ...opts });
3752
- },
3753
- placeholder: "Reply to thread\u2026",
3754
- attachments: true,
3755
- onAttachPress: () => setPickerOpen(true),
3756
- editingMessage,
3757
- onCancelEdit: () => setEditingId(null),
3758
- onSaveEdit: async (body) => {
3759
- if (!editingId) return;
3760
- await edit(editingId, body);
3761
- setEditingId(null);
3762
- }
3763
- }
3764
- )
3765
- ]
3766
- }
3767
- ),
3768
- /* @__PURE__ */ jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
3769
- ]
3770
- }
3771
- )
3772
- ] });
3948
+ /* @__PURE__ */ jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
3949
+ ]
3950
+ }
3951
+ )
3952
+ ]
3953
+ }
3954
+ );
3773
3955
  }
3774
- var styles18 = StyleSheet.create({
3956
+ var styles19 = StyleSheet.create({
3775
3957
  modalRoot: {
3776
3958
  flex: 1,
3777
3959
  justifyContent: "flex-end"
@@ -3843,7 +4025,7 @@ function TypingIndicator({ typing, labelFor }) {
3843
4025
  const ids = Array.from(typing);
3844
4026
  const isTyping = ids.length > 0;
3845
4027
  if (!isTyping) return /* @__PURE__ */ jsx(View, { style: { height: 0 } });
3846
- return /* @__PURE__ */ jsxs(View, { style: styles19.row, children: [
4028
+ return /* @__PURE__ */ jsxs(View, { style: styles20.row, children: [
3847
4029
  /* @__PURE__ */ jsx(TypingDots, {}),
3848
4030
  /* @__PURE__ */ jsx(TypingLabel, { ids, ...labelFor ? { labelFor } : {} })
3849
4031
  ] });
@@ -3888,7 +4070,7 @@ function TypingDots() {
3888
4070
  ],
3889
4071
  opacity: val.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] })
3890
4072
  });
3891
- return /* @__PURE__ */ jsxs(View, { style: styles19.dotsWrap, children: [
4073
+ return /* @__PURE__ */ jsxs(View, { style: styles20.dotsWrap, children: [
3892
4074
  /* @__PURE__ */ jsx(Animated.View, { style: dot(a) }),
3893
4075
  /* @__PURE__ */ jsx(Animated.View, { style: dot(b) }),
3894
4076
  /* @__PURE__ */ jsx(Animated.View, { style: dot(c) })
@@ -3904,9 +4086,9 @@ function TypingLabel({
3904
4086
  const name1 = useDisplayName(id1, labelFor);
3905
4087
  const name2 = useDisplayName(id2, labelFor);
3906
4088
  const text = ids.length === 1 ? `${name1} is typing` : ids.length === 2 ? `${name1} and ${name2} are typing` : `${ids.length} people are typing`;
3907
- return /* @__PURE__ */ jsx(Text, { style: [styles19.label, { color: theme.colors.ink2, fontFamily: theme.type.fontBody }], children: text });
4089
+ return /* @__PURE__ */ jsx(Text, { style: [styles20.label, { color: theme.colors.ink2, fontFamily: theme.type.fontBody }], children: text });
3908
4090
  }
3909
- var styles19 = StyleSheet.create({
4091
+ var styles20 = StyleSheet.create({
3910
4092
  row: {
3911
4093
  flexDirection: "row",
3912
4094
  alignItems: "center",
@@ -4008,20 +4190,27 @@ function ConversationView({
4008
4190
  });
4009
4191
  onMarkedRead?.(conversationId, latest.id);
4010
4192
  }, [messages, meId, readReceipts, markReadUpTo, onMarkedRead, conversationId]);
4193
+ const visibleMessages = useMemo(
4194
+ () => messages.filter((m) => isMessageVisibleTo(m, meId)),
4195
+ [messages, meId]
4196
+ );
4011
4197
  const groupPositionById = useMemo(() => {
4012
4198
  const map = /* @__PURE__ */ new Map();
4013
- for (let i = 0; i < messages.length; i++) {
4014
- const msg = messages[i];
4199
+ for (let i = 0; i < visibleMessages.length; i++) {
4200
+ const msg = visibleMessages[i];
4015
4201
  if (!msg) continue;
4016
- const prev = i > 0 ? messages[i - 1] ?? null : null;
4017
- const next = i < messages.length - 1 ? messages[i + 1] ?? null : null;
4202
+ const prev = i > 0 ? visibleMessages[i - 1] ?? null : null;
4203
+ const next = i < visibleMessages.length - 1 ? visibleMessages[i + 1] ?? null : null;
4018
4204
  map.set(msg.id, computeGroupPosition(msg, prev, next, GROUPING_WINDOW_MS));
4019
4205
  }
4020
4206
  return map;
4021
- }, [messages]);
4207
+ }, [visibleMessages]);
4022
4208
  const renderItem = useCallback(
4023
4209
  (msg) => {
4024
- if (renderMessage) return /* @__PURE__ */ jsx(Fragment, { children: renderMessage(msg, meId) });
4210
+ if (renderMessage) {
4211
+ const custom = renderMessage(msg, meId);
4212
+ if (custom !== null && custom !== void 0) return custom;
4213
+ }
4025
4214
  const readState = readReceipts && meId !== null && msg.sender_id === meId ? readStateForMessage(msg, members, meId, sequenceByMessageId) : void 0;
4026
4215
  const isSelf = meId !== null && msg.sender_id === meId;
4027
4216
  const canEdit = isSelf && !msg.deleted_at && (readState ?? "sent") === "sent";
@@ -4081,7 +4270,7 @@ function ConversationView({
4081
4270
  const listItems = useMemo(() => {
4082
4271
  const out = [];
4083
4272
  let prev = null;
4084
- for (const msg of messages) {
4273
+ for (const msg of visibleMessages) {
4085
4274
  if (prev === null || !sameDay(msg.inserted_at, prev.inserted_at)) {
4086
4275
  const label = formatDayLabel(msg.inserted_at);
4087
4276
  out.push({
@@ -4094,7 +4283,7 @@ function ConversationView({
4094
4283
  prev = msg;
4095
4284
  }
4096
4285
  return out;
4097
- }, [messages]);
4286
+ }, [visibleMessages]);
4098
4287
  const composerProps = useMemo(
4099
4288
  () => ({
4100
4289
  onSend: async (body, opts) => {
@@ -4144,16 +4333,16 @@ function ConversationView({
4144
4333
  return /* @__PURE__ */ jsx(UploadProvider, { children: /* @__PURE__ */ jsxs(
4145
4334
  KeyboardAvoidingView,
4146
4335
  {
4147
- style: [styles20.root, { backgroundColor: theme.colors.paper }],
4336
+ style: [styles21.root, { backgroundColor: theme.colors.paper }],
4148
4337
  behavior: Platform.OS === "ios" ? "padding" : "height",
4149
4338
  keyboardVerticalOffset: keyboardOffset,
4150
4339
  children: [
4151
4340
  headerNode,
4152
- /* @__PURE__ */ jsxs(View, { style: styles20.listWrap, children: [
4341
+ /* @__PURE__ */ jsxs(View, { style: styles21.listWrap, children: [
4153
4342
  /* @__PURE__ */ jsx(
4154
4343
  MessageList,
4155
4344
  {
4156
- messages,
4345
+ messages: visibleMessages,
4157
4346
  items: listItems,
4158
4347
  meId,
4159
4348
  loading,
@@ -4167,7 +4356,7 @@ function ConversationView({
4167
4356
  editingId ? /* @__PURE__ */ jsx(
4168
4357
  Pressable,
4169
4358
  {
4170
- style: styles20.editBackdrop,
4359
+ style: styles21.editBackdrop,
4171
4360
  onPress: () => setEditingId(null),
4172
4361
  accessibilityLabel: "Cancel editing"
4173
4362
  }
@@ -4202,7 +4391,7 @@ function readStateForMessage(msg, members, meId, sequenceByMessageId) {
4202
4391
  });
4203
4392
  return anyRead ? "read" : "sent";
4204
4393
  }
4205
- var styles20 = StyleSheet.create({
4394
+ var styles21 = StyleSheet.create({
4206
4395
  root: {
4207
4396
  flex: 1
4208
4397
  },
@@ -4233,7 +4422,12 @@ function UserPickerSheet({
4233
4422
  const [query, setQuery] = useState("");
4234
4423
  const [selectedIds, setSelectedIds] = useState([]);
4235
4424
  const [groupName, setGroupName] = useState("");
4236
- const { height: screenHeight } = useWindowDimensions();
4425
+ const insets = useSafeInsets();
4426
+ const keyboardOpen = useKeyboardOpen();
4427
+ const { height: windowHeight } = useWindowDimensions();
4428
+ const [rootHeight, setRootHeight] = useState(0);
4429
+ const screenHeight = rootHeight || windowHeight;
4430
+ const sheetHeight = Math.min(Math.round(screenHeight * 0.85), screenHeight - insets.top - 8);
4237
4431
  const { translateY, panHandlers } = useDismissableSheet({
4238
4432
  onClose: () => {
4239
4433
  setQuery("");
@@ -4241,7 +4435,7 @@ function UserPickerSheet({
4241
4435
  setGroupName("");
4242
4436
  onClose();
4243
4437
  },
4244
- sheetHeight: screenHeight * 0.85
4438
+ sheetHeight
4245
4439
  });
4246
4440
  const excludeSet = useMemo(() => new Set(excludeIds ?? []), [excludeIds]);
4247
4441
  const filtered = useMemo(() => {
@@ -4283,142 +4477,164 @@ function UserPickerSheet({
4283
4477
  transparent: true,
4284
4478
  animationType: "slide",
4285
4479
  onRequestClose: handleClose,
4286
- statusBarTranslucent: true,
4287
- children: /* @__PURE__ */ jsxs(View, { style: styles21.modalRoot, children: [
4288
- /* @__PURE__ */ jsx(Pressable, { style: styles21.backdrop, onPress: handleClose }),
4289
- /* @__PURE__ */ jsxs(
4290
- Animated.View,
4291
- {
4292
- style: [
4293
- styles21.sheet,
4480
+ ...EDGE_TO_EDGE_MODAL,
4481
+ children: /* @__PURE__ */ jsxs(
4482
+ View,
4483
+ {
4484
+ style: styles22.modalRoot,
4485
+ onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
4486
+ children: [
4487
+ /* @__PURE__ */ jsx(Pressable, { style: styles22.backdrop, onPress: handleClose }),
4488
+ /* @__PURE__ */ jsx(
4489
+ Animated.View,
4294
4490
  {
4295
- backgroundColor: theme.colors.paper,
4296
- borderTopLeftRadius: theme.radii.xl,
4297
- borderTopRightRadius: theme.radii.xl,
4298
- transform: [{ translateY }]
4299
- },
4300
- theme.shadows.lg
4301
- ],
4302
- children: [
4303
- /* @__PURE__ */ jsx(View, { ...panHandlers, style: styles21.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles21.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
4304
- /* @__PURE__ */ jsxs(View, { style: styles21.header, children: [
4305
- /* @__PURE__ */ jsx(
4306
- Pressable,
4307
- {
4308
- onPress: handleClose,
4309
- hitSlop: 16,
4310
- style: [styles21.closeBtn, { backgroundColor: theme.colors.surface2 }],
4311
- accessibilityLabel: "Close picker",
4312
- children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
4313
- }
4314
- ),
4315
- /* @__PURE__ */ jsx(
4316
- Text,
4491
+ style: [
4492
+ styles22.sheet,
4317
4493
  {
4318
- style: [
4319
- styles21.title,
4320
- { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4321
- ],
4322
- numberOfLines: 1,
4323
- children: heading
4324
- }
4325
- ),
4326
- isGroup ? /* @__PURE__ */ jsx(
4327
- Pressable,
4494
+ backgroundColor: theme.colors.paper,
4495
+ borderTopLeftRadius: theme.radii.xl,
4496
+ borderTopRightRadius: theme.radii.xl,
4497
+ height: sheetHeight,
4498
+ // Last row clears the nav bar — unless the keyboard is
4499
+ // covering it, where the inset would just be a gap.
4500
+ paddingBottom: keyboardOpen ? 0 : insets.bottom,
4501
+ paddingLeft: insets.left,
4502
+ paddingRight: insets.right,
4503
+ transform: [{ translateY }]
4504
+ },
4505
+ theme.shadows.lg
4506
+ ],
4507
+ children: /* @__PURE__ */ jsxs(
4508
+ KeyboardAvoidingView,
4328
4509
  {
4329
- onPress: handleCreate,
4330
- disabled: !canCreate,
4331
- hitSlop: 6,
4332
- style: [
4333
- styles21.createBtn,
4334
- {
4335
- backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
4336
- opacity: canCreate ? 1 : 0.6
4337
- }
4338
- ],
4339
- children: /* @__PURE__ */ jsxs(
4340
- Text,
4341
- {
4342
- style: {
4343
- color: canCreate ? theme.colors.onBrand : theme.colors.ink3,
4344
- fontWeight: "700",
4345
- fontSize: 13
4346
- },
4347
- children: [
4348
- "Create",
4349
- selectedIds.length > 0 ? ` (${selectedIds.length})` : ""
4350
- ]
4351
- }
4352
- )
4353
- }
4354
- ) : null
4355
- ] }),
4356
- isGroup ? /* @__PURE__ */ jsx(
4357
- TextInput,
4358
- {
4359
- placeholder: "Group name",
4360
- placeholderTextColor: theme.colors.ink3,
4361
- value: groupName,
4362
- onChangeText: setGroupName,
4363
- style: [
4364
- styles21.groupNameInput,
4365
- {
4366
- color: theme.colors.ink,
4367
- backgroundColor: theme.colors.surface2,
4368
- borderRadius: theme.radii.md,
4369
- fontFamily: theme.type.fontBody,
4370
- fontSize: theme.type.bodySize
4371
- }
4372
- ]
4373
- }
4374
- ) : null,
4375
- showSearch ? /* @__PURE__ */ jsx(
4376
- TextInput,
4377
- {
4378
- placeholder: "Search\u2026",
4379
- placeholderTextColor: theme.colors.ink3,
4380
- value: query,
4381
- onChangeText: setQuery,
4382
- style: [
4383
- styles21.searchInput,
4384
- {
4385
- color: theme.colors.ink,
4386
- backgroundColor: theme.colors.surface2,
4387
- borderRadius: theme.radii.md,
4388
- fontFamily: theme.type.fontBody,
4389
- fontSize: 14
4390
- }
4391
- ]
4392
- }
4393
- ) : null,
4394
- /* @__PURE__ */ jsx(
4395
- FlatList,
4396
- {
4397
- data: filtered,
4398
- keyExtractor: (u) => u.externalId,
4399
- ListEmptyComponent: /* @__PURE__ */ jsx(View, { style: styles21.empty, children: /* @__PURE__ */ jsx(Text, { style: [styles21.emptyText, { color: theme.colors.ink3 }], children: query ? "No matches." : "No users to show." }) }),
4400
- renderItem: ({ item }) => /* @__PURE__ */ jsx(
4401
- UserRow,
4402
- {
4403
- user: item,
4404
- selected: selectedIds.includes(item.externalId),
4405
- isGroup,
4406
- onPress: () => {
4407
- if (isGroup) toggle(item.externalId);
4408
- else {
4409
- onPickDirect?.(item.externalId);
4410
- reset();
4411
- onClose();
4510
+ style: styles22.kav,
4511
+ behavior: "padding",
4512
+ keyboardVerticalOffset: screenHeight - sheetHeight,
4513
+ children: [
4514
+ /* @__PURE__ */ jsx(View, { ...panHandlers, style: styles22.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles22.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
4515
+ /* @__PURE__ */ jsxs(View, { style: styles22.header, children: [
4516
+ /* @__PURE__ */ jsx(
4517
+ Pressable,
4518
+ {
4519
+ onPress: handleClose,
4520
+ hitSlop: 16,
4521
+ style: [styles22.closeBtn, { backgroundColor: theme.colors.surface2 }],
4522
+ accessibilityLabel: "Close picker",
4523
+ children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
4524
+ }
4525
+ ),
4526
+ /* @__PURE__ */ jsx(
4527
+ Text,
4528
+ {
4529
+ style: [
4530
+ styles22.title,
4531
+ { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4532
+ ],
4533
+ numberOfLines: 1,
4534
+ children: heading
4535
+ }
4536
+ ),
4537
+ isGroup ? /* @__PURE__ */ jsx(
4538
+ Pressable,
4539
+ {
4540
+ onPress: handleCreate,
4541
+ disabled: !canCreate,
4542
+ hitSlop: 6,
4543
+ style: [
4544
+ styles22.createBtn,
4545
+ {
4546
+ backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
4547
+ opacity: canCreate ? 1 : 0.6
4548
+ }
4549
+ ],
4550
+ children: /* @__PURE__ */ jsxs(
4551
+ Text,
4552
+ {
4553
+ style: {
4554
+ color: canCreate ? theme.colors.onBrand : theme.colors.ink3,
4555
+ fontWeight: "700",
4556
+ fontSize: 13
4557
+ },
4558
+ children: [
4559
+ "Create",
4560
+ selectedIds.length > 0 ? ` (${selectedIds.length})` : ""
4561
+ ]
4562
+ }
4563
+ )
4564
+ }
4565
+ ) : null
4566
+ ] }),
4567
+ isGroup ? /* @__PURE__ */ jsx(
4568
+ TextInput,
4569
+ {
4570
+ placeholder: "Group name",
4571
+ placeholderTextColor: theme.colors.ink3,
4572
+ value: groupName,
4573
+ onChangeText: setGroupName,
4574
+ style: [
4575
+ styles22.groupNameInput,
4576
+ {
4577
+ color: theme.colors.ink,
4578
+ backgroundColor: theme.colors.surface2,
4579
+ borderRadius: theme.radii.md,
4580
+ fontFamily: theme.type.fontBody,
4581
+ fontSize: theme.type.bodySize
4582
+ }
4583
+ ]
4412
4584
  }
4413
- }
4414
- }
4415
- )
4416
- }
4417
- )
4418
- ]
4419
- }
4420
- )
4421
- ] })
4585
+ ) : null,
4586
+ showSearch ? /* @__PURE__ */ jsx(
4587
+ TextInput,
4588
+ {
4589
+ placeholder: "Search\u2026",
4590
+ placeholderTextColor: theme.colors.ink3,
4591
+ value: query,
4592
+ onChangeText: setQuery,
4593
+ style: [
4594
+ styles22.searchInput,
4595
+ {
4596
+ color: theme.colors.ink,
4597
+ backgroundColor: theme.colors.surface2,
4598
+ borderRadius: theme.radii.md,
4599
+ fontFamily: theme.type.fontBody,
4600
+ fontSize: 14
4601
+ }
4602
+ ]
4603
+ }
4604
+ ) : null,
4605
+ /* @__PURE__ */ jsx(
4606
+ FlatList,
4607
+ {
4608
+ data: filtered,
4609
+ keyExtractor: (u) => u.externalId,
4610
+ keyboardShouldPersistTaps: "handled",
4611
+ ListEmptyComponent: /* @__PURE__ */ jsx(View, { style: styles22.empty, children: /* @__PURE__ */ jsx(Text, { style: [styles22.emptyText, { color: theme.colors.ink3 }], children: query ? "No matches." : "No users to show." }) }),
4612
+ renderItem: ({ item }) => /* @__PURE__ */ jsx(
4613
+ UserRow,
4614
+ {
4615
+ user: item,
4616
+ selected: selectedIds.includes(item.externalId),
4617
+ isGroup,
4618
+ onPress: () => {
4619
+ if (isGroup) toggle(item.externalId);
4620
+ else {
4621
+ onPickDirect?.(item.externalId);
4622
+ reset();
4623
+ onClose();
4624
+ }
4625
+ }
4626
+ }
4627
+ )
4628
+ }
4629
+ )
4630
+ ]
4631
+ }
4632
+ )
4633
+ }
4634
+ )
4635
+ ]
4636
+ }
4637
+ )
4422
4638
  }
4423
4639
  );
4424
4640
  }
@@ -4434,29 +4650,29 @@ function UserRow({
4434
4650
  {
4435
4651
  onPress,
4436
4652
  style: [
4437
- styles21.row,
4653
+ styles22.row,
4438
4654
  {
4439
4655
  backgroundColor: selected ? theme.colors.brandSoft : "transparent"
4440
4656
  }
4441
4657
  ],
4442
4658
  children: [
4443
- user.avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: user.avatarUrl }, style: styles21.avatarImg }) : /* @__PURE__ */ jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
4444
- /* @__PURE__ */ jsxs(View, { style: styles21.body, children: [
4659
+ user.avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: user.avatarUrl }, style: styles22.avatarImg }) : /* @__PURE__ */ jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
4660
+ /* @__PURE__ */ jsxs(View, { style: styles22.body, children: [
4445
4661
  /* @__PURE__ */ jsx(
4446
4662
  Text,
4447
4663
  {
4448
- style: [styles21.name, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
4664
+ style: [styles22.name, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
4449
4665
  numberOfLines: 1,
4450
4666
  children: user.name
4451
4667
  }
4452
4668
  ),
4453
- user.subtitle ? /* @__PURE__ */ jsx(Text, { style: [styles21.subtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: user.subtitle }) : null
4669
+ user.subtitle ? /* @__PURE__ */ jsx(Text, { style: [styles22.subtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: user.subtitle }) : null
4454
4670
  ] }),
4455
4671
  isGroup ? /* @__PURE__ */ jsx(
4456
4672
  View,
4457
4673
  {
4458
4674
  style: [
4459
- styles21.checkbox,
4675
+ styles22.checkbox,
4460
4676
  {
4461
4677
  borderColor: selected ? theme.colors.brand : theme.colors.border,
4462
4678
  backgroundColor: selected ? theme.colors.brand : "transparent"
@@ -4469,7 +4685,7 @@ function UserRow({
4469
4685
  }
4470
4686
  );
4471
4687
  }
4472
- var styles21 = StyleSheet.create({
4688
+ var styles22 = StyleSheet.create({
4473
4689
  modalRoot: {
4474
4690
  flex: 1,
4475
4691
  justifyContent: "flex-end"
@@ -4479,9 +4695,11 @@ var styles21 = StyleSheet.create({
4479
4695
  backgroundColor: "rgba(0,0,0,0.4)"
4480
4696
  },
4481
4697
  sheet: {
4482
- height: "85%",
4483
4698
  overflow: "hidden"
4484
4699
  },
4700
+ kav: {
4701
+ flex: 1
4702
+ },
4485
4703
  dragHandle: {
4486
4704
  alignItems: "center",
4487
4705
  paddingTop: 8,
@@ -4594,6 +4812,7 @@ var PoolseInbox = forwardRef(
4594
4812
  refetch: refetchConversations
4595
4813
  } = useConversations();
4596
4814
  const meExternalId = me?.external_id ?? null;
4815
+ const meId = me?.id ?? null;
4597
4816
  const detailKeyboardOffset = CHAT_HEADER_HEIGHT;
4598
4817
  const [activeId, setActiveId] = useState(null);
4599
4818
  const [userPickerOpen, setUserPickerOpen] = useState(false);
@@ -4720,6 +4939,7 @@ var PoolseInbox = forwardRef(
4720
4939
  conv,
4721
4940
  selected,
4722
4941
  meExternalId,
4942
+ meId,
4723
4943
  unread,
4724
4944
  ...labelFor ? { labelFor } : {},
4725
4945
  ...avatarFor ? { avatarFor } : {},
@@ -4727,9 +4947,9 @@ var PoolseInbox = forwardRef(
4727
4947
  }
4728
4948
  );
4729
4949
  },
4730
- [renderConversationRow, meExternalId, labelFor, avatarFor, unreadCounts]
4950
+ [renderConversationRow, meExternalId, meId, labelFor, avatarFor, unreadCounts]
4731
4951
  );
4732
- return /* @__PURE__ */ jsxs(View, { style: [styles22.root, { backgroundColor: theme.colors.paper }], children: [
4952
+ return /* @__PURE__ */ jsxs(View, { style: [styles23.root, { backgroundColor: theme.colors.paper }], children: [
4733
4953
  /* @__PURE__ */ jsxs(
4734
4954
  Animated.View,
4735
4955
  {
@@ -4740,7 +4960,7 @@ var PoolseInbox = forwardRef(
4740
4960
  View,
4741
4961
  {
4742
4962
  style: [
4743
- styles22.listHeader,
4963
+ styles23.listHeader,
4744
4964
  {
4745
4965
  backgroundColor: theme.colors.surface,
4746
4966
  borderBottomColor: theme.colors.border
@@ -4751,13 +4971,13 @@ var PoolseInbox = forwardRef(
4751
4971
  Text,
4752
4972
  {
4753
4973
  style: [
4754
- styles22.listTitle,
4974
+ styles23.listTitle,
4755
4975
  { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4756
4976
  ],
4757
4977
  children: title
4758
4978
  }
4759
4979
  ),
4760
- /* @__PURE__ */ jsxs(View, { style: styles22.headerActions, children: [
4980
+ /* @__PURE__ */ jsxs(View, { style: styles23.headerActions, children: [
4761
4981
  users ? /* @__PURE__ */ jsxs(Fragment, { children: [
4762
4982
  /* @__PURE__ */ jsx(
4763
4983
  HeaderIconButton,
@@ -4870,7 +5090,7 @@ function HeaderIconButton({
4870
5090
  hitSlop: 10,
4871
5091
  accessibilityLabel: label,
4872
5092
  style: ({ pressed }) => [
4873
- styles22.iconBtn,
5093
+ styles23.iconBtn,
4874
5094
  {
4875
5095
  backgroundColor: pressed ? theme.colors.surface2 : "transparent"
4876
5096
  }
@@ -4883,6 +5103,7 @@ function DefaultConversationRow({
4883
5103
  conv,
4884
5104
  selected,
4885
5105
  meExternalId,
5106
+ meId = null,
4886
5107
  unread,
4887
5108
  labelFor,
4888
5109
  avatarFor,
@@ -4900,31 +5121,31 @@ function DefaultConversationRow({
4900
5121
  {
4901
5122
  onPress,
4902
5123
  style: [
4903
- styles22.row,
5124
+ styles23.row,
4904
5125
  {
4905
5126
  backgroundColor: selected ? theme.colors.surface2 : "transparent",
4906
5127
  borderBottomColor: theme.colors.border
4907
5128
  }
4908
5129
  ],
4909
5130
  children: [
4910
- avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: avatarUrl }, style: styles22.rowAvatar }) : /* @__PURE__ */ jsx(Avatar, { src: null, name: title, seed: avatarSeed, size: "md" }),
4911
- /* @__PURE__ */ jsxs(View, { style: styles22.rowBody, children: [
5131
+ avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: avatarUrl }, style: styles23.rowAvatar }) : /* @__PURE__ */ jsx(Avatar, { src: null, name: title, seed: avatarSeed, size: "md" }),
5132
+ /* @__PURE__ */ jsxs(View, { style: styles23.rowBody, children: [
4912
5133
  /* @__PURE__ */ jsx(
4913
5134
  Text,
4914
5135
  {
4915
- style: [styles22.rowTitle, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
5136
+ style: [styles23.rowTitle, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
4916
5137
  numberOfLines: 1,
4917
5138
  children: title
4918
5139
  }
4919
5140
  ),
4920
- /* @__PURE__ */ jsx(Text, { style: [styles22.rowSubtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
5141
+ /* @__PURE__ */ jsx(Text, { style: [styles23.rowSubtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
4921
5142
  ] }),
4922
- unread > 0 ? /* @__PURE__ */ jsx(View, { style: [styles22.unreadPill, { backgroundColor: theme.colors.unreadPill }], children: /* @__PURE__ */ jsx(Text, { style: [styles22.unreadText, { color: theme.colors.unreadPillText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
5143
+ unread > 0 ? /* @__PURE__ */ jsx(View, { style: [styles23.unreadPill, { backgroundColor: theme.colors.unreadPill }], children: /* @__PURE__ */ jsx(Text, { style: [styles23.unreadText, { color: theme.colors.unreadPillText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
4923
5144
  ]
4924
5145
  }
4925
5146
  );
4926
5147
  }
4927
- var styles22 = StyleSheet.create({
5148
+ var styles23 = StyleSheet.create({
4928
5149
  root: {
4929
5150
  flex: 1,
4930
5151
  overflow: "hidden"
@@ -5128,10 +5349,10 @@ function VoiceRoomBar({
5128
5349
  View,
5129
5350
  {
5130
5351
  style: [
5131
- styles23.bar,
5352
+ styles24.bar,
5132
5353
  { backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
5133
5354
  ],
5134
- children: unavailableSlot ?? /* @__PURE__ */ jsx(Text, { style: [styles23.hint, { color: theme.colors.ink3 }], children: "Voice needs react-native-webrtc and a development build." })
5355
+ children: unavailableSlot ?? /* @__PURE__ */ jsx(Text, { style: [styles24.hint, { color: theme.colors.ink3 }], children: "Voice needs react-native-webrtc and a development build." })
5135
5356
  }
5136
5357
  );
5137
5358
  }
@@ -5139,22 +5360,22 @@ function VoiceRoomBar({
5139
5360
  View,
5140
5361
  {
5141
5362
  style: [
5142
- styles23.bar,
5363
+ styles24.bar,
5143
5364
  { backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
5144
5365
  ],
5145
5366
  children: [
5146
- /* @__PURE__ */ jsxs(View, { style: styles23.row, children: [
5367
+ /* @__PURE__ */ jsxs(View, { style: styles24.row, children: [
5147
5368
  /* @__PURE__ */ jsx(
5148
5369
  View,
5149
5370
  {
5150
5371
  style: [
5151
- styles23.dot,
5372
+ styles24.dot,
5152
5373
  { backgroundColor: connected ? theme.colors.brand : theme.colors.ink3 }
5153
5374
  ]
5154
5375
  }
5155
5376
  ),
5156
5377
  connected ? /* @__PURE__ */ jsxs(Fragment, { children: [
5157
- /* @__PURE__ */ jsx(View, { style: styles23.people, children: participants.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles23.hint, { color: theme.colors.ink3 }], children: "Waiting for others\u2026" }) : participants.map((p) => /* @__PURE__ */ jsx(ParticipantChip, { participant: p, label: label(p.userId) }, p.userId)) }),
5378
+ /* @__PURE__ */ jsx(View, { style: styles24.people, children: participants.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles24.hint, { color: theme.colors.ink3 }], children: "Waiting for others\u2026" }) : participants.map((p) => /* @__PURE__ */ jsx(ParticipantChip, { participant: p, label: label(p.userId) }, p.userId)) }),
5158
5379
  /* @__PURE__ */ jsx(
5159
5380
  Pressable,
5160
5381
  {
@@ -5162,7 +5383,7 @@ function VoiceRoomBar({
5162
5383
  accessibilityRole: "button",
5163
5384
  accessibilityState: { selected: muted },
5164
5385
  style: [
5165
- styles23.btn,
5386
+ styles24.btn,
5166
5387
  {
5167
5388
  borderColor: muted ? theme.colors.brand : theme.colors.border,
5168
5389
  backgroundColor: muted ? theme.colors.brandSoft : theme.colors.paper
@@ -5176,25 +5397,25 @@ function VoiceRoomBar({
5176
5397
  {
5177
5398
  onPress: leave,
5178
5399
  accessibilityRole: "button",
5179
- style: [styles23.btn, { borderColor: theme.colors.error }],
5400
+ style: [styles24.btn, { borderColor: theme.colors.error }],
5180
5401
  children: /* @__PURE__ */ jsx(Text, { style: { color: theme.colors.error }, children: "Leave" })
5181
5402
  }
5182
5403
  )
5183
5404
  ] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
5184
- /* @__PURE__ */ jsx(Text, { style: [styles23.hint, { color: theme.colors.ink3 }], children: status === "connecting" ? "Connecting\u2026" : "Talk to everyone here" }),
5405
+ /* @__PURE__ */ jsx(Text, { style: [styles24.hint, { color: theme.colors.ink3 }], children: status === "connecting" ? "Connecting\u2026" : "Talk to everyone here" }),
5185
5406
  /* @__PURE__ */ jsx(
5186
5407
  Pressable,
5187
5408
  {
5188
5409
  onPress: () => void join(),
5189
5410
  disabled: status === "connecting",
5190
5411
  accessibilityRole: "button",
5191
- style: [styles23.btn, styles23.btnPrimary, { backgroundColor: theme.colors.brand }],
5412
+ style: [styles24.btn, styles24.btnPrimary, { backgroundColor: theme.colors.brand }],
5192
5413
  children: /* @__PURE__ */ jsx(Text, { style: { color: theme.colors.onBrand, fontWeight: "600" }, children: status === "connecting" ? "Joining\u2026" : "Join Voice" })
5193
5414
  }
5194
5415
  )
5195
5416
  ] })
5196
5417
  ] }),
5197
- error && /* @__PURE__ */ jsx(Text, { style: [styles23.error, { color: theme.colors.error }], children: error.message })
5418
+ error && /* @__PURE__ */ jsx(Text, { style: [styles24.error, { color: theme.colors.error }], children: error.message })
5198
5419
  ]
5199
5420
  }
5200
5421
  );
@@ -5205,7 +5426,7 @@ function ParticipantChip({ participant, label }) {
5205
5426
  View,
5206
5427
  {
5207
5428
  style: [
5208
- styles23.chip,
5429
+ styles24.chip,
5209
5430
  {
5210
5431
  backgroundColor: theme.colors.paper,
5211
5432
  // The speaking ring is a border colour swap rather than an
@@ -5224,7 +5445,7 @@ function ParticipantChip({ participant, label }) {
5224
5445
  }
5225
5446
  );
5226
5447
  }
5227
- var styles23 = StyleSheet.create({
5448
+ var styles24 = StyleSheet.create({
5228
5449
  bar: { paddingHorizontal: 14, paddingVertical: 8, borderBottomWidth: StyleSheet.hairlineWidth },
5229
5450
  row: { flexDirection: "row", alignItems: "center", gap: 8, flexWrap: "wrap" },
5230
5451
  dot: { width: 8, height: 8, borderRadius: 4 },
@@ -5293,42 +5514,60 @@ function AudioRouteSheet({
5293
5514
  onSelect,
5294
5515
  onClose
5295
5516
  }) {
5296
- return /* @__PURE__ */ jsx(Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsx(Pressable, { style: styles24.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxs(Pressable, { style: styles24.sheet, onPress: () => {
5297
- }, children: [
5298
- /* @__PURE__ */ jsx(View, { style: styles24.grabber }),
5299
- /* @__PURE__ */ jsx(Text, { style: styles24.title, children: "Audio output" }),
5300
- routes.map((route) => {
5301
- const selected = route.id === selectedRouteId;
5302
- return /* @__PURE__ */ jsxs(
5517
+ const insets = useSafeInsets();
5518
+ return /* @__PURE__ */ jsx(
5519
+ Modal,
5520
+ {
5521
+ visible,
5522
+ transparent: true,
5523
+ animationType: "fade",
5524
+ onRequestClose: onClose,
5525
+ ...EDGE_TO_EDGE_MODAL,
5526
+ children: /* @__PURE__ */ jsx(Pressable, { style: styles25.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxs(
5303
5527
  Pressable,
5304
5528
  {
5529
+ style: [styles25.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
5305
5530
  onPress: () => {
5306
- onSelect(route.id);
5307
- onClose();
5308
5531
  },
5309
- accessibilityRole: "button",
5310
- accessibilityState: { selected },
5311
- style: ({ pressed }) => [styles24.row, pressed && styles24.rowPressed],
5312
5532
  children: [
5313
- /* @__PURE__ */ jsx(
5314
- PoolseIcon,
5315
- {
5316
- name: ICONS2[route.kind],
5317
- size: 21,
5318
- color: selected ? callColors.accept : callColors.text,
5319
- label: null
5320
- }
5321
- ),
5322
- /* @__PURE__ */ jsx(Text, { style: [styles24.label, selected && styles24.labelSelected], children: route.label }),
5323
- selected && /* @__PURE__ */ jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
5533
+ /* @__PURE__ */ jsx(View, { style: styles25.grabber }),
5534
+ /* @__PURE__ */ jsx(Text, { style: styles25.title, children: "Audio output" }),
5535
+ routes.map((route) => {
5536
+ const selected = route.id === selectedRouteId;
5537
+ return /* @__PURE__ */ jsxs(
5538
+ Pressable,
5539
+ {
5540
+ onPress: () => {
5541
+ onSelect(route.id);
5542
+ onClose();
5543
+ },
5544
+ accessibilityRole: "button",
5545
+ accessibilityState: { selected },
5546
+ style: ({ pressed }) => [styles25.row, pressed && styles25.rowPressed],
5547
+ children: [
5548
+ /* @__PURE__ */ jsx(
5549
+ PoolseIcon,
5550
+ {
5551
+ name: ICONS2[route.kind],
5552
+ size: 21,
5553
+ color: selected ? callColors.accept : callColors.text,
5554
+ label: null
5555
+ }
5556
+ ),
5557
+ /* @__PURE__ */ jsx(Text, { style: [styles25.label, selected && styles25.labelSelected], children: route.label }),
5558
+ selected && /* @__PURE__ */ jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
5559
+ ]
5560
+ },
5561
+ route.id
5562
+ );
5563
+ })
5324
5564
  ]
5325
- },
5326
- route.id
5327
- );
5328
- })
5329
- ] }) }) });
5565
+ }
5566
+ ) })
5567
+ }
5568
+ );
5330
5569
  }
5331
- var styles24 = StyleSheet.create({
5570
+ var styles25 = StyleSheet.create({
5332
5571
  backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
5333
5572
  sheet: {
5334
5573
  backgroundColor: callColors.tile,
@@ -5336,7 +5575,6 @@ var styles24 = StyleSheet.create({
5336
5575
  borderTopRightRadius: 22,
5337
5576
  paddingHorizontal: 12,
5338
5577
  paddingTop: 10,
5339
- paddingBottom: 34,
5340
5578
  gap: 2
5341
5579
  },
5342
5580
  grabber: {
@@ -5410,11 +5648,11 @@ function PulseRings({ size, color }) {
5410
5648
  });
5411
5649
  return () => loops.forEach((l) => l.stop());
5412
5650
  }, []);
5413
- return /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, styles25.center], pointerEvents: "none", children: phases.map((p, i) => /* @__PURE__ */ jsx(
5651
+ return /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, styles26.center], pointerEvents: "none", children: phases.map((p, i) => /* @__PURE__ */ jsx(
5414
5652
  Animated.View,
5415
5653
  {
5416
5654
  style: [
5417
- styles25.ring,
5655
+ styles26.ring,
5418
5656
  {
5419
5657
  width: size,
5420
5658
  height: size,
@@ -5435,7 +5673,7 @@ function PulseRings({ size, color }) {
5435
5673
  i
5436
5674
  )) });
5437
5675
  }
5438
- var styles25 = StyleSheet.create({
5676
+ var styles26 = StyleSheet.create({
5439
5677
  center: { alignItems: "center", justifyContent: "center" },
5440
5678
  ring: { position: "absolute", borderWidth: 1.5 }
5441
5679
  });
@@ -5446,7 +5684,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
5446
5684
  View,
5447
5685
  {
5448
5686
  style: [
5449
- styles26.ring,
5687
+ styles27.ring,
5450
5688
  {
5451
5689
  width: outer,
5452
5690
  height: outer,
@@ -5459,7 +5697,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
5459
5697
  View,
5460
5698
  {
5461
5699
  style: [
5462
- styles26.circle,
5700
+ styles27.circle,
5463
5701
  {
5464
5702
  width: size,
5465
5703
  height: size,
@@ -5470,7 +5708,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
5470
5708
  children: /* @__PURE__ */ jsx(
5471
5709
  Text,
5472
5710
  {
5473
- style: [styles26.initials, { fontSize: Math.round(size * 0.38) }],
5711
+ style: [styles27.initials, { fontSize: Math.round(size * 0.38) }],
5474
5712
  numberOfLines: 1,
5475
5713
  allowFontScaling: false,
5476
5714
  children: initialsOf(name)
@@ -5487,7 +5725,7 @@ function initialsOf(name) {
5487
5725
  if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
5488
5726
  return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
5489
5727
  }
5490
- var styles26 = StyleSheet.create({
5728
+ var styles27 = StyleSheet.create({
5491
5729
  ring: { alignItems: "center", justifyContent: "center" },
5492
5730
  circle: { alignItems: "center", justifyContent: "center" },
5493
5731
  initials: { color: "#ffffff", fontWeight: "600" }
@@ -5505,7 +5743,7 @@ function CallControlButton({
5505
5743
  const size = large ? CONTROL_SIZE_LARGE : CONTROL_SIZE;
5506
5744
  const background = tone === "danger" ? callColors.danger : tone === "accept" ? callColors.accept : active ? callColors.controlActive : callColors.control;
5507
5745
  const iconColor = tone === "neutral" && active ? callColors.controlActiveIcon : callColors.onAction;
5508
- return /* @__PURE__ */ jsxs(View, { style: styles27.slot, children: [
5746
+ return /* @__PURE__ */ jsxs(View, { style: styles28.slot, children: [
5509
5747
  /* @__PURE__ */ jsx(
5510
5748
  Pressable,
5511
5749
  {
@@ -5516,7 +5754,7 @@ function CallControlButton({
5516
5754
  accessibilityLabel: accessibilityLabel ?? label ?? icon,
5517
5755
  hitSlop: 8,
5518
5756
  style: ({ pressed }) => [
5519
- styles27.button,
5757
+ styles28.button,
5520
5758
  {
5521
5759
  width: size,
5522
5760
  height: size,
@@ -5530,10 +5768,10 @@ function CallControlButton({
5530
5768
  children: /* @__PURE__ */ jsx(PoolseIcon, { name: icon, size: large ? 30 : 25, color: iconColor, label: null })
5531
5769
  }
5532
5770
  ),
5533
- label ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles27.label, children: label }) : null
5771
+ label ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles28.label, children: label }) : null
5534
5772
  ] });
5535
5773
  }
5536
- var styles27 = StyleSheet.create({
5774
+ var styles28 = StyleSheet.create({
5537
5775
  // Fixed width so captions of different lengths cannot shift the row.
5538
5776
  slot: { width: 76, alignItems: "center", gap: 7 },
5539
5777
  button: { alignItems: "center", justifyContent: "center" },
@@ -5554,8 +5792,8 @@ function CallParticipantTile({
5554
5792
  View,
5555
5793
  {
5556
5794
  style: [
5557
- styles28.tile,
5558
- bleed ? styles28.bleed : styles28.rounded,
5795
+ styles29.tile,
5796
+ bleed ? styles29.bleed : styles29.rounded,
5559
5797
  {
5560
5798
  backgroundColor: callColors.tile,
5561
5799
  // A ring rather than a badge: it reads at a glance across a
@@ -5574,7 +5812,7 @@ function CallParticipantTile({
5574
5812
  mirror: participant.isSelf,
5575
5813
  zOrder: participant.isSelf ? 1 : 0
5576
5814
  }
5577
- ) : /* @__PURE__ */ jsx(View, { style: styles28.placeholder, children: /* @__PURE__ */ jsx(
5815
+ ) : /* @__PURE__ */ jsx(View, { style: styles29.placeholder, children: /* @__PURE__ */ jsx(
5578
5816
  CallAvatar,
5579
5817
  {
5580
5818
  name,
@@ -5583,17 +5821,17 @@ function CallParticipantTile({
5583
5821
  speaking: participant.speaking
5584
5822
  }
5585
5823
  ) }),
5586
- !hideName && /* @__PURE__ */ jsxs(View, { style: [styles28.chip, bleed ? styles28.chipBleed : styles28.chipTile], children: [
5824
+ !hideName && /* @__PURE__ */ jsxs(View, { style: [styles29.chip, bleed ? styles29.chipBleed : styles29.chipTile], children: [
5587
5825
  !participant.micEnabled && // Worth showing even for yourself — it is the answer to
5588
5826
  // "why can nobody hear me".
5589
5827
  /* @__PURE__ */ jsx(PoolseIcon, { name: "mic-off", size: 13, color: callColors.text, label: "muted" }),
5590
- /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles28.name, children: name })
5828
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles29.name, children: name })
5591
5829
  ] })
5592
5830
  ]
5593
5831
  }
5594
5832
  );
5595
5833
  }
5596
- var styles28 = StyleSheet.create({
5834
+ var styles29 = StyleSheet.create({
5597
5835
  tile: { overflow: "hidden", justifyContent: "flex-end", borderWidth: 2 },
5598
5836
  rounded: { borderRadius: 18 },
5599
5837
  bleed: { borderRadius: 0, borderWidth: 0 },
@@ -5691,7 +5929,7 @@ function LocalVideoPip({
5691
5929
  Animated.View,
5692
5930
  {
5693
5931
  ...responder.panHandlers,
5694
- style: [styles29.pip, { transform: pan.getTranslateTransform() }],
5932
+ style: [styles30.pip, { transform: pan.getTranslateTransform() }],
5695
5933
  children: /* @__PURE__ */ jsx(
5696
5934
  Pressable,
5697
5935
  {
@@ -5701,8 +5939,8 @@ function LocalVideoPip({
5701
5939
  },
5702
5940
  accessibilityRole: "button",
5703
5941
  accessibilityLabel: "Your camera. Drag to move, tap to switch camera.",
5704
- style: styles29.fill,
5705
- children: /* @__PURE__ */ jsx(View, { style: styles29.fill, children: /* @__PURE__ */ jsx(
5942
+ style: styles30.fill,
5943
+ children: /* @__PURE__ */ jsx(View, { style: styles30.fill, children: /* @__PURE__ */ jsx(
5706
5944
  CallParticipantTile,
5707
5945
  {
5708
5946
  participant,
@@ -5711,7 +5949,7 @@ function LocalVideoPip({
5711
5949
  avatarSize: 48,
5712
5950
  hideName: true,
5713
5951
  bleed: true,
5714
- style: styles29.fill
5952
+ style: styles30.fill
5715
5953
  }
5716
5954
  ) })
5717
5955
  }
@@ -5719,7 +5957,7 @@ function LocalVideoPip({
5719
5957
  }
5720
5958
  );
5721
5959
  }
5722
- var styles29 = StyleSheet.create({
5960
+ var styles30 = StyleSheet.create({
5723
5961
  pip: {
5724
5962
  position: "absolute",
5725
5963
  top: 0,
@@ -5768,11 +6006,11 @@ function CallVideoGrid({
5768
6006
  const availableHeight = size.height > 0 ? size.height - padTop - padBottom : 0;
5769
6007
  const tileHeight = availableHeight > 0 ? (availableHeight - GAP * (rows - 1)) / rows : 0;
5770
6008
  const scrolls = tileHeight > 0 && tileHeight < MIN_TILE_HEIGHT;
5771
- if (participants.length === 0) return /* @__PURE__ */ jsx(View, { style: styles30.stage, onLayout });
6009
+ if (participants.length === 0) return /* @__PURE__ */ jsx(View, { style: styles31.stage, onLayout });
5772
6010
  if (others.length <= 1) {
5773
6011
  const spotlight = others[0] ?? self;
5774
- if (!spotlight) return /* @__PURE__ */ jsx(View, { style: styles30.stage, onLayout });
5775
- return /* @__PURE__ */ jsxs(View, { style: styles30.stage, onLayout, children: [
6012
+ if (!spotlight) return /* @__PURE__ */ jsx(View, { style: styles31.stage, onLayout });
6013
+ return /* @__PURE__ */ jsxs(View, { style: styles31.stage, onLayout, children: [
5776
6014
  /* @__PURE__ */ jsx(
5777
6015
  CallParticipantTile,
5778
6016
  {
@@ -5782,7 +6020,7 @@ function CallVideoGrid({
5782
6020
  avatarSize: Math.min(148, Math.max(96, Math.round(size.width * 0.36))),
5783
6021
  bleed: true,
5784
6022
  hideName: others.length === 1,
5785
- style: styles30.fill
6023
+ style: styles31.fill
5786
6024
  }
5787
6025
  ),
5788
6026
  self && others.length === 1 && size.width > 0 && /* @__PURE__ */ jsx(
@@ -5800,7 +6038,7 @@ function CallVideoGrid({
5800
6038
  }
5801
6039
  const tiles = [...others, ...self ? [self] : []];
5802
6040
  const width = size.width > 0 ? (size.width - GAP * (columns - 1)) / columns : 0;
5803
- const grid = /* @__PURE__ */ jsx(View, { style: [styles30.grid, scrolls ? styles30.gridScrolling : styles30.gridFilling], children: tiles.map((participant) => /* @__PURE__ */ jsx(
6041
+ const grid = /* @__PURE__ */ jsx(View, { style: [styles31.grid, scrolls ? styles31.gridScrolling : styles31.gridFilling], children: tiles.map((participant) => /* @__PURE__ */ jsx(
5804
6042
  CallParticipantTile,
5805
6043
  {
5806
6044
  participant,
@@ -5817,13 +6055,13 @@ function CallVideoGrid({
5817
6055
  return /* @__PURE__ */ jsx(
5818
6056
  View,
5819
6057
  {
5820
- style: [styles30.stage, { paddingTop: padTop, paddingBottom: padBottom }],
6058
+ style: [styles31.stage, { paddingTop: padTop, paddingBottom: padBottom }],
5821
6059
  onLayout,
5822
6060
  children: scrolls ? /* @__PURE__ */ jsx(
5823
6061
  ScrollView,
5824
6062
  {
5825
6063
  contentContainerStyle: [
5826
- styles30.scroll,
6064
+ styles31.scroll,
5827
6065
  { paddingBottom: (chromeInsets?.bottom ?? 0) + GAP }
5828
6066
  ],
5829
6067
  showsVerticalScrollIndicator: false,
@@ -5833,7 +6071,7 @@ function CallVideoGrid({
5833
6071
  }
5834
6072
  );
5835
6073
  }
5836
- var styles30 = StyleSheet.create({
6074
+ var styles31 = StyleSheet.create({
5837
6075
  stage: { flex: 1, overflow: "hidden" },
5838
6076
  fill: { ...StyleSheet.absoluteFillObject },
5839
6077
  grid: { flexDirection: "row", flexWrap: "wrap", gap: GAP },
@@ -6192,7 +6430,7 @@ function CallScreen({
6192
6430
  /* @__PURE__ */ jsx(StatusBar, { barStyle: "light-content" }),
6193
6431
  /* @__PURE__ */ jsxs(SafeAreaProvider, { children: [
6194
6432
  /* @__PURE__ */ jsx(InsetsProbe, { onChange: setInsets }),
6195
- /* @__PURE__ */ jsxs(Pressable, { style: styles31.screen, onPress: toggleChrome, accessible: false, children: [
6433
+ /* @__PURE__ */ jsxs(Pressable, { style: styles32.screen, onPress: toggleChrome, accessible: false, children: [
6196
6434
  /* @__PURE__ */ jsx(CallBackdrop, {}),
6197
6435
  showStage ? /* @__PURE__ */ jsx(
6198
6436
  CallVideoGrid,
@@ -6211,10 +6449,10 @@ function CallScreen({
6211
6449
  /* @__PURE__ */ jsxs(
6212
6450
  View,
6213
6451
  {
6214
- style: [styles31.identity, { paddingBottom: insets.bottom + 160 }],
6452
+ style: [styles32.identity, { paddingBottom: insets.bottom + 160 }],
6215
6453
  pointerEvents: "none",
6216
6454
  children: [
6217
- /* @__PURE__ */ jsxs(View, { style: styles31.avatarStage, children: [
6455
+ /* @__PURE__ */ jsxs(View, { style: styles32.avatarStage, children: [
6218
6456
  (ringingIn || ringingOut) && /* @__PURE__ */ jsx(PulseRings, { size: 132, color: callColors.glow }),
6219
6457
  /* @__PURE__ */ jsx(
6220
6458
  CallAvatar,
@@ -6225,31 +6463,31 @@ function CallScreen({
6225
6463
  }
6226
6464
  )
6227
6465
  ] }),
6228
- /* @__PURE__ */ jsx(Text, { numberOfLines: 2, style: styles31.identityTitle, children: title }),
6229
- /* @__PURE__ */ jsxs(View, { style: styles31.statusPill, children: [
6230
- connected && /* @__PURE__ */ jsx(View, { style: styles31.statusDot }),
6231
- /* @__PURE__ */ jsx(Text, { style: styles31.statusText, children: subtitle })
6466
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 2, style: styles32.identityTitle, children: title }),
6467
+ /* @__PURE__ */ jsxs(View, { style: styles32.statusPill, children: [
6468
+ connected && /* @__PURE__ */ jsx(View, { style: styles32.statusDot }),
6469
+ /* @__PURE__ */ jsx(Text, { style: styles32.statusText, children: subtitle })
6232
6470
  ] })
6233
6471
  ]
6234
6472
  }
6235
6473
  )
6236
6474
  ),
6237
- chromeVisible && showStage && /* @__PURE__ */ jsxs(View, { style: [styles31.header, { paddingTop: insets.top + 14 }], pointerEvents: "box-none", children: [
6238
- /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles31.title, children: title }),
6239
- /* @__PURE__ */ jsxs(View, { style: styles31.subtitleRow, children: [
6475
+ chromeVisible && showStage && /* @__PURE__ */ jsxs(View, { style: [styles32.header, { paddingTop: insets.top + 14 }], pointerEvents: "box-none", children: [
6476
+ /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles32.title, children: title }),
6477
+ /* @__PURE__ */ jsxs(View, { style: styles32.subtitleRow, children: [
6240
6478
  isGroup && /* @__PURE__ */ jsx(PoolseIcon, { name: "users", size: 14, color: callColors.textDim, label: null }),
6241
- /* @__PURE__ */ jsx(Text, { style: styles31.subtitle, children: isGroup ? `${participants.length} \xB7 ${subtitle}` : subtitle })
6479
+ /* @__PURE__ */ jsx(Text, { style: styles32.subtitle, children: isGroup ? `${participants.length} \xB7 ${subtitle}` : subtitle })
6242
6480
  ] })
6243
6481
  ] }),
6244
6482
  chromeVisible && /* @__PURE__ */ jsxs(
6245
6483
  View,
6246
6484
  {
6247
- style: [styles31.controls, { paddingBottom: insets.bottom + 22 }],
6485
+ style: [styles32.controls, { paddingBottom: insets.bottom + 22 }],
6248
6486
  pointerEvents: "box-none",
6249
6487
  children: [
6250
- error && /* @__PURE__ */ jsx(Text, { style: styles31.error, children: error.message }),
6251
- !meshAvailable && !livekit && /* @__PURE__ */ jsx(Text, { style: styles31.error, children: "No WebRTC module supplied \u2014 this call has no audio." }),
6252
- ringingIn ? /* @__PURE__ */ jsxs(View, { style: styles31.answerRow, children: [
6488
+ error && /* @__PURE__ */ jsx(Text, { style: styles32.error, children: error.message }),
6489
+ !meshAvailable && !livekit && /* @__PURE__ */ jsx(Text, { style: styles32.error, children: "No WebRTC module supplied \u2014 this call has no audio." }),
6490
+ ringingIn ? /* @__PURE__ */ jsxs(View, { style: styles32.answerRow, children: [
6253
6491
  /* @__PURE__ */ jsx(
6254
6492
  CallControlButton,
6255
6493
  {
@@ -6272,7 +6510,7 @@ function CallScreen({
6272
6510
  accessibilityLabel: "Accept call"
6273
6511
  }
6274
6512
  )
6275
- ] }) : ended ? /* @__PURE__ */ jsx(View, { style: styles31.row, children: /* @__PURE__ */ jsx(
6513
+ ] }) : ended ? /* @__PURE__ */ jsx(View, { style: styles32.row, children: /* @__PURE__ */ jsx(
6276
6514
  CallControlButton,
6277
6515
  {
6278
6516
  icon: "close",
@@ -6281,7 +6519,7 @@ function CallScreen({
6281
6519
  accessibilityLabel: "Close"
6282
6520
  }
6283
6521
  ) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
6284
- /* @__PURE__ */ jsxs(View, { style: styles31.dock, children: [
6522
+ /* @__PURE__ */ jsxs(View, { style: styles32.dock, children: [
6285
6523
  /* @__PURE__ */ jsx(
6286
6524
  CallControlButton,
6287
6525
  {
@@ -6322,7 +6560,7 @@ function CallScreen({
6322
6560
  }
6323
6561
  )
6324
6562
  ] }),
6325
- /* @__PURE__ */ jsx(View, { style: styles31.hangUpRow, children: /* @__PURE__ */ jsx(
6563
+ /* @__PURE__ */ jsx(View, { style: styles32.hangUpRow, children: /* @__PURE__ */ jsx(
6326
6564
  CallControlButton,
6327
6565
  {
6328
6566
  icon: "phone-off",
@@ -6398,7 +6636,7 @@ function statusLine(calls, mediaStatus) {
6398
6636
  return "";
6399
6637
  }
6400
6638
  }
6401
- var styles31 = StyleSheet.create({
6639
+ var styles32 = StyleSheet.create({
6402
6640
  screen: { flex: 1, backgroundColor: callColors.bg },
6403
6641
  identity: {
6404
6642
  flex: 1,
@@ -6702,6 +6940,6 @@ function guessApnsEnvironment() {
6702
6940
  return __DEV__ ? "sandbox" : "production";
6703
6941
  }
6704
6942
 
6705
- export { AttachmentPicker, AttachmentPreview, AudioRouteSheet, Avatar, CallAvatar, CallControlButton, CallParticipantTile, CallScreen, CallVideoGrid, ChatHeader, ConversationList, ConversationView, DaySeparator, GroupDetailsSheet, ImageMosaic, LocalVideoPip, MemberList, MentionInput, MessageActions, MessageBubble, MessageComposer, MessageList, MessageRow, PoolseIcon, PoolseInbox, PoolseLogo, PoolseTheme, primitives as Primitives, ReactionPicker, ReactionStrip, ThreadView, TypingIndicator, UploadQueueStrip, UserName, VoiceRoomBar, callColors, createNativeWebRtcAdapter, defaultDarkTheme, defaultLightTheme, describeRoute, isNativeWebRtcAvailable, isStalePush, useAppStateLifecycle, useCallAudio, useCallDuration, useDisplayName, usePoolseTheme, useVoipCalls };
6943
+ export { AttachmentPicker, AttachmentPreview, AudioRouteSheet, Avatar, CallAvatar, CallControlButton, CallLogRow, CallParticipantTile, CallScreen, CallVideoGrid, ChatHeader, ConversationList, ConversationView, DaySeparator, GroupDetailsSheet, ImageMosaic, LocalVideoPip, MemberList, MentionInput, MessageActions, MessageBubble, MessageComposer, MessageList, MessageRow, PoolseIcon, PoolseInbox, PoolseLogo, PoolseTheme, primitives as Primitives, ReactionPicker, ReactionStrip, ThreadView, TypingIndicator, UploadQueueStrip, UserName, VoiceRoomBar, callColors, createNativeWebRtcAdapter, defaultDarkTheme, defaultLightTheme, describeRoute, isNativeWebRtcAvailable, isStalePush, useAppStateLifecycle, useCallAudio, useCallDuration, useDisplayName, usePoolseTheme, useVoipCalls };
6706
6944
  //# sourceMappingURL=index.js.map
6707
6945
  //# sourceMappingURL=index.js.map