@poolse/react-native 2.23.1 → 2.25.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
@@ -1021,6 +1021,7 @@ function ConversationList({
1021
1021
  const auto = react$1.useConversations();
1022
1022
  const { me } = react$1.useMe();
1023
1023
  const meExternalId = me?.external_id ?? null;
1024
+ const meId = me?.id ?? null;
1024
1025
  const isControlled = controlled !== void 0;
1025
1026
  const conversations = isControlled ? controlled : auto.conversations;
1026
1027
  const loading = isControlled ? controlledLoading ?? false : auto.loading;
@@ -1052,6 +1053,7 @@ function ConversationList({
1052
1053
  conv: item,
1053
1054
  selected,
1054
1055
  meExternalId,
1056
+ meId,
1055
1057
  unread: counts?.[item.id] ?? 0,
1056
1058
  ...labelFor ? { labelFor } : {},
1057
1059
  ...avatarFor ? { avatarFor } : {},
@@ -1066,6 +1068,7 @@ function ConversationRow({
1066
1068
  conv,
1067
1069
  selected,
1068
1070
  meExternalId,
1071
+ meId = null,
1069
1072
  unread,
1070
1073
  labelFor,
1071
1074
  avatarFor,
@@ -1099,7 +1102,7 @@ function ConversationRow({
1099
1102
  children: title
1100
1103
  }
1101
1104
  ),
1102
- conv.last_message_preview ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: conv.last_message_preview }) : conv.last_message_at ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: formatRelative(conv.last_message_at) }) : null
1105
+ conv.last_message_preview ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: react$1.formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview }) : conv.last_message_at ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: formatRelative(conv.last_message_at) }) : null
1103
1106
  ] }),
1104
1107
  unread > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles5.unreadPill, { backgroundColor: theme.colors.unreadPill }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.unreadText, { color: theme.colors.unreadPillText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
1105
1108
  ]
@@ -2205,6 +2208,87 @@ var styles11 = reactNative.StyleSheet.create({
2205
2208
  fontWeight: "600"
2206
2209
  }
2207
2210
  });
2211
+ function CallLogRow({ msg, meId }) {
2212
+ const theme = usePoolseTheme();
2213
+ const display = react$1.callLogDisplayFor(msg, meId);
2214
+ if (!display) return null;
2215
+ const accent = display.missed ? theme.colors.error : theme.colors.ink3;
2216
+ const time = formatTime(msg.inserted_at);
2217
+ 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(
2232
+ reactNative.Text,
2233
+ {
2234
+ style: [
2235
+ styles12.title,
2236
+ {
2237
+ color: display.missed ? theme.colors.error : theme.colors.ink2,
2238
+ fontFamily: theme.type.fontBody
2239
+ }
2240
+ ],
2241
+ numberOfLines: 1,
2242
+ children: display.title
2243
+ }
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
+ ) });
2256
+ }
2257
+ function formatTime(iso) {
2258
+ const d = new Date(iso);
2259
+ if (Number.isNaN(d.getTime())) return "";
2260
+ return d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
2261
+ }
2262
+ var styles12 = reactNative.StyleSheet.create({
2263
+ wrap: {
2264
+ alignItems: "center",
2265
+ alignSelf: "stretch",
2266
+ marginVertical: 6,
2267
+ paddingHorizontal: 16
2268
+ },
2269
+ chip: {
2270
+ flexDirection: "row",
2271
+ alignItems: "center",
2272
+ gap: 6,
2273
+ maxWidth: "100%",
2274
+ paddingHorizontal: 12,
2275
+ paddingVertical: 4,
2276
+ borderRadius: 999,
2277
+ borderWidth: reactNative.StyleSheet.hairlineWidth
2278
+ },
2279
+ title: {
2280
+ fontSize: 11,
2281
+ fontWeight: "600",
2282
+ letterSpacing: 0.3,
2283
+ flexShrink: 1
2284
+ },
2285
+ meta: {
2286
+ fontSize: 11,
2287
+ fontWeight: "500",
2288
+ letterSpacing: 0.3,
2289
+ fontVariant: ["tabular-nums"]
2290
+ }
2291
+ });
2208
2292
  var DEFAULT_REACTION_EMOJIS = ["\u{1F44D}", "\u2764\uFE0F", "\u{1F602}", "\u{1F389}", "\u{1F64F}", "\u{1F525}"];
2209
2293
  function MessageActions({
2210
2294
  visible,
@@ -2230,11 +2314,11 @@ function MessageActions({
2230
2314
  if (isSelf && onDelete)
2231
2315
  items.push({ label: "Delete", icon: "trash", onPress: onDelete, danger: true });
2232
2316
  const showEmojiRow = !!onPickReaction && emojis.length > 0;
2233
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles12.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
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(
2234
2318
  reactNative.View,
2235
2319
  {
2236
2320
  style: [
2237
- styles12.sheet,
2321
+ styles13.sheet,
2238
2322
  {
2239
2323
  backgroundColor: theme.colors.surface,
2240
2324
  borderTopLeftRadius: theme.radii.lg,
@@ -2243,21 +2327,21 @@ function MessageActions({
2243
2327
  theme.shadows.lg
2244
2328
  ],
2245
2329
  children: [
2246
- showEmojiRow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles12.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
2330
+ showEmojiRow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles13.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
2247
2331
  reactNative.Pressable,
2248
2332
  {
2249
2333
  onPress: () => {
2250
2334
  onPickReaction(emoji);
2251
2335
  onClose();
2252
2336
  },
2253
- style: styles12.emojiBtn,
2337
+ style: styles13.emojiBtn,
2254
2338
  hitSlop: 6,
2255
2339
  accessibilityLabel: `React with ${emoji}`,
2256
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles12.emoji, children: emoji })
2340
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles13.emoji, children: emoji })
2257
2341
  },
2258
2342
  emoji
2259
2343
  )) }) : null,
2260
- items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress: item.onPress, style: styles12.item, children: [
2344
+ items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress: item.onPress, style: styles13.item, children: [
2261
2345
  /* @__PURE__ */ jsxRuntime.jsx(
2262
2346
  PoolseIcon,
2263
2347
  {
@@ -2270,7 +2354,7 @@ function MessageActions({
2270
2354
  reactNative.Text,
2271
2355
  {
2272
2356
  style: [
2273
- styles12.itemText,
2357
+ styles13.itemText,
2274
2358
  {
2275
2359
  color: item.danger ? theme.colors.error : theme.colors.ink,
2276
2360
  fontFamily: theme.type.fontBody
@@ -2284,7 +2368,7 @@ function MessageActions({
2284
2368
  }
2285
2369
  ) }) });
2286
2370
  }
2287
- var styles12 = reactNative.StyleSheet.create({
2371
+ var styles13 = reactNative.StyleSheet.create({
2288
2372
  backdrop: {
2289
2373
  flex: 1,
2290
2374
  backgroundColor: "rgba(0,0,0,0.35)",
@@ -2354,7 +2438,7 @@ function AttachmentPreview({
2354
2438
  reactNative.View,
2355
2439
  {
2356
2440
  style: [
2357
- styles13.imagePlaceholder,
2441
+ styles14.imagePlaceholder,
2358
2442
  {
2359
2443
  width: maxWidth,
2360
2444
  height: 200,
@@ -2374,7 +2458,7 @@ function AttachmentPreview({
2374
2458
  onPress,
2375
2459
  disabled: !onPress,
2376
2460
  style: [
2377
- styles13.fileCard,
2461
+ styles14.fileCard,
2378
2462
  {
2379
2463
  backgroundColor: onBrand ? "rgba(255,255,255,0.18)" : theme.colors.surface2,
2380
2464
  borderColor: onBrand ? "transparent" : theme.colors.border,
@@ -2387,12 +2471,12 @@ function AttachmentPreview({
2387
2471
  /* @__PURE__ */ jsxRuntime.jsx(
2388
2472
  reactNative.Text,
2389
2473
  {
2390
- style: [styles13.fileName, { color: ink, fontFamily: theme.type.fontBody }],
2474
+ style: [styles14.fileName, { color: ink, fontFamily: theme.type.fontBody }],
2391
2475
  numberOfLines: 1,
2392
2476
  children: attachment.original_filename ?? "file"
2393
2477
  }
2394
2478
  ),
2395
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles13.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes2(attachment.byte_size) })
2479
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes2(attachment.byte_size) })
2396
2480
  ] })
2397
2481
  ]
2398
2482
  }
@@ -2404,7 +2488,7 @@ function formatBytes2(n) {
2404
2488
  if (n < 1024 * 1024 * 1024) return `${(n / 1024 / 1024).toFixed(1)} MB`;
2405
2489
  return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
2406
2490
  }
2407
- var styles13 = reactNative.StyleSheet.create({
2491
+ var styles14 = reactNative.StyleSheet.create({
2408
2492
  imagePlaceholder: {},
2409
2493
  fileCard: {
2410
2494
  flexDirection: "row",
@@ -2440,7 +2524,7 @@ function ImageMosaic({
2440
2524
  reactNative.View,
2441
2525
  {
2442
2526
  style: [
2443
- styles14.root,
2527
+ styles15.root,
2444
2528
  {
2445
2529
  borderTopLeftRadius: r,
2446
2530
  borderTopRightRadius: r,
@@ -2461,18 +2545,18 @@ function ImageMosaic({
2461
2545
  {
2462
2546
  onLongPress,
2463
2547
  attachment: visible[0],
2464
- style: styles14.tileFull,
2548
+ style: styles15.tileFull,
2465
2549
  onPress: () => setViewerIndex(0),
2466
2550
  overlay: null
2467
2551
  }
2468
2552
  ) : null,
2469
- n === 2 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.rowEven, children: [
2553
+ n === 2 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.rowEven, children: [
2470
2554
  /* @__PURE__ */ jsxRuntime.jsx(
2471
2555
  Tile,
2472
2556
  {
2473
2557
  onLongPress,
2474
2558
  attachment: visible[0],
2475
- style: styles14.tileHalfSquare,
2559
+ style: styles15.tileHalfSquare,
2476
2560
  onPress: () => setViewerIndex(0),
2477
2561
  overlay: null
2478
2562
  }
@@ -2482,7 +2566,7 @@ function ImageMosaic({
2482
2566
  {
2483
2567
  onLongPress,
2484
2568
  attachment: visible[1],
2485
- style: styles14.tileHalfSquare,
2569
+ style: styles15.tileHalfSquare,
2486
2570
  onPress: () => setViewerIndex(1),
2487
2571
  overlay: null
2488
2572
  }
@@ -2494,18 +2578,18 @@ function ImageMosaic({
2494
2578
  {
2495
2579
  onLongPress,
2496
2580
  attachment: visible[0],
2497
- style: styles14.tileHero,
2581
+ style: styles15.tileHero,
2498
2582
  onPress: () => setViewerIndex(0),
2499
2583
  overlay: null
2500
2584
  }
2501
2585
  ),
2502
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles14.rowEven, { marginTop: 2 }], children: [
2586
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.rowEven, { marginTop: 2 }], children: [
2503
2587
  /* @__PURE__ */ jsxRuntime.jsx(
2504
2588
  Tile,
2505
2589
  {
2506
2590
  onLongPress,
2507
2591
  attachment: visible[1],
2508
- style: styles14.tileHalfSquare,
2592
+ style: styles15.tileHalfSquare,
2509
2593
  onPress: () => setViewerIndex(1),
2510
2594
  overlay: null
2511
2595
  }
@@ -2515,7 +2599,7 @@ function ImageMosaic({
2515
2599
  {
2516
2600
  onLongPress,
2517
2601
  attachment: visible[2],
2518
- style: styles14.tileHalfSquare,
2602
+ style: styles15.tileHalfSquare,
2519
2603
  onPress: () => setViewerIndex(2),
2520
2604
  overlay: null
2521
2605
  }
@@ -2523,13 +2607,13 @@ function ImageMosaic({
2523
2607
  ] })
2524
2608
  ] }) : null,
2525
2609
  n === 4 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
2526
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles14.rowEven, children: [
2610
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.rowEven, children: [
2527
2611
  /* @__PURE__ */ jsxRuntime.jsx(
2528
2612
  Tile,
2529
2613
  {
2530
2614
  onLongPress,
2531
2615
  attachment: visible[0],
2532
- style: styles14.tileHalfSquare,
2616
+ style: styles15.tileHalfSquare,
2533
2617
  onPress: () => setViewerIndex(0),
2534
2618
  overlay: null
2535
2619
  }
@@ -2539,19 +2623,19 @@ function ImageMosaic({
2539
2623
  {
2540
2624
  onLongPress,
2541
2625
  attachment: visible[1],
2542
- style: styles14.tileHalfSquare,
2626
+ style: styles15.tileHalfSquare,
2543
2627
  onPress: () => setViewerIndex(1),
2544
2628
  overlay: null
2545
2629
  }
2546
2630
  )
2547
2631
  ] }),
2548
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles14.rowEven, { marginTop: 2 }], children: [
2632
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.rowEven, { marginTop: 2 }], children: [
2549
2633
  /* @__PURE__ */ jsxRuntime.jsx(
2550
2634
  Tile,
2551
2635
  {
2552
2636
  onLongPress,
2553
2637
  attachment: visible[2],
2554
- style: styles14.tileHalfSquare,
2638
+ style: styles15.tileHalfSquare,
2555
2639
  onPress: () => setViewerIndex(2),
2556
2640
  overlay: null
2557
2641
  }
@@ -2561,7 +2645,7 @@ function ImageMosaic({
2561
2645
  {
2562
2646
  onLongPress,
2563
2647
  attachment: visible[3],
2564
- style: styles14.tileHalfSquare,
2648
+ style: styles15.tileHalfSquare,
2565
2649
  onPress: () => setViewerIndex(3),
2566
2650
  overlay: overflow > 0 ? `+${overflow}` : null
2567
2651
  }
@@ -2598,18 +2682,18 @@ function Tile({
2598
2682
  }) {
2599
2683
  const theme = usePoolseTheme();
2600
2684
  const { url } = react$1.useAttachmentUrl(attachment.id);
2601
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, onLongPress, style: [styles14.tileBase, style], children: [
2685
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, onLongPress, style: [styles15.tileBase, style], children: [
2602
2686
  url ? /* @__PURE__ */ jsxRuntime.jsx(
2603
2687
  reactNative.Image,
2604
2688
  {
2605
2689
  source: { uri: url },
2606
- style: [styles14.tileImage, { backgroundColor: theme.colors.surface2 }],
2690
+ style: [styles15.tileImage, { backgroundColor: theme.colors.surface2 }],
2607
2691
  resizeMode: "cover",
2608
2692
  accessible: true,
2609
2693
  accessibilityLabel: attachment.original_filename ?? "image"
2610
2694
  }
2611
- ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles14.tileImage, { backgroundColor: theme.colors.surface2 }] }),
2612
- overlay ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles14.overflow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles14.overflowText, children: overlay }) }) : null
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
2613
2697
  ] });
2614
2698
  }
2615
2699
  function FullScreenViewer({
@@ -2618,7 +2702,7 @@ function FullScreenViewer({
2618
2702
  }) {
2619
2703
  const { url } = react$1.useAttachmentUrl(attachment.id);
2620
2704
  const { width, height } = reactNative.Dimensions.get("window");
2621
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles14.viewer, onPress: onClose, children: [
2705
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles15.viewer, onPress: onClose, children: [
2622
2706
  url ? /* @__PURE__ */ jsxRuntime.jsx(
2623
2707
  reactNative.Image,
2624
2708
  {
@@ -2634,14 +2718,14 @@ function FullScreenViewer({
2634
2718
  {
2635
2719
  onPress: onClose,
2636
2720
  hitSlop: 12,
2637
- style: styles14.closeBtn,
2721
+ style: styles15.closeBtn,
2638
2722
  accessibilityLabel: "Close viewer",
2639
2723
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
2640
2724
  }
2641
2725
  )
2642
2726
  ] });
2643
2727
  }
2644
- var styles14 = reactNative.StyleSheet.create({
2728
+ var styles15 = reactNative.StyleSheet.create({
2645
2729
  root: {
2646
2730
  width: "100%",
2647
2731
  overflow: "hidden",
@@ -2815,7 +2899,7 @@ function MessageBubble({
2815
2899
  const isEdited = !!message.edited_at && !isDeleted;
2816
2900
  const trimmable = maxBodyLength > 0 && body.length > maxBodyLength;
2817
2901
  const truncated = trimmable && !expanded ? body.slice(0, maxBodyLength) + "\u2026" : body;
2818
- const time = formatTime(message.inserted_at);
2902
+ const time = formatTime2(message.inserted_at);
2819
2903
  const images = showAttachments && !isDeleted ? (message.attachments ?? []).filter((a) => isImageContentType(a.content_type)) : [];
2820
2904
  const files = showAttachments && !isDeleted ? (message.attachments ?? []).filter((a) => !isImageContentType(a.content_type)) : [];
2821
2905
  const hasMedia = images.length > 0;
@@ -2832,22 +2916,22 @@ function MessageBubble({
2832
2916
  reactNative.View,
2833
2917
  {
2834
2918
  style: [
2835
- styles15.metaRow,
2836
- variant === "inline" && styles15.metaInline,
2837
- variant === "wrapped" && styles15.metaWrapped,
2838
- variant === "overlay" && styles15.metaOverlay,
2839
- variant === "block" && styles15.metaBlock,
2919
+ styles16.metaRow,
2920
+ variant === "inline" && styles16.metaInline,
2921
+ variant === "wrapped" && styles16.metaWrapped,
2922
+ variant === "overlay" && styles16.metaOverlay,
2923
+ variant === "block" && styles16.metaBlock,
2840
2924
  // File-only bubble: the meta row follows the cards directly —
2841
2925
  // give it air so the time doesn't sit glued to the card.
2842
- variant === "block" && hasFiles && !hasBody && styles15.metaBlockAfterFiles,
2843
- variant === "jumbo" && styles15.metaJumbo
2926
+ variant === "block" && hasFiles && !hasBody && styles16.metaBlockAfterFiles,
2927
+ variant === "jumbo" && styles16.metaJumbo
2844
2928
  ],
2845
2929
  onLayout: variant === "inline" || variant === "wrapped" ? (e) => setMetaWidth(e.nativeEvent.layout.width) : void 0,
2846
2930
  pointerEvents: "none",
2847
2931
  children: [
2848
- isEdited ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.editedTag, { color, opacity: 0.8 }], children: "edited" }) : null,
2849
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
2850
- isSelf && readState ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles15.readTick, children: /* @__PURE__ */ jsxRuntime.jsx(
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(
2851
2935
  PoolseIcon,
2852
2936
  {
2853
2937
  name: readState === "read" ? "check-double" : "check",
@@ -2859,7 +2943,7 @@ function MessageBubble({
2859
2943
  }
2860
2944
  );
2861
2945
  };
2862
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.wrap, { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }], children: [
2946
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles16.wrap, { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }], children: [
2863
2947
  /* @__PURE__ */ jsxRuntime.jsxs(
2864
2948
  reactNative.View,
2865
2949
  {
@@ -2879,7 +2963,7 @@ function MessageBubble({
2879
2963
  showSenderName && !isSelf && jumboCount === 0 && (groupPosition === "first" || groupPosition === "standalone") ? /* @__PURE__ */ jsxRuntime.jsx(
2880
2964
  reactNative.Text,
2881
2965
  {
2882
- style: [styles15.senderName, { color: senderTint, fontFamily: theme.type.fontBody }],
2966
+ style: [styles16.senderName, { color: senderTint, fontFamily: theme.type.fontBody }],
2883
2967
  children: senderLabel
2884
2968
  }
2885
2969
  ) : null,
@@ -2896,7 +2980,7 @@ function MessageBubble({
2896
2980
  // 3px of bubble color framing the picture; the mosaic clips
2897
2981
  // itself 3px tighter than the bubble so the curves stay
2898
2982
  // concentric.
2899
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.mediaFrame, children: [
2983
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles16.mediaFrame, children: [
2900
2984
  /* @__PURE__ */ jsxRuntime.jsx(
2901
2985
  ImageMosaic,
2902
2986
  {
@@ -2910,7 +2994,7 @@ function MessageBubble({
2910
2994
  metaOverlay ? metaRow("overlay") : null
2911
2995
  ] })
2912
2996
  ) : null,
2913
- hasFiles ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles15.filesBlock, children: files.map((att) => /* @__PURE__ */ jsxRuntime.jsx(
2997
+ hasFiles ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.filesBlock, children: files.map((att) => /* @__PURE__ */ jsxRuntime.jsx(
2914
2998
  AttachmentPreview,
2915
2999
  {
2916
3000
  attachment: att,
@@ -2919,7 +3003,7 @@ function MessageBubble({
2919
3003
  },
2920
3004
  att.id
2921
3005
  )) }) : null,
2922
- isDeleted ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles15.textBlock, sectionAbove && styles15.textBlockAfter], children: /* @__PURE__ */ jsxRuntime.jsx(
3006
+ isDeleted ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles16.textBlock, sectionAbove && styles16.textBlockAfter], children: /* @__PURE__ */ jsxRuntime.jsx(
2923
3007
  reactNative.Text,
2924
3008
  {
2925
3009
  style: {
@@ -2933,7 +3017,7 @@ function MessageBubble({
2933
3017
  children: "Message deleted"
2934
3018
  }
2935
3019
  ) }) : null,
2936
- hasBody && jumboCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles15.jumboBlock, children: /* @__PURE__ */ jsxRuntime.jsx(
3020
+ hasBody && jumboCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.jumboBlock, children: /* @__PURE__ */ jsxRuntime.jsx(
2937
3021
  reactNative.Text,
2938
3022
  {
2939
3023
  style: { fontSize: emojiFontSize(jumboCount), lineHeight: emojiFontSize(jumboCount) + 8 },
@@ -2943,7 +3027,7 @@ function MessageBubble({
2943
3027
  hasBody && jumboCount === 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
2944
3028
  reactNative.View,
2945
3029
  {
2946
- style: [styles15.textBlock, sectionAbove && styles15.textBlockAfter],
3030
+ style: [styles16.textBlock, sectionAbove && styles16.textBlockAfter],
2947
3031
  onLayout: inlineMeta ? (e) => setTextBoxWidth(e.nativeEvent.layout.width - 24) : void 0,
2948
3032
  children: [
2949
3033
  markdown && !inlineMeta ? renderMarkdown(truncated, {
@@ -2977,7 +3061,7 @@ function MessageBubble({
2977
3061
  reactNative.Text,
2978
3062
  {
2979
3063
  style: [
2980
- styles15.readMore,
3064
+ styles16.readMore,
2981
3065
  { color: isSelf ? theme.colors.onBrand : theme.colors.brand }
2982
3066
  ],
2983
3067
  children: expanded ? "Show less" : "Read more"
@@ -2988,7 +3072,7 @@ function MessageBubble({
2988
3072
  }
2989
3073
  ) : null,
2990
3074
  !inlineMeta && !metaOverlay && jumboCount === 0 ? metaRow("block") : null,
2991
- actionsTrigger ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles15.actionsSlot, children: actionsTrigger }) : null
3075
+ actionsTrigger ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.actionsSlot, children: actionsTrigger }) : null
2992
3076
  ]
2993
3077
  }
2994
3078
  ),
@@ -3013,15 +3097,15 @@ function QuotedCard({
3013
3097
  onPress,
3014
3098
  disabled: !onPress,
3015
3099
  style: [
3016
- styles15.quoted,
3100
+ styles16.quoted,
3017
3101
  {
3018
3102
  backgroundColor: bg,
3019
3103
  borderLeftColor: accent
3020
3104
  }
3021
3105
  ],
3022
3106
  children: [
3023
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
3024
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles15.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
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" })
3025
3109
  ]
3026
3110
  }
3027
3111
  );
@@ -3030,7 +3114,7 @@ function isImageContentType(ct) {
3030
3114
  if (!ct) return false;
3031
3115
  return ct.startsWith("image/");
3032
3116
  }
3033
- function formatTime(iso) {
3117
+ function formatTime2(iso) {
3034
3118
  try {
3035
3119
  const d = new Date(iso);
3036
3120
  const now = /* @__PURE__ */ new Date();
@@ -3053,7 +3137,7 @@ function formatTime(iso) {
3053
3137
  function isSameDay(a, b) {
3054
3138
  return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
3055
3139
  }
3056
- var styles15 = reactNative.StyleSheet.create({
3140
+ var styles16 = reactNative.StyleSheet.create({
3057
3141
  wrap: {
3058
3142
  marginBottom: 2
3059
3143
  },
@@ -3180,7 +3264,7 @@ function ReactionStrip({
3180
3264
  });
3181
3265
  const entries = Object.entries(reactions);
3182
3266
  if (entries.length === 0) return null;
3183
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.strip, children: entries.map(([emoji, userIds]) => {
3267
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles17.strip, children: entries.map(([emoji, userIds]) => {
3184
3268
  const userArr = Array.isArray(userIds) ? userIds : [];
3185
3269
  const meReacted = meId !== null && userArr.includes(meId);
3186
3270
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -3188,7 +3272,7 @@ function ReactionStrip({
3188
3272
  {
3189
3273
  onPress: () => meReacted ? removeReaction(emoji) : addReaction(emoji),
3190
3274
  style: [
3191
- styles16.chip,
3275
+ styles17.chip,
3192
3276
  {
3193
3277
  backgroundColor: meReacted ? theme.colors.brandSoft : theme.colors.surface2,
3194
3278
  borderColor: meReacted ? theme.colors.brand : theme.colors.border,
@@ -3197,12 +3281,12 @@ function ReactionStrip({
3197
3281
  }
3198
3282
  ],
3199
3283
  children: [
3200
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles16.emoji, children: emoji }),
3284
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles17.emoji, children: emoji }),
3201
3285
  /* @__PURE__ */ jsxRuntime.jsx(
3202
3286
  reactNative.Text,
3203
3287
  {
3204
3288
  style: [
3205
- styles16.count,
3289
+ styles17.count,
3206
3290
  {
3207
3291
  color: meReacted ? theme.colors.brand : theme.colors.ink2,
3208
3292
  fontWeight: meReacted ? "700" : "600"
@@ -3224,11 +3308,11 @@ function ReactionPicker({
3224
3308
  emojis = DEFAULT_EMOJIS
3225
3309
  }) {
3226
3310
  const theme = usePoolseTheme();
3227
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles16.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(
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(
3228
3312
  reactNative.View,
3229
3313
  {
3230
3314
  style: [
3231
- styles16.sheet,
3315
+ styles17.sheet,
3232
3316
  {
3233
3317
  backgroundColor: theme.colors.surface,
3234
3318
  borderRadius: theme.radii.lg
@@ -3238,19 +3322,19 @@ function ReactionPicker({
3238
3322
  children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
3239
3323
  reactNative.Pressable,
3240
3324
  {
3241
- style: styles16.emojiBtn,
3325
+ style: styles17.emojiBtn,
3242
3326
  onPress: () => {
3243
3327
  onPick(emoji);
3244
3328
  onClose();
3245
3329
  },
3246
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles16.bigEmoji, children: emoji })
3330
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles17.bigEmoji, children: emoji })
3247
3331
  },
3248
3332
  emoji
3249
3333
  ))
3250
3334
  }
3251
3335
  ) }) });
3252
3336
  }
3253
- var styles16 = reactNative.StyleSheet.create({
3337
+ var styles17 = reactNative.StyleSheet.create({
3254
3338
  strip: {
3255
3339
  flexDirection: "row",
3256
3340
  flexWrap: "wrap",
@@ -3307,7 +3391,14 @@ var styles16 = reactNative.StyleSheet.create({
3307
3391
  }
3308
3392
  });
3309
3393
  var SWIPE_REPLY_THRESHOLD = 50;
3310
- function MessageRow({
3394
+ function MessageRow(props) {
3395
+ const callLog = react$1.callLogDisplayFor(props.msg, props.meId);
3396
+ if (callLog !== void 0) {
3397
+ return callLog ? /* @__PURE__ */ jsxRuntime.jsx(CallLogRow, { msg: props.msg, meId: props.meId }) : null;
3398
+ }
3399
+ return /* @__PURE__ */ jsxRuntime.jsx(BubbleMessageRow, { ...props });
3400
+ }
3401
+ function BubbleMessageRow({
3311
3402
  msg,
3312
3403
  meId,
3313
3404
  reactions = true,
@@ -3418,15 +3509,15 @@ function MessageRow({
3418
3509
  reactNative.View,
3419
3510
  {
3420
3511
  style: [
3421
- styles17.row,
3512
+ styles18.row,
3422
3513
  { alignSelf: isSelf ? "flex-end" : "flex-start" },
3423
3514
  // Lift this row above the dim backdrop the parent renders
3424
3515
  // during edit mode. zIndex covers iOS / web; elevation does
3425
3516
  // the equivalent on Android.
3426
- isEditing ? styles17.rowEditing : null
3517
+ isEditing ? styles18.rowEditing : null
3427
3518
  ],
3428
3519
  children: [
3429
- showAvatarSlot ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles17.avatarSlot, children: showAvatarRender ? /* @__PURE__ */ jsxRuntime.jsx(
3520
+ showAvatarSlot ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles18.avatarSlot, children: showAvatarRender ? /* @__PURE__ */ jsxRuntime.jsx(
3430
3521
  Avatar,
3431
3522
  {
3432
3523
  src: avatarUrl ?? null,
@@ -3435,14 +3526,14 @@ function MessageRow({
3435
3526
  size: "sm"
3436
3527
  }
3437
3528
  ) : null }) : null,
3438
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles17.bubbleCol, children: [
3529
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles18.bubbleCol, children: [
3439
3530
  swipeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(
3440
3531
  reactNative.Animated.View,
3441
3532
  {
3442
3533
  pointerEvents: "none",
3443
3534
  style: [
3444
- styles17.replyHint,
3445
- isSelf ? styles17.replyHintRight : styles17.replyHintLeft,
3535
+ styles18.replyHint,
3536
+ isSelf ? styles18.replyHintRight : styles18.replyHintLeft,
3446
3537
  {
3447
3538
  opacity: replyIconOpacity,
3448
3539
  transform: [{ scale: replyIconScale }],
@@ -3488,13 +3579,13 @@ function MessageRow({
3488
3579
  )
3489
3580
  }
3490
3581
  ),
3491
- threads && (msg.reply_count ?? 0) > 0 && onOpenThread ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: onOpenThread, style: styles17.threadPill, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [styles17.threadPillText, { color: theme.colors.brand }], children: [
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: [
3492
3583
  "\u{1F4AC} ",
3493
3584
  msg.reply_count,
3494
3585
  " ",
3495
3586
  msg.reply_count === 1 ? "reply" : "replies"
3496
3587
  ] }) }) : null,
3497
- reactions ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles17.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsxRuntime.jsx(
3588
+ reactions ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles18.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsxRuntime.jsx(
3498
3589
  ReactionStrip,
3499
3590
  {
3500
3591
  messageId: msg.id,
@@ -3553,7 +3644,7 @@ function MessageRow({
3553
3644
  }
3554
3645
  );
3555
3646
  }
3556
- var styles17 = reactNative.StyleSheet.create({
3647
+ var styles18 = reactNative.StyleSheet.create({
3557
3648
  row: {
3558
3649
  flexDirection: "row",
3559
3650
  alignItems: "flex-end",
@@ -3713,13 +3804,13 @@ function ThreadSheet({
3713
3804
  ),
3714
3805
  [rootMessage, meId, labelFor, avatarFor]
3715
3806
  );
3716
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles18.modalRoot, children: [
3717
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles18.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
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" }),
3718
3809
  /* @__PURE__ */ jsxRuntime.jsxs(
3719
3810
  reactNative.Animated.View,
3720
3811
  {
3721
3812
  style: [
3722
- styles18.sheet,
3813
+ styles19.sheet,
3723
3814
  {
3724
3815
  height: sheetHeight,
3725
3816
  backgroundColor: theme.colors.paper,
@@ -3731,14 +3822,14 @@ function ThreadSheet({
3731
3822
  ],
3732
3823
  children: [
3733
3824
  /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ...panHandlers, children: [
3734
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles18.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles18.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
3735
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles18.header, { borderBottomColor: theme.colors.border }], 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: [
3736
3827
  /* @__PURE__ */ jsxRuntime.jsx(
3737
3828
  reactNative.Pressable,
3738
3829
  {
3739
3830
  onPress: onClose,
3740
3831
  hitSlop: 16,
3741
- style: [styles18.closeBtn, { backgroundColor: theme.colors.surface2 }],
3832
+ style: [styles19.closeBtn, { backgroundColor: theme.colors.surface2 }],
3742
3833
  accessibilityLabel: "Close thread",
3743
3834
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
3744
3835
  }
@@ -3747,7 +3838,7 @@ function ThreadSheet({
3747
3838
  reactNative.Text,
3748
3839
  {
3749
3840
  style: [
3750
- styles18.title,
3841
+ styles19.title,
3751
3842
  { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
3752
3843
  ],
3753
3844
  children: "Thread"
@@ -3758,12 +3849,12 @@ function ThreadSheet({
3758
3849
  /* @__PURE__ */ jsxRuntime.jsxs(
3759
3850
  reactNative.KeyboardAvoidingView,
3760
3851
  {
3761
- style: styles18.kavBody,
3852
+ style: styles19.kavBody,
3762
3853
  behavior: reactNative.Platform.OS === "ios" ? "padding" : "height",
3763
3854
  keyboardVerticalOffset: reactNative.Platform.OS === "ios" ? gutter : 0,
3764
3855
  children: [
3765
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles18.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
3766
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles18.listWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
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(
3767
3858
  MessageList,
3768
3859
  {
3769
3860
  messages: replies,
@@ -3799,7 +3890,7 @@ function ThreadSheet({
3799
3890
  )
3800
3891
  ] });
3801
3892
  }
3802
- var styles18 = reactNative.StyleSheet.create({
3893
+ var styles19 = reactNative.StyleSheet.create({
3803
3894
  modalRoot: {
3804
3895
  flex: 1,
3805
3896
  justifyContent: "flex-end"
@@ -3871,7 +3962,7 @@ function TypingIndicator({ typing, labelFor }) {
3871
3962
  const ids = Array.from(typing);
3872
3963
  const isTyping = ids.length > 0;
3873
3964
  if (!isTyping) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { height: 0 } });
3874
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.row, children: [
3965
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.row, children: [
3875
3966
  /* @__PURE__ */ jsxRuntime.jsx(TypingDots, {}),
3876
3967
  /* @__PURE__ */ jsxRuntime.jsx(TypingLabel, { ids, ...labelFor ? { labelFor } : {} })
3877
3968
  ] });
@@ -3916,7 +4007,7 @@ function TypingDots() {
3916
4007
  ],
3917
4008
  opacity: val.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] })
3918
4009
  });
3919
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles19.dotsWrap, children: [
4010
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.dotsWrap, children: [
3920
4011
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(a) }),
3921
4012
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(b) }),
3922
4013
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(c) })
@@ -3932,9 +4023,9 @@ function TypingLabel({
3932
4023
  const name1 = useDisplayName(id1, labelFor);
3933
4024
  const name2 = useDisplayName(id2, labelFor);
3934
4025
  const text = ids.length === 1 ? `${name1} is typing` : ids.length === 2 ? `${name1} and ${name2} are typing` : `${ids.length} people are typing`;
3935
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles19.label, { color: theme.colors.ink2, fontFamily: theme.type.fontBody }], children: text });
4026
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles20.label, { color: theme.colors.ink2, fontFamily: theme.type.fontBody }], children: text });
3936
4027
  }
3937
- var styles19 = reactNative.StyleSheet.create({
4028
+ var styles20 = reactNative.StyleSheet.create({
3938
4029
  row: {
3939
4030
  flexDirection: "row",
3940
4031
  alignItems: "center",
@@ -4036,20 +4127,27 @@ function ConversationView({
4036
4127
  });
4037
4128
  onMarkedRead?.(conversationId, latest.id);
4038
4129
  }, [messages, meId, readReceipts, markReadUpTo, onMarkedRead, conversationId]);
4130
+ const visibleMessages = react.useMemo(
4131
+ () => messages.filter((m) => react$1.isMessageVisibleTo(m, meId)),
4132
+ [messages, meId]
4133
+ );
4039
4134
  const groupPositionById = react.useMemo(() => {
4040
4135
  const map = /* @__PURE__ */ new Map();
4041
- for (let i = 0; i < messages.length; i++) {
4042
- const msg = messages[i];
4136
+ for (let i = 0; i < visibleMessages.length; i++) {
4137
+ const msg = visibleMessages[i];
4043
4138
  if (!msg) continue;
4044
- const prev = i > 0 ? messages[i - 1] ?? null : null;
4045
- const next = i < messages.length - 1 ? messages[i + 1] ?? null : null;
4139
+ const prev = i > 0 ? visibleMessages[i - 1] ?? null : null;
4140
+ const next = i < visibleMessages.length - 1 ? visibleMessages[i + 1] ?? null : null;
4046
4141
  map.set(msg.id, react$1.computeGroupPosition(msg, prev, next, GROUPING_WINDOW_MS));
4047
4142
  }
4048
4143
  return map;
4049
- }, [messages]);
4144
+ }, [visibleMessages]);
4050
4145
  const renderItem = react.useCallback(
4051
4146
  (msg) => {
4052
- if (renderMessage) return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: renderMessage(msg, meId) });
4147
+ if (renderMessage) {
4148
+ const custom = renderMessage(msg, meId);
4149
+ if (custom !== null && custom !== void 0) return custom;
4150
+ }
4053
4151
  const readState = readReceipts && meId !== null && msg.sender_id === meId ? readStateForMessage(msg, members, meId, sequenceByMessageId) : void 0;
4054
4152
  const isSelf = meId !== null && msg.sender_id === meId;
4055
4153
  const canEdit = isSelf && !msg.deleted_at && (readState ?? "sent") === "sent";
@@ -4109,7 +4207,7 @@ function ConversationView({
4109
4207
  const listItems = react.useMemo(() => {
4110
4208
  const out = [];
4111
4209
  let prev = null;
4112
- for (const msg of messages) {
4210
+ for (const msg of visibleMessages) {
4113
4211
  if (prev === null || !react$1.sameDay(msg.inserted_at, prev.inserted_at)) {
4114
4212
  const label = react$1.formatDayLabel(msg.inserted_at);
4115
4213
  out.push({
@@ -4122,7 +4220,7 @@ function ConversationView({
4122
4220
  prev = msg;
4123
4221
  }
4124
4222
  return out;
4125
- }, [messages]);
4223
+ }, [visibleMessages]);
4126
4224
  const composerProps = react.useMemo(
4127
4225
  () => ({
4128
4226
  onSend: async (body, opts) => {
@@ -4172,16 +4270,16 @@ function ConversationView({
4172
4270
  return /* @__PURE__ */ jsxRuntime.jsx(UploadProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(
4173
4271
  reactNative.KeyboardAvoidingView,
4174
4272
  {
4175
- style: [styles20.root, { backgroundColor: theme.colors.paper }],
4273
+ style: [styles21.root, { backgroundColor: theme.colors.paper }],
4176
4274
  behavior: reactNative.Platform.OS === "ios" ? "padding" : "height",
4177
4275
  keyboardVerticalOffset: keyboardOffset,
4178
4276
  children: [
4179
4277
  headerNode,
4180
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.listWrap, children: [
4278
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.listWrap, children: [
4181
4279
  /* @__PURE__ */ jsxRuntime.jsx(
4182
4280
  MessageList,
4183
4281
  {
4184
- messages,
4282
+ messages: visibleMessages,
4185
4283
  items: listItems,
4186
4284
  meId,
4187
4285
  loading,
@@ -4195,7 +4293,7 @@ function ConversationView({
4195
4293
  editingId ? /* @__PURE__ */ jsxRuntime.jsx(
4196
4294
  reactNative.Pressable,
4197
4295
  {
4198
- style: styles20.editBackdrop,
4296
+ style: styles21.editBackdrop,
4199
4297
  onPress: () => setEditingId(null),
4200
4298
  accessibilityLabel: "Cancel editing"
4201
4299
  }
@@ -4230,7 +4328,7 @@ function readStateForMessage(msg, members, meId, sequenceByMessageId) {
4230
4328
  });
4231
4329
  return anyRead ? "read" : "sent";
4232
4330
  }
4233
- var styles20 = reactNative.StyleSheet.create({
4331
+ var styles21 = reactNative.StyleSheet.create({
4234
4332
  root: {
4235
4333
  flex: 1
4236
4334
  },
@@ -4312,13 +4410,13 @@ function UserPickerSheet({
4312
4410
  animationType: "slide",
4313
4411
  onRequestClose: handleClose,
4314
4412
  statusBarTranslucent: true,
4315
- children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.modalRoot, children: [
4316
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles21.backdrop, onPress: handleClose }),
4413
+ children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.modalRoot, children: [
4414
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles22.backdrop, onPress: handleClose }),
4317
4415
  /* @__PURE__ */ jsxRuntime.jsxs(
4318
4416
  reactNative.Animated.View,
4319
4417
  {
4320
4418
  style: [
4321
- styles21.sheet,
4419
+ styles22.sheet,
4322
4420
  {
4323
4421
  backgroundColor: theme.colors.paper,
4324
4422
  borderTopLeftRadius: theme.radii.xl,
@@ -4328,14 +4426,14 @@ function UserPickerSheet({
4328
4426
  theme.shadows.lg
4329
4427
  ],
4330
4428
  children: [
4331
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { ...panHandlers, style: styles21.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles21.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
4332
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.header, 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: [
4333
4431
  /* @__PURE__ */ jsxRuntime.jsx(
4334
4432
  reactNative.Pressable,
4335
4433
  {
4336
4434
  onPress: handleClose,
4337
4435
  hitSlop: 16,
4338
- style: [styles21.closeBtn, { backgroundColor: theme.colors.surface2 }],
4436
+ style: [styles22.closeBtn, { backgroundColor: theme.colors.surface2 }],
4339
4437
  accessibilityLabel: "Close picker",
4340
4438
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
4341
4439
  }
@@ -4344,7 +4442,7 @@ function UserPickerSheet({
4344
4442
  reactNative.Text,
4345
4443
  {
4346
4444
  style: [
4347
- styles21.title,
4445
+ styles22.title,
4348
4446
  { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4349
4447
  ],
4350
4448
  numberOfLines: 1,
@@ -4358,7 +4456,7 @@ function UserPickerSheet({
4358
4456
  disabled: !canCreate,
4359
4457
  hitSlop: 6,
4360
4458
  style: [
4361
- styles21.createBtn,
4459
+ styles22.createBtn,
4362
4460
  {
4363
4461
  backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
4364
4462
  opacity: canCreate ? 1 : 0.6
@@ -4389,7 +4487,7 @@ function UserPickerSheet({
4389
4487
  value: groupName,
4390
4488
  onChangeText: setGroupName,
4391
4489
  style: [
4392
- styles21.groupNameInput,
4490
+ styles22.groupNameInput,
4393
4491
  {
4394
4492
  color: theme.colors.ink,
4395
4493
  backgroundColor: theme.colors.surface2,
@@ -4408,7 +4506,7 @@ function UserPickerSheet({
4408
4506
  value: query,
4409
4507
  onChangeText: setQuery,
4410
4508
  style: [
4411
- styles21.searchInput,
4509
+ styles22.searchInput,
4412
4510
  {
4413
4511
  color: theme.colors.ink,
4414
4512
  backgroundColor: theme.colors.surface2,
@@ -4424,7 +4522,7 @@ function UserPickerSheet({
4424
4522
  {
4425
4523
  data: filtered,
4426
4524
  keyExtractor: (u) => u.externalId,
4427
- ListEmptyComponent: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles21.empty, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles21.emptyText, { color: theme.colors.ink3 }], children: query ? "No matches." : "No users to show." }) }),
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." }) }),
4428
4526
  renderItem: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
4429
4527
  UserRow,
4430
4528
  {
@@ -4462,29 +4560,29 @@ function UserRow({
4462
4560
  {
4463
4561
  onPress,
4464
4562
  style: [
4465
- styles21.row,
4563
+ styles22.row,
4466
4564
  {
4467
4565
  backgroundColor: selected ? theme.colors.brandSoft : "transparent"
4468
4566
  }
4469
4567
  ],
4470
4568
  children: [
4471
- user.avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: user.avatarUrl }, style: styles21.avatarImg }) : /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
4472
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.body, 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: [
4473
4571
  /* @__PURE__ */ jsxRuntime.jsx(
4474
4572
  reactNative.Text,
4475
4573
  {
4476
- style: [styles21.name, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
4574
+ style: [styles22.name, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
4477
4575
  numberOfLines: 1,
4478
4576
  children: user.name
4479
4577
  }
4480
4578
  ),
4481
- user.subtitle ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles21.subtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: user.subtitle }) : null
4579
+ user.subtitle ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.subtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: user.subtitle }) : null
4482
4580
  ] }),
4483
4581
  isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
4484
4582
  reactNative.View,
4485
4583
  {
4486
4584
  style: [
4487
- styles21.checkbox,
4585
+ styles22.checkbox,
4488
4586
  {
4489
4587
  borderColor: selected ? theme.colors.brand : theme.colors.border,
4490
4588
  backgroundColor: selected ? theme.colors.brand : "transparent"
@@ -4497,7 +4595,7 @@ function UserRow({
4497
4595
  }
4498
4596
  );
4499
4597
  }
4500
- var styles21 = reactNative.StyleSheet.create({
4598
+ var styles22 = reactNative.StyleSheet.create({
4501
4599
  modalRoot: {
4502
4600
  flex: 1,
4503
4601
  justifyContent: "flex-end"
@@ -4622,6 +4720,7 @@ var PoolseInbox = react.forwardRef(
4622
4720
  refetch: refetchConversations
4623
4721
  } = react$1.useConversations();
4624
4722
  const meExternalId = me?.external_id ?? null;
4723
+ const meId = me?.id ?? null;
4625
4724
  const detailKeyboardOffset = CHAT_HEADER_HEIGHT;
4626
4725
  const [activeId, setActiveId] = react.useState(null);
4627
4726
  const [userPickerOpen, setUserPickerOpen] = react.useState(false);
@@ -4748,6 +4847,7 @@ var PoolseInbox = react.forwardRef(
4748
4847
  conv,
4749
4848
  selected,
4750
4849
  meExternalId,
4850
+ meId,
4751
4851
  unread,
4752
4852
  ...labelFor ? { labelFor } : {},
4753
4853
  ...avatarFor ? { avatarFor } : {},
@@ -4755,9 +4855,9 @@ var PoolseInbox = react.forwardRef(
4755
4855
  }
4756
4856
  );
4757
4857
  },
4758
- [renderConversationRow, meExternalId, labelFor, avatarFor, unreadCounts]
4858
+ [renderConversationRow, meExternalId, meId, labelFor, avatarFor, unreadCounts]
4759
4859
  );
4760
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles22.root, { backgroundColor: theme.colors.paper }], children: [
4860
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles23.root, { backgroundColor: theme.colors.paper }], children: [
4761
4861
  /* @__PURE__ */ jsxRuntime.jsxs(
4762
4862
  reactNative.Animated.View,
4763
4863
  {
@@ -4768,7 +4868,7 @@ var PoolseInbox = react.forwardRef(
4768
4868
  reactNative.View,
4769
4869
  {
4770
4870
  style: [
4771
- styles22.listHeader,
4871
+ styles23.listHeader,
4772
4872
  {
4773
4873
  backgroundColor: theme.colors.surface,
4774
4874
  borderBottomColor: theme.colors.border
@@ -4779,13 +4879,13 @@ var PoolseInbox = react.forwardRef(
4779
4879
  reactNative.Text,
4780
4880
  {
4781
4881
  style: [
4782
- styles22.listTitle,
4882
+ styles23.listTitle,
4783
4883
  { color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
4784
4884
  ],
4785
4885
  children: title
4786
4886
  }
4787
4887
  ),
4788
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.headerActions, children: [
4888
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles23.headerActions, children: [
4789
4889
  users ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
4790
4890
  /* @__PURE__ */ jsxRuntime.jsx(
4791
4891
  HeaderIconButton,
@@ -4898,7 +4998,7 @@ function HeaderIconButton({
4898
4998
  hitSlop: 10,
4899
4999
  accessibilityLabel: label,
4900
5000
  style: ({ pressed }) => [
4901
- styles22.iconBtn,
5001
+ styles23.iconBtn,
4902
5002
  {
4903
5003
  backgroundColor: pressed ? theme.colors.surface2 : "transparent"
4904
5004
  }
@@ -4911,6 +5011,7 @@ function DefaultConversationRow({
4911
5011
  conv,
4912
5012
  selected,
4913
5013
  meExternalId,
5014
+ meId = null,
4914
5015
  unread,
4915
5016
  labelFor,
4916
5017
  avatarFor,
@@ -4928,31 +5029,31 @@ function DefaultConversationRow({
4928
5029
  {
4929
5030
  onPress,
4930
5031
  style: [
4931
- styles22.row,
5032
+ styles23.row,
4932
5033
  {
4933
5034
  backgroundColor: selected ? theme.colors.surface2 : "transparent",
4934
5035
  borderBottomColor: theme.colors.border
4935
5036
  }
4936
5037
  ],
4937
5038
  children: [
4938
- avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: avatarUrl }, style: styles22.rowAvatar }) : /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: title, seed: avatarSeed, size: "md" }),
4939
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.rowBody, 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: [
4940
5041
  /* @__PURE__ */ jsxRuntime.jsx(
4941
5042
  reactNative.Text,
4942
5043
  {
4943
- style: [styles22.rowTitle, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
5044
+ style: [styles23.rowTitle, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
4944
5045
  numberOfLines: 1,
4945
5046
  children: title
4946
5047
  }
4947
5048
  ),
4948
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.rowSubtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
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`) })
4949
5050
  ] }),
4950
- unread > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles22.unreadPill, { backgroundColor: theme.colors.unreadPill }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.unreadText, { color: theme.colors.unreadPillText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
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
4951
5052
  ]
4952
5053
  }
4953
5054
  );
4954
5055
  }
4955
- var styles22 = reactNative.StyleSheet.create({
5056
+ var styles23 = reactNative.StyleSheet.create({
4956
5057
  root: {
4957
5058
  flex: 1,
4958
5059
  overflow: "hidden"
@@ -5156,10 +5257,10 @@ function VoiceRoomBar({
5156
5257
  reactNative.View,
5157
5258
  {
5158
5259
  style: [
5159
- styles23.bar,
5260
+ styles24.bar,
5160
5261
  { backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
5161
5262
  ],
5162
- children: unavailableSlot ?? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.hint, { color: theme.colors.ink3 }], children: "Voice needs react-native-webrtc and a development build." })
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." })
5163
5264
  }
5164
5265
  );
5165
5266
  }
@@ -5167,22 +5268,22 @@ function VoiceRoomBar({
5167
5268
  reactNative.View,
5168
5269
  {
5169
5270
  style: [
5170
- styles23.bar,
5271
+ styles24.bar,
5171
5272
  { backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
5172
5273
  ],
5173
5274
  children: [
5174
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles23.row, children: [
5275
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.row, children: [
5175
5276
  /* @__PURE__ */ jsxRuntime.jsx(
5176
5277
  reactNative.View,
5177
5278
  {
5178
5279
  style: [
5179
- styles23.dot,
5280
+ styles24.dot,
5180
5281
  { backgroundColor: connected ? theme.colors.brand : theme.colors.ink3 }
5181
5282
  ]
5182
5283
  }
5183
5284
  ),
5184
5285
  connected ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5185
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles23.people, children: participants.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.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)) }),
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)) }),
5186
5287
  /* @__PURE__ */ jsxRuntime.jsx(
5187
5288
  reactNative.Pressable,
5188
5289
  {
@@ -5190,7 +5291,7 @@ function VoiceRoomBar({
5190
5291
  accessibilityRole: "button",
5191
5292
  accessibilityState: { selected: muted },
5192
5293
  style: [
5193
- styles23.btn,
5294
+ styles24.btn,
5194
5295
  {
5195
5296
  borderColor: muted ? theme.colors.brand : theme.colors.border,
5196
5297
  backgroundColor: muted ? theme.colors.brandSoft : theme.colors.paper
@@ -5204,25 +5305,25 @@ function VoiceRoomBar({
5204
5305
  {
5205
5306
  onPress: leave,
5206
5307
  accessibilityRole: "button",
5207
- style: [styles23.btn, { borderColor: theme.colors.error }],
5308
+ style: [styles24.btn, { borderColor: theme.colors.error }],
5208
5309
  children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { color: theme.colors.error }, children: "Leave" })
5209
5310
  }
5210
5311
  )
5211
5312
  ] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
5212
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.hint, { color: theme.colors.ink3 }], children: status === "connecting" ? "Connecting\u2026" : "Talk to everyone here" }),
5313
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.hint, { color: theme.colors.ink3 }], children: status === "connecting" ? "Connecting\u2026" : "Talk to everyone here" }),
5213
5314
  /* @__PURE__ */ jsxRuntime.jsx(
5214
5315
  reactNative.Pressable,
5215
5316
  {
5216
5317
  onPress: () => void join(),
5217
5318
  disabled: status === "connecting",
5218
5319
  accessibilityRole: "button",
5219
- style: [styles23.btn, styles23.btnPrimary, { backgroundColor: theme.colors.brand }],
5320
+ style: [styles24.btn, styles24.btnPrimary, { backgroundColor: theme.colors.brand }],
5220
5321
  children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { color: theme.colors.onBrand, fontWeight: "600" }, children: status === "connecting" ? "Joining\u2026" : "Join Voice" })
5221
5322
  }
5222
5323
  )
5223
5324
  ] })
5224
5325
  ] }),
5225
- error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.error, { color: theme.colors.error }], children: error.message })
5326
+ error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.error, { color: theme.colors.error }], children: error.message })
5226
5327
  ]
5227
5328
  }
5228
5329
  );
@@ -5233,7 +5334,7 @@ function ParticipantChip({ participant, label }) {
5233
5334
  reactNative.View,
5234
5335
  {
5235
5336
  style: [
5236
- styles23.chip,
5337
+ styles24.chip,
5237
5338
  {
5238
5339
  backgroundColor: theme.colors.paper,
5239
5340
  // The speaking ring is a border colour swap rather than an
@@ -5252,7 +5353,7 @@ function ParticipantChip({ participant, label }) {
5252
5353
  }
5253
5354
  );
5254
5355
  }
5255
- var styles23 = reactNative.StyleSheet.create({
5356
+ var styles24 = reactNative.StyleSheet.create({
5256
5357
  bar: { paddingHorizontal: 14, paddingVertical: 8, borderBottomWidth: reactNative.StyleSheet.hairlineWidth },
5257
5358
  row: { flexDirection: "row", alignItems: "center", gap: 8, flexWrap: "wrap" },
5258
5359
  dot: { width: 8, height: 8, borderRadius: 4 },
@@ -5321,10 +5422,10 @@ function AudioRouteSheet({
5321
5422
  onSelect,
5322
5423
  onClose
5323
5424
  }) {
5324
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles24.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles24.sheet, onPress: () => {
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: () => {
5325
5426
  }, children: [
5326
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles24.grabber }),
5327
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles24.title, children: "Audio output" }),
5427
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.grabber }),
5428
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles25.title, children: "Audio output" }),
5328
5429
  routes.map((route) => {
5329
5430
  const selected = route.id === selectedRouteId;
5330
5431
  return /* @__PURE__ */ jsxRuntime.jsxs(
@@ -5336,7 +5437,7 @@ function AudioRouteSheet({
5336
5437
  },
5337
5438
  accessibilityRole: "button",
5338
5439
  accessibilityState: { selected },
5339
- style: ({ pressed }) => [styles24.row, pressed && styles24.rowPressed],
5440
+ style: ({ pressed }) => [styles25.row, pressed && styles25.rowPressed],
5340
5441
  children: [
5341
5442
  /* @__PURE__ */ jsxRuntime.jsx(
5342
5443
  PoolseIcon,
@@ -5347,7 +5448,7 @@ function AudioRouteSheet({
5347
5448
  label: null
5348
5449
  }
5349
5450
  ),
5350
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.label, selected && styles24.labelSelected], children: route.label }),
5451
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.label, selected && styles25.labelSelected], children: route.label }),
5351
5452
  selected && /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
5352
5453
  ]
5353
5454
  },
@@ -5356,7 +5457,7 @@ function AudioRouteSheet({
5356
5457
  })
5357
5458
  ] }) }) });
5358
5459
  }
5359
- var styles24 = reactNative.StyleSheet.create({
5460
+ var styles25 = reactNative.StyleSheet.create({
5360
5461
  backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
5361
5462
  sheet: {
5362
5463
  backgroundColor: callColors.tile,
@@ -5438,11 +5539,11 @@ function PulseRings({ size, color }) {
5438
5539
  });
5439
5540
  return () => loops.forEach((l) => l.stop());
5440
5541
  }, []);
5441
- return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [reactNative.StyleSheet.absoluteFill, styles25.center], pointerEvents: "none", children: phases.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
5542
+ return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [reactNative.StyleSheet.absoluteFill, styles26.center], pointerEvents: "none", children: phases.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
5442
5543
  reactNative.Animated.View,
5443
5544
  {
5444
5545
  style: [
5445
- styles25.ring,
5546
+ styles26.ring,
5446
5547
  {
5447
5548
  width: size,
5448
5549
  height: size,
@@ -5463,7 +5564,7 @@ function PulseRings({ size, color }) {
5463
5564
  i
5464
5565
  )) });
5465
5566
  }
5466
- var styles25 = reactNative.StyleSheet.create({
5567
+ var styles26 = reactNative.StyleSheet.create({
5467
5568
  center: { alignItems: "center", justifyContent: "center" },
5468
5569
  ring: { position: "absolute", borderWidth: 1.5 }
5469
5570
  });
@@ -5474,7 +5575,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
5474
5575
  reactNative.View,
5475
5576
  {
5476
5577
  style: [
5477
- styles26.ring,
5578
+ styles27.ring,
5478
5579
  {
5479
5580
  width: outer,
5480
5581
  height: outer,
@@ -5487,7 +5588,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
5487
5588
  reactNative.View,
5488
5589
  {
5489
5590
  style: [
5490
- styles26.circle,
5591
+ styles27.circle,
5491
5592
  {
5492
5593
  width: size,
5493
5594
  height: size,
@@ -5498,7 +5599,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
5498
5599
  children: /* @__PURE__ */ jsxRuntime.jsx(
5499
5600
  reactNative.Text,
5500
5601
  {
5501
- style: [styles26.initials, { fontSize: Math.round(size * 0.38) }],
5602
+ style: [styles27.initials, { fontSize: Math.round(size * 0.38) }],
5502
5603
  numberOfLines: 1,
5503
5604
  allowFontScaling: false,
5504
5605
  children: initialsOf(name)
@@ -5515,7 +5616,7 @@ function initialsOf(name) {
5515
5616
  if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
5516
5617
  return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
5517
5618
  }
5518
- var styles26 = reactNative.StyleSheet.create({
5619
+ var styles27 = reactNative.StyleSheet.create({
5519
5620
  ring: { alignItems: "center", justifyContent: "center" },
5520
5621
  circle: { alignItems: "center", justifyContent: "center" },
5521
5622
  initials: { color: "#ffffff", fontWeight: "600" }
@@ -5533,7 +5634,7 @@ function CallControlButton({
5533
5634
  const size = large ? CONTROL_SIZE_LARGE : CONTROL_SIZE;
5534
5635
  const background = tone === "danger" ? callColors.danger : tone === "accept" ? callColors.accept : active ? callColors.controlActive : callColors.control;
5535
5636
  const iconColor = tone === "neutral" && active ? callColors.controlActiveIcon : callColors.onAction;
5536
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles27.slot, children: [
5637
+ return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles28.slot, children: [
5537
5638
  /* @__PURE__ */ jsxRuntime.jsx(
5538
5639
  reactNative.Pressable,
5539
5640
  {
@@ -5544,7 +5645,7 @@ function CallControlButton({
5544
5645
  accessibilityLabel: accessibilityLabel ?? label ?? icon,
5545
5646
  hitSlop: 8,
5546
5647
  style: ({ pressed }) => [
5547
- styles27.button,
5648
+ styles28.button,
5548
5649
  {
5549
5650
  width: size,
5550
5651
  height: size,
@@ -5558,10 +5659,10 @@ function CallControlButton({
5558
5659
  children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: icon, size: large ? 30 : 25, color: iconColor, label: null })
5559
5660
  }
5560
5661
  ),
5561
- label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles27.label, children: label }) : null
5662
+ label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles28.label, children: label }) : null
5562
5663
  ] });
5563
5664
  }
5564
- var styles27 = reactNative.StyleSheet.create({
5665
+ var styles28 = reactNative.StyleSheet.create({
5565
5666
  // Fixed width so captions of different lengths cannot shift the row.
5566
5667
  slot: { width: 76, alignItems: "center", gap: 7 },
5567
5668
  button: { alignItems: "center", justifyContent: "center" },
@@ -5582,8 +5683,8 @@ function CallParticipantTile({
5582
5683
  reactNative.View,
5583
5684
  {
5584
5685
  style: [
5585
- styles28.tile,
5586
- bleed ? styles28.bleed : styles28.rounded,
5686
+ styles29.tile,
5687
+ bleed ? styles29.bleed : styles29.rounded,
5587
5688
  {
5588
5689
  backgroundColor: callColors.tile,
5589
5690
  // A ring rather than a badge: it reads at a glance across a
@@ -5602,7 +5703,7 @@ function CallParticipantTile({
5602
5703
  mirror: participant.isSelf,
5603
5704
  zOrder: participant.isSelf ? 1 : 0
5604
5705
  }
5605
- ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles28.placeholder, children: /* @__PURE__ */ jsxRuntime.jsx(
5706
+ ) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles29.placeholder, children: /* @__PURE__ */ jsxRuntime.jsx(
5606
5707
  CallAvatar,
5607
5708
  {
5608
5709
  name,
@@ -5611,17 +5712,17 @@ function CallParticipantTile({
5611
5712
  speaking: participant.speaking
5612
5713
  }
5613
5714
  ) }),
5614
- !hideName && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles28.chip, bleed ? styles28.chipBleed : styles28.chipTile], children: [
5715
+ !hideName && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles29.chip, bleed ? styles29.chipBleed : styles29.chipTile], children: [
5615
5716
  !participant.micEnabled && // Worth showing even for yourself — it is the answer to
5616
5717
  // "why can nobody hear me".
5617
5718
  /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "mic-off", size: 13, color: callColors.text, label: "muted" }),
5618
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles28.name, children: name })
5719
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles29.name, children: name })
5619
5720
  ] })
5620
5721
  ]
5621
5722
  }
5622
5723
  );
5623
5724
  }
5624
- var styles28 = reactNative.StyleSheet.create({
5725
+ var styles29 = reactNative.StyleSheet.create({
5625
5726
  tile: { overflow: "hidden", justifyContent: "flex-end", borderWidth: 2 },
5626
5727
  rounded: { borderRadius: 18 },
5627
5728
  bleed: { borderRadius: 0, borderWidth: 0 },
@@ -5719,7 +5820,7 @@ function LocalVideoPip({
5719
5820
  reactNative.Animated.View,
5720
5821
  {
5721
5822
  ...responder.panHandlers,
5722
- style: [styles29.pip, { transform: pan.getTranslateTransform() }],
5823
+ style: [styles30.pip, { transform: pan.getTranslateTransform() }],
5723
5824
  children: /* @__PURE__ */ jsxRuntime.jsx(
5724
5825
  reactNative.Pressable,
5725
5826
  {
@@ -5729,8 +5830,8 @@ function LocalVideoPip({
5729
5830
  },
5730
5831
  accessibilityRole: "button",
5731
5832
  accessibilityLabel: "Your camera. Drag to move, tap to switch camera.",
5732
- style: styles29.fill,
5733
- children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles29.fill, children: /* @__PURE__ */ jsxRuntime.jsx(
5833
+ style: styles30.fill,
5834
+ children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles30.fill, children: /* @__PURE__ */ jsxRuntime.jsx(
5734
5835
  CallParticipantTile,
5735
5836
  {
5736
5837
  participant,
@@ -5739,7 +5840,7 @@ function LocalVideoPip({
5739
5840
  avatarSize: 48,
5740
5841
  hideName: true,
5741
5842
  bleed: true,
5742
- style: styles29.fill
5843
+ style: styles30.fill
5743
5844
  }
5744
5845
  ) })
5745
5846
  }
@@ -5747,7 +5848,7 @@ function LocalVideoPip({
5747
5848
  }
5748
5849
  );
5749
5850
  }
5750
- var styles29 = reactNative.StyleSheet.create({
5851
+ var styles30 = reactNative.StyleSheet.create({
5751
5852
  pip: {
5752
5853
  position: "absolute",
5753
5854
  top: 0,
@@ -5796,11 +5897,11 @@ function CallVideoGrid({
5796
5897
  const availableHeight = size.height > 0 ? size.height - padTop - padBottom : 0;
5797
5898
  const tileHeight = availableHeight > 0 ? (availableHeight - GAP * (rows - 1)) / rows : 0;
5798
5899
  const scrolls = tileHeight > 0 && tileHeight < MIN_TILE_HEIGHT;
5799
- if (participants.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles30.stage, onLayout });
5900
+ if (participants.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles31.stage, onLayout });
5800
5901
  if (others.length <= 1) {
5801
5902
  const spotlight = others[0] ?? self;
5802
- if (!spotlight) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles30.stage, onLayout });
5803
- return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles30.stage, onLayout, children: [
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: [
5804
5905
  /* @__PURE__ */ jsxRuntime.jsx(
5805
5906
  CallParticipantTile,
5806
5907
  {
@@ -5810,7 +5911,7 @@ function CallVideoGrid({
5810
5911
  avatarSize: Math.min(148, Math.max(96, Math.round(size.width * 0.36))),
5811
5912
  bleed: true,
5812
5913
  hideName: others.length === 1,
5813
- style: styles30.fill
5914
+ style: styles31.fill
5814
5915
  }
5815
5916
  ),
5816
5917
  self && others.length === 1 && size.width > 0 && /* @__PURE__ */ jsxRuntime.jsx(
@@ -5828,7 +5929,7 @@ function CallVideoGrid({
5828
5929
  }
5829
5930
  const tiles = [...others, ...self ? [self] : []];
5830
5931
  const width = size.width > 0 ? (size.width - GAP * (columns - 1)) / columns : 0;
5831
- const grid = /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles30.grid, scrolls ? styles30.gridScrolling : styles30.gridFilling], children: tiles.map((participant) => /* @__PURE__ */ jsxRuntime.jsx(
5932
+ const grid = /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles31.grid, scrolls ? styles31.gridScrolling : styles31.gridFilling], children: tiles.map((participant) => /* @__PURE__ */ jsxRuntime.jsx(
5832
5933
  CallParticipantTile,
5833
5934
  {
5834
5935
  participant,
@@ -5845,13 +5946,13 @@ function CallVideoGrid({
5845
5946
  return /* @__PURE__ */ jsxRuntime.jsx(
5846
5947
  reactNative.View,
5847
5948
  {
5848
- style: [styles30.stage, { paddingTop: padTop, paddingBottom: padBottom }],
5949
+ style: [styles31.stage, { paddingTop: padTop, paddingBottom: padBottom }],
5849
5950
  onLayout,
5850
5951
  children: scrolls ? /* @__PURE__ */ jsxRuntime.jsx(
5851
5952
  reactNative.ScrollView,
5852
5953
  {
5853
5954
  contentContainerStyle: [
5854
- styles30.scroll,
5955
+ styles31.scroll,
5855
5956
  { paddingBottom: (chromeInsets?.bottom ?? 0) + GAP }
5856
5957
  ],
5857
5958
  showsVerticalScrollIndicator: false,
@@ -5861,7 +5962,7 @@ function CallVideoGrid({
5861
5962
  }
5862
5963
  );
5863
5964
  }
5864
- var styles30 = reactNative.StyleSheet.create({
5965
+ var styles31 = reactNative.StyleSheet.create({
5865
5966
  stage: { flex: 1, overflow: "hidden" },
5866
5967
  fill: { ...reactNative.StyleSheet.absoluteFillObject },
5867
5968
  grid: { flexDirection: "row", flexWrap: "wrap", gap: GAP },
@@ -6059,7 +6160,7 @@ function CallScreen({
6059
6160
  inCallManager,
6060
6161
  nativeIncomingUi
6061
6162
  }) {
6062
- const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
6163
+ const [insets, setInsets] = react.useState({ top: 0, bottom: 0, left: 0, right: 0 });
6063
6164
  const ownCalls = react$1.useCalls(callsProp ? null : userId);
6064
6165
  const calls = callsProp ?? ownCalls;
6065
6166
  const meshAvailable = isNativeWebRtcAvailable(webrtc);
@@ -6152,14 +6253,16 @@ function CallScreen({
6152
6253
  [wakeChrome]
6153
6254
  );
6154
6255
  const hangUp = react.useCallback(() => {
6155
- const othersOnCall = (usingSfu ? sfu.participants : mesh.participants).filter(
6156
- (p) => !p.isSelf
6157
- ).length;
6158
6256
  sfu.leave();
6159
6257
  mesh.leave();
6160
- if (calls.phase === "active" && othersOnCall >= 2) calls.reset();
6161
- else void calls.hangUp();
6162
- }, [sfu, mesh, calls, usingSfu]);
6258
+ void calls.hangUp();
6259
+ }, [sfu, mesh, calls]);
6260
+ const othersNow = (usingSfu ? sfu.participants : mesh.participants).filter(
6261
+ (p) => !p.isSelf
6262
+ ).length;
6263
+ react.useEffect(() => {
6264
+ calls.reportOthersOnCall?.(othersNow);
6265
+ }, [calls, othersNow]);
6163
6266
  const alone = usingSfu ? sfu.alone : mesh.alone;
6164
6267
  const endedOnEmpty = react.useRef(false);
6165
6268
  if (calls.phase !== "active") endedOnEmpty.current = false;
@@ -6216,165 +6319,177 @@ function CallScreen({
6216
6319
  onRequestClose: hangUp,
6217
6320
  children: [
6218
6321
  /* @__PURE__ */ jsxRuntime.jsx(reactNative.StatusBar, { barStyle: "light-content" }),
6219
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles31.screen, onPress: toggleChrome, accessible: false, children: [
6220
- /* @__PURE__ */ jsxRuntime.jsx(CallBackdrop, {}),
6221
- showStage ? /* @__PURE__ */ jsxRuntime.jsx(
6222
- CallVideoGrid,
6223
- {
6224
- participants,
6225
- livekitReactNative,
6226
- labelFor: label,
6227
- onLocalPress: () => void sfu.switchCamera(),
6228
- chromeInsets,
6229
- safeArea: { top: insets.top, bottom: insets.bottom }
6230
- }
6231
- ) : (
6232
- // Audio (and pre-media) calls carry their identity in the
6233
- // middle of the scene — name under the avatar, status in a
6234
- // pill — rather than a bar pinned to the top of a void.
6235
- /* @__PURE__ */ jsxRuntime.jsxs(
6322
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNativeSafeAreaContext.SafeAreaProvider, { children: [
6323
+ /* @__PURE__ */ jsxRuntime.jsx(InsetsProbe, { onChange: setInsets }),
6324
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles32.screen, onPress: toggleChrome, accessible: false, children: [
6325
+ /* @__PURE__ */ jsxRuntime.jsx(CallBackdrop, {}),
6326
+ showStage ? /* @__PURE__ */ jsxRuntime.jsx(
6327
+ CallVideoGrid,
6328
+ {
6329
+ participants,
6330
+ livekitReactNative,
6331
+ labelFor: label,
6332
+ onLocalPress: () => void sfu.switchCamera(),
6333
+ chromeInsets,
6334
+ safeArea: { top: insets.top, bottom: insets.bottom }
6335
+ }
6336
+ ) : (
6337
+ // Audio (and pre-media) calls carry their identity in the
6338
+ // middle of the scene — name under the avatar, status in a
6339
+ // pill — rather than a bar pinned to the top of a void.
6340
+ /* @__PURE__ */ jsxRuntime.jsxs(
6341
+ reactNative.View,
6342
+ {
6343
+ style: [styles32.identity, { paddingBottom: insets.bottom + 160 }],
6344
+ pointerEvents: "none",
6345
+ children: [
6346
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.avatarStage, children: [
6347
+ (ringingIn || ringingOut) && /* @__PURE__ */ jsxRuntime.jsx(PulseRings, { size: 132, color: callColors.glow }),
6348
+ /* @__PURE__ */ jsxRuntime.jsx(
6349
+ CallAvatar,
6350
+ {
6351
+ name: peerIds.length === 1 ? label(peerIds[0]) : title,
6352
+ seed: titleConversationId ?? peerIds[0] ?? "call",
6353
+ size: 132
6354
+ }
6355
+ )
6356
+ ] }),
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 })
6361
+ ] })
6362
+ ]
6363
+ }
6364
+ )
6365
+ ),
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: [
6369
+ 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 })
6371
+ ] })
6372
+ ] }),
6373
+ chromeVisible && /* @__PURE__ */ jsxRuntime.jsxs(
6236
6374
  reactNative.View,
6237
6375
  {
6238
- style: [styles31.identity, { paddingBottom: insets.bottom + 160 }],
6239
- pointerEvents: "none",
6376
+ style: [styles32.controls, { paddingBottom: insets.bottom + 22 }],
6377
+ pointerEvents: "box-none",
6240
6378
  children: [
6241
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles31.avatarStage, children: [
6242
- (ringingIn || ringingOut) && /* @__PURE__ */ jsxRuntime.jsx(PulseRings, { size: 132, color: callColors.glow }),
6243
- /* @__PURE__ */ jsxRuntime.jsx(
6244
- CallAvatar,
6245
- {
6246
- name: peerIds.length === 1 ? label(peerIds[0]) : title,
6247
- seed: titleConversationId ?? peerIds[0] ?? "call",
6248
- size: 132
6249
- }
6250
- )
6251
- ] }),
6252
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 2, style: styles31.identityTitle, children: title }),
6253
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles31.statusPill, children: [
6254
- connected && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles31.statusDot }),
6255
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles31.statusText, children: subtitle })
6256
- ] })
6257
- ]
6258
- }
6259
- )
6260
- ),
6261
- chromeVisible && showStage && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles31.header, { paddingTop: insets.top + 14 }], pointerEvents: "box-none", children: [
6262
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles31.title, children: title }),
6263
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles31.subtitleRow, children: [
6264
- isGroup && /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "users", size: 14, color: callColors.textDim, label: null }),
6265
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles31.subtitle, children: isGroup ? `${participants.length} \xB7 ${subtitle}` : subtitle })
6266
- ] })
6267
- ] }),
6268
- chromeVisible && /* @__PURE__ */ jsxRuntime.jsxs(
6269
- reactNative.View,
6270
- {
6271
- style: [styles31.controls, { paddingBottom: insets.bottom + 22 }],
6272
- pointerEvents: "box-none",
6273
- children: [
6274
- error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles31.error, children: error.message }),
6275
- !meshAvailable && !livekit && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles31.error, children: "No WebRTC module supplied \u2014 this call has no audio." }),
6276
- ringingIn ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles31.answerRow, children: [
6277
- /* @__PURE__ */ jsxRuntime.jsx(
6278
- CallControlButton,
6279
- {
6280
- icon: "phone-off",
6281
- tone: "danger",
6282
- large: true,
6283
- label: "Decline",
6284
- onPress: () => void calls.decline(),
6285
- accessibilityLabel: "Decline call"
6286
- }
6287
- ),
6288
- /* @__PURE__ */ jsxRuntime.jsx(
6289
- CallControlButton,
6290
- {
6291
- icon: isVideoCall ? "video" : "phone",
6292
- tone: "accept",
6293
- large: true,
6294
- label: "Accept",
6295
- onPress: () => void calls.accept(),
6296
- accessibilityLabel: "Accept call"
6297
- }
6298
- )
6299
- ] }) : ended ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles31.row, children: /* @__PURE__ */ jsxRuntime.jsx(
6300
- CallControlButton,
6301
- {
6302
- icon: "close",
6303
- onPress: calls.reset,
6304
- label: "Close",
6305
- accessibilityLabel: "Close"
6306
- }
6307
- ) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6308
- /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles31.dock, 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: [
6309
6382
  /* @__PURE__ */ jsxRuntime.jsx(
6310
6383
  CallControlButton,
6311
6384
  {
6312
- icon: micOn ? "mic" : "mic-off",
6313
- label: micOn ? "Mute" : "Unmute",
6314
- active: !micOn,
6315
- onPress: withWake(toggleMic),
6316
- accessibilityLabel: micOn ? "Mute microphone" : "Unmute microphone"
6385
+ icon: "phone-off",
6386
+ tone: "danger",
6387
+ large: true,
6388
+ label: "Decline",
6389
+ onPress: () => void calls.decline(),
6390
+ accessibilityLabel: "Decline call"
6317
6391
  }
6318
6392
  ),
6319
6393
  /* @__PURE__ */ jsxRuntime.jsx(
6320
6394
  CallControlButton,
6321
6395
  {
6322
- icon: speakerIcon(audio),
6323
- label: speakerLabel(audio),
6324
- active: audio.speakerOn,
6325
- onPress: withWake(onSpeakerPress),
6326
- accessibilityLabel: "Audio output"
6327
- }
6328
- ),
6329
- usingSfu && /* @__PURE__ */ jsxRuntime.jsx(
6330
- CallControlButton,
6331
- {
6332
- icon: videoOn ? "video" : "video-off",
6333
- label: "Camera",
6334
- active: !videoOn,
6335
- onPress: withWake(() => void sfu.toggleCamera()),
6336
- accessibilityLabel: videoOn ? "Turn camera off" : "Turn camera on"
6337
- }
6338
- ),
6339
- usingSfu && videoOn && /* @__PURE__ */ jsxRuntime.jsx(
6340
- CallControlButton,
6341
- {
6342
- icon: "camera-flip",
6343
- label: "Flip",
6344
- onPress: withWake(() => void sfu.switchCamera()),
6345
- accessibilityLabel: "Switch camera"
6396
+ icon: isVideoCall ? "video" : "phone",
6397
+ tone: "accept",
6398
+ large: true,
6399
+ label: "Accept",
6400
+ onPress: () => void calls.accept(),
6401
+ accessibilityLabel: "Accept call"
6346
6402
  }
6347
6403
  )
6348
- ] }),
6349
- /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles31.hangUpRow, children: /* @__PURE__ */ jsxRuntime.jsx(
6404
+ ] }) : ended ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.row, children: /* @__PURE__ */ jsxRuntime.jsx(
6350
6405
  CallControlButton,
6351
6406
  {
6352
- icon: "phone-off",
6353
- tone: "danger",
6354
- large: true,
6355
- onPress: ringingOut ? () => void calls.cancel() : hangUp,
6356
- accessibilityLabel: ringingOut ? "Cancel call" : "Hang up"
6407
+ icon: "close",
6408
+ onPress: calls.reset,
6409
+ label: "Close",
6410
+ accessibilityLabel: "Close"
6357
6411
  }
6358
- ) })
6359
- ] })
6360
- ]
6361
- }
6362
- ),
6363
- /* @__PURE__ */ jsxRuntime.jsx(
6364
- AudioRouteSheet,
6365
- {
6366
- visible: routesOpen,
6367
- routes: audio.routes,
6368
- selectedRouteId: audio.selectedRouteId,
6369
- onSelect: audio.selectRoute,
6370
- onClose: () => setRoutesOpen(false)
6371
- }
6372
- )
6412
+ ) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
6413
+ /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.dock, children: [
6414
+ /* @__PURE__ */ jsxRuntime.jsx(
6415
+ CallControlButton,
6416
+ {
6417
+ icon: micOn ? "mic" : "mic-off",
6418
+ label: micOn ? "Mute" : "Unmute",
6419
+ active: !micOn,
6420
+ onPress: withWake(toggleMic),
6421
+ accessibilityLabel: micOn ? "Mute microphone" : "Unmute microphone"
6422
+ }
6423
+ ),
6424
+ /* @__PURE__ */ jsxRuntime.jsx(
6425
+ CallControlButton,
6426
+ {
6427
+ icon: speakerIcon(audio),
6428
+ label: speakerLabel(audio),
6429
+ active: audio.speakerOn,
6430
+ onPress: withWake(onSpeakerPress),
6431
+ accessibilityLabel: "Audio output"
6432
+ }
6433
+ ),
6434
+ usingSfu && /* @__PURE__ */ jsxRuntime.jsx(
6435
+ CallControlButton,
6436
+ {
6437
+ icon: videoOn ? "video" : "video-off",
6438
+ label: "Camera",
6439
+ active: !videoOn,
6440
+ onPress: withWake(() => void sfu.toggleCamera()),
6441
+ accessibilityLabel: videoOn ? "Turn camera off" : "Turn camera on"
6442
+ }
6443
+ ),
6444
+ usingSfu && videoOn && /* @__PURE__ */ jsxRuntime.jsx(
6445
+ CallControlButton,
6446
+ {
6447
+ icon: "camera-flip",
6448
+ label: "Flip",
6449
+ onPress: withWake(() => void sfu.switchCamera()),
6450
+ accessibilityLabel: "Switch camera"
6451
+ }
6452
+ )
6453
+ ] }),
6454
+ /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.hangUpRow, children: /* @__PURE__ */ jsxRuntime.jsx(
6455
+ CallControlButton,
6456
+ {
6457
+ icon: "phone-off",
6458
+ tone: "danger",
6459
+ large: true,
6460
+ onPress: ringingOut ? () => void calls.cancel() : hangUp,
6461
+ accessibilityLabel: ringingOut ? "Cancel call" : "Hang up"
6462
+ }
6463
+ ) })
6464
+ ] })
6465
+ ]
6466
+ }
6467
+ ),
6468
+ /* @__PURE__ */ jsxRuntime.jsx(
6469
+ AudioRouteSheet,
6470
+ {
6471
+ visible: routesOpen,
6472
+ routes: audio.routes,
6473
+ selectedRouteId: audio.selectedRouteId,
6474
+ onSelect: audio.selectRoute,
6475
+ onClose: () => setRoutesOpen(false)
6476
+ }
6477
+ )
6478
+ ] })
6373
6479
  ] })
6374
6480
  ]
6375
6481
  }
6376
6482
  );
6377
6483
  }
6484
+ function InsetsProbe({
6485
+ onChange
6486
+ }) {
6487
+ const insets = reactNativeSafeAreaContext.useSafeAreaInsets();
6488
+ react.useEffect(() => {
6489
+ onChange({ top: insets.top, bottom: insets.bottom, left: insets.left, right: insets.right });
6490
+ }, [insets.top, insets.bottom, insets.left, insets.right, onChange]);
6491
+ return null;
6492
+ }
6378
6493
  function speakerIcon(audio) {
6379
6494
  if (audio.externalDevice) return "headphones";
6380
6495
  return audio.speakerOn ? "speaker" : "speaker-off";
@@ -6412,7 +6527,7 @@ function statusLine(calls, mediaStatus) {
6412
6527
  return "";
6413
6528
  }
6414
6529
  }
6415
- var styles31 = reactNative.StyleSheet.create({
6530
+ var styles32 = reactNative.StyleSheet.create({
6416
6531
  screen: { flex: 1, backgroundColor: callColors.bg },
6417
6532
  identity: {
6418
6533
  flex: 1,
@@ -6722,6 +6837,7 @@ exports.AudioRouteSheet = AudioRouteSheet;
6722
6837
  exports.Avatar = Avatar;
6723
6838
  exports.CallAvatar = CallAvatar;
6724
6839
  exports.CallControlButton = CallControlButton;
6840
+ exports.CallLogRow = CallLogRow;
6725
6841
  exports.CallParticipantTile = CallParticipantTile;
6726
6842
  exports.CallScreen = CallScreen;
6727
6843
  exports.CallVideoGrid = CallVideoGrid;