@poolse/react-native 2.24.0 → 2.25.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +775 -536
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +34 -7
- package/dist/index.d.ts +34 -7
- package/dist/index.js +778 -540
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.cjs
CHANGED
|
@@ -5,10 +5,10 @@ var react = require('react');
|
|
|
5
5
|
var reactNative = require('react-native');
|
|
6
6
|
var jsxRuntime = require('react/jsx-runtime');
|
|
7
7
|
var Svg2 = require('react-native-svg');
|
|
8
|
+
var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
8
9
|
var ImagePicker = require('expo-image-picker');
|
|
9
10
|
var DocumentPicker = require('expo-document-picker');
|
|
10
11
|
var expoImageManipulator = require('expo-image-manipulator');
|
|
11
|
-
var reactNativeSafeAreaContext = require('react-native-safe-area-context');
|
|
12
12
|
var Clipboard = require('expo-clipboard');
|
|
13
13
|
var Markdown = require('react-native-markdown-display');
|
|
14
14
|
|
|
@@ -647,6 +647,13 @@ var styles2 = reactNative.StyleSheet.create({
|
|
|
647
647
|
padding: 6
|
|
648
648
|
}
|
|
649
649
|
});
|
|
650
|
+
|
|
651
|
+
// src/internal/edgeToEdge.ts
|
|
652
|
+
var EDGE_TO_EDGE_MODAL = {
|
|
653
|
+
statusBarTranslucent: true,
|
|
654
|
+
navigationBarTranslucent: true
|
|
655
|
+
};
|
|
656
|
+
var useSafeInsets = reactNativeSafeAreaContext.useSafeAreaInsets;
|
|
650
657
|
function useDismissableSheet({ onClose, sheetHeight, dismissThreshold = 0.22 }) {
|
|
651
658
|
const translateY = react.useRef(new reactNative.Animated.Value(0)).current;
|
|
652
659
|
const panResponder = react.useMemo(
|
|
@@ -701,6 +708,7 @@ function GroupDetailsSheet({
|
|
|
701
708
|
const theme = usePoolseTheme();
|
|
702
709
|
const { conversation } = react$1.useConversation(conversationId);
|
|
703
710
|
const { members } = react$1.useMembers(conversationId);
|
|
711
|
+
const insets = useSafeInsets();
|
|
704
712
|
const { height: screenHeight } = reactNative.useWindowDimensions();
|
|
705
713
|
const { translateY, panHandlers } = useDismissableSheet({
|
|
706
714
|
onClose,
|
|
@@ -715,7 +723,7 @@ function GroupDetailsSheet({
|
|
|
715
723
|
transparent: true,
|
|
716
724
|
animationType: "slide",
|
|
717
725
|
onRequestClose: onClose,
|
|
718
|
-
|
|
726
|
+
...EDGE_TO_EDGE_MODAL,
|
|
719
727
|
children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles3.modalRoot, children: [
|
|
720
728
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
721
729
|
reactNative.Pressable,
|
|
@@ -734,6 +742,11 @@ function GroupDetailsSheet({
|
|
|
734
742
|
backgroundColor: theme.colors.paper,
|
|
735
743
|
borderTopLeftRadius: theme.radii.xl,
|
|
736
744
|
borderTopRightRadius: theme.radii.xl,
|
|
745
|
+
// Header stays below the status bar even on short screens.
|
|
746
|
+
maxHeight: screenHeight - insets.top - 8,
|
|
747
|
+
paddingBottom: insets.bottom,
|
|
748
|
+
paddingLeft: insets.left,
|
|
749
|
+
paddingRight: insets.right,
|
|
737
750
|
transform: [{ translateY }]
|
|
738
751
|
},
|
|
739
752
|
theme.shadows.lg
|
|
@@ -1021,6 +1034,7 @@ function ConversationList({
|
|
|
1021
1034
|
const auto = react$1.useConversations();
|
|
1022
1035
|
const { me } = react$1.useMe();
|
|
1023
1036
|
const meExternalId = me?.external_id ?? null;
|
|
1037
|
+
const meId = me?.id ?? null;
|
|
1024
1038
|
const isControlled = controlled !== void 0;
|
|
1025
1039
|
const conversations = isControlled ? controlled : auto.conversations;
|
|
1026
1040
|
const loading = isControlled ? controlledLoading ?? false : auto.loading;
|
|
@@ -1052,6 +1066,7 @@ function ConversationList({
|
|
|
1052
1066
|
conv: item,
|
|
1053
1067
|
selected,
|
|
1054
1068
|
meExternalId,
|
|
1069
|
+
meId,
|
|
1055
1070
|
unread: counts?.[item.id] ?? 0,
|
|
1056
1071
|
...labelFor ? { labelFor } : {},
|
|
1057
1072
|
...avatarFor ? { avatarFor } : {},
|
|
@@ -1066,6 +1081,7 @@ function ConversationRow({
|
|
|
1066
1081
|
conv,
|
|
1067
1082
|
selected,
|
|
1068
1083
|
meExternalId,
|
|
1084
|
+
meId = null,
|
|
1069
1085
|
unread,
|
|
1070
1086
|
labelFor,
|
|
1071
1087
|
avatarFor,
|
|
@@ -1099,7 +1115,7 @@ function ConversationRow({
|
|
|
1099
1115
|
children: title
|
|
1100
1116
|
}
|
|
1101
1117
|
),
|
|
1102
|
-
conv.last_message_preview ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: conv.last_message_preview }) : conv.last_message_at ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: formatRelative(conv.last_message_at) }) : null
|
|
1118
|
+
conv.last_message_preview ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: react$1.formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview }) : conv.last_message_at ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.preview, { color: theme.colors.ink3 }], numberOfLines: 1, children: formatRelative(conv.last_message_at) }) : null
|
|
1103
1119
|
] }),
|
|
1104
1120
|
unread > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles5.unreadPill, { backgroundColor: theme.colors.unreadPill }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles5.unreadText, { color: theme.colors.unreadPillText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
|
|
1105
1121
|
]
|
|
@@ -1193,6 +1209,7 @@ function AttachmentPicker({
|
|
|
1193
1209
|
camera = true
|
|
1194
1210
|
}) {
|
|
1195
1211
|
const theme = usePoolseTheme();
|
|
1212
|
+
const insets = useSafeInsets();
|
|
1196
1213
|
const upload = useSharedUpload();
|
|
1197
1214
|
const { setPreview } = useUploadPreview();
|
|
1198
1215
|
const pickFromKind = async (kind) => {
|
|
@@ -1212,35 +1229,49 @@ function AttachmentPicker({
|
|
|
1212
1229
|
onClose();
|
|
1213
1230
|
}
|
|
1214
1231
|
};
|
|
1215
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1216
|
-
reactNative.
|
|
1232
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1233
|
+
reactNative.Modal,
|
|
1217
1234
|
{
|
|
1218
|
-
|
|
1219
|
-
|
|
1235
|
+
visible,
|
|
1236
|
+
transparent: true,
|
|
1237
|
+
animationType: "slide",
|
|
1238
|
+
onRequestClose: onClose,
|
|
1239
|
+
...EDGE_TO_EDGE_MODAL,
|
|
1240
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles6.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
1241
|
+
reactNative.View,
|
|
1220
1242
|
{
|
|
1221
|
-
|
|
1222
|
-
|
|
1223
|
-
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1243
|
+
style: [
|
|
1244
|
+
styles6.sheet,
|
|
1245
|
+
{
|
|
1246
|
+
backgroundColor: theme.colors.surface,
|
|
1247
|
+
borderTopLeftRadius: theme.radii.lg,
|
|
1248
|
+
borderTopRightRadius: theme.radii.lg,
|
|
1249
|
+
// Cancel must sit above the nav bar / home indicator.
|
|
1250
|
+
paddingBottom: 24 + insets.bottom,
|
|
1251
|
+
paddingLeft: insets.left,
|
|
1252
|
+
paddingRight: insets.right
|
|
1253
|
+
},
|
|
1254
|
+
theme.shadows.lg
|
|
1255
|
+
],
|
|
1256
|
+
children: [
|
|
1257
|
+
camera ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles6.item, onPress: () => pickFromKind("camera"), children: [
|
|
1258
|
+
/* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "camera", size: 20, color: theme.colors.ink2 }),
|
|
1259
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Camera" })
|
|
1260
|
+
] }) : null,
|
|
1261
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles6.item, onPress: () => pickFromKind("image"), children: [
|
|
1262
|
+
/* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "image", size: 20, color: theme.colors.ink2 }),
|
|
1263
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "Photo or video" })
|
|
1264
|
+
] }),
|
|
1265
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles6.item, onPress: () => pickFromKind("document"), children: [
|
|
1266
|
+
/* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "attachment", size: 20, color: theme.colors.ink2 }),
|
|
1267
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.ink }], children: "File" })
|
|
1268
|
+
] }),
|
|
1269
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles6.cancel, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles6.itemText, { color: theme.colors.brand }], children: "Cancel" }) })
|
|
1270
|
+
]
|
|
1271
|
+
}
|
|
1272
|
+
) })
|
|
1242
1273
|
}
|
|
1243
|
-
)
|
|
1274
|
+
);
|
|
1244
1275
|
}
|
|
1245
1276
|
async function uriToBlob(uri) {
|
|
1246
1277
|
const res = await fetch(uri);
|
|
@@ -1666,7 +1697,24 @@ var styles8 = reactNative.StyleSheet.create({
|
|
|
1666
1697
|
fontWeight: "700"
|
|
1667
1698
|
}
|
|
1668
1699
|
});
|
|
1669
|
-
|
|
1700
|
+
function useKeyboardOpen() {
|
|
1701
|
+
const [open, setOpen] = react.useState(false);
|
|
1702
|
+
react.useEffect(() => {
|
|
1703
|
+
const show = reactNative.Keyboard.addListener(
|
|
1704
|
+
reactNative.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
|
|
1705
|
+
() => setOpen(true)
|
|
1706
|
+
);
|
|
1707
|
+
const hide = reactNative.Keyboard.addListener(
|
|
1708
|
+
reactNative.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
|
|
1709
|
+
() => setOpen(false)
|
|
1710
|
+
);
|
|
1711
|
+
return () => {
|
|
1712
|
+
show.remove();
|
|
1713
|
+
hide.remove();
|
|
1714
|
+
};
|
|
1715
|
+
}, []);
|
|
1716
|
+
return open;
|
|
1717
|
+
}
|
|
1670
1718
|
var MessageComposer = react.forwardRef(
|
|
1671
1719
|
function MessageComposer2({
|
|
1672
1720
|
onSend,
|
|
@@ -1687,23 +1735,9 @@ var MessageComposer = react.forwardRef(
|
|
|
1687
1735
|
const inputRef = react.useRef(null);
|
|
1688
1736
|
const [value, setValue] = react.useState("");
|
|
1689
1737
|
const [sending, setSending] = react.useState(false);
|
|
1690
|
-
const
|
|
1738
|
+
const keyboardOpen = useKeyboardOpen();
|
|
1691
1739
|
const upload = useSharedUpload();
|
|
1692
1740
|
const insets = useSafeInsets();
|
|
1693
|
-
react.useEffect(() => {
|
|
1694
|
-
const show = reactNative.Keyboard.addListener(
|
|
1695
|
-
reactNative.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
|
|
1696
|
-
() => setKeyboardOpen(true)
|
|
1697
|
-
);
|
|
1698
|
-
const hide = reactNative.Keyboard.addListener(
|
|
1699
|
-
reactNative.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
|
|
1700
|
-
() => setKeyboardOpen(false)
|
|
1701
|
-
);
|
|
1702
|
-
return () => {
|
|
1703
|
-
show.remove();
|
|
1704
|
-
hide.remove();
|
|
1705
|
-
};
|
|
1706
|
-
}, []);
|
|
1707
1741
|
react.useImperativeHandle(
|
|
1708
1742
|
ref,
|
|
1709
1743
|
() => ({
|
|
@@ -1959,6 +1993,8 @@ var styles9 = reactNative.StyleSheet.create({
|
|
|
1959
1993
|
});
|
|
1960
1994
|
function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
1961
1995
|
const theme = usePoolseTheme();
|
|
1996
|
+
const insets = useSafeInsets();
|
|
1997
|
+
const keyboardOpen = useKeyboardOpen();
|
|
1962
1998
|
const { members } = react$1.useMembers(conversationId);
|
|
1963
1999
|
const [pickerOpen, setPickerOpen] = react.useState(false);
|
|
1964
2000
|
const [pickerQuery, _setPickerQuery] = react.useState("");
|
|
@@ -1997,7 +2033,8 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
1997
2033
|
transparent: true,
|
|
1998
2034
|
animationType: "slide",
|
|
1999
2035
|
onRequestClose: () => setPickerOpen(false),
|
|
2000
|
-
|
|
2036
|
+
...EDGE_TO_EDGE_MODAL,
|
|
2037
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.KeyboardAvoidingView, { style: styles10.kav, behavior: "padding", children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles10.backdrop, onPress: () => setPickerOpen(false), children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2001
2038
|
reactNative.View,
|
|
2002
2039
|
{
|
|
2003
2040
|
style: [
|
|
@@ -2005,7 +2042,12 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2005
2042
|
{
|
|
2006
2043
|
backgroundColor: theme.colors.surface,
|
|
2007
2044
|
borderTopLeftRadius: theme.radii.lg,
|
|
2008
|
-
borderTopRightRadius: theme.radii.lg
|
|
2045
|
+
borderTopRightRadius: theme.radii.lg,
|
|
2046
|
+
// Clear the nav bar — unless the keyboard is covering
|
|
2047
|
+
// it, where the inset would just be a gap.
|
|
2048
|
+
paddingBottom: 12 + (keyboardOpen ? 0 : insets.bottom),
|
|
2049
|
+
paddingLeft: insets.left,
|
|
2050
|
+
paddingRight: insets.right
|
|
2009
2051
|
}
|
|
2010
2052
|
],
|
|
2011
2053
|
children: [
|
|
@@ -2021,6 +2063,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2021
2063
|
{
|
|
2022
2064
|
data: filteredMembers,
|
|
2023
2065
|
keyExtractor: (m) => m.user_id,
|
|
2066
|
+
keyboardShouldPersistTaps: "handled",
|
|
2024
2067
|
renderItem: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2025
2068
|
MentionRow,
|
|
2026
2069
|
{
|
|
@@ -2036,7 +2079,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2036
2079
|
)
|
|
2037
2080
|
]
|
|
2038
2081
|
}
|
|
2039
|
-
) })
|
|
2082
|
+
) }) })
|
|
2040
2083
|
}
|
|
2041
2084
|
)
|
|
2042
2085
|
] });
|
|
@@ -2049,6 +2092,9 @@ function MentionRow({ member, onPress }) {
|
|
|
2049
2092
|
] });
|
|
2050
2093
|
}
|
|
2051
2094
|
var styles10 = reactNative.StyleSheet.create({
|
|
2095
|
+
kav: {
|
|
2096
|
+
flex: 1
|
|
2097
|
+
},
|
|
2052
2098
|
backdrop: {
|
|
2053
2099
|
flex: 1,
|
|
2054
2100
|
backgroundColor: "rgba(0,0,0,0.35)",
|
|
@@ -2205,6 +2251,87 @@ var styles11 = reactNative.StyleSheet.create({
|
|
|
2205
2251
|
fontWeight: "600"
|
|
2206
2252
|
}
|
|
2207
2253
|
});
|
|
2254
|
+
function CallLogRow({ msg, meId }) {
|
|
2255
|
+
const theme = usePoolseTheme();
|
|
2256
|
+
const display = react$1.callLogDisplayFor(msg, meId);
|
|
2257
|
+
if (!display) return null;
|
|
2258
|
+
const accent = display.missed ? theme.colors.error : theme.colors.ink3;
|
|
2259
|
+
const time = formatTime(msg.inserted_at);
|
|
2260
|
+
const label = [display.title, display.detail, time].filter(Boolean).join(", ");
|
|
2261
|
+
const metaStyle = [styles12.meta, { color: theme.colors.ink3, fontFamily: theme.type.fontBody }];
|
|
2262
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles12.wrap, accessible: true, accessibilityLabel: label, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2263
|
+
reactNative.View,
|
|
2264
|
+
{
|
|
2265
|
+
style: [
|
|
2266
|
+
styles12.chip,
|
|
2267
|
+
{
|
|
2268
|
+
backgroundColor: theme.colors.surface2,
|
|
2269
|
+
borderColor: theme.colors.border
|
|
2270
|
+
}
|
|
2271
|
+
],
|
|
2272
|
+
children: [
|
|
2273
|
+
/* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: display.media === "video" ? "video" : "phone", size: 13, color: accent }),
|
|
2274
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2275
|
+
reactNative.Text,
|
|
2276
|
+
{
|
|
2277
|
+
style: [
|
|
2278
|
+
styles12.title,
|
|
2279
|
+
{
|
|
2280
|
+
color: display.missed ? theme.colors.error : theme.colors.ink2,
|
|
2281
|
+
fontFamily: theme.type.fontBody
|
|
2282
|
+
}
|
|
2283
|
+
],
|
|
2284
|
+
numberOfLines: 1,
|
|
2285
|
+
children: display.title
|
|
2286
|
+
}
|
|
2287
|
+
),
|
|
2288
|
+
display.detail ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: metaStyle, children: [
|
|
2289
|
+
"\xB7 ",
|
|
2290
|
+
display.detail
|
|
2291
|
+
] }) : null,
|
|
2292
|
+
time ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: metaStyle, children: [
|
|
2293
|
+
"\xB7 ",
|
|
2294
|
+
time
|
|
2295
|
+
] }) : null
|
|
2296
|
+
]
|
|
2297
|
+
}
|
|
2298
|
+
) });
|
|
2299
|
+
}
|
|
2300
|
+
function formatTime(iso) {
|
|
2301
|
+
const d = new Date(iso);
|
|
2302
|
+
if (Number.isNaN(d.getTime())) return "";
|
|
2303
|
+
return d.toLocaleTimeString([], { hour: "numeric", minute: "2-digit" });
|
|
2304
|
+
}
|
|
2305
|
+
var styles12 = reactNative.StyleSheet.create({
|
|
2306
|
+
wrap: {
|
|
2307
|
+
alignItems: "center",
|
|
2308
|
+
alignSelf: "stretch",
|
|
2309
|
+
marginVertical: 6,
|
|
2310
|
+
paddingHorizontal: 16
|
|
2311
|
+
},
|
|
2312
|
+
chip: {
|
|
2313
|
+
flexDirection: "row",
|
|
2314
|
+
alignItems: "center",
|
|
2315
|
+
gap: 6,
|
|
2316
|
+
maxWidth: "100%",
|
|
2317
|
+
paddingHorizontal: 12,
|
|
2318
|
+
paddingVertical: 4,
|
|
2319
|
+
borderRadius: 999,
|
|
2320
|
+
borderWidth: reactNative.StyleSheet.hairlineWidth
|
|
2321
|
+
},
|
|
2322
|
+
title: {
|
|
2323
|
+
fontSize: 11,
|
|
2324
|
+
fontWeight: "600",
|
|
2325
|
+
letterSpacing: 0.3,
|
|
2326
|
+
flexShrink: 1
|
|
2327
|
+
},
|
|
2328
|
+
meta: {
|
|
2329
|
+
fontSize: 11,
|
|
2330
|
+
fontWeight: "500",
|
|
2331
|
+
letterSpacing: 0.3,
|
|
2332
|
+
fontVariant: ["tabular-nums"]
|
|
2333
|
+
}
|
|
2334
|
+
});
|
|
2208
2335
|
var DEFAULT_REACTION_EMOJIS = ["\u{1F44D}", "\u2764\uFE0F", "\u{1F602}", "\u{1F389}", "\u{1F64F}", "\u{1F525}"];
|
|
2209
2336
|
function MessageActions({
|
|
2210
2337
|
visible,
|
|
@@ -2220,6 +2347,7 @@ function MessageActions({
|
|
|
2220
2347
|
onCopy
|
|
2221
2348
|
}) {
|
|
2222
2349
|
const theme = usePoolseTheme();
|
|
2350
|
+
const insets = useSafeInsets();
|
|
2223
2351
|
const items = [];
|
|
2224
2352
|
if (onReply) items.push({ label: "Reply", icon: "reply", onPress: onReply });
|
|
2225
2353
|
if (onQuote) items.push({ label: "Quote reply", icon: "reply", onPress: onQuote });
|
|
@@ -2230,61 +2358,75 @@ function MessageActions({
|
|
|
2230
2358
|
if (isSelf && onDelete)
|
|
2231
2359
|
items.push({ label: "Delete", icon: "trash", onPress: onDelete, danger: true });
|
|
2232
2360
|
const showEmojiRow = !!onPickReaction && emojis.length > 0;
|
|
2233
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2234
|
-
reactNative.
|
|
2361
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2362
|
+
reactNative.Modal,
|
|
2235
2363
|
{
|
|
2236
|
-
|
|
2237
|
-
|
|
2364
|
+
visible,
|
|
2365
|
+
transparent: true,
|
|
2366
|
+
animationType: "fade",
|
|
2367
|
+
onRequestClose: onClose,
|
|
2368
|
+
...EDGE_TO_EDGE_MODAL,
|
|
2369
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles13.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2370
|
+
reactNative.View,
|
|
2238
2371
|
{
|
|
2239
|
-
|
|
2240
|
-
|
|
2241
|
-
borderTopRightRadius: theme.radii.lg
|
|
2242
|
-
},
|
|
2243
|
-
theme.shadows.lg
|
|
2244
|
-
],
|
|
2245
|
-
children: [
|
|
2246
|
-
showEmojiRow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles12.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2247
|
-
reactNative.Pressable,
|
|
2248
|
-
{
|
|
2249
|
-
onPress: () => {
|
|
2250
|
-
onPickReaction(emoji);
|
|
2251
|
-
onClose();
|
|
2252
|
-
},
|
|
2253
|
-
style: styles12.emojiBtn,
|
|
2254
|
-
hitSlop: 6,
|
|
2255
|
-
accessibilityLabel: `React with ${emoji}`,
|
|
2256
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles12.emoji, children: emoji })
|
|
2257
|
-
},
|
|
2258
|
-
emoji
|
|
2259
|
-
)) }) : null,
|
|
2260
|
-
items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress: item.onPress, style: styles12.item, children: [
|
|
2261
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2262
|
-
PoolseIcon,
|
|
2263
|
-
{
|
|
2264
|
-
name: item.icon,
|
|
2265
|
-
size: 18,
|
|
2266
|
-
color: item.danger ? theme.colors.error : theme.colors.ink2
|
|
2267
|
-
}
|
|
2268
|
-
),
|
|
2269
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2270
|
-
reactNative.Text,
|
|
2372
|
+
style: [
|
|
2373
|
+
styles13.sheet,
|
|
2271
2374
|
{
|
|
2272
|
-
|
|
2273
|
-
|
|
2375
|
+
backgroundColor: theme.colors.surface,
|
|
2376
|
+
borderTopLeftRadius: theme.radii.lg,
|
|
2377
|
+
borderTopRightRadius: theme.radii.lg,
|
|
2378
|
+
// Last action row must sit above the nav bar / home indicator.
|
|
2379
|
+
paddingBottom: 24 + insets.bottom,
|
|
2380
|
+
paddingLeft: insets.left,
|
|
2381
|
+
paddingRight: insets.right
|
|
2382
|
+
},
|
|
2383
|
+
theme.shadows.lg
|
|
2384
|
+
],
|
|
2385
|
+
children: [
|
|
2386
|
+
showEmojiRow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles13.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2387
|
+
reactNative.Pressable,
|
|
2388
|
+
{
|
|
2389
|
+
onPress: () => {
|
|
2390
|
+
onPickReaction(emoji);
|
|
2391
|
+
onClose();
|
|
2392
|
+
},
|
|
2393
|
+
style: styles13.emojiBtn,
|
|
2394
|
+
hitSlop: 6,
|
|
2395
|
+
accessibilityLabel: `React with ${emoji}`,
|
|
2396
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles13.emoji, children: emoji })
|
|
2397
|
+
},
|
|
2398
|
+
emoji
|
|
2399
|
+
)) }) : null,
|
|
2400
|
+
items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress: item.onPress, style: styles13.item, children: [
|
|
2401
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2402
|
+
PoolseIcon,
|
|
2274
2403
|
{
|
|
2275
|
-
|
|
2276
|
-
|
|
2404
|
+
name: item.icon,
|
|
2405
|
+
size: 18,
|
|
2406
|
+
color: item.danger ? theme.colors.error : theme.colors.ink2
|
|
2277
2407
|
}
|
|
2278
|
-
|
|
2279
|
-
|
|
2280
|
-
|
|
2281
|
-
|
|
2282
|
-
|
|
2283
|
-
|
|
2408
|
+
),
|
|
2409
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2410
|
+
reactNative.Text,
|
|
2411
|
+
{
|
|
2412
|
+
style: [
|
|
2413
|
+
styles13.itemText,
|
|
2414
|
+
{
|
|
2415
|
+
color: item.danger ? theme.colors.error : theme.colors.ink,
|
|
2416
|
+
fontFamily: theme.type.fontBody
|
|
2417
|
+
}
|
|
2418
|
+
],
|
|
2419
|
+
children: item.label
|
|
2420
|
+
}
|
|
2421
|
+
)
|
|
2422
|
+
] }, item.label))
|
|
2423
|
+
]
|
|
2424
|
+
}
|
|
2425
|
+
) })
|
|
2284
2426
|
}
|
|
2285
|
-
)
|
|
2427
|
+
);
|
|
2286
2428
|
}
|
|
2287
|
-
var
|
|
2429
|
+
var styles13 = reactNative.StyleSheet.create({
|
|
2288
2430
|
backdrop: {
|
|
2289
2431
|
flex: 1,
|
|
2290
2432
|
backgroundColor: "rgba(0,0,0,0.35)",
|
|
@@ -2354,7 +2496,7 @@ function AttachmentPreview({
|
|
|
2354
2496
|
reactNative.View,
|
|
2355
2497
|
{
|
|
2356
2498
|
style: [
|
|
2357
|
-
|
|
2499
|
+
styles14.imagePlaceholder,
|
|
2358
2500
|
{
|
|
2359
2501
|
width: maxWidth,
|
|
2360
2502
|
height: 200,
|
|
@@ -2374,7 +2516,7 @@ function AttachmentPreview({
|
|
|
2374
2516
|
onPress,
|
|
2375
2517
|
disabled: !onPress,
|
|
2376
2518
|
style: [
|
|
2377
|
-
|
|
2519
|
+
styles14.fileCard,
|
|
2378
2520
|
{
|
|
2379
2521
|
backgroundColor: onBrand ? "rgba(255,255,255,0.18)" : theme.colors.surface2,
|
|
2380
2522
|
borderColor: onBrand ? "transparent" : theme.colors.border,
|
|
@@ -2387,12 +2529,12 @@ function AttachmentPreview({
|
|
|
2387
2529
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2388
2530
|
reactNative.Text,
|
|
2389
2531
|
{
|
|
2390
|
-
style: [
|
|
2532
|
+
style: [styles14.fileName, { color: ink, fontFamily: theme.type.fontBody }],
|
|
2391
2533
|
numberOfLines: 1,
|
|
2392
2534
|
children: attachment.original_filename ?? "file"
|
|
2393
2535
|
}
|
|
2394
2536
|
),
|
|
2395
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2537
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles14.fileSize, { color: inkSoft, opacity: onBrand ? 0.8 : 1 }], children: formatBytes2(attachment.byte_size) })
|
|
2396
2538
|
] })
|
|
2397
2539
|
]
|
|
2398
2540
|
}
|
|
@@ -2404,7 +2546,7 @@ function formatBytes2(n) {
|
|
|
2404
2546
|
if (n < 1024 * 1024 * 1024) return `${(n / 1024 / 1024).toFixed(1)} MB`;
|
|
2405
2547
|
return `${(n / 1024 / 1024 / 1024).toFixed(1)} GB`;
|
|
2406
2548
|
}
|
|
2407
|
-
var
|
|
2549
|
+
var styles14 = reactNative.StyleSheet.create({
|
|
2408
2550
|
imagePlaceholder: {},
|
|
2409
2551
|
fileCard: {
|
|
2410
2552
|
flexDirection: "row",
|
|
@@ -2440,7 +2582,7 @@ function ImageMosaic({
|
|
|
2440
2582
|
reactNative.View,
|
|
2441
2583
|
{
|
|
2442
2584
|
style: [
|
|
2443
|
-
|
|
2585
|
+
styles15.root,
|
|
2444
2586
|
{
|
|
2445
2587
|
borderTopLeftRadius: r,
|
|
2446
2588
|
borderTopRightRadius: r,
|
|
@@ -2461,18 +2603,18 @@ function ImageMosaic({
|
|
|
2461
2603
|
{
|
|
2462
2604
|
onLongPress,
|
|
2463
2605
|
attachment: visible[0],
|
|
2464
|
-
style:
|
|
2606
|
+
style: styles15.tileFull,
|
|
2465
2607
|
onPress: () => setViewerIndex(0),
|
|
2466
2608
|
overlay: null
|
|
2467
2609
|
}
|
|
2468
2610
|
) : null,
|
|
2469
|
-
n === 2 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2611
|
+
n === 2 ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.rowEven, children: [
|
|
2470
2612
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2471
2613
|
Tile,
|
|
2472
2614
|
{
|
|
2473
2615
|
onLongPress,
|
|
2474
2616
|
attachment: visible[0],
|
|
2475
|
-
style:
|
|
2617
|
+
style: styles15.tileHalfSquare,
|
|
2476
2618
|
onPress: () => setViewerIndex(0),
|
|
2477
2619
|
overlay: null
|
|
2478
2620
|
}
|
|
@@ -2482,7 +2624,7 @@ function ImageMosaic({
|
|
|
2482
2624
|
{
|
|
2483
2625
|
onLongPress,
|
|
2484
2626
|
attachment: visible[1],
|
|
2485
|
-
style:
|
|
2627
|
+
style: styles15.tileHalfSquare,
|
|
2486
2628
|
onPress: () => setViewerIndex(1),
|
|
2487
2629
|
overlay: null
|
|
2488
2630
|
}
|
|
@@ -2494,18 +2636,18 @@ function ImageMosaic({
|
|
|
2494
2636
|
{
|
|
2495
2637
|
onLongPress,
|
|
2496
2638
|
attachment: visible[0],
|
|
2497
|
-
style:
|
|
2639
|
+
style: styles15.tileHero,
|
|
2498
2640
|
onPress: () => setViewerIndex(0),
|
|
2499
2641
|
overlay: null
|
|
2500
2642
|
}
|
|
2501
2643
|
),
|
|
2502
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2644
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.rowEven, { marginTop: 2 }], children: [
|
|
2503
2645
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2504
2646
|
Tile,
|
|
2505
2647
|
{
|
|
2506
2648
|
onLongPress,
|
|
2507
2649
|
attachment: visible[1],
|
|
2508
|
-
style:
|
|
2650
|
+
style: styles15.tileHalfSquare,
|
|
2509
2651
|
onPress: () => setViewerIndex(1),
|
|
2510
2652
|
overlay: null
|
|
2511
2653
|
}
|
|
@@ -2515,7 +2657,7 @@ function ImageMosaic({
|
|
|
2515
2657
|
{
|
|
2516
2658
|
onLongPress,
|
|
2517
2659
|
attachment: visible[2],
|
|
2518
|
-
style:
|
|
2660
|
+
style: styles15.tileHalfSquare,
|
|
2519
2661
|
onPress: () => setViewerIndex(2),
|
|
2520
2662
|
overlay: null
|
|
2521
2663
|
}
|
|
@@ -2523,13 +2665,13 @@ function ImageMosaic({
|
|
|
2523
2665
|
] })
|
|
2524
2666
|
] }) : null,
|
|
2525
2667
|
n === 4 ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
2526
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
2668
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles15.rowEven, children: [
|
|
2527
2669
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2528
2670
|
Tile,
|
|
2529
2671
|
{
|
|
2530
2672
|
onLongPress,
|
|
2531
2673
|
attachment: visible[0],
|
|
2532
|
-
style:
|
|
2674
|
+
style: styles15.tileHalfSquare,
|
|
2533
2675
|
onPress: () => setViewerIndex(0),
|
|
2534
2676
|
overlay: null
|
|
2535
2677
|
}
|
|
@@ -2539,19 +2681,19 @@ function ImageMosaic({
|
|
|
2539
2681
|
{
|
|
2540
2682
|
onLongPress,
|
|
2541
2683
|
attachment: visible[1],
|
|
2542
|
-
style:
|
|
2684
|
+
style: styles15.tileHalfSquare,
|
|
2543
2685
|
onPress: () => setViewerIndex(1),
|
|
2544
2686
|
overlay: null
|
|
2545
2687
|
}
|
|
2546
2688
|
)
|
|
2547
2689
|
] }),
|
|
2548
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
2690
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles15.rowEven, { marginTop: 2 }], children: [
|
|
2549
2691
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2550
2692
|
Tile,
|
|
2551
2693
|
{
|
|
2552
2694
|
onLongPress,
|
|
2553
2695
|
attachment: visible[2],
|
|
2554
|
-
style:
|
|
2696
|
+
style: styles15.tileHalfSquare,
|
|
2555
2697
|
onPress: () => setViewerIndex(2),
|
|
2556
2698
|
overlay: null
|
|
2557
2699
|
}
|
|
@@ -2561,7 +2703,7 @@ function ImageMosaic({
|
|
|
2561
2703
|
{
|
|
2562
2704
|
onLongPress,
|
|
2563
2705
|
attachment: visible[3],
|
|
2564
|
-
style:
|
|
2706
|
+
style: styles15.tileHalfSquare,
|
|
2565
2707
|
onPress: () => setViewerIndex(3),
|
|
2566
2708
|
overlay: overflow > 0 ? `+${overflow}` : null
|
|
2567
2709
|
}
|
|
@@ -2578,6 +2720,7 @@ function ImageMosaic({
|
|
|
2578
2720
|
transparent: true,
|
|
2579
2721
|
animationType: "fade",
|
|
2580
2722
|
onRequestClose: () => setViewerIndex(null),
|
|
2723
|
+
...EDGE_TO_EDGE_MODAL,
|
|
2581
2724
|
children: viewerIndex !== null ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2582
2725
|
FullScreenViewer,
|
|
2583
2726
|
{
|
|
@@ -2598,18 +2741,18 @@ function Tile({
|
|
|
2598
2741
|
}) {
|
|
2599
2742
|
const theme = usePoolseTheme();
|
|
2600
2743
|
const { url } = react$1.useAttachmentUrl(attachment.id);
|
|
2601
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, onLongPress, style: [
|
|
2744
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress, onLongPress, style: [styles15.tileBase, style], children: [
|
|
2602
2745
|
url ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2603
2746
|
reactNative.Image,
|
|
2604
2747
|
{
|
|
2605
2748
|
source: { uri: url },
|
|
2606
|
-
style: [
|
|
2749
|
+
style: [styles15.tileImage, { backgroundColor: theme.colors.surface2 }],
|
|
2607
2750
|
resizeMode: "cover",
|
|
2608
2751
|
accessible: true,
|
|
2609
2752
|
accessibilityLabel: attachment.original_filename ?? "image"
|
|
2610
2753
|
}
|
|
2611
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
2612
|
-
overlay ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2754
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles15.tileImage, { backgroundColor: theme.colors.surface2 }] }),
|
|
2755
|
+
overlay ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles15.overflow, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles15.overflowText, children: overlay }) }) : null
|
|
2613
2756
|
] });
|
|
2614
2757
|
}
|
|
2615
2758
|
function FullScreenViewer({
|
|
@@ -2617,8 +2760,9 @@ function FullScreenViewer({
|
|
|
2617
2760
|
onClose
|
|
2618
2761
|
}) {
|
|
2619
2762
|
const { url } = react$1.useAttachmentUrl(attachment.id);
|
|
2620
|
-
const { width, height } = reactNative.
|
|
2621
|
-
|
|
2763
|
+
const { width, height } = reactNative.useWindowDimensions();
|
|
2764
|
+
const insets = useSafeInsets();
|
|
2765
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles15.viewer, onPress: onClose, children: [
|
|
2622
2766
|
url ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2623
2767
|
reactNative.Image,
|
|
2624
2768
|
{
|
|
@@ -2634,14 +2778,14 @@ function FullScreenViewer({
|
|
|
2634
2778
|
{
|
|
2635
2779
|
onPress: onClose,
|
|
2636
2780
|
hitSlop: 12,
|
|
2637
|
-
style:
|
|
2781
|
+
style: [styles15.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
|
|
2638
2782
|
accessibilityLabel: "Close viewer",
|
|
2639
2783
|
children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
|
|
2640
2784
|
}
|
|
2641
2785
|
)
|
|
2642
2786
|
] });
|
|
2643
2787
|
}
|
|
2644
|
-
var
|
|
2788
|
+
var styles15 = reactNative.StyleSheet.create({
|
|
2645
2789
|
root: {
|
|
2646
2790
|
width: "100%",
|
|
2647
2791
|
overflow: "hidden",
|
|
@@ -2693,8 +2837,6 @@ var styles14 = reactNative.StyleSheet.create({
|
|
|
2693
2837
|
},
|
|
2694
2838
|
closeBtn: {
|
|
2695
2839
|
position: "absolute",
|
|
2696
|
-
top: 48,
|
|
2697
|
-
right: 16,
|
|
2698
2840
|
padding: 8,
|
|
2699
2841
|
backgroundColor: "rgba(0,0,0,0.5)",
|
|
2700
2842
|
borderRadius: 20
|
|
@@ -2815,7 +2957,7 @@ function MessageBubble({
|
|
|
2815
2957
|
const isEdited = !!message.edited_at && !isDeleted;
|
|
2816
2958
|
const trimmable = maxBodyLength > 0 && body.length > maxBodyLength;
|
|
2817
2959
|
const truncated = trimmable && !expanded ? body.slice(0, maxBodyLength) + "\u2026" : body;
|
|
2818
|
-
const time =
|
|
2960
|
+
const time = formatTime2(message.inserted_at);
|
|
2819
2961
|
const images = showAttachments && !isDeleted ? (message.attachments ?? []).filter((a) => isImageContentType(a.content_type)) : [];
|
|
2820
2962
|
const files = showAttachments && !isDeleted ? (message.attachments ?? []).filter((a) => !isImageContentType(a.content_type)) : [];
|
|
2821
2963
|
const hasMedia = images.length > 0;
|
|
@@ -2832,22 +2974,22 @@ function MessageBubble({
|
|
|
2832
2974
|
reactNative.View,
|
|
2833
2975
|
{
|
|
2834
2976
|
style: [
|
|
2835
|
-
|
|
2836
|
-
variant === "inline" &&
|
|
2837
|
-
variant === "wrapped" &&
|
|
2838
|
-
variant === "overlay" &&
|
|
2839
|
-
variant === "block" &&
|
|
2977
|
+
styles16.metaRow,
|
|
2978
|
+
variant === "inline" && styles16.metaInline,
|
|
2979
|
+
variant === "wrapped" && styles16.metaWrapped,
|
|
2980
|
+
variant === "overlay" && styles16.metaOverlay,
|
|
2981
|
+
variant === "block" && styles16.metaBlock,
|
|
2840
2982
|
// File-only bubble: the meta row follows the cards directly —
|
|
2841
2983
|
// give it air so the time doesn't sit glued to the card.
|
|
2842
|
-
variant === "block" && hasFiles && !hasBody &&
|
|
2843
|
-
variant === "jumbo" &&
|
|
2984
|
+
variant === "block" && hasFiles && !hasBody && styles16.metaBlockAfterFiles,
|
|
2985
|
+
variant === "jumbo" && styles16.metaJumbo
|
|
2844
2986
|
],
|
|
2845
2987
|
onLayout: variant === "inline" || variant === "wrapped" ? (e) => setMetaWidth(e.nativeEvent.layout.width) : void 0,
|
|
2846
2988
|
pointerEvents: "none",
|
|
2847
2989
|
children: [
|
|
2848
|
-
isEdited ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2849
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
2850
|
-
isSelf && readState ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
2990
|
+
isEdited ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.editedTag, { color, opacity: 0.8 }], children: "edited" }) : null,
|
|
2991
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.meta, { color, opacity: variant === "overlay" ? 1 : 0.75 }], children: time }),
|
|
2992
|
+
isSelf && readState ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.readTick, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2851
2993
|
PoolseIcon,
|
|
2852
2994
|
{
|
|
2853
2995
|
name: readState === "read" ? "check-double" : "check",
|
|
@@ -2859,7 +3001,7 @@ function MessageBubble({
|
|
|
2859
3001
|
}
|
|
2860
3002
|
);
|
|
2861
3003
|
};
|
|
2862
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
3004
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles16.wrap, { alignSelf: isSelf ? "flex-end" : "flex-start", maxWidth: bubbleMaxWidth }], children: [
|
|
2863
3005
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
2864
3006
|
reactNative.View,
|
|
2865
3007
|
{
|
|
@@ -2879,7 +3021,7 @@ function MessageBubble({
|
|
|
2879
3021
|
showSenderName && !isSelf && jumboCount === 0 && (groupPosition === "first" || groupPosition === "standalone") ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2880
3022
|
reactNative.Text,
|
|
2881
3023
|
{
|
|
2882
|
-
style: [
|
|
3024
|
+
style: [styles16.senderName, { color: senderTint, fontFamily: theme.type.fontBody }],
|
|
2883
3025
|
children: senderLabel
|
|
2884
3026
|
}
|
|
2885
3027
|
) : null,
|
|
@@ -2896,7 +3038,7 @@ function MessageBubble({
|
|
|
2896
3038
|
// 3px of bubble color framing the picture; the mosaic clips
|
|
2897
3039
|
// itself 3px tighter than the bubble so the curves stay
|
|
2898
3040
|
// concentric.
|
|
2899
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3041
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles16.mediaFrame, children: [
|
|
2900
3042
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2901
3043
|
ImageMosaic,
|
|
2902
3044
|
{
|
|
@@ -2910,7 +3052,7 @@ function MessageBubble({
|
|
|
2910
3052
|
metaOverlay ? metaRow("overlay") : null
|
|
2911
3053
|
] })
|
|
2912
3054
|
) : null,
|
|
2913
|
-
hasFiles ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3055
|
+
hasFiles ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.filesBlock, children: files.map((att) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2914
3056
|
AttachmentPreview,
|
|
2915
3057
|
{
|
|
2916
3058
|
attachment: att,
|
|
@@ -2919,7 +3061,7 @@ function MessageBubble({
|
|
|
2919
3061
|
},
|
|
2920
3062
|
att.id
|
|
2921
3063
|
)) }) : null,
|
|
2922
|
-
isDeleted ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
3064
|
+
isDeleted ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles16.textBlock, sectionAbove && styles16.textBlockAfter], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2923
3065
|
reactNative.Text,
|
|
2924
3066
|
{
|
|
2925
3067
|
style: {
|
|
@@ -2933,7 +3075,7 @@ function MessageBubble({
|
|
|
2933
3075
|
children: "Message deleted"
|
|
2934
3076
|
}
|
|
2935
3077
|
) }) : null,
|
|
2936
|
-
hasBody && jumboCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3078
|
+
hasBody && jumboCount > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.jumboBlock, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
2937
3079
|
reactNative.Text,
|
|
2938
3080
|
{
|
|
2939
3081
|
style: { fontSize: emojiFontSize(jumboCount), lineHeight: emojiFontSize(jumboCount) + 8 },
|
|
@@ -2943,7 +3085,7 @@ function MessageBubble({
|
|
|
2943
3085
|
hasBody && jumboCount === 0 ? /* @__PURE__ */ jsxRuntime.jsxs(
|
|
2944
3086
|
reactNative.View,
|
|
2945
3087
|
{
|
|
2946
|
-
style: [
|
|
3088
|
+
style: [styles16.textBlock, sectionAbove && styles16.textBlockAfter],
|
|
2947
3089
|
onLayout: inlineMeta ? (e) => setTextBoxWidth(e.nativeEvent.layout.width - 24) : void 0,
|
|
2948
3090
|
children: [
|
|
2949
3091
|
markdown && !inlineMeta ? renderMarkdown(truncated, {
|
|
@@ -2977,7 +3119,7 @@ function MessageBubble({
|
|
|
2977
3119
|
reactNative.Text,
|
|
2978
3120
|
{
|
|
2979
3121
|
style: [
|
|
2980
|
-
|
|
3122
|
+
styles16.readMore,
|
|
2981
3123
|
{ color: isSelf ? theme.colors.onBrand : theme.colors.brand }
|
|
2982
3124
|
],
|
|
2983
3125
|
children: expanded ? "Show less" : "Read more"
|
|
@@ -2988,7 +3130,7 @@ function MessageBubble({
|
|
|
2988
3130
|
}
|
|
2989
3131
|
) : null,
|
|
2990
3132
|
!inlineMeta && !metaOverlay && jumboCount === 0 ? metaRow("block") : null,
|
|
2991
|
-
actionsTrigger ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3133
|
+
actionsTrigger ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles16.actionsSlot, children: actionsTrigger }) : null
|
|
2992
3134
|
]
|
|
2993
3135
|
}
|
|
2994
3136
|
),
|
|
@@ -3013,15 +3155,15 @@ function QuotedCard({
|
|
|
3013
3155
|
onPress,
|
|
3014
3156
|
disabled: !onPress,
|
|
3015
3157
|
style: [
|
|
3016
|
-
|
|
3158
|
+
styles16.quoted,
|
|
3017
3159
|
{
|
|
3018
3160
|
backgroundColor: bg,
|
|
3019
3161
|
borderLeftColor: accent
|
|
3020
3162
|
}
|
|
3021
3163
|
],
|
|
3022
3164
|
children: [
|
|
3023
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3024
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
3165
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.quotedSender, { color: accent }], numberOfLines: 1, children: senderName }),
|
|
3166
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles16.quotedBody, { color: txt }], numberOfLines: 2, children: quoted.deleted_at ? "Original message deleted" : quoted.body ?? "\u2026" })
|
|
3025
3167
|
]
|
|
3026
3168
|
}
|
|
3027
3169
|
);
|
|
@@ -3030,7 +3172,7 @@ function isImageContentType(ct) {
|
|
|
3030
3172
|
if (!ct) return false;
|
|
3031
3173
|
return ct.startsWith("image/");
|
|
3032
3174
|
}
|
|
3033
|
-
function
|
|
3175
|
+
function formatTime2(iso) {
|
|
3034
3176
|
try {
|
|
3035
3177
|
const d = new Date(iso);
|
|
3036
3178
|
const now = /* @__PURE__ */ new Date();
|
|
@@ -3053,7 +3195,7 @@ function formatTime(iso) {
|
|
|
3053
3195
|
function isSameDay(a, b) {
|
|
3054
3196
|
return a.getFullYear() === b.getFullYear() && a.getMonth() === b.getMonth() && a.getDate() === b.getDate();
|
|
3055
3197
|
}
|
|
3056
|
-
var
|
|
3198
|
+
var styles16 = reactNative.StyleSheet.create({
|
|
3057
3199
|
wrap: {
|
|
3058
3200
|
marginBottom: 2
|
|
3059
3201
|
},
|
|
@@ -3180,7 +3322,7 @@ function ReactionStrip({
|
|
|
3180
3322
|
});
|
|
3181
3323
|
const entries = Object.entries(reactions);
|
|
3182
3324
|
if (entries.length === 0) return null;
|
|
3183
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3325
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles17.strip, children: entries.map(([emoji, userIds]) => {
|
|
3184
3326
|
const userArr = Array.isArray(userIds) ? userIds : [];
|
|
3185
3327
|
const meReacted = meId !== null && userArr.includes(meId);
|
|
3186
3328
|
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
@@ -3188,7 +3330,7 @@ function ReactionStrip({
|
|
|
3188
3330
|
{
|
|
3189
3331
|
onPress: () => meReacted ? removeReaction(emoji) : addReaction(emoji),
|
|
3190
3332
|
style: [
|
|
3191
|
-
|
|
3333
|
+
styles17.chip,
|
|
3192
3334
|
{
|
|
3193
3335
|
backgroundColor: meReacted ? theme.colors.brandSoft : theme.colors.surface2,
|
|
3194
3336
|
borderColor: meReacted ? theme.colors.brand : theme.colors.border,
|
|
@@ -3197,12 +3339,12 @@ function ReactionStrip({
|
|
|
3197
3339
|
}
|
|
3198
3340
|
],
|
|
3199
3341
|
children: [
|
|
3200
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
3342
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles17.emoji, children: emoji }),
|
|
3201
3343
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3202
3344
|
reactNative.Text,
|
|
3203
3345
|
{
|
|
3204
3346
|
style: [
|
|
3205
|
-
|
|
3347
|
+
styles17.count,
|
|
3206
3348
|
{
|
|
3207
3349
|
color: meReacted ? theme.colors.brand : theme.colors.ink2,
|
|
3208
3350
|
fontWeight: meReacted ? "700" : "600"
|
|
@@ -3224,33 +3366,51 @@ function ReactionPicker({
|
|
|
3224
3366
|
emojis = DEFAULT_EMOJIS
|
|
3225
3367
|
}) {
|
|
3226
3368
|
const theme = usePoolseTheme();
|
|
3227
|
-
|
|
3228
|
-
|
|
3369
|
+
const insets = useSafeInsets();
|
|
3370
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3371
|
+
reactNative.Modal,
|
|
3229
3372
|
{
|
|
3230
|
-
|
|
3231
|
-
|
|
3232
|
-
|
|
3233
|
-
|
|
3234
|
-
|
|
3235
|
-
|
|
3236
|
-
theme.shadows.lg
|
|
3237
|
-
],
|
|
3238
|
-
children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3373
|
+
visible,
|
|
3374
|
+
transparent: true,
|
|
3375
|
+
animationType: "fade",
|
|
3376
|
+
onRequestClose: onClose,
|
|
3377
|
+
...EDGE_TO_EDGE_MODAL,
|
|
3378
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3239
3379
|
reactNative.Pressable,
|
|
3240
3380
|
{
|
|
3241
|
-
style:
|
|
3242
|
-
onPress:
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3381
|
+
style: [styles17.backdrop, { paddingTop: insets.top, paddingBottom: insets.bottom }],
|
|
3382
|
+
onPress: onClose,
|
|
3383
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3384
|
+
reactNative.View,
|
|
3385
|
+
{
|
|
3386
|
+
style: [
|
|
3387
|
+
styles17.sheet,
|
|
3388
|
+
{
|
|
3389
|
+
backgroundColor: theme.colors.surface,
|
|
3390
|
+
borderRadius: theme.radii.lg
|
|
3391
|
+
},
|
|
3392
|
+
theme.shadows.lg
|
|
3393
|
+
],
|
|
3394
|
+
children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
3395
|
+
reactNative.Pressable,
|
|
3396
|
+
{
|
|
3397
|
+
style: styles17.emojiBtn,
|
|
3398
|
+
onPress: () => {
|
|
3399
|
+
onPick(emoji);
|
|
3400
|
+
onClose();
|
|
3401
|
+
},
|
|
3402
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles17.bigEmoji, children: emoji })
|
|
3403
|
+
},
|
|
3404
|
+
emoji
|
|
3405
|
+
))
|
|
3406
|
+
}
|
|
3407
|
+
)
|
|
3408
|
+
}
|
|
3409
|
+
)
|
|
3250
3410
|
}
|
|
3251
|
-
)
|
|
3411
|
+
);
|
|
3252
3412
|
}
|
|
3253
|
-
var
|
|
3413
|
+
var styles17 = reactNative.StyleSheet.create({
|
|
3254
3414
|
strip: {
|
|
3255
3415
|
flexDirection: "row",
|
|
3256
3416
|
flexWrap: "wrap",
|
|
@@ -3307,7 +3467,14 @@ var styles16 = reactNative.StyleSheet.create({
|
|
|
3307
3467
|
}
|
|
3308
3468
|
});
|
|
3309
3469
|
var SWIPE_REPLY_THRESHOLD = 50;
|
|
3310
|
-
function MessageRow({
|
|
3470
|
+
function MessageRow(props) {
|
|
3471
|
+
const callLog = react$1.callLogDisplayFor(props.msg, props.meId);
|
|
3472
|
+
if (callLog !== void 0) {
|
|
3473
|
+
return callLog ? /* @__PURE__ */ jsxRuntime.jsx(CallLogRow, { msg: props.msg, meId: props.meId }) : null;
|
|
3474
|
+
}
|
|
3475
|
+
return /* @__PURE__ */ jsxRuntime.jsx(BubbleMessageRow, { ...props });
|
|
3476
|
+
}
|
|
3477
|
+
function BubbleMessageRow({
|
|
3311
3478
|
msg,
|
|
3312
3479
|
meId,
|
|
3313
3480
|
reactions = true,
|
|
@@ -3418,15 +3585,15 @@ function MessageRow({
|
|
|
3418
3585
|
reactNative.View,
|
|
3419
3586
|
{
|
|
3420
3587
|
style: [
|
|
3421
|
-
|
|
3588
|
+
styles18.row,
|
|
3422
3589
|
{ alignSelf: isSelf ? "flex-end" : "flex-start" },
|
|
3423
3590
|
// Lift this row above the dim backdrop the parent renders
|
|
3424
3591
|
// during edit mode. zIndex covers iOS / web; elevation does
|
|
3425
3592
|
// the equivalent on Android.
|
|
3426
|
-
isEditing ?
|
|
3593
|
+
isEditing ? styles18.rowEditing : null
|
|
3427
3594
|
],
|
|
3428
3595
|
children: [
|
|
3429
|
-
showAvatarSlot ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
3596
|
+
showAvatarSlot ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles18.avatarSlot, children: showAvatarRender ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3430
3597
|
Avatar,
|
|
3431
3598
|
{
|
|
3432
3599
|
src: avatarUrl ?? null,
|
|
@@ -3435,14 +3602,14 @@ function MessageRow({
|
|
|
3435
3602
|
size: "sm"
|
|
3436
3603
|
}
|
|
3437
3604
|
) : null }) : null,
|
|
3438
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
3605
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles18.bubbleCol, children: [
|
|
3439
3606
|
swipeEnabled ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
3440
3607
|
reactNative.Animated.View,
|
|
3441
3608
|
{
|
|
3442
3609
|
pointerEvents: "none",
|
|
3443
3610
|
style: [
|
|
3444
|
-
|
|
3445
|
-
isSelf ?
|
|
3611
|
+
styles18.replyHint,
|
|
3612
|
+
isSelf ? styles18.replyHintRight : styles18.replyHintLeft,
|
|
3446
3613
|
{
|
|
3447
3614
|
opacity: replyIconOpacity,
|
|
3448
3615
|
transform: [{ scale: replyIconScale }],
|
|
@@ -3488,13 +3655,13 @@ function MessageRow({
|
|
|
3488
3655
|
)
|
|
3489
3656
|
}
|
|
3490
3657
|
),
|
|
3491
|
-
threads && (msg.reply_count ?? 0) > 0 && onOpenThread ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: onOpenThread, style:
|
|
3658
|
+
threads && (msg.reply_count ?? 0) > 0 && onOpenThread ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { onPress: onOpenThread, style: styles18.threadPill, children: /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Text, { style: [styles18.threadPillText, { color: theme.colors.brand }], children: [
|
|
3492
3659
|
"\u{1F4AC} ",
|
|
3493
3660
|
msg.reply_count,
|
|
3494
3661
|
" ",
|
|
3495
3662
|
msg.reply_count === 1 ? "reply" : "replies"
|
|
3496
3663
|
] }) }) : null,
|
|
3497
|
-
reactions ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
3664
|
+
reactions ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles18.reactionsRow, { alignSelf: isSelf ? "flex-end" : "flex-start" }], children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3498
3665
|
ReactionStrip,
|
|
3499
3666
|
{
|
|
3500
3667
|
messageId: msg.id,
|
|
@@ -3553,7 +3720,7 @@ function MessageRow({
|
|
|
3553
3720
|
}
|
|
3554
3721
|
);
|
|
3555
3722
|
}
|
|
3556
|
-
var
|
|
3723
|
+
var styles18 = reactNative.StyleSheet.create({
|
|
3557
3724
|
row: {
|
|
3558
3725
|
flexDirection: "row",
|
|
3559
3726
|
alignItems: "flex-end",
|
|
@@ -3628,7 +3795,7 @@ function ThreadView({
|
|
|
3628
3795
|
transparent: true,
|
|
3629
3796
|
animationType: "slide",
|
|
3630
3797
|
onRequestClose: onClose,
|
|
3631
|
-
|
|
3798
|
+
...EDGE_TO_EDGE_MODAL,
|
|
3632
3799
|
children: /* @__PURE__ */ jsxRuntime.jsx(UploadProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3633
3800
|
ThreadSheet,
|
|
3634
3801
|
{
|
|
@@ -3660,8 +3827,14 @@ function ThreadSheet({
|
|
|
3660
3827
|
loadMore,
|
|
3661
3828
|
hasMore
|
|
3662
3829
|
} = react$1.useThread(conversationId, rootMessage.id);
|
|
3663
|
-
const
|
|
3664
|
-
const
|
|
3830
|
+
const insets = useSafeInsets();
|
|
3831
|
+
const { height: windowHeight } = reactNative.useWindowDimensions();
|
|
3832
|
+
const [rootHeight, setRootHeight] = react.useState(0);
|
|
3833
|
+
const screenHeight = rootHeight || windowHeight;
|
|
3834
|
+
const sheetHeight = Math.min(
|
|
3835
|
+
Math.round(screenHeight * SHEET_HEIGHT_FRACTION),
|
|
3836
|
+
screenHeight - insets.top - 8
|
|
3837
|
+
);
|
|
3665
3838
|
const gutter = screenHeight - sheetHeight;
|
|
3666
3839
|
const { translateY, panHandlers } = useDismissableSheet({ onClose, sheetHeight });
|
|
3667
3840
|
const [pickerOpen, setPickerOpen] = react.useState(false);
|
|
@@ -3713,93 +3886,102 @@ function ThreadSheet({
|
|
|
3713
3886
|
),
|
|
3714
3887
|
[rootMessage, meId, labelFor, avatarFor]
|
|
3715
3888
|
);
|
|
3716
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3717
|
-
|
|
3718
|
-
|
|
3719
|
-
|
|
3720
|
-
|
|
3721
|
-
|
|
3722
|
-
|
|
3889
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3890
|
+
reactNative.View,
|
|
3891
|
+
{
|
|
3892
|
+
style: styles19.modalRoot,
|
|
3893
|
+
onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
|
|
3894
|
+
children: [
|
|
3895
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles19.backdrop, onPress: onClose, accessibilityLabel: "Close thread" }),
|
|
3896
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3897
|
+
reactNative.Animated.View,
|
|
3723
3898
|
{
|
|
3724
|
-
|
|
3725
|
-
|
|
3726
|
-
|
|
3727
|
-
|
|
3728
|
-
|
|
3729
|
-
|
|
3730
|
-
|
|
3731
|
-
|
|
3732
|
-
|
|
3733
|
-
|
|
3734
|
-
|
|
3735
|
-
|
|
3736
|
-
|
|
3737
|
-
|
|
3899
|
+
style: [
|
|
3900
|
+
styles19.sheet,
|
|
3901
|
+
{
|
|
3902
|
+
height: sheetHeight,
|
|
3903
|
+
backgroundColor: theme.colors.paper,
|
|
3904
|
+
borderTopLeftRadius: theme.radii.xl,
|
|
3905
|
+
borderTopRightRadius: theme.radii.xl,
|
|
3906
|
+
paddingLeft: insets.left,
|
|
3907
|
+
paddingRight: insets.right,
|
|
3908
|
+
transform: [{ translateY }]
|
|
3909
|
+
},
|
|
3910
|
+
theme.shadows.lg
|
|
3911
|
+
],
|
|
3912
|
+
children: [
|
|
3913
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { ...panHandlers, children: [
|
|
3914
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
|
|
3915
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles19.header, { borderBottomColor: theme.colors.border }], children: [
|
|
3916
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3917
|
+
reactNative.Pressable,
|
|
3918
|
+
{
|
|
3919
|
+
onPress: onClose,
|
|
3920
|
+
hitSlop: 16,
|
|
3921
|
+
style: [styles19.closeBtn, { backgroundColor: theme.colors.surface2 }],
|
|
3922
|
+
accessibilityLabel: "Close thread",
|
|
3923
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
|
|
3924
|
+
}
|
|
3925
|
+
),
|
|
3926
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3927
|
+
reactNative.Text,
|
|
3928
|
+
{
|
|
3929
|
+
style: [
|
|
3930
|
+
styles19.title,
|
|
3931
|
+
{ color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
|
|
3932
|
+
],
|
|
3933
|
+
children: "Thread"
|
|
3934
|
+
}
|
|
3935
|
+
)
|
|
3936
|
+
] })
|
|
3937
|
+
] }),
|
|
3938
|
+
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3939
|
+
reactNative.KeyboardAvoidingView,
|
|
3738
3940
|
{
|
|
3739
|
-
|
|
3740
|
-
|
|
3741
|
-
|
|
3742
|
-
|
|
3743
|
-
|
|
3941
|
+
style: styles19.kavBody,
|
|
3942
|
+
behavior: "padding",
|
|
3943
|
+
keyboardVerticalOffset: gutter,
|
|
3944
|
+
children: [
|
|
3945
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
|
|
3946
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.listWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3947
|
+
MessageList,
|
|
3948
|
+
{
|
|
3949
|
+
messages: replies,
|
|
3950
|
+
hasMore,
|
|
3951
|
+
onLoadMore: loadMore,
|
|
3952
|
+
renderItem: renderReply
|
|
3953
|
+
}
|
|
3954
|
+
) }),
|
|
3955
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3956
|
+
MessageComposer,
|
|
3957
|
+
{
|
|
3958
|
+
onSend: async (body, opts) => {
|
|
3959
|
+
await sendReply({ body, ...opts });
|
|
3960
|
+
},
|
|
3961
|
+
placeholder: "Reply to thread\u2026",
|
|
3962
|
+
attachments: true,
|
|
3963
|
+
onAttachPress: () => setPickerOpen(true),
|
|
3964
|
+
editingMessage,
|
|
3965
|
+
onCancelEdit: () => setEditingId(null),
|
|
3966
|
+
onSaveEdit: async (body) => {
|
|
3967
|
+
if (!editingId) return;
|
|
3968
|
+
await edit(editingId, body);
|
|
3969
|
+
setEditingId(null);
|
|
3970
|
+
}
|
|
3971
|
+
}
|
|
3972
|
+
)
|
|
3973
|
+
]
|
|
3744
3974
|
}
|
|
3745
3975
|
),
|
|
3746
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3747
|
-
|
|
3748
|
-
|
|
3749
|
-
|
|
3750
|
-
|
|
3751
|
-
|
|
3752
|
-
|
|
3753
|
-
children: "Thread"
|
|
3754
|
-
}
|
|
3755
|
-
)
|
|
3756
|
-
] })
|
|
3757
|
-
] }),
|
|
3758
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3759
|
-
reactNative.KeyboardAvoidingView,
|
|
3760
|
-
{
|
|
3761
|
-
style: styles18.kavBody,
|
|
3762
|
-
behavior: reactNative.Platform.OS === "ios" ? "padding" : "height",
|
|
3763
|
-
keyboardVerticalOffset: reactNative.Platform.OS === "ios" ? gutter : 0,
|
|
3764
|
-
children: [
|
|
3765
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles18.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
|
|
3766
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles18.listWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3767
|
-
MessageList,
|
|
3768
|
-
{
|
|
3769
|
-
messages: replies,
|
|
3770
|
-
hasMore,
|
|
3771
|
-
onLoadMore: loadMore,
|
|
3772
|
-
renderItem: renderReply
|
|
3773
|
-
}
|
|
3774
|
-
) }),
|
|
3775
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3776
|
-
MessageComposer,
|
|
3777
|
-
{
|
|
3778
|
-
onSend: async (body, opts) => {
|
|
3779
|
-
await sendReply({ body, ...opts });
|
|
3780
|
-
},
|
|
3781
|
-
placeholder: "Reply to thread\u2026",
|
|
3782
|
-
attachments: true,
|
|
3783
|
-
onAttachPress: () => setPickerOpen(true),
|
|
3784
|
-
editingMessage,
|
|
3785
|
-
onCancelEdit: () => setEditingId(null),
|
|
3786
|
-
onSaveEdit: async (body) => {
|
|
3787
|
-
if (!editingId) return;
|
|
3788
|
-
await edit(editingId, body);
|
|
3789
|
-
setEditingId(null);
|
|
3790
|
-
}
|
|
3791
|
-
}
|
|
3792
|
-
)
|
|
3793
|
-
]
|
|
3794
|
-
}
|
|
3795
|
-
),
|
|
3796
|
-
/* @__PURE__ */ jsxRuntime.jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
|
|
3797
|
-
]
|
|
3798
|
-
}
|
|
3799
|
-
)
|
|
3800
|
-
] });
|
|
3976
|
+
/* @__PURE__ */ jsxRuntime.jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
|
|
3977
|
+
]
|
|
3978
|
+
}
|
|
3979
|
+
)
|
|
3980
|
+
]
|
|
3981
|
+
}
|
|
3982
|
+
);
|
|
3801
3983
|
}
|
|
3802
|
-
var
|
|
3984
|
+
var styles19 = reactNative.StyleSheet.create({
|
|
3803
3985
|
modalRoot: {
|
|
3804
3986
|
flex: 1,
|
|
3805
3987
|
justifyContent: "flex-end"
|
|
@@ -3871,7 +4053,7 @@ function TypingIndicator({ typing, labelFor }) {
|
|
|
3871
4053
|
const ids = Array.from(typing);
|
|
3872
4054
|
const isTyping = ids.length > 0;
|
|
3873
4055
|
if (!isTyping) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: { height: 0 } });
|
|
3874
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
4056
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.row, children: [
|
|
3875
4057
|
/* @__PURE__ */ jsxRuntime.jsx(TypingDots, {}),
|
|
3876
4058
|
/* @__PURE__ */ jsxRuntime.jsx(TypingLabel, { ids, ...labelFor ? { labelFor } : {} })
|
|
3877
4059
|
] });
|
|
@@ -3916,7 +4098,7 @@ function TypingDots() {
|
|
|
3916
4098
|
],
|
|
3917
4099
|
opacity: val.interpolate({ inputRange: [0, 1], outputRange: [0.5, 1] })
|
|
3918
4100
|
});
|
|
3919
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
4101
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles20.dotsWrap, children: [
|
|
3920
4102
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(a) }),
|
|
3921
4103
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(b) }),
|
|
3922
4104
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Animated.View, { style: dot(c) })
|
|
@@ -3932,9 +4114,9 @@ function TypingLabel({
|
|
|
3932
4114
|
const name1 = useDisplayName(id1, labelFor);
|
|
3933
4115
|
const name2 = useDisplayName(id2, labelFor);
|
|
3934
4116
|
const text = ids.length === 1 ? `${name1} is typing` : ids.length === 2 ? `${name1} and ${name2} are typing` : `${ids.length} people are typing`;
|
|
3935
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4117
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles20.label, { color: theme.colors.ink2, fontFamily: theme.type.fontBody }], children: text });
|
|
3936
4118
|
}
|
|
3937
|
-
var
|
|
4119
|
+
var styles20 = reactNative.StyleSheet.create({
|
|
3938
4120
|
row: {
|
|
3939
4121
|
flexDirection: "row",
|
|
3940
4122
|
alignItems: "center",
|
|
@@ -4036,20 +4218,27 @@ function ConversationView({
|
|
|
4036
4218
|
});
|
|
4037
4219
|
onMarkedRead?.(conversationId, latest.id);
|
|
4038
4220
|
}, [messages, meId, readReceipts, markReadUpTo, onMarkedRead, conversationId]);
|
|
4221
|
+
const visibleMessages = react.useMemo(
|
|
4222
|
+
() => messages.filter((m) => react$1.isMessageVisibleTo(m, meId)),
|
|
4223
|
+
[messages, meId]
|
|
4224
|
+
);
|
|
4039
4225
|
const groupPositionById = react.useMemo(() => {
|
|
4040
4226
|
const map = /* @__PURE__ */ new Map();
|
|
4041
|
-
for (let i = 0; i <
|
|
4042
|
-
const msg =
|
|
4227
|
+
for (let i = 0; i < visibleMessages.length; i++) {
|
|
4228
|
+
const msg = visibleMessages[i];
|
|
4043
4229
|
if (!msg) continue;
|
|
4044
|
-
const prev = i > 0 ?
|
|
4045
|
-
const next = i <
|
|
4230
|
+
const prev = i > 0 ? visibleMessages[i - 1] ?? null : null;
|
|
4231
|
+
const next = i < visibleMessages.length - 1 ? visibleMessages[i + 1] ?? null : null;
|
|
4046
4232
|
map.set(msg.id, react$1.computeGroupPosition(msg, prev, next, GROUPING_WINDOW_MS));
|
|
4047
4233
|
}
|
|
4048
4234
|
return map;
|
|
4049
|
-
}, [
|
|
4235
|
+
}, [visibleMessages]);
|
|
4050
4236
|
const renderItem = react.useCallback(
|
|
4051
4237
|
(msg) => {
|
|
4052
|
-
if (renderMessage)
|
|
4238
|
+
if (renderMessage) {
|
|
4239
|
+
const custom = renderMessage(msg, meId);
|
|
4240
|
+
if (custom !== null && custom !== void 0) return custom;
|
|
4241
|
+
}
|
|
4053
4242
|
const readState = readReceipts && meId !== null && msg.sender_id === meId ? readStateForMessage(msg, members, meId, sequenceByMessageId) : void 0;
|
|
4054
4243
|
const isSelf = meId !== null && msg.sender_id === meId;
|
|
4055
4244
|
const canEdit = isSelf && !msg.deleted_at && (readState ?? "sent") === "sent";
|
|
@@ -4109,7 +4298,7 @@ function ConversationView({
|
|
|
4109
4298
|
const listItems = react.useMemo(() => {
|
|
4110
4299
|
const out = [];
|
|
4111
4300
|
let prev = null;
|
|
4112
|
-
for (const msg of
|
|
4301
|
+
for (const msg of visibleMessages) {
|
|
4113
4302
|
if (prev === null || !react$1.sameDay(msg.inserted_at, prev.inserted_at)) {
|
|
4114
4303
|
const label = react$1.formatDayLabel(msg.inserted_at);
|
|
4115
4304
|
out.push({
|
|
@@ -4122,7 +4311,7 @@ function ConversationView({
|
|
|
4122
4311
|
prev = msg;
|
|
4123
4312
|
}
|
|
4124
4313
|
return out;
|
|
4125
|
-
}, [
|
|
4314
|
+
}, [visibleMessages]);
|
|
4126
4315
|
const composerProps = react.useMemo(
|
|
4127
4316
|
() => ({
|
|
4128
4317
|
onSend: async (body, opts) => {
|
|
@@ -4172,16 +4361,16 @@ function ConversationView({
|
|
|
4172
4361
|
return /* @__PURE__ */ jsxRuntime.jsx(UploadProvider, { children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4173
4362
|
reactNative.KeyboardAvoidingView,
|
|
4174
4363
|
{
|
|
4175
|
-
style: [
|
|
4364
|
+
style: [styles21.root, { backgroundColor: theme.colors.paper }],
|
|
4176
4365
|
behavior: reactNative.Platform.OS === "ios" ? "padding" : "height",
|
|
4177
4366
|
keyboardVerticalOffset: keyboardOffset,
|
|
4178
4367
|
children: [
|
|
4179
4368
|
headerNode,
|
|
4180
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
4369
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.listWrap, children: [
|
|
4181
4370
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4182
4371
|
MessageList,
|
|
4183
4372
|
{
|
|
4184
|
-
messages,
|
|
4373
|
+
messages: visibleMessages,
|
|
4185
4374
|
items: listItems,
|
|
4186
4375
|
meId,
|
|
4187
4376
|
loading,
|
|
@@ -4195,7 +4384,7 @@ function ConversationView({
|
|
|
4195
4384
|
editingId ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4196
4385
|
reactNative.Pressable,
|
|
4197
4386
|
{
|
|
4198
|
-
style:
|
|
4387
|
+
style: styles21.editBackdrop,
|
|
4199
4388
|
onPress: () => setEditingId(null),
|
|
4200
4389
|
accessibilityLabel: "Cancel editing"
|
|
4201
4390
|
}
|
|
@@ -4230,7 +4419,7 @@ function readStateForMessage(msg, members, meId, sequenceByMessageId) {
|
|
|
4230
4419
|
});
|
|
4231
4420
|
return anyRead ? "read" : "sent";
|
|
4232
4421
|
}
|
|
4233
|
-
var
|
|
4422
|
+
var styles21 = reactNative.StyleSheet.create({
|
|
4234
4423
|
root: {
|
|
4235
4424
|
flex: 1
|
|
4236
4425
|
},
|
|
@@ -4261,7 +4450,12 @@ function UserPickerSheet({
|
|
|
4261
4450
|
const [query, setQuery] = react.useState("");
|
|
4262
4451
|
const [selectedIds, setSelectedIds] = react.useState([]);
|
|
4263
4452
|
const [groupName, setGroupName] = react.useState("");
|
|
4264
|
-
const
|
|
4453
|
+
const insets = useSafeInsets();
|
|
4454
|
+
const keyboardOpen = useKeyboardOpen();
|
|
4455
|
+
const { height: windowHeight } = reactNative.useWindowDimensions();
|
|
4456
|
+
const [rootHeight, setRootHeight] = react.useState(0);
|
|
4457
|
+
const screenHeight = rootHeight || windowHeight;
|
|
4458
|
+
const sheetHeight = Math.min(Math.round(screenHeight * 0.85), screenHeight - insets.top - 8);
|
|
4265
4459
|
const { translateY, panHandlers } = useDismissableSheet({
|
|
4266
4460
|
onClose: () => {
|
|
4267
4461
|
setQuery("");
|
|
@@ -4269,7 +4463,7 @@ function UserPickerSheet({
|
|
|
4269
4463
|
setGroupName("");
|
|
4270
4464
|
onClose();
|
|
4271
4465
|
},
|
|
4272
|
-
sheetHeight
|
|
4466
|
+
sheetHeight
|
|
4273
4467
|
});
|
|
4274
4468
|
const excludeSet = react.useMemo(() => new Set(excludeIds ?? []), [excludeIds]);
|
|
4275
4469
|
const filtered = react.useMemo(() => {
|
|
@@ -4311,142 +4505,164 @@ function UserPickerSheet({
|
|
|
4311
4505
|
transparent: true,
|
|
4312
4506
|
animationType: "slide",
|
|
4313
4507
|
onRequestClose: handleClose,
|
|
4314
|
-
|
|
4315
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4316
|
-
|
|
4317
|
-
|
|
4318
|
-
|
|
4319
|
-
|
|
4320
|
-
|
|
4321
|
-
|
|
4508
|
+
...EDGE_TO_EDGE_MODAL,
|
|
4509
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4510
|
+
reactNative.View,
|
|
4511
|
+
{
|
|
4512
|
+
style: styles22.modalRoot,
|
|
4513
|
+
onLayout: (e) => setRootHeight(Math.round(e.nativeEvent.layout.height)),
|
|
4514
|
+
children: [
|
|
4515
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles22.backdrop, onPress: handleClose }),
|
|
4516
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4517
|
+
reactNative.Animated.View,
|
|
4322
4518
|
{
|
|
4323
|
-
|
|
4324
|
-
|
|
4325
|
-
borderTopRightRadius: theme.radii.xl,
|
|
4326
|
-
transform: [{ translateY }]
|
|
4327
|
-
},
|
|
4328
|
-
theme.shadows.lg
|
|
4329
|
-
],
|
|
4330
|
-
children: [
|
|
4331
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { ...panHandlers, style: styles21.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles21.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
|
|
4332
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles21.header, children: [
|
|
4333
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4334
|
-
reactNative.Pressable,
|
|
4335
|
-
{
|
|
4336
|
-
onPress: handleClose,
|
|
4337
|
-
hitSlop: 16,
|
|
4338
|
-
style: [styles21.closeBtn, { backgroundColor: theme.colors.surface2 }],
|
|
4339
|
-
accessibilityLabel: "Close picker",
|
|
4340
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
|
|
4341
|
-
}
|
|
4342
|
-
),
|
|
4343
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4344
|
-
reactNative.Text,
|
|
4519
|
+
style: [
|
|
4520
|
+
styles22.sheet,
|
|
4345
4521
|
{
|
|
4346
|
-
|
|
4347
|
-
|
|
4348
|
-
|
|
4349
|
-
|
|
4350
|
-
|
|
4351
|
-
|
|
4352
|
-
|
|
4353
|
-
|
|
4354
|
-
|
|
4355
|
-
|
|
4522
|
+
backgroundColor: theme.colors.paper,
|
|
4523
|
+
borderTopLeftRadius: theme.radii.xl,
|
|
4524
|
+
borderTopRightRadius: theme.radii.xl,
|
|
4525
|
+
height: sheetHeight,
|
|
4526
|
+
// Last row clears the nav bar — unless the keyboard is
|
|
4527
|
+
// covering it, where the inset would just be a gap.
|
|
4528
|
+
paddingBottom: keyboardOpen ? 0 : insets.bottom,
|
|
4529
|
+
paddingLeft: insets.left,
|
|
4530
|
+
paddingRight: insets.right,
|
|
4531
|
+
transform: [{ translateY }]
|
|
4532
|
+
},
|
|
4533
|
+
theme.shadows.lg
|
|
4534
|
+
],
|
|
4535
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4536
|
+
reactNative.KeyboardAvoidingView,
|
|
4356
4537
|
{
|
|
4357
|
-
|
|
4358
|
-
|
|
4359
|
-
|
|
4360
|
-
|
|
4361
|
-
|
|
4362
|
-
{
|
|
4363
|
-
|
|
4364
|
-
|
|
4365
|
-
|
|
4366
|
-
|
|
4367
|
-
|
|
4368
|
-
|
|
4369
|
-
|
|
4370
|
-
|
|
4371
|
-
|
|
4372
|
-
|
|
4373
|
-
|
|
4374
|
-
|
|
4375
|
-
|
|
4376
|
-
|
|
4377
|
-
|
|
4378
|
-
|
|
4379
|
-
|
|
4380
|
-
|
|
4381
|
-
|
|
4382
|
-
|
|
4383
|
-
|
|
4384
|
-
|
|
4385
|
-
|
|
4386
|
-
|
|
4387
|
-
|
|
4388
|
-
|
|
4389
|
-
|
|
4390
|
-
|
|
4391
|
-
|
|
4392
|
-
|
|
4393
|
-
|
|
4394
|
-
|
|
4395
|
-
|
|
4396
|
-
|
|
4397
|
-
|
|
4398
|
-
|
|
4399
|
-
|
|
4400
|
-
|
|
4401
|
-
|
|
4402
|
-
|
|
4403
|
-
|
|
4404
|
-
|
|
4405
|
-
|
|
4406
|
-
|
|
4407
|
-
|
|
4408
|
-
|
|
4409
|
-
|
|
4410
|
-
|
|
4411
|
-
|
|
4412
|
-
|
|
4413
|
-
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
4420
|
-
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
|
|
4424
|
-
|
|
4425
|
-
|
|
4426
|
-
|
|
4427
|
-
|
|
4428
|
-
|
|
4429
|
-
|
|
4430
|
-
|
|
4431
|
-
user: item,
|
|
4432
|
-
selected: selectedIds.includes(item.externalId),
|
|
4433
|
-
isGroup,
|
|
4434
|
-
onPress: () => {
|
|
4435
|
-
if (isGroup) toggle(item.externalId);
|
|
4436
|
-
else {
|
|
4437
|
-
onPickDirect?.(item.externalId);
|
|
4438
|
-
reset();
|
|
4439
|
-
onClose();
|
|
4538
|
+
style: styles22.kav,
|
|
4539
|
+
behavior: "padding",
|
|
4540
|
+
keyboardVerticalOffset: screenHeight - sheetHeight,
|
|
4541
|
+
children: [
|
|
4542
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { ...panHandlers, style: styles22.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles22.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
|
|
4543
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.header, children: [
|
|
4544
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4545
|
+
reactNative.Pressable,
|
|
4546
|
+
{
|
|
4547
|
+
onPress: handleClose,
|
|
4548
|
+
hitSlop: 16,
|
|
4549
|
+
style: [styles22.closeBtn, { backgroundColor: theme.colors.surface2 }],
|
|
4550
|
+
accessibilityLabel: "Close picker",
|
|
4551
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
|
|
4552
|
+
}
|
|
4553
|
+
),
|
|
4554
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4555
|
+
reactNative.Text,
|
|
4556
|
+
{
|
|
4557
|
+
style: [
|
|
4558
|
+
styles22.title,
|
|
4559
|
+
{ color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
|
|
4560
|
+
],
|
|
4561
|
+
numberOfLines: 1,
|
|
4562
|
+
children: heading
|
|
4563
|
+
}
|
|
4564
|
+
),
|
|
4565
|
+
isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4566
|
+
reactNative.Pressable,
|
|
4567
|
+
{
|
|
4568
|
+
onPress: handleCreate,
|
|
4569
|
+
disabled: !canCreate,
|
|
4570
|
+
hitSlop: 6,
|
|
4571
|
+
style: [
|
|
4572
|
+
styles22.createBtn,
|
|
4573
|
+
{
|
|
4574
|
+
backgroundColor: canCreate ? theme.colors.brand : theme.colors.surface2,
|
|
4575
|
+
opacity: canCreate ? 1 : 0.6
|
|
4576
|
+
}
|
|
4577
|
+
],
|
|
4578
|
+
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4579
|
+
reactNative.Text,
|
|
4580
|
+
{
|
|
4581
|
+
style: {
|
|
4582
|
+
color: canCreate ? theme.colors.onBrand : theme.colors.ink3,
|
|
4583
|
+
fontWeight: "700",
|
|
4584
|
+
fontSize: 13
|
|
4585
|
+
},
|
|
4586
|
+
children: [
|
|
4587
|
+
"Create",
|
|
4588
|
+
selectedIds.length > 0 ? ` (${selectedIds.length})` : ""
|
|
4589
|
+
]
|
|
4590
|
+
}
|
|
4591
|
+
)
|
|
4592
|
+
}
|
|
4593
|
+
) : null
|
|
4594
|
+
] }),
|
|
4595
|
+
isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4596
|
+
reactNative.TextInput,
|
|
4597
|
+
{
|
|
4598
|
+
placeholder: "Group name",
|
|
4599
|
+
placeholderTextColor: theme.colors.ink3,
|
|
4600
|
+
value: groupName,
|
|
4601
|
+
onChangeText: setGroupName,
|
|
4602
|
+
style: [
|
|
4603
|
+
styles22.groupNameInput,
|
|
4604
|
+
{
|
|
4605
|
+
color: theme.colors.ink,
|
|
4606
|
+
backgroundColor: theme.colors.surface2,
|
|
4607
|
+
borderRadius: theme.radii.md,
|
|
4608
|
+
fontFamily: theme.type.fontBody,
|
|
4609
|
+
fontSize: theme.type.bodySize
|
|
4610
|
+
}
|
|
4611
|
+
]
|
|
4440
4612
|
}
|
|
4441
|
-
|
|
4442
|
-
|
|
4443
|
-
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4613
|
+
) : null,
|
|
4614
|
+
showSearch ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4615
|
+
reactNative.TextInput,
|
|
4616
|
+
{
|
|
4617
|
+
placeholder: "Search\u2026",
|
|
4618
|
+
placeholderTextColor: theme.colors.ink3,
|
|
4619
|
+
value: query,
|
|
4620
|
+
onChangeText: setQuery,
|
|
4621
|
+
style: [
|
|
4622
|
+
styles22.searchInput,
|
|
4623
|
+
{
|
|
4624
|
+
color: theme.colors.ink,
|
|
4625
|
+
backgroundColor: theme.colors.surface2,
|
|
4626
|
+
borderRadius: theme.radii.md,
|
|
4627
|
+
fontFamily: theme.type.fontBody,
|
|
4628
|
+
fontSize: 14
|
|
4629
|
+
}
|
|
4630
|
+
]
|
|
4631
|
+
}
|
|
4632
|
+
) : null,
|
|
4633
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4634
|
+
reactNative.FlatList,
|
|
4635
|
+
{
|
|
4636
|
+
data: filtered,
|
|
4637
|
+
keyExtractor: (u) => u.externalId,
|
|
4638
|
+
keyboardShouldPersistTaps: "handled",
|
|
4639
|
+
ListEmptyComponent: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles22.empty, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.emptyText, { color: theme.colors.ink3 }], children: query ? "No matches." : "No users to show." }) }),
|
|
4640
|
+
renderItem: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
4641
|
+
UserRow,
|
|
4642
|
+
{
|
|
4643
|
+
user: item,
|
|
4644
|
+
selected: selectedIds.includes(item.externalId),
|
|
4645
|
+
isGroup,
|
|
4646
|
+
onPress: () => {
|
|
4647
|
+
if (isGroup) toggle(item.externalId);
|
|
4648
|
+
else {
|
|
4649
|
+
onPickDirect?.(item.externalId);
|
|
4650
|
+
reset();
|
|
4651
|
+
onClose();
|
|
4652
|
+
}
|
|
4653
|
+
}
|
|
4654
|
+
}
|
|
4655
|
+
)
|
|
4656
|
+
}
|
|
4657
|
+
)
|
|
4658
|
+
]
|
|
4659
|
+
}
|
|
4660
|
+
)
|
|
4661
|
+
}
|
|
4662
|
+
)
|
|
4663
|
+
]
|
|
4664
|
+
}
|
|
4665
|
+
)
|
|
4450
4666
|
}
|
|
4451
4667
|
);
|
|
4452
4668
|
}
|
|
@@ -4462,29 +4678,29 @@ function UserRow({
|
|
|
4462
4678
|
{
|
|
4463
4679
|
onPress,
|
|
4464
4680
|
style: [
|
|
4465
|
-
|
|
4681
|
+
styles22.row,
|
|
4466
4682
|
{
|
|
4467
4683
|
backgroundColor: selected ? theme.colors.brandSoft : "transparent"
|
|
4468
4684
|
}
|
|
4469
4685
|
],
|
|
4470
4686
|
children: [
|
|
4471
|
-
user.avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: user.avatarUrl }, style:
|
|
4472
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
4687
|
+
user.avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: user.avatarUrl }, style: styles22.avatarImg }) : /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: user.name, seed: user.externalId, size: "md" }),
|
|
4688
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.body, children: [
|
|
4473
4689
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4474
4690
|
reactNative.Text,
|
|
4475
4691
|
{
|
|
4476
|
-
style: [
|
|
4692
|
+
style: [styles22.name, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
|
|
4477
4693
|
numberOfLines: 1,
|
|
4478
4694
|
children: user.name
|
|
4479
4695
|
}
|
|
4480
4696
|
),
|
|
4481
|
-
user.subtitle ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
4697
|
+
user.subtitle ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles22.subtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: user.subtitle }) : null
|
|
4482
4698
|
] }),
|
|
4483
4699
|
isGroup ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
4484
4700
|
reactNative.View,
|
|
4485
4701
|
{
|
|
4486
4702
|
style: [
|
|
4487
|
-
|
|
4703
|
+
styles22.checkbox,
|
|
4488
4704
|
{
|
|
4489
4705
|
borderColor: selected ? theme.colors.brand : theme.colors.border,
|
|
4490
4706
|
backgroundColor: selected ? theme.colors.brand : "transparent"
|
|
@@ -4497,7 +4713,7 @@ function UserRow({
|
|
|
4497
4713
|
}
|
|
4498
4714
|
);
|
|
4499
4715
|
}
|
|
4500
|
-
var
|
|
4716
|
+
var styles22 = reactNative.StyleSheet.create({
|
|
4501
4717
|
modalRoot: {
|
|
4502
4718
|
flex: 1,
|
|
4503
4719
|
justifyContent: "flex-end"
|
|
@@ -4507,9 +4723,11 @@ var styles21 = reactNative.StyleSheet.create({
|
|
|
4507
4723
|
backgroundColor: "rgba(0,0,0,0.4)"
|
|
4508
4724
|
},
|
|
4509
4725
|
sheet: {
|
|
4510
|
-
height: "85%",
|
|
4511
4726
|
overflow: "hidden"
|
|
4512
4727
|
},
|
|
4728
|
+
kav: {
|
|
4729
|
+
flex: 1
|
|
4730
|
+
},
|
|
4513
4731
|
dragHandle: {
|
|
4514
4732
|
alignItems: "center",
|
|
4515
4733
|
paddingTop: 8,
|
|
@@ -4622,6 +4840,7 @@ var PoolseInbox = react.forwardRef(
|
|
|
4622
4840
|
refetch: refetchConversations
|
|
4623
4841
|
} = react$1.useConversations();
|
|
4624
4842
|
const meExternalId = me?.external_id ?? null;
|
|
4843
|
+
const meId = me?.id ?? null;
|
|
4625
4844
|
const detailKeyboardOffset = CHAT_HEADER_HEIGHT;
|
|
4626
4845
|
const [activeId, setActiveId] = react.useState(null);
|
|
4627
4846
|
const [userPickerOpen, setUserPickerOpen] = react.useState(false);
|
|
@@ -4748,6 +4967,7 @@ var PoolseInbox = react.forwardRef(
|
|
|
4748
4967
|
conv,
|
|
4749
4968
|
selected,
|
|
4750
4969
|
meExternalId,
|
|
4970
|
+
meId,
|
|
4751
4971
|
unread,
|
|
4752
4972
|
...labelFor ? { labelFor } : {},
|
|
4753
4973
|
...avatarFor ? { avatarFor } : {},
|
|
@@ -4755,9 +4975,9 @@ var PoolseInbox = react.forwardRef(
|
|
|
4755
4975
|
}
|
|
4756
4976
|
);
|
|
4757
4977
|
},
|
|
4758
|
-
[renderConversationRow, meExternalId, labelFor, avatarFor, unreadCounts]
|
|
4978
|
+
[renderConversationRow, meExternalId, meId, labelFor, avatarFor, unreadCounts]
|
|
4759
4979
|
);
|
|
4760
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
4980
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles23.root, { backgroundColor: theme.colors.paper }], children: [
|
|
4761
4981
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
4762
4982
|
reactNative.Animated.View,
|
|
4763
4983
|
{
|
|
@@ -4768,7 +4988,7 @@ var PoolseInbox = react.forwardRef(
|
|
|
4768
4988
|
reactNative.View,
|
|
4769
4989
|
{
|
|
4770
4990
|
style: [
|
|
4771
|
-
|
|
4991
|
+
styles23.listHeader,
|
|
4772
4992
|
{
|
|
4773
4993
|
backgroundColor: theme.colors.surface,
|
|
4774
4994
|
borderBottomColor: theme.colors.border
|
|
@@ -4779,13 +4999,13 @@ var PoolseInbox = react.forwardRef(
|
|
|
4779
4999
|
reactNative.Text,
|
|
4780
5000
|
{
|
|
4781
5001
|
style: [
|
|
4782
|
-
|
|
5002
|
+
styles23.listTitle,
|
|
4783
5003
|
{ color: theme.colors.ink, fontFamily: theme.type.fontDisplay }
|
|
4784
5004
|
],
|
|
4785
5005
|
children: title
|
|
4786
5006
|
}
|
|
4787
5007
|
),
|
|
4788
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
5008
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles23.headerActions, children: [
|
|
4789
5009
|
users ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
4790
5010
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4791
5011
|
HeaderIconButton,
|
|
@@ -4898,7 +5118,7 @@ function HeaderIconButton({
|
|
|
4898
5118
|
hitSlop: 10,
|
|
4899
5119
|
accessibilityLabel: label,
|
|
4900
5120
|
style: ({ pressed }) => [
|
|
4901
|
-
|
|
5121
|
+
styles23.iconBtn,
|
|
4902
5122
|
{
|
|
4903
5123
|
backgroundColor: pressed ? theme.colors.surface2 : "transparent"
|
|
4904
5124
|
}
|
|
@@ -4911,6 +5131,7 @@ function DefaultConversationRow({
|
|
|
4911
5131
|
conv,
|
|
4912
5132
|
selected,
|
|
4913
5133
|
meExternalId,
|
|
5134
|
+
meId = null,
|
|
4914
5135
|
unread,
|
|
4915
5136
|
labelFor,
|
|
4916
5137
|
avatarFor,
|
|
@@ -4928,31 +5149,31 @@ function DefaultConversationRow({
|
|
|
4928
5149
|
{
|
|
4929
5150
|
onPress,
|
|
4930
5151
|
style: [
|
|
4931
|
-
|
|
5152
|
+
styles23.row,
|
|
4932
5153
|
{
|
|
4933
5154
|
backgroundColor: selected ? theme.colors.surface2 : "transparent",
|
|
4934
5155
|
borderBottomColor: theme.colors.border
|
|
4935
5156
|
}
|
|
4936
5157
|
],
|
|
4937
5158
|
children: [
|
|
4938
|
-
avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: avatarUrl }, style:
|
|
4939
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
5159
|
+
avatarUrl ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Image, { source: { uri: avatarUrl }, style: styles23.rowAvatar }) : /* @__PURE__ */ jsxRuntime.jsx(Avatar, { src: null, name: title, seed: avatarSeed, size: "md" }),
|
|
5160
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles23.rowBody, children: [
|
|
4940
5161
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4941
5162
|
reactNative.Text,
|
|
4942
5163
|
{
|
|
4943
|
-
style: [
|
|
5164
|
+
style: [styles23.rowTitle, { color: theme.colors.ink, fontFamily: theme.type.fontBody }],
|
|
4944
5165
|
numberOfLines: 1,
|
|
4945
5166
|
children: title
|
|
4946
5167
|
}
|
|
4947
5168
|
),
|
|
4948
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
5169
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.rowSubtitle, { color: theme.colors.ink3 }], numberOfLines: 1, children: react$1.formatCallLogPreview(conv.last_message_preview, meId) ?? conv.last_message_preview ?? (isDirect ? otherExtId ?? "" : `${(conv.member_external_ids ?? []).length} members`) })
|
|
4949
5170
|
] }),
|
|
4950
|
-
unread > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
5171
|
+
unread > 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles23.unreadPill, { backgroundColor: theme.colors.unreadPill }], children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles23.unreadText, { color: theme.colors.unreadPillText }], children: unread > 99 ? "99+" : String(unread) }) }) : null
|
|
4951
5172
|
]
|
|
4952
5173
|
}
|
|
4953
5174
|
);
|
|
4954
5175
|
}
|
|
4955
|
-
var
|
|
5176
|
+
var styles23 = reactNative.StyleSheet.create({
|
|
4956
5177
|
root: {
|
|
4957
5178
|
flex: 1,
|
|
4958
5179
|
overflow: "hidden"
|
|
@@ -5156,10 +5377,10 @@ function VoiceRoomBar({
|
|
|
5156
5377
|
reactNative.View,
|
|
5157
5378
|
{
|
|
5158
5379
|
style: [
|
|
5159
|
-
|
|
5380
|
+
styles24.bar,
|
|
5160
5381
|
{ backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
|
|
5161
5382
|
],
|
|
5162
|
-
children: unavailableSlot ?? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
5383
|
+
children: unavailableSlot ?? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.hint, { color: theme.colors.ink3 }], children: "Voice needs react-native-webrtc and a development build." })
|
|
5163
5384
|
}
|
|
5164
5385
|
);
|
|
5165
5386
|
}
|
|
@@ -5167,22 +5388,22 @@ function VoiceRoomBar({
|
|
|
5167
5388
|
reactNative.View,
|
|
5168
5389
|
{
|
|
5169
5390
|
style: [
|
|
5170
|
-
|
|
5391
|
+
styles24.bar,
|
|
5171
5392
|
{ backgroundColor: theme.colors.surface, borderBottomColor: theme.colors.border }
|
|
5172
5393
|
],
|
|
5173
5394
|
children: [
|
|
5174
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
5395
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles24.row, children: [
|
|
5175
5396
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5176
5397
|
reactNative.View,
|
|
5177
5398
|
{
|
|
5178
5399
|
style: [
|
|
5179
|
-
|
|
5400
|
+
styles24.dot,
|
|
5180
5401
|
{ backgroundColor: connected ? theme.colors.brand : theme.colors.ink3 }
|
|
5181
5402
|
]
|
|
5182
5403
|
}
|
|
5183
5404
|
),
|
|
5184
5405
|
connected ? /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5185
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
5406
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles24.people, children: participants.length === 0 ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.hint, { color: theme.colors.ink3 }], children: "Waiting for others\u2026" }) : participants.map((p) => /* @__PURE__ */ jsxRuntime.jsx(ParticipantChip, { participant: p, label: label(p.userId) }, p.userId)) }),
|
|
5186
5407
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5187
5408
|
reactNative.Pressable,
|
|
5188
5409
|
{
|
|
@@ -5190,7 +5411,7 @@ function VoiceRoomBar({
|
|
|
5190
5411
|
accessibilityRole: "button",
|
|
5191
5412
|
accessibilityState: { selected: muted },
|
|
5192
5413
|
style: [
|
|
5193
|
-
|
|
5414
|
+
styles24.btn,
|
|
5194
5415
|
{
|
|
5195
5416
|
borderColor: muted ? theme.colors.brand : theme.colors.border,
|
|
5196
5417
|
backgroundColor: muted ? theme.colors.brandSoft : theme.colors.paper
|
|
@@ -5204,25 +5425,25 @@ function VoiceRoomBar({
|
|
|
5204
5425
|
{
|
|
5205
5426
|
onPress: leave,
|
|
5206
5427
|
accessibilityRole: "button",
|
|
5207
|
-
style: [
|
|
5428
|
+
style: [styles24.btn, { borderColor: theme.colors.error }],
|
|
5208
5429
|
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { color: theme.colors.error }, children: "Leave" })
|
|
5209
5430
|
}
|
|
5210
5431
|
)
|
|
5211
5432
|
] }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
5212
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
5433
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.hint, { color: theme.colors.ink3 }], children: status === "connecting" ? "Connecting\u2026" : "Talk to everyone here" }),
|
|
5213
5434
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5214
5435
|
reactNative.Pressable,
|
|
5215
5436
|
{
|
|
5216
5437
|
onPress: () => void join(),
|
|
5217
5438
|
disabled: status === "connecting",
|
|
5218
5439
|
accessibilityRole: "button",
|
|
5219
|
-
style: [
|
|
5440
|
+
style: [styles24.btn, styles24.btnPrimary, { backgroundColor: theme.colors.brand }],
|
|
5220
5441
|
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: { color: theme.colors.onBrand, fontWeight: "600" }, children: status === "connecting" ? "Joining\u2026" : "Join Voice" })
|
|
5221
5442
|
}
|
|
5222
5443
|
)
|
|
5223
5444
|
] })
|
|
5224
5445
|
] }),
|
|
5225
|
-
error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [
|
|
5446
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles24.error, { color: theme.colors.error }], children: error.message })
|
|
5226
5447
|
]
|
|
5227
5448
|
}
|
|
5228
5449
|
);
|
|
@@ -5233,7 +5454,7 @@ function ParticipantChip({ participant, label }) {
|
|
|
5233
5454
|
reactNative.View,
|
|
5234
5455
|
{
|
|
5235
5456
|
style: [
|
|
5236
|
-
|
|
5457
|
+
styles24.chip,
|
|
5237
5458
|
{
|
|
5238
5459
|
backgroundColor: theme.colors.paper,
|
|
5239
5460
|
// The speaking ring is a border colour swap rather than an
|
|
@@ -5252,7 +5473,7 @@ function ParticipantChip({ participant, label }) {
|
|
|
5252
5473
|
}
|
|
5253
5474
|
);
|
|
5254
5475
|
}
|
|
5255
|
-
var
|
|
5476
|
+
var styles24 = reactNative.StyleSheet.create({
|
|
5256
5477
|
bar: { paddingHorizontal: 14, paddingVertical: 8, borderBottomWidth: reactNative.StyleSheet.hairlineWidth },
|
|
5257
5478
|
row: { flexDirection: "row", alignItems: "center", gap: 8, flexWrap: "wrap" },
|
|
5258
5479
|
dot: { width: 8, height: 8, borderRadius: 4 },
|
|
@@ -5321,42 +5542,60 @@ function AudioRouteSheet({
|
|
|
5321
5542
|
onSelect,
|
|
5322
5543
|
onClose
|
|
5323
5544
|
}) {
|
|
5324
|
-
|
|
5325
|
-
|
|
5326
|
-
|
|
5327
|
-
|
|
5328
|
-
|
|
5329
|
-
|
|
5330
|
-
|
|
5545
|
+
const insets = useSafeInsets();
|
|
5546
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5547
|
+
reactNative.Modal,
|
|
5548
|
+
{
|
|
5549
|
+
visible,
|
|
5550
|
+
transparent: true,
|
|
5551
|
+
animationType: "fade",
|
|
5552
|
+
onRequestClose: onClose,
|
|
5553
|
+
...EDGE_TO_EDGE_MODAL,
|
|
5554
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Pressable, { style: styles25.backdrop, onPress: onClose, accessibilityRole: "button", children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5331
5555
|
reactNative.Pressable,
|
|
5332
5556
|
{
|
|
5557
|
+
style: [styles25.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
|
|
5333
5558
|
onPress: () => {
|
|
5334
|
-
onSelect(route.id);
|
|
5335
|
-
onClose();
|
|
5336
5559
|
},
|
|
5337
|
-
accessibilityRole: "button",
|
|
5338
|
-
accessibilityState: { selected },
|
|
5339
|
-
style: ({ pressed }) => [styles24.row, pressed && styles24.rowPressed],
|
|
5340
5560
|
children: [
|
|
5341
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5342
|
-
|
|
5343
|
-
|
|
5344
|
-
|
|
5345
|
-
|
|
5346
|
-
|
|
5347
|
-
|
|
5348
|
-
|
|
5349
|
-
|
|
5350
|
-
|
|
5351
|
-
|
|
5561
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles25.grabber }),
|
|
5562
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles25.title, children: "Audio output" }),
|
|
5563
|
+
routes.map((route) => {
|
|
5564
|
+
const selected = route.id === selectedRouteId;
|
|
5565
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
5566
|
+
reactNative.Pressable,
|
|
5567
|
+
{
|
|
5568
|
+
onPress: () => {
|
|
5569
|
+
onSelect(route.id);
|
|
5570
|
+
onClose();
|
|
5571
|
+
},
|
|
5572
|
+
accessibilityRole: "button",
|
|
5573
|
+
accessibilityState: { selected },
|
|
5574
|
+
style: ({ pressed }) => [styles25.row, pressed && styles25.rowPressed],
|
|
5575
|
+
children: [
|
|
5576
|
+
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5577
|
+
PoolseIcon,
|
|
5578
|
+
{
|
|
5579
|
+
name: ICONS2[route.kind],
|
|
5580
|
+
size: 21,
|
|
5581
|
+
color: selected ? callColors.accept : callColors.text,
|
|
5582
|
+
label: null
|
|
5583
|
+
}
|
|
5584
|
+
),
|
|
5585
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: [styles25.label, selected && styles25.labelSelected], children: route.label }),
|
|
5586
|
+
selected && /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "check", size: 19, color: callColors.accept, label: "selected" })
|
|
5587
|
+
]
|
|
5588
|
+
},
|
|
5589
|
+
route.id
|
|
5590
|
+
);
|
|
5591
|
+
})
|
|
5352
5592
|
]
|
|
5353
|
-
}
|
|
5354
|
-
|
|
5355
|
-
|
|
5356
|
-
|
|
5357
|
-
] }) }) });
|
|
5593
|
+
}
|
|
5594
|
+
) })
|
|
5595
|
+
}
|
|
5596
|
+
);
|
|
5358
5597
|
}
|
|
5359
|
-
var
|
|
5598
|
+
var styles25 = reactNative.StyleSheet.create({
|
|
5360
5599
|
backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
|
|
5361
5600
|
sheet: {
|
|
5362
5601
|
backgroundColor: callColors.tile,
|
|
@@ -5364,7 +5603,6 @@ var styles24 = reactNative.StyleSheet.create({
|
|
|
5364
5603
|
borderTopRightRadius: 22,
|
|
5365
5604
|
paddingHorizontal: 12,
|
|
5366
5605
|
paddingTop: 10,
|
|
5367
|
-
paddingBottom: 34,
|
|
5368
5606
|
gap: 2
|
|
5369
5607
|
},
|
|
5370
5608
|
grabber: {
|
|
@@ -5438,11 +5676,11 @@ function PulseRings({ size, color }) {
|
|
|
5438
5676
|
});
|
|
5439
5677
|
return () => loops.forEach((l) => l.stop());
|
|
5440
5678
|
}, []);
|
|
5441
|
-
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [reactNative.StyleSheet.absoluteFill,
|
|
5679
|
+
return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [reactNative.StyleSheet.absoluteFill, styles26.center], pointerEvents: "none", children: phases.map((p, i) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5442
5680
|
reactNative.Animated.View,
|
|
5443
5681
|
{
|
|
5444
5682
|
style: [
|
|
5445
|
-
|
|
5683
|
+
styles26.ring,
|
|
5446
5684
|
{
|
|
5447
5685
|
width: size,
|
|
5448
5686
|
height: size,
|
|
@@ -5463,7 +5701,7 @@ function PulseRings({ size, color }) {
|
|
|
5463
5701
|
i
|
|
5464
5702
|
)) });
|
|
5465
5703
|
}
|
|
5466
|
-
var
|
|
5704
|
+
var styles26 = reactNative.StyleSheet.create({
|
|
5467
5705
|
center: { alignItems: "center", justifyContent: "center" },
|
|
5468
5706
|
ring: { position: "absolute", borderWidth: 1.5 }
|
|
5469
5707
|
});
|
|
@@ -5474,7 +5712,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
|
|
|
5474
5712
|
reactNative.View,
|
|
5475
5713
|
{
|
|
5476
5714
|
style: [
|
|
5477
|
-
|
|
5715
|
+
styles27.ring,
|
|
5478
5716
|
{
|
|
5479
5717
|
width: outer,
|
|
5480
5718
|
height: outer,
|
|
@@ -5487,7 +5725,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
|
|
|
5487
5725
|
reactNative.View,
|
|
5488
5726
|
{
|
|
5489
5727
|
style: [
|
|
5490
|
-
|
|
5728
|
+
styles27.circle,
|
|
5491
5729
|
{
|
|
5492
5730
|
width: size,
|
|
5493
5731
|
height: size,
|
|
@@ -5498,7 +5736,7 @@ function CallAvatar({ name, seed, size, speaking = false }) {
|
|
|
5498
5736
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5499
5737
|
reactNative.Text,
|
|
5500
5738
|
{
|
|
5501
|
-
style: [
|
|
5739
|
+
style: [styles27.initials, { fontSize: Math.round(size * 0.38) }],
|
|
5502
5740
|
numberOfLines: 1,
|
|
5503
5741
|
allowFontScaling: false,
|
|
5504
5742
|
children: initialsOf(name)
|
|
@@ -5515,7 +5753,7 @@ function initialsOf(name) {
|
|
|
5515
5753
|
if (parts.length === 1) return parts[0].slice(0, 2).toUpperCase();
|
|
5516
5754
|
return (parts[0][0] + parts[parts.length - 1][0]).toUpperCase();
|
|
5517
5755
|
}
|
|
5518
|
-
var
|
|
5756
|
+
var styles27 = reactNative.StyleSheet.create({
|
|
5519
5757
|
ring: { alignItems: "center", justifyContent: "center" },
|
|
5520
5758
|
circle: { alignItems: "center", justifyContent: "center" },
|
|
5521
5759
|
initials: { color: "#ffffff", fontWeight: "600" }
|
|
@@ -5533,7 +5771,7 @@ function CallControlButton({
|
|
|
5533
5771
|
const size = large ? CONTROL_SIZE_LARGE : CONTROL_SIZE;
|
|
5534
5772
|
const background = tone === "danger" ? callColors.danger : tone === "accept" ? callColors.accept : active ? callColors.controlActive : callColors.control;
|
|
5535
5773
|
const iconColor = tone === "neutral" && active ? callColors.controlActiveIcon : callColors.onAction;
|
|
5536
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
5774
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles28.slot, children: [
|
|
5537
5775
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5538
5776
|
reactNative.Pressable,
|
|
5539
5777
|
{
|
|
@@ -5544,7 +5782,7 @@ function CallControlButton({
|
|
|
5544
5782
|
accessibilityLabel: accessibilityLabel ?? label ?? icon,
|
|
5545
5783
|
hitSlop: 8,
|
|
5546
5784
|
style: ({ pressed }) => [
|
|
5547
|
-
|
|
5785
|
+
styles28.button,
|
|
5548
5786
|
{
|
|
5549
5787
|
width: size,
|
|
5550
5788
|
height: size,
|
|
@@ -5558,10 +5796,10 @@ function CallControlButton({
|
|
|
5558
5796
|
children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: icon, size: large ? 30 : 25, color: iconColor, label: null })
|
|
5559
5797
|
}
|
|
5560
5798
|
),
|
|
5561
|
-
label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style:
|
|
5799
|
+
label ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles28.label, children: label }) : null
|
|
5562
5800
|
] });
|
|
5563
5801
|
}
|
|
5564
|
-
var
|
|
5802
|
+
var styles28 = reactNative.StyleSheet.create({
|
|
5565
5803
|
// Fixed width so captions of different lengths cannot shift the row.
|
|
5566
5804
|
slot: { width: 76, alignItems: "center", gap: 7 },
|
|
5567
5805
|
button: { alignItems: "center", justifyContent: "center" },
|
|
@@ -5582,8 +5820,8 @@ function CallParticipantTile({
|
|
|
5582
5820
|
reactNative.View,
|
|
5583
5821
|
{
|
|
5584
5822
|
style: [
|
|
5585
|
-
|
|
5586
|
-
bleed ?
|
|
5823
|
+
styles29.tile,
|
|
5824
|
+
bleed ? styles29.bleed : styles29.rounded,
|
|
5587
5825
|
{
|
|
5588
5826
|
backgroundColor: callColors.tile,
|
|
5589
5827
|
// A ring rather than a badge: it reads at a glance across a
|
|
@@ -5602,7 +5840,7 @@ function CallParticipantTile({
|
|
|
5602
5840
|
mirror: participant.isSelf,
|
|
5603
5841
|
zOrder: participant.isSelf ? 1 : 0
|
|
5604
5842
|
}
|
|
5605
|
-
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
5843
|
+
) : /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles29.placeholder, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5606
5844
|
CallAvatar,
|
|
5607
5845
|
{
|
|
5608
5846
|
name,
|
|
@@ -5611,17 +5849,17 @@ function CallParticipantTile({
|
|
|
5611
5849
|
speaking: participant.speaking
|
|
5612
5850
|
}
|
|
5613
5851
|
) }),
|
|
5614
|
-
!hideName && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
5852
|
+
!hideName && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles29.chip, bleed ? styles29.chipBleed : styles29.chipTile], children: [
|
|
5615
5853
|
!participant.micEnabled && // Worth showing even for yourself — it is the answer to
|
|
5616
5854
|
// "why can nobody hear me".
|
|
5617
5855
|
/* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "mic-off", size: 13, color: callColors.text, label: "muted" }),
|
|
5618
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style:
|
|
5856
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles29.name, children: name })
|
|
5619
5857
|
] })
|
|
5620
5858
|
]
|
|
5621
5859
|
}
|
|
5622
5860
|
);
|
|
5623
5861
|
}
|
|
5624
|
-
var
|
|
5862
|
+
var styles29 = reactNative.StyleSheet.create({
|
|
5625
5863
|
tile: { overflow: "hidden", justifyContent: "flex-end", borderWidth: 2 },
|
|
5626
5864
|
rounded: { borderRadius: 18 },
|
|
5627
5865
|
bleed: { borderRadius: 0, borderWidth: 0 },
|
|
@@ -5719,7 +5957,7 @@ function LocalVideoPip({
|
|
|
5719
5957
|
reactNative.Animated.View,
|
|
5720
5958
|
{
|
|
5721
5959
|
...responder.panHandlers,
|
|
5722
|
-
style: [
|
|
5960
|
+
style: [styles30.pip, { transform: pan.getTranslateTransform() }],
|
|
5723
5961
|
children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5724
5962
|
reactNative.Pressable,
|
|
5725
5963
|
{
|
|
@@ -5729,8 +5967,8 @@ function LocalVideoPip({
|
|
|
5729
5967
|
},
|
|
5730
5968
|
accessibilityRole: "button",
|
|
5731
5969
|
accessibilityLabel: "Your camera. Drag to move, tap to switch camera.",
|
|
5732
|
-
style:
|
|
5733
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
5970
|
+
style: styles30.fill,
|
|
5971
|
+
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles30.fill, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
5734
5972
|
CallParticipantTile,
|
|
5735
5973
|
{
|
|
5736
5974
|
participant,
|
|
@@ -5739,7 +5977,7 @@ function LocalVideoPip({
|
|
|
5739
5977
|
avatarSize: 48,
|
|
5740
5978
|
hideName: true,
|
|
5741
5979
|
bleed: true,
|
|
5742
|
-
style:
|
|
5980
|
+
style: styles30.fill
|
|
5743
5981
|
}
|
|
5744
5982
|
) })
|
|
5745
5983
|
}
|
|
@@ -5747,7 +5985,7 @@ function LocalVideoPip({
|
|
|
5747
5985
|
}
|
|
5748
5986
|
);
|
|
5749
5987
|
}
|
|
5750
|
-
var
|
|
5988
|
+
var styles30 = reactNative.StyleSheet.create({
|
|
5751
5989
|
pip: {
|
|
5752
5990
|
position: "absolute",
|
|
5753
5991
|
top: 0,
|
|
@@ -5796,11 +6034,11 @@ function CallVideoGrid({
|
|
|
5796
6034
|
const availableHeight = size.height > 0 ? size.height - padTop - padBottom : 0;
|
|
5797
6035
|
const tileHeight = availableHeight > 0 ? (availableHeight - GAP * (rows - 1)) / rows : 0;
|
|
5798
6036
|
const scrolls = tileHeight > 0 && tileHeight < MIN_TILE_HEIGHT;
|
|
5799
|
-
if (participants.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6037
|
+
if (participants.length === 0) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles31.stage, onLayout });
|
|
5800
6038
|
if (others.length <= 1) {
|
|
5801
6039
|
const spotlight = others[0] ?? self;
|
|
5802
|
-
if (!spotlight) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
5803
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6040
|
+
if (!spotlight) return /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles31.stage, onLayout });
|
|
6041
|
+
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles31.stage, onLayout, children: [
|
|
5804
6042
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5805
6043
|
CallParticipantTile,
|
|
5806
6044
|
{
|
|
@@ -5810,7 +6048,7 @@ function CallVideoGrid({
|
|
|
5810
6048
|
avatarSize: Math.min(148, Math.max(96, Math.round(size.width * 0.36))),
|
|
5811
6049
|
bleed: true,
|
|
5812
6050
|
hideName: others.length === 1,
|
|
5813
|
-
style:
|
|
6051
|
+
style: styles31.fill
|
|
5814
6052
|
}
|
|
5815
6053
|
),
|
|
5816
6054
|
self && others.length === 1 && size.width > 0 && /* @__PURE__ */ jsxRuntime.jsx(
|
|
@@ -5828,7 +6066,7 @@ function CallVideoGrid({
|
|
|
5828
6066
|
}
|
|
5829
6067
|
const tiles = [...others, ...self ? [self] : []];
|
|
5830
6068
|
const width = size.width > 0 ? (size.width - GAP * (columns - 1)) / columns : 0;
|
|
5831
|
-
const grid = /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [
|
|
6069
|
+
const grid = /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles31.grid, scrolls ? styles31.gridScrolling : styles31.gridFilling], children: tiles.map((participant) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
5832
6070
|
CallParticipantTile,
|
|
5833
6071
|
{
|
|
5834
6072
|
participant,
|
|
@@ -5845,13 +6083,13 @@ function CallVideoGrid({
|
|
|
5845
6083
|
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
5846
6084
|
reactNative.View,
|
|
5847
6085
|
{
|
|
5848
|
-
style: [
|
|
6086
|
+
style: [styles31.stage, { paddingTop: padTop, paddingBottom: padBottom }],
|
|
5849
6087
|
onLayout,
|
|
5850
6088
|
children: scrolls ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
5851
6089
|
reactNative.ScrollView,
|
|
5852
6090
|
{
|
|
5853
6091
|
contentContainerStyle: [
|
|
5854
|
-
|
|
6092
|
+
styles31.scroll,
|
|
5855
6093
|
{ paddingBottom: (chromeInsets?.bottom ?? 0) + GAP }
|
|
5856
6094
|
],
|
|
5857
6095
|
showsVerticalScrollIndicator: false,
|
|
@@ -5861,7 +6099,7 @@ function CallVideoGrid({
|
|
|
5861
6099
|
}
|
|
5862
6100
|
);
|
|
5863
6101
|
}
|
|
5864
|
-
var
|
|
6102
|
+
var styles31 = reactNative.StyleSheet.create({
|
|
5865
6103
|
stage: { flex: 1, overflow: "hidden" },
|
|
5866
6104
|
fill: { ...reactNative.StyleSheet.absoluteFillObject },
|
|
5867
6105
|
grid: { flexDirection: "row", flexWrap: "wrap", gap: GAP },
|
|
@@ -6220,7 +6458,7 @@ function CallScreen({
|
|
|
6220
6458
|
/* @__PURE__ */ jsxRuntime.jsx(reactNative.StatusBar, { barStyle: "light-content" }),
|
|
6221
6459
|
/* @__PURE__ */ jsxRuntime.jsxs(reactNativeSafeAreaContext.SafeAreaProvider, { children: [
|
|
6222
6460
|
/* @__PURE__ */ jsxRuntime.jsx(InsetsProbe, { onChange: setInsets }),
|
|
6223
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style:
|
|
6461
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles32.screen, onPress: toggleChrome, accessible: false, children: [
|
|
6224
6462
|
/* @__PURE__ */ jsxRuntime.jsx(CallBackdrop, {}),
|
|
6225
6463
|
showStage ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
6226
6464
|
CallVideoGrid,
|
|
@@ -6239,10 +6477,10 @@ function CallScreen({
|
|
|
6239
6477
|
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
6240
6478
|
reactNative.View,
|
|
6241
6479
|
{
|
|
6242
|
-
style: [
|
|
6480
|
+
style: [styles32.identity, { paddingBottom: insets.bottom + 160 }],
|
|
6243
6481
|
pointerEvents: "none",
|
|
6244
6482
|
children: [
|
|
6245
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6483
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.avatarStage, children: [
|
|
6246
6484
|
(ringingIn || ringingOut) && /* @__PURE__ */ jsxRuntime.jsx(PulseRings, { size: 132, color: callColors.glow }),
|
|
6247
6485
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6248
6486
|
CallAvatar,
|
|
@@ -6253,31 +6491,31 @@ function CallScreen({
|
|
|
6253
6491
|
}
|
|
6254
6492
|
)
|
|
6255
6493
|
] }),
|
|
6256
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 2, style:
|
|
6257
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6258
|
-
connected && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6259
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
6494
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 2, style: styles32.identityTitle, children: title }),
|
|
6495
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.statusPill, children: [
|
|
6496
|
+
connected && /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.statusDot }),
|
|
6497
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles32.statusText, children: subtitle })
|
|
6260
6498
|
] })
|
|
6261
6499
|
]
|
|
6262
6500
|
}
|
|
6263
6501
|
)
|
|
6264
6502
|
),
|
|
6265
|
-
chromeVisible && showStage && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [
|
|
6266
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style:
|
|
6267
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6503
|
+
chromeVisible && showStage && /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: [styles32.header, { paddingTop: insets.top + 14 }], pointerEvents: "box-none", children: [
|
|
6504
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { numberOfLines: 1, style: styles32.title, children: title }),
|
|
6505
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.subtitleRow, children: [
|
|
6268
6506
|
isGroup && /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "users", size: 14, color: callColors.textDim, label: null }),
|
|
6269
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
6507
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles32.subtitle, children: isGroup ? `${participants.length} \xB7 ${subtitle}` : subtitle })
|
|
6270
6508
|
] })
|
|
6271
6509
|
] }),
|
|
6272
6510
|
chromeVisible && /* @__PURE__ */ jsxRuntime.jsxs(
|
|
6273
6511
|
reactNative.View,
|
|
6274
6512
|
{
|
|
6275
|
-
style: [
|
|
6513
|
+
style: [styles32.controls, { paddingBottom: insets.bottom + 22 }],
|
|
6276
6514
|
pointerEvents: "box-none",
|
|
6277
6515
|
children: [
|
|
6278
|
-
error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
6279
|
-
!meshAvailable && !livekit && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style:
|
|
6280
|
-
ringingIn ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6516
|
+
error && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles32.error, children: error.message }),
|
|
6517
|
+
!meshAvailable && !livekit && /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles32.error, children: "No WebRTC module supplied \u2014 this call has no audio." }),
|
|
6518
|
+
ringingIn ? /* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.answerRow, children: [
|
|
6281
6519
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6282
6520
|
CallControlButton,
|
|
6283
6521
|
{
|
|
@@ -6300,7 +6538,7 @@ function CallScreen({
|
|
|
6300
6538
|
accessibilityLabel: "Accept call"
|
|
6301
6539
|
}
|
|
6302
6540
|
)
|
|
6303
|
-
] }) : ended ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6541
|
+
] }) : ended ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.row, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6304
6542
|
CallControlButton,
|
|
6305
6543
|
{
|
|
6306
6544
|
icon: "close",
|
|
@@ -6309,7 +6547,7 @@ function CallScreen({
|
|
|
6309
6547
|
accessibilityLabel: "Close"
|
|
6310
6548
|
}
|
|
6311
6549
|
) }) : /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
|
|
6312
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style:
|
|
6550
|
+
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles32.dock, children: [
|
|
6313
6551
|
/* @__PURE__ */ jsxRuntime.jsx(
|
|
6314
6552
|
CallControlButton,
|
|
6315
6553
|
{
|
|
@@ -6350,7 +6588,7 @@ function CallScreen({
|
|
|
6350
6588
|
}
|
|
6351
6589
|
)
|
|
6352
6590
|
] }),
|
|
6353
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style:
|
|
6591
|
+
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles32.hangUpRow, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
6354
6592
|
CallControlButton,
|
|
6355
6593
|
{
|
|
6356
6594
|
icon: "phone-off",
|
|
@@ -6426,7 +6664,7 @@ function statusLine(calls, mediaStatus) {
|
|
|
6426
6664
|
return "";
|
|
6427
6665
|
}
|
|
6428
6666
|
}
|
|
6429
|
-
var
|
|
6667
|
+
var styles32 = reactNative.StyleSheet.create({
|
|
6430
6668
|
screen: { flex: 1, backgroundColor: callColors.bg },
|
|
6431
6669
|
identity: {
|
|
6432
6670
|
flex: 1,
|
|
@@ -6736,6 +6974,7 @@ exports.AudioRouteSheet = AudioRouteSheet;
|
|
|
6736
6974
|
exports.Avatar = Avatar;
|
|
6737
6975
|
exports.CallAvatar = CallAvatar;
|
|
6738
6976
|
exports.CallControlButton = CallControlButton;
|
|
6977
|
+
exports.CallLogRow = CallLogRow;
|
|
6739
6978
|
exports.CallParticipantTile = CallParticipantTile;
|
|
6740
6979
|
exports.CallScreen = CallScreen;
|
|
6741
6980
|
exports.CallVideoGrid = CallVideoGrid;
|