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
@@ -1 +1 @@
1
- {"version":3,"sources":["Reply.tsx"],"names":["styles","StyleSheet","create","container","alignItems","flexDirection","fileAttachmentContainer","paddingLeft","paddingVertical","imageAttachment","borderRadius","height","marginLeft","marginVertical","width","messageContainer","borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius","flexGrow","flexShrink","text","fontSize","textContainer","maxWidth","undefined","paddingHorizontal","getMessageType","lastAttachment","messageType","isLastAttachmentFile","type","isLastAttachmentGiphy","isLastAttachmentImageOrGiphy","title_link","og_scrape_url","isLastAttachmentImage","image_url","thumb_url","ReplyWithContext","props","FileAttachmentIcon","attachmentSize","MessageAvatar","quotedMessage","stylesProp","t","error","setError","theme","colors","blue_alice","border","grey","transparent","white","deletedText","messageSimple","content","reply","markdownStyles","attachments","slice","hasImage","onlyEmojis","emojiRegex","test","backgroundColor","borderColor","borderWidth","mime_type","uri","url","deleted_at","em","color","length","title","marginRight","Number","areEqual","prevProps","nextProps","prevQuotedMessage","nextQuotedMessage","quotedMessageEqual","id","MemoizedReply","React","memo","Reply","message","FileIconDefault","MessageAvatarDefault","editing","quotedEditingMessage","quoted_message","displayName"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAIA;;AACA;;AAIA;;AAIA;;AACA;;AAKA;;AACA;;AAEA;;AACA;;AACA;;;;;;;;;AAEA,IAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,UAAU,EAAE,UADH;AAETC,IAAAA,aAAa,EAAE;AAFN,GADoB;AAK/BC,EAAAA,uBAAuB,EAAE;AAAEC,IAAAA,WAAW,EAAE,CAAf;AAAkBC,IAAAA,eAAe,EAAE;AAAnC,GALM;AAM/BC,EAAAA,eAAe,EAAE;AACfC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AAQA,OAAR;AAAA,MAAiBlD,aAAjB,yBAAiBA,aAAjB;;AAEA,MAAMmD,oBAAoB,GACxB,OAAOD,OAAP,KAAmB,SAAnB,GAA+B,CAAAA,OAAO,QAAP,YAAAA,OAAO,CAAEE,cAAT,KAA2B,KAA1D,GAAkE,KADpE;;AAIA,8BAAc,gDAAd;AAAA,MAAQlD,CAAR,yBAAQA,CAAR;;AAEA,SACE,gCAAC,aAAD;AAEIL,IAAAA,kBAAkB,EAAlBA,kBAFJ;AAGIE,IAAAA,aAAa,EAAbA,aAHJ;AAIIC,IAAAA,aAAa,EAAE+C,OAAO,GACjBA,OAAO,CAACK,cADS,GAElBpD,aAAa,IAAImD,oBANzB;AAOIjD,IAAAA,CAAC,EAADA;AAPJ,KASMN,KATN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KADF;AAaD,CA/BM;;;AAiCPkD,KAAK,CAACO,WAAN,GAAoB,cAApB","sourcesContent":["import React, { useState } from 'react';\nimport { Image, ImageStyle, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport merge from 'lodash/merge';\n\nimport type { Attachment } from 'stream-chat';\n\nimport { useMessageContext } from '../../contexts/messageContext/MessageContext';\nimport {\n MessageInputContextValue,\n useMessageInputContext,\n} from '../../contexts/messageInputContext/MessageInputContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../contexts/messagesContext/MessagesContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport {\n TranslationContextValue,\n useTranslationContext,\n} from '../../contexts/translationContext/TranslationContext';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { getResizedImageUrl } from '../../utils/getResizedImageUrl';\nimport { emojiRegex } from '../../utils/utils';\n\nimport { FileIcon as FileIconDefault } from '../Attachment/FileIcon';\nimport { MessageAvatar as MessageAvatarDefault } from '../Message/MessageSimple/MessageAvatar';\nimport { MessageTextContainer } from '../Message/MessageSimple/MessageTextContainer';\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'flex-end',\n flexDirection: 'row',\n },\n fileAttachmentContainer: { paddingLeft: 8, paddingVertical: 8 },\n imageAttachment: {\n borderRadius: 8,\n height: 32,\n marginLeft: 8,\n marginVertical: 8,\n width: 32,\n },\n messageContainer: {\n alignItems: 'flex-start',\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 12,\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n flexDirection: 'row',\n flexGrow: 1,\n flexShrink: 1,\n },\n text: { fontSize: 12 },\n textContainer: { maxWidth: undefined, paddingHorizontal: 8 },\n});\n\ntype ReplyPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<MessageInputContextValue<StreamChatGenerics>, 'quotedMessage'> &\n Pick<MessagesContextValue<StreamChatGenerics>, 'FileAttachmentIcon' | 'MessageAvatar'> &\n Pick<TranslationContextValue, 't'> & {\n attachmentSize?: number;\n styles?: Partial<{\n container: ViewStyle;\n fileAttachmentContainer: ViewStyle;\n imageAttachment: ImageStyle;\n messageContainer: ViewStyle;\n textContainer: ViewStyle;\n }>;\n };\n\nconst getMessageType = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n lastAttachment: Attachment<StreamChatGenerics>,\n) => {\n let messageType;\n\n const isLastAttachmentFile =\n lastAttachment.type === 'file' ||\n lastAttachment.type === 'audio' ||\n lastAttachment.type === 'video';\n\n const isLastAttachmentGiphy = lastAttachment.type === 'giphy' || lastAttachment.type === 'imgur';\n\n const isLastAttachmentImageOrGiphy =\n lastAttachment.type === 'image' && !lastAttachment.title_link && !lastAttachment.og_scrape_url;\n\n const isLastAttachmentImage = lastAttachment.image_url || lastAttachment.thumb_url;\n\n if (isLastAttachmentFile) {\n messageType = 'file';\n } else if (isLastAttachmentImageOrGiphy) {\n if (isLastAttachmentImage) messageType = 'image';\n else messageType = undefined;\n } else if (isLastAttachmentGiphy) messageType = 'giphy';\n else messageType = 'other';\n\n return messageType;\n};\n\nconst ReplyWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ReplyPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n FileAttachmentIcon,\n attachmentSize = 40,\n MessageAvatar,\n quotedMessage,\n styles: stylesProp = {},\n t,\n } = props;\n\n const [error, setError] = useState(false);\n\n const {\n theme: {\n colors: { blue_alice, border, grey, transparent, white },\n messageSimple: {\n content: { deletedText },\n },\n reply: {\n container,\n fileAttachmentContainer,\n imageAttachment,\n markdownStyles,\n messageContainer,\n textContainer,\n },\n },\n } = useTheme();\n\n if (typeof quotedMessage === 'boolean') return null;\n\n const lastAttachment = quotedMessage.attachments?.slice(-1)[0] as Attachment<StreamChatGenerics>;\n const messageType = lastAttachment && getMessageType(lastAttachment);\n\n const hasImage =\n !error &&\n lastAttachment &&\n messageType !== 'file' &&\n (lastAttachment.image_url || lastAttachment.thumb_url || lastAttachment.og_scrape_url);\n\n const onlyEmojis = !lastAttachment && !!quotedMessage.text && emojiRegex.test(quotedMessage.text);\n\n return (\n <View style={[styles.container, container, stylesProp.container]}>\n <MessageAvatar alignment={'left'} lastGroupMessage message={quotedMessage} size={24} />\n <View\n style={[\n styles.messageContainer,\n {\n backgroundColor:\n messageType === 'other' ? blue_alice : messageType === 'giphy' ? transparent : white,\n borderColor: border,\n borderWidth: messageType === 'other' ? 0 : 1,\n },\n messageContainer,\n stylesProp.messageContainer,\n ]}\n >\n {!error && lastAttachment ? (\n messageType === 'file' ? (\n <View\n style={[\n styles.fileAttachmentContainer,\n fileAttachmentContainer,\n stylesProp.fileAttachmentContainer,\n ]}\n >\n <FileAttachmentIcon mimeType={lastAttachment.mime_type} size={attachmentSize} />\n </View>\n ) : hasImage ? (\n <Image\n onError={() => setError(true)}\n source={{\n uri: getResizedImageUrl({\n height:\n stylesProp.imageAttachment?.height ||\n imageAttachment?.height ||\n styles.imageAttachment.height,\n url: (lastAttachment.image_url ||\n lastAttachment.thumb_url ||\n lastAttachment.og_scrape_url) as string,\n width:\n stylesProp.imageAttachment?.width ||\n imageAttachment?.width ||\n styles.imageAttachment.width,\n }),\n }}\n style={[styles.imageAttachment, imageAttachment, stylesProp.imageAttachment]}\n />\n ) : null\n ) : null}\n <MessageTextContainer<StreamChatGenerics>\n markdownStyles={\n quotedMessage.deleted_at\n ? merge({ em: { color: grey } }, deletedText)\n : { text: styles.text, ...markdownStyles }\n }\n message={{\n ...quotedMessage,\n text: quotedMessage.deleted_at\n ? `_${t('Message deleted')}_`\n : quotedMessage.text\n ? quotedMessage.text.length > 170\n ? `${quotedMessage.text.slice(0, 170)}...`\n : quotedMessage.text\n : messageType === 'image'\n ? t('Photo')\n : messageType === 'file'\n ? lastAttachment?.title || ''\n : '',\n }}\n onlyEmojis={onlyEmojis}\n styles={{\n textContainer: [\n {\n marginRight: hasImage\n ? Number(\n stylesProp.imageAttachment?.height ||\n imageAttachment.height ||\n styles.imageAttachment.height,\n ) +\n Number(\n stylesProp.imageAttachment?.marginLeft ||\n imageAttachment.marginLeft ||\n styles.imageAttachment.marginLeft,\n )\n : messageType === 'file'\n ? attachmentSize +\n Number(\n stylesProp.fileAttachmentContainer?.paddingLeft ||\n fileAttachmentContainer.paddingLeft ||\n styles.fileAttachmentContainer.paddingLeft,\n )\n : undefined,\n },\n styles.textContainer,\n textContainer,\n stylesProp.textContainer,\n ],\n }}\n />\n </View>\n </View>\n );\n};\n\nconst areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(\n prevProps: ReplyPropsWithContext<StreamChatGenerics>,\n nextProps: ReplyPropsWithContext<StreamChatGenerics>,\n) => {\n const { quotedMessage: prevQuotedMessage } = prevProps;\n const { quotedMessage: nextQuotedMessage } = nextProps;\n\n const quotedMessageEqual =\n !!prevQuotedMessage &&\n !!nextQuotedMessage &&\n typeof prevQuotedMessage !== 'boolean' &&\n typeof nextQuotedMessage !== 'boolean'\n ? prevQuotedMessage.id === nextQuotedMessage.id &&\n prevQuotedMessage.deleted_at === nextQuotedMessage.deleted_at\n : !!prevQuotedMessage === !!nextQuotedMessage;\n\n if (!quotedMessageEqual) return false;\n\n return true;\n};\n\nconst MemoizedReply = React.memo(ReplyWithContext, areEqual) as typeof ReplyWithContext;\n\nexport type ReplyProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<ReplyPropsWithContext<StreamChatGenerics>>;\n\n/**\n * UI Component for reply\n */\nexport const Reply = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ReplyProps<StreamChatGenerics>,\n) => {\n const { message } = useMessageContext<StreamChatGenerics>();\n\n const { FileAttachmentIcon = FileIconDefault, MessageAvatar = MessageAvatarDefault } =\n useMessagesContext<StreamChatGenerics>();\n\n const { editing, quotedMessage } = useMessageInputContext<StreamChatGenerics>();\n\n const quotedEditingMessage = (\n typeof editing !== 'boolean' ? editing?.quoted_message || false : false\n ) as MessageInputContextValue<StreamChatGenerics>['quotedMessage'];\n\n const { t } = useTranslationContext();\n\n return (\n <MemoizedReply\n {...{\n FileAttachmentIcon,\n MessageAvatar,\n quotedMessage: message\n ? (message.quoted_message as MessageInputContextValue<StreamChatGenerics>['quotedMessage'])\n : quotedMessage || quotedEditingMessage,\n t,\n }}\n {...props}\n />\n );\n};\n\nReply.displayName = 'Reply{reply}';\n"]}
1
+ {"version":3,"sources":["Reply.tsx"],"names":["styles","StyleSheet","create","container","alignItems","flexDirection","fileAttachmentContainer","paddingLeft","paddingVertical","imageAttachment","borderRadius","height","marginLeft","marginVertical","width","messageContainer","borderBottomLeftRadius","borderBottomRightRadius","borderTopLeftRadius","borderTopRightRadius","flexGrow","flexShrink","text","fontSize","textContainer","maxWidth","undefined","paddingHorizontal","videoAttachment","getMessageType","lastAttachment","messageType","isLastAttachmentFile","type","isLastAttachmentVideo","isLastAttachmentGiphy","isLastAttachmentImageOrGiphy","title_link","og_scrape_url","isLastAttachmentImage","image_url","thumb_url","ReplyWithContext","props","FileAttachmentIcon","attachmentSize","MessageAvatar","quotedMessage","stylesProp","t","error","setError","theme","colors","blue_alice","border","grey","transparent","white","deletedText","messageSimple","content","reply","markdownStyles","attachments","slice","hasImage","onlyEmojis","emojiRegex","test","backgroundColor","borderColor","borderWidth","mime_type","uri","url","deleted_at","em","color","length","title","marginRight","Number","areEqual","prevProps","nextProps","prevQuotedMessage","nextQuotedMessage","quotedMessageEqual","id","MemoizedReply","React","memo","Reply","message","FileIconDefault","MessageAvatarDefault","editing","quotedEditingMessage","quoted_message","displayName"],"mappings":";;;;;;;;;;;;;AAAA;;AACA;;AAEA;;AAIA;;AACA;;AAIA;;AAIA;;AACA;;AAKA;;AACA;;AAEA;;AACA;;AACA;;AACA;;;;;;;;;AAEA,IAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,SAAS,EAAE;AACTC,IAAAA,UAAU,EAAE,UADH;AAETC,IAAAA,aAAa,EAAE;AAFN,GADoB;AAK/BC,EAAAA,uBAAuB,EAAE;AAAEC,IAAAA,WAAW,EAAE,CAAf;AAAkBC,IAAAA,eAAe,EAAE;AAAnC,GALM;AAM/BC,EAAAA,eAAe,EAAE;AACfC,IAAAA,YAAY,EAAE,CADC;AAEfC,IAAAA,MAAM,EAAE,EAFO;AAGfC,IAAAA,UAAU,EAAE,CAHG;AAIfC,IAAAA,cAAc,EAAE,CAJD;AAKfC,IAAAA,KAAK,EAAE;AALQ,GANc;AAa/BC,EAAAA,gBAAgB,EAAE;AAChBX,IAAAA,UAAU,EAAE,YADI;AAEhBY,IAAAA,sBAAsB,EAAE,CAFR;AAGhBC,IAAAA,uBAAuB,EAAE,EAHT;AAIhBC,IAAAA,mBAAmB,EAAE,EAJL;AAKhBC,IAAAA,oBAAoB,EAAE,EALN;AAMhBd,IAAAA,aAAa,EAAE,KANC;AAOhBe,IAAAA,QAAQ,EAAE,CAPM;AAQhBC,IAAAA,UAAU,EAAE;AARI,GAba;AAuB/BC,EAAAA,I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D;;AAGA,8BAAmC,kDAAnC;AAAA,MAAQC,OAAR,yBAAQA,OAAR;AAAA,MAAiBlD,aAAjB,yBAAiBA,aAAjB;;AAEA,MAAMmD,oBAAoB,GACxB,OAAOD,OAAP,KAAmB,SAAnB,GAA+B,CAAAA,OAAO,QAAP,YAAAA,OAAO,CAAEE,cAAT,KAA2B,KAA1D,GAAkE,KADpE;;AAIA,8BAAc,gDAAd;AAAA,MAAQlD,CAAR,yBAAQA,CAAR;;AAEA,SACE,gCAAC,aAAD;AAEIL,IAAAA,kBAAkB,EAAlBA,kBAFJ;AAGIE,IAAAA,aAAa,EAAbA,aAHJ;AAIIC,IAAAA,aAAa,EAAE+C,OAAO,GACjBA,OAAO,CAACK,cADS,GAElBpD,aAAa,IAAImD,oBANzB;AAOIjD,IAAAA,CAAC,EAADA;AAPJ,KASMN,KATN;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KADF;AAaD,CA/BM;;;AAiCPkD,KAAK,CAACO,WAAN,GAAoB,cAApB","sourcesContent":["import React, { useState } from 'react';\nimport { Image, ImageStyle, StyleSheet, View, ViewStyle } from 'react-native';\n\nimport merge from 'lodash/merge';\n\nimport type { Attachment } from 'stream-chat';\n\nimport { useMessageContext } from '../../contexts/messageContext/MessageContext';\nimport {\n MessageInputContextValue,\n useMessageInputContext,\n} from '../../contexts/messageInputContext/MessageInputContext';\nimport {\n MessagesContextValue,\n useMessagesContext,\n} from '../../contexts/messagesContext/MessagesContext';\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport {\n TranslationContextValue,\n useTranslationContext,\n} from '../../contexts/translationContext/TranslationContext';\nimport type { DefaultStreamChatGenerics } from '../../types/types';\nimport { getResizedImageUrl } from '../../utils/getResizedImageUrl';\nimport { emojiRegex } from '../../utils/utils';\n\nimport { FileIcon as FileIconDefault } from '../Attachment/FileIcon';\nimport { VideoThumbnail } from '../Attachment/VideoThumbnail';\nimport { MessageAvatar as MessageAvatarDefault } from '../Message/MessageSimple/MessageAvatar';\nimport { MessageTextContainer } from '../Message/MessageSimple/MessageTextContainer';\n\nconst styles = StyleSheet.create({\n container: {\n alignItems: 'flex-end',\n flexDirection: 'row',\n },\n fileAttachmentContainer: { paddingLeft: 8, paddingVertical: 8 },\n imageAttachment: {\n borderRadius: 8,\n height: 32,\n marginLeft: 8,\n marginVertical: 8,\n width: 32,\n },\n messageContainer: {\n alignItems: 'flex-start',\n borderBottomLeftRadius: 0,\n borderBottomRightRadius: 12,\n borderTopLeftRadius: 12,\n borderTopRightRadius: 12,\n flexDirection: 'row',\n flexGrow: 1,\n flexShrink: 1,\n },\n text: { fontSize: 12 },\n textContainer: { maxWidth: undefined, paddingHorizontal: 8 },\n videoAttachment: {\n borderRadius: 8,\n height: 50,\n marginLeft: 8,\n marginVertical: 8,\n width: 50,\n },\n});\n\ntype ReplyPropsWithContext<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Pick<MessageInputContextValue<StreamChatGenerics>, 'quotedMessage'> &\n Pick<MessagesContextValue<StreamChatGenerics>, 'FileAttachmentIcon' | 'MessageAvatar'> &\n Pick<TranslationContextValue, 't'> & {\n attachmentSize?: number;\n styles?: Partial<{\n container: ViewStyle;\n fileAttachmentContainer: ViewStyle;\n imageAttachment: ImageStyle;\n messageContainer: ViewStyle;\n textContainer: ViewStyle;\n }>;\n };\n\nconst getMessageType = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n lastAttachment: Attachment<StreamChatGenerics>,\n) => {\n let messageType;\n\n const isLastAttachmentFile = lastAttachment.type === 'file' || lastAttachment.type === 'audio';\n\n const isLastAttachmentVideo = lastAttachment.type === 'video';\n\n const isLastAttachmentGiphy = lastAttachment.type === 'giphy' || lastAttachment.type === 'imgur';\n\n const isLastAttachmentImageOrGiphy =\n lastAttachment.type === 'image' && !lastAttachment.title_link && !lastAttachment.og_scrape_url;\n\n const isLastAttachmentImage = lastAttachment.image_url || lastAttachment.thumb_url;\n\n if (isLastAttachmentFile) {\n messageType = 'file';\n } else if (isLastAttachmentVideo) {\n messageType = 'video';\n } else if (isLastAttachmentImageOrGiphy) {\n if (isLastAttachmentImage) messageType = 'image';\n else messageType = undefined;\n } else if (isLastAttachmentGiphy) messageType = 'giphy';\n else messageType = 'other';\n\n return messageType;\n};\n\nconst ReplyWithContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ReplyPropsWithContext<StreamChatGenerics>,\n) => {\n const {\n FileAttachmentIcon,\n attachmentSize = 40,\n MessageAvatar,\n quotedMessage,\n styles: stylesProp = {},\n t,\n } = props;\n\n const [error, setError] = useState(false);\n\n const {\n theme: {\n colors: { blue_alice, border, grey, transparent, white },\n messageSimple: {\n content: { deletedText },\n },\n reply: {\n container,\n fileAttachmentContainer,\n imageAttachment,\n markdownStyles,\n messageContainer,\n textContainer,\n },\n },\n } = useTheme();\n\n if (typeof quotedMessage === 'boolean') return null;\n\n const lastAttachment = quotedMessage.attachments?.slice(-1)[0] as Attachment<StreamChatGenerics>;\n const messageType = lastAttachment && getMessageType(lastAttachment);\n\n const hasImage =\n !error &&\n lastAttachment &&\n messageType !== 'file' &&\n (lastAttachment.image_url || lastAttachment.thumb_url || lastAttachment.og_scrape_url);\n\n const onlyEmojis = !lastAttachment && !!quotedMessage.text && emojiRegex.test(quotedMessage.text);\n\n return (\n <View style={[styles.container, container, stylesProp.container]}>\n <MessageAvatar alignment={'left'} lastGroupMessage message={quotedMessage} size={24} />\n <View\n style={[\n styles.messageContainer,\n {\n backgroundColor:\n messageType === 'other' ? blue_alice : messageType === 'giphy' ? transparent : white,\n borderColor: border,\n borderWidth: messageType === 'other' ? 0 : 1,\n },\n messageContainer,\n stylesProp.messageContainer,\n ]}\n >\n {!error && lastAttachment ? (\n messageType === 'file' ? (\n <View\n style={[\n styles.fileAttachmentContainer,\n fileAttachmentContainer,\n stylesProp.fileAttachmentContainer,\n ]}\n >\n <FileAttachmentIcon mimeType={lastAttachment.mime_type} size={attachmentSize} />\n </View>\n ) : hasImage ? (\n <Image\n onError={() => setError(true)}\n source={{\n uri: getResizedImageUrl({\n height:\n stylesProp.imageAttachment?.height ||\n imageAttachment?.height ||\n styles.imageAttachment.height,\n url: (lastAttachment.image_url ||\n lastAttachment.thumb_url ||\n lastAttachment.og_scrape_url) as string,\n width:\n stylesProp.imageAttachment?.width ||\n imageAttachment?.width ||\n styles.imageAttachment.width,\n }),\n }}\n style={[styles.imageAttachment, imageAttachment, stylesProp.imageAttachment]}\n />\n ) : null\n ) : null}\n {messageType === 'video' ? <VideoThumbnail style={[styles.videoAttachment]} /> : null}\n <MessageTextContainer<StreamChatGenerics>\n markdownStyles={\n quotedMessage.deleted_at\n ? merge({ em: { color: grey } }, deletedText)\n : { text: styles.text, ...markdownStyles }\n }\n message={{\n ...quotedMessage,\n text: quotedMessage.deleted_at\n ? `_${t('Message deleted')}_`\n : quotedMessage.text\n ? quotedMessage.text.length > 170\n ? `${quotedMessage.text.slice(0, 170)}...`\n : quotedMessage.text\n : messageType === 'image'\n ? t('Photo')\n : messageType === 'video'\n ? 'Video'\n : messageType === 'file'\n ? lastAttachment?.title || ''\n : '',\n }}\n onlyEmojis={onlyEmojis}\n styles={{\n textContainer: [\n {\n marginRight:\n hasImage || messageType === 'video'\n ? Number(\n stylesProp.imageAttachment?.height ||\n imageAttachment.height ||\n styles.imageAttachment.height,\n ) +\n Number(\n stylesProp.imageAttachment?.marginLeft ||\n imageAttachment.marginLeft ||\n styles.imageAttachment.marginLeft,\n )\n : messageType === 'file'\n ? attachmentSize +\n Number(\n stylesProp.fileAttachmentContainer?.paddingLeft ||\n fileAttachmentContainer.paddingLeft ||\n styles.fileAttachmentContainer.paddingLeft,\n )\n : undefined,\n },\n styles.textContainer,\n textContainer,\n stylesProp.textContainer,\n ],\n }}\n />\n </View>\n </View>\n );\n};\n\nconst areEqual = <StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics>(\n prevProps: ReplyPropsWithContext<StreamChatGenerics>,\n nextProps: ReplyPropsWithContext<StreamChatGenerics>,\n) => {\n const { quotedMessage: prevQuotedMessage } = prevProps;\n const { quotedMessage: nextQuotedMessage } = nextProps;\n\n const quotedMessageEqual =\n !!prevQuotedMessage &&\n !!nextQuotedMessage &&\n typeof prevQuotedMessage !== 'boolean' &&\n typeof nextQuotedMessage !== 'boolean'\n ? prevQuotedMessage.id === nextQuotedMessage.id &&\n prevQuotedMessage.deleted_at === nextQuotedMessage.deleted_at\n : !!prevQuotedMessage === !!nextQuotedMessage;\n\n if (!quotedMessageEqual) return false;\n\n return true;\n};\n\nconst MemoizedReply = React.memo(ReplyWithContext, areEqual) as typeof ReplyWithContext;\n\nexport type ReplyProps<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = Partial<ReplyPropsWithContext<StreamChatGenerics>>;\n\n/**\n * UI Component for reply\n */\nexport const Reply = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n props: ReplyProps<StreamChatGenerics>,\n) => {\n const { message } = useMessageContext<StreamChatGenerics>();\n\n const { FileAttachmentIcon = FileIconDefault, MessageAvatar = MessageAvatarDefault } =\n useMessagesContext<StreamChatGenerics>();\n\n const { editing, quotedMessage } = useMessageInputContext<StreamChatGenerics>();\n\n const quotedEditingMessage = (\n typeof editing !== 'boolean' ? editing?.quoted_message || false : false\n ) as MessageInputContextValue<StreamChatGenerics>['quotedMessage'];\n\n const { t } = useTranslationContext();\n\n return (\n <MemoizedReply\n {...{\n FileAttachmentIcon,\n MessageAvatar,\n quotedMessage: message\n ? (message.quoted_message as MessageInputContextValue<StreamChatGenerics>['quotedMessage'])\n : quotedMessage || quotedEditingMessage,\n t,\n }}\n {...props}\n />\n );\n};\n\nReply.displayName = 'Reply{reply}';\n"]}
@@ -31,8 +31,11 @@ var styles = _reactNative.StyleSheet.create({
31
31
  }
32
32
  });
33
33
 
34
- var Spinner = function Spinner() {
34
+ var Spinner = function Spinner(props) {
35
35
  var rotation = (0, _reactNativeReanimated.useSharedValue)(0);
36
+ var height = props.height,
37
+ style = props.style,
38
+ width = props.width;
36
39
 
37
40
  var _useTheme = (0, _ThemeContext.useTheme)(),
38
41
  _useTheme$theme = _useTheme.theme,
@@ -53,19 +56,24 @@ var Spinner = function Spinner() {
53
56
  }), -1);
54
57
  }, []);
55
58
  return _react["default"].createElement(_reactNativeReanimated["default"].View, {
56
- style: [styles.spinner, animatedStyle, spinner],
59
+ style: [style, styles.spinner, animatedStyle, spinner, {
60
+ height: height,
61
+ width: width
62
+ }],
57
63
  __self: _this,
58
64
  __source: {
59
65
  fileName: _jsxFileName,
60
- lineNumber: 52,
66
+ lineNumber: 59,
61
67
  columnNumber: 5
62
68
  }
63
69
  }, _react["default"].createElement(_Loading.Loading, {
70
+ height: height,
64
71
  stopColor: accent_blue,
72
+ width: width,
65
73
  __self: _this,
66
74
  __source: {
67
75
  fileName: _jsxFileName,
68
- lineNumber: 53,
76
+ lineNumber: 60,
69
77
  columnNumber: 7
70
78
  }
71
79
  }));
@@ -1 +1 @@
1
- {"version":3,"sources":["Spinner.tsx"],"names":["styles","StyleSheet","create","spinner","height","justifyContent","margin","width","Spinner","rotation","theme","accent_blue","colors","animatedStyle","transform","rotate","value","duration","easing","Easing","linear","displayName"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAQA;;AACA;;;;;;;;;AAEA,IAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,OAAO,EAAE;AACPC,IAAAA,MAAM,EAAE,EADD;AAEPC,IAAAA,cAAc,EAAE,QAFT;AAGPC,IAAAA,MAAM,EAAE,CAHD;AAIPC,IAAAA,KAAK,EAAE;AAJA;AADsB,CAAlB,CAAf;;AASO,IAAMC,OAAiB,GAAG,SAApBA,OAAoB,GAAM;AACrC,MAAMC,QAAQ,GAAG,2CAAe,CAAf,CAAjB;;AAEA,kBAKI,6BALJ;AAAA,kCACEC,KADF;AAAA,MAEcC,WAFd,mBAEIC,MAFJ,CAEcD,WAFd;AAAA,MAGIR,OAHJ,mBAGIA,OAHJ;;AAOA,MAAMU,aAAa,GAAG,6CAA4B;AAAA,WAAO;AACvDC,MAAAA,SAAS,EAAE,CACT;AACEC,QAAAA,MAAM,EAAKN,QAAQ,CAACO,KAAd;AADR,OADS;AAD4C,KAAP;AAAA,GAA5B,CAAtB;AAQA,wBAAU,YAAM;AACdP,IAAAA,QAAQ,CAACO,KAAT,GAAiB,uCACf,uCAAW,GAAX,EAAgB;AACdC,MAAAA,QAAQ,EAAE,GADI;AAEdC,MAAAA,MAAM,EAAEC,8BAAOC;AAFD,KAAhB,CADe,EAKf,CAAC,CALc,CAAjB;AAOD,GARD,EAQG,EARH;AAUA,SACE,gCAAC,iCAAD,CAAU,IAAV;AAAe,IAAA,KAAK,EAAE,CAACpB,MAAM,CAACG,OAAR,EAAiBU,aAAjB,EAAgCV,OAAhC,CAAtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACE,gCAAC,gBAAD;AAAS,IAAA,SAAS,EAAEQ,WAApB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADF,CADF;AAKD,CAjCM;;;AAmCPH,OAAO,CAACa,WAAR,GAAsB,kBAAtB","sourcesContent":["import React, { useEffect } from 'react';\nimport { StyleSheet, ViewStyle } from 'react-native';\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withTiming,\n} from 'react-native-reanimated';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { Loading } from '../../icons/Loading';\n\nconst styles = StyleSheet.create({\n spinner: {\n height: 16,\n justifyContent: 'center',\n margin: 5,\n width: 16,\n },\n});\n\nexport const Spinner: React.FC = () => {\n const rotation = useSharedValue(0);\n\n const {\n theme: {\n colors: { accent_blue },\n spinner,\n },\n } = useTheme();\n\n const animatedStyle = useAnimatedStyle<ViewStyle>(() => ({\n transform: [\n {\n rotate: `${rotation.value}deg`,\n },\n ],\n }));\n\n useEffect(() => {\n rotation.value = withRepeat(\n withTiming(360, {\n duration: 800,\n easing: Easing.linear,\n }),\n -1,\n );\n }, []);\n\n return (\n <Animated.View style={[styles.spinner, animatedStyle, spinner]}>\n <Loading stopColor={accent_blue} />\n </Animated.View>\n );\n};\n\nSpinner.displayName = 'Spinner{spinner}';\n"]}
1
+ {"version":3,"sources":["Spinner.tsx"],"names":["styles","StyleSheet","create","spinner","height","justifyContent","margin","width","Spinner","props","rotation","style","theme","accent_blue","colors","animatedStyle","transform","rotate","value","duration","easing","Easing","linear","displayName"],"mappings":";;;;;;;AAAA;;AACA;;AACA;;AAQA;;AACA;;;;;;;;;AAEA,IAAMA,MAAM,GAAGC,wBAAWC,MAAX,CAAkB;AAC/BC,EAAAA,OAAO,EAAE;AACPC,IAAAA,MAAM,EAAE,EADD;AAEPC,IAAAA,cAAc,EAAE,QAFT;AAGPC,IAAAA,MAAM,EAAE,CAHD;AAIPC,IAAAA,KAAK,EAAE;AAJA;AADsB,CAAlB,CAAf;;AAeO,IAAMC,OAA+B,GAAG,SAAlCA,OAAkC,CAACC,KAAD,EAAW;AACxD,MAAMC,QAAQ,GAAG,2CAAe,CAAf,CAAjB;AACA,MAAQN,MAAR,GAAiCK,KAAjC,CAAQL,MAAR;AAAA,MAAgBO,KAAhB,GAAiCF,KAAjC,CAAgBE,KAAhB;AAAA,MAAuBJ,KAAvB,GAAiCE,KAAjC,CAAuBF,KAAvB;;AAEA,kBAKI,6BALJ;AAAA,kCACEK,KADF;AAAA,MAEcC,WAFd,mBAEIC,MAFJ,CAEcD,WAFd;AAAA,MAGIV,OAHJ,mBAGIA,OAHJ;;AAOA,MAAMY,aAAa,GAAG,6CAA4B;AAAA,WAAO;AACvDC,MAAAA,SAAS,EAAE,CACT;AACEC,QAAAA,MAAM,EAAKP,QAAQ,CAACQ,KAAd;AADR,OADS;AAD4C,KAAP;AAAA,GAA5B,CAAtB;AAQA,wBAAU,YAAM;AACdR,IAAAA,QAAQ,CAACQ,KAAT,GAAiB,uCACf,uCAAW,GAAX,EAAgB;AACdC,MAAAA,QAAQ,EAAE,GADI;AAEdC,MAAAA,MAAM,EAAEC,8BAAOC;AAFD,KAAhB,CADe,EAKf,CAAC,CALc,CAAjB;AAOD,GARD,EAQG,EARH;AAUA,SACE,gCAAC,iCAAD,CAAU,IAAV;AAAe,IAAA,KAAK,EAAE,CAACX,KAAD,EAAQX,MAAM,CAACG,OAAf,EAAwBY,aAAxB,EAAuCZ,OAAvC,EAAgD;AAAEC,MAAAA,MAAM,EAANA,MAAF;AAAUG,MAAAA,KAAK,EAALA;AAAV,KAAhD,CAAtB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACE,gCAAC,gBAAD;AAAS,IAAA,MAAM,EAAEH,MAAjB;AAAyB,IAAA,SAAS,EAAES,WAApC;AAAiD,IAAA,KAAK,EAAEN,KAAxD;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,IADF,CADF;AAKD,CAlCM;;;AAoCPC,OAAO,CAACe,WAAR,GAAsB,kBAAtB","sourcesContent":["import React, { useEffect } from 'react';\nimport { StyleProp, StyleSheet, ViewStyle } from 'react-native';\nimport Animated, {\n Easing,\n useAnimatedStyle,\n useSharedValue,\n withRepeat,\n withTiming,\n} from 'react-native-reanimated';\n\nimport { useTheme } from '../../contexts/themeContext/ThemeContext';\nimport { Loading } from '../../icons/Loading';\n\nconst styles = StyleSheet.create({\n spinner: {\n height: 16,\n justifyContent: 'center',\n margin: 5,\n width: 16,\n },\n});\n\nexport type SpinnerProps = {\n height?: number;\n style?: StyleProp<ViewStyle>;\n width?: number;\n};\n\nexport const Spinner: React.FC<SpinnerProps> = (props) => {\n const rotation = useSharedValue(0);\n const { height, style, width } = props;\n\n const {\n theme: {\n colors: { accent_blue },\n spinner,\n },\n } = useTheme();\n\n const animatedStyle = useAnimatedStyle<ViewStyle>(() => ({\n transform: [\n {\n rotate: `${rotation.value}deg`,\n },\n ],\n }));\n\n useEffect(() => {\n rotation.value = withRepeat(\n withTiming(360, {\n duration: 800,\n easing: Easing.linear,\n }),\n -1,\n );\n }, []);\n\n return (\n <Animated.View style={[style, styles.spinner, animatedStyle, spinner, { height, width }]}>\n <Loading height={height} stopColor={accent_blue} width={width} />\n </Animated.View>\n );\n};\n\nSpinner.displayName = 'Spinner{spinner}';\n"]}
@@ -106,6 +106,19 @@ Object.keys(_Giphy).forEach(function (key) {
106
106
  });
107
107
  });
108
108
 
109
+ var _VideoThumbnail = require("./Attachment/VideoThumbnail");
110
+
111
+ Object.keys(_VideoThumbnail).forEach(function (key) {
112
+ if (key === "default" || key === "__esModule") return;
113
+ if (key in exports && exports[key] === _VideoThumbnail[key]) return;
114
+ Object.defineProperty(exports, key, {
115
+ enumerable: true,
116
+ get: function get() {
117
+ return _VideoThumbnail[key];
118
+ }
119
+ });
120
+ });
121
+
109
122
  var _buildGallery = require("./Attachment/utils/buildGallery/buildGallery");
110
123
 
111
124
  Object.keys(_buildGallery).forEach(function (key) {
@@ -886,6 +899,19 @@ Object.keys(_AnimatedGalleryImage).forEach(function (key) {
886
899
  });
887
900
  });
888
901
 
902
+ var _AnimatedGalleryVideo = require("./ImageGallery/components/AnimatedGalleryVideo");
903
+
904
+ Object.keys(_AnimatedGalleryVideo).forEach(function (key) {
905
+ if (key === "default" || key === "__esModule") return;
906
+ if (key in exports && exports[key] === _AnimatedGalleryVideo[key]) return;
907
+ Object.defineProperty(exports, key, {
908
+ enumerable: true,
909
+ get: function get() {
910
+ return _AnimatedGalleryVideo[key];
911
+ }
912
+ });
913
+ });
914
+
889
915
  var _ImageGalleryFooter = require("./ImageGallery/components/ImageGalleryFooter");
890
916
 
891
917
  Object.keys(_ImageGalleryFooter).forEach(function (key) {
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAA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;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './Attachment/Attachment';\nexport * from './Attachment/AttachmentActions';\nexport * from './Attachment/Card';\nexport * from './Attachment/FileAttachment';\nexport * from './Attachment/FileAttachmentGroup';\nexport * from './Attachment/FileIcon';\nexport * from './Attachment/Gallery';\nexport * from './Attachment/Giphy';\nexport * from './Attachment/utils/buildGallery/buildGallery';\n\nexport * from './AttachmentPicker/AttachmentPicker';\nexport * from './AttachmentPicker/components/AttachmentPickerBottomSheetHandle';\nexport * from './AttachmentPicker/components/AttachmentPickerError';\nexport * from './AttachmentPicker/components/AttachmentPickerErrorImage';\nexport * from './AttachmentPicker/components/AttachmentSelectionBar';\nexport * from './AttachmentPicker/components/CameraSelectorIcon';\nexport * from './AttachmentPicker/components/FileSelectorIcon';\nexport * from './AttachmentPicker/components/ImageOverlaySelectedComponent';\nexport * from './AttachmentPicker/components/ImageSelectorIcon';\n\nexport * from './AutoCompleteInput/AutoCompleteInput';\nexport * from './AutoCompleteInput/AutoCompleteSuggestionHeader';\nexport * from './AutoCompleteInput/AutoCompleteSuggestionItem';\nexport * from './AutoCompleteInput/AutoCompleteSuggestionList';\n\nexport * from './Avatar/Avatar';\nexport * from './Avatar/GroupAvatar';\n\nexport * from './Channel/Channel';\nexport * from './Channel/hooks/useCreateChannelContext';\nexport * from './Channel/hooks/useCreateInputMessageInputContext';\nexport * from './Channel/hooks/useCreateMessagesContext';\nexport * from './Channel/hooks/useCreatePaginatedMessageListContext';\nexport * from './Channel/hooks/useCreateThreadContext';\nexport * from './Channel/hooks/useCreateTypingContext';\nexport * from './Channel/hooks/useTargetedMessage';\n\nexport * from './ChannelList/ChannelList';\nexport * from './ChannelList/ChannelListFooterLoadingIndicator';\nexport * from './ChannelList/ChannelListHeaderErrorIndicator';\nexport * from './ChannelList/ChannelListHeaderNetworkDownIndicator';\nexport * from './ChannelList/ChannelListLoadingIndicator';\nexport * from './ChannelList/ChannelListMessenger';\nexport * from './ChannelList/hooks/listeners/useAddedToChannelNotification';\nexport * from './ChannelList/hooks/listeners/useChannelDeleted';\nexport * from './ChannelList/hooks/listeners/useChannelHidden';\nexport * from './ChannelList/hooks/listeners/useChannelTruncated';\nexport * from './ChannelList/hooks/listeners/useChannelUpdated';\nexport * from './ChannelList/hooks/listeners/useConnectionRecovered';\nexport * from './ChannelList/hooks/listeners/useNewMessage';\nexport * from './ChannelList/hooks/listeners/useNewMessageNotification';\nexport * from './ChannelList/hooks/listeners/useRemovedFromChannelNotification';\nexport * from './ChannelList/hooks/listeners/useUserPresence';\nexport * from './ChannelList/hooks/useCreateChannelsContext';\nexport * from './ChannelList/hooks/usePaginatedChannels';\nexport * from './ChannelList/Skeleton';\n\nexport * from './ChannelPreview/ChannelAvatar';\nexport * from './ChannelPreview/ChannelPreview';\nexport * from './ChannelPreview/ChannelPreviewMessenger';\nexport * from './ChannelPreview/ChannelPreviewMessage';\nexport * from './ChannelPreview/ChannelPreviewStatus';\nexport * from './ChannelPreview/ChannelPreviewTitle';\nexport * from './ChannelPreview/ChannelPreviewUnreadCount';\nexport * from './ChannelPreview/hooks/useChannelPreviewDisplayAvatar';\nexport * from './ChannelPreview/hooks/useChannelPreviewDisplayName';\nexport * from './ChannelPreview/hooks/useChannelPreviewDisplayPresence';\nexport * from './ChannelPreview/hooks/useLatestMessagePreview';\n\nexport * from './Chat/Chat';\nexport * from './Chat/hooks/useCreateChatContext';\nexport * from './Chat/hooks/useIsOnline';\nexport * from './Chat/hooks/useMutedUsers';\n\nexport * from './ImageGallery/ImageGallery';\nexport * from './ImageGallery/components/AnimatedGalleryImage';\nexport * from './ImageGallery/components/ImageGalleryFooter';\nexport * from './ImageGallery/components/ImageGalleryHeader';\nexport * from './ImageGallery/components/ImageGalleryOverlay';\nexport * from './ImageGallery/components/ImageGrid';\nexport * from './ImageGallery/components/ImageGridHandle';\n\nexport * from './Indicators/EmptyStateIndicator';\nexport * from './Indicators/LoadingDot';\nexport * from './Indicators/LoadingDots';\nexport * from './Indicators/LoadingErrorIndicator';\nexport * from './Indicators/LoadingIndicator';\n\nexport * from './KeyboardCompatibleView/KeyboardCompatibleView';\n\nexport * from './Message/hooks/useCreateMessageContext';\nexport * from './Message/hooks/useMessageActions';\nexport * from './Message/hooks/useMessageActionHandlers';\nexport * from './Message/Message';\nexport * from './Message/MessageSimple/MessageAvatar';\nexport * from './Message/MessageSimple/MessageContent';\nexport * from './Message/MessageSimple/MessageDeleted';\nexport * from './Message/MessageSimple/MessageFooter';\nexport * from './Message/MessageSimple/MessagePinnedHeader';\nexport * from './Message/MessageSimple/MessageReplies';\nexport * from './Message/MessageSimple/MessageRepliesAvatars';\nexport * from './Message/MessageSimple/MessageSimple';\nexport * from './Message/MessageSimple/MessageStatus';\nexport * from './Message/MessageSimple/MessageTextContainer';\nexport * from './Message/MessageSimple/ReactionList';\nexport * from './Message/MessageSimple/utils/renderText';\nexport * from './Message/utils/messageActions';\nexport * from './Message/utils/removeReservedFields';\n\nexport * from './MessageInput/AttachButton';\nexport * from './MessageInput/CommandsButton';\nexport * from './MessageInput/CooldownTimer';\nexport * from './MessageInput/FileUploadPreview';\nexport * from './MessageInput/ImageUploadPreview';\nexport * from './MessageInput/InputButtons';\nexport * from './MessageInput/MessageInput';\nexport * from './MessageInput/MoreOptionsButton';\nexport * from './MessageInput/SendButton';\nexport * from './MessageInput/ShowThreadMessageInChannelButton';\nexport * from './MessageInput/UploadProgressIndicator';\n\nexport * from './MessageList/DateHeader';\nexport * from './MessageList/hooks/useMessageList';\nexport * from './MessageList/hooks/useTypingString';\nexport * from './MessageList/InlineDateSeparator';\nexport * from './MessageList/InlineLoadingMoreIndicator';\nexport * from './MessageList/InlineLoadingMoreRecentIndicator';\nexport * from './MessageList/InlineLoadingMoreThreadIndicator';\nexport * from './MessageList/InlineUnreadIndicator';\nexport * from './MessageList/MessageList';\nexport * from './MessageList/MessageSystem';\nexport * from './MessageList/NetworkDownIndicator';\nexport * from './MessageList/ScrollToBottomButton';\nexport * from './MessageList/TypingIndicator';\nexport * from './MessageList/TypingIndicatorContainer';\nexport * from './MessageList/utils/getDateSeparators';\nexport * from './MessageList/utils/getGroupStyles';\nexport * from './MessageList/utils/getLastReceivedMessage';\nexport * from './MessageList/utils/getReadStates';\n\nexport * from './MessageOverlay/hooks/useMessageActionAnimation';\nexport * from './MessageOverlay/MessageActionList';\nexport * from './MessageOverlay/MessageActionListItem';\nexport * from './MessageOverlay/MessageOverlay';\nexport * from './MessageOverlay/OverlayBackdrop';\nexport * from './MessageOverlay/OverlayReactions';\nexport * from './MessageOverlay/OverlayReactionsAvatar';\nexport * from './MessageOverlay/OverlayReactionList';\n\nexport * from './Reply/Reply';\n\nexport * from './Spinner/Spinner';\n\nexport * from './Thread/Thread';\nexport * from './Thread/components/ThreadFooterComponent';\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;A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AA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA","sourcesContent":["export * from './Attachment/Attachment';\nexport * from './Attachment/AttachmentActions';\nexport * from './Attachment/Card';\nexport * from './Attachment/FileAttachment';\nexport * from './Attachment/FileAttachmentGroup';\nexport * from './Attachment/FileIcon';\nexport * from './Attachment/Gallery';\nexport * from './Attachment/Giphy';\nexport * from './Attachment/VideoThumbnail';\nexport * from './Attachment/utils/buildGallery/buildGallery';\n\nexport * from './AttachmentPicker/AttachmentPicker';\nexport * from './AttachmentPicker/components/AttachmentPickerBottomSheetHandle';\nexport * from './AttachmentPicker/components/AttachmentPickerError';\nexport * from './AttachmentPicker/components/AttachmentPickerErrorImage';\nexport * from './AttachmentPicker/components/AttachmentSelectionBar';\nexport * from './AttachmentPicker/components/CameraSelectorIcon';\nexport * from './AttachmentPicker/components/FileSelectorIcon';\nexport * from './AttachmentPicker/components/ImageOverlaySelectedComponent';\nexport * from './AttachmentPicker/components/ImageSelectorIcon';\n\nexport * from './AutoCompleteInput/AutoCompleteInput';\nexport * from './AutoCompleteInput/AutoCompleteSuggestionHeader';\nexport * from './AutoCompleteInput/AutoCompleteSuggestionItem';\nexport * from './AutoCompleteInput/AutoCompleteSuggestionList';\n\nexport * from './Avatar/Avatar';\nexport * from './Avatar/GroupAvatar';\n\nexport * from './Channel/Channel';\nexport * from './Channel/hooks/useCreateChannelContext';\nexport * from './Channel/hooks/useCreateInputMessageInputContext';\nexport * from './Channel/hooks/useCreateMessagesContext';\nexport * from './Channel/hooks/useCreatePaginatedMessageListContext';\nexport * from './Channel/hooks/useCreateThreadContext';\nexport * from './Channel/hooks/useCreateTypingContext';\nexport * from './Channel/hooks/useTargetedMessage';\n\nexport * from './ChannelList/ChannelList';\nexport * from './ChannelList/ChannelListFooterLoadingIndicator';\nexport * from './ChannelList/ChannelListHeaderErrorIndicator';\nexport * from './ChannelList/ChannelListHeaderNetworkDownIndicator';\nexport * from './ChannelList/ChannelListLoadingIndicator';\nexport * from './ChannelList/ChannelListMessenger';\nexport * from './ChannelList/hooks/listeners/useAddedToChannelNotification';\nexport * from './ChannelList/hooks/listeners/useChannelDeleted';\nexport * from './ChannelList/hooks/listeners/useChannelHidden';\nexport * from './ChannelList/hooks/listeners/useChannelTruncated';\nexport * from './ChannelList/hooks/listeners/useChannelUpdated';\nexport * from './ChannelList/hooks/listeners/useConnectionRecovered';\nexport * from './ChannelList/hooks/listeners/useNewMessage';\nexport * from './ChannelList/hooks/listeners/useNewMessageNotification';\nexport * from './ChannelList/hooks/listeners/useRemovedFromChannelNotification';\nexport * from './ChannelList/hooks/listeners/useUserPresence';\nexport * from './ChannelList/hooks/useCreateChannelsContext';\nexport * from './ChannelList/hooks/usePaginatedChannels';\nexport * from './ChannelList/Skeleton';\n\nexport * from './ChannelPreview/ChannelAvatar';\nexport * from './ChannelPreview/ChannelPreview';\nexport * from './ChannelPreview/ChannelPreviewMessenger';\nexport * from './ChannelPreview/ChannelPreviewMessage';\nexport * from './ChannelPreview/ChannelPreviewStatus';\nexport * from './ChannelPreview/ChannelPreviewTitle';\nexport * from './ChannelPreview/ChannelPreviewUnreadCount';\nexport * from './ChannelPreview/hooks/useChannelPreviewDisplayAvatar';\nexport * from './ChannelPreview/hooks/useChannelPreviewDisplayName';\nexport * from './ChannelPreview/hooks/useChannelPreviewDisplayPresence';\nexport * from './ChannelPreview/hooks/useLatestMessagePreview';\n\nexport * from './Chat/Chat';\nexport * from './Chat/hooks/useCreateChatContext';\nexport * from './Chat/hooks/useIsOnline';\nexport * from './Chat/hooks/useMutedUsers';\n\nexport * from './ImageGallery/ImageGallery';\nexport * from './ImageGallery/components/AnimatedGalleryImage';\nexport * from './ImageGallery/components/AnimatedGalleryVideo';\nexport * from './ImageGallery/components/ImageGalleryFooter';\nexport * from './ImageGallery/components/ImageGalleryHeader';\nexport * from './ImageGallery/components/ImageGalleryOverlay';\nexport * from './ImageGallery/components/ImageGrid';\nexport * from './ImageGallery/components/ImageGridHandle';\n\nexport * from './Indicators/EmptyStateIndicator';\nexport * from './Indicators/LoadingDot';\nexport * from './Indicators/LoadingDots';\nexport * from './Indicators/LoadingErrorIndicator';\nexport * from './Indicators/LoadingIndicator';\n\nexport * from './KeyboardCompatibleView/KeyboardCompatibleView';\n\nexport * from './Message/hooks/useCreateMessageContext';\nexport * from './Message/hooks/useMessageActions';\nexport * from './Message/hooks/useMessageActionHandlers';\nexport * from './Message/Message';\nexport * from './Message/MessageSimple/MessageAvatar';\nexport * from './Message/MessageSimple/MessageContent';\nexport * from './Message/MessageSimple/MessageDeleted';\nexport * from './Message/MessageSimple/MessageFooter';\nexport * from './Message/MessageSimple/MessagePinnedHeader';\nexport * from './Message/MessageSimple/MessageReplies';\nexport * from './Message/MessageSimple/MessageRepliesAvatars';\nexport * from './Message/MessageSimple/MessageSimple';\nexport * from './Message/MessageSimple/MessageStatus';\nexport * from './Message/MessageSimple/MessageTextContainer';\nexport * from './Message/MessageSimple/ReactionList';\nexport * from './Message/MessageSimple/utils/renderText';\nexport * from './Message/utils/messageActions';\nexport * from './Message/utils/removeReservedFields';\n\nexport * from './MessageInput/AttachButton';\nexport * from './MessageInput/CommandsButton';\nexport * from './MessageInput/CooldownTimer';\nexport * from './MessageInput/FileUploadPreview';\nexport * from './MessageInput/ImageUploadPreview';\nexport * from './MessageInput/InputButtons';\nexport * from './MessageInput/MessageInput';\nexport * from './MessageInput/MoreOptionsButton';\nexport * from './MessageInput/SendButton';\nexport * from './MessageInput/ShowThreadMessageInChannelButton';\nexport * from './MessageInput/UploadProgressIndicator';\n\nexport * from './MessageList/DateHeader';\nexport * from './MessageList/hooks/useMessageList';\nexport * from './MessageList/hooks/useTypingString';\nexport * from './MessageList/InlineDateSeparator';\nexport * from './MessageList/InlineLoadingMoreIndicator';\nexport * from './MessageList/InlineLoadingMoreRecentIndicator';\nexport * from './MessageList/InlineLoadingMoreThreadIndicator';\nexport * from './MessageList/InlineUnreadIndicator';\nexport * from './MessageList/MessageList';\nexport * from './MessageList/MessageSystem';\nexport * from './MessageList/NetworkDownIndicator';\nexport * from './MessageList/ScrollToBottomButton';\nexport * from './MessageList/TypingIndicator';\nexport * from './MessageList/TypingIndicatorContainer';\nexport * from './MessageList/utils/getDateSeparators';\nexport * from './MessageList/utils/getGroupStyles';\nexport * from './MessageList/utils/getLastReceivedMessage';\nexport * from './MessageList/utils/getReadStates';\n\nexport * from './MessageOverlay/hooks/useMessageActionAnimation';\nexport * from './MessageOverlay/MessageActionList';\nexport * from './MessageOverlay/MessageActionListItem';\nexport * from './MessageOverlay/MessageOverlay';\nexport * from './MessageOverlay/OverlayBackdrop';\nexport * from './MessageOverlay/OverlayReactions';\nexport * from './MessageOverlay/OverlayReactionsAvatar';\nexport * from './MessageOverlay/OverlayReactionList';\n\nexport * from './Reply/Reply';\n\nexport * from './Spinner/Spinner';\n\nexport * from './Thread/Thread';\nexport * from './Thread/components/ThreadFooterComponent';\n"]}
@@ -32,7 +32,7 @@ var MessageProvider = function MessageProvider(_ref) {
32
32
  __self: _this,
33
33
  __source: {
34
34
  fileName: _jsxFileName,
35
- lineNumber: 113,
35
+ lineNumber: 115,
36
36
  columnNumber: 3
37
37
  }
38
38
  }, children);
@@ -53,7 +53,7 @@ var withMessageContext = function withMessageContext(Component) {
53
53
  __self: _this,
54
54
  __source: {
55
55
  fileName: _jsxFileName,
56
- lineNumber: 138,
56
+ lineNumber: 140,
57
57
  columnNumber: 12
58
58
  }
59
59
  }));
@@ -1 +1 @@
1
- {"version":3,"sources":["MessageContext.tsx"],"names":["MessageContext","React","createContext","MessageProvider","children","value","useMessageContext","withMessageContext","Component","WithMessageContextComponent","props","messageContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAaA;;;;;;;;;AAyFO,IAAMA,cAAc,GAAGC,kBAAMC,aAAN,CAAoB,EAApB,CAAvB;;;;AAEA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,MAG7BC,QAH6B,QAG7BA,QAH6B;AAAA,MAI7BC,KAJ6B,QAI7BA,KAJ6B;AAAA,SAQ7B,gCAAC,cAAD,CAAgB,QAAhB;AAAyB,IAAA,KAAK,EAAEA,KAAhC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACGD,QADH,CAR6B;AAAA,CAAxB;;;;AAaA,IAAME,iBAAiB,GAAG,SAApBA,iBAAoB;AAAA,SAE1B,uBAAWN,cAAX,CAF0B;AAAA,CAA1B;;;;AASA,IAAMO,kBAAkB,GAAG,SAArBA,kBAAqB,CAIhCC,SAJgC,EAKqC;AACrE,MAAMC,2BAA2B,GAAG,SAA9BA,2BAA8B,CAClCC,KADkC,EAE/B;AACH,QAAMC,cAAc,GAAGL,iBAAiB,EAAxC;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,cAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,2BAA2B,CAACG,WAA5B,0BAA+D,oCAAeJ,SAAf,CAA/D;AACA,SAAOC,2BAAP;AACD,CAfM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { Attachment } from 'stream-chat';\n\nimport type { ActionHandler } from '../../components/Attachment/Attachment';\nimport type {\n MessageTouchableHandlerPayload,\n TouchableHandlerPayload,\n} from '../../components/Message/Message';\nimport type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { ChannelContextValue } from '../../contexts/channelContext/ChannelContext';\nimport type { MessageContentType } from '../../contexts/messagesContext/MessagesContext';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport { getDisplayName } from '../utils/getDisplayName';\n\nexport type Alignment = 'right' | 'left';\n\nexport type Reactions = {\n own: boolean;\n type: string;\n}[];\n\nexport type MessageContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /** Whether or not actions can be performed on message */\n actionsEnabled: boolean;\n /** Position of the message, either 'right' or 'left' */\n alignment: Alignment;\n /** The files attached to a message */\n files: Attachment<StreamChatGenerics>[];\n /**\n * Position of message in group - top, bottom, middle, single.\n *\n * Message group is a group of consecutive messages from same user. groupStyles can be used to style message as per their position in message group\n * e.g., user avatar (to which message belongs to) is only showed for last (bottom) message in group.\n */\n groupStyles: GroupType[];\n /** Handler for actions. Actions in combination with attachments can be used to build [commands](https://getstream.io/chat/docs/#channel_commands). */\n handleAction: ActionHandler;\n handleDeleteMessage: () => Promise<void>;\n handleEditMessage: () => void;\n handleQuotedReplyMessage: () => void;\n handleResendMessage: () => Promise<void>;\n handleToggleBanUser: () => Promise<void>;\n handleToggleMuteUser: () => Promise<void>;\n handleToggleReaction: (reactionType: string) => Promise<void>;\n /** Whether or not message has reactions */\n hasReactions: boolean;\n /** The images attached to a message */\n images: Attachment<StreamChatGenerics>[];\n /** Whether or not this is the active user's message */\n isMyMessage: boolean;\n /** Whether or not this is the last message in a group of messages */\n lastGroupMessage: boolean;\n /** Current [message object](https://getstream.io/chat/docs/#message_format) */\n message: MessageType<StreamChatGenerics>;\n /** Order to render the message content */\n messageContentOrder: MessageContentType[];\n /**\n * You can call methods available on the Message\n * component such as handleEdit, handleDelete, handleAction etc.\n *\n * Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/Message.tsx)\n *\n * By default, we show the overlay with all the message actions on long press.\n *\n * @param payload Payload object for onLongPress event\n */\n onLongPress: (payload: TouchableHandlerPayload) => void;\n /** Whether the message is only text and the text is only emojis */\n onlyEmojis: boolean;\n /** Handler to open a thread on a message */\n onOpenThread: () => void;\n /**\n * You can call methods available on the Message\n * component such as handleEdit, handleDelete, handleAction etc.\n *\n * Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/Message.tsx)\n *\n * By default, we will dismiss the keyboard on press.\n *\n * @param payload Payload object for onPress event\n */\n onPress: (payload: MessageTouchableHandlerPayload) => void;\n onPressIn: ((payload: TouchableHandlerPayload) => void) | null;\n /** The images attached to a message */\n otherAttachments: Attachment<StreamChatGenerics>[];\n reactions: Reactions;\n showMessageOverlay: (messageReactions?: boolean) => void;\n showMessageStatus: boolean;\n /** Whether or not the Message is part of a Thread */\n threadList: boolean;\n goToMessage?: (messageId: string) => void;\n /** Latest message id on current channel */\n lastReceivedId?: string;\n /** Prevent message being pressed for image viewer view */\n preventPress?: boolean;\n /** Whether or not the avatar show show next to Message */\n showAvatar?: boolean;\n} & Pick<ChannelContextValue<StreamChatGenerics>, 'channel' | 'disabled' | 'members'>;\n\nexport const MessageContext = React.createContext({} as MessageContextValue);\n\nexport const MessageProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessageContextValue<StreamChatGenerics>;\n}>) => (\n <MessageContext.Provider value={value as unknown as MessageContextValue}>\n {children}\n </MessageContext.Provider>\n);\n\nexport const useMessageContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => useContext(MessageContext) as unknown as MessageContextValue<StreamChatGenerics>;\n\n/**\n * Typescript currently does not support partial inference so if MessageContext\n * typing is desired while using the HOC withMessageContextContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessageContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessageContextValue<StreamChatGenerics>>> => {\n const WithMessageContextComponent = (\n props: Omit<P, keyof MessageContextValue<StreamChatGenerics>>,\n ) => {\n const messageContext = useMessageContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messageContext} />;\n };\n WithMessageContextComponent.displayName = `WithMessageContext${getDisplayName(Component)}`;\n return WithMessageContextComponent;\n};\n"]}
1
+ {"version":3,"sources":["MessageContext.tsx"],"names":["MessageContext","React","createContext","MessageProvider","children","value","useMessageContext","withMessageContext","Component","WithMessageContextComponent","props","messageContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAaA;;;;;;;;;AA2FO,IAAMA,cAAc,GAAGC,kBAAMC,aAAN,CAAoB,EAApB,CAAvB;;;;AAEA,IAAMC,eAAe,GAAG,SAAlBA,eAAkB;AAAA,MAG7BC,QAH6B,QAG7BA,QAH6B;AAAA,MAI7BC,KAJ6B,QAI7BA,KAJ6B;AAAA,SAQ7B,gCAAC,cAAD,CAAgB,QAAhB;AAAyB,IAAA,KAAK,EAAEA,KAAhC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACGD,QADH,CAR6B;AAAA,CAAxB;;;;AAaA,IAAME,iBAAiB,GAAG,SAApBA,iBAAoB;AAAA,SAE1B,uBAAWN,cAAX,CAF0B;AAAA,CAA1B;;;;AASA,IAAMO,kBAAkB,GAAG,SAArBA,kBAAqB,CAIhCC,SAJgC,EAKqC;AACrE,MAAMC,2BAA2B,GAAG,SAA9BA,2BAA8B,CAClCC,KADkC,EAE/B;AACH,QAAMC,cAAc,GAAGL,iBAAiB,EAAxC;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,cAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,2BAA2B,CAACG,WAA5B,0BAA+D,oCAAeJ,SAAf,CAA/D;AACA,SAAOC,2BAAP;AACD,CAfM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { Attachment } from 'stream-chat';\n\nimport type { ActionHandler } from '../../components/Attachment/Attachment';\nimport type {\n MessageTouchableHandlerPayload,\n TouchableHandlerPayload,\n} from '../../components/Message/Message';\nimport type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { ChannelContextValue } from '../../contexts/channelContext/ChannelContext';\nimport type { MessageContentType } from '../../contexts/messagesContext/MessagesContext';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport { getDisplayName } from '../utils/getDisplayName';\n\nexport type Alignment = 'right' | 'left';\n\nexport type Reactions = {\n own: boolean;\n type: string;\n}[];\n\nexport type MessageContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /** Whether or not actions can be performed on message */\n actionsEnabled: boolean;\n /** Position of the message, either 'right' or 'left' */\n alignment: Alignment;\n /** The files attached to a message */\n files: Attachment<StreamChatGenerics>[];\n /**\n * Position of message in group - top, bottom, middle, single.\n *\n * Message group is a group of consecutive messages from same user. groupStyles can be used to style message as per their position in message group\n * e.g., user avatar (to which message belongs to) is only showed for last (bottom) message in group.\n */\n groupStyles: GroupType[];\n /** Handler for actions. Actions in combination with attachments can be used to build [commands](https://getstream.io/chat/docs/#channel_commands). */\n handleAction: ActionHandler;\n handleDeleteMessage: () => Promise<void>;\n handleEditMessage: () => void;\n handleQuotedReplyMessage: () => void;\n handleResendMessage: () => Promise<void>;\n handleToggleBanUser: () => Promise<void>;\n handleToggleMuteUser: () => Promise<void>;\n handleToggleReaction: (reactionType: string) => Promise<void>;\n /** Whether or not message has reactions */\n hasReactions: boolean;\n /** The images attached to a message */\n images: Attachment<StreamChatGenerics>[];\n /** Whether or not this is the active user's message */\n isMyMessage: boolean;\n /** Whether or not this is the last message in a group of messages */\n lastGroupMessage: boolean;\n /** Current [message object](https://getstream.io/chat/docs/#message_format) */\n message: MessageType<StreamChatGenerics>;\n /** Order to render the message content */\n messageContentOrder: MessageContentType[];\n /**\n * You can call methods available on the Message\n * component such as handleEdit, handleDelete, handleAction etc.\n *\n * Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/Message.tsx)\n *\n * By default, we show the overlay with all the message actions on long press.\n *\n * @param payload Payload object for onLongPress event\n */\n onLongPress: (payload: TouchableHandlerPayload) => void;\n /** Whether the message is only text and the text is only emojis */\n onlyEmojis: boolean;\n /** Handler to open a thread on a message */\n onOpenThread: () => void;\n /**\n * You can call methods available on the Message\n * component such as handleEdit, handleDelete, handleAction etc.\n *\n * Source - [Message](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/Message.tsx)\n *\n * By default, we will dismiss the keyboard on press.\n *\n * @param payload Payload object for onPress event\n */\n onPress: (payload: MessageTouchableHandlerPayload) => void;\n onPressIn: ((payload: TouchableHandlerPayload) => void) | null;\n /** The images attached to a message */\n otherAttachments: Attachment<StreamChatGenerics>[];\n reactions: Reactions;\n showMessageOverlay: (messageReactions?: boolean) => void;\n showMessageStatus: boolean;\n /** Whether or not the Message is part of a Thread */\n threadList: boolean;\n /** The videos attached to a message */\n videos: Attachment<StreamChatGenerics>[];\n goToMessage?: (messageId: string) => void;\n /** Latest message id on current channel */\n lastReceivedId?: string;\n /** Prevent message being pressed for image viewer view */\n preventPress?: boolean;\n /** Whether or not the avatar show show next to Message */\n showAvatar?: boolean;\n} & Pick<ChannelContextValue<StreamChatGenerics>, 'channel' | 'disabled' | 'members'>;\n\nexport const MessageContext = React.createContext({} as MessageContextValue);\n\nexport const MessageProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessageContextValue<StreamChatGenerics>;\n}>) => (\n <MessageContext.Provider value={value as unknown as MessageContextValue}>\n {children}\n </MessageContext.Provider>\n);\n\nexport const useMessageContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => useContext(MessageContext) as unknown as MessageContextValue<StreamChatGenerics>;\n\n/**\n * Typescript currently does not support partial inference so if MessageContext\n * typing is desired while using the HOC withMessageContextContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessageContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessageContextValue<StreamChatGenerics>>> => {\n const WithMessageContextComponent = (\n props: Omit<P, keyof MessageContextValue<StreamChatGenerics>>,\n ) => {\n const messageContext = useMessageContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messageContext} />;\n };\n WithMessageContextComponent.displayName = `WithMessageContext${getDisplayName(Component)}`;\n return WithMessageContextComponent;\n};\n"]}
@@ -35,7 +35,7 @@ var MessageOverlayProvider = function MessageOverlayProvider(_ref) {
35
35
  __self: _this,
36
36
  __source: {
37
37
  fileName: _jsxFileName,
38
- lineNumber: 85,
38
+ lineNumber: 86,
39
39
  columnNumber: 5
40
40
  }
41
41
  }, children);
@@ -56,7 +56,7 @@ var withMessageOverlayContext = function withMessageOverlayContext(Component) {
56
56
  __self: _this,
57
57
  __source: {
58
58
  fileName: _jsxFileName,
59
- lineNumber: 112,
59
+ lineNumber: 113,
60
60
  columnNumber: 12
61
61
  }
62
62
  }));
@@ -1 +1 @@
1
- {"version":3,"sources":["MessageOverlayContext.tsx"],"names":["MessageOverlayContext","React","createContext","MessageOverlayProvider","children","value","messageOverlayContext","useMessageOverlayContext","withMessageOverlayContext","Component","WithMessageOverlayContextComponent","props","messageContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAIA;;AAgBA;;;;;;;;;AAoDO,IAAMA,qBAAqB,GAAGC,kBAAMC,aAAN,CAAoB,EAApB,CAA9B;;;;AAEA,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAyB,OAO/B;AAAA,MAJLC,QAIK,QAJLA,QAIK;AAAA,MAHLC,KAGK,QAHLA,KAGK;AACL,MAAMC,qBAAqB,GAAG,4CAAmBD,KAAnB,CAA9B;AACA,SACE,gCAAC,qBAAD,CAAuB,QAAvB;AAAgC,IAAA,KAAK,EAAEC,qBAAvC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACGF,QADH,CADF;AAKD,CAdM;;;;AAgBA,IAAMG,wBAAwB,GAAG,SAA3BA,wBAA2B;AAAA,SAGtC,uBAAWP,qBAAX,CAHsC;AAAA,CAAjC;;;;AAUA,IAAMQ,yBAAyB,GAAG,SAA5BA,yBAA4B,CAIvCC,SAJuC,EAKqC;AAC5E,MAAMC,kCAAkC,GAAG,SAArCA,kCAAqC,CACzCC,KADyC,EAEtC;AACH,QAAMC,cAAc,GAAGL,wBAAwB,EAA/C;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,cAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,kCAAkC,CAACG,WAAnC,iCAA6E,oCAC3EJ,SAD2E,CAA7E;AAGA,SAAOC,kCAAP;AACD,CAjBM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { Attachment } from 'stream-chat';\n\nimport { useResettableState } from './hooks/useResettableState';\n\nimport type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { MessageActionListProps } from '../../components/MessageOverlay/MessageActionList';\nimport type {\n MessageActionListItemProps,\n MessageActionType,\n} from '../../components/MessageOverlay/MessageActionListItem';\nimport type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';\nimport type { OverlayReactionsProps } from '../../components/MessageOverlay/OverlayReactions';\nimport type { OverlayReactionsAvatarProps } from '../../components/MessageOverlay/OverlayReactionsAvatar';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport type { ReactionData } from '../../utils/utils';\nimport type { Alignment, MessageContextValue } from '../messageContext/MessageContext';\nimport type { MessagesContextValue } from '../messagesContext/MessagesContext';\nimport type { OwnCapabilitiesContextValue } from '../ownCapabilitiesContext/OwnCapabilitiesContext';\nimport { getDisplayName } from '../utils/getDisplayName';\n\nexport type MessageOverlayData<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n alignment?: Alignment;\n clientId?: string;\n files?: Attachment<StreamChatGenerics>[];\n groupStyles?: GroupType[];\n handleReaction?: (reactionType: string) => Promise<void>;\n images?: Attachment<StreamChatGenerics>[];\n message?: MessageType<StreamChatGenerics>;\n messageActions?: MessageActionType[];\n messageContext?: MessageContextValue<StreamChatGenerics>;\n messageReactionTitle?: string;\n messagesContext?: MessagesContextValue<StreamChatGenerics>;\n onlyEmojis?: boolean;\n otherAttachments?: Attachment<StreamChatGenerics>[];\n OverlayReactionList?: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n ownCapabilities?: OwnCapabilitiesContextValue;\n supportedReactions?: ReactionData[];\n threadList?: boolean;\n};\n\nexport type MessageOverlayContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * Custom UI component for rendering [message actions](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png) in overlay.\n *\n * **Default** [MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/MessageActions.tsx)\n */\n MessageActionList: React.ComponentType<MessageActionListProps<StreamChatGenerics>>;\n MessageActionListItem: React.ComponentType<MessageActionListItemProps<StreamChatGenerics>>;\n /**\n * Custom UI component for rendering [reaction selector](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png) in overlay (which shows up on long press on message).\n *\n * **Default** [OverlayReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/OverlayReactionList.tsx)\n */\n OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n /**\n * Custom UI component for rendering [reactions list](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png), in overlay (which shows up on long press on message).\n *\n * **Default** [OverlayReactions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/OverlayReactions.tsx)\n */\n OverlayReactions: React.ComponentType<OverlayReactionsProps<StreamChatGenerics>>;\n OverlayReactionsAvatar: React.ComponentType<OverlayReactionsAvatarProps>;\n reset: () => void;\n setData: React.Dispatch<React.SetStateAction<MessageOverlayData<StreamChatGenerics>>>;\n data?: MessageOverlayData<StreamChatGenerics>;\n};\n\nexport const MessageOverlayContext = React.createContext({} as MessageOverlayContextValue);\n\nexport const MessageOverlayProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessageOverlayContextValue<StreamChatGenerics>;\n}>) => {\n const messageOverlayContext = useResettableState(value);\n return (\n <MessageOverlayContext.Provider value={messageOverlayContext as MessageOverlayContextValue}>\n {children}\n </MessageOverlayContext.Provider>\n );\n};\n\nexport const useMessageOverlayContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() =>\n useContext(MessageOverlayContext) as unknown as MessageOverlayContextValue<StreamChatGenerics>;\n\n/**\n * Typescript currently does not support partial inference so if MessageOverlayContext\n * typing is desired while using the HOC withMessageOverlayContextContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessageOverlayContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessageOverlayContextValue<StreamChatGenerics>>> => {\n const WithMessageOverlayContextComponent = (\n props: Omit<P, keyof MessageOverlayContextValue<StreamChatGenerics>>,\n ) => {\n const messageContext = useMessageOverlayContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messageContext} />;\n };\n WithMessageOverlayContextComponent.displayName = `WithMessageOverlayContext${getDisplayName(\n Component,\n )}`;\n return WithMessageOverlayContextComponent;\n};\n"]}
1
+ {"version":3,"sources":["MessageOverlayContext.tsx"],"names":["MessageOverlayContext","React","createContext","MessageOverlayProvider","children","value","messageOverlayContext","useMessageOverlayContext","withMessageOverlayContext","Component","WithMessageOverlayContextComponent","props","messageContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAIA;;AAgBA;;;;;;;;;AAqDO,IAAMA,qBAAqB,GAAGC,kBAAMC,aAAN,CAAoB,EAApB,CAA9B;;;;AAEA,IAAMC,sBAAsB,GAAG,SAAzBA,sBAAyB,OAO/B;AAAA,MAJLC,QAIK,QAJLA,QAIK;AAAA,MAHLC,KAGK,QAHLA,KAGK;AACL,MAAMC,qBAAqB,GAAG,4CAAmBD,KAAnB,CAA9B;AACA,SACE,gCAAC,qBAAD,CAAuB,QAAvB;AAAgC,IAAA,KAAK,EAAEC,qBAAvC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACGF,QADH,CADF;AAKD,CAdM;;;;AAgBA,IAAMG,wBAAwB,GAAG,SAA3BA,wBAA2B;AAAA,SAGtC,uBAAWP,qBAAX,CAHsC;AAAA,CAAjC;;;;AAUA,IAAMQ,yBAAyB,GAAG,SAA5BA,yBAA4B,CAIvCC,SAJuC,EAKqC;AAC5E,MAAMC,kCAAkC,GAAG,SAArCA,kCAAqC,CACzCC,KADyC,EAEtC;AACH,QAAMC,cAAc,GAAGL,wBAAwB,EAA/C;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,cAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,kCAAkC,CAACG,WAAnC,iCAA6E,oCAC3EJ,SAD2E,CAA7E;AAGA,SAAOC,kCAAP;AACD,CAjBM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { Attachment } from 'stream-chat';\n\nimport { useResettableState } from './hooks/useResettableState';\n\nimport type { GroupType, MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { MessageActionListProps } from '../../components/MessageOverlay/MessageActionList';\nimport type {\n MessageActionListItemProps,\n MessageActionType,\n} from '../../components/MessageOverlay/MessageActionListItem';\nimport type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';\nimport type { OverlayReactionsProps } from '../../components/MessageOverlay/OverlayReactions';\nimport type { OverlayReactionsAvatarProps } from '../../components/MessageOverlay/OverlayReactionsAvatar';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport type { ReactionData } from '../../utils/utils';\nimport type { Alignment, MessageContextValue } from '../messageContext/MessageContext';\nimport type { MessagesContextValue } from '../messagesContext/MessagesContext';\nimport type { OwnCapabilitiesContextValue } from '../ownCapabilitiesContext/OwnCapabilitiesContext';\nimport { getDisplayName } from '../utils/getDisplayName';\n\nexport type MessageOverlayData<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n alignment?: Alignment;\n clientId?: string;\n files?: Attachment<StreamChatGenerics>[];\n groupStyles?: GroupType[];\n handleReaction?: (reactionType: string) => Promise<void>;\n images?: Attachment<StreamChatGenerics>[];\n message?: MessageType<StreamChatGenerics>;\n messageActions?: MessageActionType[];\n messageContext?: MessageContextValue<StreamChatGenerics>;\n messageReactionTitle?: string;\n messagesContext?: MessagesContextValue<StreamChatGenerics>;\n onlyEmojis?: boolean;\n otherAttachments?: Attachment<StreamChatGenerics>[];\n OverlayReactionList?: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n ownCapabilities?: OwnCapabilitiesContextValue;\n supportedReactions?: ReactionData[];\n threadList?: boolean;\n videos?: Attachment<StreamChatGenerics>[];\n};\n\nexport type MessageOverlayContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * Custom UI component for rendering [message actions](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png) in overlay.\n *\n * **Default** [MessageActionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/MessageActions.tsx)\n */\n MessageActionList: React.ComponentType<MessageActionListProps<StreamChatGenerics>>;\n MessageActionListItem: React.ComponentType<MessageActionListItemProps<StreamChatGenerics>>;\n /**\n * Custom UI component for rendering [reaction selector](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png) in overlay (which shows up on long press on message).\n *\n * **Default** [OverlayReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/OverlayReactionList.tsx)\n */\n OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n /**\n * Custom UI component for rendering [reactions list](https://github.com/GetStream/stream-chat-react-native/blob/main/screenshots/docs/2.png), in overlay (which shows up on long press on message).\n *\n * **Default** [OverlayReactions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageOverlay/OverlayReactions.tsx)\n */\n OverlayReactions: React.ComponentType<OverlayReactionsProps<StreamChatGenerics>>;\n OverlayReactionsAvatar: React.ComponentType<OverlayReactionsAvatarProps>;\n reset: () => void;\n setData: React.Dispatch<React.SetStateAction<MessageOverlayData<StreamChatGenerics>>>;\n data?: MessageOverlayData<StreamChatGenerics>;\n};\n\nexport const MessageOverlayContext = React.createContext({} as MessageOverlayContextValue);\n\nexport const MessageOverlayProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessageOverlayContextValue<StreamChatGenerics>;\n}>) => {\n const messageOverlayContext = useResettableState(value);\n return (\n <MessageOverlayContext.Provider value={messageOverlayContext as MessageOverlayContextValue}>\n {children}\n </MessageOverlayContext.Provider>\n );\n};\n\nexport const useMessageOverlayContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() =>\n useContext(MessageOverlayContext) as unknown as MessageOverlayContextValue<StreamChatGenerics>;\n\n/**\n * Typescript currently does not support partial inference so if MessageOverlayContext\n * typing is desired while using the HOC withMessageOverlayContextContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessageOverlayContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessageOverlayContextValue<StreamChatGenerics>>> => {\n const WithMessageOverlayContextComponent = (\n props: Omit<P, keyof MessageOverlayContextValue<StreamChatGenerics>>,\n ) => {\n const messageContext = useMessageOverlayContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messageContext} />;\n };\n WithMessageOverlayContextComponent.displayName = `WithMessageOverlayContext${getDisplayName(\n Component,\n )}`;\n return WithMessageOverlayContextComponent;\n};\n"]}
@@ -32,7 +32,7 @@ var MessagesProvider = function MessagesProvider(_ref) {
32
32
  __self: _this,
33
33
  __source: {
34
34
  fileName: _jsxFileName,
35
- lineNumber: 473,
35
+ lineNumber: 475,
36
36
  columnNumber: 3
37
37
  }
38
38
  }, children);
@@ -53,7 +53,7 @@ var withMessagesContext = function withMessagesContext(Component) {
53
53
  __self: _this,
54
54
  __source: {
55
55
  fileName: _jsxFileName,
56
- lineNumber: 498,
56
+ lineNumber: 500,
57
57
  columnNumber: 12
58
58
  }
59
59
  }));
@@ -1 +1 @@
1
- {"version":3,"sources":["MessagesContext.tsx"],"names":["MessagesContext","React","createContext","MessagesProvider","children","value","useMessagesContext","withMessagesContext","Component","WithMessagesContextComponent","props","messagesContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAkDA;;;;;;;;;AA4ZO,IAAMA,eAAe,GAAGC,kBAAMC,aAAN,CAAoB,EAApB,CAAxB;;;;AAEA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB;AAAA,MAG9BC,QAH8B,QAG9BA,QAH8B;AAAA,MAI9BC,KAJ8B,QAI9BA,KAJ8B;AAAA,SAQ9B,gCAAC,eAAD,CAAiB,QAAjB;AAA0B,IAAA,KAAK,EAAEA,KAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACGD,QADH,CAR8B;AAAA,CAAzB;;;;AAaA,IAAME,kBAAkB,GAAG,SAArBA,kBAAqB;AAAA,SAE3B,uBAAWN,eAAX,CAF2B;AAAA,CAA3B;;;;AASA,IAAMO,mBAAmB,GAAG,SAAtBA,mBAAsB,CAIjCC,SAJiC,EAKqC;AACtE,MAAMC,4BAA4B,GAAG,SAA/BA,4BAA+B,CACnCC,KADmC,EAEhC;AACH,QAAMC,eAAe,GAAGL,kBAAkB,EAA1C;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,eAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,4BAA4B,CAACG,WAA7B,2BAAiE,oCAAeJ,SAAf,CAAjE;AACA,SAAOC,4BAAP;AACD,CAfM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { TouchableOpacityProps } from 'react-native';\n\nimport type { MessagePinnedHeaderProps } from 'src/components/Message/MessageSimple/MessagePinnedHeader';\n\nimport type { Attachment, ChannelState, MessageResponse } from 'stream-chat';\n\nimport type { AttachmentProps } from '../../components/Attachment/Attachment';\nimport type { AttachmentActionsProps } from '../../components/Attachment/AttachmentActions';\nimport type { CardProps } from '../../components/Attachment/Card';\nimport type { FileAttachmentProps } from '../../components/Attachment/FileAttachment';\nimport type { FileAttachmentGroupProps } from '../../components/Attachment/FileAttachmentGroup';\nimport type { FileIconProps } from '../../components/Attachment/FileIcon';\nimport type { GalleryProps } from '../../components/Attachment/Gallery';\nimport type { GiphyProps } from '../../components/Attachment/Giphy';\nimport type {\n MessageProps,\n MessageTouchableHandlerPayload,\n} from '../../components/Message/Message';\nimport type { MessageAvatarProps } from '../../components/Message/MessageSimple/MessageAvatar';\nimport type { MessageContentProps } from '../../components/Message/MessageSimple/MessageContent';\nimport type { MessageDeletedProps } from '../../components/Message/MessageSimple/MessageDeleted';\nimport type { MessageFooterProps } from '../../components/Message/MessageSimple/MessageFooter';\n\nimport type { MessageRepliesProps } from '../../components/Message/MessageSimple/MessageReplies';\nimport type { MessageRepliesAvatarsProps } from '../../components/Message/MessageSimple/MessageRepliesAvatars';\nimport type { MessageSimpleProps } from '../../components/Message/MessageSimple/MessageSimple';\nimport type { MessageStatusProps } from '../../components/Message/MessageSimple/MessageStatus';\nimport type { MessageTextProps } from '../../components/Message/MessageSimple/MessageTextContainer';\nimport type { ReactionListProps } from '../../components/Message/MessageSimple/ReactionList';\nimport type { MarkdownRules } from '../../components/Message/MessageSimple/utils/renderText';\nimport type { MessageActionsParams } from '../../components/Message/utils/messageActions';\nimport type { DateHeaderProps } from '../../components/MessageList/DateHeader';\nimport type { MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { InlineDateSeparatorProps } from '../../components/MessageList/InlineDateSeparator';\nimport type { MessageListProps } from '../../components/MessageList/MessageList';\nimport type { MessageSystemProps } from '../../components/MessageList/MessageSystem';\nimport type { ScrollToBottomButtonProps } from '../../components/MessageList/ScrollToBottomButton';\nimport type { MessageActionType } from '../../components/MessageOverlay/MessageActionListItem';\nimport type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';\nimport type { ReplyProps } from '../../components/Reply/Reply';\nimport type { FlatList } from '../../native';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport type { ReactionData } from '../../utils/utils';\nimport type { Alignment } from '../messageContext/MessageContext';\nimport type { SuggestionCommand } from '../suggestionsContext/SuggestionsContext';\nimport type { DeepPartial } from '../themeContext/ThemeContext';\nimport type { Theme } from '../themeContext/utils/theme';\nimport type { TDateTimeParserInput } from '../translationContext/TranslationContext';\nimport { getDisplayName } from '../utils/getDisplayName';\n\nexport type MessageContentType = 'attachments' | 'files' | 'gallery' | 'quoted_reply' | 'text';\n\nexport type MessagesContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * UI component for Attachment.\n * Defaults to: [Attachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Attachment.tsx)\n */\n Attachment: React.ComponentType<AttachmentProps<StreamChatGenerics>>;\n /**\n * UI component to display AttachmentActions. e.g., send, shuffle, cancel in case of giphy\n * Defaults to: [AttachmentActions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/AttachmentActions.tsx)\n */\n AttachmentActions: React.ComponentType<AttachmentActionsProps<StreamChatGenerics>>;\n /**\n * UI component to display generic media type e.g. giphy, url preview etc\n * Defaults to: [Card](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx)\n */\n Card: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * UI component for DateHeader\n * Defaults to: [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/DateHeader.tsx)\n **/\n DateHeader: React.ComponentType<DateHeaderProps>;\n\n /** Should keyboard be dismissed when messaged is touched */\n dismissKeyboardOnMessageTouch: boolean;\n\n enableMessageGroupingByUser: boolean;\n\n /**\n * UI component to display File type attachment.\n * Defaults to: [FileAttachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileAttachment.tsx)\n */\n FileAttachment: React.ComponentType<FileAttachmentProps<StreamChatGenerics>>;\n /**\n * UI component to display group of File type attachments or multiple file attachments (in single message).\n * Defaults to: [FileAttachmentGroup](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileAttachmentGroup.tsx)\n */\n FileAttachmentGroup: React.ComponentType<FileAttachmentGroupProps<StreamChatGenerics>>;\n /**\n * UI component for attachment icon for type 'file' attachment.\n * Defaults to: https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileIcon.tsx\n */\n FileAttachmentIcon: React.ComponentType<FileIconProps>;\n FlatList: typeof FlatList;\n /**\n * UI component to display image attachments\n * Defaults to: [Gallery](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Gallery.tsx)\n */\n Gallery: React.ComponentType<GalleryProps<StreamChatGenerics>>;\n /**\n * UI component for Giphy\n * Defaults to: [Giphy](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Giphy.tsx)\n */\n Giphy: React.ComponentType<GiphyProps<StreamChatGenerics>>;\n /**\n * The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default\n * */\n giphyVersion: keyof NonNullable<Attachment['giphy']>;\n /**\n * When true, messageList will be scrolled at first unread message, when opened.\n */\n initialScrollToFirstUnreadMessage: boolean;\n /**\n * UI component for Message Date Separator Component\n * Defaults to: [InlineDateSeparator](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/InlineDateSeparator.tsx)\n */\n InlineDateSeparator: React.ComponentType<InlineDateSeparatorProps>;\n /**\n * UI component for InlineUnreadIndicator\n * Defaults to: [InlineUnreadIndicator](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/InlineUnreadIndicator.tsx)\n **/\n InlineUnreadIndicator: React.ComponentType;\n Message: React.ComponentType<MessageProps<StreamChatGenerics>>;\n /**\n * UI component for MessageAvatar\n * Defaults to: [MessageAvatar](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageAvatar.tsx)\n **/\n MessageAvatar: React.ComponentType<MessageAvatarProps<StreamChatGenerics>>;\n /**\n * UI component for MessageContent\n * Defaults to: [MessageContent](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageContent.tsx)\n */\n MessageContent: React.ComponentType<MessageContentProps<StreamChatGenerics>>;\n /** Order to render the message content */\n messageContentOrder: MessageContentType[];\n /**\n * UI component for MessageDeleted\n * Defaults to: [MessageDeleted](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageDeleted.tsx)\n */\n MessageDeleted: React.ComponentType<MessageDeletedProps<StreamChatGenerics>>;\n /**\n * Custom message footer component\n */\n MessageFooter: React.ComponentType<MessageFooterProps<StreamChatGenerics>>;\n MessageList: React.ComponentType<MessageListProps<StreamChatGenerics>>;\n /**\n * Custom message pinned component\n */\n MessagePinnedHeader: React.ComponentType<MessagePinnedHeaderProps<StreamChatGenerics>>;\n /**\n * UI component for MessageReplies\n * Defaults to: [MessageReplies](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageReplies.tsx)\n */\n\n MessageReplies: React.ComponentType<MessageRepliesProps<StreamChatGenerics>>;\n /**\n * UI Component for MessageRepliesAvatars\n * Defaults to: [MessageRepliesAvatars](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageRepliesAvatars.tsx)\n */\n MessageRepliesAvatars: React.ComponentType<MessageRepliesAvatarsProps<StreamChatGenerics>>;\n /**\n * UI component for MessageSimple\n * Defaults to: [MessageSimple](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageSimple.tsx)\n */\n MessageSimple: React.ComponentType<MessageSimpleProps<StreamChatGenerics>>;\n /**\n * UI component for MessageStatus (delivered/read)\n * Defaults to: [MessageStatus](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageStatus.tsx)\n */\n MessageStatus: React.ComponentType<MessageStatusProps<StreamChatGenerics>>;\n /**\n * UI component for MessageSystem\n * Defaults to: [MessageSystem](https://getstream.github.io/stream-chat-react-native/v3/#messagesystem)\n */\n MessageSystem: React.ComponentType<MessageSystemProps<StreamChatGenerics>>;\n /**\n * UI component for OverlayReactionList\n */\n OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n /**\n * UI component for ReactionList\n * Defaults to: [ReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Reaction/ReactionList.tsx)\n */\n ReactionList: React.ComponentType<ReactionListProps<StreamChatGenerics>>;\n removeMessage: (message: { id: string; parent_id?: string }) => void;\n /**\n * UI component for Reply\n * Defaults to: [Reply](https://getstream.github.io/stream-chat-react-native/v3/#reply)\n */\n Reply: React.ComponentType<ReplyProps<StreamChatGenerics>>;\n /**\n * Override the api request for retry message functionality.\n */\n retrySendMessage: (message: MessageResponse<StreamChatGenerics>) => Promise<void>;\n /**\n * UI component for ScrollToBottomButton\n * Defaults to: [ScrollToBottomButton](https://getstream.github.io/stream-chat-react-native/v3/#ScrollToBottomButton)\n */\n ScrollToBottomButton: React.ComponentType<ScrollToBottomButtonProps>;\n setEditingState: (message: MessageType<StreamChatGenerics>) => void;\n setQuotedMessageState: (message: MessageType<StreamChatGenerics>) => void;\n supportedReactions: ReactionData[];\n /**\n * UI component for TypingIndicator\n * Defaults to: [TypingIndicator](https://getstream.github.io/stream-chat-react-native/v3/#typingindicator)\n */\n TypingIndicator: React.ComponentType;\n /**\n * UI component for TypingIndicatorContainer\n * Defaults to: [TypingIndicatorContainer](https://getstream.github.io/stream-chat-react-native/v3/#typingindicatorcontainer)\n */\n TypingIndicatorContainer: React.ComponentType;\n updateMessage: (\n updatedMessage: MessageResponse<StreamChatGenerics>,\n extraState?: {\n commands?: SuggestionCommand<StreamChatGenerics>[];\n messageInput?: string;\n threadMessages?: ChannelState<StreamChatGenerics>['threads'][string];\n },\n ) => void;\n /**\n * Custom UI component to display enriched url preview.\n * Defaults to https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx\n */\n UrlPreview: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * Provide any additional props for `TouchableOpacity` which wraps inner MessageContent component here.\n * Please check docs for TouchableOpacity for supported props - https://reactnative.dev/docs/touchableopacity#props\n *\n * @overrideType Object\n */\n additionalTouchableProps?: Omit<TouchableOpacityProps, 'style'>;\n /**\n * Custom UI component to override default cover (between Header and Footer) of Card component.\n * Accepts the same props as Card component.\n */\n CardCover?: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * Custom UI component to override default Footer of Card component.\n * Accepts the same props as Card component.\n */\n CardFooter?: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * Custom UI component to override default header of Card component.\n * Accepts the same props as Card component.\n */\n CardHeader?: React.ComponentType<CardProps<StreamChatGenerics>>;\n\n /**\n * Full override of the delete message button in the Message Actions\n *\n * Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.\n */\n\n /** Control if the deleted message is visible to both the send and reciever, either of them or none */\n deletedMessagesVisibilityType?: 'always' | 'never' | 'receiver' | 'sender';\n\n disableTypingIndicator?: boolean;\n\n /**\n * Whether messages should be aligned to right or left part of screen.\n * By default, messages will be received messages will be aligned to left and\n * sent messages will be aligned to right.\n */\n forceAlignMessages?: Alignment | boolean;\n /**\n * Optional function to custom format the message date\n */\n formatDate?: (date: TDateTimeParserInput) => string;\n handleBlock?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a copy message action is invoked */\n handleCopy?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a delete message action is invoked */\n handleDelete?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when an edit message action is invoked */\n handleEdit?: (message: MessageType<StreamChatGenerics>) => void;\n /** Handler to access when a flag message action is invoked */\n handleFlag?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a mute user action is invoked */\n handleMute?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a pin/unpin user action is invoked*/\n handlePinMessage?: ((message: MessageType<StreamChatGenerics>) => MessageActionType) | null;\n /** Handler to access when a quoted reply action is invoked */\n handleQuotedReply?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to process a reaction */\n handleReaction?: (\n message: MessageType<StreamChatGenerics>,\n reactionType: string,\n ) => Promise<void>;\n /** Handler to access when a retry action is invoked */\n handleRetry?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a thread reply action is invoked */\n handleThreadReply?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to deal with custom memoization logic of Attachment */\n isAttachmentEqual?: (\n prevAttachment: Attachment<StreamChatGenerics>,\n nextAttachment: Attachment<StreamChatGenerics>,\n ) => boolean;\n legacyImageViewerSwipeBehaviour?: boolean;\n /** Object specifying rules defined within simple-markdown https://github.com/Khan/simple-markdown#adding-a-simple-extension */\n markdownRules?: MarkdownRules;\n /**\n * Use this prop to override message actions (which pop-up in message overlay).\n *\n * You can either completely override the default messageActions object.\n *\n * ```\n * <Channel\n * messageActions=[\n * {\n * action: () => { someAction() };\n * title: \"Pin Message\";\n * icon: PinIcon;\n * titleStyle: {};\n * },\n * {\n * action: () => { someAction() };\n * title: \"Delete Message\";\n * icon: PinIcon;\n * titleStyle: {};\n * }\n * ]\n * >\n * </Channel>\n * ```\n *\n * Or you can selectly keep certain action and remove some:\n *\n * e.g. Lets say you only want to keep threadReply and copyMessage actions\n *\n * ```\n * <Channel\n * messageActions={({\n * blockUser,\n * copyMessage,\n * deleteMessage,\n * editMessage,\n * flagMessage,\n * muteUser,\n * quotedReply,\n * retry,\n * threadReply,\n * }) => ([\n * threadReply, copyMessage\n * ])}\n * >\n * </Channel>\n * ```\n *\n * @overrideType Function | Array<Objects>\n */\n messageActions?: (param: MessageActionsParams<StreamChatGenerics>) => MessageActionType[];\n /**\n * Custom message header component\n */\n MessageHeader?: React.ComponentType<MessageFooterProps<StreamChatGenerics>>;\n /** Custom UI component for message text */\n MessageText?: React.ComponentType<MessageTextProps<StreamChatGenerics>>;\n\n /**\n * Theme provided only to messages that are the current users\n */\n myMessageTheme?: DeepPartial<Theme>;\n /**\n * Override default handler for onLongPress on message. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onLongPressMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occured\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onLongPressMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n /**\n * Add onPressIn handler for attachments. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onPressInMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occured\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onPressInMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n /**\n * Override onPress handler for message. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onPressMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occurred\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onPressMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n\n /**\n * Full override of the reaction function on Message and Message Overlay\n *\n * Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.\n * */\n selectReaction?: (\n message: MessageType<StreamChatGenerics>,\n ) => (reactionType: string) => Promise<void>;\n\n targetedMessage?: string;\n};\n\nexport const MessagesContext = React.createContext({} as MessagesContextValue);\n\nexport const MessagesProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessagesContextValue<StreamChatGenerics>;\n}>) => (\n <MessagesContext.Provider value={value as unknown as MessagesContextValue}>\n {children}\n </MessagesContext.Provider>\n);\n\nexport const useMessagesContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => useContext(MessagesContext) as unknown as MessagesContextValue<StreamChatGenerics>;\n\n/**\n * Typescript currently does not support partial inference so if MessagesContext\n * typing is desired while using the HOC withMessagesContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessagesContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessagesContextValue<StreamChatGenerics>>> => {\n const WithMessagesContextComponent = (\n props: Omit<P, keyof MessagesContextValue<StreamChatGenerics>>,\n ) => {\n const messagesContext = useMessagesContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messagesContext} />;\n };\n WithMessagesContextComponent.displayName = `WithMessagesContext${getDisplayName(Component)}`;\n return WithMessagesContextComponent;\n};\n"]}
1
+ {"version":3,"sources":["MessagesContext.tsx"],"names":["MessagesContext","React","createContext","MessagesProvider","children","value","useMessagesContext","withMessagesContext","Component","WithMessagesContextComponent","props","messagesContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAmDA;;;;;;;;;AA6ZO,IAAMA,eAAe,GAAGC,kBAAMC,aAAN,CAAoB,EAApB,CAAxB;;;;AAEA,IAAMC,gBAAgB,GAAG,SAAnBA,gBAAmB;AAAA,MAG9BC,QAH8B,QAG9BA,QAH8B;AAAA,MAI9BC,KAJ8B,QAI9BA,KAJ8B;AAAA,SAQ9B,gCAAC,eAAD,CAAiB,QAAjB;AAA0B,IAAA,KAAK,EAAEA,KAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,KACGD,QADH,CAR8B;AAAA,CAAzB;;;;AAaA,IAAME,kBAAkB,GAAG,SAArBA,kBAAqB;AAAA,SAE3B,uBAAWN,eAAX,CAF2B;AAAA,CAA3B;;;;AASA,IAAMO,mBAAmB,GAAG,SAAtBA,mBAAsB,CAIjCC,SAJiC,EAKqC;AACtE,MAAMC,4BAA4B,GAAG,SAA/BA,4BAA+B,CACnCC,KADmC,EAEhC;AACH,QAAMC,eAAe,GAAGL,kBAAkB,EAA1C;AAEA,WAAO,gCAAC,SAAD,gCAAgBI,KAAhB,EAAiCC,eAAjC;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,OAAP;AACD,GAND;;AAOAF,EAAAA,4BAA4B,CAACG,WAA7B,2BAAiE,oCAAeJ,SAAf,CAAjE;AACA,SAAOC,4BAAP;AACD,CAfM","sourcesContent":["import React, { PropsWithChildren, useContext } from 'react';\n\nimport type { TouchableOpacityProps } from 'react-native';\n\nimport type { MessagePinnedHeaderProps } from 'src/components/Message/MessageSimple/MessagePinnedHeader';\n\nimport type { Attachment, ChannelState, MessageResponse } from 'stream-chat';\n\nimport type { AttachmentProps } from '../../components/Attachment/Attachment';\nimport type { AttachmentActionsProps } from '../../components/Attachment/AttachmentActions';\nimport type { CardProps } from '../../components/Attachment/Card';\nimport type { FileAttachmentProps } from '../../components/Attachment/FileAttachment';\nimport type { FileAttachmentGroupProps } from '../../components/Attachment/FileAttachmentGroup';\nimport type { FileIconProps } from '../../components/Attachment/FileIcon';\nimport type { GalleryProps } from '../../components/Attachment/Gallery';\nimport type { GiphyProps } from '../../components/Attachment/Giphy';\nimport type { VideoThumbnailProps } from '../../components/Attachment/VideoThumbnail';\nimport type {\n MessageProps,\n MessageTouchableHandlerPayload,\n} from '../../components/Message/Message';\nimport type { MessageAvatarProps } from '../../components/Message/MessageSimple/MessageAvatar';\nimport type { MessageContentProps } from '../../components/Message/MessageSimple/MessageContent';\nimport type { MessageDeletedProps } from '../../components/Message/MessageSimple/MessageDeleted';\nimport type { MessageFooterProps } from '../../components/Message/MessageSimple/MessageFooter';\n\nimport type { MessageRepliesProps } from '../../components/Message/MessageSimple/MessageReplies';\nimport type { MessageRepliesAvatarsProps } from '../../components/Message/MessageSimple/MessageRepliesAvatars';\nimport type { MessageSimpleProps } from '../../components/Message/MessageSimple/MessageSimple';\nimport type { MessageStatusProps } from '../../components/Message/MessageSimple/MessageStatus';\nimport type { MessageTextProps } from '../../components/Message/MessageSimple/MessageTextContainer';\nimport type { ReactionListProps } from '../../components/Message/MessageSimple/ReactionList';\nimport type { MarkdownRules } from '../../components/Message/MessageSimple/utils/renderText';\nimport type { MessageActionsParams } from '../../components/Message/utils/messageActions';\nimport type { DateHeaderProps } from '../../components/MessageList/DateHeader';\nimport type { MessageType } from '../../components/MessageList/hooks/useMessageList';\nimport type { InlineDateSeparatorProps } from '../../components/MessageList/InlineDateSeparator';\nimport type { MessageListProps } from '../../components/MessageList/MessageList';\nimport type { MessageSystemProps } from '../../components/MessageList/MessageSystem';\nimport type { ScrollToBottomButtonProps } from '../../components/MessageList/ScrollToBottomButton';\nimport type { MessageActionType } from '../../components/MessageOverlay/MessageActionListItem';\nimport type { OverlayReactionListProps } from '../../components/MessageOverlay/OverlayReactionList';\nimport type { ReplyProps } from '../../components/Reply/Reply';\nimport type { FlatList } from '../../native';\nimport type { DefaultStreamChatGenerics, UnknownType } from '../../types/types';\nimport type { ReactionData } from '../../utils/utils';\nimport type { Alignment } from '../messageContext/MessageContext';\nimport type { SuggestionCommand } from '../suggestionsContext/SuggestionsContext';\nimport type { DeepPartial } from '../themeContext/ThemeContext';\nimport type { Theme } from '../themeContext/utils/theme';\nimport type { TDateTimeParserInput } from '../translationContext/TranslationContext';\nimport { getDisplayName } from '../utils/getDisplayName';\n\nexport type MessageContentType = 'attachments' | 'files' | 'gallery' | 'quoted_reply' | 'text';\n\nexport type MessagesContextValue<\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n> = {\n /**\n * UI component for Attachment.\n * Defaults to: [Attachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Attachment.tsx)\n */\n Attachment: React.ComponentType<AttachmentProps<StreamChatGenerics>>;\n /**\n * UI component to display AttachmentActions. e.g., send, shuffle, cancel in case of giphy\n * Defaults to: [AttachmentActions](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/AttachmentActions.tsx)\n */\n AttachmentActions: React.ComponentType<AttachmentActionsProps<StreamChatGenerics>>;\n /**\n * UI component to display generic media type e.g. giphy, url preview etc\n * Defaults to: [Card](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx)\n */\n Card: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * UI component for DateHeader\n * Defaults to: [DateHeader](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/DateHeader.tsx)\n **/\n DateHeader: React.ComponentType<DateHeaderProps>;\n\n /** Should keyboard be dismissed when messaged is touched */\n dismissKeyboardOnMessageTouch: boolean;\n\n enableMessageGroupingByUser: boolean;\n\n /**\n * UI component to display File type attachment.\n * Defaults to: [FileAttachment](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileAttachment.tsx)\n */\n FileAttachment: React.ComponentType<FileAttachmentProps<StreamChatGenerics>>;\n /**\n * UI component to display group of File type attachments or multiple file attachments (in single message).\n * Defaults to: [FileAttachmentGroup](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileAttachmentGroup.tsx)\n */\n FileAttachmentGroup: React.ComponentType<FileAttachmentGroupProps<StreamChatGenerics>>;\n /**\n * UI component for attachment icon for type 'file' attachment.\n * Defaults to: https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/FileIcon.tsx\n */\n FileAttachmentIcon: React.ComponentType<FileIconProps>;\n FlatList: typeof FlatList;\n /**\n * UI component to display image attachments\n * Defaults to: [Gallery](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Gallery.tsx)\n */\n Gallery: React.ComponentType<GalleryProps<StreamChatGenerics>>;\n /**\n * UI component for Giphy\n * Defaults to: [Giphy](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Giphy.tsx)\n */\n Giphy: React.ComponentType<GiphyProps<StreamChatGenerics>>;\n /**\n * The giphy version to render - check the keys of the [Image Object](https://developers.giphy.com/docs/api/schema#image-object) for possible values. Uses 'fixed_height' by default\n * */\n giphyVersion: keyof NonNullable<Attachment['giphy']>;\n /**\n * When true, messageList will be scrolled at first unread message, when opened.\n */\n initialScrollToFirstUnreadMessage: boolean;\n /**\n * UI component for Message Date Separator Component\n * Defaults to: [InlineDateSeparator](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageList/InlineDateSeparator.tsx)\n */\n InlineDateSeparator: React.ComponentType<InlineDateSeparatorProps>;\n /**\n * UI component for InlineUnreadIndicator\n * Defaults to: [InlineUnreadIndicator](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/InlineUnreadIndicator.tsx)\n **/\n InlineUnreadIndicator: React.ComponentType;\n Message: React.ComponentType<MessageProps<StreamChatGenerics>>;\n /**\n * UI component for MessageAvatar\n * Defaults to: [MessageAvatar](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageAvatar.tsx)\n **/\n MessageAvatar: React.ComponentType<MessageAvatarProps<StreamChatGenerics>>;\n /**\n * UI component for MessageContent\n * Defaults to: [MessageContent](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageContent.tsx)\n */\n MessageContent: React.ComponentType<MessageContentProps<StreamChatGenerics>>;\n /** Order to render the message content */\n messageContentOrder: MessageContentType[];\n /**\n * UI component for MessageDeleted\n * Defaults to: [MessageDeleted](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageDeleted.tsx)\n */\n MessageDeleted: React.ComponentType<MessageDeletedProps<StreamChatGenerics>>;\n /**\n * Custom message footer component\n */\n MessageFooter: React.ComponentType<MessageFooterProps<StreamChatGenerics>>;\n MessageList: React.ComponentType<MessageListProps<StreamChatGenerics>>;\n /**\n * Custom message pinned component\n */\n MessagePinnedHeader: React.ComponentType<MessagePinnedHeaderProps<StreamChatGenerics>>;\n /**\n * UI component for MessageReplies\n * Defaults to: [MessageReplies](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageReplies.tsx)\n */\n\n MessageReplies: React.ComponentType<MessageRepliesProps<StreamChatGenerics>>;\n /**\n * UI Component for MessageRepliesAvatars\n * Defaults to: [MessageRepliesAvatars](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/MessageSimple/MessageRepliesAvatars.tsx)\n */\n MessageRepliesAvatars: React.ComponentType<MessageRepliesAvatarsProps<StreamChatGenerics>>;\n /**\n * UI component for MessageSimple\n * Defaults to: [MessageSimple](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageSimple.tsx)\n */\n MessageSimple: React.ComponentType<MessageSimpleProps<StreamChatGenerics>>;\n /**\n * UI component for MessageStatus (delivered/read)\n * Defaults to: [MessageStatus](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Message/MessageSimple/MessageStatus.tsx)\n */\n MessageStatus: React.ComponentType<MessageStatusProps<StreamChatGenerics>>;\n /**\n * UI component for MessageSystem\n * Defaults to: [MessageSystem](https://getstream.github.io/stream-chat-react-native/v3/#messagesystem)\n */\n MessageSystem: React.ComponentType<MessageSystemProps<StreamChatGenerics>>;\n /**\n * UI component for OverlayReactionList\n */\n OverlayReactionList: React.ComponentType<OverlayReactionListProps<StreamChatGenerics>>;\n /**\n * UI component for ReactionList\n * Defaults to: [ReactionList](https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Reaction/ReactionList.tsx)\n */\n ReactionList: React.ComponentType<ReactionListProps<StreamChatGenerics>>;\n removeMessage: (message: { id: string; parent_id?: string }) => void;\n /**\n * UI component for Reply\n * Defaults to: [Reply](https://getstream.github.io/stream-chat-react-native/v3/#reply)\n */\n Reply: React.ComponentType<ReplyProps<StreamChatGenerics>>;\n /**\n * Override the api request for retry message functionality.\n */\n retrySendMessage: (message: MessageResponse<StreamChatGenerics>) => Promise<void>;\n /**\n * UI component for ScrollToBottomButton\n * Defaults to: [ScrollToBottomButton](https://getstream.github.io/stream-chat-react-native/v3/#ScrollToBottomButton)\n */\n ScrollToBottomButton: React.ComponentType<ScrollToBottomButtonProps>;\n setEditingState: (message: MessageType<StreamChatGenerics>) => void;\n setQuotedMessageState: (message: MessageType<StreamChatGenerics>) => void;\n supportedReactions: ReactionData[];\n /**\n * UI component for TypingIndicator\n * Defaults to: [TypingIndicator](https://getstream.github.io/stream-chat-react-native/v3/#typingindicator)\n */\n TypingIndicator: React.ComponentType;\n /**\n * UI component for TypingIndicatorContainer\n * Defaults to: [TypingIndicatorContainer](https://getstream.github.io/stream-chat-react-native/v3/#typingindicatorcontainer)\n */\n TypingIndicatorContainer: React.ComponentType;\n updateMessage: (\n updatedMessage: MessageResponse<StreamChatGenerics>,\n extraState?: {\n commands?: SuggestionCommand<StreamChatGenerics>[];\n messageInput?: string;\n threadMessages?: ChannelState<StreamChatGenerics>['threads'][string];\n },\n ) => void;\n /**\n * Custom UI component to display enriched url preview.\n * Defaults to https://github.com/GetStream/stream-chat-react-native/blob/main/package/src/components/Attachment/Card.tsx\n */\n UrlPreview: React.ComponentType<CardProps<StreamChatGenerics>>;\n VideoThumbnail: React.ComponentType<VideoThumbnailProps>;\n /**\n * Provide any additional props for `TouchableOpacity` which wraps inner MessageContent component here.\n * Please check docs for TouchableOpacity for supported props - https://reactnative.dev/docs/touchableopacity#props\n *\n * @overrideType Object\n */\n additionalTouchableProps?: Omit<TouchableOpacityProps, 'style'>;\n /**\n * Custom UI component to override default cover (between Header and Footer) of Card component.\n * Accepts the same props as Card component.\n */\n CardCover?: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * Custom UI component to override default Footer of Card component.\n * Accepts the same props as Card component.\n */\n CardFooter?: React.ComponentType<CardProps<StreamChatGenerics>>;\n /**\n * Custom UI component to override default header of Card component.\n * Accepts the same props as Card component.\n */\n CardHeader?: React.ComponentType<CardProps<StreamChatGenerics>>;\n\n /**\n * Full override of the delete message button in the Message Actions\n *\n * Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.\n */\n\n /** Control if the deleted message is visible to both the send and reciever, either of them or none */\n deletedMessagesVisibilityType?: 'always' | 'never' | 'receiver' | 'sender';\n\n disableTypingIndicator?: boolean;\n\n /**\n * Whether messages should be aligned to right or left part of screen.\n * By default, messages will be received messages will be aligned to left and\n * sent messages will be aligned to right.\n */\n forceAlignMessages?: Alignment | boolean;\n /**\n * Optional function to custom format the message date\n */\n formatDate?: (date: TDateTimeParserInput) => string;\n handleBlock?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a copy message action is invoked */\n handleCopy?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a delete message action is invoked */\n handleDelete?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when an edit message action is invoked */\n handleEdit?: (message: MessageType<StreamChatGenerics>) => void;\n /** Handler to access when a flag message action is invoked */\n handleFlag?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a mute user action is invoked */\n handleMute?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a pin/unpin user action is invoked*/\n handlePinMessage?: ((message: MessageType<StreamChatGenerics>) => MessageActionType) | null;\n /** Handler to access when a quoted reply action is invoked */\n handleQuotedReply?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to process a reaction */\n handleReaction?: (\n message: MessageType<StreamChatGenerics>,\n reactionType: string,\n ) => Promise<void>;\n /** Handler to access when a retry action is invoked */\n handleRetry?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to access when a thread reply action is invoked */\n handleThreadReply?: (message: MessageType<StreamChatGenerics>) => Promise<void>;\n /** Handler to deal with custom memoization logic of Attachment */\n isAttachmentEqual?: (\n prevAttachment: Attachment<StreamChatGenerics>,\n nextAttachment: Attachment<StreamChatGenerics>,\n ) => boolean;\n legacyImageViewerSwipeBehaviour?: boolean;\n /** Object specifying rules defined within simple-markdown https://github.com/Khan/simple-markdown#adding-a-simple-extension */\n markdownRules?: MarkdownRules;\n /**\n * Use this prop to override message actions (which pop-up in message overlay).\n *\n * You can either completely override the default messageActions object.\n *\n * ```\n * <Channel\n * messageActions=[\n * {\n * action: () => { someAction() };\n * title: \"Pin Message\";\n * icon: PinIcon;\n * titleStyle: {};\n * },\n * {\n * action: () => { someAction() };\n * title: \"Delete Message\";\n * icon: PinIcon;\n * titleStyle: {};\n * }\n * ]\n * >\n * </Channel>\n * ```\n *\n * Or you can selectly keep certain action and remove some:\n *\n * e.g. Lets say you only want to keep threadReply and copyMessage actions\n *\n * ```\n * <Channel\n * messageActions={({\n * blockUser,\n * copyMessage,\n * deleteMessage,\n * editMessage,\n * flagMessage,\n * muteUser,\n * quotedReply,\n * retry,\n * threadReply,\n * }) => ([\n * threadReply, copyMessage\n * ])}\n * >\n * </Channel>\n * ```\n *\n * @overrideType Function | Array<Objects>\n */\n messageActions?: (param: MessageActionsParams<StreamChatGenerics>) => MessageActionType[];\n /**\n * Custom message header component\n */\n MessageHeader?: React.ComponentType<MessageFooterProps<StreamChatGenerics>>;\n /** Custom UI component for message text */\n MessageText?: React.ComponentType<MessageTextProps<StreamChatGenerics>>;\n\n /**\n * Theme provided only to messages that are the current users\n */\n myMessageTheme?: DeepPartial<Theme>;\n /**\n * Override default handler for onLongPress on message. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onLongPressMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occured\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onLongPressMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n /**\n * Add onPressIn handler for attachments. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onPressInMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occured\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onPressInMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n /**\n * Override onPress handler for message. You have access to payload of that handler as param:\n *\n * ```\n * <Channel\n * onPressMessage={({\n * actionHandlers: {\n * deleteMessage, // () => Promise<void>;\n * editMessage, // () => void;\n * quotedReply, // () => void;\n * resendMessage, // () => Promise<void>;\n * showMessageOverlay, // () => void;\n * toggleBanUser, // () => Promise<void>;\n * toggleMuteUser, // () => Promise<void>;\n * toggleReaction, // (reactionType: string) => Promise<void>;\n * },\n * defaultHandler, // () => void\n * event, // any event object corresponding to touchable feedback\n * emitter, // which component trigged this touchable feedback e.g. card, fileAttachment, gallery, message ... etc\n * message // message object on which longPress occurred\n * }) => {\n * // Your custom action\n * }}\n * />\n * ```\n */\n onPressMessage?: (payload: MessageTouchableHandlerPayload<StreamChatGenerics>) => void;\n\n /**\n * Full override of the reaction function on Message and Message Overlay\n *\n * Please check [cookbook](https://github.com/GetStream/stream-chat-react-native/wiki/Cookbook-v3.0#override-or-intercept-message-actions-edit-delete-reaction-reply-etc) for details.\n * */\n selectReaction?: (\n message: MessageType<StreamChatGenerics>,\n ) => (reactionType: string) => Promise<void>;\n\n targetedMessage?: string;\n};\n\nexport const MessagesContext = React.createContext({} as MessagesContextValue);\n\nexport const MessagesProvider = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>({\n children,\n value,\n}: PropsWithChildren<{\n value?: MessagesContextValue<StreamChatGenerics>;\n}>) => (\n <MessagesContext.Provider value={value as unknown as MessagesContextValue}>\n {children}\n </MessagesContext.Provider>\n);\n\nexport const useMessagesContext = <\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>() => useContext(MessagesContext) as unknown as MessagesContextValue<StreamChatGenerics>;\n\n/**\n * Typescript currently does not support partial inference so if MessagesContext\n * typing is desired while using the HOC withMessagesContext the Props for the\n * wrapped component must be provided as the first generic.\n */\nexport const withMessagesContext = <\n P extends UnknownType,\n StreamChatGenerics extends DefaultStreamChatGenerics = DefaultStreamChatGenerics,\n>(\n Component: React.ComponentType<P>,\n): React.FC<Omit<P, keyof MessagesContextValue<StreamChatGenerics>>> => {\n const WithMessagesContextComponent = (\n props: Omit<P, keyof MessagesContextValue<StreamChatGenerics>>,\n ) => {\n const messagesContext = useMessagesContext<StreamChatGenerics>();\n\n return <Component {...(props as P)} {...messagesContext} />;\n };\n WithMessagesContextComponent.displayName = `WithMessagesContext${getDisplayName(Component)}`;\n return WithMessagesContextComponent;\n};\n"]}
@@ -174,6 +174,11 @@ var defaultTheme = {
174
174
  leftContainer: {},
175
175
  rightContainer: {},
176
176
  usernameText: {}
177
+ },
178
+ videoControl: {
179
+ durationTextStyle: {},
180
+ roundedView: {},
181
+ videoContainer: {}
177
182
  }
178
183
  },
179
184
  inlineDateSeparator: {
@@ -492,7 +497,11 @@ var defaultTheme = {
492
497
  width: DEFAULT_STATUS_ICON_SIZE
493
498
  }
494
499
  },
495
- targetedMessageUnderlay: {}
500
+ targetedMessageUnderlay: {},
501
+ videoThumbnail: {
502
+ container: {},
503
+ roundedView: {}
504
+ }
496
505
  },
497
506
  overlay: {
498
507
  container: {},