stream-chat-react-native-core 4.6.0 → 4.7.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 (206) hide show
  1. package/lib/commonjs/components/Attachment/Attachment.js +22 -13
  2. package/lib/commonjs/components/Attachment/Attachment.js.map +1 -1
  3. package/lib/commonjs/components/Attachment/Gallery.js +72 -37
  4. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  5. package/lib/commonjs/components/Attachment/VideoThumbnail.js +83 -0
  6. package/lib/commonjs/components/Attachment/VideoThumbnail.js.map +1 -0
  7. package/lib/commonjs/components/Attachment/hooks/useGoToURL.js +1 -1
  8. package/lib/commonjs/components/Attachment/hooks/useGoToURL.js.map +1 -1
  9. package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js +1 -0
  10. package/lib/commonjs/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
  11. package/lib/commonjs/components/Attachment/utils/getAspectRatio.js +5 -5
  12. package/lib/commonjs/components/Attachment/utils/getAspectRatio.js.map +1 -1
  13. package/lib/commonjs/components/Channel/Channel.js +19 -14
  14. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  15. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +4 -2
  16. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  17. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js +43 -28
  18. package/lib/commonjs/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  19. package/lib/commonjs/components/ImageGallery/ImageGallery.js +167 -345
  20. package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
  21. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js +4 -4
  22. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
  23. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js +225 -0
  24. package/lib/commonjs/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -0
  25. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js +102 -40
  26. package/lib/commonjs/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  27. package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js +145 -0
  28. package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -0
  29. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +31 -34
  30. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
  31. package/lib/commonjs/components/ImageGallery/components/ProgressControl.js +153 -0
  32. package/lib/commonjs/components/ImageGallery/components/ProgressControl.js.map +1 -0
  33. package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js +373 -0
  34. package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -0
  35. package/lib/commonjs/components/Message/Message.js +23 -13
  36. package/lib/commonjs/components/Message/Message.js.map +1 -1
  37. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js +58 -33
  38. package/lib/commonjs/components/Message/MessageSimple/MessageContent.js.map +1 -1
  39. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js +4 -2
  40. package/lib/commonjs/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  41. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +25 -23
  42. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
  43. package/lib/commonjs/components/Reply/Reply.js +32 -12
  44. package/lib/commonjs/components/Reply/Reply.js.map +1 -1
  45. package/lib/commonjs/components/Spinner/Spinner.js +12 -4
  46. package/lib/commonjs/components/Spinner/Spinner.js.map +1 -1
  47. package/lib/commonjs/components/index.js +26 -0
  48. package/lib/commonjs/components/index.js.map +1 -1
  49. package/lib/commonjs/contexts/messageContext/MessageContext.js +2 -2
  50. package/lib/commonjs/contexts/messageContext/MessageContext.js.map +1 -1
  51. package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
  52. package/lib/commonjs/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
  53. package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -2
  54. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  55. package/lib/commonjs/contexts/themeContext/utils/theme.js +10 -1
  56. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  57. package/lib/commonjs/icons/Pause.js +61 -0
  58. package/lib/commonjs/icons/Pause.js.map +1 -0
  59. package/lib/commonjs/icons/Play.js +42 -0
  60. package/lib/commonjs/icons/Play.js.map +1 -0
  61. package/lib/commonjs/icons/index.js +26 -0
  62. package/lib/commonjs/icons/index.js.map +1 -1
  63. package/lib/commonjs/mock-builders/api/queryMembers.js +98 -1
  64. package/lib/commonjs/mock-builders/api/queryMembers.js.map +1 -1
  65. package/lib/commonjs/native.js +7 -1
  66. package/lib/commonjs/native.js.map +1 -1
  67. package/lib/commonjs/utils/getUrlOfImageAttachment.js +1 -1
  68. package/lib/commonjs/utils/getUrlOfImageAttachment.js.map +1 -1
  69. package/lib/commonjs/version.json +1 -1
  70. package/lib/module/components/Attachment/Attachment.js +22 -13
  71. package/lib/module/components/Attachment/Attachment.js.map +1 -1
  72. package/lib/module/components/Attachment/Gallery.js +72 -37
  73. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  74. package/lib/module/components/Attachment/VideoThumbnail.js +83 -0
  75. package/lib/module/components/Attachment/VideoThumbnail.js.map +1 -0
  76. package/lib/module/components/Attachment/hooks/useGoToURL.js +1 -1
  77. package/lib/module/components/Attachment/hooks/useGoToURL.js.map +1 -1
  78. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js +1 -0
  79. package/lib/module/components/Attachment/utils/buildGallery/buildThumbnail.js.map +1 -1
  80. package/lib/module/components/Attachment/utils/getAspectRatio.js +5 -5
  81. package/lib/module/components/Attachment/utils/getAspectRatio.js.map +1 -1
  82. package/lib/module/components/Channel/Channel.js +19 -14
  83. package/lib/module/components/Channel/Channel.js.map +1 -1
  84. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +4 -2
  85. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  86. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js +43 -28
  87. package/lib/module/components/ChannelPreview/hooks/useChannelPreviewDisplayName.js.map +1 -1
  88. package/lib/module/components/ImageGallery/ImageGallery.js +167 -345
  89. package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
  90. package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js +4 -4
  91. package/lib/module/components/ImageGallery/components/AnimatedGalleryImage.js.map +1 -1
  92. package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js +225 -0
  93. package/lib/module/components/ImageGallery/components/AnimatedGalleryVideo.js.map +1 -0
  94. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js +102 -40
  95. package/lib/module/components/ImageGallery/components/ImageGalleryFooter.js.map +1 -1
  96. package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js +145 -0
  97. package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -0
  98. package/lib/module/components/ImageGallery/components/ImageGrid.js +31 -34
  99. package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
  100. package/lib/module/components/ImageGallery/components/ProgressControl.js +153 -0
  101. package/lib/module/components/ImageGallery/components/ProgressControl.js.map +1 -0
  102. package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js +373 -0
  103. package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -0
  104. package/lib/module/components/Message/Message.js +23 -13
  105. package/lib/module/components/Message/Message.js.map +1 -1
  106. package/lib/module/components/Message/MessageSimple/MessageContent.js +58 -33
  107. package/lib/module/components/Message/MessageSimple/MessageContent.js.map +1 -1
  108. package/lib/module/components/Message/hooks/useCreateMessageContext.js +4 -2
  109. package/lib/module/components/Message/hooks/useCreateMessageContext.js.map +1 -1
  110. package/lib/module/components/MessageOverlay/MessageOverlay.js +25 -23
  111. package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
  112. package/lib/module/components/Reply/Reply.js +32 -12
  113. package/lib/module/components/Reply/Reply.js.map +1 -1
  114. package/lib/module/components/Spinner/Spinner.js +12 -4
  115. package/lib/module/components/Spinner/Spinner.js.map +1 -1
  116. package/lib/module/components/index.js +26 -0
  117. package/lib/module/components/index.js.map +1 -1
  118. package/lib/module/contexts/messageContext/MessageContext.js +2 -2
  119. package/lib/module/contexts/messageContext/MessageContext.js.map +1 -1
  120. package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js +2 -2
  121. package/lib/module/contexts/messageOverlayContext/MessageOverlayContext.js.map +1 -1
  122. package/lib/module/contexts/messagesContext/MessagesContext.js +2 -2
  123. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  124. package/lib/module/contexts/themeContext/utils/theme.js +10 -1
  125. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  126. package/lib/module/icons/Pause.js +61 -0
  127. package/lib/module/icons/Pause.js.map +1 -0
  128. package/lib/module/icons/Play.js +42 -0
  129. package/lib/module/icons/Play.js.map +1 -0
  130. package/lib/module/icons/index.js +26 -0
  131. package/lib/module/icons/index.js.map +1 -1
  132. package/lib/module/mock-builders/api/queryMembers.js +98 -1
  133. package/lib/module/mock-builders/api/queryMembers.js.map +1 -1
  134. package/lib/module/native.js +7 -1
  135. package/lib/module/native.js.map +1 -1
  136. package/lib/module/utils/getUrlOfImageAttachment.js +1 -1
  137. package/lib/module/utils/getUrlOfImageAttachment.js.map +1 -1
  138. package/lib/module/version.json +1 -1
  139. package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
  140. package/lib/typescript/components/Attachment/VideoThumbnail.d.ts +4 -0
  141. package/lib/typescript/components/Attachment/utils/buildGallery/types.d.ts +1 -0
  142. package/lib/typescript/components/Attachment/utils/getAspectRatio.d.ts +1 -1
  143. package/lib/typescript/components/Channel/Channel.d.ts +1 -1
  144. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
  145. package/lib/typescript/components/ChannelPreview/hooks/__tests__/useChannelPreviewDisplayName.test.d.ts +1 -0
  146. package/lib/typescript/components/ChannelPreview/hooks/useChannelPreviewDisplayName.d.ts +4 -4
  147. package/lib/typescript/components/ImageGallery/ImageGallery.d.ts +2 -0
  148. package/lib/typescript/components/ImageGallery/components/AnimatedGalleryVideo.d.ts +27 -0
  149. package/lib/typescript/components/ImageGallery/components/ImageGalleryFooter.d.ts +18 -2
  150. package/lib/typescript/components/ImageGallery/components/ImageGalleryVideoControl.d.ts +3 -0
  151. package/lib/typescript/components/ImageGallery/components/ProgressControl.d.ts +5 -0
  152. package/lib/typescript/components/ImageGallery/hooks/useImageGalleryGestures.d.ts +36 -0
  153. package/lib/typescript/components/Message/hooks/useCreateMessageContext.d.ts +1 -1
  154. package/lib/typescript/components/Spinner/Spinner.d.ts +7 -1
  155. package/lib/typescript/components/index.d.ts +2 -0
  156. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +3 -1
  157. package/lib/typescript/contexts/messageOverlayContext/MessageOverlayContext.d.ts +1 -0
  158. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +2 -0
  159. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +9 -0
  160. package/lib/typescript/icons/Pause.d.ts +3 -0
  161. package/lib/typescript/icons/Play.d.ts +3 -0
  162. package/lib/typescript/icons/index.d.ts +2 -0
  163. package/lib/typescript/mock-builders/api/queryMembers.d.ts +161 -0
  164. package/lib/typescript/mock-builders/api/utils.d.ts +7 -0
  165. package/lib/typescript/mock-builders/generator/user.d.ts +30 -0
  166. package/lib/typescript/mock-builders/mock.d.ts +3 -0
  167. package/lib/typescript/native.d.ts +66 -1
  168. package/package.json +1 -1
  169. package/src/components/Attachment/Attachment.tsx +11 -7
  170. package/src/components/Attachment/Gallery.tsx +75 -36
  171. package/src/components/Attachment/VideoThumbnail.tsx +45 -0
  172. package/src/components/Attachment/hooks/useGoToURL.ts +1 -1
  173. package/src/components/Attachment/utils/buildGallery/buildThumbnail.ts +1 -0
  174. package/src/components/Attachment/utils/buildGallery/types.ts +1 -0
  175. package/src/components/Attachment/utils/getAspectRatio.ts +7 -5
  176. package/src/components/Channel/Channel.tsx +4 -0
  177. package/src/components/Channel/hooks/useCreateMessagesContext.ts +2 -0
  178. package/src/components/ChannelPreview/hooks/__tests__/useChannelPreviewDisplayName.test.tsx +83 -0
  179. package/src/components/ChannelPreview/hooks/useChannelPreviewDisplayName.ts +43 -26
  180. package/src/components/ImageGallery/ImageGallery.tsx +145 -667
  181. package/src/components/ImageGallery/components/AnimatedGalleryImage.tsx +4 -4
  182. package/src/components/ImageGallery/components/AnimatedGalleryVideo.tsx +224 -0
  183. package/src/components/ImageGallery/components/ImageGalleryFooter.tsx +114 -19
  184. package/src/components/ImageGallery/components/ImageGalleryVideoControl.tsx +103 -0
  185. package/src/components/ImageGallery/components/ImageGrid.tsx +12 -25
  186. package/src/components/ImageGallery/components/ProgressControl.tsx +107 -0
  187. package/src/components/ImageGallery/hooks/useImageGalleryGestures.tsx +722 -0
  188. package/src/components/Message/Message.tsx +10 -3
  189. package/src/components/Message/MessageSimple/MessageContent.tsx +50 -16
  190. package/src/components/Message/hooks/useCreateMessageContext.ts +2 -0
  191. package/src/components/MessageOverlay/MessageOverlay.tsx +2 -0
  192. package/src/components/Reply/Reply.tsx +36 -23
  193. package/src/components/Spinner/Spinner.tsx +11 -4
  194. package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +0 -12
  195. package/src/components/index.ts +2 -0
  196. package/src/contexts/messageContext/MessageContext.tsx +2 -0
  197. package/src/contexts/messageOverlayContext/MessageOverlayContext.tsx +1 -0
  198. package/src/contexts/messagesContext/MessagesContext.tsx +2 -0
  199. package/src/contexts/themeContext/utils/theme.ts +18 -0
  200. package/src/icons/Pause.tsx +14 -0
  201. package/src/icons/Play.tsx +17 -0
  202. package/src/icons/index.ts +2 -0
  203. package/src/mock-builders/api/queryMembers.js +98 -0
  204. package/src/native.ts +59 -1
  205. package/src/utils/getUrlOfImageAttachment.ts +1 -1
  206. package/src/version.json +1 -1
@@ -4,7 +4,7 @@ import { MessageContextValue } from '../../contexts/messageContext/MessageContex
4
4
  import { MessagesContextValue } from '../../contexts/messagesContext/MessagesContext';
5
5
  import { OverlayContextValue } from '../../contexts/overlayContext/OverlayContext';
6
6
  import type { DefaultStreamChatGenerics } from '../../types/types';
7
- export declare type GalleryPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setImage' | 'setImages'> & Pick<MessageContextValue<StreamChatGenerics>, 'alignment' | 'groupStyles' | 'images' | 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress' | 'threadList'> & Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps' | 'legacyImageViewerSwipeBehaviour'> & Pick<OverlayContextValue, 'setOverlay'> & {
7
+ export declare type GalleryPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ImageGalleryContextValue<StreamChatGenerics>, 'setImage' | 'setImages'> & Pick<MessageContextValue<StreamChatGenerics>, 'alignment' | 'groupStyles' | 'images' | 'videos' | 'onLongPress' | 'onPress' | 'onPressIn' | 'preventPress' | 'threadList'> & Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps' | 'legacyImageViewerSwipeBehaviour' | 'VideoThumbnail'> & Pick<OverlayContextValue, 'setOverlay'> & {
8
8
  channelId: string | undefined;
9
9
  hasThreadReplies?: boolean;
10
10
  /**
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import { ViewProps } from 'react-native';
3
+ export declare type VideoThumbnailProps = ViewProps;
4
+ export declare const VideoThumbnail: React.FC<VideoThumbnailProps>;
@@ -5,6 +5,7 @@ export declare type Thumbnail = {
5
5
  url: string;
6
6
  width: number;
7
7
  id?: string;
8
+ type?: string;
8
9
  };
9
10
  export declare type GallerySizeConfig = {
10
11
  gridHeight: number;
@@ -6,4 +6,4 @@ import type { DefaultStreamChatGenerics } from '../../../types/types';
6
6
  * @param image Image attachment.
7
7
  * @returns {number}
8
8
  */
9
- export declare function getAspectRatio<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(image: Attachment<StreamChatGenerics>): number;
9
+ export declare function getAspectRatio<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(attachment: Attachment<StreamChatGenerics>): number;
@@ -15,7 +15,7 @@ import type { DefaultStreamChatGenerics } from '../../types/types';
15
15
  import { ReactionData } from '../../utils/utils';
16
16
  import { LoadingErrorProps } from '../Indicators/LoadingErrorIndicator';
17
17
  export declare const reactionData: ReactionData[];
18
- export declare type ChannelPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ChannelContextValue<StreamChatGenerics>, 'channel'> & Partial<Pick<ChannelContextValue<StreamChatGenerics>, 'EmptyStateIndicator' | 'enableMessageGroupingByUser' | 'enforceUniqueReaction' | 'giphyEnabled' | 'hideStickyDateHeader' | 'hideDateSeparators' | 'LoadingIndicator' | 'maxTimeBetweenGroupedMessages' | 'NetworkDownIndicator' | 'StickyHeader'>> & Pick<ChatContextValue<StreamChatGenerics>, 'client'> & Partial<Omit<InputMessageInputContextValue<StreamChatGenerics>, 'quotedMessage' | 'editing' | 'clearEditingState' | 'clearQuotedMessageState' | 'sendMessage'>> & Partial<Pick<SuggestionsContextValue<StreamChatGenerics>, 'AutoCompleteSuggestionHeader' | 'AutoCompleteSuggestionItem' | 'AutoCompleteSuggestionList'>> & Pick<TranslationContextValue, 't'> & Partial<Pick<PaginatedMessageListContextValue<StreamChatGenerics>, 'messages' | 'loadingMore' | 'loadingMoreRecent'>> & UseChannelStateValue<StreamChatGenerics> & Partial<Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps' | 'Attachment' | 'AttachmentActions' | 'Card' | 'CardCover' | 'CardFooter' | 'CardHeader' | 'DateHeader' | 'deletedMessagesVisibilityType' | 'disableTypingIndicator' | 'dismissKeyboardOnMessageTouch' | 'FileAttachment' | 'FileAttachmentIcon' | 'FileAttachmentGroup' | 'FlatList' | 'forceAlignMessages' | 'formatDate' | 'Gallery' | 'Giphy' | 'giphyVersion' | 'handleBlock' | 'handleCopy' | 'handleDelete' | 'handleEdit' | 'handleFlag' | 'handleMute' | 'handlePinMessage' | 'handleReaction' | 'handleQuotedReply' | 'handleRetry' | 'handleThreadReply' | 'InlineDateSeparator' | 'InlineUnreadIndicator' | 'isAttachmentEqual' | 'legacyImageViewerSwipeBehaviour' | 'markdownRules' | 'Message' | 'messageActions' | 'MessageAvatar' | 'MessageContent' | 'messageContentOrder' | 'MessageDeleted' | 'MessageFooter' | 'MessageHeader' | 'MessageList' | 'MessagePinnedHeader' | 'MessageReplies' | 'MessageRepliesAvatars' | 'MessageSimple' | 'MessageStatus' | 'MessageSystem' | 'MessageText' | 'myMessageTheme' | 'onLongPressMessage' | 'onPressInMessage' | 'onPressMessage' | 'OverlayReactionList' | 'ReactionList' | 'Reply' | 'ScrollToBottomButton' | 'selectReaction' | 'supportedReactions' | 'TypingIndicator' | 'TypingIndicatorContainer' | 'UrlPreview'>> & Partial<Pick<ThreadContextValue<StreamChatGenerics>, 'allowThreadMessagesInChannel' | 'thread'>> & {
18
+ export declare type ChannelPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = Pick<ChannelContextValue<StreamChatGenerics>, 'channel'> & Partial<Pick<ChannelContextValue<StreamChatGenerics>, 'EmptyStateIndicator' | 'enableMessageGroupingByUser' | 'enforceUniqueReaction' | 'giphyEnabled' | 'hideStickyDateHeader' | 'hideDateSeparators' | 'LoadingIndicator' | 'maxTimeBetweenGroupedMessages' | 'NetworkDownIndicator' | 'StickyHeader'>> & Pick<ChatContextValue<StreamChatGenerics>, 'client'> & Partial<Omit<InputMessageInputContextValue<StreamChatGenerics>, 'quotedMessage' | 'editing' | 'clearEditingState' | 'clearQuotedMessageState' | 'sendMessage'>> & Partial<Pick<SuggestionsContextValue<StreamChatGenerics>, 'AutoCompleteSuggestionHeader' | 'AutoCompleteSuggestionItem' | 'AutoCompleteSuggestionList'>> & Pick<TranslationContextValue, 't'> & Partial<Pick<PaginatedMessageListContextValue<StreamChatGenerics>, 'messages' | 'loadingMore' | 'loadingMoreRecent'>> & UseChannelStateValue<StreamChatGenerics> & Partial<Pick<MessagesContextValue<StreamChatGenerics>, 'additionalTouchableProps' | 'Attachment' | 'AttachmentActions' | 'Card' | 'CardCover' | 'CardFooter' | 'CardHeader' | 'DateHeader' | 'deletedMessagesVisibilityType' | 'disableTypingIndicator' | 'dismissKeyboardOnMessageTouch' | 'FileAttachment' | 'FileAttachmentIcon' | 'FileAttachmentGroup' | 'FlatList' | 'forceAlignMessages' | 'formatDate' | 'Gallery' | 'Giphy' | 'giphyVersion' | 'handleBlock' | 'handleCopy' | 'handleDelete' | 'handleEdit' | 'handleFlag' | 'handleMute' | 'handlePinMessage' | 'handleReaction' | 'handleQuotedReply' | 'handleRetry' | 'handleThreadReply' | 'InlineDateSeparator' | 'InlineUnreadIndicator' | 'isAttachmentEqual' | 'legacyImageViewerSwipeBehaviour' | 'markdownRules' | 'Message' | 'messageActions' | 'MessageAvatar' | 'MessageContent' | 'messageContentOrder' | 'MessageDeleted' | 'MessageFooter' | 'MessageHeader' | 'MessageList' | 'MessagePinnedHeader' | 'MessageReplies' | 'MessageRepliesAvatars' | 'MessageSimple' | 'MessageStatus' | 'MessageSystem' | 'MessageText' | 'myMessageTheme' | 'onLongPressMessage' | 'onPressInMessage' | 'onPressMessage' | 'OverlayReactionList' | 'ReactionList' | 'Reply' | 'ScrollToBottomButton' | 'selectReaction' | 'supportedReactions' | 'TypingIndicator' | 'TypingIndicatorContainer' | 'UrlPreview' | 'VideoThumbnail'>> & Partial<Pick<ThreadContextValue<StreamChatGenerics>, 'allowThreadMessagesInChannel' | 'thread'>> & {
19
19
  shouldSyncChannel: boolean;
20
20
  /**
21
21
  * Additional props passed to keyboard avoiding view
@@ -1,6 +1,6 @@
1
1
  import type { MessagesContextValue } from '../../../contexts/messagesContext/MessagesContext';
2
2
  import type { DefaultStreamChatGenerics } from '../../../types/types';
3
- export declare const useCreateMessagesContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ additionalTouchableProps, Attachment, AttachmentActions, Card, CardCover, CardFooter, CardHeader, channelId, DateHeader, deletedMessagesVisibilityType, disableTypingIndicator, dismissKeyboardOnMessageTouch, enableMessageGroupingByUser, FileAttachment, FileAttachmentGroup, FileAttachmentIcon, FlatList, forceAlignMessages, formatDate, Gallery, Giphy, giphyVersion, handleBlock, handleCopy, handleDelete, handleEdit, handleFlag, handleMute, handlePinMessage, handleQuotedReply, handleReaction, handleRetry, handleThreadReply, initialScrollToFirstUnreadMessage, InlineDateSeparator, InlineUnreadIndicator, isAttachmentEqual, legacyImageViewerSwipeBehaviour, markdownRules, Message, messageActions, MessageAvatar, MessageContent, messageContentOrder, MessageDeleted, MessageFooter, MessageHeader, MessageList, MessagePinnedHeader, MessageReplies, MessageRepliesAvatars, MessageSimple, MessageStatus, MessageSystem, MessageText, myMessageTheme, onLongPressMessage, onPressInMessage, onPressMessage, OverlayReactionList, ReactionList, removeMessage, Reply, retrySendMessage, ScrollToBottomButton, selectReaction, setEditingState, setQuotedMessageState, supportedReactions, targetedMessage, TypingIndicator, TypingIndicatorContainer, updateMessage, UrlPreview, }: MessagesContextValue<StreamChatGenerics> & {
3
+ export declare const useCreateMessagesContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ additionalTouchableProps, Attachment, AttachmentActions, Card, CardCover, CardFooter, CardHeader, channelId, DateHeader, deletedMessagesVisibilityType, disableTypingIndicator, dismissKeyboardOnMessageTouch, enableMessageGroupingByUser, FileAttachment, FileAttachmentGroup, FileAttachmentIcon, FlatList, forceAlignMessages, formatDate, Gallery, Giphy, giphyVersion, handleBlock, handleCopy, handleDelete, handleEdit, handleFlag, handleMute, handlePinMessage, handleQuotedReply, handleReaction, handleRetry, handleThreadReply, initialScrollToFirstUnreadMessage, InlineDateSeparator, InlineUnreadIndicator, isAttachmentEqual, legacyImageViewerSwipeBehaviour, markdownRules, Message, messageActions, MessageAvatar, MessageContent, messageContentOrder, MessageDeleted, MessageFooter, MessageHeader, MessageList, MessagePinnedHeader, MessageReplies, MessageRepliesAvatars, MessageSimple, MessageStatus, MessageSystem, MessageText, myMessageTheme, onLongPressMessage, onPressInMessage, onPressMessage, OverlayReactionList, ReactionList, removeMessage, Reply, retrySendMessage, ScrollToBottomButton, selectReaction, setEditingState, setQuotedMessageState, supportedReactions, targetedMessage, TypingIndicator, TypingIndicatorContainer, updateMessage, UrlPreview, VideoThumbnail, }: MessagesContextValue<StreamChatGenerics> & {
4
4
  /**
5
5
  * To ensure we allow re-render, when channel is changed
6
6
  */
@@ -1,9 +1,9 @@
1
- import type { Channel } from 'stream-chat';
1
+ import type { Channel, ChannelMemberResponse } from 'stream-chat';
2
2
  import type { DefaultStreamChatGenerics } from '../../../types/types';
3
- export declare const getChannelPreviewDisplayName: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channelName, currentUserId, maxCharacterLength, members, }: {
4
- maxCharacterLength: number;
3
+ export declare const getChannelPreviewDisplayName: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ channelName, characterLimit, currentUserId, members, }: {
4
+ characterLimit: number;
5
5
  channelName?: string | undefined;
6
6
  currentUserId?: string | undefined;
7
- members?: Record<string, import("stream-chat").ChannelMemberResponse<StreamChatGenerics>> | undefined;
7
+ members?: Record<string, ChannelMemberResponse<StreamChatGenerics>> | undefined;
8
8
  }) => string;
9
9
  export declare const useChannelPreviewDisplayName: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(channel?: Channel<StreamChatGenerics> | undefined, characterLength?: number | undefined) => string;
@@ -71,8 +71,10 @@ export declare type Photo<StreamChatGenerics extends DefaultStreamChatGenerics =
71
71
  channelId?: string;
72
72
  created_at?: string | Date;
73
73
  messageId?: string;
74
+ mime_type?: string;
74
75
  original_height?: number;
75
76
  original_width?: number;
77
+ type?: string;
76
78
  user?: UserResponse<StreamChatGenerics> | null;
77
79
  user_id?: string;
78
80
  };
@@ -0,0 +1,27 @@
1
+ import React from 'react';
2
+ import { ViewStyle } from 'react-native';
3
+ import type { StyleProp } from 'react-native';
4
+ import Animated from 'react-native-reanimated';
5
+ import { VideoPayloadData, VideoProgressData, VideoType } from '../../../native';
6
+ declare type Props = {
7
+ handleEnd: () => void;
8
+ handleLoad: (payload: VideoPayloadData) => void;
9
+ handleProgress: (data: VideoProgressData) => void;
10
+ index: number;
11
+ offsetScale: Animated.SharedValue<number>;
12
+ paused: boolean;
13
+ previous: boolean;
14
+ scale: Animated.SharedValue<number>;
15
+ screenHeight: number;
16
+ selected: boolean;
17
+ shouldRender: boolean;
18
+ source: {
19
+ uri: string;
20
+ };
21
+ translateX: Animated.SharedValue<number>;
22
+ translateY: Animated.SharedValue<number>;
23
+ videoRef: React.RefObject<VideoType>;
24
+ style?: StyleProp<ViewStyle>;
25
+ };
26
+ export declare const AnimatedGalleryVideo: React.FC<Props>;
27
+ export {};
@@ -8,23 +8,39 @@ export declare type ImageGalleryFooterCustomComponent<StreamChatGenerics extends
8
8
  shareMenuOpen: boolean;
9
9
  photo?: Photo<StreamChatGenerics>;
10
10
  }) => React.ReactElement | null;
11
+ export declare type ImageGalleryFooterVideoControlProps = {
12
+ duration: number;
13
+ onPlayPause: () => void;
14
+ onProgressDrag: (progress: number) => void;
15
+ paused: boolean;
16
+ progress: number;
17
+ };
18
+ export declare type ImageGalleryFooterVideoControlComponent = ({ duration, onPlayPause, onProgressDrag, paused, progress, }: ImageGalleryFooterVideoControlProps) => React.ReactElement | null;
11
19
  export declare type ImageGalleryFooterCustomComponentProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
12
20
  centerElement?: ImageGalleryFooterCustomComponent<StreamChatGenerics>;
13
21
  GridIcon?: React.ReactElement;
14
22
  leftElement?: ImageGalleryFooterCustomComponent<StreamChatGenerics>;
15
23
  rightElement?: ImageGalleryFooterCustomComponent<StreamChatGenerics>;
16
24
  ShareIcon?: React.ReactElement;
25
+ videoControlElement?: ImageGalleryFooterVideoControlComponent;
17
26
  };
18
- declare type Props<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = ImageGalleryFooterCustomComponentProps<StreamChatGenerics> & {
27
+ declare type ImageGalleryFooterPropsWithContext<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = ImageGalleryFooterCustomComponentProps<StreamChatGenerics> & {
28
+ duration: number;
29
+ onPlayPause: () => void;
30
+ onProgressDrag: (progress: number) => void;
19
31
  opacity: Animated.SharedValue<number>;
20
32
  openGridView: () => void;
33
+ paused: boolean;
21
34
  photo: Photo<StreamChatGenerics>;
22
35
  photoLength: number;
36
+ progress: number;
23
37
  selectedIndex: number;
24
38
  visible: Animated.SharedValue<number>;
25
39
  };
40
+ export declare const ImageGalleryFooterWithContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: ImageGalleryFooterPropsWithContext<StreamChatGenerics>) => JSX.Element;
41
+ export declare type ImageGalleryFooterProps<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = ImageGalleryFooterPropsWithContext<StreamChatGenerics>;
26
42
  export declare const ImageGalleryFooter: {
27
- <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: Props<StreamChatGenerics>): JSX.Element;
43
+ <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(props: ImageGalleryFooterProps<StreamChatGenerics>): JSX.Element;
28
44
  displayName: string;
29
45
  };
30
46
  export {};
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import type { ImageGalleryFooterVideoControlProps } from './ImageGalleryFooter';
3
+ export declare const ImageGalleryVideoControl: React.FC<ImageGalleryFooterVideoControlProps>;
@@ -0,0 +1,5 @@
1
+ import React from 'react';
2
+ import type { ImageGalleryFooterVideoControlProps } from './ImageGalleryFooter';
3
+ declare type ProgressControlProps = Pick<ImageGalleryFooterVideoControlProps, 'duration' | 'onPlayPause' | 'onProgressDrag' | 'progress'>;
4
+ export declare const ProgressControl: React.FC<ProgressControlProps>;
5
+ export {};
@@ -0,0 +1,36 @@
1
+ import type { PanGestureHandlerGestureEvent, PinchGestureHandlerGestureEvent, TapGestureHandlerGestureEvent } from 'react-native-gesture-handler';
2
+ import { SharedValue } from 'react-native-reanimated';
3
+ export declare enum HasPinched {
4
+ FALSE = 0,
5
+ TRUE = 1
6
+ }
7
+ export declare enum IsSwiping {
8
+ UNDETERMINED = 0,
9
+ TRUE = 1,
10
+ FALSE = 2
11
+ }
12
+ export declare const useImageGalleryGestures: ({ currentImageHeight, halfScreenHeight, halfScreenWidth, headerFooterVisible, offsetScale, overlayOpacity, photoLength, scale, screenHeight, screenWidth, setSelectedIndex, translateX, translateY, translationX, }: {
13
+ currentImageHeight: number;
14
+ halfScreenHeight: number;
15
+ halfScreenWidth: number;
16
+ headerFooterVisible: SharedValue<number>;
17
+ offsetScale: SharedValue<number>;
18
+ overlayOpacity: SharedValue<number>;
19
+ photoLength: number;
20
+ scale: SharedValue<number>;
21
+ screenHeight: number;
22
+ screenWidth: number;
23
+ setSelectedIndex: React.Dispatch<React.SetStateAction<number>>;
24
+ translateX: SharedValue<number>;
25
+ translateY: SharedValue<number>;
26
+ translationX: SharedValue<number>;
27
+ }) => {
28
+ onDoubleTap: (event: TapGestureHandlerGestureEvent) => void;
29
+ onPan: (event: PanGestureHandlerGestureEvent) => void;
30
+ onPinch: (event: PinchGestureHandlerGestureEvent) => void;
31
+ onSingleTap: (event: TapGestureHandlerGestureEvent) => void;
32
+ };
33
+ /**
34
+ * Clamping worklet to clamp the scaling
35
+ */
36
+ export declare const clamp: (value: number, lowerBound: number, upperBound: number) => number;
@@ -1,3 +1,3 @@
1
1
  import type { MessageContextValue } from '../../../contexts/messageContext/MessageContext';
2
2
  import type { DefaultStreamChatGenerics } from '../../../types/types';
3
- export declare const useCreateMessageContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ actionsEnabled, alignment, channel, disabled, files, goToMessage, groupStyles, handleAction, handleDeleteMessage, handleEditMessage, handleQuotedReplyMessage, handleResendMessage, handleToggleBanUser, handleToggleMuteUser, handleToggleReaction, hasReactions, images, isMyMessage, lastGroupMessage, lastReceivedId, members, message, messageContentOrder, onLongPress, onlyEmojis, onOpenThread, onPress, onPressIn, otherAttachments, preventPress, reactions, showAvatar, showMessageOverlay, showMessageStatus, threadList, }: MessageContextValue<StreamChatGenerics>) => MessageContextValue<StreamChatGenerics>;
3
+ export declare const useCreateMessageContext: <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>({ actionsEnabled, alignment, channel, disabled, files, goToMessage, groupStyles, handleAction, handleDeleteMessage, handleEditMessage, handleQuotedReplyMessage, handleResendMessage, handleToggleBanUser, handleToggleMuteUser, handleToggleReaction, hasReactions, images, isMyMessage, lastGroupMessage, lastReceivedId, members, message, messageContentOrder, onLongPress, onlyEmojis, onOpenThread, onPress, onPressIn, otherAttachments, preventPress, reactions, showAvatar, showMessageOverlay, showMessageStatus, threadList, videos, }: MessageContextValue<StreamChatGenerics>) => MessageContextValue<StreamChatGenerics>;
@@ -1,2 +1,8 @@
1
1
  import React from 'react';
2
- export declare const Spinner: React.FC;
2
+ import { StyleProp, ViewStyle } from 'react-native';
3
+ export declare type SpinnerProps = {
4
+ height?: number;
5
+ style?: StyleProp<ViewStyle>;
6
+ width?: number;
7
+ };
8
+ export declare const Spinner: React.FC<SpinnerProps>;
@@ -6,6 +6,7 @@ export * from './Attachment/FileAttachmentGroup';
6
6
  export * from './Attachment/FileIcon';
7
7
  export * from './Attachment/Gallery';
8
8
  export * from './Attachment/Giphy';
9
+ export * from './Attachment/VideoThumbnail';
9
10
  export * from './Attachment/utils/buildGallery/buildGallery';
10
11
  export * from './AttachmentPicker/AttachmentPicker';
11
12
  export * from './AttachmentPicker/components/AttachmentPickerBottomSheetHandle';
@@ -66,6 +67,7 @@ export * from './Chat/hooks/useIsOnline';
66
67
  export * from './Chat/hooks/useMutedUsers';
67
68
  export * from './ImageGallery/ImageGallery';
68
69
  export * from './ImageGallery/components/AnimatedGalleryImage';
70
+ export * from './ImageGallery/components/AnimatedGalleryVideo';
69
71
  export * from './ImageGallery/components/ImageGalleryFooter';
70
72
  export * from './ImageGallery/components/ImageGalleryHeader';
71
73
  export * from './ImageGallery/components/ImageGalleryOverlay';
@@ -80,6 +80,8 @@ export declare type MessageContextValue<StreamChatGenerics extends DefaultStream
80
80
  showMessageStatus: boolean;
81
81
  /** Whether or not the Message is part of a Thread */
82
82
  threadList: boolean;
83
+ /** The videos attached to a message */
84
+ videos: Attachment<StreamChatGenerics>[];
83
85
  goToMessage?: (messageId: string) => void;
84
86
  /** Latest message id on current channel */
85
87
  lastReceivedId?: string;
@@ -98,4 +100,4 @@ export declare const useMessageContext: <StreamChatGenerics extends DefaultStrea
98
100
  * typing is desired while using the HOC withMessageContextContext the Props for the
99
101
  * wrapped component must be provided as the first generic.
100
102
  */
101
- export declare const withMessageContext: <P extends UnknownType, StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(Component: React.ComponentType<P>) => React.FC<Omit<P, "disabled" | "onPress" | "onPressIn" | "onLongPress" | "channel" | "members" | "threadList" | "reactions" | "images" | "message" | "handleAction" | "alignment" | "actionsEnabled" | "files" | "groupStyles" | "handleDeleteMessage" | "handleEditMessage" | "handleQuotedReplyMessage" | "handleResendMessage" | "handleToggleBanUser" | "handleToggleMuteUser" | "handleToggleReaction" | "hasReactions" | "isMyMessage" | "lastGroupMessage" | "messageContentOrder" | "onlyEmojis" | "onOpenThread" | "otherAttachments" | "showMessageOverlay" | "showMessageStatus" | "goToMessage" | "lastReceivedId" | "preventPress" | "showAvatar">>;
103
+ export declare const withMessageContext: <P extends UnknownType, StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(Component: React.ComponentType<P>) => React.FC<Omit<P, "disabled" | "onPress" | "onPressIn" | "onLongPress" | "channel" | "members" | "threadList" | "reactions" | "images" | "message" | "handleAction" | "alignment" | "actionsEnabled" | "files" | "groupStyles" | "handleDeleteMessage" | "handleEditMessage" | "handleQuotedReplyMessage" | "handleResendMessage" | "handleToggleBanUser" | "handleToggleMuteUser" | "handleToggleReaction" | "hasReactions" | "isMyMessage" | "lastGroupMessage" | "messageContentOrder" | "onlyEmojis" | "onOpenThread" | "otherAttachments" | "showMessageOverlay" | "showMessageStatus" | "videos" | "goToMessage" | "lastReceivedId" | "preventPress" | "showAvatar">>;
@@ -29,6 +29,7 @@ export declare type MessageOverlayData<StreamChatGenerics extends DefaultStreamC
29
29
  ownCapabilities?: OwnCapabilitiesContextValue;
30
30
  supportedReactions?: ReactionData[];
31
31
  threadList?: boolean;
32
+ videos?: Attachment<StreamChatGenerics>[];
32
33
  };
33
34
  export declare type MessageOverlayContextValue<StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics> = {
34
35
  /**
@@ -10,6 +10,7 @@ import type { FileAttachmentGroupProps } from '../../components/Attachment/FileA
10
10
  import type { FileIconProps } from '../../components/Attachment/FileIcon';
11
11
  import type { GalleryProps } from '../../components/Attachment/Gallery';
12
12
  import type { GiphyProps } from '../../components/Attachment/Giphy';
13
+ import type { VideoThumbnailProps } from '../../components/Attachment/VideoThumbnail';
13
14
  import type { MessageProps, MessageTouchableHandlerPayload } from '../../components/Message/Message';
14
15
  import type { MessageAvatarProps } from '../../components/Message/MessageSimple/MessageAvatar';
15
16
  import type { MessageContentProps } from '../../components/Message/MessageSimple/MessageContent';
@@ -211,6 +212,7 @@ export declare type MessagesContextValue<StreamChatGenerics extends DefaultStrea
211
212
  * Defaults to https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx
212
213
  */
213
214
  UrlPreview: React.ComponentType<CardProps<StreamChatGenerics>>;
215
+ VideoThumbnail: React.ComponentType<VideoThumbnailProps>;
214
216
  /**
215
217
  * Provide any additional props for `TouchableOpacity` which wraps inner MessageContent component here.
216
218
  * Please check docs for TouchableOpacity for supported props - https://reactnative.dev/docs/touchableopacity#props
@@ -192,6 +192,11 @@ export declare type Theme = {
192
192
  rightContainer: ViewStyle;
193
193
  usernameText: TextStyle;
194
194
  };
195
+ videoControl: {
196
+ durationTextStyle: TextStyle;
197
+ roundedView: ViewStyle;
198
+ videoContainer: ViewStyle;
199
+ };
195
200
  backgroundColor?: string;
196
201
  pager?: ViewStyle;
197
202
  slide?: ImageStyle;
@@ -472,6 +477,10 @@ export declare type Theme = {
472
477
  timeIcon: IconProps;
473
478
  };
474
479
  targetedMessageUnderlay: ViewStyle;
480
+ videoThumbnail: {
481
+ container: ViewStyle;
482
+ roundedView: ViewStyle;
483
+ };
475
484
  };
476
485
  overlay: {
477
486
  container: ViewStyle;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './utils/base';
3
+ export declare const Pause: React.FC<IconProps>;
@@ -0,0 +1,3 @@
1
+ import React from 'react';
2
+ import { IconProps } from './utils/base';
3
+ export declare const Play: React.FC<IconProps>;
@@ -44,10 +44,12 @@ export * from './MessageIcon';
44
44
  export * from './Mute';
45
45
  export * from './Notification';
46
46
  export * from './ODT';
47
+ export * from './Pause';
47
48
  export * from './PDF';
48
49
  export * from './Picture';
49
50
  export * from './Pin';
50
51
  export * from './PinHeader';
52
+ export * from './Play';
51
53
  export * from './PPT';
52
54
  export * from './PPTX';
53
55
  export * from './RAR';
@@ -0,0 +1,161 @@
1
+ export function queryMembersApi(members?: any): {
2
+ response: {
3
+ data: any;
4
+ status: number;
5
+ };
6
+ type: string;
7
+ };
8
+ export namespace ONE_CHANNEL_MEMBER_MOCK {
9
+ namespace okey {
10
+ const banned: boolean;
11
+ const channel_role: string;
12
+ const created_at: string;
13
+ const role: string;
14
+ const shadow_banned: boolean;
15
+ const updated_at: string;
16
+ namespace user {
17
+ const id: string;
18
+ const name: string;
19
+ }
20
+ const user_id: string;
21
+ }
22
+ }
23
+ export namespace GROUP_CHANNEL_MEMBERS_MOCK {
24
+ export namespace ben {
25
+ const banned_1: boolean;
26
+ export { banned_1 as banned };
27
+ const channel_role_1: string;
28
+ export { channel_role_1 as channel_role };
29
+ const created_at_1: string;
30
+ export { created_at_1 as created_at };
31
+ const role_1: string;
32
+ export { role_1 as role };
33
+ const shadow_banned_1: boolean;
34
+ export { shadow_banned_1 as shadow_banned };
35
+ const updated_at_1: string;
36
+ export { updated_at_1 as updated_at };
37
+ export namespace user_1 {
38
+ const id_1: string;
39
+ export { id_1 as id };
40
+ const name_1: string;
41
+ export { name_1 as name };
42
+ }
43
+ export { user_1 as user };
44
+ const user_id_1: string;
45
+ export { user_id_1 as user_id };
46
+ }
47
+ export namespace nick {
48
+ const banned_2: boolean;
49
+ export { banned_2 as banned };
50
+ const channel_role_2: string;
51
+ export { channel_role_2 as channel_role };
52
+ const created_at_2: string;
53
+ export { created_at_2 as created_at };
54
+ const role_2: string;
55
+ export { role_2 as role };
56
+ const shadow_banned_2: boolean;
57
+ export { shadow_banned_2 as shadow_banned };
58
+ const updated_at_2: string;
59
+ export { updated_at_2 as updated_at };
60
+ export namespace user_2 {
61
+ const id_2: string;
62
+ export { id_2 as id };
63
+ const name_2: string;
64
+ export { name_2 as name };
65
+ }
66
+ export { user_2 as user };
67
+ const user_id_2: string;
68
+ export { user_id_2 as user_id };
69
+ }
70
+ export namespace okey_1 {
71
+ const banned_3: boolean;
72
+ export { banned_3 as banned };
73
+ const channel_role_3: string;
74
+ export { channel_role_3 as channel_role };
75
+ const created_at_3: string;
76
+ export { created_at_3 as created_at };
77
+ const role_3: string;
78
+ export { role_3 as role };
79
+ const shadow_banned_3: boolean;
80
+ export { shadow_banned_3 as shadow_banned };
81
+ const updated_at_3: string;
82
+ export { updated_at_3 as updated_at };
83
+ export namespace user_3 {
84
+ const id_3: string;
85
+ export { id_3 as id };
86
+ const name_3: string;
87
+ export { name_3 as name };
88
+ }
89
+ export { user_3 as user };
90
+ const user_id_3: string;
91
+ export { user_id_3 as user_id };
92
+ }
93
+ export { okey_1 as okey };
94
+ export namespace qatest1 {
95
+ const banned_4: boolean;
96
+ export { banned_4 as banned };
97
+ const channel_role_4: string;
98
+ export { channel_role_4 as channel_role };
99
+ const created_at_4: string;
100
+ export { created_at_4 as created_at };
101
+ const role_4: string;
102
+ export { role_4 as role };
103
+ const shadow_banned_4: boolean;
104
+ export { shadow_banned_4 as shadow_banned };
105
+ const updated_at_4: string;
106
+ export { updated_at_4 as updated_at };
107
+ export namespace user_4 {
108
+ const id_4: string;
109
+ export { id_4 as id };
110
+ const name_4: string;
111
+ export { name_4 as name };
112
+ }
113
+ export { user_4 as user };
114
+ const user_id_4: string;
115
+ export { user_id_4 as user_id };
116
+ }
117
+ export namespace thierry {
118
+ const banned_5: boolean;
119
+ export { banned_5 as banned };
120
+ const channel_role_5: string;
121
+ export { channel_role_5 as channel_role };
122
+ const created_at_5: string;
123
+ export { created_at_5 as created_at };
124
+ const role_5: string;
125
+ export { role_5 as role };
126
+ const shadow_banned_5: boolean;
127
+ export { shadow_banned_5 as shadow_banned };
128
+ const updated_at_5: string;
129
+ export { updated_at_5 as updated_at };
130
+ export namespace user_5 {
131
+ const id_5: string;
132
+ export { id_5 as id };
133
+ const name_5: string;
134
+ export { name_5 as name };
135
+ }
136
+ export { user_5 as user };
137
+ const user_id_5: string;
138
+ export { user_id_5 as user_id };
139
+ }
140
+ }
141
+ export namespace ONE_MEMBER_WITH_EMPTY_USER_MOCK {
142
+ export namespace okey_2 {
143
+ const banned_6: boolean;
144
+ export { banned_6 as banned };
145
+ const channel_role_6: string;
146
+ export { channel_role_6 as channel_role };
147
+ const created_at_6: string;
148
+ export { created_at_6 as created_at };
149
+ const role_6: string;
150
+ export { role_6 as role };
151
+ const shadow_banned_6: boolean;
152
+ export { shadow_banned_6 as shadow_banned };
153
+ const updated_at_6: string;
154
+ export { updated_at_6 as updated_at };
155
+ const user_6: {};
156
+ export { user_6 as user };
157
+ const user_id_6: string;
158
+ export { user_id_6 as user_id };
159
+ }
160
+ export { okey_2 as okey };
161
+ }
@@ -0,0 +1,7 @@
1
+ export function mockedApiResponse(response: any, type?: string, status?: number): {
2
+ response: {
3
+ data: any;
4
+ status: number;
5
+ };
6
+ type: string;
7
+ };
@@ -0,0 +1,30 @@
1
+ export function getUserDefaults(): {
2
+ banned: boolean;
3
+ created_at: string;
4
+ id: any;
5
+ image: any;
6
+ name: any;
7
+ online: boolean;
8
+ role: string;
9
+ updated_at: string;
10
+ };
11
+ export function generateUser(options?: {}): {
12
+ banned: boolean;
13
+ created_at: string;
14
+ id: any;
15
+ image: any;
16
+ name: any;
17
+ online: boolean;
18
+ role: string;
19
+ updated_at: string;
20
+ };
21
+ export function generateStaticUser(userNumber: any): {
22
+ banned: boolean;
23
+ created_at: string;
24
+ id: any;
25
+ image: any;
26
+ name: any;
27
+ online: boolean;
28
+ role: string;
29
+ updated_at: string;
30
+ };
@@ -0,0 +1,3 @@
1
+ export function getTestClient(): any;
2
+ export function getTestClientWithUser(user: any): Promise<any>;
3
+ export function getRandomInt(min: any, max: any): any;
@@ -1,4 +1,5 @@
1
- import { FlatList as DefaultFlatList } from 'react-native';
1
+ import type React from 'react';
2
+ import { FlatList as DefaultFlatList, StyleProp, ViewStyle } from 'react-native';
2
3
  import type { NetInfoSubscription } from '@react-native-community/netinfo';
3
4
  import type { Asset, File } from './types/types';
4
5
  declare type CompressImage = ({ compressImageQuality, height, uri, width, }: {
@@ -64,6 +65,69 @@ declare type HapticFeedbackMethod = 'impactHeavy' | 'impactLight' | 'impactMediu
64
65
  declare type TriggerHaptic = (method: HapticFeedbackMethod) => void | never;
65
66
  export declare let triggerHaptic: TriggerHaptic;
66
67
  export declare let SDK: string;
68
+ export declare type PlaybackStatus = {
69
+ didJustFinish: boolean;
70
+ durationMillis: number;
71
+ error: string;
72
+ isBuffering: boolean;
73
+ isLoaded: boolean;
74
+ isLooping: boolean;
75
+ isPlaying: boolean;
76
+ positionMillis: number;
77
+ };
78
+ export declare type VideoProgressData = {
79
+ currentTime?: number;
80
+ playableDuration?: number;
81
+ seekableDuration?: number;
82
+ };
83
+ export declare type VideoPayloadData = {
84
+ audioTracks?: {
85
+ index: number;
86
+ language: string;
87
+ title: string;
88
+ type: string;
89
+ }[];
90
+ currentPosition?: number;
91
+ duration?: number;
92
+ naturalSize?: {
93
+ height: number;
94
+ orientation: 'portrait' | 'landscape';
95
+ width: number;
96
+ };
97
+ textTracks?: {
98
+ index: number;
99
+ language: string;
100
+ title: string;
101
+ type: string;
102
+ }[];
103
+ videoTracks?: {
104
+ bitrate: number;
105
+ codecs: string;
106
+ height: number;
107
+ trackId: number;
108
+ width: number;
109
+ }[];
110
+ };
111
+ export declare type VideoType = {
112
+ paused: boolean;
113
+ uri: string;
114
+ videoRef: React.RefObject<VideoType>;
115
+ onBuffer?: (props: {
116
+ isBuffering: boolean;
117
+ }) => void;
118
+ onEnd?: () => void;
119
+ onLoad?: (payload: VideoPayloadData) => void;
120
+ onLoadStart?: () => void;
121
+ onPlaybackStatusUpdate?: (playbackStatus: PlaybackStatus) => void;
122
+ onProgress?: (data: VideoProgressData) => void;
123
+ onReadyForDisplay?: () => void;
124
+ replayAsync?: () => void;
125
+ resizeMode?: string;
126
+ seek?: (progress: number) => void;
127
+ setPositionAsync?: (position: number) => void;
128
+ style?: StyleProp<ViewStyle>;
129
+ };
130
+ export declare let Video: React.ComponentType<VideoType>;
67
131
  declare type Handlers = {
68
132
  compressImage?: CompressImage;
69
133
  deleteFile?: DeleteFile;
@@ -77,6 +141,7 @@ declare type Handlers = {
77
141
  shareImage?: ShareImage;
78
142
  takePhoto?: TakePhoto;
79
143
  triggerHaptic?: TriggerHaptic;
144
+ Video?: React.ComponentType<VideoType>;
80
145
  };
81
146
  export declare const registerNativeHandlers: (handlers: Handlers) => void;
82
147
  export {};