stream-chat-react-native-core 3.8.2 → 3.9.0-next.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (280) hide show
  1. package/lib/commonjs/components/Channel/Channel.js +42 -30
  2. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  3. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +28 -23
  4. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  5. package/lib/commonjs/version.json +1 -1
  6. package/lib/module/components/Channel/Channel.js +42 -30
  7. package/lib/module/components/Channel/Channel.js.map +1 -1
  8. package/lib/module/components/MessageInput/FileUploadPreview.js +28 -23
  9. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  10. package/lib/module/version.json +1 -1
  11. package/lib/typescript/{src/components → components}/Attachment/Attachment.d.ts +0 -0
  12. package/lib/typescript/{src/components → components}/Attachment/AttachmentActions.d.ts +0 -0
  13. package/lib/typescript/{src/components → components}/Attachment/Card.d.ts +0 -0
  14. package/lib/typescript/{src/components → components}/Attachment/FileAttachment.d.ts +0 -0
  15. package/lib/typescript/{src/components → components}/Attachment/FileAttachmentGroup.d.ts +0 -0
  16. package/lib/typescript/{src/components → components}/Attachment/FileIcon.d.ts +0 -0
  17. package/lib/typescript/{src/components → components}/Attachment/Gallery.d.ts +0 -0
  18. package/lib/typescript/{src/components → components}/Attachment/Giphy.d.ts +0 -0
  19. package/lib/typescript/{src/components → components}/AttachmentPicker/AttachmentPicker.d.ts +0 -0
  20. package/lib/typescript/{src/components → components}/AttachmentPicker/components/AttachmentPickerBottomSheetHandle.d.ts +0 -0
  21. package/lib/typescript/{src/components → components}/AttachmentPicker/components/AttachmentPickerError.d.ts +0 -0
  22. package/lib/typescript/{src/components → components}/AttachmentPicker/components/AttachmentPickerErrorImage.d.ts +0 -0
  23. package/lib/typescript/{src/components → components}/AttachmentPicker/components/AttachmentSelectionBar.d.ts +0 -0
  24. package/lib/typescript/{src/components → components}/AttachmentPicker/components/CameraSelectorIcon.d.ts +0 -0
  25. package/lib/typescript/{src/components → components}/AttachmentPicker/components/FileSelectorIcon.d.ts +0 -0
  26. package/lib/typescript/{src/components → components}/AttachmentPicker/components/ImageOverlaySelectedComponent.d.ts +0 -0
  27. package/lib/typescript/{src/components → components}/AttachmentPicker/components/ImageSelectorIcon.d.ts +0 -0
  28. package/lib/typescript/{src/components → components}/AutoCompleteInput/AutoCompleteInput.d.ts +0 -0
  29. package/lib/typescript/{src/components → components}/AutoCompleteInput/CommandsHeader.d.ts +0 -0
  30. package/lib/typescript/{src/components → components}/AutoCompleteInput/CommandsItem.d.ts +0 -0
  31. package/lib/typescript/{src/components → components}/AutoCompleteInput/EmojisHeader.d.ts +0 -0
  32. package/lib/typescript/{src/components → components}/AutoCompleteInput/EmojisItem.d.ts +0 -0
  33. package/lib/typescript/{src/components → components}/AutoCompleteInput/MentionsItem.d.ts +0 -0
  34. package/lib/typescript/{src/components → components}/AutoCompleteInput/SuggestionsList.d.ts +0 -0
  35. package/lib/typescript/{src/components → components}/Avatar/Avatar.d.ts +0 -0
  36. package/lib/typescript/{src/components → components}/Avatar/GroupAvatar.d.ts +0 -0
  37. package/lib/typescript/{src/components → components}/Channel/Channel.d.ts +1 -0
  38. package/lib/typescript/{src/components → components}/Channel/hooks/useCreateChannelContext.d.ts +0 -0
  39. package/lib/typescript/{src/components → components}/Channel/hooks/useCreateInputMessageInputContext.d.ts +0 -0
  40. package/lib/typescript/{src/components → components}/Channel/hooks/useCreateMessagesContext.d.ts +0 -0
  41. package/lib/typescript/{src/components → components}/Channel/hooks/useCreatePaginatedMessageListContext.d.ts +0 -0
  42. package/lib/typescript/{src/components → components}/Channel/hooks/useCreateThreadContext.d.ts +0 -0
  43. package/lib/typescript/{src/components → components}/Channel/hooks/useCreateTypingContext.d.ts +0 -0
  44. package/lib/typescript/{src/components → components}/Channel/hooks/useTargetedMessage.d.ts +0 -0
  45. package/lib/typescript/{src/components → components}/ChannelList/ChannelList.d.ts +0 -0
  46. package/lib/typescript/{src/components → components}/ChannelList/ChannelListFooterLoadingIndicator.d.ts +0 -0
  47. package/lib/typescript/{src/components → components}/ChannelList/ChannelListHeaderErrorIndicator.d.ts +0 -0
  48. package/lib/typescript/{src/components → components}/ChannelList/ChannelListHeaderNetworkDownIndicator.d.ts +0 -0
  49. package/lib/typescript/{src/components → components}/ChannelList/ChannelListLoadingIndicator.d.ts +0 -0
  50. package/lib/typescript/{src/components → components}/ChannelList/ChannelListMessenger.d.ts +0 -0
  51. package/lib/typescript/{src/components → components}/ChannelList/Skeleton.d.ts +0 -0
  52. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useAddedToChannelNotification.d.ts +0 -0
  53. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useChannelDeleted.d.ts +0 -0
  54. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useChannelHidden.d.ts +0 -0
  55. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useChannelTruncated.d.ts +0 -0
  56. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useChannelUpdated.d.ts +0 -0
  57. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useChannelVisible.d.ts +0 -0
  58. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useConnectionRecovered.d.ts +0 -0
  59. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useNewMessage.d.ts +0 -0
  60. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useNewMessageNotification.d.ts +0 -0
  61. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useRemovedFromChannelNotification.d.ts +0 -0
  62. package/lib/typescript/{src/components → components}/ChannelList/hooks/listeners/useUserPresence.d.ts +0 -0
  63. package/lib/typescript/{src/components → components}/ChannelList/hooks/useCreateChannelsContext.d.ts +0 -0
  64. package/lib/typescript/{src/components → components}/ChannelList/hooks/usePaginatedChannels.d.ts +0 -0
  65. package/lib/typescript/{src/components → components}/ChannelList/utils.d.ts +0 -0
  66. package/lib/typescript/{src/components → components}/ChannelPreview/ChannelAvatar.d.ts +0 -0
  67. package/lib/typescript/{src/components → components}/ChannelPreview/ChannelPreview.d.ts +0 -0
  68. package/lib/typescript/{src/components → components}/ChannelPreview/ChannelPreviewMessage.d.ts +0 -0
  69. package/lib/typescript/{src/components → components}/ChannelPreview/ChannelPreviewMessenger.d.ts +0 -0
  70. package/lib/typescript/{src/components → components}/ChannelPreview/ChannelPreviewStatus.d.ts +0 -0
  71. package/lib/typescript/{src/components → components}/ChannelPreview/ChannelPreviewTitle.d.ts +0 -0
  72. package/lib/typescript/{src/components → components}/ChannelPreview/ChannelPreviewUnreadCount.d.ts +0 -0
  73. package/lib/typescript/{src/components → components}/ChannelPreview/hooks/useChannelPreviewDisplayAvatar.d.ts +0 -0
  74. package/lib/typescript/{src/components → components}/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts +0 -0
  75. package/lib/typescript/{src/components → components}/ChannelPreview/hooks/useChannelPreviewDisplayPresence.d.ts +0 -0
  76. package/lib/typescript/{src/components → components}/ChannelPreview/hooks/useLatestMessagePreview.d.ts +0 -0
  77. package/lib/typescript/{src/components → components}/Chat/Chat.d.ts +0 -0
  78. package/lib/typescript/{src/components → components}/Chat/hooks/useCreateChatContext.d.ts +0 -0
  79. package/lib/typescript/{src/components → components}/Chat/hooks/useIsOnline.d.ts +0 -0
  80. package/lib/typescript/{src/components → components}/Chat/hooks/useMutedUsers.d.ts +0 -0
  81. package/lib/typescript/{src/components → components}/ImageGallery/ImageGallery.d.ts +0 -0
  82. package/lib/typescript/{src/components → components}/ImageGallery/components/AnimatedGalleryImage.d.ts +0 -0
  83. package/lib/typescript/{src/components → components}/ImageGallery/components/ImageGalleryFooter.d.ts +0 -0
  84. package/lib/typescript/{src/components → components}/ImageGallery/components/ImageGalleryHeader.d.ts +0 -0
  85. package/lib/typescript/{src/components → components}/ImageGallery/components/ImageGalleryOverlay.d.ts +0 -0
  86. package/lib/typescript/{src/components → components}/ImageGallery/components/ImageGrid.d.ts +0 -0
  87. package/lib/typescript/{src/components → components}/ImageGallery/components/ImageGridHandle.d.ts +0 -0
  88. package/lib/typescript/{src/components → components}/Indicators/EmptyStateIndicator.d.ts +0 -0
  89. package/lib/typescript/{src/components → components}/Indicators/LoadingDot.d.ts +0 -0
  90. package/lib/typescript/{src/components → components}/Indicators/LoadingDots.d.ts +0 -0
  91. package/lib/typescript/{src/components → components}/Indicators/LoadingErrorIndicator.d.ts +0 -0
  92. package/lib/typescript/{src/components → components}/Indicators/LoadingIndicator.d.ts +0 -0
  93. package/lib/typescript/{src/components → components}/KeyboardCompatibleView/KeyboardCompatibleView.d.ts +0 -0
  94. package/lib/typescript/{src/components → components}/KeyboardCompatibleView/KeyboardCompatibleViewFC.d.ts +0 -0
  95. package/lib/typescript/{src/components → components}/Message/Message.d.ts +0 -0
  96. package/lib/typescript/{src/components → components}/Message/MessageSimple/MessageAvatar.d.ts +0 -0
  97. package/lib/typescript/{src/components → components}/Message/MessageSimple/MessageContent.d.ts +0 -0
  98. package/lib/typescript/{src/components → components}/Message/MessageSimple/MessageDeleted.d.ts +0 -0
  99. package/lib/typescript/{src/components → components}/Message/MessageSimple/MessageFooter.d.ts +0 -0
  100. package/lib/typescript/{src/components → components}/Message/MessageSimple/MessageReplies.d.ts +0 -0
  101. package/lib/typescript/{src/components → components}/Message/MessageSimple/MessageRepliesAvatars.d.ts +0 -0
  102. package/lib/typescript/{src/components → components}/Message/MessageSimple/MessageSimple.d.ts +0 -0
  103. package/lib/typescript/{src/components → components}/Message/MessageSimple/MessageStatus.d.ts +0 -0
  104. package/lib/typescript/{src/components → components}/Message/MessageSimple/MessageTextContainer.d.ts +0 -0
  105. package/lib/typescript/{src/components → components}/Message/MessageSimple/ReactionList.d.ts +0 -0
  106. package/lib/typescript/{src/components → components}/Message/MessageSimple/utils/renderText.d.ts +0 -0
  107. package/lib/typescript/{src/components → components}/Message/hooks/useCreateMessageContext.d.ts +0 -0
  108. package/lib/typescript/{src/components → components}/Message/utils/messageActions.d.ts +0 -0
  109. package/lib/typescript/{src/components → components}/Message/utils/removeReservedFields.d.ts +0 -0
  110. package/lib/typescript/{src/components → components}/MessageInput/AttachButton.d.ts +0 -0
  111. package/lib/typescript/{src/components → components}/MessageInput/CommandsButton.d.ts +0 -0
  112. package/lib/typescript/{src/components → components}/MessageInput/FileUploadPreview.d.ts +0 -0
  113. package/lib/typescript/{src/components → components}/MessageInput/ImageUploadPreview.d.ts +0 -0
  114. package/lib/typescript/{src/components → components}/MessageInput/InputButtons.d.ts +0 -0
  115. package/lib/typescript/{src/components → components}/MessageInput/MessageInput.d.ts +0 -0
  116. package/lib/typescript/{src/components → components}/MessageInput/MoreOptionsButton.d.ts +0 -0
  117. package/lib/typescript/{src/components → components}/MessageInput/SendButton.d.ts +0 -0
  118. package/lib/typescript/{src/components → components}/MessageInput/ShowThreadMessageInChannelButton.d.ts +0 -0
  119. package/lib/typescript/{src/components → components}/MessageInput/UploadProgressIndicator.d.ts +0 -0
  120. package/lib/typescript/{src/components → components}/MessageList/DateHeader.d.ts +0 -0
  121. package/lib/typescript/{src/components → components}/MessageList/InlineDateSeparator.d.ts +0 -0
  122. package/lib/typescript/{src/components → components}/MessageList/InlineLoadingMoreIndicator.d.ts +0 -0
  123. package/lib/typescript/{src/components → components}/MessageList/InlineLoadingMoreRecentIndicator.d.ts +0 -0
  124. package/lib/typescript/{src/components → components}/MessageList/InlineLoadingMoreThreadIndicator.d.ts +0 -0
  125. package/lib/typescript/{src/components → components}/MessageList/InlineUnreadIndicator.d.ts +0 -0
  126. package/lib/typescript/{src/components → components}/MessageList/MessageList.d.ts +0 -0
  127. package/lib/typescript/{src/components → components}/MessageList/MessageSystem.d.ts +0 -0
  128. package/lib/typescript/{src/components → components}/MessageList/NetworkDownIndicator.d.ts +0 -0
  129. package/lib/typescript/{src/components → components}/MessageList/ScrollToBottomButton.d.ts +0 -0
  130. package/lib/typescript/{src/components → components}/MessageList/TypingIndicator.d.ts +0 -0
  131. package/lib/typescript/{src/components → components}/MessageList/TypingIndicatorContainer.d.ts +0 -0
  132. package/lib/typescript/{src/components → components}/MessageList/hooks/useMessageList.d.ts +0 -0
  133. package/lib/typescript/{src/components → components}/MessageList/hooks/useTypingString.d.ts +0 -0
  134. package/lib/typescript/{src/components → components}/MessageList/utils/filterTypingUsers.d.ts +0 -0
  135. package/lib/typescript/{src/components → components}/MessageList/utils/getDateSeparators.d.ts +0 -0
  136. package/lib/typescript/{src/components → components}/MessageList/utils/getGroupStyles.d.ts +0 -0
  137. package/lib/typescript/{src/components → components}/MessageList/utils/getLastReceivedMessage.d.ts +0 -0
  138. package/lib/typescript/{src/components → components}/MessageList/utils/getReadStates.d.ts +0 -0
  139. package/lib/typescript/{src/components → components}/MessageOverlay/MessageActions.d.ts +0 -0
  140. package/lib/typescript/{src/components → components}/MessageOverlay/MessageOverlay.d.ts +0 -0
  141. package/lib/typescript/{src/components → components}/MessageOverlay/OverlayReactionList.d.ts +0 -0
  142. package/lib/typescript/{src/components → components}/MessageOverlay/OverlayReactions.d.ts +0 -0
  143. package/lib/typescript/{src/components → components}/Reply/Reply.d.ts +0 -0
  144. package/lib/typescript/{src/components → components}/Spinner/Spinner.d.ts +0 -0
  145. package/lib/typescript/{src/components → components}/Thread/Thread.d.ts +0 -0
  146. package/lib/typescript/{src/components → components}/Thread/components/ThreadFooterComponent.d.ts +0 -0
  147. package/lib/typescript/{src/components → components}/index.d.ts +0 -0
  148. package/lib/typescript/{src/contexts → contexts}/attachmentPickerContext/AttachmentPickerContext.d.ts +0 -0
  149. package/lib/typescript/{src/contexts → contexts}/channelContext/ChannelContext.d.ts +0 -0
  150. package/lib/typescript/{src/contexts → contexts}/channelsContext/ChannelsContext.d.ts +0 -0
  151. package/lib/typescript/{src/contexts → contexts}/chatContext/ChatContext.d.ts +0 -0
  152. package/lib/typescript/{src/contexts → contexts}/imageGalleryContext/ImageGalleryContext.d.ts +0 -0
  153. package/lib/typescript/{src/contexts → contexts}/index.d.ts +0 -0
  154. package/lib/typescript/{src/contexts → contexts}/keyboardContext/KeyboardContext.d.ts +0 -0
  155. package/lib/typescript/{src/contexts → contexts}/messageContext/MessageContext.d.ts +0 -0
  156. package/lib/typescript/{src/contexts → contexts}/messageInputContext/MessageInputContext.d.ts +0 -0
  157. package/lib/typescript/{src/contexts → contexts}/messageInputContext/hooks/useCreateMessageInputContext.d.ts +0 -0
  158. package/lib/typescript/{src/contexts → contexts}/messageInputContext/hooks/useMessageDetailsForState.d.ts +0 -0
  159. package/lib/typescript/{src/contexts → contexts}/messageOverlayContext/MessageOverlayContext.d.ts +0 -0
  160. package/lib/typescript/{src/contexts → contexts}/messagesContext/MessagesContext.d.ts +0 -0
  161. package/lib/typescript/{src/contexts → contexts}/overlayContext/OverlayContext.d.ts +0 -0
  162. package/lib/typescript/{src/contexts → contexts}/overlayContext/OverlayProvider.d.ts +0 -0
  163. package/lib/typescript/{src/contexts → contexts}/paginatedMessageListContext/PaginatedMessageListContext.d.ts +0 -0
  164. package/lib/typescript/{src/contexts → contexts}/suggestionsContext/SuggestionsContext.d.ts +0 -0
  165. package/lib/typescript/{src/contexts → contexts}/themeContext/ThemeContext.d.ts +0 -0
  166. package/lib/typescript/{src/contexts → contexts}/themeContext/utils/theme.d.ts +0 -0
  167. package/lib/typescript/{src/contexts → contexts}/threadContext/ThreadContext.d.ts +0 -0
  168. package/lib/typescript/{src/contexts → contexts}/translationContext/TranslationContext.d.ts +0 -0
  169. package/lib/typescript/{src/contexts → contexts}/typingContext/TypingContext.d.ts +0 -0
  170. package/lib/typescript/{src/contexts → contexts}/utils/getDisplayName.d.ts +0 -0
  171. package/lib/typescript/{src/emoji-data → emoji-data}/compiled.d.ts +0 -0
  172. package/lib/typescript/{src/emoji-data → emoji-data}/emojiNames.d.ts +0 -0
  173. package/lib/typescript/{src/emoji-data → emoji-data}/emojis.d.ts +0 -0
  174. package/lib/typescript/{src/hooks → hooks}/index.d.ts +0 -0
  175. package/lib/typescript/{src/hooks → hooks}/useAppStateListener.d.ts +0 -0
  176. package/lib/typescript/{src/hooks → hooks}/useStreami18n.d.ts +0 -0
  177. package/lib/typescript/{src/icons → icons}/ArrowRight.d.ts +0 -0
  178. package/lib/typescript/{src/icons → icons}/AtMentions.d.ts +0 -0
  179. package/lib/typescript/{src/icons → icons}/Attach.d.ts +0 -0
  180. package/lib/typescript/{src/icons → icons}/Audio.d.ts +0 -0
  181. package/lib/typescript/{src/icons → icons}/CSV.d.ts +0 -0
  182. package/lib/typescript/{src/icons → icons}/Camera.d.ts +0 -0
  183. package/lib/typescript/{src/icons → icons}/Check.d.ts +0 -0
  184. package/lib/typescript/{src/icons → icons}/CheckAll.d.ts +0 -0
  185. package/lib/typescript/{src/icons → icons}/CheckSend.d.ts +0 -0
  186. package/lib/typescript/{src/icons → icons}/CircleClose.d.ts +0 -0
  187. package/lib/typescript/{src/icons → icons}/CirclePlus.d.ts +0 -0
  188. package/lib/typescript/{src/icons → icons}/CircleRight.d.ts +0 -0
  189. package/lib/typescript/{src/icons → icons}/Close.d.ts +0 -0
  190. package/lib/typescript/{src/icons → icons}/Copy.d.ts +0 -0
  191. package/lib/typescript/{src/icons → icons}/CurveLineLeftUp.d.ts +0 -0
  192. package/lib/typescript/{src/icons → icons}/DOC.d.ts +0 -0
  193. package/lib/typescript/{src/icons → icons}/DOCX.d.ts +0 -0
  194. package/lib/typescript/{src/icons → icons}/Delete.d.ts +0 -0
  195. package/lib/typescript/{src/icons → icons}/Down.d.ts +0 -0
  196. package/lib/typescript/{src/icons → icons}/DownloadArrow.d.ts +0 -0
  197. package/lib/typescript/{src/icons → icons}/DownloadCloud.d.ts +0 -0
  198. package/lib/typescript/{src/icons → icons}/Edit.d.ts +0 -0
  199. package/lib/typescript/{src/icons → icons}/Error.d.ts +0 -0
  200. package/lib/typescript/{src/icons → icons}/Eye.d.ts +0 -0
  201. package/lib/typescript/{src/icons → icons}/Flag.d.ts +0 -0
  202. package/lib/typescript/{src/icons → icons}/Folder.d.ts +0 -0
  203. package/lib/typescript/{src/icons → icons}/GenericFile.d.ts +0 -0
  204. package/lib/typescript/{src/icons → icons}/GiphyIcon.d.ts +0 -0
  205. package/lib/typescript/{src/icons → icons}/Grid.d.ts +0 -0
  206. package/lib/typescript/{src/icons → icons}/Group.d.ts +0 -0
  207. package/lib/typescript/{src/icons → icons}/HTML.d.ts +0 -0
  208. package/lib/typescript/{src/icons → icons}/Imgur.d.ts +0 -0
  209. package/lib/typescript/{src/icons → icons}/LOLReaction.d.ts +0 -0
  210. package/lib/typescript/{src/icons → icons}/Left.d.ts +0 -0
  211. package/lib/typescript/{src/icons → icons}/Lightning.d.ts +0 -0
  212. package/lib/typescript/{src/icons → icons}/Link.d.ts +0 -0
  213. package/lib/typescript/{src/icons → icons}/Loading.d.ts +0 -0
  214. package/lib/typescript/{src/icons → icons}/Logo.d.ts +0 -0
  215. package/lib/typescript/{src/icons → icons}/LoveReaction.d.ts +0 -0
  216. package/lib/typescript/{src/icons → icons}/MD.d.ts +0 -0
  217. package/lib/typescript/{src/icons → icons}/MailOpen.d.ts +0 -0
  218. package/lib/typescript/{src/icons → icons}/MenuPointHorizontal.d.ts +0 -0
  219. package/lib/typescript/{src/icons → icons}/MenuPointVertical.d.ts +0 -0
  220. package/lib/typescript/{src/icons → icons}/MessageFlag.d.ts +0 -0
  221. package/lib/typescript/{src/icons → icons}/MessageIcon.d.ts +0 -0
  222. package/lib/typescript/{src/icons → icons}/Mute.d.ts +0 -0
  223. package/lib/typescript/{src/icons → icons}/Notification.d.ts +0 -0
  224. package/lib/typescript/{src/icons → icons}/ODT.d.ts +0 -0
  225. package/lib/typescript/{src/icons → icons}/PDF.d.ts +0 -0
  226. package/lib/typescript/{src/icons → icons}/PPT.d.ts +0 -0
  227. package/lib/typescript/{src/icons → icons}/PPTX.d.ts +0 -0
  228. package/lib/typescript/{src/icons → icons}/Picture.d.ts +0 -0
  229. package/lib/typescript/{src/icons → icons}/RAR.d.ts +0 -0
  230. package/lib/typescript/{src/icons → icons}/RTF.d.ts +0 -0
  231. package/lib/typescript/{src/icons → icons}/Refresh.d.ts +0 -0
  232. package/lib/typescript/{src/icons → icons}/Right.d.ts +0 -0
  233. package/lib/typescript/{src/icons → icons}/SEVEN_Z.d.ts +0 -0
  234. package/lib/typescript/{src/icons → icons}/Search.d.ts +0 -0
  235. package/lib/typescript/{src/icons → icons}/SendRight.d.ts +0 -0
  236. package/lib/typescript/{src/icons → icons}/SendUp.d.ts +0 -0
  237. package/lib/typescript/{src/icons → icons}/Share.d.ts +0 -0
  238. package/lib/typescript/{src/icons → icons}/ShareRightArrow.d.ts +0 -0
  239. package/lib/typescript/{src/icons → icons}/Smile.d.ts +0 -0
  240. package/lib/typescript/{src/icons → icons}/Sound.d.ts +0 -0
  241. package/lib/typescript/{src/icons → icons}/TAR.d.ts +0 -0
  242. package/lib/typescript/{src/icons → icons}/TXT.d.ts +0 -0
  243. package/lib/typescript/{src/icons → icons}/ThreadReply.d.ts +0 -0
  244. package/lib/typescript/{src/icons → icons}/ThumbsDownReaction.d.ts +0 -0
  245. package/lib/typescript/{src/icons → icons}/ThumbsUpReaction.d.ts +0 -0
  246. package/lib/typescript/{src/icons → icons}/Time.d.ts +0 -0
  247. package/lib/typescript/{src/icons → icons}/Unknown.d.ts +0 -0
  248. package/lib/typescript/{src/icons → icons}/User.d.ts +0 -0
  249. package/lib/typescript/{src/icons → icons}/UserAdd.d.ts +0 -0
  250. package/lib/typescript/{src/icons → icons}/UserDelete.d.ts +0 -0
  251. package/lib/typescript/{src/icons → icons}/UserMinus.d.ts +0 -0
  252. package/lib/typescript/{src/icons → icons}/WutReaction.d.ts +0 -0
  253. package/lib/typescript/{src/icons → icons}/XLS.d.ts +0 -0
  254. package/lib/typescript/{src/icons → icons}/XLSX.d.ts +0 -0
  255. package/lib/typescript/{src/icons → icons}/ZIP.d.ts +0 -0
  256. package/lib/typescript/{src/icons → icons}/index.d.ts +0 -0
  257. package/lib/typescript/{src/icons → icons}/utils/base.d.ts +0 -0
  258. package/lib/typescript/{src/index.d.ts → index.d.ts} +0 -0
  259. package/lib/typescript/{src/native.d.ts → native.d.ts} +0 -0
  260. package/lib/typescript/{src/types → types}/types.d.ts +0 -0
  261. package/lib/typescript/{src/utils → utils}/Streami18n.d.ts +0 -0
  262. package/lib/typescript/{src/utils → utils}/utils.d.ts +0 -0
  263. package/package.json +1 -1
  264. package/src/components/Channel/Channel.tsx +114 -67
  265. package/src/components/MessageInput/FileUploadPreview.tsx +68 -58
  266. package/src/components/MessageInput/__tests__/__snapshots__/FileUploadPreview.test.js.snap +778 -730
  267. package/src/version.json +1 -1
  268. package/lib/commonjs/components/Channel/utils/debounce.js +0 -20
  269. package/lib/commonjs/components/Channel/utils/debounce.js.map +0 -1
  270. package/lib/commonjs/components/Channel/utils/throttle.js +0 -20
  271. package/lib/commonjs/components/Channel/utils/throttle.js.map +0 -1
  272. package/lib/module/components/Channel/utils/debounce.js +0 -20
  273. package/lib/module/components/Channel/utils/debounce.js.map +0 -1
  274. package/lib/module/components/Channel/utils/throttle.js +0 -20
  275. package/lib/module/components/Channel/utils/throttle.js.map +0 -1
  276. package/lib/typescript/__mocks__/react-native.d.ts +0 -6
  277. package/lib/typescript/src/components/Channel/utils/debounce.d.ts +0 -2
  278. package/lib/typescript/src/components/Channel/utils/throttle.d.ts +0 -2
  279. package/src/components/Channel/utils/debounce.ts +0 -12
  280. package/src/components/Channel/utils/throttle.ts +0 -12
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "stream-chat-react-native-core",
3
3
  "description": "The official React Native and Expo components for Stream Chat, a service for building chat applications",
4
- "version": "3.8.2",
4
+ "version": "3.9.0-next.1",
5
5
  "author": {
6
6
  "company": "Stream.io Inc",
7
7
  "name": "Stream.io Inc"
@@ -1,5 +1,7 @@
1
- import React, { PropsWithChildren, useCallback, useEffect, useState } from 'react';
1
+ import React, { PropsWithChildren, useCallback, useEffect, useRef, useState } from 'react';
2
2
  import { KeyboardAvoidingViewProps, StyleSheet, Text, View } from 'react-native';
3
+ import debounce from 'lodash/debounce';
4
+ import throttle from 'lodash/throttle';
3
5
  import {
4
6
  ChannelState,
5
7
  Channel as ChannelType,
@@ -21,8 +23,6 @@ import { useCreatePaginatedMessageListContext } from './hooks/useCreatePaginated
21
23
  import { useCreateThreadContext } from './hooks/useCreateThreadContext';
22
24
  import { useCreateTypingContext } from './hooks/useCreateTypingContext';
23
25
  import { useTargetedMessage } from './hooks/useTargetedMessage';
24
- import { heavyDebounce } from './utils/debounce';
25
- import { lightThrottle } from './utils/throttle';
26
26
 
27
27
  import { Attachment as AttachmentDefault } from '../Attachment/Attachment';
28
28
  import { AttachmentActions as AttachmentActionsDefault } from '../Attachment/AttachmentActions';
@@ -157,6 +157,17 @@ export const reactionData: ReactionData[] = [
157
157
  */
158
158
  const scrollToFirstUnreadThreshold = 4;
159
159
 
160
+ const defaultThrottleInterval = 500;
161
+ const defaultDebounceInterval = 500;
162
+ const throttleOptions = {
163
+ leading: false,
164
+ trailing: true,
165
+ };
166
+ const debounceOptions = {
167
+ leading: true,
168
+ trailing: true,
169
+ };
170
+
160
171
  /**
161
172
  * Number of unread messages to show in first frame, when channel loads at first
162
173
  * unread message. Only applicable if unread count > scrollToFirstUnreadThreshold.
@@ -359,6 +370,7 @@ export type ChannelPropsWithContext<
359
370
  quotedRepliesEnabled?: boolean;
360
371
  reactionsEnabled?: boolean;
361
372
  readEventsEnabled?: boolean;
373
+ stateUpdateThrottleInterval?: number;
362
374
  threadRepliesEnabled?: boolean;
363
375
  typingEventsEnabled?: boolean;
364
376
  uploadsEnabled?: boolean;
@@ -501,6 +513,7 @@ const ChannelWithContext = <
501
513
  sendImageAsync = false,
502
514
  setInputRef,
503
515
  ShowThreadMessageInChannelButton = ShowThreadMessageInChannelButtonDefault,
516
+ stateUpdateThrottleInterval = defaultThrottleInterval,
504
517
  StickyHeader,
505
518
  supportedReactions = reactionData,
506
519
  t,
@@ -645,43 +658,65 @@ const ChannelWithContext = <
645
658
  /**
646
659
  * CHANNEL METHODS
647
660
  */
648
- const markRead: ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>['markRead'] = lightThrottle(
649
- () => {
650
- if (channel?.disconnected || !channel?.getConfig?.()?.read_events) {
651
- return;
652
- }
653
-
654
- if (doMarkReadRequest) {
655
- doMarkReadRequest(channel);
656
- } else {
657
- logChatPromiseExecution(channel.markRead(), 'mark read');
658
- }
659
- },
660
- );
661
-
662
- const copyTypingState = lightThrottle(() => {
663
- if (channel) {
664
- setTyping({ ...channel.state.typing });
665
- }
666
- });
667
-
668
- const copyReadState = lightThrottle(() => {
669
- if (channel) {
670
- setRead({ ...channel.state.read });
671
- }
672
- });
661
+ const markRead: ChannelContextValue<At, Ch, Co, Ev, Me, Re, Us>['markRead'] = useRef(
662
+ throttle(
663
+ () => {
664
+ if (channel?.disconnected || !channel?.getConfig?.()?.read_events) {
665
+ return;
666
+ }
673
667
 
674
- const copyChannelState = lightThrottle(() => {
675
- setLoading(false);
676
- if (channel) {
677
- setMembers({ ...channel.state.members });
678
- setMessages([...channel.state.messages]);
679
- setRead({ ...channel.state.read });
680
- setTyping({ ...channel.state.typing });
681
- setWatcherCount(channel.state.watcher_count);
682
- setWatchers({ ...channel.state.watchers });
683
- }
684
- });
668
+ if (doMarkReadRequest) {
669
+ doMarkReadRequest(channel);
670
+ } else {
671
+ logChatPromiseExecution(channel.markRead(), 'mark read');
672
+ }
673
+ },
674
+ defaultThrottleInterval,
675
+ throttleOptions,
676
+ ),
677
+ ).current;
678
+
679
+ const copyTypingState = useRef(
680
+ throttle(
681
+ () => {
682
+ if (channel) {
683
+ setTyping({ ...channel.state.typing });
684
+ }
685
+ },
686
+ stateUpdateThrottleInterval,
687
+ throttleOptions,
688
+ ),
689
+ ).current;
690
+
691
+ const copyReadState = useRef(
692
+ throttle(
693
+ () => {
694
+ if (channel) {
695
+ setRead({ ...channel.state.read });
696
+ }
697
+ },
698
+ stateUpdateThrottleInterval,
699
+ throttleOptions,
700
+ ),
701
+ ).current;
702
+
703
+ const copyChannelState = useRef(
704
+ throttle(
705
+ () => {
706
+ setLoading(false);
707
+ if (channel) {
708
+ setMembers({ ...channel.state.members });
709
+ setMessages([...channel.state.messages]);
710
+ setRead({ ...channel.state.read });
711
+ setTyping({ ...channel.state.typing });
712
+ setWatcherCount(channel.state.watcher_count);
713
+ setWatchers({ ...channel.state.watchers });
714
+ }
715
+ },
716
+ stateUpdateThrottleInterval,
717
+ throttleOptions,
718
+ ),
719
+ ).current;
685
720
 
686
721
  const connectionRecoveredHandler = () => {
687
722
  if (channel) {
@@ -1302,17 +1337,21 @@ const ChannelWithContext = <
1302
1337
  };
1303
1338
 
1304
1339
  // hard limit to prevent you from scrolling faster than 1 page per 2 seconds
1305
- const loadMoreFinished = heavyDebounce(
1306
- (
1307
- updatedHasMore: boolean,
1308
- newMessages: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['messages'],
1309
- ) => {
1310
- setLoadingMore(false);
1311
- setError(false);
1312
- setHasMore(updatedHasMore);
1313
- setMessages(newMessages);
1314
- },
1315
- );
1340
+ const loadMoreFinished = useRef(
1341
+ debounce(
1342
+ (
1343
+ updatedHasMore: boolean,
1344
+ newMessages: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['messages'],
1345
+ ) => {
1346
+ setLoadingMore(false);
1347
+ setError(false);
1348
+ setHasMore(updatedHasMore);
1349
+ setMessages(newMessages);
1350
+ },
1351
+ defaultDebounceInterval,
1352
+ debounceOptions,
1353
+ ),
1354
+ ).current;
1316
1355
 
1317
1356
  const loadMore: PaginatedMessageListContextValue<At, Ch, Co, Ev, Me, Re, Us>['loadMore'] = async (
1318
1357
  limit = 20,
@@ -1387,13 +1426,17 @@ const ChannelWithContext = <
1387
1426
  };
1388
1427
 
1389
1428
  // hard limit to prevent you from scrolling faster than 1 page per 2 seconds
1390
- const loadMoreRecentFinished = heavyDebounce(
1391
- (newMessages: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['messages']) => {
1392
- setLoadingMoreRecent(false);
1393
- setMessages(newMessages);
1394
- setError(false);
1395
- },
1396
- );
1429
+ const loadMoreRecentFinished = useRef(
1430
+ debounce(
1431
+ (newMessages: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['messages']) => {
1432
+ setLoadingMoreRecent(false);
1433
+ setMessages(newMessages);
1434
+ setError(false);
1435
+ },
1436
+ defaultDebounceInterval,
1437
+ debounceOptions,
1438
+ ),
1439
+ ).current;
1397
1440
 
1398
1441
  const editMessage: InputMessageInputContextValue<At, Ch, Co, Ev, Me, Re, Us>['editMessage'] = (
1399
1442
  updatedMessage,
@@ -1468,16 +1511,20 @@ const ChannelWithContext = <
1468
1511
  }, [setThread, setThreadMessages]);
1469
1512
 
1470
1513
  // hard limit to prevent you from scrolling faster than 1 page per 2 seconds
1471
- const loadMoreThreadFinished = heavyDebounce(
1472
- (
1473
- newThreadHasMore: boolean,
1474
- updatedThreadMessages: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['threads'][string],
1475
- ) => {
1476
- setThreadHasMore(newThreadHasMore);
1477
- setThreadLoadingMore(false);
1478
- setThreadMessages(updatedThreadMessages);
1479
- },
1480
- );
1514
+ const loadMoreThreadFinished = useRef(
1515
+ debounce(
1516
+ (
1517
+ newThreadHasMore: boolean,
1518
+ updatedThreadMessages: ChannelState<At, Ch, Co, Ev, Me, Re, Us>['threads'][string],
1519
+ ) => {
1520
+ setThreadHasMore(newThreadHasMore);
1521
+ setThreadLoadingMore(false);
1522
+ setThreadMessages(updatedThreadMessages);
1523
+ },
1524
+ defaultDebounceInterval,
1525
+ debounceOptions,
1526
+ ),
1527
+ ).current;
1481
1528
 
1482
1529
  const loadMoreThread: ThreadContextValue<At, Ch, Co, Ev, Me, Re, Us>['loadMoreThread'] =
1483
1530
  async () => {