@poolse/react-native 2.25.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 +504 -367
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +7 -4
- package/dist/index.d.ts +7 -4
- package/dist/index.js +506 -369
- package/dist/index.js.map +1 -1
- package/package.json +1 -1
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
|
|
@@ -1196,6 +1209,7 @@ function AttachmentPicker({
|
|
|
1196
1209
|
camera = true
|
|
1197
1210
|
}) {
|
|
1198
1211
|
const theme = usePoolseTheme();
|
|
1212
|
+
const insets = useSafeInsets();
|
|
1199
1213
|
const upload = useSharedUpload();
|
|
1200
1214
|
const { setPreview } = useUploadPreview();
|
|
1201
1215
|
const pickFromKind = async (kind) => {
|
|
@@ -1215,35 +1229,49 @@ function AttachmentPicker({
|
|
|
1215
1229
|
onClose();
|
|
1216
1230
|
}
|
|
1217
1231
|
};
|
|
1218
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1219
|
-
reactNative.
|
|
1232
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
1233
|
+
reactNative.Modal,
|
|
1220
1234
|
{
|
|
1221
|
-
|
|
1222
|
-
|
|
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,
|
|
1223
1242
|
{
|
|
1224
|
-
|
|
1225
|
-
|
|
1226
|
-
|
|
1227
|
-
|
|
1228
|
-
|
|
1229
|
-
|
|
1230
|
-
|
|
1231
|
-
|
|
1232
|
-
|
|
1233
|
-
|
|
1234
|
-
|
|
1235
|
-
|
|
1236
|
-
|
|
1237
|
-
|
|
1238
|
-
|
|
1239
|
-
|
|
1240
|
-
|
|
1241
|
-
|
|
1242
|
-
|
|
1243
|
-
|
|
1244
|
-
|
|
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
|
+
) })
|
|
1245
1273
|
}
|
|
1246
|
-
)
|
|
1274
|
+
);
|
|
1247
1275
|
}
|
|
1248
1276
|
async function uriToBlob(uri) {
|
|
1249
1277
|
const res = await fetch(uri);
|
|
@@ -1669,7 +1697,24 @@ var styles8 = reactNative.StyleSheet.create({
|
|
|
1669
1697
|
fontWeight: "700"
|
|
1670
1698
|
}
|
|
1671
1699
|
});
|
|
1672
|
-
|
|
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
|
+
}
|
|
1673
1718
|
var MessageComposer = react.forwardRef(
|
|
1674
1719
|
function MessageComposer2({
|
|
1675
1720
|
onSend,
|
|
@@ -1690,23 +1735,9 @@ var MessageComposer = react.forwardRef(
|
|
|
1690
1735
|
const inputRef = react.useRef(null);
|
|
1691
1736
|
const [value, setValue] = react.useState("");
|
|
1692
1737
|
const [sending, setSending] = react.useState(false);
|
|
1693
|
-
const
|
|
1738
|
+
const keyboardOpen = useKeyboardOpen();
|
|
1694
1739
|
const upload = useSharedUpload();
|
|
1695
1740
|
const insets = useSafeInsets();
|
|
1696
|
-
react.useEffect(() => {
|
|
1697
|
-
const show = reactNative.Keyboard.addListener(
|
|
1698
|
-
reactNative.Platform.OS === "ios" ? "keyboardWillShow" : "keyboardDidShow",
|
|
1699
|
-
() => setKeyboardOpen(true)
|
|
1700
|
-
);
|
|
1701
|
-
const hide = reactNative.Keyboard.addListener(
|
|
1702
|
-
reactNative.Platform.OS === "ios" ? "keyboardWillHide" : "keyboardDidHide",
|
|
1703
|
-
() => setKeyboardOpen(false)
|
|
1704
|
-
);
|
|
1705
|
-
return () => {
|
|
1706
|
-
show.remove();
|
|
1707
|
-
hide.remove();
|
|
1708
|
-
};
|
|
1709
|
-
}, []);
|
|
1710
1741
|
react.useImperativeHandle(
|
|
1711
1742
|
ref,
|
|
1712
1743
|
() => ({
|
|
@@ -1962,6 +1993,8 @@ var styles9 = reactNative.StyleSheet.create({
|
|
|
1962
1993
|
});
|
|
1963
1994
|
function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
1964
1995
|
const theme = usePoolseTheme();
|
|
1996
|
+
const insets = useSafeInsets();
|
|
1997
|
+
const keyboardOpen = useKeyboardOpen();
|
|
1965
1998
|
const { members } = react$1.useMembers(conversationId);
|
|
1966
1999
|
const [pickerOpen, setPickerOpen] = react.useState(false);
|
|
1967
2000
|
const [pickerQuery, _setPickerQuery] = react.useState("");
|
|
@@ -2000,7 +2033,8 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2000
2033
|
transparent: true,
|
|
2001
2034
|
animationType: "slide",
|
|
2002
2035
|
onRequestClose: () => setPickerOpen(false),
|
|
2003
|
-
|
|
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(
|
|
2004
2038
|
reactNative.View,
|
|
2005
2039
|
{
|
|
2006
2040
|
style: [
|
|
@@ -2008,7 +2042,12 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2008
2042
|
{
|
|
2009
2043
|
backgroundColor: theme.colors.surface,
|
|
2010
2044
|
borderTopLeftRadius: theme.radii.lg,
|
|
2011
|
-
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
|
|
2012
2051
|
}
|
|
2013
2052
|
],
|
|
2014
2053
|
children: [
|
|
@@ -2024,6 +2063,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2024
2063
|
{
|
|
2025
2064
|
data: filteredMembers,
|
|
2026
2065
|
keyExtractor: (m) => m.user_id,
|
|
2066
|
+
keyboardShouldPersistTaps: "handled",
|
|
2027
2067
|
renderItem: ({ item }) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2028
2068
|
MentionRow,
|
|
2029
2069
|
{
|
|
@@ -2039,7 +2079,7 @@ function MentionInput({ conversationId, onSend, ...composerProps }) {
|
|
|
2039
2079
|
)
|
|
2040
2080
|
]
|
|
2041
2081
|
}
|
|
2042
|
-
) })
|
|
2082
|
+
) }) })
|
|
2043
2083
|
}
|
|
2044
2084
|
)
|
|
2045
2085
|
] });
|
|
@@ -2052,6 +2092,9 @@ function MentionRow({ member, onPress }) {
|
|
|
2052
2092
|
] });
|
|
2053
2093
|
}
|
|
2054
2094
|
var styles10 = reactNative.StyleSheet.create({
|
|
2095
|
+
kav: {
|
|
2096
|
+
flex: 1
|
|
2097
|
+
},
|
|
2055
2098
|
backdrop: {
|
|
2056
2099
|
flex: 1,
|
|
2057
2100
|
backgroundColor: "rgba(0,0,0,0.35)",
|
|
@@ -2304,6 +2347,7 @@ function MessageActions({
|
|
|
2304
2347
|
onCopy
|
|
2305
2348
|
}) {
|
|
2306
2349
|
const theme = usePoolseTheme();
|
|
2350
|
+
const insets = useSafeInsets();
|
|
2307
2351
|
const items = [];
|
|
2308
2352
|
if (onReply) items.push({ label: "Reply", icon: "reply", onPress: onReply });
|
|
2309
2353
|
if (onQuote) items.push({ label: "Quote reply", icon: "reply", onPress: onQuote });
|
|
@@ -2314,59 +2358,73 @@ function MessageActions({
|
|
|
2314
2358
|
if (isSelf && onDelete)
|
|
2315
2359
|
items.push({ label: "Delete", icon: "trash", onPress: onDelete, danger: true });
|
|
2316
2360
|
const showEmojiRow = !!onPickReaction && emojis.length > 0;
|
|
2317
|
-
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2318
|
-
reactNative.
|
|
2361
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
2362
|
+
reactNative.Modal,
|
|
2319
2363
|
{
|
|
2320
|
-
|
|
2321
|
-
|
|
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,
|
|
2322
2371
|
{
|
|
2323
|
-
|
|
2324
|
-
|
|
2325
|
-
borderTopRightRadius: theme.radii.lg
|
|
2326
|
-
},
|
|
2327
|
-
theme.shadows.lg
|
|
2328
|
-
],
|
|
2329
|
-
children: [
|
|
2330
|
-
showEmojiRow ? /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles13.emojiRow, { borderBottomColor: theme.colors.border }], children: emojis.map((emoji) => /* @__PURE__ */ jsxRuntime.jsx(
|
|
2331
|
-
reactNative.Pressable,
|
|
2332
|
-
{
|
|
2333
|
-
onPress: () => {
|
|
2334
|
-
onPickReaction(emoji);
|
|
2335
|
-
onClose();
|
|
2336
|
-
},
|
|
2337
|
-
style: styles13.emojiBtn,
|
|
2338
|
-
hitSlop: 6,
|
|
2339
|
-
accessibilityLabel: `React with ${emoji}`,
|
|
2340
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.Text, { style: styles13.emoji, children: emoji })
|
|
2341
|
-
},
|
|
2342
|
-
emoji
|
|
2343
|
-
)) }) : null,
|
|
2344
|
-
items.map((item) => /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { onPress: item.onPress, style: styles13.item, children: [
|
|
2345
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2346
|
-
PoolseIcon,
|
|
2347
|
-
{
|
|
2348
|
-
name: item.icon,
|
|
2349
|
-
size: 18,
|
|
2350
|
-
color: item.danger ? theme.colors.error : theme.colors.ink2
|
|
2351
|
-
}
|
|
2352
|
-
),
|
|
2353
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
2354
|
-
reactNative.Text,
|
|
2372
|
+
style: [
|
|
2373
|
+
styles13.sheet,
|
|
2355
2374
|
{
|
|
2356
|
-
|
|
2357
|
-
|
|
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,
|
|
2358
2403
|
{
|
|
2359
|
-
|
|
2360
|
-
|
|
2404
|
+
name: item.icon,
|
|
2405
|
+
size: 18,
|
|
2406
|
+
color: item.danger ? theme.colors.error : theme.colors.ink2
|
|
2361
2407
|
}
|
|
2362
|
-
|
|
2363
|
-
|
|
2364
|
-
|
|
2365
|
-
|
|
2366
|
-
|
|
2367
|
-
|
|
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
|
+
) })
|
|
2368
2426
|
}
|
|
2369
|
-
)
|
|
2427
|
+
);
|
|
2370
2428
|
}
|
|
2371
2429
|
var styles13 = reactNative.StyleSheet.create({
|
|
2372
2430
|
backdrop: {
|
|
@@ -2662,6 +2720,7 @@ function ImageMosaic({
|
|
|
2662
2720
|
transparent: true,
|
|
2663
2721
|
animationType: "fade",
|
|
2664
2722
|
onRequestClose: () => setViewerIndex(null),
|
|
2723
|
+
...EDGE_TO_EDGE_MODAL,
|
|
2665
2724
|
children: viewerIndex !== null ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2666
2725
|
FullScreenViewer,
|
|
2667
2726
|
{
|
|
@@ -2701,7 +2760,8 @@ function FullScreenViewer({
|
|
|
2701
2760
|
onClose
|
|
2702
2761
|
}) {
|
|
2703
2762
|
const { url } = react$1.useAttachmentUrl(attachment.id);
|
|
2704
|
-
const { width, height } = reactNative.
|
|
2763
|
+
const { width, height } = reactNative.useWindowDimensions();
|
|
2764
|
+
const insets = useSafeInsets();
|
|
2705
2765
|
return /* @__PURE__ */ jsxRuntime.jsxs(reactNative.Pressable, { style: styles15.viewer, onPress: onClose, children: [
|
|
2706
2766
|
url ? /* @__PURE__ */ jsxRuntime.jsx(
|
|
2707
2767
|
reactNative.Image,
|
|
@@ -2718,7 +2778,7 @@ function FullScreenViewer({
|
|
|
2718
2778
|
{
|
|
2719
2779
|
onPress: onClose,
|
|
2720
2780
|
hitSlop: 12,
|
|
2721
|
-
style: styles15.closeBtn,
|
|
2781
|
+
style: [styles15.closeBtn, { top: insets.top + 12, right: insets.right + 16 }],
|
|
2722
2782
|
accessibilityLabel: "Close viewer",
|
|
2723
2783
|
children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 20, color: "#ffffff" })
|
|
2724
2784
|
}
|
|
@@ -2777,8 +2837,6 @@ var styles15 = reactNative.StyleSheet.create({
|
|
|
2777
2837
|
},
|
|
2778
2838
|
closeBtn: {
|
|
2779
2839
|
position: "absolute",
|
|
2780
|
-
top: 48,
|
|
2781
|
-
right: 16,
|
|
2782
2840
|
padding: 8,
|
|
2783
2841
|
backgroundColor: "rgba(0,0,0,0.5)",
|
|
2784
2842
|
borderRadius: 20
|
|
@@ -3308,31 +3366,49 @@ function ReactionPicker({
|
|
|
3308
3366
|
emojis = DEFAULT_EMOJIS
|
|
3309
3367
|
}) {
|
|
3310
3368
|
const theme = usePoolseTheme();
|
|
3311
|
-
|
|
3312
|
-
|
|
3369
|
+
const insets = useSafeInsets();
|
|
3370
|
+
return /* @__PURE__ */ jsxRuntime.jsx(
|
|
3371
|
+
reactNative.Modal,
|
|
3313
3372
|
{
|
|
3314
|
-
|
|
3315
|
-
|
|
3316
|
-
|
|
3317
|
-
|
|
3318
|
-
|
|
3319
|
-
|
|
3320
|
-
theme.shadows.lg
|
|
3321
|
-
],
|
|
3322
|
-
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(
|
|
3323
3379
|
reactNative.Pressable,
|
|
3324
3380
|
{
|
|
3325
|
-
style: styles17.
|
|
3326
|
-
onPress:
|
|
3327
|
-
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
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
|
+
)
|
|
3334
3410
|
}
|
|
3335
|
-
)
|
|
3411
|
+
);
|
|
3336
3412
|
}
|
|
3337
3413
|
var styles17 = reactNative.StyleSheet.create({
|
|
3338
3414
|
strip: {
|
|
@@ -3719,7 +3795,7 @@ function ThreadView({
|
|
|
3719
3795
|
transparent: true,
|
|
3720
3796
|
animationType: "slide",
|
|
3721
3797
|
onRequestClose: onClose,
|
|
3722
|
-
|
|
3798
|
+
...EDGE_TO_EDGE_MODAL,
|
|
3723
3799
|
children: /* @__PURE__ */ jsxRuntime.jsx(UploadProvider, { children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3724
3800
|
ThreadSheet,
|
|
3725
3801
|
{
|
|
@@ -3751,8 +3827,14 @@ function ThreadSheet({
|
|
|
3751
3827
|
loadMore,
|
|
3752
3828
|
hasMore
|
|
3753
3829
|
} = react$1.useThread(conversationId, rootMessage.id);
|
|
3754
|
-
const
|
|
3755
|
-
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
|
+
);
|
|
3756
3838
|
const gutter = screenHeight - sheetHeight;
|
|
3757
3839
|
const { translateY, panHandlers } = useDismissableSheet({ onClose, sheetHeight });
|
|
3758
3840
|
const [pickerOpen, setPickerOpen] = react.useState(false);
|
|
@@ -3804,91 +3886,100 @@ function ThreadSheet({
|
|
|
3804
3886
|
),
|
|
3805
3887
|
[rootMessage, meId, labelFor, avatarFor]
|
|
3806
3888
|
);
|
|
3807
|
-
return /* @__PURE__ */ jsxRuntime.jsxs(
|
|
3808
|
-
|
|
3809
|
-
|
|
3810
|
-
|
|
3811
|
-
|
|
3812
|
-
|
|
3813
|
-
|
|
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,
|
|
3814
3898
|
{
|
|
3815
|
-
|
|
3816
|
-
|
|
3817
|
-
|
|
3818
|
-
|
|
3819
|
-
|
|
3820
|
-
|
|
3821
|
-
|
|
3822
|
-
|
|
3823
|
-
|
|
3824
|
-
|
|
3825
|
-
|
|
3826
|
-
|
|
3827
|
-
|
|
3828
|
-
|
|
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,
|
|
3829
3940
|
{
|
|
3830
|
-
|
|
3831
|
-
|
|
3832
|
-
|
|
3833
|
-
|
|
3834
|
-
|
|
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
|
+
]
|
|
3835
3974
|
}
|
|
3836
3975
|
),
|
|
3837
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3838
|
-
|
|
3839
|
-
|
|
3840
|
-
|
|
3841
|
-
|
|
3842
|
-
|
|
3843
|
-
|
|
3844
|
-
children: "Thread"
|
|
3845
|
-
}
|
|
3846
|
-
)
|
|
3847
|
-
] })
|
|
3848
|
-
] }),
|
|
3849
|
-
/* @__PURE__ */ jsxRuntime.jsxs(
|
|
3850
|
-
reactNative.KeyboardAvoidingView,
|
|
3851
|
-
{
|
|
3852
|
-
style: styles19.kavBody,
|
|
3853
|
-
behavior: reactNative.Platform.OS === "ios" ? "padding" : "height",
|
|
3854
|
-
keyboardVerticalOffset: reactNative.Platform.OS === "ios" ? gutter : 0,
|
|
3855
|
-
children: [
|
|
3856
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles19.rootPreview, { backgroundColor: theme.colors.surface2 }], children: rootRow }),
|
|
3857
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: styles19.listWrap, children: /* @__PURE__ */ jsxRuntime.jsx(
|
|
3858
|
-
MessageList,
|
|
3859
|
-
{
|
|
3860
|
-
messages: replies,
|
|
3861
|
-
hasMore,
|
|
3862
|
-
onLoadMore: loadMore,
|
|
3863
|
-
renderItem: renderReply
|
|
3864
|
-
}
|
|
3865
|
-
) }),
|
|
3866
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
3867
|
-
MessageComposer,
|
|
3868
|
-
{
|
|
3869
|
-
onSend: async (body, opts) => {
|
|
3870
|
-
await sendReply({ body, ...opts });
|
|
3871
|
-
},
|
|
3872
|
-
placeholder: "Reply to thread\u2026",
|
|
3873
|
-
attachments: true,
|
|
3874
|
-
onAttachPress: () => setPickerOpen(true),
|
|
3875
|
-
editingMessage,
|
|
3876
|
-
onCancelEdit: () => setEditingId(null),
|
|
3877
|
-
onSaveEdit: async (body) => {
|
|
3878
|
-
if (!editingId) return;
|
|
3879
|
-
await edit(editingId, body);
|
|
3880
|
-
setEditingId(null);
|
|
3881
|
-
}
|
|
3882
|
-
}
|
|
3883
|
-
)
|
|
3884
|
-
]
|
|
3885
|
-
}
|
|
3886
|
-
),
|
|
3887
|
-
/* @__PURE__ */ jsxRuntime.jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
|
|
3888
|
-
]
|
|
3889
|
-
}
|
|
3890
|
-
)
|
|
3891
|
-
] });
|
|
3976
|
+
/* @__PURE__ */ jsxRuntime.jsx(AttachmentPicker, { visible: pickerOpen, onClose: () => setPickerOpen(false) })
|
|
3977
|
+
]
|
|
3978
|
+
}
|
|
3979
|
+
)
|
|
3980
|
+
]
|
|
3981
|
+
}
|
|
3982
|
+
);
|
|
3892
3983
|
}
|
|
3893
3984
|
var styles19 = reactNative.StyleSheet.create({
|
|
3894
3985
|
modalRoot: {
|
|
@@ -4359,7 +4450,12 @@ function UserPickerSheet({
|
|
|
4359
4450
|
const [query, setQuery] = react.useState("");
|
|
4360
4451
|
const [selectedIds, setSelectedIds] = react.useState([]);
|
|
4361
4452
|
const [groupName, setGroupName] = react.useState("");
|
|
4362
|
-
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);
|
|
4363
4459
|
const { translateY, panHandlers } = useDismissableSheet({
|
|
4364
4460
|
onClose: () => {
|
|
4365
4461
|
setQuery("");
|
|
@@ -4367,7 +4463,7 @@ function UserPickerSheet({
|
|
|
4367
4463
|
setGroupName("");
|
|
4368
4464
|
onClose();
|
|
4369
4465
|
},
|
|
4370
|
-
sheetHeight
|
|
4466
|
+
sheetHeight
|
|
4371
4467
|
});
|
|
4372
4468
|
const excludeSet = react.useMemo(() => new Set(excludeIds ?? []), [excludeIds]);
|
|
4373
4469
|
const filtered = react.useMemo(() => {
|
|
@@ -4409,142 +4505,164 @@ function UserPickerSheet({
|
|
|
4409
4505
|
transparent: true,
|
|
4410
4506
|
animationType: "slide",
|
|
4411
4507
|
onRequestClose: handleClose,
|
|
4412
|
-
|
|
4413
|
-
children: /* @__PURE__ */ jsxRuntime.jsxs(
|
|
4414
|
-
|
|
4415
|
-
|
|
4416
|
-
|
|
4417
|
-
|
|
4418
|
-
|
|
4419
|
-
|
|
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,
|
|
4420
4518
|
{
|
|
4421
|
-
|
|
4422
|
-
|
|
4423
|
-
borderTopRightRadius: theme.radii.xl,
|
|
4424
|
-
transform: [{ translateY }]
|
|
4425
|
-
},
|
|
4426
|
-
theme.shadows.lg
|
|
4427
|
-
],
|
|
4428
|
-
children: [
|
|
4429
|
-
/* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { ...panHandlers, style: styles22.dragHandle, children: /* @__PURE__ */ jsxRuntime.jsx(reactNative.View, { style: [styles22.dragPill, { backgroundColor: theme.colors.ink3 }] }) }),
|
|
4430
|
-
/* @__PURE__ */ jsxRuntime.jsxs(reactNative.View, { style: styles22.header, children: [
|
|
4431
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4432
|
-
reactNative.Pressable,
|
|
4433
|
-
{
|
|
4434
|
-
onPress: handleClose,
|
|
4435
|
-
hitSlop: 16,
|
|
4436
|
-
style: [styles22.closeBtn, { backgroundColor: theme.colors.surface2 }],
|
|
4437
|
-
accessibilityLabel: "Close picker",
|
|
4438
|
-
children: /* @__PURE__ */ jsxRuntime.jsx(PoolseIcon, { name: "close", size: 18, color: theme.colors.ink })
|
|
4439
|
-
}
|
|
4440
|
-
),
|
|
4441
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
4442
|
-
reactNative.Text,
|
|
4519
|
+
style: [
|
|
4520
|
+
styles22.sheet,
|
|
4443
4521
|
{
|
|
4444
|
-
|
|
4445
|
-
|
|
4446
|
-
|
|
4447
|
-
|
|
4448
|
-
|
|
4449
|
-
|
|
4450
|
-
|
|
4451
|
-
|
|
4452
|
-
|
|
4453
|
-
|
|
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,
|
|
4454
4537
|
{
|
|
4455
|
-
|
|
4456
|
-
|
|
4457
|
-
|
|
4458
|
-
|
|
4459
|
-
styles22.
|
|
4460
|
-
{
|
|
4461
|
-
|
|
4462
|
-
|
|
4463
|
-
|
|
4464
|
-
|
|
4465
|
-
|
|
4466
|
-
|
|
4467
|
-
|
|
4468
|
-
|
|
4469
|
-
|
|
4470
|
-
|
|
4471
|
-
|
|
4472
|
-
|
|
4473
|
-
|
|
4474
|
-
|
|
4475
|
-
|
|
4476
|
-
|
|
4477
|
-
|
|
4478
|
-
|
|
4479
|
-
|
|
4480
|
-
|
|
4481
|
-
|
|
4482
|
-
|
|
4483
|
-
|
|
4484
|
-
|
|
4485
|
-
|
|
4486
|
-
|
|
4487
|
-
|
|
4488
|
-
|
|
4489
|
-
|
|
4490
|
-
|
|
4491
|
-
|
|
4492
|
-
|
|
4493
|
-
|
|
4494
|
-
|
|
4495
|
-
|
|
4496
|
-
|
|
4497
|
-
|
|
4498
|
-
|
|
4499
|
-
|
|
4500
|
-
|
|
4501
|
-
|
|
4502
|
-
|
|
4503
|
-
|
|
4504
|
-
|
|
4505
|
-
|
|
4506
|
-
|
|
4507
|
-
|
|
4508
|
-
|
|
4509
|
-
|
|
4510
|
-
|
|
4511
|
-
|
|
4512
|
-
|
|
4513
|
-
|
|
4514
|
-
|
|
4515
|
-
|
|
4516
|
-
|
|
4517
|
-
|
|
4518
|
-
|
|
4519
|
-
|
|
4520
|
-
|
|
4521
|
-
|
|
4522
|
-
|
|
4523
|
-
|
|
4524
|
-
|
|
4525
|
-
|
|
4526
|
-
|
|
4527
|
-
|
|
4528
|
-
|
|
4529
|
-
user: item,
|
|
4530
|
-
selected: selectedIds.includes(item.externalId),
|
|
4531
|
-
isGroup,
|
|
4532
|
-
onPress: () => {
|
|
4533
|
-
if (isGroup) toggle(item.externalId);
|
|
4534
|
-
else {
|
|
4535
|
-
onPickDirect?.(item.externalId);
|
|
4536
|
-
reset();
|
|
4537
|
-
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
|
+
]
|
|
4538
4612
|
}
|
|
4539
|
-
|
|
4540
|
-
|
|
4541
|
-
|
|
4542
|
-
|
|
4543
|
-
|
|
4544
|
-
|
|
4545
|
-
|
|
4546
|
-
|
|
4547
|
-
|
|
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
|
+
)
|
|
4548
4666
|
}
|
|
4549
4667
|
);
|
|
4550
4668
|
}
|
|
@@ -4605,9 +4723,11 @@ var styles22 = reactNative.StyleSheet.create({
|
|
|
4605
4723
|
backgroundColor: "rgba(0,0,0,0.4)"
|
|
4606
4724
|
},
|
|
4607
4725
|
sheet: {
|
|
4608
|
-
height: "85%",
|
|
4609
4726
|
overflow: "hidden"
|
|
4610
4727
|
},
|
|
4728
|
+
kav: {
|
|
4729
|
+
flex: 1
|
|
4730
|
+
},
|
|
4611
4731
|
dragHandle: {
|
|
4612
4732
|
alignItems: "center",
|
|
4613
4733
|
paddingTop: 8,
|
|
@@ -5422,40 +5542,58 @@ function AudioRouteSheet({
|
|
|
5422
5542
|
onSelect,
|
|
5423
5543
|
onClose
|
|
5424
5544
|
}) {
|
|
5425
|
-
|
|
5426
|
-
|
|
5427
|
-
|
|
5428
|
-
|
|
5429
|
-
|
|
5430
|
-
|
|
5431
|
-
|
|
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(
|
|
5432
5555
|
reactNative.Pressable,
|
|
5433
5556
|
{
|
|
5557
|
+
style: [styles25.sheet, { paddingBottom: Math.max(34, insets.bottom + 16) }],
|
|
5434
5558
|
onPress: () => {
|
|
5435
|
-
onSelect(route.id);
|
|
5436
|
-
onClose();
|
|
5437
5559
|
},
|
|
5438
|
-
accessibilityRole: "button",
|
|
5439
|
-
accessibilityState: { selected },
|
|
5440
|
-
style: ({ pressed }) => [styles25.row, pressed && styles25.rowPressed],
|
|
5441
5560
|
children: [
|
|
5442
|
-
/* @__PURE__ */ jsxRuntime.jsx(
|
|
5443
|
-
|
|
5444
|
-
|
|
5445
|
-
|
|
5446
|
-
|
|
5447
|
-
|
|
5448
|
-
|
|
5449
|
-
|
|
5450
|
-
|
|
5451
|
-
|
|
5452
|
-
|
|
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
|
+
})
|
|
5453
5592
|
]
|
|
5454
|
-
}
|
|
5455
|
-
|
|
5456
|
-
|
|
5457
|
-
|
|
5458
|
-
] }) }) });
|
|
5593
|
+
}
|
|
5594
|
+
) })
|
|
5595
|
+
}
|
|
5596
|
+
);
|
|
5459
5597
|
}
|
|
5460
5598
|
var styles25 = reactNative.StyleSheet.create({
|
|
5461
5599
|
backdrop: { flex: 1, backgroundColor: "rgba(0,0,0,0.55)", justifyContent: "flex-end" },
|
|
@@ -5465,7 +5603,6 @@ var styles25 = reactNative.StyleSheet.create({
|
|
|
5465
5603
|
borderTopRightRadius: 22,
|
|
5466
5604
|
paddingHorizontal: 12,
|
|
5467
5605
|
paddingTop: 10,
|
|
5468
|
-
paddingBottom: 34,
|
|
5469
5606
|
gap: 2
|
|
5470
5607
|
},
|
|
5471
5608
|
grabber: {
|