stream-chat-react-native-core 4.0.0-beta.3 → 4.0.0-beta.7

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 (830) hide show
  1. package/README.md +1 -1
  2. package/lib/commonjs/components/Attachment/Attachment.js +10 -10
  3. package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
  4. package/lib/commonjs/components/Attachment/AttachmentActions.js +4 -4
  5. package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
  6. package/lib/commonjs/components/Attachment/Card.js +15 -15
  7. package/lib/commonjs/components/Attachment/Card.js.map +1 -1
  8. package/lib/commonjs/components/Attachment/FileAttachment.js +8 -8
  9. package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
  10. package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +4 -4
  11. package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
  12. package/lib/commonjs/components/Attachment/Gallery.js +8 -8
  13. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  14. package/lib/commonjs/components/Attachment/Giphy.js +112 -148
  15. package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
  16. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
  17. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
  18. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
  19. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
  20. package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
  21. package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
  22. package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -1
  23. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
  24. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  25. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +16 -16
  26. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
  27. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +7 -7
  28. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
  29. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +13 -13
  30. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
  31. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +10 -10
  32. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  33. package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
  34. package/lib/commonjs/components/Channel/Channel.js +13 -13
  35. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  36. package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
  37. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  38. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  39. package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
  40. package/lib/commonjs/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
  41. package/lib/commonjs/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
  42. package/lib/commonjs/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
  43. package/lib/commonjs/components/ChannelList/ChannelList.js +2 -2
  44. package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
  45. package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +14 -14
  46. package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
  47. package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
  48. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
  49. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
  50. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
  51. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
  52. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
  53. package/lib/commonjs/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
  54. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
  55. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
  56. package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
  57. package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
  58. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  59. package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
  60. package/lib/commonjs/components/ChannelList/utils.js.map +1 -1
  61. package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +2 -2
  62. package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
  63. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +2 -2
  64. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
  65. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +4 -4
  66. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  67. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +12 -12
  68. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  69. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
  70. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
  71. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
  72. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  73. package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
  74. package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
  75. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
  76. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  77. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
  78. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  79. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
  80. package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  81. package/lib/commonjs/components/Chat/Chat.js +8 -4
  82. package/lib/commonjs/components/Chat/Chat.js.map +1 -1
  83. package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
  84. package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
  85. package/lib/commonjs/components/Chat/hooks/useMutedUsers.js.map +1 -1
  86. package/lib/commonjs/components/ImageGallery/ImageGallery.js +19 -19
  87. package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
  88. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +11 -11
  89. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  90. package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +28 -11
  91. package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
  92. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +5 -5
  93. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
  94. package/lib/commonjs/components/Message/Message.js +6 -6
  95. package/lib/commonjs/components/Message/Message.js.map +1 -1
  96. package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +4 -4
  97. package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
  98. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +18 -18
  99. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
  100. package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +5 -5
  101. package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
  102. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +20 -16
  103. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  104. package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +4 -4
  105. package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
  106. package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +10 -10
  107. package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
  108. package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +3 -3
  109. package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
  110. package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +6 -6
  111. package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
  112. package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +9 -9
  113. package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
  114. package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +3 -3
  115. package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
  116. package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +51 -51
  117. package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
  118. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +145 -64
  119. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  120. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +240 -0
  121. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
  122. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  123. package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
  124. package/lib/commonjs/components/Message/hooks/useMessageActions.js +11 -11
  125. package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
  126. package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
  127. package/lib/commonjs/components/Message/utils/removeReservedFields.js.map +1 -1
  128. package/lib/commonjs/components/MessageInput/AttachButton.js +3 -3
  129. package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
  130. package/lib/commonjs/components/MessageInput/CommandsButton.js +3 -3
  131. package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
  132. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +11 -11
  133. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  134. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +7 -7
  135. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
  136. package/lib/commonjs/components/MessageInput/InputButtons.js +6 -6
  137. package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
  138. package/lib/commonjs/components/MessageInput/MessageInput.js +34 -34
  139. package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
  140. package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +3 -3
  141. package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
  142. package/lib/commonjs/components/MessageInput/SendButton.js +5 -5
  143. package/lib/commonjs/components/MessageInput/SendButton.js.map +1 -1
  144. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +7 -7
  145. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  146. package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -1
  147. package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +3 -3
  148. package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
  149. package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -3
  150. package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
  151. package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -3
  152. package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
  153. package/lib/commonjs/components/MessageList/MessageList.js +26 -26
  154. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  155. package/lib/commonjs/components/MessageList/MessageSystem.js +6 -6
  156. package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
  157. package/lib/commonjs/components/MessageList/TypingIndicator.js +3 -3
  158. package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
  159. package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js +2 -2
  160. package/lib/commonjs/components/MessageList/TypingIndicatorContainer.js.map +1 -1
  161. package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
  162. package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
  163. package/lib/commonjs/components/MessageList/utils/filterTypingUsers.js.map +1 -1
  164. package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
  165. package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
  166. package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
  167. package/lib/commonjs/components/MessageList/utils/getReadStates.js.map +1 -1
  168. package/lib/commonjs/components/MessageOverlay/MessageActionList.js +3 -3
  169. package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -1
  170. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +6 -6
  171. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
  172. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +26 -25
  173. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
  174. package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +13 -13
  175. package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
  176. package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +19 -19
  177. package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
  178. package/lib/commonjs/components/Reply/Reply.js +8 -8
  179. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  180. package/lib/commonjs/components/Thread/Thread.js +4 -4
  181. package/lib/commonjs/components/Thread/Thread.js.map +1 -1
  182. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +12 -12
  183. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  184. package/lib/commonjs/components/docs/data.js +44 -44
  185. package/lib/commonjs/components/docs/data.js.map +1 -1
  186. package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
  187. package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
  188. package/lib/commonjs/contexts/channelContext/ChannelContext.js +2 -2
  189. package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
  190. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +2 -2
  191. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
  192. package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
  193. package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
  194. package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
  195. package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
  196. package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
  197. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
  198. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  199. package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +1 -1
  200. package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
  201. package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -2
  202. package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
  203. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +2 -2
  204. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  205. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  206. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  207. package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
  208. package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
  209. package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -2
  210. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  211. package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
  212. package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
  213. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +12 -12
  214. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
  215. package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
  216. package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
  217. package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +2 -2
  218. package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
  219. package/lib/commonjs/contexts/themeContext/utils/theme.js +7 -6
  220. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  221. package/lib/commonjs/contexts/threadContext/ThreadContext.js +2 -2
  222. package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
  223. package/lib/commonjs/contexts/translationContext/TranslationContext.js +2 -2
  224. package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
  225. package/lib/commonjs/contexts/typingContext/TypingContext.js +2 -2
  226. package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
  227. package/lib/commonjs/icons/UserAdmin.js +62 -0
  228. package/lib/commonjs/icons/UserAdmin.js.map +1 -0
  229. package/lib/commonjs/icons/index.js +0 -26
  230. package/lib/commonjs/icons/index.js.map +1 -1
  231. package/lib/commonjs/init.js +13 -0
  232. package/lib/commonjs/init.js.map +1 -0
  233. package/lib/commonjs/utils/Streami18n.js.map +1 -1
  234. package/lib/commonjs/utils/getResizedImageUrl.js +8 -5
  235. package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -1
  236. package/lib/commonjs/utils/utils.js.map +1 -1
  237. package/lib/commonjs/version.json +1 -1
  238. package/lib/module/components/Attachment/Attachment.js +10 -10
  239. package/lib/module/components/Attachment/Attachment.js.map +1 -1
  240. package/lib/module/components/Attachment/AttachmentActions.js +4 -4
  241. package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
  242. package/lib/module/components/Attachment/Card.js +15 -15
  243. package/lib/module/components/Attachment/Card.js.map +1 -1
  244. package/lib/module/components/Attachment/FileAttachment.js +8 -8
  245. package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
  246. package/lib/module/components/Attachment/FileAttachmentGroup.js +4 -4
  247. package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
  248. package/lib/module/components/Attachment/Gallery.js +8 -8
  249. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  250. package/lib/module/components/Attachment/Giphy.js +112 -148
  251. package/lib/module/components/Attachment/Giphy.js.map +1 -1
  252. package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -1
  253. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -1
  254. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -1
  255. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -1
  256. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
  257. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -1
  258. package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -1
  259. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
  260. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  261. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +16 -16
  262. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
  263. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +7 -7
  264. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
  265. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +13 -13
  266. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
  267. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +10 -10
  268. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  269. package/lib/module/components/Avatar/Avatar.js.map +1 -1
  270. package/lib/module/components/Channel/Channel.js +13 -13
  271. package/lib/module/components/Channel/Channel.js.map +1 -1
  272. package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
  273. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  274. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  275. package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
  276. package/lib/module/components/Channel/hooks/useCreatePaginatedMessageListContext.js.map +1 -1
  277. package/lib/module/components/Channel/hooks/useCreateThreadContext.js.map +1 -1
  278. package/lib/module/components/Channel/hooks/useCreateTypingContext.js.map +1 -1
  279. package/lib/module/components/ChannelList/ChannelList.js +2 -2
  280. package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
  281. package/lib/module/components/ChannelList/ChannelListMessenger.js +14 -14
  282. package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
  283. package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
  284. package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
  285. package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
  286. package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
  287. package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
  288. package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
  289. package/lib/module/components/ChannelList/hooks/listeners/useConnectionRecovered.js.map +1 -1
  290. package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
  291. package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
  292. package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
  293. package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
  294. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  295. package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
  296. package/lib/module/components/ChannelList/utils.js.map +1 -1
  297. package/lib/module/components/ChannelPreview/ChannelAvatar.js +2 -2
  298. package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
  299. package/lib/module/components/ChannelPreview/ChannelPreview.js +2 -2
  300. package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
  301. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +4 -4
  302. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  303. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +12 -12
  304. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  305. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +1 -1
  306. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -1
  307. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
  308. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  309. package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js +1 -1
  310. package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
  311. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
  312. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  313. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
  314. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  315. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
  316. package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  317. package/lib/module/components/Chat/Chat.js +8 -4
  318. package/lib/module/components/Chat/Chat.js.map +1 -1
  319. package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
  320. package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
  321. package/lib/module/components/Chat/hooks/useMutedUsers.js.map +1 -1
  322. package/lib/module/components/ImageGallery/ImageGallery.js +19 -19
  323. package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
  324. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +11 -11
  325. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  326. package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +28 -11
  327. package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
  328. package/lib/module/components/ImageGallery/components/ImageGrid.js +5 -5
  329. package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
  330. package/lib/module/components/Message/Message.js +6 -6
  331. package/lib/module/components/Message/Message.js.map +1 -1
  332. package/lib/module/components/Message/MessageSimple/MessageAvatar.js +4 -4
  333. package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
  334. package/lib/module/components/Message/MessageSimple/MessageContent.js +18 -18
  335. package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
  336. package/lib/module/components/Message/MessageSimple/MessageDeleted.js +5 -5
  337. package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
  338. package/lib/module/components/Message/MessageSimple/MessageFooter.js +20 -16
  339. package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  340. package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +4 -4
  341. package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
  342. package/lib/module/components/Message/MessageSimple/MessageReplies.js +10 -10
  343. package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
  344. package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +3 -3
  345. package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
  346. package/lib/module/components/Message/MessageSimple/MessageSimple.js +6 -6
  347. package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
  348. package/lib/module/components/Message/MessageSimple/MessageStatus.js +9 -9
  349. package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
  350. package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +3 -3
  351. package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
  352. package/lib/module/components/Message/MessageSimple/ReactionList.js +51 -51
  353. package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
  354. package/lib/module/components/Message/MessageSimple/utils/renderText.js +145 -64
  355. package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  356. package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +240 -0
  357. package/lib/module/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
  358. package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  359. package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
  360. package/lib/module/components/Message/hooks/useMessageActions.js +11 -11
  361. package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
  362. package/lib/module/components/Message/utils/messageActions.js.map +1 -1
  363. package/lib/module/components/Message/utils/removeReservedFields.js.map +1 -1
  364. package/lib/module/components/MessageInput/AttachButton.js +3 -3
  365. package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
  366. package/lib/module/components/MessageInput/CommandsButton.js +3 -3
  367. package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
  368. package/lib/module/components/MessageInput/FileUploadPreview.js +11 -11
  369. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  370. package/lib/module/components/MessageInput/ImageUploadPreview.js +7 -7
  371. package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
  372. package/lib/module/components/MessageInput/InputButtons.js +6 -6
  373. package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
  374. package/lib/module/components/MessageInput/MessageInput.js +34 -34
  375. package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
  376. package/lib/module/components/MessageInput/MoreOptionsButton.js +3 -3
  377. package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
  378. package/lib/module/components/MessageInput/SendButton.js +5 -5
  379. package/lib/module/components/MessageInput/SendButton.js.map +1 -1
  380. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +7 -7
  381. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  382. package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -1
  383. package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +3 -3
  384. package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js.map +1 -1
  385. package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +3 -3
  386. package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js.map +1 -1
  387. package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +3 -3
  388. package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js.map +1 -1
  389. package/lib/module/components/MessageList/MessageList.js +26 -26
  390. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  391. package/lib/module/components/MessageList/MessageSystem.js +6 -6
  392. package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
  393. package/lib/module/components/MessageList/TypingIndicator.js +3 -3
  394. package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
  395. package/lib/module/components/MessageList/TypingIndicatorContainer.js +2 -2
  396. package/lib/module/components/MessageList/TypingIndicatorContainer.js.map +1 -1
  397. package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
  398. package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
  399. package/lib/module/components/MessageList/utils/filterTypingUsers.js.map +1 -1
  400. package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
  401. package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
  402. package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
  403. package/lib/module/components/MessageList/utils/getReadStates.js.map +1 -1
  404. package/lib/module/components/MessageOverlay/MessageActionList.js +3 -3
  405. package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -1
  406. package/lib/module/components/MessageOverlay/MessageActionListItem.js +6 -6
  407. package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
  408. package/lib/module/components/MessageOverlay/MessageOverlay.js +26 -25
  409. package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
  410. package/lib/module/components/MessageOverlay/OverlayReactionList.js +13 -13
  411. package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
  412. package/lib/module/components/MessageOverlay/OverlayReactions.js +19 -19
  413. package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
  414. package/lib/module/components/Reply/Reply.js +8 -8
  415. package/lib/module/components/Reply/Reply.js.map +1 -1
  416. package/lib/module/components/Thread/Thread.js +4 -4
  417. package/lib/module/components/Thread/Thread.js.map +1 -1
  418. package/lib/module/components/Thread/components/ThreadFooterComponent.js +12 -12
  419. package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  420. package/lib/module/components/docs/data.js +44 -44
  421. package/lib/module/components/docs/data.js.map +1 -1
  422. package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +1 -1
  423. package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
  424. package/lib/module/contexts/channelContext/ChannelContext.js +2 -2
  425. package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
  426. package/lib/module/contexts/channelsContext/ChannelsContext.js +2 -2
  427. package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
  428. package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
  429. package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
  430. package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
  431. package/lib/module/contexts/chatContext/ChatContext.js +2 -2
  432. package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
  433. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
  434. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  435. package/lib/module/contexts/keyboardContext/KeyboardContext.js +1 -1
  436. package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
  437. package/lib/module/contexts/messageContext/MessageContext.js +2 -2
  438. package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
  439. package/lib/module/contexts/messageInputContext/MessageInputContext.js +2 -2
  440. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  441. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  442. package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  443. package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
  444. package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
  445. package/lib/module/contexts/messagesContext/MessagesContext.js +2 -2
  446. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  447. package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
  448. package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
  449. package/lib/module/contexts/overlayContext/OverlayProvider.js +12 -12
  450. package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
  451. package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
  452. package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
  453. package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +2 -2
  454. package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
  455. package/lib/module/contexts/themeContext/utils/theme.js +7 -6
  456. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  457. package/lib/module/contexts/threadContext/ThreadContext.js +2 -2
  458. package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
  459. package/lib/module/contexts/translationContext/TranslationContext.js +2 -2
  460. package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
  461. package/lib/module/contexts/typingContext/TypingContext.js +2 -2
  462. package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
  463. package/lib/module/icons/UserAdmin.js +62 -0
  464. package/lib/module/icons/UserAdmin.js.map +1 -0
  465. package/lib/module/icons/index.js +0 -26
  466. package/lib/module/icons/index.js.map +1 -1
  467. package/lib/module/init.js +13 -0
  468. package/lib/module/init.js.map +1 -0
  469. package/lib/module/utils/Streami18n.js.map +1 -1
  470. package/lib/module/utils/getResizedImageUrl.js +8 -5
  471. package/lib/module/utils/getResizedImageUrl.js.map +1 -1
  472. package/lib/module/utils/utils.js.map +1 -1
  473. package/lib/module/version.json +1 -1
  474. package/lib/typescript/components/Attachment/Attachment.d.ts +5 -5
  475. package/lib/typescript/components/Attachment/AttachmentActions.d.ts +4 -4
  476. package/lib/typescript/components/Attachment/Card.d.ts +4 -4
  477. package/lib/typescript/components/Attachment/FileAttachment.d.ts +5 -5
  478. package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +4 -4
  479. package/lib/typescript/components/Attachment/Gallery.d.ts +5 -5
  480. package/lib/typescript/components/Attachment/Giphy.d.ts +6 -6
  481. package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +3 -3
  482. package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +3 -3
  483. package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +3 -3
  484. package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +3 -3
  485. package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +3 -3
  486. package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +3 -3
  487. package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +2 -2
  488. package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +4 -4
  489. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.d.ts +3 -2
  490. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +4 -4
  491. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +5 -5
  492. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +9 -9
  493. package/lib/typescript/components/Avatar/Avatar.d.ts +1 -1
  494. package/lib/typescript/components/Channel/Channel.d.ts +7 -7
  495. package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +2 -2
  496. package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +3 -3
  497. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +3 -3
  498. package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +3 -3
  499. package/lib/typescript/components/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +3 -3
  500. package/lib/typescript/components/Channel/hooks/useCreateThreadContext.d.ts +2 -2
  501. package/lib/typescript/components/Channel/hooks/useCreateTypingContext.d.ts +2 -2
  502. package/lib/typescript/components/ChannelList/ChannelList.d.ts +14 -14
  503. package/lib/typescript/components/ChannelList/ChannelListMessenger.d.ts +4 -4
  504. package/lib/typescript/components/ChannelList/hooks/listeners/useAddedToChannelNotification.d.ts +5 -5
  505. package/lib/typescript/components/ChannelList/hooks/listeners/useChannelDeleted.d.ts +5 -5
  506. package/lib/typescript/components/ChannelList/hooks/listeners/useChannelHidden.d.ts +5 -5
  507. package/lib/typescript/components/ChannelList/hooks/listeners/useChannelTruncated.d.ts +5 -5
  508. package/lib/typescript/components/ChannelList/hooks/listeners/useChannelUpdated.d.ts +5 -5
  509. package/lib/typescript/components/ChannelList/hooks/listeners/useChannelVisible.d.ts +5 -5
  510. package/lib/typescript/components/ChannelList/hooks/listeners/useConnectionRecovered.d.ts +2 -2
  511. package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessage.d.ts +4 -4
  512. package/lib/typescript/components/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +5 -5
  513. package/lib/typescript/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.d.ts +5 -5
  514. package/lib/typescript/components/ChannelList/hooks/listeners/useUserPresence.d.ts +4 -4
  515. package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +2 -2
  516. package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +7 -7
  517. package/lib/typescript/components/ChannelList/utils.d.ts +7 -7
  518. package/lib/typescript/components/ChannelPreview/ChannelAvatar.d.ts +3 -3
  519. package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +5 -5
  520. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +4 -5
  521. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +5 -5
  522. package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +3 -3
  523. package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +3 -3
  524. package/lib/typescript/components/ChannelPreview/ChannelPreviewTitle.d.ts +3 -3
  525. package/lib/typescript/components/ChannelPreview/ChannelPreviewUnreadCount.d.ts +3 -3
  526. package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts +3 -3
  527. package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts +4 -4
  528. package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.d.ts +2 -2
  529. package/lib/typescript/components/ChannelPreview/hooks/useLatestMessagePreview.d.ts +5 -5
  530. package/lib/typescript/components/Chat/Chat.d.ts +3 -3
  531. package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +2 -2
  532. package/lib/typescript/components/Chat/hooks/useIsOnline.d.ts +2 -2
  533. package/lib/typescript/components/Chat/hooks/useMutedUsers.d.ts +2 -2
  534. package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +9 -9
  535. package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +10 -10
  536. package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +10 -10
  537. package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +10 -10
  538. package/lib/typescript/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.d.ts +1 -0
  539. package/lib/typescript/components/Message/Message.d.ts +11 -11
  540. package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +4 -4
  541. package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +4 -4
  542. package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +5 -5
  543. package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +6 -6
  544. package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +4 -4
  545. package/lib/typescript/components/Message/MessageSimple/MessageReplies.d.ts +4 -4
  546. package/lib/typescript/components/Message/MessageSimple/MessageRepliesAvatars.d.ts +3 -3
  547. package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +4 -4
  548. package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +4 -4
  549. package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +6 -6
  550. package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +4 -4
  551. package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +19 -5
  552. package/lib/typescript/components/Message/MessageSimple/utils/renderText.test.d.ts +1 -0
  553. package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +2 -2
  554. package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +2 -2
  555. package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +3 -3
  556. package/lib/typescript/components/Message/utils/messageActions.d.ts +5 -5
  557. package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +2 -2
  558. package/lib/typescript/components/MessageInput/AttachButton.d.ts +4 -4
  559. package/lib/typescript/components/MessageInput/CommandsButton.d.ts +4 -4
  560. package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +4 -4
  561. package/lib/typescript/components/MessageInput/ImageUploadPreview.d.ts +4 -4
  562. package/lib/typescript/components/MessageInput/InputButtons.d.ts +5 -5
  563. package/lib/typescript/components/MessageInput/MessageInput.d.ts +4 -4
  564. package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +4 -4
  565. package/lib/typescript/components/MessageInput/SendButton.d.ts +4 -4
  566. package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts +2 -2
  567. package/lib/typescript/components/MessageInput/hooks/useCooldown.d.ts +2 -2
  568. package/lib/typescript/components/MessageList/InlineLoadingMoreIndicator.d.ts +2 -2
  569. package/lib/typescript/components/MessageList/InlineLoadingMoreRecentIndicator.d.ts +2 -2
  570. package/lib/typescript/components/MessageList/InlineLoadingMoreThreadIndicator.d.ts +2 -2
  571. package/lib/typescript/components/MessageList/MessageList.d.ts +7 -7
  572. package/lib/typescript/components/MessageList/MessageSystem.d.ts +4 -4
  573. package/lib/typescript/components/MessageList/TypingIndicator.d.ts +2 -2
  574. package/lib/typescript/components/MessageList/TypingIndicatorContainer.d.ts +4 -4
  575. package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +5 -5
  576. package/lib/typescript/components/MessageList/hooks/useTypingString.d.ts +2 -2
  577. package/lib/typescript/components/MessageList/utils/filterTypingUsers.d.ts +3 -3
  578. package/lib/typescript/components/MessageList/utils/getDateSeparators.d.ts +4 -4
  579. package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +4 -4
  580. package/lib/typescript/components/MessageList/utils/getLastReceivedMessage.d.ts +2 -2
  581. package/lib/typescript/components/MessageList/utils/getReadStates.d.ts +8 -5
  582. package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +4 -4
  583. package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts +4 -3
  584. package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +4 -4
  585. package/lib/typescript/components/MessageOverlay/OverlayReactionList.d.ts +6 -6
  586. package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +2 -2
  587. package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +1 -1
  588. package/lib/typescript/components/Reply/Reply.d.ts +4 -4
  589. package/lib/typescript/components/Thread/Thread.d.ts +7 -7
  590. package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts +2 -2
  591. package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +2 -2
  592. package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +12 -12
  593. package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +18 -18
  594. package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +19 -19
  595. package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +17 -17
  596. package/lib/typescript/contexts/chatContext/ChatContext.d.ts +11 -11
  597. package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +8 -8
  598. package/lib/typescript/contexts/keyboardContext/KeyboardContext.d.ts +2 -2
  599. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +12 -12
  600. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +33 -33
  601. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +2 -2
  602. package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +3 -3
  603. package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +21 -21
  604. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +57 -57
  605. package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +4 -4
  606. package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts +2 -2
  607. package/lib/typescript/contexts/paginatedMessageListContext/PaginatedMessageListContext.d.ts +8 -8
  608. package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +20 -20
  609. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +6 -5
  610. package/lib/typescript/contexts/threadContext/ThreadContext.d.ts +10 -10
  611. package/lib/typescript/contexts/translationContext/TranslationContext.d.ts +2 -2
  612. package/lib/typescript/contexts/typingContext/TypingContext.d.ts +8 -8
  613. package/lib/typescript/icons/{Left.d.ts → UserAdmin.d.ts} +1 -1
  614. package/lib/typescript/icons/index.d.ts +0 -2
  615. package/lib/typescript/init.d.ts +2 -0
  616. package/lib/typescript/types/types.d.ts +16 -13
  617. package/lib/typescript/utils/Streami18n.d.ts +4 -4
  618. package/lib/typescript/utils/getResizedImageUrl.d.ts +2 -1
  619. package/lib/typescript/utils/utils.d.ts +21 -21
  620. package/package.json +3 -5
  621. package/src/components/Attachment/Attachment.tsx +15 -56
  622. package/src/components/Attachment/AttachmentActions.tsx +15 -55
  623. package/src/components/Attachment/Card.tsx +15 -48
  624. package/src/components/Attachment/FileAttachment.tsx +14 -48
  625. package/src/components/Attachment/FileAttachmentGroup.tsx +16 -57
  626. package/src/components/Attachment/Gallery.tsx +18 -59
  627. package/src/components/Attachment/Giphy.tsx +82 -125
  628. package/src/components/Attachment/__tests__/buildGallery.test.js +4 -4
  629. package/src/components/Attachment/utils/buildGallery/buildGallery.ts +5 -3
  630. package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +6 -10
  631. package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +5 -5
  632. package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +5 -3
  633. package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +5 -3
  634. package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +5 -3
  635. package/src/components/Attachment/utils/getAspectRatio.ts +4 -4
  636. package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +21 -61
  637. package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx +5 -3
  638. package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +12 -19
  639. package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +14 -21
  640. package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +21 -24
  641. package/src/components/Avatar/Avatar.tsx +1 -1
  642. package/src/components/Channel/Channel.tsx +174 -257
  643. package/src/components/Channel/hooks/useCreateChannelContext.ts +4 -19
  644. package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +52 -68
  645. package/src/components/Channel/hooks/useCreateMessagesContext.ts +4 -19
  646. package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +3 -18
  647. package/src/components/Channel/hooks/useCreatePaginatedMessageListContext.ts +16 -32
  648. package/src/components/Channel/hooks/useCreateThreadContext.ts +4 -19
  649. package/src/components/Channel/hooks/useCreateTypingContext.ts +4 -19
  650. package/src/components/ChannelList/ChannelList.tsx +28 -49
  651. package/src/components/ChannelList/ChannelListMessenger.tsx +19 -70
  652. package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +14 -36
  653. package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +13 -35
  654. package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +13 -35
  655. package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +15 -37
  656. package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +13 -35
  657. package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +14 -36
  658. package/src/components/ChannelList/hooks/listeners/useConnectionRecovered.ts +3 -18
  659. package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +11 -33
  660. package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +13 -35
  661. package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +13 -35
  662. package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +9 -31
  663. package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +4 -19
  664. package/src/components/ChannelList/hooks/usePaginatedChannels.ts +11 -29
  665. package/src/components/ChannelList/utils.ts +9 -42
  666. package/src/components/ChannelPreview/ChannelAvatar.tsx +5 -26
  667. package/src/components/ChannelPreview/ChannelPreview.tsx +18 -51
  668. package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +11 -21
  669. package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +13 -46
  670. package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +5 -26
  671. package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +6 -27
  672. package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +5 -26
  673. package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +5 -26
  674. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +7 -28
  675. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +6 -27
  676. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +7 -28
  677. package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +27 -78
  678. package/src/components/Chat/Chat.tsx +15 -40
  679. package/src/components/Chat/hooks/useCreateChatContext.ts +4 -19
  680. package/src/components/Chat/hooks/useIsOnline.ts +4 -19
  681. package/src/components/Chat/hooks/useMutedUsers.ts +5 -20
  682. package/src/components/ImageGallery/ImageGallery.tsx +30 -40
  683. package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +19 -11
  684. package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +42 -20
  685. package/src/components/ImageGallery/components/ImageGrid.tsx +45 -30
  686. package/src/components/ImageGallery/components/__tests__/ImageGalleryHeader.test.tsx +31 -0
  687. package/src/components/Message/Message.tsx +40 -93
  688. package/src/components/Message/MessageSimple/MessageAvatar.tsx +13 -54
  689. package/src/components/Message/MessageSimple/MessageContent.tsx +18 -61
  690. package/src/components/Message/MessageSimple/MessageDeleted.tsx +17 -58
  691. package/src/components/Message/MessageSimple/MessageFooter.tsx +23 -65
  692. package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +13 -54
  693. package/src/components/Message/MessageSimple/MessageReplies.tsx +15 -56
  694. package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +5 -26
  695. package/src/components/Message/MessageSimple/MessageSimple.tsx +16 -57
  696. package/src/components/Message/MessageSimple/MessageStatus.tsx +13 -54
  697. package/src/components/Message/MessageSimple/MessageTextContainer.tsx +19 -66
  698. package/src/components/Message/MessageSimple/ReactionList.tsx +47 -88
  699. package/src/components/Message/MessageSimple/utils/renderText.test.tsx +70 -0
  700. package/src/components/Message/MessageSimple/utils/renderText.tsx +89 -74
  701. package/src/components/Message/hooks/useCreateMessageContext.ts +4 -19
  702. package/src/components/Message/hooks/useMessageActionHandlers.ts +8 -23
  703. package/src/components/Message/hooks/useMessageActions.tsx +8 -23
  704. package/src/components/Message/utils/messageActions.ts +7 -34
  705. package/src/components/Message/utils/removeReservedFields.ts +3 -18
  706. package/src/components/MessageInput/AttachButton.tsx +13 -54
  707. package/src/components/MessageInput/CommandsButton.tsx +15 -56
  708. package/src/components/MessageInput/FileUploadPreview.tsx +15 -57
  709. package/src/components/MessageInput/ImageUploadPreview.tsx +13 -55
  710. package/src/components/MessageInput/InputButtons.tsx +13 -54
  711. package/src/components/MessageInput/MessageInput.tsx +25 -66
  712. package/src/components/MessageInput/MoreOptionsButton.tsx +13 -54
  713. package/src/components/MessageInput/SendButton.tsx +13 -54
  714. package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +4 -19
  715. package/src/components/MessageInput/hooks/useCooldown.ts +5 -19
  716. package/src/components/MessageList/InlineLoadingMoreIndicator.tsx +3 -18
  717. package/src/components/MessageList/InlineLoadingMoreRecentIndicator.tsx +3 -18
  718. package/src/components/MessageList/InlineLoadingMoreThreadIndicator.tsx +3 -18
  719. package/src/components/MessageList/MessageList.tsx +34 -76
  720. package/src/components/MessageList/MessageSystem.tsx +5 -26
  721. package/src/components/MessageList/TypingIndicator.tsx +3 -18
  722. package/src/components/MessageList/TypingIndicatorContainer.tsx +14 -47
  723. package/src/components/MessageList/hooks/useMessageList.ts +19 -52
  724. package/src/components/MessageList/hooks/useTypingString.ts +5 -20
  725. package/src/components/MessageList/utils/filterTypingUsers.ts +7 -28
  726. package/src/components/MessageList/utils/getDateSeparators.ts +6 -27
  727. package/src/components/MessageList/utils/getGroupStyles.ts +6 -27
  728. package/src/components/MessageList/utils/getLastReceivedMessage.ts +3 -18
  729. package/src/components/MessageList/utils/getReadStates.ts +5 -20
  730. package/src/components/MessageOverlay/MessageActionList.tsx +15 -56
  731. package/src/components/MessageOverlay/MessageActionListItem.tsx +20 -9
  732. package/src/components/MessageOverlay/MessageOverlay.tsx +38 -81
  733. package/src/components/MessageOverlay/OverlayReactionList.tsx +21 -74
  734. package/src/components/MessageOverlay/OverlayReactions.tsx +3 -18
  735. package/src/components/Reply/Reply.tsx +22 -69
  736. package/src/components/Thread/Thread.tsx +20 -53
  737. package/src/components/Thread/components/ThreadFooterComponent.tsx +12 -47
  738. package/src/components/docs/data.js +38 -37
  739. package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +9 -7
  740. package/src/contexts/channelContext/ChannelContext.tsx +15 -48
  741. package/src/contexts/channelsContext/ChannelsContext.tsx +22 -59
  742. package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +38 -115
  743. package/src/contexts/channelsStateContext/useChannelState.ts +27 -60
  744. package/src/contexts/chatContext/ChatContext.tsx +14 -49
  745. package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +12 -54
  746. package/src/contexts/keyboardContext/KeyboardContext.tsx +13 -7
  747. package/src/contexts/messageContext/MessageContext.tsx +15 -48
  748. package/src/contexts/messageInputContext/MessageInputContext.tsx +61 -110
  749. package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +5 -20
  750. package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +7 -31
  751. package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +24 -71
  752. package/src/contexts/messagesContext/MessagesContext.tsx +60 -99
  753. package/src/contexts/overlayContext/OverlayContext.tsx +18 -26
  754. package/src/contexts/overlayContext/OverlayProvider.tsx +7 -22
  755. package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +13 -53
  756. package/src/contexts/suggestionsContext/SuggestionsContext.tsx +39 -40
  757. package/src/contexts/themeContext/utils/theme.ts +13 -11
  758. package/src/contexts/threadContext/ThreadContext.tsx +13 -46
  759. package/src/contexts/translationContext/TranslationContext.tsx +12 -7
  760. package/src/contexts/typingContext/TypingContext.tsx +11 -44
  761. package/src/icons/UserAdmin.tsx +23 -0
  762. package/src/icons/index.ts +0 -2
  763. package/src/init.ts +5 -0
  764. package/src/types/types.ts +16 -18
  765. package/src/utils/Streami18n.ts +3 -3
  766. package/src/utils/__tests__/getResizedImageUrl.test.js +56 -0
  767. package/src/utils/getResizedImageUrl.ts +15 -13
  768. package/src/utils/utils.ts +63 -128
  769. package/src/version.json +1 -1
  770. package/lib/commonjs/icons/Left.js +0 -38
  771. package/lib/commonjs/icons/Left.js.map +0 -1
  772. package/lib/commonjs/icons/Right.js +0 -38
  773. package/lib/commonjs/icons/Right.js.map +0 -1
  774. package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js +0 -100
  775. package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js.map +0 -1
  776. package/lib/commonjs/styleguideComponents/BottomSheet.js +0 -25
  777. package/lib/commonjs/styleguideComponents/BottomSheet.js.map +0 -1
  778. package/lib/commonjs/styleguideComponents/JsDoc.js +0 -87
  779. package/lib/commonjs/styleguideComponents/JsDoc.js.map +0 -1
  780. package/lib/commonjs/styleguideComponents/Markdown.js +0 -12
  781. package/lib/commonjs/styleguideComponents/Markdown.js.map +0 -1
  782. package/lib/commonjs/styleguideComponents/PathlineRenderer.js +0 -92
  783. package/lib/commonjs/styleguideComponents/PathlineRenderer.js.map +0 -1
  784. package/lib/commonjs/styleguideComponents/PropsRenderer.js +0 -267
  785. package/lib/commonjs/styleguideComponents/PropsRenderer.js.map +0 -1
  786. package/lib/commonjs/styleguideComponents/Reanimated.js +0 -2
  787. package/lib/commonjs/styleguideComponents/Reanimated.js.map +0 -1
  788. package/lib/commonjs/styleguideComponents/Wrapper.js +0 -29
  789. package/lib/commonjs/styleguideComponents/Wrapper.js.map +0 -1
  790. package/lib/commonjs/styleguideComponents/register-react-native-web.js +0 -44
  791. package/lib/commonjs/styleguideComponents/register-react-native-web.js.map +0 -1
  792. package/lib/commonjs/styleguideComponents/resolveAssetSource.js +0 -11
  793. package/lib/commonjs/styleguideComponents/resolveAssetSource.js.map +0 -1
  794. package/lib/module/icons/Left.js +0 -38
  795. package/lib/module/icons/Left.js.map +0 -1
  796. package/lib/module/icons/Right.js +0 -38
  797. package/lib/module/icons/Right.js.map +0 -1
  798. package/lib/module/styleguideComponents/ArgumentsRenderer.js +0 -100
  799. package/lib/module/styleguideComponents/ArgumentsRenderer.js.map +0 -1
  800. package/lib/module/styleguideComponents/BottomSheet.js +0 -25
  801. package/lib/module/styleguideComponents/BottomSheet.js.map +0 -1
  802. package/lib/module/styleguideComponents/JsDoc.js +0 -87
  803. package/lib/module/styleguideComponents/JsDoc.js.map +0 -1
  804. package/lib/module/styleguideComponents/Markdown.js +0 -12
  805. package/lib/module/styleguideComponents/Markdown.js.map +0 -1
  806. package/lib/module/styleguideComponents/PathlineRenderer.js +0 -92
  807. package/lib/module/styleguideComponents/PathlineRenderer.js.map +0 -1
  808. package/lib/module/styleguideComponents/PropsRenderer.js +0 -267
  809. package/lib/module/styleguideComponents/PropsRenderer.js.map +0 -1
  810. package/lib/module/styleguideComponents/Reanimated.js +0 -2
  811. package/lib/module/styleguideComponents/Reanimated.js.map +0 -1
  812. package/lib/module/styleguideComponents/Wrapper.js +0 -29
  813. package/lib/module/styleguideComponents/Wrapper.js.map +0 -1
  814. package/lib/module/styleguideComponents/register-react-native-web.js +0 -44
  815. package/lib/module/styleguideComponents/register-react-native-web.js.map +0 -1
  816. package/lib/module/styleguideComponents/resolveAssetSource.js +0 -11
  817. package/lib/module/styleguideComponents/resolveAssetSource.js.map +0 -1
  818. package/lib/typescript/icons/Right.d.ts +0 -3
  819. package/src/icons/Left.tsx +0 -12
  820. package/src/icons/Right.tsx +0 -12
  821. package/src/styleguideComponents/ArgumentsRenderer.tsx +0 -60
  822. package/src/styleguideComponents/BottomSheet.tsx +0 -3
  823. package/src/styleguideComponents/JsDoc.tsx +0 -45
  824. package/src/styleguideComponents/Markdown.tsx +0 -1
  825. package/src/styleguideComponents/PathlineRenderer.tsx +0 -45
  826. package/src/styleguideComponents/PropsRenderer.tsx +0 -141
  827. package/src/styleguideComponents/Reanimated.tsx +0 -0
  828. package/src/styleguideComponents/Wrapper.tsx +0 -7
  829. package/src/styleguideComponents/register-react-native-web.js +0 -13
  830. package/src/styleguideComponents/resolveAssetSource.js +0 -2
@@ -1 +1 @@
1
- {"version":3,"sources":["MessagesContext.tsx"],"names":["MessagesContext","React","createContext","MessagesProvider","children","value","useMessagesContext","withMessagesContext","Component","WithMessagesContextComponent","props","messagesContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AA2DA;;;;;;;;;AAgaO,IAAMA,eAAe,GAAGC,kBAAMC,aAAN,CAAoB,EAApB,CAAxB;;;;AAEA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB;AAAA,MAS9BC,QAT8B,QAS9BA,QAT8B;AAAA,MAU9BC,KAV8B,QAU9BA,KAV8B;AAAA,SAc9B,gCAAC,eAAD,CAAiB,QAAjB;AAA0B,IAAA,KAAK,EAAEA,KAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACGD,QADH,CAd8B;AAAA,CAAzB;;;;AAmBA,IAAME,kBAAkB,GAAG,SAArBA,kBAAqB;AAAA,SAQ3B,uBAAWN,eAAX,CAR2B;AAAA,CAA3B;;;;AAeA,IAAMO,mBAAmB,GAAG,SAAtBA,mBAAsB,CAUjCC,SAViC,EAW6C;AAC9E,MAAMC,4BAA4B,GAAG,SAA/BA,4BAA+B,CACnCC,KADmC,EAEhC;AACH,QAAMC,eAAe,GAAGL,kBAAkB,EAA1C;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,eAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,4BAA4B,CAACG,WAA7B,2BAAiE,oCAAeJ,SAAf,CAAjE;AACA,SAAOC,4BAAP;AACD,CArBM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { TouchableOpacityProps } from 'react-native';\n\nimport type { MessagePinnedHeaderProps } from 'src/components/Message/MessageSimple/MessagePinnedHeader';\n\nimport type { ChannelState, MessageResponse } from 'stream-chat';\n\nimport type { AttachmentProps } from '../../components/Attachment/Attachment';\nimport type { AttachmentActionsProps } from '../../components/Attachment/AttachmentActions';\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 {\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 { 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 {\n DefaultAttachmentType,\n DefaultChannelType,\n DefaultCommandType,\n DefaultEventType,\n DefaultMessageType,\n DefaultReactionType,\n DefaultUserType,\n UnknownType,\n} 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 { getDisplayName } from '../utils/getDisplayName';\n\nexport type MessageContentType = 'attachments' | 'files' | 'gallery' | 'quoted_reply' | 'text';\n\nexport type MessagesContextValue<\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n> = {\n /**\n * UI component for Attachment.\n * Defaults to: [Attachment](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Attachment/Attachment.tsx)\n */\n Attachment: React.ComponentType<AttachmentProps<At, Ch, Co, Ev, Me, Re, Us>>;\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/master/src/components/Attachment/AttachmentActions.tsx)\n */\n AttachmentActions: React.ComponentType<AttachmentActionsProps<At, Ch, Co, Ev, Me, Re, Us>>;\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/master/src/components/Attachment/Card.tsx)\n */\n Card: React.ComponentType<CardProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI component for DateHeader\n * Defaults to: [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageList/DateHeader.tsx)\n **/\n DateHeader: React.ComponentType<DateHeaderProps>;\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/master/src/components/Attachment/FileAttachment.tsx)\n */\n FileAttachment: React.ComponentType<FileAttachmentProps<At, Ch, Co, Ev, Me, Re, Us>>;\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/master/src/components/Attachment/FileAttachmentGroup.tsx)\n */\n FileAttachmentGroup: React.ComponentType<FileAttachmentGroupProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI component for attachment icon for type 'file' attachment.\n * Defaults to: https://github.com/GetStream/stream-chat-react-native/blob/master/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/master/src/components/Attachment/Gallery.tsx)\n */\n Gallery: React.ComponentType<GalleryProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI component for Giphy\n * Defaults to: [Giphy](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Attachment/Giphy.tsx)\n */\n Giphy: React.ComponentType<GiphyProps<At, Ch, Co, Ev, Me, Re, Us>>;\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/master/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/master/src/components/Message/MessageSimple/InlineUnreadIndicator.tsx)\n **/\n InlineUnreadIndicator: React.ComponentType;\n Message: React.ComponentType<MessageProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI component for MessageAvatar\n * Defaults to: [MessageAvatar](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Message/MessageSimple/MessageAvatar.tsx)\n **/\n MessageAvatar: React.ComponentType<MessageAvatarProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI component for MessageContent\n * Defaults to: [MessageContent](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Message/MessageSimple/MessageContent.tsx)\n */\n MessageContent: React.ComponentType<MessageContentProps<At, Ch, Co, Ev, Me, Re, Us>>;\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/master/src/components/MessageSimple/MessageDeleted.tsx)\n */\n MessageDeleted: React.ComponentType<MessageDeletedProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * Custom message footer component\n */\n MessageFooter: React.ComponentType<MessageFooterProps<At, Ch, Co, Ev, Me, Re, Us>>;\n MessageList: React.ComponentType<MessageListProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * Custom message pinned component\n */\n MessagePinnedHeader: React.ComponentType<MessagePinnedHeaderProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI component for MessageReplies\n * Defaults to: [MessageReplies](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageSimple/MessageReplies.tsx)\n */\n\n MessageReplies: React.ComponentType<MessageRepliesProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI Component for MessageRepliesAvatars\n * Defaults to: [MessageRepliesAvatars](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageSimple/MessageRepliesAvatars.tsx)\n */\n MessageRepliesAvatars: React.ComponentType<\n MessageRepliesAvatarsProps<At, Ch, Co, Ev, Me, Re, Us>\n >;\n /**\n * UI component for MessageSimple\n * Defaults to: [MessageSimple](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Message/MessageSimple/MessageSimple.tsx)\n */\n MessageSimple: React.ComponentType<MessageSimpleProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI component for MessageStatus (delivered/read)\n * Defaults to: [MessageStatus](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Message/MessageSimple/MessageStatus.tsx)\n */\n MessageStatus: React.ComponentType<MessageStatusProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI component for MessageSystem\n * Defaults to: [MessageSystem](https://getstream.github.io/stream-chat-react-native/v3/#messagesystem)\n */\n MessageSystem: React.ComponentType<MessageSystemProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI component for OverlayReactionList\n */\n OverlayReactionList: React.ComponentType<OverlayReactionListProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * UI component for ReactionList\n * Defaults to: [ReactionList](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/Reaction/ReactionList.tsx)\n */\n ReactionList: React.ComponentType<ReactionListProps<At, Ch, Co, Ev, Me, Re, Us>>;\n removeMessage: (message: { id: string; parent_id?: string }) => void;\n /**\n * UI component for Reply\n * Defaults to: [Reply](https://getstream.github.io/stream-chat-react-native/v3/#reply)\n */\n Reply: React.ComponentType<ReplyProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /**\n * Override the api request for retry message functionality.\n */\n retrySendMessage: (message: MessageResponse<At, Ch, Co, Me, Re, Us>) => Promise<void>;\n /**\n * UI component for ScrollToBottomButton\n * Defaults to: [ScrollToBottomButton](https://getstream.github.io/stream-chat-react-native/v3/#ScrollToBottomButton)\n */\n ScrollToBottomButton: React.ComponentType<ScrollToBottomButtonProps>;\n setEditingState: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => void;\n setQuotedMessageState: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => void;\n supportedReactions: ReactionData[];\n /**\n * UI component for TypingIndicator\n * Defaults to: [TypingIndicator](https://getstream.github.io/stream-chat-react-native/v3/#typingindicator)\n */\n TypingIndicator: React.ComponentType;\n /**\n * UI component for TypingIndicatorContainer\n * Defaults to: [TypingIndicatorContainer](https://getstream.github.io/stream-chat-react-native/v3/#typingindicatorcontainer)\n */\n TypingIndicatorContainer: React.ComponentType;\n updateMessage: (\n updatedMessage: MessageResponse<At, Ch, Co, Me, Re, Us>,\n extraState?: {\n commands?: SuggestionCommand<Co>[];\n messageInput?: string;\n threadMessages?: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['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/master/src/components/Attachment/Card.tsx\n */\n UrlPreview: React.ComponentType<CardProps<At, Ch, Co, Ev, Me, Re, Us>>;\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<At, Ch, Co, Ev, Me, Re, Us>>;\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<At, Ch, Co, Ev, Me, Re, Us>>;\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<At, Ch, Co, Ev, Me, Re, Us>>;\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?: 'always' | 'never' | 'receiver' | 'sender';\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 handleBlock?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;\n /** Handler to access when a copy message action is invoked */\n handleCopy?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;\n /** Handler to access when a delete message action is invoked */\n handleDelete?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;\n /** Handler to access when an edit message action is invoked */\n handleEdit?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => void;\n /** Handler to access when a flag message action is invoked */\n handleFlag?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;\n /** Handler to access when a mute user action is invoked */\n handleMute?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;\n /** Handler to access when a pin/unpin user action is invoked*/\n handlePinMessage?:\n | ((message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => MessageActionType)\n | null;\n /** Handler to access when a quoted reply action is invoked */\n handleQuotedReply?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;\n /** Handler to process a reaction */\n handleReaction?: (\n message: MessageType<At, Ch, Co, Ev, Me, Re, Us>,\n reactionType: string,\n ) => Promise<void>;\n /** Handler to access when a retry action is invoked */\n handleRetry?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;\n /** Handler to access when a thread reply action is invoked */\n handleThreadReply?: (message: MessageType<At, Ch, Co, Ev, Me, Re, Us>) => Promise<void>;\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<At, Ch, Co, Ev, Me, Re, Us>) => MessageActionType[];\n /**\n * Custom message header component\n */\n MessageHeader?: React.ComponentType<MessageFooterProps<At, Ch, Co, Ev, Me, Re, Us>>;\n /** Custom UI component for message text */\n MessageText?: React.ComponentType<MessageTextProps<At, Ch, Co, Ev, Me, Re, Us>>;\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?: (\n payload: MessageTouchableHandlerPayload<At, Ch, Co, Ev, Me, Re, Us>,\n ) => 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<At, Ch, Co, Ev, Me, Re, Us>) => 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<At, Ch, Co, Ev, Me, Re, Us>) => 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<At, Ch, Co, Ev, Me, Re, Us>,\n ) => (reactionType: string) => Promise<void>;\n\n targetedMessage?: string;\n};\n\nexport const MessagesContext = React.createContext({} as MessagesContextValue);\n\nexport const MessagesProvider = <\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessagesContextValue<At, Ch, Co, Ev, Me, Re, Us>;\n}>) => (\n <MessagesContext.Provider value={value as unknown as MessagesContextValue}>\n {children}\n </MessagesContext.Provider>\n);\n\nexport const useMessagesContext = <\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n>() => useContext(MessagesContext) as unknown as MessagesContextValue<At, Ch, Co, Ev, Me, Re, Us>;\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 At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessagesContextValue<At, Ch, Co, Ev, Me, Re, Us>>> => {\n const WithMessagesContextComponent = (\n props: Omit<P, keyof MessagesContextValue<At, Ch, Co, Ev, Me, Re, Us>>,\n ) => {\n const messagesContext = useMessagesContext<At, Ch, Co, Ev, Me, Re, Us>();\n\n return <Component {...(props as P)} {...messagesContext} />;\n };\n WithMessagesContextComponent.displayName = `WithMessagesContext${getDisplayName(Component)}`;\n return WithMessagesContextComponent;\n};\n"]}
1
+ {"version":3,"sources":["MessagesContext.tsx"],"names":["MessagesContext","React","createContext","MessagesProvider","children","value","useMessagesContext","withMessagesContext","Component","WithMessagesContextComponent","props","messagesContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAkDA;;;;;;;;;AAoZO,IAAMA,eAAe,GAAGC,kBAAMC,aAAN,CAAoB,EAApB,CAAxB;;;;AAEA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB;AAAA,MAG9BC,QAH8B,QAG9BA,QAH8B;AAAA,MAI9BC,KAJ8B,QAI9BA,KAJ8B;AAAA,SAQ9B,gCAAC,eAAD,CAAiB,QAAjB;AAA0B,IAAA,KAAK,EAAEA,KAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACGD,QADH,CAR8B;AAAA,CAAzB;;;;AAaA,IAAME,kBAAkB,GAAG,SAArBA,kBAAqB;AAAA,SAE3B,uBAAWN,eAAX,CAF2B;AAAA,CAA3B;;;;AASA,IAAMO,mBAAmB,GAAG,SAAtBA,mBAAsB,CAIjCC,SAJiC,EAKqC;AACtE,MAAMC,4BAA4B,GAAG,SAA/BA,4BAA+B,CACnCC,KADmC,EAEhC;AACH,QAAMC,eAAe,GAAGL,kBAAkB,EAA1C;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,eAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,4BAA4B,CAACG,WAA7B,2BAAiE,oCAAeJ,SAAf,CAAjE;AACA,SAAOC,4BAAP;AACD,CAfM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { TouchableOpacityProps } from 'react-native';\n\nimport type { MessagePinnedHeaderProps } from 'src/components/Message/MessageSimple/MessagePinnedHeader';\n\nimport type { ChannelState, MessageResponse } from 'stream-chat';\n\nimport type { AttachmentProps } from '../../components/Attachment/Attachment';\nimport type { AttachmentActionsProps } from '../../components/Attachment/AttachmentActions';\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 {\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 { 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 { getDisplayName } from '../utils/getDisplayName';\n\nexport type MessageContentType = 'attachments' | 'files' | 'gallery' | 'quoted_reply' | 'text';\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/master/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/master/src/components/Attachment/AttachmentActions.tsx)\n */\n AttachmentActions: React.ComponentType<AttachmentActionsProps<StreamChatGenerics>>;\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/master/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/master/src/components/MessageList/DateHeader.tsx)\n **/\n DateHeader: React.ComponentType<DateHeaderProps>;\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/master/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/master/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/master/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/master/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/master/src/components/Attachment/Giphy.tsx)\n */\n Giphy: React.ComponentType<GiphyProps<StreamChatGenerics>>;\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/master/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/master/src/components/Message/MessageSimple/InlineUnreadIndicator.tsx)\n **/\n InlineUnreadIndicator: React.ComponentType;\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/master/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/master/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/master/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 * UI component for MessageReplies\n * Defaults to: [MessageReplies](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageSimple/MessageReplies.tsx)\n */\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/master/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/master/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/master/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.github.io/stream-chat-react-native/v3/#messagesystem)\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/master/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.github.io/stream-chat-react-native/v3/#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.github.io/stream-chat-react-native/v3/#ScrollToBottomButton)\n */\n ScrollToBottomButton: React.ComponentType<ScrollToBottomButtonProps>;\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.github.io/stream-chat-react-native/v3/#typingindicator)\n */\n TypingIndicator: React.ComponentType;\n /**\n * UI component for TypingIndicatorContainer\n * Defaults to: [TypingIndicatorContainer](https://getstream.github.io/stream-chat-react-native/v3/#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/master/src/components/Attachment/Card.tsx\n */\n UrlPreview: React.ComponentType<CardProps<StreamChatGenerics>>;\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?: 'always' | 'never' | 'receiver' | 'sender';\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 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 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({} as MessagesContextValue);\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>() => useContext(MessagesContext) as unknown as MessagesContextValue<StreamChatGenerics>;\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"]}
@@ -37,7 +37,7 @@ var withOverlayContext = function withOverlayContext(Component) {
37
37
  __self: _this,
38
38
  __source: {
39
39
  fileName: _jsxFileName,
40
- lineNumber: 95,
40
+ lineNumber: 85,
41
41
  columnNumber: 12
42
42
  }
43
43
  }));
@@ -1 +1 @@
1
- {"version":3,"sources":["OverlayContext.tsx"],"names":["OverlayContext","React","createContext","useOverlayContext","withOverlayContext","Component","WithOverlayContextComponent","props","overlayContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAuBA;;;;;;;;;AAWO,IAAMA,cAAc,GAAGC,kBAAMC,aAAN,CAAyC,EAAzC,CAAvB;;;;AAoDA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB;AAAA,SAAM,uBAAWH,cAAX,CAAN;AAAA,CAA1B;;;;AAEA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAChCC,SADgC,EAEiB;AACjD,MAAMC,2BAA2B,GAAG,SAA9BA,2BAA8B,CAACC,KAAD,EAA+C;AACjF,QAAMC,cAAc,GAAGL,iBAAiB,EAAxC;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,cAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAJD;;AAKAF,EAAAA,2BAA2B,CAACG,WAA5B,0BAA+D,oCAAeJ,SAAf,CAA/D;AACA,SAAOC,2BAAP;AACD,CAVM","sourcesContent":["import React, { useContext } from 'react';\nimport type Animated from 'react-native-reanimated';\n\nimport type { BottomSheetMethods } from '@gorhom/bottom-sheet/lib/typescript/types';\n\nimport type { AttachmentPickerProps } from '../../components/AttachmentPicker/AttachmentPicker';\nimport type { ImageGalleryCustomComponents } from '../../components/ImageGallery/ImageGallery';\nimport type { MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type {\n DefaultAttachmentType,\n DefaultChannelType,\n DefaultCommandType,\n DefaultEventType,\n DefaultMessageType,\n DefaultReactionType,\n DefaultUserType,\n UnknownType,\n} 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 { getDisplayName } from '../utils/getDisplayName';\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<OverlayContextValue>({} as OverlayContextValue);\n\nexport type OverlayProviderProps<\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\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<Us> &\n Partial<\n Pick<\n MessageOverlayContextValue<At, Ch, Co, Ev, Me, Re, Us>,\n | 'MessageActionList'\n | 'MessageActionListItem'\n | 'OverlayReactionList'\n | 'OverlayReactions'\n | 'OverlayReactionsAvatar'\n >\n > &\n Pick<OverlayContextValue, 'translucentStatusBar'> & {\n overlayOpacity: Animated.SharedValue<number>;\n closePicker?: (ref: React.RefObject<BottomSheetMethods>) => void;\n error?: boolean | Error;\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<At, Ch, Co, Ev, Me, Re, Us>;\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 = () => useContext(OverlayContext);\n\nexport const withOverlayContext = <P extends UnknownType>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof OverlayContextValue>> => {\n const WithOverlayContextComponent = (props: Omit<P, keyof OverlayContextValue>) => {\n const overlayContext = useOverlayContext();\n\n return <Component {...(props as P)} {...overlayContext} />;\n };\n WithOverlayContextComponent.displayName = `WithOverlayContext${getDisplayName(Component)}`;\n return WithOverlayContextComponent;\n};\n"]}
1
+ {"version":3,"sources":["OverlayContext.tsx"],"names":["OverlayContext","React","createContext","useOverlayContext","withOverlayContext","Component","WithOverlayContextComponent","props","overlayContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAeA;;;;;;;;;AAWO,IAAMA,cAAc,GAAGC,kBAAMC,aAAN,CAAyC,EAAzC,CAAvB;;;;AA8CA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB;AAAA,SAAM,uBAAWH,cAAX,CAAN;AAAA,CAA1B;;;;AAEA,IAAMI,kBAAkB,GAAG,SAArBA,kBAAqB,CAGhCC,SAHgC,EAIkC;AAClE,MAAMC,2BAA2B,GAAG,SAA9BA,2BAA8B,CAClCC,KADkC,EAE/B;AACH,QAAMC,cAAc,GAAGL,iBAAiB,EAAxC;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAkDC,cAAlD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,2BAA2B,CAACG,WAA5B,0BAA+D,oCAC7DJ,SAD6D,CAA/D;AAGA,SAAOC,2BAAP;AACD,CAhBM","sourcesContent":["import React, { useContext } from 'react';\nimport type Animated from 'react-native-reanimated';\n\nimport type { BottomSheetMethods } from '@gorhom/bottom-sheet/lib/typescript/types';\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 { getDisplayName } from '../utils/getDisplayName';\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<OverlayContextValue>({} as OverlayContextValue);\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 overlayOpacity: Animated.SharedValue<number>;\n closePicker?: (ref: React.RefObject<BottomSheetMethods>) => void;\n error?: boolean | Error;\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 = () => useContext(OverlayContext);\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"]}
@@ -227,7 +227,7 @@ var OverlayProvider = function OverlayProvider(props) {
227
227
  __self: _this,
228
228
  __source: {
229
229
  fileName: _jsxFileName,
230
- lineNumber: 214,
230
+ lineNumber: 199,
231
231
  columnNumber: 5
232
232
  }
233
233
  }, _react["default"].createElement(_OverlayContext.OverlayContext.Provider, {
@@ -235,14 +235,14 @@ var OverlayProvider = function OverlayProvider(props) {
235
235
  __self: _this,
236
236
  __source: {
237
237
  fileName: _jsxFileName,
238
- lineNumber: 215,
238
+ lineNumber: 200,
239
239
  columnNumber: 7
240
240
  }
241
241
  }, _react["default"].createElement(_MessageOverlayContext.MessageOverlayProvider, {
242
242
  __self: _this,
243
243
  __source: {
244
244
  fileName: _jsxFileName,
245
- lineNumber: 216,
245
+ lineNumber: 201,
246
246
  columnNumber: 9
247
247
  }
248
248
  }, _react["default"].createElement(_AttachmentPickerContext.AttachmentPickerProvider, {
@@ -250,21 +250,21 @@ var OverlayProvider = function OverlayProvider(props) {
250
250
  __self: _this,
251
251
  __source: {
252
252
  fileName: _jsxFileName,
253
- lineNumber: 217,
253
+ lineNumber: 202,
254
254
  columnNumber: 11
255
255
  }
256
256
  }, _react["default"].createElement(_ImageGalleryContext.ImageGalleryProvider, {
257
257
  __self: _this,
258
258
  __source: {
259
259
  fileName: _jsxFileName,
260
- lineNumber: 218,
260
+ lineNumber: 203,
261
261
  columnNumber: 13
262
262
  }
263
263
  }, _react["default"].createElement(_ChannelsStateContext.ChannelsStateProvider, {
264
264
  __self: _this,
265
265
  __source: {
266
266
  fileName: _jsxFileName,
267
- lineNumber: 219,
267
+ lineNumber: 204,
268
268
  columnNumber: 15
269
269
  }
270
270
  }, children), _react["default"].createElement(_ThemeContext.ThemeProvider, {
@@ -272,7 +272,7 @@ var OverlayProvider = function OverlayProvider(props) {
272
272
  __self: _this,
273
273
  __source: {
274
274
  fileName: _jsxFileName,
275
- lineNumber: 220,
275
+ lineNumber: 205,
276
276
  columnNumber: 15
277
277
  }
278
278
  }, _react["default"].createElement(_reactNativeReanimated["default"].View, {
@@ -281,7 +281,7 @@ var OverlayProvider = function OverlayProvider(props) {
281
281
  __self: _this,
282
282
  __source: {
283
283
  fileName: _jsxFileName,
284
- lineNumber: 221,
284
+ lineNumber: 206,
285
285
  columnNumber: 17
286
286
  }
287
287
  }, _react["default"].createElement(_OverlayBackdrop.OverlayBackdrop, {
@@ -292,7 +292,7 @@ var OverlayProvider = function OverlayProvider(props) {
292
292
  __self: _this,
293
293
  __source: {
294
294
  fileName: _jsxFileName,
295
- lineNumber: 225,
295
+ lineNumber: 210,
296
296
  columnNumber: 19
297
297
  }
298
298
  })), overlay === 'message' && _react["default"].createElement(_MessageOverlay.MessageOverlay, {
@@ -307,7 +307,7 @@ var OverlayProvider = function OverlayProvider(props) {
307
307
  __self: _this,
308
308
  __source: {
309
309
  fileName: _jsxFileName,
310
- lineNumber: 228,
310
+ lineNumber: 213,
311
311
  columnNumber: 19
312
312
  }
313
313
  }), overlay === 'gallery' && _react["default"].createElement(_ImageGallery.ImageGallery, {
@@ -320,7 +320,7 @@ var OverlayProvider = function OverlayProvider(props) {
320
320
  __self: _this,
321
321
  __source: {
322
322
  fileName: _jsxFileName,
323
- lineNumber: 240,
323
+ lineNumber: 225,
324
324
  columnNumber: 19
325
325
  }
326
326
  }), _react["default"].createElement(_AttachmentPicker.AttachmentPicker, (0, _extends2["default"])({
@@ -329,7 +329,7 @@ var OverlayProvider = function OverlayProvider(props) {
329
329
  __self: _this,
330
330
  __source: {
331
331
  fileName: _jsxFileName,
332
- lineNumber: 249,
332
+ lineNumber: 234,
333
333
  columnNumber: 17
334
334
  }
335
335
  }))))))));
@@ -1 +1 @@
1
- {"version":3,"sources":["OverlayProvider.tsx"],"names":["OverlayProvider","props","AttachmentPickerBottomSheetHandle","DefaultAttachmentPickerBottomSheetHandle","attachmentPickerBottomSheetHandleHeight","attachmentPickerBottomSheetHeight","AttachmentPickerError","DefaultAttachmentPickerError","attachmentPickerErrorButtonText","AttachmentPickerErrorImage","DefaultAttachmentPickerErrorImage","attachmentPickerErrorText","attachmentSelectionBarHeight","bottomInset","CameraSelectorIcon","DefaultCameraSelectorIcon","children","closePicker","ref","current","close","FileSelectorIcon","DefaultFileSelectorIcon","i18nInstance","imageGalleryCustomComponents","imageGalleryGridHandleHeight","imageGalleryGridSnapPoints","ImageOverlaySelectedComponent","DefaultImageOverlaySelectedComponent","ImageSelectorIcon","DefaultImageSelectorIcon","MessageActionList","MessageActionListItem","messageTextNumberOfLines","numberOfAttachmentImagesToLoadPerCall","numberOfAttachmentPickerImageColumns","numberOfImageGalleryGridColumns","openPicker","snapToIndex","console","warn","topInset","translucentStatusBar","OverlayReactionList","OverlayReactions","OverlayReactionsAvatar","value","attachmentPickerProps","bottomSheetRef","t","key","tDateTimeParser","input","translators","setTranslators","overlay","setOverlay","overlayOpacity","Dimensions","get","height","width","loadingTranslators","backAction","backHandler","BackHandler","addEventListener","remove","attachmentPickerContext","overlayStyle","opacity","overlayContext","style","StyleSheet","absoluteFill"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAQA;;AAEA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAYA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;AAyBO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAS7BC,KAT6B,EAU1B;AACH,8BA2CIA,KA3CJ,CACEC,iCADF;AAAA,MACEA,iCADF,sCACsC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,EAANA,MAAF;AAAUC,MAAAA,KAAK,EAALA;AAAV,KAA1B,CAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAJF,CADF,EAOGN,OAAO,KAAK,SAAZ,IACC,gCAAC,8BAAD;AACE,IAAA,iBAAiB,EAAExB,iBADrB;AAEE,IAAA,qBAAqB,EAAEC,qBAFzB;AAGE,IAAA,wBAAwB,EAAEC,wBAH5B;AAIE,IAAA,cAAc,EAAEwB,cAJlB;AAKE,IAAA,mBAAmB,EAAEd,mBALvB;AAME,IAAA,gBAAgB,EAAEC,gBANpB;AAOE,IAAA,sBAAsB,EAAEC,sBAP1B;AAQE,IAAA,OAAO,EAAEU,OAAO,KAAK,SARvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IARJ,EAmBGA,OAAO,KAAK,SAAZ,IACC,gCAAC,0BAAD;AACE,IAAA,4BAA4B,EAAE/B,4BADhC;AAEE,IAAA,4BAA4B,EAAEC,4BAFhC;AAGE,IAAA,0BAA0B,EAAEC,0BAH9B;AAIE,IAAA,+BAA+B,EAAEU,+BAJnC;AAKE,IAAA,cAAc,EAAEqB,cALlB;AAME,IAAA,OAAO,EAAEF,OAAO,KAAK,SANvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IApBJ,EA6BE,gCAAC,kCAAD;AAAkB,IAAA,GAAG,EAAEP;AAAvB,KAA2CD,qBAA3C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KA7BF,CAFF,CADF,CADF,CADF,CADF,CADF;AA4CD,CA3LM","sourcesContent":["import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';\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';\nimport Dayjs from 'dayjs';\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 { ChannelsStateProvider } from '../../contexts/channelsStateContext/ChannelsStateContext';\nimport { useStreami18n } from '../../hooks/useStreami18n';\n\nimport type {\n DefaultAttachmentType,\n DefaultChannelType,\n DefaultCommandType,\n DefaultEventType,\n DefaultMessageType,\n DefaultReactionType,\n DefaultUserType,\n UnknownType,\n} 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 TranslationContextValue,\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 At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n>(\n props: PropsWithChildren<OverlayProviderProps<At, Ch, Co, Ev, Me, Re, Us>>,\n) => {\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) {\n ref.current.close();\n }\n },\n FileSelectorIcon = DefaultFileSelectorIcon,\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 (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 [translators, setTranslators] = useState<TranslationContextValue>({\n t: (key: string) => key,\n tDateTimeParser: (input?: string | number | Date) => Dayjs(input),\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 loadingTranslators = useStreami18n({ i18nInstance, setTranslators });\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 if (bottomSheetRef.current) {\n bottomSheetRef.current.close?.();\n }\n cancelAnimation(overlayOpacity);\n if (overlay !== 'none') {\n overlayOpacity.value = withTiming(1);\n } else {\n overlayOpacity.value = withTiming(0);\n }\n }, [overlay]);\n\n // Setup translators\n useStreami18n({ i18nInstance, setTranslators });\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 if (loadingTranslators) return null;\n\n return (\n <TranslationProvider value={translators}>\n <OverlayContext.Provider value={overlayContext}>\n <MessageOverlayProvider<At, Ch, Co, Ev, Me, Re, Us>>\n <AttachmentPickerProvider value={attachmentPickerContext}>\n <ImageGalleryProvider>\n <ChannelsStateProvider<At, Ch, Co, Ev, Me, Re, Us>>{children}</ChannelsStateProvider>\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<At, Ch, Co, Ev, Me, Re, Us>\n MessageActionList={MessageActionList}\n MessageActionListItem={MessageActionListItem}\n messageTextNumberOfLines={messageTextNumberOfLines}\n overlayOpacity={overlayOpacity}\n OverlayReactionList={OverlayReactionList}\n OverlayReactions={OverlayReactions}\n OverlayReactionsAvatar={OverlayReactionsAvatar}\n visible={overlay === 'message'}\n />\n )}\n {overlay === 'gallery' && (\n <ImageGallery<At, Ch, Co, Ev, Me, Re, Us>\n imageGalleryCustomComponents={imageGalleryCustomComponents}\n imageGalleryGridHandleHeight={imageGalleryGridHandleHeight}\n imageGalleryGridSnapPoints={imageGalleryGridSnapPoints}\n numberOfImageGalleryGridColumns={numberOfImageGalleryGridColumns}\n overlayOpacity={overlayOpacity}\n visible={overlay === 'gallery'}\n />\n )}\n <AttachmentPicker ref={bottomSheetRef} {...attachmentPickerProps} />\n </ThemeProvider>\n </ImageGalleryProvider>\n </AttachmentPickerProvider>\n </MessageOverlayProvider>\n </OverlayContext.Provider>\n </TranslationProvider>\n );\n};\n"]}
1
+ {"version":3,"sources":["OverlayProvider.tsx"],"names":["OverlayProvider","props","AttachmentPickerBottomSheetHandle","DefaultAttachmentPickerBottomSheetHandle","attachmentPickerBottomSheetHandleHeight","attachmentPickerBottomSheetHeight","AttachmentPickerError","DefaultAttachmentPickerError","attachmentPickerErrorButtonText","AttachmentPickerErrorImage","DefaultAttachmentPickerErrorImage","attachmentPickerErrorText","attachmentSelectionBarHeight","bottomInset","CameraSelectorIcon","DefaultCameraSelectorIcon","children","closePicker","ref","current","close","FileSelectorIcon","DefaultFileSelectorIcon","i18nInstance","imageGalleryCustomComponents","imageGalleryGridHandleHeight","imageGalleryGridSnapPoints","ImageOverlaySelectedComponent","DefaultImageOverlaySelectedComponent","ImageSelectorIcon","DefaultImageSelectorIcon","MessageActionList","MessageActionListItem","messageTextNumberOfLines","numberOfAttachmentImagesToLoadPerCall","numberOfAttachmentPickerImageColumns","numberOfImageGalleryGridColumns","openPicker","snapToIndex","console","warn","topInset","translucentStatusBar","OverlayReactionList","OverlayReactions","OverlayReactionsAvatar","value","attachmentPickerProps","bottomSheetRef","t","key","tDateTimeParser","input","translators","setTranslators","overlay","setOverlay","overlayOpacity","Dimensions","get","height","width","loadingTranslators","backAction","backHandler","BackHandler","addEventListener","remove","attachmentPickerContext","overlayStyle","opacity","overlayContext","style","StyleSheet","absoluteFill"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAQA;;AAEA;;AAEA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAGA;;AACA;;AACA;;AACA;;AACA;;;;;;;;;AAyBO,IAAMA,eAAe,GAAG,SAAlBA,eAAkB,CAG7BC,KAH6B,EAI1B;AACH,8BA2CIA,KA3CJ,CACEC,iCADF;AAAA,MACEA,iCADF,sCACsCC,oEADtC;AAAA,MAEEC,uCAFF,G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AK,EAALA;AAAV,KAA1B,CAAxB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IAJF,CADF,EAOGN,OAAO,KAAK,SAAZ,IACC,gCAAC,8BAAD;AACE,IAAA,iBAAiB,EAAExB,iBADrB;AAEE,IAAA,qBAAqB,EAAEC,qBAFzB;AAGE,IAAA,wBAAwB,EAAEC,wBAH5B;AAIE,IAAA,cAAc,EAAEwB,cAJlB;AAKE,IAAA,mBAAmB,EAAEd,mBALvB;AAME,IAAA,gBAAgB,EAAEC,gBANpB;AAOE,IAAA,sBAAsB,EAAEC,sBAP1B;AAQE,IAAA,OAAO,EAAEU,OAAO,KAAK,SARvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IARJ,EAmBGA,OAAO,KAAK,SAAZ,IACC,gCAAC,0BAAD;AACE,IAAA,4BAA4B,EAAE/B,4BADhC;AAEE,IAAA,4BAA4B,EAAEC,4BAFhC;AAGE,IAAA,0BAA0B,EAAEC,0BAH9B;AAIE,IAAA,+BAA+B,EAAEU,+BAJnC;AAKE,IAAA,cAAc,EAAEqB,cALlB;AAME,IAAA,OAAO,EAAEF,OAAO,KAAK,SANvB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IApBJ,EA6BE,gCAAC,kCAAD;AAAkB,IAAA,GAAG,EAAEP;AAAvB,KAA2CD,qBAA3C;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KA7BF,CAFF,CADF,CADF,CADF,CADF,CADF;AA4CD,CArLM","sourcesContent":["import React, { PropsWithChildren, useEffect, useRef, useState } from 'react';\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';\nimport Dayjs from 'dayjs';\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 { ChannelsStateProvider } from '../../contexts/channelsStateContext/ChannelsStateContext';\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 TranslationContextValue,\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 {\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) {\n ref.current.close();\n }\n },\n FileSelectorIcon = DefaultFileSelectorIcon,\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 (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 [translators, setTranslators] = useState<TranslationContextValue>({\n t: (key: string) => key,\n tDateTimeParser: (input?: string | number | Date) => Dayjs(input),\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 loadingTranslators = useStreami18n({ i18nInstance, setTranslators });\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 if (bottomSheetRef.current) {\n bottomSheetRef.current.close?.();\n }\n cancelAnimation(overlayOpacity);\n if (overlay !== 'none') {\n overlayOpacity.value = withTiming(1);\n } else {\n overlayOpacity.value = withTiming(0);\n }\n }, [overlay]);\n\n // Setup translators\n useStreami18n({ i18nInstance, setTranslators });\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 if (loadingTranslators) return null;\n\n return (\n <TranslationProvider value={translators}>\n <OverlayContext.Provider value={overlayContext}>\n <MessageOverlayProvider<StreamChatGenerics>>\n <AttachmentPickerProvider value={attachmentPickerContext}>\n <ImageGalleryProvider>\n <ChannelsStateProvider<StreamChatGenerics>>{children}</ChannelsStateProvider>\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 visible={overlay === 'message'}\n />\n )}\n {overlay === 'gallery' && (\n <ImageGallery<StreamChatGenerics>\n imageGalleryCustomComponents={imageGalleryCustomComponents}\n imageGalleryGridHandleHeight={imageGalleryGridHandleHeight}\n imageGalleryGridSnapPoints={imageGalleryGridSnapPoints}\n numberOfImageGalleryGridColumns={numberOfImageGalleryGridColumns}\n overlayOpacity={overlayOpacity}\n visible={overlay === 'gallery'}\n />\n )}\n <AttachmentPicker ref={bottomSheetRef} {...attachmentPickerProps} />\n </ThemeProvider>\n </ImageGalleryProvider>\n </AttachmentPickerProvider>\n </MessageOverlayProvider>\n </OverlayContext.Provider>\n </TranslationProvider>\n );\n};\n"]}
@@ -32,7 +32,7 @@ var PaginatedMessageListProvider = function PaginatedMessageListProvider(_ref) {
32
32
  __self: _this,
33
33
  __source: {
34
34
  fileName: _jsxFileName,
35
- lineNumber: 78,
35
+ lineNumber: 57,
36
36
  columnNumber: 3
37
37
  }
38
38
  }, children);
@@ -53,7 +53,7 @@ var withPaginatedMessageListContext = function withPaginatedMessageListContext(C
53
53
  __self: _this,
54
54
  __source: {
55
55
  fileName: _jsxFileName,
56
- lineNumber: 127,
56
+ lineNumber: 87,
57
57
  columnNumber: 12
58
58
  }
59
59
  }));
@@ -1 +1 @@
1
- {"version":3,"sources":["PaginatedMessageListContext.tsx"],"names":["PaginatedMessageListContext","React","createContext","PaginatedMessageListProvider","children","value","usePaginatedMessageListContext","withPaginatedMessageListContext","Component","WithPaginatedMessageListContextComponent","props","paginatedMessageListContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAcA;;;;;;;;;AA6CO,IAAMA,2BAA2B,GAAGC,kBAAMC,aAAN,CACzC,EADyC,CAApC;;;;AAIA,IAAMC,4BAA4B,GAAG,SAA/BA,4BAA+B;AAAA,MAS1CC,QAT0C,QAS1CA,QAT0C;AAAA,MAU1CC,KAV0C,QAU1CA,KAV0C;AAAA,SAc1C,gCAAC,2BAAD,CAA6B,QAA7B;AACE,IAAA,KAAK,EAAEA,KADT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAGGD,QAHH,CAd0C;AAAA,CAArC;;;;AAqBA,IAAME,8BAA8B,GAAG,SAAjCA,8BAAiC;AAAA,SAS5C,uBAAWN,2BAAX,CAT4C;AAAA,CAAvC;;;;AAwBA,IAAMO,+BAA+B,GAAG,SAAlCA,+BAAkC,CAU7CC,SAV6C,EAW6C;AAC1F,MAAMC,wCAAwC,GAAG,SAA3CA,wCAA2C,CAC/CC,KAD+C,EAE5C;AACH,QAAMC,2BAA2B,GAC/BL,8BAA8B,EADhC;AAGA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,2BAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAPD;;AAQAF,EAAAA,wCAAwC,CAACG,WAAzC,uCAAyF,oCACvFJ,SADuF,CAAzF;AAGA,SAAOC,wCAAP;AACD,CAxBM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { ChannelState } from 'stream-chat';\n\nimport type {\n DefaultAttachmentType,\n DefaultChannelType,\n DefaultCommandType,\n DefaultEventType,\n DefaultMessageType,\n DefaultReactionType,\n DefaultUserType,\n UnknownType,\n} from '../../types/types';\nimport { getDisplayName } from '../utils/getDisplayName';\n\nexport type PaginatedMessageListContextValue<\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n> = {\n /**\n * Has more messages to load\n */\n hasMore: 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<At, Ch, Co, Ev, Me, Re, Us>['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 {} as PaginatedMessageListContextValue,\n);\n\nexport const PaginatedMessageListProvider = <\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: PaginatedMessageListContextValue<At, Ch, Co, Ev, Me, Re, Us>;\n}>) => (\n <PaginatedMessageListContext.Provider\n value={value as unknown as PaginatedMessageListContextValue}\n >\n {children}\n </PaginatedMessageListContext.Provider>\n);\n\nexport const usePaginatedMessageListContext = <\n At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n>() =>\n useContext(PaginatedMessageListContext) as unknown as PaginatedMessageListContextValue<\n At,\n Ch,\n Co,\n Ev,\n Me,\n Re,\n Us\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 At extends UnknownType = DefaultAttachmentType,\n Ch extends UnknownType = DefaultChannelType,\n Co extends string = DefaultCommandType,\n Ev extends UnknownType = DefaultEventType,\n Me extends UnknownType = DefaultMessageType,\n Re extends UnknownType = DefaultReactionType,\n Us extends UnknownType = DefaultUserType,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof PaginatedMessageListContextValue<At, Ch, Co, Ev, Me, Re, Us>>> => {\n const WithPaginatedMessageListContextComponent = (\n props: Omit<P, keyof PaginatedMessageListContextValue<At, Ch, Co, Ev, Me, Re, Us>>,\n ) => {\n const paginatedMessageListContext =\n usePaginatedMessageListContext<At, Ch, Co, Ev, Me, Re, Us>();\n\n return <Component {...(props as P)} {...paginatedMessageListContext} />;\n };\n WithPaginatedMessageListContextComponent.displayName = `WithPaginatedMessageListContext${getDisplayName(\n Component,\n )}`;\n return WithPaginatedMessageListContextComponent;\n};\n"]}
1
+ {"version":3,"sources":["PaginatedMessageListContext.tsx"],"names":["PaginatedMessageListContext","React","createContext","PaginatedMessageListProvider","children","value","usePaginatedMessageListContext","withPaginatedMessageListContext","Component","WithPaginatedMessageListContextComponent","props","paginatedMessageListContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAKA;;;;;;;;;AAuCO,IAAMA,2BAA2B,GAAGC,kBAAMC,aAAN,CACzC,EADyC,CAApC;;;;AAIA,IAAMC,4BAA4B,GAAG,SAA/BA,4BAA+B;AAAA,MAG1CC,QAH0C,QAG1CA,QAH0C;AAAA,MAI1CC,KAJ0C,QAI1CA,KAJ0C;AAAA,SAQ1C,gCAAC,2BAAD,CAA6B,QAA7B;AACE,IAAA,KAAK,EAAEA,KADT;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KAGGD,QAHH,CAR0C;AAAA,CAArC;;;;AAeA,IAAME,8BAA8B,GAAG,SAAjCA,8BAAiC;AAAA,SAG5C,uBACEN,2BADF,CAH4C;AAAA,CAAvC;;;;AAYA,IAAMO,+BAA+B,GAAG,SAAlCA,+BAAkC,CAI7CC,SAJ6C,EAKqC;AAClF,MAAMC,wCAAwC,GAAG,SAA3CA,wCAA2C,CAC/CC,KAD+C,EAE5C;AACH,QAAMC,2BAA2B,GAAGL,8BAA8B,EAAlE;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,2BAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,wCAAwC,CAACG,WAAzC,uCAAyF,oCACvFJ,SADuF,CAAzF;AAGA,SAAOC,wCAAP;AACD,CAjBM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { ChannelState } from 'stream-chat';\n\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport { getDisplayName } from '../utils/getDisplayName';\n\nexport type PaginatedMessageListContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * Has more messages to load\n */\n hasMore: 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 {} 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 useContext(\n PaginatedMessageListContext,\n ) as unknown as PaginatedMessageListContextValue<StreamChatGenerics>;\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"]}
@@ -92,7 +92,7 @@ var SuggestionsProvider = function SuggestionsProvider(_ref) {
92
92
  __self: _this,
93
93
  __source: {
94
94
  fileName: _jsxFileName,
95
- lineNumber: 124,
95
+ lineNumber: 125,
96
96
  columnNumber: 5
97
97
  }
98
98
  }, children);
@@ -113,7 +113,7 @@ var withSuggestionsContext = function withSuggestionsContext(Component) {
113
113
  __self: _this,
114
114
  __source: {
115
115
  fileName: _jsxFileName,
116
- lineNumber: 147,
116
+ lineNumber: 146,
117
117
  columnNumber: 12
118
118
  }
119
119
  }));
@@ -1 +1 @@
1
- {"version":3,"sources":["SuggestionsContext.tsx"],"names":["isSuggestionCommand","suggestion","isSuggestionEmoji","isSuggestionUser","SuggestionsContext","React","createContext","SuggestionsProvider","children","value","triggerType","setTriggerType","suggestions","setSuggestions","suggestionsViewActive","setSuggestionsViewActive","openSuggestions","component","updateSuggestions","newSuggestions","closeSuggestions","undefined","suggestionsContext","useSuggestionsContext","withSuggestionsContext","Component","WithSuggestionsContextComponent","props","displayName"],"mappings":";;;;;;;;;;;;;AAAA;;AASA;;;;;;;;;AAIO,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAIjCC,UAJiC;AAAA,SAKO,UAAUA,UALjB;AAAA,CAA5B;;;;AAOA,IAAMC,iBAAiB,GAAG,SAApBA,iBAAoB,CAI/BD,UAJ+B;AAAA,SAKP,aAAaA,UALN;AAAA,CAA1B;;;;AAOA,IAAME,gBAAgB,GAAG,SAAnBA,gBAAmB,CAI9BF,UAJ8B;AAAA,SAKO,QAAQA,UALf;AAAA,CAAzB;;;;AAqDA,IAAMG,kBAAkB,GAAGC,kBAAMC,aAAN,CAAoB,EAApB,CAA3B;;;;AAKA,IAAMC,mBAAmB,GAAG,SAAtBA,mBAAsB,OAM4C;AAAA,MAF7EC,QAE6E,QAF7EA,QAE6E;AAAA,MAD7EC,KAC6E,QAD7EA,KAC6E;;AAC7E,kBAAsC,qBAAyC,IAAzC,CAAtC;AAAA;AAAA,MAAOC,WAAP;AAAA,MAAoBC,cAApB;;AACA,mBAAsC,sBAAtC;AAAA;AAAA,MAAOC,WAAP;AAAA,MAAoBC,cAApB;;AACA,mBAA0D,qBAAS,KAAT,CAA1D;AAAA;AAAA,M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D;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCL,kBAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAI,EAAAA,+BAA+B,CAACE,WAAhC,8BAAuE,oCACrEH,SADqE,CAAvE;AAGA,SAAOC,+BAAP;AACD,CAlBM","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 { DefaultCommandType, DefaultUserType, UnknownType } from '../../types/types';\nimport { getDisplayName } from '../utils/getDisplayName';\n\nexport type SuggestionComponentType = 'command' | 'emoji' | 'mention';\n\nexport const isSuggestionCommand = <\n Co extends string = DefaultCommandType,\n Us extends UnknownType = DefaultUserType,\n>(\n suggestion: Suggestion<Co, Us>,\n): suggestion is SuggestionCommand<Co> => 'args' in suggestion;\n\nexport const isSuggestionEmoji = <\n Co extends string = DefaultCommandType,\n Us extends UnknownType = DefaultUserType,\n>(\n suggestion: Suggestion<Co, Us>,\n): suggestion is Emoji => 'unicode' in suggestion;\n\nexport const isSuggestionUser = <\n Co extends string = DefaultCommandType,\n Us extends UnknownType = DefaultUserType,\n>(\n suggestion: Suggestion<Co, Us>,\n): suggestion is SuggestionUser<Us> => 'id' in suggestion;\n\nexport type Suggestion<\n Co extends string = DefaultCommandType,\n Us extends UnknownType = DefaultUserType,\n> = Emoji | SuggestionCommand<Co> | SuggestionUser<Us>;\n\nexport type SuggestionCommand<Co extends string = DefaultCommandType> = CommandResponse<Co>;\nexport type SuggestionUser<Us extends UnknownType = DefaultUserType> = UserResponse<Us>;\n\nexport type Suggestions<\n Co extends string = DefaultCommandType,\n Us extends UnknownType = DefaultUserType,\n> = {\n data: Suggestion<Co, Us>[];\n onSelect: (item: Suggestion<Co, Us>) => void;\n queryText?: string;\n};\n\nexport type SuggestionsContextValue<\n Co extends string = DefaultCommandType,\n Us extends UnknownType = DefaultUserType,\n> = {\n AutoCompleteSuggestionHeader: React.ComponentType<AutoCompleteSuggestionHeaderProps>;\n AutoCompleteSuggestionItem: React.ComponentType<AutoCompleteSuggestionItemProps<Co, Us>>;\n AutoCompleteSuggestionList: React.ComponentType<AutoCompleteSuggestionListProps<Co, Us>>;\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<Co, Us>;\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<Co, Us>) => void;\n queryText?: string;\n suggestionsViewActive?: boolean;\n};\n\nexport const SuggestionsContext = React.createContext({} as SuggestionsContextValue);\n\n/**\n * This provider component exposes the properties stored within the SuggestionsContext.\n */\nexport const SuggestionsProvider = <\n Co extends string = DefaultCommandType,\n Us extends UnknownType = DefaultUserType,\n>({\n children,\n value,\n}: PropsWithChildren<{ value?: Partial<SuggestionsContextValue<Co, Us>> }>) => {\n const [triggerType, setTriggerType] = useState<SuggestionComponentType | null>(null);\n const [suggestions, setSuggestions] = useState<Suggestions<Co, Us>>();\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<Co, Us>) => {\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 Co extends string = DefaultCommandType,\n Us extends UnknownType = DefaultUserType,\n>() => useContext(SuggestionsContext) as unknown as SuggestionsContextValue<Co, Us>;\n\nexport const withSuggestionsContext = <\n P extends UnknownType,\n Co extends string = DefaultCommandType,\n Us extends UnknownType = DefaultUserType,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof SuggestionsContextValue<Co, Us>>> => {\n const WithSuggestionsContextComponent = (\n props: Omit<P, keyof SuggestionsContextValue<Co, Us>>,\n ) => {\n const suggestionsContext = useSuggestionsContext<Co, Us>();\n\n return <Component {...(props as P)} {...suggestionsContext} />;\n };\n WithSuggestionsContextComponent.displayName = `WithSuggestionsContext${getDisplayName(\n Component,\n )}`;\n return WithSuggestionsContextComponent;\n};\n"]}
1
+ {"version":3,"sources":["SuggestionsContext.tsx"],"names":["isSuggestionCommand","suggestion","isSuggestionEmoji","isSuggestionUser","SuggestionsContext","React","createContext","SuggestionsProvider","children","value","triggerType","setTriggerType","suggestions","setSuggestions","suggestionsViewActive","setSuggestionsViewActive","openSuggestions","component","updateSuggestions","newSuggestions","closeSuggestions","undefined","suggestionsContext","useSuggestionsContext","withSuggestionsContext","Component","WithSuggestionsContextComponent","props","displayName"],"mappings":";;;;;;;;;;;;;AAAA;;AASA;;;;;;;;;AAIO,IAAMA,mBAAmB,GAAG,SAAtBA,mBAAsB,CAGjCC,UAHiC;AAAA,SAIuB,UAAUA,UAJjC;AAAA,CAA5B;;;;AAMA,IAAMC,iBAAiB,GAAG,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IAAAA,WAAW,EAAXA,WAJsB;AAKtBE,IAAAA,qBAAqB,EAArBA,qBALsB;AAMtBJ,IAAAA,WAAW,EAAXA,WANsB;AAOtBQ,IAAAA,iBAAiB,EAAjBA;AAPsB,IAAxB;AAUA,SACE,gCAAC,kBAAD,CAAoB,QAApB;AAA6B,IAAA,KAAK,EAAEI,kBAApC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACGd,QADH,CADF;AAKD,CAzCM;;;;AA2CA,IAAMe,qBAAqB,GAAG,SAAxBA,qBAAwB;AAAA,SAE9B,uBAAWnB,kBAAX,CAF8B;AAAA,CAA9B;;;;AAIA,IAAMoB,sBAAsB,GAAG,SAAzBA,sBAAyB,CAIpCC,SAJoC,EAKqC;AACzE,MAAMC,+BAA+B,GAAG,SAAlCA,+BAAkC,CACtCC,KADsC,EAEnC;AACH,QAAML,kBAAkB,GAAGC,qBAAqB,EAAhD;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCL,kBAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAI,EAAAA,+BAA+B,CAACE,WAAhC,8BAAuE,oCACrEH,SADqE,CAAvE;AAGA,SAAOC,+BAAP;AACD,CAjBM","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 { getDisplayName } from '../utils/getDisplayName';\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({} as SuggestionsContextValue);\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>() => useContext(SuggestionsContext) as unknown as SuggestionsContextValue<StreamChatGenerics>;\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"]}
@@ -354,7 +354,7 @@ var defaultTheme = {
354
354
  deletedContainer: {},
355
355
  deletedContainerInner: {},
356
356
  deletedMetaText: {
357
- paddingHorizontal: 10
357
+ paddingHorizontal: 5
358
358
  },
359
359
  deletedText: {
360
360
  em: {
@@ -429,18 +429,19 @@ var defaultTheme = {
429
429
  moreImagesText: {}
430
430
  },
431
431
  giphy: {
432
+ buttonContainer: {},
432
433
  cancel: {},
433
- cancelContainer: {},
434
434
  container: {},
435
435
  giphy: {},
436
436
  giphyContainer: {},
437
+ giphyHeaderText: {},
438
+ giphyHeaderTitle: {},
437
439
  giphyMask: {},
438
- giphyText: {},
440
+ giphyMaskText: {},
441
+ header: {},
439
442
  selectionContainer: {},
440
- selector: {},
441
443
  send: {},
442
- sendContainer: {},
443
- shuffleButton: {},
444
+ shuffle: {},
444
445
  title: {}
445
446
  },
446
447
  pinnedHeader: {