@kesha-antonov/react-native-chat 6.0.1 → 6.1.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.
Files changed (179) hide show
  1. package/README.md +36 -4
  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
package/lib/Chat/Chat.js CHANGED
@@ -1,9 +1,10 @@
1
1
  import { c as _c } from "react/compiler-runtime";
2
- import React, { createRef, useEffect, useMemo, useState } from 'react';
2
+ import React, { createRef, useEffect, useImperativeHandle, useMemo, useState } from 'react';
3
3
  import { View } from 'react-native';
4
4
  import { ChatContext } from '../ChatContext';
5
5
  import { createComposerPanelsStore } from '../components/composerPanels';
6
6
  import { MediaViewerHost } from '../components/mediaViewer/MediaViewerHost';
7
+ import { TextHighlightContext } from '../components/textHighlight';
7
8
  import { TEST_ID } from '../Constant';
8
9
  import stylesCommon from '../styles';
9
10
  import { renderComponentOrElement } from '../utils';
@@ -24,7 +25,7 @@ import { useMessageNavigation } from './useMessageNavigation';
24
25
  import { useOptionalPeerHints } from './useOptionalPeerHints';
25
26
  import { useIsGroupChat, useResolvedReactions } from './useResolvedReactions';
26
27
  export function Chat(props) {
27
- const $ = _c(128);
28
+ const $ = _c(138);
28
29
  const {
29
30
  messages: t0,
30
31
  initialText: t1,
@@ -155,62 +156,87 @@ export function Chat(props) {
155
156
  jumpToQuotedMessage,
156
157
  pageDownReturn
157
158
  } = useMessageNavigation(t10);
159
+ let t11;
160
+ let t12;
161
+ if ($[21] !== highlightStore || $[22] !== messagesContainerRef) {
162
+ t11 = () => ({
163
+ scrollToMessage: (messageId, options) => {
164
+ messagesContainerRef.current?.scrollToKey({
165
+ key: String(messageId),
166
+ animated: options?.animated ?? true,
167
+ viewPosition: options?.viewPosition ?? 0.5
168
+ });
169
+ if (options?.isHighlighted) {
170
+ highlightStore.highlight(messageId);
171
+ }
172
+ }
173
+ });
174
+ t12 = [messagesContainerRef, highlightStore];
175
+ $[21] = highlightStore;
176
+ $[22] = messagesContainerRef;
177
+ $[23] = t11;
178
+ $[24] = t12;
179
+ } else {
180
+ t11 = $[23];
181
+ t12 = $[24];
182
+ }
183
+ useImperativeHandle(props.chatRef, t11, t12);
158
184
  const isSwipeEnabled = isReplyEnabled && (reply?.swipe?.isEnabled ?? true);
159
- const t11 = reply?.onPress ?? jumpToQuotedMessage;
160
- const t12 = reply?.swipe;
161
- let t13;
162
- if ($[21] !== handleSwipeToReply || $[22] !== isSwipeEnabled || $[23] !== t12) {
163
- t13 = {
164
- ...t12,
185
+ const t13 = reply?.onPress ?? jumpToQuotedMessage;
186
+ const t14 = reply?.swipe;
187
+ let t15;
188
+ if ($[25] !== handleSwipeToReply || $[26] !== isSwipeEnabled || $[27] !== t14) {
189
+ t15 = {
190
+ ...t14,
165
191
  isEnabled: isSwipeEnabled,
166
192
  onSwipe: handleSwipeToReply
167
193
  };
168
- $[21] = handleSwipeToReply;
169
- $[22] = isSwipeEnabled;
170
- $[23] = t12;
171
- $[24] = t13;
194
+ $[25] = handleSwipeToReply;
195
+ $[26] = isSwipeEnabled;
196
+ $[27] = t14;
197
+ $[28] = t15;
172
198
  } else {
173
- t13 = $[24];
199
+ t15 = $[28];
174
200
  }
175
- let t14;
176
- if ($[25] !== reply || $[26] !== t11 || $[27] !== t13) {
177
- t14 = {
201
+ let t16;
202
+ if ($[29] !== reply || $[30] !== t13 || $[31] !== t15) {
203
+ t16 = {
178
204
  ...reply,
179
- onPress: t11,
180
- swipe: t13
205
+ onPress: t13,
206
+ swipe: t15
181
207
  };
182
- $[25] = reply;
183
- $[26] = t11;
184
- $[27] = t13;
185
- $[28] = t14;
208
+ $[29] = reply;
209
+ $[30] = t13;
210
+ $[31] = t15;
211
+ $[32] = t16;
186
212
  } else {
187
- t14 = $[28];
213
+ t16 = $[32];
188
214
  }
189
- const replyForList = t14;
215
+ const replyForList = t16;
190
216
  const userId = user?._id;
191
217
  const isGroupChat = useIsGroupChat(messages, userId, isGroupChatProp);
192
218
  const isAvatarVisible = isAvatarVisibleProp ?? (renderAvatar ? true : isGroupChat);
193
219
  const isUsernameVisible = isUsernameVisibleProp ?? isGroupChat;
194
- let t15;
195
- if ($[29] !== isGroupChat || $[30] !== messages || $[31] !== reactions || $[32] !== user) {
196
- t15 = {
220
+ let t17;
221
+ if ($[33] !== isGroupChat || $[34] !== messages || $[35] !== reactions || $[36] !== user) {
222
+ t17 = {
197
223
  reactions,
198
224
  messages,
199
225
  user,
200
226
  isGroupChat
201
227
  };
202
- $[29] = isGroupChat;
203
- $[30] = messages;
204
- $[31] = reactions;
205
- $[32] = user;
206
- $[33] = t15;
228
+ $[33] = isGroupChat;
229
+ $[34] = messages;
230
+ $[35] = reactions;
231
+ $[36] = user;
232
+ $[37] = t17;
207
233
  } else {
208
- t15 = $[33];
234
+ t17 = $[37];
209
235
  }
210
- const resolvedReactions = useResolvedReactions(t15);
211
- let t16;
212
- if ($[34] !== composerPanels || $[35] !== editStore || $[36] !== isReplyEnabled || $[37] !== props || $[38] !== resolvedLabels || $[39] !== selectionStore || $[40] !== startEdit || $[41] !== startReply || $[42] !== stopEdit || $[43] !== userId) {
213
- t16 = {
236
+ const resolvedReactions = useResolvedReactions(t17);
237
+ let t18;
238
+ if ($[38] !== composerPanels || $[39] !== editStore || $[40] !== isReplyEnabled || $[41] !== props || $[42] !== resolvedLabels || $[43] !== selectionStore || $[44] !== startEdit || $[45] !== startReply || $[46] !== stopEdit || $[47] !== userId) {
239
+ t18 = {
214
240
  props,
215
241
  userId,
216
242
  resolvedLabels,
@@ -222,19 +248,19 @@ export function Chat(props) {
222
248
  composerPanels,
223
249
  selectionStore
224
250
  };
225
- $[34] = composerPanels;
226
- $[35] = editStore;
227
- $[36] = isReplyEnabled;
228
- $[37] = props;
229
- $[38] = resolvedLabels;
230
- $[39] = selectionStore;
231
- $[40] = startEdit;
232
- $[41] = startReply;
233
- $[42] = stopEdit;
234
- $[43] = userId;
235
- $[44] = t16;
251
+ $[38] = composerPanels;
252
+ $[39] = editStore;
253
+ $[40] = isReplyEnabled;
254
+ $[41] = props;
255
+ $[42] = resolvedLabels;
256
+ $[43] = selectionStore;
257
+ $[44] = startEdit;
258
+ $[45] = startReply;
259
+ $[46] = stopEdit;
260
+ $[47] = userId;
261
+ $[48] = t18;
236
262
  } else {
237
- t16 = $[44];
263
+ t18 = $[48];
238
264
  }
239
265
  const {
240
266
  resolvedMessageActions,
@@ -243,222 +269,246 @@ export function Chat(props) {
243
269
  copySelection,
244
270
  forwardSelection,
245
271
  deleteSelection
246
- } = useMessageActions(t16);
247
- let t17;
248
- if ($[45] !== actionCallbacksRef || $[46] !== composer || $[47] !== messagesContainerRef || $[48] !== props || $[49] !== textInputRef) {
249
- t17 = {
272
+ } = useMessageActions(t18);
273
+ let t19;
274
+ if ($[49] !== actionCallbacksRef || $[50] !== composer || $[51] !== messagesContainerRef || $[52] !== props || $[53] !== textInputRef) {
275
+ t19 = {
250
276
  ...composer,
251
277
  props,
252
278
  textInputRef,
253
279
  messagesContainerRef,
254
280
  actionCallbacksRef
255
281
  };
256
- $[45] = actionCallbacksRef;
257
- $[46] = composer;
258
- $[47] = messagesContainerRef;
259
- $[48] = props;
260
- $[49] = textInputRef;
261
- $[50] = t17;
282
+ $[49] = actionCallbacksRef;
283
+ $[50] = composer;
284
+ $[51] = messagesContainerRef;
285
+ $[52] = props;
286
+ $[53] = textInputRef;
287
+ $[54] = t19;
262
288
  } else {
263
- t17 = $[50];
289
+ t19 = $[54];
264
290
  }
265
291
  const {
266
292
  inputToolbarFragment,
267
293
  sendGreeting,
268
294
  notifyInputTextReset
269
- } = useComposerHandlers(t17);
295
+ } = useComposerHandlers(t19);
270
296
  const [isListMounted, setIsListMounted] = useState(false);
271
- let t18;
272
- let t19;
273
- if ($[51] === Symbol.for("react.memo_cache_sentinel")) {
274
- t18 = () => {
297
+ let t20;
298
+ let t21;
299
+ if ($[55] === Symbol.for("react.memo_cache_sentinel")) {
300
+ t20 = () => {
275
301
  const frame = requestAnimationFrame(() => setIsListMounted(true));
276
302
  return () => cancelAnimationFrame(frame);
277
303
  };
278
- t19 = [];
279
- $[51] = t18;
280
- $[52] = t19;
304
+ t21 = [];
305
+ $[55] = t20;
306
+ $[56] = t21;
281
307
  } else {
282
- t18 = $[51];
283
- t19 = $[52];
308
+ t20 = $[55];
309
+ t21 = $[56];
284
310
  }
285
- useEffect(t18, t19);
311
+ useEffect(t20, t21);
286
312
  useOptionalPeerHints(props.audioRecording, props.videoRecording);
287
- let t20;
288
- if ($[53] !== composer.getTextFromProp || $[54] !== initialText || $[55] !== notifyInputTextReset || $[56] !== textStore) {
289
- t20 = {
313
+ let t22;
314
+ if ($[57] !== composer.getTextFromProp || $[58] !== initialText || $[59] !== notifyInputTextReset || $[60] !== textStore) {
315
+ t22 = {
290
316
  initialText,
291
317
  textStore,
292
318
  getTextFromProp: composer.getTextFromProp,
293
319
  notifyInputTextReset
294
320
  };
295
- $[53] = composer.getTextFromProp;
296
- $[54] = initialText;
297
- $[55] = notifyInputTextReset;
298
- $[56] = textStore;
299
- $[57] = t20;
321
+ $[57] = composer.getTextFromProp;
322
+ $[58] = initialText;
323
+ $[59] = notifyInputTextReset;
324
+ $[60] = textStore;
325
+ $[61] = t22;
300
326
  } else {
301
- t20 = $[57];
327
+ t22 = $[61];
302
328
  }
303
329
  const {
304
330
  isReady,
305
331
  keyboardOffsetRef,
306
332
  keyboardVerticalOffset,
307
333
  onInitialLayoutViewLayout
308
- } = useInitialLayout(t20);
334
+ } = useInitialLayout(t22);
309
335
  const isSelectionBarShown = isSelecting && renderSelectionBar !== null;
310
- let t21;
311
- if ($[58] !== resolvedTheme.colors.background) {
312
- t21 = [stylesCommon.fill, styles.contentContainer, {
313
- backgroundColor: resolvedTheme.colors.background
314
- }];
315
- $[58] = resolvedTheme.colors.background;
316
- $[59] = t21;
336
+ const highlightText = props.highlightText;
337
+ const highlightTextStyle = props.highlightTextStyle;
338
+ let t23;
339
+ if ($[62] !== highlightText || $[63] !== highlightTextStyle) {
340
+ t23 = highlightText?.trim() ? {
341
+ text: highlightText,
342
+ style: highlightTextStyle
343
+ } : null;
344
+ $[62] = highlightText;
345
+ $[63] = highlightTextStyle;
346
+ $[64] = t23;
317
347
  } else {
318
- t21 = $[59];
348
+ t23 = $[64];
319
349
  }
320
- let t22;
321
- if ($[60] !== isInverted || $[61] !== messages || $[62] !== renderWallpaper || $[63] !== resolvedTheme || $[64] !== userId) {
322
- t22 = <ChatBackground messages={messages} userId={userId} isInverted={isInverted} theme={resolvedTheme} renderWallpaper={renderWallpaper} />;
323
- $[60] = isInverted;
324
- $[61] = messages;
325
- $[62] = renderWallpaper;
326
- $[63] = resolvedTheme;
327
- $[64] = userId;
328
- $[65] = t22;
329
- } else {
330
- t22 = $[65];
331
- }
332
- const t23 = !isReady && styles.hidden;
350
+ const textHighlight = t23;
333
351
  let t24;
334
- if ($[66] !== t23) {
335
- t24 = [stylesCommon.fill, t23];
336
- $[66] = t23;
337
- $[67] = t24;
352
+ if ($[65] !== resolvedTheme.colors.background) {
353
+ t24 = [stylesCommon.fill, styles.contentContainer, {
354
+ backgroundColor: resolvedTheme.colors.background
355
+ }];
356
+ $[65] = resolvedTheme.colors.background;
357
+ $[66] = t24;
338
358
  } else {
339
- t24 = $[67];
359
+ t24 = $[66];
340
360
  }
341
361
  let t25;
342
- if ($[68] !== getSenderName || $[69] !== isAvatarVisible || $[70] !== isInverted || $[71] !== isListMounted || $[72] !== isUsernameVisible || $[73] !== messages || $[74] !== messagesContainerRef || $[75] !== pageDownReturn || $[76] !== props || $[77] !== replyForList || $[78] !== resolvedMessageActions || $[79] !== resolvedReactions || $[80] !== scrollToMessage || $[81] !== sendGreeting) {
343
- t25 = <ChatMessageList isMounted={isListMounted} chatProps={props} messages={messages} isInverted={isInverted} messagesContainerRef={messagesContainerRef} replyForList={replyForList} pageDownReturn={pageDownReturn} getSenderName={getSenderName} scrollToMessage={scrollToMessage} resolvedMessageActions={resolvedMessageActions} resolvedReactions={resolvedReactions} isAvatarVisible={isAvatarVisible} isUsernameVisible={isUsernameVisible} sendGreeting={sendGreeting} />;
344
- $[68] = getSenderName;
345
- $[69] = isAvatarVisible;
346
- $[70] = isInverted;
347
- $[71] = isListMounted;
348
- $[72] = isUsernameVisible;
349
- $[73] = messages;
350
- $[74] = messagesContainerRef;
351
- $[75] = pageDownReturn;
352
- $[76] = props;
353
- $[77] = replyForList;
354
- $[78] = resolvedMessageActions;
355
- $[79] = resolvedReactions;
356
- $[80] = scrollToMessage;
357
- $[81] = sendGreeting;
358
- $[82] = t25;
362
+ if ($[67] !== isInverted || $[68] !== messages || $[69] !== renderWallpaper || $[70] !== resolvedTheme || $[71] !== userId) {
363
+ t25 = <ChatBackground messages={messages} userId={userId} isInverted={isInverted} theme={resolvedTheme} renderWallpaper={renderWallpaper} />;
364
+ $[67] = isInverted;
365
+ $[68] = messages;
366
+ $[69] = renderWallpaper;
367
+ $[70] = resolvedTheme;
368
+ $[71] = userId;
369
+ $[72] = t25;
359
370
  } else {
360
- t25 = $[82];
371
+ t25 = $[72];
361
372
  }
362
- let t26;
363
- if ($[83] !== copySelection || $[84] !== deleteSelection || $[85] !== forwardSelection || $[86] !== hasClipboard || $[87] !== isSelectionBarShown || $[88] !== messages || $[89] !== renderSelectionBar || $[90] !== selectionStore) {
364
- t26 = isSelectionBarShown && <ChatSelectionBar store={selectionStore} messages={messages} canCopy={hasClipboard} onCopy={copySelection} onForward={forwardSelection} onDelete={deleteSelection} renderSelectionBar={renderSelectionBar} />;
365
- $[83] = copySelection;
366
- $[84] = deleteSelection;
367
- $[85] = forwardSelection;
368
- $[86] = hasClipboard;
369
- $[87] = isSelectionBarShown;
370
- $[88] = messages;
371
- $[89] = renderSelectionBar;
372
- $[90] = selectionStore;
373
- $[91] = t26;
373
+ const t26 = !isReady && styles.hidden;
374
+ let t27;
375
+ if ($[73] !== t26) {
376
+ t27 = [stylesCommon.fill, t26];
377
+ $[73] = t26;
378
+ $[74] = t27;
374
379
  } else {
375
- t26 = $[91];
380
+ t27 = $[74];
376
381
  }
377
- const t27 = isSelectionBarShown ? styles.composerAway : undefined;
378
382
  let t28;
379
- if ($[92] !== inputToolbarFragment || $[93] !== t27) {
380
- t28 = <View collapsable={false} style={t27}>{inputToolbarFragment}</View>;
381
- $[92] = inputToolbarFragment;
382
- $[93] = t27;
383
- $[94] = t28;
383
+ if ($[75] !== getSenderName || $[76] !== isAvatarVisible || $[77] !== isInverted || $[78] !== isListMounted || $[79] !== isUsernameVisible || $[80] !== messages || $[81] !== messagesContainerRef || $[82] !== pageDownReturn || $[83] !== props || $[84] !== replyForList || $[85] !== resolvedMessageActions || $[86] !== resolvedReactions || $[87] !== scrollToMessage || $[88] !== sendGreeting) {
384
+ t28 = <ChatMessageList isMounted={isListMounted} chatProps={props} messages={messages} isInverted={isInverted} messagesContainerRef={messagesContainerRef} replyForList={replyForList} pageDownReturn={pageDownReturn} getSenderName={getSenderName} scrollToMessage={scrollToMessage} resolvedMessageActions={resolvedMessageActions} resolvedReactions={resolvedReactions} isAvatarVisible={isAvatarVisible} isUsernameVisible={isUsernameVisible} sendGreeting={sendGreeting} />;
385
+ $[75] = getSenderName;
386
+ $[76] = isAvatarVisible;
387
+ $[77] = isInverted;
388
+ $[78] = isListMounted;
389
+ $[79] = isUsernameVisible;
390
+ $[80] = messages;
391
+ $[81] = messagesContainerRef;
392
+ $[82] = pageDownReturn;
393
+ $[83] = props;
394
+ $[84] = replyForList;
395
+ $[85] = resolvedMessageActions;
396
+ $[86] = resolvedReactions;
397
+ $[87] = scrollToMessage;
398
+ $[88] = sendGreeting;
399
+ $[89] = t28;
384
400
  } else {
385
- t28 = $[94];
401
+ t28 = $[89];
386
402
  }
387
403
  let t29;
388
- if ($[95] !== mediaGallery) {
389
- t29 = <MediaViewerHost gallery={mediaGallery} />;
390
- $[95] = mediaGallery;
391
- $[96] = t29;
392
- } else {
393
- t29 = $[96];
394
- }
395
- let t30;
396
- if ($[97] !== composerPanels || $[98] !== highlightStore || $[99] !== mediaController || $[100] !== mediaGallery || $[101] !== mediaTransferController || $[102] !== selectionStore || $[103] !== t25 || $[104] !== t26 || $[105] !== t28 || $[106] !== t29) {
397
- t30 = <ChatProviders mediaController={mediaController} mediaTransferController={mediaTransferController} highlightStore={highlightStore} selectionStore={selectionStore} composerPanels={composerPanels} mediaGallery={mediaGallery}>{t25}{t26}{t28}{t29}</ChatProviders>;
398
- $[97] = composerPanels;
399
- $[98] = highlightStore;
400
- $[99] = mediaController;
401
- $[100] = mediaGallery;
402
- $[101] = mediaTransferController;
403
- $[102] = selectionStore;
404
- $[103] = t25;
405
- $[104] = t26;
406
- $[105] = t28;
407
- $[106] = t29;
408
- $[107] = t30;
404
+ if ($[90] !== copySelection || $[91] !== deleteSelection || $[92] !== forwardSelection || $[93] !== hasClipboard || $[94] !== isSelectionBarShown || $[95] !== messages || $[96] !== renderSelectionBar || $[97] !== selectionStore) {
405
+ t29 = isSelectionBarShown && <ChatSelectionBar store={selectionStore} messages={messages} canCopy={hasClipboard} onCopy={copySelection} onForward={forwardSelection} onDelete={deleteSelection} renderSelectionBar={renderSelectionBar} />;
406
+ $[90] = copySelection;
407
+ $[91] = deleteSelection;
408
+ $[92] = forwardSelection;
409
+ $[93] = hasClipboard;
410
+ $[94] = isSelectionBarShown;
411
+ $[95] = messages;
412
+ $[96] = renderSelectionBar;
413
+ $[97] = selectionStore;
414
+ $[98] = t29;
409
415
  } else {
410
- t30 = $[107];
416
+ t29 = $[98];
411
417
  }
418
+ const t30 = isSelectionBarShown ? styles.composerAway : undefined;
412
419
  let t31;
413
- if ($[108] !== t24 || $[109] !== t30) {
414
- t31 = <View testID={TEST_ID.CONTENT} collapsable={false} style={t24}>{t30}</View>;
415
- $[108] = t24;
416
- $[109] = t30;
417
- $[110] = t31;
420
+ if ($[99] !== inputToolbarFragment || $[100] !== t30) {
421
+ t31 = <View collapsable={false} style={t30}>{inputToolbarFragment}</View>;
422
+ $[99] = inputToolbarFragment;
423
+ $[100] = t30;
424
+ $[101] = t31;
418
425
  } else {
419
- t31 = $[110];
426
+ t31 = $[101];
420
427
  }
421
428
  let t32;
422
- if ($[111] !== isReady || $[112] !== renderLoading) {
423
- t32 = !isReady && renderComponentOrElement(renderLoading, {});
424
- $[111] = isReady;
425
- $[112] = renderLoading;
426
- $[113] = t32;
429
+ if ($[102] !== mediaGallery) {
430
+ t32 = <MediaViewerHost gallery={mediaGallery} />;
431
+ $[102] = mediaGallery;
432
+ $[103] = t32;
427
433
  } else {
428
- t32 = $[113];
434
+ t32 = $[103];
429
435
  }
430
436
  let t33;
431
- if ($[114] !== keyboardVerticalOffset || $[115] !== props.keyboardAvoidingViewProps || $[116] !== t31 || $[117] !== t32) {
432
- t33 = <ChatKeyboardAvoidingView keyboardVerticalOffset={keyboardVerticalOffset} keyboardAvoidingViewProps={props.keyboardAvoidingViewProps}>{t31}{t32}</ChatKeyboardAvoidingView>;
433
- $[114] = keyboardVerticalOffset;
434
- $[115] = props.keyboardAvoidingViewProps;
435
- $[116] = t31;
436
- $[117] = t32;
437
- $[118] = t33;
437
+ if ($[104] !== composerPanels || $[105] !== highlightStore || $[106] !== mediaController || $[107] !== mediaGallery || $[108] !== mediaTransferController || $[109] !== selectionStore || $[110] !== t28 || $[111] !== t29 || $[112] !== t31 || $[113] !== t32) {
438
+ t33 = <ChatProviders mediaController={mediaController} mediaTransferController={mediaTransferController} highlightStore={highlightStore} selectionStore={selectionStore} composerPanels={composerPanels} mediaGallery={mediaGallery}>{t28}{t29}{t31}{t32}</ChatProviders>;
439
+ $[104] = composerPanels;
440
+ $[105] = highlightStore;
441
+ $[106] = mediaController;
442
+ $[107] = mediaGallery;
443
+ $[108] = mediaTransferController;
444
+ $[109] = selectionStore;
445
+ $[110] = t28;
446
+ $[111] = t29;
447
+ $[112] = t31;
448
+ $[113] = t32;
449
+ $[114] = t33;
438
450
  } else {
439
- t33 = $[118];
451
+ t33 = $[114];
440
452
  }
441
453
  let t34;
442
- if ($[119] !== keyboardOffsetRef || $[120] !== onInitialLayoutViewLayout || $[121] !== t21 || $[122] !== t22 || $[123] !== t33) {
443
- t34 = <View testID={TEST_ID.WRAPPER} ref={keyboardOffsetRef} style={t21} onLayout={onInitialLayoutViewLayout}>{t22}{t33}</View>;
444
- $[119] = keyboardOffsetRef;
445
- $[120] = onInitialLayoutViewLayout;
446
- $[121] = t21;
447
- $[122] = t22;
448
- $[123] = t33;
449
- $[124] = t34;
454
+ if ($[115] !== t27 || $[116] !== t33) {
455
+ t34 = <View testID={TEST_ID.CONTENT} collapsable={false} style={t27}>{t33}</View>;
456
+ $[115] = t27;
457
+ $[116] = t33;
458
+ $[117] = t34;
450
459
  } else {
451
- t34 = $[124];
460
+ t34 = $[117];
452
461
  }
453
462
  let t35;
454
- if ($[125] !== contextValues || $[126] !== t34) {
455
- t35 = <ChatContext.Provider value={contextValues}>{t34}</ChatContext.Provider>;
456
- $[125] = contextValues;
457
- $[126] = t34;
458
- $[127] = t35;
463
+ if ($[118] !== isReady || $[119] !== renderLoading) {
464
+ t35 = !isReady && renderComponentOrElement(renderLoading, {});
465
+ $[118] = isReady;
466
+ $[119] = renderLoading;
467
+ $[120] = t35;
468
+ } else {
469
+ t35 = $[120];
470
+ }
471
+ let t36;
472
+ if ($[121] !== keyboardVerticalOffset || $[122] !== props.keyboardAvoidingViewProps || $[123] !== t34 || $[124] !== t35) {
473
+ t36 = <ChatKeyboardAvoidingView keyboardVerticalOffset={keyboardVerticalOffset} keyboardAvoidingViewProps={props.keyboardAvoidingViewProps}>{t34}{t35}</ChatKeyboardAvoidingView>;
474
+ $[121] = keyboardVerticalOffset;
475
+ $[122] = props.keyboardAvoidingViewProps;
476
+ $[123] = t34;
477
+ $[124] = t35;
478
+ $[125] = t36;
479
+ } else {
480
+ t36 = $[125];
481
+ }
482
+ let t37;
483
+ if ($[126] !== keyboardOffsetRef || $[127] !== onInitialLayoutViewLayout || $[128] !== t24 || $[129] !== t25 || $[130] !== t36) {
484
+ t37 = <View testID={TEST_ID.WRAPPER} ref={keyboardOffsetRef} style={t24} onLayout={onInitialLayoutViewLayout}>{t25}{t36}</View>;
485
+ $[126] = keyboardOffsetRef;
486
+ $[127] = onInitialLayoutViewLayout;
487
+ $[128] = t24;
488
+ $[129] = t25;
489
+ $[130] = t36;
490
+ $[131] = t37;
491
+ } else {
492
+ t37 = $[131];
493
+ }
494
+ let t38;
495
+ if ($[132] !== t37 || $[133] !== textHighlight) {
496
+ t38 = <TextHighlightContext.Provider value={textHighlight}>{t37}</TextHighlightContext.Provider>;
497
+ $[132] = t37;
498
+ $[133] = textHighlight;
499
+ $[134] = t38;
500
+ } else {
501
+ t38 = $[134];
502
+ }
503
+ let t39;
504
+ if ($[135] !== contextValues || $[136] !== t38) {
505
+ t39 = <ChatContext.Provider value={contextValues}>{t38}</ChatContext.Provider>;
506
+ $[135] = contextValues;
507
+ $[136] = t38;
508
+ $[137] = t39;
459
509
  } else {
460
- t35 = $[127];
510
+ t39 = $[137];
461
511
  }
462
- return t35;
512
+ return t39;
463
513
  }
464
514
  //# sourceMappingURL=Chat.js.map