stream-chat-react-native-core 5.15.1-beta.1 → 5.15.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 (685) hide show
  1. package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
  2. package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
  3. package/lib/commonjs/components/Attachment/AudioAttachment.js.map +1 -1
  4. package/lib/commonjs/components/Attachment/Card.js.map +1 -1
  5. package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
  6. package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
  7. package/lib/commonjs/components/Attachment/FileIcon.js.map +1 -1
  8. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  9. package/lib/commonjs/components/Attachment/GalleryImage.js.map +1 -1
  10. package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
  11. package/lib/commonjs/components/Attachment/ImageLoadingFailedIndicator.js.map +1 -1
  12. package/lib/commonjs/components/Attachment/ImageLoadingIndicator.js.map +1 -1
  13. package/lib/commonjs/components/Attachment/ImageReloadIndicator.js.map +1 -1
  14. package/lib/commonjs/components/Attachment/VideoThumbnail.js.map +1 -1
  15. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
  16. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
  17. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
  18. package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -1
  19. package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -1
  20. package/lib/commonjs/components/Attachment/utils/openUrlSafely.js.map +1 -1
  21. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  22. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js.map +1 -1
  23. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerError.js.map +1 -1
  24. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerErrorImage.js.map +1 -1
  25. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +14 -16
  26. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
  27. package/lib/commonjs/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +1 -1
  28. package/lib/commonjs/components/AttachmentPicker/components/CameraSelectorIcon.js.map +1 -1
  29. package/lib/commonjs/components/AttachmentPicker/components/FileSelectorIcon.js.map +1 -1
  30. package/lib/commonjs/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js.map +1 -1
  31. package/lib/commonjs/components/AttachmentPicker/components/ImageSelectorIcon.js.map +1 -1
  32. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  33. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
  34. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
  35. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
  36. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  37. package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
  38. package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
  39. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  40. package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
  41. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  42. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  43. package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
  44. package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
  45. package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
  46. package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
  47. package/lib/commonjs/components/Channel/hooks/useTargetedMessage.js.map +1 -1
  48. package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
  49. package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
  50. package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
  51. package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
  52. package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
  53. package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
  54. package/lib/commonjs/components/ChannelList/Skeleton.js.map +1 -1
  55. package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
  56. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
  57. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
  58. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
  59. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
  60. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
  61. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
  62. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
  63. package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
  64. package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
  65. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  66. package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
  67. package/lib/commonjs/components/ChannelList/utils.js.map +1 -1
  68. package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
  69. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
  70. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  71. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  72. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
  73. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  74. package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
  75. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  76. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
  77. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  78. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
  79. package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  80. package/lib/commonjs/components/Chat/Chat.js.map +1 -1
  81. package/lib/commonjs/components/Chat/hooks/useAppSettings.js.map +1 -1
  82. package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
  83. package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
  84. package/lib/commonjs/components/Chat/hooks/useMutedUsers.js.map +1 -1
  85. package/lib/commonjs/components/Chat/hooks/useSyncDatabase.js.map +1 -1
  86. package/lib/commonjs/components/ImageBackground.js.map +1 -1
  87. package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
  88. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
  89. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
  90. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  91. package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
  92. package/lib/commonjs/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
  93. package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
  94. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
  95. package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
  96. package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
  97. package/lib/commonjs/components/Indicators/EmptyStateIndicator.js.map +1 -1
  98. package/lib/commonjs/components/Indicators/LoadingDot.js.map +1 -1
  99. package/lib/commonjs/components/Indicators/LoadingDots.js.map +1 -1
  100. package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js.map +1 -1
  101. package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
  102. package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
  103. package/lib/commonjs/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js.map +1 -1
  104. package/lib/commonjs/components/Message/Message.js.map +1 -1
  105. package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
  106. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
  107. package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
  108. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  109. package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
  110. package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
  111. package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
  112. package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
  113. package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
  114. package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
  115. package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
  116. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
  117. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  118. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js.map +1 -1
  119. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  120. package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
  121. package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
  122. package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
  123. package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
  124. package/lib/commonjs/components/MessageInput/CooldownTimer.js.map +1 -1
  125. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  126. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
  127. package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
  128. package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
  129. package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
  130. package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
  131. package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -1
  132. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  133. package/lib/commonjs/components/MessageInput/UploadProgressIndicator.js.map +1 -1
  134. package/lib/commonjs/components/MessageInput/components/InputEditingStateHeader.js.map +1 -1
  135. package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js.map +1 -1
  136. package/lib/commonjs/components/MessageInput/components/InputReplyStateHeader.js.map +1 -1
  137. package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -1
  138. package/lib/commonjs/components/MessageList/DateHeader.js.map +1 -1
  139. package/lib/commonjs/components/MessageList/InlineDateSeparator.js.map +1 -1
  140. package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
  141. package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
  142. package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
  143. package/lib/commonjs/components/MessageList/InlineUnreadIndicator.js.map +1 -1
  144. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  145. package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
  146. package/lib/commonjs/components/MessageList/NetworkDownIndicator.js.map +1 -1
  147. package/lib/commonjs/components/MessageList/ScrollToBottomButton.js.map +1 -1
  148. package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
  149. package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js.map +1 -1
  150. package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
  151. package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
  152. package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
  153. package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
  154. package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
  155. package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -1
  156. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
  157. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
  158. package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +1 -1
  159. package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
  160. package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
  161. package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -1
  162. package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -1
  163. package/lib/commonjs/components/ProgressControl/ProgressControl.js.map +1 -1
  164. package/lib/commonjs/components/RTLComponents/WritingDirectionAwareText.js.map +1 -1
  165. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  166. package/lib/commonjs/components/Spinner/Spinner.js.map +1 -1
  167. package/lib/commonjs/components/Thread/Thread.js.map +1 -1
  168. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  169. package/lib/commonjs/components/docs/data.js.map +1 -1
  170. package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
  171. package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
  172. package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
  173. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
  174. package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
  175. package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
  176. package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
  177. package/lib/commonjs/contexts/debugContext/DebugContext.js.map +1 -1
  178. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  179. package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
  180. package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
  181. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  182. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  183. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  184. package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
  185. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -1
  186. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -1
  187. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  188. package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
  189. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
  190. package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -1
  191. package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
  192. package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
  193. package/lib/commonjs/contexts/themeContext/ThemeContext.js.map +1 -1
  194. package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
  195. package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
  196. package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
  197. package/lib/commonjs/emoji-data/compile.js.map +1 -1
  198. package/lib/commonjs/emoji-data/index.js.map +1 -1
  199. package/lib/commonjs/hooks/useAppStateListener.js.map +1 -1
  200. package/lib/commonjs/hooks/useIsMountedRef.js.map +1 -1
  201. package/lib/commonjs/hooks/useLoadingImage.js.map +1 -1
  202. package/lib/commonjs/hooks/useStreami18n.js.map +1 -1
  203. package/lib/commonjs/hooks/useTranslatedMessage.js.map +1 -1
  204. package/lib/commonjs/icons/ArrowRight.js.map +1 -1
  205. package/lib/commonjs/icons/AtMentions.js.map +1 -1
  206. package/lib/commonjs/icons/Attach.js.map +1 -1
  207. package/lib/commonjs/icons/Audio.js.map +1 -1
  208. package/lib/commonjs/icons/CSV.js.map +1 -1
  209. package/lib/commonjs/icons/Camera.js.map +1 -1
  210. package/lib/commonjs/icons/Check.js.map +1 -1
  211. package/lib/commonjs/icons/CheckAll.js.map +1 -1
  212. package/lib/commonjs/icons/CheckSend.js.map +1 -1
  213. package/lib/commonjs/icons/CircleClose.js.map +1 -1
  214. package/lib/commonjs/icons/CirclePlus.js.map +1 -1
  215. package/lib/commonjs/icons/CircleRight.js.map +1 -1
  216. package/lib/commonjs/icons/Close.js.map +1 -1
  217. package/lib/commonjs/icons/Copy.js.map +1 -1
  218. package/lib/commonjs/icons/CurveLineLeftUp.js.map +1 -1
  219. package/lib/commonjs/icons/DOC.js.map +1 -1
  220. package/lib/commonjs/icons/DOCX.js.map +1 -1
  221. package/lib/commonjs/icons/Delete.js.map +1 -1
  222. package/lib/commonjs/icons/Down.js.map +1 -1
  223. package/lib/commonjs/icons/DownloadArrow.js.map +1 -1
  224. package/lib/commonjs/icons/DownloadCloud.js.map +1 -1
  225. package/lib/commonjs/icons/Edit.js.map +1 -1
  226. package/lib/commonjs/icons/Error.js.map +1 -1
  227. package/lib/commonjs/icons/Eye.js.map +1 -1
  228. package/lib/commonjs/icons/Flag.js.map +1 -1
  229. package/lib/commonjs/icons/Folder.js.map +1 -1
  230. package/lib/commonjs/icons/GenericFile.js.map +1 -1
  231. package/lib/commonjs/icons/GiphyIcon.js.map +1 -1
  232. package/lib/commonjs/icons/Grid.js.map +1 -1
  233. package/lib/commonjs/icons/Group.js.map +1 -1
  234. package/lib/commonjs/icons/HTML.js.map +1 -1
  235. package/lib/commonjs/icons/Imgur.js.map +1 -1
  236. package/lib/commonjs/icons/LOLReaction.js.map +1 -1
  237. package/lib/commonjs/icons/Lightning.js.map +1 -1
  238. package/lib/commonjs/icons/Link.js.map +1 -1
  239. package/lib/commonjs/icons/Loading.js.map +1 -1
  240. package/lib/commonjs/icons/Logo.js.map +1 -1
  241. package/lib/commonjs/icons/LoveReaction.js.map +1 -1
  242. package/lib/commonjs/icons/MD.js.map +1 -1
  243. package/lib/commonjs/icons/MailOpen.js.map +1 -1
  244. package/lib/commonjs/icons/MenuPointHorizontal.js.map +1 -1
  245. package/lib/commonjs/icons/MenuPointVertical.js.map +1 -1
  246. package/lib/commonjs/icons/MessageFlag.js.map +1 -1
  247. package/lib/commonjs/icons/MessageIcon.js.map +1 -1
  248. package/lib/commonjs/icons/Mute.js.map +1 -1
  249. package/lib/commonjs/icons/Notification.js.map +1 -1
  250. package/lib/commonjs/icons/ODT.js.map +1 -1
  251. package/lib/commonjs/icons/PDF.js.map +1 -1
  252. package/lib/commonjs/icons/PPT.js.map +1 -1
  253. package/lib/commonjs/icons/PPTX.js.map +1 -1
  254. package/lib/commonjs/icons/Pause.js.map +1 -1
  255. package/lib/commonjs/icons/Picture.js.map +1 -1
  256. package/lib/commonjs/icons/Pin.js.map +1 -1
  257. package/lib/commonjs/icons/PinHeader.js.map +1 -1
  258. package/lib/commonjs/icons/Play.js.map +1 -1
  259. package/lib/commonjs/icons/RAR.js.map +1 -1
  260. package/lib/commonjs/icons/RTF.js.map +1 -1
  261. package/lib/commonjs/icons/Recorder.js.map +1 -1
  262. package/lib/commonjs/icons/Refresh.js.map +1 -1
  263. package/lib/commonjs/icons/SEVEN_Z.js.map +1 -1
  264. package/lib/commonjs/icons/Search.js.map +1 -1
  265. package/lib/commonjs/icons/SendRight.js.map +1 -1
  266. package/lib/commonjs/icons/SendUp.js.map +1 -1
  267. package/lib/commonjs/icons/Share.js.map +1 -1
  268. package/lib/commonjs/icons/ShareRightArrow.js.map +1 -1
  269. package/lib/commonjs/icons/Smile.js.map +1 -1
  270. package/lib/commonjs/icons/Sound.js.map +1 -1
  271. package/lib/commonjs/icons/TAR.js.map +1 -1
  272. package/lib/commonjs/icons/TXT.js.map +1 -1
  273. package/lib/commonjs/icons/ThreadReply.js.map +1 -1
  274. package/lib/commonjs/icons/ThumbsDownReaction.js.map +1 -1
  275. package/lib/commonjs/icons/ThumbsUpReaction.js.map +1 -1
  276. package/lib/commonjs/icons/Time.js.map +1 -1
  277. package/lib/commonjs/icons/Unknown.js.map +1 -1
  278. package/lib/commonjs/icons/Unpin.js.map +1 -1
  279. package/lib/commonjs/icons/User.js.map +1 -1
  280. package/lib/commonjs/icons/UserAdd.js.map +1 -1
  281. package/lib/commonjs/icons/UserAdmin.js.map +1 -1
  282. package/lib/commonjs/icons/UserDelete.js.map +1 -1
  283. package/lib/commonjs/icons/UserMinus.js.map +1 -1
  284. package/lib/commonjs/icons/Video.js.map +1 -1
  285. package/lib/commonjs/icons/Warning.js.map +1 -1
  286. package/lib/commonjs/icons/WutReaction.js.map +1 -1
  287. package/lib/commonjs/icons/XLS.js.map +1 -1
  288. package/lib/commonjs/icons/XLSX.js.map +1 -1
  289. package/lib/commonjs/icons/ZIP.js.map +1 -1
  290. package/lib/commonjs/icons/utils/base.js.map +1 -1
  291. package/lib/commonjs/init.js.map +1 -1
  292. package/lib/commonjs/mock-builders/DB/mock.js.map +1 -1
  293. package/lib/commonjs/mock-builders/api/deleteMessage.js.map +1 -1
  294. package/lib/commonjs/mock-builders/api/deleteReaction.js.map +1 -1
  295. package/lib/commonjs/mock-builders/api/sendMessage.js.map +1 -1
  296. package/lib/commonjs/mock-builders/api/sendReaction.js.map +1 -1
  297. package/lib/commonjs/mock-builders/api/useMockedApis.js.map +1 -1
  298. package/lib/commonjs/mock-builders/event/messageRead.js.map +1 -1
  299. package/lib/commonjs/mock-builders/generator/attachment.js.map +1 -1
  300. package/lib/commonjs/mock-builders/generator/channel.js.map +1 -1
  301. package/lib/commonjs/mock-builders/generator/member.js.map +1 -1
  302. package/lib/commonjs/mock-builders/generator/message.js.map +1 -1
  303. package/lib/commonjs/mock-builders/generator/reaction.js.map +1 -1
  304. package/lib/commonjs/mock-builders/generator/user.js.map +1 -1
  305. package/lib/commonjs/mock-builders/mock.js.map +1 -1
  306. package/lib/commonjs/native.js.map +1 -1
  307. package/lib/commonjs/store/QuickSqliteClient.js.map +1 -1
  308. package/lib/commonjs/store/apis/deleteReactions.js.map +1 -1
  309. package/lib/commonjs/store/apis/getAllChannelIds.js.map +1 -1
  310. package/lib/commonjs/store/apis/getAppSettings.js.map +1 -1
  311. package/lib/commonjs/store/apis/getChannelMessages.js.map +1 -1
  312. package/lib/commonjs/store/apis/getLastSyncedAt.js.map +1 -1
  313. package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
  314. package/lib/commonjs/store/apis/queries/selectChannels.js.map +1 -1
  315. package/lib/commonjs/store/apis/queries/selectMembersForChannels.js.map +1 -1
  316. package/lib/commonjs/store/apis/queries/selectMessagesForChannels.js.map +1 -1
  317. package/lib/commonjs/store/apis/queries/selectReactionsForMessages.js.map +1 -1
  318. package/lib/commonjs/store/apis/queries/selectReadsForChannels.js.map +1 -1
  319. package/lib/commonjs/store/apis/updateMessage.js.map +1 -1
  320. package/lib/commonjs/store/apis/updateReaction.js.map +1 -1
  321. package/lib/commonjs/store/apis/upsertChannels.js.map +1 -1
  322. package/lib/commonjs/store/apis/upsertMembers.js.map +1 -1
  323. package/lib/commonjs/store/apis/upsertReads.js.map +1 -1
  324. package/lib/commonjs/store/apis/utils/convertFilterSortToQuery.js.map +1 -1
  325. package/lib/commonjs/store/mappers/mapDateTimeToStorable.js.map +1 -1
  326. package/lib/commonjs/store/mappers/mapTaskToStorable.js.map +1 -1
  327. package/lib/commonjs/store/sqlite-utils/appendOrderByClause.js.map +1 -1
  328. package/lib/commonjs/store/sqlite-utils/appendWhereCluase.js.map +1 -1
  329. package/lib/commonjs/store/sqlite-utils/createCreateTableQuery.js.map +1 -1
  330. package/lib/commonjs/test-utils/BetterSqlite.js.map +1 -1
  331. package/lib/commonjs/types/types.js.map +1 -1
  332. package/lib/commonjs/utils/DBSyncManager.js.map +1 -1
  333. package/lib/commonjs/utils/Streami18n.js.map +1 -1
  334. package/lib/commonjs/utils/addReactionToLocalState.js.map +1 -1
  335. package/lib/commonjs/utils/date.js.map +1 -1
  336. package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -1
  337. package/lib/commonjs/utils/patchMessageTextCommand.js.map +1 -1
  338. package/lib/commonjs/utils/removeReactionFromLocalState.js.map +1 -1
  339. package/lib/commonjs/utils/utils.js.map +1 -1
  340. package/lib/commonjs/version.json +1 -1
  341. package/lib/module/components/Attachment/Attachment.js.map +1 -1
  342. package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
  343. package/lib/module/components/Attachment/AudioAttachment.js.map +1 -1
  344. package/lib/module/components/Attachment/Card.js.map +1 -1
  345. package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
  346. package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
  347. package/lib/module/components/Attachment/FileIcon.js.map +1 -1
  348. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  349. package/lib/module/components/Attachment/GalleryImage.js.map +1 -1
  350. package/lib/module/components/Attachment/Giphy.js.map +1 -1
  351. package/lib/module/components/Attachment/ImageLoadingFailedIndicator.js.map +1 -1
  352. package/lib/module/components/Attachment/ImageLoadingIndicator.js.map +1 -1
  353. package/lib/module/components/Attachment/ImageReloadIndicator.js.map +1 -1
  354. package/lib/module/components/Attachment/VideoThumbnail.js.map +1 -1
  355. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
  356. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
  357. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
  358. package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -1
  359. package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -1
  360. package/lib/module/components/Attachment/utils/openUrlSafely.js.map +1 -1
  361. package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  362. package/lib/module/components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.js.map +1 -1
  363. package/lib/module/components/AttachmentPicker/components/AttachmentPickerError.js.map +1 -1
  364. package/lib/module/components/AttachmentPicker/components/AttachmentPickerErrorImage.js.map +1 -1
  365. package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +14 -16
  366. package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
  367. package/lib/module/components/AttachmentPicker/components/AttachmentSelectionBar.js.map +1 -1
  368. package/lib/module/components/AttachmentPicker/components/CameraSelectorIcon.js.map +1 -1
  369. package/lib/module/components/AttachmentPicker/components/FileSelectorIcon.js.map +1 -1
  370. package/lib/module/components/AttachmentPicker/components/ImageOverlaySelectedComponent.js.map +1 -1
  371. package/lib/module/components/AttachmentPicker/components/ImageSelectorIcon.js.map +1 -1
  372. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  373. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
  374. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
  375. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
  376. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  377. package/lib/module/components/Avatar/Avatar.js.map +1 -1
  378. package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
  379. package/lib/module/components/Channel/Channel.js.map +1 -1
  380. package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
  381. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  382. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  383. package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
  384. package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
  385. package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
  386. package/lib/module/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
  387. package/lib/module/components/Channel/hooks/useTargetedMessage.js.map +1 -1
  388. package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
  389. package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
  390. package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
  391. package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
  392. package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
  393. package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
  394. package/lib/module/components/ChannelList/Skeleton.js.map +1 -1
  395. package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
  396. package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
  397. package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
  398. package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
  399. package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
  400. package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
  401. package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
  402. package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
  403. package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
  404. package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
  405. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  406. package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
  407. package/lib/module/components/ChannelList/utils.js.map +1 -1
  408. package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
  409. package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
  410. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  411. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  412. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
  413. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  414. package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
  415. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  416. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
  417. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  418. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
  419. package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  420. package/lib/module/components/Chat/Chat.js.map +1 -1
  421. package/lib/module/components/Chat/hooks/useAppSettings.js.map +1 -1
  422. package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
  423. package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
  424. package/lib/module/components/Chat/hooks/useMutedUsers.js.map +1 -1
  425. package/lib/module/components/Chat/hooks/useSyncDatabase.js.map +1 -1
  426. package/lib/module/components/ImageBackground.js.map +1 -1
  427. package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
  428. package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
  429. package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
  430. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  431. package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
  432. package/lib/module/components/ImageGallery/components/ImageGalleryOverlay.js.map +1 -1
  433. package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
  434. package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
  435. package/lib/module/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
  436. package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
  437. package/lib/module/components/Indicators/EmptyStateIndicator.js.map +1 -1
  438. package/lib/module/components/Indicators/LoadingDot.js.map +1 -1
  439. package/lib/module/components/Indicators/LoadingDots.js.map +1 -1
  440. package/lib/module/components/Indicators/LoadingErrorIndicator.js.map +1 -1
  441. package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
  442. package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleView.js.map +1 -1
  443. package/lib/module/components/KeyboardCompatibleView/KeyboardCompatibleViewFC.js.map +1 -1
  444. package/lib/module/components/Message/Message.js.map +1 -1
  445. package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
  446. package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
  447. package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
  448. package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  449. package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
  450. package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
  451. package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
  452. package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
  453. package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
  454. package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
  455. package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
  456. package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
  457. package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  458. package/lib/module/components/Message/MessageSimple/utils/renderText.test.js.map +1 -1
  459. package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  460. package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
  461. package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
  462. package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
  463. package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
  464. package/lib/module/components/MessageInput/CooldownTimer.js.map +1 -1
  465. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  466. package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
  467. package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
  468. package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
  469. package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
  470. package/lib/module/components/MessageInput/SendButton.js.map +1 -1
  471. package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -1
  472. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  473. package/lib/module/components/MessageInput/UploadProgressIndicator.js.map +1 -1
  474. package/lib/module/components/MessageInput/components/InputEditingStateHeader.js.map +1 -1
  475. package/lib/module/components/MessageInput/components/InputGiphySearch.js.map +1 -1
  476. package/lib/module/components/MessageInput/components/InputReplyStateHeader.js.map +1 -1
  477. package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -1
  478. package/lib/module/components/MessageList/DateHeader.js.map +1 -1
  479. package/lib/module/components/MessageList/InlineDateSeparator.js.map +1 -1
  480. package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
  481. package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
  482. package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
  483. package/lib/module/components/MessageList/InlineUnreadIndicator.js.map +1 -1
  484. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  485. package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
  486. package/lib/module/components/MessageList/NetworkDownIndicator.js.map +1 -1
  487. package/lib/module/components/MessageList/ScrollToBottomButton.js.map +1 -1
  488. package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
  489. package/lib/module/components/MessageList/TypingIndicatorContainer.js.map +1 -1
  490. package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
  491. package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
  492. package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
  493. package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
  494. package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
  495. package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -1
  496. package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
  497. package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
  498. package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +1 -1
  499. package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
  500. package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
  501. package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -1
  502. package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -1
  503. package/lib/module/components/ProgressControl/ProgressControl.js.map +1 -1
  504. package/lib/module/components/RTLComponents/WritingDirectionAwareText.js.map +1 -1
  505. package/lib/module/components/Reply/Reply.js.map +1 -1
  506. package/lib/module/components/Spinner/Spinner.js.map +1 -1
  507. package/lib/module/components/Thread/Thread.js.map +1 -1
  508. package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  509. package/lib/module/components/docs/data.js.map +1 -1
  510. package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
  511. package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
  512. package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
  513. package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
  514. package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
  515. package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
  516. package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
  517. package/lib/module/contexts/debugContext/DebugContext.js.map +1 -1
  518. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  519. package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
  520. package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
  521. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  522. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  523. package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  524. package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
  525. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -1
  526. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -1
  527. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  528. package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
  529. package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
  530. package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -1
  531. package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
  532. package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
  533. package/lib/module/contexts/themeContext/ThemeContext.js.map +1 -1
  534. package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
  535. package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
  536. package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
  537. package/lib/module/emoji-data/compile.js.map +1 -1
  538. package/lib/module/emoji-data/index.js.map +1 -1
  539. package/lib/module/hooks/useAppStateListener.js.map +1 -1
  540. package/lib/module/hooks/useIsMountedRef.js.map +1 -1
  541. package/lib/module/hooks/useLoadingImage.js.map +1 -1
  542. package/lib/module/hooks/useStreami18n.js.map +1 -1
  543. package/lib/module/hooks/useTranslatedMessage.js.map +1 -1
  544. package/lib/module/icons/ArrowRight.js.map +1 -1
  545. package/lib/module/icons/AtMentions.js.map +1 -1
  546. package/lib/module/icons/Attach.js.map +1 -1
  547. package/lib/module/icons/Audio.js.map +1 -1
  548. package/lib/module/icons/CSV.js.map +1 -1
  549. package/lib/module/icons/Camera.js.map +1 -1
  550. package/lib/module/icons/Check.js.map +1 -1
  551. package/lib/module/icons/CheckAll.js.map +1 -1
  552. package/lib/module/icons/CheckSend.js.map +1 -1
  553. package/lib/module/icons/CircleClose.js.map +1 -1
  554. package/lib/module/icons/CirclePlus.js.map +1 -1
  555. package/lib/module/icons/CircleRight.js.map +1 -1
  556. package/lib/module/icons/Close.js.map +1 -1
  557. package/lib/module/icons/Copy.js.map +1 -1
  558. package/lib/module/icons/CurveLineLeftUp.js.map +1 -1
  559. package/lib/module/icons/DOC.js.map +1 -1
  560. package/lib/module/icons/DOCX.js.map +1 -1
  561. package/lib/module/icons/Delete.js.map +1 -1
  562. package/lib/module/icons/Down.js.map +1 -1
  563. package/lib/module/icons/DownloadArrow.js.map +1 -1
  564. package/lib/module/icons/DownloadCloud.js.map +1 -1
  565. package/lib/module/icons/Edit.js.map +1 -1
  566. package/lib/module/icons/Error.js.map +1 -1
  567. package/lib/module/icons/Eye.js.map +1 -1
  568. package/lib/module/icons/Flag.js.map +1 -1
  569. package/lib/module/icons/Folder.js.map +1 -1
  570. package/lib/module/icons/GenericFile.js.map +1 -1
  571. package/lib/module/icons/GiphyIcon.js.map +1 -1
  572. package/lib/module/icons/Grid.js.map +1 -1
  573. package/lib/module/icons/Group.js.map +1 -1
  574. package/lib/module/icons/HTML.js.map +1 -1
  575. package/lib/module/icons/Imgur.js.map +1 -1
  576. package/lib/module/icons/LOLReaction.js.map +1 -1
  577. package/lib/module/icons/Lightning.js.map +1 -1
  578. package/lib/module/icons/Link.js.map +1 -1
  579. package/lib/module/icons/Loading.js.map +1 -1
  580. package/lib/module/icons/Logo.js.map +1 -1
  581. package/lib/module/icons/LoveReaction.js.map +1 -1
  582. package/lib/module/icons/MD.js.map +1 -1
  583. package/lib/module/icons/MailOpen.js.map +1 -1
  584. package/lib/module/icons/MenuPointHorizontal.js.map +1 -1
  585. package/lib/module/icons/MenuPointVertical.js.map +1 -1
  586. package/lib/module/icons/MessageFlag.js.map +1 -1
  587. package/lib/module/icons/MessageIcon.js.map +1 -1
  588. package/lib/module/icons/Mute.js.map +1 -1
  589. package/lib/module/icons/Notification.js.map +1 -1
  590. package/lib/module/icons/ODT.js.map +1 -1
  591. package/lib/module/icons/PDF.js.map +1 -1
  592. package/lib/module/icons/PPT.js.map +1 -1
  593. package/lib/module/icons/PPTX.js.map +1 -1
  594. package/lib/module/icons/Pause.js.map +1 -1
  595. package/lib/module/icons/Picture.js.map +1 -1
  596. package/lib/module/icons/Pin.js.map +1 -1
  597. package/lib/module/icons/PinHeader.js.map +1 -1
  598. package/lib/module/icons/Play.js.map +1 -1
  599. package/lib/module/icons/RAR.js.map +1 -1
  600. package/lib/module/icons/RTF.js.map +1 -1
  601. package/lib/module/icons/Recorder.js.map +1 -1
  602. package/lib/module/icons/Refresh.js.map +1 -1
  603. package/lib/module/icons/SEVEN_Z.js.map +1 -1
  604. package/lib/module/icons/Search.js.map +1 -1
  605. package/lib/module/icons/SendRight.js.map +1 -1
  606. package/lib/module/icons/SendUp.js.map +1 -1
  607. package/lib/module/icons/Share.js.map +1 -1
  608. package/lib/module/icons/ShareRightArrow.js.map +1 -1
  609. package/lib/module/icons/Smile.js.map +1 -1
  610. package/lib/module/icons/Sound.js.map +1 -1
  611. package/lib/module/icons/TAR.js.map +1 -1
  612. package/lib/module/icons/TXT.js.map +1 -1
  613. package/lib/module/icons/ThreadReply.js.map +1 -1
  614. package/lib/module/icons/ThumbsDownReaction.js.map +1 -1
  615. package/lib/module/icons/ThumbsUpReaction.js.map +1 -1
  616. package/lib/module/icons/Time.js.map +1 -1
  617. package/lib/module/icons/Unknown.js.map +1 -1
  618. package/lib/module/icons/Unpin.js.map +1 -1
  619. package/lib/module/icons/User.js.map +1 -1
  620. package/lib/module/icons/UserAdd.js.map +1 -1
  621. package/lib/module/icons/UserAdmin.js.map +1 -1
  622. package/lib/module/icons/UserDelete.js.map +1 -1
  623. package/lib/module/icons/UserMinus.js.map +1 -1
  624. package/lib/module/icons/Video.js.map +1 -1
  625. package/lib/module/icons/Warning.js.map +1 -1
  626. package/lib/module/icons/WutReaction.js.map +1 -1
  627. package/lib/module/icons/XLS.js.map +1 -1
  628. package/lib/module/icons/XLSX.js.map +1 -1
  629. package/lib/module/icons/ZIP.js.map +1 -1
  630. package/lib/module/icons/utils/base.js.map +1 -1
  631. package/lib/module/init.js.map +1 -1
  632. package/lib/module/mock-builders/DB/mock.js.map +1 -1
  633. package/lib/module/mock-builders/api/deleteMessage.js.map +1 -1
  634. package/lib/module/mock-builders/api/deleteReaction.js.map +1 -1
  635. package/lib/module/mock-builders/api/sendMessage.js.map +1 -1
  636. package/lib/module/mock-builders/api/sendReaction.js.map +1 -1
  637. package/lib/module/mock-builders/api/useMockedApis.js.map +1 -1
  638. package/lib/module/mock-builders/event/messageRead.js.map +1 -1
  639. package/lib/module/mock-builders/generator/attachment.js.map +1 -1
  640. package/lib/module/mock-builders/generator/channel.js.map +1 -1
  641. package/lib/module/mock-builders/generator/member.js.map +1 -1
  642. package/lib/module/mock-builders/generator/message.js.map +1 -1
  643. package/lib/module/mock-builders/generator/reaction.js.map +1 -1
  644. package/lib/module/mock-builders/generator/user.js.map +1 -1
  645. package/lib/module/mock-builders/mock.js.map +1 -1
  646. package/lib/module/native.js.map +1 -1
  647. package/lib/module/store/QuickSqliteClient.js.map +1 -1
  648. package/lib/module/store/apis/deleteReactions.js.map +1 -1
  649. package/lib/module/store/apis/getAllChannelIds.js.map +1 -1
  650. package/lib/module/store/apis/getAppSettings.js.map +1 -1
  651. package/lib/module/store/apis/getChannelMessages.js.map +1 -1
  652. package/lib/module/store/apis/getLastSyncedAt.js.map +1 -1
  653. package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
  654. package/lib/module/store/apis/queries/selectChannels.js.map +1 -1
  655. package/lib/module/store/apis/queries/selectMembersForChannels.js.map +1 -1
  656. package/lib/module/store/apis/queries/selectMessagesForChannels.js.map +1 -1
  657. package/lib/module/store/apis/queries/selectReactionsForMessages.js.map +1 -1
  658. package/lib/module/store/apis/queries/selectReadsForChannels.js.map +1 -1
  659. package/lib/module/store/apis/updateMessage.js.map +1 -1
  660. package/lib/module/store/apis/updateReaction.js.map +1 -1
  661. package/lib/module/store/apis/upsertChannels.js.map +1 -1
  662. package/lib/module/store/apis/upsertMembers.js.map +1 -1
  663. package/lib/module/store/apis/upsertReads.js.map +1 -1
  664. package/lib/module/store/apis/utils/convertFilterSortToQuery.js.map +1 -1
  665. package/lib/module/store/mappers/mapDateTimeToStorable.js.map +1 -1
  666. package/lib/module/store/mappers/mapTaskToStorable.js.map +1 -1
  667. package/lib/module/store/sqlite-utils/appendOrderByClause.js.map +1 -1
  668. package/lib/module/store/sqlite-utils/appendWhereCluase.js.map +1 -1
  669. package/lib/module/store/sqlite-utils/createCreateTableQuery.js.map +1 -1
  670. package/lib/module/test-utils/BetterSqlite.js.map +1 -1
  671. package/lib/module/types/types.js.map +1 -1
  672. package/lib/module/utils/DBSyncManager.js.map +1 -1
  673. package/lib/module/utils/Streami18n.js.map +1 -1
  674. package/lib/module/utils/addReactionToLocalState.js.map +1 -1
  675. package/lib/module/utils/date.js.map +1 -1
  676. package/lib/module/utils/getResizedImageUrl.js.map +1 -1
  677. package/lib/module/utils/patchMessageTextCommand.js.map +1 -1
  678. package/lib/module/utils/removeReactionFromLocalState.js.map +1 -1
  679. package/lib/module/utils/utils.js.map +1 -1
  680. package/lib/module/version.json +1 -1
  681. package/lib/typescript/types/types.d.ts +1 -2
  682. package/package.json +1 -1
  683. package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx +1 -3
  684. package/src/types/types.ts +1 -2
  685. package/src/version.json +1 -1
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_useResettableState","_defaultBaseContextValue","_getDisplayName","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","MessageOverlayContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","exports","MessageOverlayProvider","_ref","children","value","messageOverlayContext","useResettableState","createElement","Provider","__self","__source","fileName","lineNumber","columnNumber","useMessageOverlayContext","contextValue","useContext","isTestEnvironment","Error","withMessageOverlayContext","Component","WithMessageOverlayContextComponent","props","messageContext","_extends2","displayName","getDisplayName"],"sources":["MessageOverlayContext.tsx"],"sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { ImageProps } from 'react-native';\n\nimport type { Attachment, TranslationLanguages } from 'stream-chat';\n\nimport { useResettableState } from './hooks/useResettableState';\n\nimport type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { MessageActionListProps } from '../../components/MessageOverlay/MessageActionList';\nimport type {\n MessageActionListItemProps,\n MessageActionType,\n} from '../../components/MessageOverlay/MessageActionListItem';\nimport type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';\nimport type { OverlayReactionsProps } from '../../components/MessageOverlay/OverlayReactions';\nimport type { OverlayReactionsAvatarProps } from '../../components/MessageOverlay/OverlayReactionsAvatar';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport type { ReactionData } from '../../utils/utils';\nimport type { ChatContextValue } from '../chatContext/ChatContext';\nimport type { Alignment, MessageContextValue } from '../messageContext/MessageContext';\nimport type { MessagesContextValue } from '../messagesContext/MessagesContext';\nimport type { OwnCapabilitiesContextValue } from '../ownCapabilitiesContext/OwnCapabilitiesContext';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type MessageOverlayData<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n alignment?: Alignment;\n chatContext?: ChatContextValue<StreamChatGenerics>;\n clientId?: string;\n files?: Attachment<StreamChatGenerics>[];\n groupStyles?: GroupType[];\n handleReaction?: (reactionType: string) => Promise<void>;\n ImageComponent?: React.ComponentType<ImageProps>;\n images?: Attachment<StreamChatGenerics>[];\n message?: MessageType<StreamChatGenerics>;\n messageActions?: MessageActionType[];\n messageContext?: MessageContextValue<StreamChatGenerics>;\n messageReactionTitle?: string;\n messagesContext?: MessagesContextValue<StreamChatGenerics>;\n onlyEmojis?: boolean;\n otherAttachments?: Attachment<StreamChatGenerics>[];\n OverlayReactionList?: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n ownCapabilities?: OwnCapabilitiesContextValue;\n supportedReactions?: ReactionData[];\n threadList?: boolean;\n userLanguage?: TranslationLanguages;\n videos?: Attachment<StreamChatGenerics>[];\n};\n\nexport type MessageOverlayContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * Custom UI component for rendering [message actions](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png) in overlay.\n *\n * **Default** [MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/MessageActions.tsx)\n */\n MessageActionList: React.ComponentType<MessageActionListProps<StreamChatGenerics>>;\n MessageActionListItem: React.ComponentType<MessageActionListItemProps<StreamChatGenerics>>;\n /**\n * Custom UI component for rendering [reaction selector](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png) in overlay (which shows up on long press on message).\n *\n * **Default** [OverlayReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/OverlayReactionList.tsx)\n */\n OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n /**\n * Custom UI component for rendering [reactions list](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png), in overlay (which shows up on long press on message).\n *\n * **Default** [OverlayReactions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/OverlayReactions.tsx)\n */\n OverlayReactions: React.ComponentType<OverlayReactionsProps<StreamChatGenerics>>;\n OverlayReactionsAvatar: React.ComponentType<OverlayReactionsAvatarProps>;\n reset: () => void;\n setData: React.Dispatch<React.SetStateAction<MessageOverlayData<StreamChatGenerics>>>;\n data?: MessageOverlayData<StreamChatGenerics>;\n};\n\nexport const MessageOverlayContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as MessageOverlayContextValue,\n);\n\nexport const MessageOverlayProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessageOverlayContextValue<StreamChatGenerics>;\n}>) => {\n const messageOverlayContext = useResettableState(value);\n return (\n <MessageOverlayContext.Provider\n value={messageOverlayContext as unknown as MessageOverlayContextValue}\n >\n {children}\n </MessageOverlayContext.Provider>\n );\n};\n\nexport const useMessageOverlayContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => {\n const contextValue = useContext(\n MessageOverlayContext,\n ) as unknown as MessageOverlayContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useMessageOverlayContext hook was called outside the MessageOverlayContext Provider. Make sure you have configured OverlayProvider component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#overlay-provider`,\n );\n }\n\n return contextValue;\n};\n\n/**\n * Typescript currently does not support partial inference so if MessageOverlayContext\n * typing is desired while using the HOC withMessageOverlayContextContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessageOverlayContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessageOverlayContextValue<StreamChatGenerics>>> => {\n const WithMessageOverlayContextComponent = (\n props: Omit<P, keyof MessageOverlayContextValue<StreamChatGenerics>>,\n ) => {\n const messageContext = useMessageOverlayContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messageContext} />;\n };\n WithMessageOverlayContextComponent.displayName = `WithMessageOverlayContext${getDisplayName(\n Component,\n )}`;\n return WithMessageOverlayContextComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAMA,IAAAC,mBAAA,GAAAD,OAAA;AAiBA,IAAAE,wBAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AAA+D,IAAAK,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAa,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,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,KAAA;IAAAsC,QAAA;MAAAC,QAAA,EAAAtC,YAAA;MAAAuC,UAAA;MAAAC,YAAA;IAAA;EAAA,GAErEV,QAAQ,CACsB;AAErC,CAAC;AAACH,OAAA,CAAAC,sBAAA,GAAAA,sBAAA;AAEK,IAAMa,wBAAwB,GAAG,SAA3BA,wBAAwBA,CAAA,EAE9B;EACL,IAAMC,YAAY,GAAG,IAAAC,iBAAU,EAC7BpB,qBAAqB,CACuC;EAE9D,IAAImB,YAAY,KAAKhB,mDAA0B,IAAI,CAAC,IAAAkB,oCAAiB,GAAE,EAAE;IACvE,MAAM,IAAIC,KAAK,0PAEd;EACH;EAEA,OAAOH,YAAY;AACrB,CAAC;AAACf,OAAA,CAAAc,wBAAA,GAAAA,wBAAA;AAOK,IAAMK,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAIpCC,SAAiC,EAC2C;EAC5E,IAAMC,kCAAkC,GAAG,SAArCA,kCAAkCA,CACtCC,KAAoE,EACjE;IACH,IAAMC,cAAc,GAAGT,wBAAwB,EAAsB;IAErE,OAAOjD,MAAA,YAAA0C,aAAA,CAACa,SAAS,MAAAI,SAAA,iBAAMF,KAAK,EAAYC,cAAc;MAAAd,MAAA,EAAArC,KAAA;MAAAsC,QAAA;QAAAC,QAAA,EAAAtC,YAAA;QAAAuC,UAAA;QAAAC,YAAA;MAAA;IAAA,GAAI;EAC5D,CAAC;EACDQ,kCAAkC,CAACI,WAAW,iCAA+B,IAAAC,8BAAc,EACzFN,SAAS,CACR;EACH,OAAOC,kCAAkC;AAC3C,CAAC;AAACrB,OAAA,CAAAmB,yBAAA,GAAAA,yBAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_useResettableState","_defaultBaseContextValue","_getDisplayName","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","MessageOverlayContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","exports","MessageOverlayProvider","_ref","children","value","messageOverlayContext","useResettableState","createElement","Provider","__self","__source","fileName","lineNumber","columnNumber","useMessageOverlayContext","contextValue","useContext","isTestEnvironment","Error","withMessageOverlayContext","Component","WithMessageOverlayContextComponent","props","messageContext","_extends2","displayName","getDisplayName"],"sources":["MessageOverlayContext.tsx"],"sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { ImageProps } from 'react-native';\n\nimport type { Attachment, TranslationLanguages } from 'stream-chat';\n\nimport { useResettableState } from './hooks/useResettableState';\n\nimport type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { MessageActionListProps } from '../../components/MessageOverlay/MessageActionList';\nimport type {\n MessageActionListItemProps,\n MessageActionType,\n} from '../../components/MessageOverlay/MessageActionListItem';\nimport type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';\nimport type { OverlayReactionsProps } from '../../components/MessageOverlay/OverlayReactions';\nimport type { OverlayReactionsAvatarProps } from '../../components/MessageOverlay/OverlayReactionsAvatar';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport type { ReactionData } from '../../utils/utils';\nimport type { ChatContextValue } from '../chatContext/ChatContext';\nimport type { Alignment, MessageContextValue } from '../messageContext/MessageContext';\nimport type { MessagesContextValue } from '../messagesContext/MessagesContext';\nimport type { OwnCapabilitiesContextValue } from '../ownCapabilitiesContext/OwnCapabilitiesContext';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type MessageOverlayData<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n alignment?: Alignment;\n chatContext?: ChatContextValue<StreamChatGenerics>;\n clientId?: string;\n files?: Attachment<StreamChatGenerics>[];\n groupStyles?: GroupType[];\n handleReaction?: (reactionType: string) => Promise<void>;\n ImageComponent?: React.ComponentType<ImageProps>;\n images?: Attachment<StreamChatGenerics>[];\n message?: MessageType<StreamChatGenerics>;\n messageActions?: MessageActionType[];\n messageContext?: MessageContextValue<StreamChatGenerics>;\n messageReactionTitle?: string;\n messagesContext?: MessagesContextValue<StreamChatGenerics>;\n onlyEmojis?: boolean;\n otherAttachments?: Attachment<StreamChatGenerics>[];\n OverlayReactionList?: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n ownCapabilities?: OwnCapabilitiesContextValue;\n supportedReactions?: ReactionData[];\n threadList?: boolean;\n userLanguage?: TranslationLanguages;\n videos?: Attachment<StreamChatGenerics>[];\n};\n\nexport type MessageOverlayContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * Custom UI component for rendering [message actions](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png) in overlay.\n *\n * **Default** [MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/MessageActions.tsx)\n */\n MessageActionList: React.ComponentType<MessageActionListProps<StreamChatGenerics>>;\n MessageActionListItem: React.ComponentType<MessageActionListItemProps<StreamChatGenerics>>;\n /**\n * Custom UI component for rendering [reaction selector](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png) in overlay (which shows up on long press on message).\n *\n * **Default** [OverlayReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/OverlayReactionList.tsx)\n */\n OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n /**\n * Custom UI component for rendering [reactions list](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png), in overlay (which shows up on long press on message).\n *\n * **Default** [OverlayReactions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/OverlayReactions.tsx)\n */\n OverlayReactions: React.ComponentType<OverlayReactionsProps<StreamChatGenerics>>;\n OverlayReactionsAvatar: React.ComponentType<OverlayReactionsAvatarProps>;\n reset: () => void;\n setData: React.Dispatch<React.SetStateAction<MessageOverlayData<StreamChatGenerics>>>;\n data?: MessageOverlayData<StreamChatGenerics>;\n};\n\nexport const MessageOverlayContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as MessageOverlayContextValue,\n);\n\nexport const MessageOverlayProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessageOverlayContextValue<StreamChatGenerics>;\n}>) => {\n const messageOverlayContext = useResettableState(value);\n return (\n <MessageOverlayContext.Provider\n value={messageOverlayContext as unknown as MessageOverlayContextValue}\n >\n {children}\n </MessageOverlayContext.Provider>\n );\n};\n\nexport const useMessageOverlayContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => {\n const contextValue = useContext(\n MessageOverlayContext,\n ) as unknown as MessageOverlayContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useMessageOverlayContext hook was called outside the MessageOverlayContext Provider. Make sure you have configured OverlayProvider component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#overlay-provider`,\n );\n }\n\n return contextValue;\n};\n\n/**\n * Typescript currently does not support partial inference so if MessageOverlayContext\n * typing is desired while using the HOC withMessageOverlayContextContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessageOverlayContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessageOverlayContextValue<StreamChatGenerics>>> => {\n const WithMessageOverlayContextComponent = (\n props: Omit<P, keyof MessageOverlayContextValue<StreamChatGenerics>>,\n ) => {\n const messageContext = useMessageOverlayContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messageContext} />;\n };\n WithMessageOverlayContextComponent.displayName = `WithMessageOverlayContext${getDisplayName(\n Component,\n )}`;\n return WithMessageOverlayContextComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAMA,IAAAC,mBAAA,GAAAD,OAAA;AAiBA,IAAAE,wBAAA,GAAAF,OAAA;AAEA,IAAAG,eAAA,GAAAH,OAAA;AACA,IAAAI,kBAAA,GAAAJ,OAAA;AAA+D,IAAAK,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAT,wBAAAa,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CAAAE,wBAAA,CAAAV,GAAA,EAAAW,GAAA,cAAAI,IAAA,KAAAA,IAAA,CAAAV,GAAA,IAAAU,IAAA,CAAAC,GAAA,KAAAR,MAAA,CAAAC,c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kCA,CACtCC,KAAoE,EACjE;IACH,IAAMC,cAAc,GAAGT,wBAAwB,CAAqB,CAAC;IAErE,OAAOjD,MAAA,YAAA0C,aAAA,CAACa,SAAS,MAAAI,SAAA,iBAAMF,KAAK,EAAYC,cAAc;MAAAd,MAAA,EAAArC,KAAA;MAAAsC,QAAA;QAAAC,QAAA,EAAAtC,YAAA;QAAAuC,UAAA;QAAAC,YAAA;MAAA;IAAA,EAAG,CAAC;EAC5D,CAAC;EACDQ,kCAAkC,CAACI,WAAW,iCAA+B,IAAAC,8BAAc,EACzFN,SACF,CAAG;EACH,OAAOC,kCAAkC;AAC3C,CAAC;AAACrB,OAAA,CAAAmB,yBAAA,GAAAA,yBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_useIsMountedRef","useResettableState","values","_useState","useState","_useState2","_slicedToArray2","data","setData","isMounted","useIsMountedRef","reset","current","exports"],"sources":["useResettableState.ts"],"sourcesContent":["import { useState } from 'react';\n\nimport { useIsMountedRef } from '../../../hooks/useIsMountedRef';\n\n/**\n * Wrapper around useState that provides a `reset`\n * function to reset the state to its initial value.\n *\n * Will not set state after being unmounted.\n * */\nexport const useResettableState = <T>(values: T) => {\n const [data, setData] = useState(values);\n const isMounted = useIsMountedRef();\n\n const reset = () => {\n if (isMounted.current) {\n setData(values);\n }\n };\n\n return { data, reset, setData };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AAQO,IAAME,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAOC,MAAS,EAAK;EAClD,IAAAC,SAAA,GAAwB,IAAAC,eAAQ,EAACF,MAAM,CAAC;IAAAG,UAAA,OAAAC,eAAA,aAAAH,SAAA;IAAjCI,IAAI,GAAAF,UAAA;IAAEG,OAAO,GAAAH,UAAA;EACpB,IAAMI,SAAS,GAAG,IAAAC,gCAAe,GAAE;EAEnC,IAAMC,KAAK,GAAG,SAARA,KAAKA,CAAA,EAAS;IAClB,IAAIF,SAAS,CAACG,OAAO,EAAE;MACrBJ,OAAO,CAACN,MAAM,CAAC;IACjB;EACF,CAAC;EAED,OAAO;IAAEK,IAAI,EAAJA,IAAI;IAAEI,KAAK,EAALA,KAAK;IAAEH,OAAO,EAAPA;EAAQ,CAAC;AACjC,CAAC;AAACK,OAAA,CAAAZ,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"names":["_react","require","_useIsMountedRef","useResettableState","values","_useState","useState","_useState2","_slicedToArray2","data","setData","isMounted","useIsMountedRef","reset","current","exports"],"sources":["useResettableState.ts"],"sourcesContent":["import { useState } from 'react';\n\nimport { useIsMountedRef } from '../../../hooks/useIsMountedRef';\n\n/**\n * Wrapper around useState that provides a `reset`\n * function to reset the state to its initial value.\n *\n * Will not set state after being unmounted.\n * */\nexport const useResettableState = <T>(values: T) => {\n const [data, setData] = useState(values);\n const isMounted = useIsMountedRef();\n\n const reset = () => {\n if (isMounted.current) {\n setData(values);\n }\n };\n\n return { data, reset, setData };\n};\n"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,gBAAA,GAAAD,OAAA;AAQO,IAAME,kBAAkB,GAAG,SAArBA,kBAAkBA,CAAOC,MAAS,EAAK;EAClD,IAAAC,SAAA,GAAwB,IAAAC,eAAQ,EAACF,MAAM,CAAC;IAAAG,UAAA,OAAAC,eAAA,aAAAH,SAAA;IAAjCI,IAAI,GAAAF,UAAA;IAAEG,OAAO,GAAAH,UAAA;EACpB,IAAMI,SAAS,GAAG,IAAAC,gCAAe,EAAC,CAAC;EAEnC,IAAMC,KAAK,GAAG,SAARA,KAAKA,CAAA,EAAS;IAClB,IAAIF,SAAS,CAACG,OAAO,EAAE;MACrBJ,OAAO,CAACN,MAAM,CAAC;IACjB;EACF,CAAC;EAED,OAAO;IAAEK,IAAI,EAAJA,IAAI;IAAEI,KAAK,EAALA,KAAK;IAAEH,OAAO,EAAPA;EAAQ,CAAC;AACjC,CAAC;AAACK,OAAA,CAAAZ,kBAAA,GAAAA,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_reactNative2","_useResettableState2","_this","_jsxFileName","TestComponent","_useResettableState","useResettableState","data","reset","setData","createElement","Fragment","Text","testID","__self","__source","fileName","lineNumber","columnNumber","Button","onPress","title","waitForOptions","timeout","test","_asyncToGenerator2","_regenerator","mark","_callee","_render","getByTestId","wrap","_callee$","_context","prev","next","render","waitFor","expect","children","toBe","fireEvent","press","stop"],"sources":["useResettableState.test.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button, Text } from 'react-native';\n\nimport { fireEvent, render, waitFor } from '@testing-library/react-native';\n\nimport { useResettableState } from './useResettableState';\n\nconst TestComponent = () => {\n const { data, reset, setData } = useResettableState(0);\n\n return (\n <>\n <Text testID='value'>{`${data}`}</Text>\n <Button\n onPress={() => {\n setData(data + 1);\n }}\n testID='increment'\n title='Super useful incrementer'\n />\n <Button\n onPress={() => {\n reset();\n }}\n testID='reset'\n title='Oh no, go back!'\n />\n </>\n );\n};\n\nconst waitForOptions = {\n timeout: 1000,\n};\n\ntest('useResettableState can be reset to its initial state', async () => {\n const { getByTestId } = render(<TestComponent />);\n\n await waitFor(() => expect(getByTestId('value').children[0]).toBe('0'), waitForOptions);\n\n fireEvent.press(getByTestId('increment'));\n await waitFor(() => expect(getByTestId('value').children[0]).toBe('1'), waitForOptions);\n\n fireEvent.press(getByTestId('reset'));\n await waitFor(() => expect(getByTestId('value').children[0]).toBe('0'), waitForOptions);\n});\n"],"mappings":";;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,aAAA,GAAAF,OAAA;AAEA,IAAAG,oBAAA,GAAAH,OAAA;AAA0D,IAAAI,KAAA;EAAAC,YAAA;AAE1D,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAA,EAAS;EAC1B,IAAAC,mBAAA,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ileName","TestComponent","_useResettableState","useResettableState","data","reset","setData","createElement","Fragment","Text","testID","__self","__source","fileName","lineNumber","columnNumber","Button","onPress","title","waitForOptions","timeout","test","_asyncToGenerator2","_regenerator","mark","_callee","_render","getByTestId","wrap","_callee$","_context","prev","next","render","waitFor","expect","children","toBe","fireEvent","press","stop"],"sources":["useResettableState.test.tsx"],"sourcesContent":["import React from 'react';\n\nimport { Button, Text } from 'react-native';\n\nimport { fireEvent, render, waitFor } from '@testing-library/react-native';\n\nimport { useResettableState } from './useResettableState';\n\nconst TestComponent = () => {\n const { data, reset, setData } = useResettableState(0);\n\n return (\n <>\n <Text testID='value'>{`${data}`}</Text>\n <Button\n onPress={() => {\n setData(data + 1);\n }}\n testID='increment'\n title='Super useful incrementer'\n />\n <Button\n onPress={() => {\n reset();\n }}\n testID='reset'\n title='Oh no, go back!'\n />\n </>\n );\n};\n\nconst waitForOptions = {\n timeout: 1000,\n};\n\ntest('useResettableState can be reset to its initial state', async () => {\n const { getByTestId } = render(<TestComponent />);\n\n await waitFor(() => expect(getByTestId('value').children[0]).toBe('0'), waitForOptions);\n\n fireEvent.press(getByTestId('increment'));\n await waitFor(() => expect(getByTestId('value').children[0]).toBe('1'), waitForOptions);\n\n fireEvent.press(getByTestId('reset'));\n await waitFor(() => expect(getByTestId('value').children[0]).toBe('0'), waitForOptions);\n});\n"],"mappings":";;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,aAAA,GAAAF,OAAA;AAEA,IAAAG,oBAAA,GAAAH,OAAA;AAA0D,IAAAI,KAAA;EAAAC,YAAA;AAE1D,IAAMC,aAAa,GAAG,SAAhBA,aAAaA,CAAA,EAAS;EAC1B,IAAAC,mBAAA,GAAiC,IAAAC,uCAAkB,EAAC,CAAC,CAAC;IAA9CC,IAAI,GAAAF,mBAAA,CAAJE,IAAI;IAAEC,KAAK,GAAAH,mBAAA,CAALG,KAAK;IAAE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GACnC,IAAAO,oBAAM,EAACxC,MAAA,YAAAc,aAAA,CAACN,aAAa;UAAAU,MAAA,EAAAZ,KAAA;UAAAa,QAAA;YAAAC,QAAA,EAAAb,YAAA;YAAAc,UAAA;YAAAC,YAAA;UAAA;QAAA,CAAE,CAAC,CAAC,EAAzCY,WAAW,GAAAD,OAAA,CAAXC,WAAW;QAAAG,QAAA,CAAAE,IAAA;QAAA,OAEb,IAAAE,qBAAO,EAAC;UAAA,OAAMC,MAAM,CAACR,WAAW,CAAC,OAAO,CAAC,CAACS,QAAQ,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;QAAA,GAAElB,cAAc,CAAC;MAAA;QAEvFmB,uBAAS,CAACC,KAAK,CAACZ,WAAW,CAAC,WAAW,CAAC,CAAC;QAACG,QAAA,CAAAE,IAAA;QAAA,OACpC,IAAAE,qBAAO,EAAC;UAAA,OAAMC,MAAM,CAACR,WAAW,CAAC,OAAO,CAAC,CAACS,QAAQ,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;QAAA,GAAElB,cAAc,CAAC;MAAA;QAEvFmB,uBAAS,CAACC,KAAK,CAACZ,WAAW,CAAC,OAAO,CAAC,CAAC;QAACG,QAAA,CAAAE,IAAA;QAAA,OAChC,IAAAE,qBAAO,EAAC;UAAA,OAAMC,MAAM,CAACR,WAAW,CAAC,OAAO,CAAC,CAACS,QAAQ,CAAC,CAAC,CAAC,CAAC,CAACC,IAAI,CAAC,GAAG,CAAC;QAAA,GAAElB,cAAc,CAAC;MAAA;MAAA;QAAA,OAAAW,QAAA,CAAAU,IAAA;IAAA;EAAA,GAAAf,OAAA;AAAA,CACxF,GAAC"}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_defaultBaseContextValue","_getDisplayName","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","MessagesContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","exports","MessagesProvider","_ref","children","value","createElement","Provider","__self","__source","fileName","lineNumber","columnNumber","useMessagesContext","contextValue","useContext","isTestEnvironment","Error","withMessagesContext","Component","WithMessagesContextComponent","props","messagesContext","_extends2","displayName","getDisplayName"],"sources":["MessagesContext.tsx"],"sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { TouchableOpacityProps } from 'react-native';\n\nimport type { ImageLoadingFailedIndicatorProps } from 'src/components/Attachment/ImageLoadingFailedIndicator';\nimport type { ImageLoadingIndicatorProps } from 'src/components/Attachment/ImageLoadingIndicator';\n\nimport type { MessagePinnedHeaderProps } from 'src/components/Message/MessageSimple/MessagePinnedHeader';\n\nimport type { Attachment, ChannelState, MessageResponse } from 'stream-chat';\n\nimport type { AttachmentProps } from '../../components/Attachment/Attachment';\nimport type { AttachmentActionsProps } from '../../components/Attachment/AttachmentActions';\nimport type { AudioAttachmentProps } from '../../components/Attachment/AudioAttachment';\nimport type { CardProps } from '../../components/Attachment/Card';\nimport type { FileAttachmentProps } from '../../components/Attachment/FileAttachment';\nimport type { FileAttachmentGroupProps } from '../../components/Attachment/FileAttachmentGroup';\nimport type { FileIconProps } from '../../components/Attachment/FileIcon';\nimport type { GalleryProps } from '../../components/Attachment/Gallery';\nimport type { GiphyProps } from '../../components/Attachment/Giphy';\nimport type { VideoThumbnailProps } from '../../components/Attachment/VideoThumbnail';\nimport type {\n MessageProps,\n MessageTouchableHandlerPayload,\n} from '../../components/Message/Message';\nimport type { MessageAvatarProps } from '../../components/Message/MessageSimple/MessageAvatar';\nimport type { MessageContentProps } from '../../components/Message/MessageSimple/MessageContent';\nimport type { MessageDeletedProps } from '../../components/Message/MessageSimple/MessageDeleted';\nimport type { MessageFooterProps } from '../../components/Message/MessageSimple/MessageFooter';\n\nimport type { MessageRepliesProps } from '../../components/Message/MessageSimple/MessageReplies';\nimport type { MessageRepliesAvatarsProps } from '../../components/Message/MessageSimple/MessageRepliesAvatars';\nimport type { MessageSimpleProps } from '../../components/Message/MessageSimple/MessageSimple';\nimport type { MessageStatusProps } from '../../components/Message/MessageSimple/MessageStatus';\nimport type { MessageTextProps } from '../../components/Message/MessageSimple/MessageTextContainer';\nimport type { ReactionListProps } from '../../components/Message/MessageSimple/ReactionList';\nimport type { MarkdownRules } from '../../components/Message/MessageSimple/utils/renderText';\nimport type { MessageActionsParams } from '../../components/Message/utils/messageActions';\nimport type { DateHeaderProps } from '../../components/MessageList/DateHeader';\nimport type { MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { InlineDateSeparatorProps } from '../../components/MessageList/InlineDateSeparator';\nimport type { MessageListProps } from '../../components/MessageList/MessageList';\nimport type { MessageSystemProps } from '../../components/MessageList/MessageSystem';\nimport type { ScrollToBottomButtonProps } from '../../components/MessageList/ScrollToBottomButton';\nimport type { getGroupStyles } from '../../components/MessageList/utils/getGroupStyles';\nimport type { MessageActionType } from '../../components/MessageOverlay/MessageActionListItem';\nimport type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';\nimport type { ReplyProps } from '../../components/Reply/Reply';\nimport type { FlatList } from '../../native';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport type { ReactionData } from '../../utils/utils';\nimport type { Alignment } from '../messageContext/MessageContext';\nimport type { SuggestionCommand } from '../suggestionsContext/SuggestionsContext';\nimport type { DeepPartial } from '../themeContext/ThemeContext';\nimport type { Theme } from '../themeContext/utils/theme';\nimport type { TDateTimeParserInput } from '../translationContext/TranslationContext';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type MessageContentType = 'attachments' | 'files' | 'gallery' | 'quoted_reply' | 'text';\nexport type DeletedMessagesVisibilityType = 'always' | 'never' | 'receiver' | 'sender';\n\nexport type MessagesContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * UI component for Attachment.\n * Defaults to: [Attachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Attachment.tsx)\n */\n Attachment: React.ComponentType<AttachmentProps<StreamChatGenerics>>;\n /**\n * UI component to display AttachmentActions. e.g., send, shuffle, cancel in case of giphy\n * Defaults to: [AttachmentActions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/AttachmentActions.tsx)\n */\n AttachmentActions: React.ComponentType<AttachmentActionsProps<StreamChatGenerics>>;\n /** Custom UI component for AudioAttachment. */\n AudioAttachment: React.ComponentType<AudioAttachmentProps>;\n /**\n * UI component to display generic media type e.g. giphy, url preview etc\n * Defaults to: [Card](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx)\n */\n Card: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * UI component for DateHeader\n * Defaults to: [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/DateHeader.tsx)\n **/\n DateHeader: React.ComponentType<DateHeaderProps>;\n deleteMessage: (message: MessageResponse<StreamChatGenerics>) => Promise<void>;\n deleteReaction: (type: string, messageId: string) => Promise<void>;\n\n /** Should keyboard be dismissed when messaged is touched */\n dismissKeyboardOnMessageTouch: boolean;\n\n enableMessageGroupingByUser: boolean;\n\n /**\n * UI component to display File type attachment.\n * Defaults to: [FileAttachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileAttachment.tsx)\n */\n FileAttachment: React.ComponentType<FileAttachmentProps<StreamChatGenerics>>;\n /**\n * UI component to display group of File type attachments or multiple file attachments (in single message).\n * Defaults to: [FileAttachmentGroup](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileAttachmentGroup.tsx)\n */\n FileAttachmentGroup: React.ComponentType<FileAttachmentGroupProps<StreamChatGenerics>>;\n /**\n * UI component for attachment icon for type 'file' attachment.\n * Defaults to: https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileIcon.tsx\n */\n FileAttachmentIcon: React.ComponentType<FileIconProps>;\n FlatList: typeof FlatList;\n /**\n * UI component to display image attachments\n * Defaults to: [Gallery](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Gallery.tsx)\n */\n Gallery: React.ComponentType<GalleryProps<StreamChatGenerics>>;\n /**\n * UI component for Giphy\n * Defaults to: [Giphy](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Giphy.tsx)\n */\n Giphy: React.ComponentType<GiphyProps<StreamChatGenerics>>;\n /**\n * The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default\n * */\n giphyVersion: keyof NonNullable<Attachment['giphy']>;\n\n /**\n * The indicator rendered when loading an image fails.\n */\n ImageLoadingFailedIndicator: React.ComponentType<ImageLoadingFailedIndicatorProps>;\n\n /**\n * The indicator rendered when image is loading. By default renders <ActivityIndicator/>\n */\n ImageLoadingIndicator: React.ComponentType<ImageLoadingIndicatorProps>;\n\n /**\n * When true, messageList will be scrolled at first unread message, when opened.\n */\n initialScrollToFirstUnreadMessage: boolean;\n /**\n * UI component for Message Date Separator Component\n * Defaults to: [InlineDateSeparator](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/InlineDateSeparator.tsx)\n */\n InlineDateSeparator: React.ComponentType<InlineDateSeparatorProps>;\n /**\n * UI component for InlineUnreadIndicator\n * Defaults to: [InlineUnreadIndicator](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/InlineUnreadIndicator.tsx)\n **/\n InlineUnreadIndicator: React.ComponentType;\n\n Message: React.ComponentType<MessageProps<StreamChatGenerics>>;\n /**\n * UI component for MessageAvatar\n * Defaults to: [MessageAvatar](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageAvatar.tsx)\n **/\n MessageAvatar: React.ComponentType<MessageAvatarProps<StreamChatGenerics>>;\n /**\n * UI component for MessageContent\n * Defaults to: [MessageContent](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageContent.tsx)\n */\n MessageContent: React.ComponentType<MessageContentProps<StreamChatGenerics>>;\n /** Order to render the message content */\n messageContentOrder: MessageContentType[];\n /**\n * UI component for MessageDeleted\n * Defaults to: [MessageDeleted](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageDeleted.tsx)\n */\n MessageDeleted: React.ComponentType<MessageDeletedProps<StreamChatGenerics>>;\n /**\n * Custom message footer component\n */\n MessageFooter: React.ComponentType<MessageFooterProps<StreamChatGenerics>>;\n MessageList: React.ComponentType<MessageListProps<StreamChatGenerics>>;\n /**\n * Custom message pinned component\n */\n MessagePinnedHeader: React.ComponentType<MessagePinnedHeaderProps<StreamChatGenerics>>;\n\n /**\n * UI component for MessageReplies\n * Defaults to: [MessageReplies](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageReplies.tsx)\n */\n MessageReplies: React.ComponentType<MessageRepliesProps<StreamChatGenerics>>;\n /**\n * UI Component for MessageRepliesAvatars\n * Defaults to: [MessageRepliesAvatars](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageRepliesAvatars.tsx)\n */\n MessageRepliesAvatars: React.ComponentType<MessageRepliesAvatarsProps<StreamChatGenerics>>;\n /**\n * UI component for MessageSimple\n * Defaults to: [MessageSimple](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageSimple.tsx)\n */\n MessageSimple: React.ComponentType<MessageSimpleProps<StreamChatGenerics>>;\n /**\n * UI component for MessageStatus (delivered/read)\n * Defaults to: [MessageStatus](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageStatus.tsx)\n */\n MessageStatus: React.ComponentType<MessageStatusProps<StreamChatGenerics>>;\n /**\n * UI component for MessageSystem\n * Defaults to: [MessageSystem](https://getstream.io/chat/docs/sdk/reactnative/ui-components/message-system/)\n */\n MessageSystem: React.ComponentType<MessageSystemProps<StreamChatGenerics>>;\n /**\n * UI component for OverlayReactionList\n */\n OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n /**\n * UI component for ReactionList\n * Defaults to: [ReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Reaction/ReactionList.tsx)\n */\n ReactionList: React.ComponentType<ReactionListProps<StreamChatGenerics>>;\n removeMessage: (message: { id: string; parent_id?: string }) => void;\n /**\n * UI component for Reply\n * Defaults to: [Reply](https://getstream.io/chat/docs/sdk/reactnative/ui-components/reply/)\n */\n Reply: React.ComponentType<ReplyProps<StreamChatGenerics>>;\n /**\n * Override the api request for retry message functionality.\n */\n retrySendMessage: (message: MessageResponse<StreamChatGenerics>) => Promise<void>;\n /**\n * UI component for ScrollToBottomButton\n * Defaults to: [ScrollToBottomButton](https://getstream.io/chat/docs/sdk/reactnative/ui-components/scroll-to-bottom-button/)\n */\n ScrollToBottomButton: React.ComponentType<ScrollToBottomButtonProps>;\n sendReaction: (type: string, messageId: string) => Promise<void>;\n setEditingState: (message: MessageType<StreamChatGenerics>) => void;\n setQuotedMessageState: (message: MessageType<StreamChatGenerics>) => void;\n supportedReactions: ReactionData[];\n /**\n * UI component for TypingIndicator\n * Defaults to: [TypingIndicator](https://getstream.io/chat/docs/sdk/reactnative/ui-components/typing-indicator/)\n */\n TypingIndicator: React.ComponentType;\n /**\n * UI component for TypingIndicatorContainer\n * Defaults to: [TypingIndicatorContainer](https://getstream.io/chat/docs/sdk/reactnative/contexts/messages-context/#typingindicatorcontainer)\n */\n TypingIndicatorContainer: React.ComponentType;\n updateMessage: (\n updatedMessage: MessageResponse<StreamChatGenerics>,\n extraState?: {\n commands?: SuggestionCommand<StreamChatGenerics>[];\n messageInput?: string;\n threadMessages?: ChannelState<StreamChatGenerics>['threads'][string];\n },\n ) => void;\n /**\n * Custom UI component to display enriched url preview.\n * Defaults to https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx\n */\n UrlPreview: React.ComponentType<CardProps<StreamChatGenerics>>;\n VideoThumbnail: React.ComponentType<VideoThumbnailProps>;\n /**\n * Provide any additional props for `TouchableOpacity` which wraps inner MessageContent component here.\n * Please check docs for TouchableOpacity for supported props - https://reactnative.dev/docs/touchableopacity#props\n *\n * @overrideType Object\n */\n additionalTouchableProps?: Omit<TouchableOpacityProps, 'style'>;\n /**\n * Custom UI component to override default cover (between Header and Footer) of Card component.\n * Accepts the same props as Card component.\n */\n CardCover?: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * Custom UI component to override default Footer of Card component.\n * Accepts the same props as Card component.\n */\n CardFooter?: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * Custom UI component to override default header of Card component.\n * Accepts the same props as Card component.\n */\n CardHeader?: React.ComponentType<CardProps<StreamChatGenerics>>;\n\n /**\n * Full override of the delete message button in the Message Actions\n *\n * Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.\n */\n\n /** Control if the deleted message is visible to both the send and reciever, either of them or none */\n deletedMessagesVisibilityType?: DeletedMessagesVisibilityType;\n\n disableTypingIndicator?: boolean;\n\n /**\n * Whether messages should be aligned to right or left part of screen.\n * By default, messages will be received messages will be aligned to left and\n * sent messages will be aligned to right.\n */\n forceAlignMessages?: Alignment | boolean;\n /**\n * Optional function to custom format the message date\n */\n formatDate?: (date: TDateTimeParserInput) => string;\n getMessagesGroupStyles?: typeof getGroupStyles;\n handleBlock?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a copy message action is invoked */\n handleCopy?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a delete message action is invoked */\n handleDelete?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when an edit message action is invoked */\n handleEdit?: (message: MessageType<StreamChatGenerics>) => void;\n /** Handler to access when a flag message action is invoked */\n handleFlag?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a mute user action is invoked */\n handleMute?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a pin/unpin user action is invoked*/\n handlePinMessage?: ((message: MessageType<StreamChatGenerics>) => MessageActionType) | null;\n /** Handler to access when a quoted reply action is invoked */\n handleQuotedReply?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to process a reaction */\n handleReaction?: (\n message: MessageType<StreamChatGenerics>,\n reactionType: string,\n ) => Promise<void>;\n /** Handler to access when a retry action is invoked */\n handleRetry?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a thread reply action is invoked */\n handleThreadReply?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to deal with custom memoization logic of Attachment */\n isAttachmentEqual?: (\n prevAttachment: Attachment<StreamChatGenerics>,\n nextAttachment: Attachment<StreamChatGenerics>,\n ) => boolean;\n legacyImageViewerSwipeBehaviour?: boolean;\n /** Object specifying rules defined within simple-markdown https://github.com/Khan/simple-markdown#adding-a-simple-extension */\n markdownRules?: MarkdownRules;\n /**\n * Use this prop to override message actions (which pop-up in message overlay).\n *\n * You can either completely override the default messageActions object.\n *\n * ```\n * <Channel\n * messageActions=[\n * {\n * action: () => { someAction() };\n * title: \"Pin Message\";\n * icon: PinIcon;\n * titleStyle: {};\n * },\n * {\n * action: () => { someAction() };\n * title: \"Delete Message\";\n * icon: PinIcon;\n * titleStyle: {};\n * }\n * ]\n * >\n * </Channel>\n * ```\n *\n * Or you can selectly keep certain action and remove some:\n *\n * e.g. Lets say you only want to keep threadReply and copyMessage actions\n *\n * ```\n * <Channel\n * messageActions={({\n * blockUser,\n * copyMessage,\n * deleteMessage,\n * editMessage,\n * flagMessage,\n * muteUser,\n * quotedReply,\n * retry,\n * threadReply,\n * }) => ([\n * threadReply, copyMessage\n * ])}\n * >\n * </Channel>\n * ```\n *\n * @overrideType Function | Array<Objects>\n */\n messageActions?: (param: MessageActionsParams<StreamChatGenerics>) => MessageActionType[];\n /**\n * Custom message header component\n */\n MessageHeader?: React.ComponentType<MessageFooterProps<StreamChatGenerics>>;\n /** Custom UI component for message text */\n MessageText?: React.ComponentType<MessageTextProps<StreamChatGenerics>>;\n\n /**\n * Theme provided only to messages that are the current users\n */\n myMessageTheme?: DeepPartial<Theme>;\n /**\n * Override default handler for onLongPress on message. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onLongPressMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occured\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onLongPressMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n /**\n * Add onPressIn handler for attachments. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onPressInMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occured\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onPressInMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n /**\n * Override onPress handler for message. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onPressMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occurred\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onPressMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n\n /**\n * Full override of the reaction function on Message and Message Overlay\n *\n * Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.\n * */\n selectReaction?: (\n message: MessageType<StreamChatGenerics>,\n ) => (reactionType: string) => Promise<void>;\n\n targetedMessage?: string;\n};\n\nexport const MessagesContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as MessagesContextValue,\n);\n\nexport const MessagesProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessagesContextValue<StreamChatGenerics>;\n}>) => (\n <MessagesContext.Provider value={value as unknown as MessagesContextValue}>\n {children}\n </MessagesContext.Provider>\n);\n\nexport const useMessagesContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => {\n const contextValue = useContext(\n MessagesContext,\n ) as unknown as MessagesContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useMessagesContext hook was called outside of the MessagesContext provider. Make sure you have configured MessageList component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#message-list`,\n );\n }\n\n return contextValue;\n};\n\n/**\n * Typescript currently does not support partial inference so if MessagesContext\n * typing is desired while using the HOC withMessagesContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessagesContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessagesContextValue<StreamChatGenerics>>> => {\n const WithMessagesContextComponent = (\n props: Omit<P, keyof MessagesContextValue<StreamChatGenerics>>,\n ) => {\n const messagesContext = useMessagesContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messagesContext} />;\n };\n WithMessagesContextComponent.displayName = `WithMessagesContext${getDisplayName(Component)}`;\n return WithMessagesContextComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAwDA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAA+D,IAAAI,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GA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AAG,IAAAC,iBAAU,EAC7BlB,eAAe,CACuC;EAExD,IAAIiB,YAAY,KAAKd,mDAA0B,IAAI,CAAC,IAAAgB,oCAAiB,GAAE,EAAE;IACvE,MAAM,IAAIC,KAAK,yOAEd;EACH;EAEA,OAAOH,YAAY;AACrB,CAAC;AAACb,OAAA,CAAAY,kBAAA,GAAAA,kBAAA;AAOK,IAAMK,mBAAmB,GAAG,SAAtBA,mBAAmBA,CAI9BC,SAAiC,EACqC;EACtE,IAAMC,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAChCC,KAA8D,EAC3D;IACH,IAAMC,eAAe,GAAGT,kBAAkB,EAAsB;IAEhE,OAAO9C,MAAA,YAAAuC,aAAA,CAACa,SAAS,MAAAI,SAAA,iBAAMF,KAAK,EAAYC,eAAe;MAAAd,MAAA,EAAAnC,KAAA;MAAAoC,QAAA;QAAAC,QAAA,EAAApC,YAAA;QAAAqC,UAAA;QAAAC,YAAA;MAAA;IAAA,GAAI;EAC7D,CAAC;EACDQ,4BAA4B,CAACI,WAAW,2BAAyB,IAAAC,8BAAc,EAACN,SAAS,CAAG;EAC5F,OAAOC,4BAA4B;AACrC,CAAC;AAACnB,OAAA,CAAAiB,mBAAA,GAAAA,mBAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_defaultBaseContextValue","_getDisplayName","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","MessagesContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","exports","MessagesProvider","_ref","children","value","createElement","Provider","__self","__source","fileName","lineNumber","columnNumber","useMessagesContext","contextValue","useContext","isTestEnvironment","Error","withMessagesContext","Component","WithMessagesContextComponent","props","messagesContext","_extends2","displayName","getDisplayName"],"sources":["MessagesContext.tsx"],"sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { TouchableOpacityProps } from 'react-native';\n\nimport type { ImageLoadingFailedIndicatorProps } from 'src/components/Attachment/ImageLoadingFailedIndicator';\nimport type { ImageLoadingIndicatorProps } from 'src/components/Attachment/ImageLoadingIndicator';\n\nimport type { MessagePinnedHeaderProps } from 'src/components/Message/MessageSimple/MessagePinnedHeader';\n\nimport type { Attachment, ChannelState, MessageResponse } from 'stream-chat';\n\nimport type { AttachmentProps } from '../../components/Attachment/Attachment';\nimport type { AttachmentActionsProps } from '../../components/Attachment/AttachmentActions';\nimport type { AudioAttachmentProps } from '../../components/Attachment/AudioAttachment';\nimport type { CardProps } from '../../components/Attachment/Card';\nimport type { FileAttachmentProps } from '../../components/Attachment/FileAttachment';\nimport type { FileAttachmentGroupProps } from '../../components/Attachment/FileAttachmentGroup';\nimport type { FileIconProps } from '../../components/Attachment/FileIcon';\nimport type { GalleryProps } from '../../components/Attachment/Gallery';\nimport type { GiphyProps } from '../../components/Attachment/Giphy';\nimport type { VideoThumbnailProps } from '../../components/Attachment/VideoThumbnail';\nimport type {\n MessageProps,\n MessageTouchableHandlerPayload,\n} from '../../components/Message/Message';\nimport type { MessageAvatarProps } from '../../components/Message/MessageSimple/MessageAvatar';\nimport type { MessageContentProps } from '../../components/Message/MessageSimple/MessageContent';\nimport type { MessageDeletedProps } from '../../components/Message/MessageSimple/MessageDeleted';\nimport type { MessageFooterProps } from '../../components/Message/MessageSimple/MessageFooter';\n\nimport type { MessageRepliesProps } from '../../components/Message/MessageSimple/MessageReplies';\nimport type { MessageRepliesAvatarsProps } from '../../components/Message/MessageSimple/MessageRepliesAvatars';\nimport type { MessageSimpleProps } from '../../components/Message/MessageSimple/MessageSimple';\nimport type { MessageStatusProps } from '../../components/Message/MessageSimple/MessageStatus';\nimport type { MessageTextProps } from '../../components/Message/MessageSimple/MessageTextContainer';\nimport type { ReactionListProps } from '../../components/Message/MessageSimple/ReactionList';\nimport type { MarkdownRules } from '../../components/Message/MessageSimple/utils/renderText';\nimport type { MessageActionsParams } from '../../components/Message/utils/messageActions';\nimport type { DateHeaderProps } from '../../components/MessageList/DateHeader';\nimport type { MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { InlineDateSeparatorProps } from '../../components/MessageList/InlineDateSeparator';\nimport type { MessageListProps } from '../../components/MessageList/MessageList';\nimport type { MessageSystemProps } from '../../components/MessageList/MessageSystem';\nimport type { ScrollToBottomButtonProps } from '../../components/MessageList/ScrollToBottomButton';\nimport type { getGroupStyles } from '../../components/MessageList/utils/getGroupStyles';\nimport type { MessageActionType } from '../../components/MessageOverlay/MessageActionListItem';\nimport type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';\nimport type { ReplyProps } from '../../components/Reply/Reply';\nimport type { FlatList } from '../../native';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport type { ReactionData } from '../../utils/utils';\nimport type { Alignment } from '../messageContext/MessageContext';\nimport type { SuggestionCommand } from '../suggestionsContext/SuggestionsContext';\nimport type { DeepPartial } from '../themeContext/ThemeContext';\nimport type { Theme } from '../themeContext/utils/theme';\nimport type { TDateTimeParserInput } from '../translationContext/TranslationContext';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type MessageContentType = 'attachments' | 'files' | 'gallery' | 'quoted_reply' | 'text';\nexport type DeletedMessagesVisibilityType = 'always' | 'never' | 'receiver' | 'sender';\n\nexport type MessagesContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * UI component for Attachment.\n * Defaults to: [Attachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Attachment.tsx)\n */\n Attachment: React.ComponentType<AttachmentProps<StreamChatGenerics>>;\n /**\n * UI component to display AttachmentActions. e.g., send, shuffle, cancel in case of giphy\n * Defaults to: [AttachmentActions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/AttachmentActions.tsx)\n */\n AttachmentActions: React.ComponentType<AttachmentActionsProps<StreamChatGenerics>>;\n /** Custom UI component for AudioAttachment. */\n AudioAttachment: React.ComponentType<AudioAttachmentProps>;\n /**\n * UI component to display generic media type e.g. giphy, url preview etc\n * Defaults to: [Card](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx)\n */\n Card: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * UI component for DateHeader\n * Defaults to: [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/DateHeader.tsx)\n **/\n DateHeader: React.ComponentType<DateHeaderProps>;\n deleteMessage: (message: MessageResponse<StreamChatGenerics>) => Promise<void>;\n deleteReaction: (type: string, messageId: string) => Promise<void>;\n\n /** Should keyboard be dismissed when messaged is touched */\n dismissKeyboardOnMessageTouch: boolean;\n\n enableMessageGroupingByUser: boolean;\n\n /**\n * UI component to display File type attachment.\n * Defaults to: [FileAttachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileAttachment.tsx)\n */\n FileAttachment: React.ComponentType<FileAttachmentProps<StreamChatGenerics>>;\n /**\n * UI component to display group of File type attachments or multiple file attachments (in single message).\n * Defaults to: [FileAttachmentGroup](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileAttachmentGroup.tsx)\n */\n FileAttachmentGroup: React.ComponentType<FileAttachmentGroupProps<StreamChatGenerics>>;\n /**\n * UI component for attachment icon for type 'file' attachment.\n * Defaults to: https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileIcon.tsx\n */\n FileAttachmentIcon: React.ComponentType<FileIconProps>;\n FlatList: typeof FlatList;\n /**\n * UI component to display image attachments\n * Defaults to: [Gallery](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Gallery.tsx)\n */\n Gallery: React.ComponentType<GalleryProps<StreamChatGenerics>>;\n /**\n * UI component for Giphy\n * Defaults to: [Giphy](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Giphy.tsx)\n */\n Giphy: React.ComponentType<GiphyProps<StreamChatGenerics>>;\n /**\n * The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default\n * */\n giphyVersion: keyof NonNullable<Attachment['giphy']>;\n\n /**\n * The indicator rendered when loading an image fails.\n */\n ImageLoadingFailedIndicator: React.ComponentType<ImageLoadingFailedIndicatorProps>;\n\n /**\n * The indicator rendered when image is loading. By default renders <ActivityIndicator/>\n */\n ImageLoadingIndicator: React.ComponentType<ImageLoadingIndicatorProps>;\n\n /**\n * When true, messageList will be scrolled at first unread message, when opened.\n */\n initialScrollToFirstUnreadMessage: boolean;\n /**\n * UI component for Message Date Separator Component\n * Defaults to: [InlineDateSeparator](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/InlineDateSeparator.tsx)\n */\n InlineDateSeparator: React.ComponentType<InlineDateSeparatorProps>;\n /**\n * UI component for InlineUnreadIndicator\n * Defaults to: [InlineUnreadIndicator](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/InlineUnreadIndicator.tsx)\n **/\n InlineUnreadIndicator: React.ComponentType;\n\n Message: React.ComponentType<MessageProps<StreamChatGenerics>>;\n /**\n * UI component for MessageAvatar\n * Defaults to: [MessageAvatar](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageAvatar.tsx)\n **/\n MessageAvatar: React.ComponentType<MessageAvatarProps<StreamChatGenerics>>;\n /**\n * UI component for MessageContent\n * Defaults to: [MessageContent](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageContent.tsx)\n */\n MessageContent: React.ComponentType<MessageContentProps<StreamChatGenerics>>;\n /** Order to render the message content */\n messageContentOrder: MessageContentType[];\n /**\n * UI component for MessageDeleted\n * Defaults to: [MessageDeleted](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageDeleted.tsx)\n */\n MessageDeleted: React.ComponentType<MessageDeletedProps<StreamChatGenerics>>;\n /**\n * Custom message footer component\n */\n MessageFooter: React.ComponentType<MessageFooterProps<StreamChatGenerics>>;\n MessageList: React.ComponentType<MessageListProps<StreamChatGenerics>>;\n /**\n * Custom message pinned component\n */\n MessagePinnedHeader: React.ComponentType<MessagePinnedHeaderProps<StreamChatGenerics>>;\n\n /**\n * UI component for MessageReplies\n * Defaults to: [MessageReplies](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageReplies.tsx)\n */\n MessageReplies: React.ComponentType<MessageRepliesProps<StreamChatGenerics>>;\n /**\n * UI Component for MessageRepliesAvatars\n * Defaults to: [MessageRepliesAvatars](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageRepliesAvatars.tsx)\n */\n MessageRepliesAvatars: React.ComponentType<MessageRepliesAvatarsProps<StreamChatGenerics>>;\n /**\n * UI component for MessageSimple\n * Defaults to: [MessageSimple](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageSimple.tsx)\n */\n MessageSimple: React.ComponentType<MessageSimpleProps<StreamChatGenerics>>;\n /**\n * UI component for MessageStatus (delivered/read)\n * Defaults to: [MessageStatus](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageStatus.tsx)\n */\n MessageStatus: React.ComponentType<MessageStatusProps<StreamChatGenerics>>;\n /**\n * UI component for MessageSystem\n * Defaults to: [MessageSystem](https://getstream.io/chat/docs/sdk/reactnative/ui-components/message-system/)\n */\n MessageSystem: React.ComponentType<MessageSystemProps<StreamChatGenerics>>;\n /**\n * UI component for OverlayReactionList\n */\n OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n /**\n * UI component for ReactionList\n * Defaults to: [ReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Reaction/ReactionList.tsx)\n */\n ReactionList: React.ComponentType<ReactionListProps<StreamChatGenerics>>;\n removeMessage: (message: { id: string; parent_id?: string }) => void;\n /**\n * UI component for Reply\n * Defaults to: [Reply](https://getstream.io/chat/docs/sdk/reactnative/ui-components/reply/)\n */\n Reply: React.ComponentType<ReplyProps<StreamChatGenerics>>;\n /**\n * Override the api request for retry message functionality.\n */\n retrySendMessage: (message: MessageResponse<StreamChatGenerics>) => Promise<void>;\n /**\n * UI component for ScrollToBottomButton\n * Defaults to: [ScrollToBottomButton](https://getstream.io/chat/docs/sdk/reactnative/ui-components/scroll-to-bottom-button/)\n */\n ScrollToBottomButton: React.ComponentType<ScrollToBottomButtonProps>;\n sendReaction: (type: string, messageId: string) => Promise<void>;\n setEditingState: (message: MessageType<StreamChatGenerics>) => void;\n setQuotedMessageState: (message: MessageType<StreamChatGenerics>) => void;\n supportedReactions: ReactionData[];\n /**\n * UI component for TypingIndicator\n * Defaults to: [TypingIndicator](https://getstream.io/chat/docs/sdk/reactnative/ui-components/typing-indicator/)\n */\n TypingIndicator: React.ComponentType;\n /**\n * UI component for TypingIndicatorContainer\n * Defaults to: [TypingIndicatorContainer](https://getstream.io/chat/docs/sdk/reactnative/contexts/messages-context/#typingindicatorcontainer)\n */\n TypingIndicatorContainer: React.ComponentType;\n updateMessage: (\n updatedMessage: MessageResponse<StreamChatGenerics>,\n extraState?: {\n commands?: SuggestionCommand<StreamChatGenerics>[];\n messageInput?: string;\n threadMessages?: ChannelState<StreamChatGenerics>['threads'][string];\n },\n ) => void;\n /**\n * Custom UI component to display enriched url preview.\n * Defaults to https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx\n */\n UrlPreview: React.ComponentType<CardProps<StreamChatGenerics>>;\n VideoThumbnail: React.ComponentType<VideoThumbnailProps>;\n /**\n * Provide any additional props for `TouchableOpacity` which wraps inner MessageContent component here.\n * Please check docs for TouchableOpacity for supported props - https://reactnative.dev/docs/touchableopacity#props\n *\n * @overrideType Object\n */\n additionalTouchableProps?: Omit<TouchableOpacityProps, 'style'>;\n /**\n * Custom UI component to override default cover (between Header and Footer) of Card component.\n * Accepts the same props as Card component.\n */\n CardCover?: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * Custom UI component to override default Footer of Card component.\n * Accepts the same props as Card component.\n */\n CardFooter?: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * Custom UI component to override default header of Card component.\n * Accepts the same props as Card component.\n */\n CardHeader?: React.ComponentType<CardProps<StreamChatGenerics>>;\n\n /**\n * Full override of the delete message button in the Message Actions\n *\n * Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.\n */\n\n /** Control if the deleted message is visible to both the send and reciever, either of them or none */\n deletedMessagesVisibilityType?: DeletedMessagesVisibilityType;\n\n disableTypingIndicator?: boolean;\n\n /**\n * Whether messages should be aligned to right or left part of screen.\n * By default, messages will be received messages will be aligned to left and\n * sent messages will be aligned to right.\n */\n forceAlignMessages?: Alignment | boolean;\n /**\n * Optional function to custom format the message date\n */\n formatDate?: (date: TDateTimeParserInput) => string;\n getMessagesGroupStyles?: typeof getGroupStyles;\n handleBlock?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a copy message action is invoked */\n handleCopy?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a delete message action is invoked */\n handleDelete?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when an edit message action is invoked */\n handleEdit?: (message: MessageType<StreamChatGenerics>) => void;\n /** Handler to access when a flag message action is invoked */\n handleFlag?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a mute user action is invoked */\n handleMute?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a pin/unpin user action is invoked*/\n handlePinMessage?: ((message: MessageType<StreamChatGenerics>) => MessageActionType) | null;\n /** Handler to access when a quoted reply action is invoked */\n handleQuotedReply?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to process a reaction */\n handleReaction?: (\n message: MessageType<StreamChatGenerics>,\n reactionType: string,\n ) => Promise<void>;\n /** Handler to access when a retry action is invoked */\n handleRetry?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a thread reply action is invoked */\n handleThreadReply?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to deal with custom memoization logic of Attachment */\n isAttachmentEqual?: (\n prevAttachment: Attachment<StreamChatGenerics>,\n nextAttachment: Attachment<StreamChatGenerics>,\n ) => boolean;\n legacyImageViewerSwipeBehaviour?: boolean;\n /** Object specifying rules defined within simple-markdown https://github.com/Khan/simple-markdown#adding-a-simple-extension */\n markdownRules?: MarkdownRules;\n /**\n * Use this prop to override message actions (which pop-up in message overlay).\n *\n * You can either completely override the default messageActions object.\n *\n * ```\n * <Channel\n * messageActions=[\n * {\n * action: () => { someAction() };\n * title: \"Pin Message\";\n * icon: PinIcon;\n * titleStyle: {};\n * },\n * {\n * action: () => { someAction() };\n * title: \"Delete Message\";\n * icon: PinIcon;\n * titleStyle: {};\n * }\n * ]\n * >\n * </Channel>\n * ```\n *\n * Or you can selectly keep certain action and remove some:\n *\n * e.g. Lets say you only want to keep threadReply and copyMessage actions\n *\n * ```\n * <Channel\n * messageActions={({\n * blockUser,\n * copyMessage,\n * deleteMessage,\n * editMessage,\n * flagMessage,\n * muteUser,\n * quotedReply,\n * retry,\n * threadReply,\n * }) => ([\n * threadReply, copyMessage\n * ])}\n * >\n * </Channel>\n * ```\n *\n * @overrideType Function | Array<Objects>\n */\n messageActions?: (param: MessageActionsParams<StreamChatGenerics>) => MessageActionType[];\n /**\n * Custom message header component\n */\n MessageHeader?: React.ComponentType<MessageFooterProps<StreamChatGenerics>>;\n /** Custom UI component for message text */\n MessageText?: React.ComponentType<MessageTextProps<StreamChatGenerics>>;\n\n /**\n * Theme provided only to messages that are the current users\n */\n myMessageTheme?: DeepPartial<Theme>;\n /**\n * Override default handler for onLongPress on message. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onLongPressMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occured\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onLongPressMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n /**\n * Add onPressIn handler for attachments. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onPressInMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occured\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onPressInMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n /**\n * Override onPress handler for message. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onPressMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occurred\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onPressMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n\n /**\n * Full override of the reaction function on Message and Message Overlay\n *\n * Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.\n * */\n selectReaction?: (\n message: MessageType<StreamChatGenerics>,\n ) => (reactionType: string) => Promise<void>;\n\n targetedMessage?: string;\n};\n\nexport const MessagesContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as MessagesContextValue,\n);\n\nexport const MessagesProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessagesContextValue<StreamChatGenerics>;\n}>) => (\n <MessagesContext.Provider value={value as unknown as MessagesContextValue}>\n {children}\n </MessagesContext.Provider>\n);\n\nexport const useMessagesContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => {\n const contextValue = useContext(\n MessagesContext,\n ) as unknown as MessagesContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useMessagesContext hook was called outside of the MessagesContext provider. Make sure you have configured MessageList component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#message-list`,\n );\n }\n\n return contextValue;\n};\n\n/**\n * Typescript currently does not support partial inference so if MessagesContext\n * typing is desired while using the HOC withMessagesContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessagesContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessagesContextValue<StreamChatGenerics>>> => {\n const WithMessagesContextComponent = (\n props: Omit<P, keyof MessagesContextValue<StreamChatGenerics>>,\n ) => {\n const messagesContext = useMessagesContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messagesContext} />;\n };\n WithMessagesContextComponent.displayName = `WithMessagesContext${getDisplayName(Component)}`;\n return WithMessagesContextComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAwDA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAA+D,IAAAI,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAAR,qBAAA,GAAAC,MAAA,CA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ACtE,IAAMC,4BAA4B,GAAG,SAA/BA,4BAA4BA,CAChCC,KAA8D,EAC3D;IACH,IAAMC,eAAe,GAAGT,kBAAkB,CAAqB,CAAC;IAEhE,OAAO9C,MAAA,YAAAuC,aAAA,CAACa,SAAS,MAAAI,SAAA,iBAAMF,KAAK,EAAYC,eAAe;MAAAd,MAAA,EAAAnC,KAAA;MAAAoC,QAAA;QAAAC,QAAA,EAAApC,YAAA;QAAAqC,UAAA;QAAAC,YAAA;MAAA;IAAA,EAAG,CAAC;EAC7D,CAAC;EACDQ,4BAA4B,CAACI,WAAW,2BAAyB,IAAAC,8BAAc,EAACN,SAAS,CAAG;EAC5F,OAAOC,4BAA4B;AACrC,CAAC;AAACnB,OAAA,CAAAiB,mBAAA,GAAAA,mBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_defaultBaseContextValue","_getDisplayName","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","OverlayContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","exports","useOverlayContext","contextValue","useContext","isTestEnvironment","Error","withOverlayContext","Component","WithOverlayContextComponent","props","overlayContext","createElement","_extends2","__self","__source","fileName","lineNumber","columnNumber","displayName","getDisplayName"],"sources":["OverlayContext.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport type { BottomSheetMethods } from '@gorhom/bottom-sheet/lib/typescript/types';\nimport type { Attachment } from 'stream-chat';\n\nimport type { AttachmentPickerProps } from '../../components/AttachmentPicker/AttachmentPicker';\nimport type { ImageGalleryCustomComponents } from '../../components/ImageGallery/ImageGallery';\n\nimport type { MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport type { Streami18n } from '../../utils/Streami18n';\nimport type { AttachmentPickerContextValue } from '../attachmentPickerContext/AttachmentPickerContext';\nimport type { MessageOverlayContextValue } from '../messageOverlayContext/MessageOverlayContext';\nimport type { DeepPartial } from '../themeContext/ThemeContext';\nimport type { Theme } from '../themeContext/utils/theme';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type Overlay = 'alert' | 'gallery' | 'message' | 'none';\n\nexport type OverlayContextValue = {\n overlay: Overlay;\n setOverlay: React.Dispatch<React.SetStateAction<Overlay>>;\n style?: DeepPartial<Theme>;\n translucentStatusBar?: boolean;\n};\n\nexport const OverlayContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as OverlayContextValue,\n);\n\nexport type OverlayProviderProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<AttachmentPickerProps> &\n Partial<\n Pick<\n AttachmentPickerContextValue,\n | 'attachmentPickerBottomSheetHeight'\n | 'attachmentSelectionBarHeight'\n | 'bottomInset'\n | 'CameraSelectorIcon'\n | 'FileSelectorIcon'\n | 'ImageSelectorIcon'\n | 'topInset'\n >\n > &\n ImageGalleryCustomComponents<StreamChatGenerics> &\n Partial<\n Pick<\n MessageOverlayContextValue<StreamChatGenerics>,\n | 'MessageActionList'\n | 'MessageActionListItem'\n | 'OverlayReactionList'\n | 'OverlayReactions'\n | 'OverlayReactionsAvatar'\n >\n > &\n Pick<OverlayContextValue, 'translucentStatusBar'> & {\n /**\n * The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default\n * */\n closePicker?: (ref: React.RefObject<BottomSheetMethods>) => void;\n error?: boolean | Error;\n giphyVersion?: keyof NonNullable<Attachment['giphy']>;\n /** https://github.com/GetStream/stream-chat-react-native/wiki/Internationalization-(i18n) */\n i18nInstance?: Streami18n;\n imageGalleryGridHandleHeight?: number;\n imageGalleryGridSnapPoints?: [string | number, string | number];\n isMyMessage?: boolean;\n isThreadMessage?: boolean;\n message?: MessageType<StreamChatGenerics>;\n messageReactions?: boolean;\n messageTextNumberOfLines?: number;\n numberOfImageGalleryGridColumns?: number;\n openPicker?: (ref: React.RefObject<BottomSheetMethods>) => void;\n value?: Partial<OverlayContextValue>;\n };\n\nexport const useOverlayContext = () => {\n const contextValue = useContext(OverlayContext);\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useOverlayContext hook was called outside the OverlayContext Provider. Make sure you have configured OverlayProvider component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#overlay-provider`,\n );\n }\n\n return contextValue;\n};\n\nexport const withOverlayContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<StreamChatGenerics>,\n): React.FC<Omit<StreamChatGenerics, keyof OverlayContextValue>> => {\n const WithOverlayContextComponent = (\n props: Omit<StreamChatGenerics, keyof OverlayContextValue>,\n ) => {\n const overlayContext = useOverlayContext();\n\n return <Component {...(props as StreamChatGenerics)} {...overlayContext} />;\n };\n WithOverlayContextComponent.displayName = `WithOverlayContext${getDisplayName(\n Component as React.ComponentType,\n )}`;\n return WithOverlayContextComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAeA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAA+D,IAAAI,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;A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OAAOH,YAAY;AACrB,CAAC;AAACF,OAAA,CAAAC,iBAAA,GAAAA,iBAAA;AAEK,IAAMK,kBAAkB,GAAG,SAArBA,kBAAkBA,CAG7BC,SAAkD,EACgB;EAClE,IAAMC,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAC/BC,KAA0D,EACvD;IACH,IAAMC,cAAc,GAAGT,iBAAiB,EAAE;IAE1C,OAAOnC,MAAA,YAAA6C,aAAA,CAACJ,SAAS,MAAAK,SAAA,iBAAMH,KAAK,EAA6BC,cAAc;MAAAG,MAAA,EAAAzC,KAAA;MAAA0C,QAAA;QAAAC,QAAA,EAAA1C,YAAA;QAAA2C,UAAA;QAAAC,YAAA;MAAA;IAAA,GAAI;EAC7E,CAAC;EACDT,2BAA2B,CAACU,WAAW,0BAAwB,IAAAC,8BAAc,EAC3EZ,SAAS,CACR;EACH,OAAOC,2BAA2B;AACpC,CAAC;AAACR,OAAA,CAAAM,kBAAA,GAAAA,kBAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_defaultBaseContextValue","_getDisplayName","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","OverlayContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","exports","useOverlayContext","contextValue","useContext","isTestEnvironment","Error","withOverlayContext","Component","WithOverlayContextComponent","props","overlayContext","createElement","_extends2","__self","__source","fileName","lineNumber","columnNumber","displayName","getDisplayName"],"sources":["OverlayContext.tsx"],"sourcesContent":["import React, { useContext } from 'react';\n\nimport type { BottomSheetMethods } from '@gorhom/bottom-sheet/lib/typescript/types';\nimport type { Attachment } from 'stream-chat';\n\nimport type { AttachmentPickerProps } from '../../components/AttachmentPicker/AttachmentPicker';\nimport type { ImageGalleryCustomComponents } from '../../components/ImageGallery/ImageGallery';\n\nimport type { MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport type { Streami18n } from '../../utils/Streami18n';\nimport type { AttachmentPickerContextValue } from '../attachmentPickerContext/AttachmentPickerContext';\nimport type { MessageOverlayContextValue } from '../messageOverlayContext/MessageOverlayContext';\nimport type { DeepPartial } from '../themeContext/ThemeContext';\nimport type { Theme } from '../themeContext/utils/theme';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type Overlay = 'alert' | 'gallery' | 'message' | 'none';\n\nexport type OverlayContextValue = {\n overlay: Overlay;\n setOverlay: React.Dispatch<React.SetStateAction<Overlay>>;\n style?: DeepPartial<Theme>;\n translucentStatusBar?: boolean;\n};\n\nexport const OverlayContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as OverlayContextValue,\n);\n\nexport type OverlayProviderProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<AttachmentPickerProps> &\n Partial<\n Pick<\n AttachmentPickerContextValue,\n | 'attachmentPickerBottomSheetHeight'\n | 'attachmentSelectionBarHeight'\n | 'bottomInset'\n | 'CameraSelectorIcon'\n | 'FileSelectorIcon'\n | 'ImageSelectorIcon'\n | 'topInset'\n >\n > &\n ImageGalleryCustomComponents<StreamChatGenerics> &\n Partial<\n Pick<\n MessageOverlayContextValue<StreamChatGenerics>,\n | 'MessageActionList'\n | 'MessageActionListItem'\n | 'OverlayReactionList'\n | 'OverlayReactions'\n | 'OverlayReactionsAvatar'\n >\n > &\n Pick<OverlayContextValue, 'translucentStatusBar'> & {\n /**\n * The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default\n * */\n closePicker?: (ref: React.RefObject<BottomSheetMethods>) => void;\n error?: boolean | Error;\n giphyVersion?: keyof NonNullable<Attachment['giphy']>;\n /** https://github.com/GetStream/stream-chat-react-native/wiki/Internationalization-(i18n) */\n i18nInstance?: Streami18n;\n imageGalleryGridHandleHeight?: number;\n imageGalleryGridSnapPoints?: [string | number, string | number];\n isMyMessage?: boolean;\n isThreadMessage?: boolean;\n message?: MessageType<StreamChatGenerics>;\n messageReactions?: boolean;\n messageTextNumberOfLines?: number;\n numberOfImageGalleryGridColumns?: number;\n openPicker?: (ref: React.RefObject<BottomSheetMethods>) => void;\n value?: Partial<OverlayContextValue>;\n };\n\nexport const useOverlayContext = () => {\n const contextValue = useContext(OverlayContext);\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useOverlayContext hook was called outside the OverlayContext Provider. Make sure you have configured OverlayProvider component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#overlay-provider`,\n );\n }\n\n return contextValue;\n};\n\nexport const withOverlayContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<StreamChatGenerics>,\n): React.FC<Omit<StreamChatGenerics, keyof OverlayContextValue>> => {\n const WithOverlayContextComponent = (\n props: Omit<StreamChatGenerics, keyof OverlayContextValue>,\n ) => {\n const overlayContext = useOverlayContext();\n\n return <Component {...(props as StreamChatGenerics)} {...overlayContext} />;\n };\n WithOverlayContextComponent.displayName = `WithOverlayContext${getDisplayName(\n Component as React.ComponentType,\n )}`;\n return WithOverlayContextComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAeA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAA+D,IAAAI,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA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AAY,KAAKH,mDAA0B,IAAI,CAAC,IAAAK,oCAAiB,EAAC,CAAC,EAAE;IACvE,MAAM,IAAIC,KAAK,2OAEf,CAAC;EACH;EAEA,OAAOH,YAAY;AACrB,CAAC;AAACF,OAAA,CAAAC,iBAAA,GAAAA,iBAAA;AAEK,IAAMK,kBAAkB,GAAG,SAArBA,kBAAkBA,CAG7BC,SAAkD,EACgB;EAClE,IAAMC,2BAA2B,GAAG,SAA9BA,2BAA2BA,CAC/BC,KAA0D,EACvD;IACH,IAAMC,cAAc,GAAGT,iBAAiB,CAAC,CAAC;IAE1C,OAAOnC,MAAA,YAAA6C,aAAA,CAACJ,SAAS,MAAAK,SAAA,iBAAMH,KAAK,EAA6BC,cAAc;MAAAG,MAAA,EAAAzC,KAAA;MAAA0C,QAAA;QAAAC,QAAA,EAAA1C,YAAA;QAAA2C,UAAA;QAAAC,YAAA;MAAA;IAAA,EAAG,CAAC;EAC7E,CAAC;EACDT,2BAA2B,CAACU,WAAW,0BAAwB,IAAAC,8BAAc,EAC3EZ,SACF,CAAG;EACH,OAAOC,2BAA2B;AACpC,CAAC;AAACR,OAAA,CAAAM,kBAAA,GAAAA,kBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_OverlayContext","_AttachmentPicker","_AttachmentPickerBottomSheetHandle","_AttachmentPickerError","_AttachmentPickerErrorImage","_CameraSelectorIcon","_FileSelectorIcon","_ImageOverlaySelectedComponent","_ImageSelectorIcon","_ImageGallery","_MessageOverlay","_OverlayBackdrop","_useStreami18n","_AttachmentPickerContext","_ImageGalleryContext","_MessageOverlayContext","_ThemeContext","_TranslationContext","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","OverlayProvider","props","bottomSheetCloseTimeoutRef","useRef","_props$AttachmentPick","AttachmentPickerBottomSheetHandle","DefaultAttachmentPickerBottomSheetHandle","attachmentPickerBottomSheetHandleHeight","attachmentPickerBottomSheetHeight","_props$AttachmentPick2","AttachmentPickerError","DefaultAttachmentPickerError","attachmentPickerErrorButtonText","_props$AttachmentPick3","AttachmentPickerErrorImage","DefaultAttachmentPickerErrorImage","attachmentPickerErrorText","attachmentSelectionBarHeight","bottomInset","_props$CameraSelector","CameraSelectorIcon","DefaultCameraSelectorIcon","children","_props$closePicker","closePicker","ref","_ref$current","current","close","clearTimeout","setTimeout","_ref$current2","_props$FileSelectorIc","FileSelectorIcon","DefaultFileSelectorIcon","giphyVersion","i18nInstance","imageGalleryCustomComponents","imageGalleryGridHandleHeight","imageGalleryGridSnapPoints","_props$ImageOverlaySe","ImageOverlaySelectedComponent","DefaultImageOverlaySelectedComponent","_props$ImageSelectorI","ImageSelectorIcon","DefaultImageSelectorIcon","MessageActionList","MessageActionListItem","messageTextNumberOfLines","numberOfAttachmentImagesToLoadPerCall","numberOfAttachmentPickerImageColumns","numberOfImageGalleryGridColumns","_props$openPicker","openPicker","_ref$current3","snapToIndex","console","warn","topInset","translucentStatusBar","OverlayReactionList","OverlayReactions","OverlayReactionsAvatar","value","attachmentPickerProps","bottomSheetRef","_useState","useState","overlay","_useState2","_slicedToArray2","setOverlay","overlayOpacity","useSharedValue","_Dimensions$get","Dimensions","height","width","translators","useStreami18n","useEffect","backAction","backHandler","BackHandler","addEventListener","remove","cancelAnimation","withTiming","attachmentPickerContext","overlayStyle","useAnimatedStyle","opacity","overlayContext","style","createElement","TranslationProvider","_extends2","userLanguage","DEFAULT_USER_LANGUAGE","__self","__source","fileName","lineNumber","columnNumber","OverlayContext","Provider","MessageOverlayProvider","AttachmentPickerProvider","ImageGalleryProvider","ThemeProvider","View","pointerEvents","StyleSheet","absoluteFill","OverlayBackdrop","MessageOverlay","ImageGallery","AttachmentPicker","exports"],"sources":["OverlayProvider.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';\n\nimport { BackHandler, Dimensions, StyleSheet, ViewStyle } from 'react-native';\n\nimport Animated, {\n cancelAnimation,\n useAnimatedStyle,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated';\n\nimport type BottomSheet from '@gorhom/bottom-sheet';\n\nimport { OverlayContext, OverlayProviderProps } from './OverlayContext';\n\nimport { AttachmentPicker } from '../../components/AttachmentPicker/AttachmentPicker';\n\nimport { AttachmentPickerBottomSheetHandle as DefaultAttachmentPickerBottomSheetHandle } from '../../components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle';\nimport { AttachmentPickerError as DefaultAttachmentPickerError } from '../../components/AttachmentPicker/components/AttachmentPickerError';\nimport { AttachmentPickerErrorImage as DefaultAttachmentPickerErrorImage } from '../../components/AttachmentPicker/components/AttachmentPickerErrorImage';\nimport { CameraSelectorIcon as DefaultCameraSelectorIcon } from '../../components/AttachmentPicker/components/CameraSelectorIcon';\nimport { FileSelectorIcon as DefaultFileSelectorIcon } from '../../components/AttachmentPicker/components/FileSelectorIcon';\nimport { ImageOverlaySelectedComponent as DefaultImageOverlaySelectedComponent } from '../../components/AttachmentPicker/components/ImageOverlaySelectedComponent';\nimport { ImageSelectorIcon as DefaultImageSelectorIcon } from '../../components/AttachmentPicker/components/ImageSelectorIcon';\nimport { ImageGallery } from '../../components/ImageGallery/ImageGallery';\nimport { MessageOverlay } from '../../components/MessageOverlay/MessageOverlay';\nimport { OverlayBackdrop } from '../../components/MessageOverlay/OverlayBackdrop';\nimport { useStreami18n } from '../../hooks/useStreami18n';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { AttachmentPickerProvider } from '../attachmentPickerContext/AttachmentPickerContext';\nimport { ImageGalleryProvider } from '../imageGalleryContext/ImageGalleryContext';\nimport { MessageOverlayProvider } from '../messageOverlayContext/MessageOverlayContext';\nimport { ThemeProvider } from '../themeContext/ThemeContext';\nimport {\n DEFAULT_USER_LANGUAGE,\n TranslationProvider,\n} from '../translationContext/TranslationContext';\n\n/**\n * - The highest level of these components is the `OverlayProvider`. The `OverlayProvider` allows users to interact with messages on long press above the underlying views, use the full screen image viewer, and use the `AttachmentPicker` as a keyboard-esk view.\n * Because these views must exist above all others `OverlayProvider` should wrap your navigation stack as well. Assuming [`React Navigation`](https://reactnavigation.org/) is being used, your highest level navigation stack should be wrapped in the provider:\n *\n * ```js\n * <NavigationContainer>\n * <OverlayProvider>\n * <Stack.Navigator>\n * <Stack.Screen />\n * </Stack.Navigator>\n * </OverlayProvider>\n * </NavigationContainer>\n * ```\n *\n * - Don't forget to check our cookbook section of [OverlayProvider](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#overlayprovider)\n *\n * - Also check the [visual component guide](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#custom-components), to learn about component customizations.\n *\n * @example ./OverlayProvider.md\n */\nexport const OverlayProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: PropsWithChildren<OverlayProviderProps<StreamChatGenerics>>,\n) => {\n const bottomSheetCloseTimeoutRef = useRef<NodeJS.Timeout>();\n const {\n AttachmentPickerBottomSheetHandle = DefaultAttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError = DefaultAttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage = DefaultAttachmentPickerErrorImage,\n attachmentPickerErrorText,\n attachmentSelectionBarHeight,\n bottomInset,\n CameraSelectorIcon = DefaultCameraSelectorIcon,\n children,\n closePicker = (ref) => {\n if (ref.current?.close) {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n ref.current.close();\n // Attempt to close the bottomsheet again to circumvent accidental opening on Android.\n // Details: This to prevent a race condition where the close function is called during the point when a internal container layout happens within the bottomsheet due to keyboard affecting the layout\n // If the container layout measures a shorter height than previous but if the close snapped to the previous height's position, the bottom sheet will show up\n // this short delay ensures that close function is always called after a container layout due to keyboard change\n // NOTE: this timeout has to be above 500 as the keyboardAnimationDuration is 500 in the bottomsheet library - see src/hooks/useKeyboard.ts there for more details\n bottomSheetCloseTimeoutRef.current = setTimeout(() => {\n ref.current?.close();\n }, 600);\n }\n },\n FileSelectorIcon = DefaultFileSelectorIcon,\n giphyVersion,\n i18nInstance,\n imageGalleryCustomComponents,\n imageGalleryGridHandleHeight,\n imageGalleryGridSnapPoints,\n ImageOverlaySelectedComponent = DefaultImageOverlaySelectedComponent,\n ImageSelectorIcon = DefaultImageSelectorIcon,\n MessageActionList,\n MessageActionListItem,\n messageTextNumberOfLines,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n numberOfImageGalleryGridColumns,\n openPicker = (ref) => {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n if (ref.current?.snapToIndex) {\n ref.current.snapToIndex(0);\n } else {\n console.warn('bottom and top insets must be set for the image picker to work correctly');\n }\n },\n topInset,\n translucentStatusBar,\n OverlayReactionList,\n OverlayReactions,\n OverlayReactionsAvatar,\n value,\n } = props;\n\n const attachmentPickerProps = {\n AttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage,\n attachmentPickerErrorText,\n attachmentSelectionBarHeight,\n ImageOverlaySelectedComponent,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n translucentStatusBar,\n };\n\n const bottomSheetRef = useRef<BottomSheet>(null);\n\n const [overlay, setOverlay] = useState(value?.overlay || 'none');\n\n const overlayOpacity = useSharedValue(0);\n const { height, width } = Dimensions.get('screen');\n\n // Setup translators\n const translators = useStreami18n(i18nInstance);\n\n useEffect(() => {\n const backAction = () => {\n if (overlay !== 'none') {\n setOverlay('none');\n return true;\n }\n\n return false;\n };\n\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);\n\n return () => backHandler.remove();\n }, [overlay]);\n\n useEffect(\n () =>\n // cleanup the timeout if the component unmounts\n () => {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n },\n [],\n );\n\n useEffect(() => {\n closePicker(bottomSheetRef);\n cancelAnimation(overlayOpacity);\n if (overlay !== 'none') {\n overlayOpacity.value = withTiming(1);\n } else {\n overlayOpacity.value = withTiming(0);\n }\n }, [overlay]);\n\n const attachmentPickerContext = {\n attachmentPickerBottomSheetHeight,\n attachmentSelectionBarHeight,\n bottomInset,\n CameraSelectorIcon,\n closePicker: () => closePicker(bottomSheetRef),\n FileSelectorIcon,\n ImageSelectorIcon,\n openPicker: () => openPicker(bottomSheetRef),\n topInset,\n };\n\n const overlayStyle = useAnimatedStyle<ViewStyle>(\n () => ({\n opacity: overlayOpacity.value,\n }),\n [],\n );\n\n const overlayContext = {\n overlay,\n setOverlay,\n style: value?.style,\n translucentStatusBar,\n };\n\n return (\n <TranslationProvider value={{ ...translators, userLanguage: DEFAULT_USER_LANGUAGE }}>\n <OverlayContext.Provider value={overlayContext}>\n <MessageOverlayProvider<StreamChatGenerics>>\n <AttachmentPickerProvider value={attachmentPickerContext}>\n <ImageGalleryProvider>\n {children}\n <ThemeProvider style={overlayContext.style}>\n <Animated.View\n pointerEvents={overlay === 'none' ? 'none' : 'auto'}\n style={[StyleSheet.absoluteFill, overlayStyle]}\n >\n <OverlayBackdrop style={[StyleSheet.absoluteFill, { height, width }]} />\n </Animated.View>\n {overlay === 'message' && (\n <MessageOverlay<StreamChatGenerics>\n MessageActionList={MessageActionList}\n MessageActionListItem={MessageActionListItem}\n messageTextNumberOfLines={messageTextNumberOfLines}\n overlayOpacity={overlayOpacity}\n OverlayReactionList={OverlayReactionList}\n OverlayReactions={OverlayReactions}\n OverlayReactionsAvatar={OverlayReactionsAvatar}\n />\n )}\n {overlay === 'gallery' && (\n <ImageGallery<StreamChatGenerics>\n giphyVersion={giphyVersion}\n imageGalleryCustomComponents={imageGalleryCustomComponents}\n imageGalleryGridHandleHeight={imageGalleryGridHandleHeight}\n imageGalleryGridSnapPoints={imageGalleryGridSnapPoints}\n numberOfImageGalleryGridColumns={numberOfImageGalleryGridColumns}\n overlayOpacity={overlayOpacity}\n />\n )}\n <AttachmentPicker ref={bottomSheetRef} {...attachmentPickerProps} />\n </ThemeProvider>\n </ImageGalleryProvider>\n </AttachmentPickerProvider>\n </MessageOverlayProvider>\n </OverlayContext.Provider>\n </TranslationProvider>\n );\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AASA,IAAAG,eAAA,GAAAH,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,kCAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAN,OAAA;AACA,IAAAO,2BAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AACA,IAAAS,iBAAA,GAAAT,OAAA;AACA,IAAAU,8BAAA,GAAAV,OAAA;AACA,IAAAW,kBAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,eAAA,GAAAb,OAAA;AACA,IAAAc,gBAAA,GAAAd,OAAA;AACA,IAAAe,cAAA,GAAAf,OAAA;AAGA,IAAAgB,wBAAA,GAAAhB,OAAA;AACA,IAAAiB,oBAAA,GAAAjB,OAAA;AACA,IAAAkB,sBAAA,GAAAlB,OAAA;AACA,IAAAmB,aAAA,GAAAnB,OAAA;AACA,IAAAoB,mBAAA,GAAApB,OAAA;AAGkD,IAAAqB,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,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AyB;IACnDwB,cAAc,EAAEA,cAAe;IAC/BZ,mBAAmB,EAAEA,mBAAoB;IACzCC,gBAAgB,EAAEA,gBAAiB;IACnCC,sBAAsB,EAAEA,sBAAuB;IAAAqC,MAAA,EAAA3H,KAAA;IAAA4H,QAAA;MAAAC,QAAA,EAAA5H,YAAA;MAAA6H,UAAA;MAAAC,YAAA;IAAA;EAAA,EAElD,EACAnC,OAAO,KAAK,SAAS,IACpBnH,MAAA,YAAA6I,aAAA,CAAC/H,aAAA,CAAAqJ,YAAY;IACXjF,YAAY,EAAEA,YAAa;IAC3BE,4BAA4B,EAAEA,4BAA6B;IAC3DC,4BAA4B,EAAEA,4BAA6B;IAC3DC,0BAA0B,EAAEA,0BAA2B;IACvDY,+BAA+B,EAAEA,+BAAgC;IACjEqB,cAAc,EAAEA,cAAe;IAAA2B,MAAA,EAAA3H,KAAA;IAAA4H,QAAA;MAAAC,QAAA,EAAA5H,YAAA;MAAA6H,UAAA;MAAAC,YAAA;IAAA;EAAA,EAElC,EACDtJ,MAAA,YAAA6I,aAAA,CAACvI,iBAAA,CAAA8J,gBAAgB,MAAArB,SAAA;IAACvE,GAAG,EAAEwC;EAAe,GAAKD,qBAAqB;IAAAmC,MAAA,EAAA3H,KAAA;IAAA4H,QAAA;MAAAC,QAAA,EAAA5H,YAAA;MAAA6H,UAAA;MAAAC,YAAA;IAAA;EAAA,GAAI,CACtD,CACK,CACE,CACJ,CACD,CACN;AAE1B,CAAC;AAACe,OAAA,CAAAtH,eAAA,GAAAA,eAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_OverlayContext","_AttachmentPicker","_AttachmentPickerBottomSheetHandle","_AttachmentPickerError","_AttachmentPickerErrorImage","_CameraSelectorIcon","_FileSelectorIcon","_ImageOverlaySelectedComponent","_ImageSelectorIcon","_ImageGallery","_MessageOverlay","_OverlayBackdrop","_useStreami18n","_AttachmentPickerContext","_ImageGalleryContext","_MessageOverlayContext","_ThemeContext","_TranslationContext","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","OverlayProvider","props","bottomSheetCloseTimeoutRef","useRef","_props$AttachmentPick","AttachmentPickerBottomSheetHandle","DefaultAttachmentPickerBottomSheetHandle","attachmentPickerBottomSheetHandleHeight","attachmentPickerBottomSheetHeight","_props$AttachmentPick2","AttachmentPickerError","DefaultAttachmentPickerError","attachmentPickerErrorButtonText","_props$AttachmentPick3","AttachmentPickerErrorImage","DefaultAttachmentPickerErrorImage","attachmentPickerErrorText","attachmentSelectionBarHeight","bottomInset","_props$CameraSelector","CameraSelectorIcon","DefaultCameraSelectorIcon","children","_props$closePicker","closePicker","ref","_ref$current","current","close","clearTimeout","setTimeout","_ref$current2","_props$FileSelectorIc","FileSelectorIcon","DefaultFileSelectorIcon","giphyVersion","i18nInstance","imageGalleryCustomComponents","imageGalleryGridHandleHeight","imageGalleryGridSnapPoints","_props$ImageOverlaySe","ImageOverlaySelectedComponent","DefaultImageOverlaySelectedComponent","_props$ImageSelectorI","ImageSelectorIcon","DefaultImageSelectorIcon","MessageActionList","MessageActionListItem","messageTextNumberOfLines","numberOfAttachmentImagesToLoadPerCall","numberOfAttachmentPickerImageColumns","numberOfImageGalleryGridColumns","_props$openPicker","openPicker","_ref$current3","snapToIndex","console","warn","topInset","translucentStatusBar","OverlayReactionList","OverlayReactions","OverlayReactionsAvatar","value","attachmentPickerProps","bottomSheetRef","_useState","useState","overlay","_useState2","_slicedToArray2","setOverlay","overlayOpacity","useSharedValue","_Dimensions$get","Dimensions","height","width","translators","useStreami18n","useEffect","backAction","backHandler","BackHandler","addEventListener","remove","cancelAnimation","withTiming","attachmentPickerContext","overlayStyle","useAnimatedStyle","opacity","overlayContext","style","createElement","TranslationProvider","_extends2","userLanguage","DEFAULT_USER_LANGUAGE","__self","__source","fileName","lineNumber","columnNumber","OverlayContext","Provider","MessageOverlayProvider","AttachmentPickerProvider","ImageGalleryProvider","ThemeProvider","View","pointerEvents","StyleSheet","absoluteFill","OverlayBackdrop","MessageOverlay","ImageGallery","AttachmentPicker","exports"],"sources":["OverlayProvider.tsx"],"sourcesContent":["import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';\n\nimport { BackHandler, Dimensions, StyleSheet, ViewStyle } from 'react-native';\n\nimport Animated, {\n cancelAnimation,\n useAnimatedStyle,\n useSharedValue,\n withTiming,\n} from 'react-native-reanimated';\n\nimport type BottomSheet from '@gorhom/bottom-sheet';\n\nimport { OverlayContext, OverlayProviderProps } from './OverlayContext';\n\nimport { AttachmentPicker } from '../../components/AttachmentPicker/AttachmentPicker';\n\nimport { AttachmentPickerBottomSheetHandle as DefaultAttachmentPickerBottomSheetHandle } from '../../components/AttachmentPicker/components/AttachmentPickerBottomSheetHandle';\nimport { AttachmentPickerError as DefaultAttachmentPickerError } from '../../components/AttachmentPicker/components/AttachmentPickerError';\nimport { AttachmentPickerErrorImage as DefaultAttachmentPickerErrorImage } from '../../components/AttachmentPicker/components/AttachmentPickerErrorImage';\nimport { CameraSelectorIcon as DefaultCameraSelectorIcon } from '../../components/AttachmentPicker/components/CameraSelectorIcon';\nimport { FileSelectorIcon as DefaultFileSelectorIcon } from '../../components/AttachmentPicker/components/FileSelectorIcon';\nimport { ImageOverlaySelectedComponent as DefaultImageOverlaySelectedComponent } from '../../components/AttachmentPicker/components/ImageOverlaySelectedComponent';\nimport { ImageSelectorIcon as DefaultImageSelectorIcon } from '../../components/AttachmentPicker/components/ImageSelectorIcon';\nimport { ImageGallery } from '../../components/ImageGallery/ImageGallery';\nimport { MessageOverlay } from '../../components/MessageOverlay/MessageOverlay';\nimport { OverlayBackdrop } from '../../components/MessageOverlay/OverlayBackdrop';\nimport { useStreami18n } from '../../hooks/useStreami18n';\n\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { AttachmentPickerProvider } from '../attachmentPickerContext/AttachmentPickerContext';\nimport { ImageGalleryProvider } from '../imageGalleryContext/ImageGalleryContext';\nimport { MessageOverlayProvider } from '../messageOverlayContext/MessageOverlayContext';\nimport { ThemeProvider } from '../themeContext/ThemeContext';\nimport {\n DEFAULT_USER_LANGUAGE,\n TranslationProvider,\n} from '../translationContext/TranslationContext';\n\n/**\n * - The highest level of these components is the `OverlayProvider`. The `OverlayProvider` allows users to interact with messages on long press above the underlying views, use the full screen image viewer, and use the `AttachmentPicker` as a keyboard-esk view.\n * Because these views must exist above all others `OverlayProvider` should wrap your navigation stack as well. Assuming [`React Navigation`](https://reactnavigation.org/) is being used, your highest level navigation stack should be wrapped in the provider:\n *\n * ```js\n * <NavigationContainer>\n * <OverlayProvider>\n * <Stack.Navigator>\n * <Stack.Screen />\n * </Stack.Navigator>\n * </OverlayProvider>\n * </NavigationContainer>\n * ```\n *\n * - Don't forget to check our cookbook section of [OverlayProvider](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#overlayprovider)\n *\n * - Also check the [visual component guide](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#custom-components), to learn about component customizations.\n *\n * @example ./OverlayProvider.md\n */\nexport const OverlayProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: PropsWithChildren<OverlayProviderProps<StreamChatGenerics>>,\n) => {\n const bottomSheetCloseTimeoutRef = useRef<NodeJS.Timeout>();\n const {\n AttachmentPickerBottomSheetHandle = DefaultAttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError = DefaultAttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage = DefaultAttachmentPickerErrorImage,\n attachmentPickerErrorText,\n attachmentSelectionBarHeight,\n bottomInset,\n CameraSelectorIcon = DefaultCameraSelectorIcon,\n children,\n closePicker = (ref) => {\n if (ref.current?.close) {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n ref.current.close();\n // Attempt to close the bottomsheet again to circumvent accidental opening on Android.\n // Details: This to prevent a race condition where the close function is called during the point when a internal container layout happens within the bottomsheet due to keyboard affecting the layout\n // If the container layout measures a shorter height than previous but if the close snapped to the previous height's position, the bottom sheet will show up\n // this short delay ensures that close function is always called after a container layout due to keyboard change\n // NOTE: this timeout has to be above 500 as the keyboardAnimationDuration is 500 in the bottomsheet library - see src/hooks/useKeyboard.ts there for more details\n bottomSheetCloseTimeoutRef.current = setTimeout(() => {\n ref.current?.close();\n }, 600);\n }\n },\n FileSelectorIcon = DefaultFileSelectorIcon,\n giphyVersion,\n i18nInstance,\n imageGalleryCustomComponents,\n imageGalleryGridHandleHeight,\n imageGalleryGridSnapPoints,\n ImageOverlaySelectedComponent = DefaultImageOverlaySelectedComponent,\n ImageSelectorIcon = DefaultImageSelectorIcon,\n MessageActionList,\n MessageActionListItem,\n messageTextNumberOfLines,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n numberOfImageGalleryGridColumns,\n openPicker = (ref) => {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n if (ref.current?.snapToIndex) {\n ref.current.snapToIndex(0);\n } else {\n console.warn('bottom and top insets must be set for the image picker to work correctly');\n }\n },\n topInset,\n translucentStatusBar,\n OverlayReactionList,\n OverlayReactions,\n OverlayReactionsAvatar,\n value,\n } = props;\n\n const attachmentPickerProps = {\n AttachmentPickerBottomSheetHandle,\n attachmentPickerBottomSheetHandleHeight,\n attachmentPickerBottomSheetHeight,\n AttachmentPickerError,\n attachmentPickerErrorButtonText,\n AttachmentPickerErrorImage,\n attachmentPickerErrorText,\n attachmentSelectionBarHeight,\n ImageOverlaySelectedComponent,\n numberOfAttachmentImagesToLoadPerCall,\n numberOfAttachmentPickerImageColumns,\n translucentStatusBar,\n };\n\n const bottomSheetRef = useRef<BottomSheet>(null);\n\n const [overlay, setOverlay] = useState(value?.overlay || 'none');\n\n const overlayOpacity = useSharedValue(0);\n const { height, width } = Dimensions.get('screen');\n\n // Setup translators\n const translators = useStreami18n(i18nInstance);\n\n useEffect(() => {\n const backAction = () => {\n if (overlay !== 'none') {\n setOverlay('none');\n return true;\n }\n\n return false;\n };\n\n const backHandler = BackHandler.addEventListener('hardwareBackPress', backAction);\n\n return () => backHandler.remove();\n }, [overlay]);\n\n useEffect(\n () =>\n // cleanup the timeout if the component unmounts\n () => {\n if (bottomSheetCloseTimeoutRef.current) {\n clearTimeout(bottomSheetCloseTimeoutRef.current);\n }\n },\n [],\n );\n\n useEffect(() => {\n closePicker(bottomSheetRef);\n cancelAnimation(overlayOpacity);\n if (overlay !== 'none') {\n overlayOpacity.value = withTiming(1);\n } else {\n overlayOpacity.value = withTiming(0);\n }\n }, [overlay]);\n\n const attachmentPickerContext = {\n attachmentPickerBottomSheetHeight,\n attachmentSelectionBarHeight,\n bottomInset,\n CameraSelectorIcon,\n closePicker: () => closePicker(bottomSheetRef),\n FileSelectorIcon,\n ImageSelectorIcon,\n openPicker: () => openPicker(bottomSheetRef),\n topInset,\n };\n\n const overlayStyle = useAnimatedStyle<ViewStyle>(\n () => ({\n opacity: overlayOpacity.value,\n }),\n [],\n );\n\n const overlayContext = {\n overlay,\n setOverlay,\n style: value?.style,\n translucentStatusBar,\n };\n\n return (\n <TranslationProvider value={{ ...translators, userLanguage: DEFAULT_USER_LANGUAGE }}>\n <OverlayContext.Provider value={overlayContext}>\n <MessageOverlayProvider<StreamChatGenerics>>\n <AttachmentPickerProvider value={attachmentPickerContext}>\n <ImageGalleryProvider>\n {children}\n <ThemeProvider style={overlayContext.style}>\n <Animated.View\n pointerEvents={overlay === 'none' ? 'none' : 'auto'}\n style={[StyleSheet.absoluteFill, overlayStyle]}\n >\n <OverlayBackdrop style={[StyleSheet.absoluteFill, { height, width }]} />\n </Animated.View>\n {overlay === 'message' && (\n <MessageOverlay<StreamChatGenerics>\n MessageActionList={MessageActionList}\n MessageActionListItem={MessageActionListItem}\n messageTextNumberOfLines={messageTextNumberOfLines}\n overlayOpacity={overlayOpacity}\n OverlayReactionList={OverlayReactionList}\n OverlayReactions={OverlayReactions}\n OverlayReactionsAvatar={OverlayReactionsAvatar}\n />\n )}\n {overlay === 'gallery' && (\n <ImageGallery<StreamChatGenerics>\n giphyVersion={giphyVersion}\n imageGalleryCustomComponents={imageGalleryCustomComponents}\n imageGalleryGridHandleHeight={imageGalleryGridHandleHeight}\n imageGalleryGridSnapPoints={imageGalleryGridSnapPoints}\n numberOfImageGalleryGridColumns={numberOfImageGalleryGridColumns}\n overlayOpacity={overlayOpacity}\n />\n )}\n <AttachmentPicker ref={bottomSheetRef} {...attachmentPickerProps} />\n </ThemeProvider>\n </ImageGalleryProvider>\n </AttachmentPickerProvider>\n </MessageOverlayProvider>\n </OverlayContext.Provider>\n </TranslationProvider>\n );\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AASA,IAAAG,eAAA,GAAAH,OAAA;AAEA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,kCAAA,GAAAL,OAAA;AACA,IAAAM,sBAAA,GAAAN,OAAA;AACA,IAAAO,2BAAA,GAAAP,OAAA;AACA,IAAAQ,mBAAA,GAAAR,OAAA;AACA,IAAAS,iBAAA,GAAAT,OAAA;AACA,IAAAU,8BAAA,GAAAV,OAAA;AACA,IAAAW,kBAAA,GAAAX,OAAA;AACA,IAAAY,aAAA,GAAAZ,OAAA;AACA,IAAAa,eAAA,GAAAb,OAAA;AACA,IAAAc,gBAAA,GAAAd,OAAA;AACA,IAAAe,cAAA,GAAAf,OAAA;AAGA,IAAAgB,wBAAA,GAAAhB,OAAA;AACA,IAAAiB,oBAAA,GAAA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_interopRequireWildcard","require","_defaultBaseContextValue","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","allOwnCapabilities","banChannelMembers","deleteAnyMessage","deleteOwnMessage","flagMessage","pinMessage","quoteMessage","readEvents","sendLinks","sendMessage","sendReaction","sendReply","sendTypingEvents","updateAnyMessage","updateOwnMessage","uploadFile","exports","OwnCapabilitiesContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","OwnCapabilitiesProvider","_ref","children","value","createElement","Provider","__self","__source","fileName","lineNumber","columnNumber","useOwnCapabilitiesContext","contextValue","useContext","isTestEnvironment","Error"],"sources":["OwnCapabilitiesContext.tsx"],"sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport const allOwnCapabilities = {\n banChannelMembers: 'ban-channel-members',\n deleteAnyMessage: 'delete-any-message',\n deleteOwnMessage: 'delete-own-message',\n flagMessage: 'flag-message',\n pinMessage: 'pin-message',\n quoteMessage: 'quote-message',\n readEvents: 'read-events',\n sendLinks: 'send-links',\n sendMessage: 'send-message',\n sendReaction: 'send-reaction',\n sendReply: 'send-reply',\n sendTypingEvents: 'send-typing-events',\n updateAnyMessage: 'update-any-message',\n updateOwnMessage: 'update-own-message',\n uploadFile: 'upload-file',\n};\n\nexport type OwnCapability = keyof typeof allOwnCapabilities;\n\nexport type OwnCapabilitiesContextValue = Record<OwnCapability, boolean>;\nexport const OwnCapabilitiesContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as OwnCapabilitiesContextValue,\n);\n\nexport const OwnCapabilitiesProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: OwnCapabilitiesContextValue;\n}>) => (\n <OwnCapabilitiesContext.Provider value={value as unknown as OwnCapabilitiesContextValue}>\n {children}\n </OwnCapabilitiesContext.Provider>\n);\n\nexport const useOwnCapabilitiesContext = () => {\n const contextValue = useContext(OwnCapabilitiesContext);\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useOwnCapabilitiesContext hook was called outside the Channel Component. Make sure you have configured Channel component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#channel`,\n );\n }\n\n return contextValue;\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAF,OAAA;AAA+D,IAAAG,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA,CAAAL,GAAA,SAAAM,MAAA,WAAAC,qBAAA,GAAAC,MAAA,CAAAC,cAAA,IAAAD,MAAA,CAAAE,wBAAA,WAAAC,GAAA,IAAAX,GAAA,QAAAW,GAAA,kBAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAd,GAAA,EAAAW,GAAA,SAAAI,IAAA,GAAA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AAAC,QAAA,EAAApD,YAAA;MAAAqD,UAAA;MAAAC,YAAA;IAAA;EAAA,GACrFR,QAAQ,CACuB;AAAA,CACnC;AAACP,OAAA,CAAAK,uBAAA,GAAAA,uBAAA;AAEK,IAAMW,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAA,EAAS;EAC7C,IAAMC,YAAY,GAAG,IAAAC,iBAAU,EAACjB,sBAAsB,CAAC;EAEvD,IAAIgB,YAAY,KAAKb,mDAA0B,IAAI,CAAC,IAAAe,oCAAiB,GAAE,EAAE;IACvE,MAAM,IAAIC,KAAK,6NAEd;EACH;EAEA,OAAOH,YAAY;AACrB,CAAC;AAACjB,OAAA,CAAAgB,yBAAA,GAAAA,yBAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_defaultBaseContextValue","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","allOwnCapabilities","banChannelMembers","deleteAnyMessage","deleteOwnMessage","flagMessage","pinMessage","quoteMessage","readEvents","sendLinks","sendMessage","sendReaction","sendReply","sendTypingEvents","updateAnyMessage","updateOwnMessage","uploadFile","exports","OwnCapabilitiesContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","OwnCapabilitiesProvider","_ref","children","value","createElement","Provider","__self","__source","fileName","lineNumber","columnNumber","useOwnCapabilitiesContext","contextValue","useContext","isTestEnvironment","Error"],"sources":["OwnCapabilitiesContext.tsx"],"sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport const allOwnCapabilities = {\n banChannelMembers: 'ban-channel-members',\n deleteAnyMessage: 'delete-any-message',\n deleteOwnMessage: 'delete-own-message',\n flagMessage: 'flag-message',\n pinMessage: 'pin-message',\n quoteMessage: 'quote-message',\n readEvents: 'read-events',\n sendLinks: 'send-links',\n sendMessage: 'send-message',\n sendReaction: 'send-reaction',\n sendReply: 'send-reply',\n sendTypingEvents: 'send-typing-events',\n updateAnyMessage: 'update-any-message',\n updateOwnMessage: 'update-own-message',\n uploadFile: 'upload-file',\n};\n\nexport type OwnCapability = keyof typeof allOwnCapabilities;\n\nexport type OwnCapabilitiesContextValue = Record<OwnCapability, boolean>;\nexport const OwnCapabilitiesContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as OwnCapabilitiesContextValue,\n);\n\nexport const OwnCapabilitiesProvider = ({\n children,\n value,\n}: PropsWithChildren<{\n value: OwnCapabilitiesContextValue;\n}>) => (\n <OwnCapabilitiesContext.Provider value={value as unknown as OwnCapabilitiesContextValue}>\n {children}\n </OwnCapabilitiesContext.Provider>\n);\n\nexport const useOwnCapabilitiesContext = () => {\n const contextValue = useContext(OwnCapabilitiesContext);\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useOwnCapabilitiesContext hook was called outside the Channel Component. Make sure you have configured Channel component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#channel`,\n );\n }\n\n return contextValue;\n};\n"],"mappings":";;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAEA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,kBAAA,GAAAF,OAAA;AAA+D,IAAAG,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAP,wBAAAW,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI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,oBAAoB;EACtCC,UAAU,EAAE;AACd,CAAC;AAACC,OAAA,CAAAhB,kBAAA,GAAAA,kBAAA;AAKK,IAAMiB,sBAAsB,GAAGC,iBAAK,CAACC,aAAa,CACvDC,mDACF,CAAC;AAACJ,OAAA,CAAAC,sBAAA,GAAAA,sBAAA;AAEK,IAAMI,uBAAuB,GAAG,SAA1BA,uBAAuBA,CAAAC,IAAA;EAAA,IAClCC,QAAQ,GAAAD,IAAA,CAARC,QAAQ;IACRC,KAAK,GAAAF,IAAA,CAALE,KAAK;EAAA,OAILrD,MAAA,YAAAsD,aAAA,CAACR,sBAAsB,CAACS,QAAQ;IAACF,KAAK,EAAEA,KAAgD;IAAAG,MAAA,EAAAnD,KAAA;IAAAoD,QAAA;MAAAC,QAAA,EAAApD,YAAA;MAAAqD,UAAA;MAAAC,YAAA;IAAA;EAAA,GACrFR,QAC8B,CAAC;AAAA,CACnC;AAACP,OAAA,CAAAK,uBAAA,GAAAA,uBAAA;AAEK,IAAMW,yBAAyB,GAAG,SAA5BA,yBAAyBA,CAAA,EAAS;EAC7C,IAAMC,YAAY,GAAG,IAAAC,iBAAU,EAACjB,sBAAsB,CAAC;EAEvD,IAAIgB,YAAY,KAAKb,mDAA0B,IAAI,CAAC,IAAAe,oCAAiB,EAAC,CAAC,EAAE;IACvE,MAAM,IAAIC,KAAK,4NAEf,CAAC;EACH;EAEA,OAAOH,YAAY;AACrB,CAAC;AAACjB,OAAA,CAAAgB,yBAAA,GAAAA,yBAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_defaultBaseContextValue","_getDisplayName","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","PaginatedMessageListContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","exports","PaginatedMessageListProvider","_ref","children","value","createElement","Provider","__self","__source","fileName","lineNumber","columnNumber","usePaginatedMessageListContext","contextValue","useContext","isTestEnvironment","Error","withPaginatedMessageListContext","Component","WithPaginatedMessageListContextComponent","props","paginatedMessageListContext","_extends2","displayName","getDisplayName"],"sources":["PaginatedMessageListContext.tsx"],"sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { ChannelState } from 'stream-chat';\n\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type PaginatedMessageListContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * Has more messages to load\n */\n hasMore: boolean;\n /**\n * Flag to indicate that are no more recent messages to be loaded\n */\n hasNoMoreRecentMessagesToLoad: boolean;\n /**\n * Is loading more messages\n */\n loadingMore: boolean;\n /**\n * Is loading more recent messages\n */\n loadingMoreRecent: boolean;\n /**\n * Load more messages\n */\n loadMore: (limit?: number) => Promise<void>;\n /**\n * Load more recent messages\n */\n loadMoreRecent: (limit?: number) => Promise<void>;\n /**\n * Messages from client state\n */\n messages: ChannelState<StreamChatGenerics>['messages'];\n /**\n * Set loadingMore\n */\n setLoadingMore: React.Dispatch<React.SetStateAction<boolean>>;\n /**\n * Set loadingMoreRecent\n */\n setLoadingMoreRecent: React.Dispatch<React.SetStateAction<boolean>>;\n};\n\nexport const PaginatedMessageListContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as PaginatedMessageListContextValue,\n);\n\nexport const PaginatedMessageListProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: PaginatedMessageListContextValue<StreamChatGenerics>;\n}>) => (\n <PaginatedMessageListContext.Provider\n value={value as unknown as PaginatedMessageListContextValue}\n >\n {children}\n </PaginatedMessageListContext.Provider>\n);\n\nexport const usePaginatedMessageListContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => {\n const contextValue = useContext(\n PaginatedMessageListContext,\n ) as unknown as PaginatedMessageListContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The usePaginatedMessageListContext hook was called outside of the PaginatedMessageList provider. Make sure you have configured Channel component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#channel`,\n );\n }\n\n return contextValue;\n};\n\n/**\n * Typescript currently does not support partial inference so if MessageListContextValue\n * typing is desired while using the HOC withMessageListContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withPaginatedMessageListContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof PaginatedMessageListContextValue<StreamChatGenerics>>> => {\n const WithPaginatedMessageListContextComponent = (\n props: Omit<P, keyof PaginatedMessageListContextValue<StreamChatGenerics>>,\n ) => {\n const paginatedMessageListContext = usePaginatedMessageListContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...paginatedMessageListContext} />;\n };\n WithPaginatedMessageListContextComponent.displayName = `WithPaginatedMessageListContext${getDisplayName(\n Component,\n )}`;\n return WithPaginatedMessageListContextComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAA+D,IAAAI,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF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K;EAAA,OAILtC,MAAA,YAAAuC,aAAA,CAACT,2BAA2B,CAACU,QAAQ;IACnCF,KAAK,EAAEA,KAAqD;IAAAG,MAAA,EAAAnC,KAAA;IAAAoC,QAAA;MAAAC,QAAA,EAAApC,YAAA;MAAAqC,UAAA;MAAAC,YAAA;IAAA;EAAA,GAE3DR,QAAQ,CAC4B;AAAA,CACxC;AAACH,OAAA,CAAAC,4BAAA,GAAAA,4BAAA;AAEK,IAAMW,8BAA8B,GAAG,SAAjCA,8BAA8BA,CAAA,EAEpC;EACL,IAAMC,YAAY,GAAG,IAAAC,iBAAU,EAC7BlB,2BAA2B,CACuC;EAEpE,IAAIiB,YAAY,KAAKd,mDAA0B,IAAI,CAAC,IAAAgB,oCAAiB,GAAE,EAAE;IACvE,MAAM,IAAIC,KAAK,iPAEd;EACH;EAEA,OAAOH,YAAY;AACrB,CAAC;AAACb,OAAA,CAAAY,8BAAA,GAAAA,8BAAA;AAOK,IAAMK,+BAA+B,GAAG,SAAlCA,+BAA+BA,CAI1CC,SAAiC,EACiD;EAClF,IAAMC,wCAAwC,GAAG,SAA3CA,wCAAwCA,CAC5CC,KAA0E,EACvE;IACH,IAAMC,2BAA2B,GAAGT,8BAA8B,EAAsB;IAExF,OAAO9C,MAAA,YAAAuC,aAAA,CAACa,SAAS,MAAAI,SAAA,iBAAMF,KAAK,EAAYC,2BAA2B;MAAAd,MAAA,EAAAnC,KAAA;MAAAoC,QAAA;QAAAC,QAAA,EAAApC,YAAA;QAAAqC,UAAA;QAAAC,YAAA;MAAA;IAAA,GAAI;EACzE,CAAC;EACDQ,wCAAwC,CAACI,WAAW,uCAAqC,IAAAC,8BAAc,EACrGN,SAAS,CACR;EACH,OAAOC,wCAAwC;AACjD,CAAC;AAACnB,OAAA,CAAAiB,+BAAA,GAAAA,+BAAA"}
1
+ {"version":3,"names":["_react","_interopRequireWildcard","require","_defaultBaseContextValue","_getDisplayName","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","PaginatedMessageListContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","exports","PaginatedMessageListProvider","_ref","children","value","createElement","Provider","__self","__source","fileName","lineNumber","columnNumber","usePaginatedMessageListContext","contextValue","useContext","isTestEnvironment","Error","withPaginatedMessageListContext","Component","WithPaginatedMessageListContextComponent","props","paginatedMessageListContext","_extends2","displayName","getDisplayName"],"sources":["PaginatedMessageListContext.tsx"],"sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { ChannelState } from 'stream-chat';\n\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type PaginatedMessageListContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * Has more messages to load\n */\n hasMore: boolean;\n /**\n * Flag to indicate that are no more recent messages to be loaded\n */\n hasNoMoreRecentMessagesToLoad: boolean;\n /**\n * Is loading more messages\n */\n loadingMore: boolean;\n /**\n * Is loading more recent messages\n */\n loadingMoreRecent: boolean;\n /**\n * Load more messages\n */\n loadMore: (limit?: number) => Promise<void>;\n /**\n * Load more recent messages\n */\n loadMoreRecent: (limit?: number) => Promise<void>;\n /**\n * Messages from client state\n */\n messages: ChannelState<StreamChatGenerics>['messages'];\n /**\n * Set loadingMore\n */\n setLoadingMore: React.Dispatch<React.SetStateAction<boolean>>;\n /**\n * Set loadingMoreRecent\n */\n setLoadingMoreRecent: React.Dispatch<React.SetStateAction<boolean>>;\n};\n\nexport const PaginatedMessageListContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as PaginatedMessageListContextValue,\n);\n\nexport const PaginatedMessageListProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: PaginatedMessageListContextValue<StreamChatGenerics>;\n}>) => (\n <PaginatedMessageListContext.Provider\n value={value as unknown as PaginatedMessageListContextValue}\n >\n {children}\n </PaginatedMessageListContext.Provider>\n);\n\nexport const usePaginatedMessageListContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => {\n const contextValue = useContext(\n PaginatedMessageListContext,\n ) as unknown as PaginatedMessageListContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The usePaginatedMessageListContext hook was called outside of the PaginatedMessageList provider. Make sure you have configured Channel component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#channel`,\n );\n }\n\n return contextValue;\n};\n\n/**\n * Typescript currently does not support partial inference so if MessageListContextValue\n * typing is desired while using the HOC withMessageListContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withPaginatedMessageListContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof PaginatedMessageListContextValue<StreamChatGenerics>>> => {\n const WithPaginatedMessageListContextComponent = (\n props: Omit<P, keyof PaginatedMessageListContextValue<StreamChatGenerics>>,\n ) => {\n const paginatedMessageListContext = usePaginatedMessageListContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...paginatedMessageListContext} />;\n };\n WithPaginatedMessageListContextComponent.displayName = `WithPaginatedMessageListContext${getDisplayName(\n Component,\n )}`;\n return WithPaginatedMessageListContextComponent;\n};\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AAKA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA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ACrGN,SACF,CAAG;EACH,OAAOC,wCAAwC;AACjD,CAAC;AAACnB,OAAA,CAAAiB,+BAAA,GAAAA,+BAAA"}
@@ -1 +1 @@
1
- {"version":3,"names":["_react","_interopRequireWildcard","require","_defaultBaseContextValue","_getDisplayName","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","isSuggestionCommand","suggestion","exports","isSuggestionEmoji","isSuggestionUser","SuggestionsContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","SuggestionsProvider","_ref","children","value","_useState","useState","_useState2","_slicedToArray2","triggerType","setTriggerType","_useState3","_useState4","suggestions","setSuggestions","_useState5","_useState6","suggestionsViewActive","setSuggestionsViewActive","openSuggestions","component","updateSuggestions","newSuggestions","closeSuggestions","undefined","suggestionsContext","_extends2","createElement","Provider","__self","__source","fileName","lineNumber","columnNumber","useSuggestionsContext","contextValue","useContext","isTestEnvironment","Error","withSuggestionsContext","Component","WithSuggestionsContextComponent","props","displayName","getDisplayName"],"sources":["SuggestionsContext.tsx"],"sourcesContent":["import React, { PropsWithChildren, useContext, useState } from 'react';\n\nimport type { CommandResponse, UserResponse } from 'stream-chat';\n\nimport type { AutoCompleteSuggestionHeaderProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionHeader';\nimport type { AutoCompleteSuggestionItemProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionItem';\nimport type { AutoCompleteSuggestionListProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionList';\nimport type { Emoji } from '../../emoji-data/compiled';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type SuggestionComponentType = 'command' | 'emoji' | 'mention';\n\nexport const isSuggestionCommand = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n suggestion: Suggestion<StreamChatGenerics>,\n): suggestion is SuggestionCommand<StreamChatGenerics> => 'args' in suggestion;\n\nexport const isSuggestionEmoji = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n suggestion: Suggestion<StreamChatGenerics>,\n): suggestion is Emoji => 'unicode' in suggestion;\n\nexport const isSuggestionUser = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n suggestion: Suggestion<StreamChatGenerics>,\n): suggestion is SuggestionUser<StreamChatGenerics> => 'id' in suggestion;\n\nexport type Suggestion<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Emoji | SuggestionCommand<StreamChatGenerics> | SuggestionUser<StreamChatGenerics>;\n\nexport type SuggestionCommand<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = CommandResponse<StreamChatGenerics>;\nexport type SuggestionUser<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = UserResponse<StreamChatGenerics>;\n\nexport type Suggestions<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n data: Suggestion<StreamChatGenerics>[];\n onSelect: (item: Suggestion<StreamChatGenerics>) => void;\n queryText?: string;\n};\n\nexport type SuggestionsContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n AutoCompleteSuggestionHeader: React.ComponentType<AutoCompleteSuggestionHeaderProps>;\n AutoCompleteSuggestionItem: React.ComponentType<\n AutoCompleteSuggestionItemProps<StreamChatGenerics>\n >;\n AutoCompleteSuggestionList: React.ComponentType<\n AutoCompleteSuggestionListProps<StreamChatGenerics>\n >;\n /** Override handler for closing suggestions (mentions, command autocomplete etc) */\n closeSuggestions: () => void;\n /**\n * Override handler for opening suggestions (mentions, command autocomplete etc)\n *\n * @param component {Component|element} UI Component for suggestion item.\n * @overrideType Function\n */\n openSuggestions: (component: SuggestionComponentType) => Promise<void>;\n suggestions: Suggestions<StreamChatGenerics>;\n triggerType: SuggestionComponentType;\n /**\n * Override handler for updating suggestions (mentions, command autocomplete etc)\n *\n * @param newSuggestions {Component|element} UI Component for suggestion item.\n * @overrideType Function\n */\n updateSuggestions: (newSuggestions: Suggestions<StreamChatGenerics>) => void;\n queryText?: string;\n suggestionsViewActive?: boolean;\n};\n\nexport const SuggestionsContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as SuggestionsContextValue,\n);\n\n/**\n * This provider component exposes the properties stored within the SuggestionsContext.\n */\nexport const SuggestionsProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{ value?: Partial<SuggestionsContextValue<StreamChatGenerics>> }>) => {\n const [triggerType, setTriggerType] = useState<SuggestionComponentType | null>(null);\n const [suggestions, setSuggestions] = useState<Suggestions<StreamChatGenerics>>();\n const [suggestionsViewActive, setSuggestionsViewActive] = useState(false);\n\n const openSuggestions = (component: SuggestionComponentType) => {\n setTriggerType(component);\n setSuggestionsViewActive(true);\n };\n\n const updateSuggestions = (newSuggestions: Suggestions<StreamChatGenerics>) => {\n setSuggestions(newSuggestions);\n setSuggestionsViewActive(!!triggerType);\n };\n\n const closeSuggestions = () => {\n setTriggerType(null);\n setSuggestions(undefined);\n setSuggestionsViewActive(false);\n };\n\n const suggestionsContext = {\n ...value,\n closeSuggestions,\n openSuggestions,\n suggestions,\n suggestionsViewActive,\n triggerType,\n updateSuggestions,\n };\n\n return (\n <SuggestionsContext.Provider value={suggestionsContext as unknown as SuggestionsContextValue}>\n {children}\n </SuggestionsContext.Provider>\n );\n};\n\nexport const useSuggestionsContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => {\n const contextValue = useContext(\n SuggestionsContext,\n ) as unknown as SuggestionsContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useSuggestionsContext hook was called outside of the SuggestionsContext provider. Make sure you have configured Channel component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#channel`,\n );\n }\n\n return contextValue;\n};\n\nexport const withSuggestionsContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof SuggestionsContextValue<StreamChatGenerics>>> => {\n const WithSuggestionsContextComponent = (\n props: Omit<P, keyof SuggestionsContextValue<StreamChatGenerics>>,\n ) => {\n const suggestionsContext = useSuggestionsContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...suggestionsContext} />;\n };\n WithSuggestionsContextComponent.displayName = `WithSuggestionsContext${getDisplayName(\n Component,\n )}`;\n return WithSuggestionsContextComponent;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AASA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAA+D,IAAAI,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,U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,"names":["_react","_interopRequireWildcard","require","_defaultBaseContextValue","_getDisplayName","_isTestEnvironment","_this","_jsxFileName","_getRequireWildcardCache","nodeInterop","WeakMap","cacheBabelInterop","cacheNodeInterop","obj","__esModule","_typeof","cache","has","get","newObj","hasPropertyDescriptor","Object","defineProperty","getOwnPropertyDescriptor","key","prototype","hasOwnProperty","call","desc","set","isSuggestionCommand","suggestion","exports","isSuggestionEmoji","isSuggestionUser","SuggestionsContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","SuggestionsProvider","_ref","children","value","_useState","useState","_useState2","_slicedToArray2","triggerType","setTriggerType","_useState3","_useState4","suggestions","setSuggestions","_useState5","_useState6","suggestionsViewActive","setSuggestionsViewActive","openSuggestions","component","updateSuggestions","newSuggestions","closeSuggestions","undefined","suggestionsContext","_extends2","createElement","Provider","__self","__source","fileName","lineNumber","columnNumber","useSuggestionsContext","contextValue","useContext","isTestEnvironment","Error","withSuggestionsContext","Component","WithSuggestionsContextComponent","props","displayName","getDisplayName"],"sources":["SuggestionsContext.tsx"],"sourcesContent":["import React, { PropsWithChildren, useContext, useState } from 'react';\n\nimport type { CommandResponse, UserResponse } from 'stream-chat';\n\nimport type { AutoCompleteSuggestionHeaderProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionHeader';\nimport type { AutoCompleteSuggestionItemProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionItem';\nimport type { AutoCompleteSuggestionListProps } from '../../components/AutoCompleteInput/AutoCompleteSuggestionList';\nimport type { Emoji } from '../../emoji-data/compiled';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\n\nexport type SuggestionComponentType = 'command' | 'emoji' | 'mention';\n\nexport const isSuggestionCommand = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n suggestion: Suggestion<StreamChatGenerics>,\n): suggestion is SuggestionCommand<StreamChatGenerics> => 'args' in suggestion;\n\nexport const isSuggestionEmoji = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n suggestion: Suggestion<StreamChatGenerics>,\n): suggestion is Emoji => 'unicode' in suggestion;\n\nexport const isSuggestionUser = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n suggestion: Suggestion<StreamChatGenerics>,\n): suggestion is SuggestionUser<StreamChatGenerics> => 'id' in suggestion;\n\nexport type Suggestion<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Emoji | SuggestionCommand<StreamChatGenerics> | SuggestionUser<StreamChatGenerics>;\n\nexport type SuggestionCommand<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = CommandResponse<StreamChatGenerics>;\nexport type SuggestionUser<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = UserResponse<StreamChatGenerics>;\n\nexport type Suggestions<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n data: Suggestion<StreamChatGenerics>[];\n onSelect: (item: Suggestion<StreamChatGenerics>) => void;\n queryText?: string;\n};\n\nexport type SuggestionsContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n AutoCompleteSuggestionHeader: React.ComponentType<AutoCompleteSuggestionHeaderProps>;\n AutoCompleteSuggestionItem: React.ComponentType<\n AutoCompleteSuggestionItemProps<StreamChatGenerics>\n >;\n AutoCompleteSuggestionList: React.ComponentType<\n AutoCompleteSuggestionListProps<StreamChatGenerics>\n >;\n /** Override handler for closing suggestions (mentions, command autocomplete etc) */\n closeSuggestions: () => void;\n /**\n * Override handler for opening suggestions (mentions, command autocomplete etc)\n *\n * @param component {Component|element} UI Component for suggestion item.\n * @overrideType Function\n */\n openSuggestions: (component: SuggestionComponentType) => Promise<void>;\n suggestions: Suggestions<StreamChatGenerics>;\n triggerType: SuggestionComponentType;\n /**\n * Override handler for updating suggestions (mentions, command autocomplete etc)\n *\n * @param newSuggestions {Component|element} UI Component for suggestion item.\n * @overrideType Function\n */\n updateSuggestions: (newSuggestions: Suggestions<StreamChatGenerics>) => void;\n queryText?: string;\n suggestionsViewActive?: boolean;\n};\n\nexport const SuggestionsContext = React.createContext(\n DEFAULT_BASE_CONTEXT_VALUE as SuggestionsContextValue,\n);\n\n/**\n * This provider component exposes the properties stored within the SuggestionsContext.\n */\nexport const SuggestionsProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{ value?: Partial<SuggestionsContextValue<StreamChatGenerics>> }>) => {\n const [triggerType, setTriggerType] = useState<SuggestionComponentType | null>(null);\n const [suggestions, setSuggestions] = useState<Suggestions<StreamChatGenerics>>();\n const [suggestionsViewActive, setSuggestionsViewActive] = useState(false);\n\n const openSuggestions = (component: SuggestionComponentType) => {\n setTriggerType(component);\n setSuggestionsViewActive(true);\n };\n\n const updateSuggestions = (newSuggestions: Suggestions<StreamChatGenerics>) => {\n setSuggestions(newSuggestions);\n setSuggestionsViewActive(!!triggerType);\n };\n\n const closeSuggestions = () => {\n setTriggerType(null);\n setSuggestions(undefined);\n setSuggestionsViewActive(false);\n };\n\n const suggestionsContext = {\n ...value,\n closeSuggestions,\n openSuggestions,\n suggestions,\n suggestionsViewActive,\n triggerType,\n updateSuggestions,\n };\n\n return (\n <SuggestionsContext.Provider value={suggestionsContext as unknown as SuggestionsContextValue}>\n {children}\n </SuggestionsContext.Provider>\n );\n};\n\nexport const useSuggestionsContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => {\n const contextValue = useContext(\n SuggestionsContext,\n ) as unknown as SuggestionsContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useSuggestionsContext hook was called outside of the SuggestionsContext provider. Make sure you have configured Channel component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#channel`,\n );\n }\n\n return contextValue;\n};\n\nexport const withSuggestionsContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof SuggestionsContextValue<StreamChatGenerics>>> => {\n const WithSuggestionsContextComponent = (\n props: Omit<P, keyof SuggestionsContextValue<StreamChatGenerics>>,\n ) => {\n const suggestionsContext = useSuggestionsContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...suggestionsContext} />;\n };\n WithSuggestionsContextComponent.displayName = `WithSuggestionsContext${getDisplayName(\n Component,\n )}`;\n return WithSuggestionsContextComponent;\n};\n"],"mappings":";;;;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AASA,IAAAC,wBAAA,GAAAD,OAAA;AAEA,IAAAE,eAAA,GAAAF,OAAA;AACA,IAAAG,kBAAA,GAAAH,OAAA;AAA+D,IAAAI,KAAA;EAAAC,YAAA;AAAA,SAAAC,yBAAAC,WAAA,eAAAC,OAAA,kCAAAC,iBAAA,OAAAD,OAAA,QAAAE,gBAAA,OAAAF,OAAA,YAAAF,wBAAA,YAAAA,yBAAAC,WAAA,WAAAA,WAAA,GAAAG,gBAAA,GAAAD,iBAAA,KAAAF,WAAA;AAAA,SAAAR,wBAAAY,GAAA,EAAAJ,WAAA,SAAAA,WAAA,IAAAI,GAAA,IAAAA,GAAA,CAAAC,UAAA,WAAAD,GAAA,QAAAA,GAAA,aAAAE,OAAA,CAAAF,GAAA,yBAAAA,GAAA,uCAAAA,GAAA,UAAAG,KAAA,GAAAR,wBAAA,CAAAC,WAAA,OAAAO,KAAA,IAAAA,KAAA,CAAAC,GAAA,CAAAJ,GAAA,YAAAG,KAAA,CAAAE,GAAA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