@poolse/react-native 2.25.0 → 2.26.0

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.cjs CHANGED
@@ -5,10 +5,10 @@ var react = require('react');
5
5
  var reactNative = require('react-native');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var Svg2 = require('react-native-svg');
8
+ var reactNativeSafeAreaContext = require('react-native-safe-area-context');
8
9
  var ImagePicker = require('expo-image-picker');
9
10
  var DocumentPicker = require('expo-document-picker');
10
11
  var expoImageManipulator = require('expo-image-manipulator');
11
- var reactNativeSafeAreaContext = require('react-native-safe-area-context');
12
12
  var Clipboard = require('expo-clipboard');
13
13
  var Markdown = require('react-native-markdown-display');
14
14
 
@@ -647,6 +647,13 @@ var styles2 = reactNative.StyleSheet.create({
647
647
  padding: 6
648
648
  }
649
649
  });
650
+
651
+ // src/internal/edgeToEdge.ts
652
+ var EDGE_TO_EDGE_MODAL = {
653
+ statusBarTranslucent: true,
654
+ navigationBarTranslucent: true
655
+ };
656
+ var useSafeInsets = reactNativeSafeAreaContext.useSafeAreaInsets;
650
657
  function useDismissableSheet({ onClose, sheetHeight, dismissThreshold = 0.22 }) {
651
658
  const translateY = react.useRef(new reactNative.Animated.Value(0)).current;
652
659
  const panResponder = react.useMemo(
@@ -701,6 +708,7 @@ function GroupDetailsSheet({
701
708
  const theme = usePoolseTheme();
702
709
  const { conversation } = react$1.useConversation(conversationId);
703
710
  const { members } = react$1.useMembers(conversationId);
711
+ const insets = useSafeInsets();
704
712
  const { height: screenHeight } = reactNative.useWindowDimensions();
705
713
  const { translateY, panHandlers } = useDismissableSheet({
706
714
  onClose,
@@ -715,7 +723,7 @@ function GroupDetailsSheet({
715
723
  transparent: true,
716
724
  animationType: "slide",
717
725
  onRequestClose: onClose,
718
- statusBarTranslucent: true,
726
+ ...EDGE_TO_EDGE_MODAL,
719
727
  children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles3.modalRoot, children: [
720
728
  /* @__PURE__ */ jsxRuntime.jsx(
721
729
  reactNative.Pressable,
@@ -734,6 +742,11 @@ function GroupDetailsSheet({
734
742
  backgroundColor: theme.colors.paper,
735
743
  borderTopLeftRadius: theme.radii.xl,
736
744
  borderTopRightRadius: theme.radii.xl,
745
+ // Header stays below the status bar even on short screens.
746
+ maxHeight: screenHeight - insets.top - 8,
747
+ paddingBottom: insets.bottom,
748
+ paddingLeft: insets.left,
749
+ paddingRight: insets.right,
737
750
  transform: [{ translateY }]
738
751
  },
739
752
  theme.shadows.lg
@@ -1196,6 +1209,7 @@ function AttachmentPicker({
1196
1209
  camera = true
1197
1210
  }) {
1198
1211
  const theme = usePoolseTheme();
1212
+ const insets = useSafeInsets();
1199
1213
  const upload = useSharedUpload();
1200
1214
  const { setPreview } = useUploadPreview();
1201
1215
  const pickFromKind = async (kind) => {
@@ -1215,35 +1229,49 @@ function AttachmentPicker({
1215
1229
  onClose();
1216
1230
  }
1217
1231
  };
1218
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible, transparent: true, animationType: "slide", onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles6.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
1219
- reactNative.View,
1232
+ return /* @__PURE__ */ jsxRuntime.jsx(
1233
+ reactNative.Modal,
1220
1234
  {
1221
- style: [
1222
- styles6.sheet,
1235
+ visible,
1236
+ transparent: true,
1237
+ animationType: "slide",
1238
+ onRequestClose: onClose,
1239
+ ...EDGE_TO_EDGE_MODAL,
1240
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles6.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
1241
+ reactNative.View,
1223
1242
  {
1224
- backgroundColor: theme.colors.surface,
1225
- borderTopLeftRadius: theme.radii.lg,
1226
- borderTopRightRadius: theme.radii.lg
1227
- },
1228
- theme.shadows.lg
1229
- ],
1230
- children: [
1231
- camera ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles6.item, onPress: () => pickFromKind("camera"), children: [
1232
- /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "camera", size: 20, color: theme.colors.ink2 }),
1233
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Camera" })
1234
- ] }) : null,
1235
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles6.item, onPress: () => pickFromKind("image"), children: [
1236
- /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "image", size: 20, color: theme.colors.ink2 }),
1237
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Photo or video" })
1238
- ] }),
1239
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles6.item, onPress: () => pickFromKind("document"), children: [
1240
- /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "attachment", size: 20, color: theme.colors.ink2 }),
1241
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "File" })
1242
- ] }),
1243
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles6.cancel, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.brand }], children: "Cancel" }) })
1244
- ]
1243
+ style: [
1244
+ styles6.sheet,
1245
+ {
1246
+ backgroundColor: theme.colors.surface,
1247
+ borderTopLeftRadius: theme.radii.lg,
1248
+ borderTopRightRadius: theme.radii.lg,
1249
+ // Cancel must sit above the nav bar / home indicator.
1250
+ paddingBottom: 24 + insets.bottom,
1251
+ paddingLeft: insets.left,
1252
+ paddingRight: insets.right
1253
+ },
1254
+ theme.shadows.lg
1255
+ ],
1256
+ children: [
1257
+ camera ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles6.item, onPress: () => pickFromKind("camera"), children: [
1258
+ /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "camera", size: 20, color: theme.colors.ink2 }),
1259
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Camera" })
1260
+ ] }) : null,
1261
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles6.item, onPress: () => pickFromKind("image"), children: [
1262
+ /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "image", size: 20, color: theme.colors.ink2 }),
1263
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Photo or video" })
1264
+ ] }),
1265
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles6.item, onPress: () => pickFromKind("document"), children: [
1266
+ /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "attachment", size: 20, color: theme.colors.ink2 }),
1267
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "File" })
1268
+ ] }),
1269
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles6.cancel, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.brand }], children: "Cancel" }) })
1270
+ ]
1271
+ }
1272
+ ) })
1245
1273
  }
1246
- ) }) });
1274
+ );
1247
1275
  }
1248
1276
  async function uriToBlob(uri) {
1249
1277
  const res = await fetch(uri);
@@ -1459,6 +1487,74 @@ var styles7 = reactNative.StyleSheet.create({
1459
1487
  letterSpacing: 0.3
1460
1488
  }
1461
1489
  });
1490
+ function LiveCallBanner({ call, inCall, onJoin }) {
1491
+ const theme = usePoolseTheme();
1492
+ const what = call.media === "video" ? "Video call in progress" : "Voice call in progress";
1493
+ const who = inCall > 0 ? `${inCall} on the call` : "Ringing";
1494
+ return /* @__PURE__ */ jsxRuntime.jsxs(
1495
+ reactNative.View,
1496
+ {
1497
+ style: [styles8.bar, { backgroundColor: theme.colors.success }],
1498
+ accessibilityRole: "summary",
1499
+ accessibilityLabel: `${what}, ${who}`,
1500
+ children: [
1501
+ /* @__PURE__ */ jsxRuntime.jsx(
1502
+ PoolseIcon,
1503
+ {
1504
+ name: call.media === "video" ? "video" : "phone",
1505
+ size: 16,
1506
+ color: "#FFFFFF",
1507
+ label: null
1508
+ }
1509
+ ),
1510
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles8.text, children: [
1511
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.title, { fontFamily: theme.type.fontBody }], numberOfLines: 1, children: what }),
1512
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.meta, { fontFamily: theme.type.fontBody }], numberOfLines: 1, children: who })
1513
+ ] }),
1514
+ /* @__PURE__ */ jsxRuntime.jsx(
1515
+ reactNative.Pressable,
1516
+ {
1517
+ onPress: () => onJoin(call),
1518
+ accessibilityRole: "button",
1519
+ accessibilityLabel: "Join call",
1520
+ hitSlop: 8,
1521
+ style: ({ pressed }) => [styles8.join, pressed && styles8.joinPressed],
1522
+ children: /* @__PURE__ */ jsxRuntime.jsx(
1523
+ reactNative.Text,
1524
+ {
1525
+ style: [
1526
+ styles8.joinText,
1527
+ { color: theme.colors.success, fontFamily: theme.type.fontBody }
1528
+ ],
1529
+ children: "Join"
1530
+ }
1531
+ )
1532
+ }
1533
+ )
1534
+ ]
1535
+ }
1536
+ );
1537
+ }
1538
+ var styles8 = reactNative.StyleSheet.create({
1539
+ bar: {
1540
+ flexDirection: "row",
1541
+ alignItems: "center",
1542
+ gap: 10,
1543
+ paddingHorizontal: 16,
1544
+ paddingVertical: 8
1545
+ },
1546
+ text: { flex: 1, minWidth: 0 },
1547
+ title: { color: "#FFFFFF", fontSize: 14, fontWeight: "600" },
1548
+ meta: { color: "rgba(255,255,255,0.85)", fontSize: 12 },
1549
+ join: {
1550
+ backgroundColor: "#FFFFFF",
1551
+ borderRadius: 999,
1552
+ paddingHorizontal: 16,
1553
+ paddingVertical: 6
1554
+ },
1555
+ joinPressed: { opacity: 0.8 },
1556
+ joinText: { fontSize: 14, fontWeight: "700" }
1557
+ });
1462
1558
  function UploadQueueStrip() {
1463
1559
  const theme = usePoolseTheme();
1464
1560
  const upload = useSharedUpload();
@@ -1469,8 +1565,8 @@ function UploadQueueStrip() {
1469
1565
  {
1470
1566
  horizontal: true,
1471
1567
  showsHorizontalScrollIndicator: false,
1472
- contentContainerStyle: styles8.scroll,
1473
- style: [styles8.scrollStyle, { marginBottom: 8 }],
1568
+ contentContainerStyle: styles9.scroll,
1569
+ style: [styles9.scrollStyle, { marginBottom: 8 }],
1474
1570
  children: upload.queue.map((item) => {
1475
1571
  const isError = item.status === "error";
1476
1572
  const isUploading = item.status === "uploading" || item.status === "pending";
@@ -1481,7 +1577,7 @@ function UploadQueueStrip() {
1481
1577
  if (item.status === "ready" || isError) upload.remove(item.localId);
1482
1578
  else upload.cancel(item.localId);
1483
1579
  };
1484
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles8.tileWrap, children: [
1580
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.tileWrap, children: [
1485
1581
  isImage && previewUri ? /* @__PURE__ */ jsxRuntime.jsx(ImageTile, { uri: previewUri, uploading: isUploading, error: isError }) : /* @__PURE__ */ jsxRuntime.jsx(
1486
1582
  FileTile,
1487
1583
  {
@@ -1496,13 +1592,13 @@ function UploadQueueStrip() {
1496
1592
  {
1497
1593
  onPress: handleClose,
1498
1594
  hitSlop: 8,
1499
- style: styles8.closeBtn,
1595
+ style: styles9.closeBtn,
1500
1596
  accessibilityLabel: isError ? "Remove failed upload" : "Cancel upload",
1501
1597
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 11, color: "#fff" })
1502
1598
  }
1503
1599
  ) : null,
1504
- isUploading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles8.progressOverlay, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles8.spinner, { borderColor: theme.colors.onBrand }] }) }) : null,
1505
- isError ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles8.errorOverlay, { backgroundColor: "rgba(229,72,77,0.85)" }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.errorText, { color: "#fff" }], children: "Failed" }) }) : null
1600
+ isUploading ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles9.progressOverlay, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles9.spinner, { borderColor: theme.colors.onBrand }] }) }) : null,
1601
+ isError ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles9.errorOverlay, { backgroundColor: "rgba(229,72,77,0.85)" }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.errorText, { color: "#fff" }], children: "Failed" }) }) : null
1506
1602
  ] }, item.localId);
1507
1603
  })
1508
1604
  }
@@ -1515,7 +1611,7 @@ function ImageTile({ uri, uploading, error }) {
1515
1611
  {
1516
1612
  source: { uri },
1517
1613
  style: [
1518
- styles8.imageTile,
1614
+ styles9.imageTile,
1519
1615
  {
1520
1616
  backgroundColor: theme.colors.surface2,
1521
1617
  borderColor: error ? theme.colors.error : "transparent",
@@ -1537,24 +1633,24 @@ function FileTile({
1537
1633
  reactNative.View,
1538
1634
  {
1539
1635
  style: [
1540
- styles8.fileTile,
1636
+ styles9.fileTile,
1541
1637
  {
1542
1638
  backgroundColor: theme.colors.surface2,
1543
1639
  borderColor: error ? theme.colors.error : uploading ? theme.colors.brand : theme.colors.border
1544
1640
  }
1545
1641
  ],
1546
1642
  children: [
1547
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles8.fileIconBox, { backgroundColor: theme.colors.brandSoft }], children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "attachment", size: 18, color: theme.colors.brand }) }),
1548
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles8.fileInfo, children: [
1643
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles9.fileIconBox, { backgroundColor: theme.colors.brandSoft }], children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "attachment", size: 18, color: theme.colors.brand }) }),
1644
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.fileInfo, children: [
1549
1645
  /* @__PURE__ */ jsxRuntime.jsx(
1550
1646
  reactNative.Text,
1551
1647
  {
1552
- style: [styles8.fileName, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
1648
+ style: [styles9.fileName, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
1553
1649
  numberOfLines: 1,
1554
1650
  children: filename
1555
1651
  }
1556
1652
  ),
1557
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles8.fileSize, { color: theme.colors.ink3 }], children: formatBytes(size) })
1653
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.fileSize, { color: theme.colors.ink3 }], children: formatBytes(size) })
1558
1654
  ] })
1559
1655
  ]
1560
1656
  }
@@ -1568,7 +1664,7 @@ function formatBytes(n) {
1568
1664
  return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
1569
1665
  }
1570
1666
  var TILE = 64;
1571
- var styles8 = reactNative.StyleSheet.create({
1667
+ var styles9 = reactNative.StyleSheet.create({
1572
1668
  scrollStyle: {
1573
1669
  overflow: "visible"
1574
1670
  },
@@ -1669,7 +1765,24 @@ var styles8 = reactNative.StyleSheet.create({
1669
1765
  fontWeight: "700"
1670
1766
  }
1671
1767
  });
1672
- var useSafeInsets = reactNativeSafeAreaContext.useSafeAreaInsets;
1768
+ function useKeyboardOpen() {
1769
+ const [open, setOpen] = react.useState(false);
1770
+ react.useEffect(() => {
1771
+ const show = reactNative.Keyboard.addListener(
1772
+ reactNative.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
1773
+ () => setOpen(true)
1774
+ );
1775
+ const hide = reactNative.Keyboard.addListener(
1776
+ reactNative.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
1777
+ () => setOpen(false)
1778
+ );
1779
+ return () => {
1780
+ show.remove();
1781
+ hide.remove();
1782
+ };
1783
+ }, []);
1784
+ return open;
1785
+ }
1673
1786
  var MessageComposer = react.forwardRef(
1674
1787
  function MessageComposer2({
1675
1788
  onSend,
@@ -1690,23 +1803,9 @@ var MessageComposer = react.forwardRef(
1690
1803
  const inputRef = react.useRef(null);
1691
1804
  const [value, setValue] = react.useState("");
1692
1805
  const [sending, setSending] = react.useState(false);
1693
- const [keyboardOpen, setKeyboardOpen] = react.useState(false);
1806
+ const keyboardOpen = useKeyboardOpen();
1694
1807
  const upload = useSharedUpload();
1695
1808
  const insets = useSafeInsets();
1696
- react.useEffect(() => {
1697
- const show = reactNative.Keyboard.addListener(
1698
- reactNative.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
1699
- () => setKeyboardOpen(true)
1700
- );
1701
- const hide = reactNative.Keyboard.addListener(
1702
- reactNative.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
1703
- () => setKeyboardOpen(false)
1704
- );
1705
- return () => {
1706
- show.remove();
1707
- hide.remove();
1708
- };
1709
- }, []);
1710
1809
  react.useImperativeHandle(
1711
1810
  ref,
1712
1811
  () => ({
@@ -1769,7 +1868,7 @@ var MessageComposer = react.forwardRef(
1769
1868
  reactNative.View,
1770
1869
  {
1771
1870
  style: [
1772
- styles9.wrap,
1871
+ styles10.wrap,
1773
1872
  {
1774
1873
  backgroundColor: theme.colors.surface,
1775
1874
  borderTopColor: theme.colors.border,
@@ -1792,13 +1891,13 @@ var MessageComposer = react.forwardRef(
1792
1891
  }
1793
1892
  ) : null,
1794
1893
  attachments && !isEditing ? /* @__PURE__ */ jsxRuntime.jsx(UploadQueueStrip, {}) : null,
1795
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles9.row, children: [
1894
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles10.row, children: [
1796
1895
  attachments && onAttachPress ? /* @__PURE__ */ jsxRuntime.jsx(
1797
1896
  reactNative.Pressable,
1798
1897
  {
1799
1898
  onPress: onAttachPress,
1800
1899
  hitSlop: 8,
1801
- style: styles9.iconBtn,
1900
+ style: styles10.iconBtn,
1802
1901
  accessibilityLabel: "Attach file",
1803
1902
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "attachment", size: 22, color: theme.colors.ink2 })
1804
1903
  }
@@ -1817,7 +1916,7 @@ var MessageComposer = react.forwardRef(
1817
1916
  multiline: true,
1818
1917
  editable: !disabled,
1819
1918
  style: [
1820
- styles9.input,
1919
+ styles10.input,
1821
1920
  {
1822
1921
  color: theme.colors.ink,
1823
1922
  backgroundColor: theme.colors.surface2,
@@ -1834,7 +1933,7 @@ var MessageComposer = react.forwardRef(
1834
1933
  onPress: handleSend,
1835
1934
  disabled: submitDisabled,
1836
1935
  style: [
1837
- styles9.sendBtn,
1936
+ styles10.sendBtn,
1838
1937
  {
1839
1938
  backgroundColor: submitDisabled ? theme.colors.ink3 : theme.colors.brand,
1840
1939
  opacity: submitDisabled ? 0.6 : 1
@@ -1856,7 +1955,7 @@ function EditChip({ message, onCancel }) {
1856
1955
  reactNative.View,
1857
1956
  {
1858
1957
  style: [
1859
- styles9.replyChip,
1958
+ styles10.replyChip,
1860
1959
  {
1861
1960
  backgroundColor: theme.colors.surface2,
1862
1961
  borderLeftColor: theme.colors.brand
@@ -1864,10 +1963,10 @@ function EditChip({ message, onCancel }) {
1864
1963
  ],
1865
1964
  children: [
1866
1965
  /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: { flex: 1 }, children: [
1867
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.replyName, { color: theme.colors.brand }], children: "Editing message" }),
1868
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.replyBody, { color: theme.colors.ink2 }], numberOfLines: 1, children: message.body ?? "\u2026" })
1966
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.replyName, { color: theme.colors.brand }], children: "Editing message" }),
1967
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.replyBody, { color: theme.colors.ink2 }], numberOfLines: 1, children: message.body ?? "\u2026" })
1869
1968
  ] }),
1870
- onCancel ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: onCancel, hitSlop: 8, style: styles9.replyCancel, children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 16, color: theme.colors.ink2 }) }) : null
1969
+ onCancel ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: onCancel, hitSlop: 8, style: styles10.replyCancel, children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 16, color: theme.colors.ink2 }) }) : null
1871
1970
  ]
1872
1971
  }
1873
1972
  );
@@ -1884,7 +1983,7 @@ function ReplyChip({
1884
1983
  reactNative.View,
1885
1984
  {
1886
1985
  style: [
1887
- styles9.replyChip,
1986
+ styles10.replyChip,
1888
1987
  {
1889
1988
  backgroundColor: theme.colors.surface2,
1890
1989
  borderLeftColor: theme.colors.brand
@@ -1892,18 +1991,18 @@ function ReplyChip({
1892
1991
  ],
1893
1992
  children: [
1894
1993
  /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: { flex: 1 }, children: [
1895
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [styles9.replyName, { color: theme.colors.brand }], children: [
1994
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [styles10.replyName, { color: theme.colors.brand }], children: [
1896
1995
  "Replying to ",
1897
1996
  senderName
1898
1997
  ] }),
1899
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles9.replyBody, { color: theme.colors.ink2 }], numberOfLines: 1, children: message.body ?? "\u2026" })
1998
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.replyBody, { color: theme.colors.ink2 }], numberOfLines: 1, children: message.body ?? "\u2026" })
1900
1999
  ] }),
1901
- onCancel ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: onCancel, hitSlop: 8, style: styles9.replyCancel, children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 16, color: theme.colors.ink2 }) }) : null
2000
+ onCancel ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: onCancel, hitSlop: 8, style: styles10.replyCancel, children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 16, color: theme.colors.ink2 }) }) : null
1902
2001
  ]
1903
2002
  }
1904
2003
  );
1905
2004
  }
1906
- var styles9 = reactNative.StyleSheet.create({
2005
+ var styles10 = reactNative.StyleSheet.create({
1907
2006
  wrap: {
1908
2007
  borderTopWidth: reactNative.StyleSheet.hairlineWidth,
1909
2008
  paddingTop: 8,
@@ -1962,6 +2061,8 @@ var styles9 = reactNative.StyleSheet.create({
1962
2061
  });
1963
2062
  function MentionInput({ conversationId, onSend, ...composerProps }) {
1964
2063
  const theme = usePoolseTheme();
2064
+ const insets = useSafeInsets();
2065
+ const keyboardOpen = useKeyboardOpen();
1965
2066
  const { members } = react$1.useMembers(conversationId);
1966
2067
  const [pickerOpen, setPickerOpen] = react.useState(false);
1967
2068
  const [pickerQuery, _setPickerQuery] = react.useState("");
@@ -2000,22 +2101,28 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
2000
2101
  transparent: true,
2001
2102
  animationType: "slide",
2002
2103
  onRequestClose: () => setPickerOpen(false),
2003
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles10.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(
2104
+ ...EDGE_TO_EDGE_MODAL,
2105
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.KeyboardAvoidingView, { style: styles11.kav, behavior: "padding", children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles11.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(
2004
2106
  reactNative.View,
2005
2107
  {
2006
2108
  style: [
2007
- styles10.sheet,
2109
+ styles11.sheet,
2008
2110
  {
2009
2111
  backgroundColor: theme.colors.surface,
2010
2112
  borderTopLeftRadius: theme.radii.lg,
2011
- borderTopRightRadius: theme.radii.lg
2113
+ borderTopRightRadius: theme.radii.lg,
2114
+ // Clear the nav bar — unless the keyboard is covering
2115
+ // it, where the inset would just be a gap.
2116
+ paddingBottom: 12 + (keyboardOpen ? 0 : insets.bottom),
2117
+ paddingLeft: insets.left,
2118
+ paddingRight: insets.right
2012
2119
  }
2013
2120
  ],
2014
2121
  children: [
2015
2122
  /* @__PURE__ */ jsxRuntime.jsx(
2016
2123
  reactNative.Text,
2017
2124
  {
2018
- style: [styles10.title, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
2125
+ style: [styles11.title, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
2019
2126
  children: "Mention a member"
2020
2127
  }
2021
2128
  ),
@@ -2024,6 +2131,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
2024
2131
  {
2025
2132
  data: filteredMembers,
2026
2133
  keyExtractor: (m) => m.user_id,
2134
+ keyboardShouldPersistTaps: "handled",
2027
2135
  renderItem: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
2028
2136
  MentionRow,
2029
2137
  {
@@ -2039,19 +2147,22 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
2039
2147
  )
2040
2148
  ]
2041
2149
  }
2042
- ) })
2150
+ ) }) })
2043
2151
  }
2044
2152
  )
2045
2153
  ] });
2046
2154
  }
2047
2155
  function MentionRow({ member, onPress }) {
2048
2156
  const theme = usePoolseTheme();
2049
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, style: styles10.row, children: [
2157
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, style: styles11.row, children: [
2050
2158
  /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: member.external_id, seed: member.external_id, size: "sm" }),
2051
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles10.rowText, { color: theme.colors.ink, fontFamily: theme.type.fontBody }], children: member.external_id })
2159
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles11.rowText, { color: theme.colors.ink, fontFamily: theme.type.fontBody }], children: member.external_id })
2052
2160
  ] });
2053
2161
  }
2054
- var styles10 = reactNative.StyleSheet.create({
2162
+ var styles11 = reactNative.StyleSheet.create({
2163
+ kav: {
2164
+ flex: 1
2165
+ },
2055
2166
  backdrop: {
2056
2167
  flex: 1,
2057
2168
  backgroundColor: "rgba(0,0,0,0.35)",
@@ -2131,12 +2242,12 @@ function MessageList({
2131
2242
  [renderItem, data.length]
2132
2243
  );
2133
2244
  if (loading && messages.length === 0) {
2134
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles11.placeholder, { backgroundColor: theme.colors.paper }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ActivityIndicator, { color: theme.colors.brand }) });
2245
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles12.placeholder, { backgroundColor: theme.colors.paper }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.ActivityIndicator, { color: theme.colors.brand }) });
2135
2246
  }
2136
2247
  if (messages.length === 0) {
2137
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles11.placeholder, { backgroundColor: theme.colors.paper }], children: typeof emptyState === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { color: theme.colors.ink3, fontFamily: theme.type.fontBody }, children: emptyState }) : emptyState ?? null });
2248
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles12.placeholder, { backgroundColor: theme.colors.paper }], children: typeof emptyState === "string" ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { color: theme.colors.ink3, fontFamily: theme.type.fontBody }, children: emptyState }) : emptyState ?? null });
2138
2249
  }
2139
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles11.root, children: [
2250
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles12.root, children: [
2140
2251
  /* @__PURE__ */ jsxRuntime.jsx(
2141
2252
  reactNative.FlatList,
2142
2253
  {
@@ -2163,7 +2274,7 @@ function MessageList({
2163
2274
  {
2164
2275
  onPress: scrollToBottom,
2165
2276
  style: [
2166
- styles11.jumpButton,
2277
+ styles12.jumpButton,
2167
2278
  {
2168
2279
  backgroundColor: theme.colors.brand
2169
2280
  },
@@ -2172,7 +2283,7 @@ function MessageList({
2172
2283
  accessibilityLabel: `${newCount} new ${newCount === 1 ? "message" : "messages"}, jump to latest`,
2173
2284
  children: [
2174
2285
  /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "chevron-down", size: 14, color: theme.colors.onBrand }),
2175
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [styles11.jumpText, { color: theme.colors.onBrand }], children: [
2286
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [styles12.jumpText, { color: theme.colors.onBrand }], children: [
2176
2287
  newCount,
2177
2288
  " new ",
2178
2289
  newCount === 1 ? "message" : "messages"
@@ -2182,7 +2293,7 @@ function MessageList({
2182
2293
  ) : null
2183
2294
  ] });
2184
2295
  }
2185
- var styles11 = reactNative.StyleSheet.create({
2296
+ var styles12 = reactNative.StyleSheet.create({
2186
2297
  root: {
2187
2298
  flex: 1
2188
2299
  },
@@ -2208,64 +2319,90 @@ var styles11 = reactNative.StyleSheet.create({
2208
2319
  fontWeight: "600"
2209
2320
  }
2210
2321
  });
2211
- function CallLogRow({ msg, meId }) {
2322
+ function CallLogRow({ msg, meId, onCallBack }) {
2212
2323
  const theme = usePoolseTheme();
2213
2324
  const display = react$1.callLogDisplayFor(msg, meId);
2214
2325
  if (!display) return null;
2215
2326
  const accent = display.missed ? theme.colors.error : theme.colors.ink3;
2216
2327
  const time = formatTime(msg.inserted_at);
2217
2328
  const label = [display.title, display.detail, time].filter(Boolean).join(", ");
2218
- const metaStyle = [styles12.meta, { color: theme.colors.ink3, fontFamily: theme.type.fontBody }];
2219
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles12.wrap, accessible: true, accessibilityLabel: label, children: /* @__PURE__ */ jsxRuntime.jsxs(
2220
- reactNative.View,
2221
- {
2222
- style: [
2223
- styles12.chip,
2224
- {
2225
- backgroundColor: theme.colors.surface2,
2226
- borderColor: theme.colors.border
2227
- }
2228
- ],
2229
- children: [
2230
- /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: display.media === "video" ? "video" : "phone", size: 13, color: accent }),
2231
- /* @__PURE__ */ jsxRuntime.jsx(
2329
+ const metaStyle = [styles13.meta, { color: theme.colors.ink3, fontFamily: theme.type.fontBody }];
2330
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles13.wrap, accessible: true, accessibilityLabel: label, children: [
2331
+ /* @__PURE__ */ jsxRuntime.jsxs(
2332
+ reactNative.View,
2333
+ {
2334
+ style: [
2335
+ styles13.chip,
2336
+ {
2337
+ backgroundColor: theme.colors.surface2,
2338
+ borderColor: theme.colors.border
2339
+ }
2340
+ ],
2341
+ children: [
2342
+ /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: display.media === "video" ? "video" : "phone", size: 13, color: accent }),
2343
+ /* @__PURE__ */ jsxRuntime.jsx(
2344
+ reactNative.Text,
2345
+ {
2346
+ style: [
2347
+ styles13.title,
2348
+ {
2349
+ color: display.missed ? theme.colors.error : theme.colors.ink2,
2350
+ fontFamily: theme.type.fontBody
2351
+ }
2352
+ ],
2353
+ numberOfLines: 1,
2354
+ children: display.title
2355
+ }
2356
+ ),
2357
+ display.detail ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: metaStyle, children: [
2358
+ "\xB7 ",
2359
+ display.detail
2360
+ ] }) : null,
2361
+ time ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: metaStyle, children: [
2362
+ "\xB7 ",
2363
+ time
2364
+ ] }) : null
2365
+ ]
2366
+ }
2367
+ ),
2368
+ display.callBack && onCallBack ? /* @__PURE__ */ jsxRuntime.jsx(
2369
+ reactNative.Pressable,
2370
+ {
2371
+ onPress: () => onCallBack(display.media),
2372
+ accessibilityRole: "button",
2373
+ accessibilityLabel: display.media === "video" ? "Video call back" : "Call back",
2374
+ hitSlop: 8,
2375
+ style: ({ pressed }) => [styles13.callBack, pressed && styles13.callBackPressed],
2376
+ children: /* @__PURE__ */ jsxRuntime.jsx(
2232
2377
  reactNative.Text,
2233
2378
  {
2234
2379
  style: [
2235
- styles12.title,
2236
- {
2237
- color: display.missed ? theme.colors.error : theme.colors.ink2,
2238
- fontFamily: theme.type.fontBody
2239
- }
2380
+ styles13.callBackText,
2381
+ { color: theme.colors.brand, fontFamily: theme.type.fontBody }
2240
2382
  ],
2241
- numberOfLines: 1,
2242
- children: display.title
2383
+ children: "Call back"
2243
2384
  }
2244
- ),
2245
- display.detail ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: metaStyle, children: [
2246
- "\xB7 ",
2247
- display.detail
2248
- ] }) : null,
2249
- time ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: metaStyle, children: [
2250
- "\xB7 ",
2251
- time
2252
- ] }) : null
2253
- ]
2254
- }
2255
- ) });
2385
+ )
2386
+ }
2387
+ ) : null
2388
+ ] });
2256
2389
  }
2257
2390
  function formatTime(iso) {
2258
2391
  const d = new Date(iso);
2259
2392
  if (Number.isNaN(d.getTime())) return "";
2260
2393
  return d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
2261
2394
  }
2262
- var styles12 = reactNative.StyleSheet.create({
2395
+ var styles13 = reactNative.StyleSheet.create({
2263
2396
  wrap: {
2264
2397
  alignItems: "center",
2265
2398
  alignSelf: "stretch",
2266
2399
  marginVertical: 6,
2267
- paddingHorizontal: 16
2400
+ paddingHorizontal: 16,
2401
+ gap: 4
2268
2402
  },
2403
+ callBack: { paddingHorizontal: 10, paddingVertical: 2 },
2404
+ callBackPressed: { opacity: 0.6 },
2405
+ callBackText: { fontSize: 12, fontWeight: "600" },
2269
2406
  chip: {
2270
2407
  flexDirection: "row",
2271
2408
  alignItems: "center",
@@ -2304,6 +2441,7 @@ function MessageActions({
2304
2441
  onCopy
2305
2442
  }) {
2306
2443
  const theme = usePoolseTheme();
2444
+ const insets = useSafeInsets();
2307
2445
  const items = [];
2308
2446
  if (onReply) items.push({ label: "Reply", icon: "reply", onPress: onReply });
2309
2447
  if (onQuote) items.push({ label: "Quote reply", icon: "reply", onPress: onQuote });
@@ -2314,61 +2452,75 @@ function MessageActions({
2314
2452
  if (isSelf && onDelete)
2315
2453
  items.push({ label: "Delete", icon: "trash", onPress: onDelete, danger: true });
2316
2454
  const showEmojiRow = !!onPickReaction && emojis.length > 0;
2317
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles13.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
2318
- reactNative.View,
2455
+ return /* @__PURE__ */ jsxRuntime.jsx(
2456
+ reactNative.Modal,
2319
2457
  {
2320
- style: [
2321
- styles13.sheet,
2458
+ visible,
2459
+ transparent: true,
2460
+ animationType: "fade",
2461
+ onRequestClose: onClose,
2462
+ ...EDGE_TO_EDGE_MODAL,
2463
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles14.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
2464
+ reactNative.View,
2322
2465
  {
2323
- backgroundColor: theme.colors.surface,
2324
- borderTopLeftRadius: theme.radii.lg,
2325
- borderTopRightRadius: theme.radii.lg
2326
- },
2327
- theme.shadows.lg
2328
- ],
2329
- children: [
2330
- showEmojiRow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles13.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
2331
- reactNative.Pressable,
2332
- {
2333
- onPress: () => {
2334
- onPickReaction(emoji);
2335
- onClose();
2336
- },
2337
- style: styles13.emojiBtn,
2338
- hitSlop: 6,
2339
- accessibilityLabel: `React with ${emoji}`,
2340
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles13.emoji, children: emoji })
2341
- },
2342
- emoji
2343
- )) }) : null,
2344
- items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress: item.onPress, style: styles13.item, children: [
2345
- /* @__PURE__ */ jsxRuntime.jsx(
2346
- PoolseIcon,
2347
- {
2348
- name: item.icon,
2349
- size: 18,
2350
- color: item.danger ? theme.colors.error : theme.colors.ink2
2351
- }
2352
- ),
2353
- /* @__PURE__ */ jsxRuntime.jsx(
2354
- reactNative.Text,
2466
+ style: [
2467
+ styles14.sheet,
2355
2468
  {
2356
- style: [
2357
- styles13.itemText,
2469
+ backgroundColor: theme.colors.surface,
2470
+ borderTopLeftRadius: theme.radii.lg,
2471
+ borderTopRightRadius: theme.radii.lg,
2472
+ // Last action row must sit above the nav bar / home indicator.
2473
+ paddingBottom: 24 + insets.bottom,
2474
+ paddingLeft: insets.left,
2475
+ paddingRight: insets.right
2476
+ },
2477
+ theme.shadows.lg
2478
+ ],
2479
+ children: [
2480
+ showEmojiRow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles14.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
2481
+ reactNative.Pressable,
2482
+ {
2483
+ onPress: () => {
2484
+ onPickReaction(emoji);
2485
+ onClose();
2486
+ },
2487
+ style: styles14.emojiBtn,
2488
+ hitSlop: 6,
2489
+ accessibilityLabel: `React with ${emoji}`,
2490
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles14.emoji, children: emoji })
2491
+ },
2492
+ emoji
2493
+ )) }) : null,
2494
+ items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress: item.onPress, style: styles14.item, children: [
2495
+ /* @__PURE__ */ jsxRuntime.jsx(
2496
+ PoolseIcon,
2358
2497
  {
2359
- color: item.danger ? theme.colors.error : theme.colors.ink,
2360
- fontFamily: theme.type.fontBody
2498
+ name: item.icon,
2499
+ size: 18,
2500
+ color: item.danger ? theme.colors.error : theme.colors.ink2
2361
2501
  }
2362
- ],
2363
- children: item.label
2364
- }
2365
- )
2366
- ] }, item.label))
2367
- ]
2502
+ ),
2503
+ /* @__PURE__ */ jsxRuntime.jsx(
2504
+ reactNative.Text,
2505
+ {
2506
+ style: [
2507
+ styles14.itemText,
2508
+ {
2509
+ color: item.danger ? theme.colors.error : theme.colors.ink,
2510
+ fontFamily: theme.type.fontBody
2511
+ }
2512
+ ],
2513
+ children: item.label
2514
+ }
2515
+ )
2516
+ ] }, item.label))
2517
+ ]
2518
+ }
2519
+ ) })
2368
2520
  }
2369
- ) }) });
2521
+ );
2370
2522
  }
2371
- var styles13 = reactNative.StyleSheet.create({
2523
+ var styles14 = reactNative.StyleSheet.create({
2372
2524
  backdrop: {
2373
2525
  flex: 1,
2374
2526
  backgroundColor: "rgba(0,0,0,0.35)",
@@ -2438,7 +2590,7 @@ function AttachmentPreview({
2438
2590
  reactNative.View,
2439
2591
  {
2440
2592
  style: [
2441
- styles14.imagePlaceholder,
2593
+ styles15.imagePlaceholder,
2442
2594
  {
2443
2595
  width: maxWidth,
2444
2596
  height: 200,
@@ -2458,7 +2610,7 @@ function AttachmentPreview({
2458
2610
  onPress,
2459
2611
  disabled: !onPress,
2460
2612
  style: [
2461
- styles14.fileCard,
2613
+ styles15.fileCard,
2462
2614
  {
2463
2615
  backgroundColor: onBrand ? "rgba(255,255,255,0.18)" : theme.colors.surface2,
2464
2616
  borderColor: onBrand ? "transparent" : theme.colors.border,
@@ -2471,12 +2623,12 @@ function AttachmentPreview({
2471
2623
  /* @__PURE__ */ jsxRuntime.jsx(
2472
2624
  reactNative.Text,
2473
2625
  {
2474
- style: [styles14.fileName, { color: ink, fontFamily: theme.type.fontBody }],
2626
+ style: [styles15.fileName, { color: ink, fontFamily: theme.type.fontBody }],
2475
2627
  numberOfLines: 1,
2476
2628
  children: attachment.original_filename ?? "file"
2477
2629
  }
2478
2630
  ),
2479
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes2(attachment.byte_size) })
2631
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes2(attachment.byte_size) })
2480
2632
  ] })
2481
2633
  ]
2482
2634
  }
@@ -2488,7 +2640,7 @@ function formatBytes2(n) {
2488
2640
  if (n < 1024 * 1024 * 1024) return `${(n / 1024 / 1024).toFixed(1)} MB`;
2489
2641
  return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
2490
2642
  }
2491
- var styles14 = reactNative.StyleSheet.create({
2643
+ var styles15 = reactNative.StyleSheet.create({
2492
2644
  imagePlaceholder: {},
2493
2645
  fileCard: {
2494
2646
  flexDirection: "row",
@@ -2524,7 +2676,7 @@ function ImageMosaic({
2524
2676
  reactNative.View,
2525
2677
  {
2526
2678
  style: [
2527
- styles15.root,
2679
+ styles16.root,
2528
2680
  {
2529
2681
  borderTopLeftRadius: r,
2530
2682
  borderTopRightRadius: r,
@@ -2545,18 +2697,18 @@ function ImageMosaic({
2545
2697
  {
2546
2698
  onLongPress,
2547
2699
  attachment: visible[0],
2548
- style: styles15.tileFull,
2700
+ style: styles16.tileFull,
2549
2701
  onPress: () => setViewerIndex(0),
2550
2702
  overlay: null
2551
2703
  }
2552
2704
  ) : null,
2553
- n === 2 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.rowEven, children: [
2705
+ n === 2 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles16.rowEven, children: [
2554
2706
  /* @__PURE__ */ jsxRuntime.jsx(
2555
2707
  Tile,
2556
2708
  {
2557
2709
  onLongPress,
2558
2710
  attachment: visible[0],
2559
- style: styles15.tileHalfSquare,
2711
+ style: styles16.tileHalfSquare,
2560
2712
  onPress: () => setViewerIndex(0),
2561
2713
  overlay: null
2562
2714
  }
@@ -2566,7 +2718,7 @@ function ImageMosaic({
2566
2718
  {
2567
2719
  onLongPress,
2568
2720
  attachment: visible[1],
2569
- style: styles15.tileHalfSquare,
2721
+ style: styles16.tileHalfSquare,
2570
2722
  onPress: () => setViewerIndex(1),
2571
2723
  overlay: null
2572
2724
  }
@@ -2578,18 +2730,18 @@ function ImageMosaic({
2578
2730
  {
2579
2731
  onLongPress,
2580
2732
  attachment: visible[0],
2581
- style: styles15.tileHero,
2733
+ style: styles16.tileHero,
2582
2734
  onPress: () => setViewerIndex(0),
2583
2735
  overlay: null
2584
2736
  }
2585
2737
  ),
2586
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.rowEven, { marginTop: 2 }], children: [
2738
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles16.rowEven, { marginTop: 2 }], children: [
2587
2739
  /* @__PURE__ */ jsxRuntime.jsx(
2588
2740
  Tile,
2589
2741
  {
2590
2742
  onLongPress,
2591
2743
  attachment: visible[1],
2592
- style: styles15.tileHalfSquare,
2744
+ style: styles16.tileHalfSquare,
2593
2745
  onPress: () => setViewerIndex(1),
2594
2746
  overlay: null
2595
2747
  }
@@ -2599,7 +2751,7 @@ function ImageMosaic({
2599
2751
  {
2600
2752
  onLongPress,
2601
2753
  attachment: visible[2],
2602
- style: styles15.tileHalfSquare,
2754
+ style: styles16.tileHalfSquare,
2603
2755
  onPress: () => setViewerIndex(2),
2604
2756
  overlay: null
2605
2757
  }
@@ -2607,13 +2759,13 @@ function ImageMosaic({
2607
2759
  ] })
2608
2760
  ] }) : null,
2609
2761
  n === 4 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2610
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.rowEven, children: [
2762
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles16.rowEven, children: [
2611
2763
  /* @__PURE__ */ jsxRuntime.jsx(
2612
2764
  Tile,
2613
2765
  {
2614
2766
  onLongPress,
2615
2767
  attachment: visible[0],
2616
- style: styles15.tileHalfSquare,
2768
+ style: styles16.tileHalfSquare,
2617
2769
  onPress: () => setViewerIndex(0),
2618
2770
  overlay: null
2619
2771
  }
@@ -2623,19 +2775,19 @@ function ImageMosaic({
2623
2775
  {
2624
2776
  onLongPress,
2625
2777
  attachment: visible[1],
2626
- style: styles15.tileHalfSquare,
2778
+ style: styles16.tileHalfSquare,
2627
2779
  onPress: () => setViewerIndex(1),
2628
2780
  overlay: null
2629
2781
  }
2630
2782
  )
2631
2783
  ] }),
2632
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.rowEven, { marginTop: 2 }], children: [
2784
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles16.rowEven, { marginTop: 2 }], children: [
2633
2785
  /* @__PURE__ */ jsxRuntime.jsx(
2634
2786
  Tile,
2635
2787
  {
2636
2788
  onLongPress,
2637
2789
  attachment: visible[2],
2638
- style: styles15.tileHalfSquare,
2790
+ style: styles16.tileHalfSquare,
2639
2791
  onPress: () => setViewerIndex(2),
2640
2792
  overlay: null
2641
2793
  }
@@ -2645,7 +2797,7 @@ function ImageMosaic({
2645
2797
  {
2646
2798
  onLongPress,
2647
2799
  attachment: visible[3],
2648
- style: styles15.tileHalfSquare,
2800
+ style: styles16.tileHalfSquare,
2649
2801
  onPress: () => setViewerIndex(3),
2650
2802
  overlay: overflow > 0 ? `+${overflow}` : null
2651
2803
  }
@@ -2662,6 +2814,7 @@ function ImageMosaic({
2662
2814
  transparent: true,
2663
2815
  animationType: "fade",
2664
2816
  onRequestClose: () => setViewerIndex(null),
2817
+ ...EDGE_TO_EDGE_MODAL,
2665
2818
  children: viewerIndex !== null ? /* @__PURE__ */ jsxRuntime.jsx(
2666
2819
  FullScreenViewer,
2667
2820
  {
@@ -2682,18 +2835,18 @@ function Tile({
2682
2835
  }) {
2683
2836
  const theme = usePoolseTheme();
2684
2837
  const { url } = react$1.useAttachmentUrl(attachment.id);
2685
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, onLongPress, style: [styles15.tileBase, style], children: [
2838
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, onLongPress, style: [styles16.tileBase, style], children: [
2686
2839
  url ? /* @__PURE__ */ jsxRuntime.jsx(
2687
2840
  reactNative.Image,
2688
2841
  {
2689
2842
  source: { uri: url },
2690
- style: [styles15.tileImage, { backgroundColor: theme.colors.surface2 }],
2843
+ style: [styles16.tileImage, { backgroundColor: theme.colors.surface2 }],
2691
2844
  resizeMode: "cover",
2692
2845
  accessible: true,
2693
2846
  accessibilityLabel: attachment.original_filename ?? "image"
2694
2847
  }
2695
- ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles15.tileImage, { backgroundColor: theme.colors.surface2 }] }),
2696
- overlay ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles15.overflow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles15.overflowText, children: overlay }) }) : null
2848
+ ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles16.tileImage, { backgroundColor: theme.colors.surface2 }] }),
2849
+ overlay ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.overflow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles16.overflowText, children: overlay }) }) : null
2697
2850
  ] });
2698
2851
  }
2699
2852
  function FullScreenViewer({
@@ -2701,8 +2854,9 @@ function FullScreenViewer({
2701
2854
  onClose
2702
2855
  }) {
2703
2856
  const { url } = react$1.useAttachmentUrl(attachment.id);
2704
- const { width, height } = reactNative.Dimensions.get("window");
2705
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles15.viewer, onPress: onClose, children: [
2857
+ const { width, height } = reactNative.useWindowDimensions();
2858
+ const insets = useSafeInsets();
2859
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles16.viewer, onPress: onClose, children: [
2706
2860
  url ? /* @__PURE__ */ jsxRuntime.jsx(
2707
2861
  reactNative.Image,
2708
2862
  {
@@ -2718,14 +2872,14 @@ function FullScreenViewer({
2718
2872
  {
2719
2873
  onPress: onClose,
2720
2874
  hitSlop: 12,
2721
- style: styles15.closeBtn,
2875
+ style: [styles16.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
2722
2876
  accessibilityLabel: "Close viewer",
2723
2877
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
2724
2878
  }
2725
2879
  )
2726
2880
  ] });
2727
2881
  }
2728
- var styles15 = reactNative.StyleSheet.create({
2882
+ var styles16 = reactNative.StyleSheet.create({
2729
2883
  root: {
2730
2884
  width: "100%",
2731
2885
  overflow: "hidden",
@@ -2777,8 +2931,6 @@ var styles15 = reactNative.StyleSheet.create({
2777
2931
  },
2778
2932
  closeBtn: {
2779
2933
  position: "absolute",
2780
- top: 48,
2781
- right: 16,
2782
2934
  padding: 8,
2783
2935
  backgroundColor: "rgba(0,0,0,0.5)",
2784
2936
  borderRadius: 20
@@ -2916,22 +3068,22 @@ function MessageBubble({
2916
3068
  reactNative.View,
2917
3069
  {
2918
3070
  style: [
2919
- styles16.metaRow,
2920
- variant === "inline" && styles16.metaInline,
2921
- variant === "wrapped" && styles16.metaWrapped,
2922
- variant === "overlay" && styles16.metaOverlay,
2923
- variant === "block" && styles16.metaBlock,
3071
+ styles17.metaRow,
3072
+ variant === "inline" && styles17.metaInline,
3073
+ variant === "wrapped" && styles17.metaWrapped,
3074
+ variant === "overlay" && styles17.metaOverlay,
3075
+ variant === "block" && styles17.metaBlock,
2924
3076
  // File-only bubble: the meta row follows the cards directly —
2925
3077
  // give it air so the time doesn't sit glued to the card.
2926
- variant === "block" && hasFiles && !hasBody && styles16.metaBlockAfterFiles,
2927
- variant === "jumbo" && styles16.metaJumbo
3078
+ variant === "block" && hasFiles && !hasBody && styles17.metaBlockAfterFiles,
3079
+ variant === "jumbo" && styles17.metaJumbo
2928
3080
  ],
2929
3081
  onLayout: variant === "inline" || variant === "wrapped" ? (e) => setMetaWidth(e.nativeEvent.layout.width) : void 0,
2930
3082
  pointerEvents: "none",
2931
3083
  children: [
2932
- isEdited ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.editedTag, { color, opacity: 0.8 }], children: "edited" }) : null,
2933
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
2934
- isSelf && readState ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.readTick, children: /* @__PURE__ */ jsxRuntime.jsx(
3084
+ isEdited ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.editedTag, { color, opacity: 0.8 }], children: "edited" }) : null,
3085
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
3086
+ isSelf && readState ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles17.readTick, children: /* @__PURE__ */ jsxRuntime.jsx(
2935
3087
  PoolseIcon,
2936
3088
  {
2937
3089
  name: readState === "read" ? "check-double" : "check",
@@ -2943,7 +3095,7 @@ function MessageBubble({
2943
3095
  }
2944
3096
  );
2945
3097
  };
2946
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles16.wrap, { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }], children: [
3098
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles17.wrap, { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }], children: [
2947
3099
  /* @__PURE__ */ jsxRuntime.jsxs(
2948
3100
  reactNative.View,
2949
3101
  {
@@ -2963,7 +3115,7 @@ function MessageBubble({
2963
3115
  showSenderName && !isSelf && jumboCount === 0 && (groupPosition === "first" || groupPosition === "standalone") ? /* @__PURE__ */ jsxRuntime.jsx(
2964
3116
  reactNative.Text,
2965
3117
  {
2966
- style: [styles16.senderName, { color: senderTint, fontFamily: theme.type.fontBody }],
3118
+ style: [styles17.senderName, { color: senderTint, fontFamily: theme.type.fontBody }],
2967
3119
  children: senderLabel
2968
3120
  }
2969
3121
  ) : null,
@@ -2980,7 +3132,7 @@ function MessageBubble({
2980
3132
  // 3px of bubble color framing the picture; the mosaic clips
2981
3133
  // itself 3px tighter than the bubble so the curves stay
2982
3134
  // concentric.
2983
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles16.mediaFrame, children: [
3135
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.mediaFrame, children: [
2984
3136
  /* @__PURE__ */ jsxRuntime.jsx(
2985
3137
  ImageMosaic,
2986
3138
  {
@@ -2994,7 +3146,7 @@ function MessageBubble({
2994
3146
  metaOverlay ? metaRow("overlay") : null
2995
3147
  ] })
2996
3148
  ) : null,
2997
- hasFiles ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.filesBlock, children: files.map((att) => /* @__PURE__ */ jsxRuntime.jsx(
3149
+ hasFiles ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles17.filesBlock, children: files.map((att) => /* @__PURE__ */ jsxRuntime.jsx(
2998
3150
  AttachmentPreview,
2999
3151
  {
3000
3152
  attachment: att,
@@ -3003,7 +3155,7 @@ function MessageBubble({
3003
3155
  },
3004
3156
  att.id
3005
3157
  )) }) : null,
3006
- isDeleted ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles16.textBlock, sectionAbove && styles16.textBlockAfter], children: /* @__PURE__ */ jsxRuntime.jsx(
3158
+ isDeleted ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles17.textBlock, sectionAbove && styles17.textBlockAfter], children: /* @__PURE__ */ jsxRuntime.jsx(
3007
3159
  reactNative.Text,
3008
3160
  {
3009
3161
  style: {
@@ -3017,7 +3169,7 @@ function MessageBubble({
3017
3169
  children: "Message deleted"
3018
3170
  }
3019
3171
  ) }) : null,
3020
- hasBody && jumboCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.jumboBlock, children: /* @__PURE__ */ jsxRuntime.jsx(
3172
+ hasBody && jumboCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles17.jumboBlock, children: /* @__PURE__ */ jsxRuntime.jsx(
3021
3173
  reactNative.Text,
3022
3174
  {
3023
3175
  style: { fontSize: emojiFontSize(jumboCount), lineHeight: emojiFontSize(jumboCount) + 8 },
@@ -3027,7 +3179,7 @@ function MessageBubble({
3027
3179
  hasBody && jumboCount === 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
3028
3180
  reactNative.View,
3029
3181
  {
3030
- style: [styles16.textBlock, sectionAbove && styles16.textBlockAfter],
3182
+ style: [styles17.textBlock, sectionAbove && styles17.textBlockAfter],
3031
3183
  onLayout: inlineMeta ? (e) => setTextBoxWidth(e.nativeEvent.layout.width - 24) : void 0,
3032
3184
  children: [
3033
3185
  markdown && !inlineMeta ? renderMarkdown(truncated, {
@@ -3061,7 +3213,7 @@ function MessageBubble({
3061
3213
  reactNative.Text,
3062
3214
  {
3063
3215
  style: [
3064
- styles16.readMore,
3216
+ styles17.readMore,
3065
3217
  { color: isSelf ? theme.colors.onBrand : theme.colors.brand }
3066
3218
  ],
3067
3219
  children: expanded ? "Show less" : "Read more"
@@ -3072,7 +3224,7 @@ function MessageBubble({
3072
3224
  }
3073
3225
  ) : null,
3074
3226
  !inlineMeta && !metaOverlay && jumboCount === 0 ? metaRow("block") : null,
3075
- actionsTrigger ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.actionsSlot, children: actionsTrigger }) : null
3227
+ actionsTrigger ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles17.actionsSlot, children: actionsTrigger }) : null
3076
3228
  ]
3077
3229
  }
3078
3230
  ),
@@ -3097,15 +3249,15 @@ function QuotedCard({
3097
3249
  onPress,
3098
3250
  disabled: !onPress,
3099
3251
  style: [
3100
- styles16.quoted,
3252
+ styles17.quoted,
3101
3253
  {
3102
3254
  backgroundColor: bg,
3103
3255
  borderLeftColor: accent
3104
3256
  }
3105
3257
  ],
3106
3258
  children: [
3107
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
3108
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
3259
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
3260
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles17.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
3109
3261
  ]
3110
3262
  }
3111
3263
  );
@@ -3137,7 +3289,7 @@ function formatTime2(iso) {
3137
3289
  function isSameDay(a, b) {
3138
3290
  return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
3139
3291
  }
3140
- var styles16 = reactNative.StyleSheet.create({
3292
+ var styles17 = reactNative.StyleSheet.create({
3141
3293
  wrap: {
3142
3294
  marginBottom: 2
3143
3295
  },
@@ -3264,7 +3416,7 @@ function ReactionStrip({
3264
3416
  });
3265
3417
  const entries = Object.entries(reactions);
3266
3418
  if (entries.length === 0) return null;
3267
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles17.strip, children: entries.map(([emoji, userIds]) => {
3419
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles18.strip, children: entries.map(([emoji, userIds]) => {
3268
3420
  const userArr = Array.isArray(userIds) ? userIds : [];
3269
3421
  const meReacted = meId !== null && userArr.includes(meId);
3270
3422
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3272,7 +3424,7 @@ function ReactionStrip({
3272
3424
  {
3273
3425
  onPress: () => meReacted ? removeReaction(emoji) : addReaction(emoji),
3274
3426
  style: [
3275
- styles17.chip,
3427
+ styles18.chip,
3276
3428
  {
3277
3429
  backgroundColor: meReacted ? theme.colors.brandSoft : theme.colors.surface2,
3278
3430
  borderColor: meReacted ? theme.colors.brand : theme.colors.border,
@@ -3281,12 +3433,12 @@ function ReactionStrip({
3281
3433
  }
3282
3434
  ],
3283
3435
  children: [
3284
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles17.emoji, children: emoji }),
3436
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles18.emoji, children: emoji }),
3285
3437
  /* @__PURE__ */ jsxRuntime.jsx(
3286
3438
  reactNative.Text,
3287
3439
  {
3288
3440
  style: [
3289
- styles17.count,
3441
+ styles18.count,
3290
3442
  {
3291
3443
  color: meReacted ? theme.colors.brand : theme.colors.ink2,
3292
3444
  fontWeight: meReacted ? "700" : "600"
@@ -3308,33 +3460,51 @@ function ReactionPicker({
3308
3460
  emojis = DEFAULT_EMOJIS
3309
3461
  }) {
3310
3462
  const theme = usePoolseTheme();
3311
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles17.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(
3312
- reactNative.View,
3463
+ const insets = useSafeInsets();
3464
+ return /* @__PURE__ */ jsxRuntime.jsx(
3465
+ reactNative.Modal,
3313
3466
  {
3314
- style: [
3315
- styles17.sheet,
3316
- {
3317
- backgroundColor: theme.colors.surface,
3318
- borderRadius: theme.radii.lg
3319
- },
3320
- theme.shadows.lg
3321
- ],
3322
- children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
3467
+ visible,
3468
+ transparent: true,
3469
+ animationType: "fade",
3470
+ onRequestClose: onClose,
3471
+ ...EDGE_TO_EDGE_MODAL,
3472
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3323
3473
  reactNative.Pressable,
3324
3474
  {
3325
- style: styles17.emojiBtn,
3326
- onPress: () => {
3327
- onPick(emoji);
3328
- onClose();
3329
- },
3330
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles17.bigEmoji, children: emoji })
3331
- },
3332
- emoji
3333
- ))
3475
+ style: [styles18.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
3476
+ onPress: onClose,
3477
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3478
+ reactNative.View,
3479
+ {
3480
+ style: [
3481
+ styles18.sheet,
3482
+ {
3483
+ backgroundColor: theme.colors.surface,
3484
+ borderRadius: theme.radii.lg
3485
+ },
3486
+ theme.shadows.lg
3487
+ ],
3488
+ children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
3489
+ reactNative.Pressable,
3490
+ {
3491
+ style: styles18.emojiBtn,
3492
+ onPress: () => {
3493
+ onPick(emoji);
3494
+ onClose();
3495
+ },
3496
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles18.bigEmoji, children: emoji })
3497
+ },
3498
+ emoji
3499
+ ))
3500
+ }
3501
+ )
3502
+ }
3503
+ )
3334
3504
  }
3335
- ) }) });
3505
+ );
3336
3506
  }
3337
- var styles17 = reactNative.StyleSheet.create({
3507
+ var styles18 = reactNative.StyleSheet.create({
3338
3508
  strip: {
3339
3509
  flexDirection: "row",
3340
3510
  flexWrap: "wrap",
@@ -3394,7 +3564,14 @@ var SWIPE_REPLY_THRESHOLD = 50;
3394
3564
  function MessageRow(props) {
3395
3565
  const callLog = react$1.callLogDisplayFor(props.msg, props.meId);
3396
3566
  if (callLog !== void 0) {
3397
- return callLog ? /* @__PURE__ */ jsxRuntime.jsx(CallLogRow, { msg: props.msg, meId: props.meId }) : null;
3567
+ return callLog ? /* @__PURE__ */ jsxRuntime.jsx(
3568
+ CallLogRow,
3569
+ {
3570
+ msg: props.msg,
3571
+ meId: props.meId,
3572
+ ...props.onCallBack ? { onCallBack: props.onCallBack } : {}
3573
+ }
3574
+ ) : null;
3398
3575
  }
3399
3576
  return /* @__PURE__ */ jsxRuntime.jsx(BubbleMessageRow, { ...props });
3400
3577
  }
@@ -3509,15 +3686,15 @@ function BubbleMessageRow({
3509
3686
  reactNative.View,
3510
3687
  {
3511
3688
  style: [
3512
- styles18.row,
3689
+ styles19.row,
3513
3690
  { alignSelf: isSelf ? "flex-end" : "flex-start" },
3514
3691
  // Lift this row above the dim backdrop the parent renders
3515
3692
  // during edit mode. zIndex covers iOS / web; elevation does
3516
3693
  // the equivalent on Android.
3517
- isEditing ? styles18.rowEditing : null
3694
+ isEditing ? styles19.rowEditing : null
3518
3695
  ],
3519
3696
  children: [
3520
- showAvatarSlot ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles18.avatarSlot, children: showAvatarRender ? /* @__PURE__ */ jsxRuntime.jsx(
3697
+ showAvatarSlot ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.avatarSlot, children: showAvatarRender ? /* @__PURE__ */ jsxRuntime.jsx(
3521
3698
  Avatar,
3522
3699
  {
3523
3700
  src: avatarUrl ?? null,
@@ -3526,14 +3703,14 @@ function BubbleMessageRow({
3526
3703
  size: "sm"
3527
3704
  }
3528
3705
  ) : null }) : null,
3529
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles18.bubbleCol, children: [
3706
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.bubbleCol, children: [
3530
3707
  swipeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(
3531
3708
  reactNative.Animated.View,
3532
3709
  {
3533
3710
  pointerEvents: "none",
3534
3711
  style: [
3535
- styles18.replyHint,
3536
- isSelf ? styles18.replyHintRight : styles18.replyHintLeft,
3712
+ styles19.replyHint,
3713
+ isSelf ? styles19.replyHintRight : styles19.replyHintLeft,
3537
3714
  {
3538
3715
  opacity: replyIconOpacity,
3539
3716
  transform: [{ scale: replyIconScale }],
@@ -3579,13 +3756,13 @@ function BubbleMessageRow({
3579
3756
  )
3580
3757
  }
3581
3758
  ),
3582
- threads && (msg.reply_count ?? 0) > 0 && onOpenThread ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: onOpenThread, style: styles18.threadPill, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [styles18.threadPillText, { color: theme.colors.brand }], children: [
3759
+ threads && (msg.reply_count ?? 0) > 0 && onOpenThread ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: onOpenThread, style: styles19.threadPill, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [styles19.threadPillText, { color: theme.colors.brand }], children: [
3583
3760
  "\u{1F4AC} ",
3584
3761
  msg.reply_count,
3585
3762
  " ",
3586
3763
  msg.reply_count === 1 ? "reply" : "replies"
3587
3764
  ] }) }) : null,
3588
- reactions ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles18.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsxRuntime.jsx(
3765
+ reactions ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsxRuntime.jsx(
3589
3766
  ReactionStrip,
3590
3767
  {
3591
3768
  messageId: msg.id,
@@ -3644,7 +3821,7 @@ function BubbleMessageRow({
3644
3821
  }
3645
3822
  );
3646
3823
  }
3647
- var styles18 = reactNative.StyleSheet.create({
3824
+ var styles19 = reactNative.StyleSheet.create({
3648
3825
  row: {
3649
3826
  flexDirection: "row",
3650
3827
  alignItems: "flex-end",
@@ -3719,7 +3896,7 @@ function ThreadView({
3719
3896
  transparent: true,
3720
3897
  animationType: "slide",
3721
3898
  onRequestClose: onClose,
3722
- statusBarTranslucent: true,
3899
+ ...EDGE_TO_EDGE_MODAL,
3723
3900
  children: /* @__PURE__ */ jsxRuntime.jsx(UploadProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
3724
3901
  ThreadSheet,
3725
3902
  {
@@ -3751,8 +3928,14 @@ function ThreadSheet({
3751
3928
  loadMore,
3752
3929
  hasMore
3753
3930
  } = react$1.useThread(conversationId, rootMessage.id);
3754
- const { height: screenHeight } = reactNative.useWindowDimensions();
3755
- const sheetHeight = Math.round(screenHeight * SHEET_HEIGHT_FRACTION);
3931
+ const insets = useSafeInsets();
3932
+ const { height: windowHeight } = reactNative.useWindowDimensions();
3933
+ const [rootHeight, setRootHeight] = react.useState(0);
3934
+ const screenHeight = rootHeight || windowHeight;
3935
+ const sheetHeight = Math.min(
3936
+ Math.round(screenHeight * SHEET_HEIGHT_FRACTION),
3937
+ screenHeight - insets.top - 8
3938
+ );
3756
3939
  const gutter = screenHeight - sheetHeight;
3757
3940
  const { translateY, panHandlers } = useDismissableSheet({ onClose, sheetHeight });
3758
3941
  const [pickerOpen, setPickerOpen] = react.useState(false);
@@ -3804,93 +3987,102 @@ function ThreadSheet({
3804
3987
  ),
3805
3988
  [rootMessage, meId, labelFor, avatarFor]
3806
3989
  );
3807
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.modalRoot, children: [
3808
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles19.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
3809
- /* @__PURE__ */ jsxRuntime.jsxs(
3810
- reactNative.Animated.View,
3811
- {
3812
- style: [
3813
- styles19.sheet,
3990
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3991
+ reactNative.View,
3992
+ {
3993
+ style: styles20.modalRoot,
3994
+ onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
3995
+ children: [
3996
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles20.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
3997
+ /* @__PURE__ */ jsxRuntime.jsxs(
3998
+ reactNative.Animated.View,
3814
3999
  {
3815
- height: sheetHeight,
3816
- backgroundColor: theme.colors.paper,
3817
- borderTopLeftRadius: theme.radii.xl,
3818
- borderTopRightRadius: theme.radii.xl,
3819
- transform: [{ translateY }]
3820
- },
3821
- theme.shadows.lg
3822
- ],
3823
- children: [
3824
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ...panHandlers, children: [
3825
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
3826
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles19.header, { borderBottomColor: theme.colors.border }], children: [
3827
- /* @__PURE__ */ jsxRuntime.jsx(
3828
- reactNative.Pressable,
4000
+ style: [
4001
+ styles20.sheet,
4002
+ {
4003
+ height: sheetHeight,
4004
+ backgroundColor: theme.colors.paper,
4005
+ borderTopLeftRadius: theme.radii.xl,
4006
+ borderTopRightRadius: theme.radii.xl,
4007
+ paddingLeft: insets.left,
4008
+ paddingRight: insets.right,
4009
+ transform: [{ translateY }]
4010
+ },
4011
+ theme.shadows.lg
4012
+ ],
4013
+ children: [
4014
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ...panHandlers, children: [
4015
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles20.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles20.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
4016
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles20.header, { borderBottomColor: theme.colors.border }], children: [
4017
+ /* @__PURE__ */ jsxRuntime.jsx(
4018
+ reactNative.Pressable,
4019
+ {
4020
+ onPress: onClose,
4021
+ hitSlop: 16,
4022
+ style: [styles20.closeBtn, { backgroundColor: theme.colors.surface2 }],
4023
+ accessibilityLabel: "Close thread",
4024
+ children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
4025
+ }
4026
+ ),
4027
+ /* @__PURE__ */ jsxRuntime.jsx(
4028
+ reactNative.Text,
4029
+ {
4030
+ style: [
4031
+ styles20.title,
4032
+ { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4033
+ ],
4034
+ children: "Thread"
4035
+ }
4036
+ )
4037
+ ] })
4038
+ ] }),
4039
+ /* @__PURE__ */ jsxRuntime.jsxs(
4040
+ reactNative.KeyboardAvoidingView,
3829
4041
  {
3830
- onPress: onClose,
3831
- hitSlop: 16,
3832
- style: [styles19.closeBtn, { backgroundColor: theme.colors.surface2 }],
3833
- accessibilityLabel: "Close thread",
3834
- children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
4042
+ style: styles20.kavBody,
4043
+ behavior: "padding",
4044
+ keyboardVerticalOffset: gutter,
4045
+ children: [
4046
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles20.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
4047
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles20.listWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
4048
+ MessageList,
4049
+ {
4050
+ messages: replies,
4051
+ hasMore,
4052
+ onLoadMore: loadMore,
4053
+ renderItem: renderReply
4054
+ }
4055
+ ) }),
4056
+ /* @__PURE__ */ jsxRuntime.jsx(
4057
+ MessageComposer,
4058
+ {
4059
+ onSend: async (body, opts) => {
4060
+ await sendReply({ body, ...opts });
4061
+ },
4062
+ placeholder: "Reply to thread\u2026",
4063
+ attachments: true,
4064
+ onAttachPress: () => setPickerOpen(true),
4065
+ editingMessage,
4066
+ onCancelEdit: () => setEditingId(null),
4067
+ onSaveEdit: async (body) => {
4068
+ if (!editingId) return;
4069
+ await edit(editingId, body);
4070
+ setEditingId(null);
4071
+ }
4072
+ }
4073
+ )
4074
+ ]
3835
4075
  }
3836
4076
  ),
3837
- /* @__PURE__ */ jsxRuntime.jsx(
3838
- reactNative.Text,
3839
- {
3840
- style: [
3841
- styles19.title,
3842
- { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
3843
- ],
3844
- children: "Thread"
3845
- }
3846
- )
3847
- ] })
3848
- ] }),
3849
- /* @__PURE__ */ jsxRuntime.jsxs(
3850
- reactNative.KeyboardAvoidingView,
3851
- {
3852
- style: styles19.kavBody,
3853
- behavior: reactNative.Platform.OS === "ios" ? "padding" : "height",
3854
- keyboardVerticalOffset: reactNative.Platform.OS === "ios" ? gutter : 0,
3855
- children: [
3856
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
3857
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.listWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
3858
- MessageList,
3859
- {
3860
- messages: replies,
3861
- hasMore,
3862
- onLoadMore: loadMore,
3863
- renderItem: renderReply
3864
- }
3865
- ) }),
3866
- /* @__PURE__ */ jsxRuntime.jsx(
3867
- MessageComposer,
3868
- {
3869
- onSend: async (body, opts) => {
3870
- await sendReply({ body, ...opts });
3871
- },
3872
- placeholder: "Reply to thread\u2026",
3873
- attachments: true,
3874
- onAttachPress: () => setPickerOpen(true),
3875
- editingMessage,
3876
- onCancelEdit: () => setEditingId(null),
3877
- onSaveEdit: async (body) => {
3878
- if (!editingId) return;
3879
- await edit(editingId, body);
3880
- setEditingId(null);
3881
- }
3882
- }
3883
- )
3884
- ]
3885
- }
3886
- ),
3887
- /* @__PURE__ */ jsxRuntime.jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
3888
- ]
3889
- }
3890
- )
3891
- ] });
4077
+ /* @__PURE__ */ jsxRuntime.jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
4078
+ ]
4079
+ }
4080
+ )
4081
+ ]
4082
+ }
4083
+ );
3892
4084
  }
3893
- var styles19 = reactNative.StyleSheet.create({
4085
+ var styles20 = reactNative.StyleSheet.create({
3894
4086
  modalRoot: {
3895
4087
  flex: 1,
3896
4088
  justifyContent: "flex-end"
@@ -3962,7 +4154,7 @@ function TypingIndicator({ typing, labelFor }) {
3962
4154
  const ids = Array.from(typing);
3963
4155
  const isTyping = ids.length > 0;
3964
4156
  if (!isTyping) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { height: 0 } });
3965
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.row, children: [
4157
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.row, children: [
3966
4158
  /* @__PURE__ */ jsxRuntime.jsx(TypingDots, {}),
3967
4159
  /* @__PURE__ */ jsxRuntime.jsx(TypingLabel, { ids, ...labelFor ? { labelFor } : {} })
3968
4160
  ] });
@@ -4007,7 +4199,7 @@ function TypingDots() {
4007
4199
  ],
4008
4200
  opacity: val.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] })
4009
4201
  });
4010
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.dotsWrap, children: [
4202
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.dotsWrap, children: [
4011
4203
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(a) }),
4012
4204
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(b) }),
4013
4205
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(c) })
@@ -4023,9 +4215,9 @@ function TypingLabel({
4023
4215
  const name1 = useDisplayName(id1, labelFor);
4024
4216
  const name2 = useDisplayName(id2, labelFor);
4025
4217
  const text = ids.length === 1 ? `${name1} is typing` : ids.length === 2 ? `${name1} and ${name2} are typing` : `${ids.length} people are typing`;
4026
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles20.label, { color: theme.colors.ink2, fontFamily: theme.type.fontBody }], children: text });
4218
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles21.label, { color: theme.colors.ink2, fontFamily: theme.type.fontBody }], children: text });
4027
4219
  }
4028
- var styles20 = reactNative.StyleSheet.create({
4220
+ var styles21 = reactNative.StyleSheet.create({
4029
4221
  row: {
4030
4222
  flexDirection: "row",
4031
4223
  alignItems: "center",
@@ -4065,7 +4257,10 @@ function ConversationView({
4065
4257
  avatars = "auto",
4066
4258
  onMarkedRead,
4067
4259
  onSent,
4068
- keyboardOffset = 0
4260
+ keyboardOffset = 0,
4261
+ onCallBack,
4262
+ onJoinCall,
4263
+ currentCallId = null
4069
4264
  }) {
4070
4265
  const theme = usePoolseTheme();
4071
4266
  const { me } = react$1.useMe();
@@ -4174,11 +4369,13 @@ function ConversationView({
4174
4369
  showAvatar: showAvatars,
4175
4370
  maxBodyLength,
4176
4371
  groupPosition,
4177
- markdown
4372
+ markdown,
4373
+ ...onCallBack ? { onCallBack } : {}
4178
4374
  }
4179
4375
  );
4180
4376
  },
4181
4377
  [
4378
+ onCallBack,
4182
4379
  renderMessage,
4183
4380
  meId,
4184
4381
  readReceipts,
@@ -4270,12 +4467,21 @@ function ConversationView({
4270
4467
  return /* @__PURE__ */ jsxRuntime.jsx(UploadProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4271
4468
  reactNative.KeyboardAvoidingView,
4272
4469
  {
4273
- style: [styles21.root, { backgroundColor: theme.colors.paper }],
4470
+ style: [styles22.root, { backgroundColor: theme.colors.paper }],
4274
4471
  behavior: reactNative.Platform.OS === "ios" ? "padding" : "height",
4275
4472
  keyboardVerticalOffset: keyboardOffset,
4276
4473
  children: [
4277
4474
  headerNode,
4278
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.listWrap, children: [
4475
+ onJoinCall ? /* @__PURE__ */ jsxRuntime.jsx(
4476
+ JoinBanner,
4477
+ {
4478
+ conversationId,
4479
+ meId,
4480
+ currentCallId,
4481
+ onJoin: onJoinCall
4482
+ }
4483
+ ) : null,
4484
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.listWrap, children: [
4279
4485
  /* @__PURE__ */ jsxRuntime.jsx(
4280
4486
  MessageList,
4281
4487
  {
@@ -4293,7 +4499,7 @@ function ConversationView({
4293
4499
  editingId ? /* @__PURE__ */ jsxRuntime.jsx(
4294
4500
  reactNative.Pressable,
4295
4501
  {
4296
- style: styles21.editBackdrop,
4502
+ style: styles22.editBackdrop,
4297
4503
  onPress: () => setEditingId(null),
4298
4504
  accessibilityLabel: "Cancel editing"
4299
4505
  }
@@ -4315,6 +4521,17 @@ function ConversationView({
4315
4521
  }
4316
4522
  ) });
4317
4523
  }
4524
+ function JoinBanner({
4525
+ conversationId,
4526
+ meId,
4527
+ currentCallId,
4528
+ onJoin
4529
+ }) {
4530
+ const { call, participantIds } = react$1.useLiveCall(conversationId);
4531
+ if (!call || call.id === currentCallId) return null;
4532
+ if (meId !== null && participantIds.includes(meId)) return null;
4533
+ return /* @__PURE__ */ jsxRuntime.jsx(LiveCallBanner, { call, inCall: participantIds.length, onJoin });
4534
+ }
4318
4535
  function readStateForMessage(msg, members, meId, sequenceByMessageId) {
4319
4536
  const otherMembers = members.filter((m) => m.user_id !== meId);
4320
4537
  if (otherMembers.length === 0) return "sent";
@@ -4328,7 +4545,7 @@ function readStateForMessage(msg, members, meId, sequenceByMessageId) {
4328
4545
  });
4329
4546
  return anyRead ? "read" : "sent";
4330
4547
  }
4331
- var styles21 = reactNative.StyleSheet.create({
4548
+ var styles22 = reactNative.StyleSheet.create({
4332
4549
  root: {
4333
4550
  flex: 1
4334
4551
  },
@@ -4359,7 +4576,12 @@ function UserPickerSheet({
4359
4576
  const [query, setQuery] = react.useState("");
4360
4577
  const [selectedIds, setSelectedIds] = react.useState([]);
4361
4578
  const [groupName, setGroupName] = react.useState("");
4362
- const { height: screenHeight } = reactNative.useWindowDimensions();
4579
+ const insets = useSafeInsets();
4580
+ const keyboardOpen = useKeyboardOpen();
4581
+ const { height: windowHeight } = reactNative.useWindowDimensions();
4582
+ const [rootHeight, setRootHeight] = react.useState(0);
4583
+ const screenHeight = rootHeight || windowHeight;
4584
+ const sheetHeight = Math.min(Math.round(screenHeight * 0.85), screenHeight - insets.top - 8);
4363
4585
  const { translateY, panHandlers } = useDismissableSheet({
4364
4586
  onClose: () => {
4365
4587
  setQuery("");
@@ -4367,7 +4589,7 @@ function UserPickerSheet({
4367
4589
  setGroupName("");
4368
4590
  onClose();
4369
4591
  },
4370
- sheetHeight: screenHeight * 0.85
4592
+ sheetHeight
4371
4593
  });
4372
4594
  const excludeSet = react.useMemo(() => new Set(excludeIds ?? []), [excludeIds]);
4373
4595
  const filtered = react.useMemo(() => {
@@ -4409,142 +4631,164 @@ function UserPickerSheet({
4409
4631
  transparent: true,
4410
4632
  animationType: "slide",
4411
4633
  onRequestClose: handleClose,
4412
- statusBarTranslucent: true,
4413
- children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.modalRoot, children: [
4414
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles22.backdrop, onPress: handleClose }),
4415
- /* @__PURE__ */ jsxRuntime.jsxs(
4416
- reactNative.Animated.View,
4417
- {
4418
- style: [
4419
- styles22.sheet,
4634
+ ...EDGE_TO_EDGE_MODAL,
4635
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
4636
+ reactNative.View,
4637
+ {
4638
+ style: styles23.modalRoot,
4639
+ onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
4640
+ children: [
4641
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles23.backdrop, onPress: handleClose }),
4642
+ /* @__PURE__ */ jsxRuntime.jsx(
4643
+ reactNative.Animated.View,
4420
4644
  {
4421
- backgroundColor: theme.colors.paper,
4422
- borderTopLeftRadius: theme.radii.xl,
4423
- borderTopRightRadius: theme.radii.xl,
4424
- transform: [{ translateY }]
4425
- },
4426
- theme.shadows.lg
4427
- ],
4428
- children: [
4429
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { ...panHandlers, style: styles22.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles22.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
4430
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.header, children: [
4431
- /* @__PURE__ */ jsxRuntime.jsx(
4432
- reactNative.Pressable,
4433
- {
4434
- onPress: handleClose,
4435
- hitSlop: 16,
4436
- style: [styles22.closeBtn, { backgroundColor: theme.colors.surface2 }],
4437
- accessibilityLabel: "Close picker",
4438
- children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
4439
- }
4440
- ),
4441
- /* @__PURE__ */ jsxRuntime.jsx(
4442
- reactNative.Text,
4645
+ style: [
4646
+ styles23.sheet,
4443
4647
  {
4444
- style: [
4445
- styles22.title,
4446
- { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4447
- ],
4448
- numberOfLines: 1,
4449
- children: heading
4450
- }
4451
- ),
4452
- isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
4453
- reactNative.Pressable,
4648
+ backgroundColor: theme.colors.paper,
4649
+ borderTopLeftRadius: theme.radii.xl,
4650
+ borderTopRightRadius: theme.radii.xl,
4651
+ height: sheetHeight,
4652
+ // Last row clears the nav bar — unless the keyboard is
4653
+ // covering it, where the inset would just be a gap.
4654
+ paddingBottom: keyboardOpen ? 0 : insets.bottom,
4655
+ paddingLeft: insets.left,
4656
+ paddingRight: insets.right,
4657
+ transform: [{ translateY }]
4658
+ },
4659
+ theme.shadows.lg
4660
+ ],
4661
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
4662
+ reactNative.KeyboardAvoidingView,
4454
4663
  {
4455
- onPress: handleCreate,
4456
- disabled: !canCreate,
4457
- hitSlop: 6,
4458
- style: [
4459
- styles22.createBtn,
4460
- {
4461
- backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
4462
- opacity: canCreate ? 1 : 0.6
4463
- }
4464
- ],
4465
- children: /* @__PURE__ */ jsxRuntime.jsxs(
4466
- reactNative.Text,
4467
- {
4468
- style: {
4469
- color: canCreate ? theme.colors.onBrand : theme.colors.ink3,
4470
- fontWeight: "700",
4471
- fontSize: 13
4472
- },
4473
- children: [
4474
- "Create",
4475
- selectedIds.length > 0 ? ` (${selectedIds.length})` : ""
4476
- ]
4477
- }
4478
- )
4479
- }
4480
- ) : null
4481
- ] }),
4482
- isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
4483
- reactNative.TextInput,
4484
- {
4485
- placeholder: "Group name",
4486
- placeholderTextColor: theme.colors.ink3,
4487
- value: groupName,
4488
- onChangeText: setGroupName,
4489
- style: [
4490
- styles22.groupNameInput,
4491
- {
4492
- color: theme.colors.ink,
4493
- backgroundColor: theme.colors.surface2,
4494
- borderRadius: theme.radii.md,
4495
- fontFamily: theme.type.fontBody,
4496
- fontSize: theme.type.bodySize
4497
- }
4498
- ]
4499
- }
4500
- ) : null,
4501
- showSearch ? /* @__PURE__ */ jsxRuntime.jsx(
4502
- reactNative.TextInput,
4503
- {
4504
- placeholder: "Search\u2026",
4505
- placeholderTextColor: theme.colors.ink3,
4506
- value: query,
4507
- onChangeText: setQuery,
4508
- style: [
4509
- styles22.searchInput,
4510
- {
4511
- color: theme.colors.ink,
4512
- backgroundColor: theme.colors.surface2,
4513
- borderRadius: theme.radii.md,
4514
- fontFamily: theme.type.fontBody,
4515
- fontSize: 14
4516
- }
4517
- ]
4518
- }
4519
- ) : null,
4520
- /* @__PURE__ */ jsxRuntime.jsx(
4521
- reactNative.FlatList,
4522
- {
4523
- data: filtered,
4524
- keyExtractor: (u) => u.externalId,
4525
- ListEmptyComponent: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.empty, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.emptyText, { color: theme.colors.ink3 }], children: query ? "No matches." : "No users to show." }) }),
4526
- renderItem: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
4527
- UserRow,
4528
- {
4529
- user: item,
4530
- selected: selectedIds.includes(item.externalId),
4531
- isGroup,
4532
- onPress: () => {
4533
- if (isGroup) toggle(item.externalId);
4534
- else {
4535
- onPickDirect?.(item.externalId);
4536
- reset();
4537
- onClose();
4664
+ style: styles23.kav,
4665
+ behavior: "padding",
4666
+ keyboardVerticalOffset: screenHeight - sheetHeight,
4667
+ children: [
4668
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { ...panHandlers, style: styles23.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles23.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
4669
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles23.header, children: [
4670
+ /* @__PURE__ */ jsxRuntime.jsx(
4671
+ reactNative.Pressable,
4672
+ {
4673
+ onPress: handleClose,
4674
+ hitSlop: 16,
4675
+ style: [styles23.closeBtn, { backgroundColor: theme.colors.surface2 }],
4676
+ accessibilityLabel: "Close picker",
4677
+ children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
4678
+ }
4679
+ ),
4680
+ /* @__PURE__ */ jsxRuntime.jsx(
4681
+ reactNative.Text,
4682
+ {
4683
+ style: [
4684
+ styles23.title,
4685
+ { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4686
+ ],
4687
+ numberOfLines: 1,
4688
+ children: heading
4689
+ }
4690
+ ),
4691
+ isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
4692
+ reactNative.Pressable,
4693
+ {
4694
+ onPress: handleCreate,
4695
+ disabled: !canCreate,
4696
+ hitSlop: 6,
4697
+ style: [
4698
+ styles23.createBtn,
4699
+ {
4700
+ backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
4701
+ opacity: canCreate ? 1 : 0.6
4702
+ }
4703
+ ],
4704
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
4705
+ reactNative.Text,
4706
+ {
4707
+ style: {
4708
+ color: canCreate ? theme.colors.onBrand : theme.colors.ink3,
4709
+ fontWeight: "700",
4710
+ fontSize: 13
4711
+ },
4712
+ children: [
4713
+ "Create",
4714
+ selectedIds.length > 0 ? ` (${selectedIds.length})` : ""
4715
+ ]
4716
+ }
4717
+ )
4718
+ }
4719
+ ) : null
4720
+ ] }),
4721
+ isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
4722
+ reactNative.TextInput,
4723
+ {
4724
+ placeholder: "Group name",
4725
+ placeholderTextColor: theme.colors.ink3,
4726
+ value: groupName,
4727
+ onChangeText: setGroupName,
4728
+ style: [
4729
+ styles23.groupNameInput,
4730
+ {
4731
+ color: theme.colors.ink,
4732
+ backgroundColor: theme.colors.surface2,
4733
+ borderRadius: theme.radii.md,
4734
+ fontFamily: theme.type.fontBody,
4735
+ fontSize: theme.type.bodySize
4736
+ }
4737
+ ]
4538
4738
  }
4539
- }
4540
- }
4541
- )
4542
- }
4543
- )
4544
- ]
4545
- }
4546
- )
4547
- ] })
4739
+ ) : null,
4740
+ showSearch ? /* @__PURE__ */ jsxRuntime.jsx(
4741
+ reactNative.TextInput,
4742
+ {
4743
+ placeholder: "Search\u2026",
4744
+ placeholderTextColor: theme.colors.ink3,
4745
+ value: query,
4746
+ onChangeText: setQuery,
4747
+ style: [
4748
+ styles23.searchInput,
4749
+ {
4750
+ color: theme.colors.ink,
4751
+ backgroundColor: theme.colors.surface2,
4752
+ borderRadius: theme.radii.md,
4753
+ fontFamily: theme.type.fontBody,
4754
+ fontSize: 14
4755
+ }
4756
+ ]
4757
+ }
4758
+ ) : null,
4759
+ /* @__PURE__ */ jsxRuntime.jsx(
4760
+ reactNative.FlatList,
4761
+ {
4762
+ data: filtered,
4763
+ keyExtractor: (u) => u.externalId,
4764
+ keyboardShouldPersistTaps: "handled",
4765
+ ListEmptyComponent: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles23.empty, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.emptyText, { color: theme.colors.ink3 }], children: query ? "No matches." : "No users to show." }) }),
4766
+ renderItem: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
4767
+ UserRow,
4768
+ {
4769
+ user: item,
4770
+ selected: selectedIds.includes(item.externalId),
4771
+ isGroup,
4772
+ onPress: () => {
4773
+ if (isGroup) toggle(item.externalId);
4774
+ else {
4775
+ onPickDirect?.(item.externalId);
4776
+ reset();
4777
+ onClose();
4778
+ }
4779
+ }
4780
+ }
4781
+ )
4782
+ }
4783
+ )
4784
+ ]
4785
+ }
4786
+ )
4787
+ }
4788
+ )
4789
+ ]
4790
+ }
4791
+ )
4548
4792
  }
4549
4793
  );
4550
4794
  }
@@ -4560,29 +4804,29 @@ function UserRow({
4560
4804
  {
4561
4805
  onPress,
4562
4806
  style: [
4563
- styles22.row,
4807
+ styles23.row,
4564
4808
  {
4565
4809
  backgroundColor: selected ? theme.colors.brandSoft : "transparent"
4566
4810
  }
4567
4811
  ],
4568
4812
  children: [
4569
- user.avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: user.avatarUrl }, style: styles22.avatarImg }) : /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
4570
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.body, children: [
4813
+ user.avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: user.avatarUrl }, style: styles23.avatarImg }) : /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
4814
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles23.body, children: [
4571
4815
  /* @__PURE__ */ jsxRuntime.jsx(
4572
4816
  reactNative.Text,
4573
4817
  {
4574
- style: [styles22.name, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
4818
+ style: [styles23.name, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
4575
4819
  numberOfLines: 1,
4576
4820
  children: user.name
4577
4821
  }
4578
4822
  ),
4579
- user.subtitle ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.subtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: user.subtitle }) : null
4823
+ user.subtitle ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.subtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: user.subtitle }) : null
4580
4824
  ] }),
4581
4825
  isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
4582
4826
  reactNative.View,
4583
4827
  {
4584
4828
  style: [
4585
- styles22.checkbox,
4829
+ styles23.checkbox,
4586
4830
  {
4587
4831
  borderColor: selected ? theme.colors.brand : theme.colors.border,
4588
4832
  backgroundColor: selected ? theme.colors.brand : "transparent"
@@ -4595,7 +4839,7 @@ function UserRow({
4595
4839
  }
4596
4840
  );
4597
4841
  }
4598
- var styles22 = reactNative.StyleSheet.create({
4842
+ var styles23 = reactNative.StyleSheet.create({
4599
4843
  modalRoot: {
4600
4844
  flex: 1,
4601
4845
  justifyContent: "flex-end"
@@ -4605,9 +4849,11 @@ var styles22 = reactNative.StyleSheet.create({
4605
4849
  backgroundColor: "rgba(0,0,0,0.4)"
4606
4850
  },
4607
4851
  sheet: {
4608
- height: "85%",
4609
4852
  overflow: "hidden"
4610
4853
  },
4854
+ kav: {
4855
+ flex: 1
4856
+ },
4611
4857
  dragHandle: {
4612
4858
  alignItems: "center",
4613
4859
  paddingTop: 8,
@@ -4857,7 +5103,7 @@ var PoolseInbox = react.forwardRef(
4857
5103
  },
4858
5104
  [renderConversationRow, meExternalId, meId, labelFor, avatarFor, unreadCounts]
4859
5105
  );
4860
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles23.root, { backgroundColor: theme.colors.paper }], children: [
5106
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles24.root, { backgroundColor: theme.colors.paper }], children: [
4861
5107
  /* @__PURE__ */ jsxRuntime.jsxs(
4862
5108
  reactNative.Animated.View,
4863
5109
  {
@@ -4868,7 +5114,7 @@ var PoolseInbox = react.forwardRef(
4868
5114
  reactNative.View,
4869
5115
  {
4870
5116
  style: [
4871
- styles23.listHeader,
5117
+ styles24.listHeader,
4872
5118
  {
4873
5119
  backgroundColor: theme.colors.surface,
4874
5120
  borderBottomColor: theme.colors.border
@@ -4879,13 +5125,13 @@ var PoolseInbox = react.forwardRef(
4879
5125
  reactNative.Text,
4880
5126
  {
4881
5127
  style: [
4882
- styles23.listTitle,
5128
+ styles24.listTitle,
4883
5129
  { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4884
5130
  ],
4885
5131
  children: title
4886
5132
  }
4887
5133
  ),
4888
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles23.headerActions, children: [
5134
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.headerActions, children: [
4889
5135
  users ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4890
5136
  /* @__PURE__ */ jsxRuntime.jsx(
4891
5137
  HeaderIconButton,
@@ -4998,7 +5244,7 @@ function HeaderIconButton({
4998
5244
  hitSlop: 10,
4999
5245
  accessibilityLabel: label,
5000
5246
  style: ({ pressed }) => [
5001
- styles23.iconBtn,
5247
+ styles24.iconBtn,
5002
5248
  {
5003
5249
  backgroundColor: pressed ? theme.colors.surface2 : "transparent"
5004
5250
  }
@@ -5029,31 +5275,31 @@ function DefaultConversationRow({
5029
5275
  {
5030
5276
  onPress,
5031
5277
  style: [
5032
- styles23.row,
5278
+ styles24.row,
5033
5279
  {
5034
5280
  backgroundColor: selected ? theme.colors.surface2 : "transparent",
5035
5281
  borderBottomColor: theme.colors.border
5036
5282
  }
5037
5283
  ],
5038
5284
  children: [
5039
- avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: avatarUrl }, style: styles23.rowAvatar }) : /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: title, seed: avatarSeed, size: "md" }),
5040
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles23.rowBody, children: [
5285
+ avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: avatarUrl }, style: styles24.rowAvatar }) : /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: title, seed: avatarSeed, size: "md" }),
5286
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.rowBody, children: [
5041
5287
  /* @__PURE__ */ jsxRuntime.jsx(
5042
5288
  reactNative.Text,
5043
5289
  {
5044
- style: [styles23.rowTitle, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
5290
+ style: [styles24.rowTitle, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
5045
5291
  numberOfLines: 1,
5046
5292
  children: title
5047
5293
  }
5048
5294
  ),
5049
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.rowSubtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: react$1.formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
5295
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.rowSubtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: react$1.formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
5050
5296
  ] }),
5051
- unread > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles23.unreadPill, { backgroundColor: theme.colors.unreadPill }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.unreadText, { color: theme.colors.unreadPillText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
5297
+ unread > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles24.unreadPill, { backgroundColor: theme.colors.unreadPill }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.unreadText, { color: theme.colors.unreadPillText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
5052
5298
  ]
5053
5299
  }
5054
5300
  );
5055
5301
  }
5056
- var styles23 = reactNative.StyleSheet.create({
5302
+ var styles24 = reactNative.StyleSheet.create({
5057
5303
  root: {
5058
5304
  flex: 1,
5059
5305
  overflow: "hidden"
@@ -5257,10 +5503,10 @@ function VoiceRoomBar({
5257
5503
  reactNative.View,
5258
5504
  {
5259
5505
  style: [
5260
- styles24.bar,
5506
+ styles25.bar,
5261
5507
  { backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
5262
5508
  ],
5263
- children: unavailableSlot ?? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.hint, { color: theme.colors.ink3 }], children: "Voice needs react-native-webrtc and a development build." })
5509
+ children: unavailableSlot ?? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.hint, { color: theme.colors.ink3 }], children: "Voice needs react-native-webrtc and a development build." })
5264
5510
  }
5265
5511
  );
5266
5512
  }
@@ -5268,22 +5514,22 @@ function VoiceRoomBar({
5268
5514
  reactNative.View,
5269
5515
  {
5270
5516
  style: [
5271
- styles24.bar,
5517
+ styles25.bar,
5272
5518
  { backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
5273
5519
  ],
5274
5520
  children: [
5275
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.row, children: [
5521
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles25.row, children: [
5276
5522
  /* @__PURE__ */ jsxRuntime.jsx(
5277
5523
  reactNative.View,
5278
5524
  {
5279
5525
  style: [
5280
- styles24.dot,
5526
+ styles25.dot,
5281
5527
  { backgroundColor: connected ? theme.colors.brand : theme.colors.ink3 }
5282
5528
  ]
5283
5529
  }
5284
5530
  ),
5285
5531
  connected ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5286
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles24.people, children: participants.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.hint, { color: theme.colors.ink3 }], children: "Waiting for others\u2026" }) : participants.map((p) => /* @__PURE__ */ jsxRuntime.jsx(ParticipantChip, { participant: p, label: label(p.userId) }, p.userId)) }),
5532
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.people, children: participants.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.hint, { color: theme.colors.ink3 }], children: "Waiting for others\u2026" }) : participants.map((p) => /* @__PURE__ */ jsxRuntime.jsx(ParticipantChip, { participant: p, label: label(p.userId) }, p.userId)) }),
5287
5533
  /* @__PURE__ */ jsxRuntime.jsx(
5288
5534
  reactNative.Pressable,
5289
5535
  {
@@ -5291,7 +5537,7 @@ function VoiceRoomBar({
5291
5537
  accessibilityRole: "button",
5292
5538
  accessibilityState: { selected: muted },
5293
5539
  style: [
5294
- styles24.btn,
5540
+ styles25.btn,
5295
5541
  {
5296
5542
  borderColor: muted ? theme.colors.brand : theme.colors.border,
5297
5543
  backgroundColor: muted ? theme.colors.brandSoft : theme.colors.paper
@@ -5305,25 +5551,25 @@ function VoiceRoomBar({
5305
5551
  {
5306
5552
  onPress: leave,
5307
5553
  accessibilityRole: "button",
5308
- style: [styles24.btn, { borderColor: theme.colors.error }],
5554
+ style: [styles25.btn, { borderColor: theme.colors.error }],
5309
5555
  children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { color: theme.colors.error }, children: "Leave" })
5310
5556
  }
5311
5557
  )
5312
5558
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5313
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.hint, { color: theme.colors.ink3 }], children: status === "connecting" ? "Connecting\u2026" : "Talk to everyone here" }),
5559
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.hint, { color: theme.colors.ink3 }], children: status === "connecting" ? "Connecting\u2026" : "Talk to everyone here" }),
5314
5560
  /* @__PURE__ */ jsxRuntime.jsx(
5315
5561
  reactNative.Pressable,
5316
5562
  {
5317
5563
  onPress: () => void join(),
5318
5564
  disabled: status === "connecting",
5319
5565
  accessibilityRole: "button",
5320
- style: [styles24.btn, styles24.btnPrimary, { backgroundColor: theme.colors.brand }],
5566
+ style: [styles25.btn, styles25.btnPrimary, { backgroundColor: theme.colors.brand }],
5321
5567
  children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { color: theme.colors.onBrand, fontWeight: "600" }, children: status === "connecting" ? "Joining\u2026" : "Join Voice" })
5322
5568
  }
5323
5569
  )
5324
5570
  ] })
5325
5571
  ] }),
5326
- error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.error, { color: theme.colors.error }], children: error.message })
5572
+ error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.error, { color: theme.colors.error }], children: error.message })
5327
5573
  ]
5328
5574
  }
5329
5575
  );
@@ -5334,7 +5580,7 @@ function ParticipantChip({ participant, label }) {
5334
5580
  reactNative.View,
5335
5581
  {
5336
5582
  style: [
5337
- styles24.chip,
5583
+ styles25.chip,
5338
5584
  {
5339
5585
  backgroundColor: theme.colors.paper,
5340
5586
  // The speaking ring is a border colour swap rather than an
@@ -5353,7 +5599,7 @@ function ParticipantChip({ participant, label }) {
5353
5599
  }
5354
5600
  );
5355
5601
  }
5356
- var styles24 = reactNative.StyleSheet.create({
5602
+ var styles25 = reactNative.StyleSheet.create({
5357
5603
  bar: { paddingHorizontal: 14, paddingVertical: 8, borderBottomWidth: reactNative.StyleSheet.hairlineWidth },
5358
5604
  row: { flexDirection: "row", alignItems: "center", gap: 8, flexWrap: "wrap" },
5359
5605
  dot: { width: 8, height: 8, borderRadius: 4 },
@@ -5422,42 +5668,60 @@ function AudioRouteSheet({
5422
5668
  onSelect,
5423
5669
  onClose
5424
5670
  }) {
5425
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles25.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles25.sheet, onPress: () => {
5426
- }, children: [
5427
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.grabber }),
5428
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles25.title, children: "Audio output" }),
5429
- routes.map((route) => {
5430
- const selected = route.id === selectedRouteId;
5431
- return /* @__PURE__ */ jsxRuntime.jsxs(
5671
+ const insets = useSafeInsets();
5672
+ return /* @__PURE__ */ jsxRuntime.jsx(
5673
+ reactNative.Modal,
5674
+ {
5675
+ visible,
5676
+ transparent: true,
5677
+ animationType: "fade",
5678
+ onRequestClose: onClose,
5679
+ ...EDGE_TO_EDGE_MODAL,
5680
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles26.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxRuntime.jsxs(
5432
5681
  reactNative.Pressable,
5433
5682
  {
5683
+ style: [styles26.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
5434
5684
  onPress: () => {
5435
- onSelect(route.id);
5436
- onClose();
5437
5685
  },
5438
- accessibilityRole: "button",
5439
- accessibilityState: { selected },
5440
- style: ({ pressed }) => [styles25.row, pressed && styles25.rowPressed],
5441
5686
  children: [
5442
- /* @__PURE__ */ jsxRuntime.jsx(
5443
- PoolseIcon,
5444
- {
5445
- name: ICONS2[route.kind],
5446
- size: 21,
5447
- color: selected ? callColors.accept : callColors.text,
5448
- label: null
5449
- }
5450
- ),
5451
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.label, selected && styles25.labelSelected], children: route.label }),
5452
- selected && /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
5687
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles26.grabber }),
5688
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles26.title, children: "Audio output" }),
5689
+ routes.map((route) => {
5690
+ const selected = route.id === selectedRouteId;
5691
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5692
+ reactNative.Pressable,
5693
+ {
5694
+ onPress: () => {
5695
+ onSelect(route.id);
5696
+ onClose();
5697
+ },
5698
+ accessibilityRole: "button",
5699
+ accessibilityState: { selected },
5700
+ style: ({ pressed }) => [styles26.row, pressed && styles26.rowPressed],
5701
+ children: [
5702
+ /* @__PURE__ */ jsxRuntime.jsx(
5703
+ PoolseIcon,
5704
+ {
5705
+ name: ICONS2[route.kind],
5706
+ size: 21,
5707
+ color: selected ? callColors.accept : callColors.text,
5708
+ label: null
5709
+ }
5710
+ ),
5711
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles26.label, selected && styles26.labelSelected], children: route.label }),
5712
+ selected && /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
5713
+ ]
5714
+ },
5715
+ route.id
5716
+ );
5717
+ })
5453
5718
  ]
5454
- },
5455
- route.id
5456
- );
5457
- })
5458
- ] }) }) });
5719
+ }
5720
+ ) })
5721
+ }
5722
+ );
5459
5723
  }
5460
- var styles25 = reactNative.StyleSheet.create({
5724
+ var styles26 = reactNative.StyleSheet.create({
5461
5725
  backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
5462
5726
  sheet: {
5463
5727
  backgroundColor: callColors.tile,
@@ -5465,7 +5729,6 @@ var styles25 = reactNative.StyleSheet.create({
5465
5729
  borderTopRightRadius: 22,
5466
5730
  paddingHorizontal: 12,
5467
5731
  paddingTop: 10,
5468
- paddingBottom: 34,
5469
5732
  gap: 2
5470
5733
  },
5471
5734
  grabber: {
@@ -5539,11 +5802,11 @@ function PulseRings({ size, color }) {
5539
5802
  });
5540
5803
  return () => loops.forEach((l) => l.stop());
5541
5804
  }, []);
5542
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [reactNative.StyleSheet.absoluteFill, styles26.center], pointerEvents: "none", children: phases.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
5805
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [reactNative.StyleSheet.absoluteFill, styles27.center], pointerEvents: "none", children: phases.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
5543
5806
  reactNative.Animated.View,
5544
5807
  {
5545
5808
  style: [
5546
- styles26.ring,
5809
+ styles27.ring,
5547
5810
  {
5548
5811
  width: size,
5549
5812
  height: size,
@@ -5564,7 +5827,7 @@ function PulseRings({ size, color }) {
5564
5827
  i
5565
5828
  )) });
5566
5829
  }
5567
- var styles26 = reactNative.StyleSheet.create({
5830
+ var styles27 = reactNative.StyleSheet.create({
5568
5831
  center: { alignItems: "center", justifyContent: "center" },
5569
5832
  ring: { position: "absolute", borderWidth: 1.5 }
5570
5833
  });
@@ -5575,7 +5838,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
5575
5838
  reactNative.View,
5576
5839
  {
5577
5840
  style: [
5578
- styles27.ring,
5841
+ styles28.ring,
5579
5842
  {
5580
5843
  width: outer,
5581
5844
  height: outer,
@@ -5588,7 +5851,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
5588
5851
  reactNative.View,
5589
5852
  {
5590
5853
  style: [
5591
- styles27.circle,
5854
+ styles28.circle,
5592
5855
  {
5593
5856
  width: size,
5594
5857
  height: size,
@@ -5599,7 +5862,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
5599
5862
  children: /* @__PURE__ */ jsxRuntime.jsx(
5600
5863
  reactNative.Text,
5601
5864
  {
5602
- style: [styles27.initials, { fontSize: Math.round(size * 0.38) }],
5865
+ style: [styles28.initials, { fontSize: Math.round(size * 0.38) }],
5603
5866
  numberOfLines: 1,
5604
5867
  allowFontScaling: false,
5605
5868
  children: initialsOf(name)
@@ -5616,7 +5879,7 @@ function initialsOf(name) {
5616
5879
  if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
5617
5880
  return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
5618
5881
  }
5619
- var styles27 = reactNative.StyleSheet.create({
5882
+ var styles28 = reactNative.StyleSheet.create({
5620
5883
  ring: { alignItems: "center", justifyContent: "center" },
5621
5884
  circle: { alignItems: "center", justifyContent: "center" },
5622
5885
  initials: { color: "#ffffff", fontWeight: "600" }
@@ -5634,7 +5897,7 @@ function CallControlButton({
5634
5897
  const size = large ? CONTROL_SIZE_LARGE : CONTROL_SIZE;
5635
5898
  const background = tone === "danger" ? callColors.danger : tone === "accept" ? callColors.accept : active ? callColors.controlActive : callColors.control;
5636
5899
  const iconColor = tone === "neutral" && active ? callColors.controlActiveIcon : callColors.onAction;
5637
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles28.slot, children: [
5900
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles29.slot, children: [
5638
5901
  /* @__PURE__ */ jsxRuntime.jsx(
5639
5902
  reactNative.Pressable,
5640
5903
  {
@@ -5645,7 +5908,7 @@ function CallControlButton({
5645
5908
  accessibilityLabel: accessibilityLabel ?? label ?? icon,
5646
5909
  hitSlop: 8,
5647
5910
  style: ({ pressed }) => [
5648
- styles28.button,
5911
+ styles29.button,
5649
5912
  {
5650
5913
  width: size,
5651
5914
  height: size,
@@ -5659,10 +5922,10 @@ function CallControlButton({
5659
5922
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: icon, size: large ? 30 : 25, color: iconColor, label: null })
5660
5923
  }
5661
5924
  ),
5662
- label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles28.label, children: label }) : null
5925
+ label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles29.label, children: label }) : null
5663
5926
  ] });
5664
5927
  }
5665
- var styles28 = reactNative.StyleSheet.create({
5928
+ var styles29 = reactNative.StyleSheet.create({
5666
5929
  // Fixed width so captions of different lengths cannot shift the row.
5667
5930
  slot: { width: 76, alignItems: "center", gap: 7 },
5668
5931
  button: { alignItems: "center", justifyContent: "center" },
@@ -5683,8 +5946,8 @@ function CallParticipantTile({
5683
5946
  reactNative.View,
5684
5947
  {
5685
5948
  style: [
5686
- styles29.tile,
5687
- bleed ? styles29.bleed : styles29.rounded,
5949
+ styles30.tile,
5950
+ bleed ? styles30.bleed : styles30.rounded,
5688
5951
  {
5689
5952
  backgroundColor: callColors.tile,
5690
5953
  // A ring rather than a badge: it reads at a glance across a
@@ -5703,7 +5966,7 @@ function CallParticipantTile({
5703
5966
  mirror: participant.isSelf,
5704
5967
  zOrder: participant.isSelf ? 1 : 0
5705
5968
  }
5706
- ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles29.placeholder, children: /* @__PURE__ */ jsxRuntime.jsx(
5969
+ ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles30.placeholder, children: /* @__PURE__ */ jsxRuntime.jsx(
5707
5970
  CallAvatar,
5708
5971
  {
5709
5972
  name,
@@ -5712,17 +5975,17 @@ function CallParticipantTile({
5712
5975
  speaking: participant.speaking
5713
5976
  }
5714
5977
  ) }),
5715
- !hideName && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles29.chip, bleed ? styles29.chipBleed : styles29.chipTile], children: [
5978
+ !hideName && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles30.chip, bleed ? styles30.chipBleed : styles30.chipTile], children: [
5716
5979
  !participant.micEnabled && // Worth showing even for yourself — it is the answer to
5717
5980
  // "why can nobody hear me".
5718
5981
  /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "mic-off", size: 13, color: callColors.text, label: "muted" }),
5719
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles29.name, children: name })
5982
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles30.name, children: name })
5720
5983
  ] })
5721
5984
  ]
5722
5985
  }
5723
5986
  );
5724
5987
  }
5725
- var styles29 = reactNative.StyleSheet.create({
5988
+ var styles30 = reactNative.StyleSheet.create({
5726
5989
  tile: { overflow: "hidden", justifyContent: "flex-end", borderWidth: 2 },
5727
5990
  rounded: { borderRadius: 18 },
5728
5991
  bleed: { borderRadius: 0, borderWidth: 0 },
@@ -5820,7 +6083,7 @@ function LocalVideoPip({
5820
6083
  reactNative.Animated.View,
5821
6084
  {
5822
6085
  ...responder.panHandlers,
5823
- style: [styles30.pip, { transform: pan.getTranslateTransform() }],
6086
+ style: [styles31.pip, { transform: pan.getTranslateTransform() }],
5824
6087
  children: /* @__PURE__ */ jsxRuntime.jsx(
5825
6088
  reactNative.Pressable,
5826
6089
  {
@@ -5830,8 +6093,8 @@ function LocalVideoPip({
5830
6093
  },
5831
6094
  accessibilityRole: "button",
5832
6095
  accessibilityLabel: "Your camera. Drag to move, tap to switch camera.",
5833
- style: styles30.fill,
5834
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles30.fill, children: /* @__PURE__ */ jsxRuntime.jsx(
6096
+ style: styles31.fill,
6097
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles31.fill, children: /* @__PURE__ */ jsxRuntime.jsx(
5835
6098
  CallParticipantTile,
5836
6099
  {
5837
6100
  participant,
@@ -5840,7 +6103,7 @@ function LocalVideoPip({
5840
6103
  avatarSize: 48,
5841
6104
  hideName: true,
5842
6105
  bleed: true,
5843
- style: styles30.fill
6106
+ style: styles31.fill
5844
6107
  }
5845
6108
  ) })
5846
6109
  }
@@ -5848,7 +6111,7 @@ function LocalVideoPip({
5848
6111
  }
5849
6112
  );
5850
6113
  }
5851
- var styles30 = reactNative.StyleSheet.create({
6114
+ var styles31 = reactNative.StyleSheet.create({
5852
6115
  pip: {
5853
6116
  position: "absolute",
5854
6117
  top: 0,
@@ -5897,11 +6160,11 @@ function CallVideoGrid({
5897
6160
  const availableHeight = size.height > 0 ? size.height - padTop - padBottom : 0;
5898
6161
  const tileHeight = availableHeight > 0 ? (availableHeight - GAP * (rows - 1)) / rows : 0;
5899
6162
  const scrolls = tileHeight > 0 && tileHeight < MIN_TILE_HEIGHT;
5900
- if (participants.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles31.stage, onLayout });
6163
+ if (participants.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.stage, onLayout });
5901
6164
  if (others.length <= 1) {
5902
6165
  const spotlight = others[0] ?? self;
5903
- if (!spotlight) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles31.stage, onLayout });
5904
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles31.stage, onLayout, children: [
6166
+ if (!spotlight) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.stage, onLayout });
6167
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.stage, onLayout, children: [
5905
6168
  /* @__PURE__ */ jsxRuntime.jsx(
5906
6169
  CallParticipantTile,
5907
6170
  {
@@ -5911,7 +6174,7 @@ function CallVideoGrid({
5911
6174
  avatarSize: Math.min(148, Math.max(96, Math.round(size.width * 0.36))),
5912
6175
  bleed: true,
5913
6176
  hideName: others.length === 1,
5914
- style: styles31.fill
6177
+ style: styles32.fill
5915
6178
  }
5916
6179
  ),
5917
6180
  self && others.length === 1 && size.width > 0 && /* @__PURE__ */ jsxRuntime.jsx(
@@ -5929,7 +6192,7 @@ function CallVideoGrid({
5929
6192
  }
5930
6193
  const tiles = [...others, ...self ? [self] : []];
5931
6194
  const width = size.width > 0 ? (size.width - GAP * (columns - 1)) / columns : 0;
5932
- const grid = /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles31.grid, scrolls ? styles31.gridScrolling : styles31.gridFilling], children: tiles.map((participant) => /* @__PURE__ */ jsxRuntime.jsx(
6195
+ const grid = /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles32.grid, scrolls ? styles32.gridScrolling : styles32.gridFilling], children: tiles.map((participant) => /* @__PURE__ */ jsxRuntime.jsx(
5933
6196
  CallParticipantTile,
5934
6197
  {
5935
6198
  participant,
@@ -5946,13 +6209,13 @@ function CallVideoGrid({
5946
6209
  return /* @__PURE__ */ jsxRuntime.jsx(
5947
6210
  reactNative.View,
5948
6211
  {
5949
- style: [styles31.stage, { paddingTop: padTop, paddingBottom: padBottom }],
6212
+ style: [styles32.stage, { paddingTop: padTop, paddingBottom: padBottom }],
5950
6213
  onLayout,
5951
6214
  children: scrolls ? /* @__PURE__ */ jsxRuntime.jsx(
5952
6215
  reactNative.ScrollView,
5953
6216
  {
5954
6217
  contentContainerStyle: [
5955
- styles31.scroll,
6218
+ styles32.scroll,
5956
6219
  { paddingBottom: (chromeInsets?.bottom ?? 0) + GAP }
5957
6220
  ],
5958
6221
  showsVerticalScrollIndicator: false,
@@ -5962,7 +6225,7 @@ function CallVideoGrid({
5962
6225
  }
5963
6226
  );
5964
6227
  }
5965
- var styles31 = reactNative.StyleSheet.create({
6228
+ var styles32 = reactNative.StyleSheet.create({
5966
6229
  stage: { flex: 1, overflow: "hidden" },
5967
6230
  fill: { ...reactNative.StyleSheet.absoluteFillObject },
5968
6231
  grid: { flexDirection: "row", flexWrap: "wrap", gap: GAP },
@@ -6321,7 +6584,7 @@ function CallScreen({
6321
6584
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.StatusBar, { barStyle: "light-content" }),
6322
6585
  /* @__PURE__ */ jsxRuntime.jsxs(reactNativeSafeAreaContext.SafeAreaProvider, { children: [
6323
6586
  /* @__PURE__ */ jsxRuntime.jsx(InsetsProbe, { onChange: setInsets }),
6324
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles32.screen, onPress: toggleChrome, accessible: false, children: [
6587
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles33.screen, onPress: toggleChrome, accessible: false, children: [
6325
6588
  /* @__PURE__ */ jsxRuntime.jsx(CallBackdrop, {}),
6326
6589
  showStage ? /* @__PURE__ */ jsxRuntime.jsx(
6327
6590
  CallVideoGrid,
@@ -6340,10 +6603,10 @@ function CallScreen({
6340
6603
  /* @__PURE__ */ jsxRuntime.jsxs(
6341
6604
  reactNative.View,
6342
6605
  {
6343
- style: [styles32.identity, { paddingBottom: insets.bottom + 160 }],
6606
+ style: [styles33.identity, { paddingBottom: insets.bottom + 160 }],
6344
6607
  pointerEvents: "none",
6345
6608
  children: [
6346
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.avatarStage, children: [
6609
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.avatarStage, children: [
6347
6610
  (ringingIn || ringingOut) && /* @__PURE__ */ jsxRuntime.jsx(PulseRings, { size: 132, color: callColors.glow }),
6348
6611
  /* @__PURE__ */ jsxRuntime.jsx(
6349
6612
  CallAvatar,
@@ -6354,31 +6617,31 @@ function CallScreen({
6354
6617
  }
6355
6618
  )
6356
6619
  ] }),
6357
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 2, style: styles32.identityTitle, children: title }),
6358
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.statusPill, children: [
6359
- connected && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.statusDot }),
6360
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles32.statusText, children: subtitle })
6620
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 2, style: styles33.identityTitle, children: title }),
6621
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.statusPill, children: [
6622
+ connected && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles33.statusDot }),
6623
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles33.statusText, children: subtitle })
6361
6624
  ] })
6362
6625
  ]
6363
6626
  }
6364
6627
  )
6365
6628
  ),
6366
- chromeVisible && showStage && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles32.header, { paddingTop: insets.top + 14 }], pointerEvents: "box-none", children: [
6367
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles32.title, children: title }),
6368
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.subtitleRow, children: [
6629
+ chromeVisible && showStage && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles33.header, { paddingTop: insets.top + 14 }], pointerEvents: "box-none", children: [
6630
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles33.title, children: title }),
6631
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.subtitleRow, children: [
6369
6632
  isGroup && /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "users", size: 14, color: callColors.textDim, label: null }),
6370
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles32.subtitle, children: isGroup ? `${participants.length} \xB7 ${subtitle}` : subtitle })
6633
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles33.subtitle, children: isGroup ? `${participants.length} \xB7 ${subtitle}` : subtitle })
6371
6634
  ] })
6372
6635
  ] }),
6373
6636
  chromeVisible && /* @__PURE__ */ jsxRuntime.jsxs(
6374
6637
  reactNative.View,
6375
6638
  {
6376
- style: [styles32.controls, { paddingBottom: insets.bottom + 22 }],
6639
+ style: [styles33.controls, { paddingBottom: insets.bottom + 22 }],
6377
6640
  pointerEvents: "box-none",
6378
6641
  children: [
6379
- error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles32.error, children: error.message }),
6380
- !meshAvailable && !livekit && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles32.error, children: "No WebRTC module supplied \u2014 this call has no audio." }),
6381
- ringingIn ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.answerRow, children: [
6642
+ error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles33.error, children: error.message }),
6643
+ !meshAvailable && !livekit && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles33.error, children: "No WebRTC module supplied \u2014 this call has no audio." }),
6644
+ ringingIn ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.answerRow, children: [
6382
6645
  /* @__PURE__ */ jsxRuntime.jsx(
6383
6646
  CallControlButton,
6384
6647
  {
@@ -6401,7 +6664,7 @@ function CallScreen({
6401
6664
  accessibilityLabel: "Accept call"
6402
6665
  }
6403
6666
  )
6404
- ] }) : ended ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.row, children: /* @__PURE__ */ jsxRuntime.jsx(
6667
+ ] }) : ended ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles33.row, children: /* @__PURE__ */ jsxRuntime.jsx(
6405
6668
  CallControlButton,
6406
6669
  {
6407
6670
  icon: "close",
@@ -6410,7 +6673,7 @@ function CallScreen({
6410
6673
  accessibilityLabel: "Close"
6411
6674
  }
6412
6675
  ) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6413
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.dock, children: [
6676
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles33.dock, children: [
6414
6677
  /* @__PURE__ */ jsxRuntime.jsx(
6415
6678
  CallControlButton,
6416
6679
  {
@@ -6451,7 +6714,7 @@ function CallScreen({
6451
6714
  }
6452
6715
  )
6453
6716
  ] }),
6454
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.hangUpRow, children: /* @__PURE__ */ jsxRuntime.jsx(
6717
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles33.hangUpRow, children: /* @__PURE__ */ jsxRuntime.jsx(
6455
6718
  CallControlButton,
6456
6719
  {
6457
6720
  icon: "phone-off",
@@ -6527,7 +6790,7 @@ function statusLine(calls, mediaStatus) {
6527
6790
  return "";
6528
6791
  }
6529
6792
  }
6530
- var styles32 = reactNative.StyleSheet.create({
6793
+ var styles33 = reactNative.StyleSheet.create({
6531
6794
  screen: { flex: 1, backgroundColor: callColors.bg },
6532
6795
  identity: {
6533
6796
  flex: 1,
@@ -6847,6 +7110,7 @@ exports.ConversationView = ConversationView;
6847
7110
  exports.DaySeparator = DaySeparator;
6848
7111
  exports.GroupDetailsSheet = GroupDetailsSheet;
6849
7112
  exports.ImageMosaic = ImageMosaic;
7113
+ exports.LiveCallBanner = LiveCallBanner;
6850
7114
  exports.LocalVideoPip = LocalVideoPip;
6851
7115
  exports.MemberList = MemberList;
6852
7116
  exports.MentionInput = MentionInput;