@poolse/react-native 2.25.1 → 2.27.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 +412 -275
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +43 -5
- package/dist/index.d.ts +43 -5
- package/dist/index.js +413 -277
- package/dist/index.js.map +1 -1
- package/package.json +11 -12
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
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';
|
|
1
|
+
import { useUser, useMe, useConversations, formatCallLogPreview, useAttachmentUpload, useConversation, useMembers, usePresence, receiptsOf, useMessages, useTyping, useRealtimeStatus, isMessageVisibleTo, computeGroupPosition, canEditOwnMessage, formatDayLabel, callLogDisplayFor, useLiveCall, sameDay, useReactions, useThread, useAttachmentUrl, usePoolse, useVoiceRoom, useCalls, useCallRoom } from '@poolse/react';
|
|
2
2
|
import { createContext, forwardRef, useRef, useState, useImperativeHandle, useEffect, useMemo, useCallback, useContext, createElement } from 'react';
|
|
3
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';
|
|
@@ -1459,6 +1459,74 @@ var styles7 = StyleSheet.create({
|
|
|
1459
1459
|
letterSpacing: 0.3
|
|
1460
1460
|
}
|
|
1461
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
|
+
});
|
|
1462
1530
|
function UploadQueueStrip() {
|
|
1463
1531
|
const theme = usePoolseTheme();
|
|
1464
1532
|
const upload = useSharedUpload();
|
|
@@ -1469,8 +1537,8 @@ function UploadQueueStrip() {
|
|
|
1469
1537
|
{
|
|
1470
1538
|
horizontal: true,
|
|
1471
1539
|
showsHorizontalScrollIndicator: false,
|
|
1472
|
-
contentContainerStyle:
|
|
1473
|
-
style: [
|
|
1540
|
+
contentContainerStyle: styles9.scroll,
|
|
1541
|
+
style: [styles9.scrollStyle, { marginBottom: 8 }],
|
|
1474
1542
|
children: upload.queue.map((item) => {
|
|
1475
1543
|
const isError = item.status === "error";
|
|
1476
1544
|
const isUploading = item.status === "uploading" || item.status === "pending";
|
|
@@ -1481,7 +1549,7 @@ function UploadQueueStrip() {
|
|
|
1481
1549
|
if (item.status === "ready" || isError) upload.remove(item.localId);
|
|
1482
1550
|
else upload.cancel(item.localId);
|
|
1483
1551
|
};
|
|
1484
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
1552
|
+
return /* @__PURE__ */ jsxs(View, { style: styles9.tileWrap, children: [
|
|
1485
1553
|
isImage && previewUri ? /* @__PURE__ */ jsx(ImageTile, { uri: previewUri, uploading: isUploading, error: isError }) : /* @__PURE__ */ jsx(
|
|
1486
1554
|
FileTile,
|
|
1487
1555
|
{
|
|
@@ -1496,13 +1564,13 @@ function UploadQueueStrip() {
|
|
|
1496
1564
|
{
|
|
1497
1565
|
onPress: handleClose,
|
|
1498
1566
|
hitSlop: 8,
|
|
1499
|
-
style:
|
|
1567
|
+
style: styles9.closeBtn,
|
|
1500
1568
|
accessibilityLabel: isError ? "Remove failed upload" : "Cancel upload",
|
|
1501
1569
|
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 11, color: "#fff" })
|
|
1502
1570
|
}
|
|
1503
1571
|
) : null,
|
|
1504
|
-
isUploading ? /* @__PURE__ */ jsx(View, { style:
|
|
1505
|
-
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
|
|
1506
1574
|
] }, item.localId);
|
|
1507
1575
|
})
|
|
1508
1576
|
}
|
|
@@ -1515,7 +1583,7 @@ function ImageTile({ uri, uploading, error }) {
|
|
|
1515
1583
|
{
|
|
1516
1584
|
source: { uri },
|
|
1517
1585
|
style: [
|
|
1518
|
-
|
|
1586
|
+
styles9.imageTile,
|
|
1519
1587
|
{
|
|
1520
1588
|
backgroundColor: theme.colors.surface2,
|
|
1521
1589
|
borderColor: error ? theme.colors.error : "transparent",
|
|
@@ -1537,24 +1605,24 @@ function FileTile({
|
|
|
1537
1605
|
View,
|
|
1538
1606
|
{
|
|
1539
1607
|
style: [
|
|
1540
|
-
|
|
1608
|
+
styles9.fileTile,
|
|
1541
1609
|
{
|
|
1542
1610
|
backgroundColor: theme.colors.surface2,
|
|
1543
1611
|
borderColor: error ? theme.colors.error : uploading ? theme.colors.brand : theme.colors.border
|
|
1544
1612
|
}
|
|
1545
1613
|
],
|
|
1546
1614
|
children: [
|
|
1547
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
1548
|
-
/* @__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: [
|
|
1549
1617
|
/* @__PURE__ */ jsx(
|
|
1550
1618
|
Text,
|
|
1551
1619
|
{
|
|
1552
|
-
style: [
|
|
1620
|
+
style: [styles9.fileName, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
|
|
1553
1621
|
numberOfLines: 1,
|
|
1554
1622
|
children: filename
|
|
1555
1623
|
}
|
|
1556
1624
|
),
|
|
1557
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1625
|
+
/* @__PURE__ */ jsx(Text, { style: [styles9.fileSize, { color: theme.colors.ink3 }], children: formatBytes(size) })
|
|
1558
1626
|
] })
|
|
1559
1627
|
]
|
|
1560
1628
|
}
|
|
@@ -1568,7 +1636,7 @@ function formatBytes(n) {
|
|
|
1568
1636
|
return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
|
|
1569
1637
|
}
|
|
1570
1638
|
var TILE = 64;
|
|
1571
|
-
var
|
|
1639
|
+
var styles9 = StyleSheet.create({
|
|
1572
1640
|
scrollStyle: {
|
|
1573
1641
|
overflow: "visible"
|
|
1574
1642
|
},
|
|
@@ -1772,7 +1840,7 @@ var MessageComposer = forwardRef(
|
|
|
1772
1840
|
View,
|
|
1773
1841
|
{
|
|
1774
1842
|
style: [
|
|
1775
|
-
|
|
1843
|
+
styles10.wrap,
|
|
1776
1844
|
{
|
|
1777
1845
|
backgroundColor: theme.colors.surface,
|
|
1778
1846
|
borderTopColor: theme.colors.border,
|
|
@@ -1795,13 +1863,13 @@ var MessageComposer = forwardRef(
|
|
|
1795
1863
|
}
|
|
1796
1864
|
) : null,
|
|
1797
1865
|
attachments && !isEditing ? /* @__PURE__ */ jsx(UploadQueueStrip, {}) : null,
|
|
1798
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
1866
|
+
/* @__PURE__ */ jsxs(View, { style: styles10.row, children: [
|
|
1799
1867
|
attachments && onAttachPress ? /* @__PURE__ */ jsx(
|
|
1800
1868
|
Pressable,
|
|
1801
1869
|
{
|
|
1802
1870
|
onPress: onAttachPress,
|
|
1803
1871
|
hitSlop: 8,
|
|
1804
|
-
style:
|
|
1872
|
+
style: styles10.iconBtn,
|
|
1805
1873
|
accessibilityLabel: "Attach file",
|
|
1806
1874
|
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "attachment", size: 22, color: theme.colors.ink2 })
|
|
1807
1875
|
}
|
|
@@ -1820,7 +1888,7 @@ var MessageComposer = forwardRef(
|
|
|
1820
1888
|
multiline: true,
|
|
1821
1889
|
editable: !disabled,
|
|
1822
1890
|
style: [
|
|
1823
|
-
|
|
1891
|
+
styles10.input,
|
|
1824
1892
|
{
|
|
1825
1893
|
color: theme.colors.ink,
|
|
1826
1894
|
backgroundColor: theme.colors.surface2,
|
|
@@ -1837,7 +1905,7 @@ var MessageComposer = forwardRef(
|
|
|
1837
1905
|
onPress: handleSend,
|
|
1838
1906
|
disabled: submitDisabled,
|
|
1839
1907
|
style: [
|
|
1840
|
-
|
|
1908
|
+
styles10.sendBtn,
|
|
1841
1909
|
{
|
|
1842
1910
|
backgroundColor: submitDisabled ? theme.colors.ink3 : theme.colors.brand,
|
|
1843
1911
|
opacity: submitDisabled ? 0.6 : 1
|
|
@@ -1859,7 +1927,7 @@ function EditChip({ message, onCancel }) {
|
|
|
1859
1927
|
View,
|
|
1860
1928
|
{
|
|
1861
1929
|
style: [
|
|
1862
|
-
|
|
1930
|
+
styles10.replyChip,
|
|
1863
1931
|
{
|
|
1864
1932
|
backgroundColor: theme.colors.surface2,
|
|
1865
1933
|
borderLeftColor: theme.colors.brand
|
|
@@ -1867,10 +1935,10 @@ function EditChip({ message, onCancel }) {
|
|
|
1867
1935
|
],
|
|
1868
1936
|
children: [
|
|
1869
1937
|
/* @__PURE__ */ jsxs(View, { style: { flex: 1 }, children: [
|
|
1870
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1871
|
-
/* @__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" })
|
|
1872
1940
|
] }),
|
|
1873
|
-
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
|
|
1874
1942
|
]
|
|
1875
1943
|
}
|
|
1876
1944
|
);
|
|
@@ -1887,7 +1955,7 @@ function ReplyChip({
|
|
|
1887
1955
|
View,
|
|
1888
1956
|
{
|
|
1889
1957
|
style: [
|
|
1890
|
-
|
|
1958
|
+
styles10.replyChip,
|
|
1891
1959
|
{
|
|
1892
1960
|
backgroundColor: theme.colors.surface2,
|
|
1893
1961
|
borderLeftColor: theme.colors.brand
|
|
@@ -1895,18 +1963,18 @@ function ReplyChip({
|
|
|
1895
1963
|
],
|
|
1896
1964
|
children: [
|
|
1897
1965
|
/* @__PURE__ */ jsxs(View, { style: { flex: 1 }, children: [
|
|
1898
|
-
/* @__PURE__ */ jsxs(Text, { style: [
|
|
1966
|
+
/* @__PURE__ */ jsxs(Text, { style: [styles10.replyName, { color: theme.colors.brand }], children: [
|
|
1899
1967
|
"Replying to ",
|
|
1900
1968
|
senderName
|
|
1901
1969
|
] }),
|
|
1902
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
1970
|
+
/* @__PURE__ */ jsx(Text, { style: [styles10.replyBody, { color: theme.colors.ink2 }], numberOfLines: 1, children: message.body ?? "\u2026" })
|
|
1903
1971
|
] }),
|
|
1904
|
-
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
|
|
1905
1973
|
]
|
|
1906
1974
|
}
|
|
1907
1975
|
);
|
|
1908
1976
|
}
|
|
1909
|
-
var
|
|
1977
|
+
var styles10 = StyleSheet.create({
|
|
1910
1978
|
wrap: {
|
|
1911
1979
|
borderTopWidth: StyleSheet.hairlineWidth,
|
|
1912
1980
|
paddingTop: 8,
|
|
@@ -2006,11 +2074,11 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2006
2074
|
animationType: "slide",
|
|
2007
2075
|
onRequestClose: () => setPickerOpen(false),
|
|
2008
2076
|
...EDGE_TO_EDGE_MODAL,
|
|
2009
|
-
children: /* @__PURE__ */ jsx(KeyboardAvoidingView, { style:
|
|
2077
|
+
children: /* @__PURE__ */ jsx(KeyboardAvoidingView, { style: styles11.kav, behavior: "padding", children: /* @__PURE__ */ jsx(Pressable, { style: styles11.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxs(
|
|
2010
2078
|
View,
|
|
2011
2079
|
{
|
|
2012
2080
|
style: [
|
|
2013
|
-
|
|
2081
|
+
styles11.sheet,
|
|
2014
2082
|
{
|
|
2015
2083
|
backgroundColor: theme.colors.surface,
|
|
2016
2084
|
borderTopLeftRadius: theme.radii.lg,
|
|
@@ -2026,7 +2094,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2026
2094
|
/* @__PURE__ */ jsx(
|
|
2027
2095
|
Text,
|
|
2028
2096
|
{
|
|
2029
|
-
style: [
|
|
2097
|
+
style: [styles11.title, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
|
|
2030
2098
|
children: "Mention a member"
|
|
2031
2099
|
}
|
|
2032
2100
|
),
|
|
@@ -2058,12 +2126,12 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2058
2126
|
}
|
|
2059
2127
|
function MentionRow({ member, onPress }) {
|
|
2060
2128
|
const theme = usePoolseTheme();
|
|
2061
|
-
return /* @__PURE__ */ jsxs(Pressable, { onPress, style:
|
|
2129
|
+
return /* @__PURE__ */ jsxs(Pressable, { onPress, style: styles11.row, children: [
|
|
2062
2130
|
/* @__PURE__ */ jsx(Avatar, { src: null, name: member.external_id, seed: member.external_id, size: "sm" }),
|
|
2063
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2131
|
+
/* @__PURE__ */ jsx(Text, { style: [styles11.rowText, { color: theme.colors.ink, fontFamily: theme.type.fontBody }], children: member.external_id })
|
|
2064
2132
|
] });
|
|
2065
2133
|
}
|
|
2066
|
-
var
|
|
2134
|
+
var styles11 = StyleSheet.create({
|
|
2067
2135
|
kav: {
|
|
2068
2136
|
flex: 1
|
|
2069
2137
|
},
|
|
@@ -2146,12 +2214,12 @@ function MessageList({
|
|
|
2146
2214
|
[renderItem, data.length]
|
|
2147
2215
|
);
|
|
2148
2216
|
if (loading && messages.length === 0) {
|
|
2149
|
-
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 }) });
|
|
2150
2218
|
}
|
|
2151
2219
|
if (messages.length === 0) {
|
|
2152
|
-
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 });
|
|
2153
2221
|
}
|
|
2154
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
2222
|
+
return /* @__PURE__ */ jsxs(View, { style: styles12.root, children: [
|
|
2155
2223
|
/* @__PURE__ */ jsx(
|
|
2156
2224
|
FlatList,
|
|
2157
2225
|
{
|
|
@@ -2178,7 +2246,7 @@ function MessageList({
|
|
|
2178
2246
|
{
|
|
2179
2247
|
onPress: scrollToBottom,
|
|
2180
2248
|
style: [
|
|
2181
|
-
|
|
2249
|
+
styles12.jumpButton,
|
|
2182
2250
|
{
|
|
2183
2251
|
backgroundColor: theme.colors.brand
|
|
2184
2252
|
},
|
|
@@ -2187,7 +2255,7 @@ function MessageList({
|
|
|
2187
2255
|
accessibilityLabel: `${newCount} new ${newCount === 1 ? "message" : "messages"}, jump to latest`,
|
|
2188
2256
|
children: [
|
|
2189
2257
|
/* @__PURE__ */ jsx(PoolseIcon, { name: "chevron-down", size: 14, color: theme.colors.onBrand }),
|
|
2190
|
-
/* @__PURE__ */ jsxs(Text, { style: [
|
|
2258
|
+
/* @__PURE__ */ jsxs(Text, { style: [styles12.jumpText, { color: theme.colors.onBrand }], children: [
|
|
2191
2259
|
newCount,
|
|
2192
2260
|
" new ",
|
|
2193
2261
|
newCount === 1 ? "message" : "messages"
|
|
@@ -2197,7 +2265,7 @@ function MessageList({
|
|
|
2197
2265
|
) : null
|
|
2198
2266
|
] });
|
|
2199
2267
|
}
|
|
2200
|
-
var
|
|
2268
|
+
var styles12 = StyleSheet.create({
|
|
2201
2269
|
root: {
|
|
2202
2270
|
flex: 1
|
|
2203
2271
|
},
|
|
@@ -2223,64 +2291,90 @@ var styles11 = StyleSheet.create({
|
|
|
2223
2291
|
fontWeight: "600"
|
|
2224
2292
|
}
|
|
2225
2293
|
});
|
|
2226
|
-
function CallLogRow({ msg, meId }) {
|
|
2294
|
+
function CallLogRow({ msg, meId, onCallBack }) {
|
|
2227
2295
|
const theme = usePoolseTheme();
|
|
2228
2296
|
const display = callLogDisplayFor(msg, meId);
|
|
2229
2297
|
if (!display) return null;
|
|
2230
2298
|
const accent = display.missed ? theme.colors.error : theme.colors.ink3;
|
|
2231
2299
|
const time = formatTime(msg.inserted_at);
|
|
2232
2300
|
const label = [display.title, display.detail, time].filter(Boolean).join(", ");
|
|
2233
|
-
const metaStyle = [
|
|
2234
|
-
return /* @__PURE__ */
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
|
|
2242
|
-
|
|
2243
|
-
|
|
2244
|
-
|
|
2245
|
-
|
|
2246
|
-
|
|
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(
|
|
2247
2349
|
Text,
|
|
2248
2350
|
{
|
|
2249
2351
|
style: [
|
|
2250
|
-
|
|
2251
|
-
{
|
|
2252
|
-
color: display.missed ? theme.colors.error : theme.colors.ink2,
|
|
2253
|
-
fontFamily: theme.type.fontBody
|
|
2254
|
-
}
|
|
2352
|
+
styles13.callBackText,
|
|
2353
|
+
{ color: theme.colors.brand, fontFamily: theme.type.fontBody }
|
|
2255
2354
|
],
|
|
2256
|
-
|
|
2257
|
-
children: display.title
|
|
2355
|
+
children: "Call back"
|
|
2258
2356
|
}
|
|
2259
|
-
)
|
|
2260
|
-
|
|
2261
|
-
|
|
2262
|
-
|
|
2263
|
-
] }) : null,
|
|
2264
|
-
time ? /* @__PURE__ */ jsxs(Text, { style: metaStyle, children: [
|
|
2265
|
-
"\xB7 ",
|
|
2266
|
-
time
|
|
2267
|
-
] }) : null
|
|
2268
|
-
]
|
|
2269
|
-
}
|
|
2270
|
-
) });
|
|
2357
|
+
)
|
|
2358
|
+
}
|
|
2359
|
+
) : null
|
|
2360
|
+
] });
|
|
2271
2361
|
}
|
|
2272
2362
|
function formatTime(iso) {
|
|
2273
2363
|
const d = new Date(iso);
|
|
2274
2364
|
if (Number.isNaN(d.getTime())) return "";
|
|
2275
2365
|
return d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
|
|
2276
2366
|
}
|
|
2277
|
-
var
|
|
2367
|
+
var styles13 = StyleSheet.create({
|
|
2278
2368
|
wrap: {
|
|
2279
2369
|
alignItems: "center",
|
|
2280
2370
|
alignSelf: "stretch",
|
|
2281
2371
|
marginVertical: 6,
|
|
2282
|
-
paddingHorizontal: 16
|
|
2372
|
+
paddingHorizontal: 16,
|
|
2373
|
+
gap: 4
|
|
2283
2374
|
},
|
|
2375
|
+
callBack: { paddingHorizontal: 10, paddingVertical: 2 },
|
|
2376
|
+
callBackPressed: { opacity: 0.6 },
|
|
2377
|
+
callBackText: { fontSize: 12, fontWeight: "600" },
|
|
2284
2378
|
chip: {
|
|
2285
2379
|
flexDirection: "row",
|
|
2286
2380
|
alignItems: "center",
|
|
@@ -2338,11 +2432,11 @@ function MessageActions({
|
|
|
2338
2432
|
animationType: "fade",
|
|
2339
2433
|
onRequestClose: onClose,
|
|
2340
2434
|
...EDGE_TO_EDGE_MODAL,
|
|
2341
|
-
children: /* @__PURE__ */ jsx(Pressable, { style:
|
|
2435
|
+
children: /* @__PURE__ */ jsx(Pressable, { style: styles14.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs(
|
|
2342
2436
|
View,
|
|
2343
2437
|
{
|
|
2344
2438
|
style: [
|
|
2345
|
-
|
|
2439
|
+
styles14.sheet,
|
|
2346
2440
|
{
|
|
2347
2441
|
backgroundColor: theme.colors.surface,
|
|
2348
2442
|
borderTopLeftRadius: theme.radii.lg,
|
|
@@ -2355,21 +2449,21 @@ function MessageActions({
|
|
|
2355
2449
|
theme.shadows.lg
|
|
2356
2450
|
],
|
|
2357
2451
|
children: [
|
|
2358
|
-
showEmojiRow ? /* @__PURE__ */ jsx(View, { style: [
|
|
2452
|
+
showEmojiRow ? /* @__PURE__ */ jsx(View, { style: [styles14.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsx(
|
|
2359
2453
|
Pressable,
|
|
2360
2454
|
{
|
|
2361
2455
|
onPress: () => {
|
|
2362
2456
|
onPickReaction(emoji);
|
|
2363
2457
|
onClose();
|
|
2364
2458
|
},
|
|
2365
|
-
style:
|
|
2459
|
+
style: styles14.emojiBtn,
|
|
2366
2460
|
hitSlop: 6,
|
|
2367
2461
|
accessibilityLabel: `React with ${emoji}`,
|
|
2368
|
-
children: /* @__PURE__ */ jsx(Text, { style:
|
|
2462
|
+
children: /* @__PURE__ */ jsx(Text, { style: styles14.emoji, children: emoji })
|
|
2369
2463
|
},
|
|
2370
2464
|
emoji
|
|
2371
2465
|
)) }) : null,
|
|
2372
|
-
items.map((item) => /* @__PURE__ */ jsxs(Pressable, { onPress: item.onPress, style:
|
|
2466
|
+
items.map((item) => /* @__PURE__ */ jsxs(Pressable, { onPress: item.onPress, style: styles14.item, children: [
|
|
2373
2467
|
/* @__PURE__ */ jsx(
|
|
2374
2468
|
PoolseIcon,
|
|
2375
2469
|
{
|
|
@@ -2382,7 +2476,7 @@ function MessageActions({
|
|
|
2382
2476
|
Text,
|
|
2383
2477
|
{
|
|
2384
2478
|
style: [
|
|
2385
|
-
|
|
2479
|
+
styles14.itemText,
|
|
2386
2480
|
{
|
|
2387
2481
|
color: item.danger ? theme.colors.error : theme.colors.ink,
|
|
2388
2482
|
fontFamily: theme.type.fontBody
|
|
@@ -2398,7 +2492,7 @@ function MessageActions({
|
|
|
2398
2492
|
}
|
|
2399
2493
|
);
|
|
2400
2494
|
}
|
|
2401
|
-
var
|
|
2495
|
+
var styles14 = StyleSheet.create({
|
|
2402
2496
|
backdrop: {
|
|
2403
2497
|
flex: 1,
|
|
2404
2498
|
backgroundColor: "rgba(0,0,0,0.35)",
|
|
@@ -2468,7 +2562,7 @@ function AttachmentPreview({
|
|
|
2468
2562
|
View,
|
|
2469
2563
|
{
|
|
2470
2564
|
style: [
|
|
2471
|
-
|
|
2565
|
+
styles15.imagePlaceholder,
|
|
2472
2566
|
{
|
|
2473
2567
|
width: maxWidth,
|
|
2474
2568
|
height: 200,
|
|
@@ -2488,7 +2582,7 @@ function AttachmentPreview({
|
|
|
2488
2582
|
onPress,
|
|
2489
2583
|
disabled: !onPress,
|
|
2490
2584
|
style: [
|
|
2491
|
-
|
|
2585
|
+
styles15.fileCard,
|
|
2492
2586
|
{
|
|
2493
2587
|
backgroundColor: onBrand ? "rgba(255,255,255,0.18)" : theme.colors.surface2,
|
|
2494
2588
|
borderColor: onBrand ? "transparent" : theme.colors.border,
|
|
@@ -2501,12 +2595,12 @@ function AttachmentPreview({
|
|
|
2501
2595
|
/* @__PURE__ */ jsx(
|
|
2502
2596
|
Text,
|
|
2503
2597
|
{
|
|
2504
|
-
style: [
|
|
2598
|
+
style: [styles15.fileName, { color: ink, fontFamily: theme.type.fontBody }],
|
|
2505
2599
|
numberOfLines: 1,
|
|
2506
2600
|
children: attachment.original_filename ?? "file"
|
|
2507
2601
|
}
|
|
2508
2602
|
),
|
|
2509
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2603
|
+
/* @__PURE__ */ jsx(Text, { style: [styles15.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes2(attachment.byte_size) })
|
|
2510
2604
|
] })
|
|
2511
2605
|
]
|
|
2512
2606
|
}
|
|
@@ -2518,7 +2612,7 @@ function formatBytes2(n) {
|
|
|
2518
2612
|
if (n < 1024 * 1024 * 1024) return `${(n / 1024 / 1024).toFixed(1)} MB`;
|
|
2519
2613
|
return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
|
|
2520
2614
|
}
|
|
2521
|
-
var
|
|
2615
|
+
var styles15 = StyleSheet.create({
|
|
2522
2616
|
imagePlaceholder: {},
|
|
2523
2617
|
fileCard: {
|
|
2524
2618
|
flexDirection: "row",
|
|
@@ -2554,7 +2648,7 @@ function ImageMosaic({
|
|
|
2554
2648
|
View,
|
|
2555
2649
|
{
|
|
2556
2650
|
style: [
|
|
2557
|
-
|
|
2651
|
+
styles16.root,
|
|
2558
2652
|
{
|
|
2559
2653
|
borderTopLeftRadius: r,
|
|
2560
2654
|
borderTopRightRadius: r,
|
|
@@ -2575,18 +2669,18 @@ function ImageMosaic({
|
|
|
2575
2669
|
{
|
|
2576
2670
|
onLongPress,
|
|
2577
2671
|
attachment: visible[0],
|
|
2578
|
-
style:
|
|
2672
|
+
style: styles16.tileFull,
|
|
2579
2673
|
onPress: () => setViewerIndex(0),
|
|
2580
2674
|
overlay: null
|
|
2581
2675
|
}
|
|
2582
2676
|
) : null,
|
|
2583
|
-
n === 2 ? /* @__PURE__ */ jsxs(View, { style:
|
|
2677
|
+
n === 2 ? /* @__PURE__ */ jsxs(View, { style: styles16.rowEven, children: [
|
|
2584
2678
|
/* @__PURE__ */ jsx(
|
|
2585
2679
|
Tile,
|
|
2586
2680
|
{
|
|
2587
2681
|
onLongPress,
|
|
2588
2682
|
attachment: visible[0],
|
|
2589
|
-
style:
|
|
2683
|
+
style: styles16.tileHalfSquare,
|
|
2590
2684
|
onPress: () => setViewerIndex(0),
|
|
2591
2685
|
overlay: null
|
|
2592
2686
|
}
|
|
@@ -2596,7 +2690,7 @@ function ImageMosaic({
|
|
|
2596
2690
|
{
|
|
2597
2691
|
onLongPress,
|
|
2598
2692
|
attachment: visible[1],
|
|
2599
|
-
style:
|
|
2693
|
+
style: styles16.tileHalfSquare,
|
|
2600
2694
|
onPress: () => setViewerIndex(1),
|
|
2601
2695
|
overlay: null
|
|
2602
2696
|
}
|
|
@@ -2608,18 +2702,18 @@ function ImageMosaic({
|
|
|
2608
2702
|
{
|
|
2609
2703
|
onLongPress,
|
|
2610
2704
|
attachment: visible[0],
|
|
2611
|
-
style:
|
|
2705
|
+
style: styles16.tileHero,
|
|
2612
2706
|
onPress: () => setViewerIndex(0),
|
|
2613
2707
|
overlay: null
|
|
2614
2708
|
}
|
|
2615
2709
|
),
|
|
2616
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
2710
|
+
/* @__PURE__ */ jsxs(View, { style: [styles16.rowEven, { marginTop: 2 }], children: [
|
|
2617
2711
|
/* @__PURE__ */ jsx(
|
|
2618
2712
|
Tile,
|
|
2619
2713
|
{
|
|
2620
2714
|
onLongPress,
|
|
2621
2715
|
attachment: visible[1],
|
|
2622
|
-
style:
|
|
2716
|
+
style: styles16.tileHalfSquare,
|
|
2623
2717
|
onPress: () => setViewerIndex(1),
|
|
2624
2718
|
overlay: null
|
|
2625
2719
|
}
|
|
@@ -2629,7 +2723,7 @@ function ImageMosaic({
|
|
|
2629
2723
|
{
|
|
2630
2724
|
onLongPress,
|
|
2631
2725
|
attachment: visible[2],
|
|
2632
|
-
style:
|
|
2726
|
+
style: styles16.tileHalfSquare,
|
|
2633
2727
|
onPress: () => setViewerIndex(2),
|
|
2634
2728
|
overlay: null
|
|
2635
2729
|
}
|
|
@@ -2637,13 +2731,13 @@ function ImageMosaic({
|
|
|
2637
2731
|
] })
|
|
2638
2732
|
] }) : null,
|
|
2639
2733
|
n === 4 ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
2640
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
2734
|
+
/* @__PURE__ */ jsxs(View, { style: styles16.rowEven, children: [
|
|
2641
2735
|
/* @__PURE__ */ jsx(
|
|
2642
2736
|
Tile,
|
|
2643
2737
|
{
|
|
2644
2738
|
onLongPress,
|
|
2645
2739
|
attachment: visible[0],
|
|
2646
|
-
style:
|
|
2740
|
+
style: styles16.tileHalfSquare,
|
|
2647
2741
|
onPress: () => setViewerIndex(0),
|
|
2648
2742
|
overlay: null
|
|
2649
2743
|
}
|
|
@@ -2653,19 +2747,19 @@ function ImageMosaic({
|
|
|
2653
2747
|
{
|
|
2654
2748
|
onLongPress,
|
|
2655
2749
|
attachment: visible[1],
|
|
2656
|
-
style:
|
|
2750
|
+
style: styles16.tileHalfSquare,
|
|
2657
2751
|
onPress: () => setViewerIndex(1),
|
|
2658
2752
|
overlay: null
|
|
2659
2753
|
}
|
|
2660
2754
|
)
|
|
2661
2755
|
] }),
|
|
2662
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
2756
|
+
/* @__PURE__ */ jsxs(View, { style: [styles16.rowEven, { marginTop: 2 }], children: [
|
|
2663
2757
|
/* @__PURE__ */ jsx(
|
|
2664
2758
|
Tile,
|
|
2665
2759
|
{
|
|
2666
2760
|
onLongPress,
|
|
2667
2761
|
attachment: visible[2],
|
|
2668
|
-
style:
|
|
2762
|
+
style: styles16.tileHalfSquare,
|
|
2669
2763
|
onPress: () => setViewerIndex(2),
|
|
2670
2764
|
overlay: null
|
|
2671
2765
|
}
|
|
@@ -2675,7 +2769,7 @@ function ImageMosaic({
|
|
|
2675
2769
|
{
|
|
2676
2770
|
onLongPress,
|
|
2677
2771
|
attachment: visible[3],
|
|
2678
|
-
style:
|
|
2772
|
+
style: styles16.tileHalfSquare,
|
|
2679
2773
|
onPress: () => setViewerIndex(3),
|
|
2680
2774
|
overlay: overflow > 0 ? `+${overflow}` : null
|
|
2681
2775
|
}
|
|
@@ -2713,18 +2807,18 @@ function Tile({
|
|
|
2713
2807
|
}) {
|
|
2714
2808
|
const theme = usePoolseTheme();
|
|
2715
2809
|
const { url } = useAttachmentUrl(attachment.id);
|
|
2716
|
-
return /* @__PURE__ */ jsxs(Pressable, { onPress, onLongPress, style: [
|
|
2810
|
+
return /* @__PURE__ */ jsxs(Pressable, { onPress, onLongPress, style: [styles16.tileBase, style], children: [
|
|
2717
2811
|
url ? /* @__PURE__ */ jsx(
|
|
2718
2812
|
Image,
|
|
2719
2813
|
{
|
|
2720
2814
|
source: { uri: url },
|
|
2721
|
-
style: [
|
|
2815
|
+
style: [styles16.tileImage, { backgroundColor: theme.colors.surface2 }],
|
|
2722
2816
|
resizeMode: "cover",
|
|
2723
2817
|
accessible: true,
|
|
2724
2818
|
accessibilityLabel: attachment.original_filename ?? "image"
|
|
2725
2819
|
}
|
|
2726
|
-
) : /* @__PURE__ */ jsx(View, { style: [
|
|
2727
|
-
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
|
|
2728
2822
|
] });
|
|
2729
2823
|
}
|
|
2730
2824
|
function FullScreenViewer({
|
|
@@ -2734,7 +2828,7 @@ function FullScreenViewer({
|
|
|
2734
2828
|
const { url } = useAttachmentUrl(attachment.id);
|
|
2735
2829
|
const { width, height } = useWindowDimensions();
|
|
2736
2830
|
const insets = useSafeInsets();
|
|
2737
|
-
return /* @__PURE__ */ jsxs(Pressable, { style:
|
|
2831
|
+
return /* @__PURE__ */ jsxs(Pressable, { style: styles16.viewer, onPress: onClose, children: [
|
|
2738
2832
|
url ? /* @__PURE__ */ jsx(
|
|
2739
2833
|
Image,
|
|
2740
2834
|
{
|
|
@@ -2750,14 +2844,14 @@ function FullScreenViewer({
|
|
|
2750
2844
|
{
|
|
2751
2845
|
onPress: onClose,
|
|
2752
2846
|
hitSlop: 12,
|
|
2753
|
-
style: [
|
|
2847
|
+
style: [styles16.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
|
|
2754
2848
|
accessibilityLabel: "Close viewer",
|
|
2755
2849
|
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
|
|
2756
2850
|
}
|
|
2757
2851
|
)
|
|
2758
2852
|
] });
|
|
2759
2853
|
}
|
|
2760
|
-
var
|
|
2854
|
+
var styles16 = StyleSheet.create({
|
|
2761
2855
|
root: {
|
|
2762
2856
|
width: "100%",
|
|
2763
2857
|
overflow: "hidden",
|
|
@@ -2946,22 +3040,22 @@ function MessageBubble({
|
|
|
2946
3040
|
View,
|
|
2947
3041
|
{
|
|
2948
3042
|
style: [
|
|
2949
|
-
|
|
2950
|
-
variant === "inline" &&
|
|
2951
|
-
variant === "wrapped" &&
|
|
2952
|
-
variant === "overlay" &&
|
|
2953
|
-
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,
|
|
2954
3048
|
// File-only bubble: the meta row follows the cards directly —
|
|
2955
3049
|
// give it air so the time doesn't sit glued to the card.
|
|
2956
|
-
variant === "block" && hasFiles && !hasBody &&
|
|
2957
|
-
variant === "jumbo" &&
|
|
3050
|
+
variant === "block" && hasFiles && !hasBody && styles17.metaBlockAfterFiles,
|
|
3051
|
+
variant === "jumbo" && styles17.metaJumbo
|
|
2958
3052
|
],
|
|
2959
3053
|
onLayout: variant === "inline" || variant === "wrapped" ? (e) => setMetaWidth(e.nativeEvent.layout.width) : void 0,
|
|
2960
3054
|
pointerEvents: "none",
|
|
2961
3055
|
children: [
|
|
2962
|
-
isEdited ? /* @__PURE__ */ jsx(Text, { style: [
|
|
2963
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
2964
|
-
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(
|
|
2965
3059
|
PoolseIcon,
|
|
2966
3060
|
{
|
|
2967
3061
|
name: readState === "read" ? "check-double" : "check",
|
|
@@ -2973,7 +3067,7 @@ function MessageBubble({
|
|
|
2973
3067
|
}
|
|
2974
3068
|
);
|
|
2975
3069
|
};
|
|
2976
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
3070
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles17.wrap, { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }], children: [
|
|
2977
3071
|
/* @__PURE__ */ jsxs(
|
|
2978
3072
|
View,
|
|
2979
3073
|
{
|
|
@@ -2993,7 +3087,7 @@ function MessageBubble({
|
|
|
2993
3087
|
showSenderName && !isSelf && jumboCount === 0 && (groupPosition === "first" || groupPosition === "standalone") ? /* @__PURE__ */ jsx(
|
|
2994
3088
|
Text,
|
|
2995
3089
|
{
|
|
2996
|
-
style: [
|
|
3090
|
+
style: [styles17.senderName, { color: senderTint, fontFamily: theme.type.fontBody }],
|
|
2997
3091
|
children: senderLabel
|
|
2998
3092
|
}
|
|
2999
3093
|
) : null,
|
|
@@ -3010,7 +3104,7 @@ function MessageBubble({
|
|
|
3010
3104
|
// 3px of bubble color framing the picture; the mosaic clips
|
|
3011
3105
|
// itself 3px tighter than the bubble so the curves stay
|
|
3012
3106
|
// concentric.
|
|
3013
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3107
|
+
/* @__PURE__ */ jsxs(View, { style: styles17.mediaFrame, children: [
|
|
3014
3108
|
/* @__PURE__ */ jsx(
|
|
3015
3109
|
ImageMosaic,
|
|
3016
3110
|
{
|
|
@@ -3024,7 +3118,7 @@ function MessageBubble({
|
|
|
3024
3118
|
metaOverlay ? metaRow("overlay") : null
|
|
3025
3119
|
] })
|
|
3026
3120
|
) : null,
|
|
3027
|
-
hasFiles ? /* @__PURE__ */ jsx(View, { style:
|
|
3121
|
+
hasFiles ? /* @__PURE__ */ jsx(View, { style: styles17.filesBlock, children: files.map((att) => /* @__PURE__ */ jsx(
|
|
3028
3122
|
AttachmentPreview,
|
|
3029
3123
|
{
|
|
3030
3124
|
attachment: att,
|
|
@@ -3033,7 +3127,7 @@ function MessageBubble({
|
|
|
3033
3127
|
},
|
|
3034
3128
|
att.id
|
|
3035
3129
|
)) }) : null,
|
|
3036
|
-
isDeleted ? /* @__PURE__ */ jsx(View, { style: [
|
|
3130
|
+
isDeleted ? /* @__PURE__ */ jsx(View, { style: [styles17.textBlock, sectionAbove && styles17.textBlockAfter], children: /* @__PURE__ */ jsx(
|
|
3037
3131
|
Text,
|
|
3038
3132
|
{
|
|
3039
3133
|
style: {
|
|
@@ -3047,7 +3141,7 @@ function MessageBubble({
|
|
|
3047
3141
|
children: "Message deleted"
|
|
3048
3142
|
}
|
|
3049
3143
|
) }) : null,
|
|
3050
|
-
hasBody && jumboCount > 0 ? /* @__PURE__ */ jsx(View, { style:
|
|
3144
|
+
hasBody && jumboCount > 0 ? /* @__PURE__ */ jsx(View, { style: styles17.jumboBlock, children: /* @__PURE__ */ jsx(
|
|
3051
3145
|
Text,
|
|
3052
3146
|
{
|
|
3053
3147
|
style: { fontSize: emojiFontSize(jumboCount), lineHeight: emojiFontSize(jumboCount) + 8 },
|
|
@@ -3057,7 +3151,7 @@ function MessageBubble({
|
|
|
3057
3151
|
hasBody && jumboCount === 0 ? /* @__PURE__ */ jsxs(
|
|
3058
3152
|
View,
|
|
3059
3153
|
{
|
|
3060
|
-
style: [
|
|
3154
|
+
style: [styles17.textBlock, sectionAbove && styles17.textBlockAfter],
|
|
3061
3155
|
onLayout: inlineMeta ? (e) => setTextBoxWidth(e.nativeEvent.layout.width - 24) : void 0,
|
|
3062
3156
|
children: [
|
|
3063
3157
|
markdown && !inlineMeta ? renderMarkdown(truncated, {
|
|
@@ -3091,7 +3185,7 @@ function MessageBubble({
|
|
|
3091
3185
|
Text,
|
|
3092
3186
|
{
|
|
3093
3187
|
style: [
|
|
3094
|
-
|
|
3188
|
+
styles17.readMore,
|
|
3095
3189
|
{ color: isSelf ? theme.colors.onBrand : theme.colors.brand }
|
|
3096
3190
|
],
|
|
3097
3191
|
children: expanded ? "Show less" : "Read more"
|
|
@@ -3102,7 +3196,7 @@ function MessageBubble({
|
|
|
3102
3196
|
}
|
|
3103
3197
|
) : null,
|
|
3104
3198
|
!inlineMeta && !metaOverlay && jumboCount === 0 ? metaRow("block") : null,
|
|
3105
|
-
actionsTrigger ? /* @__PURE__ */ jsx(View, { style:
|
|
3199
|
+
actionsTrigger ? /* @__PURE__ */ jsx(View, { style: styles17.actionsSlot, children: actionsTrigger }) : null
|
|
3106
3200
|
]
|
|
3107
3201
|
}
|
|
3108
3202
|
),
|
|
@@ -3127,15 +3221,15 @@ function QuotedCard({
|
|
|
3127
3221
|
onPress,
|
|
3128
3222
|
disabled: !onPress,
|
|
3129
3223
|
style: [
|
|
3130
|
-
|
|
3224
|
+
styles17.quoted,
|
|
3131
3225
|
{
|
|
3132
3226
|
backgroundColor: bg,
|
|
3133
3227
|
borderLeftColor: accent
|
|
3134
3228
|
}
|
|
3135
3229
|
],
|
|
3136
3230
|
children: [
|
|
3137
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
3138
|
-
/* @__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" })
|
|
3139
3233
|
]
|
|
3140
3234
|
}
|
|
3141
3235
|
);
|
|
@@ -3167,7 +3261,7 @@ function formatTime2(iso) {
|
|
|
3167
3261
|
function isSameDay(a, b) {
|
|
3168
3262
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
3169
3263
|
}
|
|
3170
|
-
var
|
|
3264
|
+
var styles17 = StyleSheet.create({
|
|
3171
3265
|
wrap: {
|
|
3172
3266
|
marginBottom: 2
|
|
3173
3267
|
},
|
|
@@ -3294,7 +3388,7 @@ function ReactionStrip({
|
|
|
3294
3388
|
});
|
|
3295
3389
|
const entries = Object.entries(reactions);
|
|
3296
3390
|
if (entries.length === 0) return null;
|
|
3297
|
-
return /* @__PURE__ */ jsx(View, { style:
|
|
3391
|
+
return /* @__PURE__ */ jsx(View, { style: styles18.strip, children: entries.map(([emoji, userIds]) => {
|
|
3298
3392
|
const userArr = Array.isArray(userIds) ? userIds : [];
|
|
3299
3393
|
const meReacted = meId !== null && userArr.includes(meId);
|
|
3300
3394
|
return /* @__PURE__ */ jsxs(
|
|
@@ -3302,7 +3396,7 @@ function ReactionStrip({
|
|
|
3302
3396
|
{
|
|
3303
3397
|
onPress: () => meReacted ? removeReaction(emoji) : addReaction(emoji),
|
|
3304
3398
|
style: [
|
|
3305
|
-
|
|
3399
|
+
styles18.chip,
|
|
3306
3400
|
{
|
|
3307
3401
|
backgroundColor: meReacted ? theme.colors.brandSoft : theme.colors.surface2,
|
|
3308
3402
|
borderColor: meReacted ? theme.colors.brand : theme.colors.border,
|
|
@@ -3311,12 +3405,12 @@ function ReactionStrip({
|
|
|
3311
3405
|
}
|
|
3312
3406
|
],
|
|
3313
3407
|
children: [
|
|
3314
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
3408
|
+
/* @__PURE__ */ jsx(Text, { style: styles18.emoji, children: emoji }),
|
|
3315
3409
|
/* @__PURE__ */ jsx(
|
|
3316
3410
|
Text,
|
|
3317
3411
|
{
|
|
3318
3412
|
style: [
|
|
3319
|
-
|
|
3413
|
+
styles18.count,
|
|
3320
3414
|
{
|
|
3321
3415
|
color: meReacted ? theme.colors.brand : theme.colors.ink2,
|
|
3322
3416
|
fontWeight: meReacted ? "700" : "600"
|
|
@@ -3350,13 +3444,13 @@ function ReactionPicker({
|
|
|
3350
3444
|
children: /* @__PURE__ */ jsx(
|
|
3351
3445
|
Pressable,
|
|
3352
3446
|
{
|
|
3353
|
-
style: [
|
|
3447
|
+
style: [styles18.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
|
|
3354
3448
|
onPress: onClose,
|
|
3355
3449
|
children: /* @__PURE__ */ jsx(
|
|
3356
3450
|
View,
|
|
3357
3451
|
{
|
|
3358
3452
|
style: [
|
|
3359
|
-
|
|
3453
|
+
styles18.sheet,
|
|
3360
3454
|
{
|
|
3361
3455
|
backgroundColor: theme.colors.surface,
|
|
3362
3456
|
borderRadius: theme.radii.lg
|
|
@@ -3366,12 +3460,12 @@ function ReactionPicker({
|
|
|
3366
3460
|
children: emojis.map((emoji) => /* @__PURE__ */ jsx(
|
|
3367
3461
|
Pressable,
|
|
3368
3462
|
{
|
|
3369
|
-
style:
|
|
3463
|
+
style: styles18.emojiBtn,
|
|
3370
3464
|
onPress: () => {
|
|
3371
3465
|
onPick(emoji);
|
|
3372
3466
|
onClose();
|
|
3373
3467
|
},
|
|
3374
|
-
children: /* @__PURE__ */ jsx(Text, { style:
|
|
3468
|
+
children: /* @__PURE__ */ jsx(Text, { style: styles18.bigEmoji, children: emoji })
|
|
3375
3469
|
},
|
|
3376
3470
|
emoji
|
|
3377
3471
|
))
|
|
@@ -3382,7 +3476,7 @@ function ReactionPicker({
|
|
|
3382
3476
|
}
|
|
3383
3477
|
);
|
|
3384
3478
|
}
|
|
3385
|
-
var
|
|
3479
|
+
var styles18 = StyleSheet.create({
|
|
3386
3480
|
strip: {
|
|
3387
3481
|
flexDirection: "row",
|
|
3388
3482
|
flexWrap: "wrap",
|
|
@@ -3442,7 +3536,14 @@ var SWIPE_REPLY_THRESHOLD = 50;
|
|
|
3442
3536
|
function MessageRow(props) {
|
|
3443
3537
|
const callLog = callLogDisplayFor(props.msg, props.meId);
|
|
3444
3538
|
if (callLog !== void 0) {
|
|
3445
|
-
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;
|
|
3446
3547
|
}
|
|
3447
3548
|
return /* @__PURE__ */ jsx(BubbleMessageRow, { ...props });
|
|
3448
3549
|
}
|
|
@@ -3557,15 +3658,15 @@ function BubbleMessageRow({
|
|
|
3557
3658
|
View,
|
|
3558
3659
|
{
|
|
3559
3660
|
style: [
|
|
3560
|
-
|
|
3661
|
+
styles19.row,
|
|
3561
3662
|
{ alignSelf: isSelf ? "flex-end" : "flex-start" },
|
|
3562
3663
|
// Lift this row above the dim backdrop the parent renders
|
|
3563
3664
|
// during edit mode. zIndex covers iOS / web; elevation does
|
|
3564
3665
|
// the equivalent on Android.
|
|
3565
|
-
isEditing ?
|
|
3666
|
+
isEditing ? styles19.rowEditing : null
|
|
3566
3667
|
],
|
|
3567
3668
|
children: [
|
|
3568
|
-
showAvatarSlot ? /* @__PURE__ */ jsx(View, { style:
|
|
3669
|
+
showAvatarSlot ? /* @__PURE__ */ jsx(View, { style: styles19.avatarSlot, children: showAvatarRender ? /* @__PURE__ */ jsx(
|
|
3569
3670
|
Avatar,
|
|
3570
3671
|
{
|
|
3571
3672
|
src: avatarUrl ?? null,
|
|
@@ -3574,14 +3675,14 @@ function BubbleMessageRow({
|
|
|
3574
3675
|
size: "sm"
|
|
3575
3676
|
}
|
|
3576
3677
|
) : null }) : null,
|
|
3577
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
3678
|
+
/* @__PURE__ */ jsxs(View, { style: styles19.bubbleCol, children: [
|
|
3578
3679
|
swipeEnabled ? /* @__PURE__ */ jsx(
|
|
3579
3680
|
Animated.View,
|
|
3580
3681
|
{
|
|
3581
3682
|
pointerEvents: "none",
|
|
3582
3683
|
style: [
|
|
3583
|
-
|
|
3584
|
-
isSelf ?
|
|
3684
|
+
styles19.replyHint,
|
|
3685
|
+
isSelf ? styles19.replyHintRight : styles19.replyHintLeft,
|
|
3585
3686
|
{
|
|
3586
3687
|
opacity: replyIconOpacity,
|
|
3587
3688
|
transform: [{ scale: replyIconScale }],
|
|
@@ -3627,13 +3728,13 @@ function BubbleMessageRow({
|
|
|
3627
3728
|
)
|
|
3628
3729
|
}
|
|
3629
3730
|
),
|
|
3630
|
-
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: [
|
|
3631
3732
|
"\u{1F4AC} ",
|
|
3632
3733
|
msg.reply_count,
|
|
3633
3734
|
" ",
|
|
3634
3735
|
msg.reply_count === 1 ? "reply" : "replies"
|
|
3635
3736
|
] }) }) : null,
|
|
3636
|
-
reactions ? /* @__PURE__ */ jsx(View, { style: [
|
|
3737
|
+
reactions ? /* @__PURE__ */ jsx(View, { style: [styles19.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsx(
|
|
3637
3738
|
ReactionStrip,
|
|
3638
3739
|
{
|
|
3639
3740
|
messageId: msg.id,
|
|
@@ -3692,7 +3793,7 @@ function BubbleMessageRow({
|
|
|
3692
3793
|
}
|
|
3693
3794
|
);
|
|
3694
3795
|
}
|
|
3695
|
-
var
|
|
3796
|
+
var styles19 = StyleSheet.create({
|
|
3696
3797
|
row: {
|
|
3697
3798
|
flexDirection: "row",
|
|
3698
3799
|
alignItems: "flex-end",
|
|
@@ -3861,15 +3962,15 @@ function ThreadSheet({
|
|
|
3861
3962
|
return /* @__PURE__ */ jsxs(
|
|
3862
3963
|
View,
|
|
3863
3964
|
{
|
|
3864
|
-
style:
|
|
3965
|
+
style: styles20.modalRoot,
|
|
3865
3966
|
onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
|
|
3866
3967
|
children: [
|
|
3867
|
-
/* @__PURE__ */ jsx(Pressable, { style:
|
|
3968
|
+
/* @__PURE__ */ jsx(Pressable, { style: styles20.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
|
|
3868
3969
|
/* @__PURE__ */ jsxs(
|
|
3869
3970
|
Animated.View,
|
|
3870
3971
|
{
|
|
3871
3972
|
style: [
|
|
3872
|
-
|
|
3973
|
+
styles20.sheet,
|
|
3873
3974
|
{
|
|
3874
3975
|
height: sheetHeight,
|
|
3875
3976
|
backgroundColor: theme.colors.paper,
|
|
@@ -3883,14 +3984,14 @@ function ThreadSheet({
|
|
|
3883
3984
|
],
|
|
3884
3985
|
children: [
|
|
3885
3986
|
/* @__PURE__ */ jsxs(View, { ...panHandlers, children: [
|
|
3886
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
3887
|
-
/* @__PURE__ */ jsxs(View, { style: [
|
|
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: [
|
|
3888
3989
|
/* @__PURE__ */ jsx(
|
|
3889
3990
|
Pressable,
|
|
3890
3991
|
{
|
|
3891
3992
|
onPress: onClose,
|
|
3892
3993
|
hitSlop: 16,
|
|
3893
|
-
style: [
|
|
3994
|
+
style: [styles20.closeBtn, { backgroundColor: theme.colors.surface2 }],
|
|
3894
3995
|
accessibilityLabel: "Close thread",
|
|
3895
3996
|
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
|
|
3896
3997
|
}
|
|
@@ -3899,7 +4000,7 @@ function ThreadSheet({
|
|
|
3899
4000
|
Text,
|
|
3900
4001
|
{
|
|
3901
4002
|
style: [
|
|
3902
|
-
|
|
4003
|
+
styles20.title,
|
|
3903
4004
|
{ color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
|
|
3904
4005
|
],
|
|
3905
4006
|
children: "Thread"
|
|
@@ -3910,12 +4011,12 @@ function ThreadSheet({
|
|
|
3910
4011
|
/* @__PURE__ */ jsxs(
|
|
3911
4012
|
KeyboardAvoidingView,
|
|
3912
4013
|
{
|
|
3913
|
-
style:
|
|
4014
|
+
style: styles20.kavBody,
|
|
3914
4015
|
behavior: "padding",
|
|
3915
4016
|
keyboardVerticalOffset: gutter,
|
|
3916
4017
|
children: [
|
|
3917
|
-
/* @__PURE__ */ jsx(View, { style: [
|
|
3918
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
4018
|
+
/* @__PURE__ */ jsx(View, { style: [styles20.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
|
|
4019
|
+
/* @__PURE__ */ jsx(View, { style: styles20.listWrap, children: /* @__PURE__ */ jsx(
|
|
3919
4020
|
MessageList,
|
|
3920
4021
|
{
|
|
3921
4022
|
messages: replies,
|
|
@@ -3953,7 +4054,7 @@ function ThreadSheet({
|
|
|
3953
4054
|
}
|
|
3954
4055
|
);
|
|
3955
4056
|
}
|
|
3956
|
-
var
|
|
4057
|
+
var styles20 = StyleSheet.create({
|
|
3957
4058
|
modalRoot: {
|
|
3958
4059
|
flex: 1,
|
|
3959
4060
|
justifyContent: "flex-end"
|
|
@@ -4025,7 +4126,7 @@ function TypingIndicator({ typing, labelFor }) {
|
|
|
4025
4126
|
const ids = Array.from(typing);
|
|
4026
4127
|
const isTyping = ids.length > 0;
|
|
4027
4128
|
if (!isTyping) return /* @__PURE__ */ jsx(View, { style: { height: 0 } });
|
|
4028
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
4129
|
+
return /* @__PURE__ */ jsxs(View, { style: styles21.row, children: [
|
|
4029
4130
|
/* @__PURE__ */ jsx(TypingDots, {}),
|
|
4030
4131
|
/* @__PURE__ */ jsx(TypingLabel, { ids, ...labelFor ? { labelFor } : {} })
|
|
4031
4132
|
] });
|
|
@@ -4070,7 +4171,7 @@ function TypingDots() {
|
|
|
4070
4171
|
],
|
|
4071
4172
|
opacity: val.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] })
|
|
4072
4173
|
});
|
|
4073
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
4174
|
+
return /* @__PURE__ */ jsxs(View, { style: styles21.dotsWrap, children: [
|
|
4074
4175
|
/* @__PURE__ */ jsx(Animated.View, { style: dot(a) }),
|
|
4075
4176
|
/* @__PURE__ */ jsx(Animated.View, { style: dot(b) }),
|
|
4076
4177
|
/* @__PURE__ */ jsx(Animated.View, { style: dot(c) })
|
|
@@ -4086,9 +4187,9 @@ function TypingLabel({
|
|
|
4086
4187
|
const name1 = useDisplayName(id1, labelFor);
|
|
4087
4188
|
const name2 = useDisplayName(id2, labelFor);
|
|
4088
4189
|
const text = ids.length === 1 ? `${name1} is typing` : ids.length === 2 ? `${name1} and ${name2} are typing` : `${ids.length} people are typing`;
|
|
4089
|
-
return /* @__PURE__ */ jsx(Text, { style: [
|
|
4190
|
+
return /* @__PURE__ */ jsx(Text, { style: [styles21.label, { color: theme.colors.ink2, fontFamily: theme.type.fontBody }], children: text });
|
|
4090
4191
|
}
|
|
4091
|
-
var
|
|
4192
|
+
var styles21 = StyleSheet.create({
|
|
4092
4193
|
row: {
|
|
4093
4194
|
flexDirection: "row",
|
|
4094
4195
|
alignItems: "center",
|
|
@@ -4128,11 +4229,16 @@ function ConversationView({
|
|
|
4128
4229
|
avatars = "auto",
|
|
4129
4230
|
onMarkedRead,
|
|
4130
4231
|
onSent,
|
|
4131
|
-
keyboardOffset = 0
|
|
4232
|
+
keyboardOffset = 0,
|
|
4233
|
+
onCallBack,
|
|
4234
|
+
onJoinCall,
|
|
4235
|
+
currentCallId = null
|
|
4132
4236
|
}) {
|
|
4133
4237
|
const theme = usePoolseTheme();
|
|
4134
4238
|
const { me } = useMe();
|
|
4135
4239
|
const meId = me?.id ?? null;
|
|
4240
|
+
const receiptsVisible = receiptsOf(me).visible;
|
|
4241
|
+
const showReadState = readReceipts && receiptsVisible;
|
|
4136
4242
|
const {
|
|
4137
4243
|
messages,
|
|
4138
4244
|
loading,
|
|
@@ -4211,9 +4317,15 @@ function ConversationView({
|
|
|
4211
4317
|
const custom = renderMessage(msg, meId);
|
|
4212
4318
|
if (custom !== null && custom !== void 0) return custom;
|
|
4213
4319
|
}
|
|
4214
|
-
const readState =
|
|
4320
|
+
const readState = showReadState && meId !== null && msg.sender_id === meId ? readStateForMessage(msg, members, meId, sequenceByMessageId) : void 0;
|
|
4215
4321
|
const isSelf = meId !== null && msg.sender_id === meId;
|
|
4216
|
-
const canEdit =
|
|
4322
|
+
const canEdit = canEditOwnMessage({
|
|
4323
|
+
isSelf,
|
|
4324
|
+
deleted: !!msg.deleted_at,
|
|
4325
|
+
receiptsVisible,
|
|
4326
|
+
readState,
|
|
4327
|
+
insertedAt: msg.inserted_at
|
|
4328
|
+
});
|
|
4217
4329
|
const groupPosition = groupPositionById.get(msg.id) ?? "standalone";
|
|
4218
4330
|
return /* @__PURE__ */ jsx(
|
|
4219
4331
|
MessageRow,
|
|
@@ -4237,14 +4349,18 @@ function ConversationView({
|
|
|
4237
4349
|
showAvatar: showAvatars,
|
|
4238
4350
|
maxBodyLength,
|
|
4239
4351
|
groupPosition,
|
|
4240
|
-
markdown
|
|
4352
|
+
markdown,
|
|
4353
|
+
...onCallBack ? { onCallBack } : {}
|
|
4241
4354
|
}
|
|
4242
4355
|
);
|
|
4243
4356
|
},
|
|
4244
4357
|
[
|
|
4358
|
+
onCallBack,
|
|
4245
4359
|
renderMessage,
|
|
4246
4360
|
meId,
|
|
4247
4361
|
readReceipts,
|
|
4362
|
+
showReadState,
|
|
4363
|
+
receiptsVisible,
|
|
4248
4364
|
members,
|
|
4249
4365
|
reactions,
|
|
4250
4366
|
attachments,
|
|
@@ -4333,12 +4449,21 @@ function ConversationView({
|
|
|
4333
4449
|
return /* @__PURE__ */ jsx(UploadProvider, { children: /* @__PURE__ */ jsxs(
|
|
4334
4450
|
KeyboardAvoidingView,
|
|
4335
4451
|
{
|
|
4336
|
-
style: [
|
|
4452
|
+
style: [styles22.root, { backgroundColor: theme.colors.paper }],
|
|
4337
4453
|
behavior: Platform.OS === "ios" ? "padding" : "height",
|
|
4338
4454
|
keyboardVerticalOffset: keyboardOffset,
|
|
4339
4455
|
children: [
|
|
4340
4456
|
headerNode,
|
|
4341
|
-
/* @__PURE__ */
|
|
4457
|
+
onJoinCall ? /* @__PURE__ */ jsx(
|
|
4458
|
+
JoinBanner,
|
|
4459
|
+
{
|
|
4460
|
+
conversationId,
|
|
4461
|
+
meId,
|
|
4462
|
+
currentCallId,
|
|
4463
|
+
onJoin: onJoinCall
|
|
4464
|
+
}
|
|
4465
|
+
) : null,
|
|
4466
|
+
/* @__PURE__ */ jsxs(View, { style: styles22.listWrap, children: [
|
|
4342
4467
|
/* @__PURE__ */ jsx(
|
|
4343
4468
|
MessageList,
|
|
4344
4469
|
{
|
|
@@ -4356,7 +4481,7 @@ function ConversationView({
|
|
|
4356
4481
|
editingId ? /* @__PURE__ */ jsx(
|
|
4357
4482
|
Pressable,
|
|
4358
4483
|
{
|
|
4359
|
-
style:
|
|
4484
|
+
style: styles22.editBackdrop,
|
|
4360
4485
|
onPress: () => setEditingId(null),
|
|
4361
4486
|
accessibilityLabel: "Cancel editing"
|
|
4362
4487
|
}
|
|
@@ -4378,6 +4503,17 @@ function ConversationView({
|
|
|
4378
4503
|
}
|
|
4379
4504
|
) });
|
|
4380
4505
|
}
|
|
4506
|
+
function JoinBanner({
|
|
4507
|
+
conversationId,
|
|
4508
|
+
meId,
|
|
4509
|
+
currentCallId,
|
|
4510
|
+
onJoin
|
|
4511
|
+
}) {
|
|
4512
|
+
const { call, participantIds } = useLiveCall(conversationId);
|
|
4513
|
+
if (!call || call.id === currentCallId) return null;
|
|
4514
|
+
if (meId !== null && participantIds.includes(meId)) return null;
|
|
4515
|
+
return /* @__PURE__ */ jsx(LiveCallBanner, { call, inCall: participantIds.length, onJoin });
|
|
4516
|
+
}
|
|
4381
4517
|
function readStateForMessage(msg, members, meId, sequenceByMessageId) {
|
|
4382
4518
|
const otherMembers = members.filter((m) => m.user_id !== meId);
|
|
4383
4519
|
if (otherMembers.length === 0) return "sent";
|
|
@@ -4391,7 +4527,7 @@ function readStateForMessage(msg, members, meId, sequenceByMessageId) {
|
|
|
4391
4527
|
});
|
|
4392
4528
|
return anyRead ? "read" : "sent";
|
|
4393
4529
|
}
|
|
4394
|
-
var
|
|
4530
|
+
var styles22 = StyleSheet.create({
|
|
4395
4531
|
root: {
|
|
4396
4532
|
flex: 1
|
|
4397
4533
|
},
|
|
@@ -4481,15 +4617,15 @@ function UserPickerSheet({
|
|
|
4481
4617
|
children: /* @__PURE__ */ jsxs(
|
|
4482
4618
|
View,
|
|
4483
4619
|
{
|
|
4484
|
-
style:
|
|
4620
|
+
style: styles23.modalRoot,
|
|
4485
4621
|
onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
|
|
4486
4622
|
children: [
|
|
4487
|
-
/* @__PURE__ */ jsx(Pressable, { style:
|
|
4623
|
+
/* @__PURE__ */ jsx(Pressable, { style: styles23.backdrop, onPress: handleClose }),
|
|
4488
4624
|
/* @__PURE__ */ jsx(
|
|
4489
4625
|
Animated.View,
|
|
4490
4626
|
{
|
|
4491
4627
|
style: [
|
|
4492
|
-
|
|
4628
|
+
styles23.sheet,
|
|
4493
4629
|
{
|
|
4494
4630
|
backgroundColor: theme.colors.paper,
|
|
4495
4631
|
borderTopLeftRadius: theme.radii.xl,
|
|
@@ -4507,18 +4643,18 @@ function UserPickerSheet({
|
|
|
4507
4643
|
children: /* @__PURE__ */ jsxs(
|
|
4508
4644
|
KeyboardAvoidingView,
|
|
4509
4645
|
{
|
|
4510
|
-
style:
|
|
4646
|
+
style: styles23.kav,
|
|
4511
4647
|
behavior: "padding",
|
|
4512
4648
|
keyboardVerticalOffset: screenHeight - sheetHeight,
|
|
4513
4649
|
children: [
|
|
4514
|
-
/* @__PURE__ */ jsx(View, { ...panHandlers, style:
|
|
4515
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4650
|
+
/* @__PURE__ */ jsx(View, { ...panHandlers, style: styles23.dragHandle, children: /* @__PURE__ */ jsx(View, { style: [styles23.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
|
|
4651
|
+
/* @__PURE__ */ jsxs(View, { style: styles23.header, children: [
|
|
4516
4652
|
/* @__PURE__ */ jsx(
|
|
4517
4653
|
Pressable,
|
|
4518
4654
|
{
|
|
4519
4655
|
onPress: handleClose,
|
|
4520
4656
|
hitSlop: 16,
|
|
4521
|
-
style: [
|
|
4657
|
+
style: [styles23.closeBtn, { backgroundColor: theme.colors.surface2 }],
|
|
4522
4658
|
accessibilityLabel: "Close picker",
|
|
4523
4659
|
children: /* @__PURE__ */ jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
|
|
4524
4660
|
}
|
|
@@ -4527,7 +4663,7 @@ function UserPickerSheet({
|
|
|
4527
4663
|
Text,
|
|
4528
4664
|
{
|
|
4529
4665
|
style: [
|
|
4530
|
-
|
|
4666
|
+
styles23.title,
|
|
4531
4667
|
{ color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
|
|
4532
4668
|
],
|
|
4533
4669
|
numberOfLines: 1,
|
|
@@ -4541,7 +4677,7 @@ function UserPickerSheet({
|
|
|
4541
4677
|
disabled: !canCreate,
|
|
4542
4678
|
hitSlop: 6,
|
|
4543
4679
|
style: [
|
|
4544
|
-
|
|
4680
|
+
styles23.createBtn,
|
|
4545
4681
|
{
|
|
4546
4682
|
backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
|
|
4547
4683
|
opacity: canCreate ? 1 : 0.6
|
|
@@ -4572,7 +4708,7 @@ function UserPickerSheet({
|
|
|
4572
4708
|
value: groupName,
|
|
4573
4709
|
onChangeText: setGroupName,
|
|
4574
4710
|
style: [
|
|
4575
|
-
|
|
4711
|
+
styles23.groupNameInput,
|
|
4576
4712
|
{
|
|
4577
4713
|
color: theme.colors.ink,
|
|
4578
4714
|
backgroundColor: theme.colors.surface2,
|
|
@@ -4591,7 +4727,7 @@ function UserPickerSheet({
|
|
|
4591
4727
|
value: query,
|
|
4592
4728
|
onChangeText: setQuery,
|
|
4593
4729
|
style: [
|
|
4594
|
-
|
|
4730
|
+
styles23.searchInput,
|
|
4595
4731
|
{
|
|
4596
4732
|
color: theme.colors.ink,
|
|
4597
4733
|
backgroundColor: theme.colors.surface2,
|
|
@@ -4608,7 +4744,7 @@ function UserPickerSheet({
|
|
|
4608
4744
|
data: filtered,
|
|
4609
4745
|
keyExtractor: (u) => u.externalId,
|
|
4610
4746
|
keyboardShouldPersistTaps: "handled",
|
|
4611
|
-
ListEmptyComponent: /* @__PURE__ */ jsx(View, { style:
|
|
4747
|
+
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." }) }),
|
|
4612
4748
|
renderItem: ({ item }) => /* @__PURE__ */ jsx(
|
|
4613
4749
|
UserRow,
|
|
4614
4750
|
{
|
|
@@ -4650,29 +4786,29 @@ function UserRow({
|
|
|
4650
4786
|
{
|
|
4651
4787
|
onPress,
|
|
4652
4788
|
style: [
|
|
4653
|
-
|
|
4789
|
+
styles23.row,
|
|
4654
4790
|
{
|
|
4655
4791
|
backgroundColor: selected ? theme.colors.brandSoft : "transparent"
|
|
4656
4792
|
}
|
|
4657
4793
|
],
|
|
4658
4794
|
children: [
|
|
4659
|
-
user.avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: user.avatarUrl }, style:
|
|
4660
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
4795
|
+
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" }),
|
|
4796
|
+
/* @__PURE__ */ jsxs(View, { style: styles23.body, children: [
|
|
4661
4797
|
/* @__PURE__ */ jsx(
|
|
4662
4798
|
Text,
|
|
4663
4799
|
{
|
|
4664
|
-
style: [
|
|
4800
|
+
style: [styles23.name, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
|
|
4665
4801
|
numberOfLines: 1,
|
|
4666
4802
|
children: user.name
|
|
4667
4803
|
}
|
|
4668
4804
|
),
|
|
4669
|
-
user.subtitle ? /* @__PURE__ */ jsx(Text, { style: [
|
|
4805
|
+
user.subtitle ? /* @__PURE__ */ jsx(Text, { style: [styles23.subtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: user.subtitle }) : null
|
|
4670
4806
|
] }),
|
|
4671
4807
|
isGroup ? /* @__PURE__ */ jsx(
|
|
4672
4808
|
View,
|
|
4673
4809
|
{
|
|
4674
4810
|
style: [
|
|
4675
|
-
|
|
4811
|
+
styles23.checkbox,
|
|
4676
4812
|
{
|
|
4677
4813
|
borderColor: selected ? theme.colors.brand : theme.colors.border,
|
|
4678
4814
|
backgroundColor: selected ? theme.colors.brand : "transparent"
|
|
@@ -4685,7 +4821,7 @@ function UserRow({
|
|
|
4685
4821
|
}
|
|
4686
4822
|
);
|
|
4687
4823
|
}
|
|
4688
|
-
var
|
|
4824
|
+
var styles23 = StyleSheet.create({
|
|
4689
4825
|
modalRoot: {
|
|
4690
4826
|
flex: 1,
|
|
4691
4827
|
justifyContent: "flex-end"
|
|
@@ -4949,7 +5085,7 @@ var PoolseInbox = forwardRef(
|
|
|
4949
5085
|
},
|
|
4950
5086
|
[renderConversationRow, meExternalId, meId, labelFor, avatarFor, unreadCounts]
|
|
4951
5087
|
);
|
|
4952
|
-
return /* @__PURE__ */ jsxs(View, { style: [
|
|
5088
|
+
return /* @__PURE__ */ jsxs(View, { style: [styles24.root, { backgroundColor: theme.colors.paper }], children: [
|
|
4953
5089
|
/* @__PURE__ */ jsxs(
|
|
4954
5090
|
Animated.View,
|
|
4955
5091
|
{
|
|
@@ -4960,7 +5096,7 @@ var PoolseInbox = forwardRef(
|
|
|
4960
5096
|
View,
|
|
4961
5097
|
{
|
|
4962
5098
|
style: [
|
|
4963
|
-
|
|
5099
|
+
styles24.listHeader,
|
|
4964
5100
|
{
|
|
4965
5101
|
backgroundColor: theme.colors.surface,
|
|
4966
5102
|
borderBottomColor: theme.colors.border
|
|
@@ -4971,13 +5107,13 @@ var PoolseInbox = forwardRef(
|
|
|
4971
5107
|
Text,
|
|
4972
5108
|
{
|
|
4973
5109
|
style: [
|
|
4974
|
-
|
|
5110
|
+
styles24.listTitle,
|
|
4975
5111
|
{ color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
|
|
4976
5112
|
],
|
|
4977
5113
|
children: title
|
|
4978
5114
|
}
|
|
4979
5115
|
),
|
|
4980
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
5116
|
+
/* @__PURE__ */ jsxs(View, { style: styles24.headerActions, children: [
|
|
4981
5117
|
users ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
4982
5118
|
/* @__PURE__ */ jsx(
|
|
4983
5119
|
HeaderIconButton,
|
|
@@ -5090,7 +5226,7 @@ function HeaderIconButton({
|
|
|
5090
5226
|
hitSlop: 10,
|
|
5091
5227
|
accessibilityLabel: label,
|
|
5092
5228
|
style: ({ pressed }) => [
|
|
5093
|
-
|
|
5229
|
+
styles24.iconBtn,
|
|
5094
5230
|
{
|
|
5095
5231
|
backgroundColor: pressed ? theme.colors.surface2 : "transparent"
|
|
5096
5232
|
}
|
|
@@ -5121,31 +5257,31 @@ function DefaultConversationRow({
|
|
|
5121
5257
|
{
|
|
5122
5258
|
onPress,
|
|
5123
5259
|
style: [
|
|
5124
|
-
|
|
5260
|
+
styles24.row,
|
|
5125
5261
|
{
|
|
5126
5262
|
backgroundColor: selected ? theme.colors.surface2 : "transparent",
|
|
5127
5263
|
borderBottomColor: theme.colors.border
|
|
5128
5264
|
}
|
|
5129
5265
|
],
|
|
5130
5266
|
children: [
|
|
5131
|
-
avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: avatarUrl }, style:
|
|
5132
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
5267
|
+
avatarUrl ? /* @__PURE__ */ jsx(Image, { source: { uri: avatarUrl }, style: styles24.rowAvatar }) : /* @__PURE__ */ jsx(Avatar, { src: null, name: title, seed: avatarSeed, size: "md" }),
|
|
5268
|
+
/* @__PURE__ */ jsxs(View, { style: styles24.rowBody, children: [
|
|
5133
5269
|
/* @__PURE__ */ jsx(
|
|
5134
5270
|
Text,
|
|
5135
5271
|
{
|
|
5136
|
-
style: [
|
|
5272
|
+
style: [styles24.rowTitle, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
|
|
5137
5273
|
numberOfLines: 1,
|
|
5138
5274
|
children: title
|
|
5139
5275
|
}
|
|
5140
5276
|
),
|
|
5141
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
5277
|
+
/* @__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`) })
|
|
5142
5278
|
] }),
|
|
5143
|
-
unread > 0 ? /* @__PURE__ */ jsx(View, { style: [
|
|
5279
|
+
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
|
|
5144
5280
|
]
|
|
5145
5281
|
}
|
|
5146
5282
|
);
|
|
5147
5283
|
}
|
|
5148
|
-
var
|
|
5284
|
+
var styles24 = StyleSheet.create({
|
|
5149
5285
|
root: {
|
|
5150
5286
|
flex: 1,
|
|
5151
5287
|
overflow: "hidden"
|
|
@@ -5349,10 +5485,10 @@ function VoiceRoomBar({
|
|
|
5349
5485
|
View,
|
|
5350
5486
|
{
|
|
5351
5487
|
style: [
|
|
5352
|
-
|
|
5488
|
+
styles25.bar,
|
|
5353
5489
|
{ backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
|
|
5354
5490
|
],
|
|
5355
|
-
children: unavailableSlot ?? /* @__PURE__ */ jsx(Text, { style: [
|
|
5491
|
+
children: unavailableSlot ?? /* @__PURE__ */ jsx(Text, { style: [styles25.hint, { color: theme.colors.ink3 }], children: "Voice needs react-native-webrtc and a development build." })
|
|
5356
5492
|
}
|
|
5357
5493
|
);
|
|
5358
5494
|
}
|
|
@@ -5360,22 +5496,22 @@ function VoiceRoomBar({
|
|
|
5360
5496
|
View,
|
|
5361
5497
|
{
|
|
5362
5498
|
style: [
|
|
5363
|
-
|
|
5499
|
+
styles25.bar,
|
|
5364
5500
|
{ backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
|
|
5365
5501
|
],
|
|
5366
5502
|
children: [
|
|
5367
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
5503
|
+
/* @__PURE__ */ jsxs(View, { style: styles25.row, children: [
|
|
5368
5504
|
/* @__PURE__ */ jsx(
|
|
5369
5505
|
View,
|
|
5370
5506
|
{
|
|
5371
5507
|
style: [
|
|
5372
|
-
|
|
5508
|
+
styles25.dot,
|
|
5373
5509
|
{ backgroundColor: connected ? theme.colors.brand : theme.colors.ink3 }
|
|
5374
5510
|
]
|
|
5375
5511
|
}
|
|
5376
5512
|
),
|
|
5377
5513
|
connected ? /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5378
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
5514
|
+
/* @__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)) }),
|
|
5379
5515
|
/* @__PURE__ */ jsx(
|
|
5380
5516
|
Pressable,
|
|
5381
5517
|
{
|
|
@@ -5383,7 +5519,7 @@ function VoiceRoomBar({
|
|
|
5383
5519
|
accessibilityRole: "button",
|
|
5384
5520
|
accessibilityState: { selected: muted },
|
|
5385
5521
|
style: [
|
|
5386
|
-
|
|
5522
|
+
styles25.btn,
|
|
5387
5523
|
{
|
|
5388
5524
|
borderColor: muted ? theme.colors.brand : theme.colors.border,
|
|
5389
5525
|
backgroundColor: muted ? theme.colors.brandSoft : theme.colors.paper
|
|
@@ -5397,25 +5533,25 @@ function VoiceRoomBar({
|
|
|
5397
5533
|
{
|
|
5398
5534
|
onPress: leave,
|
|
5399
5535
|
accessibilityRole: "button",
|
|
5400
|
-
style: [
|
|
5536
|
+
style: [styles25.btn, { borderColor: theme.colors.error }],
|
|
5401
5537
|
children: /* @__PURE__ */ jsx(Text, { style: { color: theme.colors.error }, children: "Leave" })
|
|
5402
5538
|
}
|
|
5403
5539
|
)
|
|
5404
5540
|
] }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
5405
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
5541
|
+
/* @__PURE__ */ jsx(Text, { style: [styles25.hint, { color: theme.colors.ink3 }], children: status === "connecting" ? "Connecting\u2026" : "Talk to everyone here" }),
|
|
5406
5542
|
/* @__PURE__ */ jsx(
|
|
5407
5543
|
Pressable,
|
|
5408
5544
|
{
|
|
5409
5545
|
onPress: () => void join(),
|
|
5410
5546
|
disabled: status === "connecting",
|
|
5411
5547
|
accessibilityRole: "button",
|
|
5412
|
-
style: [
|
|
5548
|
+
style: [styles25.btn, styles25.btnPrimary, { backgroundColor: theme.colors.brand }],
|
|
5413
5549
|
children: /* @__PURE__ */ jsx(Text, { style: { color: theme.colors.onBrand, fontWeight: "600" }, children: status === "connecting" ? "Joining\u2026" : "Join Voice" })
|
|
5414
5550
|
}
|
|
5415
5551
|
)
|
|
5416
5552
|
] })
|
|
5417
5553
|
] }),
|
|
5418
|
-
error && /* @__PURE__ */ jsx(Text, { style: [
|
|
5554
|
+
error && /* @__PURE__ */ jsx(Text, { style: [styles25.error, { color: theme.colors.error }], children: error.message })
|
|
5419
5555
|
]
|
|
5420
5556
|
}
|
|
5421
5557
|
);
|
|
@@ -5426,7 +5562,7 @@ function ParticipantChip({ participant, label }) {
|
|
|
5426
5562
|
View,
|
|
5427
5563
|
{
|
|
5428
5564
|
style: [
|
|
5429
|
-
|
|
5565
|
+
styles25.chip,
|
|
5430
5566
|
{
|
|
5431
5567
|
backgroundColor: theme.colors.paper,
|
|
5432
5568
|
// The speaking ring is a border colour swap rather than an
|
|
@@ -5445,7 +5581,7 @@ function ParticipantChip({ participant, label }) {
|
|
|
5445
5581
|
}
|
|
5446
5582
|
);
|
|
5447
5583
|
}
|
|
5448
|
-
var
|
|
5584
|
+
var styles25 = StyleSheet.create({
|
|
5449
5585
|
bar: { paddingHorizontal: 14, paddingVertical: 8, borderBottomWidth: StyleSheet.hairlineWidth },
|
|
5450
5586
|
row: { flexDirection: "row", alignItems: "center", gap: 8, flexWrap: "wrap" },
|
|
5451
5587
|
dot: { width: 8, height: 8, borderRadius: 4 },
|
|
@@ -5523,15 +5659,15 @@ function AudioRouteSheet({
|
|
|
5523
5659
|
animationType: "fade",
|
|
5524
5660
|
onRequestClose: onClose,
|
|
5525
5661
|
...EDGE_TO_EDGE_MODAL,
|
|
5526
|
-
children: /* @__PURE__ */ jsx(Pressable, { style:
|
|
5662
|
+
children: /* @__PURE__ */ jsx(Pressable, { style: styles26.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxs(
|
|
5527
5663
|
Pressable,
|
|
5528
5664
|
{
|
|
5529
|
-
style: [
|
|
5665
|
+
style: [styles26.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
|
|
5530
5666
|
onPress: () => {
|
|
5531
5667
|
},
|
|
5532
5668
|
children: [
|
|
5533
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
5534
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
5669
|
+
/* @__PURE__ */ jsx(View, { style: styles26.grabber }),
|
|
5670
|
+
/* @__PURE__ */ jsx(Text, { style: styles26.title, children: "Audio output" }),
|
|
5535
5671
|
routes.map((route) => {
|
|
5536
5672
|
const selected = route.id === selectedRouteId;
|
|
5537
5673
|
return /* @__PURE__ */ jsxs(
|
|
@@ -5543,7 +5679,7 @@ function AudioRouteSheet({
|
|
|
5543
5679
|
},
|
|
5544
5680
|
accessibilityRole: "button",
|
|
5545
5681
|
accessibilityState: { selected },
|
|
5546
|
-
style: ({ pressed }) => [
|
|
5682
|
+
style: ({ pressed }) => [styles26.row, pressed && styles26.rowPressed],
|
|
5547
5683
|
children: [
|
|
5548
5684
|
/* @__PURE__ */ jsx(
|
|
5549
5685
|
PoolseIcon,
|
|
@@ -5554,7 +5690,7 @@ function AudioRouteSheet({
|
|
|
5554
5690
|
label: null
|
|
5555
5691
|
}
|
|
5556
5692
|
),
|
|
5557
|
-
/* @__PURE__ */ jsx(Text, { style: [
|
|
5693
|
+
/* @__PURE__ */ jsx(Text, { style: [styles26.label, selected && styles26.labelSelected], children: route.label }),
|
|
5558
5694
|
selected && /* @__PURE__ */ jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
|
|
5559
5695
|
]
|
|
5560
5696
|
},
|
|
@@ -5567,7 +5703,7 @@ function AudioRouteSheet({
|
|
|
5567
5703
|
}
|
|
5568
5704
|
);
|
|
5569
5705
|
}
|
|
5570
|
-
var
|
|
5706
|
+
var styles26 = StyleSheet.create({
|
|
5571
5707
|
backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
|
|
5572
5708
|
sheet: {
|
|
5573
5709
|
backgroundColor: callColors.tile,
|
|
@@ -5648,11 +5784,11 @@ function PulseRings({ size, color }) {
|
|
|
5648
5784
|
});
|
|
5649
5785
|
return () => loops.forEach((l) => l.stop());
|
|
5650
5786
|
}, []);
|
|
5651
|
-
return /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill,
|
|
5787
|
+
return /* @__PURE__ */ jsx(View, { style: [StyleSheet.absoluteFill, styles27.center], pointerEvents: "none", children: phases.map((p, i) => /* @__PURE__ */ jsx(
|
|
5652
5788
|
Animated.View,
|
|
5653
5789
|
{
|
|
5654
5790
|
style: [
|
|
5655
|
-
|
|
5791
|
+
styles27.ring,
|
|
5656
5792
|
{
|
|
5657
5793
|
width: size,
|
|
5658
5794
|
height: size,
|
|
@@ -5673,7 +5809,7 @@ function PulseRings({ size, color }) {
|
|
|
5673
5809
|
i
|
|
5674
5810
|
)) });
|
|
5675
5811
|
}
|
|
5676
|
-
var
|
|
5812
|
+
var styles27 = StyleSheet.create({
|
|
5677
5813
|
center: { alignItems: "center", justifyContent: "center" },
|
|
5678
5814
|
ring: { position: "absolute", borderWidth: 1.5 }
|
|
5679
5815
|
});
|
|
@@ -5684,7 +5820,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
|
|
|
5684
5820
|
View,
|
|
5685
5821
|
{
|
|
5686
5822
|
style: [
|
|
5687
|
-
|
|
5823
|
+
styles28.ring,
|
|
5688
5824
|
{
|
|
5689
5825
|
width: outer,
|
|
5690
5826
|
height: outer,
|
|
@@ -5697,7 +5833,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
|
|
|
5697
5833
|
View,
|
|
5698
5834
|
{
|
|
5699
5835
|
style: [
|
|
5700
|
-
|
|
5836
|
+
styles28.circle,
|
|
5701
5837
|
{
|
|
5702
5838
|
width: size,
|
|
5703
5839
|
height: size,
|
|
@@ -5708,7 +5844,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
|
|
|
5708
5844
|
children: /* @__PURE__ */ jsx(
|
|
5709
5845
|
Text,
|
|
5710
5846
|
{
|
|
5711
|
-
style: [
|
|
5847
|
+
style: [styles28.initials, { fontSize: Math.round(size * 0.38) }],
|
|
5712
5848
|
numberOfLines: 1,
|
|
5713
5849
|
allowFontScaling: false,
|
|
5714
5850
|
children: initialsOf(name)
|
|
@@ -5725,7 +5861,7 @@ function initialsOf(name) {
|
|
|
5725
5861
|
if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
|
|
5726
5862
|
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
5727
5863
|
}
|
|
5728
|
-
var
|
|
5864
|
+
var styles28 = StyleSheet.create({
|
|
5729
5865
|
ring: { alignItems: "center", justifyContent: "center" },
|
|
5730
5866
|
circle: { alignItems: "center", justifyContent: "center" },
|
|
5731
5867
|
initials: { color: "#ffffff", fontWeight: "600" }
|
|
@@ -5743,7 +5879,7 @@ function CallControlButton({
|
|
|
5743
5879
|
const size = large ? CONTROL_SIZE_LARGE : CONTROL_SIZE;
|
|
5744
5880
|
const background = tone === "danger" ? callColors.danger : tone === "accept" ? callColors.accept : active ? callColors.controlActive : callColors.control;
|
|
5745
5881
|
const iconColor = tone === "neutral" && active ? callColors.controlActiveIcon : callColors.onAction;
|
|
5746
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
5882
|
+
return /* @__PURE__ */ jsxs(View, { style: styles29.slot, children: [
|
|
5747
5883
|
/* @__PURE__ */ jsx(
|
|
5748
5884
|
Pressable,
|
|
5749
5885
|
{
|
|
@@ -5754,7 +5890,7 @@ function CallControlButton({
|
|
|
5754
5890
|
accessibilityLabel: accessibilityLabel ?? label ?? icon,
|
|
5755
5891
|
hitSlop: 8,
|
|
5756
5892
|
style: ({ pressed }) => [
|
|
5757
|
-
|
|
5893
|
+
styles29.button,
|
|
5758
5894
|
{
|
|
5759
5895
|
width: size,
|
|
5760
5896
|
height: size,
|
|
@@ -5768,10 +5904,10 @@ function CallControlButton({
|
|
|
5768
5904
|
children: /* @__PURE__ */ jsx(PoolseIcon, { name: icon, size: large ? 30 : 25, color: iconColor, label: null })
|
|
5769
5905
|
}
|
|
5770
5906
|
),
|
|
5771
|
-
label ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style:
|
|
5907
|
+
label ? /* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles29.label, children: label }) : null
|
|
5772
5908
|
] });
|
|
5773
5909
|
}
|
|
5774
|
-
var
|
|
5910
|
+
var styles29 = StyleSheet.create({
|
|
5775
5911
|
// Fixed width so captions of different lengths cannot shift the row.
|
|
5776
5912
|
slot: { width: 76, alignItems: "center", gap: 7 },
|
|
5777
5913
|
button: { alignItems: "center", justifyContent: "center" },
|
|
@@ -5792,8 +5928,8 @@ function CallParticipantTile({
|
|
|
5792
5928
|
View,
|
|
5793
5929
|
{
|
|
5794
5930
|
style: [
|
|
5795
|
-
|
|
5796
|
-
bleed ?
|
|
5931
|
+
styles30.tile,
|
|
5932
|
+
bleed ? styles30.bleed : styles30.rounded,
|
|
5797
5933
|
{
|
|
5798
5934
|
backgroundColor: callColors.tile,
|
|
5799
5935
|
// A ring rather than a badge: it reads at a glance across a
|
|
@@ -5812,7 +5948,7 @@ function CallParticipantTile({
|
|
|
5812
5948
|
mirror: participant.isSelf,
|
|
5813
5949
|
zOrder: participant.isSelf ? 1 : 0
|
|
5814
5950
|
}
|
|
5815
|
-
) : /* @__PURE__ */ jsx(View, { style:
|
|
5951
|
+
) : /* @__PURE__ */ jsx(View, { style: styles30.placeholder, children: /* @__PURE__ */ jsx(
|
|
5816
5952
|
CallAvatar,
|
|
5817
5953
|
{
|
|
5818
5954
|
name,
|
|
@@ -5821,17 +5957,17 @@ function CallParticipantTile({
|
|
|
5821
5957
|
speaking: participant.speaking
|
|
5822
5958
|
}
|
|
5823
5959
|
) }),
|
|
5824
|
-
!hideName && /* @__PURE__ */ jsxs(View, { style: [
|
|
5960
|
+
!hideName && /* @__PURE__ */ jsxs(View, { style: [styles30.chip, bleed ? styles30.chipBleed : styles30.chipTile], children: [
|
|
5825
5961
|
!participant.micEnabled && // Worth showing even for yourself — it is the answer to
|
|
5826
5962
|
// "why can nobody hear me".
|
|
5827
5963
|
/* @__PURE__ */ jsx(PoolseIcon, { name: "mic-off", size: 13, color: callColors.text, label: "muted" }),
|
|
5828
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style:
|
|
5964
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles30.name, children: name })
|
|
5829
5965
|
] })
|
|
5830
5966
|
]
|
|
5831
5967
|
}
|
|
5832
5968
|
);
|
|
5833
5969
|
}
|
|
5834
|
-
var
|
|
5970
|
+
var styles30 = StyleSheet.create({
|
|
5835
5971
|
tile: { overflow: "hidden", justifyContent: "flex-end", borderWidth: 2 },
|
|
5836
5972
|
rounded: { borderRadius: 18 },
|
|
5837
5973
|
bleed: { borderRadius: 0, borderWidth: 0 },
|
|
@@ -5929,7 +6065,7 @@ function LocalVideoPip({
|
|
|
5929
6065
|
Animated.View,
|
|
5930
6066
|
{
|
|
5931
6067
|
...responder.panHandlers,
|
|
5932
|
-
style: [
|
|
6068
|
+
style: [styles31.pip, { transform: pan.getTranslateTransform() }],
|
|
5933
6069
|
children: /* @__PURE__ */ jsx(
|
|
5934
6070
|
Pressable,
|
|
5935
6071
|
{
|
|
@@ -5939,8 +6075,8 @@ function LocalVideoPip({
|
|
|
5939
6075
|
},
|
|
5940
6076
|
accessibilityRole: "button",
|
|
5941
6077
|
accessibilityLabel: "Your camera. Drag to move, tap to switch camera.",
|
|
5942
|
-
style:
|
|
5943
|
-
children: /* @__PURE__ */ jsx(View, { style:
|
|
6078
|
+
style: styles31.fill,
|
|
6079
|
+
children: /* @__PURE__ */ jsx(View, { style: styles31.fill, children: /* @__PURE__ */ jsx(
|
|
5944
6080
|
CallParticipantTile,
|
|
5945
6081
|
{
|
|
5946
6082
|
participant,
|
|
@@ -5949,7 +6085,7 @@ function LocalVideoPip({
|
|
|
5949
6085
|
avatarSize: 48,
|
|
5950
6086
|
hideName: true,
|
|
5951
6087
|
bleed: true,
|
|
5952
|
-
style:
|
|
6088
|
+
style: styles31.fill
|
|
5953
6089
|
}
|
|
5954
6090
|
) })
|
|
5955
6091
|
}
|
|
@@ -5957,7 +6093,7 @@ function LocalVideoPip({
|
|
|
5957
6093
|
}
|
|
5958
6094
|
);
|
|
5959
6095
|
}
|
|
5960
|
-
var
|
|
6096
|
+
var styles31 = StyleSheet.create({
|
|
5961
6097
|
pip: {
|
|
5962
6098
|
position: "absolute",
|
|
5963
6099
|
top: 0,
|
|
@@ -6006,11 +6142,11 @@ function CallVideoGrid({
|
|
|
6006
6142
|
const availableHeight = size.height > 0 ? size.height - padTop - padBottom : 0;
|
|
6007
6143
|
const tileHeight = availableHeight > 0 ? (availableHeight - GAP * (rows - 1)) / rows : 0;
|
|
6008
6144
|
const scrolls = tileHeight > 0 && tileHeight < MIN_TILE_HEIGHT;
|
|
6009
|
-
if (participants.length === 0) return /* @__PURE__ */ jsx(View, { style:
|
|
6145
|
+
if (participants.length === 0) return /* @__PURE__ */ jsx(View, { style: styles32.stage, onLayout });
|
|
6010
6146
|
if (others.length <= 1) {
|
|
6011
6147
|
const spotlight = others[0] ?? self;
|
|
6012
|
-
if (!spotlight) return /* @__PURE__ */ jsx(View, { style:
|
|
6013
|
-
return /* @__PURE__ */ jsxs(View, { style:
|
|
6148
|
+
if (!spotlight) return /* @__PURE__ */ jsx(View, { style: styles32.stage, onLayout });
|
|
6149
|
+
return /* @__PURE__ */ jsxs(View, { style: styles32.stage, onLayout, children: [
|
|
6014
6150
|
/* @__PURE__ */ jsx(
|
|
6015
6151
|
CallParticipantTile,
|
|
6016
6152
|
{
|
|
@@ -6020,7 +6156,7 @@ function CallVideoGrid({
|
|
|
6020
6156
|
avatarSize: Math.min(148, Math.max(96, Math.round(size.width * 0.36))),
|
|
6021
6157
|
bleed: true,
|
|
6022
6158
|
hideName: others.length === 1,
|
|
6023
|
-
style:
|
|
6159
|
+
style: styles32.fill
|
|
6024
6160
|
}
|
|
6025
6161
|
),
|
|
6026
6162
|
self && others.length === 1 && size.width > 0 && /* @__PURE__ */ jsx(
|
|
@@ -6038,7 +6174,7 @@ function CallVideoGrid({
|
|
|
6038
6174
|
}
|
|
6039
6175
|
const tiles = [...others, ...self ? [self] : []];
|
|
6040
6176
|
const width = size.width > 0 ? (size.width - GAP * (columns - 1)) / columns : 0;
|
|
6041
|
-
const grid = /* @__PURE__ */ jsx(View, { style: [
|
|
6177
|
+
const grid = /* @__PURE__ */ jsx(View, { style: [styles32.grid, scrolls ? styles32.gridScrolling : styles32.gridFilling], children: tiles.map((participant) => /* @__PURE__ */ jsx(
|
|
6042
6178
|
CallParticipantTile,
|
|
6043
6179
|
{
|
|
6044
6180
|
participant,
|
|
@@ -6055,13 +6191,13 @@ function CallVideoGrid({
|
|
|
6055
6191
|
return /* @__PURE__ */ jsx(
|
|
6056
6192
|
View,
|
|
6057
6193
|
{
|
|
6058
|
-
style: [
|
|
6194
|
+
style: [styles32.stage, { paddingTop: padTop, paddingBottom: padBottom }],
|
|
6059
6195
|
onLayout,
|
|
6060
6196
|
children: scrolls ? /* @__PURE__ */ jsx(
|
|
6061
6197
|
ScrollView,
|
|
6062
6198
|
{
|
|
6063
6199
|
contentContainerStyle: [
|
|
6064
|
-
|
|
6200
|
+
styles32.scroll,
|
|
6065
6201
|
{ paddingBottom: (chromeInsets?.bottom ?? 0) + GAP }
|
|
6066
6202
|
],
|
|
6067
6203
|
showsVerticalScrollIndicator: false,
|
|
@@ -6071,7 +6207,7 @@ function CallVideoGrid({
|
|
|
6071
6207
|
}
|
|
6072
6208
|
);
|
|
6073
6209
|
}
|
|
6074
|
-
var
|
|
6210
|
+
var styles32 = StyleSheet.create({
|
|
6075
6211
|
stage: { flex: 1, overflow: "hidden" },
|
|
6076
6212
|
fill: { ...StyleSheet.absoluteFillObject },
|
|
6077
6213
|
grid: { flexDirection: "row", flexWrap: "wrap", gap: GAP },
|
|
@@ -6430,7 +6566,7 @@ function CallScreen({
|
|
|
6430
6566
|
/* @__PURE__ */ jsx(StatusBar, { barStyle: "light-content" }),
|
|
6431
6567
|
/* @__PURE__ */ jsxs(SafeAreaProvider, { children: [
|
|
6432
6568
|
/* @__PURE__ */ jsx(InsetsProbe, { onChange: setInsets }),
|
|
6433
|
-
/* @__PURE__ */ jsxs(Pressable, { style:
|
|
6569
|
+
/* @__PURE__ */ jsxs(Pressable, { style: styles33.screen, onPress: toggleChrome, accessible: false, children: [
|
|
6434
6570
|
/* @__PURE__ */ jsx(CallBackdrop, {}),
|
|
6435
6571
|
showStage ? /* @__PURE__ */ jsx(
|
|
6436
6572
|
CallVideoGrid,
|
|
@@ -6449,10 +6585,10 @@ function CallScreen({
|
|
|
6449
6585
|
/* @__PURE__ */ jsxs(
|
|
6450
6586
|
View,
|
|
6451
6587
|
{
|
|
6452
|
-
style: [
|
|
6588
|
+
style: [styles33.identity, { paddingBottom: insets.bottom + 160 }],
|
|
6453
6589
|
pointerEvents: "none",
|
|
6454
6590
|
children: [
|
|
6455
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6591
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.avatarStage, children: [
|
|
6456
6592
|
(ringingIn || ringingOut) && /* @__PURE__ */ jsx(PulseRings, { size: 132, color: callColors.glow }),
|
|
6457
6593
|
/* @__PURE__ */ jsx(
|
|
6458
6594
|
CallAvatar,
|
|
@@ -6463,31 +6599,31 @@ function CallScreen({
|
|
|
6463
6599
|
}
|
|
6464
6600
|
)
|
|
6465
6601
|
] }),
|
|
6466
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 2, style:
|
|
6467
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6468
|
-
connected && /* @__PURE__ */ jsx(View, { style:
|
|
6469
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
6602
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 2, style: styles33.identityTitle, children: title }),
|
|
6603
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.statusPill, children: [
|
|
6604
|
+
connected && /* @__PURE__ */ jsx(View, { style: styles33.statusDot }),
|
|
6605
|
+
/* @__PURE__ */ jsx(Text, { style: styles33.statusText, children: subtitle })
|
|
6470
6606
|
] })
|
|
6471
6607
|
]
|
|
6472
6608
|
}
|
|
6473
6609
|
)
|
|
6474
6610
|
),
|
|
6475
|
-
chromeVisible && showStage && /* @__PURE__ */ jsxs(View, { style: [
|
|
6476
|
-
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style:
|
|
6477
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6611
|
+
chromeVisible && showStage && /* @__PURE__ */ jsxs(View, { style: [styles33.header, { paddingTop: insets.top + 14 }], pointerEvents: "box-none", children: [
|
|
6612
|
+
/* @__PURE__ */ jsx(Text, { numberOfLines: 1, style: styles33.title, children: title }),
|
|
6613
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.subtitleRow, children: [
|
|
6478
6614
|
isGroup && /* @__PURE__ */ jsx(PoolseIcon, { name: "users", size: 14, color: callColors.textDim, label: null }),
|
|
6479
|
-
/* @__PURE__ */ jsx(Text, { style:
|
|
6615
|
+
/* @__PURE__ */ jsx(Text, { style: styles33.subtitle, children: isGroup ? `${participants.length} \xB7 ${subtitle}` : subtitle })
|
|
6480
6616
|
] })
|
|
6481
6617
|
] }),
|
|
6482
6618
|
chromeVisible && /* @__PURE__ */ jsxs(
|
|
6483
6619
|
View,
|
|
6484
6620
|
{
|
|
6485
|
-
style: [
|
|
6621
|
+
style: [styles33.controls, { paddingBottom: insets.bottom + 22 }],
|
|
6486
6622
|
pointerEvents: "box-none",
|
|
6487
6623
|
children: [
|
|
6488
|
-
error && /* @__PURE__ */ jsx(Text, { style:
|
|
6489
|
-
!meshAvailable && !livekit && /* @__PURE__ */ jsx(Text, { style:
|
|
6490
|
-
ringingIn ? /* @__PURE__ */ jsxs(View, { style:
|
|
6624
|
+
error && /* @__PURE__ */ jsx(Text, { style: styles33.error, children: error.message }),
|
|
6625
|
+
!meshAvailable && !livekit && /* @__PURE__ */ jsx(Text, { style: styles33.error, children: "No WebRTC module supplied \u2014 this call has no audio." }),
|
|
6626
|
+
ringingIn ? /* @__PURE__ */ jsxs(View, { style: styles33.answerRow, children: [
|
|
6491
6627
|
/* @__PURE__ */ jsx(
|
|
6492
6628
|
CallControlButton,
|
|
6493
6629
|
{
|
|
@@ -6510,7 +6646,7 @@ function CallScreen({
|
|
|
6510
6646
|
accessibilityLabel: "Accept call"
|
|
6511
6647
|
}
|
|
6512
6648
|
)
|
|
6513
|
-
] }) : ended ? /* @__PURE__ */ jsx(View, { style:
|
|
6649
|
+
] }) : ended ? /* @__PURE__ */ jsx(View, { style: styles33.row, children: /* @__PURE__ */ jsx(
|
|
6514
6650
|
CallControlButton,
|
|
6515
6651
|
{
|
|
6516
6652
|
icon: "close",
|
|
@@ -6519,7 +6655,7 @@ function CallScreen({
|
|
|
6519
6655
|
accessibilityLabel: "Close"
|
|
6520
6656
|
}
|
|
6521
6657
|
) }) : /* @__PURE__ */ jsxs(Fragment, { children: [
|
|
6522
|
-
/* @__PURE__ */ jsxs(View, { style:
|
|
6658
|
+
/* @__PURE__ */ jsxs(View, { style: styles33.dock, children: [
|
|
6523
6659
|
/* @__PURE__ */ jsx(
|
|
6524
6660
|
CallControlButton,
|
|
6525
6661
|
{
|
|
@@ -6560,7 +6696,7 @@ function CallScreen({
|
|
|
6560
6696
|
}
|
|
6561
6697
|
)
|
|
6562
6698
|
] }),
|
|
6563
|
-
/* @__PURE__ */ jsx(View, { style:
|
|
6699
|
+
/* @__PURE__ */ jsx(View, { style: styles33.hangUpRow, children: /* @__PURE__ */ jsx(
|
|
6564
6700
|
CallControlButton,
|
|
6565
6701
|
{
|
|
6566
6702
|
icon: "phone-off",
|
|
@@ -6636,7 +6772,7 @@ function statusLine(calls, mediaStatus) {
|
|
|
6636
6772
|
return "";
|
|
6637
6773
|
}
|
|
6638
6774
|
}
|
|
6639
|
-
var
|
|
6775
|
+
var styles33 = StyleSheet.create({
|
|
6640
6776
|
screen: { flex: 1, backgroundColor: callColors.bg },
|
|
6641
6777
|
identity: {
|
|
6642
6778
|
flex: 1,
|
|
@@ -6940,6 +7076,6 @@ function guessApnsEnvironment() {
|
|
|
6940
7076
|
return __DEV__ ? "sandbox" : "production";
|
|
6941
7077
|
}
|
|
6942
7078
|
|
|
6943
|
-
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 };
|
|
7079
|
+
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 };
|
|
6944
7080
|
//# sourceMappingURL=index.js.map
|
|
6945
7081
|
//# sourceMappingURL=index.js.map
|