@poolse/react-native 2.24.0 → 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 +309 -207
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +27 -3
- package/dist/index.d.ts +27 -3
- package/dist/index.js +310 -209
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
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:
|
|
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
|
-
|
|
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: [
|
|
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:
|
|
2337
|
+
style: styles13.emojiBtn,
|
|
2254
2338
|
hitSlop: 6,
|
|
2255
2339
|
accessibilityLabel: `React with ${emoji}`,
|
|
2256
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
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:
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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: [
|
|
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: [
|
|
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
|
|
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
|
-
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
2581
|
+
style: styles15.tileHero,
|
|
2498
2582
|
onPress: () => setViewerIndex(0),
|
|
2499
2583
|
overlay: null
|
|
2500
2584
|
}
|
|
2501
2585
|
),
|
|
2502
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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:
|
|
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: [
|
|
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:
|
|
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:
|
|
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: [
|
|
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: [
|
|
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: [
|
|
2612
|
-
overlay ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
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:
|
|
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:
|
|
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
|
|
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 =
|
|
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
|
-
|
|
2836
|
-
variant === "inline" &&
|
|
2837
|
-
variant === "wrapped" &&
|
|
2838
|
-
variant === "overlay" &&
|
|
2839
|
-
variant === "block" &&
|
|
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 &&
|
|
2843
|
-
variant === "jumbo" &&
|
|
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: [
|
|
2849
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2850
|
-
isSelf && readState ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
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: [
|
|
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: [
|
|
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:
|
|
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:
|
|
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: [
|
|
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:
|
|
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: [
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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: [
|
|
3024
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
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
|
|
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
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
3325
|
+
style: styles17.emojiBtn,
|
|
3242
3326
|
onPress: () => {
|
|
3243
3327
|
onPick(emoji);
|
|
3244
3328
|
onClose();
|
|
3245
3329
|
},
|
|
3246
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
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
|
|
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
|
-
|
|
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 ?
|
|
3517
|
+
isEditing ? styles18.rowEditing : null
|
|
3427
3518
|
],
|
|
3428
3519
|
children: [
|
|
3429
|
-
showAvatarSlot ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
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:
|
|
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
|
-
|
|
3445
|
-
isSelf ?
|
|
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:
|
|
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: [
|
|
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
|
|
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:
|
|
3717
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style:
|
|
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
|
-
|
|
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:
|
|
3735
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
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: [
|
|
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
|
-
|
|
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:
|
|
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: [
|
|
3766
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
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
|
|
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:
|
|
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:
|
|
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: [
|
|
4026
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles20.label, { color: theme.colors.ink2, fontFamily: theme.type.fontBody }], children: text });
|
|
3936
4027
|
}
|
|
3937
|
-
var
|
|
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 <
|
|
4042
|
-
const msg =
|
|
4136
|
+
for (let i = 0; i < visibleMessages.length; i++) {
|
|
4137
|
+
const msg = visibleMessages[i];
|
|
4043
4138
|
if (!msg) continue;
|
|
4044
|
-
const prev = i > 0 ?
|
|
4045
|
-
const next = i <
|
|
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
|
-
}, [
|
|
4144
|
+
}, [visibleMessages]);
|
|
4050
4145
|
const renderItem = react.useCallback(
|
|
4051
4146
|
(msg) => {
|
|
4052
|
-
if (renderMessage)
|
|
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
|
|
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
|
-
}, [
|
|
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: [
|
|
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:
|
|
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:
|
|
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
|
|
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:
|
|
4316
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style:
|
|
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
|
-
|
|
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:
|
|
4332
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
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: [
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
4472
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
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: [
|
|
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: [
|
|
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
|
-
|
|
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
|
|
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: [
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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
|
-
|
|
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:
|
|
4939
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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
|
|
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
|
-
|
|
5260
|
+
styles24.bar,
|
|
5160
5261
|
{ backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
|
|
5161
5262
|
],
|
|
5162
|
-
children: unavailableSlot ?? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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:
|
|
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
|
-
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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: [
|
|
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
|
-
|
|
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
|
|
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:
|
|
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:
|
|
5327
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
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 }) => [
|
|
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: [
|
|
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
|
|
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,
|
|
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
|
-
|
|
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
|
|
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
|
-
|
|
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
|
-
|
|
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: [
|
|
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
|
|
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:
|
|
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
|
-
|
|
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:
|
|
5662
|
+
label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles28.label, children: label }) : null
|
|
5562
5663
|
] });
|
|
5563
5664
|
}
|
|
5564
|
-
var
|
|
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
|
-
|
|
5586
|
-
bleed ?
|
|
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:
|
|
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: [
|
|
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:
|
|
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
|
|
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: [
|
|
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:
|
|
5733
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
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:
|
|
5843
|
+
style: styles30.fill
|
|
5743
5844
|
}
|
|
5744
5845
|
) })
|
|
5745
5846
|
}
|
|
@@ -5747,7 +5848,7 @@ function LocalVideoPip({
|
|
|
5747
5848
|
}
|
|
5748
5849
|
);
|
|
5749
5850
|
}
|
|
5750
|
-
var
|
|
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:
|
|
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:
|
|
5803
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
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:
|
|
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: [
|
|
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: [
|
|
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
|
-
|
|
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
|
|
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 },
|
|
@@ -6220,7 +6321,7 @@ function CallScreen({
|
|
|
6220
6321
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.StatusBar, { barStyle: "light-content" }),
|
|
6221
6322
|
/* @__PURE__ */ jsxRuntime.jsxs(reactNativeSafeAreaContext.SafeAreaProvider, { children: [
|
|
6222
6323
|
/* @__PURE__ */ jsxRuntime.jsx(InsetsProbe, { onChange: setInsets }),
|
|
6223
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style:
|
|
6324
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles32.screen, onPress: toggleChrome, accessible: false, children: [
|
|
6224
6325
|
/* @__PURE__ */ jsxRuntime.jsx(CallBackdrop, {}),
|
|
6225
6326
|
showStage ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6226
6327
|
CallVideoGrid,
|
|
@@ -6239,10 +6340,10 @@ function CallScreen({
|
|
|
6239
6340
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6240
6341
|
reactNative.View,
|
|
6241
6342
|
{
|
|
6242
|
-
style: [
|
|
6343
|
+
style: [styles32.identity, { paddingBottom: insets.bottom + 160 }],
|
|
6243
6344
|
pointerEvents: "none",
|
|
6244
6345
|
children: [
|
|
6245
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6346
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.avatarStage, children: [
|
|
6246
6347
|
(ringingIn || ringingOut) && /* @__PURE__ */ jsxRuntime.jsx(PulseRings, { size: 132, color: callColors.glow }),
|
|
6247
6348
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6248
6349
|
CallAvatar,
|
|
@@ -6253,31 +6354,31 @@ function CallScreen({
|
|
|
6253
6354
|
}
|
|
6254
6355
|
)
|
|
6255
6356
|
] }),
|
|
6256
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 2, style:
|
|
6257
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6258
|
-
connected && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6259
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
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 })
|
|
6260
6361
|
] })
|
|
6261
6362
|
]
|
|
6262
6363
|
}
|
|
6263
6364
|
)
|
|
6264
6365
|
),
|
|
6265
|
-
chromeVisible && showStage && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
6266
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style:
|
|
6267
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
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: [
|
|
6268
6369
|
isGroup && /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "users", size: 14, color: callColors.textDim, label: null }),
|
|
6269
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
6370
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles32.subtitle, children: isGroup ? `${participants.length} \xB7 ${subtitle}` : subtitle })
|
|
6270
6371
|
] })
|
|
6271
6372
|
] }),
|
|
6272
6373
|
chromeVisible && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6273
6374
|
reactNative.View,
|
|
6274
6375
|
{
|
|
6275
|
-
style: [
|
|
6376
|
+
style: [styles32.controls, { paddingBottom: insets.bottom + 22 }],
|
|
6276
6377
|
pointerEvents: "box-none",
|
|
6277
6378
|
children: [
|
|
6278
|
-
error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
6279
|
-
!meshAvailable && !livekit && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
6280
|
-
ringingIn ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
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: [
|
|
6281
6382
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6282
6383
|
CallControlButton,
|
|
6283
6384
|
{
|
|
@@ -6300,7 +6401,7 @@ function CallScreen({
|
|
|
6300
6401
|
accessibilityLabel: "Accept call"
|
|
6301
6402
|
}
|
|
6302
6403
|
)
|
|
6303
|
-
] }) : ended ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6404
|
+
] }) : ended ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.row, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6304
6405
|
CallControlButton,
|
|
6305
6406
|
{
|
|
6306
6407
|
icon: "close",
|
|
@@ -6309,7 +6410,7 @@ function CallScreen({
|
|
|
6309
6410
|
accessibilityLabel: "Close"
|
|
6310
6411
|
}
|
|
6311
6412
|
) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6312
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6413
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.dock, children: [
|
|
6313
6414
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6314
6415
|
CallControlButton,
|
|
6315
6416
|
{
|
|
@@ -6350,7 +6451,7 @@ function CallScreen({
|
|
|
6350
6451
|
}
|
|
6351
6452
|
)
|
|
6352
6453
|
] }),
|
|
6353
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6454
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.hangUpRow, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6354
6455
|
CallControlButton,
|
|
6355
6456
|
{
|
|
6356
6457
|
icon: "phone-off",
|
|
@@ -6426,7 +6527,7 @@ function statusLine(calls, mediaStatus) {
|
|
|
6426
6527
|
return "";
|
|
6427
6528
|
}
|
|
6428
6529
|
}
|
|
6429
|
-
var
|
|
6530
|
+
var styles32 = reactNative.StyleSheet.create({
|
|
6430
6531
|
screen: { flex: 1, backgroundColor: callColors.bg },
|
|
6431
6532
|
identity: {
|
|
6432
6533
|
flex: 1,
|
|
@@ -6736,6 +6837,7 @@ exports.AudioRouteSheet = AudioRouteSheet;
|
|
|
6736
6837
|
exports.Avatar = Avatar;
|
|
6737
6838
|
exports.CallAvatar = CallAvatar;
|
|
6738
6839
|
exports.CallControlButton = CallControlButton;
|
|
6840
|
+
exports.CallLogRow = CallLogRow;
|
|
6739
6841
|
exports.CallParticipantTile = CallParticipantTile;
|
|
6740
6842
|
exports.CallScreen = CallScreen;
|
|
6741
6843
|
exports.CallVideoGrid = CallVideoGrid;
|