stream-chat-react-native-core 5.34.1-beta.5 → 5.35.0-beta.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 (340) hide show
  1. package/lib/commonjs/components/Attachment/Attachment.js +5 -4
  2. package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
  3. package/lib/commonjs/components/Attachment/Card.js +2 -1
  4. package/lib/commonjs/components/Attachment/Card.js.map +1 -1
  5. package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +2 -1
  6. package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
  7. package/lib/commonjs/components/Attachment/Gallery.js +3 -2
  8. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  9. package/lib/commonjs/components/Attachment/Giphy.js +2 -3
  10. package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
  11. package/lib/commonjs/components/Attachment/utils/getAspectRatio.js +2 -1
  12. package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -1
  13. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js +14 -9
  14. package/lib/commonjs/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  15. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js +1 -0
  16. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js.map +1 -1
  17. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js +4 -11
  18. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
  19. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +6 -57
  20. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
  21. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteInput.js +1 -1
  22. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +2 -3
  23. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
  24. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +2 -1
  25. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
  26. package/lib/commonjs/components/Channel/Channel.js +5 -2
  27. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  28. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -0
  29. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  30. package/lib/commonjs/components/ImageGallery/ImageGallery.js +4 -3
  31. package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
  32. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js +3 -3
  33. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
  34. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +2 -1
  35. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  36. package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js +5 -5
  37. package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
  38. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +2 -1
  39. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
  40. package/lib/commonjs/components/Message/Message.js +8 -7
  41. package/lib/commonjs/components/Message/Message.js.map +1 -1
  42. package/lib/commonjs/components/MessageInput/AttachButton.js +67 -9
  43. package/lib/commonjs/components/MessageInput/AttachButton.js.map +1 -1
  44. package/lib/commonjs/components/MessageInput/CommandsButton.js +3 -2
  45. package/lib/commonjs/components/MessageInput/CommandsButton.js.map +1 -1
  46. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +1 -11
  47. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  48. package/lib/commonjs/components/MessageInput/InputButtons.js +2 -5
  49. package/lib/commonjs/components/MessageInput/InputButtons.js.map +1 -1
  50. package/lib/commonjs/components/MessageInput/MessageInput.js +27 -22
  51. package/lib/commonjs/components/MessageInput/MessageInput.js.map +1 -1
  52. package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js +5 -6
  53. package/lib/commonjs/components/MessageInput/components/InputGiphySearch.js.map +1 -1
  54. package/lib/commonjs/components/MessageInput/components/NativeAttachmentPicker.js +157 -0
  55. package/lib/commonjs/components/MessageInput/components/NativeAttachmentPicker.js.map +1 -0
  56. package/lib/commonjs/components/MessageInput/hooks/useAudioController.js +2 -1
  57. package/lib/commonjs/components/MessageInput/hooks/useAudioController.js.map +1 -1
  58. package/lib/commonjs/components/MessageList/MessageList.js +2 -1
  59. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  60. package/lib/commonjs/components/Reply/Reply.js +19 -18
  61. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  62. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +267 -181
  63. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  64. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +6 -0
  65. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  66. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js +6 -5
  67. package/lib/commonjs/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  68. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js +3 -2
  69. package/lib/commonjs/contexts/overlayContext/OverlayProvider.js.map +1 -1
  70. package/lib/commonjs/contexts/themeContext/utils/theme.js +5 -0
  71. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  72. package/lib/commonjs/i18n/en.json +1 -0
  73. package/lib/commonjs/i18n/es.json +1 -0
  74. package/lib/commonjs/i18n/fr.json +1 -0
  75. package/lib/commonjs/i18n/he.json +1 -0
  76. package/lib/commonjs/i18n/hi.json +1 -0
  77. package/lib/commonjs/i18n/it.json +1 -0
  78. package/lib/commonjs/i18n/ja.json +1 -0
  79. package/lib/commonjs/i18n/ko.json +1 -0
  80. package/lib/commonjs/i18n/nl.json +1 -0
  81. package/lib/commonjs/i18n/pt-br.json +1 -0
  82. package/lib/commonjs/i18n/ru.json +1 -0
  83. package/lib/commonjs/i18n/tr.json +1 -0
  84. package/lib/commonjs/icons/Attach.js +29 -6
  85. package/lib/commonjs/icons/Attach.js.map +1 -1
  86. package/lib/commonjs/icons/GiphyLightning.js +31 -0
  87. package/lib/commonjs/icons/GiphyLightning.js.map +1 -0
  88. package/lib/commonjs/icons/Lightning.js +18 -6
  89. package/lib/commonjs/icons/Lightning.js.map +1 -1
  90. package/lib/commonjs/icons/index.js +11 -0
  91. package/lib/commonjs/icons/index.js.map +1 -1
  92. package/lib/commonjs/native.js +14 -5
  93. package/lib/commonjs/native.js.map +1 -1
  94. package/lib/commonjs/types/types.js +12 -0
  95. package/lib/commonjs/types/types.js.map +1 -1
  96. package/lib/commonjs/utils/utils.js +13 -1
  97. package/lib/commonjs/utils/utils.js.map +1 -1
  98. package/lib/commonjs/version.json +1 -1
  99. package/lib/module/components/Attachment/Attachment.js +5 -4
  100. package/lib/module/components/Attachment/Attachment.js.map +1 -1
  101. package/lib/module/components/Attachment/Card.js +2 -1
  102. package/lib/module/components/Attachment/Card.js.map +1 -1
  103. package/lib/module/components/Attachment/FileAttachmentGroup.js +2 -1
  104. package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
  105. package/lib/module/components/Attachment/Gallery.js +3 -2
  106. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  107. package/lib/module/components/Attachment/Giphy.js +2 -3
  108. package/lib/module/components/Attachment/Giphy.js.map +1 -1
  109. package/lib/module/components/Attachment/utils/getAspectRatio.js +2 -1
  110. package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -1
  111. package/lib/module/components/AttachmentPicker/AttachmentPicker.js +14 -9
  112. package/lib/module/components/AttachmentPicker/AttachmentPicker.js.map +1 -1
  113. package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js +1 -0
  114. package/lib/module/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.js.map +1 -1
  115. package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js +4 -11
  116. package/lib/module/components/AttachmentPicker/components/AttachmentPickerItem.js.map +1 -1
  117. package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js +6 -57
  118. package/lib/module/components/AttachmentPicker/components/AttachmentPickerSelectionBar.js.map +1 -1
  119. package/lib/module/components/AutoCompleteInput/AutoCompleteInput.js +1 -1
  120. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js +2 -3
  121. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.js.map +1 -1
  122. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js +2 -1
  123. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionHeader.js.map +1 -1
  124. package/lib/module/components/Channel/Channel.js +5 -2
  125. package/lib/module/components/Channel/Channel.js.map +1 -1
  126. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +2 -0
  127. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  128. package/lib/module/components/ImageGallery/ImageGallery.js +4 -3
  129. package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
  130. package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js +3 -3
  131. package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -1
  132. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +2 -1
  133. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  134. package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js +5 -5
  135. package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
  136. package/lib/module/components/ImageGallery/components/ImageGrid.js +2 -1
  137. package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
  138. package/lib/module/components/Message/Message.js +8 -7
  139. package/lib/module/components/Message/Message.js.map +1 -1
  140. package/lib/module/components/MessageInput/AttachButton.js +67 -9
  141. package/lib/module/components/MessageInput/AttachButton.js.map +1 -1
  142. package/lib/module/components/MessageInput/CommandsButton.js +3 -2
  143. package/lib/module/components/MessageInput/CommandsButton.js.map +1 -1
  144. package/lib/module/components/MessageInput/FileUploadPreview.js +1 -11
  145. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  146. package/lib/module/components/MessageInput/InputButtons.js +2 -5
  147. package/lib/module/components/MessageInput/InputButtons.js.map +1 -1
  148. package/lib/module/components/MessageInput/MessageInput.js +27 -22
  149. package/lib/module/components/MessageInput/MessageInput.js.map +1 -1
  150. package/lib/module/components/MessageInput/components/InputGiphySearch.js +5 -6
  151. package/lib/module/components/MessageInput/components/InputGiphySearch.js.map +1 -1
  152. package/lib/module/components/MessageInput/components/NativeAttachmentPicker.js +157 -0
  153. package/lib/module/components/MessageInput/components/NativeAttachmentPicker.js.map +1 -0
  154. package/lib/module/components/MessageInput/hooks/useAudioController.js +2 -1
  155. package/lib/module/components/MessageInput/hooks/useAudioController.js.map +1 -1
  156. package/lib/module/components/MessageList/MessageList.js +2 -1
  157. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  158. package/lib/module/components/Reply/Reply.js +19 -18
  159. package/lib/module/components/Reply/Reply.js.map +1 -1
  160. package/lib/module/contexts/messageInputContext/MessageInputContext.js +267 -181
  161. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  162. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +6 -0
  163. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  164. package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js +6 -5
  165. package/lib/module/contexts/messageInputContext/hooks/useMessageDetailsForState.js.map +1 -1
  166. package/lib/module/contexts/overlayContext/OverlayProvider.js +3 -2
  167. package/lib/module/contexts/overlayContext/OverlayProvider.js.map +1 -1
  168. package/lib/module/contexts/themeContext/utils/theme.js +5 -0
  169. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  170. package/lib/module/i18n/en.json +1 -0
  171. package/lib/module/i18n/es.json +1 -0
  172. package/lib/module/i18n/fr.json +1 -0
  173. package/lib/module/i18n/he.json +1 -0
  174. package/lib/module/i18n/hi.json +1 -0
  175. package/lib/module/i18n/it.json +1 -0
  176. package/lib/module/i18n/ja.json +1 -0
  177. package/lib/module/i18n/ko.json +1 -0
  178. package/lib/module/i18n/nl.json +1 -0
  179. package/lib/module/i18n/pt-br.json +1 -0
  180. package/lib/module/i18n/ru.json +1 -0
  181. package/lib/module/i18n/tr.json +1 -0
  182. package/lib/module/icons/Attach.js +29 -6
  183. package/lib/module/icons/Attach.js.map +1 -1
  184. package/lib/module/icons/GiphyLightning.js +31 -0
  185. package/lib/module/icons/GiphyLightning.js.map +1 -0
  186. package/lib/module/icons/Lightning.js +18 -6
  187. package/lib/module/icons/Lightning.js.map +1 -1
  188. package/lib/module/icons/index.js +11 -0
  189. package/lib/module/icons/index.js.map +1 -1
  190. package/lib/module/native.js +14 -5
  191. package/lib/module/native.js.map +1 -1
  192. package/lib/module/types/types.js +12 -0
  193. package/lib/module/types/types.js.map +1 -1
  194. package/lib/module/utils/utils.js +13 -1
  195. package/lib/module/utils/utils.js.map +1 -1
  196. package/lib/module/version.json +1 -1
  197. package/lib/typescript/components/Attachment/Attachment.d.ts +1 -1
  198. package/lib/typescript/components/Attachment/Attachment.d.ts.map +1 -1
  199. package/lib/typescript/components/Attachment/Card.d.ts +1 -1
  200. package/lib/typescript/components/Attachment/Card.d.ts.map +1 -1
  201. package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +1 -1
  202. package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts.map +1 -1
  203. package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
  204. package/lib/typescript/components/Attachment/Gallery.d.ts.map +1 -1
  205. package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +1 -1
  206. package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts.map +1 -1
  207. package/lib/typescript/components/AttachmentPicker/AttachmentPicker.d.ts.map +1 -1
  208. package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.d.ts +1 -1
  209. package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.d.ts.map +1 -1
  210. package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerItem.d.ts.map +1 -1
  211. package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerSelectionBar.d.ts.map +1 -1
  212. package/lib/typescript/components/Channel/Channel.d.ts +1 -1
  213. package/lib/typescript/components/Channel/Channel.d.ts.map +1 -1
  214. package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
  215. package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts.map +1 -1
  216. package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +1 -1
  217. package/lib/typescript/components/ImageGallery/ImageGallery.d.ts.map +1 -1
  218. package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts.map +1 -1
  219. package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +1 -1
  220. package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts.map +1 -1
  221. package/lib/typescript/components/ImageGallery/components/ImageGalleryVideoControl.d.ts.map +1 -1
  222. package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +1 -1
  223. package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts.map +1 -1
  224. package/lib/typescript/components/Message/Message.d.ts +1 -1
  225. package/lib/typescript/components/Message/Message.d.ts.map +1 -1
  226. package/lib/typescript/components/MessageInput/AttachButton.d.ts +3 -1
  227. package/lib/typescript/components/MessageInput/AttachButton.d.ts.map +1 -1
  228. package/lib/typescript/components/MessageInput/CommandsButton.d.ts.map +1 -1
  229. package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts.map +1 -1
  230. package/lib/typescript/components/MessageInput/InputButtons.d.ts.map +1 -1
  231. package/lib/typescript/components/MessageInput/MessageInput.d.ts +1 -1
  232. package/lib/typescript/components/MessageInput/MessageInput.d.ts.map +1 -1
  233. package/lib/typescript/components/MessageInput/components/NativeAttachmentPicker.d.ts +9 -0
  234. package/lib/typescript/components/MessageInput/components/NativeAttachmentPicker.d.ts.map +1 -0
  235. package/lib/typescript/components/MessageList/MessageList.d.ts +1 -1
  236. package/lib/typescript/components/MessageList/MessageList.d.ts.map +1 -1
  237. package/lib/typescript/components/Reply/Reply.d.ts +1 -1
  238. package/lib/typescript/components/Reply/Reply.d.ts.map +1 -1
  239. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +15 -3
  240. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts.map +1 -1
  241. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
  242. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts.map +1 -1
  243. package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts +1 -1
  244. package/lib/typescript/contexts/messageInputContext/hooks/useMessageDetailsForState.d.ts.map +1 -1
  245. package/lib/typescript/contexts/overlayContext/OverlayProvider.d.ts.map +1 -1
  246. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +5 -0
  247. package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
  248. package/lib/typescript/i18n/en.json +1 -0
  249. package/lib/typescript/i18n/es.json +1 -0
  250. package/lib/typescript/i18n/fr.json +1 -0
  251. package/lib/typescript/i18n/he.json +1 -0
  252. package/lib/typescript/i18n/hi.json +1 -0
  253. package/lib/typescript/i18n/it.json +1 -0
  254. package/lib/typescript/i18n/ja.json +1 -0
  255. package/lib/typescript/i18n/ko.json +1 -0
  256. package/lib/typescript/i18n/nl.json +1 -0
  257. package/lib/typescript/i18n/pt-br.json +1 -0
  258. package/lib/typescript/i18n/ru.json +1 -0
  259. package/lib/typescript/i18n/tr.json +1 -0
  260. package/lib/typescript/icons/Attach.d.ts +5 -1
  261. package/lib/typescript/icons/Attach.d.ts.map +1 -1
  262. package/lib/typescript/icons/GiphyLightning.d.ts +8 -0
  263. package/lib/typescript/icons/GiphyLightning.d.ts.map +1 -0
  264. package/lib/typescript/icons/Lightning.d.ts +5 -1
  265. package/lib/typescript/icons/Lightning.d.ts.map +1 -1
  266. package/lib/typescript/icons/index.d.ts +1 -0
  267. package/lib/typescript/icons/index.d.ts.map +1 -1
  268. package/lib/typescript/native.d.ts +13 -5
  269. package/lib/typescript/native.d.ts.map +1 -1
  270. package/lib/typescript/types/types.d.ts +10 -1
  271. package/lib/typescript/types/types.d.ts.map +1 -1
  272. package/lib/typescript/utils/i18n/Streami18n.d.ts +1 -0
  273. package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
  274. package/lib/typescript/utils/utils.d.ts +6 -0
  275. package/lib/typescript/utils/utils.d.ts.map +1 -1
  276. package/package.json +1 -1
  277. package/src/components/Attachment/Attachment.tsx +7 -7
  278. package/src/components/Attachment/Card.tsx +2 -2
  279. package/src/components/Attachment/FileAttachmentGroup.tsx +2 -2
  280. package/src/components/Attachment/Gallery.tsx +3 -3
  281. package/src/components/Attachment/Giphy.tsx +1 -1
  282. package/src/components/Attachment/utils/getAspectRatio.ts +2 -2
  283. package/src/components/AttachmentPicker/AttachmentPicker.tsx +6 -0
  284. package/src/components/AttachmentPicker/components/AttachmentPickerIOSSelectMorePhotos.tsx +3 -0
  285. package/src/components/AttachmentPicker/components/AttachmentPickerItem.tsx +6 -15
  286. package/src/components/AttachmentPicker/components/AttachmentPickerSelectionBar.tsx +6 -30
  287. package/src/components/AutoCompleteInput/AutoCompleteInput.tsx +1 -1
  288. package/src/components/AutoCompleteInput/AutoCompleteSuggestionCommandIcon.tsx +1 -1
  289. package/src/components/AutoCompleteInput/AutoCompleteSuggestionHeader.tsx +1 -1
  290. package/src/components/Channel/Channel.tsx +8 -6
  291. package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +2 -0
  292. package/src/components/ImageGallery/ImageGallery.tsx +6 -6
  293. package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +5 -4
  294. package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +1 -0
  295. package/src/components/ImageGallery/__tests__/ImageGalleryHeader.test.tsx +1 -0
  296. package/src/components/ImageGallery/__tests__/ImageGalleryVideoControl.test.tsx +2 -2
  297. package/src/components/ImageGallery/components/AnimatedGalleryVideo.tsx +4 -3
  298. package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +2 -2
  299. package/src/components/ImageGallery/components/ImageGalleryVideoControl.tsx +5 -14
  300. package/src/components/ImageGallery/components/ImageGrid.tsx +2 -2
  301. package/src/components/Message/Message.tsx +12 -8
  302. package/src/components/MessageInput/AttachButton.tsx +74 -8
  303. package/src/components/MessageInput/CommandsButton.tsx +2 -1
  304. package/src/components/MessageInput/FileUploadPreview.tsx +8 -17
  305. package/src/components/MessageInput/InputButtons.tsx +1 -2
  306. package/src/components/MessageInput/MessageInput.tsx +43 -30
  307. package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +1 -0
  308. package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap +139 -45
  309. package/src/components/MessageInput/components/InputGiphySearch.tsx +3 -3
  310. package/src/components/MessageInput/components/NativeAttachmentPicker.tsx +179 -0
  311. package/src/components/MessageInput/hooks/useAudioController.tsx +2 -2
  312. package/src/components/MessageList/MessageList.tsx +2 -2
  313. package/src/components/Reply/Reply.tsx +31 -29
  314. package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +86 -37
  315. package/src/contexts/messageInputContext/MessageInputContext.tsx +94 -23
  316. package/src/contexts/messageInputContext/__tests__/MessageInputContext.test.tsx +1 -38
  317. package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +6 -1
  318. package/src/contexts/messageInputContext/hooks/useMessageDetailsForState.ts +11 -6
  319. package/src/contexts/overlayContext/OverlayProvider.tsx +4 -1
  320. package/src/contexts/themeContext/utils/theme.ts +10 -0
  321. package/src/i18n/en.json +1 -0
  322. package/src/i18n/es.json +1 -0
  323. package/src/i18n/fr.json +1 -0
  324. package/src/i18n/he.json +1 -0
  325. package/src/i18n/hi.json +1 -0
  326. package/src/i18n/it.json +1 -0
  327. package/src/i18n/ja.json +1 -0
  328. package/src/i18n/ko.json +1 -0
  329. package/src/i18n/nl.json +1 -0
  330. package/src/i18n/pt-br.json +1 -0
  331. package/src/i18n/ru.json +1 -0
  332. package/src/i18n/tr.json +1 -0
  333. package/src/icons/Attach.tsx +22 -9
  334. package/src/icons/GiphyLightning.tsx +18 -0
  335. package/src/icons/Lightning.tsx +14 -5
  336. package/src/icons/index.ts +1 -0
  337. package/src/native.ts +28 -14
  338. package/src/types/types.ts +11 -1
  339. package/src/utils/utils.ts +20 -0
  340. package/src/version.json +1 -1
package/src/i18n/he.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "Delete": "מחק",
15
15
  "Delete Message": "מחק/י הודעה",
16
16
  "Device camera is used to take photos or videos.": "מצלמת המכשיר משמשת לצילום תמונות או סרטונים.",
17
+ "Device gallery permissions is used to take photos or videos.": "הרשאות גלריית המכשיר משמשות לצילום תמונות או סרטונים.",
17
18
  "Do you want to send a copy of this message to a moderator for further investigation?": "האם את/ה רוצה לשלוח עותק של הודעה זו למנחה להמשך חקירה?",
18
19
  "Edit Message": "ערוך הודעה",
19
20
  "Edited": "נערך",
package/src/i18n/hi.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "Delete": "हटाएं",
15
15
  "Delete Message": "मैसेज को डिलीट करे",
16
16
  "Device camera is used to take photos or videos.": "डिवाइस कैमरे का उपयोग फ़ोटो या वीडियो लेने के लिए किया जाता है।",
17
+ "Device gallery permissions is used to take photos or videos.": "डिवाइस गैलरी की अनुमतियों का उपयोग फोटो या वीडियो लेने के लिए किया जाता है।",
17
18
  "Do you want to send a copy of this message to a moderator for further investigation?": "क्या आप इस संदेश की एक प्रति आगे की जाँच के लिए किसी मॉडरेटर को भेजना चाहते हैं?",
18
19
  "Edit Message": "मैसेज में बदलाव करे",
19
20
  "Edited": "मैसेज बदला गया है",
package/src/i18n/it.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "Delete": "Elimina",
15
15
  "Delete Message": "Cancella il Messaggio",
16
16
  "Device camera is used to take photos or videos.": "La fotocamera del dispositivo viene utilizzata per scattare foto o video.",
17
+ "Device gallery permissions is used to take photos or videos.": "Le autorizzazioni della galleria del dispositivo vengono utilizzate per scattare foto o video.",
17
18
  "Do you want to send a copy of this message to a moderator for further investigation?": "Vuoi inviare una copia di questo messaggio a un moderatore per ulteriori indagini?",
18
19
  "Edit Message": "Modifica Messaggio",
19
20
  "Edited": "Modificato",
package/src/i18n/ja.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "Delete": "消去",
15
15
  "Delete Message": "メッセージを削除",
16
16
  "Device camera is used to take photos or videos.": "デバイスのカメラは写真やビデオの撮影に使用されます。",
17
+ "Device gallery permissions is used to take photos or videos.": "デバイスギャラリーの権限は写真やビデオを撮るために使用されます。",
17
18
  "Do you want to send a copy of this message to a moderator for further investigation?": "このメッセージのコピーをモデレーターに送信して、さらに調査しますか?",
18
19
  "Edit Message": "メッセージを編集",
19
20
  "Edited": "編集済み",
package/src/i18n/ko.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "Delete": "삭제",
15
15
  "Delete Message": "메시지 삭제",
16
16
  "Device camera is used to take photos or videos.": "기기 카메라는 사진이나 동영상을 촬영하는 데 사용됩니다.",
17
+ "Device gallery permissions is used to take photos or videos.": "장치 갤러리 권한은 사진 또는 비디오를 촬영하는 데 사용됩니다.",
17
18
  "Do you want to send a copy of this message to a moderator for further investigation?": "이 메시지의 복사본을 운영자에게 보내 추가 조사를합니까?",
18
19
  "Edit Message": "메시지 수정",
19
20
  "Edited": "편집됨",
package/src/i18n/nl.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "Delete": "Verwijderen",
15
15
  "Delete Message": "Verwijder bericht",
16
16
  "Device camera is used to take photos or videos.": "De camera van het apparaat wordt gebruikt om foto's of video's te maken.",
17
+ "Device gallery permissions is used to take photos or videos.": "Apparaatgallerijmachtigingen worden gebruikt om foto’s of video’s te maken.",
17
18
  "Do you want to send a copy of this message to a moderator for further investigation?": "Wil je een kopie van dit bericht naar een moderator sturen voor verder onderzoek?",
18
19
  "Edit Message": "Pas bericht aan",
19
20
  "Edited": "Bewerkt",
@@ -14,6 +14,7 @@
14
14
  "Delete": "Excluir",
15
15
  "Delete Message": "Excluir Mensagem",
16
16
  "Device camera is used to take photos or videos.": "A câmera do dispositivo é usada para tirar fotos ou vídeos.",
17
+ "Device gallery permissions is used to take photos or videos.": "As permissões da galeria do dispositivo são usadas para tirar fotos ou vídeos.",
17
18
  "Do you want to send a copy of this message to a moderator for further investigation?": "Deseja enviar uma cópia desta mensagem para um moderador para investigação adicional?",
18
19
  "Edit Message": "Editar Mensagem",
19
20
  "Edited": "Editado",
package/src/i18n/ru.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "Delete": "удалять",
15
15
  "Delete Message": "Удалить сообщение",
16
16
  "Device camera is used to take photos or videos.": "Камера устройства используется для съемки фотографий или видео.",
17
+ "Device gallery permissions is used to take photos or videos.": "Разрешения галереи устройства используются для съемки фото или видео.",
17
18
  "Do you want to send a copy of this message to a moderator for further investigation?": "Вы хотите отправить копию этого сообщения модератору для дальнейшего изучения?",
18
19
  "Edit Message": "Редактировать сообщение",
19
20
  "Edited": "Отредактировано",
package/src/i18n/tr.json CHANGED
@@ -14,6 +14,7 @@
14
14
  "Delete": "Sil",
15
15
  "Delete Message": "Mesajı Sil",
16
16
  "Device camera is used to take photos or videos.": "Cihaz kamerası fotoğraf veya video çekmek için kullanılır.",
17
+ "Device gallery permissions is used to take photos or videos.": "Cihaz galerisi izinleri fotoğraf veya video çekmek için kullanılır.",
17
18
  "Do you want to send a copy of this message to a moderator for further investigation?": "Detaylı inceleme için bu mesajın kopyasını moderatöre göndermek istiyor musunuz?",
18
19
  "Edit Message": "Mesajı Düzenle",
19
20
  "Edited": "Düzenlendi",
@@ -1,12 +1,25 @@
1
1
  import React from 'react';
2
2
 
3
- import { IconProps, RootPath, RootSvg } from './utils/base';
4
-
5
- export const Attach = (props: IconProps) => (
6
- <RootSvg {...props}>
7
- <RootPath
8
- d='M13.468 2.888a5.07 5.07 0 012.983.635 5.07 5.07 0 012.041 2.265c.45 1.01.546 2.254-.144 3.449l-4.5 7.794a3.232 3.232 0 01-1.427 1.294c-.757.342-1.696.367-2.671-.196-.975-.563-1.422-1.389-1.506-2.215a3.233 3.233 0 01.408-1.883l4-6.928a1 1 0 011.732 1l-4 6.928c-.087.15-.176.425-.15.682.02.196.105.447.516.684.41.237.671.185.85.105.236-.107.43-.32.516-.47l4.5-7.795c.31-.538.29-1.093.049-1.636a3.072 3.072 0 00-1.214-1.346 3.072 3.072 0 00-1.773-.378c-.591.062-1.082.322-1.392.86l-5 8.66c-.654 1.133-.286 3.3 1.964 4.598 2.25 1.3 4.31.535 4.964-.598l3.5-6.062a1 1 0 111.732 1l-3.5 6.062c-1.345 2.33-4.75 3.031-7.696 1.33-2.946-1.7-4.042-5-2.696-7.33l5-8.66c.69-1.195 1.815-1.733 2.914-1.85z'
9
- {...props}
10
- />
11
- </RootSvg>
3
+ import Svg, { ClipPath, Defs, G, Path, Rect } from 'react-native-svg';
4
+
5
+ import { IconProps } from './utils/base';
6
+
7
+ type Props = IconProps & {
8
+ size: number;
9
+ };
10
+
11
+ export const Attach = ({ size, ...rest }: Props) => (
12
+ <Svg height={size} viewBox={`0 0 ${size} ${size}`} width={size} {...rest}>
13
+ <G clipPath='url(#id)'>
14
+ <Path
15
+ d='M17.5245 9.33332L14.8579 9.33332L14.8579 14.6666L9.52453 14.6666L9.52453 17.3333L14.8579 17.3333L14.8579 22.6667L17.5245 22.6667L17.5245 17.3333L22.8579 17.3333L22.8579 14.6666L17.5245 14.6666L17.5245 9.33332ZM16.1912 2.66665C8.83119 2.66665 2.85786 8.63998 2.85786 16C2.85786 23.36 8.83119 29.3333 16.1912 29.3333C23.5512 29.3333 29.5245 23.36 29.5245 16C29.5245 8.63998 23.5512 2.66665 16.1912 2.66665ZM16.1912 26.6667C10.3112 26.6666 5.52453 21.88 5.52453 16C5.52453 10.12 10.3112 5.33332 16.1912 5.33332C22.0712 5.33332 26.8579 10.12 26.8579 16C26.8579 21.88 22.0712 26.6666 16.1912 26.6667Z'
16
+ {...rest}
17
+ />
18
+ </G>
19
+ <Defs>
20
+ <ClipPath id='id'>
21
+ <Rect height={32} transform={'translate(0.191406)'} width={size} />
22
+ </ClipPath>
23
+ </Defs>
24
+ </Svg>
12
25
  );
@@ -0,0 +1,18 @@
1
+ import React from 'react';
2
+
3
+ import Svg, { Path } from 'react-native-svg';
4
+
5
+ import { IconProps } from './utils/base';
6
+
7
+ type Props = IconProps & {
8
+ size: number;
9
+ };
10
+
11
+ export const GiphyLightning = ({ size = 16, ...rest }: Props) => (
12
+ <Svg height={size} viewBox={`0 0 ${size} ${size}`} width={size} {...rest}>
13
+ <Path
14
+ d='M7.69693 2H11.3333L8.90905 6.84848H11.3333L6.78784 15.3333L7.69693 9.27273H4.66663L7.69693 2Z'
15
+ {...rest}
16
+ />
17
+ </Svg>
18
+ );
@@ -1,9 +1,18 @@
1
1
  import React from 'react';
2
2
 
3
- import { IconProps, RootPath, RootSvg } from './utils/base';
3
+ import Svg, { Path } from 'react-native-svg';
4
4
 
5
- export const Lightning = (props: IconProps) => (
6
- <RootSvg {...props}>
7
- <RootPath d='M11.636 4H16l-2.91 5.818H16L10.546 20l1.09-7.273H8L11.636 4z' {...props} />
8
- </RootSvg>
5
+ import { IconProps } from './utils/base';
6
+
7
+ type Props = IconProps & {
8
+ size: number;
9
+ };
10
+
11
+ export const Lightning = ({ size = 32, ...rest }: Props) => (
12
+ <Svg height={size} viewBox={`0 0 ${size} ${size}`} width={size} {...rest}>
13
+ <Path
14
+ d='M14.8522 28H13.5188L14.8522 18.6667H10.1855C9.01218 18.6667 9.74551 17.6667 9.77218 17.6267C11.4922 14.5867 14.0788 10.0533 17.5322 4H18.8655L17.5322 13.3333H22.2122C22.7455 13.3333 23.0388 13.5867 22.7455 14.2133C17.4788 23.4 14.8522 28 14.8522 28Z'
15
+ {...rest}
16
+ />
17
+ </Svg>
9
18
  );
@@ -30,6 +30,7 @@ export * from './Flag';
30
30
  export * from './Folder';
31
31
  export * from './GenericFile';
32
32
  export * from './GiphyIcon';
33
+ export * from './GiphyLightning';
33
34
  export * from './Grid';
34
35
  export * from './Group';
35
36
  export * from './HTML';
package/src/native.ts CHANGED
@@ -66,6 +66,15 @@ type PickDocument = ({ maxNumberOfFiles }: { maxNumberOfFiles?: number }) =>
66
66
  | never;
67
67
  export let pickDocument: PickDocument = fail;
68
68
 
69
+ type PickImageAssetType = {
70
+ askToOpenSettings?: boolean;
71
+ assets?: Array<Omit<Asset, 'source'> & { source: 'picker' }>;
72
+ cancelled?: boolean;
73
+ };
74
+
75
+ type PickImage = () => Promise<PickImageAssetType> | never;
76
+ export let pickImage: PickImage = fail;
77
+
69
78
  type SaveFileOptions = {
70
79
  fileName: string;
71
80
  fromUrl: string;
@@ -83,16 +92,11 @@ type ShareOptions = {
83
92
  type ShareImage = (options: ShareOptions) => Promise<boolean> | never;
84
93
  export let shareImage: ShareImage = fail;
85
94
 
86
- type Photo =
87
- | (Omit<Asset, 'source'> & {
88
- cancelled: false;
89
- source: 'camera';
90
- askToOpenSettings?: boolean;
91
- })
92
- | {
93
- cancelled: true;
94
- askToOpenSettings?: boolean;
95
- };
95
+ type Photo = Omit<Asset, 'source'> & {
96
+ source: 'camera';
97
+ askToOpenSettings?: boolean;
98
+ cancelled?: boolean;
99
+ };
96
100
  type TakePhoto = (options: { compressImageQuality?: number }) => Promise<Photo> | never;
97
101
  export let takePhoto: TakePhoto = fail;
98
102
 
@@ -294,6 +298,7 @@ type Handlers = {
294
298
  NetInfo?: NetInfo;
295
299
  oniOS14GalleryLibrarySelectionChange?: OniOS14LibrarySelectionChange;
296
300
  pickDocument?: PickDocument;
301
+ pickImage?: PickImage;
297
302
  saveFile?: SaveFile;
298
303
  SDK?: string;
299
304
  setClipboardString?: SetClipboardString;
@@ -324,19 +329,19 @@ export const registerNativeHandlers = (handlers: Handlers) => {
324
329
  NetInfo = handlers.NetInfo;
325
330
  }
326
331
 
327
- if (handlers.getLocalAssetUri) {
332
+ if (handlers.getLocalAssetUri !== undefined) {
328
333
  getLocalAssetUri = handlers.getLocalAssetUri;
329
334
  }
330
335
 
331
- if (handlers.getPhotos) {
336
+ if (handlers.getPhotos !== undefined) {
332
337
  getPhotos = handlers.getPhotos;
333
338
  }
334
339
 
335
- if (handlers.iOS14RefreshGallerySelection) {
340
+ if (handlers.iOS14RefreshGallerySelection !== undefined) {
336
341
  iOS14RefreshGallerySelection = handlers.iOS14RefreshGallerySelection;
337
342
  }
338
343
 
339
- if (handlers.oniOS14GalleryLibrarySelectionChange) {
344
+ if (handlers.oniOS14GalleryLibrarySelectionChange !== undefined) {
340
345
  oniOS14GalleryLibrarySelectionChange = handlers.oniOS14GalleryLibrarySelectionChange;
341
346
  }
342
347
 
@@ -344,6 +349,10 @@ export const registerNativeHandlers = (handlers: Handlers) => {
344
349
  pickDocument = handlers.pickDocument;
345
350
  }
346
351
 
352
+ if (handlers.pickImage !== undefined) {
353
+ pickImage = handlers.pickImage;
354
+ }
355
+
347
356
  if (handlers.saveFile) {
348
357
  saveFile = handlers.saveFile;
349
358
  }
@@ -381,3 +390,8 @@ export const isImagePickerAvailable = () => !!takePhoto;
381
390
  export const isVideoPackageAvailable = () => !!Video;
382
391
  export const isAudioPackageAvailable = () => !!Sound.Player || !!Sound.initializeSound;
383
392
  export const isRecordingPackageAvailable = () => !!Audio;
393
+ export const isImageMediaLibraryAvailable = () =>
394
+ !!getPhotos &&
395
+ !!iOS14RefreshGallerySelection &&
396
+ !!oniOS14GalleryLibrarySelectionChange &&
397
+ !!getLocalAssetUri;
@@ -2,6 +2,16 @@ import type { ExtendableGenerics, LiteralStringForUnion } from 'stream-chat';
2
2
 
3
3
  import type { FileStateValue } from '../utils/utils';
4
4
 
5
+ export enum FileTypes {
6
+ Audio = 'audio',
7
+ File = 'file',
8
+ Giphy = 'giphy',
9
+ Image = 'image',
10
+ Imgur = 'imgur',
11
+ Video = 'video',
12
+ VoiceRecording = 'voiceRecording',
13
+ }
14
+
5
15
  export type Asset = {
6
16
  duration: number;
7
17
  height: number;
@@ -20,7 +30,7 @@ export type File = {
20
30
  id?: string;
21
31
  mimeType?: string;
22
32
  size?: number;
23
- type?: 'file' | 'image' | 'video' | 'audio' | 'voiceRecording';
33
+ type?: FileTypes;
24
34
  // The uri should be of type `string`. But is `string|undefined` because the same type is used for the response from Stream's Attachment. This shall be fixed.
25
35
  uri?: string;
26
36
  waveform_data?: number[];
@@ -1,5 +1,6 @@
1
1
  import type React from 'react';
2
2
 
3
+ import dayjs from 'dayjs';
3
4
  import EmojiRegex from 'emoji-regex';
4
5
  import type { DebouncedFunc } from 'lodash';
5
6
  import debounce from 'lodash/debounce';
@@ -657,3 +658,22 @@ export const getFileNameFromPath = (path: string) => {
657
658
  const match = path.match(pattern);
658
659
  return match ? match[0] : '';
659
660
  };
661
+
662
+ /**
663
+ * Utility to get the duration label from the duration in seconds.
664
+ * @param duration number
665
+ * @returns string
666
+ */
667
+ export const getDurationLabelFromDuration = (duration: number) => {
668
+ const ONE_HOUR_IN_SECONDS = 3600;
669
+ const ONE_HOUR_IN_MILLISECONDS = ONE_HOUR_IN_SECONDS * 1000;
670
+ let durationLabel = '00:00';
671
+ const isDurationLongerThanHour = duration / ONE_HOUR_IN_MILLISECONDS >= 1;
672
+ const formattedDurationParam = isDurationLongerThanHour ? 'HH:mm:ss' : 'mm:ss';
673
+ const formattedVideoDuration = dayjs
674
+ .duration(duration, 'milliseconds')
675
+ .format(formattedDurationParam);
676
+ durationLabel = formattedVideoDuration;
677
+
678
+ return durationLabel;
679
+ };
package/src/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "5.34.1-beta.5"
2
+ "version": "5.35.0-beta.1"
3
3
  }