@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.js CHANGED
@@ -1,12 +1,12 @@
1
1
  import { useUser, useMe, useConversations, formatCallLogPreview, useAttachmentUpload, useConversation, useMembers, usePresence, useMessages, useTyping, useRealtimeStatus, isMessageVisibleTo, computeGroupPosition, formatDayLabel, callLogDisplayFor, sameDay, useReactions, useThread, useAttachmentUrl, usePoolse, useVoiceRoom, useCalls, useCallRoom } from '@poolse/react';
2
- import { createContext, forwardRef, useRef, useState, useEffect, useImperativeHandle, useMemo, useCallback, useContext, createElement } from 'react';
3
- import { StyleSheet, Keyboard, Platform, View, Pressable, TextInput, Text, useWindowDimensions, Animated, Easing, PanResponder, Image, ScrollView, ActivityIndicator, FlatList, AppState, KeyboardAvoidingView, Modal, Dimensions, Linking, StatusBar } from 'react-native';
2
+ import { createContext, forwardRef, useRef, useState, useImperativeHandle, useEffect, useMemo, useCallback, useContext, createElement } from 'react';
3
+ import { StyleSheet, View, Pressable, TextInput, Text, useWindowDimensions, Animated, Easing, PanResponder, Image, Keyboard, Platform, ScrollView, ActivityIndicator, FlatList, AppState, KeyboardAvoidingView, Modal, Linking, StatusBar } from 'react-native';
4
4
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
5
5
  import Svg2, { SvgXml, Svg, Path, Circle, G, Defs, RadialGradient, Stop, Rect } from 'react-native-svg';
6
+ import { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';
6
7
  import * as ImagePicker from 'expo-image-picker';
7
8
  import * as DocumentPicker from 'expo-document-picker';
8
9
  import { manipulateAsync, SaveFormat } from 'expo-image-manipulator';
9
- import { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';
10
10
  import * as Clipboard from 'expo-clipboard';
11
11
  import Markdown, { MarkdownIt } from 'react-native-markdown-display';
12
12
 
@@ -619,6 +619,13 @@ var styles2 = StyleSheet.create({
619
619
  padding: 6
620
620
  }
621
621
  });
622
+
623
+ // src/internal/edgeToEdge.ts
624
+ var EDGE_TO_EDGE_MODAL = {
625
+ statusBarTranslucent: true,
626
+ navigationBarTranslucent: true
627
+ };
628
+ var useSafeInsets = useSafeAreaInsets;
622
629
  function useDismissableSheet({ onClose, sheetHeight, dismissThreshold = 0.22 }) {
623
630
  const translateY = useRef(new Animated.Value(0)).current;
624
631
  const panResponder = useMemo(
@@ -673,6 +680,7 @@ function GroupDetailsSheet({
673
680
  const theme = usePoolseTheme();
674
681
  const { conversation } = useConversation(conversationId);
675
682
  const { members } = useMembers(conversationId);
683
+ const insets = useSafeInsets();
676
684
  const { height: screenHeight } = useWindowDimensions();
677
685
  const { translateY, panHandlers } = useDismissableSheet({
678
686
  onClose,
@@ -687,7 +695,7 @@ function GroupDetailsSheet({
687
695
  transparent: true,
688
696
  animationType: "slide",
689
697
  onRequestClose: onClose,
690
- statusBarTranslucent: true,
698
+ ...EDGE_TO_EDGE_MODAL,
691
699
  children: /* @__PURE__ */ jsxs(View, { style: styles3.modalRoot, children: [
692
700
  /* @__PURE__ */ jsx(
693
701
  Pressable,
@@ -706,6 +714,11 @@ function GroupDetailsSheet({
706
714
  backgroundColor: theme.colors.paper,
707
715
  borderTopLeftRadius: theme.radii.xl,
708
716
  borderTopRightRadius: theme.radii.xl,
717
+ // Header stays below the status bar even on short screens.
718
+ maxHeight: screenHeight - insets.top - 8,
719
+ paddingBottom: insets.bottom,
720
+ paddingLeft: insets.left,
721
+ paddingRight: insets.right,
709
722
  transform: [{ translateY }]
710
723
  },
711
724
  theme.shadows.lg
@@ -1168,6 +1181,7 @@ function AttachmentPicker({
1168
1181
  camera = true
1169
1182
  }) {
1170
1183
  const theme = usePoolseTheme();
1184
+ const insets = useSafeInsets();
1171
1185
  const upload = useSharedUpload();
1172
1186
  const { setPreview } = useUploadPreview();
1173
1187
  const pickFromKind = async (kind) => {
@@ -1187,35 +1201,49 @@ function AttachmentPicker({
1187
1201
  onClose();
1188
1202
  }
1189
1203
  };
1190
- return /* @__PURE__ */ jsx(Modal, { visible, transparent: true, animationType: "slide", onRequestClose: onClose, children: /* @__PURE__ */ jsx(Pressable, { style: styles6.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
1191
- View,
1204
+ return /* @__PURE__ */ jsx(
1205
+ Modal,
1192
1206
  {
1193
- style: [
1194
- styles6.sheet,
1207
+ visible,
1208
+ transparent: true,
1209
+ animationType: "slide",
1210
+ onRequestClose: onClose,
1211
+ ...EDGE_TO_EDGE_MODAL,
1212
+ children: /* @__PURE__ */ jsx(Pressable, { style: styles6.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
1213
+ View,
1195
1214
  {
1196
- backgroundColor: theme.colors.surface,
1197
- borderTopLeftRadius: theme.radii.lg,
1198
- borderTopRightRadius: theme.radii.lg
1199
- },
1200
- theme.shadows.lg
1201
- ],
1202
- children: [
1203
- camera ? /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("camera"), children: [
1204
- /* @__PURE__ */ jsx(PoolseIcon, { name: "camera", size: 20, color: theme.colors.ink2 }),
1205
- /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Camera" })
1206
- ] }) : null,
1207
- /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("image"), children: [
1208
- /* @__PURE__ */ jsx(PoolseIcon, { name: "image", size: 20, color: theme.colors.ink2 }),
1209
- /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Photo or video" })
1210
- ] }),
1211
- /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("document"), children: [
1212
- /* @__PURE__ */ jsx(PoolseIcon, { name: "attachment", size: 20, color: theme.colors.ink2 }),
1213
- /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "File" })
1214
- ] }),
1215
- /* @__PURE__ */ jsx(Pressable, { style: styles6.cancel, onPress: onClose, children: /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.brand }], children: "Cancel" }) })
1216
- ]
1215
+ style: [
1216
+ styles6.sheet,
1217
+ {
1218
+ backgroundColor: theme.colors.surface,
1219
+ borderTopLeftRadius: theme.radii.lg,
1220
+ borderTopRightRadius: theme.radii.lg,
1221
+ // Cancel must sit above the nav bar / home indicator.
1222
+ paddingBottom: 24 + insets.bottom,
1223
+ paddingLeft: insets.left,
1224
+ paddingRight: insets.right
1225
+ },
1226
+ theme.shadows.lg
1227
+ ],
1228
+ children: [
1229
+ camera ? /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("camera"), children: [
1230
+ /* @__PURE__ */ jsx(PoolseIcon, { name: "camera", size: 20, color: theme.colors.ink2 }),
1231
+ /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Camera" })
1232
+ ] }) : null,
1233
+ /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("image"), children: [
1234
+ /* @__PURE__ */ jsx(PoolseIcon, { name: "image", size: 20, color: theme.colors.ink2 }),
1235
+ /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Photo or video" })
1236
+ ] }),
1237
+ /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("document"), children: [
1238
+ /* @__PURE__ */ jsx(PoolseIcon, { name: "attachment", size: 20, color: theme.colors.ink2 }),
1239
+ /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "File" })
1240
+ ] }),
1241
+ /* @__PURE__ */ jsx(Pressable, { style: styles6.cancel, onPress: onClose, children: /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.brand }], children: "Cancel" }) })
1242
+ ]
1243
+ }
1244
+ ) })
1217
1245
  }
1218
- ) }) });
1246
+ );
1219
1247
  }
1220
1248
  async function uriToBlob(uri) {
1221
1249
  const res = await fetch(uri);
@@ -1641,7 +1669,24 @@ var styles8 = StyleSheet.create({
1641
1669
  fontWeight: "700"
1642
1670
  }
1643
1671
  });
1644
- var useSafeInsets = useSafeAreaInsets;
1672
+ function useKeyboardOpen() {
1673
+ const [open, setOpen] = useState(false);
1674
+ useEffect(() => {
1675
+ const show = Keyboard.addListener(
1676
+ Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
1677
+ () => setOpen(true)
1678
+ );
1679
+ const hide = Keyboard.addListener(
1680
+ Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
1681
+ () => setOpen(false)
1682
+ );
1683
+ return () => {
1684
+ show.remove();
1685
+ hide.remove();
1686
+ };
1687
+ }, []);
1688
+ return open;
1689
+ }
1645
1690
  var MessageComposer = forwardRef(
1646
1691
  function MessageComposer2({
1647
1692
  onSend,
@@ -1662,23 +1707,9 @@ var MessageComposer = forwardRef(
1662
1707
  const inputRef = useRef(null);
1663
1708
  const [value, setValue] = useState("");
1664
1709
  const [sending, setSending] = useState(false);
1665
- const [keyboardOpen, setKeyboardOpen] = useState(false);
1710
+ const keyboardOpen = useKeyboardOpen();
1666
1711
  const upload = useSharedUpload();
1667
1712
  const insets = useSafeInsets();
1668
- useEffect(() => {
1669
- const show = Keyboard.addListener(
1670
- Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
1671
- () => setKeyboardOpen(true)
1672
- );
1673
- const hide = Keyboard.addListener(
1674
- Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
1675
- () => setKeyboardOpen(false)
1676
- );
1677
- return () => {
1678
- show.remove();
1679
- hide.remove();
1680
- };
1681
- }, []);
1682
1713
  useImperativeHandle(
1683
1714
  ref,
1684
1715
  () => ({
@@ -1934,6 +1965,8 @@ var styles9 = StyleSheet.create({
1934
1965
  });
1935
1966
  function MentionInput({ conversationId, onSend, ...composerProps }) {
1936
1967
  const theme = usePoolseTheme();
1968
+ const insets = useSafeInsets();
1969
+ const keyboardOpen = useKeyboardOpen();
1937
1970
  const { members } = useMembers(conversationId);
1938
1971
  const [pickerOpen, setPickerOpen] = useState(false);
1939
1972
  const [pickerQuery, _setPickerQuery] = useState("");
@@ -1972,7 +2005,8 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
1972
2005
  transparent: true,
1973
2006
  animationType: "slide",
1974
2007
  onRequestClose: () => setPickerOpen(false),
1975
- children: /* @__PURE__ */ jsx(Pressable, { style: styles10.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxs(
2008
+ ...EDGE_TO_EDGE_MODAL,
2009
+ children: /* @__PURE__ */ jsx(KeyboardAvoidingView, { style: styles10.kav, behavior: "padding", children: /* @__PURE__ */ jsx(Pressable, { style: styles10.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxs(
1976
2010
  View,
1977
2011
  {
1978
2012
  style: [
@@ -1980,7 +2014,12 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
1980
2014
  {
1981
2015
  backgroundColor: theme.colors.surface,
1982
2016
  borderTopLeftRadius: theme.radii.lg,
1983
- borderTopRightRadius: theme.radii.lg
2017
+ borderTopRightRadius: theme.radii.lg,
2018
+ // Clear the nav bar — unless the keyboard is covering
2019
+ // it, where the inset would just be a gap.
2020
+ paddingBottom: 12 + (keyboardOpen ? 0 : insets.bottom),
2021
+ paddingLeft: insets.left,
2022
+ paddingRight: insets.right
1984
2023
  }
1985
2024
  ],
1986
2025
  children: [
@@ -1996,6 +2035,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
1996
2035
  {
1997
2036
  data: filteredMembers,
1998
2037
  keyExtractor: (m) => m.user_id,
2038
+ keyboardShouldPersistTaps: "handled",
1999
2039
  renderItem: ({ item }) => /* @__PURE__ */ jsx(
2000
2040
  MentionRow,
2001
2041
  {
@@ -2011,7 +2051,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
2011
2051
  )
2012
2052
  ]
2013
2053
  }
2014
- ) })
2054
+ ) }) })
2015
2055
  }
2016
2056
  )
2017
2057
  ] });
@@ -2024,6 +2064,9 @@ function MentionRow({ member, onPress }) {
2024
2064
  ] });
2025
2065
  }
2026
2066
  var styles10 = StyleSheet.create({
2067
+ kav: {
2068
+ flex: 1
2069
+ },
2027
2070
  backdrop: {
2028
2071
  flex: 1,
2029
2072
  backgroundColor: "rgba(0,0,0,0.35)",
@@ -2276,6 +2319,7 @@ function MessageActions({
2276
2319
  onCopy
2277
2320
  }) {
2278
2321
  const theme = usePoolseTheme();
2322
+ const insets = useSafeInsets();
2279
2323
  const items = [];
2280
2324
  if (onReply) items.push({ label: "Reply", icon: "reply", onPress: onReply });
2281
2325
  if (onQuote) items.push({ label: "Quote reply", icon: "reply", onPress: onQuote });
@@ -2286,59 +2330,73 @@ function MessageActions({
2286
2330
  if (isSelf && onDelete)
2287
2331
  items.push({ label: "Delete", icon: "trash", onPress: onDelete, danger: true });
2288
2332
  const showEmojiRow = !!onPickReaction && emojis.length > 0;
2289
- return /* @__PURE__ */ jsx(Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsx(Pressable, { style: styles13.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
2290
- View,
2333
+ return /* @__PURE__ */ jsx(
2334
+ Modal,
2291
2335
  {
2292
- style: [
2293
- styles13.sheet,
2336
+ visible,
2337
+ transparent: true,
2338
+ animationType: "fade",
2339
+ onRequestClose: onClose,
2340
+ ...EDGE_TO_EDGE_MODAL,
2341
+ children: /* @__PURE__ */ jsx(Pressable, { style: styles13.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
2342
+ View,
2294
2343
  {
2295
- backgroundColor: theme.colors.surface,
2296
- borderTopLeftRadius: theme.radii.lg,
2297
- borderTopRightRadius: theme.radii.lg
2298
- },
2299
- theme.shadows.lg
2300
- ],
2301
- children: [
2302
- showEmojiRow ? /* @__PURE__ */ jsx(View, { style: [styles13.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsx(
2303
- Pressable,
2304
- {
2305
- onPress: () => {
2306
- onPickReaction(emoji);
2307
- onClose();
2308
- },
2309
- style: styles13.emojiBtn,
2310
- hitSlop: 6,
2311
- accessibilityLabel: `React with ${emoji}`,
2312
- children: /* @__PURE__ */ jsx(Text, { style: styles13.emoji, children: emoji })
2313
- },
2314
- emoji
2315
- )) }) : null,
2316
- items.map((item) => /* @__PURE__ */ jsxs(Pressable, { onPress: item.onPress, style: styles13.item, children: [
2317
- /* @__PURE__ */ jsx(
2318
- PoolseIcon,
2319
- {
2320
- name: item.icon,
2321
- size: 18,
2322
- color: item.danger ? theme.colors.error : theme.colors.ink2
2323
- }
2324
- ),
2325
- /* @__PURE__ */ jsx(
2326
- Text,
2344
+ style: [
2345
+ styles13.sheet,
2327
2346
  {
2328
- style: [
2329
- styles13.itemText,
2347
+ backgroundColor: theme.colors.surface,
2348
+ borderTopLeftRadius: theme.radii.lg,
2349
+ borderTopRightRadius: theme.radii.lg,
2350
+ // Last action row must sit above the nav bar / home indicator.
2351
+ paddingBottom: 24 + insets.bottom,
2352
+ paddingLeft: insets.left,
2353
+ paddingRight: insets.right
2354
+ },
2355
+ theme.shadows.lg
2356
+ ],
2357
+ children: [
2358
+ showEmojiRow ? /* @__PURE__ */ jsx(View, { style: [styles13.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsx(
2359
+ Pressable,
2360
+ {
2361
+ onPress: () => {
2362
+ onPickReaction(emoji);
2363
+ onClose();
2364
+ },
2365
+ style: styles13.emojiBtn,
2366
+ hitSlop: 6,
2367
+ accessibilityLabel: `React with ${emoji}`,
2368
+ children: /* @__PURE__ */ jsx(Text, { style: styles13.emoji, children: emoji })
2369
+ },
2370
+ emoji
2371
+ )) }) : null,
2372
+ items.map((item) => /* @__PURE__ */ jsxs(Pressable, { onPress: item.onPress, style: styles13.item, children: [
2373
+ /* @__PURE__ */ jsx(
2374
+ PoolseIcon,
2330
2375
  {
2331
- color: item.danger ? theme.colors.error : theme.colors.ink,
2332
- fontFamily: theme.type.fontBody
2376
+ name: item.icon,
2377
+ size: 18,
2378
+ color: item.danger ? theme.colors.error : theme.colors.ink2
2333
2379
  }
2334
- ],
2335
- children: item.label
2336
- }
2337
- )
2338
- ] }, item.label))
2339
- ]
2380
+ ),
2381
+ /* @__PURE__ */ jsx(
2382
+ Text,
2383
+ {
2384
+ style: [
2385
+ styles13.itemText,
2386
+ {
2387
+ color: item.danger ? theme.colors.error : theme.colors.ink,
2388
+ fontFamily: theme.type.fontBody
2389
+ }
2390
+ ],
2391
+ children: item.label
2392
+ }
2393
+ )
2394
+ ] }, item.label))
2395
+ ]
2396
+ }
2397
+ ) })
2340
2398
  }
2341
- ) }) });
2399
+ );
2342
2400
  }
2343
2401
  var styles13 = StyleSheet.create({
2344
2402
  backdrop: {
@@ -2634,6 +2692,7 @@ function ImageMosaic({
2634
2692
  transparent: true,
2635
2693
  animationType: "fade",
2636
2694
  onRequestClose: () => setViewerIndex(null),
2695
+ ...EDGE_TO_EDGE_MODAL,
2637
2696
  children: viewerIndex !== null ? /* @__PURE__ */ jsx(
2638
2697
  FullScreenViewer,
2639
2698
  {
@@ -2673,7 +2732,8 @@ function FullScreenViewer({
2673
2732
  onClose
2674
2733
  }) {
2675
2734
  const { url } = useAttachmentUrl(attachment.id);
2676
- const { width, height } = Dimensions.get("window");
2735
+ const { width, height } = useWindowDimensions();
2736
+ const insets = useSafeInsets();
2677
2737
  return /* @__PURE__ */ jsxs(Pressable, { style: styles15.viewer, onPress: onClose, children: [
2678
2738
  url ? /* @__PURE__ */ jsx(
2679
2739
  Image,
@@ -2690,7 +2750,7 @@ function FullScreenViewer({
2690
2750
  {
2691
2751
  onPress: onClose,
2692
2752
  hitSlop: 12,
2693
- style: styles15.closeBtn,
2753
+ style: [styles15.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
2694
2754
  accessibilityLabel: "Close viewer",
2695
2755
  children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
2696
2756
  }
@@ -2749,8 +2809,6 @@ var styles15 = StyleSheet.create({
2749
2809
  },
2750
2810
  closeBtn: {
2751
2811
  position: "absolute",
2752
- top: 48,
2753
- right: 16,
2754
2812
  padding: 8,
2755
2813
  backgroundColor: "rgba(0,0,0,0.5)",
2756
2814
  borderRadius: 20
@@ -3280,31 +3338,49 @@ function ReactionPicker({
3280
3338
  emojis = DEFAULT_EMOJIS
3281
3339
  }) {
3282
3340
  const theme = usePoolseTheme();
3283
- return /* @__PURE__ */ jsx(Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsx(Pressable, { style: styles17.backdrop, onPress: onClose, children: /* @__PURE__ */ jsx(
3284
- View,
3341
+ const insets = useSafeInsets();
3342
+ return /* @__PURE__ */ jsx(
3343
+ Modal,
3285
3344
  {
3286
- style: [
3287
- styles17.sheet,
3288
- {
3289
- backgroundColor: theme.colors.surface,
3290
- borderRadius: theme.radii.lg
3291
- },
3292
- theme.shadows.lg
3293
- ],
3294
- children: emojis.map((emoji) => /* @__PURE__ */ jsx(
3345
+ visible,
3346
+ transparent: true,
3347
+ animationType: "fade",
3348
+ onRequestClose: onClose,
3349
+ ...EDGE_TO_EDGE_MODAL,
3350
+ children: /* @__PURE__ */ jsx(
3295
3351
  Pressable,
3296
3352
  {
3297
- style: styles17.emojiBtn,
3298
- onPress: () => {
3299
- onPick(emoji);
3300
- onClose();
3301
- },
3302
- children: /* @__PURE__ */ jsx(Text, { style: styles17.bigEmoji, children: emoji })
3303
- },
3304
- emoji
3305
- ))
3353
+ style: [styles17.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
3354
+ onPress: onClose,
3355
+ children: /* @__PURE__ */ jsx(
3356
+ View,
3357
+ {
3358
+ style: [
3359
+ styles17.sheet,
3360
+ {
3361
+ backgroundColor: theme.colors.surface,
3362
+ borderRadius: theme.radii.lg
3363
+ },
3364
+ theme.shadows.lg
3365
+ ],
3366
+ children: emojis.map((emoji) => /* @__PURE__ */ jsx(
3367
+ Pressable,
3368
+ {
3369
+ style: styles17.emojiBtn,
3370
+ onPress: () => {
3371
+ onPick(emoji);
3372
+ onClose();
3373
+ },
3374
+ children: /* @__PURE__ */ jsx(Text, { style: styles17.bigEmoji, children: emoji })
3375
+ },
3376
+ emoji
3377
+ ))
3378
+ }
3379
+ )
3380
+ }
3381
+ )
3306
3382
  }
3307
- ) }) });
3383
+ );
3308
3384
  }
3309
3385
  var styles17 = StyleSheet.create({
3310
3386
  strip: {
@@ -3691,7 +3767,7 @@ function ThreadView({
3691
3767
  transparent: true,
3692
3768
  animationType: "slide",
3693
3769
  onRequestClose: onClose,
3694
- statusBarTranslucent: true,
3770
+ ...EDGE_TO_EDGE_MODAL,
3695
3771
  children: /* @__PURE__ */ jsx(UploadProvider, { children: /* @__PURE__ */ jsx(
3696
3772
  ThreadSheet,
3697
3773
  {
@@ -3723,8 +3799,14 @@ function ThreadSheet({
3723
3799
  loadMore,
3724
3800
  hasMore
3725
3801
  } = useThread(conversationId, rootMessage.id);
3726
- const { height: screenHeight } = useWindowDimensions();
3727
- const sheetHeight = Math.round(screenHeight * SHEET_HEIGHT_FRACTION);
3802
+ const insets = useSafeInsets();
3803
+ const { height: windowHeight } = useWindowDimensions();
3804
+ const [rootHeight, setRootHeight] = useState(0);
3805
+ const screenHeight = rootHeight || windowHeight;
3806
+ const sheetHeight = Math.min(
3807
+ Math.round(screenHeight * SHEET_HEIGHT_FRACTION),
3808
+ screenHeight - insets.top - 8
3809
+ );
3728
3810
  const gutter = screenHeight - sheetHeight;
3729
3811
  const { translateY, panHandlers } = useDismissableSheet({ onClose, sheetHeight });
3730
3812
  const [pickerOpen, setPickerOpen] = useState(false);
@@ -3776,91 +3858,100 @@ function ThreadSheet({
3776
3858
  ),
3777
3859
  [rootMessage, meId, labelFor, avatarFor]
3778
3860
  );
3779
- return /* @__PURE__ */ jsxs(View, { style: styles19.modalRoot, children: [
3780
- /* @__PURE__ */ jsx(Pressable, { style: styles19.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
3781
- /* @__PURE__ */ jsxs(
3782
- Animated.View,
3783
- {
3784
- style: [
3785
- styles19.sheet,
3861
+ return /* @__PURE__ */ jsxs(
3862
+ View,
3863
+ {
3864
+ style: styles19.modalRoot,
3865
+ onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
3866
+ children: [
3867
+ /* @__PURE__ */ jsx(Pressable, { style: styles19.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
3868
+ /* @__PURE__ */ jsxs(
3869
+ Animated.View,
3786
3870
  {
3787
- height: sheetHeight,
3788
- backgroundColor: theme.colors.paper,
3789
- borderTopLeftRadius: theme.radii.xl,
3790
- borderTopRightRadius: theme.radii.xl,
3791
- transform: [{ translateY }]
3792
- },
3793
- theme.shadows.lg
3794
- ],
3795
- children: [
3796
- /* @__PURE__ */ jsxs(View, { ...panHandlers, children: [
3797
- /* @__PURE__ */ jsx(View, { style: styles19.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles19.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
3798
- /* @__PURE__ */ jsxs(View, { style: [styles19.header, { borderBottomColor: theme.colors.border }], children: [
3799
- /* @__PURE__ */ jsx(
3800
- Pressable,
3871
+ style: [
3872
+ styles19.sheet,
3873
+ {
3874
+ height: sheetHeight,
3875
+ backgroundColor: theme.colors.paper,
3876
+ borderTopLeftRadius: theme.radii.xl,
3877
+ borderTopRightRadius: theme.radii.xl,
3878
+ paddingLeft: insets.left,
3879
+ paddingRight: insets.right,
3880
+ transform: [{ translateY }]
3881
+ },
3882
+ theme.shadows.lg
3883
+ ],
3884
+ children: [
3885
+ /* @__PURE__ */ jsxs(View, { ...panHandlers, children: [
3886
+ /* @__PURE__ */ jsx(View, { style: styles19.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles19.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
3887
+ /* @__PURE__ */ jsxs(View, { style: [styles19.header, { borderBottomColor: theme.colors.border }], children: [
3888
+ /* @__PURE__ */ jsx(
3889
+ Pressable,
3890
+ {
3891
+ onPress: onClose,
3892
+ hitSlop: 16,
3893
+ style: [styles19.closeBtn, { backgroundColor: theme.colors.surface2 }],
3894
+ accessibilityLabel: "Close thread",
3895
+ children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
3896
+ }
3897
+ ),
3898
+ /* @__PURE__ */ jsx(
3899
+ Text,
3900
+ {
3901
+ style: [
3902
+ styles19.title,
3903
+ { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
3904
+ ],
3905
+ children: "Thread"
3906
+ }
3907
+ )
3908
+ ] })
3909
+ ] }),
3910
+ /* @__PURE__ */ jsxs(
3911
+ KeyboardAvoidingView,
3801
3912
  {
3802
- onPress: onClose,
3803
- hitSlop: 16,
3804
- style: [styles19.closeBtn, { backgroundColor: theme.colors.surface2 }],
3805
- accessibilityLabel: "Close thread",
3806
- children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
3913
+ style: styles19.kavBody,
3914
+ behavior: "padding",
3915
+ keyboardVerticalOffset: gutter,
3916
+ children: [
3917
+ /* @__PURE__ */ jsx(View, { style: [styles19.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
3918
+ /* @__PURE__ */ jsx(View, { style: styles19.listWrap, children: /* @__PURE__ */ jsx(
3919
+ MessageList,
3920
+ {
3921
+ messages: replies,
3922
+ hasMore,
3923
+ onLoadMore: loadMore,
3924
+ renderItem: renderReply
3925
+ }
3926
+ ) }),
3927
+ /* @__PURE__ */ jsx(
3928
+ MessageComposer,
3929
+ {
3930
+ onSend: async (body, opts) => {
3931
+ await sendReply({ body, ...opts });
3932
+ },
3933
+ placeholder: "Reply to thread\u2026",
3934
+ attachments: true,
3935
+ onAttachPress: () => setPickerOpen(true),
3936
+ editingMessage,
3937
+ onCancelEdit: () => setEditingId(null),
3938
+ onSaveEdit: async (body) => {
3939
+ if (!editingId) return;
3940
+ await edit(editingId, body);
3941
+ setEditingId(null);
3942
+ }
3943
+ }
3944
+ )
3945
+ ]
3807
3946
  }
3808
3947
  ),
3809
- /* @__PURE__ */ jsx(
3810
- Text,
3811
- {
3812
- style: [
3813
- styles19.title,
3814
- { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
3815
- ],
3816
- children: "Thread"
3817
- }
3818
- )
3819
- ] })
3820
- ] }),
3821
- /* @__PURE__ */ jsxs(
3822
- KeyboardAvoidingView,
3823
- {
3824
- style: styles19.kavBody,
3825
- behavior: Platform.OS === "ios" ? "padding" : "height",
3826
- keyboardVerticalOffset: Platform.OS === "ios" ? gutter : 0,
3827
- children: [
3828
- /* @__PURE__ */ jsx(View, { style: [styles19.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
3829
- /* @__PURE__ */ jsx(View, { style: styles19.listWrap, children: /* @__PURE__ */ jsx(
3830
- MessageList,
3831
- {
3832
- messages: replies,
3833
- hasMore,
3834
- onLoadMore: loadMore,
3835
- renderItem: renderReply
3836
- }
3837
- ) }),
3838
- /* @__PURE__ */ jsx(
3839
- MessageComposer,
3840
- {
3841
- onSend: async (body, opts) => {
3842
- await sendReply({ body, ...opts });
3843
- },
3844
- placeholder: "Reply to thread\u2026",
3845
- attachments: true,
3846
- onAttachPress: () => setPickerOpen(true),
3847
- editingMessage,
3848
- onCancelEdit: () => setEditingId(null),
3849
- onSaveEdit: async (body) => {
3850
- if (!editingId) return;
3851
- await edit(editingId, body);
3852
- setEditingId(null);
3853
- }
3854
- }
3855
- )
3856
- ]
3857
- }
3858
- ),
3859
- /* @__PURE__ */ jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
3860
- ]
3861
- }
3862
- )
3863
- ] });
3948
+ /* @__PURE__ */ jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
3949
+ ]
3950
+ }
3951
+ )
3952
+ ]
3953
+ }
3954
+ );
3864
3955
  }
3865
3956
  var styles19 = StyleSheet.create({
3866
3957
  modalRoot: {
@@ -4331,7 +4422,12 @@ function UserPickerSheet({
4331
4422
  const [query, setQuery] = useState("");
4332
4423
  const [selectedIds, setSelectedIds] = useState([]);
4333
4424
  const [groupName, setGroupName] = useState("");
4334
- const { height: screenHeight } = useWindowDimensions();
4425
+ const insets = useSafeInsets();
4426
+ const keyboardOpen = useKeyboardOpen();
4427
+ const { height: windowHeight } = useWindowDimensions();
4428
+ const [rootHeight, setRootHeight] = useState(0);
4429
+ const screenHeight = rootHeight || windowHeight;
4430
+ const sheetHeight = Math.min(Math.round(screenHeight * 0.85), screenHeight - insets.top - 8);
4335
4431
  const { translateY, panHandlers } = useDismissableSheet({
4336
4432
  onClose: () => {
4337
4433
  setQuery("");
@@ -4339,7 +4435,7 @@ function UserPickerSheet({
4339
4435
  setGroupName("");
4340
4436
  onClose();
4341
4437
  },
4342
- sheetHeight: screenHeight * 0.85
4438
+ sheetHeight
4343
4439
  });
4344
4440
  const excludeSet = useMemo(() => new Set(excludeIds ?? []), [excludeIds]);
4345
4441
  const filtered = useMemo(() => {
@@ -4381,142 +4477,164 @@ function UserPickerSheet({
4381
4477
  transparent: true,
4382
4478
  animationType: "slide",
4383
4479
  onRequestClose: handleClose,
4384
- statusBarTranslucent: true,
4385
- children: /* @__PURE__ */ jsxs(View, { style: styles22.modalRoot, children: [
4386
- /* @__PURE__ */ jsx(Pressable, { style: styles22.backdrop, onPress: handleClose }),
4387
- /* @__PURE__ */ jsxs(
4388
- Animated.View,
4389
- {
4390
- style: [
4391
- styles22.sheet,
4480
+ ...EDGE_TO_EDGE_MODAL,
4481
+ children: /* @__PURE__ */ jsxs(
4482
+ View,
4483
+ {
4484
+ style: styles22.modalRoot,
4485
+ onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
4486
+ children: [
4487
+ /* @__PURE__ */ jsx(Pressable, { style: styles22.backdrop, onPress: handleClose }),
4488
+ /* @__PURE__ */ jsx(
4489
+ Animated.View,
4392
4490
  {
4393
- backgroundColor: theme.colors.paper,
4394
- borderTopLeftRadius: theme.radii.xl,
4395
- borderTopRightRadius: theme.radii.xl,
4396
- transform: [{ translateY }]
4397
- },
4398
- theme.shadows.lg
4399
- ],
4400
- children: [
4401
- /* @__PURE__ */ jsx(View, { ...panHandlers, style: styles22.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles22.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
4402
- /* @__PURE__ */ jsxs(View, { style: styles22.header, children: [
4403
- /* @__PURE__ */ jsx(
4404
- Pressable,
4405
- {
4406
- onPress: handleClose,
4407
- hitSlop: 16,
4408
- style: [styles22.closeBtn, { backgroundColor: theme.colors.surface2 }],
4409
- accessibilityLabel: "Close picker",
4410
- children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
4411
- }
4412
- ),
4413
- /* @__PURE__ */ jsx(
4414
- Text,
4491
+ style: [
4492
+ styles22.sheet,
4415
4493
  {
4416
- style: [
4417
- styles22.title,
4418
- { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4419
- ],
4420
- numberOfLines: 1,
4421
- children: heading
4422
- }
4423
- ),
4424
- isGroup ? /* @__PURE__ */ jsx(
4425
- Pressable,
4494
+ backgroundColor: theme.colors.paper,
4495
+ borderTopLeftRadius: theme.radii.xl,
4496
+ borderTopRightRadius: theme.radii.xl,
4497
+ height: sheetHeight,
4498
+ // Last row clears the nav bar — unless the keyboard is
4499
+ // covering it, where the inset would just be a gap.
4500
+ paddingBottom: keyboardOpen ? 0 : insets.bottom,
4501
+ paddingLeft: insets.left,
4502
+ paddingRight: insets.right,
4503
+ transform: [{ translateY }]
4504
+ },
4505
+ theme.shadows.lg
4506
+ ],
4507
+ children: /* @__PURE__ */ jsxs(
4508
+ KeyboardAvoidingView,
4426
4509
  {
4427
- onPress: handleCreate,
4428
- disabled: !canCreate,
4429
- hitSlop: 6,
4430
- style: [
4431
- styles22.createBtn,
4432
- {
4433
- backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
4434
- opacity: canCreate ? 1 : 0.6
4435
- }
4436
- ],
4437
- children: /* @__PURE__ */ jsxs(
4438
- Text,
4439
- {
4440
- style: {
4441
- color: canCreate ? theme.colors.onBrand : theme.colors.ink3,
4442
- fontWeight: "700",
4443
- fontSize: 13
4444
- },
4445
- children: [
4446
- "Create",
4447
- selectedIds.length > 0 ? ` (${selectedIds.length})` : ""
4448
- ]
4449
- }
4450
- )
4451
- }
4452
- ) : null
4453
- ] }),
4454
- isGroup ? /* @__PURE__ */ jsx(
4455
- TextInput,
4456
- {
4457
- placeholder: "Group name",
4458
- placeholderTextColor: theme.colors.ink3,
4459
- value: groupName,
4460
- onChangeText: setGroupName,
4461
- style: [
4462
- styles22.groupNameInput,
4463
- {
4464
- color: theme.colors.ink,
4465
- backgroundColor: theme.colors.surface2,
4466
- borderRadius: theme.radii.md,
4467
- fontFamily: theme.type.fontBody,
4468
- fontSize: theme.type.bodySize
4469
- }
4470
- ]
4471
- }
4472
- ) : null,
4473
- showSearch ? /* @__PURE__ */ jsx(
4474
- TextInput,
4475
- {
4476
- placeholder: "Search\u2026",
4477
- placeholderTextColor: theme.colors.ink3,
4478
- value: query,
4479
- onChangeText: setQuery,
4480
- style: [
4481
- styles22.searchInput,
4482
- {
4483
- color: theme.colors.ink,
4484
- backgroundColor: theme.colors.surface2,
4485
- borderRadius: theme.radii.md,
4486
- fontFamily: theme.type.fontBody,
4487
- fontSize: 14
4488
- }
4489
- ]
4490
- }
4491
- ) : null,
4492
- /* @__PURE__ */ jsx(
4493
- FlatList,
4494
- {
4495
- data: filtered,
4496
- keyExtractor: (u) => u.externalId,
4497
- ListEmptyComponent: /* @__PURE__ */ jsx(View, { style: styles22.empty, children: /* @__PURE__ */ jsx(Text, { style: [styles22.emptyText, { color: theme.colors.ink3 }], children: query ? "No matches." : "No users to show." }) }),
4498
- renderItem: ({ item }) => /* @__PURE__ */ jsx(
4499
- UserRow,
4500
- {
4501
- user: item,
4502
- selected: selectedIds.includes(item.externalId),
4503
- isGroup,
4504
- onPress: () => {
4505
- if (isGroup) toggle(item.externalId);
4506
- else {
4507
- onPickDirect?.(item.externalId);
4508
- reset();
4509
- onClose();
4510
+ style: styles22.kav,
4511
+ behavior: "padding",
4512
+ keyboardVerticalOffset: screenHeight - sheetHeight,
4513
+ children: [
4514
+ /* @__PURE__ */ jsx(View, { ...panHandlers, style: styles22.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles22.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
4515
+ /* @__PURE__ */ jsxs(View, { style: styles22.header, children: [
4516
+ /* @__PURE__ */ jsx(
4517
+ Pressable,
4518
+ {
4519
+ onPress: handleClose,
4520
+ hitSlop: 16,
4521
+ style: [styles22.closeBtn, { backgroundColor: theme.colors.surface2 }],
4522
+ accessibilityLabel: "Close picker",
4523
+ children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
4524
+ }
4525
+ ),
4526
+ /* @__PURE__ */ jsx(
4527
+ Text,
4528
+ {
4529
+ style: [
4530
+ styles22.title,
4531
+ { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4532
+ ],
4533
+ numberOfLines: 1,
4534
+ children: heading
4535
+ }
4536
+ ),
4537
+ isGroup ? /* @__PURE__ */ jsx(
4538
+ Pressable,
4539
+ {
4540
+ onPress: handleCreate,
4541
+ disabled: !canCreate,
4542
+ hitSlop: 6,
4543
+ style: [
4544
+ styles22.createBtn,
4545
+ {
4546
+ backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
4547
+ opacity: canCreate ? 1 : 0.6
4548
+ }
4549
+ ],
4550
+ children: /* @__PURE__ */ jsxs(
4551
+ Text,
4552
+ {
4553
+ style: {
4554
+ color: canCreate ? theme.colors.onBrand : theme.colors.ink3,
4555
+ fontWeight: "700",
4556
+ fontSize: 13
4557
+ },
4558
+ children: [
4559
+ "Create",
4560
+ selectedIds.length > 0 ? ` (${selectedIds.length})` : ""
4561
+ ]
4562
+ }
4563
+ )
4564
+ }
4565
+ ) : null
4566
+ ] }),
4567
+ isGroup ? /* @__PURE__ */ jsx(
4568
+ TextInput,
4569
+ {
4570
+ placeholder: "Group name",
4571
+ placeholderTextColor: theme.colors.ink3,
4572
+ value: groupName,
4573
+ onChangeText: setGroupName,
4574
+ style: [
4575
+ styles22.groupNameInput,
4576
+ {
4577
+ color: theme.colors.ink,
4578
+ backgroundColor: theme.colors.surface2,
4579
+ borderRadius: theme.radii.md,
4580
+ fontFamily: theme.type.fontBody,
4581
+ fontSize: theme.type.bodySize
4582
+ }
4583
+ ]
4510
4584
  }
4511
- }
4512
- }
4513
- )
4514
- }
4515
- )
4516
- ]
4517
- }
4518
- )
4519
- ] })
4585
+ ) : null,
4586
+ showSearch ? /* @__PURE__ */ jsx(
4587
+ TextInput,
4588
+ {
4589
+ placeholder: "Search\u2026",
4590
+ placeholderTextColor: theme.colors.ink3,
4591
+ value: query,
4592
+ onChangeText: setQuery,
4593
+ style: [
4594
+ styles22.searchInput,
4595
+ {
4596
+ color: theme.colors.ink,
4597
+ backgroundColor: theme.colors.surface2,
4598
+ borderRadius: theme.radii.md,
4599
+ fontFamily: theme.type.fontBody,
4600
+ fontSize: 14
4601
+ }
4602
+ ]
4603
+ }
4604
+ ) : null,
4605
+ /* @__PURE__ */ jsx(
4606
+ FlatList,
4607
+ {
4608
+ data: filtered,
4609
+ keyExtractor: (u) => u.externalId,
4610
+ keyboardShouldPersistTaps: "handled",
4611
+ ListEmptyComponent: /* @__PURE__ */ jsx(View, { style: styles22.empty, children: /* @__PURE__ */ jsx(Text, { style: [styles22.emptyText, { color: theme.colors.ink3 }], children: query ? "No matches." : "No users to show." }) }),
4612
+ renderItem: ({ item }) => /* @__PURE__ */ jsx(
4613
+ UserRow,
4614
+ {
4615
+ user: item,
4616
+ selected: selectedIds.includes(item.externalId),
4617
+ isGroup,
4618
+ onPress: () => {
4619
+ if (isGroup) toggle(item.externalId);
4620
+ else {
4621
+ onPickDirect?.(item.externalId);
4622
+ reset();
4623
+ onClose();
4624
+ }
4625
+ }
4626
+ }
4627
+ )
4628
+ }
4629
+ )
4630
+ ]
4631
+ }
4632
+ )
4633
+ }
4634
+ )
4635
+ ]
4636
+ }
4637
+ )
4520
4638
  }
4521
4639
  );
4522
4640
  }
@@ -4577,9 +4695,11 @@ var styles22 = StyleSheet.create({
4577
4695
  backgroundColor: "rgba(0,0,0,0.4)"
4578
4696
  },
4579
4697
  sheet: {
4580
- height: "85%",
4581
4698
  overflow: "hidden"
4582
4699
  },
4700
+ kav: {
4701
+ flex: 1
4702
+ },
4583
4703
  dragHandle: {
4584
4704
  alignItems: "center",
4585
4705
  paddingTop: 8,
@@ -5394,40 +5514,58 @@ function AudioRouteSheet({
5394
5514
  onSelect,
5395
5515
  onClose
5396
5516
  }) {
5397
- return /* @__PURE__ */ jsx(Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsx(Pressable, { style: styles25.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxs(Pressable, { style: styles25.sheet, onPress: () => {
5398
- }, children: [
5399
- /* @__PURE__ */ jsx(View, { style: styles25.grabber }),
5400
- /* @__PURE__ */ jsx(Text, { style: styles25.title, children: "Audio output" }),
5401
- routes.map((route) => {
5402
- const selected = route.id === selectedRouteId;
5403
- return /* @__PURE__ */ jsxs(
5517
+ const insets = useSafeInsets();
5518
+ return /* @__PURE__ */ jsx(
5519
+ Modal,
5520
+ {
5521
+ visible,
5522
+ transparent: true,
5523
+ animationType: "fade",
5524
+ onRequestClose: onClose,
5525
+ ...EDGE_TO_EDGE_MODAL,
5526
+ children: /* @__PURE__ */ jsx(Pressable, { style: styles25.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxs(
5404
5527
  Pressable,
5405
5528
  {
5529
+ style: [styles25.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
5406
5530
  onPress: () => {
5407
- onSelect(route.id);
5408
- onClose();
5409
5531
  },
5410
- accessibilityRole: "button",
5411
- accessibilityState: { selected },
5412
- style: ({ pressed }) => [styles25.row, pressed && styles25.rowPressed],
5413
5532
  children: [
5414
- /* @__PURE__ */ jsx(
5415
- PoolseIcon,
5416
- {
5417
- name: ICONS2[route.kind],
5418
- size: 21,
5419
- color: selected ? callColors.accept : callColors.text,
5420
- label: null
5421
- }
5422
- ),
5423
- /* @__PURE__ */ jsx(Text, { style: [styles25.label, selected && styles25.labelSelected], children: route.label }),
5424
- selected && /* @__PURE__ */ jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
5533
+ /* @__PURE__ */ jsx(View, { style: styles25.grabber }),
5534
+ /* @__PURE__ */ jsx(Text, { style: styles25.title, children: "Audio output" }),
5535
+ routes.map((route) => {
5536
+ const selected = route.id === selectedRouteId;
5537
+ return /* @__PURE__ */ jsxs(
5538
+ Pressable,
5539
+ {
5540
+ onPress: () => {
5541
+ onSelect(route.id);
5542
+ onClose();
5543
+ },
5544
+ accessibilityRole: "button",
5545
+ accessibilityState: { selected },
5546
+ style: ({ pressed }) => [styles25.row, pressed && styles25.rowPressed],
5547
+ children: [
5548
+ /* @__PURE__ */ jsx(
5549
+ PoolseIcon,
5550
+ {
5551
+ name: ICONS2[route.kind],
5552
+ size: 21,
5553
+ color: selected ? callColors.accept : callColors.text,
5554
+ label: null
5555
+ }
5556
+ ),
5557
+ /* @__PURE__ */ jsx(Text, { style: [styles25.label, selected && styles25.labelSelected], children: route.label }),
5558
+ selected && /* @__PURE__ */ jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
5559
+ ]
5560
+ },
5561
+ route.id
5562
+ );
5563
+ })
5425
5564
  ]
5426
- },
5427
- route.id
5428
- );
5429
- })
5430
- ] }) }) });
5565
+ }
5566
+ ) })
5567
+ }
5568
+ );
5431
5569
  }
5432
5570
  var styles25 = StyleSheet.create({
5433
5571
  backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
@@ -5437,7 +5575,6 @@ var styles25 = StyleSheet.create({
5437
5575
  borderTopRightRadius: 22,
5438
5576
  paddingHorizontal: 12,
5439
5577
  paddingTop: 10,
5440
- paddingBottom: 34,
5441
5578
  gap: 2
5442
5579
  },
5443
5580
  grabber: {