stream-chat-react-native-core 3.10.2 → 4.0.0-beta.4

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 (1099) 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 +18 -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 -113
  10. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  11. package/lib/commonjs/components/Attachment/Giphy.js +112 -148
  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 +21 -45
  34. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  35. package/lib/commonjs/components/AutoCompleteInput/{CommandsItem.js → AutoCompleteSuggestionCommandIcon.js} +21 -94
  36. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -0
  37. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +145 -0
  38. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -0
  39. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +248 -0
  40. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -0
  41. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +223 -0
  42. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -0
  43. package/lib/commonjs/components/Avatar/Avatar.js +13 -7
  44. package/lib/commonjs/components/Avatar/Avatar.js.map +1 -1
  45. package/lib/commonjs/components/Avatar/GroupAvatar.js +10 -10
  46. package/lib/commonjs/components/Avatar/GroupAvatar.js.map +1 -1
  47. package/lib/commonjs/components/Channel/Channel.js +332 -247
  48. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  49. package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +5 -5
  50. package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
  51. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +7 -5
  52. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  53. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +9 -31
  54. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  55. package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js +35 -0
  56. package/lib/commonjs/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -0
  57. package/lib/commonjs/components/ChannelList/ChannelList.js +6 -6
  58. package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
  59. package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js +5 -4
  60. package/lib/commonjs/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
  61. package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js +6 -7
  62. package/lib/commonjs/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
  63. package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +4 -3
  64. package/lib/commonjs/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
  65. package/lib/commonjs/components/ChannelList/ChannelListMessenger.js +17 -17
  66. package/lib/commonjs/components/ChannelList/ChannelListMessenger.js.map +1 -1
  67. package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +2 -2
  68. package/lib/commonjs/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
  69. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
  70. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
  71. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
  72. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
  73. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js +2 -2
  74. package/lib/commonjs/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
  75. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js +2 -2
  76. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
  77. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js +3 -3
  78. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
  79. package/lib/commonjs/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
  80. package/lib/commonjs/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
  81. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js +2 -2
  82. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  83. package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +89 -64
  84. package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
  85. package/lib/commonjs/components/ChannelList/utils.js +1 -1
  86. package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js +2 -2
  87. package/lib/commonjs/components/ChannelPreview/ChannelAvatar.js.map +1 -1
  88. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +2 -2
  89. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
  90. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  91. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js +49 -20
  92. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  93. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js +51 -0
  94. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -0
  95. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
  96. package/lib/commonjs/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  97. package/lib/commonjs/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
  98. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
  99. package/lib/commonjs/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  100. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js +16 -7
  101. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
  102. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  103. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
  104. package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js +2 -1
  105. package/lib/commonjs/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  106. package/lib/commonjs/components/Chat/Chat.js.map +1 -1
  107. package/lib/commonjs/components/Chat/hooks/useIsOnline.js +12 -5
  108. package/lib/commonjs/components/Chat/hooks/useIsOnline.js.map +1 -1
  109. package/lib/commonjs/components/ImageGallery/ImageGallery.js +90 -58
  110. package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
  111. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +2 -2
  112. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
  113. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +12 -12
  114. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  115. package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js +14 -16
  116. package/lib/commonjs/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
  117. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +7 -7
  118. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
  119. package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js +5 -5
  120. package/lib/commonjs/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
  121. package/lib/commonjs/components/Indicators/LoadingErrorIndicator.js.map +1 -1
  122. package/lib/commonjs/components/Indicators/LoadingIndicator.js +9 -9
  123. package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
  124. package/lib/commonjs/components/Message/Message.js +151 -860
  125. package/lib/commonjs/components/Message/Message.js.map +1 -1
  126. package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js +6 -6
  127. package/lib/commonjs/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
  128. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +39 -38
  129. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
  130. package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js +8 -6
  131. package/lib/commonjs/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
  132. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js +33 -21
  133. package/lib/commonjs/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  134. package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js +122 -0
  135. package/lib/commonjs/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -0
  136. package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js +5 -1
  137. package/lib/commonjs/components/Message/MessageSimple/MessageReplies.js.map +1 -1
  138. package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js +5 -5
  139. package/lib/commonjs/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
  140. package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js +27 -13
  141. package/lib/commonjs/components/Message/MessageSimple/MessageSimple.js.map +1 -1
  142. package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js +25 -24
  143. package/lib/commonjs/components/Message/MessageSimple/MessageStatus.js.map +1 -1
  144. package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +7 -3
  145. package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
  146. package/lib/commonjs/components/Message/MessageSimple/ReactionList.js +52 -80
  147. package/lib/commonjs/components/Message/MessageSimple/ReactionList.js.map +1 -1
  148. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +89 -0
  149. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
  150. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
  151. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
  152. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +170 -73
  153. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  154. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js +240 -0
  155. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
  156. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +1 -5
  157. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  158. package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js +307 -0
  159. package/lib/commonjs/components/Message/hooks/useMessageActionHandlers.js.map +1 -0
  160. package/lib/commonjs/components/Message/hooks/useMessageActions.js +563 -0
  161. package/lib/commonjs/components/Message/hooks/useMessageActions.js.map +1 -0
  162. package/lib/commonjs/components/Message/utils/messageActions.js +17 -15
  163. package/lib/commonjs/components/Message/utils/messageActions.js.map +1 -1
  164. package/lib/commonjs/components/Message/utils/removeReservedFields.js.map +1 -1
  165. package/lib/commonjs/components/MessageInput/AttachButton.js +3 -3
  166. package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
  167. package/lib/commonjs/components/MessageInput/CommandsButton.js +3 -3
  168. package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
  169. package/lib/commonjs/components/MessageInput/CooldownTimer.js +78 -0
  170. package/lib/commonjs/components/MessageInput/CooldownTimer.js.map +1 -0
  171. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +4 -4
  172. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  173. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js +9 -9
  174. package/lib/commonjs/components/MessageInput/ImageUploadPreview.js.map +1 -1
  175. package/lib/commonjs/components/MessageInput/InputButtons.js +17 -22
  176. package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
  177. package/lib/commonjs/components/MessageInput/MessageInput.js +93 -65
  178. package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
  179. package/lib/commonjs/components/MessageInput/MoreOptionsButton.js +3 -3
  180. package/lib/commonjs/components/MessageInput/MoreOptionsButton.js.map +1 -1
  181. package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js +71 -0
  182. package/lib/commonjs/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -0
  183. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +4 -3
  184. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  185. package/lib/commonjs/components/MessageInput/hooks/useCooldown.js +63 -0
  186. package/lib/commonjs/components/MessageInput/hooks/useCooldown.js.map +1 -0
  187. package/lib/commonjs/components/MessageInput/hooks/useCountdown.js +57 -0
  188. package/lib/commonjs/components/MessageInput/hooks/useCountdown.js.map +1 -0
  189. package/lib/commonjs/components/MessageList/DateHeader.js +2 -2
  190. package/lib/commonjs/components/MessageList/DateHeader.js.map +1 -1
  191. package/lib/commonjs/components/MessageList/InlineDateSeparator.js +2 -2
  192. package/lib/commonjs/components/MessageList/InlineDateSeparator.js.map +1 -1
  193. package/lib/commonjs/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
  194. package/lib/commonjs/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
  195. package/lib/commonjs/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
  196. package/lib/commonjs/components/MessageList/MessageList.js +77 -44
  197. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  198. package/lib/commonjs/components/MessageList/MessageSystem.js.map +1 -1
  199. package/lib/commonjs/components/MessageList/TypingIndicator.js +5 -5
  200. package/lib/commonjs/components/MessageList/TypingIndicator.js.map +1 -1
  201. package/lib/commonjs/components/MessageList/hooks/useMessageList.js +23 -10
  202. package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
  203. package/lib/commonjs/components/MessageList/hooks/useTypingString.js +2 -2
  204. package/lib/commonjs/components/MessageList/hooks/useTypingString.js.map +1 -1
  205. package/lib/commonjs/components/MessageList/utils/getDateSeparators.js +2 -1
  206. package/lib/commonjs/components/MessageList/utils/getDateSeparators.js.map +1 -1
  207. package/lib/commonjs/components/MessageList/utils/getGroupStyles.js +10 -5
  208. package/lib/commonjs/components/MessageList/utils/getGroupStyles.js.map +1 -1
  209. package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js +3 -1
  210. package/lib/commonjs/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
  211. package/lib/{module/components/MessageOverlay/MessageActions.js → commonjs/components/MessageOverlay/MessageActionList.js} +33 -85
  212. package/lib/commonjs/components/MessageOverlay/MessageActionList.js.map +1 -0
  213. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js +131 -0
  214. package/lib/commonjs/components/MessageOverlay/MessageActionListItem.js.map +1 -0
  215. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +97 -78
  216. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
  217. package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js +38 -0
  218. package/lib/commonjs/components/MessageOverlay/OverlayBackdrop.js.map +1 -0
  219. package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js +12 -11
  220. package/lib/commonjs/components/MessageOverlay/OverlayReactionList.js.map +1 -1
  221. package/lib/commonjs/components/MessageOverlay/OverlayReactions.js +31 -34
  222. package/lib/commonjs/components/MessageOverlay/OverlayReactions.js.map +1 -1
  223. package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js +41 -0
  224. package/lib/commonjs/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
  225. package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js +37 -0
  226. package/lib/commonjs/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -0
  227. package/lib/commonjs/components/Reply/Reply.js +25 -19
  228. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  229. package/lib/commonjs/components/Thread/Thread.js +11 -2
  230. package/lib/commonjs/components/Thread/Thread.js.map +1 -1
  231. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +20 -12
  232. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  233. package/lib/commonjs/components/docs/ListProps.md +1 -1
  234. package/lib/commonjs/components/docs/data.js +1 -1
  235. package/lib/commonjs/components/index.js +133 -55
  236. package/lib/commonjs/components/index.js.map +1 -1
  237. package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +68 -0
  238. package/lib/commonjs/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -0
  239. package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js +2 -2
  240. package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
  241. package/lib/commonjs/contexts/channelContext/ChannelContext.js +2 -2
  242. package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
  243. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js +2 -2
  244. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
  245. package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js +155 -0
  246. package/lib/commonjs/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -0
  247. package/lib/commonjs/contexts/channelsStateContext/useChannelState.js +144 -0
  248. package/lib/commonjs/contexts/channelsStateContext/useChannelState.js.map +1 -0
  249. package/lib/commonjs/contexts/chatContext/ChatContext.js +2 -2
  250. package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
  251. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
  252. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  253. package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js +2 -2
  254. package/lib/commonjs/contexts/keyboardContext/KeyboardContext.js.map +1 -1
  255. package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -2
  256. package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
  257. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +122 -84
  258. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  259. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +9 -5
  260. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  261. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js +10 -3
  262. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  263. package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +5 -19
  264. package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
  265. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js +36 -0
  266. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
  267. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js +105 -0
  268. package/lib/commonjs/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
  269. package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -2
  270. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  271. package/lib/commonjs/contexts/overlayContext/OverlayContext.js +1 -1
  272. package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
  273. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +55 -46
  274. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
  275. package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +61 -0
  276. package/lib/commonjs/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -0
  277. package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
  278. package/lib/commonjs/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
  279. package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js +20 -33
  280. package/lib/commonjs/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
  281. package/lib/commonjs/contexts/themeContext/ThemeContext.js +2 -2
  282. package/lib/commonjs/contexts/themeContext/ThemeContext.js.map +1 -1
  283. package/lib/commonjs/contexts/themeContext/utils/theme.js +45 -20
  284. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  285. package/lib/commonjs/contexts/threadContext/ThreadContext.js +2 -2
  286. package/lib/commonjs/contexts/threadContext/ThreadContext.js.map +1 -1
  287. package/lib/commonjs/contexts/translationContext/TranslationContext.js +1 -1
  288. package/lib/commonjs/contexts/translationContext/TranslationContext.js.map +1 -1
  289. package/lib/commonjs/contexts/typingContext/TypingContext.js +2 -2
  290. package/lib/commonjs/contexts/typingContext/TypingContext.js.map +1 -1
  291. package/lib/commonjs/contexts/utils/getDisplayName.js.map +1 -1
  292. package/lib/commonjs/emoji-data/compiled.js +0 -315
  293. package/lib/commonjs/emoji-data/compiled.js.map +1 -1
  294. package/lib/commonjs/emoji-data/emojiNames.js +0 -105
  295. package/lib/commonjs/emoji-data/emojiNames.js.map +1 -1
  296. package/lib/commonjs/emoji-data/emojis.js +0 -175
  297. package/lib/commonjs/emoji-data/emojis.js.map +1 -1
  298. package/lib/commonjs/emoji-data/index.js +2 -2
  299. package/lib/commonjs/emoji-data/index.js.map +1 -1
  300. package/lib/commonjs/hooks/useStreami18n.js.map +1 -1
  301. package/lib/commonjs/i18n/en.json +9 -3
  302. package/lib/commonjs/i18n/fr.json +9 -3
  303. package/lib/commonjs/i18n/hi.json +9 -3
  304. package/lib/commonjs/i18n/it.json +9 -3
  305. package/lib/commonjs/i18n/ja.json +9 -0
  306. package/lib/commonjs/i18n/ko.json +9 -0
  307. package/lib/commonjs/i18n/nl.json +9 -3
  308. package/lib/commonjs/i18n/ru.json +9 -3
  309. package/lib/commonjs/i18n/tr.json +10 -4
  310. package/lib/commonjs/icons/Pin.js +42 -0
  311. package/lib/commonjs/icons/Pin.js.map +1 -0
  312. package/lib/commonjs/icons/PinHeader.js +38 -0
  313. package/lib/commonjs/icons/PinHeader.js.map +1 -0
  314. package/lib/commonjs/icons/Unpin.js +38 -0
  315. package/lib/commonjs/icons/Unpin.js.map +1 -0
  316. package/lib/commonjs/icons/index.js +39 -26
  317. package/lib/commonjs/icons/index.js.map +1 -1
  318. package/lib/commonjs/icons/utils/base.js +1 -1
  319. package/lib/commonjs/index.js +6 -6
  320. package/lib/commonjs/mock-builders/api/error.js +1 -1
  321. package/lib/commonjs/mock-builders/api/sendMessage.js +4 -1
  322. package/lib/commonjs/mock-builders/api/sendMessage.js.map +1 -1
  323. package/lib/commonjs/mock-builders/generator/attachment.js +1 -3
  324. package/lib/commonjs/mock-builders/generator/attachment.js.map +1 -1
  325. package/lib/commonjs/mock-builders/generator/channel.js +101 -50
  326. package/lib/commonjs/mock-builders/generator/channel.js.map +1 -1
  327. package/lib/commonjs/mock-builders/generator/user.js +32 -33
  328. package/lib/commonjs/mock-builders/generator/user.js.map +1 -1
  329. package/lib/commonjs/mock-builders/mock.js +3 -3
  330. package/lib/commonjs/mock-builders/mock.js.map +1 -1
  331. package/lib/commonjs/native.js +1 -7
  332. package/lib/commonjs/native.js.map +1 -1
  333. package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js +7 -7
  334. package/lib/commonjs/styleguideComponents/ArgumentsRenderer.js.map +1 -1
  335. package/lib/commonjs/styleguideComponents/JsDoc.js +4 -4
  336. package/lib/commonjs/styleguideComponents/JsDoc.js.map +1 -1
  337. package/lib/commonjs/styleguideComponents/PathlineRenderer.js +7 -7
  338. package/lib/commonjs/styleguideComponents/PathlineRenderer.js.map +1 -1
  339. package/lib/commonjs/styleguideComponents/PropsRenderer.js +25 -25
  340. package/lib/commonjs/styleguideComponents/PropsRenderer.js.map +1 -1
  341. package/lib/commonjs/styleguideComponents/Wrapper.js +1 -1
  342. package/lib/commonjs/styleguideComponents/Wrapper.js.map +1 -1
  343. package/lib/commonjs/utils/Streami18n.js.map +1 -1
  344. package/lib/commonjs/utils/date.js +13 -0
  345. package/lib/commonjs/utils/date.js.map +1 -0
  346. package/lib/commonjs/utils/getResizedImageUrl.js +26 -0
  347. package/lib/commonjs/utils/getResizedImageUrl.js.map +1 -0
  348. package/lib/commonjs/utils/getUrlOfImageAttachment.js +9 -0
  349. package/lib/commonjs/utils/getUrlOfImageAttachment.js.map +1 -0
  350. package/lib/commonjs/utils/utils.js +17 -9
  351. package/lib/commonjs/utils/utils.js.map +1 -1
  352. package/lib/commonjs/version.json +1 -1
  353. package/lib/module/components/Attachment/Attachment.js +2 -2
  354. package/lib/module/components/Attachment/Attachment.js.map +1 -1
  355. package/lib/module/components/Attachment/AttachmentActions.js.map +1 -1
  356. package/lib/module/components/Attachment/Card.js +18 -15
  357. package/lib/module/components/Attachment/Card.js.map +1 -1
  358. package/lib/module/components/Attachment/FileAttachment.js +8 -8
  359. package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
  360. package/lib/module/components/Attachment/FileIcon.js.map +1 -1
  361. package/lib/module/components/Attachment/Gallery.js +97 -113
  362. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  363. package/lib/module/components/Attachment/Giphy.js +112 -148
  364. package/lib/module/components/Attachment/Giphy.js.map +1 -1
  365. package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js +46 -0
  366. package/lib/module/components/Attachment/utils/buildGallery/buildGallery.js.map +1 -0
  367. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js +88 -0
  368. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.js.map +1 -0
  369. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js +75 -0
  370. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.js.map +1 -0
  371. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js +43 -0
  372. package/lib/module/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.js.map +1 -0
  373. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +30 -0
  374. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -0
  375. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js +49 -0
  376. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnailGrid.js.map +1 -0
  377. package/lib/module/components/Attachment/utils/buildGallery/types.js +4 -0
  378. package/lib/module/components/Attachment/utils/buildGallery/types.js.map +1 -0
  379. package/lib/module/components/Attachment/utils/getAspectRatio.js +14 -0
  380. package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -0
  381. package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js +36 -0
  382. package/lib/module/components/Attachment/utils/getGalleryImageBorderRadius.js.map +1 -0
  383. package/lib/module/components/AttachmentPicker/AttachmentPicker.js +9 -8
  384. package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  385. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +21 -45
  386. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js.map +1 -1
  387. package/lib/module/components/AutoCompleteInput/{CommandsItem.js → AutoCompleteSuggestionCommandIcon.js} +21 -94
  388. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -0
  389. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +145 -0
  390. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -0
  391. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js +248 -0
  392. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionItem.js.map +1 -0
  393. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +223 -0
  394. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -0
  395. package/lib/module/components/Avatar/Avatar.js +13 -7
  396. package/lib/module/components/Avatar/Avatar.js.map +1 -1
  397. package/lib/module/components/Avatar/GroupAvatar.js +10 -10
  398. package/lib/module/components/Avatar/GroupAvatar.js.map +1 -1
  399. package/lib/module/components/Channel/Channel.js +332 -247
  400. package/lib/module/components/Channel/Channel.js.map +1 -1
  401. package/lib/module/components/Channel/hooks/useCreateChannelContext.js +5 -5
  402. package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
  403. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +7 -5
  404. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  405. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +9 -31
  406. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  407. package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js +35 -0
  408. package/lib/module/components/Channel/hooks/useCreateOwnCapabilitiesContext.js.map +1 -0
  409. package/lib/module/components/ChannelList/ChannelList.js +6 -6
  410. package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
  411. package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js +5 -4
  412. package/lib/module/components/ChannelList/ChannelListFooterLoadingIndicator.js.map +1 -1
  413. package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js +6 -7
  414. package/lib/module/components/ChannelList/ChannelListHeaderErrorIndicator.js.map +1 -1
  415. package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js +4 -3
  416. package/lib/module/components/ChannelList/ChannelListHeaderNetworkDownIndicator.js.map +1 -1
  417. package/lib/module/components/ChannelList/ChannelListMessenger.js +17 -17
  418. package/lib/module/components/ChannelList/ChannelListMessenger.js.map +1 -1
  419. package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js +2 -2
  420. package/lib/module/components/ChannelList/hooks/listeners/useAddedToChannelNotification.js.map +1 -1
  421. package/lib/module/components/ChannelList/hooks/listeners/useChannelDeleted.js.map +1 -1
  422. package/lib/module/components/ChannelList/hooks/listeners/useChannelHidden.js.map +1 -1
  423. package/lib/module/components/ChannelList/hooks/listeners/useChannelTruncated.js.map +1 -1
  424. package/lib/module/components/ChannelList/hooks/listeners/useChannelUpdated.js.map +1 -1
  425. package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js +2 -2
  426. package/lib/module/components/ChannelList/hooks/listeners/useChannelVisible.js.map +1 -1
  427. package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js +2 -2
  428. package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
  429. package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js +3 -3
  430. package/lib/module/components/ChannelList/hooks/listeners/useNewMessageNotification.js.map +1 -1
  431. package/lib/module/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.js.map +1 -1
  432. package/lib/module/components/ChannelList/hooks/listeners/useUserPresence.js.map +1 -1
  433. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js +2 -2
  434. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  435. package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +89 -64
  436. package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
  437. package/lib/module/components/ChannelList/utils.js +1 -1
  438. package/lib/module/components/ChannelPreview/ChannelAvatar.js +2 -2
  439. package/lib/module/components/ChannelPreview/ChannelAvatar.js.map +1 -1
  440. package/lib/module/components/ChannelPreview/ChannelPreview.js +2 -2
  441. package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
  442. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  443. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js +49 -20
  444. package/lib/module/components/ChannelPreview/ChannelPreviewMessenger.js.map +1 -1
  445. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js +51 -0
  446. package/lib/module/components/ChannelPreview/ChannelPreviewMutedStatus.js.map +1 -0
  447. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js +4 -4
  448. package/lib/module/components/ChannelPreview/ChannelPreviewStatus.js.map +1 -1
  449. package/lib/module/components/ChannelPreview/ChannelPreviewTitle.js.map +1 -1
  450. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js +2 -2
  451. package/lib/module/components/ChannelPreview/ChannelPreviewUnreadCount.js.map +1 -1
  452. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js +16 -7
  453. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.js.map +1 -1
  454. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  455. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.js.map +1 -1
  456. package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js +2 -1
  457. package/lib/module/components/ChannelPreview/hooks/useLatestMessagePreview.js.map +1 -1
  458. package/lib/module/components/Chat/Chat.js.map +1 -1
  459. package/lib/module/components/Chat/hooks/useIsOnline.js +12 -5
  460. package/lib/module/components/Chat/hooks/useIsOnline.js.map +1 -1
  461. package/lib/module/components/ImageGallery/ImageGallery.js +90 -58
  462. package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
  463. package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +2 -2
  464. package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
  465. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +12 -12
  466. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  467. package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js +14 -16
  468. package/lib/module/components/ImageGallery/components/ImageGalleryHeader.js.map +1 -1
  469. package/lib/module/components/ImageGallery/components/ImageGrid.js +7 -7
  470. package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
  471. package/lib/module/components/ImageGallery/components/ImageGridHandle.js +5 -5
  472. package/lib/module/components/ImageGallery/components/ImageGridHandle.js.map +1 -1
  473. package/lib/module/components/Indicators/LoadingErrorIndicator.js.map +1 -1
  474. package/lib/module/components/Indicators/LoadingIndicator.js +9 -9
  475. package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
  476. package/lib/module/components/Message/Message.js +151 -860
  477. package/lib/module/components/Message/Message.js.map +1 -1
  478. package/lib/module/components/Message/MessageSimple/MessageAvatar.js +6 -6
  479. package/lib/module/components/Message/MessageSimple/MessageAvatar.js.map +1 -1
  480. package/lib/module/components/Message/MessageSimple/MessageContent.js +39 -38
  481. package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
  482. package/lib/module/components/Message/MessageSimple/MessageDeleted.js +8 -6
  483. package/lib/module/components/Message/MessageSimple/MessageDeleted.js.map +1 -1
  484. package/lib/module/components/Message/MessageSimple/MessageFooter.js +33 -21
  485. package/lib/module/components/Message/MessageSimple/MessageFooter.js.map +1 -1
  486. package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js +122 -0
  487. package/lib/module/components/Message/MessageSimple/MessagePinnedHeader.js.map +1 -0
  488. package/lib/module/components/Message/MessageSimple/MessageReplies.js +5 -1
  489. package/lib/module/components/Message/MessageSimple/MessageReplies.js.map +1 -1
  490. package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js +5 -5
  491. package/lib/module/components/Message/MessageSimple/MessageRepliesAvatars.js.map +1 -1
  492. package/lib/module/components/Message/MessageSimple/MessageSimple.js +27 -13
  493. package/lib/module/components/Message/MessageSimple/MessageSimple.js.map +1 -1
  494. package/lib/module/components/Message/MessageSimple/MessageStatus.js +25 -24
  495. package/lib/module/components/Message/MessageSimple/MessageStatus.js.map +1 -1
  496. package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +7 -3
  497. package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
  498. package/lib/module/components/Message/MessageSimple/ReactionList.js +52 -80
  499. package/lib/module/components/Message/MessageSimple/ReactionList.js.map +1 -1
  500. package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +89 -0
  501. package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -0
  502. package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js +46 -0
  503. package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -0
  504. package/lib/module/components/Message/MessageSimple/utils/renderText.js +170 -73
  505. package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  506. package/lib/module/components/Message/MessageSimple/utils/renderText.test.js +240 -0
  507. package/lib/module/components/Message/MessageSimple/utils/renderText.test.js.map +1 -0
  508. package/lib/module/components/Message/hooks/useCreateMessageContext.js +1 -5
  509. package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  510. package/lib/module/components/Message/hooks/useMessageActionHandlers.js +307 -0
  511. package/lib/module/components/Message/hooks/useMessageActionHandlers.js.map +1 -0
  512. package/lib/module/components/Message/hooks/useMessageActions.js +563 -0
  513. package/lib/module/components/Message/hooks/useMessageActions.js.map +1 -0
  514. package/lib/module/components/Message/utils/messageActions.js +17 -15
  515. package/lib/module/components/Message/utils/messageActions.js.map +1 -1
  516. package/lib/module/components/Message/utils/removeReservedFields.js.map +1 -1
  517. package/lib/module/components/MessageInput/AttachButton.js +3 -3
  518. package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
  519. package/lib/module/components/MessageInput/CommandsButton.js +3 -3
  520. package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
  521. package/lib/module/components/MessageInput/CooldownTimer.js +78 -0
  522. package/lib/module/components/MessageInput/CooldownTimer.js.map +1 -0
  523. package/lib/module/components/MessageInput/FileUploadPreview.js +4 -4
  524. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  525. package/lib/module/components/MessageInput/ImageUploadPreview.js +9 -9
  526. package/lib/module/components/MessageInput/ImageUploadPreview.js.map +1 -1
  527. package/lib/module/components/MessageInput/InputButtons.js +17 -22
  528. package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
  529. package/lib/module/components/MessageInput/MessageInput.js +93 -65
  530. package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
  531. package/lib/module/components/MessageInput/MoreOptionsButton.js +3 -3
  532. package/lib/module/components/MessageInput/MoreOptionsButton.js.map +1 -1
  533. package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js +71 -0
  534. package/lib/module/components/MessageInput/SendMessageDisallowedIndicator.js.map +1 -0
  535. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +4 -3
  536. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  537. package/lib/module/components/MessageInput/hooks/useCooldown.js +63 -0
  538. package/lib/module/components/MessageInput/hooks/useCooldown.js.map +1 -0
  539. package/lib/module/components/MessageInput/hooks/useCountdown.js +57 -0
  540. package/lib/module/components/MessageInput/hooks/useCountdown.js.map +1 -0
  541. package/lib/module/components/MessageList/DateHeader.js +2 -2
  542. package/lib/module/components/MessageList/DateHeader.js.map +1 -1
  543. package/lib/module/components/MessageList/InlineDateSeparator.js +2 -2
  544. package/lib/module/components/MessageList/InlineDateSeparator.js.map +1 -1
  545. package/lib/module/components/MessageList/InlineLoadingMoreIndicator.js +1 -1
  546. package/lib/module/components/MessageList/InlineLoadingMoreRecentIndicator.js +1 -1
  547. package/lib/module/components/MessageList/InlineLoadingMoreThreadIndicator.js +1 -1
  548. package/lib/module/components/MessageList/MessageList.js +77 -44
  549. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  550. package/lib/module/components/MessageList/MessageSystem.js.map +1 -1
  551. package/lib/module/components/MessageList/TypingIndicator.js +5 -5
  552. package/lib/module/components/MessageList/TypingIndicator.js.map +1 -1
  553. package/lib/module/components/MessageList/hooks/useMessageList.js +23 -10
  554. package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
  555. package/lib/module/components/MessageList/hooks/useTypingString.js +2 -2
  556. package/lib/module/components/MessageList/hooks/useTypingString.js.map +1 -1
  557. package/lib/module/components/MessageList/utils/getDateSeparators.js +2 -1
  558. package/lib/module/components/MessageList/utils/getDateSeparators.js.map +1 -1
  559. package/lib/module/components/MessageList/utils/getGroupStyles.js +10 -5
  560. package/lib/module/components/MessageList/utils/getGroupStyles.js.map +1 -1
  561. package/lib/module/components/MessageList/utils/getLastReceivedMessage.js +3 -1
  562. package/lib/module/components/MessageList/utils/getLastReceivedMessage.js.map +1 -1
  563. package/lib/{commonjs/components/MessageOverlay/MessageActions.js → module/components/MessageOverlay/MessageActionList.js} +33 -85
  564. package/lib/module/components/MessageOverlay/MessageActionList.js.map +1 -0
  565. package/lib/module/components/MessageOverlay/MessageActionListItem.js +131 -0
  566. package/lib/module/components/MessageOverlay/MessageActionListItem.js.map +1 -0
  567. package/lib/module/components/MessageOverlay/MessageOverlay.js +97 -78
  568. package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
  569. package/lib/module/components/MessageOverlay/OverlayBackdrop.js +38 -0
  570. package/lib/module/components/MessageOverlay/OverlayBackdrop.js.map +1 -0
  571. package/lib/module/components/MessageOverlay/OverlayReactionList.js +12 -11
  572. package/lib/module/components/MessageOverlay/OverlayReactionList.js.map +1 -1
  573. package/lib/module/components/MessageOverlay/OverlayReactions.js +31 -34
  574. package/lib/module/components/MessageOverlay/OverlayReactions.js.map +1 -1
  575. package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js +41 -0
  576. package/lib/module/components/MessageOverlay/OverlayReactionsAvatar.js.map +1 -0
  577. package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js +37 -0
  578. package/lib/module/components/MessageOverlay/hooks/useMessageActionAnimation.js.map +1 -0
  579. package/lib/module/components/Reply/Reply.js +25 -19
  580. package/lib/module/components/Reply/Reply.js.map +1 -1
  581. package/lib/module/components/Thread/Thread.js +11 -2
  582. package/lib/module/components/Thread/Thread.js.map +1 -1
  583. package/lib/module/components/Thread/components/ThreadFooterComponent.js +20 -12
  584. package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  585. package/lib/module/components/docs/ListProps.md +1 -1
  586. package/lib/module/components/docs/data.js +1 -1
  587. package/lib/module/components/index.js +133 -55
  588. package/lib/module/components/index.js.map +1 -1
  589. package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js +68 -0
  590. package/lib/module/contexts/activeChannelsRefContext/ActiveChannelsRefContext.js.map +1 -0
  591. package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js +2 -2
  592. package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
  593. package/lib/module/contexts/channelContext/ChannelContext.js +2 -2
  594. package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
  595. package/lib/module/contexts/channelsContext/ChannelsContext.js +2 -2
  596. package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
  597. package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js +155 -0
  598. package/lib/module/contexts/channelsStateContext/ChannelsStateContext.js.map +1 -0
  599. package/lib/module/contexts/channelsStateContext/useChannelState.js +144 -0
  600. package/lib/module/contexts/channelsStateContext/useChannelState.js.map +1 -0
  601. package/lib/module/contexts/chatContext/ChatContext.js +2 -2
  602. package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
  603. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +2 -2
  604. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  605. package/lib/module/contexts/keyboardContext/KeyboardContext.js +2 -2
  606. package/lib/module/contexts/keyboardContext/KeyboardContext.js.map +1 -1
  607. package/lib/module/contexts/messageContext/MessageContext.js +2 -2
  608. package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
  609. package/lib/module/contexts/messageInputContext/MessageInputContext.js +122 -84
  610. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  611. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +9 -5
  612. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  613. package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js +10 -3
  614. package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  615. package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +5 -19
  616. package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
  617. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js +36 -0
  618. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.js.map +1 -0
  619. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js +105 -0
  620. package/lib/module/contexts/messageOverlayContext/hooks/useResettableState.test.js.map +1 -0
  621. package/lib/module/contexts/messagesContext/MessagesContext.js +2 -2
  622. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  623. package/lib/module/contexts/overlayContext/OverlayContext.js +1 -1
  624. package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
  625. package/lib/module/contexts/overlayContext/OverlayProvider.js +55 -46
  626. package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
  627. package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js +61 -0
  628. package/lib/module/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.js.map +1 -0
  629. package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js +2 -2
  630. package/lib/module/contexts/paginatedMessageListContext/PaginatedMessageListContext.js.map +1 -1
  631. package/lib/module/contexts/suggestionsContext/SuggestionsContext.js +20 -33
  632. package/lib/module/contexts/suggestionsContext/SuggestionsContext.js.map +1 -1
  633. package/lib/module/contexts/themeContext/ThemeContext.js +2 -2
  634. package/lib/module/contexts/themeContext/ThemeContext.js.map +1 -1
  635. package/lib/module/contexts/themeContext/utils/theme.js +45 -20
  636. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  637. package/lib/module/contexts/threadContext/ThreadContext.js +2 -2
  638. package/lib/module/contexts/threadContext/ThreadContext.js.map +1 -1
  639. package/lib/module/contexts/translationContext/TranslationContext.js +1 -1
  640. package/lib/module/contexts/translationContext/TranslationContext.js.map +1 -1
  641. package/lib/module/contexts/typingContext/TypingContext.js +2 -2
  642. package/lib/module/contexts/typingContext/TypingContext.js.map +1 -1
  643. package/lib/module/contexts/utils/getDisplayName.js.map +1 -1
  644. package/lib/module/emoji-data/compiled.js +0 -315
  645. package/lib/module/emoji-data/compiled.js.map +1 -1
  646. package/lib/module/emoji-data/emojiNames.js +0 -105
  647. package/lib/module/emoji-data/emojiNames.js.map +1 -1
  648. package/lib/module/emoji-data/emojis.js +0 -175
  649. package/lib/module/emoji-data/emojis.js.map +1 -1
  650. package/lib/module/emoji-data/index.js +2 -2
  651. package/lib/module/emoji-data/index.js.map +1 -1
  652. package/lib/module/hooks/useStreami18n.js.map +1 -1
  653. package/lib/module/i18n/en.json +9 -3
  654. package/lib/module/i18n/fr.json +9 -3
  655. package/lib/module/i18n/hi.json +9 -3
  656. package/lib/module/i18n/it.json +9 -3
  657. package/lib/module/i18n/ja.json +9 -0
  658. package/lib/module/i18n/ko.json +9 -0
  659. package/lib/module/i18n/nl.json +9 -3
  660. package/lib/module/i18n/ru.json +9 -3
  661. package/lib/module/i18n/tr.json +10 -4
  662. package/lib/module/icons/Pin.js +42 -0
  663. package/lib/module/icons/Pin.js.map +1 -0
  664. package/lib/module/icons/PinHeader.js +38 -0
  665. package/lib/module/icons/PinHeader.js.map +1 -0
  666. package/lib/module/icons/Unpin.js +38 -0
  667. package/lib/module/icons/Unpin.js.map +1 -0
  668. package/lib/module/icons/index.js +39 -26
  669. package/lib/module/icons/index.js.map +1 -1
  670. package/lib/module/icons/utils/base.js +1 -1
  671. package/lib/module/index.js +6 -6
  672. package/lib/module/mock-builders/api/error.js +1 -1
  673. package/lib/module/mock-builders/api/sendMessage.js +4 -1
  674. package/lib/module/mock-builders/api/sendMessage.js.map +1 -1
  675. package/lib/module/mock-builders/generator/attachment.js +1 -3
  676. package/lib/module/mock-builders/generator/attachment.js.map +1 -1
  677. package/lib/module/mock-builders/generator/channel.js +101 -50
  678. package/lib/module/mock-builders/generator/channel.js.map +1 -1
  679. package/lib/module/mock-builders/generator/user.js +32 -33
  680. package/lib/module/mock-builders/generator/user.js.map +1 -1
  681. package/lib/module/mock-builders/mock.js +3 -3
  682. package/lib/module/mock-builders/mock.js.map +1 -1
  683. package/lib/module/native.js +1 -7
  684. package/lib/module/native.js.map +1 -1
  685. package/lib/module/styleguideComponents/ArgumentsRenderer.js +7 -7
  686. package/lib/module/styleguideComponents/ArgumentsRenderer.js.map +1 -1
  687. package/lib/module/styleguideComponents/JsDoc.js +4 -4
  688. package/lib/module/styleguideComponents/JsDoc.js.map +1 -1
  689. package/lib/module/styleguideComponents/PathlineRenderer.js +7 -7
  690. package/lib/module/styleguideComponents/PathlineRenderer.js.map +1 -1
  691. package/lib/module/styleguideComponents/PropsRenderer.js +25 -25
  692. package/lib/module/styleguideComponents/PropsRenderer.js.map +1 -1
  693. package/lib/module/styleguideComponents/Wrapper.js +1 -1
  694. package/lib/module/styleguideComponents/Wrapper.js.map +1 -1
  695. package/lib/module/utils/Streami18n.js.map +1 -1
  696. package/lib/module/utils/date.js +13 -0
  697. package/lib/module/utils/date.js.map +1 -0
  698. package/lib/module/utils/getResizedImageUrl.js +26 -0
  699. package/lib/module/utils/getResizedImageUrl.js.map +1 -0
  700. package/lib/module/utils/getUrlOfImageAttachment.js +9 -0
  701. package/lib/module/utils/getUrlOfImageAttachment.js.map +1 -0
  702. package/lib/module/utils/utils.js +17 -9
  703. package/lib/module/utils/utils.js.map +1 -1
  704. package/lib/module/version.json +1 -1
  705. package/lib/typescript/components/Attachment/Attachment.d.ts +1 -1
  706. package/lib/typescript/components/Attachment/AttachmentActions.d.ts +1 -1
  707. package/lib/typescript/components/Attachment/Card.d.ts +3 -1
  708. package/lib/typescript/components/Attachment/FileAttachment.d.ts +1 -1
  709. package/lib/typescript/components/Attachment/Gallery.d.ts +4 -6
  710. package/lib/typescript/components/Attachment/Giphy.d.ts +1 -1
  711. package/lib/typescript/components/Attachment/utils/buildGallery/buildGallery.d.ts +23 -0
  712. package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.d.ts +7 -0
  713. package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.d.ts +7 -0
  714. package/lib/typescript/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.d.ts +7 -0
  715. package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnail.d.ts +10 -0
  716. package/lib/typescript/components/Attachment/utils/buildGallery/buildThumbnailGrid.d.ts +137 -0
  717. package/lib/typescript/components/Attachment/utils/buildGallery/types.d.ts +23 -0
  718. package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +9 -0
  719. package/lib/typescript/components/Attachment/utils/getGalleryImageBorderRadius.d.ts +22 -0
  720. package/lib/typescript/components/AutoCompleteInput/AutoCompleteInput.d.ts +7 -1
  721. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.d.ts +4 -0
  722. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionHeader.d.ts +8 -0
  723. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionItem.d.ts +10 -0
  724. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +21 -0
  725. package/lib/typescript/components/Channel/Channel.d.ts +13 -12
  726. package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +1 -1
  727. package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -68
  728. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -126
  729. package/lib/typescript/components/Channel/hooks/useCreateOwnCapabilitiesContext.d.ts +7 -0
  730. package/lib/typescript/components/ChannelList/ChannelList.d.ts +1 -1
  731. package/lib/typescript/components/ChannelList/hooks/usePaginatedChannels.d.ts +4 -2
  732. package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +2 -2
  733. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessenger.d.ts +2 -2
  734. package/lib/typescript/components/ChannelPreview/ChannelPreviewMutedStatus.d.ts +9 -0
  735. package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts +12 -0
  736. package/lib/typescript/components/Chat/Chat.d.ts +1 -1
  737. package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +4 -1
  738. package/lib/typescript/components/ImageGallery/components/AnimatedGalleryImage.d.ts +1 -1
  739. package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +1 -1
  740. package/lib/typescript/components/ImageGallery/components/ImageGalleryHeader.d.ts +1 -1
  741. package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +1 -1
  742. package/lib/typescript/components/Indicators/LoadingErrorIndicator.d.ts +1 -1
  743. package/lib/typescript/components/Message/Message.d.ts +4 -3
  744. package/lib/typescript/components/Message/MessageSimple/MessageAvatar.d.ts +1 -1
  745. package/lib/typescript/components/Message/MessageSimple/MessageContent.d.ts +1 -1
  746. package/lib/typescript/components/Message/MessageSimple/MessageDeleted.d.ts +2 -2
  747. package/lib/typescript/components/Message/MessageSimple/MessageFooter.d.ts +2 -2
  748. package/lib/typescript/components/Message/MessageSimple/MessagePinnedHeader.d.ts +8 -0
  749. package/lib/typescript/components/Message/MessageSimple/MessageSimple.d.ts +1 -1
  750. package/lib/typescript/components/Message/MessageSimple/MessageStatus.d.ts +1 -1
  751. package/lib/typescript/components/Message/MessageSimple/MessageTextContainer.d.ts +1 -0
  752. package/lib/typescript/components/Message/MessageSimple/ReactionList.d.ts +2 -1
  753. package/lib/typescript/components/Message/MessageSimple/utils/parseLinks.d.ts +7 -0
  754. package/lib/typescript/components/Message/MessageSimple/utils/parseLinks.test.d.ts +1 -0
  755. package/lib/typescript/components/Message/MessageSimple/utils/renderText.d.ts +18 -3
  756. package/lib/typescript/components/Message/MessageSimple/utils/renderText.test.d.ts +1 -0
  757. package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
  758. package/lib/typescript/components/Message/hooks/useMessageActionHandlers.d.ts +15 -0
  759. package/lib/typescript/components/Message/hooks/useMessageActions.d.ts +26 -0
  760. package/lib/typescript/components/Message/utils/messageActions.d.ts +22 -21
  761. package/lib/typescript/components/Message/utils/removeReservedFields.d.ts +1 -1
  762. package/lib/typescript/components/MessageInput/AttachButton.d.ts +1 -1
  763. package/lib/typescript/components/MessageInput/CommandsButton.d.ts +1 -1
  764. package/lib/typescript/components/MessageInput/CooldownTimer.d.ts +10 -0
  765. package/lib/typescript/components/MessageInput/InputButtons.d.ts +1 -1
  766. package/lib/typescript/components/MessageInput/MessageInput.d.ts +1 -1
  767. package/lib/typescript/components/MessageInput/MoreOptionsButton.d.ts +1 -1
  768. package/lib/typescript/components/MessageInput/SendMessageDisallowedIndicator.d.ts +1 -0
  769. package/lib/typescript/components/MessageInput/hooks/useCooldown.d.ts +9 -0
  770. package/lib/typescript/components/MessageInput/hooks/useCountdown.d.ts +8 -0
  771. package/lib/typescript/components/MessageList/MessageList.d.ts +2 -1
  772. package/lib/typescript/components/MessageList/MessageSystem.d.ts +1 -1
  773. package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +1 -0
  774. package/lib/typescript/components/MessageList/utils/getGroupStyles.d.ts +1 -1
  775. package/lib/typescript/components/MessageOverlay/MessageActionList.d.ts +12 -0
  776. package/lib/typescript/components/MessageOverlay/MessageActionListItem.d.ts +20 -0
  777. package/lib/typescript/components/MessageOverlay/MessageOverlay.d.ts +4 -4
  778. package/lib/typescript/components/MessageOverlay/OverlayBackdrop.d.ts +6 -0
  779. package/lib/typescript/components/MessageOverlay/OverlayReactions.d.ts +3 -1
  780. package/lib/typescript/components/MessageOverlay/OverlayReactionsAvatar.d.ts +7 -0
  781. package/lib/typescript/components/MessageOverlay/hooks/useMessageActionAnimation.d.ts +12 -0
  782. package/lib/typescript/components/Reply/Reply.d.ts +1 -1
  783. package/lib/typescript/components/Thread/Thread.d.ts +2 -2
  784. package/lib/typescript/components/index.d.ts +13 -7
  785. package/lib/typescript/contexts/activeChannelsRefContext/ActiveChannelsRefContext.d.ts +9 -0
  786. package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +28 -30
  787. package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +13 -5
  788. package/lib/typescript/contexts/channelsStateContext/ChannelsStateContext.d.ts +41 -0
  789. package/lib/typescript/contexts/channelsStateContext/useChannelState.d.ts +20 -0
  790. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +2 -6
  791. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +21 -10
  792. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +3 -3
  793. package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +1 -1
  794. package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +12 -13
  795. package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.d.ts +12 -0
  796. package/lib/typescript/contexts/messageOverlayContext/hooks/useResettableState.test.d.ts +1 -0
  797. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +23 -114
  798. package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +14 -7
  799. package/lib/typescript/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.d.ts +25 -0
  800. package/lib/typescript/contexts/suggestionsContext/SuggestionsContext.d.ts +14 -13
  801. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +41 -16
  802. package/lib/typescript/contexts/utils/getDisplayName.d.ts +2 -2
  803. package/lib/typescript/hooks/useStreami18n.d.ts +1 -1
  804. package/lib/typescript/i18n/en.json +9 -3
  805. package/lib/typescript/i18n/fr.json +9 -3
  806. package/lib/typescript/i18n/hi.json +9 -3
  807. package/lib/typescript/i18n/it.json +9 -3
  808. package/lib/typescript/i18n/ja.json +9 -0
  809. package/lib/typescript/i18n/ko.json +9 -0
  810. package/lib/typescript/i18n/nl.json +9 -3
  811. package/lib/typescript/i18n/ru.json +9 -3
  812. package/lib/typescript/i18n/tr.json +10 -4
  813. package/lib/typescript/icons/{Left.d.ts → Pin.d.ts} +1 -1
  814. package/lib/typescript/icons/PinHeader.d.ts +3 -0
  815. package/lib/typescript/icons/{Right.d.ts → Unpin.d.ts} +1 -1
  816. package/lib/typescript/icons/index.d.ts +3 -2
  817. package/lib/typescript/native.d.ts +1 -9
  818. package/lib/typescript/utils/Streami18n.d.ts +11 -8
  819. package/lib/typescript/utils/date.d.ts +2 -0
  820. package/lib/typescript/utils/getResizedImageUrl.d.ts +19 -0
  821. package/lib/typescript/utils/getUrlOfImageAttachment.d.ts +7 -0
  822. package/lib/typescript/utils/utils.d.ts +14 -11
  823. package/package.json +12 -14
  824. package/src/components/Attachment/Attachment.tsx +3 -3
  825. package/src/components/Attachment/AttachmentActions.tsx +2 -2
  826. package/src/components/Attachment/Card.tsx +8 -5
  827. package/src/components/Attachment/FileAttachment.tsx +3 -4
  828. package/src/components/Attachment/FileIcon.tsx +2 -2
  829. package/src/components/Attachment/Gallery.tsx +164 -193
  830. package/src/components/Attachment/Giphy.tsx +67 -70
  831. package/src/components/Attachment/__tests__/Attachment.test.js +22 -14
  832. package/src/components/Attachment/__tests__/Gallery.test.js +233 -0
  833. package/src/components/Attachment/__tests__/buildGallery.test.js +131 -0
  834. package/src/components/Attachment/utils/buildGallery/buildGallery.ts +75 -0
  835. package/src/components/Attachment/utils/buildGallery/buildGalleryOfSingleImage.ts +95 -0
  836. package/src/components/Attachment/utils/buildGallery/buildGalleryOfThreeImages.ts +99 -0
  837. package/src/components/Attachment/utils/buildGallery/buildGalleryOfTwoImages.ts +64 -0
  838. package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +46 -0
  839. package/src/components/Attachment/utils/buildGallery/buildThumbnailGrid.ts +186 -0
  840. package/src/components/Attachment/utils/buildGallery/types.ts +27 -0
  841. package/src/components/Attachment/utils/getAspectRatio.ts +21 -0
  842. package/src/components/Attachment/utils/getGalleryImageBorderRadius.ts +71 -0
  843. package/src/components/AttachmentPicker/AttachmentPicker.tsx +4 -2
  844. package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +43 -28
  845. package/src/components/AutoCompleteInput/{CommandsItem.tsx → AutoCompleteSuggestionCommandIcon.tsx} +3 -57
  846. package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +109 -0
  847. package/src/components/AutoCompleteInput/AutoCompleteSuggestionItem.tsx +156 -0
  848. package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +212 -0
  849. package/src/components/AutoCompleteInput/__tests__/AutoCompleteInput.test.js +6 -12
  850. package/src/components/Avatar/Avatar.tsx +7 -10
  851. package/src/components/Avatar/GroupAvatar.tsx +7 -21
  852. package/src/components/Avatar/__tests__/Avatar.test.js +2 -30
  853. package/src/components/Channel/Channel.tsx +288 -232
  854. package/src/components/Channel/__tests__/Channel.test.js +34 -29
  855. package/src/components/Channel/__tests__/ownCapabilities.test.js +376 -0
  856. package/src/components/Channel/hooks/useCreateChannelContext.ts +6 -6
  857. package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +4 -3
  858. package/src/components/Channel/hooks/useCreateMessagesContext.ts +9 -30
  859. package/src/components/Channel/hooks/useCreateOwnCapabilitiesContext.ts +54 -0
  860. package/src/components/ChannelList/ChannelList.tsx +8 -9
  861. package/src/components/ChannelList/ChannelListFooterLoadingIndicator.tsx +2 -3
  862. package/src/components/ChannelList/ChannelListHeaderErrorIndicator.tsx +3 -7
  863. package/src/components/ChannelList/ChannelListHeaderNetworkDownIndicator.tsx +5 -2
  864. package/src/components/ChannelList/ChannelListMessenger.tsx +3 -4
  865. package/src/components/ChannelList/__tests__/ChannelList.test.js +73 -13
  866. package/src/components/ChannelList/__tests__/ChannelListMessenger.test.js +11 -12
  867. package/src/components/ChannelList/hooks/listeners/useAddedToChannelNotification.ts +3 -3
  868. package/src/components/ChannelList/hooks/listeners/useChannelDeleted.ts +2 -2
  869. package/src/components/ChannelList/hooks/listeners/useChannelHidden.ts +2 -2
  870. package/src/components/ChannelList/hooks/listeners/useChannelTruncated.ts +2 -2
  871. package/src/components/ChannelList/hooks/listeners/useChannelUpdated.ts +2 -2
  872. package/src/components/ChannelList/hooks/listeners/useChannelVisible.ts +3 -3
  873. package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +2 -3
  874. package/src/components/ChannelList/hooks/listeners/useNewMessageNotification.ts +4 -4
  875. package/src/components/ChannelList/hooks/listeners/useRemovedFromChannelNotification.ts +2 -2
  876. package/src/components/ChannelList/hooks/listeners/useUserPresence.ts +2 -2
  877. package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +1 -2
  878. package/src/components/ChannelList/hooks/usePaginatedChannels.ts +86 -44
  879. package/src/components/ChannelPreview/ChannelAvatar.tsx +3 -5
  880. package/src/components/ChannelPreview/ChannelPreview.tsx +3 -3
  881. package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +2 -2
  882. package/src/components/ChannelPreview/ChannelPreviewMessenger.tsx +27 -11
  883. package/src/components/ChannelPreview/ChannelPreviewMutedStatus.tsx +71 -0
  884. package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +4 -3
  885. package/src/components/ChannelPreview/ChannelPreviewTitle.tsx +2 -2
  886. package/src/components/ChannelPreview/ChannelPreviewUnreadCount.tsx +2 -1
  887. package/src/components/ChannelPreview/__tests__/ChannelPreview.test.js +8 -9
  888. package/src/components/ChannelPreview/__tests__/ChannelPreviewMessenger.test.js +8 -9
  889. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.ts +8 -2
  890. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +3 -4
  891. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayPresence.ts +2 -2
  892. package/src/components/ChannelPreview/hooks/useLatestMessagePreview.ts +4 -3
  893. package/src/components/Chat/Chat.tsx +6 -6
  894. package/src/components/Chat/__tests__/Chat.test.js +10 -6
  895. package/src/components/Chat/hooks/useIsOnline.ts +12 -8
  896. package/src/components/ImageGallery/ImageGallery.tsx +83 -49
  897. package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +1 -2
  898. package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +2 -5
  899. package/src/components/ImageGallery/components/ImageGalleryHeader.tsx +5 -7
  900. package/src/components/ImageGallery/components/ImageGrid.tsx +4 -5
  901. package/src/components/ImageGallery/components/ImageGridHandle.tsx +1 -0
  902. package/src/components/Indicators/LoadingErrorIndicator.tsx +1 -1
  903. package/src/components/Indicators/LoadingIndicator.tsx +1 -2
  904. package/src/components/Message/Message.tsx +155 -594
  905. package/src/components/Message/MessageSimple/MessageAvatar.tsx +1 -2
  906. package/src/components/Message/MessageSimple/MessageContent.tsx +23 -25
  907. package/src/components/Message/MessageSimple/MessageDeleted.tsx +8 -6
  908. package/src/components/Message/MessageSimple/MessageFooter.tsx +45 -27
  909. package/src/components/Message/MessageSimple/MessagePinnedHeader.tsx +150 -0
  910. package/src/components/Message/MessageSimple/MessageReplies.tsx +5 -0
  911. package/src/components/Message/MessageSimple/MessageRepliesAvatars.tsx +2 -3
  912. package/src/components/Message/MessageSimple/MessageSimple.tsx +47 -26
  913. package/src/components/Message/MessageSimple/MessageStatus.tsx +19 -34
  914. package/src/components/Message/MessageSimple/MessageTextContainer.tsx +5 -0
  915. package/src/components/Message/MessageSimple/ReactionList.tsx +64 -77
  916. package/src/components/Message/MessageSimple/__tests__/Message.test.js +9 -10
  917. package/src/components/Message/MessageSimple/__tests__/MessageAvatar.test.js +2 -2
  918. package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +40 -47
  919. package/src/components/Message/MessageSimple/__tests__/MessagePinnedHeader.test.js +53 -0
  920. package/src/components/Message/MessageSimple/__tests__/MessageReplies.test.js +2 -2
  921. package/src/components/Message/MessageSimple/__tests__/MessageStatus.test.js +4 -5
  922. package/src/components/Message/MessageSimple/__tests__/MessageTextContainer.test.js +2 -2
  923. package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageAvatar.test.js.snap +1 -1
  924. package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessagePinnedHeader.test.js.snap +80 -0
  925. package/src/components/Message/MessageSimple/utils/parseLinks.test.ts +100 -0
  926. package/src/components/Message/MessageSimple/utils/parseLinks.ts +95 -0
  927. package/src/components/Message/MessageSimple/utils/renderText.test.tsx +70 -0
  928. package/src/components/Message/MessageSimple/utils/renderText.tsx +98 -58
  929. package/src/components/Message/hooks/useCreateMessageContext.ts +1 -7
  930. package/src/components/Message/hooks/useMessageActionHandlers.ts +172 -0
  931. package/src/components/Message/hooks/useMessageActions.tsx +386 -0
  932. package/src/components/Message/utils/messageActions.ts +64 -38
  933. package/src/components/Message/utils/removeReservedFields.ts +1 -1
  934. package/src/components/MessageInput/AttachButton.tsx +1 -2
  935. package/src/components/MessageInput/CommandsButton.tsx +1 -2
  936. package/src/components/MessageInput/CooldownTimer.tsx +67 -0
  937. package/src/components/MessageInput/FileUploadPreview.tsx +5 -5
  938. package/src/components/MessageInput/ImageUploadPreview.tsx +3 -4
  939. package/src/components/MessageInput/InputButtons.tsx +4 -10
  940. package/src/components/MessageInput/MessageInput.tsx +62 -35
  941. package/src/components/MessageInput/MoreOptionsButton.tsx +1 -2
  942. package/src/components/MessageInput/SendMessageDisallowedIndicator.tsx +47 -0
  943. package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +2 -2
  944. package/src/components/MessageInput/__tests__/AttachButton.test.js +2 -2
  945. package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +43 -45
  946. package/src/components/MessageInput/__tests__/ImageUploadPreview.test.js +15 -15
  947. package/src/components/MessageInput/__tests__/MessageInput.test.js +15 -23
  948. package/src/components/MessageInput/__tests__/SendButton.test.js +2 -2
  949. package/src/components/MessageInput/__tests__/UploadProgressIndicator.test.js +2 -2
  950. package/src/components/MessageInput/__tests__/__snapshots__/FileUploadPreview.test.js.snap +3593 -2889
  951. package/src/components/MessageInput/__tests__/__snapshots__/ImageUploadPreview.test.js.snap +1912 -1572
  952. package/src/components/MessageInput/__tests__/__snapshots__/MessageInput.test.js.snap +539 -296
  953. package/src/components/MessageInput/__tests__/__snapshots__/UploadProgressIndicator.test.js.snap +4 -4
  954. package/src/components/MessageInput/hooks/useCooldown.ts +62 -0
  955. package/src/components/MessageInput/hooks/useCountdown.ts +48 -0
  956. package/src/components/MessageList/DateHeader.tsx +2 -2
  957. package/src/components/MessageList/InlineDateSeparator.tsx +2 -2
  958. package/src/components/MessageList/MessageList.tsx +63 -39
  959. package/src/components/MessageList/MessageSystem.tsx +2 -2
  960. package/src/components/MessageList/TypingIndicator.tsx +1 -2
  961. package/src/components/MessageList/__tests__/MessageList.test.js +241 -116
  962. package/src/components/MessageList/__tests__/MessageSystem.test.js +3 -3
  963. package/src/components/MessageList/__tests__/ScrollToBottomButton.test.js +3 -3
  964. package/src/components/MessageList/__tests__/TypingIndicator.test.js +5 -6
  965. package/src/components/MessageList/__tests__/__snapshots__/TypingIndicator.test.js.snap +1 -1
  966. package/src/components/MessageList/hooks/useMessageList.ts +19 -9
  967. package/src/components/MessageList/hooks/useTypingString.ts +1 -2
  968. package/src/components/MessageList/utils/getDateSeparators.ts +4 -3
  969. package/src/components/MessageList/utils/getGroupStyles.ts +14 -9
  970. package/src/components/MessageList/utils/getLastReceivedMessage.ts +6 -1
  971. package/src/components/MessageOverlay/{MessageActions.tsx → MessageActionList.tsx} +59 -91
  972. package/src/components/MessageOverlay/MessageActionListItem.tsx +113 -0
  973. package/src/components/MessageOverlay/MessageOverlay.tsx +258 -217
  974. package/src/components/MessageOverlay/OverlayBackdrop.tsx +18 -0
  975. package/src/components/MessageOverlay/OverlayReactionList.tsx +3 -5
  976. package/src/components/MessageOverlay/OverlayReactions.tsx +27 -8
  977. package/src/components/MessageOverlay/OverlayReactionsAvatar.tsx +27 -0
  978. package/src/components/MessageOverlay/hooks/useMessageActionAnimation.tsx +44 -0
  979. package/src/components/Reply/Reply.tsx +25 -15
  980. package/src/components/Thread/Thread.tsx +13 -6
  981. package/src/components/Thread/__tests__/Thread.test.js +38 -113
  982. package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +1085 -1018
  983. package/src/components/Thread/components/ThreadFooterComponent.tsx +14 -3
  984. package/src/components/docs/ListProps.md +1 -1
  985. package/src/components/index.ts +13 -7
  986. package/src/contexts/activeChannelsRefContext/ActiveChannelsRefContext.tsx +32 -0
  987. package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +1 -2
  988. package/src/contexts/channelContext/ChannelContext.tsx +28 -32
  989. package/src/contexts/channelsContext/ChannelsContext.tsx +18 -7
  990. package/src/contexts/channelsStateContext/ChannelsStateContext.tsx +286 -0
  991. package/src/contexts/channelsStateContext/useChannelState.ts +207 -0
  992. package/src/contexts/chatContext/ChatContext.tsx +1 -2
  993. package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +1 -2
  994. package/src/contexts/keyboardContext/KeyboardContext.tsx +1 -2
  995. package/src/contexts/messageContext/MessageContext.tsx +2 -10
  996. package/src/contexts/messageInputContext/MessageInputContext.tsx +77 -36
  997. package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +9 -7
  998. package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +15 -10
  999. package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +19 -28
  1000. package/src/contexts/messageOverlayContext/hooks/useResettableState.test.tsx +46 -0
  1001. package/src/contexts/messageOverlayContext/hooks/useResettableState.ts +22 -0
  1002. package/src/contexts/messagesContext/MessagesContext.tsx +39 -140
  1003. package/src/contexts/overlayContext/OverlayContext.tsx +19 -11
  1004. package/src/contexts/overlayContext/OverlayProvider.tsx +48 -42
  1005. package/src/contexts/ownCapabilitiesContext/OwnCapabilitiesContext.tsx +38 -0
  1006. package/src/contexts/paginatedMessageListContext/PaginatedMessageListContext.tsx +1 -2
  1007. package/src/contexts/suggestionsContext/SuggestionsContext.tsx +26 -46
  1008. package/src/contexts/suggestionsContext/__tests__/Suggestions.test.js +1 -1
  1009. package/src/contexts/themeContext/ThemeContext.tsx +1 -0
  1010. package/src/contexts/themeContext/utils/theme.ts +84 -35
  1011. package/src/contexts/threadContext/ThreadContext.tsx +1 -2
  1012. package/src/contexts/translationContext/TranslationContext.tsx +3 -3
  1013. package/src/contexts/typingContext/TypingContext.tsx +1 -2
  1014. package/src/contexts/utils/getDisplayName.ts +3 -1
  1015. package/src/emoji-data/compiled.ts +1830 -9609
  1016. package/src/emoji-data/emojiNames.ts +0 -140
  1017. package/src/emoji-data/emojis.ts +0 -210
  1018. package/src/emoji-data/index.js +1 -1
  1019. package/src/hooks/useStreami18n.ts +1 -1
  1020. package/src/i18n/en.json +9 -3
  1021. package/src/i18n/fr.json +9 -3
  1022. package/src/i18n/hi.json +9 -3
  1023. package/src/i18n/it.json +9 -3
  1024. package/src/i18n/ja.json +9 -0
  1025. package/src/i18n/ko.json +9 -0
  1026. package/src/i18n/nl.json +9 -3
  1027. package/src/i18n/ru.json +9 -3
  1028. package/src/i18n/tr.json +10 -4
  1029. package/src/icons/Pin.tsx +17 -0
  1030. package/src/icons/PinHeader.tsx +12 -0
  1031. package/src/icons/Unpin.tsx +12 -0
  1032. package/src/icons/index.ts +3 -2
  1033. package/src/mock-builders/api/sendMessage.js +3 -1
  1034. package/src/mock-builders/generator/attachment.js +0 -2
  1035. package/src/mock-builders/generator/channel.js +101 -46
  1036. package/src/mock-builders/generator/user.js +33 -26
  1037. package/src/mock-builders/mock.js +2 -2
  1038. package/src/native.ts +2 -13
  1039. package/src/styleguideComponents/ArgumentsRenderer.tsx +2 -1
  1040. package/src/styleguideComponents/JsDoc.tsx +3 -1
  1041. package/src/styleguideComponents/PathlineRenderer.tsx +2 -1
  1042. package/src/styleguideComponents/PropsRenderer.tsx +7 -4
  1043. package/src/styleguideComponents/Wrapper.tsx +1 -0
  1044. package/src/utils/Streami18n.ts +3 -3
  1045. package/src/utils/__tests__/Streami18n.test.js +1 -2
  1046. package/src/utils/date.ts +4 -0
  1047. package/src/utils/getResizedImageUrl.ts +43 -0
  1048. package/src/utils/getUrlOfImageAttachment.ts +10 -0
  1049. package/src/utils/utils.ts +23 -16
  1050. package/src/version.json +1 -1
  1051. package/lib/commonjs/components/AutoCompleteInput/CommandsHeader.js +0 -78
  1052. package/lib/commonjs/components/AutoCompleteInput/CommandsHeader.js.map +0 -1
  1053. package/lib/commonjs/components/AutoCompleteInput/CommandsItem.js.map +0 -1
  1054. package/lib/commonjs/components/AutoCompleteInput/EmojisHeader.js +0 -81
  1055. package/lib/commonjs/components/AutoCompleteInput/EmojisHeader.js.map +0 -1
  1056. package/lib/commonjs/components/AutoCompleteInput/EmojisItem.js +0 -75
  1057. package/lib/commonjs/components/AutoCompleteInput/EmojisItem.js.map +0 -1
  1058. package/lib/commonjs/components/AutoCompleteInput/MentionsItem.js +0 -125
  1059. package/lib/commonjs/components/AutoCompleteInput/MentionsItem.js.map +0 -1
  1060. package/lib/commonjs/components/AutoCompleteInput/SuggestionsList.js +0 -199
  1061. package/lib/commonjs/components/AutoCompleteInput/SuggestionsList.js.map +0 -1
  1062. package/lib/commonjs/components/MessageOverlay/MessageActions.js.map +0 -1
  1063. package/lib/commonjs/icons/Left.js +0 -38
  1064. package/lib/commonjs/icons/Left.js.map +0 -1
  1065. package/lib/commonjs/icons/Right.js +0 -38
  1066. package/lib/commonjs/icons/Right.js.map +0 -1
  1067. package/lib/module/components/AutoCompleteInput/CommandsHeader.js +0 -78
  1068. package/lib/module/components/AutoCompleteInput/CommandsHeader.js.map +0 -1
  1069. package/lib/module/components/AutoCompleteInput/CommandsItem.js.map +0 -1
  1070. package/lib/module/components/AutoCompleteInput/EmojisHeader.js +0 -81
  1071. package/lib/module/components/AutoCompleteInput/EmojisHeader.js.map +0 -1
  1072. package/lib/module/components/AutoCompleteInput/EmojisItem.js +0 -75
  1073. package/lib/module/components/AutoCompleteInput/EmojisItem.js.map +0 -1
  1074. package/lib/module/components/AutoCompleteInput/MentionsItem.js +0 -125
  1075. package/lib/module/components/AutoCompleteInput/MentionsItem.js.map +0 -1
  1076. package/lib/module/components/AutoCompleteInput/SuggestionsList.js +0 -199
  1077. package/lib/module/components/AutoCompleteInput/SuggestionsList.js.map +0 -1
  1078. package/lib/module/components/MessageOverlay/MessageActions.js.map +0 -1
  1079. package/lib/module/icons/Left.js +0 -38
  1080. package/lib/module/icons/Left.js.map +0 -1
  1081. package/lib/module/icons/Right.js +0 -38
  1082. package/lib/module/icons/Right.js.map +0 -1
  1083. package/lib/typescript/components/AutoCompleteInput/CommandsHeader.d.ts +0 -2
  1084. package/lib/typescript/components/AutoCompleteInput/CommandsItem.d.ts +0 -15
  1085. package/lib/typescript/components/AutoCompleteInput/EmojisHeader.d.ts +0 -5
  1086. package/lib/typescript/components/AutoCompleteInput/EmojisItem.d.ts +0 -12
  1087. package/lib/typescript/components/AutoCompleteInput/MentionsItem.d.ts +0 -16
  1088. package/lib/typescript/components/AutoCompleteInput/SuggestionsList.d.ts +0 -13
  1089. package/lib/typescript/components/MessageOverlay/MessageActions.d.ts +0 -11
  1090. package/src/components/AutoCompleteInput/CommandsHeader.tsx +0 -43
  1091. package/src/components/AutoCompleteInput/EmojisHeader.tsx +0 -45
  1092. package/src/components/AutoCompleteInput/EmojisItem.tsx +0 -52
  1093. package/src/components/AutoCompleteInput/MentionsItem.tsx +0 -74
  1094. package/src/components/AutoCompleteInput/SuggestionsList.tsx +0 -138
  1095. package/src/components/AutoCompleteInput/__tests__/CommandsItem.test.js +0 -26
  1096. package/src/components/AutoCompleteInput/__tests__/MentionsItem.test.js +0 -62
  1097. package/src/components/MessageList/__tests__/__snapshots__/MessageList.test.js.snap +0 -936
  1098. package/src/icons/Left.tsx +0 -12
  1099. package/src/icons/Right.tsx +0 -12
@@ -0,0 +1,207 @@
1
+ import { useCallback, useEffect, useMemo } from 'react';
2
+
3
+ import type { Channel as ChannelType } from 'stream-chat';
4
+
5
+ import { useChannelsStateContext } from './ChannelsStateContext';
6
+
7
+ import type { ChannelsStateContextValue, ChannelState, Keys } from './ChannelsStateContext';
8
+
9
+ import type {
10
+ DefaultAttachmentType,
11
+ DefaultChannelType,
12
+ DefaultCommandType,
13
+ DefaultEventType,
14
+ DefaultMessageType,
15
+ DefaultReactionType,
16
+ DefaultUserType,
17
+ UnknownType,
18
+ } from '../../types/types';
19
+
20
+ type StateManagerParams<
21
+ Key extends Keys,
22
+ At extends UnknownType = DefaultAttachmentType,
23
+ Ch extends UnknownType = DefaultChannelType,
24
+ Co extends string = DefaultCommandType,
25
+ Ev extends UnknownType = DefaultEventType,
26
+ Me extends UnknownType = DefaultMessageType,
27
+ Re extends UnknownType = DefaultReactionType,
28
+ Us extends UnknownType = DefaultUserType,
29
+ > = Omit<
30
+ ChannelsStateContextValue<At, Ch, Co, Ev, Me, Re, Us>,
31
+ 'increaseSubscriberCount' | 'decreaseSubscriberCount'
32
+ > & {
33
+ cid: string;
34
+ key: Key;
35
+ };
36
+
37
+ /*
38
+ This hook takes care of creating a useState-like interface which can be used later to call
39
+ updates to the ChannelsStateContext reducer. It receives the cid and key which it wants to update
40
+ and perform the state updates. Also supports a initialState.
41
+ */
42
+ function useStateManager<
43
+ Key extends Keys,
44
+ At extends UnknownType = DefaultAttachmentType,
45
+ Ch extends UnknownType = DefaultChannelType,
46
+ Co extends string = DefaultCommandType,
47
+ Ev extends UnknownType = DefaultEventType,
48
+ Me extends UnknownType = DefaultMessageType,
49
+ Re extends UnknownType = DefaultReactionType,
50
+ Us extends UnknownType = DefaultUserType,
51
+ >(
52
+ {
53
+ cid,
54
+ key,
55
+ setState,
56
+ state,
57
+ }: Omit<
58
+ StateManagerParams<Key, At, Ch, Co, Ev, Me, Re, Us>,
59
+ 'increaseSubscriberCount' | 'decreaseSubscriberCount'
60
+ >,
61
+ initialValue?: ChannelState<At, Ch, Co, Ev, Me, Re, Us>[Key],
62
+ ) {
63
+ const memoizedInitialValue = useMemo(() => initialValue, []);
64
+ const value =
65
+ state[cid]?.[key] || (memoizedInitialValue as ChannelState<At, Ch, Co, Ev, Me, Re, Us>[Key]);
66
+
67
+ const setValue = useCallback(
68
+ (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>[Key]) => setState({ cid, key, value }),
69
+ [cid, key],
70
+ );
71
+
72
+ return [value, setValue] as const;
73
+ }
74
+
75
+ export type UseChannelStateValue<
76
+ At extends UnknownType = DefaultAttachmentType,
77
+ Ch extends UnknownType = DefaultChannelType,
78
+ Co extends string = DefaultCommandType,
79
+ Ev extends UnknownType = DefaultEventType,
80
+ Me extends UnknownType = DefaultMessageType,
81
+ Re extends UnknownType = DefaultReactionType,
82
+ Us extends UnknownType = DefaultUserType,
83
+ > = {
84
+ members: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['members'];
85
+ messages: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['messages'];
86
+ read: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['read'];
87
+ setMembers: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['members']) => void;
88
+ setMessages: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['messages']) => void;
89
+ setRead: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['read']) => void;
90
+ setThreadMessages: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['threadMessages']) => void;
91
+ setTyping: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['typing']) => void;
92
+ setWatcherCount: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['watcherCount']) => void;
93
+ setWatchers: (value: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['watchers']) => void;
94
+ threadMessages: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['threadMessages'];
95
+ typing: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['typing'];
96
+ watcherCount: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['watcherCount'];
97
+ watchers: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['watchers'];
98
+ };
99
+
100
+ export function useChannelState<
101
+ At extends UnknownType = DefaultAttachmentType,
102
+ Ch extends UnknownType = DefaultChannelType,
103
+ Co extends string = DefaultCommandType,
104
+ Ev extends UnknownType = DefaultEventType,
105
+ Me extends UnknownType = DefaultMessageType,
106
+ Re extends UnknownType = DefaultReactionType,
107
+ Us extends UnknownType = DefaultUserType,
108
+ >(
109
+ channel: ChannelType<At, Ch, Co, Ev, Me, Re, Us> | undefined,
110
+ threadId?: string,
111
+ ): UseChannelStateValue<At, Ch, Co, Ev, Me, Re, Us> {
112
+ const cid = channel?.id || 'id'; // in case channel is not initialized, use generic id string for indexing
113
+ const { decreaseSubscriberCount, increaseSubscriberCount, setState, state } =
114
+ useChannelsStateContext<At, Ch, Co, Ev, Me, Re, Us>();
115
+
116
+ // Keeps track of how many Channel components are subscribed to this Channel state (Channel vs Thread concurrency)
117
+ useEffect(() => {
118
+ increaseSubscriberCount({ cid });
119
+ return () => {
120
+ decreaseSubscriberCount({ cid });
121
+ };
122
+ }, []);
123
+
124
+ const [members, setMembers] = useStateManager(
125
+ {
126
+ cid,
127
+ key: 'members',
128
+ setState,
129
+ state,
130
+ },
131
+ {},
132
+ );
133
+
134
+ const [messages, setMessages] = useStateManager(
135
+ {
136
+ cid,
137
+ key: 'messages',
138
+ setState,
139
+ state,
140
+ },
141
+ channel?.state?.messages || [],
142
+ );
143
+
144
+ const [read, setRead] = useStateManager(
145
+ {
146
+ cid,
147
+ key: 'read',
148
+ setState,
149
+ state,
150
+ },
151
+ {},
152
+ );
153
+
154
+ const [typing, setTyping] = useStateManager(
155
+ {
156
+ cid,
157
+ key: 'typing',
158
+ setState,
159
+ state,
160
+ },
161
+ {},
162
+ );
163
+
164
+ const [watcherCount, setWatcherCount] = useStateManager({
165
+ cid,
166
+ key: 'watcherCount',
167
+ setState,
168
+ state,
169
+ });
170
+
171
+ const [watchers, setWatchers] = useStateManager(
172
+ {
173
+ cid,
174
+ key: 'watchers',
175
+ setState,
176
+ state,
177
+ },
178
+ {},
179
+ );
180
+
181
+ const [threadMessages, setThreadMessages] = useStateManager(
182
+ {
183
+ cid,
184
+ key: 'threadMessages',
185
+ setState,
186
+ state,
187
+ },
188
+ (threadId && channel?.state?.threads?.[threadId]) || [],
189
+ );
190
+
191
+ return {
192
+ members,
193
+ messages,
194
+ read,
195
+ setMembers,
196
+ setMessages,
197
+ setRead,
198
+ setThreadMessages,
199
+ setTyping,
200
+ setWatcherCount,
201
+ setWatchers,
202
+ threadMessages,
203
+ typing,
204
+ watcherCount,
205
+ watchers,
206
+ };
207
+ }
@@ -1,7 +1,5 @@
1
1
  import React, { PropsWithChildren, useContext } from 'react';
2
2
 
3
- import { getDisplayName } from '../utils/getDisplayName';
4
-
5
3
  import type { Channel, Mute, StreamChat } from 'stream-chat';
6
4
 
7
5
  import type {
@@ -14,6 +12,7 @@ import type {
14
12
  DefaultUserType,
15
13
  UnknownType,
16
14
  } from '../../types/types';
15
+ import { getDisplayName } from '../utils/getDisplayName';
17
16
 
18
17
  export type ChatContextValue<
19
18
  At extends UnknownType = DefaultAttachmentType,
@@ -1,7 +1,5 @@
1
1
  import React, { PropsWithChildren, useContext, useState } from 'react';
2
2
 
3
- import { getDisplayName } from '../utils/getDisplayName';
4
-
5
3
  import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
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 { getDisplayName } from '../utils/getDisplayName';
16
15
 
17
16
  export type ImageGalleryContextValue<
18
17
  At extends UnknownType = DefaultAttachmentType,
@@ -1,9 +1,8 @@
1
1
  import React, { useContext } from 'react';
2
2
  import { Keyboard } from 'react-native';
3
3
 
4
- import { getDisplayName } from '../utils/getDisplayName';
5
-
6
4
  import type { UnknownType } from '../../types/types';
5
+ import { getDisplayName } from '../utils/getDisplayName';
7
6
 
8
7
  export type KeyboardContextValue = {
9
8
  dismissKeyboard: () => void;
@@ -1,7 +1,5 @@
1
1
  import React, { PropsWithChildren, useContext } from 'react';
2
2
 
3
- import { getDisplayName } from '../utils/getDisplayName';
4
-
5
3
  import type { Attachment } from 'stream-chat';
6
4
 
7
5
  import type { ActionHandler } from '../../components/Attachment/Attachment';
@@ -19,6 +17,7 @@ import type {
19
17
  DefaultUserType,
20
18
  UnknownType,
21
19
  } from '../../types/types';
20
+ import { getDisplayName } from '../utils/getDisplayName';
22
21
 
23
22
  export type Alignment = 'right' | 'left';
24
23
 
@@ -40,10 +39,6 @@ export type MessageContextValue<
40
39
  actionsEnabled: boolean;
41
40
  /** Position of the message, either 'right' or 'left' */
42
41
  alignment: Alignment;
43
- /**
44
- * Function that returns a boolean indicating whether or not the user can edit/delete the message.
45
- */
46
- canModifyMessage: boolean;
47
42
  /** The files attached to a message */
48
43
  files: Attachment<At>[];
49
44
  /**
@@ -115,10 +110,7 @@ export type MessageContextValue<
115
110
  preventPress?: boolean;
116
111
  /** Whether or not the avatar show show next to Message */
117
112
  showAvatar?: boolean;
118
- } & Pick<
119
- ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>,
120
- 'channel' | 'disabled' | 'members' | 'readEventsEnabled'
121
- >;
113
+ } & Pick<ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>, 'channel' | 'disabled' | 'members'>;
122
114
 
123
115
  export const MessageContext = React.createContext({} as MessageContextValue);
124
116
 
@@ -1,6 +1,10 @@
1
1
  import React, { PropsWithChildren, useContext, useEffect, useRef, useState } from 'react';
2
- import { Keyboard } from 'react-native';
2
+ import { Alert, Keyboard } from 'react-native';
3
+
4
+ import type { TextInput, TextInputProps } from 'react-native';
5
+
3
6
  import uniq from 'lodash/uniq';
7
+ import { lookup } from 'mime-types';
4
8
  import {
5
9
  Attachment,
6
10
  logChatPromiseExecution,
@@ -16,27 +20,11 @@ import {
16
20
  import { useCreateMessageInputContext } from './hooks/useCreateMessageInputContext';
17
21
  import { isEditingBoolean, useMessageDetailsForState } from './hooks/useMessageDetailsForState';
18
22
 
19
- import { useAttachmentPickerContext } from '../attachmentPickerContext/AttachmentPickerContext';
20
- import { useChatContext } from '../chatContext/ChatContext';
21
- import { ChannelContextValue, useChannelContext } from '../channelContext/ChannelContext';
22
- import { useThreadContext } from '../threadContext/ThreadContext';
23
- import { getDisplayName } from '../utils/getDisplayName';
24
-
25
- import {
26
- ACITriggerSettings,
27
- ACITriggerSettingsParams,
28
- FileState,
29
- generateRandomId,
30
- TriggerSettings,
31
- } from '../../utils/utils';
32
-
33
- import { Asset, compressImage, getLocalAssetUri, pickDocument } from '../../native';
34
-
35
- import type { TextInput, TextInputProps } from 'react-native';
36
-
37
23
  import type { AttachButtonProps } from '../../components/MessageInput/AttachButton';
38
24
  import type { CommandsButtonProps } from '../../components/MessageInput/CommandsButton';
25
+ import type { CooldownTimerProps } from '../../components/MessageInput/CooldownTimer';
39
26
  import type { FileUploadPreviewProps } from '../../components/MessageInput/FileUploadPreview';
27
+ import { useCooldown } from '../../components/MessageInput/hooks/useCooldown';
40
28
  import type { ImageUploadPreviewProps } from '../../components/MessageInput/ImageUploadPreview';
41
29
  import type { InputButtonsProps } from '../../components/MessageInput/InputButtons';
42
30
  import type { MessageInputProps } from '../../components/MessageInput/MessageInput';
@@ -44,6 +32,7 @@ import type { MoreOptionsButtonProps } from '../../components/MessageInput/MoreO
44
32
  import type { SendButtonProps } from '../../components/MessageInput/SendButton';
45
33
  import type { UploadProgressIndicatorProps } from '../../components/MessageInput/UploadProgressIndicator';
46
34
  import type { MessageType } from '../../components/MessageList/hooks/useMessageList';
35
+ import { Asset, compressImage, getLocalAssetUri, pickDocument } from '../../native';
47
36
  import type {
48
37
  DefaultAttachmentType,
49
38
  DefaultChannelType,
@@ -54,8 +43,21 @@ import type {
54
43
  DefaultUserType,
55
44
  UnknownType,
56
45
  } from '../../types/types';
57
-
58
- const MIME_TYPE_OCTET_STREAM = 'application/octet-stream';
46
+ import {
47
+ ACITriggerSettings,
48
+ ACITriggerSettingsParams,
49
+ FileState,
50
+ generateRandomId,
51
+ TriggerSettings,
52
+ urlRegex,
53
+ } from '../../utils/utils';
54
+ import { useAttachmentPickerContext } from '../attachmentPickerContext/AttachmentPickerContext';
55
+ import { ChannelContextValue, useChannelContext } from '../channelContext/ChannelContext';
56
+ import { useChatContext } from '../chatContext/ChatContext';
57
+ import { useOwnCapabilitiesContext } from '../ownCapabilitiesContext/OwnCapabilitiesContext';
58
+ import { useThreadContext } from '../threadContext/ThreadContext';
59
+ import { useTranslationContext } from '../translationContext/TranslationContext';
60
+ import { getDisplayName } from '../utils/getDisplayName';
59
61
 
60
62
  export type FileUpload = {
61
63
  file: {
@@ -75,12 +77,9 @@ export type ImageUpload = {
75
77
  };
76
78
  id: string;
77
79
  state: string;
80
+ height?: number;
78
81
  url?: string;
79
- };
80
-
81
- export type InputConfig = {
82
- maxMessageLength?: number;
83
- uploadsEnabled?: boolean;
82
+ width?: number;
84
83
  };
85
84
 
86
85
  export type MentionAllAppUsersQuery<Us extends DefaultUserType> = {
@@ -103,6 +102,8 @@ export type LocalMessageInputContext<
103
102
  };
104
103
  };
105
104
  closeAttachmentPicker: () => void;
105
+ /** The time at which the active cooldown will end */
106
+ cooldownEndsAt: Date;
106
107
  /**
107
108
  * An array of file objects which are set for upload. It has the following structure:
108
109
  *
@@ -243,6 +244,14 @@ export type InputMessageInputContextValue<
243
244
  * Defaults to and accepts same props as: [CommandsButton](https://getstream.github.io/stream-chat-react-native/v3/#commandsbutton)
244
245
  */
245
246
  CommandsButton: React.ComponentType<CommandsButtonProps<At, Ch, Co, Ev, Me, Re, Us>>;
247
+ /**
248
+ * Custom UI component to display the remaining cooldown a user will have to wait before
249
+ * being allowed to send another message. This component is displayed in place of the
250
+ * send button for the MessageInput component.
251
+ *
252
+ * **default** [CooldownTimer](https://github.com/GetStream/stream-chat-react-native/blob/master/src/components/MessageInput/CooldownTimer.tsx)
253
+ */
254
+ CooldownTimer: React.ComponentType<CooldownTimerProps>;
246
255
  editing: boolean | MessageType<At, Ch, Co, Ev, Me, Re, Us>;
247
256
  editMessage: StreamChat<At, Ch, Co, Ev, Me, Re, Us>['updateMessage'];
248
257
  /**
@@ -375,6 +384,7 @@ export type InputMessageInputContextValue<
375
384
  * - toggleAttachmentPicker
376
385
  */
377
386
  InputButtons?: React.ComponentType<InputButtonsProps<At, Ch, Co, Ev, Me, Re, Us>>;
387
+ maxMessageLength?: number;
378
388
  mentionAllAppUsersEnabled?: boolean;
379
389
  /** Object containing filters/sort/options overrides for an @mention user query */
380
390
  mentionAllAppUsersQuery?: MentionAllAppUsersQuery<Us>;
@@ -382,6 +392,7 @@ export type InputMessageInputContextValue<
382
392
  * Callback that is called when the text input's text changes. Changed text is passed as a single string argument to the callback handler.
383
393
  */
384
394
  onChangeText?: (newText: string) => void;
395
+ SendMessageDisallowedIndicator?: React.ComponentType;
385
396
  /**
386
397
  * ref for input setter function
387
398
  *
@@ -390,7 +401,7 @@ export type InputMessageInputContextValue<
390
401
  * @overrideType Function
391
402
  */
392
403
  setInputRef?: (ref: TextInput | null) => void;
393
- } & InputConfig;
404
+ };
394
405
 
395
406
  export type MessageInputContextValue<
396
407
  At extends UnknownType = DefaultAttachmentType,
@@ -422,10 +433,11 @@ export const MessageInputProvider = <
422
433
  const { closePicker, openPicker, selectedPicker, setSelectedPicker } =
423
434
  useAttachmentPickerContext();
424
435
  const { client } = useChatContext<At, Ch, Co, Ev, Me, Re, Us>();
436
+ const channelCapabities = useOwnCapabilitiesContext();
425
437
 
426
438
  const { channel, giphyEnabled } = useChannelContext<At, Ch, Co, Ev, Me, Re, Us>();
427
439
  const { thread } = useThreadContext<At, Ch, Co, Ev, Me, Re, Us>();
428
-
440
+ const { t } = useTranslationContext();
429
441
  const inputBoxRef = useRef<TextInput | null>(null);
430
442
  const sending = useRef(false);
431
443
 
@@ -453,6 +465,8 @@ export const MessageInputProvider = <
453
465
  showMoreOptions,
454
466
  text,
455
467
  } = useMessageDetailsForState<At, Ch, Co, Ev, Me, Re, Us>(editing, initialValue);
468
+ const { endsAt: cooldownEndsAt, start: startCooldown } =
469
+ useCooldown<At, Ch, Co, Ev, Me, Re, Us>();
456
470
 
457
471
  const threadId = thread?.id;
458
472
  useEffect(() => {
@@ -502,7 +516,7 @@ export const MessageInputProvider = <
502
516
  }
503
517
  setText(newText);
504
518
 
505
- if (newText && channel) {
519
+ if (newText && channel && channelCapabities.sendTypingEvents) {
506
520
  logChatPromiseExecution(channel.keystroke(thread?.id), 'start typing event');
507
521
  }
508
522
 
@@ -608,14 +622,25 @@ export const MessageInputProvider = <
608
622
  setText('');
609
623
  };
610
624
 
625
+ // TODO: Figure out why this is async, as it doesn't await any promise.
626
+ // eslint-disable-next-line require-await
611
627
  const sendMessage = async () => {
612
628
  if (sending.current) {
613
629
  return;
614
630
  }
631
+
632
+ if (!channelCapabities.sendLinks && !!text.match(urlRegex)) {
633
+ Alert.alert(t('Links are disabled'), t('Sending links is not allowed in this conversation'));
634
+
635
+ return;
636
+ }
637
+
615
638
  sending.current = true;
616
639
 
640
+ startCooldown();
641
+
617
642
  const prevText = giphyEnabled && giphyActive ? `/giphy ${text}` : text;
618
- await setText('');
643
+ setText('');
619
644
  if (inputBoxRef.current) {
620
645
  inputBoxRef.current.clear();
621
646
  }
@@ -644,6 +669,8 @@ export const MessageInputProvider = <
644
669
  attachments.push({
645
670
  fallback: image.file.name,
646
671
  image_url: image.url,
672
+ original_height: image.height,
673
+ original_width: image.width,
647
674
  type: 'image',
648
675
  } as Attachment<At>);
649
676
  }
@@ -665,6 +692,14 @@ export const MessageInputProvider = <
665
692
  image_url: file.url,
666
693
  type: 'image',
667
694
  } as Attachment<At>);
695
+ } else if (file.file.type?.startsWith('video/')) {
696
+ attachments.push({
697
+ asset_url: file.url,
698
+ file_size: file.file.size,
699
+ mime_type: file.file.type,
700
+ title: file.file.name,
701
+ type: 'video',
702
+ } as Attachment<At>);
668
703
  } else {
669
704
  attachments.push({
670
705
  asset_url: file.url,
@@ -741,6 +776,7 @@ export const MessageInputProvider = <
741
776
  },
742
777
  ] as StreamMessage<At, Me, Us>['attachments'];
743
778
 
779
+ startCooldown();
744
780
  try {
745
781
  value.sendMessage({
746
782
  attachments,
@@ -809,7 +845,7 @@ export const MessageInputProvider = <
809
845
  }
810
846
  const { file, id } = newFile;
811
847
 
812
- await setFileUploads((prevFileUploads) =>
848
+ setFileUploads((prevFileUploads) =>
813
849
  prevFileUploads.map((fileUpload) => {
814
850
  if (fileUpload.id === id) {
815
851
  return {
@@ -826,7 +862,7 @@ export const MessageInputProvider = <
826
862
  if (value.doDocUploadRequest) {
827
863
  response = await value.doDocUploadRequest(file, channel);
828
864
  } else if (channel && file.uri) {
829
- response = await channel.sendFile(file.uri, file.name, MIME_TYPE_OCTET_STREAM);
865
+ response = await channel.sendFile(file.uri, file.name, file.type);
830
866
  }
831
867
  } catch (error) {
832
868
  console.warn(error);
@@ -905,12 +941,13 @@ export const MessageInputProvider = <
905
941
  uri,
906
942
  width: file.width,
907
943
  }));
908
-
944
+ const filename = uri.replace(/^(file:\/\/|content:\/\/|assets-library:\/\/)/, '');
945
+ const contentType = lookup(filename) || 'multipart/form-data';
909
946
  if (value.doImageUploadRequest) {
910
947
  response = await value.doImageUploadRequest(file, channel);
911
948
  } else if (compressedUri && channel) {
912
949
  if (value.sendImageAsync) {
913
- channel.sendImage(compressedUri, undefined, MIME_TYPE_OCTET_STREAM).then((res) => {
950
+ channel.sendImage(compressedUri, undefined, contentType).then((res) => {
914
951
  if (asyncIds.includes(id)) {
915
952
  // Evaluates to true if user hit send before image successfully uploaded
916
953
  setAsyncUploads((prevAsyncUploads) => {
@@ -937,7 +974,7 @@ export const MessageInputProvider = <
937
974
  }
938
975
  });
939
976
  } else {
940
- response = await channel.sendImage(compressedUri, undefined, MIME_TYPE_OCTET_STREAM);
977
+ response = await channel.sendImage(compressedUri, undefined, contentType);
941
978
  }
942
979
  }
943
980
 
@@ -947,8 +984,10 @@ export const MessageInputProvider = <
947
984
  if (imageUpload.id === id) {
948
985
  return {
949
986
  ...imageUpload,
987
+ height: file.height,
950
988
  state: FileState.UPLOADED,
951
989
  url: response.file,
990
+ width: file.width,
952
991
  };
953
992
  }
954
993
  return imageUpload;
@@ -983,8 +1022,9 @@ export const MessageInputProvider = <
983
1022
  uri?: string;
984
1023
  }) => {
985
1024
  const id = generateRandomId();
1025
+ const mimeType = lookup(file.name);
986
1026
  const newFile = {
987
- file: { ...file, type: MIME_TYPE_OCTET_STREAM },
1027
+ file: { ...file, type: mimeType || file?.type },
988
1028
  id,
989
1029
  state: FileState.UPLOADING,
990
1030
  };
@@ -1016,6 +1056,7 @@ export const MessageInputProvider = <
1016
1056
  asyncIds,
1017
1057
  asyncUploads,
1018
1058
  closeAttachmentPicker,
1059
+ cooldownEndsAt,
1019
1060
  fileUploads,
1020
1061
  giphyActive,
1021
1062
  imageUploads,
@@ -1,9 +1,5 @@
1
1
  import { useMemo } from 'react';
2
2
 
3
- import type { MessageInputContextValue } from '../MessageInputContext';
4
-
5
- import type { ThreadContextValue } from '../../threadContext/ThreadContext';
6
-
7
3
  import type {
8
4
  DefaultAttachmentType,
9
5
  DefaultChannelType,
@@ -14,6 +10,8 @@ import type {
14
10
  DefaultUserType,
15
11
  UnknownType,
16
12
  } from '../../../types/types';
13
+ import type { ThreadContextValue } from '../../threadContext/ThreadContext';
14
+ import type { MessageInputContextValue } from '../MessageInputContext';
17
15
 
18
16
  export const useCreateMessageInputContext = <
19
17
  At extends UnknownType = DefaultAttachmentType,
@@ -35,6 +33,8 @@ export const useCreateMessageInputContext = <
35
33
  closeAttachmentPicker,
36
34
  CommandsButton,
37
35
  compressImageQuality,
36
+ cooldownEndsAt,
37
+ CooldownTimer,
38
38
  doDocUploadRequest,
39
39
  doImageUploadRequest,
40
40
  editing,
@@ -78,6 +78,7 @@ export const useCreateMessageInputContext = <
78
78
  sending,
79
79
  sendMessage,
80
80
  sendMessageAsync,
81
+ SendMessageDisallowedIndicator,
81
82
  sendThreadMessageInChannel,
82
83
  setAsyncIds,
83
84
  setAsyncUploads,
@@ -104,7 +105,6 @@ export const useCreateMessageInputContext = <
104
105
  uploadNewFile,
105
106
  uploadNewImage,
106
107
  UploadProgressIndicator,
107
- uploadsEnabled,
108
108
  }: MessageInputContextValue<At, Ch, Co, Ev, Me, Re, Us> &
109
109
  Pick<ThreadContextValue<At, Ch, Co, Ev, Me, Re, Us>, 'thread'>) => {
110
110
  const editingExists = !!editing;
@@ -131,6 +131,8 @@ export const useCreateMessageInputContext = <
131
131
  closeAttachmentPicker,
132
132
  CommandsButton,
133
133
  compressImageQuality,
134
+ cooldownEndsAt,
135
+ CooldownTimer,
134
136
  doDocUploadRequest,
135
137
  doImageUploadRequest,
136
138
  editing,
@@ -174,6 +176,7 @@ export const useCreateMessageInputContext = <
174
176
  sending,
175
177
  sendMessage,
176
178
  sendMessageAsync,
179
+ SendMessageDisallowedIndicator,
177
180
  sendThreadMessageInChannel,
178
181
  setAsyncIds,
179
182
  setAsyncUploads,
@@ -199,9 +202,9 @@ export const useCreateMessageInputContext = <
199
202
  uploadNewFile,
200
203
  uploadNewImage,
201
204
  UploadProgressIndicator,
202
- uploadsEnabled,
203
205
  }),
204
206
  [
207
+ cooldownEndsAt,
205
208
  editingExists,
206
209
  fileUploadsValue,
207
210
  giphyActive,
@@ -214,7 +217,6 @@ export const useCreateMessageInputContext = <
214
217
  showMoreOptions,
215
218
  text,
216
219
  threadId,
217
- uploadsEnabled,
218
220
  ],
219
221
  );
220
222