@poolse/react-native 2.25.0 → 2.25.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.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);
@@ -1669,7 +1697,24 @@ var styles8 = reactNative.StyleSheet.create({
1669
1697
  fontWeight: "700"
1670
1698
  }
1671
1699
  });
1672
- var useSafeInsets = reactNativeSafeAreaContext.useSafeAreaInsets;
1700
+ function useKeyboardOpen() {
1701
+ const [open, setOpen] = react.useState(false);
1702
+ react.useEffect(() => {
1703
+ const show = reactNative.Keyboard.addListener(
1704
+ reactNative.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
1705
+ () => setOpen(true)
1706
+ );
1707
+ const hide = reactNative.Keyboard.addListener(
1708
+ reactNative.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
1709
+ () => setOpen(false)
1710
+ );
1711
+ return () => {
1712
+ show.remove();
1713
+ hide.remove();
1714
+ };
1715
+ }, []);
1716
+ return open;
1717
+ }
1673
1718
  var MessageComposer = react.forwardRef(
1674
1719
  function MessageComposer2({
1675
1720
  onSend,
@@ -1690,23 +1735,9 @@ var MessageComposer = react.forwardRef(
1690
1735
  const inputRef = react.useRef(null);
1691
1736
  const [value, setValue] = react.useState("");
1692
1737
  const [sending, setSending] = react.useState(false);
1693
- const [keyboardOpen, setKeyboardOpen] = react.useState(false);
1738
+ const keyboardOpen = useKeyboardOpen();
1694
1739
  const upload = useSharedUpload();
1695
1740
  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
1741
  react.useImperativeHandle(
1711
1742
  ref,
1712
1743
  () => ({
@@ -1962,6 +1993,8 @@ var styles9 = reactNative.StyleSheet.create({
1962
1993
  });
1963
1994
  function MentionInput({ conversationId, onSend, ...composerProps }) {
1964
1995
  const theme = usePoolseTheme();
1996
+ const insets = useSafeInsets();
1997
+ const keyboardOpen = useKeyboardOpen();
1965
1998
  const { members } = react$1.useMembers(conversationId);
1966
1999
  const [pickerOpen, setPickerOpen] = react.useState(false);
1967
2000
  const [pickerQuery, _setPickerQuery] = react.useState("");
@@ -2000,7 +2033,8 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
2000
2033
  transparent: true,
2001
2034
  animationType: "slide",
2002
2035
  onRequestClose: () => setPickerOpen(false),
2003
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles10.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(
2036
+ ...EDGE_TO_EDGE_MODAL,
2037
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.KeyboardAvoidingView, { style: styles10.kav, behavior: "padding", children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles10.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(
2004
2038
  reactNative.View,
2005
2039
  {
2006
2040
  style: [
@@ -2008,7 +2042,12 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
2008
2042
  {
2009
2043
  backgroundColor: theme.colors.surface,
2010
2044
  borderTopLeftRadius: theme.radii.lg,
2011
- borderTopRightRadius: theme.radii.lg
2045
+ borderTopRightRadius: theme.radii.lg,
2046
+ // Clear the nav bar — unless the keyboard is covering
2047
+ // it, where the inset would just be a gap.
2048
+ paddingBottom: 12 + (keyboardOpen ? 0 : insets.bottom),
2049
+ paddingLeft: insets.left,
2050
+ paddingRight: insets.right
2012
2051
  }
2013
2052
  ],
2014
2053
  children: [
@@ -2024,6 +2063,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
2024
2063
  {
2025
2064
  data: filteredMembers,
2026
2065
  keyExtractor: (m) => m.user_id,
2066
+ keyboardShouldPersistTaps: "handled",
2027
2067
  renderItem: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
2028
2068
  MentionRow,
2029
2069
  {
@@ -2039,7 +2079,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
2039
2079
  )
2040
2080
  ]
2041
2081
  }
2042
- ) })
2082
+ ) }) })
2043
2083
  }
2044
2084
  )
2045
2085
  ] });
@@ -2052,6 +2092,9 @@ function MentionRow({ member, onPress }) {
2052
2092
  ] });
2053
2093
  }
2054
2094
  var styles10 = reactNative.StyleSheet.create({
2095
+ kav: {
2096
+ flex: 1
2097
+ },
2055
2098
  backdrop: {
2056
2099
  flex: 1,
2057
2100
  backgroundColor: "rgba(0,0,0,0.35)",
@@ -2304,6 +2347,7 @@ function MessageActions({
2304
2347
  onCopy
2305
2348
  }) {
2306
2349
  const theme = usePoolseTheme();
2350
+ const insets = useSafeInsets();
2307
2351
  const items = [];
2308
2352
  if (onReply) items.push({ label: "Reply", icon: "reply", onPress: onReply });
2309
2353
  if (onQuote) items.push({ label: "Quote reply", icon: "reply", onPress: onQuote });
@@ -2314,59 +2358,73 @@ function MessageActions({
2314
2358
  if (isSelf && onDelete)
2315
2359
  items.push({ label: "Delete", icon: "trash", onPress: onDelete, danger: true });
2316
2360
  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,
2361
+ return /* @__PURE__ */ jsxRuntime.jsx(
2362
+ reactNative.Modal,
2319
2363
  {
2320
- style: [
2321
- styles13.sheet,
2364
+ visible,
2365
+ transparent: true,
2366
+ animationType: "fade",
2367
+ onRequestClose: onClose,
2368
+ ...EDGE_TO_EDGE_MODAL,
2369
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles13.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
2370
+ reactNative.View,
2322
2371
  {
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,
2372
+ style: [
2373
+ styles13.sheet,
2355
2374
  {
2356
- style: [
2357
- styles13.itemText,
2375
+ backgroundColor: theme.colors.surface,
2376
+ borderTopLeftRadius: theme.radii.lg,
2377
+ borderTopRightRadius: theme.radii.lg,
2378
+ // Last action row must sit above the nav bar / home indicator.
2379
+ paddingBottom: 24 + insets.bottom,
2380
+ paddingLeft: insets.left,
2381
+ paddingRight: insets.right
2382
+ },
2383
+ theme.shadows.lg
2384
+ ],
2385
+ children: [
2386
+ showEmojiRow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles13.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
2387
+ reactNative.Pressable,
2388
+ {
2389
+ onPress: () => {
2390
+ onPickReaction(emoji);
2391
+ onClose();
2392
+ },
2393
+ style: styles13.emojiBtn,
2394
+ hitSlop: 6,
2395
+ accessibilityLabel: `React with ${emoji}`,
2396
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles13.emoji, children: emoji })
2397
+ },
2398
+ emoji
2399
+ )) }) : null,
2400
+ items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress: item.onPress, style: styles13.item, children: [
2401
+ /* @__PURE__ */ jsxRuntime.jsx(
2402
+ PoolseIcon,
2358
2403
  {
2359
- color: item.danger ? theme.colors.error : theme.colors.ink,
2360
- fontFamily: theme.type.fontBody
2404
+ name: item.icon,
2405
+ size: 18,
2406
+ color: item.danger ? theme.colors.error : theme.colors.ink2
2361
2407
  }
2362
- ],
2363
- children: item.label
2364
- }
2365
- )
2366
- ] }, item.label))
2367
- ]
2408
+ ),
2409
+ /* @__PURE__ */ jsxRuntime.jsx(
2410
+ reactNative.Text,
2411
+ {
2412
+ style: [
2413
+ styles13.itemText,
2414
+ {
2415
+ color: item.danger ? theme.colors.error : theme.colors.ink,
2416
+ fontFamily: theme.type.fontBody
2417
+ }
2418
+ ],
2419
+ children: item.label
2420
+ }
2421
+ )
2422
+ ] }, item.label))
2423
+ ]
2424
+ }
2425
+ ) })
2368
2426
  }
2369
- ) }) });
2427
+ );
2370
2428
  }
2371
2429
  var styles13 = reactNative.StyleSheet.create({
2372
2430
  backdrop: {
@@ -2662,6 +2720,7 @@ function ImageMosaic({
2662
2720
  transparent: true,
2663
2721
  animationType: "fade",
2664
2722
  onRequestClose: () => setViewerIndex(null),
2723
+ ...EDGE_TO_EDGE_MODAL,
2665
2724
  children: viewerIndex !== null ? /* @__PURE__ */ jsxRuntime.jsx(
2666
2725
  FullScreenViewer,
2667
2726
  {
@@ -2701,7 +2760,8 @@ function FullScreenViewer({
2701
2760
  onClose
2702
2761
  }) {
2703
2762
  const { url } = react$1.useAttachmentUrl(attachment.id);
2704
- const { width, height } = reactNative.Dimensions.get("window");
2763
+ const { width, height } = reactNative.useWindowDimensions();
2764
+ const insets = useSafeInsets();
2705
2765
  return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles15.viewer, onPress: onClose, children: [
2706
2766
  url ? /* @__PURE__ */ jsxRuntime.jsx(
2707
2767
  reactNative.Image,
@@ -2718,7 +2778,7 @@ function FullScreenViewer({
2718
2778
  {
2719
2779
  onPress: onClose,
2720
2780
  hitSlop: 12,
2721
- style: styles15.closeBtn,
2781
+ style: [styles15.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
2722
2782
  accessibilityLabel: "Close viewer",
2723
2783
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
2724
2784
  }
@@ -2777,8 +2837,6 @@ var styles15 = reactNative.StyleSheet.create({
2777
2837
  },
2778
2838
  closeBtn: {
2779
2839
  position: "absolute",
2780
- top: 48,
2781
- right: 16,
2782
2840
  padding: 8,
2783
2841
  backgroundColor: "rgba(0,0,0,0.5)",
2784
2842
  borderRadius: 20
@@ -3308,31 +3366,49 @@ function ReactionPicker({
3308
3366
  emojis = DEFAULT_EMOJIS
3309
3367
  }) {
3310
3368
  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,
3369
+ const insets = useSafeInsets();
3370
+ return /* @__PURE__ */ jsxRuntime.jsx(
3371
+ reactNative.Modal,
3313
3372
  {
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(
3373
+ visible,
3374
+ transparent: true,
3375
+ animationType: "fade",
3376
+ onRequestClose: onClose,
3377
+ ...EDGE_TO_EDGE_MODAL,
3378
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3323
3379
  reactNative.Pressable,
3324
3380
  {
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
- ))
3381
+ style: [styles17.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
3382
+ onPress: onClose,
3383
+ children: /* @__PURE__ */ jsxRuntime.jsx(
3384
+ reactNative.View,
3385
+ {
3386
+ style: [
3387
+ styles17.sheet,
3388
+ {
3389
+ backgroundColor: theme.colors.surface,
3390
+ borderRadius: theme.radii.lg
3391
+ },
3392
+ theme.shadows.lg
3393
+ ],
3394
+ children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
3395
+ reactNative.Pressable,
3396
+ {
3397
+ style: styles17.emojiBtn,
3398
+ onPress: () => {
3399
+ onPick(emoji);
3400
+ onClose();
3401
+ },
3402
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles17.bigEmoji, children: emoji })
3403
+ },
3404
+ emoji
3405
+ ))
3406
+ }
3407
+ )
3408
+ }
3409
+ )
3334
3410
  }
3335
- ) }) });
3411
+ );
3336
3412
  }
3337
3413
  var styles17 = reactNative.StyleSheet.create({
3338
3414
  strip: {
@@ -3719,7 +3795,7 @@ function ThreadView({
3719
3795
  transparent: true,
3720
3796
  animationType: "slide",
3721
3797
  onRequestClose: onClose,
3722
- statusBarTranslucent: true,
3798
+ ...EDGE_TO_EDGE_MODAL,
3723
3799
  children: /* @__PURE__ */ jsxRuntime.jsx(UploadProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
3724
3800
  ThreadSheet,
3725
3801
  {
@@ -3751,8 +3827,14 @@ function ThreadSheet({
3751
3827
  loadMore,
3752
3828
  hasMore
3753
3829
  } = react$1.useThread(conversationId, rootMessage.id);
3754
- const { height: screenHeight } = reactNative.useWindowDimensions();
3755
- const sheetHeight = Math.round(screenHeight * SHEET_HEIGHT_FRACTION);
3830
+ const insets = useSafeInsets();
3831
+ const { height: windowHeight } = reactNative.useWindowDimensions();
3832
+ const [rootHeight, setRootHeight] = react.useState(0);
3833
+ const screenHeight = rootHeight || windowHeight;
3834
+ const sheetHeight = Math.min(
3835
+ Math.round(screenHeight * SHEET_HEIGHT_FRACTION),
3836
+ screenHeight - insets.top - 8
3837
+ );
3756
3838
  const gutter = screenHeight - sheetHeight;
3757
3839
  const { translateY, panHandlers } = useDismissableSheet({ onClose, sheetHeight });
3758
3840
  const [pickerOpen, setPickerOpen] = react.useState(false);
@@ -3804,91 +3886,100 @@ function ThreadSheet({
3804
3886
  ),
3805
3887
  [rootMessage, meId, labelFor, avatarFor]
3806
3888
  );
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,
3889
+ return /* @__PURE__ */ jsxRuntime.jsxs(
3890
+ reactNative.View,
3891
+ {
3892
+ style: styles19.modalRoot,
3893
+ onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
3894
+ children: [
3895
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles19.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
3896
+ /* @__PURE__ */ jsxRuntime.jsxs(
3897
+ reactNative.Animated.View,
3814
3898
  {
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,
3899
+ style: [
3900
+ styles19.sheet,
3901
+ {
3902
+ height: sheetHeight,
3903
+ backgroundColor: theme.colors.paper,
3904
+ borderTopLeftRadius: theme.radii.xl,
3905
+ borderTopRightRadius: theme.radii.xl,
3906
+ paddingLeft: insets.left,
3907
+ paddingRight: insets.right,
3908
+ transform: [{ translateY }]
3909
+ },
3910
+ theme.shadows.lg
3911
+ ],
3912
+ children: [
3913
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ...panHandlers, children: [
3914
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
3915
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles19.header, { borderBottomColor: theme.colors.border }], children: [
3916
+ /* @__PURE__ */ jsxRuntime.jsx(
3917
+ reactNative.Pressable,
3918
+ {
3919
+ onPress: onClose,
3920
+ hitSlop: 16,
3921
+ style: [styles19.closeBtn, { backgroundColor: theme.colors.surface2 }],
3922
+ accessibilityLabel: "Close thread",
3923
+ children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
3924
+ }
3925
+ ),
3926
+ /* @__PURE__ */ jsxRuntime.jsx(
3927
+ reactNative.Text,
3928
+ {
3929
+ style: [
3930
+ styles19.title,
3931
+ { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
3932
+ ],
3933
+ children: "Thread"
3934
+ }
3935
+ )
3936
+ ] })
3937
+ ] }),
3938
+ /* @__PURE__ */ jsxRuntime.jsxs(
3939
+ reactNative.KeyboardAvoidingView,
3829
3940
  {
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 })
3941
+ style: styles19.kavBody,
3942
+ behavior: "padding",
3943
+ keyboardVerticalOffset: gutter,
3944
+ children: [
3945
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
3946
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.listWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
3947
+ MessageList,
3948
+ {
3949
+ messages: replies,
3950
+ hasMore,
3951
+ onLoadMore: loadMore,
3952
+ renderItem: renderReply
3953
+ }
3954
+ ) }),
3955
+ /* @__PURE__ */ jsxRuntime.jsx(
3956
+ MessageComposer,
3957
+ {
3958
+ onSend: async (body, opts) => {
3959
+ await sendReply({ body, ...opts });
3960
+ },
3961
+ placeholder: "Reply to thread\u2026",
3962
+ attachments: true,
3963
+ onAttachPress: () => setPickerOpen(true),
3964
+ editingMessage,
3965
+ onCancelEdit: () => setEditingId(null),
3966
+ onSaveEdit: async (body) => {
3967
+ if (!editingId) return;
3968
+ await edit(editingId, body);
3969
+ setEditingId(null);
3970
+ }
3971
+ }
3972
+ )
3973
+ ]
3835
3974
  }
3836
3975
  ),
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
- ] });
3976
+ /* @__PURE__ */ jsxRuntime.jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
3977
+ ]
3978
+ }
3979
+ )
3980
+ ]
3981
+ }
3982
+ );
3892
3983
  }
3893
3984
  var styles19 = reactNative.StyleSheet.create({
3894
3985
  modalRoot: {
@@ -4359,7 +4450,12 @@ function UserPickerSheet({
4359
4450
  const [query, setQuery] = react.useState("");
4360
4451
  const [selectedIds, setSelectedIds] = react.useState([]);
4361
4452
  const [groupName, setGroupName] = react.useState("");
4362
- const { height: screenHeight } = reactNative.useWindowDimensions();
4453
+ const insets = useSafeInsets();
4454
+ const keyboardOpen = useKeyboardOpen();
4455
+ const { height: windowHeight } = reactNative.useWindowDimensions();
4456
+ const [rootHeight, setRootHeight] = react.useState(0);
4457
+ const screenHeight = rootHeight || windowHeight;
4458
+ const sheetHeight = Math.min(Math.round(screenHeight * 0.85), screenHeight - insets.top - 8);
4363
4459
  const { translateY, panHandlers } = useDismissableSheet({
4364
4460
  onClose: () => {
4365
4461
  setQuery("");
@@ -4367,7 +4463,7 @@ function UserPickerSheet({
4367
4463
  setGroupName("");
4368
4464
  onClose();
4369
4465
  },
4370
- sheetHeight: screenHeight * 0.85
4466
+ sheetHeight
4371
4467
  });
4372
4468
  const excludeSet = react.useMemo(() => new Set(excludeIds ?? []), [excludeIds]);
4373
4469
  const filtered = react.useMemo(() => {
@@ -4409,142 +4505,164 @@ function UserPickerSheet({
4409
4505
  transparent: true,
4410
4506
  animationType: "slide",
4411
4507
  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,
4508
+ ...EDGE_TO_EDGE_MODAL,
4509
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
4510
+ reactNative.View,
4511
+ {
4512
+ style: styles22.modalRoot,
4513
+ onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
4514
+ children: [
4515
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles22.backdrop, onPress: handleClose }),
4516
+ /* @__PURE__ */ jsxRuntime.jsx(
4517
+ reactNative.Animated.View,
4420
4518
  {
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,
4519
+ style: [
4520
+ styles22.sheet,
4443
4521
  {
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,
4522
+ backgroundColor: theme.colors.paper,
4523
+ borderTopLeftRadius: theme.radii.xl,
4524
+ borderTopRightRadius: theme.radii.xl,
4525
+ height: sheetHeight,
4526
+ // Last row clears the nav bar — unless the keyboard is
4527
+ // covering it, where the inset would just be a gap.
4528
+ paddingBottom: keyboardOpen ? 0 : insets.bottom,
4529
+ paddingLeft: insets.left,
4530
+ paddingRight: insets.right,
4531
+ transform: [{ translateY }]
4532
+ },
4533
+ theme.shadows.lg
4534
+ ],
4535
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
4536
+ reactNative.KeyboardAvoidingView,
4454
4537
  {
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();
4538
+ style: styles22.kav,
4539
+ behavior: "padding",
4540
+ keyboardVerticalOffset: screenHeight - sheetHeight,
4541
+ children: [
4542
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { ...panHandlers, style: styles22.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles22.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
4543
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.header, children: [
4544
+ /* @__PURE__ */ jsxRuntime.jsx(
4545
+ reactNative.Pressable,
4546
+ {
4547
+ onPress: handleClose,
4548
+ hitSlop: 16,
4549
+ style: [styles22.closeBtn, { backgroundColor: theme.colors.surface2 }],
4550
+ accessibilityLabel: "Close picker",
4551
+ children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
4552
+ }
4553
+ ),
4554
+ /* @__PURE__ */ jsxRuntime.jsx(
4555
+ reactNative.Text,
4556
+ {
4557
+ style: [
4558
+ styles22.title,
4559
+ { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4560
+ ],
4561
+ numberOfLines: 1,
4562
+ children: heading
4563
+ }
4564
+ ),
4565
+ isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
4566
+ reactNative.Pressable,
4567
+ {
4568
+ onPress: handleCreate,
4569
+ disabled: !canCreate,
4570
+ hitSlop: 6,
4571
+ style: [
4572
+ styles22.createBtn,
4573
+ {
4574
+ backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
4575
+ opacity: canCreate ? 1 : 0.6
4576
+ }
4577
+ ],
4578
+ children: /* @__PURE__ */ jsxRuntime.jsxs(
4579
+ reactNative.Text,
4580
+ {
4581
+ style: {
4582
+ color: canCreate ? theme.colors.onBrand : theme.colors.ink3,
4583
+ fontWeight: "700",
4584
+ fontSize: 13
4585
+ },
4586
+ children: [
4587
+ "Create",
4588
+ selectedIds.length > 0 ? ` (${selectedIds.length})` : ""
4589
+ ]
4590
+ }
4591
+ )
4592
+ }
4593
+ ) : null
4594
+ ] }),
4595
+ isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
4596
+ reactNative.TextInput,
4597
+ {
4598
+ placeholder: "Group name",
4599
+ placeholderTextColor: theme.colors.ink3,
4600
+ value: groupName,
4601
+ onChangeText: setGroupName,
4602
+ style: [
4603
+ styles22.groupNameInput,
4604
+ {
4605
+ color: theme.colors.ink,
4606
+ backgroundColor: theme.colors.surface2,
4607
+ borderRadius: theme.radii.md,
4608
+ fontFamily: theme.type.fontBody,
4609
+ fontSize: theme.type.bodySize
4610
+ }
4611
+ ]
4538
4612
  }
4539
- }
4540
- }
4541
- )
4542
- }
4543
- )
4544
- ]
4545
- }
4546
- )
4547
- ] })
4613
+ ) : null,
4614
+ showSearch ? /* @__PURE__ */ jsxRuntime.jsx(
4615
+ reactNative.TextInput,
4616
+ {
4617
+ placeholder: "Search\u2026",
4618
+ placeholderTextColor: theme.colors.ink3,
4619
+ value: query,
4620
+ onChangeText: setQuery,
4621
+ style: [
4622
+ styles22.searchInput,
4623
+ {
4624
+ color: theme.colors.ink,
4625
+ backgroundColor: theme.colors.surface2,
4626
+ borderRadius: theme.radii.md,
4627
+ fontFamily: theme.type.fontBody,
4628
+ fontSize: 14
4629
+ }
4630
+ ]
4631
+ }
4632
+ ) : null,
4633
+ /* @__PURE__ */ jsxRuntime.jsx(
4634
+ reactNative.FlatList,
4635
+ {
4636
+ data: filtered,
4637
+ keyExtractor: (u) => u.externalId,
4638
+ keyboardShouldPersistTaps: "handled",
4639
+ 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." }) }),
4640
+ renderItem: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
4641
+ UserRow,
4642
+ {
4643
+ user: item,
4644
+ selected: selectedIds.includes(item.externalId),
4645
+ isGroup,
4646
+ onPress: () => {
4647
+ if (isGroup) toggle(item.externalId);
4648
+ else {
4649
+ onPickDirect?.(item.externalId);
4650
+ reset();
4651
+ onClose();
4652
+ }
4653
+ }
4654
+ }
4655
+ )
4656
+ }
4657
+ )
4658
+ ]
4659
+ }
4660
+ )
4661
+ }
4662
+ )
4663
+ ]
4664
+ }
4665
+ )
4548
4666
  }
4549
4667
  );
4550
4668
  }
@@ -4605,9 +4723,11 @@ var styles22 = reactNative.StyleSheet.create({
4605
4723
  backgroundColor: "rgba(0,0,0,0.4)"
4606
4724
  },
4607
4725
  sheet: {
4608
- height: "85%",
4609
4726
  overflow: "hidden"
4610
4727
  },
4728
+ kav: {
4729
+ flex: 1
4730
+ },
4611
4731
  dragHandle: {
4612
4732
  alignItems: "center",
4613
4733
  paddingTop: 8,
@@ -5422,40 +5542,58 @@ function AudioRouteSheet({
5422
5542
  onSelect,
5423
5543
  onClose
5424
5544
  }) {
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(
5545
+ const insets = useSafeInsets();
5546
+ return /* @__PURE__ */ jsxRuntime.jsx(
5547
+ reactNative.Modal,
5548
+ {
5549
+ visible,
5550
+ transparent: true,
5551
+ animationType: "fade",
5552
+ onRequestClose: onClose,
5553
+ ...EDGE_TO_EDGE_MODAL,
5554
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles25.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxRuntime.jsxs(
5432
5555
  reactNative.Pressable,
5433
5556
  {
5557
+ style: [styles25.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
5434
5558
  onPress: () => {
5435
- onSelect(route.id);
5436
- onClose();
5437
5559
  },
5438
- accessibilityRole: "button",
5439
- accessibilityState: { selected },
5440
- style: ({ pressed }) => [styles25.row, pressed && styles25.rowPressed],
5441
5560
  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" })
5561
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.grabber }),
5562
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles25.title, children: "Audio output" }),
5563
+ routes.map((route) => {
5564
+ const selected = route.id === selectedRouteId;
5565
+ return /* @__PURE__ */ jsxRuntime.jsxs(
5566
+ reactNative.Pressable,
5567
+ {
5568
+ onPress: () => {
5569
+ onSelect(route.id);
5570
+ onClose();
5571
+ },
5572
+ accessibilityRole: "button",
5573
+ accessibilityState: { selected },
5574
+ style: ({ pressed }) => [styles25.row, pressed && styles25.rowPressed],
5575
+ children: [
5576
+ /* @__PURE__ */ jsxRuntime.jsx(
5577
+ PoolseIcon,
5578
+ {
5579
+ name: ICONS2[route.kind],
5580
+ size: 21,
5581
+ color: selected ? callColors.accept : callColors.text,
5582
+ label: null
5583
+ }
5584
+ ),
5585
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.label, selected && styles25.labelSelected], children: route.label }),
5586
+ selected && /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
5587
+ ]
5588
+ },
5589
+ route.id
5590
+ );
5591
+ })
5453
5592
  ]
5454
- },
5455
- route.id
5456
- );
5457
- })
5458
- ] }) }) });
5593
+ }
5594
+ ) })
5595
+ }
5596
+ );
5459
5597
  }
5460
5598
  var styles25 = reactNative.StyleSheet.create({
5461
5599
  backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
@@ -5465,7 +5603,6 @@ var styles25 = reactNative.StyleSheet.create({
5465
5603
  borderTopRightRadius: 22,
5466
5604
  paddingHorizontal: 12,
5467
5605
  paddingTop: 10,
5468
- paddingBottom: 34,
5469
5606
  gap: 2
5470
5607
  },
5471
5608
  grabber: {