@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.
Files changed (179) hide show
  1. package/README.md +28 -5
  2. package/lib/Actions.d.ts.map +1 -1
  3. package/lib/Actions.js +33 -27
  4. package/lib/Actions.js.map +1 -1
  5. package/lib/Chat/Chat.d.ts.map +1 -1
  6. package/lib/Chat/Chat.js +253 -203
  7. package/lib/Chat/Chat.js.map +1 -1
  8. package/lib/Chat/ChatMessageList.d.ts.map +1 -1
  9. package/lib/Chat/ChatMessageList.js +4 -0
  10. package/lib/Chat/ChatMessageList.js.map +1 -1
  11. package/lib/Chat/index.d.ts +9 -1
  12. package/lib/Chat/index.d.ts.map +1 -1
  13. package/lib/Chat/index.js +14 -1
  14. package/lib/Chat/index.js.map +1 -1
  15. package/lib/Chat/types.d.ts +29 -0
  16. package/lib/Chat/types.d.ts.map +1 -1
  17. package/lib/Chat/types.js.map +1 -1
  18. package/lib/Chat/useMessageActions.d.ts +1 -0
  19. package/lib/Chat/useMessageActions.d.ts.map +1 -1
  20. package/lib/Chat/useMessageActions.js +97 -89
  21. package/lib/Chat/useMessageActions.js.map +1 -1
  22. package/lib/ChatHeader.d.ts +50 -0
  23. package/lib/ChatHeader.d.ts.map +1 -0
  24. package/lib/ChatHeader.js +356 -0
  25. package/lib/ChatHeader.js.map +1 -0
  26. package/lib/ChatList/ChatListCell.d.ts +1 -1
  27. package/lib/ChatList/ChatListCell.d.ts.map +1 -1
  28. package/lib/ChatList/ChatListCell.js +42 -11
  29. package/lib/ChatList/ChatListCell.js.map +1 -1
  30. package/lib/ChatList/index.js +332 -323
  31. package/lib/ChatList/index.js.map +1 -1
  32. package/lib/ChatList/types.d.ts +17 -1
  33. package/lib/ChatList/types.d.ts.map +1 -1
  34. package/lib/ChatList/types.js.map +1 -1
  35. package/lib/ChatList/utils.d.ts +4 -1
  36. package/lib/ChatList/utils.d.ts.map +1 -1
  37. package/lib/ChatList/utils.js +3 -2
  38. package/lib/ChatList/utils.js.map +1 -1
  39. package/lib/Composer.js +5 -1
  40. package/lib/Composer.js.map +1 -1
  41. package/lib/InputToolbar/fragments.d.ts +1 -1
  42. package/lib/InputToolbar/fragments.d.ts.map +1 -1
  43. package/lib/InputToolbar/fragments.js +9 -7
  44. package/lib/InputToolbar/fragments.js.map +1 -1
  45. package/lib/InputToolbar/index.d.ts.map +1 -1
  46. package/lib/InputToolbar/index.js +3 -2
  47. package/lib/InputToolbar/index.js.map +1 -1
  48. package/lib/InputToolbar/types.d.ts +6 -0
  49. package/lib/InputToolbar/types.d.ts.map +1 -1
  50. package/lib/InputToolbar/types.js.map +1 -1
  51. package/lib/InputToolbar/useActionsFragment.d.ts.map +1 -1
  52. package/lib/InputToolbar/useActionsFragment.js +83 -59
  53. package/lib/InputToolbar/useActionsFragment.js.map +1 -1
  54. package/lib/InputToolbar/useKeyboardInset.d.ts +1 -1
  55. package/lib/InputToolbar/useKeyboardInset.d.ts.map +1 -1
  56. package/lib/InputToolbar/useKeyboardInset.js +2 -2
  57. package/lib/InputToolbar/useKeyboardInset.js.map +1 -1
  58. package/lib/MessageText.d.ts.map +1 -1
  59. package/lib/MessageText.js +39 -33
  60. package/lib/MessageText.js.map +1 -1
  61. package/lib/MessagesContainer/index.d.ts.map +1 -1
  62. package/lib/MessagesContainer/index.js +113 -94
  63. package/lib/MessagesContainer/index.js.map +1 -1
  64. package/lib/MessagesContainer/types.d.ts +5 -2
  65. package/lib/MessagesContainer/types.d.ts.map +1 -1
  66. package/lib/MessagesContainer/types.js.map +1 -1
  67. package/lib/MessagesContainer/useChained.d.ts +6 -0
  68. package/lib/MessagesContainer/useChained.d.ts.map +1 -0
  69. package/lib/MessagesContainer/useChained.js +38 -0
  70. package/lib/MessagesContainer/useChained.js.map +1 -0
  71. package/lib/MessagesContainer/useListChrome.d.ts.map +1 -1
  72. package/lib/MessagesContainer/useListChrome.js +1 -1
  73. package/lib/MessagesContainer/useListChrome.js.map +1 -1
  74. package/lib/Models.d.ts +2 -1
  75. package/lib/Models.d.ts.map +1 -1
  76. package/lib/Models.js.map +1 -1
  77. package/lib/Send.d.ts.map +1 -1
  78. package/lib/Send.js +18 -13
  79. package/lib/Send.js.map +1 -1
  80. package/lib/Theme.d.ts +11 -0
  81. package/lib/Theme.d.ts.map +1 -1
  82. package/lib/Theme.js +17 -1
  83. package/lib/Theme.js.map +1 -1
  84. package/lib/attachments/AttachmentButton.js +17 -15
  85. package/lib/attachments/AttachmentButton.js.map +1 -1
  86. package/lib/attachments/AttachmentMenu/GalleryGrid.d.ts +3 -1
  87. package/lib/attachments/AttachmentMenu/GalleryGrid.d.ts.map +1 -1
  88. package/lib/attachments/AttachmentMenu/GalleryGrid.js +69 -68
  89. package/lib/attachments/AttachmentMenu/GalleryGrid.js.map +1 -1
  90. package/lib/attachments/AttachmentMenu/TabPanel.d.ts +3 -1
  91. package/lib/attachments/AttachmentMenu/TabPanel.d.ts.map +1 -1
  92. package/lib/attachments/AttachmentMenu/TabPanel.js +23 -21
  93. package/lib/attachments/AttachmentMenu/TabPanel.js.map +1 -1
  94. package/lib/attachments/AttachmentMenu/index.d.ts +6 -2
  95. package/lib/attachments/AttachmentMenu/index.d.ts.map +1 -1
  96. package/lib/attachments/AttachmentMenu/index.js +259 -247
  97. package/lib/attachments/AttachmentMenu/index.js.map +1 -1
  98. package/lib/attachments/buildMessages.d.ts +4 -4
  99. package/lib/attachments/buildMessages.d.ts.map +1 -1
  100. package/lib/attachments/buildMessages.js +9 -8
  101. package/lib/attachments/buildMessages.js.map +1 -1
  102. package/lib/attachments/types.d.ts +19 -0
  103. package/lib/attachments/types.d.ts.map +1 -1
  104. package/lib/attachments/types.js.map +1 -1
  105. package/lib/components/TouchableOpacity.d.ts +5 -0
  106. package/lib/components/TouchableOpacity.d.ts.map +1 -1
  107. package/lib/components/TouchableOpacity.js +59 -54
  108. package/lib/components/TouchableOpacity.js.map +1 -1
  109. package/lib/components/defaultMessageActions.d.ts +3 -1
  110. package/lib/components/defaultMessageActions.d.ts.map +1 -1
  111. package/lib/components/defaultMessageActions.js +9 -1
  112. package/lib/components/defaultMessageActions.js.map +1 -1
  113. package/lib/components/textHighlight.d.ts +14 -0
  114. package/lib/components/textHighlight.d.ts.map +1 -0
  115. package/lib/components/textHighlight.js +39 -0
  116. package/lib/components/textHighlight.js.map +1 -0
  117. package/lib/hooks/useKeyboardVerticalOffset.d.ts +6 -0
  118. package/lib/hooks/useKeyboardVerticalOffset.d.ts.map +1 -1
  119. package/lib/hooks/useKeyboardVerticalOffset.js +35 -13
  120. package/lib/hooks/useKeyboardVerticalOffset.js.map +1 -1
  121. package/lib/i18n.d.ts +2 -0
  122. package/lib/i18n.d.ts.map +1 -1
  123. package/lib/i18n.js +1 -0
  124. package/lib/i18n.js.map +1 -1
  125. package/lib/index.d.ts +3 -1
  126. package/lib/index.d.ts.map +1 -1
  127. package/lib/index.js +1 -0
  128. package/lib/index.js.map +1 -1
  129. package/lib/linkParser.d.ts +4 -1
  130. package/lib/linkParser.d.ts.map +1 -1
  131. package/lib/linkParser.js +115 -78
  132. package/lib/linkParser.js.map +1 -1
  133. package/lib/locales/ar.d.ts.map +1 -1
  134. package/lib/locales/ar.js +1 -0
  135. package/lib/locales/ar.js.map +1 -1
  136. package/lib/locales/de.d.ts.map +1 -1
  137. package/lib/locales/de.js +1 -0
  138. package/lib/locales/de.js.map +1 -1
  139. package/lib/locales/es.d.ts.map +1 -1
  140. package/lib/locales/es.js +1 -0
  141. package/lib/locales/es.js.map +1 -1
  142. package/lib/locales/fr.d.ts.map +1 -1
  143. package/lib/locales/fr.js +1 -0
  144. package/lib/locales/fr.js.map +1 -1
  145. package/lib/locales/hi.d.ts.map +1 -1
  146. package/lib/locales/hi.js +1 -0
  147. package/lib/locales/hi.js.map +1 -1
  148. package/lib/locales/id.d.ts.map +1 -1
  149. package/lib/locales/id.js +1 -0
  150. package/lib/locales/id.js.map +1 -1
  151. package/lib/locales/it.d.ts.map +1 -1
  152. package/lib/locales/it.js +1 -0
  153. package/lib/locales/it.js.map +1 -1
  154. package/lib/locales/ja.d.ts.map +1 -1
  155. package/lib/locales/ja.js +1 -0
  156. package/lib/locales/ja.js.map +1 -1
  157. package/lib/locales/ko.d.ts.map +1 -1
  158. package/lib/locales/ko.js +1 -0
  159. package/lib/locales/ko.js.map +1 -1
  160. package/lib/locales/nl.d.ts.map +1 -1
  161. package/lib/locales/nl.js +1 -0
  162. package/lib/locales/nl.js.map +1 -1
  163. package/lib/locales/pl.d.ts.map +1 -1
  164. package/lib/locales/pl.js +1 -0
  165. package/lib/locales/pl.js.map +1 -1
  166. package/lib/locales/pt.d.ts.map +1 -1
  167. package/lib/locales/pt.js +1 -0
  168. package/lib/locales/pt.js.map +1 -1
  169. package/lib/locales/ru.d.ts.map +1 -1
  170. package/lib/locales/ru.js +1 -0
  171. package/lib/locales/ru.js.map +1 -1
  172. package/lib/locales/tr.d.ts.map +1 -1
  173. package/lib/locales/tr.js +1 -0
  174. package/lib/locales/tr.js.map +1 -1
  175. package/lib/locales/zh.d.ts.map +1 -1
  176. package/lib/locales/zh.js +1 -0
  177. package/lib/locales/zh.js.map +1 -1
  178. package/llms.txt +1 -1
  179. 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(113);
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 t1;
41
- if ($[0] !== tabs) {
42
- t1 = tabs.includes("gallery") && hasMediaLibrary();
43
- $[0] = tabs;
44
- $[1] = t1;
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
- t1 = $[1];
53
+ t2 = $[2];
47
54
  }
48
- const hasGrid = t1;
49
- let t2;
50
- if ($[2] !== hasGrid || $[3] !== tabs) {
51
- let t3;
52
- if ($[5] !== hasGrid) {
53
- t3 = tab => tab === "gallery" && hasGrid || tab === "location" || tab === "gallery";
54
- $[5] = hasGrid;
55
- $[6] = t3;
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
- t3 = $[6];
64
+ t4 = $[7];
58
65
  }
59
- t2 = tabs.filter(t3);
60
- $[2] = hasGrid;
61
- $[3] = tabs;
62
- $[4] = t2;
66
+ t3 = tabs.filter(t4);
67
+ $[3] = hasGrid;
68
+ $[4] = tabs;
69
+ $[5] = t3;
63
70
  } else {
64
- t2 = $[4];
71
+ t3 = $[5];
65
72
  }
66
- const contentTabs = t2;
73
+ const contentTabs = t3;
67
74
  const initialTab = contentTabs[0] ?? tabs[0] ?? "gallery";
68
75
  const [activeTab, setActiveTab] = useState(initialTab);
69
- let t3;
70
- if ($[7] === Symbol.for("react.memo_cache_sentinel")) {
71
- t3 = [];
72
- $[7] = t3;
76
+ let t4;
77
+ if ($[8] === Symbol.for("react.memo_cache_sentinel")) {
78
+ t4 = [];
79
+ $[8] = t4;
73
80
  } else {
74
- t3 = $[7];
81
+ t4 = $[8];
75
82
  }
76
- const [selected, setSelected] = useState(t3);
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
- if ($[8] !== gridMode || $[9] !== isGridShown) {
110
- t4 = () => {
115
+ let t6;
116
+ if ($[9] !== gridMode || $[10] !== isGridShown) {
117
+ t5 = () => {
111
118
  gridMode.set(withTiming(isGridShown ? 1 : 0, CLOSE));
112
119
  };
113
- t5 = [isGridShown, gridMode];
114
- $[8] = gridMode;
115
- $[9] = isGridShown;
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(t4, t5);
123
- let t6;
129
+ useEffect(t5, t6);
124
130
  let t7;
125
- if ($[12] !== captionShown || $[13] !== selected.length) {
126
- t6 = () => {
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
- t7 = [selected.length, captionShown];
134
- $[12] = captionShown;
135
- $[13] = selected.length;
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(t6, t7);
143
- let t8;
144
- if ($[16] !== close || $[17] !== onClose) {
145
- t8 = () => close(onClose);
146
- $[16] = close;
147
- $[17] = onClose;
148
- $[18] = t8;
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
- t8 = $[18];
157
+ t9 = $[19];
151
158
  }
152
- const dismiss = t8;
153
- let t9;
154
- if ($[19] !== close || $[20] !== onClose) {
155
- t9 = action => {
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
- $[19] = close;
162
- $[20] = onClose;
163
- $[21] = t9;
168
+ $[20] = close;
169
+ $[21] = onClose;
170
+ $[22] = t10;
164
171
  } else {
165
- t9 = $[21];
172
+ t10 = $[22];
166
173
  }
167
- const closeThen = t9;
168
- let t10;
169
- if ($[22] !== onSend) {
170
- t10 = (attachments, t11) => {
171
- const withCaption = t11 === undefined ? "" : t11;
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
- $[22] = onSend;
177
- $[23] = t10;
183
+ $[23] = onSend;
184
+ $[24] = t11;
178
185
  } else {
179
- t10 = $[23];
186
+ t11 = $[24];
180
187
  }
181
- const sendPicked = t10;
188
+ const sendPicked = t11;
182
189
  const isPickingRef = useRef(false);
183
- let t11;
184
- if ($[24] !== closeThen || $[25] !== sendPicked) {
185
- t11 = picker => {
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
- $[24] = closeThen;
199
- $[25] = sendPicked;
200
- $[26] = t11;
205
+ $[25] = closeThen;
206
+ $[26] = sendPicked;
207
+ $[27] = t12;
201
208
  } else {
202
- t11 = $[26];
209
+ t12 = $[27];
203
210
  }
204
- const runPicker = t11;
205
- let t12;
206
- if ($[27] === Symbol.for("react.memo_cache_sentinel")) {
207
- t12 = () => {
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
- $[27] = t12;
220
+ $[28] = t13;
214
221
  } else {
215
- t12 = $[27];
222
+ t13 = $[28];
216
223
  }
217
- const fetchLocation = t12;
218
- let t13;
219
- if ($[28] !== activeTab || $[29] !== contentShift || $[30] !== hasGrid || $[31] !== location || $[32] !== runPicker) {
220
- t13 = tab_0 => {
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(pickDocuments);
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(pickFromSystemGallery);
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
- $[28] = activeTab;
241
- $[29] = contentShift;
242
- $[30] = hasGrid;
243
- $[31] = location;
244
- $[32] = runPicker;
245
- $[33] = t13;
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
- t13 = $[33];
257
+ t14 = $[37];
248
258
  }
249
- const onTabPress = t13;
250
- let t14;
259
+ const onTabPress = t14;
251
260
  let t15;
252
- if ($[34] !== activeTab || $[35] !== isMounted || $[36] !== location) {
253
- t14 = () => {
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
- t15 = [isMounted, activeTab, location, fetchLocation];
259
- $[34] = activeTab;
260
- $[35] = isMounted;
261
- $[36] = location;
262
- $[37] = t14;
263
- $[38] = t15;
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
- t14 = $[37];
266
- t15 = $[38];
275
+ t15 = $[41];
276
+ t16 = $[42];
267
277
  }
268
- useEffect(t14, t15);
269
- let t16;
270
- if ($[39] !== closeThen || $[40] !== location || $[41] !== sendPicked) {
271
- t16 = () => {
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
- $[39] = closeThen;
287
- $[40] = location;
288
- $[41] = sendPicked;
289
- $[42] = t16;
296
+ $[43] = closeThen;
297
+ $[44] = location;
298
+ $[45] = sendPicked;
299
+ $[46] = t17;
290
300
  } else {
291
- t16 = $[42];
301
+ t17 = $[46];
292
302
  }
293
- const sendLocation = t16;
294
- let t17;
295
- if ($[43] === Symbol.for("react.memo_cache_sentinel")) {
296
- t17 = asset => {
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
- $[43] = t17;
309
+ $[47] = t18;
300
310
  } else {
301
- t17 = $[43];
311
+ t18 = $[47];
302
312
  }
303
- const toggleAsset = t17;
304
- let t18;
305
- if ($[44] !== caption || $[45] !== closeThen || $[46] !== selected || $[47] !== sendPicked) {
306
- t18 = () => {
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
- $[44] = caption;
314
- $[45] = closeThen;
315
- $[46] = selected;
316
- $[47] = sendPicked;
317
- $[48] = t18;
323
+ $[48] = caption;
324
+ $[49] = closeThen;
325
+ $[50] = selected;
326
+ $[51] = sendPicked;
327
+ $[52] = t19;
318
328
  } else {
319
- t18 = $[48];
329
+ t19 = $[52];
320
330
  }
321
- const sendSelection = t18;
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 ($[52] !== sheetStyle) {
360
- t20 = [StyleSheet.absoluteFill, sheetStyle];
361
- $[52] = sheetStyle;
362
- $[53] = t20;
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 = $[53];
366
+ t20 = $[55];
365
367
  }
366
368
  let t21;
367
- if ($[54] !== dismiss) {
368
- t21 = <Pressable style={StyleSheet.absoluteFill} onPress={dismiss} accessibilityLabel="dismiss" />;
369
- $[54] = dismiss;
370
- $[55] = t21;
369
+ if ($[56] !== sheetStyle) {
370
+ t21 = [StyleSheet.absoluteFill, sheetStyle];
371
+ $[56] = sheetStyle;
372
+ $[57] = t21;
371
373
  } else {
372
- t21 = $[55];
374
+ t21 = $[57];
373
375
  }
374
- const t22 = screenHeight + 100;
375
- let t23;
376
- if ($[56] !== t22) {
377
- t23 = {
378
- height: t22
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
- t23 = $[57];
382
+ t22 = $[59];
384
383
  }
384
+ const t23 = screenHeight + 100;
385
385
  let t24;
386
- if ($[58] !== backgroundStyle || $[59] !== styles.background || $[60] !== t23) {
387
- t24 = [styles.background, t23, backgroundStyle];
388
- $[58] = backgroundStyle;
389
- $[59] = styles.background;
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.handle) {
397
- t25 = <View style={styles.handle} />;
398
- $[62] = styles.handle;
399
- $[63] = t25;
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 = $[63];
403
+ t25 = $[65];
402
404
  }
403
405
  let t26;
404
- if ($[64] !== t24 || $[65] !== t25) {
405
- t26 = <Animated.View style={t24} pointerEvents="none">{t25}</Animated.View>;
406
- $[64] = t24;
407
- $[65] = t25;
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 = $[66];
411
+ t26 = $[67];
411
412
  }
412
413
  let t27;
413
- if ($[67] !== activeTab || $[68] !== bottomArea || $[69] !== cellSize || $[70] !== contentStyle || $[71] !== dismiss || $[72] !== fixedTop || $[73] !== gallery.assets || $[74] !== gallery.loadMore || $[75] !== gallery.status || $[76] !== hasGrid || $[77] !== isGridShown || $[78] !== location || $[79] !== runPicker || $[80] !== scrollHandler || $[81] !== selected || $[82] !== sendLocation || $[83] !== spacer || $[84] !== styles.panel) {
414
- t27 = 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} /></Animated.View> : <Animated.View style={[styles.panel, {
415
- top: fixedTop + HEADER,
416
- height: PANEL_HEIGHT
417
- }, contentStyle]}><TabPanel activeTab={activeTab} location={location} onSendLocation={sendLocation} hasGrid={hasGrid} galleryStatus={gallery.status} runPicker={runPicker} /></Animated.View>;
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 = $[85];
420
+ t27 = $[70];
439
421
  }
440
- const t28 = selected.length > 0;
441
- let t29;
442
- if ($[86] !== activeTab || $[87] !== captionShown || $[88] !== insets.bottom || $[89] !== onTabPress || $[90] !== t28 || $[91] !== tabWidth || $[92] !== tabs) {
443
- t29 = <TabBar tabs={tabs} activeTab={activeTab} tabWidth={tabWidth} bottomInset={insets.bottom} hasSelection={t28} captionShown={captionShown} onTabPress={onTabPress} />;
444
- $[86] = activeTab;
445
- $[87] = captionShown;
446
- $[88] = insets.bottom;
447
- $[89] = onTabPress;
448
- $[90] = t28;
449
- $[91] = tabWidth;
450
- $[92] = tabs;
451
- $[93] = t29;
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
- t29 = $[93];
450
+ t28 = $[91];
454
451
  }
452
+ const t29 = selected.length > 0;
455
453
  let t30;
456
- if ($[94] !== caption || $[95] !== captionShown || $[96] !== insets.bottom || $[97] !== isDark || $[98] !== keyboardHeight || $[99] !== selected.length || $[100] !== sendSelection) {
457
- t30 = selected.length > 0 && <CaptionBar count={selected.length} caption={caption} onChangeCaption={setCaption} onSend={sendSelection} captionShown={captionShown} keyboardHeight={keyboardHeight} bottomInset={insets.bottom} isDark={isDark} />;
458
- $[94] = caption;
459
- $[95] = captionShown;
460
- $[96] = insets.bottom;
461
- $[97] = isDark;
462
- $[98] = keyboardHeight;
463
- $[99] = selected.length;
464
- $[100] = sendSelection;
465
- $[101] = t30;
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 = $[101];
465
+ t30 = $[99];
468
466
  }
469
467
  let t31;
470
- if ($[102] !== t20 || $[103] !== t21 || $[104] !== t26 || $[105] !== t27 || $[106] !== t29 || $[107] !== t30) {
471
- t31 = <Animated.View style={t20}>{t21}{t26}{t27}{t29}{t30}</Animated.View>;
472
- $[102] = t20;
473
- $[103] = t21;
474
- $[104] = t26;
475
- $[105] = t27;
476
- $[106] = t29;
477
- $[107] = t30;
478
- $[108] = t31;
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 = $[108];
479
+ t31 = $[107];
481
480
  }
482
481
  let t32;
483
- if ($[109] !== dismiss || $[110] !== t19 || $[111] !== t31) {
484
- t32 = <Modal transparent={true} visible={true} animationType="none" onRequestClose={dismiss} statusBarTranslucent={true}>{t19}{t31}</Modal>;
485
- $[109] = dismiss;
486
- $[110] = t19;
487
- $[111] = t31;
488
- $[112] = t32;
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
- t32 = $[112];
502
+ t33 = $[118];
491
503
  }
492
- return t32;
504
+ return t33;
493
505
  }
494
506
  function _temp2() {}
495
507
  function _temp(reason) {