stream-chat-react-native-core 9.0.0-beta.31 → 9.0.0-beta.33

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 (598) hide show
  1. package/lib/commonjs/components/Attachment/Attachment.js +15 -52
  2. package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
  3. package/lib/commonjs/components/Attachment/FileAttachment.js +4 -6
  4. package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
  5. package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +4 -10
  6. package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
  7. package/lib/commonjs/components/Attachment/FilePreview.js +3 -6
  8. package/lib/commonjs/components/Attachment/FilePreview.js.map +1 -1
  9. package/lib/commonjs/components/Attachment/Gallery.js +9 -28
  10. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  11. package/lib/commonjs/components/Attachment/GalleryImage.js +3 -3
  12. package/lib/commonjs/components/Attachment/GalleryImage.js.map +1 -1
  13. package/lib/commonjs/components/Attachment/Giphy/GiphyImage.js +7 -13
  14. package/lib/commonjs/components/Attachment/Giphy/GiphyImage.js.map +1 -1
  15. package/lib/commonjs/components/Attachment/UnsupportedAttachment.js +4 -6
  16. package/lib/commonjs/components/Attachment/UnsupportedAttachment.js.map +1 -1
  17. package/lib/commonjs/components/Attachment/UrlPreview/URLPreview.js +3 -3
  18. package/lib/commonjs/components/Attachment/UrlPreview/URLPreview.js.map +1 -1
  19. package/lib/commonjs/components/Attachment/UrlPreview/URLPreviewCompact.js +3 -3
  20. package/lib/commonjs/components/Attachment/UrlPreview/URLPreviewCompact.js.map +1 -1
  21. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +4 -2
  22. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  23. package/lib/commonjs/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js +7 -4
  24. package/lib/commonjs/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js.map +1 -1
  25. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +9 -13
  26. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  27. package/lib/commonjs/components/Channel/Channel.js +9 -421
  28. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  29. package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js +0 -8
  30. package/lib/commonjs/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
  31. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +3 -77
  32. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  33. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +2 -134
  34. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  35. package/lib/commonjs/components/ChannelList/ChannelList.js +1 -57
  36. package/lib/commonjs/components/ChannelList/ChannelList.js.map +1 -1
  37. package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js +4 -2
  38. package/lib/commonjs/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
  39. package/lib/commonjs/components/ChannelList/ChannelListView.js +14 -23
  40. package/lib/commonjs/components/ChannelList/ChannelListView.js.map +1 -1
  41. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js +1 -39
  42. package/lib/commonjs/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  43. package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js +3 -2
  44. package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
  45. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +6 -8
  46. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
  47. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +12 -24
  48. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  49. package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js +15 -35
  50. package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
  51. package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js +3 -3
  52. package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
  53. package/lib/commonjs/components/Chat/Chat.js +4 -6
  54. package/lib/commonjs/components/Chat/Chat.js.map +1 -1
  55. package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js +0 -2
  56. package/lib/commonjs/components/Chat/hooks/useCreateChatContext.js.map +1 -1
  57. package/lib/commonjs/components/ImageGallery/ImageGallery.js +7 -9
  58. package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
  59. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +4 -2
  60. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  61. package/lib/commonjs/components/Message/Message.js +9 -13
  62. package/lib/commonjs/components/Message/Message.js.map +1 -1
  63. package/lib/commonjs/components/Message/MessageItemView/MessageBubble.js +4 -2
  64. package/lib/commonjs/components/Message/MessageItemView/MessageBubble.js.map +1 -1
  65. package/lib/commonjs/components/Message/MessageItemView/MessageContent.js +18 -39
  66. package/lib/commonjs/components/Message/MessageItemView/MessageContent.js.map +1 -1
  67. package/lib/commonjs/components/Message/MessageItemView/MessageDeleted.js +5 -7
  68. package/lib/commonjs/components/Message/MessageItemView/MessageDeleted.js.map +1 -1
  69. package/lib/commonjs/components/Message/MessageItemView/MessageFooter.js +4 -8
  70. package/lib/commonjs/components/Message/MessageItemView/MessageFooter.js.map +1 -1
  71. package/lib/commonjs/components/Message/MessageItemView/MessageHeader.js +8 -16
  72. package/lib/commonjs/components/Message/MessageItemView/MessageHeader.js.map +1 -1
  73. package/lib/commonjs/components/Message/MessageItemView/MessageItemView.js +13 -35
  74. package/lib/commonjs/components/Message/MessageItemView/MessageItemView.js.map +1 -1
  75. package/lib/commonjs/components/Message/MessageItemView/MessageReplies.js +3 -5
  76. package/lib/commonjs/components/Message/MessageItemView/MessageReplies.js.map +1 -1
  77. package/lib/commonjs/components/Message/MessageItemView/MessageTextContainer.js +3 -3
  78. package/lib/commonjs/components/Message/MessageItemView/MessageTextContainer.js.map +1 -1
  79. package/lib/commonjs/components/Message/MessageItemView/MessageWrapper.js +6 -4
  80. package/lib/commonjs/components/Message/MessageItemView/MessageWrapper.js.map +1 -1
  81. package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListBottom.js +6 -8
  82. package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListBottom.js.map +1 -1
  83. package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListTop.js +7 -11
  84. package/lib/commonjs/components/Message/MessageItemView/ReactionList/ReactionListTop.js.map +1 -1
  85. package/lib/commonjs/components/MessageInput/MessageComposer.js +15 -55
  86. package/lib/commonjs/components/MessageInput/MessageComposer.js.map +1 -1
  87. package/lib/commonjs/components/MessageInput/MessageInputHeaderView.js +5 -5
  88. package/lib/commonjs/components/MessageInput/MessageInputHeaderView.js.map +1 -1
  89. package/lib/commonjs/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.js +9 -17
  90. package/lib/commonjs/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.js.map +1 -1
  91. package/lib/commonjs/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.js +5 -5
  92. package/lib/commonjs/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.js.map +1 -1
  93. package/lib/commonjs/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.js +5 -5
  94. package/lib/commonjs/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.js.map +1 -1
  95. package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js +5 -5
  96. package/lib/commonjs/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js.map +1 -1
  97. package/lib/commonjs/components/MessageInput/components/InputButtons/index.js +4 -4
  98. package/lib/commonjs/components/MessageInput/components/InputButtons/index.js.map +1 -1
  99. package/lib/commonjs/components/MessageInput/components/LinkPreviewList.js +3 -2
  100. package/lib/commonjs/components/MessageInput/components/LinkPreviewList.js.map +1 -1
  101. package/lib/commonjs/components/MessageInput/components/OutputButtons/index.js +7 -13
  102. package/lib/commonjs/components/MessageInput/components/OutputButtons/index.js.map +1 -1
  103. package/lib/commonjs/components/MessageList/MessageFlashList.js +14 -40
  104. package/lib/commonjs/components/MessageList/MessageFlashList.js.map +1 -1
  105. package/lib/commonjs/components/MessageList/MessageList.js +12 -38
  106. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  107. package/lib/commonjs/components/MessageList/StickyHeader.js +3 -1
  108. package/lib/commonjs/components/MessageList/StickyHeader.js.map +1 -1
  109. package/lib/commonjs/components/MessageList/hooks/useMessageList.js +2 -35
  110. package/lib/commonjs/components/MessageList/hooks/useMessageList.js.map +1 -1
  111. package/lib/commonjs/components/MessageMenu/MessageActionList.js +4 -2
  112. package/lib/commonjs/components/MessageMenu/MessageActionList.js.map +1 -1
  113. package/lib/commonjs/components/MessageMenu/MessageMenu.js.map +1 -1
  114. package/lib/commonjs/components/MessageMenu/MessageUserReactions.js +4 -8
  115. package/lib/commonjs/components/MessageMenu/MessageUserReactions.js.map +1 -1
  116. package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js +4 -2
  117. package/lib/commonjs/components/MessageMenu/MessageUserReactionsItem.js.map +1 -1
  118. package/lib/commonjs/components/Poll/CreatePollContent.js +3 -1
  119. package/lib/commonjs/components/Poll/CreatePollContent.js.map +1 -1
  120. package/lib/commonjs/components/Poll/Poll.js +12 -9
  121. package/lib/commonjs/components/Poll/Poll.js.map +1 -1
  122. package/lib/commonjs/components/Poll/components/PollAnswersList.js +5 -3
  123. package/lib/commonjs/components/Poll/components/PollAnswersList.js.map +1 -1
  124. package/lib/commonjs/components/Poll/components/PollOption.js +5 -3
  125. package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
  126. package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js +5 -5
  127. package/lib/commonjs/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -1
  128. package/lib/commonjs/components/Poll/components/PollResults/PollResults.js +5 -3
  129. package/lib/commonjs/components/Poll/components/PollResults/PollResults.js.map +1 -1
  130. package/lib/commonjs/components/Reply/Reply.js +4 -2
  131. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  132. package/lib/commonjs/components/Thread/Thread.js +4 -8
  133. package/lib/commonjs/components/Thread/Thread.js.map +1 -1
  134. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js +4 -6
  135. package/lib/commonjs/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  136. package/lib/commonjs/components/ThreadList/ThreadList.js +12 -15
  137. package/lib/commonjs/components/ThreadList/ThreadList.js.map +1 -1
  138. package/lib/commonjs/components/ThreadList/ThreadListItem.js +8 -11
  139. package/lib/commonjs/components/ThreadList/ThreadListItem.js.map +1 -1
  140. package/lib/commonjs/components/ui/Avatar/Avatar.js +3 -3
  141. package/lib/commonjs/components/ui/Avatar/Avatar.js.map +1 -1
  142. package/lib/commonjs/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
  143. package/lib/commonjs/contexts/channelContext/ChannelContext.js.map +1 -1
  144. package/lib/commonjs/contexts/channelsContext/ChannelsContext.js.map +1 -1
  145. package/lib/commonjs/contexts/chatContext/ChatContext.js.map +1 -1
  146. package/lib/commonjs/contexts/componentsContext/ComponentsContext.js +37 -0
  147. package/lib/commonjs/contexts/componentsContext/ComponentsContext.js.map +1 -0
  148. package/lib/commonjs/contexts/componentsContext/PLAN.md +148 -0
  149. package/lib/commonjs/contexts/componentsContext/defaultComponents.js +287 -0
  150. package/lib/commonjs/contexts/componentsContext/defaultComponents.js.map +1 -0
  151. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +1 -9
  152. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  153. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContextBase.js.map +1 -1
  154. package/lib/commonjs/contexts/index.js +11 -0
  155. package/lib/commonjs/contexts/index.js.map +1 -1
  156. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  157. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -76
  158. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  159. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  160. package/lib/commonjs/contexts/overlayContext/MessageOverlayHostLayer.js +37 -27
  161. package/lib/commonjs/contexts/overlayContext/MessageOverlayHostLayer.js.map +1 -1
  162. package/lib/commonjs/contexts/overlayContext/OverlayContext.js.map +1 -1
  163. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +1 -4
  164. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
  165. package/lib/commonjs/contexts/threadsContext/ThreadsContext.js.map +1 -1
  166. package/lib/commonjs/version.json +1 -1
  167. package/lib/module/components/Attachment/Attachment.js +15 -52
  168. package/lib/module/components/Attachment/Attachment.js.map +1 -1
  169. package/lib/module/components/Attachment/FileAttachment.js +4 -6
  170. package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
  171. package/lib/module/components/Attachment/FileAttachmentGroup.js +4 -10
  172. package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
  173. package/lib/module/components/Attachment/FilePreview.js +3 -6
  174. package/lib/module/components/Attachment/FilePreview.js.map +1 -1
  175. package/lib/module/components/Attachment/Gallery.js +9 -28
  176. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  177. package/lib/module/components/Attachment/GalleryImage.js +3 -3
  178. package/lib/module/components/Attachment/GalleryImage.js.map +1 -1
  179. package/lib/module/components/Attachment/Giphy/GiphyImage.js +7 -13
  180. package/lib/module/components/Attachment/Giphy/GiphyImage.js.map +1 -1
  181. package/lib/module/components/Attachment/UnsupportedAttachment.js +4 -6
  182. package/lib/module/components/Attachment/UnsupportedAttachment.js.map +1 -1
  183. package/lib/module/components/Attachment/UrlPreview/URLPreview.js +3 -3
  184. package/lib/module/components/Attachment/UrlPreview/URLPreview.js.map +1 -1
  185. package/lib/module/components/Attachment/UrlPreview/URLPreviewCompact.js +3 -3
  186. package/lib/module/components/Attachment/UrlPreview/URLPreviewCompact.js.map +1 -1
  187. package/lib/module/components/AttachmentPicker/AttachmentPicker.js +4 -2
  188. package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  189. package/lib/module/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js +7 -4
  190. package/lib/module/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.js.map +1 -1
  191. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +9 -13
  192. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  193. package/lib/module/components/Channel/Channel.js +9 -421
  194. package/lib/module/components/Channel/Channel.js.map +1 -1
  195. package/lib/module/components/Channel/hooks/useCreateChannelContext.js +0 -8
  196. package/lib/module/components/Channel/hooks/useCreateChannelContext.js.map +1 -1
  197. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +3 -77
  198. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  199. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +2 -134
  200. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  201. package/lib/module/components/ChannelList/ChannelList.js +1 -57
  202. package/lib/module/components/ChannelList/ChannelList.js.map +1 -1
  203. package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js +4 -2
  204. package/lib/module/components/ChannelList/ChannelListLoadingIndicator.js.map +1 -1
  205. package/lib/module/components/ChannelList/ChannelListView.js +14 -23
  206. package/lib/module/components/ChannelList/ChannelListView.js.map +1 -1
  207. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js +1 -39
  208. package/lib/module/components/ChannelList/hooks/useCreateChannelsContext.js.map +1 -1
  209. package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js +3 -2
  210. package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
  211. package/lib/module/components/ChannelPreview/ChannelPreview.js +6 -8
  212. package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
  213. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +12 -24
  214. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  215. package/lib/module/components/ChannelPreview/ChannelPreviewView.js +15 -35
  216. package/lib/module/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
  217. package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js +3 -3
  218. package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
  219. package/lib/module/components/Chat/Chat.js +4 -6
  220. package/lib/module/components/Chat/Chat.js.map +1 -1
  221. package/lib/module/components/Chat/hooks/useCreateChatContext.js +0 -2
  222. package/lib/module/components/Chat/hooks/useCreateChatContext.js.map +1 -1
  223. package/lib/module/components/ImageGallery/ImageGallery.js +7 -9
  224. package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
  225. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +4 -2
  226. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  227. package/lib/module/components/Message/Message.js +9 -13
  228. package/lib/module/components/Message/Message.js.map +1 -1
  229. package/lib/module/components/Message/MessageItemView/MessageBubble.js +4 -2
  230. package/lib/module/components/Message/MessageItemView/MessageBubble.js.map +1 -1
  231. package/lib/module/components/Message/MessageItemView/MessageContent.js +18 -39
  232. package/lib/module/components/Message/MessageItemView/MessageContent.js.map +1 -1
  233. package/lib/module/components/Message/MessageItemView/MessageDeleted.js +5 -7
  234. package/lib/module/components/Message/MessageItemView/MessageDeleted.js.map +1 -1
  235. package/lib/module/components/Message/MessageItemView/MessageFooter.js +4 -8
  236. package/lib/module/components/Message/MessageItemView/MessageFooter.js.map +1 -1
  237. package/lib/module/components/Message/MessageItemView/MessageHeader.js +8 -16
  238. package/lib/module/components/Message/MessageItemView/MessageHeader.js.map +1 -1
  239. package/lib/module/components/Message/MessageItemView/MessageItemView.js +13 -35
  240. package/lib/module/components/Message/MessageItemView/MessageItemView.js.map +1 -1
  241. package/lib/module/components/Message/MessageItemView/MessageReplies.js +3 -5
  242. package/lib/module/components/Message/MessageItemView/MessageReplies.js.map +1 -1
  243. package/lib/module/components/Message/MessageItemView/MessageTextContainer.js +3 -3
  244. package/lib/module/components/Message/MessageItemView/MessageTextContainer.js.map +1 -1
  245. package/lib/module/components/Message/MessageItemView/MessageWrapper.js +6 -4
  246. package/lib/module/components/Message/MessageItemView/MessageWrapper.js.map +1 -1
  247. package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListBottom.js +6 -8
  248. package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListBottom.js.map +1 -1
  249. package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListTop.js +7 -11
  250. package/lib/module/components/Message/MessageItemView/ReactionList/ReactionListTop.js.map +1 -1
  251. package/lib/module/components/MessageInput/MessageComposer.js +15 -55
  252. package/lib/module/components/MessageInput/MessageComposer.js.map +1 -1
  253. package/lib/module/components/MessageInput/MessageInputHeaderView.js +5 -5
  254. package/lib/module/components/MessageInput/MessageInputHeaderView.js.map +1 -1
  255. package/lib/module/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.js +9 -17
  256. package/lib/module/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.js.map +1 -1
  257. package/lib/module/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.js +5 -5
  258. package/lib/module/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.js.map +1 -1
  259. package/lib/module/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.js +5 -5
  260. package/lib/module/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.js.map +1 -1
  261. package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js +5 -5
  262. package/lib/module/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.js.map +1 -1
  263. package/lib/module/components/MessageInput/components/InputButtons/index.js +4 -4
  264. package/lib/module/components/MessageInput/components/InputButtons/index.js.map +1 -1
  265. package/lib/module/components/MessageInput/components/LinkPreviewList.js +3 -2
  266. package/lib/module/components/MessageInput/components/LinkPreviewList.js.map +1 -1
  267. package/lib/module/components/MessageInput/components/OutputButtons/index.js +7 -13
  268. package/lib/module/components/MessageInput/components/OutputButtons/index.js.map +1 -1
  269. package/lib/module/components/MessageList/MessageFlashList.js +14 -40
  270. package/lib/module/components/MessageList/MessageFlashList.js.map +1 -1
  271. package/lib/module/components/MessageList/MessageList.js +12 -38
  272. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  273. package/lib/module/components/MessageList/StickyHeader.js +3 -1
  274. package/lib/module/components/MessageList/StickyHeader.js.map +1 -1
  275. package/lib/module/components/MessageList/hooks/useMessageList.js +2 -35
  276. package/lib/module/components/MessageList/hooks/useMessageList.js.map +1 -1
  277. package/lib/module/components/MessageMenu/MessageActionList.js +4 -2
  278. package/lib/module/components/MessageMenu/MessageActionList.js.map +1 -1
  279. package/lib/module/components/MessageMenu/MessageMenu.js.map +1 -1
  280. package/lib/module/components/MessageMenu/MessageUserReactions.js +4 -8
  281. package/lib/module/components/MessageMenu/MessageUserReactions.js.map +1 -1
  282. package/lib/module/components/MessageMenu/MessageUserReactionsItem.js +4 -2
  283. package/lib/module/components/MessageMenu/MessageUserReactionsItem.js.map +1 -1
  284. package/lib/module/components/Poll/CreatePollContent.js +3 -1
  285. package/lib/module/components/Poll/CreatePollContent.js.map +1 -1
  286. package/lib/module/components/Poll/Poll.js +12 -9
  287. package/lib/module/components/Poll/Poll.js.map +1 -1
  288. package/lib/module/components/Poll/components/PollAnswersList.js +5 -3
  289. package/lib/module/components/Poll/components/PollAnswersList.js.map +1 -1
  290. package/lib/module/components/Poll/components/PollOption.js +5 -3
  291. package/lib/module/components/Poll/components/PollOption.js.map +1 -1
  292. package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js +5 -5
  293. package/lib/module/components/Poll/components/PollResults/PollOptionFullResults.js.map +1 -1
  294. package/lib/module/components/Poll/components/PollResults/PollResults.js +5 -3
  295. package/lib/module/components/Poll/components/PollResults/PollResults.js.map +1 -1
  296. package/lib/module/components/Reply/Reply.js +4 -2
  297. package/lib/module/components/Reply/Reply.js.map +1 -1
  298. package/lib/module/components/Thread/Thread.js +4 -8
  299. package/lib/module/components/Thread/Thread.js.map +1 -1
  300. package/lib/module/components/Thread/components/ThreadFooterComponent.js +4 -6
  301. package/lib/module/components/Thread/components/ThreadFooterComponent.js.map +1 -1
  302. package/lib/module/components/ThreadList/ThreadList.js +12 -15
  303. package/lib/module/components/ThreadList/ThreadList.js.map +1 -1
  304. package/lib/module/components/ThreadList/ThreadListItem.js +8 -11
  305. package/lib/module/components/ThreadList/ThreadListItem.js.map +1 -1
  306. package/lib/module/components/ui/Avatar/Avatar.js +3 -3
  307. package/lib/module/components/ui/Avatar/Avatar.js.map +1 -1
  308. package/lib/module/contexts/attachmentPickerContext/AttachmentPickerContext.js.map +1 -1
  309. package/lib/module/contexts/channelContext/ChannelContext.js.map +1 -1
  310. package/lib/module/contexts/channelsContext/ChannelsContext.js.map +1 -1
  311. package/lib/module/contexts/chatContext/ChatContext.js.map +1 -1
  312. package/lib/module/contexts/componentsContext/ComponentsContext.js +37 -0
  313. package/lib/module/contexts/componentsContext/ComponentsContext.js.map +1 -0
  314. package/lib/module/contexts/componentsContext/PLAN.md +148 -0
  315. package/lib/module/contexts/componentsContext/defaultComponents.js +287 -0
  316. package/lib/module/contexts/componentsContext/defaultComponents.js.map +1 -0
  317. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +1 -9
  318. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  319. package/lib/module/contexts/imageGalleryContext/ImageGalleryContextBase.js.map +1 -1
  320. package/lib/module/contexts/index.js +11 -0
  321. package/lib/module/contexts/index.js.map +1 -1
  322. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  323. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +2 -76
  324. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  325. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  326. package/lib/module/contexts/overlayContext/MessageOverlayHostLayer.js +37 -27
  327. package/lib/module/contexts/overlayContext/MessageOverlayHostLayer.js.map +1 -1
  328. package/lib/module/contexts/overlayContext/OverlayContext.js.map +1 -1
  329. package/lib/module/contexts/overlayContext/OverlayProvider.js +1 -4
  330. package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
  331. package/lib/module/contexts/threadsContext/ThreadsContext.js.map +1 -1
  332. package/lib/module/version.json +1 -1
  333. package/lib/typescript/components/Attachment/Attachment.d.ts +1 -1
  334. package/lib/typescript/components/Attachment/Attachment.d.ts.map +1 -1
  335. package/lib/typescript/components/Attachment/FileAttachment.d.ts +1 -1
  336. package/lib/typescript/components/Attachment/FileAttachment.d.ts.map +1 -1
  337. package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +1 -2
  338. package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts.map +1 -1
  339. package/lib/typescript/components/Attachment/FilePreview.d.ts +2 -3
  340. package/lib/typescript/components/Attachment/FilePreview.d.ts.map +1 -1
  341. package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
  342. package/lib/typescript/components/Attachment/Gallery.d.ts.map +1 -1
  343. package/lib/typescript/components/Attachment/GalleryImage.d.ts +3 -2
  344. package/lib/typescript/components/Attachment/GalleryImage.d.ts.map +1 -1
  345. package/lib/typescript/components/Attachment/Giphy/GiphyImage.d.ts +4 -2
  346. package/lib/typescript/components/Attachment/Giphy/GiphyImage.d.ts.map +1 -1
  347. package/lib/typescript/components/Attachment/UnsupportedAttachment.d.ts +2 -3
  348. package/lib/typescript/components/Attachment/UnsupportedAttachment.d.ts.map +1 -1
  349. package/lib/typescript/components/Attachment/UrlPreview/URLPreview.d.ts +4 -3
  350. package/lib/typescript/components/Attachment/UrlPreview/URLPreview.d.ts.map +1 -1
  351. package/lib/typescript/components/Attachment/UrlPreview/URLPreviewCompact.d.ts +4 -3
  352. package/lib/typescript/components/Attachment/UrlPreview/URLPreviewCompact.d.ts.map +1 -1
  353. package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts.map +1 -1
  354. package/lib/typescript/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.d.ts.map +1 -1
  355. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts +2 -3
  356. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts.map +1 -1
  357. package/lib/typescript/components/Channel/Channel.d.ts +3 -28
  358. package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
  359. package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts +1 -1
  360. package/lib/typescript/components/Channel/hooks/useCreateChannelContext.d.ts.map +1 -1
  361. package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
  362. package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
  363. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
  364. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts.map +1 -1
  365. package/lib/typescript/components/Channel/hooks/useMessageListPagination.d.ts.map +1 -1
  366. package/lib/typescript/components/ChannelList/ChannelList.d.ts +2 -10
  367. package/lib/typescript/components/ChannelList/ChannelList.d.ts.map +1 -1
  368. package/lib/typescript/components/ChannelList/ChannelListLoadingIndicator.d.ts.map +1 -1
  369. package/lib/typescript/components/ChannelList/ChannelListView.d.ts +1 -1
  370. package/lib/typescript/components/ChannelList/ChannelListView.d.ts.map +1 -1
  371. package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts +1 -1
  372. package/lib/typescript/components/ChannelList/hooks/useCreateChannelsContext.d.ts.map +1 -1
  373. package/lib/typescript/components/ChannelPreview/ChannelDetailsBottomSheet.d.ts +1 -2
  374. package/lib/typescript/components/ChannelPreview/ChannelDetailsBottomSheet.d.ts.map +1 -1
  375. package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts +1 -1
  376. package/lib/typescript/components/ChannelPreview/ChannelPreview.d.ts.map +1 -1
  377. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts +1 -2
  378. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts.map +1 -1
  379. package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts +1 -1
  380. package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts.map +1 -1
  381. package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts +1 -3
  382. package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts.map +1 -1
  383. package/lib/typescript/components/Chat/Chat.d.ts +1 -7
  384. package/lib/typescript/components/Chat/Chat.d.ts.map +1 -1
  385. package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts +1 -1
  386. package/lib/typescript/components/Chat/hooks/useCreateChatContext.d.ts.map +1 -1
  387. package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +6 -1
  388. package/lib/typescript/components/ImageGallery/ImageGallery.d.ts.map +1 -1
  389. package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts.map +1 -1
  390. package/lib/typescript/components/ImageGallery/components/types.d.ts +0 -2
  391. package/lib/typescript/components/ImageGallery/components/types.d.ts.map +1 -1
  392. package/lib/typescript/components/Message/Message.d.ts +1 -1
  393. package/lib/typescript/components/Message/Message.d.ts.map +1 -1
  394. package/lib/typescript/components/Message/MessageItemView/MessageBubble.d.ts +1 -2
  395. package/lib/typescript/components/Message/MessageItemView/MessageBubble.d.ts.map +1 -1
  396. package/lib/typescript/components/Message/MessageItemView/MessageContent.d.ts +1 -1
  397. package/lib/typescript/components/Message/MessageItemView/MessageContent.d.ts.map +1 -1
  398. package/lib/typescript/components/Message/MessageItemView/MessageDeleted.d.ts +1 -2
  399. package/lib/typescript/components/Message/MessageItemView/MessageDeleted.d.ts.map +1 -1
  400. package/lib/typescript/components/Message/MessageItemView/MessageFooter.d.ts +0 -2
  401. package/lib/typescript/components/Message/MessageItemView/MessageFooter.d.ts.map +1 -1
  402. package/lib/typescript/components/Message/MessageItemView/MessageHeader.d.ts.map +1 -1
  403. package/lib/typescript/components/Message/MessageItemView/MessageItemView.d.ts +1 -1
  404. package/lib/typescript/components/Message/MessageItemView/MessageItemView.d.ts.map +1 -1
  405. package/lib/typescript/components/Message/MessageItemView/MessageReplies.d.ts +1 -2
  406. package/lib/typescript/components/Message/MessageItemView/MessageReplies.d.ts.map +1 -1
  407. package/lib/typescript/components/Message/MessageItemView/MessageTextContainer.d.ts +1 -1
  408. package/lib/typescript/components/Message/MessageItemView/MessageTextContainer.d.ts.map +1 -1
  409. package/lib/typescript/components/Message/MessageItemView/MessageWrapper.d.ts.map +1 -1
  410. package/lib/typescript/components/Message/MessageItemView/ReactionList/ReactionListBottom.d.ts +1 -1
  411. package/lib/typescript/components/Message/MessageItemView/ReactionList/ReactionListBottom.d.ts.map +1 -1
  412. package/lib/typescript/components/Message/MessageItemView/ReactionList/ReactionListTop.d.ts +1 -1
  413. package/lib/typescript/components/Message/MessageItemView/ReactionList/ReactionListTop.d.ts.map +1 -1
  414. package/lib/typescript/components/MessageInput/MessageComposer.d.ts +1 -2
  415. package/lib/typescript/components/MessageInput/MessageComposer.d.ts.map +1 -1
  416. package/lib/typescript/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.d.ts +3 -4
  417. package/lib/typescript/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.d.ts.map +1 -1
  418. package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.d.ts +1 -1
  419. package/lib/typescript/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.d.ts.map +1 -1
  420. package/lib/typescript/components/MessageInput/components/InputButtons/index.d.ts +1 -1
  421. package/lib/typescript/components/MessageInput/components/InputButtons/index.d.ts.map +1 -1
  422. package/lib/typescript/components/MessageInput/components/LinkPreviewList.d.ts.map +1 -1
  423. package/lib/typescript/components/MessageInput/components/OutputButtons/index.d.ts +1 -1
  424. package/lib/typescript/components/MessageInput/components/OutputButtons/index.d.ts.map +1 -1
  425. package/lib/typescript/components/MessageList/MessageFlashList.d.ts +1 -1
  426. package/lib/typescript/components/MessageList/MessageFlashList.d.ts.map +1 -1
  427. package/lib/typescript/components/MessageList/MessageList.d.ts +1 -1
  428. package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
  429. package/lib/typescript/components/MessageList/StickyHeader.d.ts +2 -3
  430. package/lib/typescript/components/MessageList/StickyHeader.d.ts.map +1 -1
  431. package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts +0 -5
  432. package/lib/typescript/components/MessageList/hooks/useMessageList.d.ts.map +1 -1
  433. package/lib/typescript/components/MessageMenu/MessageActionList.d.ts +1 -2
  434. package/lib/typescript/components/MessageMenu/MessageActionList.d.ts.map +1 -1
  435. package/lib/typescript/components/MessageMenu/MessageMenu.d.ts +1 -2
  436. package/lib/typescript/components/MessageMenu/MessageMenu.d.ts.map +1 -1
  437. package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts +1 -1
  438. package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts.map +1 -1
  439. package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts +2 -3
  440. package/lib/typescript/components/MessageMenu/MessageUserReactionsItem.d.ts.map +1 -1
  441. package/lib/typescript/components/Poll/CreatePollContent.d.ts +2 -2
  442. package/lib/typescript/components/Poll/CreatePollContent.d.ts.map +1 -1
  443. package/lib/typescript/components/Poll/Poll.d.ts +5 -8
  444. package/lib/typescript/components/Poll/Poll.d.ts.map +1 -1
  445. package/lib/typescript/components/Poll/components/PollAnswersList.d.ts +1 -2
  446. package/lib/typescript/components/Poll/components/PollAnswersList.d.ts.map +1 -1
  447. package/lib/typescript/components/Poll/components/PollOption.d.ts +1 -2
  448. package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
  449. package/lib/typescript/components/Poll/components/PollResults/PollOptionFullResults.d.ts +1 -4
  450. package/lib/typescript/components/Poll/components/PollResults/PollOptionFullResults.d.ts.map +1 -1
  451. package/lib/typescript/components/Poll/components/PollResults/PollResults.d.ts +1 -2
  452. package/lib/typescript/components/Poll/components/PollResults/PollResults.d.ts.map +1 -1
  453. package/lib/typescript/components/Reply/Reply.d.ts +4 -3
  454. package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
  455. package/lib/typescript/components/Thread/Thread.d.ts +2 -8
  456. package/lib/typescript/components/Thread/Thread.d.ts.map +1 -1
  457. package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts +1 -2
  458. package/lib/typescript/components/Thread/components/ThreadFooterComponent.d.ts.map +1 -1
  459. package/lib/typescript/components/ThreadList/ThreadList.d.ts +2 -3
  460. package/lib/typescript/components/ThreadList/ThreadList.d.ts.map +1 -1
  461. package/lib/typescript/components/ThreadList/ThreadListItem.d.ts.map +1 -1
  462. package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts +0 -17
  463. package/lib/typescript/contexts/attachmentPickerContext/AttachmentPickerContext.d.ts.map +1 -1
  464. package/lib/typescript/contexts/channelContext/ChannelContext.d.ts +0 -23
  465. package/lib/typescript/contexts/channelContext/ChannelContext.d.ts.map +1 -1
  466. package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts +2 -113
  467. package/lib/typescript/contexts/channelsContext/ChannelsContext.d.ts.map +1 -1
  468. package/lib/typescript/contexts/chatContext/ChatContext.d.ts +0 -5
  469. package/lib/typescript/contexts/chatContext/ChatContext.d.ts.map +1 -1
  470. package/lib/typescript/contexts/componentsContext/ComponentsContext.d.ts +322 -0
  471. package/lib/typescript/contexts/componentsContext/ComponentsContext.d.ts.map +1 -0
  472. package/lib/typescript/contexts/componentsContext/defaultComponents.d.ts +298 -0
  473. package/lib/typescript/contexts/componentsContext/defaultComponents.d.ts.map +1 -0
  474. package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts.map +1 -1
  475. package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContextBase.d.ts +0 -5
  476. package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContextBase.d.ts.map +1 -1
  477. package/lib/typescript/contexts/index.d.ts +1 -0
  478. package/lib/typescript/contexts/index.d.ts.map +1 -1
  479. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +1 -169
  480. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
  481. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
  482. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts.map +1 -1
  483. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +3 -340
  484. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts.map +1 -1
  485. package/lib/typescript/contexts/overlayContext/MessageOverlayHostLayer.d.ts +8 -4
  486. package/lib/typescript/contexts/overlayContext/MessageOverlayHostLayer.d.ts.map +1 -1
  487. package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts +0 -4
  488. package/lib/typescript/contexts/overlayContext/OverlayContext.d.ts.map +1 -1
  489. package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts.map +1 -1
  490. package/lib/typescript/contexts/threadsContext/ThreadsContext.d.ts +0 -9
  491. package/lib/typescript/contexts/threadsContext/ThreadsContext.d.ts.map +1 -1
  492. package/package.json +1 -1
  493. package/src/__tests__/offline-support/offline-feature.js +64 -67
  494. package/src/components/Attachment/Attachment.tsx +7 -69
  495. package/src/components/Attachment/FileAttachment.tsx +4 -7
  496. package/src/components/Attachment/FileAttachmentGroup.tsx +9 -19
  497. package/src/components/Attachment/FilePreview.tsx +4 -9
  498. package/src/components/Attachment/Gallery.tsx +6 -83
  499. package/src/components/Attachment/GalleryImage.tsx +5 -4
  500. package/src/components/Attachment/Giphy/GiphyImage.tsx +15 -37
  501. package/src/components/Attachment/UnsupportedAttachment.tsx +5 -10
  502. package/src/components/Attachment/UrlPreview/URLPreview.tsx +6 -4
  503. package/src/components/Attachment/UrlPreview/URLPreviewCompact.tsx +6 -4
  504. package/src/components/AttachmentPicker/AttachmentPicker.tsx +2 -2
  505. package/src/components/AttachmentPicker/components/AttachmentMediaPicker/AttachmentPickerItem.tsx +5 -4
  506. package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +4 -20
  507. package/src/components/Channel/Channel.tsx +31 -441
  508. package/src/components/Channel/__tests__/isAttachmentEqualHandler.test.js +12 -9
  509. package/src/components/Channel/hooks/useCreateChannelContext.ts +0 -8
  510. package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +1 -81
  511. package/src/components/Channel/hooks/useCreateMessagesContext.ts +0 -132
  512. package/src/components/ChannelList/ChannelList.tsx +3 -76
  513. package/src/components/ChannelList/ChannelListLoadingIndicator.tsx +3 -1
  514. package/src/components/ChannelList/ChannelListView.tsx +16 -36
  515. package/src/components/ChannelList/__tests__/ChannelList.test.js +173 -116
  516. package/src/components/ChannelList/__tests__/ChannelListView.test.js +64 -41
  517. package/src/components/ChannelList/hooks/useCreateChannelsContext.ts +0 -39
  518. package/src/components/ChannelPreview/ChannelDetailsBottomSheet.tsx +2 -2
  519. package/src/components/ChannelPreview/ChannelPreview.tsx +8 -16
  520. package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +15 -38
  521. package/src/components/ChannelPreview/ChannelPreviewView.tsx +22 -47
  522. package/src/components/ChannelPreview/ChannelSwipableWrapper.tsx +2 -4
  523. package/src/components/ChannelPreview/__tests__/ChannelDetailsBottomSheet.test.tsx +16 -12
  524. package/src/components/ChannelPreview/__tests__/ChannelPreview.test.tsx +25 -24
  525. package/src/components/ChannelPreview/__tests__/ChannelSwipableWrapper.test.tsx +11 -6
  526. package/src/components/Chat/Chat.tsx +5 -12
  527. package/src/components/Chat/hooks/useCreateChatContext.ts +0 -2
  528. package/src/components/ImageGallery/ImageGallery.tsx +14 -16
  529. package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +0 -8
  530. package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +25 -21
  531. package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +3 -1
  532. package/src/components/ImageGallery/components/types.ts +0 -3
  533. package/src/components/Message/Message.tsx +11 -32
  534. package/src/components/Message/MessageItemView/MessageBubble.tsx +11 -7
  535. package/src/components/Message/MessageItemView/MessageContent.tsx +14 -47
  536. package/src/components/Message/MessageItemView/MessageDeleted.tsx +3 -9
  537. package/src/components/Message/MessageItemView/MessageFooter.tsx +2 -14
  538. package/src/components/Message/MessageItemView/MessageHeader.tsx +11 -29
  539. package/src/components/Message/MessageItemView/MessageItemView.tsx +10 -42
  540. package/src/components/Message/MessageItemView/MessageReplies.tsx +2 -8
  541. package/src/components/Message/MessageItemView/MessageTextContainer.tsx +4 -8
  542. package/src/components/Message/MessageItemView/MessageWrapper.tsx +4 -9
  543. package/src/components/Message/MessageItemView/ReactionList/ReactionListBottom.tsx +4 -12
  544. package/src/components/Message/MessageItemView/ReactionList/ReactionListTop.tsx +4 -20
  545. package/src/components/Message/MessageItemView/__tests__/MessageContent.test.js +47 -30
  546. package/src/components/Message/MessageItemView/__tests__/MessageItemView.test.js +16 -7
  547. package/src/components/Message/MessageItemView/__tests__/MessageTextContainer.test.tsx +8 -4
  548. package/src/components/MessageInput/MessageComposer.tsx +16 -76
  549. package/src/components/MessageInput/MessageInputHeaderView.tsx +3 -3
  550. package/src/components/MessageInput/components/AttachmentPreview/AttachmentUploadPreviewList.tsx +7 -35
  551. package/src/components/MessageInput/components/AttachmentPreview/FileAttachmentUploadPreview.tsx +2 -2
  552. package/src/components/MessageInput/components/AttachmentPreview/ImageAttachmentUploadPreview.tsx +2 -2
  553. package/src/components/MessageInput/components/AudioRecorder/AudioRecordingInProgress.tsx +6 -4
  554. package/src/components/MessageInput/components/InputButtons/index.tsx +4 -5
  555. package/src/components/MessageInput/components/LinkPreviewList.tsx +3 -2
  556. package/src/components/MessageInput/components/OutputButtons/index.tsx +4 -23
  557. package/src/components/MessageList/MessageFlashList.tsx +13 -57
  558. package/src/components/MessageList/MessageList.tsx +15 -57
  559. package/src/components/MessageList/StickyHeader.tsx +4 -3
  560. package/src/components/MessageList/__tests__/MessageList.test.js +1 -130
  561. package/src/components/MessageList/hooks/useMessageList.ts +1 -41
  562. package/src/components/MessageMenu/MessageActionList.tsx +4 -3
  563. package/src/components/MessageMenu/MessageMenu.tsx +35 -47
  564. package/src/components/MessageMenu/MessageUserReactions.tsx +7 -27
  565. package/src/components/MessageMenu/MessageUserReactionsItem.tsx +3 -6
  566. package/src/components/MessageMenu/__tests__/MessageUserReactions.test.tsx +12 -11
  567. package/src/components/Poll/CreatePollContent.tsx +3 -4
  568. package/src/components/Poll/Poll.tsx +22 -24
  569. package/src/components/Poll/components/PollAnswersList.tsx +9 -11
  570. package/src/components/Poll/components/PollOption.tsx +9 -11
  571. package/src/components/Poll/components/PollResults/PollOptionFullResults.tsx +10 -11
  572. package/src/components/Poll/components/PollResults/PollResults.tsx +9 -15
  573. package/src/components/Reply/Reply.tsx +18 -5
  574. package/src/components/Thread/Thread.tsx +3 -18
  575. package/src/components/Thread/components/ThreadFooterComponent.tsx +10 -11
  576. package/src/components/ThreadList/ThreadList.tsx +14 -22
  577. package/src/components/ThreadList/ThreadListItem.tsx +6 -11
  578. package/src/components/ui/Avatar/Avatar.tsx +2 -2
  579. package/src/contexts/attachmentPickerContext/AttachmentPickerContext.tsx +0 -15
  580. package/src/contexts/channelContext/ChannelContext.tsx +0 -24
  581. package/src/contexts/channelsContext/ChannelsContext.tsx +2 -114
  582. package/src/contexts/chatContext/ChatContext.tsx +0 -5
  583. package/src/contexts/componentsContext/ComponentsContext.tsx +62 -0
  584. package/src/contexts/componentsContext/PLAN.md +148 -0
  585. package/src/contexts/componentsContext/__tests__/defaultComponents.test.ts +45 -0
  586. package/src/contexts/componentsContext/defaultComponents.ts +334 -0
  587. package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +0 -8
  588. package/src/contexts/imageGalleryContext/ImageGalleryContextBase.tsx +0 -10
  589. package/src/contexts/index.ts +1 -0
  590. package/src/contexts/messageInputContext/MessageInputContext.tsx +0 -185
  591. package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +1 -75
  592. package/src/contexts/messagesContext/MessagesContext.tsx +3 -367
  593. package/src/contexts/overlayContext/MessageOverlayHostLayer.tsx +38 -20
  594. package/src/contexts/overlayContext/OverlayContext.tsx +0 -4
  595. package/src/contexts/overlayContext/OverlayProvider.tsx +1 -2
  596. package/src/contexts/overlayContext/__tests__/MessageOverlayHostLayer.test.tsx +80 -7
  597. package/src/contexts/threadsContext/ThreadsContext.tsx +0 -9
  598. package/src/version.json +1 -1
@@ -7,6 +7,7 @@ import type { Channel, StreamChat } from 'stream-chat';
7
7
 
8
8
  import { ChannelsProvider } from '../../../contexts/channelsContext/ChannelsContext';
9
9
  import type { ChannelsContextValue } from '../../../contexts/channelsContext/ChannelsContext';
10
+ import { WithComponents } from '../../../contexts/componentsContext/ComponentsContext';
10
11
  import {
11
12
  getOrCreateChannelApi,
12
13
  GetOrCreateChannelApiParams,
@@ -83,12 +84,9 @@ describe('ChannelPreview', () => {
83
84
 
84
85
  return (
85
86
  <Chat client={chatClient}>
86
- <ChannelPreview
87
- {...props}
88
- channel={channel}
89
- client={chatClient}
90
- Preview={ChannelPreviewUIComponent}
91
- />
87
+ <WithComponents overrides={{ ChannelPreview: ChannelPreviewUIComponent }}>
88
+ <ChannelPreview {...props} channel={channel} client={chatClient} />
89
+ </WithComponents>
92
90
  </Chat>
93
91
  );
94
92
  };
@@ -436,18 +434,23 @@ describe('ChannelPreview', () => {
436
434
 
437
435
  return (
438
436
  <Chat client={chatClient}>
439
- <ChannelsProvider
440
- value={
441
- {
442
- ChannelDetailsBottomSheet: channelDetailsBottomSheet,
443
- Preview: SwipePreview,
444
- getChannelActionItems: undefined,
445
- swipeActionsEnabled,
446
- } as unknown as ChannelsContextValue
447
- }
437
+ <WithComponents
438
+ overrides={{
439
+ ChannelDetailsBottomSheet: channelDetailsBottomSheet,
440
+ ChannelPreview: SwipePreview,
441
+ }}
448
442
  >
449
- <ChannelPreview channel={channel} client={chatClient} Preview={SwipePreview} />
450
- </ChannelsProvider>
443
+ <ChannelsProvider
444
+ value={
445
+ {
446
+ getChannelActionItems: undefined,
447
+ swipeActionsEnabled,
448
+ } as unknown as ChannelsContextValue
449
+ }
450
+ >
451
+ <ChannelPreview channel={channel} client={chatClient} />
452
+ </ChannelsProvider>
453
+ </WithComponents>
451
454
  </Chat>
452
455
  );
453
456
  };
@@ -474,7 +477,7 @@ describe('ChannelPreview', () => {
474
477
  expect(mockChannelSwipableWrapper).toHaveBeenCalled();
475
478
  });
476
479
 
477
- it('passes ChannelDetailsBottomSheet override to ChannelSwipableWrapper', async () => {
480
+ it('makes ChannelDetailsBottomSheet override available via WithComponents', async () => {
478
481
  render(
479
482
  <SwipeTestComponent
480
483
  swipeActionsEnabled={true}
@@ -482,13 +485,11 @@ describe('ChannelPreview', () => {
482
485
  />,
483
486
  );
484
487
 
488
+ // ChannelDetailsBottomSheet is now read from useComponentsContext() by
489
+ // ChannelSwipableWrapper rather than passed as a prop from ChannelPreview.
490
+ // Since ChannelSwipableWrapper is mocked, we verify the override is
491
+ // provided via WithComponents (set up in SwipeTestComponent).
485
492
  await waitFor(() => expect(mockChannelSwipableWrapper).toHaveBeenCalled());
486
- const swipableWrapperProps = mockChannelSwipableWrapper.mock.calls[0]?.[0];
487
- expect(swipableWrapperProps).toEqual(
488
- expect.objectContaining({
489
- ChannelDetailsBottomSheet: ChannelDetailsBottomSheetOverride,
490
- }),
491
- );
492
493
  });
493
494
  });
494
495
  });
@@ -4,6 +4,7 @@ import { Text } from 'react-native';
4
4
  import { act, render } from '@testing-library/react-native';
5
5
  import type { Channel } from 'stream-chat';
6
6
 
7
+ import { WithComponents } from '../../../contexts/componentsContext/ComponentsContext';
7
8
  import type { ChannelActionItem } from '../../ChannelList/hooks/useChannelActionItems';
8
9
  import * as ChannelActionItemsModule from '../../ChannelList/hooks/useChannelActionItems';
9
10
  import * as ChannelActionsModule from '../../ChannelList/hooks/useChannelActions';
@@ -115,9 +116,11 @@ describe('ChannelSwipableWrapper', () => {
115
116
  });
116
117
 
117
118
  render(
118
- <ChannelSwipableWrapper channel={channel} ChannelDetailsBottomSheet={customBottomSheet}>
119
- <Text>child</Text>
120
- </ChannelSwipableWrapper>,
119
+ <WithComponents overrides={{ ChannelDetailsBottomSheet: customBottomSheet }}>
120
+ <ChannelSwipableWrapper channel={channel}>
121
+ <Text>child</Text>
122
+ </ChannelSwipableWrapper>
123
+ </WithComponents>,
121
124
  );
122
125
 
123
126
  expect(customBottomSheet).toHaveBeenCalledWith(
@@ -181,9 +184,11 @@ describe('ChannelSwipableWrapper', () => {
181
184
  });
182
185
 
183
186
  render(
184
- <ChannelSwipableWrapper channel={channel} ChannelDetailsBottomSheet={customBottomSheet}>
185
- <Text>child</Text>
186
- </ChannelSwipableWrapper>,
187
+ <WithComponents overrides={{ ChannelDetailsBottomSheet: customBottomSheet }}>
188
+ <ChannelSwipableWrapper channel={channel}>
189
+ <Text>child</Text>
190
+ </ChannelSwipableWrapper>
191
+ </WithComponents>,
187
192
  );
188
193
 
189
194
  expect(customBottomSheet).toHaveBeenCalledWith(
@@ -1,5 +1,5 @@
1
1
  import React, { PropsWithChildren, useEffect, useMemo, useState } from 'react';
2
- import { Image, Platform } from 'react-native';
2
+ import { Platform } from 'react-native';
3
3
 
4
4
  import { Channel, OfflineDBState } from 'stream-chat';
5
5
 
@@ -10,6 +10,7 @@ import { useIsOnline } from './hooks/useIsOnline';
10
10
 
11
11
  import { ChannelsStateProvider } from '../../contexts/channelsStateContext/ChannelsStateContext';
12
12
  import { ChatContextValue, ChatProvider } from '../../contexts/chatContext/ChatContext';
13
+ import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
13
14
  import { useDebugContext } from '../../contexts/debugContext/DebugContext';
14
15
  import { DeepPartial, ThemeProvider, useTheme } from '../../contexts/themeContext/ThemeContext';
15
16
  import type { Theme } from '../../contexts/themeContext/utils/theme';
@@ -30,7 +31,7 @@ import { version } from '../../version.json';
30
31
  init();
31
32
 
32
33
  export type ChatProps = Pick<ChatContextValue, 'client'> &
33
- Partial<Pick<ChatContextValue, 'ImageComponent' | 'isMessageAIGenerated'>> & {
34
+ Partial<Pick<ChatContextValue, 'isMessageAIGenerated'>> & {
34
35
  /**
35
36
  * When false, ws connection won't be disconnection upon backgrounding the app.
36
37
  * To receive push notifications, its necessary that user doesn't have active
@@ -94,12 +95,6 @@ export type ChatProps = Pick<ChatContextValue, 'client'> &
94
95
  * ```
95
96
  */
96
97
  i18nInstance?: Streami18n;
97
- /**
98
- * Custom loading indicator component to be used to represent the loading state of the chat.
99
- *
100
- * This can be used during the phase when db is not initialised.
101
- */
102
- LoadingIndicator?: React.ComponentType | null;
103
98
  /**
104
99
  * You can pass the theme object to customize the styles of Chat components. You can check the default theme in [theme.ts](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/contexts/themeContext/utils/theme.ts)
105
100
  *
@@ -144,11 +139,10 @@ const ChatWithContext = (props: PropsWithChildren<ChatProps>) => {
144
139
  closeConnectionOnBackground = true,
145
140
  enableOfflineSupport = false,
146
141
  i18nInstance,
147
- ImageComponent = Image,
148
142
  isMessageAIGenerated,
149
- LoadingIndicator = null,
150
143
  style,
151
144
  } = props;
145
+ const { ChatLoadingIndicator } = useComponentsContext();
152
146
 
153
147
  const [channel, setChannel] = useState<Channel>();
154
148
 
@@ -257,7 +251,6 @@ const ChatWithContext = (props: PropsWithChildren<ChatProps>) => {
257
251
  client,
258
252
  connectionRecovering,
259
253
  enableOfflineSupport,
260
- ImageComponent,
261
254
  isMessageAIGenerated,
262
255
  isOnline,
263
256
  mutedUsers,
@@ -266,7 +259,7 @@ const ChatWithContext = (props: PropsWithChildren<ChatProps>) => {
266
259
 
267
260
  if (userID && enableOfflineSupport && !initialisedDatabase) {
268
261
  // if user id has been set and offline support is enabled, we need to wait for database to be initialised
269
- return LoadingIndicator ? <LoadingIndicator /> : null;
262
+ return ChatLoadingIndicator ? <ChatLoadingIndicator /> : null;
270
263
  }
271
264
 
272
265
  return (
@@ -8,7 +8,6 @@ export const useCreateChatContext = ({
8
8
  client,
9
9
  connectionRecovering,
10
10
  enableOfflineSupport,
11
- ImageComponent,
12
11
  isMessageAIGenerated,
13
12
  isOnline,
14
13
  mutedUsers,
@@ -29,7 +28,6 @@ export const useCreateChatContext = ({
29
28
  client,
30
29
  connectionRecovering,
31
30
  enableOfflineSupport,
32
- ImageComponent,
33
31
  isMessageAIGenerated,
34
32
  isOnline,
35
33
  mutedUsers,
@@ -13,9 +13,15 @@ import Animated, {
13
13
 
14
14
  import { AnimatedGalleryImage } from './components/AnimatedGalleryImage';
15
15
  import { AnimatedGalleryVideo } from './components/AnimatedGalleryVideo';
16
+ import type {
17
+ ImageGalleryFooterProps,
18
+ ImageGalleryGridProps,
19
+ ImageGalleryHeaderProps,
20
+ } from './components/types';
16
21
 
17
22
  import { useImageGalleryGestures } from './hooks/useImageGalleryGestures';
18
23
 
24
+ import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
19
25
  import {
20
26
  ImageGalleryProviderProps,
21
27
  useImageGalleryContext,
@@ -63,13 +69,13 @@ const imageGallerySelector = (state: ImageGalleryState) => ({
63
69
 
64
70
  type ImageGalleryWithContextProps = Pick<
65
71
  ImageGalleryProviderProps,
66
- | 'numberOfImageGalleryGridColumns'
67
- | 'ImageGalleryHeader'
68
- | 'ImageGalleryFooter'
69
- | 'ImageGalleryVideoControls'
70
- | 'ImageGalleryGrid'
72
+ 'numberOfImageGalleryGridColumns'
71
73
  > &
72
- Pick<OverlayContextValue, 'overlayOpacity'>;
74
+ Pick<OverlayContextValue, 'overlayOpacity'> & {
75
+ ImageGalleryHeader?: React.ComponentType<ImageGalleryHeaderProps>;
76
+ ImageGalleryFooter?: React.ComponentType<ImageGalleryFooterProps>;
77
+ ImageGalleryGrid?: React.ComponentType<ImageGalleryGridProps>;
78
+ };
73
79
 
74
80
  export const ImageGalleryWithContext = (props: ImageGalleryWithContextProps) => {
75
81
  const {
@@ -77,7 +83,6 @@ export const ImageGalleryWithContext = (props: ImageGalleryWithContextProps) =>
77
83
  overlayOpacity,
78
84
  ImageGalleryHeader,
79
85
  ImageGalleryFooter,
80
- ImageGalleryVideoControls,
81
86
  ImageGalleryGrid,
82
87
  } = props;
83
88
  const [isGridViewVisible, setIsGridViewVisible] = useState(false);
@@ -345,7 +350,6 @@ export const ImageGalleryWithContext = (props: ImageGalleryWithContextProps) =>
345
350
  opacity={headerFooterOpacity}
346
351
  openGridView={openGridView}
347
352
  visible={headerFooterVisible}
348
- ImageGalleryVideoControls={ImageGalleryVideoControls}
349
353
  />
350
354
  ) : null}
351
355
 
@@ -370,13 +374,8 @@ export const ImageGalleryWithContext = (props: ImageGalleryWithContextProps) =>
370
374
  export type ImageGalleryProps = Partial<ImageGalleryWithContextProps>;
371
375
 
372
376
  export const ImageGallery = (props: ImageGalleryProps) => {
373
- const {
374
- numberOfImageGalleryGridColumns,
375
- ImageGalleryHeader,
376
- ImageGalleryFooter,
377
- ImageGalleryVideoControls,
378
- ImageGalleryGrid,
379
- } = useImageGalleryContext();
377
+ const { numberOfImageGalleryGridColumns } = useImageGalleryContext();
378
+ const { ImageGalleryHeader, ImageGalleryFooter, ImageGalleryGrid } = useComponentsContext();
380
379
  const { overlayOpacity } = useOverlayContext();
381
380
  return (
382
381
  <ImageGalleryWithContext
@@ -384,7 +383,6 @@ export const ImageGallery = (props: ImageGalleryProps) => {
384
383
  overlayOpacity={overlayOpacity}
385
384
  ImageGalleryHeader={ImageGalleryHeader}
386
385
  ImageGalleryFooter={ImageGalleryFooter}
387
- ImageGalleryVideoControls={ImageGalleryVideoControls}
388
386
  ImageGalleryGrid={ImageGalleryGrid}
389
387
  {...props}
390
388
  />
@@ -9,10 +9,6 @@ import duration from 'dayjs/plugin/duration';
9
9
 
10
10
  import { LocalMessage } from 'stream-chat';
11
11
 
12
- import { ImageGalleryFooter as ImageGalleryFooterDefault } from '../../../components/ImageGallery/components/ImageGalleryFooter';
13
- import { ImageGalleryHeader as ImageGalleryHeaderDefault } from '../../../components/ImageGallery/components/ImageGalleryHeader';
14
- import { ImageGalleryVideoControl as ImageGalleryVideoControlDefault } from '../../../components/ImageGallery/components/ImageGalleryVideoControl';
15
- import { ImageGalleryGrid as ImageGalleryGridDefault } from '../../../components/ImageGallery/components/ImageGrid';
16
12
  import {
17
13
  ImageGalleryContext,
18
14
  ImageGalleryContextValue,
@@ -66,10 +62,6 @@ const ImageGalleryComponent = (props: ImageGalleryProps & { message: LocalMessag
66
62
  value={
67
63
  {
68
64
  imageGalleryStateStore,
69
- ImageGalleryHeader: ImageGalleryHeaderDefault,
70
- ImageGalleryFooter: ImageGalleryFooterDefault,
71
- ImageGalleryVideoControls: ImageGalleryVideoControlDefault,
72
- ImageGalleryGrid: ImageGalleryGridDefault,
73
65
  } as unknown as ImageGalleryContextValue
74
66
  }
75
67
  >
@@ -6,7 +6,7 @@ import { render, screen, userEvent, waitFor } from '@testing-library/react-nativ
6
6
 
7
7
  import { Attachment, LocalMessage } from 'stream-chat';
8
8
 
9
- import { ImageGalleryFooter as ImageGalleryFooterDefault } from '../../../components/ImageGallery/components/ImageGalleryFooter';
9
+ import { WithComponents } from '../../../contexts/componentsContext/ComponentsContext';
10
10
  import {
11
11
  ImageGalleryContext,
12
12
  ImageGalleryContextValue,
@@ -60,16 +60,18 @@ const ImageGalleryComponentVideo = (props: ImageGalleryProps) => {
60
60
 
61
61
  return (
62
62
  <OverlayProvider value={{ overlayOpacity: { value: 1 } as SharedValue<number> }}>
63
- <ImageGalleryContext.Provider
64
- value={
65
- {
66
- imageGalleryStateStore,
67
- ImageGalleryFooter: ImageGalleryFooterDefault,
68
- } as unknown as ImageGalleryContextValue
69
- }
70
- >
71
- <ImageGallery {...props} />
72
- </ImageGalleryContext.Provider>
63
+ {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
64
+ <WithComponents overrides={{ ImageGalleryHeader: undefined as any }}>
65
+ <ImageGalleryContext.Provider
66
+ value={
67
+ {
68
+ imageGalleryStateStore,
69
+ } as unknown as ImageGalleryContextValue
70
+ }
71
+ >
72
+ <ImageGallery {...props} />
73
+ </ImageGalleryContext.Provider>
74
+ </WithComponents>
73
75
  </OverlayProvider>
74
76
  );
75
77
  };
@@ -100,16 +102,18 @@ const ImageGalleryComponentImage = (
100
102
 
101
103
  return (
102
104
  <OverlayProvider value={{ overlayOpacity: { value: 1 } as SharedValue<number> }}>
103
- <ImageGalleryContext.Provider
104
- value={
105
- {
106
- imageGalleryStateStore,
107
- ImageGalleryFooter: ImageGalleryFooterDefault,
108
- } as unknown as ImageGalleryContextValue
109
- }
110
- >
111
- <ImageGallery {...props} />
112
- </ImageGalleryContext.Provider>
105
+ {/* eslint-disable-next-line @typescript-eslint/no-explicit-any */}
106
+ <WithComponents overrides={{ ImageGalleryHeader: undefined as any }}>
107
+ <ImageGalleryContext.Provider
108
+ value={
109
+ {
110
+ imageGalleryStateStore,
111
+ } as unknown as ImageGalleryContextValue
112
+ }
113
+ >
114
+ <ImageGallery {...props} />
115
+ </ImageGalleryContext.Provider>
116
+ </WithComponents>
113
117
  </OverlayProvider>
114
118
  );
115
119
  };
@@ -4,6 +4,7 @@ import Animated, { Extrapolation, interpolate, useAnimatedStyle } from 'react-na
4
4
 
5
5
  import type { ImageGalleryFooterProps, ImageGalleryVideoControlProps } from './types';
6
6
 
7
+ import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
7
8
  import { useImageGalleryContext } from '../../../contexts/imageGalleryContext/ImageGalleryContextBase';
8
9
  import { useTheme } from '../../../contexts/themeContext/ThemeContext';
9
10
  import { useTranslationContext } from '../../../contexts/translationContext/TranslationContext';
@@ -42,7 +43,8 @@ const imageGallerySelector = (state: ImageGalleryState) => ({
42
43
  });
43
44
 
44
45
  export const ImageGalleryFooterWithContext = (props: ImageGalleryFooterProps) => {
45
- const { accessibilityLabel, opacity, openGridView, visible, ImageGalleryVideoControls } = props;
46
+ const { accessibilityLabel, opacity, openGridView, visible } = props;
47
+ const { ImageGalleryVideoControls } = useComponentsContext();
46
48
 
47
49
  const [height, setHeight] = useState(200);
48
50
  const [savingInProgress, setSavingInProgress] = useState(false);
@@ -1,5 +1,3 @@
1
- import type React from 'react';
2
-
3
1
  import type { SharedValue } from 'react-native-reanimated';
4
2
 
5
3
  export type ImageGalleryVideoControlProps = {
@@ -13,7 +11,6 @@ export type ImageGalleryHeaderProps = {
13
11
 
14
12
  export type ImageGalleryFooterProps = {
15
13
  accessibilityLabel: string;
16
- ImageGalleryVideoControls?: React.ComponentType<ImageGalleryVideoControlProps>;
17
14
  opacity: SharedValue<number>;
18
15
  openGridView: () => void;
19
16
  visible: SharedValue<number>;
@@ -27,6 +27,7 @@ import {
27
27
  useChannelContext,
28
28
  } from '../../contexts/channelContext/ChannelContext';
29
29
  import { ChatContextValue, useChatContext } from '../../contexts/chatContext/ChatContext';
30
+ import { useComponentsContext } from '../../contexts/componentsContext/ComponentsContext';
30
31
  import {
31
32
  KeyboardContextValue,
32
33
  useKeyboardContext,
@@ -205,12 +206,8 @@ export type MessagePropsWithContext = Pick<
205
206
  | 'handleThreadReply'
206
207
  | 'handleBlockUser'
207
208
  | 'isAttachmentEqual'
208
- | 'MessageMenu'
209
209
  | 'messageActions'
210
210
  | 'messageContentOrder'
211
- | 'MessageBounce'
212
- | 'MessageBlocked'
213
- | 'MessageItemView'
214
211
  | 'onLongPressMessage'
215
212
  | 'onPressInMessage'
216
213
  | 'onPressMessage'
@@ -220,14 +217,6 @@ export type MessagePropsWithContext = Pick<
220
217
  | 'selectReaction'
221
218
  | 'supportedReactions'
222
219
  | 'updateMessage'
223
- | 'PollContent'
224
- // TODO: remove this comment later, using it as a pragma mark
225
- | 'MessageUserReactions'
226
- | 'MessageUserReactionsAvatar'
227
- | 'MessageUserReactionsItem'
228
- | 'MessageReactionPicker'
229
- | 'MessageActionList'
230
- | 'MessageActionListItem'
231
220
  > &
232
221
  Pick<ThreadContextValue, 'openThread'> &
233
222
  Pick<TranslationContextValue, 't'> & {
@@ -289,11 +278,8 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
289
278
  members,
290
279
  message,
291
280
  messageActions: messageActionsProp = defaultMessageActions,
292
- MessageBlocked,
293
- MessageBounce,
294
281
  messageContentOrder: messageContentOrderProp,
295
282
  messagesContext,
296
- MessageItemView,
297
283
  onLongPressMessage: onLongPressMessageProp,
298
284
  onPressInMessage: onPressInMessageProp,
299
285
  onPressMessage: onPressMessageProp,
@@ -314,13 +300,15 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
314
300
  updateMessage,
315
301
  readBy,
316
302
  setQuotedMessage,
317
- MessageUserReactions,
318
- MessageUserReactionsAvatar,
319
- MessageUserReactionsItem,
320
- MessageReactionPicker,
321
- MessageActionList,
322
- MessageActionListItem,
323
303
  } = props;
304
+ const {
305
+ MessageActionList,
306
+ MessageBlocked,
307
+ MessageBounce,
308
+ MessageItemView,
309
+ MessageReactionPicker,
310
+ MessageUserReactions,
311
+ } = useComponentsContext();
324
312
  // TODO: V9: Reconsider using safe area insets in every message.
325
313
  const insets = useSafeAreaInsets();
326
314
  const isMessageAIGenerated = messagesContext.isMessageAIGenerated;
@@ -878,12 +866,7 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
878
866
  visible={showMessageReactions}
879
867
  height={424}
880
868
  >
881
- <MessageUserReactions
882
- message={message}
883
- MessageUserReactionsAvatar={MessageUserReactionsAvatar}
884
- MessageUserReactionsItem={MessageUserReactionsItem}
885
- selectedReaction={selectedReaction}
886
- />
869
+ <MessageUserReactions message={message} selectedReaction={selectedReaction} />
887
870
  </BottomSheetModal>
888
871
  ) : null}
889
872
  <Portal hostName={overlayActive && rect ? 'bottom-item' : undefined}>
@@ -902,11 +885,7 @@ const MessageWithContext = (props: MessagePropsWithContext) => {
902
885
  });
903
886
  }}
904
887
  >
905
- <MessageActionList
906
- dismissOverlay={dismissOverlay}
907
- MessageActionListItem={MessageActionListItem}
908
- messageActions={messageActions}
909
- />
888
+ <MessageActionList dismissOverlay={dismissOverlay} messageActions={messageActions} />
910
889
  </View>
911
890
  ) : null}
912
891
  </Portal>
@@ -12,20 +12,24 @@ import Animated, {
12
12
 
13
13
  import { MessageItemViewPropsWithContext } from './MessageItemView';
14
14
 
15
- import { MessagesContextValue, useTheme } from '../../../contexts';
15
+ import { useTheme } from '../../../contexts';
16
+ import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
16
17
 
17
18
  import { NativeHandlers } from '../../../native';
18
19
 
19
20
  const AnimatedWrapper = Animated.createAnimatedComponent(View);
20
21
 
21
- type SwipableMessageWrapperProps = Pick<MessagesContextValue, 'MessageSwipeContent'> &
22
- Pick<MessageItemViewPropsWithContext, 'messageSwipeToReplyHitSlop'> & {
23
- children: ReactNode;
24
- onSwipe: () => void;
25
- };
22
+ type SwipableMessageWrapperProps = Pick<
23
+ MessageItemViewPropsWithContext,
24
+ 'messageSwipeToReplyHitSlop'
25
+ > & {
26
+ children: ReactNode;
27
+ onSwipe: () => void;
28
+ };
26
29
 
27
30
  export const SwipableMessageWrapper = React.memo((props: SwipableMessageWrapperProps) => {
28
- const { MessageSwipeContent, children, messageSwipeToReplyHitSlop, onSwipe } = props;
31
+ const { children, messageSwipeToReplyHitSlop, onSwipe } = props;
32
+ const { MessageSwipeContent } = useComponentsContext();
29
33
  const isRTL = I18nManager.isRTL;
30
34
  const swipeDirectionMultiplier = isRTL ? -1 : 1;
31
35
 
@@ -4,6 +4,7 @@ import { AnimatableNumericValue, ColorValue, Pressable, StyleSheet, View } from
4
4
  import { MessageTextContainer } from './MessageTextContainer';
5
5
 
6
6
  import { useChatContext } from '../../../contexts';
7
+ import { useComponentsContext } from '../../../contexts/componentsContext/ComponentsContext';
7
8
  import {
8
9
  MessageContextValue,
9
10
  useMessageContext,
@@ -67,19 +68,9 @@ export type MessageContentPropsWithContext = Pick<
67
68
  Pick<
68
69
  MessagesContextValue,
69
70
  | 'additionalPressableProps'
70
- | 'Attachment'
71
71
  | 'enableMessageGroupingByUser'
72
- | 'FileAttachmentGroup'
73
- | 'Gallery'
74
72
  | 'isAttachmentEqual'
75
- | 'MessageContentBottomView'
76
- | 'MessageContentLeadingView'
77
- | 'MessageLocation'
78
- | 'MessageContentTrailingView'
79
- | 'MessageContentTopView'
80
73
  | 'myMessageTheme'
81
- | 'Reply'
82
- | 'StreamingMessageView'
83
74
  > &
84
75
  Pick<TranslationContextValue, 't'> & {
85
76
  /**
@@ -115,11 +106,8 @@ const MessageContentWithContext = (props: MessageContentPropsWithContext) => {
115
106
  const {
116
107
  additionalPressableProps,
117
108
  alignment,
118
- Attachment,
119
109
  backgroundColor,
120
110
  enableMessageGroupingByUser,
121
- FileAttachmentGroup,
122
- Gallery,
123
111
  groupStyles,
124
112
  goToMessage,
125
113
  isMessageAIGenerated,
@@ -127,26 +115,30 @@ const MessageContentWithContext = (props: MessageContentPropsWithContext) => {
127
115
  isVeryLastMessage,
128
116
  message,
129
117
  messageContentOrder,
130
- MessageContentBottomView,
131
- MessageContentLeadingView,
132
118
  messageGroupedSingleOrBottom = false,
133
- MessageLocation,
134
- MessageContentTrailingView,
135
- MessageContentTopView,
136
119
  noBorder,
137
120
  onLongPress,
138
121
  onPress,
139
122
  onPressIn,
140
123
  otherAttachments,
141
124
  preventPress,
142
- Reply,
143
- StreamingMessageView,
144
125
  hidePaddingTop,
145
126
  hidePaddingHorizontal,
146
127
  hidePaddingBottom,
147
128
  } = props;
148
129
  const { client } = useChatContext();
149
- const { PollContent: PollContentOverride } = useMessagesContext();
130
+ const {
131
+ Attachment,
132
+ FileAttachmentGroup,
133
+ Gallery,
134
+ MessageContentBottomView,
135
+ MessageContentLeadingView,
136
+ MessageContentTopView,
137
+ MessageContentTrailingView,
138
+ MessageLocation,
139
+ Reply,
140
+ StreamingMessageView,
141
+ } = useComponentsContext();
150
142
  const replyStyles = useReplyStyles();
151
143
 
152
144
  const {
@@ -298,12 +290,7 @@ const MessageContentWithContext = (props: MessageContentPropsWithContext) => {
298
290
  const pollId = message.poll_id;
299
291
  const poll = pollId && client.polls.fromState(pollId);
300
292
  return pollId && poll ? (
301
- <Poll
302
- key={`poll_${message.poll_id}`}
303
- message={message}
304
- poll={poll}
305
- PollContent={PollContentOverride}
306
- />
293
+ <Poll key={`poll_${message.poll_id}`} message={message} poll={poll} />
307
294
  ) : null;
308
295
  }
309
296
  case 'location':
@@ -590,19 +577,9 @@ export const MessageContent = (props: MessageContentProps) => {
590
577
  } = useMessageContext();
591
578
  const {
592
579
  additionalPressableProps,
593
- Attachment,
594
580
  enableMessageGroupingByUser,
595
- FileAttachmentGroup,
596
- Gallery,
597
581
  isAttachmentEqual,
598
- MessageContentBottomView,
599
- MessageContentLeadingView,
600
- MessageLocation,
601
- MessageContentTrailingView,
602
- MessageContentTopView,
603
582
  myMessageTheme,
604
- Reply,
605
- StreamingMessageView,
606
583
  } = useMessagesContext();
607
584
  const { t } = useTranslationContext();
608
585
  const isSingleFile = files.length === 1;
@@ -647,10 +624,7 @@ export const MessageContent = (props: MessageContentProps) => {
647
624
  {...{
648
625
  additionalPressableProps,
649
626
  alignment,
650
- Attachment,
651
627
  enableMessageGroupingByUser,
652
- FileAttachmentGroup,
653
- Gallery,
654
628
  goToMessage,
655
629
  groupStyles,
656
630
  isAttachmentEqual,
@@ -658,19 +632,12 @@ export const MessageContent = (props: MessageContentProps) => {
658
632
  isMyMessage,
659
633
  message,
660
634
  messageContentOrder,
661
- MessageContentBottomView,
662
- MessageContentLeadingView,
663
- MessageLocation,
664
- MessageContentTrailingView,
665
- MessageContentTopView,
666
635
  myMessageTheme,
667
636
  onLongPress,
668
637
  onPress,
669
638
  onPressIn,
670
639
  otherAttachments,
671
640
  preventPress,
672
- Reply,
673
- StreamingMessageView,
674
641
  t,
675
642
  threadList,
676
643
  hidePaddingTop,