@poolse/react-native 2.25.0 → 2.26.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +21 -0
- package/dist/index.cjs +863 -599
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +50 -9
- package/dist/index.d.ts +50 -9
- package/dist/index.js +866 -603
- package/dist/index.js.map +1 -1
- package/package.json +11 -12
package/dist/index.js
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { useUser, useMe, useConversations, formatCallLogPreview, useAttachmentUpload, useConversation, useMembers, usePresence, useMessages, useTyping, useRealtimeStatus, isMessageVisibleTo, computeGroupPosition, formatDayLabel, callLogDisplayFor, sameDay, useReactions, useThread, useAttachmentUrl, usePoolse, useVoiceRoom, useCalls, useCallRoom } from '@poolse/react';
|
|
2
|
-
import { createContext, forwardRef, useRef, useState,
|
|
3
|
-
import { StyleSheet,
|
|
1
|
+
import { useUser, useMe, useConversations, formatCallLogPreview, useAttachmentUpload, useConversation, useMembers, usePresence, useMessages, useTyping, useRealtimeStatus, isMessageVisibleTo, computeGroupPosition, formatDayLabel, callLogDisplayFor, useLiveCall, sameDay, useReactions, useThread, useAttachmentUrl, usePoolse, useVoiceRoom, useCalls, useCallRoom } from '@poolse/react';
|
|
2
|
+
import { createContext, forwardRef, useRef, useState, useImperativeHandle, useEffect, useMemo, useCallback, useContext, createElement } from 'react';
|
|
3
|
+
import { StyleSheet, View, Pressable, TextInput, Text, useWindowDimensions, Animated, Easing, PanResponder, Image, Keyboard, Platform, ScrollView, ActivityIndicator, FlatList, AppState, KeyboardAvoidingView, Modal, Linking, StatusBar } from 'react-native';
|
|
4
4
|
import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
|
|
5
5
|
import Svg2, { SvgXml, Svg, Path, Circle, G, Defs, RadialGradient, Stop, Rect } from 'react-native-svg';
|
|
6
|
+
import { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';
|
|
6
7
|
import * as ImagePicker from 'expo-image-picker';
|
|
7
8
|
import * as DocumentPicker from 'expo-document-picker';
|
|
8
9
|
import { manipulateAsync, SaveFormat } from 'expo-image-manipulator';
|
|
9
|
-
import { useSafeAreaInsets, SafeAreaProvider } from 'react-native-safe-area-context';
|
|
10
10
|
import * as Clipboard from 'expo-clipboard';
|
|
11
11
|
import Markdown, { MarkdownIt } from 'react-native-markdown-display';
|
|
12
12
|
|
|
@@ -619,6 +619,13 @@ var styles2 = StyleSheet.create({
|
|
|
619
619
|
padding: 6
|
|
620
620
|
}
|
|
621
621
|
});
|
|
622
|
+
|
|
623
|
+
// src/internal/edgeToEdge.ts
|
|
624
|
+
var EDGE_TO_EDGE_MODAL = {
|
|
625
|
+
statusBarTranslucent: true,
|
|
626
|
+
navigationBarTranslucent: true
|
|
627
|
+
};
|
|
628
|
+
var useSafeInsets = useSafeAreaInsets;
|
|
622
629
|
function useDismissableSheet({ onClose, sheetHeight, dismissThreshold = 0.22 }) {
|
|
623
630
|
const translateY = useRef(new Animated.Value(0)).current;
|
|
624
631
|
const panResponder = useMemo(
|
|
@@ -673,6 +680,7 @@ function GroupDetailsSheet({
|
|
|
673
680
|
const theme = usePoolseTheme();
|
|
674
681
|
const { conversation } = useConversation(conversationId);
|
|
675
682
|
const { members } = useMembers(conversationId);
|
|
683
|
+
const insets = useSafeInsets();
|
|
676
684
|
const { height: screenHeight } = useWindowDimensions();
|
|
677
685
|
const { translateY, panHandlers } = useDismissableSheet({
|
|
678
686
|
onClose,
|
|
@@ -687,7 +695,7 @@ function GroupDetailsSheet({
|
|
|
687
695
|
transparent: true,
|
|
688
696
|
animationType: "slide",
|
|
689
697
|
onRequestClose: onClose,
|
|
690
|
-
|
|
698
|
+
...EDGE_TO_EDGE_MODAL,
|
|
691
699
|
children: /* @__PURE__ */ jsxs(View, { style: styles3.modalRoot, children: [
|
|
692
700
|
/* @__PURE__ */ jsx(
|
|
693
701
|
Pressable,
|
|
@@ -706,6 +714,11 @@ function GroupDetailsSheet({
|
|
|
706
714
|
backgroundColor: theme.colors.paper,
|
|
707
715
|
borderTopLeftRadius: theme.radii.xl,
|
|
708
716
|
borderTopRightRadius: theme.radii.xl,
|
|
717
|
+
// Header stays below the status bar even on short screens.
|
|
718
|
+
maxHeight: screenHeight - insets.top - 8,
|
|
719
|
+
paddingBottom: insets.bottom,
|
|
720
|
+
paddingLeft: insets.left,
|
|
721
|
+
paddingRight: insets.right,
|
|
709
722
|
transform: [{ translateY }]
|
|
710
723
|
},
|
|
711
724
|
theme.shadows.lg
|
|
@@ -1168,6 +1181,7 @@ function AttachmentPicker({
|
|
|
1168
1181
|
camera = true
|
|
1169
1182
|
}) {
|
|
1170
1183
|
const theme = usePoolseTheme();
|
|
1184
|
+
const insets = useSafeInsets();
|
|
1171
1185
|
const upload = useSharedUpload();
|
|
1172
1186
|
const { setPreview } = useUploadPreview();
|
|
1173
1187
|
const pickFromKind = async (kind) => {
|
|
@@ -1187,35 +1201,49 @@ function AttachmentPicker({
|
|
|
1187
1201
|
onClose();
|
|
1188
1202
|
}
|
|
1189
1203
|
};
|
|
1190
|
-
return /* @__PURE__ */ jsx(
|
|
1191
|
-
|
|
1204
|
+
return /* @__PURE__ */ jsx(
|
|
1205
|
+
Modal,
|
|
1192
1206
|
{
|
|
1193
|
-
|
|
1194
|
-
|
|
1207
|
+
visible,
|
|
1208
|
+
transparent: true,
|
|
1209
|
+
animationType: "slide",
|
|
1210
|
+
onRequestClose: onClose,
|
|
1211
|
+
...EDGE_TO_EDGE_MODAL,
|
|
1212
|
+
children: /* @__PURE__ */ jsx(Pressable, { style: styles6.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
|
|
1213
|
+
View,
|
|
1195
1214
|
{
|
|
1196
|
-
|
|
1197
|
-
|
|
1198
|
-
|
|
1199
|
-
|
|
1200
|
-
|
|
1201
|
-
|
|
1202
|
-
|
|
1203
|
-
|
|
1204
|
-
|
|
1205
|
-
|
|
1206
|
-
|
|
1207
|
-
|
|
1208
|
-
|
|
1209
|
-
|
|
1210
|
-
|
|
1211
|
-
|
|
1212
|
-
|
|
1213
|
-
|
|
1214
|
-
|
|
1215
|
-
|
|
1216
|
-
|
|
1215
|
+
style: [
|
|
1216
|
+
styles6.sheet,
|
|
1217
|
+
{
|
|
1218
|
+
backgroundColor: theme.colors.surface,
|
|
1219
|
+
borderTopLeftRadius: theme.radii.lg,
|
|
1220
|
+
borderTopRightRadius: theme.radii.lg,
|
|
1221
|
+
// Cancel must sit above the nav bar / home indicator.
|
|
1222
|
+
paddingBottom: 24 + insets.bottom,
|
|
1223
|
+
paddingLeft: insets.left,
|
|
1224
|
+
paddingRight: insets.right
|
|
1225
|
+
},
|
|
1226
|
+
theme.shadows.lg
|
|
1227
|
+
],
|
|
1228
|
+
children: [
|
|
1229
|
+
camera ? /* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("camera"), children: [
|
|
1230
|
+
/* @__PURE__ */ jsx(PoolseIcon, { name: "camera", size: 20, color: theme.colors.ink2 }),
|
|
1231
|
+
/* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Camera" })
|
|
1232
|
+
] }) : null,
|
|
1233
|
+
/* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("image"), children: [
|
|
1234
|
+
/* @__PURE__ */ jsx(PoolseIcon, { name: "image", size: 20, color: theme.colors.ink2 }),
|
|
1235
|
+
/* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Photo or video" })
|
|
1236
|
+
] }),
|
|
1237
|
+
/* @__PURE__ */ jsxs(Pressable, { style: styles6.item, onPress: () => pickFromKind("document"), children: [
|
|
1238
|
+
/* @__PURE__ */ jsx(PoolseIcon, { name: "attachment", size: 20, color: theme.colors.ink2 }),
|
|
1239
|
+
/* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "File" })
|
|
1240
|
+
] }),
|
|
1241
|
+
/* @__PURE__ */ jsx(Pressable, { style: styles6.cancel, onPress: onClose, children: /* @__PURE__ */ jsx(Text, { style: [styles6.itemText, { color: theme.colors.brand }], children: "Cancel" }) })
|
|
1242
|
+
]
|
|
1243
|
+
}
|
|
1244
|
+
) })
|
|
1217
1245
|
}
|
|
1218
|
-
)
|
|
1246
|
+
);
|
|
1219
1247
|
}
|
|
1220
1248
|
async function uriToBlob(uri) {
|
|
1221
1249
|
const res = await fetch(uri);
|
|
@@ -1431,6 +1459,74 @@ var styles7 = StyleSheet.create({
|
|
|
1431
1459
|
letterSpacing: 0.3
|
|
1432
1460
|
}
|
|
1433
1461
|
});
|
|
1462
|
+
function LiveCallBanner({ call, inCall, onJoin }) {
|
|
1463
|
+
const theme = usePoolseTheme();
|
|
1464
|
+
const what = call.media === "video" ? "Video call in progress" : "Voice call in progress";
|
|
1465
|
+
const who = inCall > 0 ? `${inCall} on the call` : "Ringing";
|
|
1466
|
+
return /* @__PURE__ */ jsxs(
|
|
1467
|
+
View,
|
|
1468
|
+
{
|
|
1469
|
+
style: [styles8.bar, { backgroundColor: theme.colors.success }],
|
|
1470
|
+
accessibilityRole: "summary",
|
|
1471
|
+
accessibilityLabel: `${what}, ${who}`,
|
|
1472
|
+
children: [
|
|
1473
|
+
/* @__PURE__ */ jsx(
|
|
1474
|
+
PoolseIcon,
|
|
1475
|
+
{
|
|
1476
|
+
name: call.media === "video" ? "video" : "phone",
|
|
1477
|
+
size: 16,
|
|
1478
|
+
color: "#FFFFFF",
|
|
1479
|
+
label: null
|
|
1480
|
+
}
|
|
1481
|
+
),
|
|
1482
|
+
/* @__PURE__ */ jsxs(View, { style: styles8.text, children: [
|
|
1483
|
+
/* @__PURE__ */ jsx(Text, { style: [styles8.title, { fontFamily: theme.type.fontBody }], numberOfLines: 1, children: what }),
|
|
1484
|
+
/* @__PURE__ */ jsx(Text, { style: [styles8.meta, { fontFamily: theme.type.fontBody }], numberOfLines: 1, children: who })
|
|
1485
|
+
] }),
|
|
1486
|
+
/* @__PURE__ */ jsx(
|
|
1487
|
+
Pressable,
|
|
1488
|
+
{
|
|
1489
|
+
onPress: () => onJoin(call),
|
|
1490
|
+
accessibilityRole: "button",
|
|
1491
|
+
accessibilityLabel: "Join call",
|
|
1492
|
+
hitSlop: 8,
|
|
1493
|
+
style: ({ pressed }) => [styles8.join, pressed && styles8.joinPressed],
|
|
1494
|
+
children: /* @__PURE__ */ jsx(
|
|
1495
|
+
Text,
|
|
1496
|
+
{
|
|
1497
|
+
style: [
|
|
1498
|
+
styles8.joinText,
|
|
1499
|
+
{ color: theme.colors.success, fontFamily: theme.type.fontBody }
|
|
1500
|
+
],
|
|
1501
|
+
children: "Join"
|
|
1502
|
+
}
|
|
1503
|
+
)
|
|
1504
|
+
}
|
|
1505
|
+
)
|
|
1506
|
+
]
|
|
1507
|
+
}
|
|
1508
|
+
);
|
|
1509
|
+
}
|
|
1510
|
+
var styles8 = StyleSheet.create({
|
|
1511
|
+
bar: {
|
|
1512
|
+
flexDirection: "row",
|
|
1513
|
+
alignItems: "center",
|
|
1514
|
+
gap: 10,
|
|
1515
|
+
paddingHorizontal: 16,
|
|
1516
|
+
paddingVertical: 8
|
|
1517
|
+
},
|
|
1518
|
+
text: { flex: 1, minWidth: 0 },
|
|
1519
|
+
title: { color: "#FFFFFF", fontSize: 14, fontWeight: "600" },
|
|
1520
|
+
meta: { color: "rgba(255,255,255,0.85)", fontSize: 12 },
|
|
1521
|
+
join: {
|
|
1522
|
+
backgroundColor: "#FFFFFF",
|
|
1523
|
+
borderRadius: 999,
|
|
1524
|
+
paddingHorizontal: 16,
|
|
1525
|
+
paddingVertical: 6
|
|
1526
|
+
},
|
|
1527
|
+
joinPressed: { opacity: 0.8 },
|
|
1528
|
+
joinText: { fontSize: 14, fontWeight: "700" }
|
|
1529
|
+
});
|
|
1434
1530
|
function UploadQueueStrip() {
|
|
1435
1531
|
const theme = usePoolseTheme();
|
|
1436
1532
|
const upload = useSharedUpload();
|
|
@@ -1441,8 +1537,8 @@ function UploadQueueStrip() {
|
|
|
1441
1537
|
{
|
|
1442
1538
|
horizontal: true,
|
|
1443
1539
|
showsHorizontalScrollIndicator: false,
|
|
1444
|
-
contentContainerStyle:
|
|
1445
|
-
style: [
|
|
1540
|
+
contentContainerStyle: styles9.scroll,
|
|
1541
|
+
style: [styles9.scrollStyle, { marginBottom: 8 }],
|
|
1446
1542
|
children: upload.queue.map((item) => {
|
|
1447
1543
|
const isError = item.status === "error";
|
|
1448
1544
|
const isUploading = item.status === "uploading" || item.status === "pending";
|
|
@@ -1453,7 +1549,7 @@ function UploadQueueStrip() {
|
|
|
1453
1549
|
if (item.status === "ready" || isError) upload.remove(item.localId);
|
|
1454
1550
|
else upload.cancel(item.localId);
|
|
1455
1551
|
};
|
|
1456
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
1552
|
+
return /* @__PURE__ */ jsxs(View, { style: styles9.tileWrap, children: [
|
|
1457
1553
|
isImage && previewUri ? /* @__PURE__ */ jsx(ImageTile, { uri: previewUri, uploading: isUploading, error: isError }) : /* @__PURE__ */ jsx(
|
|
1458
1554
|
FileTile,
|
|
1459
1555
|
{
|
|
@@ -1468,13 +1564,13 @@ function UploadQueueStrip() {
|
|
|
1468
1564
|
{
|
|
1469
1565
|
onPress: handleClose,
|
|
1470
1566
|
hitSlop: 8,
|
|
1471
|
-
style:
|
|
1567
|
+
style: styles9.closeBtn,
|
|
1472
1568
|
accessibilityLabel: isError ? "Remove failed upload" : "Cancel upload",
|
|
1473
1569
|
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 11, color: "#fff" })
|
|
1474
1570
|
}
|
|
1475
1571
|
) : null,
|
|
1476
|
-
isUploading ? /* @__PURE__ */ jsx(View, { style:
|
|
1477
|
-
isError ? /* @__PURE__ */ jsx(View, { style: [
|
|
1572
|
+
isUploading ? /* @__PURE__ */ jsx(View, { style: styles9.progressOverlay, children: /* @__PURE__ */ jsx(View, { style: [styles9.spinner, { borderColor: theme.colors.onBrand }] }) }) : null,
|
|
1573
|
+
isError ? /* @__PURE__ */ jsx(View, { style: [styles9.errorOverlay, { backgroundColor: "rgba(229,72,77,0.85)" }], children: /* @__PURE__ */ jsx(Text, { style: [styles9.errorText, { color: "#fff" }], children: "Failed" }) }) : null
|
|
1478
1574
|
] }, item.localId);
|
|
1479
1575
|
})
|
|
1480
1576
|
}
|
|
@@ -1487,7 +1583,7 @@ function ImageTile({ uri, uploading, error }) {
|
|
|
1487
1583
|
{
|
|
1488
1584
|
source: { uri },
|
|
1489
1585
|
style: [
|
|
1490
|
-
|
|
1586
|
+
styles9.imageTile,
|
|
1491
1587
|
{
|
|
1492
1588
|
backgroundColor: theme.colors.surface2,
|
|
1493
1589
|
borderColor: error ? theme.colors.error : "transparent",
|
|
@@ -1509,24 +1605,24 @@ function FileTile({
|
|
|
1509
1605
|
View,
|
|
1510
1606
|
{
|
|
1511
1607
|
style: [
|
|
1512
|
-
|
|
1608
|
+
styles9.fileTile,
|
|
1513
1609
|
{
|
|
1514
1610
|
backgroundColor: theme.colors.surface2,
|
|
1515
1611
|
borderColor: error ? theme.colors.error : uploading ? theme.colors.brand : theme.colors.border
|
|
1516
1612
|
}
|
|
1517
1613
|
],
|
|
1518
1614
|
children: [
|
|
1519
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
1520
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1615
|
+
/* @__PURE__ */ jsx(View, { style: [styles9.fileIconBox, { backgroundColor: theme.colors.brandSoft }], children: /* @__PURE__ */ jsx(PoolseIcon, { name: "attachment", size: 18, color: theme.colors.brand }) }),
|
|
1616
|
+
/* @__PURE__ */ jsxs(View, { style: styles9.fileInfo, children: [
|
|
1521
1617
|
/* @__PURE__ */ jsx(
|
|
1522
1618
|
Text,
|
|
1523
1619
|
{
|
|
1524
|
-
style: [
|
|
1620
|
+
style: [styles9.fileName, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
|
|
1525
1621
|
numberOfLines: 1,
|
|
1526
1622
|
children: filename
|
|
1527
1623
|
}
|
|
1528
1624
|
),
|
|
1529
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1625
|
+
/* @__PURE__ */ jsx(Text, { style: [styles9.fileSize, { color: theme.colors.ink3 }], children: formatBytes(size) })
|
|
1530
1626
|
] })
|
|
1531
1627
|
]
|
|
1532
1628
|
}
|
|
@@ -1540,7 +1636,7 @@ function formatBytes(n) {
|
|
|
1540
1636
|
return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
|
|
1541
1637
|
}
|
|
1542
1638
|
var TILE = 64;
|
|
1543
|
-
var
|
|
1639
|
+
var styles9 = StyleSheet.create({
|
|
1544
1640
|
scrollStyle: {
|
|
1545
1641
|
overflow: "visible"
|
|
1546
1642
|
},
|
|
@@ -1641,7 +1737,24 @@ var styles8 = StyleSheet.create({
|
|
|
1641
1737
|
fontWeight: "700"
|
|
1642
1738
|
}
|
|
1643
1739
|
});
|
|
1644
|
-
|
|
1740
|
+
function useKeyboardOpen() {
|
|
1741
|
+
const [open, setOpen] = useState(false);
|
|
1742
|
+
useEffect(() => {
|
|
1743
|
+
const show = Keyboard.addListener(
|
|
1744
|
+
Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
|
|
1745
|
+
() => setOpen(true)
|
|
1746
|
+
);
|
|
1747
|
+
const hide = Keyboard.addListener(
|
|
1748
|
+
Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
|
|
1749
|
+
() => setOpen(false)
|
|
1750
|
+
);
|
|
1751
|
+
return () => {
|
|
1752
|
+
show.remove();
|
|
1753
|
+
hide.remove();
|
|
1754
|
+
};
|
|
1755
|
+
}, []);
|
|
1756
|
+
return open;
|
|
1757
|
+
}
|
|
1645
1758
|
var MessageComposer = forwardRef(
|
|
1646
1759
|
function MessageComposer2({
|
|
1647
1760
|
onSend,
|
|
@@ -1662,23 +1775,9 @@ var MessageComposer = forwardRef(
|
|
|
1662
1775
|
const inputRef = useRef(null);
|
|
1663
1776
|
const [value, setValue] = useState("");
|
|
1664
1777
|
const [sending, setSending] = useState(false);
|
|
1665
|
-
const
|
|
1778
|
+
const keyboardOpen = useKeyboardOpen();
|
|
1666
1779
|
const upload = useSharedUpload();
|
|
1667
1780
|
const insets = useSafeInsets();
|
|
1668
|
-
useEffect(() => {
|
|
1669
|
-
const show = Keyboard.addListener(
|
|
1670
|
-
Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
|
|
1671
|
-
() => setKeyboardOpen(true)
|
|
1672
|
-
);
|
|
1673
|
-
const hide = Keyboard.addListener(
|
|
1674
|
-
Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
|
|
1675
|
-
() => setKeyboardOpen(false)
|
|
1676
|
-
);
|
|
1677
|
-
return () => {
|
|
1678
|
-
show.remove();
|
|
1679
|
-
hide.remove();
|
|
1680
|
-
};
|
|
1681
|
-
}, []);
|
|
1682
1781
|
useImperativeHandle(
|
|
1683
1782
|
ref,
|
|
1684
1783
|
() => ({
|
|
@@ -1741,7 +1840,7 @@ var MessageComposer = forwardRef(
|
|
|
1741
1840
|
View,
|
|
1742
1841
|
{
|
|
1743
1842
|
style: [
|
|
1744
|
-
|
|
1843
|
+
styles10.wrap,
|
|
1745
1844
|
{
|
|
1746
1845
|
backgroundColor: theme.colors.surface,
|
|
1747
1846
|
borderTopColor: theme.colors.border,
|
|
@@ -1764,13 +1863,13 @@ var MessageComposer = forwardRef(
|
|
|
1764
1863
|
}
|
|
1765
1864
|
) : null,
|
|
1766
1865
|
attachments && !isEditing ? /* @__PURE__ */ jsx(UploadQueueStrip, {}) : null,
|
|
1767
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1866
|
+
/* @__PURE__ */ jsxs(View, { style: styles10.row, children: [
|
|
1768
1867
|
attachments && onAttachPress ? /* @__PURE__ */ jsx(
|
|
1769
1868
|
Pressable,
|
|
1770
1869
|
{
|
|
1771
1870
|
onPress: onAttachPress,
|
|
1772
1871
|
hitSlop: 8,
|
|
1773
|
-
style:
|
|
1872
|
+
style: styles10.iconBtn,
|
|
1774
1873
|
accessibilityLabel: "Attach file",
|
|
1775
1874
|
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "attachment", size: 22, color: theme.colors.ink2 })
|
|
1776
1875
|
}
|
|
@@ -1789,7 +1888,7 @@ var MessageComposer = forwardRef(
|
|
|
1789
1888
|
multiline: true,
|
|
1790
1889
|
editable: !disabled,
|
|
1791
1890
|
style: [
|
|
1792
|
-
|
|
1891
|
+
styles10.input,
|
|
1793
1892
|
{
|
|
1794
1893
|
color: theme.colors.ink,
|
|
1795
1894
|
backgroundColor: theme.colors.surface2,
|
|
@@ -1806,7 +1905,7 @@ var MessageComposer = forwardRef(
|
|
|
1806
1905
|
onPress: handleSend,
|
|
1807
1906
|
disabled: submitDisabled,
|
|
1808
1907
|
style: [
|
|
1809
|
-
|
|
1908
|
+
styles10.sendBtn,
|
|
1810
1909
|
{
|
|
1811
1910
|
backgroundColor: submitDisabled ? theme.colors.ink3 : theme.colors.brand,
|
|
1812
1911
|
opacity: submitDisabled ? 0.6 : 1
|
|
@@ -1828,7 +1927,7 @@ function EditChip({ message, onCancel }) {
|
|
|
1828
1927
|
View,
|
|
1829
1928
|
{
|
|
1830
1929
|
style: [
|
|
1831
|
-
|
|
1930
|
+
styles10.replyChip,
|
|
1832
1931
|
{
|
|
1833
1932
|
backgroundColor: theme.colors.surface2,
|
|
1834
1933
|
borderLeftColor: theme.colors.brand
|
|
@@ -1836,10 +1935,10 @@ function EditChip({ message, onCancel }) {
|
|
|
1836
1935
|
],
|
|
1837
1936
|
children: [
|
|
1838
1937
|
/* @__PURE__ */ jsxs(View, { style: { flex: 1 }, children: [
|
|
1839
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1840
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1938
|
+
/* @__PURE__ */ jsx(Text, { style: [styles10.replyName, { color: theme.colors.brand }], children: "Editing message" }),
|
|
1939
|
+
/* @__PURE__ */ jsx(Text, { style: [styles10.replyBody, { color: theme.colors.ink2 }], numberOfLines: 1, children: message.body ?? "\u2026" })
|
|
1841
1940
|
] }),
|
|
1842
|
-
onCancel ? /* @__PURE__ */ jsx(Pressable, { onPress: onCancel, hitSlop: 8, style:
|
|
1941
|
+
onCancel ? /* @__PURE__ */ jsx(Pressable, { onPress: onCancel, hitSlop: 8, style: styles10.replyCancel, children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 16, color: theme.colors.ink2 }) }) : null
|
|
1843
1942
|
]
|
|
1844
1943
|
}
|
|
1845
1944
|
);
|
|
@@ -1856,7 +1955,7 @@ function ReplyChip({
|
|
|
1856
1955
|
View,
|
|
1857
1956
|
{
|
|
1858
1957
|
style: [
|
|
1859
|
-
|
|
1958
|
+
styles10.replyChip,
|
|
1860
1959
|
{
|
|
1861
1960
|
backgroundColor: theme.colors.surface2,
|
|
1862
1961
|
borderLeftColor: theme.colors.brand
|
|
@@ -1864,18 +1963,18 @@ function ReplyChip({
|
|
|
1864
1963
|
],
|
|
1865
1964
|
children: [
|
|
1866
1965
|
/* @__PURE__ */ jsxs(View, { style: { flex: 1 }, children: [
|
|
1867
|
-
/* @__PURE__ */ jsxs(Text, { style: [
|
|
1966
|
+
/* @__PURE__ */ jsxs(Text, { style: [styles10.replyName, { color: theme.colors.brand }], children: [
|
|
1868
1967
|
"Replying to ",
|
|
1869
1968
|
senderName
|
|
1870
1969
|
] }),
|
|
1871
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1970
|
+
/* @__PURE__ */ jsx(Text, { style: [styles10.replyBody, { color: theme.colors.ink2 }], numberOfLines: 1, children: message.body ?? "\u2026" })
|
|
1872
1971
|
] }),
|
|
1873
|
-
onCancel ? /* @__PURE__ */ jsx(Pressable, { onPress: onCancel, hitSlop: 8, style:
|
|
1972
|
+
onCancel ? /* @__PURE__ */ jsx(Pressable, { onPress: onCancel, hitSlop: 8, style: styles10.replyCancel, children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 16, color: theme.colors.ink2 }) }) : null
|
|
1874
1973
|
]
|
|
1875
1974
|
}
|
|
1876
1975
|
);
|
|
1877
1976
|
}
|
|
1878
|
-
var
|
|
1977
|
+
var styles10 = StyleSheet.create({
|
|
1879
1978
|
wrap: {
|
|
1880
1979
|
borderTopWidth: StyleSheet.hairlineWidth,
|
|
1881
1980
|
paddingTop: 8,
|
|
@@ -1934,6 +2033,8 @@ var styles9 = StyleSheet.create({
|
|
|
1934
2033
|
});
|
|
1935
2034
|
function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
1936
2035
|
const theme = usePoolseTheme();
|
|
2036
|
+
const insets = useSafeInsets();
|
|
2037
|
+
const keyboardOpen = useKeyboardOpen();
|
|
1937
2038
|
const { members } = useMembers(conversationId);
|
|
1938
2039
|
const [pickerOpen, setPickerOpen] = useState(false);
|
|
1939
2040
|
const [pickerQuery, _setPickerQuery] = useState("");
|
|
@@ -1972,22 +2073,28 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
1972
2073
|
transparent: true,
|
|
1973
2074
|
animationType: "slide",
|
|
1974
2075
|
onRequestClose: () => setPickerOpen(false),
|
|
1975
|
-
|
|
2076
|
+
...EDGE_TO_EDGE_MODAL,
|
|
2077
|
+
children: /* @__PURE__ */ jsx(KeyboardAvoidingView, { style: styles11.kav, behavior: "padding", children: /* @__PURE__ */ jsx(Pressable, { style: styles11.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxs(
|
|
1976
2078
|
View,
|
|
1977
2079
|
{
|
|
1978
2080
|
style: [
|
|
1979
|
-
|
|
2081
|
+
styles11.sheet,
|
|
1980
2082
|
{
|
|
1981
2083
|
backgroundColor: theme.colors.surface,
|
|
1982
2084
|
borderTopLeftRadius: theme.radii.lg,
|
|
1983
|
-
borderTopRightRadius: theme.radii.lg
|
|
2085
|
+
borderTopRightRadius: theme.radii.lg,
|
|
2086
|
+
// Clear the nav bar — unless the keyboard is covering
|
|
2087
|
+
// it, where the inset would just be a gap.
|
|
2088
|
+
paddingBottom: 12 + (keyboardOpen ? 0 : insets.bottom),
|
|
2089
|
+
paddingLeft: insets.left,
|
|
2090
|
+
paddingRight: insets.right
|
|
1984
2091
|
}
|
|
1985
2092
|
],
|
|
1986
2093
|
children: [
|
|
1987
2094
|
/* @__PURE__ */ jsx(
|
|
1988
2095
|
Text,
|
|
1989
2096
|
{
|
|
1990
|
-
style: [
|
|
2097
|
+
style: [styles11.title, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
|
|
1991
2098
|
children: "Mention a member"
|
|
1992
2099
|
}
|
|
1993
2100
|
),
|
|
@@ -1996,6 +2103,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
1996
2103
|
{
|
|
1997
2104
|
data: filteredMembers,
|
|
1998
2105
|
keyExtractor: (m) => m.user_id,
|
|
2106
|
+
keyboardShouldPersistTaps: "handled",
|
|
1999
2107
|
renderItem: ({ item }) => /* @__PURE__ */ jsx(
|
|
2000
2108
|
MentionRow,
|
|
2001
2109
|
{
|
|
@@ -2011,19 +2119,22 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2011
2119
|
)
|
|
2012
2120
|
]
|
|
2013
2121
|
}
|
|
2014
|
-
) })
|
|
2122
|
+
) }) })
|
|
2015
2123
|
}
|
|
2016
2124
|
)
|
|
2017
2125
|
] });
|
|
2018
2126
|
}
|
|
2019
2127
|
function MentionRow({ member, onPress }) {
|
|
2020
2128
|
const theme = usePoolseTheme();
|
|
2021
|
-
return /* @__PURE__ */ jsxs(Pressable, { onPress, style:
|
|
2129
|
+
return /* @__PURE__ */ jsxs(Pressable, { onPress, style: styles11.row, children: [
|
|
2022
2130
|
/* @__PURE__ */ jsx(Avatar, { src: null, name: member.external_id, seed: member.external_id, size: "sm" }),
|
|
2023
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2131
|
+
/* @__PURE__ */ jsx(Text, { style: [styles11.rowText, { color: theme.colors.ink, fontFamily: theme.type.fontBody }], children: member.external_id })
|
|
2024
2132
|
] });
|
|
2025
2133
|
}
|
|
2026
|
-
var
|
|
2134
|
+
var styles11 = StyleSheet.create({
|
|
2135
|
+
kav: {
|
|
2136
|
+
flex: 1
|
|
2137
|
+
},
|
|
2027
2138
|
backdrop: {
|
|
2028
2139
|
flex: 1,
|
|
2029
2140
|
backgroundColor: "rgba(0,0,0,0.35)",
|
|
@@ -2103,12 +2214,12 @@ function MessageList({
|
|
|
2103
2214
|
[renderItem, data.length]
|
|
2104
2215
|
);
|
|
2105
2216
|
if (loading && messages.length === 0) {
|
|
2106
|
-
return /* @__PURE__ */ jsx(View, { style: [
|
|
2217
|
+
return /* @__PURE__ */ jsx(View, { style: [styles12.placeholder, { backgroundColor: theme.colors.paper }], children: /* @__PURE__ */ jsx(ActivityIndicator, { color: theme.colors.brand }) });
|
|
2107
2218
|
}
|
|
2108
2219
|
if (messages.length === 0) {
|
|
2109
|
-
return /* @__PURE__ */ jsx(View, { style: [
|
|
2220
|
+
return /* @__PURE__ */ jsx(View, { style: [styles12.placeholder, { backgroundColor: theme.colors.paper }], children: typeof emptyState === "string" ? /* @__PURE__ */ jsx(Text, { style: { color: theme.colors.ink3, fontFamily: theme.type.fontBody }, children: emptyState }) : emptyState ?? null });
|
|
2110
2221
|
}
|
|
2111
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
2222
|
+
return /* @__PURE__ */ jsxs(View, { style: styles12.root, children: [
|
|
2112
2223
|
/* @__PURE__ */ jsx(
|
|
2113
2224
|
FlatList,
|
|
2114
2225
|
{
|
|
@@ -2135,7 +2246,7 @@ function MessageList({
|
|
|
2135
2246
|
{
|
|
2136
2247
|
onPress: scrollToBottom,
|
|
2137
2248
|
style: [
|
|
2138
|
-
|
|
2249
|
+
styles12.jumpButton,
|
|
2139
2250
|
{
|
|
2140
2251
|
backgroundColor: theme.colors.brand
|
|
2141
2252
|
},
|
|
@@ -2144,7 +2255,7 @@ function MessageList({
|
|
|
2144
2255
|
accessibilityLabel: `${newCount} new ${newCount === 1 ? "message" : "messages"}, jump to latest`,
|
|
2145
2256
|
children: [
|
|
2146
2257
|
/* @__PURE__ */ jsx(PoolseIcon, { name: "chevron-down", size: 14, color: theme.colors.onBrand }),
|
|
2147
|
-
/* @__PURE__ */ jsxs(Text, { style: [
|
|
2258
|
+
/* @__PURE__ */ jsxs(Text, { style: [styles12.jumpText, { color: theme.colors.onBrand }], children: [
|
|
2148
2259
|
newCount,
|
|
2149
2260
|
" new ",
|
|
2150
2261
|
newCount === 1 ? "message" : "messages"
|
|
@@ -2154,7 +2265,7 @@ function MessageList({
|
|
|
2154
2265
|
) : null
|
|
2155
2266
|
] });
|
|
2156
2267
|
}
|
|
2157
|
-
var
|
|
2268
|
+
var styles12 = StyleSheet.create({
|
|
2158
2269
|
root: {
|
|
2159
2270
|
flex: 1
|
|
2160
2271
|
},
|
|
@@ -2180,64 +2291,90 @@ var styles11 = StyleSheet.create({
|
|
|
2180
2291
|
fontWeight: "600"
|
|
2181
2292
|
}
|
|
2182
2293
|
});
|
|
2183
|
-
function CallLogRow({ msg, meId }) {
|
|
2294
|
+
function CallLogRow({ msg, meId, onCallBack }) {
|
|
2184
2295
|
const theme = usePoolseTheme();
|
|
2185
2296
|
const display = callLogDisplayFor(msg, meId);
|
|
2186
2297
|
if (!display) return null;
|
|
2187
2298
|
const accent = display.missed ? theme.colors.error : theme.colors.ink3;
|
|
2188
2299
|
const time = formatTime(msg.inserted_at);
|
|
2189
2300
|
const label = [display.title, display.detail, time].filter(Boolean).join(", ");
|
|
2190
|
-
const metaStyle = [
|
|
2191
|
-
return /* @__PURE__ */
|
|
2192
|
-
|
|
2193
|
-
|
|
2194
|
-
|
|
2195
|
-
|
|
2196
|
-
|
|
2197
|
-
|
|
2198
|
-
|
|
2199
|
-
|
|
2200
|
-
|
|
2201
|
-
|
|
2202
|
-
|
|
2203
|
-
|
|
2301
|
+
const metaStyle = [styles13.meta, { color: theme.colors.ink3, fontFamily: theme.type.fontBody }];
|
|
2302
|
+
return /* @__PURE__ */ jsxs(View, { style: styles13.wrap, accessible: true, accessibilityLabel: label, children: [
|
|
2303
|
+
/* @__PURE__ */ jsxs(
|
|
2304
|
+
View,
|
|
2305
|
+
{
|
|
2306
|
+
style: [
|
|
2307
|
+
styles13.chip,
|
|
2308
|
+
{
|
|
2309
|
+
backgroundColor: theme.colors.surface2,
|
|
2310
|
+
borderColor: theme.colors.border
|
|
2311
|
+
}
|
|
2312
|
+
],
|
|
2313
|
+
children: [
|
|
2314
|
+
/* @__PURE__ */ jsx(PoolseIcon, { name: display.media === "video" ? "video" : "phone", size: 13, color: accent }),
|
|
2315
|
+
/* @__PURE__ */ jsx(
|
|
2316
|
+
Text,
|
|
2317
|
+
{
|
|
2318
|
+
style: [
|
|
2319
|
+
styles13.title,
|
|
2320
|
+
{
|
|
2321
|
+
color: display.missed ? theme.colors.error : theme.colors.ink2,
|
|
2322
|
+
fontFamily: theme.type.fontBody
|
|
2323
|
+
}
|
|
2324
|
+
],
|
|
2325
|
+
numberOfLines: 1,
|
|
2326
|
+
children: display.title
|
|
2327
|
+
}
|
|
2328
|
+
),
|
|
2329
|
+
display.detail ? /* @__PURE__ */ jsxs(Text, { style: metaStyle, children: [
|
|
2330
|
+
"\xB7 ",
|
|
2331
|
+
display.detail
|
|
2332
|
+
] }) : null,
|
|
2333
|
+
time ? /* @__PURE__ */ jsxs(Text, { style: metaStyle, children: [
|
|
2334
|
+
"\xB7 ",
|
|
2335
|
+
time
|
|
2336
|
+
] }) : null
|
|
2337
|
+
]
|
|
2338
|
+
}
|
|
2339
|
+
),
|
|
2340
|
+
display.callBack && onCallBack ? /* @__PURE__ */ jsx(
|
|
2341
|
+
Pressable,
|
|
2342
|
+
{
|
|
2343
|
+
onPress: () => onCallBack(display.media),
|
|
2344
|
+
accessibilityRole: "button",
|
|
2345
|
+
accessibilityLabel: display.media === "video" ? "Video call back" : "Call back",
|
|
2346
|
+
hitSlop: 8,
|
|
2347
|
+
style: ({ pressed }) => [styles13.callBack, pressed && styles13.callBackPressed],
|
|
2348
|
+
children: /* @__PURE__ */ jsx(
|
|
2204
2349
|
Text,
|
|
2205
2350
|
{
|
|
2206
2351
|
style: [
|
|
2207
|
-
|
|
2208
|
-
{
|
|
2209
|
-
color: display.missed ? theme.colors.error : theme.colors.ink2,
|
|
2210
|
-
fontFamily: theme.type.fontBody
|
|
2211
|
-
}
|
|
2352
|
+
styles13.callBackText,
|
|
2353
|
+
{ color: theme.colors.brand, fontFamily: theme.type.fontBody }
|
|
2212
2354
|
],
|
|
2213
|
-
|
|
2214
|
-
children: display.title
|
|
2355
|
+
children: "Call back"
|
|
2215
2356
|
}
|
|
2216
|
-
)
|
|
2217
|
-
|
|
2218
|
-
|
|
2219
|
-
|
|
2220
|
-
] }) : null,
|
|
2221
|
-
time ? /* @__PURE__ */ jsxs(Text, { style: metaStyle, children: [
|
|
2222
|
-
"\xB7 ",
|
|
2223
|
-
time
|
|
2224
|
-
] }) : null
|
|
2225
|
-
]
|
|
2226
|
-
}
|
|
2227
|
-
) });
|
|
2357
|
+
)
|
|
2358
|
+
}
|
|
2359
|
+
) : null
|
|
2360
|
+
] });
|
|
2228
2361
|
}
|
|
2229
2362
|
function formatTime(iso) {
|
|
2230
2363
|
const d = new Date(iso);
|
|
2231
2364
|
if (Number.isNaN(d.getTime())) return "";
|
|
2232
2365
|
return d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
|
|
2233
2366
|
}
|
|
2234
|
-
var
|
|
2367
|
+
var styles13 = StyleSheet.create({
|
|
2235
2368
|
wrap: {
|
|
2236
2369
|
alignItems: "center",
|
|
2237
2370
|
alignSelf: "stretch",
|
|
2238
2371
|
marginVertical: 6,
|
|
2239
|
-
paddingHorizontal: 16
|
|
2372
|
+
paddingHorizontal: 16,
|
|
2373
|
+
gap: 4
|
|
2240
2374
|
},
|
|
2375
|
+
callBack: { paddingHorizontal: 10, paddingVertical: 2 },
|
|
2376
|
+
callBackPressed: { opacity: 0.6 },
|
|
2377
|
+
callBackText: { fontSize: 12, fontWeight: "600" },
|
|
2241
2378
|
chip: {
|
|
2242
2379
|
flexDirection: "row",
|
|
2243
2380
|
alignItems: "center",
|
|
@@ -2276,6 +2413,7 @@ function MessageActions({
|
|
|
2276
2413
|
onCopy
|
|
2277
2414
|
}) {
|
|
2278
2415
|
const theme = usePoolseTheme();
|
|
2416
|
+
const insets = useSafeInsets();
|
|
2279
2417
|
const items = [];
|
|
2280
2418
|
if (onReply) items.push({ label: "Reply", icon: "reply", onPress: onReply });
|
|
2281
2419
|
if (onQuote) items.push({ label: "Quote reply", icon: "reply", onPress: onQuote });
|
|
@@ -2286,61 +2424,75 @@ function MessageActions({
|
|
|
2286
2424
|
if (isSelf && onDelete)
|
|
2287
2425
|
items.push({ label: "Delete", icon: "trash", onPress: onDelete, danger: true });
|
|
2288
2426
|
const showEmojiRow = !!onPickReaction && emojis.length > 0;
|
|
2289
|
-
return /* @__PURE__ */ jsx(
|
|
2290
|
-
|
|
2427
|
+
return /* @__PURE__ */ jsx(
|
|
2428
|
+
Modal,
|
|
2291
2429
|
{
|
|
2292
|
-
|
|
2293
|
-
|
|
2430
|
+
visible,
|
|
2431
|
+
transparent: true,
|
|
2432
|
+
animationType: "fade",
|
|
2433
|
+
onRequestClose: onClose,
|
|
2434
|
+
...EDGE_TO_EDGE_MODAL,
|
|
2435
|
+
children: /* @__PURE__ */ jsx(Pressable, { style: styles14.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
|
|
2436
|
+
View,
|
|
2294
2437
|
{
|
|
2295
|
-
|
|
2296
|
-
|
|
2297
|
-
borderTopRightRadius: theme.radii.lg
|
|
2298
|
-
},
|
|
2299
|
-
theme.shadows.lg
|
|
2300
|
-
],
|
|
2301
|
-
children: [
|
|
2302
|
-
showEmojiRow ? /* @__PURE__ */ jsx(View, { style: [styles13.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsx(
|
|
2303
|
-
Pressable,
|
|
2304
|
-
{
|
|
2305
|
-
onPress: () => {
|
|
2306
|
-
onPickReaction(emoji);
|
|
2307
|
-
onClose();
|
|
2308
|
-
},
|
|
2309
|
-
style: styles13.emojiBtn,
|
|
2310
|
-
hitSlop: 6,
|
|
2311
|
-
accessibilityLabel: `React with ${emoji}`,
|
|
2312
|
-
children: /* @__PURE__ */ jsx(Text, { style: styles13.emoji, children: emoji })
|
|
2313
|
-
},
|
|
2314
|
-
emoji
|
|
2315
|
-
)) }) : null,
|
|
2316
|
-
items.map((item) => /* @__PURE__ */ jsxs(Pressable, { onPress: item.onPress, style: styles13.item, children: [
|
|
2317
|
-
/* @__PURE__ */ jsx(
|
|
2318
|
-
PoolseIcon,
|
|
2319
|
-
{
|
|
2320
|
-
name: item.icon,
|
|
2321
|
-
size: 18,
|
|
2322
|
-
color: item.danger ? theme.colors.error : theme.colors.ink2
|
|
2323
|
-
}
|
|
2324
|
-
),
|
|
2325
|
-
/* @__PURE__ */ jsx(
|
|
2326
|
-
Text,
|
|
2438
|
+
style: [
|
|
2439
|
+
styles14.sheet,
|
|
2327
2440
|
{
|
|
2328
|
-
|
|
2329
|
-
|
|
2441
|
+
backgroundColor: theme.colors.surface,
|
|
2442
|
+
borderTopLeftRadius: theme.radii.lg,
|
|
2443
|
+
borderTopRightRadius: theme.radii.lg,
|
|
2444
|
+
// Last action row must sit above the nav bar / home indicator.
|
|
2445
|
+
paddingBottom: 24 + insets.bottom,
|
|
2446
|
+
paddingLeft: insets.left,
|
|
2447
|
+
paddingRight: insets.right
|
|
2448
|
+
},
|
|
2449
|
+
theme.shadows.lg
|
|
2450
|
+
],
|
|
2451
|
+
children: [
|
|
2452
|
+
showEmojiRow ? /* @__PURE__ */ jsx(View, { style: [styles14.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsx(
|
|
2453
|
+
Pressable,
|
|
2454
|
+
{
|
|
2455
|
+
onPress: () => {
|
|
2456
|
+
onPickReaction(emoji);
|
|
2457
|
+
onClose();
|
|
2458
|
+
},
|
|
2459
|
+
style: styles14.emojiBtn,
|
|
2460
|
+
hitSlop: 6,
|
|
2461
|
+
accessibilityLabel: `React with ${emoji}`,
|
|
2462
|
+
children: /* @__PURE__ */ jsx(Text, { style: styles14.emoji, children: emoji })
|
|
2463
|
+
},
|
|
2464
|
+
emoji
|
|
2465
|
+
)) }) : null,
|
|
2466
|
+
items.map((item) => /* @__PURE__ */ jsxs(Pressable, { onPress: item.onPress, style: styles14.item, children: [
|
|
2467
|
+
/* @__PURE__ */ jsx(
|
|
2468
|
+
PoolseIcon,
|
|
2330
2469
|
{
|
|
2331
|
-
|
|
2332
|
-
|
|
2470
|
+
name: item.icon,
|
|
2471
|
+
size: 18,
|
|
2472
|
+
color: item.danger ? theme.colors.error : theme.colors.ink2
|
|
2333
2473
|
}
|
|
2334
|
-
|
|
2335
|
-
|
|
2336
|
-
|
|
2337
|
-
|
|
2338
|
-
|
|
2339
|
-
|
|
2474
|
+
),
|
|
2475
|
+
/* @__PURE__ */ jsx(
|
|
2476
|
+
Text,
|
|
2477
|
+
{
|
|
2478
|
+
style: [
|
|
2479
|
+
styles14.itemText,
|
|
2480
|
+
{
|
|
2481
|
+
color: item.danger ? theme.colors.error : theme.colors.ink,
|
|
2482
|
+
fontFamily: theme.type.fontBody
|
|
2483
|
+
}
|
|
2484
|
+
],
|
|
2485
|
+
children: item.label
|
|
2486
|
+
}
|
|
2487
|
+
)
|
|
2488
|
+
] }, item.label))
|
|
2489
|
+
]
|
|
2490
|
+
}
|
|
2491
|
+
) })
|
|
2340
2492
|
}
|
|
2341
|
-
)
|
|
2493
|
+
);
|
|
2342
2494
|
}
|
|
2343
|
-
var
|
|
2495
|
+
var styles14 = StyleSheet.create({
|
|
2344
2496
|
backdrop: {
|
|
2345
2497
|
flex: 1,
|
|
2346
2498
|
backgroundColor: "rgba(0,0,0,0.35)",
|
|
@@ -2410,7 +2562,7 @@ function AttachmentPreview({
|
|
|
2410
2562
|
View,
|
|
2411
2563
|
{
|
|
2412
2564
|
style: [
|
|
2413
|
-
|
|
2565
|
+
styles15.imagePlaceholder,
|
|
2414
2566
|
{
|
|
2415
2567
|
width: maxWidth,
|
|
2416
2568
|
height: 200,
|
|
@@ -2430,7 +2582,7 @@ function AttachmentPreview({
|
|
|
2430
2582
|
onPress,
|
|
2431
2583
|
disabled: !onPress,
|
|
2432
2584
|
style: [
|
|
2433
|
-
|
|
2585
|
+
styles15.fileCard,
|
|
2434
2586
|
{
|
|
2435
2587
|
backgroundColor: onBrand ? "rgba(255,255,255,0.18)" : theme.colors.surface2,
|
|
2436
2588
|
borderColor: onBrand ? "transparent" : theme.colors.border,
|
|
@@ -2443,12 +2595,12 @@ function AttachmentPreview({
|
|
|
2443
2595
|
/* @__PURE__ */ jsx(
|
|
2444
2596
|
Text,
|
|
2445
2597
|
{
|
|
2446
|
-
style: [
|
|
2598
|
+
style: [styles15.fileName, { color: ink, fontFamily: theme.type.fontBody }],
|
|
2447
2599
|
numberOfLines: 1,
|
|
2448
2600
|
children: attachment.original_filename ?? "file"
|
|
2449
2601
|
}
|
|
2450
2602
|
),
|
|
2451
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2603
|
+
/* @__PURE__ */ jsx(Text, { style: [styles15.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes2(attachment.byte_size) })
|
|
2452
2604
|
] })
|
|
2453
2605
|
]
|
|
2454
2606
|
}
|
|
@@ -2460,7 +2612,7 @@ function formatBytes2(n) {
|
|
|
2460
2612
|
if (n < 1024 * 1024 * 1024) return `${(n / 1024 / 1024).toFixed(1)} MB`;
|
|
2461
2613
|
return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
|
|
2462
2614
|
}
|
|
2463
|
-
var
|
|
2615
|
+
var styles15 = StyleSheet.create({
|
|
2464
2616
|
imagePlaceholder: {},
|
|
2465
2617
|
fileCard: {
|
|
2466
2618
|
flexDirection: "row",
|
|
@@ -2496,7 +2648,7 @@ function ImageMosaic({
|
|
|
2496
2648
|
View,
|
|
2497
2649
|
{
|
|
2498
2650
|
style: [
|
|
2499
|
-
|
|
2651
|
+
styles16.root,
|
|
2500
2652
|
{
|
|
2501
2653
|
borderTopLeftRadius: r,
|
|
2502
2654
|
borderTopRightRadius: r,
|
|
@@ -2517,18 +2669,18 @@ function ImageMosaic({
|
|
|
2517
2669
|
{
|
|
2518
2670
|
onLongPress,
|
|
2519
2671
|
attachment: visible[0],
|
|
2520
|
-
style:
|
|
2672
|
+
style: styles16.tileFull,
|
|
2521
2673
|
onPress: () => setViewerIndex(0),
|
|
2522
2674
|
overlay: null
|
|
2523
2675
|
}
|
|
2524
2676
|
) : null,
|
|
2525
|
-
n === 2 ? /* @__PURE__ */ jsxs(View, { style:
|
|
2677
|
+
n === 2 ? /* @__PURE__ */ jsxs(View, { style: styles16.rowEven, children: [
|
|
2526
2678
|
/* @__PURE__ */ jsx(
|
|
2527
2679
|
Tile,
|
|
2528
2680
|
{
|
|
2529
2681
|
onLongPress,
|
|
2530
2682
|
attachment: visible[0],
|
|
2531
|
-
style:
|
|
2683
|
+
style: styles16.tileHalfSquare,
|
|
2532
2684
|
onPress: () => setViewerIndex(0),
|
|
2533
2685
|
overlay: null
|
|
2534
2686
|
}
|
|
@@ -2538,7 +2690,7 @@ function ImageMosaic({
|
|
|
2538
2690
|
{
|
|
2539
2691
|
onLongPress,
|
|
2540
2692
|
attachment: visible[1],
|
|
2541
|
-
style:
|
|
2693
|
+
style: styles16.tileHalfSquare,
|
|
2542
2694
|
onPress: () => setViewerIndex(1),
|
|
2543
2695
|
overlay: null
|
|
2544
2696
|
}
|
|
@@ -2550,18 +2702,18 @@ function ImageMosaic({
|
|
|
2550
2702
|
{
|
|
2551
2703
|
onLongPress,
|
|
2552
2704
|
attachment: visible[0],
|
|
2553
|
-
style:
|
|
2705
|
+
style: styles16.tileHero,
|
|
2554
2706
|
onPress: () => setViewerIndex(0),
|
|
2555
2707
|
overlay: null
|
|
2556
2708
|
}
|
|
2557
2709
|
),
|
|
2558
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
2710
|
+
/* @__PURE__ */ jsxs(View, { style: [styles16.rowEven, { marginTop: 2 }], children: [
|
|
2559
2711
|
/* @__PURE__ */ jsx(
|
|
2560
2712
|
Tile,
|
|
2561
2713
|
{
|
|
2562
2714
|
onLongPress,
|
|
2563
2715
|
attachment: visible[1],
|
|
2564
|
-
style:
|
|
2716
|
+
style: styles16.tileHalfSquare,
|
|
2565
2717
|
onPress: () => setViewerIndex(1),
|
|
2566
2718
|
overlay: null
|
|
2567
2719
|
}
|
|
@@ -2571,7 +2723,7 @@ function ImageMosaic({
|
|
|
2571
2723
|
{
|
|
2572
2724
|
onLongPress,
|
|
2573
2725
|
attachment: visible[2],
|
|
2574
|
-
style:
|
|
2726
|
+
style: styles16.tileHalfSquare,
|
|
2575
2727
|
onPress: () => setViewerIndex(2),
|
|
2576
2728
|
overlay: null
|
|
2577
2729
|
}
|
|
@@ -2579,13 +2731,13 @@ function ImageMosaic({
|
|
|
2579
2731
|
] })
|
|
2580
2732
|
] }) : null,
|
|
2581
2733
|
n === 4 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2582
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2734
|
+
/* @__PURE__ */ jsxs(View, { style: styles16.rowEven, children: [
|
|
2583
2735
|
/* @__PURE__ */ jsx(
|
|
2584
2736
|
Tile,
|
|
2585
2737
|
{
|
|
2586
2738
|
onLongPress,
|
|
2587
2739
|
attachment: visible[0],
|
|
2588
|
-
style:
|
|
2740
|
+
style: styles16.tileHalfSquare,
|
|
2589
2741
|
onPress: () => setViewerIndex(0),
|
|
2590
2742
|
overlay: null
|
|
2591
2743
|
}
|
|
@@ -2595,19 +2747,19 @@ function ImageMosaic({
|
|
|
2595
2747
|
{
|
|
2596
2748
|
onLongPress,
|
|
2597
2749
|
attachment: visible[1],
|
|
2598
|
-
style:
|
|
2750
|
+
style: styles16.tileHalfSquare,
|
|
2599
2751
|
onPress: () => setViewerIndex(1),
|
|
2600
2752
|
overlay: null
|
|
2601
2753
|
}
|
|
2602
2754
|
)
|
|
2603
2755
|
] }),
|
|
2604
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
2756
|
+
/* @__PURE__ */ jsxs(View, { style: [styles16.rowEven, { marginTop: 2 }], children: [
|
|
2605
2757
|
/* @__PURE__ */ jsx(
|
|
2606
2758
|
Tile,
|
|
2607
2759
|
{
|
|
2608
2760
|
onLongPress,
|
|
2609
2761
|
attachment: visible[2],
|
|
2610
|
-
style:
|
|
2762
|
+
style: styles16.tileHalfSquare,
|
|
2611
2763
|
onPress: () => setViewerIndex(2),
|
|
2612
2764
|
overlay: null
|
|
2613
2765
|
}
|
|
@@ -2617,7 +2769,7 @@ function ImageMosaic({
|
|
|
2617
2769
|
{
|
|
2618
2770
|
onLongPress,
|
|
2619
2771
|
attachment: visible[3],
|
|
2620
|
-
style:
|
|
2772
|
+
style: styles16.tileHalfSquare,
|
|
2621
2773
|
onPress: () => setViewerIndex(3),
|
|
2622
2774
|
overlay: overflow > 0 ? `+${overflow}` : null
|
|
2623
2775
|
}
|
|
@@ -2634,6 +2786,7 @@ function ImageMosaic({
|
|
|
2634
2786
|
transparent: true,
|
|
2635
2787
|
animationType: "fade",
|
|
2636
2788
|
onRequestClose: () => setViewerIndex(null),
|
|
2789
|
+
...EDGE_TO_EDGE_MODAL,
|
|
2637
2790
|
children: viewerIndex !== null ? /* @__PURE__ */ jsx(
|
|
2638
2791
|
FullScreenViewer,
|
|
2639
2792
|
{
|
|
@@ -2654,18 +2807,18 @@ function Tile({
|
|
|
2654
2807
|
}) {
|
|
2655
2808
|
const theme = usePoolseTheme();
|
|
2656
2809
|
const { url } = useAttachmentUrl(attachment.id);
|
|
2657
|
-
return /* @__PURE__ */ jsxs(Pressable, { onPress, onLongPress, style: [
|
|
2810
|
+
return /* @__PURE__ */ jsxs(Pressable, { onPress, onLongPress, style: [styles16.tileBase, style], children: [
|
|
2658
2811
|
url ? /* @__PURE__ */ jsx(
|
|
2659
2812
|
Image,
|
|
2660
2813
|
{
|
|
2661
2814
|
source: { uri: url },
|
|
2662
|
-
style: [
|
|
2815
|
+
style: [styles16.tileImage, { backgroundColor: theme.colors.surface2 }],
|
|
2663
2816
|
resizeMode: "cover",
|
|
2664
2817
|
accessible: true,
|
|
2665
2818
|
accessibilityLabel: attachment.original_filename ?? "image"
|
|
2666
2819
|
}
|
|
2667
|
-
) : /* @__PURE__ */ jsx(View, { style: [
|
|
2668
|
-
overlay ? /* @__PURE__ */ jsx(View, { style:
|
|
2820
|
+
) : /* @__PURE__ */ jsx(View, { style: [styles16.tileImage, { backgroundColor: theme.colors.surface2 }] }),
|
|
2821
|
+
overlay ? /* @__PURE__ */ jsx(View, { style: styles16.overflow, children: /* @__PURE__ */ jsx(Text, { style: styles16.overflowText, children: overlay }) }) : null
|
|
2669
2822
|
] });
|
|
2670
2823
|
}
|
|
2671
2824
|
function FullScreenViewer({
|
|
@@ -2673,8 +2826,9 @@ function FullScreenViewer({
|
|
|
2673
2826
|
onClose
|
|
2674
2827
|
}) {
|
|
2675
2828
|
const { url } = useAttachmentUrl(attachment.id);
|
|
2676
|
-
const { width, height } =
|
|
2677
|
-
|
|
2829
|
+
const { width, height } = useWindowDimensions();
|
|
2830
|
+
const insets = useSafeInsets();
|
|
2831
|
+
return /* @__PURE__ */ jsxs(Pressable, { style: styles16.viewer, onPress: onClose, children: [
|
|
2678
2832
|
url ? /* @__PURE__ */ jsx(
|
|
2679
2833
|
Image,
|
|
2680
2834
|
{
|
|
@@ -2690,14 +2844,14 @@ function FullScreenViewer({
|
|
|
2690
2844
|
{
|
|
2691
2845
|
onPress: onClose,
|
|
2692
2846
|
hitSlop: 12,
|
|
2693
|
-
style:
|
|
2847
|
+
style: [styles16.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
|
|
2694
2848
|
accessibilityLabel: "Close viewer",
|
|
2695
2849
|
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
|
|
2696
2850
|
}
|
|
2697
2851
|
)
|
|
2698
2852
|
] });
|
|
2699
2853
|
}
|
|
2700
|
-
var
|
|
2854
|
+
var styles16 = StyleSheet.create({
|
|
2701
2855
|
root: {
|
|
2702
2856
|
width: "100%",
|
|
2703
2857
|
overflow: "hidden",
|
|
@@ -2749,8 +2903,6 @@ var styles15 = StyleSheet.create({
|
|
|
2749
2903
|
},
|
|
2750
2904
|
closeBtn: {
|
|
2751
2905
|
position: "absolute",
|
|
2752
|
-
top: 48,
|
|
2753
|
-
right: 16,
|
|
2754
2906
|
padding: 8,
|
|
2755
2907
|
backgroundColor: "rgba(0,0,0,0.5)",
|
|
2756
2908
|
borderRadius: 20
|
|
@@ -2888,22 +3040,22 @@ function MessageBubble({
|
|
|
2888
3040
|
View,
|
|
2889
3041
|
{
|
|
2890
3042
|
style: [
|
|
2891
|
-
|
|
2892
|
-
variant === "inline" &&
|
|
2893
|
-
variant === "wrapped" &&
|
|
2894
|
-
variant === "overlay" &&
|
|
2895
|
-
variant === "block" &&
|
|
3043
|
+
styles17.metaRow,
|
|
3044
|
+
variant === "inline" && styles17.metaInline,
|
|
3045
|
+
variant === "wrapped" && styles17.metaWrapped,
|
|
3046
|
+
variant === "overlay" && styles17.metaOverlay,
|
|
3047
|
+
variant === "block" && styles17.metaBlock,
|
|
2896
3048
|
// File-only bubble: the meta row follows the cards directly —
|
|
2897
3049
|
// give it air so the time doesn't sit glued to the card.
|
|
2898
|
-
variant === "block" && hasFiles && !hasBody &&
|
|
2899
|
-
variant === "jumbo" &&
|
|
3050
|
+
variant === "block" && hasFiles && !hasBody && styles17.metaBlockAfterFiles,
|
|
3051
|
+
variant === "jumbo" && styles17.metaJumbo
|
|
2900
3052
|
],
|
|
2901
3053
|
onLayout: variant === "inline" || variant === "wrapped" ? (e) => setMetaWidth(e.nativeEvent.layout.width) : void 0,
|
|
2902
3054
|
pointerEvents: "none",
|
|
2903
3055
|
children: [
|
|
2904
|
-
isEdited ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2905
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2906
|
-
isSelf && readState ? /* @__PURE__ */ jsx(View, { style:
|
|
3056
|
+
isEdited ? /* @__PURE__ */ jsx(Text, { style: [styles17.editedTag, { color, opacity: 0.8 }], children: "edited" }) : null,
|
|
3057
|
+
/* @__PURE__ */ jsx(Text, { style: [styles17.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
|
|
3058
|
+
isSelf && readState ? /* @__PURE__ */ jsx(View, { style: styles17.readTick, children: /* @__PURE__ */ jsx(
|
|
2907
3059
|
PoolseIcon,
|
|
2908
3060
|
{
|
|
2909
3061
|
name: readState === "read" ? "check-double" : "check",
|
|
@@ -2915,7 +3067,7 @@ function MessageBubble({
|
|
|
2915
3067
|
}
|
|
2916
3068
|
);
|
|
2917
3069
|
};
|
|
2918
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
3070
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles17.wrap, { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }], children: [
|
|
2919
3071
|
/* @__PURE__ */ jsxs(
|
|
2920
3072
|
View,
|
|
2921
3073
|
{
|
|
@@ -2935,7 +3087,7 @@ function MessageBubble({
|
|
|
2935
3087
|
showSenderName && !isSelf && jumboCount === 0 && (groupPosition === "first" || groupPosition === "standalone") ? /* @__PURE__ */ jsx(
|
|
2936
3088
|
Text,
|
|
2937
3089
|
{
|
|
2938
|
-
style: [
|
|
3090
|
+
style: [styles17.senderName, { color: senderTint, fontFamily: theme.type.fontBody }],
|
|
2939
3091
|
children: senderLabel
|
|
2940
3092
|
}
|
|
2941
3093
|
) : null,
|
|
@@ -2952,7 +3104,7 @@ function MessageBubble({
|
|
|
2952
3104
|
// 3px of bubble color framing the picture; the mosaic clips
|
|
2953
3105
|
// itself 3px tighter than the bubble so the curves stay
|
|
2954
3106
|
// concentric.
|
|
2955
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3107
|
+
/* @__PURE__ */ jsxs(View, { style: styles17.mediaFrame, children: [
|
|
2956
3108
|
/* @__PURE__ */ jsx(
|
|
2957
3109
|
ImageMosaic,
|
|
2958
3110
|
{
|
|
@@ -2966,7 +3118,7 @@ function MessageBubble({
|
|
|
2966
3118
|
metaOverlay ? metaRow("overlay") : null
|
|
2967
3119
|
] })
|
|
2968
3120
|
) : null,
|
|
2969
|
-
hasFiles ? /* @__PURE__ */ jsx(View, { style:
|
|
3121
|
+
hasFiles ? /* @__PURE__ */ jsx(View, { style: styles17.filesBlock, children: files.map((att) => /* @__PURE__ */ jsx(
|
|
2970
3122
|
AttachmentPreview,
|
|
2971
3123
|
{
|
|
2972
3124
|
attachment: att,
|
|
@@ -2975,7 +3127,7 @@ function MessageBubble({
|
|
|
2975
3127
|
},
|
|
2976
3128
|
att.id
|
|
2977
3129
|
)) }) : null,
|
|
2978
|
-
isDeleted ? /* @__PURE__ */ jsx(View, { style: [
|
|
3130
|
+
isDeleted ? /* @__PURE__ */ jsx(View, { style: [styles17.textBlock, sectionAbove && styles17.textBlockAfter], children: /* @__PURE__ */ jsx(
|
|
2979
3131
|
Text,
|
|
2980
3132
|
{
|
|
2981
3133
|
style: {
|
|
@@ -2989,7 +3141,7 @@ function MessageBubble({
|
|
|
2989
3141
|
children: "Message deleted"
|
|
2990
3142
|
}
|
|
2991
3143
|
) }) : null,
|
|
2992
|
-
hasBody && jumboCount > 0 ? /* @__PURE__ */ jsx(View, { style:
|
|
3144
|
+
hasBody && jumboCount > 0 ? /* @__PURE__ */ jsx(View, { style: styles17.jumboBlock, children: /* @__PURE__ */ jsx(
|
|
2993
3145
|
Text,
|
|
2994
3146
|
{
|
|
2995
3147
|
style: { fontSize: emojiFontSize(jumboCount), lineHeight: emojiFontSize(jumboCount) + 8 },
|
|
@@ -2999,7 +3151,7 @@ function MessageBubble({
|
|
|
2999
3151
|
hasBody && jumboCount === 0 ? /* @__PURE__ */ jsxs(
|
|
3000
3152
|
View,
|
|
3001
3153
|
{
|
|
3002
|
-
style: [
|
|
3154
|
+
style: [styles17.textBlock, sectionAbove && styles17.textBlockAfter],
|
|
3003
3155
|
onLayout: inlineMeta ? (e) => setTextBoxWidth(e.nativeEvent.layout.width - 24) : void 0,
|
|
3004
3156
|
children: [
|
|
3005
3157
|
markdown && !inlineMeta ? renderMarkdown(truncated, {
|
|
@@ -3033,7 +3185,7 @@ function MessageBubble({
|
|
|
3033
3185
|
Text,
|
|
3034
3186
|
{
|
|
3035
3187
|
style: [
|
|
3036
|
-
|
|
3188
|
+
styles17.readMore,
|
|
3037
3189
|
{ color: isSelf ? theme.colors.onBrand : theme.colors.brand }
|
|
3038
3190
|
],
|
|
3039
3191
|
children: expanded ? "Show less" : "Read more"
|
|
@@ -3044,7 +3196,7 @@ function MessageBubble({
|
|
|
3044
3196
|
}
|
|
3045
3197
|
) : null,
|
|
3046
3198
|
!inlineMeta && !metaOverlay && jumboCount === 0 ? metaRow("block") : null,
|
|
3047
|
-
actionsTrigger ? /* @__PURE__ */ jsx(View, { style:
|
|
3199
|
+
actionsTrigger ? /* @__PURE__ */ jsx(View, { style: styles17.actionsSlot, children: actionsTrigger }) : null
|
|
3048
3200
|
]
|
|
3049
3201
|
}
|
|
3050
3202
|
),
|
|
@@ -3069,15 +3221,15 @@ function QuotedCard({
|
|
|
3069
3221
|
onPress,
|
|
3070
3222
|
disabled: !onPress,
|
|
3071
3223
|
style: [
|
|
3072
|
-
|
|
3224
|
+
styles17.quoted,
|
|
3073
3225
|
{
|
|
3074
3226
|
backgroundColor: bg,
|
|
3075
3227
|
borderLeftColor: accent
|
|
3076
3228
|
}
|
|
3077
3229
|
],
|
|
3078
3230
|
children: [
|
|
3079
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3080
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3231
|
+
/* @__PURE__ */ jsx(Text, { style: [styles17.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
|
|
3232
|
+
/* @__PURE__ */ jsx(Text, { style: [styles17.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
|
|
3081
3233
|
]
|
|
3082
3234
|
}
|
|
3083
3235
|
);
|
|
@@ -3109,7 +3261,7 @@ function formatTime2(iso) {
|
|
|
3109
3261
|
function isSameDay(a, b) {
|
|
3110
3262
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
3111
3263
|
}
|
|
3112
|
-
var
|
|
3264
|
+
var styles17 = StyleSheet.create({
|
|
3113
3265
|
wrap: {
|
|
3114
3266
|
marginBottom: 2
|
|
3115
3267
|
},
|
|
@@ -3236,7 +3388,7 @@ function ReactionStrip({
|
|
|
3236
3388
|
});
|
|
3237
3389
|
const entries = Object.entries(reactions);
|
|
3238
3390
|
if (entries.length === 0) return null;
|
|
3239
|
-
return /* @__PURE__ */ jsx(View, { style:
|
|
3391
|
+
return /* @__PURE__ */ jsx(View, { style: styles18.strip, children: entries.map(([emoji, userIds]) => {
|
|
3240
3392
|
const userArr = Array.isArray(userIds) ? userIds : [];
|
|
3241
3393
|
const meReacted = meId !== null && userArr.includes(meId);
|
|
3242
3394
|
return /* @__PURE__ */ jsxs(
|
|
@@ -3244,7 +3396,7 @@ function ReactionStrip({
|
|
|
3244
3396
|
{
|
|
3245
3397
|
onPress: () => meReacted ? removeReaction(emoji) : addReaction(emoji),
|
|
3246
3398
|
style: [
|
|
3247
|
-
|
|
3399
|
+
styles18.chip,
|
|
3248
3400
|
{
|
|
3249
3401
|
backgroundColor: meReacted ? theme.colors.brandSoft : theme.colors.surface2,
|
|
3250
3402
|
borderColor: meReacted ? theme.colors.brand : theme.colors.border,
|
|
@@ -3253,12 +3405,12 @@ function ReactionStrip({
|
|
|
3253
3405
|
}
|
|
3254
3406
|
],
|
|
3255
3407
|
children: [
|
|
3256
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
3408
|
+
/* @__PURE__ */ jsx(Text, { style: styles18.emoji, children: emoji }),
|
|
3257
3409
|
/* @__PURE__ */ jsx(
|
|
3258
3410
|
Text,
|
|
3259
3411
|
{
|
|
3260
3412
|
style: [
|
|
3261
|
-
|
|
3413
|
+
styles18.count,
|
|
3262
3414
|
{
|
|
3263
3415
|
color: meReacted ? theme.colors.brand : theme.colors.ink2,
|
|
3264
3416
|
fontWeight: meReacted ? "700" : "600"
|
|
@@ -3280,33 +3432,51 @@ function ReactionPicker({
|
|
|
3280
3432
|
emojis = DEFAULT_EMOJIS
|
|
3281
3433
|
}) {
|
|
3282
3434
|
const theme = usePoolseTheme();
|
|
3283
|
-
|
|
3284
|
-
|
|
3435
|
+
const insets = useSafeInsets();
|
|
3436
|
+
return /* @__PURE__ */ jsx(
|
|
3437
|
+
Modal,
|
|
3285
3438
|
{
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
theme.shadows.lg
|
|
3293
|
-
],
|
|
3294
|
-
children: emojis.map((emoji) => /* @__PURE__ */ jsx(
|
|
3439
|
+
visible,
|
|
3440
|
+
transparent: true,
|
|
3441
|
+
animationType: "fade",
|
|
3442
|
+
onRequestClose: onClose,
|
|
3443
|
+
...EDGE_TO_EDGE_MODAL,
|
|
3444
|
+
children: /* @__PURE__ */ jsx(
|
|
3295
3445
|
Pressable,
|
|
3296
3446
|
{
|
|
3297
|
-
style:
|
|
3298
|
-
onPress:
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3447
|
+
style: [styles18.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
|
|
3448
|
+
onPress: onClose,
|
|
3449
|
+
children: /* @__PURE__ */ jsx(
|
|
3450
|
+
View,
|
|
3451
|
+
{
|
|
3452
|
+
style: [
|
|
3453
|
+
styles18.sheet,
|
|
3454
|
+
{
|
|
3455
|
+
backgroundColor: theme.colors.surface,
|
|
3456
|
+
borderRadius: theme.radii.lg
|
|
3457
|
+
},
|
|
3458
|
+
theme.shadows.lg
|
|
3459
|
+
],
|
|
3460
|
+
children: emojis.map((emoji) => /* @__PURE__ */ jsx(
|
|
3461
|
+
Pressable,
|
|
3462
|
+
{
|
|
3463
|
+
style: styles18.emojiBtn,
|
|
3464
|
+
onPress: () => {
|
|
3465
|
+
onPick(emoji);
|
|
3466
|
+
onClose();
|
|
3467
|
+
},
|
|
3468
|
+
children: /* @__PURE__ */ jsx(Text, { style: styles18.bigEmoji, children: emoji })
|
|
3469
|
+
},
|
|
3470
|
+
emoji
|
|
3471
|
+
))
|
|
3472
|
+
}
|
|
3473
|
+
)
|
|
3474
|
+
}
|
|
3475
|
+
)
|
|
3306
3476
|
}
|
|
3307
|
-
)
|
|
3477
|
+
);
|
|
3308
3478
|
}
|
|
3309
|
-
var
|
|
3479
|
+
var styles18 = StyleSheet.create({
|
|
3310
3480
|
strip: {
|
|
3311
3481
|
flexDirection: "row",
|
|
3312
3482
|
flexWrap: "wrap",
|
|
@@ -3366,7 +3536,14 @@ var SWIPE_REPLY_THRESHOLD = 50;
|
|
|
3366
3536
|
function MessageRow(props) {
|
|
3367
3537
|
const callLog = callLogDisplayFor(props.msg, props.meId);
|
|
3368
3538
|
if (callLog !== void 0) {
|
|
3369
|
-
return callLog ? /* @__PURE__ */ jsx(
|
|
3539
|
+
return callLog ? /* @__PURE__ */ jsx(
|
|
3540
|
+
CallLogRow,
|
|
3541
|
+
{
|
|
3542
|
+
msg: props.msg,
|
|
3543
|
+
meId: props.meId,
|
|
3544
|
+
...props.onCallBack ? { onCallBack: props.onCallBack } : {}
|
|
3545
|
+
}
|
|
3546
|
+
) : null;
|
|
3370
3547
|
}
|
|
3371
3548
|
return /* @__PURE__ */ jsx(BubbleMessageRow, { ...props });
|
|
3372
3549
|
}
|
|
@@ -3481,15 +3658,15 @@ function BubbleMessageRow({
|
|
|
3481
3658
|
View,
|
|
3482
3659
|
{
|
|
3483
3660
|
style: [
|
|
3484
|
-
|
|
3661
|
+
styles19.row,
|
|
3485
3662
|
{ alignSelf: isSelf ? "flex-end" : "flex-start" },
|
|
3486
3663
|
// Lift this row above the dim backdrop the parent renders
|
|
3487
3664
|
// during edit mode. zIndex covers iOS / web; elevation does
|
|
3488
3665
|
// the equivalent on Android.
|
|
3489
|
-
isEditing ?
|
|
3666
|
+
isEditing ? styles19.rowEditing : null
|
|
3490
3667
|
],
|
|
3491
3668
|
children: [
|
|
3492
|
-
showAvatarSlot ? /* @__PURE__ */ jsx(View, { style:
|
|
3669
|
+
showAvatarSlot ? /* @__PURE__ */ jsx(View, { style: styles19.avatarSlot, children: showAvatarRender ? /* @__PURE__ */ jsx(
|
|
3493
3670
|
Avatar,
|
|
3494
3671
|
{
|
|
3495
3672
|
src: avatarUrl ?? null,
|
|
@@ -3498,14 +3675,14 @@ function BubbleMessageRow({
|
|
|
3498
3675
|
size: "sm"
|
|
3499
3676
|
}
|
|
3500
3677
|
) : null }) : null,
|
|
3501
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3678
|
+
/* @__PURE__ */ jsxs(View, { style: styles19.bubbleCol, children: [
|
|
3502
3679
|
swipeEnabled ? /* @__PURE__ */ jsx(
|
|
3503
3680
|
Animated.View,
|
|
3504
3681
|
{
|
|
3505
3682
|
pointerEvents: "none",
|
|
3506
3683
|
style: [
|
|
3507
|
-
|
|
3508
|
-
isSelf ?
|
|
3684
|
+
styles19.replyHint,
|
|
3685
|
+
isSelf ? styles19.replyHintRight : styles19.replyHintLeft,
|
|
3509
3686
|
{
|
|
3510
3687
|
opacity: replyIconOpacity,
|
|
3511
3688
|
transform: [{ scale: replyIconScale }],
|
|
@@ -3551,13 +3728,13 @@ function BubbleMessageRow({
|
|
|
3551
3728
|
)
|
|
3552
3729
|
}
|
|
3553
3730
|
),
|
|
3554
|
-
threads && (msg.reply_count ?? 0) > 0 && onOpenThread ? /* @__PURE__ */ jsx(Pressable, { onPress: onOpenThread, style:
|
|
3731
|
+
threads && (msg.reply_count ?? 0) > 0 && onOpenThread ? /* @__PURE__ */ jsx(Pressable, { onPress: onOpenThread, style: styles19.threadPill, children: /* @__PURE__ */ jsxs(Text, { style: [styles19.threadPillText, { color: theme.colors.brand }], children: [
|
|
3555
3732
|
"\u{1F4AC} ",
|
|
3556
3733
|
msg.reply_count,
|
|
3557
3734
|
" ",
|
|
3558
3735
|
msg.reply_count === 1 ? "reply" : "replies"
|
|
3559
3736
|
] }) }) : null,
|
|
3560
|
-
reactions ? /* @__PURE__ */ jsx(View, { style: [
|
|
3737
|
+
reactions ? /* @__PURE__ */ jsx(View, { style: [styles19.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsx(
|
|
3561
3738
|
ReactionStrip,
|
|
3562
3739
|
{
|
|
3563
3740
|
messageId: msg.id,
|
|
@@ -3616,7 +3793,7 @@ function BubbleMessageRow({
|
|
|
3616
3793
|
}
|
|
3617
3794
|
);
|
|
3618
3795
|
}
|
|
3619
|
-
var
|
|
3796
|
+
var styles19 = StyleSheet.create({
|
|
3620
3797
|
row: {
|
|
3621
3798
|
flexDirection: "row",
|
|
3622
3799
|
alignItems: "flex-end",
|
|
@@ -3691,7 +3868,7 @@ function ThreadView({
|
|
|
3691
3868
|
transparent: true,
|
|
3692
3869
|
animationType: "slide",
|
|
3693
3870
|
onRequestClose: onClose,
|
|
3694
|
-
|
|
3871
|
+
...EDGE_TO_EDGE_MODAL,
|
|
3695
3872
|
children: /* @__PURE__ */ jsx(UploadProvider, { children: /* @__PURE__ */ jsx(
|
|
3696
3873
|
ThreadSheet,
|
|
3697
3874
|
{
|
|
@@ -3723,8 +3900,14 @@ function ThreadSheet({
|
|
|
3723
3900
|
loadMore,
|
|
3724
3901
|
hasMore
|
|
3725
3902
|
} = useThread(conversationId, rootMessage.id);
|
|
3726
|
-
const
|
|
3727
|
-
const
|
|
3903
|
+
const insets = useSafeInsets();
|
|
3904
|
+
const { height: windowHeight } = useWindowDimensions();
|
|
3905
|
+
const [rootHeight, setRootHeight] = useState(0);
|
|
3906
|
+
const screenHeight = rootHeight || windowHeight;
|
|
3907
|
+
const sheetHeight = Math.min(
|
|
3908
|
+
Math.round(screenHeight * SHEET_HEIGHT_FRACTION),
|
|
3909
|
+
screenHeight - insets.top - 8
|
|
3910
|
+
);
|
|
3728
3911
|
const gutter = screenHeight - sheetHeight;
|
|
3729
3912
|
const { translateY, panHandlers } = useDismissableSheet({ onClose, sheetHeight });
|
|
3730
3913
|
const [pickerOpen, setPickerOpen] = useState(false);
|
|
@@ -3776,93 +3959,102 @@ function ThreadSheet({
|
|
|
3776
3959
|
),
|
|
3777
3960
|
[rootMessage, meId, labelFor, avatarFor]
|
|
3778
3961
|
);
|
|
3779
|
-
return /* @__PURE__ */ jsxs(
|
|
3780
|
-
|
|
3781
|
-
|
|
3782
|
-
|
|
3783
|
-
|
|
3784
|
-
|
|
3785
|
-
|
|
3962
|
+
return /* @__PURE__ */ jsxs(
|
|
3963
|
+
View,
|
|
3964
|
+
{
|
|
3965
|
+
style: styles20.modalRoot,
|
|
3966
|
+
onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
|
|
3967
|
+
children: [
|
|
3968
|
+
/* @__PURE__ */ jsx(Pressable, { style: styles20.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
|
|
3969
|
+
/* @__PURE__ */ jsxs(
|
|
3970
|
+
Animated.View,
|
|
3786
3971
|
{
|
|
3787
|
-
|
|
3788
|
-
|
|
3789
|
-
|
|
3790
|
-
|
|
3791
|
-
|
|
3792
|
-
|
|
3793
|
-
|
|
3794
|
-
|
|
3795
|
-
|
|
3796
|
-
|
|
3797
|
-
|
|
3798
|
-
|
|
3799
|
-
|
|
3800
|
-
|
|
3972
|
+
style: [
|
|
3973
|
+
styles20.sheet,
|
|
3974
|
+
{
|
|
3975
|
+
height: sheetHeight,
|
|
3976
|
+
backgroundColor: theme.colors.paper,
|
|
3977
|
+
borderTopLeftRadius: theme.radii.xl,
|
|
3978
|
+
borderTopRightRadius: theme.radii.xl,
|
|
3979
|
+
paddingLeft: insets.left,
|
|
3980
|
+
paddingRight: insets.right,
|
|
3981
|
+
transform: [{ translateY }]
|
|
3982
|
+
},
|
|
3983
|
+
theme.shadows.lg
|
|
3984
|
+
],
|
|
3985
|
+
children: [
|
|
3986
|
+
/* @__PURE__ */ jsxs(View, { ...panHandlers, children: [
|
|
3987
|
+
/* @__PURE__ */ jsx(View, { style: styles20.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles20.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
|
|
3988
|
+
/* @__PURE__ */ jsxs(View, { style: [styles20.header, { borderBottomColor: theme.colors.border }], children: [
|
|
3989
|
+
/* @__PURE__ */ jsx(
|
|
3990
|
+
Pressable,
|
|
3991
|
+
{
|
|
3992
|
+
onPress: onClose,
|
|
3993
|
+
hitSlop: 16,
|
|
3994
|
+
style: [styles20.closeBtn, { backgroundColor: theme.colors.surface2 }],
|
|
3995
|
+
accessibilityLabel: "Close thread",
|
|
3996
|
+
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
|
|
3997
|
+
}
|
|
3998
|
+
),
|
|
3999
|
+
/* @__PURE__ */ jsx(
|
|
4000
|
+
Text,
|
|
4001
|
+
{
|
|
4002
|
+
style: [
|
|
4003
|
+
styles20.title,
|
|
4004
|
+
{ color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
|
|
4005
|
+
],
|
|
4006
|
+
children: "Thread"
|
|
4007
|
+
}
|
|
4008
|
+
)
|
|
4009
|
+
] })
|
|
4010
|
+
] }),
|
|
4011
|
+
/* @__PURE__ */ jsxs(
|
|
4012
|
+
KeyboardAvoidingView,
|
|
3801
4013
|
{
|
|
3802
|
-
|
|
3803
|
-
|
|
3804
|
-
|
|
3805
|
-
|
|
3806
|
-
|
|
4014
|
+
style: styles20.kavBody,
|
|
4015
|
+
behavior: "padding",
|
|
4016
|
+
keyboardVerticalOffset: gutter,
|
|
4017
|
+
children: [
|
|
4018
|
+
/* @__PURE__ */ jsx(View, { style: [styles20.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
|
|
4019
|
+
/* @__PURE__ */ jsx(View, { style: styles20.listWrap, children: /* @__PURE__ */ jsx(
|
|
4020
|
+
MessageList,
|
|
4021
|
+
{
|
|
4022
|
+
messages: replies,
|
|
4023
|
+
hasMore,
|
|
4024
|
+
onLoadMore: loadMore,
|
|
4025
|
+
renderItem: renderReply
|
|
4026
|
+
}
|
|
4027
|
+
) }),
|
|
4028
|
+
/* @__PURE__ */ jsx(
|
|
4029
|
+
MessageComposer,
|
|
4030
|
+
{
|
|
4031
|
+
onSend: async (body, opts) => {
|
|
4032
|
+
await sendReply({ body, ...opts });
|
|
4033
|
+
},
|
|
4034
|
+
placeholder: "Reply to thread\u2026",
|
|
4035
|
+
attachments: true,
|
|
4036
|
+
onAttachPress: () => setPickerOpen(true),
|
|
4037
|
+
editingMessage,
|
|
4038
|
+
onCancelEdit: () => setEditingId(null),
|
|
4039
|
+
onSaveEdit: async (body) => {
|
|
4040
|
+
if (!editingId) return;
|
|
4041
|
+
await edit(editingId, body);
|
|
4042
|
+
setEditingId(null);
|
|
4043
|
+
}
|
|
4044
|
+
}
|
|
4045
|
+
)
|
|
4046
|
+
]
|
|
3807
4047
|
}
|
|
3808
4048
|
),
|
|
3809
|
-
/* @__PURE__ */ jsx(
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
3814
|
-
|
|
3815
|
-
|
|
3816
|
-
children: "Thread"
|
|
3817
|
-
}
|
|
3818
|
-
)
|
|
3819
|
-
] })
|
|
3820
|
-
] }),
|
|
3821
|
-
/* @__PURE__ */ jsxs(
|
|
3822
|
-
KeyboardAvoidingView,
|
|
3823
|
-
{
|
|
3824
|
-
style: styles19.kavBody,
|
|
3825
|
-
behavior: Platform.OS === "ios" ? "padding" : "height",
|
|
3826
|
-
keyboardVerticalOffset: Platform.OS === "ios" ? gutter : 0,
|
|
3827
|
-
children: [
|
|
3828
|
-
/* @__PURE__ */ jsx(View, { style: [styles19.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
|
|
3829
|
-
/* @__PURE__ */ jsx(View, { style: styles19.listWrap, children: /* @__PURE__ */ jsx(
|
|
3830
|
-
MessageList,
|
|
3831
|
-
{
|
|
3832
|
-
messages: replies,
|
|
3833
|
-
hasMore,
|
|
3834
|
-
onLoadMore: loadMore,
|
|
3835
|
-
renderItem: renderReply
|
|
3836
|
-
}
|
|
3837
|
-
) }),
|
|
3838
|
-
/* @__PURE__ */ jsx(
|
|
3839
|
-
MessageComposer,
|
|
3840
|
-
{
|
|
3841
|
-
onSend: async (body, opts) => {
|
|
3842
|
-
await sendReply({ body, ...opts });
|
|
3843
|
-
},
|
|
3844
|
-
placeholder: "Reply to thread\u2026",
|
|
3845
|
-
attachments: true,
|
|
3846
|
-
onAttachPress: () => setPickerOpen(true),
|
|
3847
|
-
editingMessage,
|
|
3848
|
-
onCancelEdit: () => setEditingId(null),
|
|
3849
|
-
onSaveEdit: async (body) => {
|
|
3850
|
-
if (!editingId) return;
|
|
3851
|
-
await edit(editingId, body);
|
|
3852
|
-
setEditingId(null);
|
|
3853
|
-
}
|
|
3854
|
-
}
|
|
3855
|
-
)
|
|
3856
|
-
]
|
|
3857
|
-
}
|
|
3858
|
-
),
|
|
3859
|
-
/* @__PURE__ */ jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
|
|
3860
|
-
]
|
|
3861
|
-
}
|
|
3862
|
-
)
|
|
3863
|
-
] });
|
|
4049
|
+
/* @__PURE__ */ jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
|
|
4050
|
+
]
|
|
4051
|
+
}
|
|
4052
|
+
)
|
|
4053
|
+
]
|
|
4054
|
+
}
|
|
4055
|
+
);
|
|
3864
4056
|
}
|
|
3865
|
-
var
|
|
4057
|
+
var styles20 = StyleSheet.create({
|
|
3866
4058
|
modalRoot: {
|
|
3867
4059
|
flex: 1,
|
|
3868
4060
|
justifyContent: "flex-end"
|
|
@@ -3934,7 +4126,7 @@ function TypingIndicator({ typing, labelFor }) {
|
|
|
3934
4126
|
const ids = Array.from(typing);
|
|
3935
4127
|
const isTyping = ids.length > 0;
|
|
3936
4128
|
if (!isTyping) return /* @__PURE__ */ jsx(View, { style: { height: 0 } });
|
|
3937
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
4129
|
+
return /* @__PURE__ */ jsxs(View, { style: styles21.row, children: [
|
|
3938
4130
|
/* @__PURE__ */ jsx(TypingDots, {}),
|
|
3939
4131
|
/* @__PURE__ */ jsx(TypingLabel, { ids, ...labelFor ? { labelFor } : {} })
|
|
3940
4132
|
] });
|
|
@@ -3979,7 +4171,7 @@ function TypingDots() {
|
|
|
3979
4171
|
],
|
|
3980
4172
|
opacity: val.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] })
|
|
3981
4173
|
});
|
|
3982
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
4174
|
+
return /* @__PURE__ */ jsxs(View, { style: styles21.dotsWrap, children: [
|
|
3983
4175
|
/* @__PURE__ */ jsx(Animated.View, { style: dot(a) }),
|
|
3984
4176
|
/* @__PURE__ */ jsx(Animated.View, { style: dot(b) }),
|
|
3985
4177
|
/* @__PURE__ */ jsx(Animated.View, { style: dot(c) })
|
|
@@ -3995,9 +4187,9 @@ function TypingLabel({
|
|
|
3995
4187
|
const name1 = useDisplayName(id1, labelFor);
|
|
3996
4188
|
const name2 = useDisplayName(id2, labelFor);
|
|
3997
4189
|
const text = ids.length === 1 ? `${name1} is typing` : ids.length === 2 ? `${name1} and ${name2} are typing` : `${ids.length} people are typing`;
|
|
3998
|
-
return /* @__PURE__ */ jsx(Text, { style: [
|
|
4190
|
+
return /* @__PURE__ */ jsx(Text, { style: [styles21.label, { color: theme.colors.ink2, fontFamily: theme.type.fontBody }], children: text });
|
|
3999
4191
|
}
|
|
4000
|
-
var
|
|
4192
|
+
var styles21 = StyleSheet.create({
|
|
4001
4193
|
row: {
|
|
4002
4194
|
flexDirection: "row",
|
|
4003
4195
|
alignItems: "center",
|
|
@@ -4037,7 +4229,10 @@ function ConversationView({
|
|
|
4037
4229
|
avatars = "auto",
|
|
4038
4230
|
onMarkedRead,
|
|
4039
4231
|
onSent,
|
|
4040
|
-
keyboardOffset = 0
|
|
4232
|
+
keyboardOffset = 0,
|
|
4233
|
+
onCallBack,
|
|
4234
|
+
onJoinCall,
|
|
4235
|
+
currentCallId = null
|
|
4041
4236
|
}) {
|
|
4042
4237
|
const theme = usePoolseTheme();
|
|
4043
4238
|
const { me } = useMe();
|
|
@@ -4146,11 +4341,13 @@ function ConversationView({
|
|
|
4146
4341
|
showAvatar: showAvatars,
|
|
4147
4342
|
maxBodyLength,
|
|
4148
4343
|
groupPosition,
|
|
4149
|
-
markdown
|
|
4344
|
+
markdown,
|
|
4345
|
+
...onCallBack ? { onCallBack } : {}
|
|
4150
4346
|
}
|
|
4151
4347
|
);
|
|
4152
4348
|
},
|
|
4153
4349
|
[
|
|
4350
|
+
onCallBack,
|
|
4154
4351
|
renderMessage,
|
|
4155
4352
|
meId,
|
|
4156
4353
|
readReceipts,
|
|
@@ -4242,12 +4439,21 @@ function ConversationView({
|
|
|
4242
4439
|
return /* @__PURE__ */ jsx(UploadProvider, { children: /* @__PURE__ */ jsxs(
|
|
4243
4440
|
KeyboardAvoidingView,
|
|
4244
4441
|
{
|
|
4245
|
-
style: [
|
|
4442
|
+
style: [styles22.root, { backgroundColor: theme.colors.paper }],
|
|
4246
4443
|
behavior: Platform.OS === "ios" ? "padding" : "height",
|
|
4247
4444
|
keyboardVerticalOffset: keyboardOffset,
|
|
4248
4445
|
children: [
|
|
4249
4446
|
headerNode,
|
|
4250
|
-
/* @__PURE__ */
|
|
4447
|
+
onJoinCall ? /* @__PURE__ */ jsx(
|
|
4448
|
+
JoinBanner,
|
|
4449
|
+
{
|
|
4450
|
+
conversationId,
|
|
4451
|
+
meId,
|
|
4452
|
+
currentCallId,
|
|
4453
|
+
onJoin: onJoinCall
|
|
4454
|
+
}
|
|
4455
|
+
) : null,
|
|
4456
|
+
/* @__PURE__ */ jsxs(View, { style: styles22.listWrap, children: [
|
|
4251
4457
|
/* @__PURE__ */ jsx(
|
|
4252
4458
|
MessageList,
|
|
4253
4459
|
{
|
|
@@ -4265,7 +4471,7 @@ function ConversationView({
|
|
|
4265
4471
|
editingId ? /* @__PURE__ */ jsx(
|
|
4266
4472
|
Pressable,
|
|
4267
4473
|
{
|
|
4268
|
-
style:
|
|
4474
|
+
style: styles22.editBackdrop,
|
|
4269
4475
|
onPress: () => setEditingId(null),
|
|
4270
4476
|
accessibilityLabel: "Cancel editing"
|
|
4271
4477
|
}
|
|
@@ -4287,6 +4493,17 @@ function ConversationView({
|
|
|
4287
4493
|
}
|
|
4288
4494
|
) });
|
|
4289
4495
|
}
|
|
4496
|
+
function JoinBanner({
|
|
4497
|
+
conversationId,
|
|
4498
|
+
meId,
|
|
4499
|
+
currentCallId,
|
|
4500
|
+
onJoin
|
|
4501
|
+
}) {
|
|
4502
|
+
const { call, participantIds } = useLiveCall(conversationId);
|
|
4503
|
+
if (!call || call.id === currentCallId) return null;
|
|
4504
|
+
if (meId !== null && participantIds.includes(meId)) return null;
|
|
4505
|
+
return /* @__PURE__ */ jsx(LiveCallBanner, { call, inCall: participantIds.length, onJoin });
|
|
4506
|
+
}
|
|
4290
4507
|
function readStateForMessage(msg, members, meId, sequenceByMessageId) {
|
|
4291
4508
|
const otherMembers = members.filter((m) => m.user_id !== meId);
|
|
4292
4509
|
if (otherMembers.length === 0) return "sent";
|
|
@@ -4300,7 +4517,7 @@ function readStateForMessage(msg, members, meId, sequenceByMessageId) {
|
|
|
4300
4517
|
});
|
|
4301
4518
|
return anyRead ? "read" : "sent";
|
|
4302
4519
|
}
|
|
4303
|
-
var
|
|
4520
|
+
var styles22 = StyleSheet.create({
|
|
4304
4521
|
root: {
|
|
4305
4522
|
flex: 1
|
|
4306
4523
|
},
|
|
@@ -4331,7 +4548,12 @@ function UserPickerSheet({
|
|
|
4331
4548
|
const [query, setQuery] = useState("");
|
|
4332
4549
|
const [selectedIds, setSelectedIds] = useState([]);
|
|
4333
4550
|
const [groupName, setGroupName] = useState("");
|
|
4334
|
-
const
|
|
4551
|
+
const insets = useSafeInsets();
|
|
4552
|
+
const keyboardOpen = useKeyboardOpen();
|
|
4553
|
+
const { height: windowHeight } = useWindowDimensions();
|
|
4554
|
+
const [rootHeight, setRootHeight] = useState(0);
|
|
4555
|
+
const screenHeight = rootHeight || windowHeight;
|
|
4556
|
+
const sheetHeight = Math.min(Math.round(screenHeight * 0.85), screenHeight - insets.top - 8);
|
|
4335
4557
|
const { translateY, panHandlers } = useDismissableSheet({
|
|
4336
4558
|
onClose: () => {
|
|
4337
4559
|
setQuery("");
|
|
@@ -4339,7 +4561,7 @@ function UserPickerSheet({
|
|
|
4339
4561
|
setGroupName("");
|
|
4340
4562
|
onClose();
|
|
4341
4563
|
},
|
|
4342
|
-
sheetHeight
|
|
4564
|
+
sheetHeight
|
|
4343
4565
|
});
|
|
4344
4566
|
const excludeSet = useMemo(() => new Set(excludeIds ?? []), [excludeIds]);
|
|
4345
4567
|
const filtered = useMemo(() => {
|
|
@@ -4381,142 +4603,164 @@ function UserPickerSheet({
|
|
|
4381
4603
|
transparent: true,
|
|
4382
4604
|
animationType: "slide",
|
|
4383
4605
|
onRequestClose: handleClose,
|
|
4384
|
-
|
|
4385
|
-
children: /* @__PURE__ */ jsxs(
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4606
|
+
...EDGE_TO_EDGE_MODAL,
|
|
4607
|
+
children: /* @__PURE__ */ jsxs(
|
|
4608
|
+
View,
|
|
4609
|
+
{
|
|
4610
|
+
style: styles23.modalRoot,
|
|
4611
|
+
onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
|
|
4612
|
+
children: [
|
|
4613
|
+
/* @__PURE__ */ jsx(Pressable, { style: styles23.backdrop, onPress: handleClose }),
|
|
4614
|
+
/* @__PURE__ */ jsx(
|
|
4615
|
+
Animated.View,
|
|
4392
4616
|
{
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
borderTopRightRadius: theme.radii.xl,
|
|
4396
|
-
transform: [{ translateY }]
|
|
4397
|
-
},
|
|
4398
|
-
theme.shadows.lg
|
|
4399
|
-
],
|
|
4400
|
-
children: [
|
|
4401
|
-
/* @__PURE__ */ jsx(View, { ...panHandlers, style: styles22.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles22.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
|
|
4402
|
-
/* @__PURE__ */ jsxs(View, { style: styles22.header, children: [
|
|
4403
|
-
/* @__PURE__ */ jsx(
|
|
4404
|
-
Pressable,
|
|
4405
|
-
{
|
|
4406
|
-
onPress: handleClose,
|
|
4407
|
-
hitSlop: 16,
|
|
4408
|
-
style: [styles22.closeBtn, { backgroundColor: theme.colors.surface2 }],
|
|
4409
|
-
accessibilityLabel: "Close picker",
|
|
4410
|
-
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
|
|
4411
|
-
}
|
|
4412
|
-
),
|
|
4413
|
-
/* @__PURE__ */ jsx(
|
|
4414
|
-
Text,
|
|
4617
|
+
style: [
|
|
4618
|
+
styles23.sheet,
|
|
4415
4619
|
{
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4620
|
+
backgroundColor: theme.colors.paper,
|
|
4621
|
+
borderTopLeftRadius: theme.radii.xl,
|
|
4622
|
+
borderTopRightRadius: theme.radii.xl,
|
|
4623
|
+
height: sheetHeight,
|
|
4624
|
+
// Last row clears the nav bar — unless the keyboard is
|
|
4625
|
+
// covering it, where the inset would just be a gap.
|
|
4626
|
+
paddingBottom: keyboardOpen ? 0 : insets.bottom,
|
|
4627
|
+
paddingLeft: insets.left,
|
|
4628
|
+
paddingRight: insets.right,
|
|
4629
|
+
transform: [{ translateY }]
|
|
4630
|
+
},
|
|
4631
|
+
theme.shadows.lg
|
|
4632
|
+
],
|
|
4633
|
+
children: /* @__PURE__ */ jsxs(
|
|
4634
|
+
KeyboardAvoidingView,
|
|
4426
4635
|
{
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
|
|
4432
|
-
{
|
|
4433
|
-
|
|
4434
|
-
|
|
4435
|
-
|
|
4436
|
-
|
|
4437
|
-
|
|
4438
|
-
|
|
4439
|
-
|
|
4440
|
-
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
4454
|
-
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
|
|
4460
|
-
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
user: item,
|
|
4502
|
-
selected: selectedIds.includes(item.externalId),
|
|
4503
|
-
isGroup,
|
|
4504
|
-
onPress: () => {
|
|
4505
|
-
if (isGroup) toggle(item.externalId);
|
|
4506
|
-
else {
|
|
4507
|
-
onPickDirect?.(item.externalId);
|
|
4508
|
-
reset();
|
|
4509
|
-
onClose();
|
|
4636
|
+
style: styles23.kav,
|
|
4637
|
+
behavior: "padding",
|
|
4638
|
+
keyboardVerticalOffset: screenHeight - sheetHeight,
|
|
4639
|
+
children: [
|
|
4640
|
+
/* @__PURE__ */ jsx(View, { ...panHandlers, style: styles23.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles23.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
|
|
4641
|
+
/* @__PURE__ */ jsxs(View, { style: styles23.header, children: [
|
|
4642
|
+
/* @__PURE__ */ jsx(
|
|
4643
|
+
Pressable,
|
|
4644
|
+
{
|
|
4645
|
+
onPress: handleClose,
|
|
4646
|
+
hitSlop: 16,
|
|
4647
|
+
style: [styles23.closeBtn, { backgroundColor: theme.colors.surface2 }],
|
|
4648
|
+
accessibilityLabel: "Close picker",
|
|
4649
|
+
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
|
|
4650
|
+
}
|
|
4651
|
+
),
|
|
4652
|
+
/* @__PURE__ */ jsx(
|
|
4653
|
+
Text,
|
|
4654
|
+
{
|
|
4655
|
+
style: [
|
|
4656
|
+
styles23.title,
|
|
4657
|
+
{ color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
|
|
4658
|
+
],
|
|
4659
|
+
numberOfLines: 1,
|
|
4660
|
+
children: heading
|
|
4661
|
+
}
|
|
4662
|
+
),
|
|
4663
|
+
isGroup ? /* @__PURE__ */ jsx(
|
|
4664
|
+
Pressable,
|
|
4665
|
+
{
|
|
4666
|
+
onPress: handleCreate,
|
|
4667
|
+
disabled: !canCreate,
|
|
4668
|
+
hitSlop: 6,
|
|
4669
|
+
style: [
|
|
4670
|
+
styles23.createBtn,
|
|
4671
|
+
{
|
|
4672
|
+
backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
|
|
4673
|
+
opacity: canCreate ? 1 : 0.6
|
|
4674
|
+
}
|
|
4675
|
+
],
|
|
4676
|
+
children: /* @__PURE__ */ jsxs(
|
|
4677
|
+
Text,
|
|
4678
|
+
{
|
|
4679
|
+
style: {
|
|
4680
|
+
color: canCreate ? theme.colors.onBrand : theme.colors.ink3,
|
|
4681
|
+
fontWeight: "700",
|
|
4682
|
+
fontSize: 13
|
|
4683
|
+
},
|
|
4684
|
+
children: [
|
|
4685
|
+
"Create",
|
|
4686
|
+
selectedIds.length > 0 ? ` (${selectedIds.length})` : ""
|
|
4687
|
+
]
|
|
4688
|
+
}
|
|
4689
|
+
)
|
|
4690
|
+
}
|
|
4691
|
+
) : null
|
|
4692
|
+
] }),
|
|
4693
|
+
isGroup ? /* @__PURE__ */ jsx(
|
|
4694
|
+
TextInput,
|
|
4695
|
+
{
|
|
4696
|
+
placeholder: "Group name",
|
|
4697
|
+
placeholderTextColor: theme.colors.ink3,
|
|
4698
|
+
value: groupName,
|
|
4699
|
+
onChangeText: setGroupName,
|
|
4700
|
+
style: [
|
|
4701
|
+
styles23.groupNameInput,
|
|
4702
|
+
{
|
|
4703
|
+
color: theme.colors.ink,
|
|
4704
|
+
backgroundColor: theme.colors.surface2,
|
|
4705
|
+
borderRadius: theme.radii.md,
|
|
4706
|
+
fontFamily: theme.type.fontBody,
|
|
4707
|
+
fontSize: theme.type.bodySize
|
|
4708
|
+
}
|
|
4709
|
+
]
|
|
4510
4710
|
}
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4711
|
+
) : null,
|
|
4712
|
+
showSearch ? /* @__PURE__ */ jsx(
|
|
4713
|
+
TextInput,
|
|
4714
|
+
{
|
|
4715
|
+
placeholder: "Search\u2026",
|
|
4716
|
+
placeholderTextColor: theme.colors.ink3,
|
|
4717
|
+
value: query,
|
|
4718
|
+
onChangeText: setQuery,
|
|
4719
|
+
style: [
|
|
4720
|
+
styles23.searchInput,
|
|
4721
|
+
{
|
|
4722
|
+
color: theme.colors.ink,
|
|
4723
|
+
backgroundColor: theme.colors.surface2,
|
|
4724
|
+
borderRadius: theme.radii.md,
|
|
4725
|
+
fontFamily: theme.type.fontBody,
|
|
4726
|
+
fontSize: 14
|
|
4727
|
+
}
|
|
4728
|
+
]
|
|
4729
|
+
}
|
|
4730
|
+
) : null,
|
|
4731
|
+
/* @__PURE__ */ jsx(
|
|
4732
|
+
FlatList,
|
|
4733
|
+
{
|
|
4734
|
+
data: filtered,
|
|
4735
|
+
keyExtractor: (u) => u.externalId,
|
|
4736
|
+
keyboardShouldPersistTaps: "handled",
|
|
4737
|
+
ListEmptyComponent: /* @__PURE__ */ jsx(View, { style: styles23.empty, children: /* @__PURE__ */ jsx(Text, { style: [styles23.emptyText, { color: theme.colors.ink3 }], children: query ? "No matches." : "No users to show." }) }),
|
|
4738
|
+
renderItem: ({ item }) => /* @__PURE__ */ jsx(
|
|
4739
|
+
UserRow,
|
|
4740
|
+
{
|
|
4741
|
+
user: item,
|
|
4742
|
+
selected: selectedIds.includes(item.externalId),
|
|
4743
|
+
isGroup,
|
|
4744
|
+
onPress: () => {
|
|
4745
|
+
if (isGroup) toggle(item.externalId);
|
|
4746
|
+
else {
|
|
4747
|
+
onPickDirect?.(item.externalId);
|
|
4748
|
+
reset();
|
|
4749
|
+
onClose();
|
|
4750
|
+
}
|
|
4751
|
+
}
|
|
4752
|
+
}
|
|
4753
|
+
)
|
|
4754
|
+
}
|
|
4755
|
+
)
|
|
4756
|
+
]
|
|
4757
|
+
}
|
|
4758
|
+
)
|
|
4759
|
+
}
|
|
4760
|
+
)
|
|
4761
|
+
]
|
|
4762
|
+
}
|
|
4763
|
+
)
|
|
4520
4764
|
}
|
|
4521
4765
|
);
|
|
4522
4766
|
}
|
|
@@ -4532,29 +4776,29 @@ function UserRow({
|
|
|
4532
4776
|
{
|
|
4533
4777
|
onPress,
|
|
4534
4778
|
style: [
|
|
4535
|
-
|
|
4779
|
+
styles23.row,
|
|
4536
4780
|
{
|
|
4537
4781
|
backgroundColor: selected ? theme.colors.brandSoft : "transparent"
|
|
4538
4782
|
}
|
|
4539
4783
|
],
|
|
4540
4784
|
children: [
|
|
4541
|
-
user.avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: user.avatarUrl }, style:
|
|
4542
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4785
|
+
user.avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: user.avatarUrl }, style: styles23.avatarImg }) : /* @__PURE__ */ jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
|
|
4786
|
+
/* @__PURE__ */ jsxs(View, { style: styles23.body, children: [
|
|
4543
4787
|
/* @__PURE__ */ jsx(
|
|
4544
4788
|
Text,
|
|
4545
4789
|
{
|
|
4546
|
-
style: [
|
|
4790
|
+
style: [styles23.name, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
|
|
4547
4791
|
numberOfLines: 1,
|
|
4548
4792
|
children: user.name
|
|
4549
4793
|
}
|
|
4550
4794
|
),
|
|
4551
|
-
user.subtitle ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4795
|
+
user.subtitle ? /* @__PURE__ */ jsx(Text, { style: [styles23.subtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: user.subtitle }) : null
|
|
4552
4796
|
] }),
|
|
4553
4797
|
isGroup ? /* @__PURE__ */ jsx(
|
|
4554
4798
|
View,
|
|
4555
4799
|
{
|
|
4556
4800
|
style: [
|
|
4557
|
-
|
|
4801
|
+
styles23.checkbox,
|
|
4558
4802
|
{
|
|
4559
4803
|
borderColor: selected ? theme.colors.brand : theme.colors.border,
|
|
4560
4804
|
backgroundColor: selected ? theme.colors.brand : "transparent"
|
|
@@ -4567,7 +4811,7 @@ function UserRow({
|
|
|
4567
4811
|
}
|
|
4568
4812
|
);
|
|
4569
4813
|
}
|
|
4570
|
-
var
|
|
4814
|
+
var styles23 = StyleSheet.create({
|
|
4571
4815
|
modalRoot: {
|
|
4572
4816
|
flex: 1,
|
|
4573
4817
|
justifyContent: "flex-end"
|
|
@@ -4577,9 +4821,11 @@ var styles22 = StyleSheet.create({
|
|
|
4577
4821
|
backgroundColor: "rgba(0,0,0,0.4)"
|
|
4578
4822
|
},
|
|
4579
4823
|
sheet: {
|
|
4580
|
-
height: "85%",
|
|
4581
4824
|
overflow: "hidden"
|
|
4582
4825
|
},
|
|
4826
|
+
kav: {
|
|
4827
|
+
flex: 1
|
|
4828
|
+
},
|
|
4583
4829
|
dragHandle: {
|
|
4584
4830
|
alignItems: "center",
|
|
4585
4831
|
paddingTop: 8,
|
|
@@ -4829,7 +5075,7 @@ var PoolseInbox = forwardRef(
|
|
|
4829
5075
|
},
|
|
4830
5076
|
[renderConversationRow, meExternalId, meId, labelFor, avatarFor, unreadCounts]
|
|
4831
5077
|
);
|
|
4832
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
5078
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles24.root, { backgroundColor: theme.colors.paper }], children: [
|
|
4833
5079
|
/* @__PURE__ */ jsxs(
|
|
4834
5080
|
Animated.View,
|
|
4835
5081
|
{
|
|
@@ -4840,7 +5086,7 @@ var PoolseInbox = forwardRef(
|
|
|
4840
5086
|
View,
|
|
4841
5087
|
{
|
|
4842
5088
|
style: [
|
|
4843
|
-
|
|
5089
|
+
styles24.listHeader,
|
|
4844
5090
|
{
|
|
4845
5091
|
backgroundColor: theme.colors.surface,
|
|
4846
5092
|
borderBottomColor: theme.colors.border
|
|
@@ -4851,13 +5097,13 @@ var PoolseInbox = forwardRef(
|
|
|
4851
5097
|
Text,
|
|
4852
5098
|
{
|
|
4853
5099
|
style: [
|
|
4854
|
-
|
|
5100
|
+
styles24.listTitle,
|
|
4855
5101
|
{ color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
|
|
4856
5102
|
],
|
|
4857
5103
|
children: title
|
|
4858
5104
|
}
|
|
4859
5105
|
),
|
|
4860
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
5106
|
+
/* @__PURE__ */ jsxs(View, { style: styles24.headerActions, children: [
|
|
4861
5107
|
users ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4862
5108
|
/* @__PURE__ */ jsx(
|
|
4863
5109
|
HeaderIconButton,
|
|
@@ -4970,7 +5216,7 @@ function HeaderIconButton({
|
|
|
4970
5216
|
hitSlop: 10,
|
|
4971
5217
|
accessibilityLabel: label,
|
|
4972
5218
|
style: ({ pressed }) => [
|
|
4973
|
-
|
|
5219
|
+
styles24.iconBtn,
|
|
4974
5220
|
{
|
|
4975
5221
|
backgroundColor: pressed ? theme.colors.surface2 : "transparent"
|
|
4976
5222
|
}
|
|
@@ -5001,31 +5247,31 @@ function DefaultConversationRow({
|
|
|
5001
5247
|
{
|
|
5002
5248
|
onPress,
|
|
5003
5249
|
style: [
|
|
5004
|
-
|
|
5250
|
+
styles24.row,
|
|
5005
5251
|
{
|
|
5006
5252
|
backgroundColor: selected ? theme.colors.surface2 : "transparent",
|
|
5007
5253
|
borderBottomColor: theme.colors.border
|
|
5008
5254
|
}
|
|
5009
5255
|
],
|
|
5010
5256
|
children: [
|
|
5011
|
-
avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: avatarUrl }, style:
|
|
5012
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
5257
|
+
avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: avatarUrl }, style: styles24.rowAvatar }) : /* @__PURE__ */ jsx(Avatar, { src: null, name: title, seed: avatarSeed, size: "md" }),
|
|
5258
|
+
/* @__PURE__ */ jsxs(View, { style: styles24.rowBody, children: [
|
|
5013
5259
|
/* @__PURE__ */ jsx(
|
|
5014
5260
|
Text,
|
|
5015
5261
|
{
|
|
5016
|
-
style: [
|
|
5262
|
+
style: [styles24.rowTitle, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
|
|
5017
5263
|
numberOfLines: 1,
|
|
5018
5264
|
children: title
|
|
5019
5265
|
}
|
|
5020
5266
|
),
|
|
5021
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
5267
|
+
/* @__PURE__ */ jsx(Text, { style: [styles24.rowSubtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
|
|
5022
5268
|
] }),
|
|
5023
|
-
unread > 0 ? /* @__PURE__ */ jsx(View, { style: [
|
|
5269
|
+
unread > 0 ? /* @__PURE__ */ jsx(View, { style: [styles24.unreadPill, { backgroundColor: theme.colors.unreadPill }], children: /* @__PURE__ */ jsx(Text, { style: [styles24.unreadText, { color: theme.colors.unreadPillText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
|
|
5024
5270
|
]
|
|
5025
5271
|
}
|
|
5026
5272
|
);
|
|
5027
5273
|
}
|
|
5028
|
-
var
|
|
5274
|
+
var styles24 = StyleSheet.create({
|
|
5029
5275
|
root: {
|
|
5030
5276
|
flex: 1,
|
|
5031
5277
|
overflow: "hidden"
|
|
@@ -5229,10 +5475,10 @@ function VoiceRoomBar({
|
|
|
5229
5475
|
View,
|
|
5230
5476
|
{
|
|
5231
5477
|
style: [
|
|
5232
|
-
|
|
5478
|
+
styles25.bar,
|
|
5233
5479
|
{ backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
|
|
5234
5480
|
],
|
|
5235
|
-
children: unavailableSlot ?? /* @__PURE__ */ jsx(Text, { style: [
|
|
5481
|
+
children: unavailableSlot ?? /* @__PURE__ */ jsx(Text, { style: [styles25.hint, { color: theme.colors.ink3 }], children: "Voice needs react-native-webrtc and a development build." })
|
|
5236
5482
|
}
|
|
5237
5483
|
);
|
|
5238
5484
|
}
|
|
@@ -5240,22 +5486,22 @@ function VoiceRoomBar({
|
|
|
5240
5486
|
View,
|
|
5241
5487
|
{
|
|
5242
5488
|
style: [
|
|
5243
|
-
|
|
5489
|
+
styles25.bar,
|
|
5244
5490
|
{ backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
|
|
5245
5491
|
],
|
|
5246
5492
|
children: [
|
|
5247
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
5493
|
+
/* @__PURE__ */ jsxs(View, { style: styles25.row, children: [
|
|
5248
5494
|
/* @__PURE__ */ jsx(
|
|
5249
5495
|
View,
|
|
5250
5496
|
{
|
|
5251
5497
|
style: [
|
|
5252
|
-
|
|
5498
|
+
styles25.dot,
|
|
5253
5499
|
{ backgroundColor: connected ? theme.colors.brand : theme.colors.ink3 }
|
|
5254
5500
|
]
|
|
5255
5501
|
}
|
|
5256
5502
|
),
|
|
5257
5503
|
connected ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5258
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
5504
|
+
/* @__PURE__ */ jsx(View, { style: styles25.people, children: participants.length === 0 ? /* @__PURE__ */ jsx(Text, { style: [styles25.hint, { color: theme.colors.ink3 }], children: "Waiting for others\u2026" }) : participants.map((p) => /* @__PURE__ */ jsx(ParticipantChip, { participant: p, label: label(p.userId) }, p.userId)) }),
|
|
5259
5505
|
/* @__PURE__ */ jsx(
|
|
5260
5506
|
Pressable,
|
|
5261
5507
|
{
|
|
@@ -5263,7 +5509,7 @@ function VoiceRoomBar({
|
|
|
5263
5509
|
accessibilityRole: "button",
|
|
5264
5510
|
accessibilityState: { selected: muted },
|
|
5265
5511
|
style: [
|
|
5266
|
-
|
|
5512
|
+
styles25.btn,
|
|
5267
5513
|
{
|
|
5268
5514
|
borderColor: muted ? theme.colors.brand : theme.colors.border,
|
|
5269
5515
|
backgroundColor: muted ? theme.colors.brandSoft : theme.colors.paper
|
|
@@ -5277,25 +5523,25 @@ function VoiceRoomBar({
|
|
|
5277
5523
|
{
|
|
5278
5524
|
onPress: leave,
|
|
5279
5525
|
accessibilityRole: "button",
|
|
5280
|
-
style: [
|
|
5526
|
+
style: [styles25.btn, { borderColor: theme.colors.error }],
|
|
5281
5527
|
children: /* @__PURE__ */ jsx(Text, { style: { color: theme.colors.error }, children: "Leave" })
|
|
5282
5528
|
}
|
|
5283
5529
|
)
|
|
5284
5530
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5285
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
5531
|
+
/* @__PURE__ */ jsx(Text, { style: [styles25.hint, { color: theme.colors.ink3 }], children: status === "connecting" ? "Connecting\u2026" : "Talk to everyone here" }),
|
|
5286
5532
|
/* @__PURE__ */ jsx(
|
|
5287
5533
|
Pressable,
|
|
5288
5534
|
{
|
|
5289
5535
|
onPress: () => void join(),
|
|
5290
5536
|
disabled: status === "connecting",
|
|
5291
5537
|
accessibilityRole: "button",
|
|
5292
|
-
style: [
|
|
5538
|
+
style: [styles25.btn, styles25.btnPrimary, { backgroundColor: theme.colors.brand }],
|
|
5293
5539
|
children: /* @__PURE__ */ jsx(Text, { style: { color: theme.colors.onBrand, fontWeight: "600" }, children: status === "connecting" ? "Joining\u2026" : "Join Voice" })
|
|
5294
5540
|
}
|
|
5295
5541
|
)
|
|
5296
5542
|
] })
|
|
5297
5543
|
] }),
|
|
5298
|
-
error && /* @__PURE__ */ jsx(Text, { style: [
|
|
5544
|
+
error && /* @__PURE__ */ jsx(Text, { style: [styles25.error, { color: theme.colors.error }], children: error.message })
|
|
5299
5545
|
]
|
|
5300
5546
|
}
|
|
5301
5547
|
);
|
|
@@ -5306,7 +5552,7 @@ function ParticipantChip({ participant, label }) {
|
|
|
5306
5552
|
View,
|
|
5307
5553
|
{
|
|
5308
5554
|
style: [
|
|
5309
|
-
|
|
5555
|
+
styles25.chip,
|
|
5310
5556
|
{
|
|
5311
5557
|
backgroundColor: theme.colors.paper,
|
|
5312
5558
|
// The speaking ring is a border colour swap rather than an
|
|
@@ -5325,7 +5571,7 @@ function ParticipantChip({ participant, label }) {
|
|
|
5325
5571
|
}
|
|
5326
5572
|
);
|
|
5327
5573
|
}
|
|
5328
|
-
var
|
|
5574
|
+
var styles25 = StyleSheet.create({
|
|
5329
5575
|
bar: { paddingHorizontal: 14, paddingVertical: 8, borderBottomWidth: StyleSheet.hairlineWidth },
|
|
5330
5576
|
row: { flexDirection: "row", alignItems: "center", gap: 8, flexWrap: "wrap" },
|
|
5331
5577
|
dot: { width: 8, height: 8, borderRadius: 4 },
|
|
@@ -5394,42 +5640,60 @@ function AudioRouteSheet({
|
|
|
5394
5640
|
onSelect,
|
|
5395
5641
|
onClose
|
|
5396
5642
|
}) {
|
|
5397
|
-
|
|
5398
|
-
|
|
5399
|
-
|
|
5400
|
-
|
|
5401
|
-
|
|
5402
|
-
|
|
5403
|
-
|
|
5643
|
+
const insets = useSafeInsets();
|
|
5644
|
+
return /* @__PURE__ */ jsx(
|
|
5645
|
+
Modal,
|
|
5646
|
+
{
|
|
5647
|
+
visible,
|
|
5648
|
+
transparent: true,
|
|
5649
|
+
animationType: "fade",
|
|
5650
|
+
onRequestClose: onClose,
|
|
5651
|
+
...EDGE_TO_EDGE_MODAL,
|
|
5652
|
+
children: /* @__PURE__ */ jsx(Pressable, { style: styles26.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxs(
|
|
5404
5653
|
Pressable,
|
|
5405
5654
|
{
|
|
5655
|
+
style: [styles26.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
|
|
5406
5656
|
onPress: () => {
|
|
5407
|
-
onSelect(route.id);
|
|
5408
|
-
onClose();
|
|
5409
5657
|
},
|
|
5410
|
-
accessibilityRole: "button",
|
|
5411
|
-
accessibilityState: { selected },
|
|
5412
|
-
style: ({ pressed }) => [styles25.row, pressed && styles25.rowPressed],
|
|
5413
5658
|
children: [
|
|
5414
|
-
/* @__PURE__ */ jsx(
|
|
5415
|
-
|
|
5416
|
-
|
|
5417
|
-
|
|
5418
|
-
|
|
5419
|
-
|
|
5420
|
-
|
|
5421
|
-
|
|
5422
|
-
|
|
5423
|
-
|
|
5424
|
-
|
|
5659
|
+
/* @__PURE__ */ jsx(View, { style: styles26.grabber }),
|
|
5660
|
+
/* @__PURE__ */ jsx(Text, { style: styles26.title, children: "Audio output" }),
|
|
5661
|
+
routes.map((route) => {
|
|
5662
|
+
const selected = route.id === selectedRouteId;
|
|
5663
|
+
return /* @__PURE__ */ jsxs(
|
|
5664
|
+
Pressable,
|
|
5665
|
+
{
|
|
5666
|
+
onPress: () => {
|
|
5667
|
+
onSelect(route.id);
|
|
5668
|
+
onClose();
|
|
5669
|
+
},
|
|
5670
|
+
accessibilityRole: "button",
|
|
5671
|
+
accessibilityState: { selected },
|
|
5672
|
+
style: ({ pressed }) => [styles26.row, pressed && styles26.rowPressed],
|
|
5673
|
+
children: [
|
|
5674
|
+
/* @__PURE__ */ jsx(
|
|
5675
|
+
PoolseIcon,
|
|
5676
|
+
{
|
|
5677
|
+
name: ICONS2[route.kind],
|
|
5678
|
+
size: 21,
|
|
5679
|
+
color: selected ? callColors.accept : callColors.text,
|
|
5680
|
+
label: null
|
|
5681
|
+
}
|
|
5682
|
+
),
|
|
5683
|
+
/* @__PURE__ */ jsx(Text, { style: [styles26.label, selected && styles26.labelSelected], children: route.label }),
|
|
5684
|
+
selected && /* @__PURE__ */ jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
|
|
5685
|
+
]
|
|
5686
|
+
},
|
|
5687
|
+
route.id
|
|
5688
|
+
);
|
|
5689
|
+
})
|
|
5425
5690
|
]
|
|
5426
|
-
}
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
] }) }) });
|
|
5691
|
+
}
|
|
5692
|
+
) })
|
|
5693
|
+
}
|
|
5694
|
+
);
|
|
5431
5695
|
}
|
|
5432
|
-
var
|
|
5696
|
+
var styles26 = StyleSheet.create({
|
|
5433
5697
|
backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
|
|
5434
5698
|
sheet: {
|
|
5435
5699
|
backgroundColor: callColors.tile,
|
|
@@ -5437,7 +5701,6 @@ var styles25 = StyleSheet.create({
|
|
|
5437
5701
|
borderTopRightRadius: 22,
|
|
5438
5702
|
paddingHorizontal: 12,
|
|
5439
5703
|
paddingTop: 10,
|
|
5440
|
-
paddingBottom: 34,
|
|
5441
5704
|
gap: 2
|
|
5442
5705
|
},
|
|
5443
5706
|
grabber: {
|
|
@@ -5511,11 +5774,11 @@ function PulseRings({ size, color }) {
|
|
|
5511
5774
|
});
|
|
5512
5775
|
return () => loops.forEach((l) => l.stop());
|
|
5513
5776
|
}, []);
|
|
5514
|
-
return /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill,
|
|
5777
|
+
return /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, styles27.center], pointerEvents: "none", children: phases.map((p, i) => /* @__PURE__ */ jsx(
|
|
5515
5778
|
Animated.View,
|
|
5516
5779
|
{
|
|
5517
5780
|
style: [
|
|
5518
|
-
|
|
5781
|
+
styles27.ring,
|
|
5519
5782
|
{
|
|
5520
5783
|
width: size,
|
|
5521
5784
|
height: size,
|
|
@@ -5536,7 +5799,7 @@ function PulseRings({ size, color }) {
|
|
|
5536
5799
|
i
|
|
5537
5800
|
)) });
|
|
5538
5801
|
}
|
|
5539
|
-
var
|
|
5802
|
+
var styles27 = StyleSheet.create({
|
|
5540
5803
|
center: { alignItems: "center", justifyContent: "center" },
|
|
5541
5804
|
ring: { position: "absolute", borderWidth: 1.5 }
|
|
5542
5805
|
});
|
|
@@ -5547,7 +5810,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
|
|
|
5547
5810
|
View,
|
|
5548
5811
|
{
|
|
5549
5812
|
style: [
|
|
5550
|
-
|
|
5813
|
+
styles28.ring,
|
|
5551
5814
|
{
|
|
5552
5815
|
width: outer,
|
|
5553
5816
|
height: outer,
|
|
@@ -5560,7 +5823,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
|
|
|
5560
5823
|
View,
|
|
5561
5824
|
{
|
|
5562
5825
|
style: [
|
|
5563
|
-
|
|
5826
|
+
styles28.circle,
|
|
5564
5827
|
{
|
|
5565
5828
|
width: size,
|
|
5566
5829
|
height: size,
|
|
@@ -5571,7 +5834,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
|
|
|
5571
5834
|
children: /* @__PURE__ */ jsx(
|
|
5572
5835
|
Text,
|
|
5573
5836
|
{
|
|
5574
|
-
style: [
|
|
5837
|
+
style: [styles28.initials, { fontSize: Math.round(size * 0.38) }],
|
|
5575
5838
|
numberOfLines: 1,
|
|
5576
5839
|
allowFontScaling: false,
|
|
5577
5840
|
children: initialsOf(name)
|
|
@@ -5588,7 +5851,7 @@ function initialsOf(name) {
|
|
|
5588
5851
|
if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
|
|
5589
5852
|
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
5590
5853
|
}
|
|
5591
|
-
var
|
|
5854
|
+
var styles28 = StyleSheet.create({
|
|
5592
5855
|
ring: { alignItems: "center", justifyContent: "center" },
|
|
5593
5856
|
circle: { alignItems: "center", justifyContent: "center" },
|
|
5594
5857
|
initials: { color: "#ffffff", fontWeight: "600" }
|
|
@@ -5606,7 +5869,7 @@ function CallControlButton({
|
|
|
5606
5869
|
const size = large ? CONTROL_SIZE_LARGE : CONTROL_SIZE;
|
|
5607
5870
|
const background = tone === "danger" ? callColors.danger : tone === "accept" ? callColors.accept : active ? callColors.controlActive : callColors.control;
|
|
5608
5871
|
const iconColor = tone === "neutral" && active ? callColors.controlActiveIcon : callColors.onAction;
|
|
5609
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
5872
|
+
return /* @__PURE__ */ jsxs(View, { style: styles29.slot, children: [
|
|
5610
5873
|
/* @__PURE__ */ jsx(
|
|
5611
5874
|
Pressable,
|
|
5612
5875
|
{
|
|
@@ -5617,7 +5880,7 @@ function CallControlButton({
|
|
|
5617
5880
|
accessibilityLabel: accessibilityLabel ?? label ?? icon,
|
|
5618
5881
|
hitSlop: 8,
|
|
5619
5882
|
style: ({ pressed }) => [
|
|
5620
|
-
|
|
5883
|
+
styles29.button,
|
|
5621
5884
|
{
|
|
5622
5885
|
width: size,
|
|
5623
5886
|
height: size,
|
|
@@ -5631,10 +5894,10 @@ function CallControlButton({
|
|
|
5631
5894
|
children: /* @__PURE__ */ jsx(PoolseIcon, { name: icon, size: large ? 30 : 25, color: iconColor, label: null })
|
|
5632
5895
|
}
|
|
5633
5896
|
),
|
|
5634
|
-
label ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style:
|
|
5897
|
+
label ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles29.label, children: label }) : null
|
|
5635
5898
|
] });
|
|
5636
5899
|
}
|
|
5637
|
-
var
|
|
5900
|
+
var styles29 = StyleSheet.create({
|
|
5638
5901
|
// Fixed width so captions of different lengths cannot shift the row.
|
|
5639
5902
|
slot: { width: 76, alignItems: "center", gap: 7 },
|
|
5640
5903
|
button: { alignItems: "center", justifyContent: "center" },
|
|
@@ -5655,8 +5918,8 @@ function CallParticipantTile({
|
|
|
5655
5918
|
View,
|
|
5656
5919
|
{
|
|
5657
5920
|
style: [
|
|
5658
|
-
|
|
5659
|
-
bleed ?
|
|
5921
|
+
styles30.tile,
|
|
5922
|
+
bleed ? styles30.bleed : styles30.rounded,
|
|
5660
5923
|
{
|
|
5661
5924
|
backgroundColor: callColors.tile,
|
|
5662
5925
|
// A ring rather than a badge: it reads at a glance across a
|
|
@@ -5675,7 +5938,7 @@ function CallParticipantTile({
|
|
|
5675
5938
|
mirror: participant.isSelf,
|
|
5676
5939
|
zOrder: participant.isSelf ? 1 : 0
|
|
5677
5940
|
}
|
|
5678
|
-
) : /* @__PURE__ */ jsx(View, { style:
|
|
5941
|
+
) : /* @__PURE__ */ jsx(View, { style: styles30.placeholder, children: /* @__PURE__ */ jsx(
|
|
5679
5942
|
CallAvatar,
|
|
5680
5943
|
{
|
|
5681
5944
|
name,
|
|
@@ -5684,17 +5947,17 @@ function CallParticipantTile({
|
|
|
5684
5947
|
speaking: participant.speaking
|
|
5685
5948
|
}
|
|
5686
5949
|
) }),
|
|
5687
|
-
!hideName && /* @__PURE__ */ jsxs(View, { style: [
|
|
5950
|
+
!hideName && /* @__PURE__ */ jsxs(View, { style: [styles30.chip, bleed ? styles30.chipBleed : styles30.chipTile], children: [
|
|
5688
5951
|
!participant.micEnabled && // Worth showing even for yourself — it is the answer to
|
|
5689
5952
|
// "why can nobody hear me".
|
|
5690
5953
|
/* @__PURE__ */ jsx(PoolseIcon, { name: "mic-off", size: 13, color: callColors.text, label: "muted" }),
|
|
5691
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style:
|
|
5954
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles30.name, children: name })
|
|
5692
5955
|
] })
|
|
5693
5956
|
]
|
|
5694
5957
|
}
|
|
5695
5958
|
);
|
|
5696
5959
|
}
|
|
5697
|
-
var
|
|
5960
|
+
var styles30 = StyleSheet.create({
|
|
5698
5961
|
tile: { overflow: "hidden", justifyContent: "flex-end", borderWidth: 2 },
|
|
5699
5962
|
rounded: { borderRadius: 18 },
|
|
5700
5963
|
bleed: { borderRadius: 0, borderWidth: 0 },
|
|
@@ -5792,7 +6055,7 @@ function LocalVideoPip({
|
|
|
5792
6055
|
Animated.View,
|
|
5793
6056
|
{
|
|
5794
6057
|
...responder.panHandlers,
|
|
5795
|
-
style: [
|
|
6058
|
+
style: [styles31.pip, { transform: pan.getTranslateTransform() }],
|
|
5796
6059
|
children: /* @__PURE__ */ jsx(
|
|
5797
6060
|
Pressable,
|
|
5798
6061
|
{
|
|
@@ -5802,8 +6065,8 @@ function LocalVideoPip({
|
|
|
5802
6065
|
},
|
|
5803
6066
|
accessibilityRole: "button",
|
|
5804
6067
|
accessibilityLabel: "Your camera. Drag to move, tap to switch camera.",
|
|
5805
|
-
style:
|
|
5806
|
-
children: /* @__PURE__ */ jsx(View, { style:
|
|
6068
|
+
style: styles31.fill,
|
|
6069
|
+
children: /* @__PURE__ */ jsx(View, { style: styles31.fill, children: /* @__PURE__ */ jsx(
|
|
5807
6070
|
CallParticipantTile,
|
|
5808
6071
|
{
|
|
5809
6072
|
participant,
|
|
@@ -5812,7 +6075,7 @@ function LocalVideoPip({
|
|
|
5812
6075
|
avatarSize: 48,
|
|
5813
6076
|
hideName: true,
|
|
5814
6077
|
bleed: true,
|
|
5815
|
-
style:
|
|
6078
|
+
style: styles31.fill
|
|
5816
6079
|
}
|
|
5817
6080
|
) })
|
|
5818
6081
|
}
|
|
@@ -5820,7 +6083,7 @@ function LocalVideoPip({
|
|
|
5820
6083
|
}
|
|
5821
6084
|
);
|
|
5822
6085
|
}
|
|
5823
|
-
var
|
|
6086
|
+
var styles31 = StyleSheet.create({
|
|
5824
6087
|
pip: {
|
|
5825
6088
|
position: "absolute",
|
|
5826
6089
|
top: 0,
|
|
@@ -5869,11 +6132,11 @@ function CallVideoGrid({
|
|
|
5869
6132
|
const availableHeight = size.height > 0 ? size.height - padTop - padBottom : 0;
|
|
5870
6133
|
const tileHeight = availableHeight > 0 ? (availableHeight - GAP * (rows - 1)) / rows : 0;
|
|
5871
6134
|
const scrolls = tileHeight > 0 && tileHeight < MIN_TILE_HEIGHT;
|
|
5872
|
-
if (participants.length === 0) return /* @__PURE__ */ jsx(View, { style:
|
|
6135
|
+
if (participants.length === 0) return /* @__PURE__ */ jsx(View, { style: styles32.stage, onLayout });
|
|
5873
6136
|
if (others.length <= 1) {
|
|
5874
6137
|
const spotlight = others[0] ?? self;
|
|
5875
|
-
if (!spotlight) return /* @__PURE__ */ jsx(View, { style:
|
|
5876
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
6138
|
+
if (!spotlight) return /* @__PURE__ */ jsx(View, { style: styles32.stage, onLayout });
|
|
6139
|
+
return /* @__PURE__ */ jsxs(View, { style: styles32.stage, onLayout, children: [
|
|
5877
6140
|
/* @__PURE__ */ jsx(
|
|
5878
6141
|
CallParticipantTile,
|
|
5879
6142
|
{
|
|
@@ -5883,7 +6146,7 @@ function CallVideoGrid({
|
|
|
5883
6146
|
avatarSize: Math.min(148, Math.max(96, Math.round(size.width * 0.36))),
|
|
5884
6147
|
bleed: true,
|
|
5885
6148
|
hideName: others.length === 1,
|
|
5886
|
-
style:
|
|
6149
|
+
style: styles32.fill
|
|
5887
6150
|
}
|
|
5888
6151
|
),
|
|
5889
6152
|
self && others.length === 1 && size.width > 0 && /* @__PURE__ */ jsx(
|
|
@@ -5901,7 +6164,7 @@ function CallVideoGrid({
|
|
|
5901
6164
|
}
|
|
5902
6165
|
const tiles = [...others, ...self ? [self] : []];
|
|
5903
6166
|
const width = size.width > 0 ? (size.width - GAP * (columns - 1)) / columns : 0;
|
|
5904
|
-
const grid = /* @__PURE__ */ jsx(View, { style: [
|
|
6167
|
+
const grid = /* @__PURE__ */ jsx(View, { style: [styles32.grid, scrolls ? styles32.gridScrolling : styles32.gridFilling], children: tiles.map((participant) => /* @__PURE__ */ jsx(
|
|
5905
6168
|
CallParticipantTile,
|
|
5906
6169
|
{
|
|
5907
6170
|
participant,
|
|
@@ -5918,13 +6181,13 @@ function CallVideoGrid({
|
|
|
5918
6181
|
return /* @__PURE__ */ jsx(
|
|
5919
6182
|
View,
|
|
5920
6183
|
{
|
|
5921
|
-
style: [
|
|
6184
|
+
style: [styles32.stage, { paddingTop: padTop, paddingBottom: padBottom }],
|
|
5922
6185
|
onLayout,
|
|
5923
6186
|
children: scrolls ? /* @__PURE__ */ jsx(
|
|
5924
6187
|
ScrollView,
|
|
5925
6188
|
{
|
|
5926
6189
|
contentContainerStyle: [
|
|
5927
|
-
|
|
6190
|
+
styles32.scroll,
|
|
5928
6191
|
{ paddingBottom: (chromeInsets?.bottom ?? 0) + GAP }
|
|
5929
6192
|
],
|
|
5930
6193
|
showsVerticalScrollIndicator: false,
|
|
@@ -5934,7 +6197,7 @@ function CallVideoGrid({
|
|
|
5934
6197
|
}
|
|
5935
6198
|
);
|
|
5936
6199
|
}
|
|
5937
|
-
var
|
|
6200
|
+
var styles32 = StyleSheet.create({
|
|
5938
6201
|
stage: { flex: 1, overflow: "hidden" },
|
|
5939
6202
|
fill: { ...StyleSheet.absoluteFillObject },
|
|
5940
6203
|
grid: { flexDirection: "row", flexWrap: "wrap", gap: GAP },
|
|
@@ -6293,7 +6556,7 @@ function CallScreen({
|
|
|
6293
6556
|
/* @__PURE__ */ jsx(StatusBar, { barStyle: "light-content" }),
|
|
6294
6557
|
/* @__PURE__ */ jsxs(SafeAreaProvider, { children: [
|
|
6295
6558
|
/* @__PURE__ */ jsx(InsetsProbe, { onChange: setInsets }),
|
|
6296
|
-
/* @__PURE__ */ jsxs(Pressable, { style:
|
|
6559
|
+
/* @__PURE__ */ jsxs(Pressable, { style: styles33.screen, onPress: toggleChrome, accessible: false, children: [
|
|
6297
6560
|
/* @__PURE__ */ jsx(CallBackdrop, {}),
|
|
6298
6561
|
showStage ? /* @__PURE__ */ jsx(
|
|
6299
6562
|
CallVideoGrid,
|
|
@@ -6312,10 +6575,10 @@ function CallScreen({
|
|
|
6312
6575
|
/* @__PURE__ */ jsxs(
|
|
6313
6576
|
View,
|
|
6314
6577
|
{
|
|
6315
|
-
style: [
|
|
6578
|
+
style: [styles33.identity, { paddingBottom: insets.bottom + 160 }],
|
|
6316
6579
|
pointerEvents: "none",
|
|
6317
6580
|
children: [
|
|
6318
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6581
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.avatarStage, children: [
|
|
6319
6582
|
(ringingIn || ringingOut) && /* @__PURE__ */ jsx(PulseRings, { size: 132, color: callColors.glow }),
|
|
6320
6583
|
/* @__PURE__ */ jsx(
|
|
6321
6584
|
CallAvatar,
|
|
@@ -6326,31 +6589,31 @@ function CallScreen({
|
|
|
6326
6589
|
}
|
|
6327
6590
|
)
|
|
6328
6591
|
] }),
|
|
6329
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 2, style:
|
|
6330
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6331
|
-
connected && /* @__PURE__ */ jsx(View, { style:
|
|
6332
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
6592
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 2, style: styles33.identityTitle, children: title }),
|
|
6593
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.statusPill, children: [
|
|
6594
|
+
connected && /* @__PURE__ */ jsx(View, { style: styles33.statusDot }),
|
|
6595
|
+
/* @__PURE__ */ jsx(Text, { style: styles33.statusText, children: subtitle })
|
|
6333
6596
|
] })
|
|
6334
6597
|
]
|
|
6335
6598
|
}
|
|
6336
6599
|
)
|
|
6337
6600
|
),
|
|
6338
|
-
chromeVisible && showStage && /* @__PURE__ */ jsxs(View, { style: [
|
|
6339
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style:
|
|
6340
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6601
|
+
chromeVisible && showStage && /* @__PURE__ */ jsxs(View, { style: [styles33.header, { paddingTop: insets.top + 14 }], pointerEvents: "box-none", children: [
|
|
6602
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles33.title, children: title }),
|
|
6603
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.subtitleRow, children: [
|
|
6341
6604
|
isGroup && /* @__PURE__ */ jsx(PoolseIcon, { name: "users", size: 14, color: callColors.textDim, label: null }),
|
|
6342
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
6605
|
+
/* @__PURE__ */ jsx(Text, { style: styles33.subtitle, children: isGroup ? `${participants.length} \xB7 ${subtitle}` : subtitle })
|
|
6343
6606
|
] })
|
|
6344
6607
|
] }),
|
|
6345
6608
|
chromeVisible && /* @__PURE__ */ jsxs(
|
|
6346
6609
|
View,
|
|
6347
6610
|
{
|
|
6348
|
-
style: [
|
|
6611
|
+
style: [styles33.controls, { paddingBottom: insets.bottom + 22 }],
|
|
6349
6612
|
pointerEvents: "box-none",
|
|
6350
6613
|
children: [
|
|
6351
|
-
error && /* @__PURE__ */ jsx(Text, { style:
|
|
6352
|
-
!meshAvailable && !livekit && /* @__PURE__ */ jsx(Text, { style:
|
|
6353
|
-
ringingIn ? /* @__PURE__ */ jsxs(View, { style:
|
|
6614
|
+
error && /* @__PURE__ */ jsx(Text, { style: styles33.error, children: error.message }),
|
|
6615
|
+
!meshAvailable && !livekit && /* @__PURE__ */ jsx(Text, { style: styles33.error, children: "No WebRTC module supplied \u2014 this call has no audio." }),
|
|
6616
|
+
ringingIn ? /* @__PURE__ */ jsxs(View, { style: styles33.answerRow, children: [
|
|
6354
6617
|
/* @__PURE__ */ jsx(
|
|
6355
6618
|
CallControlButton,
|
|
6356
6619
|
{
|
|
@@ -6373,7 +6636,7 @@ function CallScreen({
|
|
|
6373
6636
|
accessibilityLabel: "Accept call"
|
|
6374
6637
|
}
|
|
6375
6638
|
)
|
|
6376
|
-
] }) : ended ? /* @__PURE__ */ jsx(View, { style:
|
|
6639
|
+
] }) : ended ? /* @__PURE__ */ jsx(View, { style: styles33.row, children: /* @__PURE__ */ jsx(
|
|
6377
6640
|
CallControlButton,
|
|
6378
6641
|
{
|
|
6379
6642
|
icon: "close",
|
|
@@ -6382,7 +6645,7 @@ function CallScreen({
|
|
|
6382
6645
|
accessibilityLabel: "Close"
|
|
6383
6646
|
}
|
|
6384
6647
|
) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6385
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6648
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.dock, children: [
|
|
6386
6649
|
/* @__PURE__ */ jsx(
|
|
6387
6650
|
CallControlButton,
|
|
6388
6651
|
{
|
|
@@ -6423,7 +6686,7 @@ function CallScreen({
|
|
|
6423
6686
|
}
|
|
6424
6687
|
)
|
|
6425
6688
|
] }),
|
|
6426
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
6689
|
+
/* @__PURE__ */ jsx(View, { style: styles33.hangUpRow, children: /* @__PURE__ */ jsx(
|
|
6427
6690
|
CallControlButton,
|
|
6428
6691
|
{
|
|
6429
6692
|
icon: "phone-off",
|
|
@@ -6499,7 +6762,7 @@ function statusLine(calls, mediaStatus) {
|
|
|
6499
6762
|
return "";
|
|
6500
6763
|
}
|
|
6501
6764
|
}
|
|
6502
|
-
var
|
|
6765
|
+
var styles33 = StyleSheet.create({
|
|
6503
6766
|
screen: { flex: 1, backgroundColor: callColors.bg },
|
|
6504
6767
|
identity: {
|
|
6505
6768
|
flex: 1,
|
|
@@ -6803,6 +7066,6 @@ function guessApnsEnvironment() {
|
|
|
6803
7066
|
return __DEV__ ? "sandbox" : "production";
|
|
6804
7067
|
}
|
|
6805
7068
|
|
|
6806
|
-
export { AttachmentPicker, AttachmentPreview, AudioRouteSheet, Avatar, CallAvatar, CallControlButton, CallLogRow, CallParticipantTile, CallScreen, CallVideoGrid, ChatHeader, ConversationList, ConversationView, DaySeparator, GroupDetailsSheet, ImageMosaic, LocalVideoPip, MemberList, MentionInput, MessageActions, MessageBubble, MessageComposer, MessageList, MessageRow, PoolseIcon, PoolseInbox, PoolseLogo, PoolseTheme, primitives as Primitives, ReactionPicker, ReactionStrip, ThreadView, TypingIndicator, UploadQueueStrip, UserName, VoiceRoomBar, callColors, createNativeWebRtcAdapter, defaultDarkTheme, defaultLightTheme, describeRoute, isNativeWebRtcAvailable, isStalePush, useAppStateLifecycle, useCallAudio, useCallDuration, useDisplayName, usePoolseTheme, useVoipCalls };
|
|
7069
|
+
export { AttachmentPicker, AttachmentPreview, AudioRouteSheet, Avatar, CallAvatar, CallControlButton, CallLogRow, CallParticipantTile, CallScreen, CallVideoGrid, ChatHeader, ConversationList, ConversationView, DaySeparator, GroupDetailsSheet, ImageMosaic, LiveCallBanner, LocalVideoPip, MemberList, MentionInput, MessageActions, MessageBubble, MessageComposer, MessageList, MessageRow, PoolseIcon, PoolseInbox, PoolseLogo, PoolseTheme, primitives as Primitives, ReactionPicker, ReactionStrip, ThreadView, TypingIndicator, UploadQueueStrip, UserName, VoiceRoomBar, callColors, createNativeWebRtcAdapter, defaultDarkTheme, defaultLightTheme, describeRoute, isNativeWebRtcAvailable, isStalePush, useAppStateLifecycle, useCallAudio, useCallDuration, useDisplayName, usePoolseTheme, useVoipCalls };
|
|
6807
7070
|
//# sourceMappingURL=index.js.map
|
|
6808
7071
|
//# sourceMappingURL=index.js.map
|