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

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 (834) hide show
  1. package/lib/commonjs/components/Attachment/Attachment.js +2 -2
  2. package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
  3. package/lib/commonjs/components/Attachment/AttachmentActions.js.map +1 -1
  4. package/lib/commonjs/components/Attachment/Card.js +15 -15
  5. package/lib/commonjs/components/Attachment/Card.js.map +1 -1
  6. package/lib/commonjs/components/Attachment/FileAttachment.js +8 -8
  7. package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
  8. package/lib/commonjs/components/Attachment/FileIcon.js.map +1 -1
  9. package/lib/commonjs/components/Attachment/Gallery.js +97 -106
  10. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  11. package/lib/commonjs/components/Attachment/Giphy.js +27 -27
  12. package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
  13. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js +46 -0
  14. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
  15. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
  16. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
  17. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
  18. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
  19. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
  20. package/lib/commonjs/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
  21. package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
  22. package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
  23. package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
  24. package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
  25. package/lib/commonjs/components/Attachment/utils/buildGallery/types.js +4 -0
  26. package/lib/commonjs/components/Attachment/utils/buildGallery/types.js.map +1 -0
  27. package/lib/commonjs/components/Attachment/utils/getAspectRatio.js +14 -0
  28. package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -0
  29. package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
  30. package/lib/commonjs/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
  31. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +9 -8
  32. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  33. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
  34. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  35. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
  36. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
  37. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +16 -16
  38. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
  39. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +11 -11
  40. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  41. package/lib/commonjs/components/Avatar/Avatar.js +13 -7
  42. package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
  43. package/lib/commonjs/components/Avatar/GroupAvatar.js +10 -4
  44. package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
  45. package/lib/commonjs/components/Channel/Channel.js +64 -64
  46. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  47. package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
  48. package/lib/commonjs/components/ChannelList/ChannelList.js +6 -6
  49. package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
  50. package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +4 -4
  51. package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
  52. package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js +6 -7
  53. package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
  54. package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +2 -2
  55. package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
  56. package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +17 -17
  57. package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
  58. package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +2 -2
  59. package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
  60. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
  61. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
  62. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
  63. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
  64. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js +2 -2
  65. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
  66. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js +2 -2
  67. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
  68. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js +3 -3
  69. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
  70. package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
  71. package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
  72. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js +2 -2
  73. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  74. package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +83 -70
  75. package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
  76. package/lib/commonjs/components/ChannelList/utils.js +1 -1
  77. package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +2 -2
  78. package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
  79. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +2 -2
  80. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
  81. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  82. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +48 -20
  83. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  84. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +51 -0
  85. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -0
  86. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
  87. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  88. package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
  89. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
  90. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  91. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
  92. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  93. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
  94. package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  95. package/lib/commonjs/components/Chat/Chat.js.map +1 -1
  96. package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
  97. package/lib/commonjs/components/ImageGallery/ImageGallery.js +89 -56
  98. package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
  99. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +2 -2
  100. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
  101. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +12 -12
  102. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  103. package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +10 -10
  104. package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
  105. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +7 -7
  106. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
  107. package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +5 -5
  108. package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
  109. package/lib/commonjs/components/Indicators/LoadingIndicator.js +9 -9
  110. package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
  111. package/lib/commonjs/components/Message/Message.js +13 -9
  112. package/lib/commonjs/components/Message/Message.js.map +1 -1
  113. package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +6 -6
  114. package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
  115. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +19 -19
  116. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
  117. package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +5 -5
  118. package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
  119. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +11 -11
  120. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  121. package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +2 -2
  122. package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
  123. package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +5 -5
  124. package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
  125. package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +9 -7
  126. package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
  127. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +89 -0
  128. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
  129. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
  130. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
  131. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +14 -25
  132. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  133. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  134. package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js +16 -3
  135. package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
  136. package/lib/commonjs/components/Message/hooks/useMessageActions.js +18 -14
  137. package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -1
  138. package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
  139. package/lib/commonjs/components/Message/utils/removeReservedFields.js.map +1 -1
  140. package/lib/commonjs/components/MessageInput/AttachButton.js +3 -3
  141. package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
  142. package/lib/commonjs/components/MessageInput/CommandsButton.js +3 -3
  143. package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
  144. package/lib/commonjs/components/MessageInput/CooldownTimer.js +2 -2
  145. package/lib/commonjs/components/MessageInput/CooldownTimer.js.map +1 -1
  146. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +2 -2
  147. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  148. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +7 -7
  149. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
  150. package/lib/commonjs/components/MessageInput/InputButtons.js +3 -3
  151. package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
  152. package/lib/commonjs/components/MessageInput/MessageInput.js +40 -40
  153. package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
  154. package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +3 -3
  155. package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
  156. package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js +2 -2
  157. package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -1
  158. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +3 -3
  159. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  160. package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -1
  161. package/lib/commonjs/components/MessageInput/hooks/useCountdown.js.map +1 -1
  162. package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
  163. package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
  164. package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
  165. package/lib/commonjs/components/MessageList/MessageList.js +2 -2
  166. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  167. package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
  168. package/lib/commonjs/components/MessageList/TypingIndicator.js +5 -5
  169. package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
  170. package/lib/commonjs/components/MessageList/hooks/useMessageList.js +7 -7
  171. package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
  172. package/lib/commonjs/components/MessageList/hooks/useTypingString.js +2 -2
  173. package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
  174. package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
  175. package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js +3 -1
  176. package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
  177. package/lib/commonjs/components/MessageOverlay/MessageActionList.js +2 -2
  178. package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -1
  179. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +7 -7
  180. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -1
  181. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +38 -32
  182. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
  183. package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +1 -1
  184. package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +1 -1
  185. package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +11 -11
  186. package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
  187. package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +31 -34
  188. package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
  189. package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js +41 -0
  190. package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
  191. package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -1
  192. package/lib/commonjs/components/Reply/Reply.js +25 -19
  193. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  194. package/lib/commonjs/components/Thread/Thread.js +6 -6
  195. package/lib/commonjs/components/Thread/Thread.js.map +1 -1
  196. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +12 -12
  197. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  198. package/lib/commonjs/components/docs/data.js +1 -1
  199. package/lib/commonjs/components/index.js +26 -0
  200. package/lib/commonjs/components/index.js.map +1 -1
  201. package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +2 -2
  202. package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
  203. package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +2 -2
  204. package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
  205. package/lib/commonjs/contexts/channelContext/ChannelContext.js +2 -2
  206. package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
  207. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +2 -2
  208. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
  209. package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
  210. package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
  211. package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -1
  212. package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
  213. package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
  214. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
  215. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  216. package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +2 -2
  217. package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
  218. package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -2
  219. package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
  220. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +18 -14
  221. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  222. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  223. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js +10 -3
  224. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  225. package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +5 -19
  226. package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
  227. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js +36 -0
  228. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
  229. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +105 -0
  230. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
  231. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  232. package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
  233. package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
  234. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +33 -31
  235. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
  236. package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +1 -1
  237. package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
  238. package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
  239. package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +3 -3
  240. package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
  241. package/lib/commonjs/contexts/themeContext/ThemeContext.js +2 -2
  242. package/lib/commonjs/contexts/themeContext/ThemeContext.js.map +1 -1
  243. package/lib/commonjs/contexts/themeContext/utils/theme.js +13 -5
  244. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  245. package/lib/commonjs/contexts/threadContext/ThreadContext.js +2 -2
  246. package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
  247. package/lib/commonjs/contexts/translationContext/TranslationContext.js +1 -1
  248. package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
  249. package/lib/commonjs/contexts/typingContext/TypingContext.js +2 -2
  250. package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
  251. package/lib/commonjs/contexts/utils/getDisplayName.js.map +1 -1
  252. package/lib/commonjs/emoji-data/index.js +2 -2
  253. package/lib/commonjs/emoji-data/index.js.map +1 -1
  254. package/lib/commonjs/hooks/useStreami18n.js.map +1 -1
  255. package/lib/commonjs/icons/utils/base.js +1 -1
  256. package/lib/commonjs/index.js +6 -6
  257. package/lib/commonjs/mock-builders/api/error.js +1 -1
  258. package/lib/commonjs/mock-builders/api/sendMessage.js.map +1 -1
  259. package/lib/commonjs/mock-builders/generator/attachment.js +1 -3
  260. package/lib/commonjs/mock-builders/generator/attachment.js.map +1 -1
  261. package/lib/commonjs/mock-builders/generator/channel.js +101 -51
  262. package/lib/commonjs/mock-builders/generator/channel.js.map +1 -1
  263. package/lib/commonjs/mock-builders/generator/user.js +32 -33
  264. package/lib/commonjs/mock-builders/generator/user.js.map +1 -1
  265. package/lib/commonjs/mock-builders/mock.js +1 -1
  266. package/lib/commonjs/native.js +1 -1
  267. package/lib/commonjs/native.js.map +1 -1
  268. package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js +7 -7
  269. package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js.map +1 -1
  270. package/lib/commonjs/styleguideComponents/JsDoc.js +4 -4
  271. package/lib/commonjs/styleguideComponents/JsDoc.js.map +1 -1
  272. package/lib/commonjs/styleguideComponents/PathlineRenderer.js +7 -7
  273. package/lib/commonjs/styleguideComponents/PathlineRenderer.js.map +1 -1
  274. package/lib/commonjs/styleguideComponents/PropsRenderer.js +25 -25
  275. package/lib/commonjs/styleguideComponents/PropsRenderer.js.map +1 -1
  276. package/lib/commonjs/styleguideComponents/Wrapper.js +1 -1
  277. package/lib/commonjs/styleguideComponents/Wrapper.js.map +1 -1
  278. package/lib/commonjs/utils/Streami18n.js.map +1 -1
  279. package/lib/commonjs/utils/getResizedImageUrl.js +26 -0
  280. package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -0
  281. package/lib/commonjs/utils/getUrlOfImageAttachment.js +9 -0
  282. package/lib/commonjs/utils/getUrlOfImageAttachment.js.map +1 -0
  283. package/lib/commonjs/utils/utils.js +9 -3
  284. package/lib/commonjs/utils/utils.js.map +1 -1
  285. package/lib/commonjs/version.json +1 -1
  286. package/lib/module/components/Attachment/Attachment.js +2 -2
  287. package/lib/module/components/Attachment/Attachment.js.map +1 -1
  288. package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
  289. package/lib/module/components/Attachment/Card.js +15 -15
  290. package/lib/module/components/Attachment/Card.js.map +1 -1
  291. package/lib/module/components/Attachment/FileAttachment.js +8 -8
  292. package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
  293. package/lib/module/components/Attachment/FileIcon.js.map +1 -1
  294. package/lib/module/components/Attachment/Gallery.js +97 -106
  295. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  296. package/lib/module/components/Attachment/Giphy.js +27 -27
  297. package/lib/module/components/Attachment/Giphy.js.map +1 -1
  298. package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js +46 -0
  299. package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
  300. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
  301. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
  302. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
  303. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
  304. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
  305. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
  306. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
  307. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
  308. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
  309. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
  310. package/lib/module/components/Attachment/utils/buildGallery/types.js +4 -0
  311. package/lib/module/components/Attachment/utils/buildGallery/types.js.map +1 -0
  312. package/lib/module/components/Attachment/utils/getAspectRatio.js +14 -0
  313. package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -0
  314. package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
  315. package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
  316. package/lib/module/components/AttachmentPicker/AttachmentPicker.js +9 -8
  317. package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  318. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +2 -2
  319. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  320. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
  321. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
  322. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +16 -16
  323. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -1
  324. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +11 -11
  325. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  326. package/lib/module/components/Avatar/Avatar.js +13 -7
  327. package/lib/module/components/Avatar/Avatar.js.map +1 -1
  328. package/lib/module/components/Avatar/GroupAvatar.js +10 -4
  329. package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
  330. package/lib/module/components/Channel/Channel.js +64 -64
  331. package/lib/module/components/Channel/Channel.js.map +1 -1
  332. package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -1
  333. package/lib/module/components/ChannelList/ChannelList.js +6 -6
  334. package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
  335. package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +4 -4
  336. package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
  337. package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js +6 -7
  338. package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
  339. package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +2 -2
  340. package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
  341. package/lib/module/components/ChannelList/ChannelListMessenger.js +17 -17
  342. package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
  343. package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +2 -2
  344. package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
  345. package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
  346. package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
  347. package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
  348. package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
  349. package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js +2 -2
  350. package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
  351. package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js +2 -2
  352. package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
  353. package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js +3 -3
  354. package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
  355. package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
  356. package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
  357. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js +2 -2
  358. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  359. package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +83 -70
  360. package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
  361. package/lib/module/components/ChannelList/utils.js +1 -1
  362. package/lib/module/components/ChannelPreview/ChannelAvatar.js +2 -2
  363. package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
  364. package/lib/module/components/ChannelPreview/ChannelPreview.js +2 -2
  365. package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
  366. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  367. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +48 -20
  368. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  369. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +51 -0
  370. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -0
  371. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
  372. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  373. package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
  374. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
  375. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  376. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
  377. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  378. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
  379. package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  380. package/lib/module/components/Chat/Chat.js.map +1 -1
  381. package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
  382. package/lib/module/components/ImageGallery/ImageGallery.js +89 -56
  383. package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
  384. package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +2 -2
  385. package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
  386. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +12 -12
  387. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  388. package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +10 -10
  389. package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
  390. package/lib/module/components/ImageGallery/components/ImageGrid.js +7 -7
  391. package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
  392. package/lib/module/components/ImageGallery/components/ImageGridHandle.js +5 -5
  393. package/lib/module/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
  394. package/lib/module/components/Indicators/LoadingIndicator.js +9 -9
  395. package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
  396. package/lib/module/components/Message/Message.js +13 -9
  397. package/lib/module/components/Message/Message.js.map +1 -1
  398. package/lib/module/components/Message/MessageSimple/MessageAvatar.js +6 -6
  399. package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
  400. package/lib/module/components/Message/MessageSimple/MessageContent.js +19 -19
  401. package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
  402. package/lib/module/components/Message/MessageSimple/MessageDeleted.js +5 -5
  403. package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
  404. package/lib/module/components/Message/MessageSimple/MessageFooter.js +11 -11
  405. package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  406. package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +2 -2
  407. package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -1
  408. package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +5 -5
  409. package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
  410. package/lib/module/components/Message/MessageSimple/MessageStatus.js +9 -7
  411. package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
  412. package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +89 -0
  413. package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
  414. package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
  415. package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
  416. package/lib/module/components/Message/MessageSimple/utils/renderText.js +14 -25
  417. package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  418. package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  419. package/lib/module/components/Message/hooks/useMessageActionHandlers.js +16 -3
  420. package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -1
  421. package/lib/module/components/Message/hooks/useMessageActions.js +18 -14
  422. package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -1
  423. package/lib/module/components/Message/utils/messageActions.js.map +1 -1
  424. package/lib/module/components/Message/utils/removeReservedFields.js.map +1 -1
  425. package/lib/module/components/MessageInput/AttachButton.js +3 -3
  426. package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
  427. package/lib/module/components/MessageInput/CommandsButton.js +3 -3
  428. package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
  429. package/lib/module/components/MessageInput/CooldownTimer.js +2 -2
  430. package/lib/module/components/MessageInput/CooldownTimer.js.map +1 -1
  431. package/lib/module/components/MessageInput/FileUploadPreview.js +2 -2
  432. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  433. package/lib/module/components/MessageInput/ImageUploadPreview.js +7 -7
  434. package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
  435. package/lib/module/components/MessageInput/InputButtons.js +3 -3
  436. package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
  437. package/lib/module/components/MessageInput/MessageInput.js +40 -40
  438. package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
  439. package/lib/module/components/MessageInput/MoreOptionsButton.js +3 -3
  440. package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
  441. package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js +2 -2
  442. package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -1
  443. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +3 -3
  444. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  445. package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -1
  446. package/lib/module/components/MessageInput/hooks/useCountdown.js.map +1 -1
  447. package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
  448. package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
  449. package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
  450. package/lib/module/components/MessageList/MessageList.js +2 -2
  451. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  452. package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
  453. package/lib/module/components/MessageList/TypingIndicator.js +5 -5
  454. package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
  455. package/lib/module/components/MessageList/hooks/useMessageList.js +7 -7
  456. package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
  457. package/lib/module/components/MessageList/hooks/useTypingString.js +2 -2
  458. package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
  459. package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
  460. package/lib/module/components/MessageList/utils/getLastReceivedMessage.js +3 -1
  461. package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
  462. package/lib/module/components/MessageOverlay/MessageActionList.js +2 -2
  463. package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -1
  464. package/lib/module/components/MessageOverlay/MessageActionListItem.js +7 -7
  465. package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -1
  466. package/lib/module/components/MessageOverlay/MessageOverlay.js +38 -32
  467. package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
  468. package/lib/module/components/MessageOverlay/OverlayBackdrop.js +1 -1
  469. package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +1 -1
  470. package/lib/module/components/MessageOverlay/OverlayReactionList.js +11 -11
  471. package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
  472. package/lib/module/components/MessageOverlay/OverlayReactions.js +31 -34
  473. package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
  474. package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js +41 -0
  475. package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
  476. package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -1
  477. package/lib/module/components/Reply/Reply.js +25 -19
  478. package/lib/module/components/Reply/Reply.js.map +1 -1
  479. package/lib/module/components/Thread/Thread.js +6 -6
  480. package/lib/module/components/Thread/Thread.js.map +1 -1
  481. package/lib/module/components/Thread/components/ThreadFooterComponent.js +12 -12
  482. package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  483. package/lib/module/components/docs/data.js +1 -1
  484. package/lib/module/components/index.js +26 -0
  485. package/lib/module/components/index.js.map +1 -1
  486. package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +2 -2
  487. package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -1
  488. package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +2 -2
  489. package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
  490. package/lib/module/contexts/channelContext/ChannelContext.js +2 -2
  491. package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
  492. package/lib/module/contexts/channelsContext/ChannelsContext.js +2 -2
  493. package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
  494. package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +3 -3
  495. package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -1
  496. package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -1
  497. package/lib/module/contexts/chatContext/ChatContext.js +2 -2
  498. package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
  499. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
  500. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  501. package/lib/module/contexts/keyboardContext/KeyboardContext.js +2 -2
  502. package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
  503. package/lib/module/contexts/messageContext/MessageContext.js +2 -2
  504. package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
  505. package/lib/module/contexts/messageInputContext/MessageInputContext.js +18 -14
  506. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  507. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  508. package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js +10 -3
  509. package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  510. package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +5 -19
  511. package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
  512. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js +36 -0
  513. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
  514. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +105 -0
  515. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
  516. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  517. package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
  518. package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
  519. package/lib/module/contexts/overlayContext/OverlayProvider.js +33 -31
  520. package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
  521. package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +1 -1
  522. package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
  523. package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
  524. package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +3 -3
  525. package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
  526. package/lib/module/contexts/themeContext/ThemeContext.js +2 -2
  527. package/lib/module/contexts/themeContext/ThemeContext.js.map +1 -1
  528. package/lib/module/contexts/themeContext/utils/theme.js +13 -5
  529. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  530. package/lib/module/contexts/threadContext/ThreadContext.js +2 -2
  531. package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
  532. package/lib/module/contexts/translationContext/TranslationContext.js +1 -1
  533. package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
  534. package/lib/module/contexts/typingContext/TypingContext.js +2 -2
  535. package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
  536. package/lib/module/contexts/utils/getDisplayName.js.map +1 -1
  537. package/lib/module/emoji-data/index.js +2 -2
  538. package/lib/module/emoji-data/index.js.map +1 -1
  539. package/lib/module/hooks/useStreami18n.js.map +1 -1
  540. package/lib/module/icons/utils/base.js +1 -1
  541. package/lib/module/index.js +6 -6
  542. package/lib/module/mock-builders/api/error.js +1 -1
  543. package/lib/module/mock-builders/api/sendMessage.js.map +1 -1
  544. package/lib/module/mock-builders/generator/attachment.js +1 -3
  545. package/lib/module/mock-builders/generator/attachment.js.map +1 -1
  546. package/lib/module/mock-builders/generator/channel.js +101 -51
  547. package/lib/module/mock-builders/generator/channel.js.map +1 -1
  548. package/lib/module/mock-builders/generator/user.js +32 -33
  549. package/lib/module/mock-builders/generator/user.js.map +1 -1
  550. package/lib/module/mock-builders/mock.js +1 -1
  551. package/lib/module/native.js +1 -1
  552. package/lib/module/native.js.map +1 -1
  553. package/lib/module/styleguideComponents/ArgumentsRenderer.js +7 -7
  554. package/lib/module/styleguideComponents/ArgumentsRenderer.js.map +1 -1
  555. package/lib/module/styleguideComponents/JsDoc.js +4 -4
  556. package/lib/module/styleguideComponents/JsDoc.js.map +1 -1
  557. package/lib/module/styleguideComponents/PathlineRenderer.js +7 -7
  558. package/lib/module/styleguideComponents/PathlineRenderer.js.map +1 -1
  559. package/lib/module/styleguideComponents/PropsRenderer.js +25 -25
  560. package/lib/module/styleguideComponents/PropsRenderer.js.map +1 -1
  561. package/lib/module/styleguideComponents/Wrapper.js +1 -1
  562. package/lib/module/styleguideComponents/Wrapper.js.map +1 -1
  563. package/lib/module/utils/Streami18n.js.map +1 -1
  564. package/lib/module/utils/getResizedImageUrl.js +26 -0
  565. package/lib/module/utils/getResizedImageUrl.js.map +1 -0
  566. package/lib/module/utils/getUrlOfImageAttachment.js +9 -0
  567. package/lib/module/utils/getUrlOfImageAttachment.js.map +1 -0
  568. package/lib/module/utils/utils.js +9 -3
  569. package/lib/module/utils/utils.js.map +1 -1
  570. package/lib/module/version.json +1 -1
  571. package/lib/typescript/components/Attachment/Attachment.d.ts +1 -1
  572. package/lib/typescript/components/Attachment/AttachmentActions.d.ts +1 -1
  573. package/lib/typescript/components/Attachment/Card.d.ts +1 -1
  574. package/lib/typescript/components/Attachment/FileAttachment.d.ts +1 -1
  575. package/lib/typescript/components/Attachment/Gallery.d.ts +1 -4
  576. package/lib/typescript/components/Attachment/Giphy.d.ts +1 -1
  577. package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +23 -0
  578. package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +7 -0
  579. package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +7 -0
  580. package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +7 -0
  581. package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +10 -0
  582. package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +137 -0
  583. package/lib/typescript/components/Attachment/utils/buildGallery/types.d.ts +23 -0
  584. package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +9 -0
  585. package/lib/typescript/components/Attachment/utils/getGalleryImageBorderRadius.d.ts +22 -0
  586. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +1 -1
  587. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +1 -1
  588. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +2 -3
  589. package/lib/typescript/components/Channel/Channel.d.ts +4 -4
  590. package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +1 -1
  591. package/lib/typescript/components/ChannelList/ChannelList.d.ts +1 -1
  592. package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +4 -2
  593. package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +2 -2
  594. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +2 -2
  595. package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +9 -0
  596. package/lib/typescript/components/Chat/Chat.d.ts +1 -1
  597. package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +3 -1
  598. package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts +1 -1
  599. package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +1 -1
  600. package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +1 -1
  601. package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +1 -1
  602. package/lib/typescript/components/Message/Message.d.ts +1 -1
  603. package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +1 -1
  604. package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +2 -2
  605. package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +2 -2
  606. package/lib/typescript/components/Message/MessageSimple/utils/parseLinks.d.ts +7 -0
  607. package/lib/typescript/components/Message/MessageSimple/utils/parseLinks.test.d.ts +1 -0
  608. package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +2 -2
  609. package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +1 -1
  610. package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +3 -3
  611. package/lib/typescript/components/Message/utils/messageActions.d.ts +2 -2
  612. package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +1 -1
  613. package/lib/typescript/components/MessageInput/AttachButton.d.ts +1 -1
  614. package/lib/typescript/components/MessageInput/CommandsButton.d.ts +1 -1
  615. package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +1 -1
  616. package/lib/typescript/components/MessageList/MessageSystem.d.ts +1 -1
  617. package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +1 -1
  618. package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +1 -1
  619. package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +3 -1
  620. package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts +7 -0
  621. package/lib/typescript/components/Reply/Reply.d.ts +1 -1
  622. package/lib/typescript/components/Thread/Thread.d.ts +2 -2
  623. package/lib/typescript/components/index.d.ts +2 -0
  624. package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +13 -5
  625. package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +1 -1
  626. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +1 -1
  627. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +6 -4
  628. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +2 -2
  629. package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +1 -1
  630. package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +6 -4
  631. package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts +12 -0
  632. package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts +1 -0
  633. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +10 -10
  634. package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +5 -5
  635. package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +2 -2
  636. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +11 -3
  637. package/lib/typescript/hooks/useStreami18n.d.ts +1 -1
  638. package/lib/typescript/utils/Streami18n.d.ts +2 -2
  639. package/lib/typescript/utils/getResizedImageUrl.d.ts +19 -0
  640. package/lib/typescript/utils/getUrlOfImageAttachment.d.ts +7 -0
  641. package/lib/typescript/utils/utils.d.ts +6 -1
  642. package/package.json +9 -13
  643. package/src/components/Attachment/Attachment.tsx +3 -3
  644. package/src/components/Attachment/AttachmentActions.tsx +2 -2
  645. package/src/components/Attachment/Card.tsx +3 -4
  646. package/src/components/Attachment/FileAttachment.tsx +3 -4
  647. package/src/components/Attachment/FileIcon.tsx +2 -2
  648. package/src/components/Attachment/Gallery.tsx +160 -184
  649. package/src/components/Attachment/Giphy.tsx +3 -4
  650. package/src/components/Attachment/__tests__/Attachment.test.js +11 -10
  651. package/src/components/Attachment/__tests__/Gallery.test.js +233 -0
  652. package/src/components/Attachment/__tests__/buildGallery.test.js +131 -0
  653. package/src/components/Attachment/utils/buildGallery/buildGallery.ts +75 -0
  654. package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +95 -0
  655. package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +99 -0
  656. package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +64 -0
  657. package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +46 -0
  658. package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +186 -0
  659. package/src/components/Attachment/utils/buildGallery/types.ts +27 -0
  660. package/src/components/Attachment/utils/getAspectRatio.ts +21 -0
  661. package/src/components/Attachment/utils/getGalleryImageBorderRadius.ts +71 -0
  662. package/src/components/AttachmentPicker/AttachmentPicker.tsx +4 -2
  663. package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +4 -3
  664. package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx +1 -1
  665. package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +2 -2
  666. package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +7 -5
  667. package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +5 -6
  668. package/src/components/AutoCompleteInput/__tests__/AutoCompleteInput.test.js +6 -8
  669. package/src/components/Avatar/Avatar.tsx +7 -10
  670. package/src/components/Avatar/GroupAvatar.tsx +7 -2
  671. package/src/components/Avatar/__tests__/Avatar.test.js +2 -2
  672. package/src/components/Channel/Channel.tsx +75 -68
  673. package/src/components/Channel/__tests__/Channel.test.js +10 -10
  674. package/src/components/Channel/__tests__/ownCapabilities.test.js +8 -8
  675. package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +2 -1
  676. package/src/components/ChannelList/ChannelList.tsx +8 -9
  677. package/src/components/ChannelList/ChannelListFooterLoadingIndicator.tsx +1 -2
  678. package/src/components/ChannelList/ChannelListHeaderErrorIndicator.tsx +3 -7
  679. package/src/components/ChannelList/ChannelListHeaderNetworkDownIndicator.tsx +2 -2
  680. package/src/components/ChannelList/ChannelListMessenger.tsx +3 -4
  681. package/src/components/ChannelList/__tests__/ChannelList.test.js +73 -13
  682. package/src/components/ChannelList/__tests__/ChannelListMessenger.test.js +11 -12
  683. package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +3 -3
  684. package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +2 -2
  685. package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +2 -2
  686. package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +2 -2
  687. package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +2 -2
  688. package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +3 -3
  689. package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +2 -3
  690. package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +4 -4
  691. package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +2 -2
  692. package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +2 -2
  693. package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +1 -2
  694. package/src/components/ChannelList/hooks/usePaginatedChannels.ts +78 -48
  695. package/src/components/ChannelPreview/ChannelAvatar.tsx +3 -5
  696. package/src/components/ChannelPreview/ChannelPreview.tsx +3 -3
  697. package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +2 -2
  698. package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +23 -10
  699. package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +71 -0
  700. package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +4 -3
  701. package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +2 -2
  702. package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +2 -1
  703. package/src/components/ChannelPreview/__tests__/ChannelPreview.test.js +8 -9
  704. package/src/components/ChannelPreview/__tests__/ChannelPreviewMessenger.test.js +8 -9
  705. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +2 -2
  706. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +3 -4
  707. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +2 -2
  708. package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +2 -2
  709. package/src/components/Chat/Chat.tsx +6 -6
  710. package/src/components/Chat/__tests__/Chat.test.js +5 -5
  711. package/src/components/Chat/hooks/useIsOnline.ts +4 -3
  712. package/src/components/ImageGallery/ImageGallery.tsx +82 -49
  713. package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +1 -2
  714. package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +2 -5
  715. package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +1 -2
  716. package/src/components/ImageGallery/components/ImageGrid.tsx +4 -5
  717. package/src/components/ImageGallery/components/ImageGridHandle.tsx +1 -0
  718. package/src/components/Indicators/LoadingIndicator.tsx +1 -2
  719. package/src/components/Message/Message.tsx +20 -20
  720. package/src/components/Message/MessageSimple/MessageAvatar.tsx +1 -2
  721. package/src/components/Message/MessageSimple/MessageContent.tsx +2 -3
  722. package/src/components/Message/MessageSimple/MessageDeleted.tsx +3 -4
  723. package/src/components/Message/MessageSimple/MessageFooter.tsx +6 -7
  724. package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +2 -2
  725. package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +2 -3
  726. package/src/components/Message/MessageSimple/MessageStatus.tsx +9 -5
  727. package/src/components/Message/MessageSimple/__tests__/Message.test.js +9 -9
  728. package/src/components/Message/MessageSimple/__tests__/MessageAvatar.test.js +2 -2
  729. package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +9 -26
  730. package/src/components/Message/MessageSimple/__tests__/MessagePinnedHeader.test.js +2 -2
  731. package/src/components/Message/MessageSimple/__tests__/MessageReplies.test.js +2 -2
  732. package/src/components/Message/MessageSimple/__tests__/MessageStatus.test.js +4 -5
  733. package/src/components/Message/MessageSimple/__tests__/MessageTextContainer.test.js +2 -2
  734. package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageAvatar.test.js.snap +1 -1
  735. package/src/components/Message/MessageSimple/utils/parseLinks.test.ts +100 -0
  736. package/src/components/Message/MessageSimple/utils/parseLinks.ts +95 -0
  737. package/src/components/Message/MessageSimple/utils/renderText.tsx +11 -23
  738. package/src/components/Message/hooks/useCreateMessageContext.ts +1 -2
  739. package/src/components/Message/hooks/useMessageActionHandlers.ts +13 -4
  740. package/src/components/Message/hooks/useMessageActions.tsx +14 -9
  741. package/src/components/Message/utils/messageActions.ts +2 -2
  742. package/src/components/Message/utils/removeReservedFields.ts +1 -1
  743. package/src/components/MessageInput/AttachButton.tsx +1 -2
  744. package/src/components/MessageInput/CommandsButton.tsx +1 -2
  745. package/src/components/MessageInput/CooldownTimer.tsx +1 -0
  746. package/src/components/MessageInput/FileUploadPreview.tsx +3 -3
  747. package/src/components/MessageInput/ImageUploadPreview.tsx +1 -2
  748. package/src/components/MessageInput/InputButtons.tsx +1 -1
  749. package/src/components/MessageInput/MessageInput.tsx +5 -6
  750. package/src/components/MessageInput/MoreOptionsButton.tsx +1 -2
  751. package/src/components/MessageInput/SendMessageDisallowedIndicator.tsx +1 -1
  752. package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +1 -1
  753. package/src/components/MessageInput/__tests__/AttachButton.test.js +2 -2
  754. package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +15 -17
  755. package/src/components/MessageInput/__tests__/ImageUploadPreview.test.js +3 -3
  756. package/src/components/MessageInput/__tests__/MessageInput.test.js +8 -8
  757. package/src/components/MessageInput/__tests__/SendButton.test.js +2 -2
  758. package/src/components/MessageInput/__tests__/UploadProgressIndicator.test.js +2 -2
  759. package/src/components/MessageInput/__tests__/__snapshots__/FileUploadPreview.test.js.snap +1604 -4172
  760. package/src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap +1 -643
  761. package/src/components/MessageInput/hooks/useCooldown.ts +2 -0
  762. package/src/components/MessageInput/hooks/useCountdown.ts +1 -0
  763. package/src/components/MessageList/MessageList.tsx +3 -3
  764. package/src/components/MessageList/MessageSystem.tsx +2 -2
  765. package/src/components/MessageList/TypingIndicator.tsx +1 -2
  766. package/src/components/MessageList/__tests__/MessageList.test.js +17 -17
  767. package/src/components/MessageList/__tests__/MessageSystem.test.js +3 -3
  768. package/src/components/MessageList/__tests__/ScrollToBottomButton.test.js +3 -3
  769. package/src/components/MessageList/__tests__/TypingIndicator.test.js +5 -6
  770. package/src/components/MessageList/__tests__/__snapshots__/TypingIndicator.test.js.snap +1 -1
  771. package/src/components/MessageList/hooks/useMessageList.ts +5 -7
  772. package/src/components/MessageList/hooks/useTypingString.ts +1 -2
  773. package/src/components/MessageList/utils/getGroupStyles.ts +1 -2
  774. package/src/components/MessageList/utils/getLastReceivedMessage.ts +6 -1
  775. package/src/components/MessageOverlay/MessageActionList.tsx +3 -3
  776. package/src/components/MessageOverlay/MessageActionListItem.tsx +3 -1
  777. package/src/components/MessageOverlay/MessageOverlay.tsx +20 -16
  778. package/src/components/MessageOverlay/OverlayBackdrop.tsx +1 -0
  779. package/src/components/MessageOverlay/OverlayReactionList.tsx +2 -4
  780. package/src/components/MessageOverlay/OverlayReactions.tsx +27 -8
  781. package/src/components/MessageOverlay/OverlayReactionsAvatar.tsx +27 -0
  782. package/src/components/MessageOverlay/hooks/useMessageActionAnimation.tsx +1 -0
  783. package/src/components/Reply/Reply.tsx +25 -15
  784. package/src/components/Thread/Thread.tsx +5 -6
  785. package/src/components/Thread/__tests__/Thread.test.js +12 -14
  786. package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +13 -13
  787. package/src/components/Thread/components/ThreadFooterComponent.tsx +1 -2
  788. package/src/components/index.ts +2 -0
  789. package/src/contexts/activeChannelsRefContext/ActiveChannelsRefContext.tsx +1 -2
  790. package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +1 -2
  791. package/src/contexts/channelContext/ChannelContext.tsx +1 -2
  792. package/src/contexts/channelsContext/ChannelsContext.tsx +18 -7
  793. package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +7 -8
  794. package/src/contexts/channelsStateContext/useChannelState.ts +1 -0
  795. package/src/contexts/chatContext/ChatContext.tsx +1 -2
  796. package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +1 -2
  797. package/src/contexts/keyboardContext/KeyboardContext.tsx +1 -2
  798. package/src/contexts/messageContext/MessageContext.tsx +1 -2
  799. package/src/contexts/messageInputContext/MessageInputContext.tsx +27 -24
  800. package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +2 -4
  801. package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +15 -10
  802. package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +10 -19
  803. package/src/contexts/messageOverlayContext/hooks/useResettableState.test.tsx +46 -0
  804. package/src/contexts/messageOverlayContext/hooks/useResettableState.ts +22 -0
  805. package/src/contexts/messagesContext/MessagesContext.tsx +13 -13
  806. package/src/contexts/overlayContext/OverlayContext.tsx +10 -8
  807. package/src/contexts/overlayContext/OverlayProvider.tsx +30 -25
  808. package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +1 -2
  809. package/src/contexts/suggestionsContext/SuggestionsContext.tsx +4 -3
  810. package/src/contexts/suggestionsContext/__tests__/Suggestions.test.js +1 -0
  811. package/src/contexts/themeContext/ThemeContext.tsx +1 -0
  812. package/src/contexts/themeContext/utils/theme.ts +23 -8
  813. package/src/contexts/threadContext/ThreadContext.tsx +1 -2
  814. package/src/contexts/translationContext/TranslationContext.tsx +2 -2
  815. package/src/contexts/typingContext/TypingContext.tsx +1 -2
  816. package/src/contexts/utils/getDisplayName.ts +1 -0
  817. package/src/emoji-data/index.js +1 -1
  818. package/src/hooks/useStreami18n.ts +1 -1
  819. package/src/mock-builders/api/sendMessage.js +1 -0
  820. package/src/mock-builders/generator/attachment.js +0 -2
  821. package/src/mock-builders/generator/channel.js +101 -64
  822. package/src/mock-builders/generator/user.js +33 -26
  823. package/src/native.ts +1 -0
  824. package/src/styleguideComponents/ArgumentsRenderer.tsx +2 -1
  825. package/src/styleguideComponents/JsDoc.tsx +3 -1
  826. package/src/styleguideComponents/PathlineRenderer.tsx +2 -1
  827. package/src/styleguideComponents/PropsRenderer.tsx +7 -4
  828. package/src/styleguideComponents/Wrapper.tsx +1 -0
  829. package/src/utils/Streami18n.ts +3 -3
  830. package/src/utils/__tests__/Streami18n.test.js +1 -2
  831. package/src/utils/getResizedImageUrl.ts +43 -0
  832. package/src/utils/getUrlOfImageAttachment.ts +10 -0
  833. package/src/utils/utils.ts +9 -4
  834. package/src/version.json +1 -1
@@ -0,0 +1,95 @@
1
+ /**
2
+ * 📣 Note: Do not use named capture groups, as
3
+ * it is not yet available in Hermes.
4
+ *
5
+ * These helpers indend to make it easier to skim read
6
+ * the patterns below, but note that some are optional,
7
+ * specified in the patterns these are added to.
8
+ * */
9
+ const emailUserName = '[\\w+\\.~$_-]+';
10
+ const schema = `(\\w{2,15}:\\/\\/)`;
11
+ const domain = `((?:\\w+\\.\\w+)+(?:[^:\\/\\s]+))`;
12
+ const port = `(:[0-9]{1,5})`;
13
+ const path = `((?:\\/)?[^?#\\s]+)`;
14
+ const queryString = `(\\?[^#\\s]+)`;
15
+ const fragment = `(#[\\w_-]+)`;
16
+
17
+ /**
18
+ * Match any email address, with and without `mailto:`
19
+ */
20
+ const emailPattern = `(mailto:)?((?:${emailUserName})@(?:${domain}))`;
21
+
22
+ /**
23
+ * Match any string starting with something that seems like it's a schema.
24
+ * */
25
+ const schemePrefixedLinkPattern = `${schema}(\\S+)`;
26
+
27
+ /**
28
+ * Match as much as possible of a fqdn, at least with a domain name formed as
29
+ * something.tld
30
+ */
31
+ const fqdnLinkPattern = `${schema}?${domain}${port}?${path}?${queryString}?${fragment}?`;
32
+
33
+ interface Link {
34
+ encoded: string;
35
+ raw: string;
36
+ scheme: string;
37
+ }
38
+
39
+ /**
40
+ * This is done separately because of the version of javascript run
41
+ * for expo
42
+ * */
43
+ const removeMarkdownLinksFromText = (input: string) => input.replace(/\[[\w\s]+\]\(.*\)/g, '');
44
+
45
+ export const parseLinksFromText = (input: string): Link[] => {
46
+ let matches;
47
+
48
+ const inputWithoutMarkdownLinks = removeMarkdownLinksFromText(input);
49
+
50
+ const results: Link[] = [];
51
+
52
+ const emailRegExp = new RegExp(emailPattern, 'gi');
53
+ while ((matches = emailRegExp.exec(input)) !== null) {
54
+ const [raw, scheme = 'mailto:', displayValue] = matches;
55
+ results.push({ encoded: encodeURI(displayValue), raw, scheme });
56
+ }
57
+
58
+ /**
59
+ * The two link patterns are checked with an "or" (`|`)
60
+ * to avoid overlapping matches being duplicated in the output.
61
+ * */
62
+ const linkRegex = new RegExp(`${fqdnLinkPattern}|${schemePrefixedLinkPattern}`, 'gi');
63
+ while ((matches = linkRegex.exec(inputWithoutMarkdownLinks)) !== null) {
64
+ const [
65
+ raw,
66
+ fqdnScheme = '',
67
+ fqdnDomainName = '',
68
+ fqdnPort = '',
69
+ fqdnPath = '',
70
+ fqdnQueryStraing = '',
71
+ fqdnFragment = '',
72
+ schemePrefixedScheme = '',
73
+ schemePrefixedPath = '',
74
+ ] = matches;
75
+
76
+ if (schemePrefixedScheme !== '') {
77
+ results.push({
78
+ encoded: encodeURI(schemePrefixedPath),
79
+ raw,
80
+ scheme: schemePrefixedScheme,
81
+ });
82
+ continue;
83
+ }
84
+
85
+ results.push({
86
+ encoded: encodeURI(
87
+ [fqdnDomainName, fqdnPort, fqdnPath, fqdnQueryStraing, fqdnFragment].join(''),
88
+ ),
89
+ raw,
90
+ scheme: fqdnScheme,
91
+ });
92
+ }
93
+
94
+ return results;
95
+ };
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import { GestureResponderEvent, Linking, Text, View } from 'react-native';
3
- import anchorme from 'anchorme';
4
- import truncate from 'lodash/truncate';
3
+
5
4
  // @ts-expect-error
6
5
  import Markdown from 'react-native-markdown-package';
6
+
7
+ import truncate from 'lodash/truncate';
7
8
  import {
8
9
  DefaultRules,
9
10
  defaultRules,
@@ -14,8 +15,10 @@ import {
14
15
  SingleASTNode,
15
16
  } from 'simple-markdown';
16
17
 
17
- import type { MessageType } from '../../../MessageList/hooks/useMessageList';
18
+ import { parseLinksFromText } from './parseLinks';
18
19
 
20
+ import type { MessageContextValue } from '../../../../contexts/messageContext/MessageContext';
21
+ import type { Colors, MarkdownStyle } from '../../../../contexts/themeContext/utils/theme';
19
22
  import type {
20
23
  DefaultAttachmentType,
21
24
  DefaultChannelType,
@@ -26,8 +29,7 @@ import type {
26
29
  DefaultUserType,
27
30
  UnknownType,
28
31
  } from '../../../../types/types';
29
- import type { MessageContextValue } from '../../../../contexts/messageContext/MessageContext';
30
- import type { Colors, MarkdownStyle } from '../../../../contexts/themeContext/utils/theme';
32
+ import type { MessageType } from '../../../MessageList/hooks/useMessageList';
31
33
 
32
34
  const defaultMarkdownStyles: MarkdownStyle = {
33
35
  inlineCode: {
@@ -51,7 +53,6 @@ const defaultMarkdownStyles: MarkdownStyle = {
51
53
  mentions: {
52
54
  fontWeight: '700',
53
55
  },
54
- // unfortunately marginVertical doesn't override the defaults for these within the 3rd party lib
55
56
  paragraph: {
56
57
  marginBottom: 8,
57
58
  marginTop: 8,
@@ -70,19 +71,6 @@ const parse: ParseFunction = (capture, parse, state) => ({
70
71
  content: parseInline(parse, capture[0], state),
71
72
  });
72
73
 
73
- const parseUrlsFromText = (text: string) => {
74
- try {
75
- return anchorme(text, {
76
- list: true,
77
- });
78
- } catch (e) {
79
- console.warn(`failure at parseUrlsFromText: ${e}`);
80
- // In case of failures its not worth crashing the app,
81
- // and instead simply to have un-parsed urls in message text.
82
- return [];
83
- }
84
- };
85
-
86
74
  export type MarkdownRules = Partial<DefaultRules>;
87
75
 
88
76
  export type RenderTextParams<
@@ -138,14 +126,14 @@ export const renderText = <
138
126
  if (!text) return null;
139
127
 
140
128
  let newText = text.trim();
141
- const urls = parseUrlsFromText(newText);
129
+ const urls = parseLinksFromText(newText);
142
130
 
143
131
  for (const urlInfo of urls) {
144
- const displayLink = truncate(urlInfo.encoded.replace(/^(www\.)/, ''), {
132
+ const displayLink = truncate(urlInfo.encoded, {
145
133
  length: 200,
146
134
  omission: '...',
147
135
  });
148
- const markdown = `[${displayLink}](${urlInfo.protocol}${urlInfo.encoded})`;
136
+ const markdown = `[${displayLink}](${urlInfo.scheme}${urlInfo.encoded})`;
149
137
  newText = newText.replace(urlInfo.raw, markdown);
150
138
  }
151
139
 
@@ -272,7 +260,7 @@ export const renderText = <
272
260
  *
273
261
  * This custom rule overrides this behavior both for top level lists and sublists,
274
262
  * in order to start the numbering from the number of the first list item provided.
275
- * */
263
+ */
276
264
  const customListAtLevel =
277
265
  (level: keyof typeof listLevels): ReactNodeOutput =>
278
266
  (node, output, { ...state }) => {
@@ -1,7 +1,5 @@
1
1
  import { useMemo } from 'react';
2
2
 
3
- import { isMessageWithStylesReadByAndDateSeparator } from '../../MessageList/hooks/useMessageList';
4
-
5
3
  import type { MessageContextValue } from '../../../contexts/messageContext/MessageContext';
6
4
  import type {
7
5
  DefaultAttachmentType,
@@ -13,6 +11,7 @@ import type {
13
11
  DefaultUserType,
14
12
  UnknownType,
15
13
  } from '../../../types/types';
14
+ import { isMessageWithStylesReadByAndDateSeparator } from '../../MessageList/hooks/useMessageList';
16
15
 
17
16
  export const useCreateMessageContext = <
18
17
  At extends UnknownType = DefaultAttachmentType,
@@ -2,9 +2,11 @@ import type { MessageResponse, Reaction } from 'stream-chat';
2
2
 
3
3
  import type { ChannelContextValue } from '../../../contexts/channelContext/ChannelContext';
4
4
  import type { ChatContextValue } from '../../../contexts/chatContext/ChatContext';
5
- import type { MessageContextValue } from '../../../contexts/messageContext/MessageContext';
5
+ import type {
6
+ MessageContextValue,
7
+ Reactions,
8
+ } from '../../../contexts/messageContext/MessageContext';
6
9
  import type { MessagesContextValue } from '../../../contexts/messagesContext/MessagesContext';
7
- import type { Reactions } from '../../../contexts/messageContext/MessageContext';
8
10
 
9
11
  import type {
10
12
  DefaultAttachmentType,
@@ -16,6 +18,7 @@ import type {
16
18
  DefaultUserType,
17
19
  UnknownType,
18
20
  } from '../../../types/types';
21
+ import { MessageStatusTypes } from '../../../utils/utils';
19
22
 
20
23
  export const useMessageActionHandlers = <
21
24
  At extends UnknownType = DefaultAttachmentType,
@@ -30,6 +33,7 @@ export const useMessageActionHandlers = <
30
33
  client,
31
34
  enforceUniqueReaction,
32
35
  message,
36
+ removeMessage,
33
37
  retrySendMessage,
34
38
  setEditingState,
35
39
  setQuotedMessageState,
@@ -37,6 +41,7 @@ export const useMessageActionHandlers = <
37
41
  updateMessage,
38
42
  }: Pick<
39
43
  MessagesContextValue<At, Ch, Co, Ev, Me, Re, Us>,
44
+ | 'removeMessage'
40
45
  | 'retrySendMessage'
41
46
  | 'setEditingState'
42
47
  | 'setQuotedMessageState'
@@ -58,8 +63,12 @@ export const useMessageActionHandlers = <
58
63
  );
59
64
 
60
65
  const handleDeleteMessage = async () => {
61
- const data = await client.deleteMessage(message.id);
62
- updateMessage(data.message);
66
+ if (message.status === MessageStatusTypes.FAILED) {
67
+ removeMessage(message);
68
+ } else {
69
+ const data = await client.deleteMessage(message.id);
70
+ updateMessage(data.message);
71
+ }
63
72
  };
64
73
 
65
74
  const handleToggleMuteUser = async () => {
@@ -1,14 +1,16 @@
1
1
  import React from 'react';
2
2
  import { Alert, Clipboard } from 'react-native';
3
3
 
4
+ import { useMessageActionHandlers } from './useMessageActionHandlers';
5
+
4
6
  import type { ChannelContextValue } from '../../../contexts/channelContext/ChannelContext';
5
7
  import type { ChatContextValue } from '../../../contexts/chatContext/ChatContext';
6
- import type { MessageActionType } from '../../MessageOverlay/MessageActionListItem';
7
8
  import type { MessageContextValue } from '../../../contexts/messageContext/MessageContext';
8
9
  import type { MessagesContextValue } from '../../../contexts/messagesContext/MessagesContext';
9
- import { removeReservedFields } from '../utils/removeReservedFields';
10
+ import type { OverlayContextValue } from '../../../contexts/overlayContext/OverlayContext';
10
11
  import { useTheme } from '../../../contexts/themeContext/ThemeContext';
11
- import type { MessageType } from '../../MessageList/hooks/useMessageList';
12
+ import type { ThreadContextValue } from '../../../contexts/threadContext/ThreadContext';
13
+ import type { TranslationContextValue } from '../../../contexts/translationContext/TranslationContext';
12
14
  import {
13
15
  Copy,
14
16
  CurveLineLeftUp,
@@ -22,10 +24,6 @@ import {
22
24
  Unpin,
23
25
  UserDelete,
24
26
  } from '../../../icons';
25
- import type { OverlayContextValue } from '../../../contexts/overlayContext/OverlayContext';
26
- import type { ThreadContextValue } from '../../../contexts/threadContext/ThreadContext';
27
- import type { TranslationContextValue } from '../../../contexts/translationContext/TranslationContext';
28
-
29
27
  import type {
30
28
  DefaultAttachmentType,
31
29
  DefaultChannelType,
@@ -36,7 +34,11 @@ import type {
36
34
  DefaultUserType,
37
35
  UnknownType,
38
36
  } from '../../../types/types';
39
- import { useMessageActionHandlers } from './useMessageActionHandlers';
37
+ import { MessageStatusTypes } from '../../../utils/utils';
38
+
39
+ import type { MessageType } from '../../MessageList/hooks/useMessageList';
40
+ import type { MessageActionType } from '../../MessageOverlay/MessageActionListItem';
41
+ import { removeReservedFields } from '../utils/removeReservedFields';
40
42
 
41
43
  export const useMessageActions = <
42
44
  At extends UnknownType = DefaultAttachmentType,
@@ -64,6 +66,7 @@ export const useMessageActions = <
64
66
  message,
65
67
  onThreadSelect,
66
68
  openThread,
69
+ removeMessage,
67
70
  retrySendMessage,
68
71
  selectReaction,
69
72
  setEditingState,
@@ -85,6 +88,7 @@ export const useMessageActions = <
85
88
  | 'handleRetry'
86
89
  | 'handleReaction'
87
90
  | 'handleThreadReply'
91
+ | 'removeMessage'
88
92
  | 'retrySendMessage'
89
93
  | 'setEditingState'
90
94
  | 'setQuotedMessageState'
@@ -119,6 +123,7 @@ export const useMessageActions = <
119
123
  client,
120
124
  enforceUniqueReaction,
121
125
  message,
126
+ removeMessage,
122
127
  retrySendMessage,
123
128
  setEditingState,
124
129
  setQuotedMessageState,
@@ -126,7 +131,7 @@ export const useMessageActions = <
126
131
  updateMessage,
127
132
  });
128
133
 
129
- const error = message.type === 'error' || message.status === 'failed';
134
+ const error = message.type === 'error' || message.status === MessageStatusTypes.FAILED;
130
135
 
131
136
  const onOpenThread = () => {
132
137
  if (onThreadSelect) {
@@ -1,6 +1,5 @@
1
- import type { MessageActionType } from '../../MessageOverlay/MessageActionListItem';
2
- import type { OwnCapabilitiesContextValue } from '../../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
3
1
  import type { MessageContextValue } from '../../../contexts/messageContext/MessageContext';
2
+ import type { OwnCapabilitiesContextValue } from '../../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
4
3
  import type {
5
4
  DefaultAttachmentType,
6
5
  DefaultChannelType,
@@ -11,6 +10,7 @@ import type {
11
10
  DefaultUserType,
12
11
  UnknownType,
13
12
  } from '../../../types/types';
13
+ import type { MessageActionType } from '../../MessageOverlay/MessageActionListItem';
14
14
 
15
15
  export type MessageActionsParams<
16
16
  At extends UnknownType = DefaultAttachmentType,
@@ -1,4 +1,3 @@
1
- import type { MessageType } from '../../MessageList/hooks/useMessageList';
2
1
  import type {
3
2
  DefaultAttachmentType,
4
3
  DefaultChannelType,
@@ -9,6 +8,7 @@ import type {
9
8
  DefaultUserType,
10
9
  UnknownType,
11
10
  } from '../../../types/types';
11
+ import type { MessageType } from '../../MessageList/hooks/useMessageList';
12
12
 
13
13
  export const removeReservedFields = <
14
14
  At extends UnknownType = DefaultAttachmentType,
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { GestureResponderEvent } from 'react-native';
2
3
  import { TouchableOpacity } from 'react-native-gesture-handler';
3
4
 
4
5
  import { useAttachmentPickerContext } from '../../contexts/attachmentPickerContext/AttachmentPickerContext';
@@ -9,8 +10,6 @@ import {
9
10
  import { useTheme } from '../../contexts/themeContext/ThemeContext';
10
11
  import { Attach } from '../../icons/Attach';
11
12
 
12
- import type { GestureResponderEvent } from 'react-native';
13
-
14
13
  import type {
15
14
  DefaultAttachmentType,
16
15
  DefaultChannelType,
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { GestureResponderEvent } from 'react-native';
2
3
  import { TouchableOpacity } from 'react-native-gesture-handler';
3
4
 
4
5
  import {
@@ -13,8 +14,6 @@ import {
13
14
  import { useTheme } from '../../contexts/themeContext/ThemeContext';
14
15
  import { Lightning } from '../../icons/Lightning';
15
16
 
16
- import type { GestureResponderEvent } from 'react-native';
17
-
18
17
  import type {
19
18
  DefaultAttachmentType,
20
19
  DefaultChannelType,
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { StyleSheet, Text, View } from 'react-native';
3
+
3
4
  import { useTheme } from '../../contexts/themeContext/ThemeContext';
4
5
 
5
6
  export type CooldownTimerProps = {
@@ -3,7 +3,6 @@ import { FlatList, StyleSheet, Text, TouchableOpacity, View } from 'react-native
3
3
 
4
4
  import { UploadProgressIndicator } from './UploadProgressIndicator';
5
5
 
6
- import { getFileSizeDisplayText } from '../Attachment/FileAttachment';
7
6
  import {
8
7
  FileUpload,
9
8
  MessageInputContextValue,
@@ -15,8 +14,6 @@ import {
15
14
  } from '../../contexts/messagesContext/MessagesContext';
16
15
  import { useTheme } from '../../contexts/themeContext/ThemeContext';
17
16
  import { Close } from '../../icons/Close';
18
- import { FileState, ProgressIndicatorTypes } from '../../utils/utils';
19
-
20
17
  import type {
21
18
  DefaultAttachmentType,
22
19
  DefaultChannelType,
@@ -27,6 +24,9 @@ import type {
27
24
  DefaultUserType,
28
25
  UnknownType,
29
26
  } from '../../types/types';
27
+ import { FileState, ProgressIndicatorTypes } from '../../utils/utils';
28
+
29
+ import { getFileSizeDisplayText } from '../Attachment/FileAttachment';
30
30
 
31
31
  const FILE_PREVIEW_HEIGHT = 60;
32
32
 
@@ -10,8 +10,6 @@ import {
10
10
  } from '../../contexts/messageInputContext/MessageInputContext';
11
11
  import { useTheme } from '../../contexts/themeContext/ThemeContext';
12
12
  import { Close } from '../../icons/Close';
13
- import { FileState, ProgressIndicatorTypes } from '../../utils/utils';
14
-
15
13
  import type {
16
14
  DefaultAttachmentType,
17
15
  DefaultChannelType,
@@ -22,6 +20,7 @@ import type {
22
20
  DefaultUserType,
23
21
  UnknownType,
24
22
  } from '../../types/types';
23
+ import { FileState, ProgressIndicatorTypes } from '../../utils/utils';
25
24
 
26
25
  const IMAGE_PREVIEW_SIZE = 100;
27
26
 
@@ -1,11 +1,11 @@
1
1
  import React from 'react';
2
2
  import { StyleSheet, View } from 'react-native';
3
3
 
4
- import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
5
4
  import {
6
5
  MessageInputContextValue,
7
6
  useMessageInputContext,
8
7
  } from '../../contexts/messageInputContext/MessageInputContext';
8
+ import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
9
9
  import { useTheme } from '../../contexts/themeContext/ThemeContext';
10
10
 
11
11
  import type {
@@ -1,13 +1,11 @@
1
1
  import React, { useEffect, useState } from 'react';
2
2
  import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
3
3
 
4
- import { useCountdown } from './hooks/useCountdown';
4
+ import type { UserResponse } from 'stream-chat';
5
5
 
6
- import { AttachmentSelectionBar } from '../AttachmentPicker/components/AttachmentSelectionBar';
7
- import { AutoCompleteInput } from '../AutoCompleteInput/AutoCompleteInput';
6
+ import { useCountdown } from './hooks/useCountdown';
8
7
 
9
8
  import { useAttachmentPickerContext } from '../../contexts/attachmentPickerContext/AttachmentPickerContext';
10
- import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
11
9
  import {
12
10
  ChannelContextValue,
13
11
  useChannelContext,
@@ -20,6 +18,7 @@ import {
20
18
  MessagesContextValue,
21
19
  useMessagesContext,
22
20
  } from '../../contexts/messagesContext/MessagesContext';
21
+ import { useOwnCapabilitiesContext } from '../../contexts/ownCapabilitiesContext/OwnCapabilitiesContext';
23
22
  import {
24
23
  SuggestionsContextValue,
25
24
  useSuggestionsContext,
@@ -32,8 +31,6 @@ import {
32
31
  } from '../../contexts/translationContext/TranslationContext';
33
32
  import { CircleClose, CurveLineLeftUp, Edit, Lightning } from '../../icons';
34
33
 
35
- import type { UserResponse } from 'stream-chat';
36
-
37
34
  import type { Asset } from '../../native';
38
35
  import type {
39
36
  DefaultAttachmentType,
@@ -45,6 +42,8 @@ import type {
45
42
  DefaultUserType,
46
43
  UnknownType,
47
44
  } from '../../types/types';
45
+ import { AttachmentSelectionBar } from '../AttachmentPicker/components/AttachmentSelectionBar';
46
+ import { AutoCompleteInput } from '../AutoCompleteInput/AutoCompleteInput';
48
47
 
49
48
  const styles = StyleSheet.create({
50
49
  attachmentSeparator: {
@@ -1,4 +1,5 @@
1
1
  import React from 'react';
2
+ import type { GestureResponderEvent } from 'react-native';
2
3
  import { TouchableOpacity } from 'react-native-gesture-handler';
3
4
 
4
5
  import {
@@ -8,8 +9,6 @@ import {
8
9
  import { useTheme } from '../../contexts/themeContext/ThemeContext';
9
10
  import { CircleRight } from '../../icons/CircleRight';
10
11
 
11
- import type { GestureResponderEvent } from 'react-native';
12
-
13
12
  import type {
14
13
  DefaultAttachmentType,
15
14
  DefaultChannelType,
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { StyleSheet, Text, View } from 'react-native';
3
3
 
4
- import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
5
4
  import { useTheme } from '../../contexts/themeContext/ThemeContext';
5
+ import { useTranslationContext } from '../../contexts/translationContext/TranslationContext';
6
6
 
7
7
  const styles = StyleSheet.create({
8
8
  container: {
@@ -1,7 +1,6 @@
1
1
  import React from 'react';
2
2
  import { StyleSheet, Text, TouchableOpacity, View } from 'react-native';
3
3
 
4
- import { Check } from '../../icons';
5
4
  import {
6
5
  MessageInputContextValue,
7
6
  useMessageInputContext,
@@ -12,6 +11,7 @@ import {
12
11
  TranslationContextValue,
13
12
  useTranslationContext,
14
13
  } from '../../contexts/translationContext/TranslationContext';
14
+ import { Check } from '../../icons';
15
15
 
16
16
  import type {
17
17
  DefaultAttachmentType,
@@ -1,9 +1,9 @@
1
1
  import React from 'react';
2
- import { fireEvent, render, waitFor } from '@testing-library/react-native';
3
2
 
4
- import { AttachButton } from '../AttachButton';
3
+ import { fireEvent, render, waitFor } from '@testing-library/react-native';
5
4
 
6
5
  import { ThemeProvider } from '../../../contexts/themeContext/ThemeContext';
6
+ import { AttachButton } from '../AttachButton';
7
7
 
8
8
  describe('AttachButton', () => {
9
9
  it('should render an enabled AttachButton', async () => {
@@ -1,23 +1,21 @@
1
1
  import React from 'react';
2
2
  import { View } from 'react-native';
3
- import { fireEvent, render, waitFor } from '@testing-library/react-native';
4
-
5
- import { FileUploadPreview } from '../FileUploadPreview';
6
-
7
- import { Channel } from '../../Channel/Channel';
8
- import { Chat } from '../../Chat/Chat';
9
3
 
10
- import { getTestClientWithUser } from '../../../mock-builders/mock';
11
- import { FileState } from '../../../utils/utils';
4
+ import { fireEvent, render, waitFor } from '@testing-library/react-native';
12
5
 
13
- import { generateUser } from '../../../mock-builders/generator/user';
14
- import { generateFileUploadPreview } from '../../../mock-builders/generator/attachment';
6
+ import { OverlayProvider } from '../../../contexts/overlayContext/OverlayProvider';
15
7
  import { getOrCreateChannelApi } from '../../../mock-builders/api/getOrCreateChannel';
16
- import { generateChannel } from '../../../mock-builders/generator/channel';
8
+ import { useMockedApis } from '../../../mock-builders/api/useMockedApis';
9
+ import { generateFileUploadPreview } from '../../../mock-builders/generator/attachment';
10
+ import { generateChannelResponse } from '../../../mock-builders/generator/channel';
17
11
  import { generateMember } from '../../../mock-builders/generator/member';
18
12
  import { generateMessage } from '../../../mock-builders/generator/message';
19
- import { useMockedApis } from '../../../mock-builders/api/useMockedApis';
20
- import { OverlayProvider } from '../../../contexts/overlayContext/OverlayProvider';
13
+ import { generateUser } from '../../../mock-builders/generator/user';
14
+ import { getTestClientWithUser } from '../../../mock-builders/mock';
15
+ import { FileState } from '../../../utils/utils';
16
+ import { Channel } from '../../Channel/Channel';
17
+ import { Chat } from '../../Chat/Chat';
18
+ import { FileUploadPreview } from '../FileUploadPreview';
21
19
 
22
20
  function MockedFlatList(props) {
23
21
  const items = props.data.map((item, index) => {
@@ -39,7 +37,7 @@ describe('FileUploadPreview', () => {
39
37
 
40
38
  const user1 = generateUser();
41
39
 
42
- const mockedChannel = generateChannel({
40
+ const mockedChannel = generateChannelResponse({
43
41
  members: [generateMember({ user: user1 })],
44
42
  messages: [generateMessage({ user: user1 }), generateMessage({ user: user1 })],
45
43
  });
@@ -114,7 +112,7 @@ describe('FileUploadPreview', () => {
114
112
 
115
113
  const user1 = generateUser();
116
114
 
117
- const mockedChannel = generateChannel({
115
+ const mockedChannel = generateChannelResponse({
118
116
  members: [generateMember({ user: user1 })],
119
117
  messages: [generateMessage({ user: user1 }), generateMessage({ user: user1 })],
120
118
  });
@@ -191,7 +189,7 @@ describe('FileUploadPreview', () => {
191
189
 
192
190
  const user1 = generateUser();
193
191
 
194
- const mockedChannel = generateChannel({
192
+ const mockedChannel = generateChannelResponse({
195
193
  members: [generateMember({ user: user1 })],
196
194
  messages: [generateMessage({ user: user1 }), generateMessage({ user: user1 })],
197
195
  });
@@ -273,7 +271,7 @@ describe('FileUploadPreview', () => {
273
271
 
274
272
  const user1 = generateUser();
275
273
 
276
- const mockedChannel = generateChannel({
274
+ const mockedChannel = generateChannelResponse({
277
275
  members: [generateMember({ user: user1 })],
278
276
  messages: [generateMessage({ user: user1 }), generateMessage({ user: user1 })],
279
277
  });
@@ -1,12 +1,12 @@
1
1
  import React from 'react';
2
- import { fireEvent, render, waitFor } from '@testing-library/react-native';
3
2
 
4
- import { ImageUploadPreview } from '../ImageUploadPreview';
3
+ import { fireEvent, render, waitFor } from '@testing-library/react-native';
5
4
 
6
5
  import { ThemeProvider } from '../../../contexts/themeContext/ThemeContext';
6
+ import { generateImageUploadPreview } from '../../../mock-builders/generator/attachment';
7
7
  import { FileState } from '../../../utils/utils';
8
8
 
9
- import { generateImageUploadPreview } from '../../../mock-builders/generator/attachment';
9
+ import { ImageUploadPreview } from '../ImageUploadPreview';
10
10
 
11
11
  describe('ImageUploadPreview', () => {
12
12
  it('should render ImageUploadPreview with all uploading images', async () => {