@kesha-antonov/react-native-chat 6.0.0 → 6.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +28 -5
- package/lib/Actions.d.ts.map +1 -1
- package/lib/Actions.js +33 -27
- package/lib/Actions.js.map +1 -1
- package/lib/Chat/Chat.d.ts.map +1 -1
- package/lib/Chat/Chat.js +253 -203
- package/lib/Chat/Chat.js.map +1 -1
- package/lib/Chat/ChatMessageList.d.ts.map +1 -1
- package/lib/Chat/ChatMessageList.js +4 -0
- package/lib/Chat/ChatMessageList.js.map +1 -1
- package/lib/Chat/index.d.ts +9 -1
- package/lib/Chat/index.d.ts.map +1 -1
- package/lib/Chat/index.js +14 -1
- package/lib/Chat/index.js.map +1 -1
- package/lib/Chat/types.d.ts +29 -0
- package/lib/Chat/types.d.ts.map +1 -1
- package/lib/Chat/types.js.map +1 -1
- package/lib/Chat/useMessageActions.d.ts +1 -0
- package/lib/Chat/useMessageActions.d.ts.map +1 -1
- package/lib/Chat/useMessageActions.js +97 -89
- package/lib/Chat/useMessageActions.js.map +1 -1
- package/lib/ChatHeader.d.ts +50 -0
- package/lib/ChatHeader.d.ts.map +1 -0
- package/lib/ChatHeader.js +356 -0
- package/lib/ChatHeader.js.map +1 -0
- package/lib/ChatList/ChatListCell.d.ts +1 -1
- package/lib/ChatList/ChatListCell.d.ts.map +1 -1
- package/lib/ChatList/ChatListCell.js +42 -11
- package/lib/ChatList/ChatListCell.js.map +1 -1
- package/lib/ChatList/index.js +332 -323
- package/lib/ChatList/index.js.map +1 -1
- package/lib/ChatList/types.d.ts +17 -1
- package/lib/ChatList/types.d.ts.map +1 -1
- package/lib/ChatList/types.js.map +1 -1
- package/lib/ChatList/utils.d.ts +4 -1
- package/lib/ChatList/utils.d.ts.map +1 -1
- package/lib/ChatList/utils.js +3 -2
- package/lib/ChatList/utils.js.map +1 -1
- package/lib/Composer.js +5 -1
- package/lib/Composer.js.map +1 -1
- package/lib/InputToolbar/fragments.d.ts +1 -1
- package/lib/InputToolbar/fragments.d.ts.map +1 -1
- package/lib/InputToolbar/fragments.js +9 -7
- package/lib/InputToolbar/fragments.js.map +1 -1
- package/lib/InputToolbar/index.d.ts.map +1 -1
- package/lib/InputToolbar/index.js +3 -2
- package/lib/InputToolbar/index.js.map +1 -1
- package/lib/InputToolbar/types.d.ts +6 -0
- package/lib/InputToolbar/types.d.ts.map +1 -1
- package/lib/InputToolbar/types.js.map +1 -1
- package/lib/InputToolbar/useActionsFragment.d.ts.map +1 -1
- package/lib/InputToolbar/useActionsFragment.js +83 -59
- package/lib/InputToolbar/useActionsFragment.js.map +1 -1
- package/lib/InputToolbar/useKeyboardInset.d.ts +1 -1
- package/lib/InputToolbar/useKeyboardInset.d.ts.map +1 -1
- package/lib/InputToolbar/useKeyboardInset.js +2 -2
- package/lib/InputToolbar/useKeyboardInset.js.map +1 -1
- package/lib/MessageText.d.ts.map +1 -1
- package/lib/MessageText.js +39 -33
- package/lib/MessageText.js.map +1 -1
- package/lib/MessagesContainer/index.d.ts.map +1 -1
- package/lib/MessagesContainer/index.js +113 -94
- package/lib/MessagesContainer/index.js.map +1 -1
- package/lib/MessagesContainer/types.d.ts +5 -2
- package/lib/MessagesContainer/types.d.ts.map +1 -1
- package/lib/MessagesContainer/types.js.map +1 -1
- package/lib/MessagesContainer/useChained.d.ts +6 -0
- package/lib/MessagesContainer/useChained.d.ts.map +1 -0
- package/lib/MessagesContainer/useChained.js +38 -0
- package/lib/MessagesContainer/useChained.js.map +1 -0
- package/lib/MessagesContainer/useListChrome.d.ts.map +1 -1
- package/lib/MessagesContainer/useListChrome.js +1 -1
- package/lib/MessagesContainer/useListChrome.js.map +1 -1
- package/lib/Models.d.ts +2 -1
- package/lib/Models.d.ts.map +1 -1
- package/lib/Models.js.map +1 -1
- package/lib/Send.d.ts.map +1 -1
- package/lib/Send.js +18 -13
- package/lib/Send.js.map +1 -1
- package/lib/Theme.d.ts +11 -0
- package/lib/Theme.d.ts.map +1 -1
- package/lib/Theme.js +17 -1
- package/lib/Theme.js.map +1 -1
- package/lib/attachments/AttachmentButton.js +17 -15
- package/lib/attachments/AttachmentButton.js.map +1 -1
- package/lib/attachments/AttachmentMenu/GalleryGrid.d.ts +3 -1
- package/lib/attachments/AttachmentMenu/GalleryGrid.d.ts.map +1 -1
- package/lib/attachments/AttachmentMenu/GalleryGrid.js +69 -68
- package/lib/attachments/AttachmentMenu/GalleryGrid.js.map +1 -1
- package/lib/attachments/AttachmentMenu/TabPanel.d.ts +3 -1
- package/lib/attachments/AttachmentMenu/TabPanel.d.ts.map +1 -1
- package/lib/attachments/AttachmentMenu/TabPanel.js +23 -21
- package/lib/attachments/AttachmentMenu/TabPanel.js.map +1 -1
- package/lib/attachments/AttachmentMenu/index.d.ts +6 -2
- package/lib/attachments/AttachmentMenu/index.d.ts.map +1 -1
- package/lib/attachments/AttachmentMenu/index.js +259 -247
- package/lib/attachments/AttachmentMenu/index.js.map +1 -1
- package/lib/attachments/buildMessages.d.ts +4 -4
- package/lib/attachments/buildMessages.d.ts.map +1 -1
- package/lib/attachments/buildMessages.js +9 -8
- package/lib/attachments/buildMessages.js.map +1 -1
- package/lib/attachments/types.d.ts +19 -0
- package/lib/attachments/types.d.ts.map +1 -1
- package/lib/attachments/types.js.map +1 -1
- package/lib/components/TouchableOpacity.d.ts +5 -0
- package/lib/components/TouchableOpacity.d.ts.map +1 -1
- package/lib/components/TouchableOpacity.js +59 -54
- package/lib/components/TouchableOpacity.js.map +1 -1
- package/lib/components/defaultMessageActions.d.ts +3 -1
- package/lib/components/defaultMessageActions.d.ts.map +1 -1
- package/lib/components/defaultMessageActions.js +9 -1
- package/lib/components/defaultMessageActions.js.map +1 -1
- package/lib/components/textHighlight.d.ts +14 -0
- package/lib/components/textHighlight.d.ts.map +1 -0
- package/lib/components/textHighlight.js +39 -0
- package/lib/components/textHighlight.js.map +1 -0
- package/lib/hooks/useKeyboardVerticalOffset.d.ts +6 -0
- package/lib/hooks/useKeyboardVerticalOffset.d.ts.map +1 -1
- package/lib/hooks/useKeyboardVerticalOffset.js +35 -13
- package/lib/hooks/useKeyboardVerticalOffset.js.map +1 -1
- package/lib/i18n.d.ts +2 -0
- package/lib/i18n.d.ts.map +1 -1
- package/lib/i18n.js +1 -0
- package/lib/i18n.js.map +1 -1
- package/lib/index.d.ts +3 -1
- package/lib/index.d.ts.map +1 -1
- package/lib/index.js +1 -0
- package/lib/index.js.map +1 -1
- package/lib/linkParser.d.ts +4 -1
- package/lib/linkParser.d.ts.map +1 -1
- package/lib/linkParser.js +115 -78
- package/lib/linkParser.js.map +1 -1
- package/lib/locales/ar.d.ts.map +1 -1
- package/lib/locales/ar.js +1 -0
- package/lib/locales/ar.js.map +1 -1
- package/lib/locales/de.d.ts.map +1 -1
- package/lib/locales/de.js +1 -0
- package/lib/locales/de.js.map +1 -1
- package/lib/locales/es.d.ts.map +1 -1
- package/lib/locales/es.js +1 -0
- package/lib/locales/es.js.map +1 -1
- package/lib/locales/fr.d.ts.map +1 -1
- package/lib/locales/fr.js +1 -0
- package/lib/locales/fr.js.map +1 -1
- package/lib/locales/hi.d.ts.map +1 -1
- package/lib/locales/hi.js +1 -0
- package/lib/locales/hi.js.map +1 -1
- package/lib/locales/id.d.ts.map +1 -1
- package/lib/locales/id.js +1 -0
- package/lib/locales/id.js.map +1 -1
- package/lib/locales/it.d.ts.map +1 -1
- package/lib/locales/it.js +1 -0
- package/lib/locales/it.js.map +1 -1
- package/lib/locales/ja.d.ts.map +1 -1
- package/lib/locales/ja.js +1 -0
- package/lib/locales/ja.js.map +1 -1
- package/lib/locales/ko.d.ts.map +1 -1
- package/lib/locales/ko.js +1 -0
- package/lib/locales/ko.js.map +1 -1
- package/lib/locales/nl.d.ts.map +1 -1
- package/lib/locales/nl.js +1 -0
- package/lib/locales/nl.js.map +1 -1
- package/lib/locales/pl.d.ts.map +1 -1
- package/lib/locales/pl.js +1 -0
- package/lib/locales/pl.js.map +1 -1
- package/lib/locales/pt.d.ts.map +1 -1
- package/lib/locales/pt.js +1 -0
- package/lib/locales/pt.js.map +1 -1
- package/lib/locales/ru.d.ts.map +1 -1
- package/lib/locales/ru.js +1 -0
- package/lib/locales/ru.js.map +1 -1
- package/lib/locales/tr.d.ts.map +1 -1
- package/lib/locales/tr.js +1 -0
- package/lib/locales/tr.js.map +1 -1
- package/lib/locales/zh.d.ts.map +1 -1
- package/lib/locales/zh.js +1 -0
- package/lib/locales/zh.js.map +1 -1
- package/llms.txt +1 -1
- package/package.json +1 -1
|
@@ -7,7 +7,7 @@ import { useWindowInsets } from '../../components/windowInsets';
|
|
|
7
7
|
import { useColorScheme } from '../../hooks/useColorScheme';
|
|
8
8
|
import { useThemedStyles } from '../../hooks/useTheme';
|
|
9
9
|
import { warning } from '../../logging';
|
|
10
|
-
import { hasMediaLibrary } from '../../optional';
|
|
10
|
+
import { hasImagePickerCamera, hasMediaLibrary } from '../../optional';
|
|
11
11
|
import { getCurrentLocation, pickDocuments, pickFromSystemGallery, takePhoto } from '../buildMessages';
|
|
12
12
|
import { toPickedAttachment, useGallery } from '../gallery';
|
|
13
13
|
import { CaptionBar } from './CaptionBar';
|
|
@@ -23,13 +23,19 @@ import { useSheetPresence } from './useSheetPresence';
|
|
|
23
23
|
* a "Send N" button; File, Camera and (without the grid) Gallery hand over to the system pickers.
|
|
24
24
|
*/
|
|
25
25
|
export function AttachmentMenu(t0) {
|
|
26
|
-
const $ = _c(
|
|
26
|
+
const $ = _c(119);
|
|
27
27
|
const {
|
|
28
28
|
visible,
|
|
29
29
|
tabs,
|
|
30
30
|
onClose,
|
|
31
|
-
onSend
|
|
31
|
+
onSend,
|
|
32
|
+
pickers,
|
|
33
|
+
isGalleryGridEnabled: t1
|
|
32
34
|
} = t0;
|
|
35
|
+
const isGalleryGridEnabled = t1 === undefined ? true : t1;
|
|
36
|
+
const pickFile = pickers?.file ?? pickDocuments;
|
|
37
|
+
const pickCamera = pickers?.camera ?? (hasImagePickerCamera() ? takePhoto : undefined);
|
|
38
|
+
const pickGallery = pickers?.gallery ?? pickFromSystemGallery;
|
|
33
39
|
const styles = useThemedStyles(createStyles);
|
|
34
40
|
const isDark = useColorScheme() === "dark";
|
|
35
41
|
const insets = useWindowInsets();
|
|
@@ -37,43 +43,44 @@ export function AttachmentMenu(t0) {
|
|
|
37
43
|
width: screenWidth,
|
|
38
44
|
height: screenHeight
|
|
39
45
|
} = useWindowDimensions();
|
|
40
|
-
let
|
|
41
|
-
if ($[0] !== tabs) {
|
|
42
|
-
|
|
43
|
-
$[0] =
|
|
44
|
-
$[1] =
|
|
46
|
+
let t2;
|
|
47
|
+
if ($[0] !== isGalleryGridEnabled || $[1] !== tabs) {
|
|
48
|
+
t2 = isGalleryGridEnabled && tabs.includes("gallery") && hasMediaLibrary();
|
|
49
|
+
$[0] = isGalleryGridEnabled;
|
|
50
|
+
$[1] = tabs;
|
|
51
|
+
$[2] = t2;
|
|
45
52
|
} else {
|
|
46
|
-
|
|
53
|
+
t2 = $[2];
|
|
47
54
|
}
|
|
48
|
-
const hasGrid =
|
|
49
|
-
let
|
|
50
|
-
if ($[
|
|
51
|
-
let
|
|
52
|
-
if ($[
|
|
53
|
-
|
|
54
|
-
$[
|
|
55
|
-
$[
|
|
55
|
+
const hasGrid = t2;
|
|
56
|
+
let t3;
|
|
57
|
+
if ($[3] !== hasGrid || $[4] !== tabs) {
|
|
58
|
+
let t4;
|
|
59
|
+
if ($[6] !== hasGrid) {
|
|
60
|
+
t4 = tab => tab === "gallery" && hasGrid || tab === "location" || tab === "gallery";
|
|
61
|
+
$[6] = hasGrid;
|
|
62
|
+
$[7] = t4;
|
|
56
63
|
} else {
|
|
57
|
-
|
|
64
|
+
t4 = $[7];
|
|
58
65
|
}
|
|
59
|
-
|
|
60
|
-
$[
|
|
61
|
-
$[
|
|
62
|
-
$[
|
|
66
|
+
t3 = tabs.filter(t4);
|
|
67
|
+
$[3] = hasGrid;
|
|
68
|
+
$[4] = tabs;
|
|
69
|
+
$[5] = t3;
|
|
63
70
|
} else {
|
|
64
|
-
|
|
71
|
+
t3 = $[5];
|
|
65
72
|
}
|
|
66
|
-
const contentTabs =
|
|
73
|
+
const contentTabs = t3;
|
|
67
74
|
const initialTab = contentTabs[0] ?? tabs[0] ?? "gallery";
|
|
68
75
|
const [activeTab, setActiveTab] = useState(initialTab);
|
|
69
|
-
let
|
|
70
|
-
if ($[
|
|
71
|
-
|
|
72
|
-
$[
|
|
76
|
+
let t4;
|
|
77
|
+
if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
|
|
78
|
+
t4 = [];
|
|
79
|
+
$[8] = t4;
|
|
73
80
|
} else {
|
|
74
|
-
|
|
81
|
+
t4 = $[8];
|
|
75
82
|
}
|
|
76
|
-
const [selected, setSelected] = useState(
|
|
83
|
+
const [selected, setSelected] = useState(t4);
|
|
77
84
|
const [caption, setCaption] = useState("");
|
|
78
85
|
const [location, setLocation] = useState(null);
|
|
79
86
|
const scrollY = useSharedValue(0);
|
|
@@ -104,85 +111,85 @@ export function AttachmentMenu(t0) {
|
|
|
104
111
|
const isGridTab = activeTab === "gallery" && hasGrid;
|
|
105
112
|
const gallery = useGallery(isMounted && isGridTab);
|
|
106
113
|
const isGridShown = isGridTab && gallery.status !== "denied" && gallery.status !== "unavailable" && !(gallery.status === "ready" && gallery.assets.length === 0);
|
|
107
|
-
let t4;
|
|
108
114
|
let t5;
|
|
109
|
-
|
|
110
|
-
|
|
115
|
+
let t6;
|
|
116
|
+
if ($[9] !== gridMode || $[10] !== isGridShown) {
|
|
117
|
+
t5 = () => {
|
|
111
118
|
gridMode.set(withTiming(isGridShown ? 1 : 0, CLOSE));
|
|
112
119
|
};
|
|
113
|
-
|
|
114
|
-
$[
|
|
115
|
-
$[
|
|
116
|
-
$[10] = t4;
|
|
120
|
+
t6 = [isGridShown, gridMode];
|
|
121
|
+
$[9] = gridMode;
|
|
122
|
+
$[10] = isGridShown;
|
|
117
123
|
$[11] = t5;
|
|
124
|
+
$[12] = t6;
|
|
118
125
|
} else {
|
|
119
|
-
t4 = $[10];
|
|
120
126
|
t5 = $[11];
|
|
127
|
+
t6 = $[12];
|
|
121
128
|
}
|
|
122
|
-
useEffect(
|
|
123
|
-
let t6;
|
|
129
|
+
useEffect(t5, t6);
|
|
124
130
|
let t7;
|
|
125
|
-
|
|
126
|
-
|
|
131
|
+
let t8;
|
|
132
|
+
if ($[13] !== captionShown || $[14] !== selected.length) {
|
|
133
|
+
t7 = () => {
|
|
127
134
|
captionShown.set(withTiming(selected.length > 0 ? 1 : 0, {
|
|
128
135
|
duration: CAPTION_SWAP_MS,
|
|
129
136
|
easing: DECELERATE,
|
|
130
137
|
reduceMotion: REDUCE_MOTION
|
|
131
138
|
}));
|
|
132
139
|
};
|
|
133
|
-
|
|
134
|
-
$[
|
|
135
|
-
$[
|
|
136
|
-
$[14] = t6;
|
|
140
|
+
t8 = [selected.length, captionShown];
|
|
141
|
+
$[13] = captionShown;
|
|
142
|
+
$[14] = selected.length;
|
|
137
143
|
$[15] = t7;
|
|
144
|
+
$[16] = t8;
|
|
138
145
|
} else {
|
|
139
|
-
t6 = $[14];
|
|
140
146
|
t7 = $[15];
|
|
147
|
+
t8 = $[16];
|
|
141
148
|
}
|
|
142
|
-
useEffect(
|
|
143
|
-
let
|
|
144
|
-
if ($[
|
|
145
|
-
|
|
146
|
-
$[
|
|
147
|
-
$[
|
|
148
|
-
$[
|
|
149
|
+
useEffect(t7, t8);
|
|
150
|
+
let t9;
|
|
151
|
+
if ($[17] !== close || $[18] !== onClose) {
|
|
152
|
+
t9 = () => close(onClose);
|
|
153
|
+
$[17] = close;
|
|
154
|
+
$[18] = onClose;
|
|
155
|
+
$[19] = t9;
|
|
149
156
|
} else {
|
|
150
|
-
|
|
157
|
+
t9 = $[19];
|
|
151
158
|
}
|
|
152
|
-
const dismiss =
|
|
153
|
-
let
|
|
154
|
-
if ($[
|
|
155
|
-
|
|
159
|
+
const dismiss = t9;
|
|
160
|
+
let t10;
|
|
161
|
+
if ($[20] !== close || $[21] !== onClose) {
|
|
162
|
+
t10 = action => {
|
|
156
163
|
close(() => {
|
|
157
164
|
onClose();
|
|
158
165
|
action();
|
|
159
166
|
});
|
|
160
167
|
};
|
|
161
|
-
$[
|
|
162
|
-
$[
|
|
163
|
-
$[
|
|
168
|
+
$[20] = close;
|
|
169
|
+
$[21] = onClose;
|
|
170
|
+
$[22] = t10;
|
|
164
171
|
} else {
|
|
165
|
-
|
|
172
|
+
t10 = $[22];
|
|
166
173
|
}
|
|
167
|
-
const closeThen =
|
|
168
|
-
let
|
|
169
|
-
if ($[
|
|
170
|
-
|
|
171
|
-
const withCaption =
|
|
174
|
+
const closeThen = t10;
|
|
175
|
+
let t11;
|
|
176
|
+
if ($[23] !== onSend) {
|
|
177
|
+
t11 = (attachments, t12) => {
|
|
178
|
+
const withCaption = t12 === undefined ? "" : t12;
|
|
172
179
|
if (attachments.length) {
|
|
173
180
|
onSend(attachments, withCaption);
|
|
174
181
|
}
|
|
175
182
|
};
|
|
176
|
-
$[
|
|
177
|
-
$[
|
|
183
|
+
$[23] = onSend;
|
|
184
|
+
$[24] = t11;
|
|
178
185
|
} else {
|
|
179
|
-
|
|
186
|
+
t11 = $[24];
|
|
180
187
|
}
|
|
181
|
-
const sendPicked =
|
|
188
|
+
const sendPicked = t11;
|
|
182
189
|
const isPickingRef = useRef(false);
|
|
183
|
-
let
|
|
184
|
-
if ($[
|
|
185
|
-
|
|
190
|
+
let t12;
|
|
191
|
+
if ($[25] !== closeThen || $[26] !== sendPicked) {
|
|
192
|
+
t12 = picker => {
|
|
186
193
|
if (isPickingRef.current) {
|
|
187
194
|
return;
|
|
188
195
|
}
|
|
@@ -195,37 +202,37 @@ export function AttachmentMenu(t0) {
|
|
|
195
202
|
isPickingRef.current = false;
|
|
196
203
|
});
|
|
197
204
|
};
|
|
198
|
-
$[
|
|
199
|
-
$[
|
|
200
|
-
$[
|
|
205
|
+
$[25] = closeThen;
|
|
206
|
+
$[26] = sendPicked;
|
|
207
|
+
$[27] = t12;
|
|
201
208
|
} else {
|
|
202
|
-
|
|
209
|
+
t12 = $[27];
|
|
203
210
|
}
|
|
204
|
-
const runPicker =
|
|
205
|
-
let
|
|
206
|
-
if ($[
|
|
207
|
-
|
|
211
|
+
const runPicker = t12;
|
|
212
|
+
let t13;
|
|
213
|
+
if ($[28] === Symbol.for("react.memo_cache_sentinel")) {
|
|
214
|
+
t13 = () => {
|
|
208
215
|
setLocation("locating");
|
|
209
216
|
getCurrentLocation().then(setLocation).catch(() => setLocation({
|
|
210
217
|
status: "failed"
|
|
211
218
|
}));
|
|
212
219
|
};
|
|
213
|
-
$[
|
|
220
|
+
$[28] = t13;
|
|
214
221
|
} else {
|
|
215
|
-
|
|
222
|
+
t13 = $[28];
|
|
216
223
|
}
|
|
217
|
-
const fetchLocation =
|
|
218
|
-
let
|
|
219
|
-
if ($[
|
|
220
|
-
|
|
224
|
+
const fetchLocation = t13;
|
|
225
|
+
let t14;
|
|
226
|
+
if ($[29] !== activeTab || $[30] !== contentShift || $[31] !== hasGrid || $[32] !== location || $[33] !== pickCamera || $[34] !== pickFile || $[35] !== pickGallery || $[36] !== runPicker) {
|
|
227
|
+
t14 = tab_0 => {
|
|
221
228
|
if (tab_0 === "file") {
|
|
222
|
-
return runPicker(
|
|
229
|
+
return runPicker(pickFile);
|
|
223
230
|
}
|
|
224
231
|
if (tab_0 === "camera") {
|
|
225
|
-
return runPicker(takePhoto);
|
|
232
|
+
return runPicker(pickCamera ?? takePhoto);
|
|
226
233
|
}
|
|
227
234
|
if (tab_0 === "gallery" && !hasGrid && activeTab === "gallery") {
|
|
228
|
-
return runPicker(
|
|
235
|
+
return runPicker(pickGallery);
|
|
229
236
|
}
|
|
230
237
|
if (tab_0 === activeTab) {
|
|
231
238
|
return;
|
|
@@ -237,38 +244,41 @@ export function AttachmentMenu(t0) {
|
|
|
237
244
|
fetchLocation();
|
|
238
245
|
}
|
|
239
246
|
};
|
|
240
|
-
$[
|
|
241
|
-
$[
|
|
242
|
-
$[
|
|
243
|
-
$[
|
|
244
|
-
$[
|
|
245
|
-
$[
|
|
247
|
+
$[29] = activeTab;
|
|
248
|
+
$[30] = contentShift;
|
|
249
|
+
$[31] = hasGrid;
|
|
250
|
+
$[32] = location;
|
|
251
|
+
$[33] = pickCamera;
|
|
252
|
+
$[34] = pickFile;
|
|
253
|
+
$[35] = pickGallery;
|
|
254
|
+
$[36] = runPicker;
|
|
255
|
+
$[37] = t14;
|
|
246
256
|
} else {
|
|
247
|
-
|
|
257
|
+
t14 = $[37];
|
|
248
258
|
}
|
|
249
|
-
const onTabPress =
|
|
250
|
-
let t14;
|
|
259
|
+
const onTabPress = t14;
|
|
251
260
|
let t15;
|
|
252
|
-
|
|
253
|
-
|
|
261
|
+
let t16;
|
|
262
|
+
if ($[38] !== activeTab || $[39] !== isMounted || $[40] !== location) {
|
|
263
|
+
t15 = () => {
|
|
254
264
|
if (isMounted && activeTab === "location" && location == null) {
|
|
255
265
|
fetchLocation();
|
|
256
266
|
}
|
|
257
267
|
};
|
|
258
|
-
|
|
259
|
-
$[
|
|
260
|
-
$[
|
|
261
|
-
$[
|
|
262
|
-
$[
|
|
263
|
-
$[
|
|
268
|
+
t16 = [isMounted, activeTab, location, fetchLocation];
|
|
269
|
+
$[38] = activeTab;
|
|
270
|
+
$[39] = isMounted;
|
|
271
|
+
$[40] = location;
|
|
272
|
+
$[41] = t15;
|
|
273
|
+
$[42] = t16;
|
|
264
274
|
} else {
|
|
265
|
-
|
|
266
|
-
|
|
275
|
+
t15 = $[41];
|
|
276
|
+
t16 = $[42];
|
|
267
277
|
}
|
|
268
|
-
useEffect(
|
|
269
|
-
let
|
|
270
|
-
if ($[
|
|
271
|
-
|
|
278
|
+
useEffect(t15, t16);
|
|
279
|
+
let t17;
|
|
280
|
+
if ($[43] !== closeThen || $[44] !== location || $[45] !== sendPicked) {
|
|
281
|
+
t17 = () => {
|
|
272
282
|
if (location && typeof location === "object" && location.status === "located") {
|
|
273
283
|
const picked_0 = {
|
|
274
284
|
type: "location",
|
|
@@ -283,42 +293,42 @@ export function AttachmentMenu(t0) {
|
|
|
283
293
|
fetchLocation();
|
|
284
294
|
}
|
|
285
295
|
};
|
|
286
|
-
$[
|
|
287
|
-
$[
|
|
288
|
-
$[
|
|
289
|
-
$[
|
|
296
|
+
$[43] = closeThen;
|
|
297
|
+
$[44] = location;
|
|
298
|
+
$[45] = sendPicked;
|
|
299
|
+
$[46] = t17;
|
|
290
300
|
} else {
|
|
291
|
-
|
|
301
|
+
t17 = $[46];
|
|
292
302
|
}
|
|
293
|
-
const sendLocation =
|
|
294
|
-
let
|
|
295
|
-
if ($[
|
|
296
|
-
|
|
303
|
+
const sendLocation = t17;
|
|
304
|
+
let t18;
|
|
305
|
+
if ($[47] === Symbol.for("react.memo_cache_sentinel")) {
|
|
306
|
+
t18 = asset => {
|
|
297
307
|
setSelected(previous => previous.some(item_0 => item_0.id === asset.id) ? previous.filter(item => item.id !== asset.id) : [...previous, asset]);
|
|
298
308
|
};
|
|
299
|
-
$[
|
|
309
|
+
$[47] = t18;
|
|
300
310
|
} else {
|
|
301
|
-
|
|
311
|
+
t18 = $[47];
|
|
302
312
|
}
|
|
303
|
-
const toggleAsset =
|
|
304
|
-
let
|
|
305
|
-
if ($[
|
|
306
|
-
|
|
313
|
+
const toggleAsset = t18;
|
|
314
|
+
let t19;
|
|
315
|
+
if ($[48] !== caption || $[49] !== closeThen || $[50] !== selected || $[51] !== sendPicked) {
|
|
316
|
+
t19 = () => {
|
|
307
317
|
const picks = selected;
|
|
308
318
|
const text = caption;
|
|
309
319
|
closeThen(() => {
|
|
310
320
|
Promise.all(picks.map(toPickedAttachment)).then(attachments_0 => sendPicked(attachments_0, text)).catch(_temp2);
|
|
311
321
|
});
|
|
312
322
|
};
|
|
313
|
-
$[
|
|
314
|
-
$[
|
|
315
|
-
$[
|
|
316
|
-
$[
|
|
317
|
-
$[
|
|
323
|
+
$[48] = caption;
|
|
324
|
+
$[49] = closeThen;
|
|
325
|
+
$[50] = selected;
|
|
326
|
+
$[51] = sendPicked;
|
|
327
|
+
$[52] = t19;
|
|
318
328
|
} else {
|
|
319
|
-
|
|
329
|
+
t19 = $[52];
|
|
320
330
|
}
|
|
321
|
-
const sendSelection =
|
|
331
|
+
const sendSelection = t19;
|
|
322
332
|
const keyboard = useReanimatedKeyboardAnimation();
|
|
323
333
|
const fallbackKeyboard = useSharedValue(0);
|
|
324
334
|
const keyboardHeight = keyboard?.height ?? fallbackKeyboard;
|
|
@@ -346,150 +356,152 @@ export function AttachmentMenu(t0) {
|
|
|
346
356
|
if (!isMounted) {
|
|
347
357
|
return null;
|
|
348
358
|
}
|
|
349
|
-
let t19;
|
|
350
|
-
if ($[49] !== dimStyle || $[50] !== styles.dim) {
|
|
351
|
-
t19 = <Animated.View style={[StyleSheet.absoluteFill, styles.dim, dimStyle]} pointerEvents="none" />;
|
|
352
|
-
$[49] = dimStyle;
|
|
353
|
-
$[50] = styles.dim;
|
|
354
|
-
$[51] = t19;
|
|
355
|
-
} else {
|
|
356
|
-
t19 = $[51];
|
|
357
|
-
}
|
|
358
359
|
let t20;
|
|
359
|
-
if ($[
|
|
360
|
-
t20 = [StyleSheet.absoluteFill,
|
|
361
|
-
$[
|
|
362
|
-
$[
|
|
360
|
+
if ($[53] !== dimStyle || $[54] !== styles.dim) {
|
|
361
|
+
t20 = <Animated.View style={[StyleSheet.absoluteFill, styles.dim, dimStyle]} pointerEvents="none" />;
|
|
362
|
+
$[53] = dimStyle;
|
|
363
|
+
$[54] = styles.dim;
|
|
364
|
+
$[55] = t20;
|
|
363
365
|
} else {
|
|
364
|
-
t20 = $[
|
|
366
|
+
t20 = $[55];
|
|
365
367
|
}
|
|
366
368
|
let t21;
|
|
367
|
-
if ($[
|
|
368
|
-
t21 =
|
|
369
|
-
$[
|
|
370
|
-
$[
|
|
369
|
+
if ($[56] !== sheetStyle) {
|
|
370
|
+
t21 = [StyleSheet.absoluteFill, sheetStyle];
|
|
371
|
+
$[56] = sheetStyle;
|
|
372
|
+
$[57] = t21;
|
|
371
373
|
} else {
|
|
372
|
-
t21 = $[
|
|
374
|
+
t21 = $[57];
|
|
373
375
|
}
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
};
|
|
380
|
-
$[56] = t22;
|
|
381
|
-
$[57] = t23;
|
|
376
|
+
let t22;
|
|
377
|
+
if ($[58] !== dismiss) {
|
|
378
|
+
t22 = <Pressable style={StyleSheet.absoluteFill} onPress={dismiss} accessibilityLabel="dismiss" />;
|
|
379
|
+
$[58] = dismiss;
|
|
380
|
+
$[59] = t22;
|
|
382
381
|
} else {
|
|
383
|
-
|
|
382
|
+
t22 = $[59];
|
|
384
383
|
}
|
|
384
|
+
const t23 = screenHeight + 100;
|
|
385
385
|
let t24;
|
|
386
|
-
if ($[
|
|
387
|
-
t24 =
|
|
388
|
-
|
|
389
|
-
|
|
386
|
+
if ($[60] !== t23) {
|
|
387
|
+
t24 = {
|
|
388
|
+
height: t23
|
|
389
|
+
};
|
|
390
390
|
$[60] = t23;
|
|
391
391
|
$[61] = t24;
|
|
392
392
|
} else {
|
|
393
393
|
t24 = $[61];
|
|
394
394
|
}
|
|
395
395
|
let t25;
|
|
396
|
-
if ($[62] !== styles.
|
|
397
|
-
t25 =
|
|
398
|
-
$[62] =
|
|
399
|
-
$[63] =
|
|
396
|
+
if ($[62] !== backgroundStyle || $[63] !== styles.background || $[64] !== t24) {
|
|
397
|
+
t25 = [styles.background, t24, backgroundStyle];
|
|
398
|
+
$[62] = backgroundStyle;
|
|
399
|
+
$[63] = styles.background;
|
|
400
|
+
$[64] = t24;
|
|
401
|
+
$[65] = t25;
|
|
400
402
|
} else {
|
|
401
|
-
t25 = $[
|
|
403
|
+
t25 = $[65];
|
|
402
404
|
}
|
|
403
405
|
let t26;
|
|
404
|
-
if ($[
|
|
405
|
-
t26 = <
|
|
406
|
-
$[
|
|
407
|
-
$[
|
|
408
|
-
$[66] = t26;
|
|
406
|
+
if ($[66] !== styles.handle) {
|
|
407
|
+
t26 = <View style={styles.handle} />;
|
|
408
|
+
$[66] = styles.handle;
|
|
409
|
+
$[67] = t26;
|
|
409
410
|
} else {
|
|
410
|
-
t26 = $[
|
|
411
|
+
t26 = $[67];
|
|
411
412
|
}
|
|
412
413
|
let t27;
|
|
413
|
-
if ($[
|
|
414
|
-
t27 =
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
$[67] = activeTab;
|
|
419
|
-
$[68] = bottomArea;
|
|
420
|
-
$[69] = cellSize;
|
|
421
|
-
$[70] = contentStyle;
|
|
422
|
-
$[71] = dismiss;
|
|
423
|
-
$[72] = fixedTop;
|
|
424
|
-
$[73] = gallery.assets;
|
|
425
|
-
$[74] = gallery.loadMore;
|
|
426
|
-
$[75] = gallery.status;
|
|
427
|
-
$[76] = hasGrid;
|
|
428
|
-
$[77] = isGridShown;
|
|
429
|
-
$[78] = location;
|
|
430
|
-
$[79] = runPicker;
|
|
431
|
-
$[80] = scrollHandler;
|
|
432
|
-
$[81] = selected;
|
|
433
|
-
$[82] = sendLocation;
|
|
434
|
-
$[83] = spacer;
|
|
435
|
-
$[84] = styles.panel;
|
|
436
|
-
$[85] = t27;
|
|
414
|
+
if ($[68] !== t25 || $[69] !== t26) {
|
|
415
|
+
t27 = <Animated.View style={t25} pointerEvents="none">{t26}</Animated.View>;
|
|
416
|
+
$[68] = t25;
|
|
417
|
+
$[69] = t26;
|
|
418
|
+
$[70] = t27;
|
|
437
419
|
} else {
|
|
438
|
-
t27 = $[
|
|
420
|
+
t27 = $[70];
|
|
439
421
|
}
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
|
|
443
|
-
|
|
444
|
-
|
|
445
|
-
|
|
446
|
-
$[
|
|
447
|
-
$[
|
|
448
|
-
$[
|
|
449
|
-
$[
|
|
450
|
-
$[
|
|
451
|
-
$[
|
|
422
|
+
let t28;
|
|
423
|
+
if ($[71] !== activeTab || $[72] !== bottomArea || $[73] !== cellSize || $[74] !== contentStyle || $[75] !== dismiss || $[76] !== fixedTop || $[77] !== gallery.assets || $[78] !== gallery.loadMore || $[79] !== gallery.status || $[80] !== hasGrid || $[81] !== isGridShown || $[82] !== location || $[83] !== pickCamera || $[84] !== pickers?.gallery || $[85] !== runPicker || $[86] !== scrollHandler || $[87] !== selected || $[88] !== sendLocation || $[89] !== spacer || $[90] !== styles.panel) {
|
|
424
|
+
t28 = isGridShown ? <Animated.View style={[StyleSheet.absoluteFill, contentStyle]} pointerEvents="box-none"><GalleryGrid assets={gallery.assets} selected={selected} cellSize={cellSize} spacer={spacer} bottomArea={bottomArea} onScroll={scrollHandler} onEndReached={gallery.loadMore} onDismiss={dismiss} onToggle={toggleAsset} runPicker={runPicker} pickCamera={pickCamera} /></Animated.View> : <Animated.View style={[styles.panel, {
|
|
425
|
+
top: fixedTop + HEADER,
|
|
426
|
+
height: PANEL_HEIGHT
|
|
427
|
+
}, contentStyle]}><TabPanel activeTab={activeTab} location={location} onSendLocation={sendLocation} hasGrid={hasGrid} galleryStatus={gallery.status} runPicker={runPicker} pickGallery={pickers?.gallery} /></Animated.View>;
|
|
428
|
+
$[71] = activeTab;
|
|
429
|
+
$[72] = bottomArea;
|
|
430
|
+
$[73] = cellSize;
|
|
431
|
+
$[74] = contentStyle;
|
|
432
|
+
$[75] = dismiss;
|
|
433
|
+
$[76] = fixedTop;
|
|
434
|
+
$[77] = gallery.assets;
|
|
435
|
+
$[78] = gallery.loadMore;
|
|
436
|
+
$[79] = gallery.status;
|
|
437
|
+
$[80] = hasGrid;
|
|
438
|
+
$[81] = isGridShown;
|
|
439
|
+
$[82] = location;
|
|
440
|
+
$[83] = pickCamera;
|
|
441
|
+
$[84] = pickers?.gallery;
|
|
442
|
+
$[85] = runPicker;
|
|
443
|
+
$[86] = scrollHandler;
|
|
444
|
+
$[87] = selected;
|
|
445
|
+
$[88] = sendLocation;
|
|
446
|
+
$[89] = spacer;
|
|
447
|
+
$[90] = styles.panel;
|
|
448
|
+
$[91] = t28;
|
|
452
449
|
} else {
|
|
453
|
-
|
|
450
|
+
t28 = $[91];
|
|
454
451
|
}
|
|
452
|
+
const t29 = selected.length > 0;
|
|
455
453
|
let t30;
|
|
456
|
-
if ($[
|
|
457
|
-
t30 =
|
|
458
|
-
$[
|
|
459
|
-
$[
|
|
460
|
-
$[
|
|
461
|
-
$[
|
|
462
|
-
$[
|
|
463
|
-
$[
|
|
464
|
-
$[
|
|
465
|
-
$[
|
|
454
|
+
if ($[92] !== activeTab || $[93] !== captionShown || $[94] !== insets.bottom || $[95] !== onTabPress || $[96] !== t29 || $[97] !== tabWidth || $[98] !== tabs) {
|
|
455
|
+
t30 = <TabBar tabs={tabs} activeTab={activeTab} tabWidth={tabWidth} bottomInset={insets.bottom} hasSelection={t29} captionShown={captionShown} onTabPress={onTabPress} />;
|
|
456
|
+
$[92] = activeTab;
|
|
457
|
+
$[93] = captionShown;
|
|
458
|
+
$[94] = insets.bottom;
|
|
459
|
+
$[95] = onTabPress;
|
|
460
|
+
$[96] = t29;
|
|
461
|
+
$[97] = tabWidth;
|
|
462
|
+
$[98] = tabs;
|
|
463
|
+
$[99] = t30;
|
|
466
464
|
} else {
|
|
467
|
-
t30 = $[
|
|
465
|
+
t30 = $[99];
|
|
468
466
|
}
|
|
469
467
|
let t31;
|
|
470
|
-
if ($[
|
|
471
|
-
t31 = <
|
|
472
|
-
$[
|
|
473
|
-
$[
|
|
474
|
-
$[
|
|
475
|
-
$[
|
|
476
|
-
$[
|
|
477
|
-
$[
|
|
478
|
-
$[
|
|
468
|
+
if ($[100] !== caption || $[101] !== captionShown || $[102] !== insets.bottom || $[103] !== isDark || $[104] !== keyboardHeight || $[105] !== selected.length || $[106] !== sendSelection) {
|
|
469
|
+
t31 = selected.length > 0 && <CaptionBar count={selected.length} caption={caption} onChangeCaption={setCaption} onSend={sendSelection} captionShown={captionShown} keyboardHeight={keyboardHeight} bottomInset={insets.bottom} isDark={isDark} />;
|
|
470
|
+
$[100] = caption;
|
|
471
|
+
$[101] = captionShown;
|
|
472
|
+
$[102] = insets.bottom;
|
|
473
|
+
$[103] = isDark;
|
|
474
|
+
$[104] = keyboardHeight;
|
|
475
|
+
$[105] = selected.length;
|
|
476
|
+
$[106] = sendSelection;
|
|
477
|
+
$[107] = t31;
|
|
479
478
|
} else {
|
|
480
|
-
t31 = $[
|
|
479
|
+
t31 = $[107];
|
|
481
480
|
}
|
|
482
481
|
let t32;
|
|
483
|
-
if ($[109] !==
|
|
484
|
-
t32 = <
|
|
485
|
-
$[
|
|
486
|
-
$[
|
|
487
|
-
$[
|
|
488
|
-
$[
|
|
482
|
+
if ($[108] !== t21 || $[109] !== t22 || $[110] !== t27 || $[111] !== t28 || $[112] !== t30 || $[113] !== t31) {
|
|
483
|
+
t32 = <Animated.View style={t21}>{t22}{t27}{t28}{t30}{t31}</Animated.View>;
|
|
484
|
+
$[108] = t21;
|
|
485
|
+
$[109] = t22;
|
|
486
|
+
$[110] = t27;
|
|
487
|
+
$[111] = t28;
|
|
488
|
+
$[112] = t30;
|
|
489
|
+
$[113] = t31;
|
|
490
|
+
$[114] = t32;
|
|
491
|
+
} else {
|
|
492
|
+
t32 = $[114];
|
|
493
|
+
}
|
|
494
|
+
let t33;
|
|
495
|
+
if ($[115] !== dismiss || $[116] !== t20 || $[117] !== t32) {
|
|
496
|
+
t33 = <Modal transparent={true} visible={true} animationType="none" onRequestClose={dismiss} statusBarTranslucent={true}>{t20}{t32}</Modal>;
|
|
497
|
+
$[115] = dismiss;
|
|
498
|
+
$[116] = t20;
|
|
499
|
+
$[117] = t32;
|
|
500
|
+
$[118] = t33;
|
|
489
501
|
} else {
|
|
490
|
-
|
|
502
|
+
t33 = $[118];
|
|
491
503
|
}
|
|
492
|
-
return
|
|
504
|
+
return t33;
|
|
493
505
|
}
|
|
494
506
|
function _temp2() {}
|
|
495
507
|
function _temp(reason) {
|