stream-chat-react-native-core 5.0.0-offline-support.12 → 5.0.0

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 (264) hide show
  1. package/lib/commonjs/components/{MessageInput/AudioAttachmentUploadPreview.js → Attachment/AudioAttachment.js} +38 -64
  2. package/lib/commonjs/components/Attachment/AudioAttachment.js.map +1 -0
  3. package/lib/commonjs/components/Attachment/Card.js +1 -0
  4. package/lib/commonjs/components/Attachment/Card.js.map +1 -1
  5. package/lib/commonjs/components/Attachment/FileAttachment.js +16 -7
  6. package/lib/commonjs/components/Attachment/FileAttachment.js.map +1 -1
  7. package/lib/commonjs/components/Attachment/FileAttachmentGroup.js +132 -12
  8. package/lib/commonjs/components/Attachment/FileAttachmentGroup.js.map +1 -1
  9. package/lib/commonjs/components/Attachment/Gallery.js +41 -35
  10. package/lib/commonjs/components/Attachment/Gallery.js.map +1 -1
  11. package/lib/commonjs/components/Attachment/Giphy.js +17 -13
  12. package/lib/commonjs/components/Attachment/Giphy.js.map +1 -1
  13. package/lib/commonjs/components/Attachment/VideoThumbnail.js +12 -6
  14. package/lib/commonjs/components/Attachment/VideoThumbnail.js.map +1 -1
  15. package/lib/commonjs/components/Attachment/utils/getGiphyMimeType.js +15 -0
  16. package/lib/commonjs/components/Attachment/utils/getGiphyMimeType.js.map +1 -0
  17. package/lib/commonjs/components/Channel/Channel.js +19 -19
  18. package/lib/commonjs/components/Channel/Channel.js.map +1 -1
  19. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js +0 -2
  20. package/lib/commonjs/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  21. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js +2 -0
  22. package/lib/commonjs/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  23. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js +16 -4
  24. package/lib/commonjs/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
  25. package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js +12 -7
  26. package/lib/commonjs/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
  27. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js +10 -6
  28. package/lib/commonjs/components/ChannelPreview/ChannelPreview.js.map +1 -1
  29. package/lib/commonjs/components/ImageGallery/ImageGallery.js +38 -30
  30. package/lib/commonjs/components/ImageGallery/ImageGallery.js.map +1 -1
  31. package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js +11 -10
  32. package/lib/commonjs/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
  33. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js +2 -2
  34. package/lib/commonjs/components/ImageGallery/components/ImageGrid.js.map +1 -1
  35. package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js +6 -0
  36. package/lib/commonjs/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
  37. package/lib/commonjs/components/Message/Message.js +7 -7
  38. package/lib/commonjs/components/Message/Message.js.map +1 -1
  39. package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js +7 -3
  40. package/lib/commonjs/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
  41. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js +1 -1
  42. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
  43. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js +1 -1
  44. package/lib/commonjs/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -1
  45. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js +1 -1
  46. package/lib/commonjs/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  47. package/lib/commonjs/components/MessageInput/FileUploadPreview.js +38 -44
  48. package/lib/commonjs/components/MessageInput/FileUploadPreview.js.map +1 -1
  49. package/lib/commonjs/components/MessageList/MessageList.js +5 -5
  50. package/lib/commonjs/components/MessageList/MessageList.js.map +1 -1
  51. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js +10 -9
  52. package/lib/commonjs/components/MessageOverlay/MessageOverlay.js.map +1 -1
  53. package/lib/commonjs/components/index.js +13 -13
  54. package/lib/commonjs/components/index.js.map +1 -1
  55. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js +13 -14
  56. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  57. package/lib/commonjs/contexts/imageGalleryContext/ImageGalleryContext.md +1 -1
  58. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js +2 -2
  59. package/lib/commonjs/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  60. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +0 -2
  61. package/lib/commonjs/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  62. package/lib/commonjs/contexts/messagesContext/MessagesContext.js +2 -2
  63. package/lib/commonjs/contexts/messagesContext/MessagesContext.js.map +1 -1
  64. package/lib/commonjs/contexts/themeContext/utils/theme.js +2 -2
  65. package/lib/commonjs/contexts/themeContext/utils/theme.js.map +1 -1
  66. package/lib/commonjs/index.js +13 -1
  67. package/lib/commonjs/index.js.map +1 -1
  68. package/lib/commonjs/mock-builders/DB/mock.js +1 -13
  69. package/lib/commonjs/mock-builders/DB/mock.js.map +1 -1
  70. package/lib/commonjs/mock-builders/event/messageNew.js +2 -0
  71. package/lib/commonjs/mock-builders/event/messageNew.js.map +1 -1
  72. package/lib/commonjs/store/QuickSqliteClient.js +7 -3
  73. package/lib/commonjs/store/QuickSqliteClient.js.map +1 -1
  74. package/lib/commonjs/store/apis/getChannels.js +2 -15
  75. package/lib/commonjs/store/apis/getChannels.js.map +1 -1
  76. package/lib/commonjs/store/apis/getChannelsForFilterSort.js +37 -0
  77. package/lib/commonjs/store/apis/getChannelsForFilterSort.js.map +1 -0
  78. package/lib/commonjs/store/apis/index.js +264 -0
  79. package/lib/commonjs/store/apis/index.js.map +1 -0
  80. package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js +1 -1
  81. package/lib/commonjs/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
  82. package/lib/commonjs/store/apis/queries/selectChannels.js +2 -2
  83. package/lib/commonjs/store/apis/queries/selectChannels.js.map +1 -1
  84. package/lib/commonjs/store/sqlite-utils/appendWhereCluase.js +1 -2
  85. package/lib/commonjs/store/sqlite-utils/appendWhereCluase.js.map +1 -1
  86. package/lib/commonjs/test-utils/BetterSqlite.js +54 -0
  87. package/lib/commonjs/test-utils/BetterSqlite.js.map +1 -0
  88. package/lib/commonjs/version.json +1 -1
  89. package/lib/module/components/{MessageInput/AudioAttachmentUploadPreview.js → Attachment/AudioAttachment.js} +38 -64
  90. package/lib/module/components/Attachment/AudioAttachment.js.map +1 -0
  91. package/lib/module/components/Attachment/Card.js +1 -0
  92. package/lib/module/components/Attachment/Card.js.map +1 -1
  93. package/lib/module/components/Attachment/FileAttachment.js +16 -7
  94. package/lib/module/components/Attachment/FileAttachment.js.map +1 -1
  95. package/lib/module/components/Attachment/FileAttachmentGroup.js +132 -12
  96. package/lib/module/components/Attachment/FileAttachmentGroup.js.map +1 -1
  97. package/lib/module/components/Attachment/Gallery.js +41 -35
  98. package/lib/module/components/Attachment/Gallery.js.map +1 -1
  99. package/lib/module/components/Attachment/Giphy.js +17 -13
  100. package/lib/module/components/Attachment/Giphy.js.map +1 -1
  101. package/lib/module/components/Attachment/VideoThumbnail.js +12 -6
  102. package/lib/module/components/Attachment/VideoThumbnail.js.map +1 -1
  103. package/lib/module/components/Attachment/utils/getGiphyMimeType.js +15 -0
  104. package/lib/module/components/Attachment/utils/getGiphyMimeType.js.map +1 -0
  105. package/lib/module/components/Channel/Channel.js +19 -19
  106. package/lib/module/components/Channel/Channel.js.map +1 -1
  107. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js +0 -2
  108. package/lib/module/components/Channel/hooks/useCreateInputMessageInputContext.js.map +1 -1
  109. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js +2 -0
  110. package/lib/module/components/Channel/hooks/useCreateMessagesContext.js.map +1 -1
  111. package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js +16 -4
  112. package/lib/module/components/ChannelList/hooks/listeners/useNewMessage.js.map +1 -1
  113. package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js +12 -7
  114. package/lib/module/components/ChannelList/hooks/usePaginatedChannels.js.map +1 -1
  115. package/lib/module/components/ChannelPreview/ChannelPreview.js +10 -6
  116. package/lib/module/components/ChannelPreview/ChannelPreview.js.map +1 -1
  117. package/lib/module/components/ImageGallery/ImageGallery.js +38 -30
  118. package/lib/module/components/ImageGallery/ImageGallery.js.map +1 -1
  119. package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js +11 -10
  120. package/lib/module/components/ImageGallery/components/ImageGalleryVideoControl.js.map +1 -1
  121. package/lib/module/components/ImageGallery/components/ImageGrid.js +2 -2
  122. package/lib/module/components/ImageGallery/components/ImageGrid.js.map +1 -1
  123. package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js +6 -0
  124. package/lib/module/components/ImageGallery/hooks/useImageGalleryGestures.js.map +1 -1
  125. package/lib/module/components/Message/Message.js +7 -7
  126. package/lib/module/components/Message/Message.js.map +1 -1
  127. package/lib/module/components/Message/MessageSimple/MessageTextContainer.js +7 -3
  128. package/lib/module/components/Message/MessageSimple/MessageTextContainer.js.map +1 -1
  129. package/lib/module/components/Message/MessageSimple/utils/parseLinks.js +1 -1
  130. package/lib/module/components/Message/MessageSimple/utils/parseLinks.js.map +1 -1
  131. package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js +1 -1
  132. package/lib/module/components/Message/MessageSimple/utils/parseLinks.test.js.map +1 -1
  133. package/lib/module/components/Message/MessageSimple/utils/renderText.js +1 -1
  134. package/lib/module/components/Message/MessageSimple/utils/renderText.js.map +1 -1
  135. package/lib/module/components/MessageInput/FileUploadPreview.js +38 -44
  136. package/lib/module/components/MessageInput/FileUploadPreview.js.map +1 -1
  137. package/lib/module/components/MessageList/MessageList.js +5 -5
  138. package/lib/module/components/MessageList/MessageList.js.map +1 -1
  139. package/lib/module/components/MessageOverlay/MessageOverlay.js +10 -9
  140. package/lib/module/components/MessageOverlay/MessageOverlay.js.map +1 -1
  141. package/lib/module/components/index.js +13 -13
  142. package/lib/module/components/index.js.map +1 -1
  143. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js +13 -14
  144. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.js.map +1 -1
  145. package/lib/module/contexts/imageGalleryContext/ImageGalleryContext.md +1 -1
  146. package/lib/module/contexts/messageInputContext/MessageInputContext.js +2 -2
  147. package/lib/module/contexts/messageInputContext/MessageInputContext.js.map +1 -1
  148. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js +0 -2
  149. package/lib/module/contexts/messageInputContext/hooks/useCreateMessageInputContext.js.map +1 -1
  150. package/lib/module/contexts/messagesContext/MessagesContext.js +2 -2
  151. package/lib/module/contexts/messagesContext/MessagesContext.js.map +1 -1
  152. package/lib/module/contexts/themeContext/utils/theme.js +2 -2
  153. package/lib/module/contexts/themeContext/utils/theme.js.map +1 -1
  154. package/lib/module/index.js +13 -1
  155. package/lib/module/index.js.map +1 -1
  156. package/lib/module/mock-builders/DB/mock.js +1 -13
  157. package/lib/module/mock-builders/DB/mock.js.map +1 -1
  158. package/lib/module/mock-builders/event/messageNew.js +2 -0
  159. package/lib/module/mock-builders/event/messageNew.js.map +1 -1
  160. package/lib/module/store/QuickSqliteClient.js +7 -3
  161. package/lib/module/store/QuickSqliteClient.js.map +1 -1
  162. package/lib/module/store/apis/getChannels.js +2 -15
  163. package/lib/module/store/apis/getChannels.js.map +1 -1
  164. package/lib/module/store/apis/getChannelsForFilterSort.js +37 -0
  165. package/lib/module/store/apis/getChannelsForFilterSort.js.map +1 -0
  166. package/lib/module/store/apis/index.js +264 -0
  167. package/lib/module/store/apis/index.js.map +1 -0
  168. package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js +1 -1
  169. package/lib/module/store/apis/queries/selectChannelIdsForFilterSort.js.map +1 -1
  170. package/lib/module/store/apis/queries/selectChannels.js +2 -2
  171. package/lib/module/store/apis/queries/selectChannels.js.map +1 -1
  172. package/lib/module/store/sqlite-utils/appendWhereCluase.js +1 -2
  173. package/lib/module/store/sqlite-utils/appendWhereCluase.js.map +1 -1
  174. package/lib/module/test-utils/BetterSqlite.js +54 -0
  175. package/lib/module/test-utils/BetterSqlite.js.map +1 -0
  176. package/lib/module/version.json +1 -1
  177. package/lib/typescript/components/Attachment/AudioAttachment.d.ts +23 -0
  178. package/lib/typescript/components/Attachment/FileAttachmentGroup.d.ts +1 -1
  179. package/lib/typescript/components/Attachment/Gallery.d.ts +1 -1
  180. package/lib/typescript/components/Attachment/Giphy.d.ts +1 -1
  181. package/lib/typescript/components/Attachment/utils/getGiphyMimeType.d.ts +6 -0
  182. package/lib/typescript/components/Channel/Channel.d.ts +1 -1
  183. package/lib/typescript/components/Channel/hooks/useCreateInputMessageInputContext.d.ts +1 -1
  184. package/lib/typescript/components/Channel/hooks/useCreateMessagesContext.d.ts +1 -1
  185. package/lib/typescript/components/ImageGallery/components/ImageGrid.d.ts +1 -1
  186. package/lib/typescript/components/ImageGallery/hooks/useImageGalleryGestures.d.ts +2 -1
  187. package/lib/typescript/components/Message/Message.d.ts +9 -3
  188. package/lib/typescript/components/MessageInput/FileUploadPreview.d.ts +1 -1
  189. package/lib/typescript/components/MessageList/MessageList.d.ts +1 -1
  190. package/lib/typescript/components/index.d.ts +1 -1
  191. package/lib/typescript/contexts/imageGalleryContext/ImageGalleryContext.d.ts +9 -10
  192. package/lib/typescript/contexts/messageContext/MessageContext.d.ts +1 -1
  193. package/lib/typescript/contexts/messageInputContext/MessageInputContext.d.ts +1 -4
  194. package/lib/typescript/contexts/messageInputContext/hooks/useCreateMessageInputContext.d.ts +1 -1
  195. package/lib/typescript/contexts/messagesContext/MessagesContext.d.ts +3 -0
  196. package/lib/typescript/contexts/themeContext/utils/theme.d.ts +2 -2
  197. package/lib/typescript/index.d.ts +2 -0
  198. package/lib/typescript/store/QuickSqliteClient.d.ts +4 -0
  199. package/lib/typescript/store/apis/getChannels.d.ts +13 -5
  200. package/lib/typescript/store/apis/getChannelsForFilterSort.d.ts +17 -0
  201. package/lib/typescript/store/apis/index.d.ts +20 -0
  202. package/lib/typescript/store/apis/queries/selectChannelIdsForFilterSort.d.ts +10 -1
  203. package/lib/typescript/{__tests__/utils → test-utils}/BetterSqlite.d.ts +1 -1
  204. package/package.json +5 -4
  205. package/src/__tests__/offline-feature.test.js +1 -2
  206. package/src/components/{MessageInput/AudioAttachmentUploadPreview.tsx → Attachment/AudioAttachment.tsx} +82 -131
  207. package/src/components/Attachment/Card.tsx +1 -0
  208. package/src/components/Attachment/FileAttachment.tsx +3 -0
  209. package/src/components/Attachment/FileAttachmentGroup.tsx +119 -9
  210. package/src/components/Attachment/Gallery.tsx +30 -19
  211. package/src/components/Attachment/Giphy.tsx +15 -8
  212. package/src/components/Attachment/VideoThumbnail.tsx +3 -2
  213. package/src/components/Attachment/utils/getGiphyMimeType.ts +13 -0
  214. package/src/components/Channel/Channel.tsx +5 -4
  215. package/src/components/Channel/hooks/useCreateInputMessageInputContext.ts +0 -2
  216. package/src/components/Channel/hooks/useCreateMessagesContext.ts +2 -0
  217. package/src/components/ChannelList/__tests__/ChannelList.test.js +28 -0
  218. package/src/components/ChannelList/hooks/listeners/useNewMessage.ts +18 -5
  219. package/src/components/ChannelList/hooks/usePaginatedChannels.ts +19 -10
  220. package/src/components/ChannelPreview/ChannelPreview.tsx +6 -3
  221. package/src/components/ImageGallery/ImageGallery.tsx +32 -19
  222. package/src/components/ImageGallery/__tests__/ImageGallery.test.tsx +6 -6
  223. package/src/components/ImageGallery/__tests__/ImageGalleryFooter.test.tsx +3 -3
  224. package/src/components/ImageGallery/__tests__/ImageGalleryGrid.test.tsx +3 -3
  225. package/src/components/ImageGallery/__tests__/ImageGalleryHeader.test.tsx +3 -3
  226. package/src/components/ImageGallery/components/ImageGalleryVideoControl.tsx +12 -7
  227. package/src/components/ImageGallery/components/ImageGrid.tsx +3 -3
  228. package/src/components/ImageGallery/hooks/useImageGalleryGestures.tsx +16 -0
  229. package/src/components/Message/Message.tsx +10 -2
  230. package/src/components/Message/MessageSimple/MessageTextContainer.tsx +22 -2
  231. package/src/components/Message/MessageSimple/__tests__/MessageContent.test.js +4 -2
  232. package/src/components/Message/MessageSimple/__tests__/__snapshots__/MessageAvatar.test.js.snap +1 -0
  233. package/src/components/Message/MessageSimple/utils/parseLinks.test.ts +4 -0
  234. package/src/components/Message/MessageSimple/utils/parseLinks.ts +1 -1
  235. package/src/components/Message/MessageSimple/utils/renderText.tsx +1 -1
  236. package/src/components/MessageInput/FileUploadPreview.tsx +34 -26
  237. package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewExpo.test.tsx +15 -8
  238. package/src/components/MessageInput/__tests__/AudioAttachmentUploadPreviewNative.test.tsx +15 -8
  239. package/src/components/MessageInput/__tests__/FileUploadPreview.test.js +5 -5
  240. package/src/components/MessageList/MessageList.tsx +6 -6
  241. package/src/components/MessageOverlay/MessageOverlay.tsx +1 -0
  242. package/src/components/Thread/__tests__/__snapshots__/Thread.test.js.snap +4 -0
  243. package/src/components/index.ts +1 -1
  244. package/src/contexts/imageGalleryContext/ImageGalleryContext.md +1 -1
  245. package/src/contexts/imageGalleryContext/ImageGalleryContext.tsx +19 -14
  246. package/src/contexts/messageInputContext/MessageInputContext.tsx +0 -6
  247. package/src/contexts/messageInputContext/hooks/useCreateMessageInputContext.ts +0 -2
  248. package/src/contexts/messagesContext/MessagesContext.tsx +3 -0
  249. package/src/contexts/themeContext/utils/theme.ts +4 -4
  250. package/src/index.ts +3 -0
  251. package/src/mock-builders/DB/mock.ts +4 -9
  252. package/src/mock-builders/event/messageNew.js +2 -0
  253. package/src/store/QuickSqliteClient.ts +11 -7
  254. package/src/store/apis/getChannels.ts +17 -14
  255. package/src/store/apis/getChannelsForFilterSort.ts +45 -0
  256. package/src/store/apis/index.ts +20 -0
  257. package/src/store/apis/queries/selectChannelIdsForFilterSort.ts +12 -2
  258. package/src/store/apis/queries/selectChannels.ts +9 -3
  259. package/src/store/sqlite-utils/appendWhereCluase.ts +1 -2
  260. package/src/{__tests__/utils → test-utils}/BetterSqlite.js +1 -1
  261. package/src/version.json +1 -1
  262. package/lib/commonjs/components/MessageInput/AudioAttachmentUploadPreview.js.map +0 -1
  263. package/lib/module/components/MessageInput/AudioAttachmentUploadPreview.js.map +0 -1
  264. package/lib/typescript/components/MessageInput/AudioAttachmentUploadPreview.d.ts +0 -26
@@ -1 +1 @@
1
- {"version":3,"sources":["MessagesContext.tsx"],"names":["MessagesContext","React","createContext","DEFAULT_BASE_CONTEXT_VALUE","MessagesProvider","children","value","useMessagesContext","contextValue","Error","withMessagesContext","Component","WithMessagesContextComponent","props","messagesContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAsDA;;AAEA;;AACA;;;;;;;;;AAyaO,IAAMA,eAAe,GAAGC,kBAAMC,aAAN,CAC7BC,mDAD6B,CAAxB;;;;AAIA,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,GAE3B;AACL,MAAMC,YAAY,GAAG,uBACnBR,eADmB,CAArB;;AAIA,MAAIQ,YAAY,KAAKL,mDAAjB,IAA+C,CAAC,2CAApD,EAAyE;AACvE,UAAM,IAAIM,KAAJ,yOAAN;AAGD;;AAED,SAAOD,YAAP;AACD,CAdM;;;;AAqBA,IAAME,mBAAmB,GAAG,SAAtBA,mBAAsB,CAIjCC,SAJiC,EAKqC;AACtE,MAAMC,4BAA4B,GAAG,SAA/BA,4BAA+B,CACnCC,KADmC,EAEhC;AACH,QAAMC,eAAe,GAAGP,kBAAkB,EAA1C;AAEA,WAAO,gCAAC,SAAD,gCAAgBM,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 { ImageLoadingFailedIndicatorProps } from 'src/components/Attachment/ImageLoadingFailedIndicator';\nimport type { ImageLoadingIndicatorProps } from 'src/components/Attachment/ImageLoadingIndicator';\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 { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\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 /**\n * The indicator rendered when loading an image fails.\n */\n ImageLoadingFailedIndicator: React.ComponentType<ImageLoadingFailedIndicatorProps>;\n\n /**\n * The indicator rendered when image is loading. By default renders <ActivityIndicator/>\n */\n ImageLoadingIndicator: React.ComponentType<ImageLoadingIndicatorProps>;\n\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\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.io/chat/docs/sdk/reactnative/ui-components/message-system/)\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.io/chat/docs/sdk/reactnative/ui-components/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.io/chat/docs/sdk/reactnative/ui-components/scroll-to-bottom-button/)\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.io/chat/docs/sdk/reactnative/ui-components/typing-indicator/)\n */\n TypingIndicator: React.ComponentType;\n /**\n * UI component for TypingIndicatorContainer\n * Defaults to: [TypingIndicatorContainer](https://getstream.io/chat/docs/sdk/reactnative/contexts/messages-context/#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(\n DEFAULT_BASE_CONTEXT_VALUE as MessagesContextValue,\n);\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>() => {\n const contextValue = useContext(\n MessagesContext,\n ) as unknown as MessagesContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useMessagesContext hook was called outside of the MessagesContext provider. Make sure you have configured MessageList component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#message-list`,\n );\n }\n\n return contextValue;\n};\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","DEFAULT_BASE_CONTEXT_VALUE","MessagesProvider","children","value","useMessagesContext","contextValue","Error","withMessagesContext","Component","WithMessagesContextComponent","props","messagesContext","displayName"],"mappings":";;;;;;;;;;;AAAA;;AAuDA;;AAEA;;AACA;;;;;;;;;AA2aO,IAAMA,eAAe,GAAGC,kBAAMC,aAAN,CAC7BC,mDAD6B,CAAxB;;;;AAIA,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,GAE3B;AACL,MAAMC,YAAY,GAAG,uBACnBR,eADmB,CAArB;;AAIA,MAAIQ,YAAY,KAAKL,mDAAjB,IAA+C,CAAC,2CAApD,EAAyE;AACvE,UAAM,IAAIM,KAAJ,yOAAN;AAGD;;AAED,SAAOD,YAAP;AACD,CAdM;;;;AAqBA,IAAME,mBAAmB,GAAG,SAAtBA,mBAAsB,CAIjCC,SAJiC,EAKqC;AACtE,MAAMC,4BAA4B,GAAG,SAA/BA,4BAA+B,CACnCC,KADmC,EAEhC;AACH,QAAMC,eAAe,GAAGP,kBAAkB,EAA1C;AAEA,WAAO,gCAAC,SAAD,gCAAgBM,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 { ImageLoadingFailedIndicatorProps } from 'src/components/Attachment/ImageLoadingFailedIndicator';\nimport type { ImageLoadingIndicatorProps } from 'src/components/Attachment/ImageLoadingIndicator';\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 { AudioAttachmentProps } from '../../components/Attachment/AudioAttachment';\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 { DEFAULT_BASE_CONTEXT_VALUE } from '../utils/defaultBaseContextValue';\n\nimport { getDisplayName } from '../utils/getDisplayName';\nimport { isTestEnvironment } from '../utils/isTestEnvironment';\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 /** Custom UI component for AudioAttachment. */\n AudioAttachment: React.ComponentType<AudioAttachmentProps>;\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 /**\n * The indicator rendered when loading an image fails.\n */\n ImageLoadingFailedIndicator: React.ComponentType<ImageLoadingFailedIndicatorProps>;\n\n /**\n * The indicator rendered when image is loading. By default renders <ActivityIndicator/>\n */\n ImageLoadingIndicator: React.ComponentType<ImageLoadingIndicatorProps>;\n\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\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.io/chat/docs/sdk/reactnative/ui-components/message-system/)\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.io/chat/docs/sdk/reactnative/ui-components/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.io/chat/docs/sdk/reactnative/ui-components/scroll-to-bottom-button/)\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.io/chat/docs/sdk/reactnative/ui-components/typing-indicator/)\n */\n TypingIndicator: React.ComponentType;\n /**\n * UI component for TypingIndicatorContainer\n * Defaults to: [TypingIndicatorContainer](https://getstream.io/chat/docs/sdk/reactnative/contexts/messages-context/#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(\n DEFAULT_BASE_CONTEXT_VALUE as MessagesContextValue,\n);\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>() => {\n const contextValue = useContext(\n MessagesContext,\n ) as unknown as MessagesContextValue<StreamChatGenerics>;\n\n if (contextValue === DEFAULT_BASE_CONTEXT_VALUE && !isTestEnvironment()) {\n throw new Error(\n `The useMessagesContext hook was called outside of the MessagesContext provider. Make sure you have configured MessageList component correctly - https://getstream.io/chat/docs/sdk/reactnative/basics/hello_stream_chat/#message-list`,\n );\n }\n\n return contextValue;\n};\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"]}
@@ -223,12 +223,12 @@ var defaultTheme = {
223
223
  editingBoxHeaderTitle: {}
224
224
  },
225
225
  fileUploadPreview: {
226
- audioAttachmentFileContainer: {},
227
- audioAttachmentUploadPreview: {
226
+ audioAttachment: {
228
227
  progressControlView: {},
229
228
  progressDurationText: {},
230
229
  roundedView: {}
231
230
  },
231
+ audioAttachmentFileContainer: {},
232
232
  dismiss: {},
233
233
  fileContainer: {},
234
234
  fileContentContainer: {},
@@ -1 +1 @@
1
- {"version":3,"sources":["theme.ts"],"names":["DEFAULT_STATUS_ICON_SIZE","Colors","accent_blue","accent_green","accent_red","bg_gradient_end","bg_gradient_start","black","blue_alice","border","grey","grey_dark","grey_gainsboro","grey_whisper","icon_background","label_bg_transparent","light_gray","modal_shadow","overlay","shadow_icon","static_black","static_white","targetedMessageBackground","transparent","white","white_smoke","white_snow","defaultTheme","attachmentPicker","bottomSheetContentContainer","durationText","errorButtonText","errorContainer","errorText","image","imageOverlay","imageOverlaySelectedComponent","check","attachmentSelectionBar","container","icon","avatar","BASE_AVATAR_SIZE","borderRadius","height","width","presenceIndicator","cx","cy","r","strokeWidth","presenceIndicatorContainer","channel","selectChannel","channelListFooterLoadingIndicator","channelListHeaderErrorIndicator","channelListLoadingIndicator","channelListMessenger","flatList","flatListContent","channelListSkeleton","animationTime","background","gradientStart","stopOpacity","gradientStop","channelPreview","checkAllIcon","checkIcon","contentContainer","date","message","fontWeight","mutedStatus","iconStyle","row","title","unreadContainer","unreadText","colors","dateHeader","text","emptyStateIndicator","channelContainer","channelDetails","channelTitle","groupAvatar","resizeMode","iconBadge","iconInner","unreadCount","iconSquare","imageGallery","footer","centerContainer","imageCountText","innerContainer","leftContainer","rightContainer","grid","gridAvatar","gridAvatarWrapper","gridImage","handle","handleText","header","dateText","usernameText","videoControl","durationTextStyle","roundedView","videoContainer","inlineDateSeparator","loadingDots","loadingDot","spacing","loadingErrorIndicator","retryText","loadingIndicator","loadingText","messageInput","attachButton","attachButtonContainer","autoCompleteInputContainer","commandsButton","commandsButtonContainer","composerContainer","cooldownTimer","editingBoxContainer","editingBoxHeader","editingBoxHeaderTitle","editingStateHeader","fileUploadPreview","audioAttachmentFileContainer","audioAttachmentUploadPreview","progressControlView","progressDurationText","dismiss","fileContainer","fileContentContainer","filenameText","fileSizeText","fileTextContainer","giphyCommandInput","giphyContainer","giphyText","imageUploadPreview","itemContainer","upload","inputBox","inputBoxContainer","moreOptionsButton","optionsContainer","replyContainer","sendButton","sendButtonContainer","sendMessageDisallowedIndicator","showThreadMessageInChannelButton","checkBoxActive","checkBoxInactive","suggestions","command","args","iconContainer","maxHeight","emoji","item","mention","avatarSize","column","name","tag","suggestionsListContainer","flatlist","uploadProgressIndicator","messageList","errorNotification","errorNotificationText","inlineUnreadIndicator","listContainer","messageSystem","line","textContainer","scrollToBottomButton","touchable","unreadCountNotificationContainer","unreadCountNotificationText","wrapper","typingIndicatorContainer","messageSimple","actions","button","buttonText","avatarWrapper","leftAlign","marginRight","rightAlign","marginLeft","spacer","card","authorName","authorNameContainer","authorNameFooter","authorNameFooterContainer","authorNameMask","cover","description","noURI","borderLeftWidth","paddingLeft","playButtonStyle","playIcon","content","borderRadiusL","borderRadiusS","containerInner","deletedContainer","deletedContainerInner","deletedMetaText","paddingHorizontal","deletedText","em","fontSize","fontStyle","paddingRight","paddingTop","errorIcon","errorIconContainer","bottom","position","right","eyeIcon","markdown","messageUser","metaContainer","flexDirection","marginTop","metaText","replyBorder","onlyEmojiMarkdown","file","details","fileSize","fileAttachmentGroup","gallery","galleryContainer","galleryItemColumn","gridHeight","gridWidth","imageContainer","maxWidth","minHeight","minWidth","moreImagesContainer","moreImagesText","giphy","buttonContainer","cancel","giphyHeaderText","giphyHeaderTitle","giphyMask","giphyMaskText","selectionContainer","send","shuffle","pinnedHeader","label","reactionList","middleIcon","radius","reactionBubble","reactionBubbleBackground","reactionSize","strokeSize","replies","avatarContainerMultiple","avatarContainerSingle","leftAvatarsContainer","leftCurve","messageRepliesText","rightAvatarsContainer","rightCurve","status","readByCount","statusContainer","timeIcon","targetedMessageUnderlay","videoThumbnail","messageActions","actionContainer","padding","reactions","avatarContainer","avatarName","flatListContainer","reactionsList","reaction","reply","fileAttachmentContainer","imageAttachment","markdownStyles","messageContainer","screenPadding","spinner","thread","newThread","typingIndicator"],"mappings":";;;;;;;;;AAIA;;AAEO,IAAMA,wBAAwB,GAAG,EAAjC;;AAEA,IAAMC,MAAM,GAAG;AACpBC,EAAAA,WAAW,EAAE,SADO;AAEpBC,EAAAA,YAAY,EAAE,SAFM;AAGpBC,EAAAA,UAAU,EAAE,SAHQ;AAIpBC,EAAAA,eAAe,EAAE,SAJG;AAKpBC,EAAAA,iBAAiB,EAAE,SALC;AAMpBC,EAAAA,KAAK,EAAE,SANa;AAOpBC,EAAAA,UAAU,EAAE,SAPQ;AAQpBC,EAAAA,MAAM,EAAE,WARY;AASpBC,EAAAA,IAAI,EAAE,SATc;AAUpBC,EAAAA,SAAS,EAAE,SAVS;AAWpBC,EAAAA,cAAc,EAAE,SAXI;AAYpBC,EAAAA,YAAY,EAAE,SAZM;AAapBC,EAAAA,eAAe,EAAE,SAbG;AAcpBC,EAAAA,oBAAoB,EAAE,WAdF;AAepBC,EAAAA,UAAU,EAAE,SAfQ;AAgBpBC,EAAAA,YAAY,EAAE,WAhBM;AAiBpBC,EAAAA,OAAO,EAAE,WAjBW;AAkBpBC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EAAE;AADG;AADL,GA5gByB;AAihBjCiO,EAAAA,eAAe,EAAE;AACf3Q,IAAAA,SAAS,EAAE,EADI;AAEf0C,IAAAA,IAAI,EAAE;AACJ6I,MAAAA,QAAQ,EAAE;AADN;AAFS;AAjhBgB,CAA5B","sourcesContent":["import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';\nimport type { CircleProps, Color, StopProps } from 'react-native-svg';\n\nimport type { IconProps } from '../../../icons/utils/base';\nimport { vh } from '../../../utils/utils';\n\nexport const DEFAULT_STATUS_ICON_SIZE = 16;\n\nexport const Colors = {\n accent_blue: '#005FFF',\n accent_green: '#20E070',\n accent_red: '#FF3742',\n bg_gradient_end: '#F7F7F7',\n bg_gradient_start: '#FCFCFC',\n black: '#000000',\n blue_alice: '#E9F2FF',\n border: '#00000014', // 14 = 8% opacity; top: x=0, y=-1; bottom: x=0, y=1\n grey: '#7A7A7A',\n grey_dark: '#72767E',\n grey_gainsboro: '#DBDBDB',\n grey_whisper: '#ECEBEB',\n icon_background: '#FFFFFF',\n label_bg_transparent: '#00000033', // 33 = 20% opacity\n light_gray: '#DBDDE1',\n modal_shadow: '#00000099', // 99 = 60% opacity; x=0, y= 1, radius=4\n overlay: '#000000CC', // CC = 80% opacity\n shadow_icon: '#00000040', // 40 = 25% opacity; x=0, y=0, radius=4\n static_black: '#000000',\n static_white: '#ffffff',\n targetedMessageBackground: '#FBF4DD', // dark mode = #302D22\n transparent: 'transparent',\n white: '#FFFFFF',\n white_smoke: '#F2F2F2',\n white_snow: '#FCFCFC',\n};\n\nexport type MarkdownStyle = Partial<{\n autolink: TextStyle;\n blockQuoteBar: ViewStyle;\n blockQuoteSection: ViewStyle;\n blockQuoteSectionBar: ViewStyle;\n blockQuoteText: TextStyle | ViewStyle;\n br: TextStyle;\n codeBlock: TextStyle;\n del: TextStyle;\n em: TextStyle;\n heading: TextStyle;\n heading1: TextStyle;\n heading2: TextStyle;\n heading3: TextStyle;\n heading4: TextStyle;\n heading5: TextStyle;\n heading6: TextStyle;\n hr: ViewStyle;\n image: ImageStyle;\n inlineCode: TextStyle;\n list: ViewStyle;\n listItem: ViewStyle;\n listItemBullet: TextStyle;\n listItemNumber: TextStyle;\n listItemText: TextStyle;\n listRow: ViewStyle;\n mailTo: TextStyle;\n mentions: TextStyle;\n newline: TextStyle;\n noMargin: TextStyle;\n paragraph: TextStyle;\n paragraphCenter: TextStyle;\n paragraphWithImage: ViewStyle;\n strong: TextStyle;\n sublist: ViewStyle;\n table: ViewStyle;\n tableHeader: ViewStyle;\n tableHeaderCell: TextStyle;\n tableRow: ViewStyle;\n tableRowCell: ViewStyle;\n tableRowLast: ViewStyle;\n text: TextStyle;\n u: TextStyle;\n view: ViewStyle;\n}>;\n\nexport type Theme = {\n attachmentPicker: {\n bottomSheetContentContainer: ViewStyle;\n durationText: TextStyle;\n errorButtonText: TextStyle;\n errorContainer: ViewStyle;\n errorText: TextStyle;\n image: ViewStyle;\n imageOverlay: ViewStyle;\n imageOverlaySelectedComponent: {\n check: ViewStyle;\n };\n };\n attachmentSelectionBar: {\n container: ViewStyle;\n icon: ViewStyle;\n };\n avatar: {\n BASE_AVATAR_SIZE: number;\n container: ViewStyle;\n image: ImageStyle;\n presenceIndicator: CircleProps;\n presenceIndicatorContainer: ViewStyle;\n };\n channel: {\n selectChannel: TextStyle;\n };\n channelListFooterLoadingIndicator: {\n container: ViewStyle;\n };\n channelListHeaderErrorIndicator: {\n container: ViewStyle;\n errorText: TextStyle;\n };\n channelListLoadingIndicator: {\n container: ViewStyle;\n };\n channelListMessenger: {\n flatList: ViewStyle;\n flatListContent: ViewStyle;\n };\n channelListSkeleton: {\n animationTime: number;\n background: ViewStyle;\n container: ViewStyle;\n gradientStart: StopProps;\n gradientStop: StopProps;\n height: number;\n maskFillColor?: Color;\n };\n channelPreview: {\n checkAllIcon: IconProps;\n checkIcon: IconProps;\n container: ViewStyle;\n contentContainer: ViewStyle;\n date: TextStyle;\n message: TextStyle & {\n fontWeight: TextStyle['fontWeight'];\n };\n mutedStatus: {\n height: number;\n iconStyle: ViewStyle;\n width: number;\n };\n row: ViewStyle;\n title: TextStyle;\n unreadContainer: ViewStyle;\n unreadText: TextStyle;\n };\n colors: typeof Colors & { [key: string]: string };\n dateHeader: {\n container: ViewStyle;\n text: TextStyle;\n };\n emptyStateIndicator: {\n channelContainer: ViewStyle;\n channelDetails: TextStyle;\n channelTitle: TextStyle;\n };\n groupAvatar: {\n container: ViewStyle;\n image: ImageStyle;\n };\n iconBadge: {\n icon: ViewStyle;\n iconInner: ViewStyle;\n unreadCount: TextStyle;\n };\n iconSquare: {\n container: ViewStyle;\n image: ImageStyle;\n };\n imageGallery: {\n footer: {\n centerContainer: ViewStyle;\n container: ViewStyle;\n imageCountText: TextStyle;\n innerContainer: ViewStyle;\n leftContainer: ViewStyle;\n rightContainer: ViewStyle;\n };\n grid: {\n contentContainer: ViewStyle;\n gridAvatar: ImageStyle;\n gridAvatarWrapper: ViewStyle;\n gridImage: ViewStyle;\n handle: ViewStyle;\n handleText: TextStyle;\n overlay: ViewStyle;\n };\n header: {\n centerContainer: ViewStyle;\n container: ViewStyle;\n dateText: TextStyle;\n innerContainer: ViewStyle;\n leftContainer: ViewStyle;\n rightContainer: ViewStyle;\n usernameText: TextStyle;\n };\n videoControl: {\n durationTextStyle: TextStyle;\n roundedView: ViewStyle;\n videoContainer: ViewStyle;\n };\n backgroundColor?: string;\n pager?: ViewStyle;\n slide?: ImageStyle;\n };\n inlineDateSeparator: {\n container: ViewStyle;\n text: TextStyle;\n };\n loadingDots: {\n container: ViewStyle;\n loadingDot: ViewStyle;\n spacing: number;\n };\n loadingErrorIndicator: {\n container: ViewStyle;\n errorText: TextStyle;\n retryText: TextStyle;\n };\n loadingIndicator: {\n container: ViewStyle;\n loadingText: TextStyle;\n };\n messageInput: {\n attachButton: ViewStyle;\n attachButtonContainer: ViewStyle;\n attachmentSelectionBar: ViewStyle;\n autoCompleteInputContainer: ViewStyle;\n commandsButton: ViewStyle;\n commandsButtonContainer: ViewStyle;\n composerContainer: ViewStyle;\n container: ViewStyle;\n cooldownTimer: {\n container: ViewStyle;\n text: TextStyle;\n };\n editingBoxContainer: ViewStyle;\n editingBoxHeader: ViewStyle;\n editingBoxHeaderTitle: TextStyle;\n editingStateHeader: {\n editingBoxHeader: ViewStyle;\n editingBoxHeaderTitle: TextStyle;\n };\n fileUploadPreview: {\n audioAttachmentFileContainer: ViewStyle;\n audioAttachmentUploadPreview: {\n progressControlView: ViewStyle;\n progressDurationText: TextStyle;\n roundedView: ViewStyle;\n };\n dismiss: ViewStyle;\n fileContainer: ViewStyle;\n fileContentContainer: ViewStyle;\n filenameText: TextStyle;\n fileSizeText: TextStyle;\n fileTextContainer: ViewStyle;\n flatList: ViewStyle;\n };\n giphyCommandInput: {\n giphyContainer: ViewStyle;\n giphyText: TextStyle;\n };\n imageUploadPreview: {\n dismiss: ViewStyle;\n flatList: ViewStyle;\n itemContainer: ViewStyle;\n upload: ImageStyle;\n };\n inputBox: TextStyle;\n inputBoxContainer: ViewStyle;\n moreOptionsButton: ViewStyle;\n optionsContainer: ViewStyle;\n replyContainer: ViewStyle;\n sendButton: ViewStyle;\n sendButtonContainer: ViewStyle;\n sendMessageDisallowedIndicator: {\n container: ViewStyle;\n text: TextStyle;\n };\n showThreadMessageInChannelButton: {\n check: IconProps;\n checkBoxActive: ViewStyle;\n checkBoxInactive: ViewStyle;\n container: ViewStyle;\n innerContainer: ViewStyle;\n text: TextStyle;\n };\n suggestions: {\n command: {\n args: TextStyle;\n container: ViewStyle;\n iconContainer: ViewStyle;\n title: TextStyle;\n };\n container: ViewStyle & {\n maxHeight: number;\n };\n emoji: {\n container: ViewStyle;\n text: TextStyle;\n };\n header: {\n container: ViewStyle;\n title: TextStyle;\n };\n item: ViewStyle;\n mention: {\n avatarSize: number;\n column: ViewStyle;\n container: ViewStyle;\n name: TextStyle;\n tag: TextStyle;\n };\n };\n suggestionsListContainer: {\n container: ViewStyle;\n flatlist: ViewStyle;\n };\n uploadProgressIndicator: {\n container: ViewStyle;\n overlay: ViewStyle;\n };\n };\n messageList: {\n container: ViewStyle;\n contentContainer: ViewStyle;\n errorNotification: ViewStyle;\n errorNotificationText: TextStyle;\n inlineUnreadIndicator: {\n container: ViewStyle;\n text: TextStyle;\n };\n listContainer: ViewStyle;\n messageSystem: {\n container: ViewStyle;\n dateText: TextStyle;\n line: ViewStyle;\n text: TextStyle;\n textContainer: ViewStyle;\n };\n scrollToBottomButton: {\n container: ViewStyle;\n touchable: ViewStyle;\n unreadCountNotificationContainer: ViewStyle;\n unreadCountNotificationText: TextStyle;\n wrapper: ViewStyle;\n chevronColor?: Color;\n };\n typingIndicatorContainer: ViewStyle;\n };\n messageSimple: {\n actions: {\n button: ViewStyle & {\n defaultBackgroundColor?: ViewStyle['backgroundColor'];\n defaultBorderColor?: ViewStyle['borderColor'];\n primaryBackgroundColor?: ViewStyle['backgroundColor'];\n primaryBorderColor?: ViewStyle['borderColor'];\n };\n buttonText: TextStyle & {\n defaultColor?: TextStyle['color'];\n primaryColor?: TextStyle['color'];\n };\n container: ViewStyle;\n };\n avatarWrapper: {\n container: ViewStyle;\n leftAlign: ViewStyle;\n rightAlign: ViewStyle;\n spacer: ViewStyle;\n };\n card: {\n authorName: TextStyle;\n authorNameContainer: ViewStyle;\n authorNameFooter: TextStyle;\n authorNameFooterContainer: ViewStyle;\n authorNameMask: ViewStyle;\n container: ViewStyle;\n cover: ImageStyle;\n footer: ViewStyle & {\n description: TextStyle;\n title: TextStyle;\n };\n noURI: ViewStyle;\n playButtonStyle: {\n durationTextStyle: TextStyle;\n roundedView: ViewStyle;\n videoContainer: ViewStyle;\n };\n playIcon: IconProps;\n };\n container: ViewStyle;\n content: {\n container: ViewStyle & {\n borderRadiusL: ViewStyle['borderBottomLeftRadius' | 'borderTopLeftRadius'];\n borderRadiusS: ViewStyle['borderBottomRightRadius' | 'borderTopRightRadius'];\n };\n containerInner: ViewStyle;\n deletedContainer: ViewStyle;\n deletedContainerInner: ViewStyle;\n deletedMetaText: TextStyle;\n deletedText: MarkdownStyle;\n errorContainer: ViewStyle;\n errorIcon: IconProps;\n errorIconContainer: ViewStyle;\n eyeIcon: IconProps;\n /**\n * Available options for styling text:\n * https://github.com/andangrd/react-native-markdown-package/blob/main/styles.js\n */\n markdown: MarkdownStyle;\n messageUser: TextStyle;\n metaContainer: ViewStyle;\n metaText: TextStyle;\n replyBorder: ViewStyle;\n replyContainer: ViewStyle;\n textContainer: ViewStyle & {\n onlyEmojiMarkdown: MarkdownStyle;\n };\n wrapper: ViewStyle;\n };\n file: {\n container: ViewStyle;\n details: ViewStyle;\n fileSize: TextStyle;\n icon: IconProps;\n title: TextStyle;\n };\n fileAttachmentGroup: {\n container: ViewStyle;\n };\n gallery: {\n galleryContainer: ViewStyle;\n galleryItemColumn: ViewStyle;\n gridHeight: number;\n gridWidth: number;\n image: ImageStyle;\n imageContainer: ViewStyle;\n maxHeight: number;\n maxWidth: number;\n minHeight: number;\n minWidth: number;\n moreImagesContainer: ViewStyle;\n moreImagesText: TextStyle;\n };\n giphy: {\n buttonContainer: ViewStyle;\n cancel: TextStyle;\n container: ViewStyle;\n giphy: ImageStyle;\n giphyContainer: ViewStyle;\n giphyHeaderText: TextStyle;\n giphyHeaderTitle: TextStyle;\n giphyMask: ViewStyle;\n giphyMaskText: TextStyle;\n header: ViewStyle;\n selectionContainer: ViewStyle;\n send: TextStyle;\n shuffle: TextStyle;\n title: TextStyle;\n };\n loadingIndicator: {\n container: ViewStyle;\n roundedView: ViewStyle;\n };\n pinnedHeader: {\n container: ViewStyle;\n label: TextStyle;\n };\n reactionList: {\n container: ViewStyle;\n middleIcon: ViewStyle;\n radius: number;\n reactionBubble: ViewStyle;\n reactionBubbleBackground: ViewStyle;\n reactionSize: number;\n strokeSize: number;\n };\n replies: {\n avatar: ViewStyle;\n avatarContainerMultiple: ViewStyle;\n avatarContainerSingle: ViewStyle;\n container: ViewStyle;\n leftAvatarsContainer: ViewStyle;\n leftCurve: ViewStyle;\n messageRepliesText: TextStyle;\n rightAvatarsContainer: ViewStyle;\n rightCurve: ViewStyle;\n avatarSize?: number;\n };\n status: {\n checkAllIcon: IconProps;\n checkIcon: IconProps;\n readByCount: TextStyle;\n statusContainer: ViewStyle;\n timeIcon: IconProps;\n };\n targetedMessageUnderlay: ViewStyle;\n videoThumbnail: {\n container: ViewStyle;\n roundedView: ViewStyle;\n };\n };\n overlay: {\n container: ViewStyle;\n messageActions: {\n actionContainer: ViewStyle;\n icon: ViewStyle;\n title: TextStyle;\n };\n padding: number;\n reactions: {\n avatarContainer: ViewStyle;\n avatarName: TextStyle;\n avatarSize: number;\n container: ViewStyle;\n flatListContainer: ViewStyle;\n radius: number;\n reactionBubble: ViewStyle;\n reactionBubbleBackground: ViewStyle;\n title: TextStyle;\n };\n reactionsList: {\n radius: number;\n reaction: ViewStyle;\n reactionList: ViewStyle;\n reactionSize: number;\n };\n };\n reply: {\n container: ViewStyle;\n fileAttachmentContainer: ViewStyle;\n imageAttachment: ImageStyle;\n markdownStyles: MarkdownStyle;\n messageContainer: ViewStyle;\n textContainer: ViewStyle;\n videoThumbnail: {\n container: ViewStyle;\n image: ImageStyle;\n };\n };\n screenPadding: number;\n spinner: ViewStyle;\n thread: {\n newThread: ViewStyle & {\n text: TextStyle;\n backgroundGradientStart?: string;\n backgroundGradientStop?: string;\n };\n };\n typingIndicator: {\n container: ViewStyle;\n text: TextStyle & {\n fontSize: TextStyle['fontSize'];\n };\n };\n};\n\nexport const defaultTheme: Theme = {\n attachmentPicker: {\n bottomSheetContentContainer: {},\n durationText: {},\n errorButtonText: {},\n errorContainer: {},\n errorText: {},\n image: {},\n imageOverlay: {},\n imageOverlaySelectedComponent: {\n check: {},\n },\n },\n attachmentSelectionBar: {\n container: {},\n icon: {},\n },\n avatar: {\n BASE_AVATAR_SIZE: 32,\n container: {},\n image: {\n borderRadius: 16,\n height: 32,\n width: 32,\n },\n presenceIndicator: {\n cx: 6,\n cy: 6,\n r: 5,\n strokeWidth: 2,\n },\n presenceIndicatorContainer: {},\n },\n channel: {\n selectChannel: {},\n },\n channelListFooterLoadingIndicator: {\n container: {},\n },\n channelListHeaderErrorIndicator: {\n container: {},\n errorText: {},\n },\n channelListLoadingIndicator: {\n container: {},\n },\n channelListMessenger: {\n flatList: {},\n flatListContent: {},\n },\n channelListSkeleton: {\n animationTime: 1800, // in milliseconds\n background: {},\n container: {},\n gradientStart: {\n stopOpacity: 0,\n },\n gradientStop: {\n stopOpacity: 0.5,\n },\n height: 64,\n },\n channelPreview: {\n checkAllIcon: {\n height: DEFAULT_STATUS_ICON_SIZE,\n width: DEFAULT_STATUS_ICON_SIZE,\n },\n checkIcon: {\n height: DEFAULT_STATUS_ICON_SIZE,\n width: DEFAULT_STATUS_ICON_SIZE,\n },\n container: {},\n contentContainer: {},\n date: {},\n message: {\n fontWeight: '400',\n },\n mutedStatus: {\n height: 20,\n iconStyle: {},\n width: 20,\n },\n row: {},\n title: {},\n unreadContainer: {},\n unreadText: {},\n },\n colors: {\n ...Colors,\n },\n dateHeader: {\n container: {},\n text: {},\n },\n emptyStateIndicator: {\n channelContainer: {},\n channelDetails: {},\n channelTitle: {},\n },\n groupAvatar: {\n container: {},\n image: {\n resizeMode: 'cover',\n },\n },\n iconBadge: {\n icon: {},\n iconInner: {},\n unreadCount: {},\n },\n iconSquare: {\n container: {},\n image: {},\n },\n imageGallery: {\n footer: {\n centerContainer: {},\n container: {},\n imageCountText: {},\n innerContainer: {},\n leftContainer: {},\n rightContainer: {},\n },\n grid: {\n contentContainer: {},\n gridAvatar: {},\n gridAvatarWrapper: {},\n gridImage: {},\n handle: {},\n handleText: {},\n overlay: {},\n },\n header: {\n centerContainer: {},\n container: {},\n dateText: {},\n innerContainer: {},\n leftContainer: {},\n rightContainer: {},\n usernameText: {},\n },\n videoControl: {\n durationTextStyle: {},\n roundedView: {},\n videoContainer: {},\n },\n },\n inlineDateSeparator: {\n container: {},\n text: {},\n },\n loadingDots: {\n container: {},\n loadingDot: {},\n spacing: 4,\n },\n loadingErrorIndicator: {\n container: {},\n errorText: {},\n retryText: {},\n },\n loadingIndicator: {\n container: {},\n loadingText: {},\n },\n messageInput: {\n attachButton: {},\n attachButtonContainer: {},\n attachmentSelectionBar: {},\n autoCompleteInputContainer: {},\n commandsButton: {},\n commandsButtonContainer: {},\n composerContainer: {},\n container: {},\n cooldownTimer: {\n container: {},\n text: {},\n },\n editingBoxContainer: {},\n editingBoxHeader: {},\n editingBoxHeaderTitle: {},\n editingStateHeader: {\n editingBoxHeader: {},\n editingBoxHeaderTitle: {},\n },\n fileUploadPreview: {\n audioAttachmentFileContainer: {},\n audioAttachmentUploadPreview: {\n progressControlView: {},\n progressDurationText: {},\n roundedView: {},\n },\n dismiss: {},\n fileContainer: {},\n fileContentContainer: {},\n filenameText: {},\n fileSizeText: {},\n fileTextContainer: {},\n flatList: {},\n },\n giphyCommandInput: {\n giphyContainer: {},\n giphyText: {},\n },\n imageUploadPreview: {\n dismiss: {},\n flatList: {},\n itemContainer: {},\n upload: {},\n },\n inputBox: {},\n inputBoxContainer: {},\n moreOptionsButton: {},\n optionsContainer: {},\n replyContainer: {},\n sendButton: {},\n sendButtonContainer: {},\n sendMessageDisallowedIndicator: {\n container: {},\n text: {},\n },\n showThreadMessageInChannelButton: {\n check: {},\n checkBoxActive: {},\n checkBoxInactive: {},\n container: {},\n innerContainer: {},\n text: {},\n },\n suggestions: {\n command: {\n args: {},\n container: {},\n iconContainer: {},\n title: {},\n },\n container: {\n maxHeight: vh(25),\n },\n emoji: {\n container: {},\n text: {},\n },\n header: {\n container: {},\n title: {},\n },\n item: {},\n mention: {\n avatarSize: 40,\n column: {},\n container: {},\n name: {},\n tag: {},\n },\n },\n suggestionsListContainer: {\n container: {},\n flatlist: {},\n },\n uploadProgressIndicator: {\n container: {},\n overlay: {},\n },\n },\n messageList: {\n container: {},\n contentContainer: {},\n errorNotification: {},\n errorNotificationText: {},\n inlineUnreadIndicator: {\n container: {},\n text: {},\n },\n listContainer: {},\n messageSystem: {\n container: {},\n dateText: {},\n line: {},\n text: {},\n textContainer: {},\n },\n scrollToBottomButton: {\n container: {},\n touchable: {},\n unreadCountNotificationContainer: {},\n unreadCountNotificationText: {},\n wrapper: {},\n },\n typingIndicatorContainer: {},\n },\n messageSimple: {\n actions: {\n button: {},\n buttonText: {},\n container: {},\n },\n avatarWrapper: {\n container: {},\n leftAlign: {\n marginRight: 8,\n },\n rightAlign: {\n marginLeft: 8,\n },\n spacer: {\n height: 28,\n width: 32, // same as BASE_AVATAR_SIZE\n },\n },\n card: {\n authorName: {},\n authorNameContainer: {},\n authorNameFooter: {},\n authorNameFooterContainer: {},\n authorNameMask: {},\n container: {},\n cover: {},\n footer: {\n description: {},\n title: {\n fontWeight: '700',\n },\n },\n noURI: {\n borderLeftWidth: 2,\n paddingLeft: 8,\n },\n playButtonStyle: {\n durationTextStyle: {},\n roundedView: {},\n videoContainer: {},\n },\n playIcon: {\n height: 24,\n width: 24,\n },\n },\n container: {},\n content: {\n container: {\n borderRadiusL: 16,\n borderRadiusS: 0,\n },\n containerInner: {},\n deletedContainer: {},\n deletedContainerInner: {},\n deletedMetaText: {\n paddingHorizontal: 5,\n },\n deletedText: {\n em: {\n fontSize: 15,\n fontStyle: 'italic',\n fontWeight: '400',\n },\n },\n errorContainer: {\n paddingRight: 12,\n paddingTop: 0,\n },\n errorIcon: {\n height: 20,\n width: 20,\n },\n errorIconContainer: {\n bottom: -2,\n position: 'absolute',\n right: -12,\n },\n eyeIcon: {\n height: 16,\n width: 16,\n },\n markdown: {},\n messageUser: {\n fontSize: 12,\n fontWeight: '700',\n paddingRight: 6,\n },\n metaContainer: {\n flexDirection: 'row',\n marginTop: 4,\n },\n metaText: {\n fontSize: 12,\n },\n replyBorder: {},\n replyContainer: {},\n textContainer: {\n onlyEmojiMarkdown: { text: { fontSize: 50 } },\n },\n wrapper: {},\n },\n file: {\n container: {},\n details: {},\n fileSize: {},\n icon: {},\n title: {},\n },\n fileAttachmentGroup: {\n container: {},\n },\n gallery: {\n galleryContainer: {},\n galleryItemColumn: {},\n gridHeight: 195,\n gridWidth: 256,\n image: {},\n imageContainer: {},\n maxHeight: 300,\n maxWidth: 256,\n minHeight: 100,\n minWidth: 170,\n moreImagesContainer: {},\n moreImagesText: {},\n },\n giphy: {\n buttonContainer: {},\n cancel: {},\n container: {},\n giphy: {},\n giphyContainer: {},\n giphyHeaderText: {},\n giphyHeaderTitle: {},\n giphyMask: {},\n giphyMaskText: {},\n header: {},\n selectionContainer: {},\n send: {},\n shuffle: {},\n title: {},\n },\n loadingIndicator: {\n container: {},\n roundedView: {},\n },\n pinnedHeader: {\n container: {},\n label: {},\n },\n reactionList: {\n container: {},\n middleIcon: {},\n radius: 2, // not recommended to change this\n reactionBubble: {},\n reactionBubbleBackground: {},\n reactionSize: 24,\n strokeSize: 1, // not recommended to change this\n },\n replies: {\n avatar: {},\n avatarContainerMultiple: {},\n avatarContainerSingle: {},\n container: {},\n leftAvatarsContainer: {},\n leftCurve: {},\n messageRepliesText: {},\n rightAvatarsContainer: {},\n rightCurve: {},\n },\n status: {\n checkAllIcon: {\n height: DEFAULT_STATUS_ICON_SIZE,\n width: DEFAULT_STATUS_ICON_SIZE,\n },\n checkIcon: {\n height: DEFAULT_STATUS_ICON_SIZE,\n width: DEFAULT_STATUS_ICON_SIZE,\n },\n readByCount: {},\n statusContainer: {},\n timeIcon: {\n height: DEFAULT_STATUS_ICON_SIZE,\n width: DEFAULT_STATUS_ICON_SIZE,\n },\n },\n targetedMessageUnderlay: {},\n videoThumbnail: {\n container: {},\n roundedView: {},\n },\n },\n overlay: {\n container: {},\n messageActions: {\n actionContainer: {},\n icon: {},\n title: {},\n },\n padding: 8,\n reactions: {\n avatarContainer: {},\n avatarName: {},\n avatarSize: 64,\n container: {},\n flatListContainer: {},\n radius: 2,\n reactionBubble: {},\n reactionBubbleBackground: {},\n title: {},\n },\n reactionsList: {\n radius: 2.5,\n reaction: {},\n reactionList: {},\n reactionSize: 24,\n },\n },\n reply: {\n container: {},\n fileAttachmentContainer: {},\n imageAttachment: {},\n markdownStyles: {},\n messageContainer: {},\n textContainer: {},\n videoThumbnail: {\n container: {},\n image: {},\n },\n },\n screenPadding: 8,\n spinner: {},\n thread: {\n newThread: {\n text: {},\n },\n },\n typingIndicator: {\n container: {},\n text: {\n fontSize: 14,\n },\n },\n};\n"]}
1
+ {"version":3,"sources":["theme.ts"],"names":["DEFAULT_STATUS_ICON_SIZE","Colors","accent_blue","accent_green","accent_red","bg_gradient_end","bg_gradient_start","black","blue_alice","border","grey","grey_dark","grey_gainsboro","grey_whisper","icon_background","label_bg_transparent","light_gray","modal_shadow","overlay","shadow_icon","static_black","static_white","targetedMessageBackground","transparent","white","white_smoke","white_snow","defaultTheme","attachmentPicker","bottomSheetContentContainer","durationText","errorButtonText","errorContainer","errorText","image","imageOverlay","imageOverlaySelectedComponent","check","attachmentSelectionBar","container","icon","avatar","BASE_AVATAR_SIZE","borderRadius","height","width","presenceIndicator","cx","cy","r","strokeWidth","presenceIndicatorContainer","channel","selectChannel","channelListFooterLoadingIndicator","channelListHeaderErrorIndicator","channelListLoadingIndicator","channelListMessenger","flatList","flatListContent","channelListSkeleton","animationTime","background","gradientStart","stopOpacity","gradientStop","channelPreview","checkAllIcon","checkIcon","contentContainer","date","message","fontWeight","mutedStatus","iconStyle","row","title","unreadContainer","unreadText","colors","dateHeader","text","emptyStateIndicator","channelContainer","channelDetails","channelTitle","groupAvatar","resizeMode","iconBadge","iconInner","unreadCount","iconSquare","imageGallery","footer","centerContainer","imageCountText","innerContainer","leftContainer","rightContainer","grid","gridAvatar","gridAvatarWrapper","gridImage","handle","handleText","header","dateText","usernameText","videoControl","durationTextStyle","roundedView","videoContainer","inlineDateSeparator","loadingDots","loadingDot","spacing","loadingErrorIndicator","retryText","loadingIndicator","loadingText","messageInput","attachButton","attachButtonContainer","autoCompleteInputContainer","commandsButton","commandsButtonContainer","composerContainer","cooldownTimer","editingBoxContainer","editingBoxHeader","editingBoxHeaderTitle","editingStateHeader","fileUploadPreview","audioAttachment","progressControlView","progressDurationText","audioAttachmentFileContainer","dismiss","fileContainer","fileContentContainer","filenameText","fileSizeText","fileTextContainer","giphyCommandInput","giphyContainer","giphyText","imageUploadPreview","itemContainer","upload","inputBox","inputBoxContainer","moreOptionsButton","optionsContainer","replyContainer","sendButton","sendButtonContainer","sendMessageDisallowedIndicator","showThreadMessageInChannelButton","checkBoxActive","checkBoxInactive","suggestions","command","args","iconContainer","maxHeight","emoji","item","mention","avatarSize","column","name","tag","suggestionsListContainer","flatlist","uploadProgressIndicator","messageList","errorNotification","errorNotificationText","inlineUnreadIndicator","listContainer","messageSystem","line","textContainer","scrollToBottomButton","touchable","unreadCountNotificationContainer","unreadCountNotificationText","wrapper","typingIndicatorContainer","messageSimple","actions","button","buttonText","avatarWrapper","leftAlign","marginRight","rightAlign","marginLeft","spacer","card","authorName","authorNameContainer","authorNameFooter","authorNameFooterContainer","authorNameMask","cover","description","noURI","borderLeftWidth","paddingLeft","playButtonStyle","playIcon","content","borderRadiusL","borderRadiusS","containerInner","deletedContainer","deletedContainerInner","deletedMetaText","paddingHorizontal","deletedText","em","fontSize","fontStyle","paddingRight","paddingTop","errorIcon","errorIconContainer","bottom","position","right","eyeIcon","markdown","messageUser","metaContainer","flexDirection","marginTop","metaText","replyBorder","onlyEmojiMarkdown","file","details","fileSize","fileAttachmentGroup","gallery","galleryContainer","galleryItemColumn","gridHeight","gridWidth","imageContainer","maxWidth","minHeight","minWidth","moreImagesContainer","moreImagesText","giphy","buttonContainer","cancel","giphyHeaderText","giphyHeaderTitle","giphyMask","giphyMaskText","selectionContainer","send","shuffle","pinnedHeader","label","reactionList","middleIcon","radius","reactionBubble","reactionBubbleBackground","reactionSize","strokeSize","replies","avatarContainerMultiple","avatarContainerSingle","leftAvatarsContainer","leftCurve","messageRepliesText","rightAvatarsContainer","rightCurve","status","readByCount","statusContainer","timeIcon","targetedMessageUnderlay","videoThumbnail","messageActions","actionContainer","padding","reactions","avatarContainer","avatarName","flatListContainer","reactionsList","reaction","reply","fileAttachmentContainer","imageAttachment","markdownStyles","messageContainer","screenPadding","spinner","thread","newThread","typingIndicator"],"mappings":";;;;;;;;;AAIA;;AAEO,IAAMA,wBAAwB,GAAG,EAAjC;;AAEA,IAAMC,MAAM,GAAG;AACpBC,EAAAA,WAAW,EAAE,SADO;AAEpBC,EAAAA,YAAY,EAAE,SAFM;AAGpBC,EAAAA,UAAU,EAAE,SAHQ;AAIpBC,EAAAA,eAAe,EAAE,SAJG;AAKpBC,EAAAA,iBAAiB,EAAE,SALC;AAMpBC,EAAAA,KAAK,EAAE,SANa;AAOpBC,EAAAA,UAAU,EAAE,SAPQ;AAQpBC,EAAAA,MAAM,EAAE,WARY;AASpBC,EAAAA,IAAI,EAAE,SATc;AAUpBC,EAAAA,SAAS,EAAE,SAVS;AAWpBC,EAAAA,cAAc,EAAE,SAXI;AAYpBC,EAAAA,YAAY,EAAE,SAZM;AAapBC,EAAAA,eAAe,EAAE,SAbG;AAcpBC,EAAAA,oBAAoB,EAAE,WAdF;AAepBC,EAAAA,UAAU,EAAE,SAfQ;AAgBpBC,EAAAA,YAAY,EAAE,WAhBM;AAiBpBC,EAAAA,OAAO,EAAE,WAjBW;AAkBpBC,EAAAA,WAAW,EAAE,WAlBO;AAmBpBC,EAAAA,YAAY,EAAE,SAnBM;AAoBpBC,EAAAA,YAAY,EAAE,SApBM;AAqBpBC,EAAAA,yBAAyB,EAAE,SArBP;AAsBpBC,EAAAA,WAAW,EAAE,aAtBO;AAuBpBC,EAAAA,KAAK,EAAE,SAvBa;AAwBpBC,EAAAA,WAAW,EAAE,SAxBO;AAyBpBC,EAAAA,UAAU,EAAE;AAzBQ,CAAf;;AA0iBA,IAAMC,YAAmB,GAAG;AACjCC,EAAAA,gBAAgB,EAAE;AAChBC,IAAAA,2BAA2B,EAAE,EADb;AAEhBC,IAAAA,YAAY,EAAE,EAFE;AAGhBC,IAAAA,eAAe,EAAE,EAHD;AAIhBC,IAAAA,cAAc,E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,EAAE,EAPP;AAQTC,MAAAA,wBAAwB,EAAE,EARjB;AASTnM,MAAAA,KAAK,EAAE;AATE,KARJ;AAmBP2N,IAAAA,aAAa,EAAE;AACb1B,MAAAA,MAAM,EAAE,GADK;AAEb2B,MAAAA,QAAQ,EAAE,EAFG;AAGb7B,MAAAA,YAAY,EAAE,EAHD;AAIbK,MAAAA,YAAY,EAAE;AAJD;AAnBR,GApewB;AA8fjCyB,EAAAA,KAAK,EAAE;AACLlQ,IAAAA,SAAS,EAAE,EADN;AAELmQ,IAAAA,uBAAuB,EAAE,EAFpB;AAGLC,IAAAA,eAAe,EAAE,EAHZ;AAILC,IAAAA,cAAc,EAAE,EAJX;AAKLC,IAAAA,gBAAgB,EAAE,EALb;AAMLvH,IAAAA,aAAa,EAAE,EANV;AAOLyG,IAAAA,cAAc,EAAE;AACdxP,MAAAA,SAAS,EAAE,EADG;AAEdL,MAAAA,KAAK,EAAE;AAFO;AAPX,GA9f0B;AA0gBjC4Q,EAAAA,aAAa,EAAE,CA1gBkB;AA2gBjCC,EAAAA,OAAO,EAAE,EA3gBwB;AA4gBjCC,EAAAA,MAAM,EAAE;AACNC,IAAAA,SAAS,EAAE;AACThO,MAAAA,IAAI,EAAE;AADG;AADL,GA5gByB;AAihBjCiO,EAAAA,eAAe,EAAE;AACf3Q,IAAAA,SAAS,EAAE,EADI;AAEf0C,IAAAA,IAAI,EAAE;AACJ6I,MAAAA,QAAQ,EAAE;AADN;AAFS;AAjhBgB,CAA5B","sourcesContent":["import type { ImageStyle, TextStyle, ViewStyle } from 'react-native';\nimport type { CircleProps, Color, StopProps } from 'react-native-svg';\n\nimport type { IconProps } from '../../../icons/utils/base';\nimport { vh } from '../../../utils/utils';\n\nexport const DEFAULT_STATUS_ICON_SIZE = 16;\n\nexport const Colors = {\n accent_blue: '#005FFF',\n accent_green: '#20E070',\n accent_red: '#FF3742',\n bg_gradient_end: '#F7F7F7',\n bg_gradient_start: '#FCFCFC',\n black: '#000000',\n blue_alice: '#E9F2FF',\n border: '#00000014', // 14 = 8% opacity; top: x=0, y=-1; bottom: x=0, y=1\n grey: '#7A7A7A',\n grey_dark: '#72767E',\n grey_gainsboro: '#DBDBDB',\n grey_whisper: '#ECEBEB',\n icon_background: '#FFFFFF',\n label_bg_transparent: '#00000033', // 33 = 20% opacity\n light_gray: '#DBDDE1',\n modal_shadow: '#00000099', // 99 = 60% opacity; x=0, y= 1, radius=4\n overlay: '#000000CC', // CC = 80% opacity\n shadow_icon: '#00000040', // 40 = 25% opacity; x=0, y=0, radius=4\n static_black: '#000000',\n static_white: '#ffffff',\n targetedMessageBackground: '#FBF4DD', // dark mode = #302D22\n transparent: 'transparent',\n white: '#FFFFFF',\n white_smoke: '#F2F2F2',\n white_snow: '#FCFCFC',\n};\n\nexport type MarkdownStyle = Partial<{\n autolink: TextStyle;\n blockQuoteBar: ViewStyle;\n blockQuoteSection: ViewStyle;\n blockQuoteSectionBar: ViewStyle;\n blockQuoteText: TextStyle | ViewStyle;\n br: TextStyle;\n codeBlock: TextStyle;\n del: TextStyle;\n em: TextStyle;\n heading: TextStyle;\n heading1: TextStyle;\n heading2: TextStyle;\n heading3: TextStyle;\n heading4: TextStyle;\n heading5: TextStyle;\n heading6: TextStyle;\n hr: ViewStyle;\n image: ImageStyle;\n inlineCode: TextStyle;\n list: ViewStyle;\n listItem: ViewStyle;\n listItemBullet: TextStyle;\n listItemNumber: TextStyle;\n listItemText: TextStyle;\n listRow: ViewStyle;\n mailTo: TextStyle;\n mentions: TextStyle;\n newline: TextStyle;\n noMargin: TextStyle;\n paragraph: TextStyle;\n paragraphCenter: TextStyle;\n paragraphWithImage: ViewStyle;\n strong: TextStyle;\n sublist: ViewStyle;\n table: ViewStyle;\n tableHeader: ViewStyle;\n tableHeaderCell: TextStyle;\n tableRow: ViewStyle;\n tableRowCell: ViewStyle;\n tableRowLast: ViewStyle;\n text: TextStyle;\n u: TextStyle;\n view: ViewStyle;\n}>;\n\nexport type Theme = {\n attachmentPicker: {\n bottomSheetContentContainer: ViewStyle;\n durationText: TextStyle;\n errorButtonText: TextStyle;\n errorContainer: ViewStyle;\n errorText: TextStyle;\n image: ViewStyle;\n imageOverlay: ViewStyle;\n imageOverlaySelectedComponent: {\n check: ViewStyle;\n };\n };\n attachmentSelectionBar: {\n container: ViewStyle;\n icon: ViewStyle;\n };\n avatar: {\n BASE_AVATAR_SIZE: number;\n container: ViewStyle;\n image: ImageStyle;\n presenceIndicator: CircleProps;\n presenceIndicatorContainer: ViewStyle;\n };\n channel: {\n selectChannel: TextStyle;\n };\n channelListFooterLoadingIndicator: {\n container: ViewStyle;\n };\n channelListHeaderErrorIndicator: {\n container: ViewStyle;\n errorText: TextStyle;\n };\n channelListLoadingIndicator: {\n container: ViewStyle;\n };\n channelListMessenger: {\n flatList: ViewStyle;\n flatListContent: ViewStyle;\n };\n channelListSkeleton: {\n animationTime: number;\n background: ViewStyle;\n container: ViewStyle;\n gradientStart: StopProps;\n gradientStop: StopProps;\n height: number;\n maskFillColor?: Color;\n };\n channelPreview: {\n checkAllIcon: IconProps;\n checkIcon: IconProps;\n container: ViewStyle;\n contentContainer: ViewStyle;\n date: TextStyle;\n message: TextStyle & {\n fontWeight: TextStyle['fontWeight'];\n };\n mutedStatus: {\n height: number;\n iconStyle: ViewStyle;\n width: number;\n };\n row: ViewStyle;\n title: TextStyle;\n unreadContainer: ViewStyle;\n unreadText: TextStyle;\n };\n colors: typeof Colors & { [key: string]: string };\n dateHeader: {\n container: ViewStyle;\n text: TextStyle;\n };\n emptyStateIndicator: {\n channelContainer: ViewStyle;\n channelDetails: TextStyle;\n channelTitle: TextStyle;\n };\n groupAvatar: {\n container: ViewStyle;\n image: ImageStyle;\n };\n iconBadge: {\n icon: ViewStyle;\n iconInner: ViewStyle;\n unreadCount: TextStyle;\n };\n iconSquare: {\n container: ViewStyle;\n image: ImageStyle;\n };\n imageGallery: {\n footer: {\n centerContainer: ViewStyle;\n container: ViewStyle;\n imageCountText: TextStyle;\n innerContainer: ViewStyle;\n leftContainer: ViewStyle;\n rightContainer: ViewStyle;\n };\n grid: {\n contentContainer: ViewStyle;\n gridAvatar: ImageStyle;\n gridAvatarWrapper: ViewStyle;\n gridImage: ViewStyle;\n handle: ViewStyle;\n handleText: TextStyle;\n overlay: ViewStyle;\n };\n header: {\n centerContainer: ViewStyle;\n container: ViewStyle;\n dateText: TextStyle;\n innerContainer: ViewStyle;\n leftContainer: ViewStyle;\n rightContainer: ViewStyle;\n usernameText: TextStyle;\n };\n videoControl: {\n durationTextStyle: TextStyle;\n roundedView: ViewStyle;\n videoContainer: ViewStyle;\n };\n backgroundColor?: string;\n pager?: ViewStyle;\n slide?: ImageStyle;\n };\n inlineDateSeparator: {\n container: ViewStyle;\n text: TextStyle;\n };\n loadingDots: {\n container: ViewStyle;\n loadingDot: ViewStyle;\n spacing: number;\n };\n loadingErrorIndicator: {\n container: ViewStyle;\n errorText: TextStyle;\n retryText: TextStyle;\n };\n loadingIndicator: {\n container: ViewStyle;\n loadingText: TextStyle;\n };\n messageInput: {\n attachButton: ViewStyle;\n attachButtonContainer: ViewStyle;\n attachmentSelectionBar: ViewStyle;\n autoCompleteInputContainer: ViewStyle;\n commandsButton: ViewStyle;\n commandsButtonContainer: ViewStyle;\n composerContainer: ViewStyle;\n container: ViewStyle;\n cooldownTimer: {\n container: ViewStyle;\n text: TextStyle;\n };\n editingBoxContainer: ViewStyle;\n editingBoxHeader: ViewStyle;\n editingBoxHeaderTitle: TextStyle;\n editingStateHeader: {\n editingBoxHeader: ViewStyle;\n editingBoxHeaderTitle: TextStyle;\n };\n fileUploadPreview: {\n audioAttachment: {\n progressControlView: ViewStyle;\n progressDurationText: TextStyle;\n roundedView: ViewStyle;\n };\n audioAttachmentFileContainer: ViewStyle;\n dismiss: ViewStyle;\n fileContainer: ViewStyle;\n fileContentContainer: ViewStyle;\n filenameText: TextStyle;\n fileSizeText: TextStyle;\n fileTextContainer: ViewStyle;\n flatList: ViewStyle;\n };\n giphyCommandInput: {\n giphyContainer: ViewStyle;\n giphyText: TextStyle;\n };\n imageUploadPreview: {\n dismiss: ViewStyle;\n flatList: ViewStyle;\n itemContainer: ViewStyle;\n upload: ImageStyle;\n };\n inputBox: TextStyle;\n inputBoxContainer: ViewStyle;\n moreOptionsButton: ViewStyle;\n optionsContainer: ViewStyle;\n replyContainer: ViewStyle;\n sendButton: ViewStyle;\n sendButtonContainer: ViewStyle;\n sendMessageDisallowedIndicator: {\n container: ViewStyle;\n text: TextStyle;\n };\n showThreadMessageInChannelButton: {\n check: IconProps;\n checkBoxActive: ViewStyle;\n checkBoxInactive: ViewStyle;\n container: ViewStyle;\n innerContainer: ViewStyle;\n text: TextStyle;\n };\n suggestions: {\n command: {\n args: TextStyle;\n container: ViewStyle;\n iconContainer: ViewStyle;\n title: TextStyle;\n };\n container: ViewStyle & {\n maxHeight: number;\n };\n emoji: {\n container: ViewStyle;\n text: TextStyle;\n };\n header: {\n container: ViewStyle;\n title: TextStyle;\n };\n item: ViewStyle;\n mention: {\n avatarSize: number;\n column: ViewStyle;\n container: ViewStyle;\n name: TextStyle;\n tag: TextStyle;\n };\n };\n suggestionsListContainer: {\n container: ViewStyle;\n flatlist: ViewStyle;\n };\n uploadProgressIndicator: {\n container: ViewStyle;\n overlay: ViewStyle;\n };\n };\n messageList: {\n container: ViewStyle;\n contentContainer: ViewStyle;\n errorNotification: ViewStyle;\n errorNotificationText: TextStyle;\n inlineUnreadIndicator: {\n container: ViewStyle;\n text: TextStyle;\n };\n listContainer: ViewStyle;\n messageSystem: {\n container: ViewStyle;\n dateText: TextStyle;\n line: ViewStyle;\n text: TextStyle;\n textContainer: ViewStyle;\n };\n scrollToBottomButton: {\n container: ViewStyle;\n touchable: ViewStyle;\n unreadCountNotificationContainer: ViewStyle;\n unreadCountNotificationText: TextStyle;\n wrapper: ViewStyle;\n chevronColor?: Color;\n };\n typingIndicatorContainer: ViewStyle;\n };\n messageSimple: {\n actions: {\n button: ViewStyle & {\n defaultBackgroundColor?: ViewStyle['backgroundColor'];\n defaultBorderColor?: ViewStyle['borderColor'];\n primaryBackgroundColor?: ViewStyle['backgroundColor'];\n primaryBorderColor?: ViewStyle['borderColor'];\n };\n buttonText: TextStyle & {\n defaultColor?: TextStyle['color'];\n primaryColor?: TextStyle['color'];\n };\n container: ViewStyle;\n };\n avatarWrapper: {\n container: ViewStyle;\n leftAlign: ViewStyle;\n rightAlign: ViewStyle;\n spacer: ViewStyle;\n };\n card: {\n authorName: TextStyle;\n authorNameContainer: ViewStyle;\n authorNameFooter: TextStyle;\n authorNameFooterContainer: ViewStyle;\n authorNameMask: ViewStyle;\n container: ViewStyle;\n cover: ImageStyle;\n footer: ViewStyle & {\n description: TextStyle;\n title: TextStyle;\n };\n noURI: ViewStyle;\n playButtonStyle: {\n durationTextStyle: TextStyle;\n roundedView: ViewStyle;\n videoContainer: ViewStyle;\n };\n playIcon: IconProps;\n };\n container: ViewStyle;\n content: {\n container: ViewStyle & {\n borderRadiusL: ViewStyle['borderBottomLeftRadius' | 'borderTopLeftRadius'];\n borderRadiusS: ViewStyle['borderBottomRightRadius' | 'borderTopRightRadius'];\n };\n containerInner: ViewStyle;\n deletedContainer: ViewStyle;\n deletedContainerInner: ViewStyle;\n deletedMetaText: TextStyle;\n deletedText: MarkdownStyle;\n errorContainer: ViewStyle;\n errorIcon: IconProps;\n errorIconContainer: ViewStyle;\n eyeIcon: IconProps;\n /**\n * Available options for styling text:\n * https://github.com/andangrd/react-native-markdown-package/blob/main/styles.js\n */\n markdown: MarkdownStyle;\n messageUser: TextStyle;\n metaContainer: ViewStyle;\n metaText: TextStyle;\n replyBorder: ViewStyle;\n replyContainer: ViewStyle;\n textContainer: ViewStyle & {\n onlyEmojiMarkdown: MarkdownStyle;\n };\n wrapper: ViewStyle;\n };\n file: {\n container: ViewStyle;\n details: ViewStyle;\n fileSize: TextStyle;\n icon: IconProps;\n title: TextStyle;\n };\n fileAttachmentGroup: {\n container: ViewStyle;\n };\n gallery: {\n galleryContainer: ViewStyle;\n galleryItemColumn: ViewStyle;\n gridHeight: number;\n gridWidth: number;\n image: ImageStyle;\n imageContainer: ViewStyle;\n maxHeight: number;\n maxWidth: number;\n minHeight: number;\n minWidth: number;\n moreImagesContainer: ViewStyle;\n moreImagesText: TextStyle;\n };\n giphy: {\n buttonContainer: ViewStyle;\n cancel: TextStyle;\n container: ViewStyle;\n giphy: ImageStyle;\n giphyContainer: ViewStyle;\n giphyHeaderText: TextStyle;\n giphyHeaderTitle: TextStyle;\n giphyMask: ViewStyle;\n giphyMaskText: TextStyle;\n header: ViewStyle;\n selectionContainer: ViewStyle;\n send: TextStyle;\n shuffle: TextStyle;\n title: TextStyle;\n };\n loadingIndicator: {\n container: ViewStyle;\n roundedView: ViewStyle;\n };\n pinnedHeader: {\n container: ViewStyle;\n label: TextStyle;\n };\n reactionList: {\n container: ViewStyle;\n middleIcon: ViewStyle;\n radius: number;\n reactionBubble: ViewStyle;\n reactionBubbleBackground: ViewStyle;\n reactionSize: number;\n strokeSize: number;\n };\n replies: {\n avatar: ViewStyle;\n avatarContainerMultiple: ViewStyle;\n avatarContainerSingle: ViewStyle;\n container: ViewStyle;\n leftAvatarsContainer: ViewStyle;\n leftCurve: ViewStyle;\n messageRepliesText: TextStyle;\n rightAvatarsContainer: ViewStyle;\n rightCurve: ViewStyle;\n avatarSize?: number;\n };\n status: {\n checkAllIcon: IconProps;\n checkIcon: IconProps;\n readByCount: TextStyle;\n statusContainer: ViewStyle;\n timeIcon: IconProps;\n };\n targetedMessageUnderlay: ViewStyle;\n videoThumbnail: {\n container: ViewStyle;\n roundedView: ViewStyle;\n };\n };\n overlay: {\n container: ViewStyle;\n messageActions: {\n actionContainer: ViewStyle;\n icon: ViewStyle;\n title: TextStyle;\n };\n padding: number;\n reactions: {\n avatarContainer: ViewStyle;\n avatarName: TextStyle;\n avatarSize: number;\n container: ViewStyle;\n flatListContainer: ViewStyle;\n radius: number;\n reactionBubble: ViewStyle;\n reactionBubbleBackground: ViewStyle;\n title: TextStyle;\n };\n reactionsList: {\n radius: number;\n reaction: ViewStyle;\n reactionList: ViewStyle;\n reactionSize: number;\n };\n };\n reply: {\n container: ViewStyle;\n fileAttachmentContainer: ViewStyle;\n imageAttachment: ImageStyle;\n markdownStyles: MarkdownStyle;\n messageContainer: ViewStyle;\n textContainer: ViewStyle;\n videoThumbnail: {\n container: ViewStyle;\n image: ImageStyle;\n };\n };\n screenPadding: number;\n spinner: ViewStyle;\n thread: {\n newThread: ViewStyle & {\n text: TextStyle;\n backgroundGradientStart?: string;\n backgroundGradientStop?: string;\n };\n };\n typingIndicator: {\n container: ViewStyle;\n text: TextStyle & {\n fontSize: TextStyle['fontSize'];\n };\n };\n};\n\nexport const defaultTheme: Theme = {\n attachmentPicker: {\n bottomSheetContentContainer: {},\n durationText: {},\n errorButtonText: {},\n errorContainer: {},\n errorText: {},\n image: {},\n imageOverlay: {},\n imageOverlaySelectedComponent: {\n check: {},\n },\n },\n attachmentSelectionBar: {\n container: {},\n icon: {},\n },\n avatar: {\n BASE_AVATAR_SIZE: 32,\n container: {},\n image: {\n borderRadius: 16,\n height: 32,\n width: 32,\n },\n presenceIndicator: {\n cx: 6,\n cy: 6,\n r: 5,\n strokeWidth: 2,\n },\n presenceIndicatorContainer: {},\n },\n channel: {\n selectChannel: {},\n },\n channelListFooterLoadingIndicator: {\n container: {},\n },\n channelListHeaderErrorIndicator: {\n container: {},\n errorText: {},\n },\n channelListLoadingIndicator: {\n container: {},\n },\n channelListMessenger: {\n flatList: {},\n flatListContent: {},\n },\n channelListSkeleton: {\n animationTime: 1800, // in milliseconds\n background: {},\n container: {},\n gradientStart: {\n stopOpacity: 0,\n },\n gradientStop: {\n stopOpacity: 0.5,\n },\n height: 64,\n },\n channelPreview: {\n checkAllIcon: {\n height: DEFAULT_STATUS_ICON_SIZE,\n width: DEFAULT_STATUS_ICON_SIZE,\n },\n checkIcon: {\n height: DEFAULT_STATUS_ICON_SIZE,\n width: DEFAULT_STATUS_ICON_SIZE,\n },\n container: {},\n contentContainer: {},\n date: {},\n message: {\n fontWeight: '400',\n },\n mutedStatus: {\n height: 20,\n iconStyle: {},\n width: 20,\n },\n row: {},\n title: {},\n unreadContainer: {},\n unreadText: {},\n },\n colors: {\n ...Colors,\n },\n dateHeader: {\n container: {},\n text: {},\n },\n emptyStateIndicator: {\n channelContainer: {},\n channelDetails: {},\n channelTitle: {},\n },\n groupAvatar: {\n container: {},\n image: {\n resizeMode: 'cover',\n },\n },\n iconBadge: {\n icon: {},\n iconInner: {},\n unreadCount: {},\n },\n iconSquare: {\n container: {},\n image: {},\n },\n imageGallery: {\n footer: {\n centerContainer: {},\n container: {},\n imageCountText: {},\n innerContainer: {},\n leftContainer: {},\n rightContainer: {},\n },\n grid: {\n contentContainer: {},\n gridAvatar: {},\n gridAvatarWrapper: {},\n gridImage: {},\n handle: {},\n handleText: {},\n overlay: {},\n },\n header: {\n centerContainer: {},\n container: {},\n dateText: {},\n innerContainer: {},\n leftContainer: {},\n rightContainer: {},\n usernameText: {},\n },\n videoControl: {\n durationTextStyle: {},\n roundedView: {},\n videoContainer: {},\n },\n },\n inlineDateSeparator: {\n container: {},\n text: {},\n },\n loadingDots: {\n container: {},\n loadingDot: {},\n spacing: 4,\n },\n loadingErrorIndicator: {\n container: {},\n errorText: {},\n retryText: {},\n },\n loadingIndicator: {\n container: {},\n loadingText: {},\n },\n messageInput: {\n attachButton: {},\n attachButtonContainer: {},\n attachmentSelectionBar: {},\n autoCompleteInputContainer: {},\n commandsButton: {},\n commandsButtonContainer: {},\n composerContainer: {},\n container: {},\n cooldownTimer: {\n container: {},\n text: {},\n },\n editingBoxContainer: {},\n editingBoxHeader: {},\n editingBoxHeaderTitle: {},\n editingStateHeader: {\n editingBoxHeader: {},\n editingBoxHeaderTitle: {},\n },\n fileUploadPreview: {\n audioAttachment: {\n progressControlView: {},\n progressDurationText: {},\n roundedView: {},\n },\n audioAttachmentFileContainer: {},\n dismiss: {},\n fileContainer: {},\n fileContentContainer: {},\n filenameText: {},\n fileSizeText: {},\n fileTextContainer: {},\n flatList: {},\n },\n giphyCommandInput: {\n giphyContainer: {},\n giphyText: {},\n },\n imageUploadPreview: {\n dismiss: {},\n flatList: {},\n itemContainer: {},\n upload: {},\n },\n inputBox: {},\n inputBoxContainer: {},\n moreOptionsButton: {},\n optionsContainer: {},\n replyContainer: {},\n sendButton: {},\n sendButtonContainer: {},\n sendMessageDisallowedIndicator: {\n container: {},\n text: {},\n },\n showThreadMessageInChannelButton: {\n check: {},\n checkBoxActive: {},\n checkBoxInactive: {},\n container: {},\n innerContainer: {},\n text: {},\n },\n suggestions: {\n command: {\n args: {},\n container: {},\n iconContainer: {},\n title: {},\n },\n container: {\n maxHeight: vh(25),\n },\n emoji: {\n container: {},\n text: {},\n },\n header: {\n container: {},\n title: {},\n },\n item: {},\n mention: {\n avatarSize: 40,\n column: {},\n container: {},\n name: {},\n tag: {},\n },\n },\n suggestionsListContainer: {\n container: {},\n flatlist: {},\n },\n uploadProgressIndicator: {\n container: {},\n overlay: {},\n },\n },\n messageList: {\n container: {},\n contentContainer: {},\n errorNotification: {},\n errorNotificationText: {},\n inlineUnreadIndicator: {\n container: {},\n text: {},\n },\n listContainer: {},\n messageSystem: {\n container: {},\n dateText: {},\n line: {},\n text: {},\n textContainer: {},\n },\n scrollToBottomButton: {\n container: {},\n touchable: {},\n unreadCountNotificationContainer: {},\n unreadCountNotificationText: {},\n wrapper: {},\n },\n typingIndicatorContainer: {},\n },\n messageSimple: {\n actions: {\n button: {},\n buttonText: {},\n container: {},\n },\n avatarWrapper: {\n container: {},\n leftAlign: {\n marginRight: 8,\n },\n rightAlign: {\n marginLeft: 8,\n },\n spacer: {\n height: 28,\n width: 32, // same as BASE_AVATAR_SIZE\n },\n },\n card: {\n authorName: {},\n authorNameContainer: {},\n authorNameFooter: {},\n authorNameFooterContainer: {},\n authorNameMask: {},\n container: {},\n cover: {},\n footer: {\n description: {},\n title: {\n fontWeight: '700',\n },\n },\n noURI: {\n borderLeftWidth: 2,\n paddingLeft: 8,\n },\n playButtonStyle: {\n durationTextStyle: {},\n roundedView: {},\n videoContainer: {},\n },\n playIcon: {\n height: 24,\n width: 24,\n },\n },\n container: {},\n content: {\n container: {\n borderRadiusL: 16,\n borderRadiusS: 0,\n },\n containerInner: {},\n deletedContainer: {},\n deletedContainerInner: {},\n deletedMetaText: {\n paddingHorizontal: 5,\n },\n deletedText: {\n em: {\n fontSize: 15,\n fontStyle: 'italic',\n fontWeight: '400',\n },\n },\n errorContainer: {\n paddingRight: 12,\n paddingTop: 0,\n },\n errorIcon: {\n height: 20,\n width: 20,\n },\n errorIconContainer: {\n bottom: -2,\n position: 'absolute',\n right: -12,\n },\n eyeIcon: {\n height: 16,\n width: 16,\n },\n markdown: {},\n messageUser: {\n fontSize: 12,\n fontWeight: '700',\n paddingRight: 6,\n },\n metaContainer: {\n flexDirection: 'row',\n marginTop: 4,\n },\n metaText: {\n fontSize: 12,\n },\n replyBorder: {},\n replyContainer: {},\n textContainer: {\n onlyEmojiMarkdown: { text: { fontSize: 50 } },\n },\n wrapper: {},\n },\n file: {\n container: {},\n details: {},\n fileSize: {},\n icon: {},\n title: {},\n },\n fileAttachmentGroup: {\n container: {},\n },\n gallery: {\n galleryContainer: {},\n galleryItemColumn: {},\n gridHeight: 195,\n gridWidth: 256,\n image: {},\n imageContainer: {},\n maxHeight: 300,\n maxWidth: 256,\n minHeight: 100,\n minWidth: 170,\n moreImagesContainer: {},\n moreImagesText: {},\n },\n giphy: {\n buttonContainer: {},\n cancel: {},\n container: {},\n giphy: {},\n giphyContainer: {},\n giphyHeaderText: {},\n giphyHeaderTitle: {},\n giphyMask: {},\n giphyMaskText: {},\n header: {},\n selectionContainer: {},\n send: {},\n shuffle: {},\n title: {},\n },\n loadingIndicator: {\n container: {},\n roundedView: {},\n },\n pinnedHeader: {\n container: {},\n label: {},\n },\n reactionList: {\n container: {},\n middleIcon: {},\n radius: 2, // not recommended to change this\n reactionBubble: {},\n reactionBubbleBackground: {},\n reactionSize: 24,\n strokeSize: 1, // not recommended to change this\n },\n replies: {\n avatar: {},\n avatarContainerMultiple: {},\n avatarContainerSingle: {},\n container: {},\n leftAvatarsContainer: {},\n leftCurve: {},\n messageRepliesText: {},\n rightAvatarsContainer: {},\n rightCurve: {},\n },\n status: {\n checkAllIcon: {\n height: DEFAULT_STATUS_ICON_SIZE,\n width: DEFAULT_STATUS_ICON_SIZE,\n },\n checkIcon: {\n height: DEFAULT_STATUS_ICON_SIZE,\n width: DEFAULT_STATUS_ICON_SIZE,\n },\n readByCount: {},\n statusContainer: {},\n timeIcon: {\n height: DEFAULT_STATUS_ICON_SIZE,\n width: DEFAULT_STATUS_ICON_SIZE,\n },\n },\n targetedMessageUnderlay: {},\n videoThumbnail: {\n container: {},\n roundedView: {},\n },\n },\n overlay: {\n container: {},\n messageActions: {\n actionContainer: {},\n icon: {},\n title: {},\n },\n padding: 8,\n reactions: {\n avatarContainer: {},\n avatarName: {},\n avatarSize: 64,\n container: {},\n flatListContainer: {},\n radius: 2,\n reactionBubble: {},\n reactionBubbleBackground: {},\n title: {},\n },\n reactionsList: {\n radius: 2.5,\n reaction: {},\n reactionList: {},\n reactionSize: 24,\n },\n },\n reply: {\n container: {},\n fileAttachmentContainer: {},\n imageAttachment: {},\n markdownStyles: {},\n messageContainer: {},\n textContainer: {},\n videoThumbnail: {\n container: {},\n image: {},\n },\n },\n screenPadding: 8,\n spinner: {},\n thread: {\n newThread: {\n text: {},\n },\n },\n typingIndicator: {\n container: {},\n text: {\n fontSize: 14,\n },\n },\n};\n"]}
@@ -1,5 +1,7 @@
1
1
  var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
2
2
 
3
+ var _typeof = require("@babel/runtime/helpers/typeof");
4
+
3
5
  Object.defineProperty(exports, "__esModule", {
4
6
  value: true
5
7
  });
@@ -15,7 +17,8 @@ var _exportNames = {
15
17
  trTranslations: true,
16
18
  heTranslations: true,
17
19
  QuickSqliteClient: true,
18
- version: true
20
+ version: true,
21
+ OfflineStoreApis: true
19
22
  };
20
23
  Object.defineProperty(exports, "NetInfo", {
21
24
  enumerable: true,
@@ -23,6 +26,7 @@ Object.defineProperty(exports, "NetInfo", {
23
26
  return _native.NetInfo;
24
27
  }
25
28
  });
29
+ exports.OfflineStoreApis = void 0;
26
30
  Object.defineProperty(exports, "QuickSqliteClient", {
27
31
  enumerable: true,
28
32
  get: function get() {
@@ -223,4 +227,12 @@ var _he = _interopRequireDefault(require("./i18n/he.json"));
223
227
  var _QuickSqliteClient = require("./store/QuickSqliteClient");
224
228
 
225
229
  var _version = require("./version.json");
230
+
231
+ var OfflineStoreApis = _interopRequireWildcard(require("./store/apis"));
232
+
233
+ exports.OfflineStoreApis = OfflineStoreApis;
234
+
235
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
236
+
237
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { "default": obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj["default"] = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
226
238
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA","sourcesContent":["export * from './components';\nexport * from './hooks';\nexport { registerNativeHandlers, NetInfo } from './native';\nexport * from './contexts';\nexport * from './emoji-data/compiled';\n\nexport * from './icons';\n\nexport * from './types/types';\n\nexport * from './utils/Streami18n';\nexport * from './utils/utils';\n\nexport { default as enTranslations } from './i18n/en.json';\nexport { default as frTranslations } from './i18n/fr.json';\nexport { default as hiTranslations } from './i18n/hi.json';\nexport { default as itTranslations } from './i18n/it.json';\nexport { default as nlTranslations } from './i18n/nl.json';\nexport { default as ruTranslations } from './i18n/ru.json';\nexport { default as trTranslations } from './i18n/tr.json';\nexport { default as heTranslations } from './i18n/he.json';\n\nexport { QuickSqliteClient } from './store/QuickSqliteClient';\nexport { version } from './version.json';\n"]}
1
+ {"version":3,"sources":["index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AACA;;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;;AAEA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AACA;;AAEA;;AACA;;AAEA","sourcesContent":["export * from './components';\nexport * from './hooks';\nexport { registerNativeHandlers, NetInfo } from './native';\nexport * from './contexts';\nexport * from './emoji-data/compiled';\n\nexport * from './icons';\n\nexport * from './types/types';\n\nexport * from './utils/Streami18n';\nexport * from './utils/utils';\n\nexport { default as enTranslations } from './i18n/en.json';\nexport { default as frTranslations } from './i18n/fr.json';\nexport { default as hiTranslations } from './i18n/hi.json';\nexport { default as itTranslations } from './i18n/it.json';\nexport { default as nlTranslations } from './i18n/nl.json';\nexport { default as ruTranslations } from './i18n/ru.json';\nexport { default as trTranslations } from './i18n/tr.json';\nexport { default as heTranslations } from './i18n/he.json';\n\nexport { QuickSqliteClient } from './store/QuickSqliteClient';\nexport { version } from './version.json';\n\nimport * as OfflineStoreApis from './store/apis';\nexport { OfflineStoreApis };\n"]}
@@ -3,7 +3,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- exports.sqliteMock = exports.resetDBMocking = exports.initializeDBMocking = exports.db = void 0;
6
+ exports.sqliteMock = exports.db = void 0;
7
7
 
8
8
  var _betterSqlite = _interopRequireDefault(require("better-sqlite3"));
9
9
 
@@ -110,16 +110,4 @@ var sqliteMock = {
110
110
  }
111
111
  };
112
112
  exports.sqliteMock = sqliteMock;
113
-
114
- var initializeDBMocking = function initializeDBMocking() {
115
- global.sqlite = sqliteMock;
116
- };
117
-
118
- exports.initializeDBMocking = initializeDBMocking;
119
-
120
- var resetDBMocking = function resetDBMocking() {
121
- return global.sqlite = undefined;
122
- };
123
-
124
- exports.resetDBMocking = resetDBMocking;
125
113
  //# sourceMappingURL=mock.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["mock.ts"],"names":["db","sqliteMock","close","message","status","executeSql","dbName","queryInput","params","query","trim","toLowerCase","stmt","prepare","result","indexOf","modifiedParams","map","p","Number","all","rows","_array","pragmaQueryTokens","split","pragma","run","executeSqlBatch","queriesArr","forEach","queryAndParams","staus","open","Database","initializeDBMocking","global","sqlite","resetDBMocking","undefined"],"mappings":";;;;;;;AAAA;;AAIO,IAAIA,EAAJ;;AAEA,IAAMC,UAAU,GAAG;AACxBC,EAAAA,KAAK,EAAE,iBAAM;AACXF,IAAAA,EAAE,CAACE,KAAH;AACA,WAAO;AACLC,MAAAA,OAAO,EAAE,EADJ;AAELC,MAAAA,MAAM,EAAE;AAFH,KAAP;AAID,GAPuB;AAQxBC,EAAAA,UAAU,EAAE,oBAACC,MAAD,EAAiBC,UAAjB,EAAqCC,MAArC,EAA2D;AACrE,QAAMC,KAAK,GAAGF,UAAU,CAACG,IAAX,GAAkBC,WAAlB,EAAd;AACA,QAAMC,IAAI,GAAGZ,EAAE,CAACa,OAAH,CAAWJ,KAAX,CAAb;AACA,QAAI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C,EAAAA,MAAM,CAACC,MAAP,GAAgBnC,UAAhB;AACD,CAFM;;;;AAGA,IAAMoC,cAAc,GAAG,SAAjBA,cAAiB;AAAA,SAAOF,MAAM,CAACC,MAAP,GAAgBE,SAAvB;AAAA,CAAvB","sourcesContent":["import Database from 'better-sqlite3';\n\nimport type { PreparedQueries } from '../../store/types';\n\nexport let db: Database;\n\nexport const sqliteMock = {\n close: () => {\n db.close();\n return {\n message: '',\n status: 0,\n };\n },\n executeSql: (dbName: string, queryInput: string, params: unknown[]) => {\n const query = queryInput.trim().toLowerCase();\n const stmt = db.prepare(query);\n let result = [];\n\n if (query.indexOf('select') === 0) {\n if (params) {\n const modifiedParams = params.map((p) => {\n if (typeof p == 'boolean') {\n return Number(p);\n } else {\n return p;\n }\n });\n result = stmt.all(modifiedParams);\n } else {\n result = stmt.all();\n }\n\n return {\n message: '',\n rows: {\n _array: result,\n },\n status: 0,\n };\n }\n\n if (query.indexOf('pragma') === 0) {\n const pragmaQueryTokens = query.split(' ');\n if (pragmaQueryTokens[2] === '=') {\n db.pragma(`${pragmaQueryTokens[1]} = ${pragmaQueryTokens[3]}`);\n } else {\n result = db.pragma(`${pragmaQueryTokens[1]}`);\n }\n\n return {\n message: '',\n rows: {\n _array: result,\n },\n status: 0,\n };\n }\n\n // insert or create table query\n if (params) {\n stmt.run(params);\n } else {\n stmt.run();\n }\n\n return {\n message: '',\n rows: {\n _array: result,\n },\n status: 0,\n };\n },\n executeSqlBatch: (dbName: string, queriesArr: PreparedQueries[]) => {\n queriesArr.forEach((queryAndParams) => {\n const query = queryAndParams[0];\n const params = queryAndParams[1];\n const stmt = db.prepare(query);\n if (params) {\n const modifiedParams = params.map((p) => {\n if (typeof p == 'boolean') {\n return Number(p);\n } else {\n return p;\n }\n });\n\n stmt.run(modifiedParams);\n } else {\n stmt.run();\n }\n });\n\n return {\n message: '',\n staus: 0,\n };\n },\n open: () => {\n db = new Database('foobar.db');\n return {\n message: '',\n status: 0,\n };\n },\n};\n\nexport const initializeDBMocking = () => {\n global.sqlite = sqliteMock;\n};\nexport const resetDBMocking = () => (global.sqlite = undefined);\n"]}
1
+ {"version":3,"sources":["mock.ts"],"names":["db","sqliteMock","close","message","status","executeSql","dbName","queryInput","params","query","trim","toLowerCase","stmt","prepare","result","indexOf","modifiedParams","map","p","Number","all","rows","_array","pragmaQueryTokens","split","pragma","run","executeSqlBatch","queriesArr","forEach","queryAndParams","staus","open","Sqlite3"],"mappings":";;;;;;;AAAA;;AAIO,IAAIA,EAAJ;;AAEA,IAAMC,UAAU,GAAG;AACxBC,EAAAA,KAAK,EAAE,iBAAM;AACXF,IAAAA,EAAE,CAACE,KAAH;AACA,WAAO;AACLC,MAAAA,OAAO,EAAE,EADJ;AAELC,MAAAA,MAAM,EAAE;AAFH,KAAP;AAID,GAPuB;AAQxBC,EAAAA,UAAU,EAAE,oBAACC,MAAD,EAAiBC,UAAjB,EAAqCC,MAArC,EAA2D;AACrE,QAAMC,KAAK,GAAGF,UAAU,CAACG,IAAX,GAAkBC,WAAlB,EAAd;AACA,QAAMC,IAAI,GAAGZ,EAAE,CAACa,OAAH,CAAWJ,KAAX,CAAb;AACA,QAAIK,MAAiB,GAAG,EAAxB;;AAEA,QAAIL,KAAK,CAACM,OAAN,CAAc,QAAd,MAA4B,CAAhC,EAAmC;AACjC,UAAIP,MAAJ,EAAY;AACV,YAAMQ,cAAc,GAAGR,MAAM,CAACS,GAAP,CAAW,UAACC,CAAD,EAAO;AACvC,cAAI,OAAOA,CAAP,IAAY,SAAhB,EAA2B;AACzB,mBAAOC,MAAM,CAACD,CAAD,CAAb;AACD,WAFD,MAEO;AACL,mBAAOA,CAAP;AACD;AACF,SANsB,CAAvB;AAOAJ,QAAAA,MAAM,GAAGF,IAAI,CAACQ,GAAL,CAASJ,cAAT,CAAT;AACD,OATD,MASO;AACLF,QAAAA,MAAM,GAAGF,IAAI,CAACQ,GAAL,EAAT;AACD;;AAED,aAAO;AACLjB,QAAAA,OAAO,EAAE,EADJ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CAAWJ,KAAX,CAAb;;AACA,UAAID,MAAJ,EAAY;AACV,YAAMQ,cAAc,GAAGR,MAAM,CAACS,GAAP,CAAW,UAACC,CAAD,EAAO;AACvC,cAAI,OAAOA,CAAP,IAAY,SAAhB,EAA2B;AACzB,mBAAOC,MAAM,CAACD,CAAD,CAAb;AACD,WAFD,MAEO;AACL,mBAAOA,CAAP;AACD;AACF,SANsB,CAAvB;AAQAN,QAAAA,IAAI,CAACc,GAAL,CAASV,cAAT;AACD,OAVD,MAUO;AACLJ,QAAAA,IAAI,CAACc,GAAL;AACD;AACF,KAjBD;AAmBA,WAAO;AACLvB,MAAAA,OAAO,EAAE,EADJ;AAEL4B,MAAAA,KAAK,EAAE;AAFF,KAAP;AAID,GA5FuB;AA6FxBC,EAAAA,IAAI,EAAE,gBAAM;AACV,iBAAAhC,EAAE,GAAG,IAAIiC,wBAAJ,CAAY,WAAZ,CAAL;AACA,WAAO;AACL9B,MAAAA,OAAO,EAAE,EADJ;AAELC,MAAAA,MAAM,EAAE;AAFH,KAAP;AAID;AAnGuB,CAAnB","sourcesContent":["import Sqlite3 from 'better-sqlite3';\n\nimport type { PreparedQueries } from '../../store/types';\n\nexport let db: Sqlite3.Database;\n\nexport const sqliteMock = {\n close: () => {\n db.close();\n return {\n message: '',\n status: 0,\n };\n },\n executeSql: (dbName: string, queryInput: string, params: unknown[]) => {\n const query = queryInput.trim().toLowerCase();\n const stmt = db.prepare(query);\n let result: unknown[] = [];\n\n if (query.indexOf('select') === 0) {\n if (params) {\n const modifiedParams = params.map((p) => {\n if (typeof p == 'boolean') {\n return Number(p);\n } else {\n return p;\n }\n });\n result = stmt.all(modifiedParams);\n } else {\n result = stmt.all();\n }\n\n return {\n message: '',\n rows: {\n _array: result,\n },\n status: 0,\n };\n }\n\n if (query.indexOf('pragma') === 0) {\n const pragmaQueryTokens = query.split(' ');\n if (pragmaQueryTokens[2] === '=') {\n db.pragma(`${pragmaQueryTokens[1]} = ${pragmaQueryTokens[3]}`);\n } else {\n result = db.pragma(`${pragmaQueryTokens[1]}`);\n }\n\n return {\n message: '',\n rows: {\n _array: result,\n },\n status: 0,\n };\n }\n\n // insert or create table query\n if (params) {\n stmt.run(params);\n } else {\n stmt.run();\n }\n\n return {\n message: '',\n rows: {\n _array: result,\n },\n status: 0,\n };\n },\n executeSqlBatch: (dbName: string, queriesArr: PreparedQueries[]) => {\n queriesArr.forEach((queryAndParams) => {\n const query = queryAndParams[0];\n const params = queryAndParams[1];\n const stmt = db.prepare(query);\n if (params) {\n const modifiedParams = params.map((p) => {\n if (typeof p == 'boolean') {\n return Number(p);\n } else {\n return p;\n }\n });\n\n stmt.run(modifiedParams);\n } else {\n stmt.run();\n }\n });\n\n return {\n message: '',\n staus: 0,\n };\n },\n open: () => {\n db = new Sqlite3('foobar.db');\n return {\n message: '',\n status: 0,\n };\n },\n};\n"]}
@@ -7,6 +7,8 @@ var _default = function _default(client, newMessage) {
7
7
  var channel = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : {};
8
8
  client.dispatchEvent({
9
9
  channel: channel,
10
+ channel_id: channel.id,
11
+ channel_type: channel.type,
10
12
  cid: channel.cid,
11
13
  message: newMessage,
12
14
  type: 'message.new'
@@ -1 +1 @@
1
- {"version":3,"sources":["messageNew.js"],"names":["client","newMessage","channel","dispatchEvent","cid","message","type"],"mappings":";;;;;eAAe,kBAACA,MAAD,EAASC,UAAT,EAAsC;AAAA,MAAjBC,OAAiB,uEAAP,EAAO;AACnDF,EAAAA,MAAM,CAACG,aAAP,CAAqB;AACnBD,IAAAA,OAAO,EAAPA,OADmB;AAEnBE,IAAAA,GAAG,EAAEF,OAAO,CAACE,GAFM;AAGnBC,IAAAA,OAAO,EAAEJ,UAHU;AAInBK,IAAAA,IAAI,EAAE;AAJa,GAArB;AAMD,C","sourcesContent":["export default (client, newMessage, channel = {}) => {\n client.dispatchEvent({\n channel,\n cid: channel.cid,\n message: newMessage,\n type: 'message.new',\n });\n};\n"]}
1
+ {"version":3,"sources":["messageNew.js"],"names":["client","newMessage","channel","dispatchEvent","channel_id","id","channel_type","type","cid","message"],"mappings":";;;;;eAAe,kBAACA,MAAD,EAASC,UAAT,EAAsC;AAAA,MAAjBC,OAAiB,uEAAP,EAAO;AACnDF,EAAAA,MAAM,CAACG,aAAP,CAAqB;AACnBD,IAAAA,OAAO,EAAPA,OADmB;AAEnBE,IAAAA,UAAU,EAAEF,OAAO,CAACG,EAFD;AAGnBC,IAAAA,YAAY,EAAEJ,OAAO,CAACK,IAHH;AAInBC,IAAAA,GAAG,EAAEN,OAAO,CAACM,GAJM;AAKnBC,IAAAA,OAAO,EAAER,UALU;AAMnBM,IAAAA,IAAI,EAAE;AANa,GAArB;AAQD,C","sourcesContent":["export default (client, newMessage, channel = {}) => {\n client.dispatchEvent({\n channel,\n channel_id: channel.id,\n channel_type: channel.type,\n cid: channel.cid,\n message: newMessage,\n type: 'message.new',\n });\n};\n"]}
@@ -17,15 +17,19 @@ var _schema = require("./schema");
17
17
 
18
18
  var _createCreateTableQuery = require("./sqlite-utils/createCreateTableQuery");
19
19
 
20
+ var sqlite;
21
+
20
22
  try {
21
- require('react-native-quick-sqlite');
23
+ var _require;
24
+
25
+ sqlite = (_require = require('react-native-quick-sqlite')) == null ? void 0 : _require.QuickSQLite;
22
26
  } catch (e) {}
23
27
 
24
28
  var QuickSqliteClient = (0, _createClass2["default"])(function QuickSqliteClient() {
25
29
  (0, _classCallCheck2["default"])(this, QuickSqliteClient);
26
30
  });
27
31
  exports.QuickSqliteClient = QuickSqliteClient;
28
- QuickSqliteClient.dbVersion = 0;
32
+ QuickSqliteClient.dbVersion = 2;
29
33
  QuickSqliteClient.dbName = _constants.DB_NAME;
30
34
  QuickSqliteClient.dbLocation = _constants.DB_LOCATION;
31
35
 
@@ -107,7 +111,7 @@ QuickSqliteClient.deleteDatabase = function () {
107
111
  };
108
112
 
109
113
  QuickSqliteClient.initializeDatabase = function () {
110
- if (window.sqlite === undefined) {
114
+ if (sqlite === undefined) {
111
115
  throw new Error('Please install "react-native-quick-sqlite" package to enable offline support');
112
116
  }
113
117
 
@@ -1 +1 @@
1
- {"version":3,"sources":["QuickSqliteClient.ts"],"names":["require","e","QuickSqliteClient","dbVersion","dbName","DB_NAME","dbLocation","DB_LOCATION","getDbVersion","setDbVersion","version","openDB","sqlite","open","message","status","executeSql","DB_STATUS_ERROR","console","error","closeDB","executeSqlBatch","queries","res","JSON","stringify","query","params","rows","_array","dropTables","Object","keys","tables","map","table","deleteDatabase","Error","initializeDatabase","window","undefined","getUserPragmaVersion","updateUserPragmaVersion","q","reduce","queriesSoFar","tableName","push","result","user_version","resetDB"],"mappings":";;;;;;;;;;;;;AAcA;;AACA;;AACA;;AAVA,IAAI;AACFA,EAAAA,OAAO,CAAC,2BAAD,CAAP;AACD,CAFD,CAEE,OAAOC,CAAP,EAAU,CAIX;;IAOYC,iB;;;;AAAAA,iB,CACJC,S,GAAY,C;AADRD,iB,CAGJE,M,GAASC,kB;AAHLH,iB,CAIJI,U,GAAaC,sB;;AAJTL,iB,CAMJM,Y,GAAe;AAAA,SANXN,iBAMiB,CAAKC,SAAX;AAAA,C;;AANXD,iB,CAOJO,Y,GAAe,UAACC,OAAD;AAAA,SAPXR,iBAOiC,CAAKC,SAAL,GAAiBO,OAAvC;AAAA,C;;AAPXR,iB,CASJS,M,GAAS,YAAM;AACpB,qBAA4BC,MAAM,CAACC,IAAP,CAVnBX,iBAU+B,CAAKE,MAAjB,EAVnBF,iBAU4C,CAAKI,UAA9B,CAA5B;AAAA,MAAQQ,OAAR,gBAAQA,OAAR;AAAA,MAAiBC,MAAjB,gBAAiBA,MAAjB;;AACAH,EAAAA,MAAM,CAACI,UAAP,CAXSd,iBAWS,CAAKE,MAAvB,8BAA2D,EAA3D;;AAEA,MAAIW,MAAM,KAAKE,0BAAf,EAAgC;AAC9BC,IAAAA,OAAO,CAACC,KAAR,6BAdOjB,iBAciC,CAAKE,MAA7C,UAAwDU,OAAxD;AACD;AACF,C;;AAhBUZ,iB,C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OD,YAAP;AACD,GAJO,EAKR,EALQ,CAAV;AAnFS3C,EAAAA,iBA2FT,CAAKmB,eAAL,CAAqBsB,CAArB;AACD,C;;AA5FUzC,iB,CA8FJwC,uB,GAA0B,UAAChC,OAAD,EAAqB;AA9F3CR,EAAAA,iBA+FT,CAAKS,MAAL;AAEAC,EAAAA,MAAM,CAACI,UAAP,CAAkBX,kBAAlB,6BAAoDK,OAApD,EAA+D,EAA/D;AAjGSR,EAAAA,iBAmGT,CAAKkB,OAAL;AACD,C;;AApGUlB,iB,CAsGJuC,oB,GAAuB,YAAM;AAtGzBvC,EAAAA,iBAuGT,CAAKS,MAAL;;AAEA,4BAAkCC,MAAM,CAACI,UAAP,CAAkBX,kBAAlB,yBAAkD,EAAlD,CAAlC;AAAA,MAAQS,OAAR,uBAAQA,OAAR;AAAA,MAAiBc,IAAjB,uBAAiBA,IAAjB;AAAA,MAAuBb,MAAvB,uBAAuBA,MAAvB;;AAzGSb,EAAAA,iBA2GT,CAAKkB,OAAL;;AACA,MAAIL,MAAM,KAAK,CAAf,EAAkB;AAChBG,IAAAA,OAAO,CAACC,KAAR,wCAAmDL,OAAnD;AACD;;AAED,MAAMkC,MAAM,GAAGpB,IAAI,GAAGA,IAAI,CAACC,MAAR,GAAiB,EAApC;AACA,SAAOmB,MAAM,CAAC,CAAD,CAAN,CAAUC,YAAjB;AACD,C;;AAlHU/C,iB,CAoHJgD,O,GAAU,YAAM;AApHZhD,EAAAA,iBAqHT,CAAK4B,UAAL;AArHS5B,EAAAA,iBAsHT,CAAKoC,kBAAL;AACD,C","sourcesContent":["/* eslint-disable no-underscore-dangle */\n// Importing following package just to avoid errors using sqlite global.\n// @ts-ignore\n// eslint-disable-next-line @typescript-eslint/no-unused-vars, no-unused-vars\nimport types from 'react-native-quick-sqlite';\n\ntry {\n require('react-native-quick-sqlite');\n} catch (e) {\n // Failed for one of the reason\n // 1. Running on expo, where we don't support offline storage yet.\n // 2. Offline support is disabled, in which case this library is not installed.\n}\n\nimport { DB_LOCATION, DB_NAME, DB_STATUS_ERROR } from './constants';\nimport { tables } from './schema';\nimport { createCreateTableQuery } from './sqlite-utils/createCreateTableQuery';\nimport type { PreparedQueries, Table } from './types';\n\nexport class QuickSqliteClient {\n static dbVersion = 0;\n\n static dbName = DB_NAME;\n static dbLocation = DB_LOCATION;\n\n static getDbVersion = () => this.dbVersion;\n static setDbVersion = (version: number) => (this.dbVersion = version);\n\n static openDB = () => {\n const { message, status } = sqlite.open(this.dbName, this.dbLocation);\n sqlite.executeSql(this.dbName, `PRAGMA foreign_keys = ON`, []);\n\n if (status === DB_STATUS_ERROR) {\n console.error(`Error opening database ${this.dbName}: ${message}`);\n }\n };\n\n static closeDB = () => {\n const { message, status } = sqlite.open(this.dbName, this.dbLocation);\n\n if (status === DB_STATUS_ERROR) {\n console.error(`Error opening database ${this.dbName}: ${message}`);\n }\n };\n\n static executeSqlBatch = (queries: PreparedQueries[]) => {\n this.openDB();\n\n const res = sqlite.executeSqlBatch(DB_NAME, queries);\n\n if (res.status === 1) {\n console.error(`Query/queries failed: ${res.message} ${JSON.stringify(res)}`);\n }\n\n this.closeDB();\n };\n\n static executeSql = (query: string, params?: string[]) => {\n this.openDB();\n\n const { message, rows, status } = sqlite.executeSql(DB_NAME, query, params);\n\n this.closeDB();\n\n if (status === 1) {\n console.error(`Query/queries failed: ${message}: `, query);\n }\n\n return rows ? rows._array : [];\n };\n\n static dropTables = () => {\n const queries: PreparedQueries[] = Object.keys(tables).map((table) => [\n `DROP TABLE IF EXISTS ${table}`,\n [],\n ]);\n\n this.executeSqlBatch(queries);\n };\n\n static deleteDatabase = () => {\n const { message, status } = sqlite.delete(this.dbName, this.dbLocation);\n if (status === DB_STATUS_ERROR) {\n throw new Error(`Error deleting DB: ${message}`);\n }\n\n return true;\n };\n\n static initializeDatabase = () => {\n // @ts-ignore\n if (window.sqlite === undefined) {\n throw new Error(\n 'Please install \"react-native-quick-sqlite\" package to enable offline support',\n );\n }\n\n const version = this.getUserPragmaVersion();\n if (version !== this.dbVersion) {\n this.dropTables();\n this.updateUserPragmaVersion(this.dbVersion);\n }\n const q = (Object.keys(tables) as Table[]).reduce<PreparedQueries[]>(\n (queriesSoFar, tableName) => {\n queriesSoFar.push(...createCreateTableQuery(tableName));\n return queriesSoFar;\n },\n [],\n );\n\n this.executeSqlBatch(q);\n };\n\n static updateUserPragmaVersion = (version: number) => {\n this.openDB();\n\n sqlite.executeSql(DB_NAME, `PRAGMA user_version = ${version}`, []);\n\n this.closeDB();\n };\n\n static getUserPragmaVersion = () => {\n this.openDB();\n\n const { message, rows, status } = sqlite.executeSql(DB_NAME, `PRAGMA user_version`, []);\n\n this.closeDB();\n if (status === 1) {\n console.error(`Querying for user_version failed: ${message}`);\n }\n\n const result = rows ? rows._array : [];\n return result[0].user_version as number;\n };\n\n static resetDB = () => {\n this.dropTables();\n this.initializeDatabase();\n };\n}\n"]}
1
+ {"version":3,"sources":["QuickSqliteClient.ts"],"names":["sqlite","require","QuickSQLite","e","QuickSqliteClient","dbVersion","dbName","DB_NAME","dbLocation","DB_LOCATION","getDbVersion","setDbVersion","version","openDB","open","message","status","executeSql","DB_STATUS_ERROR","console","error","closeDB","executeSqlBatch","queries","res","JSON","stringify","query","params","rows","_array","dropTables","Object","keys","tables","map","table","deleteDatabase","Error","initializeDatabase","undefined","getUserPragmaVersion","updateUserPragmaVersion","q","reduce","queriesSoFar","tableName","push","result","user_version","resetDB"],"mappings":";;;;;;;;;;;;;AAYA;;AACA;;AACA;;AAZA,IAAIA,MAAJ;;AAEA,IAAI;AAAA;;AACFA,EAAAA,MAAM,eAAGC,OAAO,CAAC,2BAAD,CAAV,qBAAG,SAAsCC,WAA/C;AACD,CAFD,CAEE,OAAOC,CAAP,EAAU,CAIX;;IAWYC,iB;;;;AAAAA,iB,CACJC,S,GAAY,C;AADRD,iB,CAGJE,M,GAASC,kB;AAHLH,iB,CAIJI,U,GAAaC,sB;;AAJTL,iB,CAMJM,Y,GAAe;AAAA,SANXN,iBA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,CAACC,KAAR,wCAAmDL,OAAnD;AACD;;AAED,MAAMiC,MAAM,GAAGnB,IAAI,GAAGA,IAAI,CAACC,MAAR,GAAiB,EAApC;AACA,SAAOkB,MAAM,CAAC,CAAD,CAAN,CAAUC,YAAjB;AACD,C;;AApHU7C,iB,CAsHJ8C,O,GAAU,YAAM;AAtHZ9C,EAAAA,iBAuHT,CAAK2B,UAAL;AAvHS3B,EAAAA,iBAwHT,CAAKmC,kBAAL;AACD,C","sourcesContent":["/* eslint-disable no-underscore-dangle */\nimport type { QuickSQLite } from 'react-native-quick-sqlite';\nlet sqlite: typeof QuickSQLite;\n\ntry {\n sqlite = require('react-native-quick-sqlite')?.QuickSQLite;\n} catch (e) {\n // Failed for one of the reason\n // 1. Running on expo, where we don't support offline storage yet.\n // 2. Offline support is disabled, in which case this library is not installed.\n}\n\nimport { DB_LOCATION, DB_NAME, DB_STATUS_ERROR } from './constants';\nimport { tables } from './schema';\nimport { createCreateTableQuery } from './sqlite-utils/createCreateTableQuery';\nimport type { PreparedQueries, Table } from './types';\n\n/**\n * QuickSqliteClient takes care of any direct interaction with sqlite.\n * This way usage react-native-quick-sqlite package is scoped to a single class/file.\n */\nexport class QuickSqliteClient {\n static dbVersion = 2;\n\n static dbName = DB_NAME;\n static dbLocation = DB_LOCATION;\n\n static getDbVersion = () => this.dbVersion;\n // Force a specific db version. This is mainly useful for testsuit.\n static setDbVersion = (version: number) => (this.dbVersion = version);\n\n static openDB = () => {\n const { message, status } = sqlite.open(this.dbName, this.dbLocation);\n sqlite.executeSql(this.dbName, `PRAGMA foreign_keys = ON`, []);\n\n if (status === DB_STATUS_ERROR) {\n console.error(`Error opening database ${this.dbName}: ${message}`);\n }\n };\n\n static closeDB = () => {\n const { message, status } = sqlite.open(this.dbName, this.dbLocation);\n\n if (status === DB_STATUS_ERROR) {\n console.error(`Error opening database ${this.dbName}: ${message}`);\n }\n };\n\n static executeSqlBatch = (queries: PreparedQueries[]) => {\n this.openDB();\n\n const res = sqlite.executeSqlBatch(DB_NAME, queries);\n\n if (res.status === 1) {\n console.error(`Query/queries failed: ${res.message} ${JSON.stringify(res)}`);\n }\n\n this.closeDB();\n };\n\n static executeSql = (query: string, params?: string[]) => {\n this.openDB();\n\n const { message, rows, status } = sqlite.executeSql(DB_NAME, query, params);\n\n this.closeDB();\n\n if (status === 1) {\n console.error(`Query/queries failed: ${message}: `, query);\n }\n\n return rows ? rows._array : [];\n };\n\n static dropTables = () => {\n const queries: PreparedQueries[] = Object.keys(tables).map((table) => [\n `DROP TABLE IF EXISTS ${table}`,\n [],\n ]);\n\n this.executeSqlBatch(queries);\n };\n\n static deleteDatabase = () => {\n const { message, status } = sqlite.delete(this.dbName, this.dbLocation);\n if (status === DB_STATUS_ERROR) {\n throw new Error(`Error deleting DB: ${message}`);\n }\n\n return true;\n };\n\n static initializeDatabase = () => {\n // @ts-ignore\n if (sqlite === undefined) {\n throw new Error(\n 'Please install \"react-native-quick-sqlite\" package to enable offline support',\n );\n }\n\n const version = this.getUserPragmaVersion();\n\n if (version !== this.dbVersion) {\n this.dropTables();\n this.updateUserPragmaVersion(this.dbVersion);\n }\n const q = (Object.keys(tables) as Table[]).reduce<PreparedQueries[]>(\n (queriesSoFar, tableName) => {\n queriesSoFar.push(...createCreateTableQuery(tableName));\n return queriesSoFar;\n },\n [],\n );\n\n this.executeSqlBatch(q);\n };\n\n static updateUserPragmaVersion = (version: number) => {\n this.openDB();\n\n sqlite.executeSql(DB_NAME, `PRAGMA user_version = ${version}`, []);\n\n this.closeDB();\n };\n\n static getUserPragmaVersion = () => {\n this.openDB();\n\n const { message, rows, status } = sqlite.executeSql(DB_NAME, `PRAGMA user_version`, []);\n\n this.closeDB();\n if (status === 1) {\n console.error(`Querying for user_version failed: ${message}`);\n }\n\n const result = rows ? rows._array : [];\n return result[0].user_version as number;\n };\n\n static resetDB = () => {\n this.dropTables();\n this.initializeDatabase();\n };\n}\n"]}