stream-chat-react-native-core 9.0.0-beta.26 → 9.0.0-beta.28

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 (273) hide show
  1. package/lib/commonjs/components/Attachment/Giphy/Giphy.js +19 -7
  2. package/lib/commonjs/components/Attachment/Giphy/Giphy.js.map +1 -1
  3. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerContent.js +3 -3
  4. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerContent.js.map +1 -1
  5. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerGenericContent.js +24 -16
  6. package/lib/commonjs/components/AttachmentPicker/components/AttachmentPickerGenericContent.js.map +1 -1
  7. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js +2 -1
  8. package/lib/commonjs/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  9. package/lib/commonjs/components/Channel/Channel.js +1 -1
  10. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  11. package/lib/commonjs/components/ChannelList/hooks/useChannelActionItems.js +0 -15
  12. package/lib/commonjs/components/ChannelList/hooks/useChannelActionItems.js.map +1 -1
  13. package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js +15 -13
  14. package/lib/commonjs/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
  15. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js +2 -0
  16. package/lib/commonjs/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  17. package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js +1 -0
  18. package/lib/commonjs/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
  19. package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js +11 -9
  20. package/lib/commonjs/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
  21. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +5 -4
  22. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
  23. package/lib/commonjs/components/Indicators/LoadingIndicator.js +3 -3
  24. package/lib/commonjs/components/Indicators/LoadingIndicator.js.map +1 -1
  25. package/lib/commonjs/components/Message/Message.js +2 -10
  26. package/lib/commonjs/components/Message/Message.js.map +1 -1
  27. package/lib/commonjs/components/Message/MessageItemView/MessageContent.js +39 -5
  28. package/lib/commonjs/components/Message/MessageItemView/MessageContent.js.map +1 -1
  29. package/lib/commonjs/components/Message/MessageItemView/MessageItemView.js +11 -7
  30. package/lib/commonjs/components/Message/MessageItemView/MessageItemView.js.map +1 -1
  31. package/lib/commonjs/components/Message/MessageItemView/MessageReplies.js +1 -1
  32. package/lib/commonjs/components/Message/MessageItemView/MessageReplies.js.map +1 -1
  33. package/lib/commonjs/components/Message/MessageItemView/MessageStatus.js +18 -8
  34. package/lib/commonjs/components/Message/MessageItemView/MessageStatus.js.map +1 -1
  35. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +3 -1
  36. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  37. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js +2 -1
  38. package/lib/commonjs/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  39. package/lib/commonjs/components/MessageMenu/MessageUserReactions.js +0 -1
  40. package/lib/commonjs/components/MessageMenu/MessageUserReactions.js.map +1 -1
  41. package/lib/commonjs/components/Poll/components/MultipleVotesSettings.js +8 -0
  42. package/lib/commonjs/components/Poll/components/MultipleVotesSettings.js.map +1 -1
  43. package/lib/commonjs/components/Poll/components/PollInputDialog.js +1 -1
  44. package/lib/commonjs/components/Poll/components/PollInputDialog.js.map +1 -1
  45. package/lib/commonjs/components/Poll/components/PollOption.js +15 -5
  46. package/lib/commonjs/components/Poll/components/PollOption.js.map +1 -1
  47. package/lib/commonjs/components/ThreadList/ThreadList.js +3 -1
  48. package/lib/commonjs/components/ThreadList/ThreadList.js.map +1 -1
  49. package/lib/commonjs/components/UIComponents/BottomSheetModal.js +141 -40
  50. package/lib/commonjs/components/UIComponents/BottomSheetModal.js.map +1 -1
  51. package/lib/commonjs/components/UIComponents/BottomSheetModal.utils.js +53 -0
  52. package/lib/commonjs/components/UIComponents/BottomSheetModal.utils.js.map +1 -0
  53. package/lib/commonjs/components/UIComponents/StreamBottomSheetModalFlatList.js +9 -5
  54. package/lib/commonjs/components/UIComponents/StreamBottomSheetModalFlatList.js.map +1 -1
  55. package/lib/commonjs/components/ui/Avatar/ChannelAvatar.js +1 -1
  56. package/lib/commonjs/components/ui/Avatar/ChannelAvatar.js.map +1 -1
  57. package/lib/commonjs/components/ui/Button/hooks/useButtonStyles.js +1 -1
  58. package/lib/commonjs/components/ui/Button/hooks/useButtonStyles.js.map +1 -1
  59. package/lib/commonjs/contexts/bottomSheetContext/BottomSheetContext.js.map +1 -1
  60. package/lib/commonjs/contexts/messageComposerContext/MessageComposerContext.js +4 -4
  61. package/lib/commonjs/contexts/messageComposerContext/MessageComposerContext.js.map +1 -1
  62. package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
  63. package/lib/commonjs/contexts/themeContext/utils/theme.js +1 -0
  64. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  65. package/lib/commonjs/hooks/messagePreview/useMessagePreviewText.js +4 -4
  66. package/lib/commonjs/hooks/messagePreview/useMessagePreviewText.js.map +1 -1
  67. package/lib/commonjs/i18n/en.json +3 -2
  68. package/lib/commonjs/i18n/es.json +3 -2
  69. package/lib/commonjs/i18n/fr.json +3 -2
  70. package/lib/commonjs/i18n/he.json +3 -2
  71. package/lib/commonjs/i18n/hi.json +3 -2
  72. package/lib/commonjs/i18n/it.json +3 -2
  73. package/lib/commonjs/i18n/ja.json +3 -2
  74. package/lib/commonjs/i18n/ko.json +3 -2
  75. package/lib/commonjs/i18n/nl.json +3 -2
  76. package/lib/commonjs/i18n/pt-br.json +3 -2
  77. package/lib/commonjs/i18n/ru.json +3 -2
  78. package/lib/commonjs/i18n/tr.json +3 -2
  79. package/lib/commonjs/version.json +1 -1
  80. package/lib/module/components/Attachment/Giphy/Giphy.js +19 -7
  81. package/lib/module/components/Attachment/Giphy/Giphy.js.map +1 -1
  82. package/lib/module/components/AttachmentPicker/components/AttachmentPickerContent.js +3 -3
  83. package/lib/module/components/AttachmentPicker/components/AttachmentPickerContent.js.map +1 -1
  84. package/lib/module/components/AttachmentPicker/components/AttachmentPickerGenericContent.js +24 -16
  85. package/lib/module/components/AttachmentPicker/components/AttachmentPickerGenericContent.js.map +1 -1
  86. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js +2 -1
  87. package/lib/module/components/AutoCompleteInput/AutoCompleteSuggestionList.js.map +1 -1
  88. package/lib/module/components/Channel/Channel.js +1 -1
  89. package/lib/module/components/Channel/Channel.js.map +1 -1
  90. package/lib/module/components/ChannelList/hooks/useChannelActionItems.js +0 -15
  91. package/lib/module/components/ChannelList/hooks/useChannelActionItems.js.map +1 -1
  92. package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js +15 -13
  93. package/lib/module/components/ChannelPreview/ChannelDetailsBottomSheet.js.map +1 -1
  94. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js +2 -0
  95. package/lib/module/components/ChannelPreview/ChannelPreviewMessage.js.map +1 -1
  96. package/lib/module/components/ChannelPreview/ChannelPreviewView.js +1 -0
  97. package/lib/module/components/ChannelPreview/ChannelPreviewView.js.map +1 -1
  98. package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js +11 -9
  99. package/lib/module/components/ChannelPreview/ChannelSwipableWrapper.js.map +1 -1
  100. package/lib/module/components/ImageGallery/components/ImageGrid.js +5 -4
  101. package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
  102. package/lib/module/components/Indicators/LoadingIndicator.js +3 -3
  103. package/lib/module/components/Indicators/LoadingIndicator.js.map +1 -1
  104. package/lib/module/components/Message/Message.js +2 -10
  105. package/lib/module/components/Message/Message.js.map +1 -1
  106. package/lib/module/components/Message/MessageItemView/MessageContent.js +39 -5
  107. package/lib/module/components/Message/MessageItemView/MessageContent.js.map +1 -1
  108. package/lib/module/components/Message/MessageItemView/MessageItemView.js +11 -7
  109. package/lib/module/components/Message/MessageItemView/MessageItemView.js.map +1 -1
  110. package/lib/module/components/Message/MessageItemView/MessageReplies.js +1 -1
  111. package/lib/module/components/Message/MessageItemView/MessageReplies.js.map +1 -1
  112. package/lib/module/components/Message/MessageItemView/MessageStatus.js +18 -8
  113. package/lib/module/components/Message/MessageItemView/MessageStatus.js.map +1 -1
  114. package/lib/module/components/Message/hooks/useCreateMessageContext.js +3 -1
  115. package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  116. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js +2 -1
  117. package/lib/module/components/MessageInput/ShowThreadMessageInChannelButton.js.map +1 -1
  118. package/lib/module/components/MessageMenu/MessageUserReactions.js +0 -1
  119. package/lib/module/components/MessageMenu/MessageUserReactions.js.map +1 -1
  120. package/lib/module/components/Poll/components/MultipleVotesSettings.js +8 -0
  121. package/lib/module/components/Poll/components/MultipleVotesSettings.js.map +1 -1
  122. package/lib/module/components/Poll/components/PollInputDialog.js +1 -1
  123. package/lib/module/components/Poll/components/PollInputDialog.js.map +1 -1
  124. package/lib/module/components/Poll/components/PollOption.js +15 -5
  125. package/lib/module/components/Poll/components/PollOption.js.map +1 -1
  126. package/lib/module/components/ThreadList/ThreadList.js +3 -1
  127. package/lib/module/components/ThreadList/ThreadList.js.map +1 -1
  128. package/lib/module/components/UIComponents/BottomSheetModal.js +141 -40
  129. package/lib/module/components/UIComponents/BottomSheetModal.js.map +1 -1
  130. package/lib/module/components/UIComponents/BottomSheetModal.utils.js +53 -0
  131. package/lib/module/components/UIComponents/BottomSheetModal.utils.js.map +1 -0
  132. package/lib/module/components/UIComponents/StreamBottomSheetModalFlatList.js +9 -5
  133. package/lib/module/components/UIComponents/StreamBottomSheetModalFlatList.js.map +1 -1
  134. package/lib/module/components/ui/Avatar/ChannelAvatar.js +1 -1
  135. package/lib/module/components/ui/Avatar/ChannelAvatar.js.map +1 -1
  136. package/lib/module/components/ui/Button/hooks/useButtonStyles.js +1 -1
  137. package/lib/module/components/ui/Button/hooks/useButtonStyles.js.map +1 -1
  138. package/lib/module/contexts/bottomSheetContext/BottomSheetContext.js.map +1 -1
  139. package/lib/module/contexts/messageComposerContext/MessageComposerContext.js +4 -4
  140. package/lib/module/contexts/messageComposerContext/MessageComposerContext.js.map +1 -1
  141. package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
  142. package/lib/module/contexts/themeContext/utils/theme.js +1 -0
  143. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  144. package/lib/module/hooks/messagePreview/useMessagePreviewText.js +4 -4
  145. package/lib/module/hooks/messagePreview/useMessagePreviewText.js.map +1 -1
  146. package/lib/module/i18n/en.json +3 -2
  147. package/lib/module/i18n/es.json +3 -2
  148. package/lib/module/i18n/fr.json +3 -2
  149. package/lib/module/i18n/he.json +3 -2
  150. package/lib/module/i18n/hi.json +3 -2
  151. package/lib/module/i18n/it.json +3 -2
  152. package/lib/module/i18n/ja.json +3 -2
  153. package/lib/module/i18n/ko.json +3 -2
  154. package/lib/module/i18n/nl.json +3 -2
  155. package/lib/module/i18n/pt-br.json +3 -2
  156. package/lib/module/i18n/ru.json +3 -2
  157. package/lib/module/i18n/tr.json +3 -2
  158. package/lib/module/version.json +1 -1
  159. package/lib/typescript/components/Attachment/Giphy/Giphy.d.ts +1 -1
  160. package/lib/typescript/components/Attachment/Giphy/Giphy.d.ts.map +1 -1
  161. package/lib/typescript/components/AttachmentPicker/components/AttachmentPickerGenericContent.d.ts.map +1 -1
  162. package/lib/typescript/components/AutoCompleteInput/AutoCompleteSuggestionList.d.ts.map +1 -1
  163. package/lib/typescript/components/ChannelList/hooks/useChannelActionItems.d.ts.map +1 -1
  164. package/lib/typescript/components/ChannelPreview/ChannelDetailsBottomSheet.d.ts +2 -2
  165. package/lib/typescript/components/ChannelPreview/ChannelDetailsBottomSheet.d.ts.map +1 -1
  166. package/lib/typescript/components/ChannelPreview/ChannelPreviewMessage.d.ts.map +1 -1
  167. package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts +1 -1
  168. package/lib/typescript/components/ChannelPreview/ChannelPreviewStatus.d.ts.map +1 -1
  169. package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts +2 -2
  170. package/lib/typescript/components/ChannelPreview/ChannelPreviewView.d.ts.map +1 -1
  171. package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts +3 -3
  172. package/lib/typescript/components/ChannelPreview/ChannelSwipableWrapper.d.ts.map +1 -1
  173. package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts.map +1 -1
  174. package/lib/typescript/components/Indicators/LoadingIndicator.d.ts.map +1 -1
  175. package/lib/typescript/components/Message/Message.d.ts.map +1 -1
  176. package/lib/typescript/components/Message/MessageItemView/MessageContent.d.ts.map +1 -1
  177. package/lib/typescript/components/Message/MessageItemView/MessageItemView.d.ts +1 -1
  178. package/lib/typescript/components/Message/MessageItemView/MessageItemView.d.ts.map +1 -1
  179. package/lib/typescript/components/Message/MessageItemView/MessageStatus.d.ts.map +1 -1
  180. package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
  181. package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts.map +1 -1
  182. package/lib/typescript/components/MessageInput/ShowThreadMessageInChannelButton.d.ts.map +1 -1
  183. package/lib/typescript/components/MessageMenu/MessageUserReactions.d.ts.map +1 -1
  184. package/lib/typescript/components/Poll/components/MultipleVotesSettings.d.ts.map +1 -1
  185. package/lib/typescript/components/Poll/components/PollOption.d.ts.map +1 -1
  186. package/lib/typescript/components/ThreadList/ThreadList.d.ts.map +1 -1
  187. package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts +5 -1
  188. package/lib/typescript/components/UIComponents/BottomSheetModal.d.ts.map +1 -1
  189. package/lib/typescript/components/UIComponents/BottomSheetModal.utils.d.ts +28 -0
  190. package/lib/typescript/components/UIComponents/BottomSheetModal.utils.d.ts.map +1 -0
  191. package/lib/typescript/components/UIComponents/StreamBottomSheetModalFlatList.d.ts.map +1 -1
  192. package/lib/typescript/components/ui/Avatar/ChannelAvatar.d.ts.map +1 -1
  193. package/lib/typescript/contexts/bottomSheetContext/BottomSheetContext.d.ts +1 -0
  194. package/lib/typescript/contexts/bottomSheetContext/BottomSheetContext.d.ts.map +1 -1
  195. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +4 -2
  196. package/lib/typescript/contexts/messageContext/MessageContext.d.ts.map +1 -1
  197. package/lib/typescript/contexts/themeContext/ThemeContext.d.ts +1 -0
  198. package/lib/typescript/contexts/themeContext/ThemeContext.d.ts.map +1 -1
  199. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +1 -0
  200. package/lib/typescript/contexts/themeContext/utils/theme.d.ts.map +1 -1
  201. package/lib/typescript/hooks/messagePreview/useMessagePreviewText.d.ts.map +1 -1
  202. package/lib/typescript/i18n/en.json +3 -2
  203. package/lib/typescript/i18n/es.json +3 -2
  204. package/lib/typescript/i18n/fr.json +3 -2
  205. package/lib/typescript/i18n/he.json +3 -2
  206. package/lib/typescript/i18n/hi.json +3 -2
  207. package/lib/typescript/i18n/it.json +3 -2
  208. package/lib/typescript/i18n/ja.json +3 -2
  209. package/lib/typescript/i18n/ko.json +3 -2
  210. package/lib/typescript/i18n/nl.json +3 -2
  211. package/lib/typescript/i18n/pt-br.json +3 -2
  212. package/lib/typescript/i18n/ru.json +3 -2
  213. package/lib/typescript/i18n/tr.json +3 -2
  214. package/lib/typescript/utils/i18n/Streami18n.d.ts +3 -2
  215. package/lib/typescript/utils/i18n/Streami18n.d.ts.map +1 -1
  216. package/package.json +1 -1
  217. package/src/components/Attachment/Giphy/Giphy.tsx +19 -7
  218. package/src/components/Attachment/__tests__/Giphy.test.js +33 -1
  219. package/src/components/AttachmentPicker/components/AttachmentPickerContent.tsx +3 -3
  220. package/src/components/AttachmentPicker/components/AttachmentPickerGenericContent.tsx +23 -13
  221. package/src/components/AutoCompleteInput/AutoCompleteSuggestionList.tsx +3 -1
  222. package/src/components/Channel/Channel.tsx +1 -1
  223. package/src/components/ChannelList/hooks/__tests__/useChannelActionItems.test.tsx +12 -45
  224. package/src/components/ChannelList/hooks/useChannelActionItems.tsx +1 -19
  225. package/src/components/ChannelPreview/ChannelDetailsBottomSheet.tsx +10 -8
  226. package/src/components/ChannelPreview/ChannelPreviewMessage.tsx +3 -1
  227. package/src/components/ChannelPreview/ChannelPreviewStatus.tsx +1 -1
  228. package/src/components/ChannelPreview/ChannelPreviewView.tsx +3 -2
  229. package/src/components/ChannelPreview/ChannelSwipableWrapper.tsx +8 -7
  230. package/src/components/ChannelPreview/__tests__/ChannelDetailsBottomSheet.test.tsx +1 -1
  231. package/src/components/ChannelPreview/__tests__/ChannelLastMessagePreview.test.tsx +32 -0
  232. package/src/components/ChannelPreview/__tests__/ChannelSwipableWrapper.test.tsx +5 -2
  233. package/src/components/ImageGallery/components/ImageGrid.tsx +3 -1
  234. package/src/components/Indicators/LoadingIndicator.tsx +7 -5
  235. package/src/components/Message/Message.tsx +2 -12
  236. package/src/components/Message/MessageItemView/MessageContent.tsx +44 -7
  237. package/src/components/Message/MessageItemView/MessageItemView.tsx +15 -7
  238. package/src/components/Message/MessageItemView/MessageReplies.tsx +1 -1
  239. package/src/components/Message/MessageItemView/MessageStatus.tsx +16 -5
  240. package/src/components/Message/MessageItemView/__tests__/MessageContent.test.js +72 -1
  241. package/src/components/Message/MessageItemView/__tests__/MessageItemView.test.js +52 -1
  242. package/src/components/Message/hooks/useCreateMessageContext.ts +3 -0
  243. package/src/components/MessageInput/ShowThreadMessageInChannelButton.tsx +1 -0
  244. package/src/components/MessageInput/__tests__/__snapshots__/AttachButton.test.js.snap +1 -1
  245. package/src/components/MessageMenu/MessageUserReactions.tsx +1 -5
  246. package/src/components/Poll/components/MultipleVotesSettings.tsx +8 -0
  247. package/src/components/Poll/components/PollInputDialog.tsx +1 -1
  248. package/src/components/Poll/components/PollOption.tsx +25 -9
  249. package/src/components/ThreadList/ThreadList.tsx +1 -1
  250. package/src/components/UIComponents/BottomSheetModal.tsx +237 -53
  251. package/src/components/UIComponents/BottomSheetModal.utils.ts +82 -0
  252. package/src/components/UIComponents/StreamBottomSheetModalFlatList.tsx +14 -5
  253. package/src/components/UIComponents/__tests__/BottomSheetModal.utils.test.ts +111 -0
  254. package/src/components/ui/Avatar/ChannelAvatar.tsx +5 -1
  255. package/src/components/ui/Button/hooks/useButtonStyles.ts +1 -1
  256. package/src/contexts/bottomSheetContext/BottomSheetContext.tsx +1 -0
  257. package/src/contexts/messageComposerContext/MessageComposerContext.tsx +1 -1
  258. package/src/contexts/messageContext/MessageContext.tsx +4 -2
  259. package/src/contexts/themeContext/utils/theme.ts +2 -0
  260. package/src/hooks/messagePreview/useMessagePreviewText.tsx +5 -6
  261. package/src/i18n/en.json +3 -2
  262. package/src/i18n/es.json +3 -2
  263. package/src/i18n/fr.json +3 -2
  264. package/src/i18n/he.json +3 -2
  265. package/src/i18n/hi.json +3 -2
  266. package/src/i18n/it.json +3 -2
  267. package/src/i18n/ja.json +3 -2
  268. package/src/i18n/ko.json +3 -2
  269. package/src/i18n/nl.json +3 -2
  270. package/src/i18n/pt-br.json +3 -2
  271. package/src/i18n/ru.json +3 -2
  272. package/src/i18n/tr.json +3 -2
  273. package/src/version.json +1 -1
@@ -0,0 +1,111 @@
1
+ import {
2
+ BOTTOM_SHEET_HANDLE_TOTAL_HEIGHT,
3
+ getBottomSheetBaseHeight,
4
+ getBottomSheetSnapPointTranslateY,
5
+ getBottomSheetSnapPoints,
6
+ getBottomSheetTopSnapIndex,
7
+ } from '../BottomSheetModal.utils';
8
+
9
+ describe('BottomSheetModal.utils', () => {
10
+ it('caps fixed bottom sheet height by maxHeight', () => {
11
+ expect(
12
+ getBottomSheetBaseHeight({
13
+ contentHeight: undefined,
14
+ enableDynamicSizing: false,
15
+ height: 500,
16
+ maxHeight: 420,
17
+ }),
18
+ ).toBe(420);
19
+ });
20
+
21
+ it('uses measured content height plus handle and safe area when dynamic sizing is enabled', () => {
22
+ expect(
23
+ getBottomSheetBaseHeight({
24
+ contentHeight: 120,
25
+ enableDynamicSizing: true,
26
+ height: 400,
27
+ maxHeight: 500,
28
+ }),
29
+ ).toBe(120 + BOTTOM_SHEET_HANDLE_TOTAL_HEIGHT);
30
+ });
31
+
32
+ it('caps dynamic content height by the provided height', () => {
33
+ expect(
34
+ getBottomSheetBaseHeight({
35
+ contentHeight: 500,
36
+ enableDynamicSizing: true,
37
+ height: 300,
38
+ maxHeight: 600,
39
+ }),
40
+ ).toBe(300);
41
+ });
42
+
43
+ it('keeps the expanded snap point when the sheet is shorter than maxHeight', () => {
44
+ expect(
45
+ getBottomSheetSnapPoints({
46
+ baseHeight: 280,
47
+ maxHeight: 640,
48
+ }),
49
+ ).toEqual([280, 640]);
50
+ });
51
+
52
+ it('returns two snap points for fixed sizing when maxHeight exceeds baseHeight', () => {
53
+ expect(
54
+ getBottomSheetSnapPoints({
55
+ baseHeight: 280,
56
+ maxHeight: 640,
57
+ }),
58
+ ).toEqual([280, 640]);
59
+ });
60
+
61
+ it('returns a single snap point when the sheet is already at maxHeight', () => {
62
+ expect(
63
+ getBottomSheetSnapPoints({
64
+ baseHeight: 640,
65
+ maxHeight: 640,
66
+ }),
67
+ ).toEqual([640]);
68
+ });
69
+
70
+ it('returns the correct top snap index', () => {
71
+ expect(
72
+ getBottomSheetTopSnapIndex({
73
+ baseHeight: 280,
74
+ maxHeight: 640,
75
+ }),
76
+ ).toBe(1);
77
+
78
+ expect(
79
+ getBottomSheetTopSnapIndex({
80
+ baseHeight: 640,
81
+ maxHeight: 640,
82
+ }),
83
+ ).toBe(0);
84
+ });
85
+
86
+ it('returns the correct translateY for each snap point', () => {
87
+ expect(
88
+ getBottomSheetSnapPointTranslateY({
89
+ baseHeight: 280,
90
+ maxHeight: 640,
91
+ snapIndex: 0,
92
+ }),
93
+ ).toBe(360);
94
+
95
+ expect(
96
+ getBottomSheetSnapPointTranslateY({
97
+ baseHeight: 280,
98
+ maxHeight: 640,
99
+ snapIndex: 1,
100
+ }),
101
+ ).toBe(0);
102
+
103
+ expect(
104
+ getBottomSheetSnapPointTranslateY({
105
+ baseHeight: 640,
106
+ maxHeight: 640,
107
+ snapIndex: 0,
108
+ }),
109
+ ).toBe(0);
110
+ });
111
+ });
@@ -58,7 +58,11 @@ export const ChannelAvatar = (props: ChannelAvatarProps) => {
58
58
 
59
59
  if (usersWithoutSelf.length > 1) {
60
60
  return (
61
- <UserAvatarGroup size='xl' users={usersForGroup} showOnlineIndicator={showOnlineIndicator} />
61
+ <UserAvatarGroup
62
+ size={size}
63
+ users={usersForGroup}
64
+ showOnlineIndicator={showOnlineIndicator}
65
+ />
62
66
  );
63
67
  } else {
64
68
  return (
@@ -79,7 +79,7 @@ export const useButtonStyles = ({ variant, type }: ButtonStylesConfig) => {
79
79
  borderColor: semantics.buttonSecondaryBorder,
80
80
  disabledForegroundColor: semantics.textDisabled,
81
81
  disabledBackgroundColor: undefined,
82
- disabledBorderColor: semantics.buttonSecondaryBorder,
82
+ disabledBorderColor: semantics.borderUtilityDisabled,
83
83
  },
84
84
  secondaryGhost: {
85
85
  foregroundColor: semantics.buttonSecondaryText,
@@ -8,6 +8,7 @@ import { isTestEnvironment } from '../utils/isTestEnvironment';
8
8
  export type BottomSheetContextValue = {
9
9
  close: (closeAnimationFinishedCallback?: () => void) => void;
10
10
  currentSnapIndex: SharedValue<number>;
11
+ topSnapIndex: SharedValue<number>;
11
12
  };
12
13
 
13
14
  export const BottomSheetContext = React.createContext(
@@ -8,7 +8,7 @@ import {
8
8
  } from './MessageComposerAPIContext';
9
9
 
10
10
  import { ChannelProps } from '../../components';
11
- import { useStableCallback } from '../../hooks';
11
+ import { useStableCallback } from '../../hooks/useStableCallback';
12
12
  import { useCreateMessageComposer } from '../messageInputContext/hooks/useCreateMessageComposer';
13
13
  import { ThreadContextValue } from '../threadContext/ThreadContext';
14
14
  import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
@@ -4,7 +4,7 @@ import type { View } from 'react-native';
4
4
  import type { Attachment, LocalMessage } from 'stream-chat';
5
5
 
6
6
  import type { ActionHandler } from '../../components/Attachment/Attachment';
7
- import { ReactionSummary } from '../../components/Message/hooks/useProcessReactions';
7
+ import type { ReactionSummary } from '../../components/Message/hooks/useProcessReactions';
8
8
  import type {
9
9
  MessagePressableHandlerPayload,
10
10
  PressableHandlerPayload,
@@ -15,7 +15,7 @@ import type { MessageContentType } from '../../contexts/messagesContext/Messages
15
15
  import type { DeepPartial } from '../../contexts/themeContext/ThemeContext';
16
16
  import type { Theme } from '../../contexts/themeContext/utils/theme';
17
17
 
18
- import { MessageComposerAPIContextValue } from '../messageComposerContext/MessageComposerAPIContext';
18
+ import type { MessageComposerAPIContextValue } from '../messageComposerContext/MessageComposerAPIContext';
19
19
  import { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';
20
20
 
21
21
  export type Alignment = 'right' | 'left';
@@ -40,6 +40,8 @@ export type MessageContextValue = {
40
40
  groupStyles: GroupType[];
41
41
  /** Handler for actions. Actions in combination with attachments can be used to build [commands](https://getstream.io/chat/docs/#channel_commands). */
42
42
  handleAction: ActionHandler;
43
+ /** Whether or not any message attachment exposes actions. */
44
+ hasAttachmentActions: boolean;
43
45
  handleToggleReaction: (reactionType: string) => Promise<void>;
44
46
  /** Whether or not message has reactions */
45
47
  hasReactions: boolean;
@@ -107,6 +107,7 @@ export type Theme = {
107
107
  bottomSheetContentContainer: ViewStyle;
108
108
  durationText: TextStyle;
109
109
  content: {
110
+ actionContainer: ViewStyle;
110
111
  container: ViewStyle;
111
112
  infoContainer: ViewStyle;
112
113
  text: TextStyle;
@@ -1030,6 +1031,7 @@ export const defaultTheme: Theme = {
1030
1031
  bottomSheetContentContainer: {},
1031
1032
  durationText: {},
1032
1033
  content: {
1034
+ actionContainer: {},
1033
1035
  container: {},
1034
1036
  infoContainer: {},
1035
1037
  text: {},
@@ -35,7 +35,6 @@ export const useMessagePreviewText = ({
35
35
  const onlyAudio = audios?.length === attachmentsLength;
36
36
  const onlyVoiceRecordings =
37
37
  voiceRecordings?.length && voiceRecordings?.length === attachmentsLength;
38
-
39
38
  if (message?.type === 'deleted') {
40
39
  return 'Message deleted';
41
40
  }
@@ -55,8 +54,12 @@ export const useMessagePreviewText = ({
55
54
  return 'Location';
56
55
  }
57
56
 
57
+ if (giphys?.length) {
58
+ return 'Giphy';
59
+ }
60
+
58
61
  if (message?.text) {
59
- return message?.text;
62
+ return message.text;
60
63
  }
61
64
 
62
65
  if (onlyImages) {
@@ -91,10 +94,6 @@ export const useMessagePreviewText = ({
91
94
  }
92
95
  }
93
96
 
94
- if (giphys?.length) {
95
- return 'Giphy';
96
- }
97
-
98
97
  if (onlyFiles && files?.length === 1) {
99
98
  return files?.[0]?.title;
100
99
  }
package/src/i18n/en.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "Change in Settings",
165
165
  "Create a poll and let everyone vote": "Create a poll and let everyone vote",
166
166
  "Open Camera": "Open Camera",
167
- "Pick a document to share it with everyone": "Pick a document to share it with everyone",
168
- "Pick document": "Pick document",
167
+ "Open Files": "Open Files",
168
+ "Select files to share": "Select files to share",
169
+ "Take a photo and share": "Take a photo and share",
169
170
  "Take a video and share": "Take a video and share",
170
171
  "You have not granted access to your camera": "You have not granted access to your camera",
171
172
  "{{count}} Reactions_many": "{{count}} Reactions",
package/src/i18n/es.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "Cambiar en Ajustes",
165
165
  "Create a poll and let everyone vote": "Crea una encuesta y deja que todos voten",
166
166
  "Open Camera": "Abrir camara",
167
- "Pick a document to share it with everyone": "Elige un documento para compartirlo con todos",
168
- "Pick document": "Elegir documento",
167
+ "Open Files": "Abrir archivos",
168
+ "Select files to share": "Selecciona archivos para compartir",
169
+ "Take a photo and share": "Toma una foto y compártela",
169
170
  "Take a video and share": "Graba un video y compártelo",
170
171
  "You have not granted access to your camera": "No has concedido acceso a tu camara",
171
172
  "{{count}} Reactions_many": "{{count}} reacciones",
package/src/i18n/fr.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "Changer dans Réglages",
165
165
  "Create a poll and let everyone vote": "Créez un sondage et laissez tout le monde voter",
166
166
  "Open Camera": "Ouvrir la caméra",
167
- "Pick a document to share it with everyone": "Choisissez un document pour le partager avec tout le monde",
168
- "Pick document": "Choisir un document",
167
+ "Open Files": "Ouvrir les fichiers",
168
+ "Select files to share": "Sélectionnez des fichiers à partager",
169
+ "Take a photo and share": "Prenez une photo et partagez-la",
169
170
  "Take a video and share": "Prenez une vidéo et partagez-la",
170
171
  "You have not granted access to your camera": "Vous n'avez pas accordé l'accès à votre caméra",
171
172
  "{{count}} Reactions_many": "{{count}} réactions",
package/src/i18n/he.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "שנה בהגדרות",
165
165
  "Create a poll and let everyone vote": "צור סקר ותן לכולם להצביע",
166
166
  "Open Camera": "פתח מצלמה",
167
- "Pick a document to share it with everyone": "בחר מסמך כדי לשתף אותו עם כולם",
168
- "Pick document": "בחר מסמך",
167
+ "Open Files": "פתח קבצים",
168
+ "Select files to share": "בחר קבצים לשיתוף",
169
+ "Take a photo and share": "צלם תמונה ושתף",
169
170
  "Take a video and share": "צלם וידאו ושתף",
170
171
  "You have not granted access to your camera": "לא הענקת גישה למצלמה שלך",
171
172
  "{{count}} Reactions_many": "{{count}} תגובות",
package/src/i18n/hi.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "सेटिंग्स में बदलें",
165
165
  "Create a poll and let everyone vote": "पोल बनाएँ और सभी को वोट करने दें",
166
166
  "Open Camera": "कैमरा खोलें",
167
- "Pick a document to share it with everyone": "सभी के साथ साझा करने के लिए एक दस्तावेज़ चुनें",
168
- "Pick document": "दस्तावेज़ चुनें",
167
+ "Open Files": "फ़ाइलें खोलें",
168
+ "Select files to share": "साझा करने के लिए फ़ाइलें चुनें",
169
+ "Take a photo and share": "एक फ़ोटो लें और साझा करें",
169
170
  "Take a video and share": "वीडियो लें और साझा करें",
170
171
  "You have not granted access to your camera": "आपने अपने कैमरे के लिए अनुमति नहीं दी है",
171
172
  "{{count}} Reactions_many": "{{count}} प्रतिक्रियाएँ",
package/src/i18n/it.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "Cambia in Impostazioni",
165
165
  "Create a poll and let everyone vote": "Crea un sondaggio e lascia che tutti votino",
166
166
  "Open Camera": "Apri fotocamera",
167
- "Pick a document to share it with everyone": "Scegli un documento da condividere con tutti",
168
- "Pick document": "Scegli documento",
167
+ "Open Files": "Apri file",
168
+ "Select files to share": "Seleziona file da condividere",
169
+ "Take a photo and share": "Scatta una foto e condividila",
169
170
  "Take a video and share": "Registra un video e condividilo",
170
171
  "You have not granted access to your camera": "Non hai concesso l’accesso alla fotocamera",
171
172
  "{{count}} Reactions_many": "{{count}} reazioni",
package/src/i18n/ja.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "設定で変更",
165
165
  "Create a poll and let everyone vote": "投票を作成してみんなに投票してもらう",
166
166
  "Open Camera": "カメラを開く",
167
- "Pick a document to share it with everyone": "みんなと共有するドキュメントを選択",
168
- "Pick document": "ドキュメントを選択",
167
+ "Open Files": "ファイルを開く",
168
+ "Select files to share": "共有するファイルを選択",
169
+ "Take a photo and share": "写真を撮って共有",
169
170
  "Take a video and share": "動画を撮影して共有",
170
171
  "You have not granted access to your camera": "カメラへのアクセスが許可されていません",
171
172
  "{{count}} Reactions_many": "{{count}}件のリアクション",
package/src/i18n/ko.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "설정에서 변경",
165
165
  "Create a poll and let everyone vote": "투표를 만들어 모두가 투표하게 하세요",
166
166
  "Open Camera": "카메라 열기",
167
- "Pick a document to share it with everyone": "모두와 공유할 문서를 선택하세요",
168
- "Pick document": "문서 선택",
167
+ "Open Files": "파일 열기",
168
+ "Select files to share": "공유할 파일 선택",
169
+ "Take a photo and share": "사진을 찍고 공유",
169
170
  "Take a video and share": "동영상을 촬영하고 공유",
170
171
  "You have not granted access to your camera": "카메라 접근 권한이 없습니다",
171
172
  "{{count}} Reactions_many": "{{count}}개의 반응",
package/src/i18n/nl.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "Wijzigen in Instellingen",
165
165
  "Create a poll and let everyone vote": "Maak een peiling en laat iedereen stemmen",
166
166
  "Open Camera": "Camera openen",
167
- "Pick a document to share it with everyone": "Kies een document om het met iedereen te delen",
168
- "Pick document": "Document kiezen",
167
+ "Open Files": "Bestanden openen",
168
+ "Select files to share": "Selecteer bestanden om te delen",
169
+ "Take a photo and share": "Maak een foto en deel deze",
169
170
  "Take a video and share": "Maak een video en deel deze",
170
171
  "You have not granted access to your camera": "Je hebt geen toegang tot je camera verleend",
171
172
  "{{count}} Reactions_many": "{{count}} reacties",
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "Alterar nos Ajustes",
165
165
  "Create a poll and let everyone vote": "Crie uma enquete e deixe todos votarem",
166
166
  "Open Camera": "Abrir camera",
167
- "Pick a document to share it with everyone": "Escolha um documento para compartilhar com todos",
168
- "Pick document": "Escolher documento",
167
+ "Open Files": "Abrir arquivos",
168
+ "Select files to share": "Selecione arquivos para compartilhar",
169
+ "Take a photo and share": "Tire uma foto e compartilhe",
169
170
  "Take a video and share": "Grave um video e compartilhe",
170
171
  "You have not granted access to your camera": "Você não concedeu acesso à sua câmera",
171
172
  "{{count}} Reactions_many": "{{count}} reações",
package/src/i18n/ru.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "Изменить в настройках",
165
165
  "Create a poll and let everyone vote": "Создайте опрос и дайте всем проголосовать",
166
166
  "Open Camera": "Открыть камеру",
167
- "Pick a document to share it with everyone": "Выберите документ, чтобы поделиться им со всеми",
168
- "Pick document": "Выбрать документ",
167
+ "Open Files": "Открыть файлы",
168
+ "Select files to share": "Выберите файлы для отправки",
169
+ "Take a photo and share": "Сделайте фото и поделитесь",
169
170
  "Take a video and share": "Снимите видео и поделитесь",
170
171
  "You have not granted access to your camera": "Вы не предоставили доступ к вашей камере",
171
172
  "{{count}} Reactions_many": "{{count}} реакций",
package/src/i18n/tr.json CHANGED
@@ -164,8 +164,9 @@
164
164
  "Change in Settings": "Ayarlar'da değiştir",
165
165
  "Create a poll and let everyone vote": "Bir anket oluşturun ve herkesin oy vermesine izin verin",
166
166
  "Open Camera": "Kamerayı aç",
167
- "Pick a document to share it with everyone": "Herkesle paylaşmak için bir belge seçin",
168
- "Pick document": "Belge seç",
167
+ "Open Files": "Dosyaları ",
168
+ "Select files to share": "Paylaşmak için dosyaları seç",
169
+ "Take a photo and share": "Fotoğraf çek ve paylaş",
169
170
  "Take a video and share": "Video çek ve paylaş",
170
171
  "You have not granted access to your camera": "Kameranıza erişim izni vermediniz",
171
172
  "{{count}} Reactions_many": "{{count}} tepki",
package/src/version.json CHANGED
@@ -1,3 +1,3 @@
1
1
  {
2
- "version": "9.0.0-beta.26"
2
+ "version": "9.0.0-beta.28"
3
3
  }