@ethora/chat-component-rn 26.10.4 → 26.10.6

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 (451) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/README.md +15 -0
  3. package/app.plugin.js +2 -0
  4. package/lib/commonjs/assets/icons.js +2 -2
  5. package/lib/commonjs/assets/icons.js.map +1 -1
  6. package/lib/commonjs/components/MainComponents/AlbumGrid.js +152 -0
  7. package/lib/commonjs/components/MainComponents/AlbumGrid.js.map +1 -0
  8. package/lib/commonjs/components/MainComponents/ChatRoom.js +2 -2
  9. package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
  10. package/lib/commonjs/components/MainComponents/MediaMessage.js +199 -123
  11. package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
  12. package/lib/commonjs/components/MainComponents/MediaUploadOverlay.js +109 -0
  13. package/lib/commonjs/components/MainComponents/MediaUploadOverlay.js.map +1 -0
  14. package/lib/commonjs/components/MessageBubble/MediaCaption.js +51 -0
  15. package/lib/commonjs/components/MessageBubble/MediaCaption.js.map +1 -0
  16. package/lib/commonjs/components/MessageBubble/Message.js +40 -1
  17. package/lib/commonjs/components/MessageBubble/Message.js.map +1 -1
  18. package/lib/commonjs/components/MessageBubble/MessageInteractions.js +2 -1
  19. package/lib/commonjs/components/MessageBubble/MessageInteractions.js.map +1 -1
  20. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +75 -0
  21. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  22. package/lib/commonjs/components/RoomComponents/LastMessageItem.js +20 -4
  23. package/lib/commonjs/components/RoomComponents/LastMessageItem.js.map +1 -1
  24. package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js +3 -2
  25. package/lib/commonjs/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
  26. package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +3 -2
  27. package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
  28. package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +3 -2
  29. package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
  30. package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +3 -2
  31. package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
  32. package/lib/commonjs/components/Thread/ThreadWrapper.js +3 -2
  33. package/lib/commonjs/components/Thread/ThreadWrapper.js.map +1 -1
  34. package/lib/commonjs/components/VideoCalls/ActiveCallBar.js +61 -16
  35. package/lib/commonjs/components/VideoCalls/ActiveCallBar.js.map +1 -1
  36. package/lib/commonjs/components/VideoCalls/CallIcons.js +41 -16
  37. package/lib/commonjs/components/VideoCalls/CallIcons.js.map +1 -1
  38. package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js +183 -9
  39. package/lib/commonjs/components/VideoCalls/VideoCallOverlay.js.map +1 -1
  40. package/lib/commonjs/components/VideoCalls/VideoCallSession.js +40 -15
  41. package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
  42. package/lib/commonjs/components/VideoCalls/callSessionController.js +49 -26
  43. package/lib/commonjs/components/VideoCalls/callSessionController.js.map +1 -1
  44. package/lib/commonjs/components/VideoCalls/callUiStore.js +33 -4
  45. package/lib/commonjs/components/VideoCalls/callUiStore.js.map +1 -1
  46. package/lib/commonjs/components/VideoCalls/livekitRuntime.js +9 -1
  47. package/lib/commonjs/components/VideoCalls/livekitRuntime.js.map +1 -1
  48. package/lib/commonjs/components/VideoCalls/useCallKeep.js +197 -28
  49. package/lib/commonjs/components/VideoCalls/useCallKeep.js.map +1 -1
  50. package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js +88 -0
  51. package/lib/commonjs/components/VideoCalls/useOngoingCallNotification.js.map +1 -0
  52. package/lib/commonjs/components/VideoCalls/usePipTile.js +232 -0
  53. package/lib/commonjs/components/VideoCalls/usePipTile.js.map +1 -0
  54. package/lib/commonjs/components/styled/MediaFilePreview.js +60 -47
  55. package/lib/commonjs/components/styled/MediaFilePreview.js.map +1 -1
  56. package/lib/commonjs/components/styled/MessageImage.js +16 -6
  57. package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
  58. package/lib/commonjs/components/styled/SendInput.js +99 -68
  59. package/lib/commonjs/components/styled/SendInput.js.map +1 -1
  60. package/lib/commonjs/components/styled/VideoMessage.js +24 -10
  61. package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
  62. package/lib/commonjs/context/xmppProvider.js +46 -0
  63. package/lib/commonjs/context/xmppProvider.js.map +1 -1
  64. package/lib/commonjs/e2ee/fileEnvelope.js +6 -0
  65. package/lib/commonjs/e2ee/fileEnvelope.js.map +1 -1
  66. package/lib/commonjs/e2ee/sealedBody.js +32 -2
  67. package/lib/commonjs/e2ee/sealedBody.js.map +1 -1
  68. package/lib/commonjs/helpers/albumLayout.js +150 -0
  69. package/lib/commonjs/helpers/albumLayout.js.map +1 -0
  70. package/lib/commonjs/helpers/attachments.js +255 -0
  71. package/lib/commonjs/helpers/attachments.js.map +1 -0
  72. package/lib/commonjs/helpers/caption.js +214 -0
  73. package/lib/commonjs/helpers/caption.js.map +1 -0
  74. package/lib/commonjs/helpers/createMainMessageForThread.js +5 -1
  75. package/lib/commonjs/helpers/createMainMessageForThread.js.map +1 -1
  76. package/lib/commonjs/helpers/createMessageFromXml.js +19 -5
  77. package/lib/commonjs/helpers/createMessageFromXml.js.map +1 -1
  78. package/lib/commonjs/helpers/fileKind.js +40 -0
  79. package/lib/commonjs/helpers/fileKind.js.map +1 -0
  80. package/lib/commonjs/helpers/getDataFromXml.js +6 -1
  81. package/lib/commonjs/helpers/getDataFromXml.js.map +1 -1
  82. package/lib/commonjs/helpers/mapWithConcurrency.js +41 -0
  83. package/lib/commonjs/helpers/mapWithConcurrency.js.map +1 -0
  84. package/lib/commonjs/helpers/mediaLimits.js +33 -0
  85. package/lib/commonjs/helpers/mediaLimits.js.map +1 -0
  86. package/lib/commonjs/helpers/mediaSendRetry.js +64 -0
  87. package/lib/commonjs/helpers/mediaSendRetry.js.map +1 -0
  88. package/lib/commonjs/helpers/mediaWireData.js +62 -0
  89. package/lib/commonjs/helpers/mediaWireData.js.map +1 -0
  90. package/lib/commonjs/helpers/mentionSpans.js +19 -0
  91. package/lib/commonjs/helpers/mentionSpans.js.map +1 -0
  92. package/lib/commonjs/helpers/mimeToExtension.js +45 -0
  93. package/lib/commonjs/helpers/mimeToExtension.js.map +1 -1
  94. package/lib/commonjs/helpers/readReceipts.js +173 -0
  95. package/lib/commonjs/helpers/readReceipts.js.map +1 -0
  96. package/lib/commonjs/helpers/repairFilenameEncoding.js +79 -0
  97. package/lib/commonjs/helpers/repairFilenameEncoding.js.map +1 -0
  98. package/lib/commonjs/helpers/safeJson.js +18 -0
  99. package/lib/commonjs/helpers/safeJson.js.map +1 -0
  100. package/lib/commonjs/helpers/updateMessagesTillLast.js +3 -1
  101. package/lib/commonjs/helpers/updateMessagesTillLast.js.map +1 -1
  102. package/lib/commonjs/hooks/useSendMessage.js +384 -193
  103. package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
  104. package/lib/commonjs/i18n/strings.js +144 -0
  105. package/lib/commonjs/i18n/strings.js.map +1 -1
  106. package/lib/commonjs/main.js.map +1 -1
  107. package/lib/commonjs/networking/api-requests/auth.api.js +62 -3
  108. package/lib/commonjs/networking/api-requests/auth.api.js.map +1 -1
  109. package/lib/commonjs/networking/stanzaHandlers.js +100 -3
  110. package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
  111. package/lib/commonjs/networking/xmpp/handleStanzas.xmpp.js +4 -2
  112. package/lib/commonjs/networking/xmpp/handleStanzas.xmpp.js.map +1 -1
  113. package/lib/commonjs/networking/xmpp/sendDisplayedMarker.xmpp.js +28 -0
  114. package/lib/commonjs/networking/xmpp/sendDisplayedMarker.xmpp.js.map +1 -0
  115. package/lib/commonjs/networking/xmpp/sendMediaMessage.xmpp.js +53 -2
  116. package/lib/commonjs/networking/xmpp/sendMediaMessage.xmpp.js.map +1 -1
  117. package/lib/commonjs/networking/xmpp/sendReceivedReceipt.xmpp.js +28 -0
  118. package/lib/commonjs/networking/xmpp/sendReceivedReceipt.xmpp.js.map +1 -0
  119. package/lib/commonjs/networking/xmppClient.js +64 -0
  120. package/lib/commonjs/networking/xmppClient.js.map +1 -1
  121. package/lib/commonjs/roomStore/persistence.js +78 -5
  122. package/lib/commonjs/roomStore/persistence.js.map +1 -1
  123. package/lib/commonjs/roomStore/roomHeapSlice.js +4 -0
  124. package/lib/commonjs/roomStore/roomHeapSlice.js.map +1 -1
  125. package/lib/commonjs/roomStore/roomsSlice.js +114 -1
  126. package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
  127. package/lib/commonjs/types/models/attachment.model.js +2 -0
  128. package/lib/commonjs/types/models/attachment.model.js.map +1 -0
  129. package/lib/commonjs/version.js +1 -1
  130. package/lib/module/assets/icons.js +1 -1
  131. package/lib/module/assets/icons.js.map +1 -1
  132. package/lib/module/components/MainComponents/AlbumGrid.js +146 -0
  133. package/lib/module/components/MainComponents/AlbumGrid.js.map +1 -0
  134. package/lib/module/components/MainComponents/ChatRoom.js +2 -2
  135. package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
  136. package/lib/module/components/MainComponents/MediaMessage.js +200 -124
  137. package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
  138. package/lib/module/components/MainComponents/MediaUploadOverlay.js +104 -0
  139. package/lib/module/components/MainComponents/MediaUploadOverlay.js.map +1 -0
  140. package/lib/module/components/MessageBubble/MediaCaption.js +46 -0
  141. package/lib/module/components/MessageBubble/MediaCaption.js.map +1 -0
  142. package/lib/module/components/MessageBubble/Message.js +44 -5
  143. package/lib/module/components/MessageBubble/Message.js.map +1 -1
  144. package/lib/module/components/MessageBubble/MessageInteractions.js +2 -1
  145. package/lib/module/components/MessageBubble/MessageInteractions.js.map +1 -1
  146. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +75 -0
  147. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  148. package/lib/module/components/RoomComponents/LastMessageItem.js +20 -4
  149. package/lib/module/components/RoomComponents/LastMessageItem.js.map +1 -1
  150. package/lib/module/components/RoomComponents/styled/LastAudioMessage.js +3 -2
  151. package/lib/module/components/RoomComponents/styled/LastAudioMessage.js.map +1 -1
  152. package/lib/module/components/RoomComponents/styled/LastMessageFile.js +3 -2
  153. package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
  154. package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +3 -2
  155. package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
  156. package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +3 -2
  157. package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
  158. package/lib/module/components/Thread/ThreadWrapper.js +3 -2
  159. package/lib/module/components/Thread/ThreadWrapper.js.map +1 -1
  160. package/lib/module/components/VideoCalls/ActiveCallBar.js +63 -18
  161. package/lib/module/components/VideoCalls/ActiveCallBar.js.map +1 -1
  162. package/lib/module/components/VideoCalls/CallIcons.js +38 -15
  163. package/lib/module/components/VideoCalls/CallIcons.js.map +1 -1
  164. package/lib/module/components/VideoCalls/VideoCallOverlay.js +185 -11
  165. package/lib/module/components/VideoCalls/VideoCallOverlay.js.map +1 -1
  166. package/lib/module/components/VideoCalls/VideoCallSession.js +41 -16
  167. package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
  168. package/lib/module/components/VideoCalls/callSessionController.js +46 -24
  169. package/lib/module/components/VideoCalls/callSessionController.js.map +1 -1
  170. package/lib/module/components/VideoCalls/callUiStore.js +30 -3
  171. package/lib/module/components/VideoCalls/callUiStore.js.map +1 -1
  172. package/lib/module/components/VideoCalls/livekitRuntime.js +9 -1
  173. package/lib/module/components/VideoCalls/livekitRuntime.js.map +1 -1
  174. package/lib/module/components/VideoCalls/useCallKeep.js +198 -29
  175. package/lib/module/components/VideoCalls/useCallKeep.js.map +1 -1
  176. package/lib/module/components/VideoCalls/useOngoingCallNotification.js +84 -0
  177. package/lib/module/components/VideoCalls/useOngoingCallNotification.js.map +1 -0
  178. package/lib/module/components/VideoCalls/usePipTile.js +228 -0
  179. package/lib/module/components/VideoCalls/usePipTile.js.map +1 -0
  180. package/lib/module/components/styled/MediaFilePreview.js +61 -48
  181. package/lib/module/components/styled/MediaFilePreview.js.map +1 -1
  182. package/lib/module/components/styled/MessageImage.js +16 -6
  183. package/lib/module/components/styled/MessageImage.js.map +1 -1
  184. package/lib/module/components/styled/SendInput.js +99 -68
  185. package/lib/module/components/styled/SendInput.js.map +1 -1
  186. package/lib/module/components/styled/VideoMessage.js +24 -10
  187. package/lib/module/components/styled/VideoMessage.js.map +1 -1
  188. package/lib/module/context/xmppProvider.js +46 -0
  189. package/lib/module/context/xmppProvider.js.map +1 -1
  190. package/lib/module/e2ee/fileEnvelope.js +1 -1
  191. package/lib/module/e2ee/fileEnvelope.js.map +1 -1
  192. package/lib/module/e2ee/sealedBody.js +32 -2
  193. package/lib/module/e2ee/sealedBody.js.map +1 -1
  194. package/lib/module/helpers/albumLayout.js +143 -0
  195. package/lib/module/helpers/albumLayout.js.map +1 -0
  196. package/lib/module/helpers/attachments.js +245 -0
  197. package/lib/module/helpers/attachments.js.map +1 -0
  198. package/lib/module/helpers/caption.js +207 -0
  199. package/lib/module/helpers/caption.js.map +1 -0
  200. package/lib/module/helpers/createMainMessageForThread.js +5 -1
  201. package/lib/module/helpers/createMainMessageForThread.js.map +1 -1
  202. package/lib/module/helpers/createMessageFromXml.js +20 -6
  203. package/lib/module/helpers/createMessageFromXml.js.map +1 -1
  204. package/lib/module/helpers/fileKind.js +34 -0
  205. package/lib/module/helpers/fileKind.js.map +1 -0
  206. package/lib/module/helpers/getDataFromXml.js +6 -1
  207. package/lib/module/helpers/getDataFromXml.js.map +1 -1
  208. package/lib/module/helpers/mapWithConcurrency.js +37 -0
  209. package/lib/module/helpers/mapWithConcurrency.js.map +1 -0
  210. package/lib/module/helpers/mediaLimits.js +27 -0
  211. package/lib/module/helpers/mediaLimits.js.map +1 -0
  212. package/lib/module/helpers/mediaSendRetry.js +55 -0
  213. package/lib/module/helpers/mediaSendRetry.js.map +1 -0
  214. package/lib/module/helpers/mediaWireData.js +58 -0
  215. package/lib/module/helpers/mediaWireData.js.map +1 -0
  216. package/lib/module/helpers/mentionSpans.js +14 -0
  217. package/lib/module/helpers/mentionSpans.js.map +1 -0
  218. package/lib/module/helpers/mimeToExtension.js +43 -0
  219. package/lib/module/helpers/mimeToExtension.js.map +1 -1
  220. package/lib/module/helpers/readReceipts.js +160 -0
  221. package/lib/module/helpers/readReceipts.js.map +1 -0
  222. package/lib/module/helpers/repairFilenameEncoding.js +74 -0
  223. package/lib/module/helpers/repairFilenameEncoding.js.map +1 -0
  224. package/lib/module/helpers/safeJson.js +13 -0
  225. package/lib/module/helpers/safeJson.js.map +1 -0
  226. package/lib/module/helpers/updateMessagesTillLast.js +3 -1
  227. package/lib/module/helpers/updateMessagesTillLast.js.map +1 -1
  228. package/lib/module/hooks/useSendMessage.js +387 -195
  229. package/lib/module/hooks/useSendMessage.js.map +1 -1
  230. package/lib/module/i18n/strings.js +144 -0
  231. package/lib/module/i18n/strings.js.map +1 -1
  232. package/lib/module/main.js.map +1 -1
  233. package/lib/module/networking/api-requests/auth.api.js +62 -3
  234. package/lib/module/networking/api-requests/auth.api.js.map +1 -1
  235. package/lib/module/networking/stanzaHandlers.js +97 -4
  236. package/lib/module/networking/stanzaHandlers.js.map +1 -1
  237. package/lib/module/networking/xmpp/handleStanzas.xmpp.js +5 -3
  238. package/lib/module/networking/xmpp/handleStanzas.xmpp.js.map +1 -1
  239. package/lib/module/networking/xmpp/sendDisplayedMarker.xmpp.js +25 -0
  240. package/lib/module/networking/xmpp/sendDisplayedMarker.xmpp.js.map +1 -0
  241. package/lib/module/networking/xmpp/sendMediaMessage.xmpp.js +53 -2
  242. package/lib/module/networking/xmpp/sendMediaMessage.xmpp.js.map +1 -1
  243. package/lib/module/networking/xmpp/sendReceivedReceipt.xmpp.js +25 -0
  244. package/lib/module/networking/xmpp/sendReceivedReceipt.xmpp.js.map +1 -0
  245. package/lib/module/networking/xmppClient.js +64 -0
  246. package/lib/module/networking/xmppClient.js.map +1 -1
  247. package/lib/module/roomStore/persistence.js +78 -5
  248. package/lib/module/roomStore/persistence.js.map +1 -1
  249. package/lib/module/roomStore/roomHeapSlice.js +4 -0
  250. package/lib/module/roomStore/roomHeapSlice.js.map +1 -1
  251. package/lib/module/roomStore/roomsSlice.js +109 -0
  252. package/lib/module/roomStore/roomsSlice.js.map +1 -1
  253. package/lib/module/types/models/attachment.model.js +2 -0
  254. package/lib/module/types/models/attachment.model.js.map +1 -0
  255. package/lib/module/version.js +1 -1
  256. package/lib/typescript/assets/icons.d.ts +6 -1
  257. package/lib/typescript/assets/icons.d.ts.map +1 -1
  258. package/lib/typescript/components/MainComponents/AlbumGrid.d.ts +21 -0
  259. package/lib/typescript/components/MainComponents/AlbumGrid.d.ts.map +1 -0
  260. package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
  261. package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
  262. package/lib/typescript/components/MainComponents/MediaUploadOverlay.d.ts +17 -0
  263. package/lib/typescript/components/MainComponents/MediaUploadOverlay.d.ts.map +1 -0
  264. package/lib/typescript/components/MessageBubble/MediaCaption.d.ts +12 -0
  265. package/lib/typescript/components/MessageBubble/MediaCaption.d.ts.map +1 -0
  266. package/lib/typescript/components/MessageBubble/Message.d.ts.map +1 -1
  267. package/lib/typescript/components/MessageBubble/MessageInteractions.d.ts.map +1 -1
  268. package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
  269. package/lib/typescript/components/RoomComponents/LastMessageItem.d.ts.map +1 -1
  270. package/lib/typescript/components/RoomComponents/styled/LastAudioMessage.d.ts +2 -0
  271. package/lib/typescript/components/RoomComponents/styled/LastAudioMessage.d.ts.map +1 -1
  272. package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts +2 -0
  273. package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts.map +1 -1
  274. package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts +2 -0
  275. package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts.map +1 -1
  276. package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts +2 -0
  277. package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts.map +1 -1
  278. package/lib/typescript/components/Thread/ThreadWrapper.d.ts.map +1 -1
  279. package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts +9 -3
  280. package/lib/typescript/components/VideoCalls/ActiveCallBar.d.ts.map +1 -1
  281. package/lib/typescript/components/VideoCalls/CallIcons.d.ts +9 -0
  282. package/lib/typescript/components/VideoCalls/CallIcons.d.ts.map +1 -1
  283. package/lib/typescript/components/VideoCalls/VideoCallOverlay.d.ts.map +1 -1
  284. package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
  285. package/lib/typescript/components/VideoCalls/callSessionController.d.ts +7 -0
  286. package/lib/typescript/components/VideoCalls/callSessionController.d.ts.map +1 -1
  287. package/lib/typescript/components/VideoCalls/callUiStore.d.ts +13 -0
  288. package/lib/typescript/components/VideoCalls/callUiStore.d.ts.map +1 -1
  289. package/lib/typescript/components/VideoCalls/livekitRuntime.d.ts +5 -0
  290. package/lib/typescript/components/VideoCalls/livekitRuntime.d.ts.map +1 -1
  291. package/lib/typescript/components/VideoCalls/useCallKeep.d.ts +12 -0
  292. package/lib/typescript/components/VideoCalls/useCallKeep.d.ts.map +1 -1
  293. package/lib/typescript/components/VideoCalls/useOngoingCallNotification.d.ts +10 -0
  294. package/lib/typescript/components/VideoCalls/useOngoingCallNotification.d.ts.map +1 -0
  295. package/lib/typescript/components/VideoCalls/usePipTile.d.ts +46 -0
  296. package/lib/typescript/components/VideoCalls/usePipTile.d.ts.map +1 -0
  297. package/lib/typescript/components/styled/MediaFilePreview.d.ts.map +1 -1
  298. package/lib/typescript/components/styled/MessageImage.d.ts +10 -0
  299. package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
  300. package/lib/typescript/components/styled/SendInput.d.ts +7 -1
  301. package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
  302. package/lib/typescript/components/styled/VideoMessage.d.ts +7 -0
  303. package/lib/typescript/components/styled/VideoMessage.d.ts.map +1 -1
  304. package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
  305. package/lib/typescript/e2ee/fileEnvelope.d.ts +1 -1
  306. package/lib/typescript/e2ee/fileEnvelope.d.ts.map +1 -1
  307. package/lib/typescript/e2ee/sealedBody.d.ts +16 -0
  308. package/lib/typescript/e2ee/sealedBody.d.ts.map +1 -1
  309. package/lib/typescript/helpers/albumLayout.d.ts +66 -0
  310. package/lib/typescript/helpers/albumLayout.d.ts.map +1 -0
  311. package/lib/typescript/helpers/attachments.d.ts +55 -0
  312. package/lib/typescript/helpers/attachments.d.ts.map +1 -0
  313. package/lib/typescript/helpers/caption.d.ts +64 -0
  314. package/lib/typescript/helpers/caption.d.ts.map +1 -0
  315. package/lib/typescript/helpers/createMainMessageForThread.d.ts.map +1 -1
  316. package/lib/typescript/helpers/createMessageFromXml.d.ts.map +1 -1
  317. package/lib/typescript/helpers/fileKind.d.ts +20 -0
  318. package/lib/typescript/helpers/fileKind.d.ts.map +1 -0
  319. package/lib/typescript/helpers/getDataFromXml.d.ts.map +1 -1
  320. package/lib/typescript/helpers/mapWithConcurrency.d.ts +9 -0
  321. package/lib/typescript/helpers/mapWithConcurrency.d.ts.map +1 -0
  322. package/lib/typescript/helpers/mediaLimits.d.ts +13 -0
  323. package/lib/typescript/helpers/mediaLimits.d.ts.map +1 -0
  324. package/lib/typescript/helpers/mediaSendRetry.d.ts +26 -0
  325. package/lib/typescript/helpers/mediaSendRetry.d.ts.map +1 -0
  326. package/lib/typescript/helpers/mediaWireData.d.ts +16 -0
  327. package/lib/typescript/helpers/mediaWireData.d.ts.map +1 -0
  328. package/lib/typescript/helpers/mentionSpans.d.ts +8 -0
  329. package/lib/typescript/helpers/mentionSpans.d.ts.map +1 -0
  330. package/lib/typescript/helpers/mimeToExtension.d.ts +7 -0
  331. package/lib/typescript/helpers/mimeToExtension.d.ts.map +1 -1
  332. package/lib/typescript/helpers/readReceipts.d.ts +82 -0
  333. package/lib/typescript/helpers/readReceipts.d.ts.map +1 -0
  334. package/lib/typescript/helpers/repairFilenameEncoding.d.ts +12 -0
  335. package/lib/typescript/helpers/repairFilenameEncoding.d.ts.map +1 -0
  336. package/lib/typescript/helpers/safeJson.d.ts +2 -0
  337. package/lib/typescript/helpers/safeJson.d.ts.map +1 -0
  338. package/lib/typescript/helpers/updateMessagesTillLast.d.ts.map +1 -1
  339. package/lib/typescript/hooks/useSendMessage.d.ts +2 -1
  340. package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
  341. package/lib/typescript/i18n/strings.d.ts.map +1 -1
  342. package/lib/typescript/main.d.ts +1 -1
  343. package/lib/typescript/main.d.ts.map +1 -1
  344. package/lib/typescript/networking/api-requests/auth.api.d.ts +2 -0
  345. package/lib/typescript/networking/api-requests/auth.api.d.ts.map +1 -1
  346. package/lib/typescript/networking/stanzaHandlers.d.ts +7 -3
  347. package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
  348. package/lib/typescript/networking/xmpp/handleStanzas.xmpp.d.ts.map +1 -1
  349. package/lib/typescript/networking/xmpp/sendDisplayedMarker.xmpp.d.ts +3 -0
  350. package/lib/typescript/networking/xmpp/sendDisplayedMarker.xmpp.d.ts.map +1 -0
  351. package/lib/typescript/networking/xmpp/sendMediaMessage.xmpp.d.ts +12 -0
  352. package/lib/typescript/networking/xmpp/sendMediaMessage.xmpp.d.ts.map +1 -1
  353. package/lib/typescript/networking/xmpp/sendReceivedReceipt.xmpp.d.ts +3 -0
  354. package/lib/typescript/networking/xmpp/sendReceivedReceipt.xmpp.d.ts.map +1 -0
  355. package/lib/typescript/networking/xmppClient.d.ts +15 -0
  356. package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
  357. package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
  358. package/lib/typescript/roomStore/roomHeapSlice.d.ts +22 -1
  359. package/lib/typescript/roomStore/roomHeapSlice.d.ts.map +1 -1
  360. package/lib/typescript/roomStore/roomsSlice.d.ts +67 -3
  361. package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
  362. package/lib/typescript/types/models/attachment.model.d.ts +52 -0
  363. package/lib/typescript/types/models/attachment.model.d.ts.map +1 -0
  364. package/lib/typescript/types/models/message.model.d.ts +26 -0
  365. package/lib/typescript/types/models/message.model.d.ts.map +1 -1
  366. package/lib/typescript/types/models/modal.model.d.ts +7 -0
  367. package/lib/typescript/types/models/modal.model.d.ts.map +1 -1
  368. package/lib/typescript/types/models/room.model.d.ts +2 -0
  369. package/lib/typescript/types/models/room.model.d.ts.map +1 -1
  370. package/lib/typescript/types/types.d.ts +69 -1
  371. package/lib/typescript/types/types.d.ts.map +1 -1
  372. package/lib/typescript/version.d.ts +1 -1
  373. package/package.json +4 -1
  374. package/plugins/notification-service/Info.plist +31 -0
  375. package/plugins/notification-service/NotificationService.swift +82 -0
  376. package/plugins/withNotificationServiceExtension.js +137 -0
  377. package/src/assets/icons.tsx +20 -2
  378. package/src/components/MainComponents/AlbumGrid.tsx +183 -0
  379. package/src/components/MainComponents/ChatRoom.tsx +4 -2
  380. package/src/components/MainComponents/MediaMessage.tsx +246 -130
  381. package/src/components/MainComponents/MediaUploadOverlay.tsx +102 -0
  382. package/src/components/MessageBubble/MediaCaption.tsx +45 -0
  383. package/src/components/MessageBubble/Message.tsx +71 -3
  384. package/src/components/MessageBubble/MessageInteractions.tsx +2 -1
  385. package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +64 -0
  386. package/src/components/RoomComponents/LastMessageItem.tsx +15 -4
  387. package/src/components/RoomComponents/styled/LastAudioMessage.tsx +6 -3
  388. package/src/components/RoomComponents/styled/LastMessageFile.tsx +6 -2
  389. package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +6 -2
  390. package/src/components/RoomComponents/styled/LastMessageVideo.tsx +6 -2
  391. package/src/components/Thread/ThreadWrapper.tsx +5 -9
  392. package/src/components/VideoCalls/ActiveCallBar.tsx +56 -10
  393. package/src/components/VideoCalls/CallIcons.tsx +36 -12
  394. package/src/components/VideoCalls/VideoCallOverlay.tsx +205 -8
  395. package/src/components/VideoCalls/VideoCallSession.tsx +45 -13
  396. package/src/components/VideoCalls/callSessionController.ts +51 -20
  397. package/src/components/VideoCalls/callUiStore.ts +33 -3
  398. package/src/components/VideoCalls/livekitRuntime.ts +13 -0
  399. package/src/components/VideoCalls/useCallKeep.ts +204 -33
  400. package/src/components/VideoCalls/useOngoingCallNotification.ts +113 -0
  401. package/src/components/VideoCalls/usePipTile.ts +214 -0
  402. package/src/components/styled/MediaFilePreview.tsx +49 -34
  403. package/src/components/styled/MessageImage.tsx +21 -5
  404. package/src/components/styled/SendInput.tsx +101 -87
  405. package/src/components/styled/VideoMessage.tsx +34 -9
  406. package/src/context/xmppProvider.tsx +32 -0
  407. package/src/e2ee/fileEnvelope.ts +1 -1
  408. package/src/e2ee/sealedBody.ts +44 -5
  409. package/src/helpers/albumLayout.ts +207 -0
  410. package/src/helpers/attachments.ts +316 -0
  411. package/src/helpers/caption.ts +283 -0
  412. package/src/helpers/createMainMessageForThread.ts +6 -1
  413. package/src/helpers/createMessageFromXml.ts +21 -5
  414. package/src/helpers/fileKind.ts +38 -0
  415. package/src/helpers/getDataFromXml.ts +5 -1
  416. package/src/helpers/mapWithConcurrency.ts +32 -0
  417. package/src/helpers/mediaLimits.ts +27 -0
  418. package/src/helpers/mediaSendRetry.ts +59 -0
  419. package/src/helpers/mediaWireData.ts +57 -0
  420. package/src/helpers/mentionSpans.ts +17 -0
  421. package/src/helpers/mimeToExtension.ts +51 -0
  422. package/src/helpers/readReceipts.ts +219 -0
  423. package/src/helpers/repairFilenameEncoding.ts +82 -0
  424. package/src/helpers/safeJson.ts +11 -0
  425. package/src/helpers/updateMessagesTillLast.tsx +2 -1
  426. package/src/hooks/useSendMessage.tsx +448 -249
  427. package/src/i18n/strings.ts +144 -0
  428. package/src/main.ts +3 -0
  429. package/src/networking/api-requests/auth.api.ts +60 -3
  430. package/src/networking/stanzaHandlers.ts +91 -2
  431. package/src/networking/xmpp/handleStanzas.xmpp.ts +6 -2
  432. package/src/networking/xmpp/sendDisplayedMarker.xmpp.ts +31 -0
  433. package/src/networking/xmpp/sendMediaMessage.xmpp.ts +60 -3
  434. package/src/networking/xmpp/sendReceivedReceipt.xmpp.ts +31 -0
  435. package/src/networking/xmppClient.ts +48 -0
  436. package/src/roomStore/persistence.ts +94 -3
  437. package/src/roomStore/roomHeapSlice.ts +23 -1
  438. package/src/roomStore/roomsSlice.ts +112 -1
  439. package/src/types/models/attachment.model.ts +51 -0
  440. package/src/types/models/message.model.ts +29 -0
  441. package/src/types/models/modal.model.ts +7 -0
  442. package/src/types/models/room.model.ts +2 -0
  443. package/src/types/types.ts +83 -1
  444. package/src/version.ts +1 -1
  445. package/lib/commonjs/components/VideoCalls/useDraggable.js +0 -59
  446. package/lib/commonjs/components/VideoCalls/useDraggable.js.map +0 -1
  447. package/lib/module/components/VideoCalls/useDraggable.js +0 -55
  448. package/lib/module/components/VideoCalls/useDraggable.js.map +0 -1
  449. package/lib/typescript/components/VideoCalls/useDraggable.d.ts +0 -19
  450. package/lib/typescript/components/VideoCalls/useDraggable.d.ts.map +0 -1
  451. package/src/components/VideoCalls/useDraggable.ts +0 -46
@@ -0,0 +1,228 @@
1
+ "use strict";
2
+
3
+ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
4
+ import { Animated, PanResponder } from 'react-native';
5
+
6
+ /**
7
+ * The small video tile of a call, Telegram-style: drag it anywhere and it
8
+ * snaps to the nearest corner when released (a flick carries it towards
9
+ * the flick), pinch it to switch between a small and a large size.
10
+ *
11
+ * Positions are kept per corner rather than per pixel, so the tile stays
12
+ * glued to its corner when the stage changes size (rotation, iPad split
13
+ * view) or the tile itself changes size.
14
+ */
15
+
16
+ export const PIP_TILE_SIZES = {
17
+ small: {
18
+ width: 104,
19
+ height: 148
20
+ },
21
+ large: {
22
+ width: 156,
23
+ height: 222
24
+ }
25
+ };
26
+ const MARGIN = 12;
27
+ // How far a flick carries the tile before picking a corner, in ms of velocity.
28
+ const FLICK_PROJECTION_MS = 160;
29
+ // Pinch past these ratios to change size; in between keeps the current one.
30
+ const GROW_RATIO = 1.12;
31
+ const SHRINK_RATIO = 0.9;
32
+ const SPRING = {
33
+ useNativeDriver: false,
34
+ damping: 20,
35
+ stiffness: 220,
36
+ mass: 0.8
37
+ };
38
+ const touchDistance = touches => {
39
+ const [a, b] = touches;
40
+ return Math.hypot(a.pageX - b.pageX, a.pageY - b.pageY);
41
+ };
42
+ export const usePipTile = ({
43
+ topInset = 0
44
+ } = {}) => {
45
+ const [stage, setStage] = useState(null);
46
+ const [size, setSize] = useState('small');
47
+ const stageRef = useRef(null);
48
+ const sizeRef = useRef('small');
49
+ const cornerRef = useRef({
50
+ right: true,
51
+ bottom: false
52
+ });
53
+ const topInsetRef = useRef(topInset);
54
+ topInsetRef.current = topInset;
55
+ const position = useRef(new Animated.ValueXY({
56
+ x: 0,
57
+ y: 0
58
+ })).current;
59
+ const width = useRef(new Animated.Value(PIP_TILE_SIZES.small.width)).current;
60
+ const height = useRef(new Animated.Value(PIP_TILE_SIZES.small.height)).current;
61
+ const pinchScale = useRef(new Animated.Value(1)).current;
62
+ // Where the tile rests, i.e. where a drag starts from.
63
+ const restRef = useRef({
64
+ x: 0,
65
+ y: 0
66
+ });
67
+ const gestureRef = useRef({
68
+ pinching: false,
69
+ startDistance: 0,
70
+ scale: 1
71
+ });
72
+ const cornerPoint = useCallback((corner, tileSize) => {
73
+ const area = stageRef.current;
74
+ if (!area) {
75
+ return {
76
+ x: 0,
77
+ y: 0
78
+ };
79
+ }
80
+ const tile = PIP_TILE_SIZES[tileSize];
81
+ const top = MARGIN + topInsetRef.current;
82
+ return {
83
+ x: corner.right ? Math.max(MARGIN, area.width - tile.width - MARGIN) : MARGIN,
84
+ y: corner.bottom ? Math.max(top, area.height - tile.height - MARGIN) : top
85
+ };
86
+ }, []);
87
+ const settle = useCallback(animated => {
88
+ const tileSize = sizeRef.current;
89
+ const target = cornerPoint(cornerRef.current, tileSize);
90
+ const tile = PIP_TILE_SIZES[tileSize];
91
+ restRef.current = target;
92
+ if (!animated) {
93
+ position.setValue(target);
94
+ width.setValue(tile.width);
95
+ height.setValue(tile.height);
96
+ pinchScale.setValue(1);
97
+ return;
98
+ }
99
+ Animated.parallel([Animated.spring(position, {
100
+ ...SPRING,
101
+ toValue: target
102
+ }), Animated.spring(width, {
103
+ ...SPRING,
104
+ toValue: tile.width
105
+ }), Animated.spring(height, {
106
+ ...SPRING,
107
+ toValue: tile.height
108
+ }), Animated.spring(pinchScale, {
109
+ ...SPRING,
110
+ toValue: 1
111
+ })]).start();
112
+ }, [cornerPoint, position, width, height, pinchScale]);
113
+ const onStageLayout = useCallback(event => {
114
+ const {
115
+ width: w,
116
+ height: h
117
+ } = event.nativeEvent.layout;
118
+ const prev = stageRef.current;
119
+ if (prev && prev.width === w && prev.height === h) {
120
+ return;
121
+ }
122
+ stageRef.current = {
123
+ width: w,
124
+ height: h
125
+ };
126
+ setStage(stageRef.current);
127
+ settle(false);
128
+ }, [settle]);
129
+
130
+ // The safe-area inset arrives after the first layout on some devices.
131
+ useEffect(() => {
132
+ if (stageRef.current) {
133
+ settle(false);
134
+ }
135
+ }, [topInset, settle]);
136
+ const panHandlers = useMemo(() => PanResponder.create({
137
+ // Two fingers are always ours (pinch); one finger only once it
138
+ // moves, so a tap still reaches the tile's onPress (swap videos).
139
+ onStartShouldSetPanResponderCapture: event => event.nativeEvent.touches.length >= 2,
140
+ // Own the touch from the start when the tile has no tap target
141
+ // (nothing to swap): an ancestor outside the call Modal would take
142
+ // it otherwise, and the move-capture below would never be asked.
143
+ onStartShouldSetPanResponder: () => true,
144
+ onMoveShouldSetPanResponderCapture: (event, gesture) => event.nativeEvent.touches.length >= 2 || Math.abs(gesture.dx) > 4 || Math.abs(gesture.dy) > 4,
145
+ // Never hand the tile over to the swipe-to-minimize of the screen.
146
+ onPanResponderTerminationRequest: () => false,
147
+ onPanResponderGrant: () => {
148
+ position.stopAnimation();
149
+ width.stopAnimation();
150
+ height.stopAnimation();
151
+ pinchScale.stopAnimation();
152
+ gestureRef.current = {
153
+ pinching: false,
154
+ startDistance: 0,
155
+ scale: 1
156
+ };
157
+ },
158
+ onPanResponderMove: (event, gesture) => {
159
+ const touches = event.nativeEvent.touches;
160
+ const state = gestureRef.current;
161
+ if (touches.length >= 2) {
162
+ const distance = touchDistance(touches);
163
+ if (!state.pinching || state.startDistance <= 0) {
164
+ state.pinching = true;
165
+ state.startDistance = distance;
166
+ } else {
167
+ state.scale = Math.min(1.8, Math.max(0.6, distance / state.startDistance));
168
+ pinchScale.setValue(state.scale);
169
+ }
170
+ }
171
+ position.setValue({
172
+ x: restRef.current.x + gesture.dx,
173
+ y: restRef.current.y + gesture.dy
174
+ });
175
+ },
176
+ onPanResponderRelease: (_event, gesture) => {
177
+ const area = stageRef.current;
178
+ const state = gestureRef.current;
179
+ if (state.pinching) {
180
+ const next = state.scale >= GROW_RATIO ? 'large' : state.scale <= SHRINK_RATIO ? 'small' : sizeRef.current;
181
+ if (next !== sizeRef.current) {
182
+ // Keep the size the finger left it at, then let the spring
183
+ // carry it to the new one, so the tile doesn't jump.
184
+ const from = PIP_TILE_SIZES[sizeRef.current];
185
+ width.setValue(from.width * state.scale);
186
+ height.setValue(from.height * state.scale);
187
+ pinchScale.setValue(1);
188
+ sizeRef.current = next;
189
+ setSize(next);
190
+ }
191
+ }
192
+ if (area) {
193
+ const tile = PIP_TILE_SIZES[sizeRef.current];
194
+ const centerX = restRef.current.x + gesture.dx + gesture.vx * FLICK_PROJECTION_MS + tile.width / 2;
195
+ const centerY = restRef.current.y + gesture.dy + gesture.vy * FLICK_PROJECTION_MS + tile.height / 2;
196
+ cornerRef.current = {
197
+ right: centerX > area.width / 2,
198
+ bottom: centerY > area.height / 2
199
+ };
200
+ }
201
+ settle(true);
202
+ },
203
+ onPanResponderTerminate: () => settle(true)
204
+ }).panHandlers, [position, width, height, pinchScale, settle]);
205
+ return {
206
+ /** Put on the area the tile moves within. */
207
+ onStageLayout,
208
+ panHandlers,
209
+ size,
210
+ /** Hidden until the stage is measured, so it never flashes at 0,0. */
211
+ style: {
212
+ position: 'absolute',
213
+ left: 0,
214
+ top: 0,
215
+ width,
216
+ height,
217
+ opacity: stage ? 1 : 0,
218
+ transform: [{
219
+ translateX: position.x
220
+ }, {
221
+ translateY: position.y
222
+ }, {
223
+ scale: pinchScale
224
+ }]
225
+ }
226
+ };
227
+ };
228
+ //# sourceMappingURL=usePipTile.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["useCallback","useEffect","useMemo","useRef","useState","Animated","PanResponder","PIP_TILE_SIZES","small","width","height","large","MARGIN","FLICK_PROJECTION_MS","GROW_RATIO","SHRINK_RATIO","SPRING","useNativeDriver","damping","stiffness","mass","touchDistance","touches","a","b","Math","hypot","pageX","pageY","usePipTile","topInset","stage","setStage","size","setSize","stageRef","sizeRef","cornerRef","right","bottom","topInsetRef","current","position","ValueXY","x","y","Value","pinchScale","restRef","gestureRef","pinching","startDistance","scale","cornerPoint","corner","tileSize","area","tile","top","max","settle","animated","target","setValue","parallel","spring","toValue","start","onStageLayout","event","w","h","nativeEvent","layout","prev","panHandlers","create","onStartShouldSetPanResponderCapture","length","onStartShouldSetPanResponder","onMoveShouldSetPanResponderCapture","gesture","abs","dx","dy","onPanResponderTerminationRequest","onPanResponderGrant","stopAnimation","onPanResponderMove","state","distance","min","onPanResponderRelease","_event","next","from","centerX","vx","centerY","vy","onPanResponderTerminate","style","left","opacity","transform","translateX","translateY"],"source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EO,KAAK,EAAEL;MAAW,CAAC;IAEzB;EACF,CAAC;AACH,CAAC","ignoreList":[]}
@@ -1,11 +1,12 @@
1
1
  "use strict";
2
2
 
3
- import { View, Text, StyleSheet, Modal, TouchableOpacity, SafeAreaView } from 'react-native';
3
+ import { View, Text, StyleSheet, Modal, TouchableOpacity, SafeAreaView, ScrollView } from 'react-native';
4
4
  import { MediaContainer, MediaImage } from './StyledInputComponents/StyledInputComponents';
5
5
  import { FileIcon } from '../../assets/icons';
6
6
  import { RemoveButton, RemoveButtonText } from './StyledComponents';
7
7
  import { useState } from 'react';
8
8
  import { useVideoPlayer, VideoView } from 'expo-video';
9
+ import { useT } from '../../i18n/useT';
9
10
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
10
11
  const VideoThumb = ({
11
12
  uri,
@@ -53,53 +54,65 @@ export const MediaFilePreview = ({
53
54
  handleRemoveImage
54
55
  }) => {
55
56
  const [previewUri, setPreviewUri] = useState(null);
56
- return /*#__PURE__*/_jsxs(MediaContainer, {
57
- children: [filePreviews.map((file, index) => {
58
- const isImage = file.type?.startsWith('image');
59
- const isVideo = file.type?.startsWith('video');
60
- return /*#__PURE__*/_jsxs(View, {
61
- children: [isImage ? /*#__PURE__*/_jsx(MediaImage, {
62
- source: {
63
- uri: file.uri
64
- }
65
- }) : isVideo ? /*#__PURE__*/_jsx(VideoThumb, {
66
- uri: file.uri,
67
- onPress: () => setPreviewUri(file.uri)
68
- }) : /*#__PURE__*/_jsx(View, {
69
- style: {
70
- width: 70,
71
- height: 70,
72
- borderRadius: 8
73
- },
74
- children: /*#__PURE__*/_jsx(FileIcon, {
75
- width: 70,
76
- height: 70
77
- })
78
- }), /*#__PURE__*/_jsx(RemoveButton, {
79
- onPress: () => handleRemoveImage(index),
80
- children: /*#__PURE__*/_jsx(RemoveButtonText, {
81
- children: "\xD7"
82
- })
83
- })]
84
- }, `${file.name}_${index}`);
85
- }), /*#__PURE__*/_jsx(Modal, {
86
- visible: !!previewUri,
87
- animationType: "fade",
88
- transparent: true,
89
- children: /*#__PURE__*/_jsxs(SafeAreaView, {
90
- style: styles.modalContainer,
91
- children: [/*#__PURE__*/_jsx(TouchableOpacity, {
92
- style: styles.closeButton,
93
- onPress: () => setPreviewUri(null),
94
- children: /*#__PURE__*/_jsx(Text, {
95
- style: styles.closeText,
96
- children: "\u2715"
97
- })
98
- }), previewUri && /*#__PURE__*/_jsx(FullscreenPreviewVideo, {
99
- uri: previewUri
100
- })]
101
- })
102
- })]
57
+ const t = useT();
58
+
59
+ // The tray holds up to ten files, so it scrolls sideways rather than wrap.
60
+ return /*#__PURE__*/_jsx(ScrollView, {
61
+ horizontal: true,
62
+ showsHorizontalScrollIndicator: false,
63
+ keyboardShouldPersistTaps: "handled",
64
+ testID: "media-tray",
65
+ children: /*#__PURE__*/_jsxs(MediaContainer, {
66
+ children: [filePreviews.map((file, index) => {
67
+ const isImage = file.type?.startsWith('image');
68
+ const isVideo = file.type?.startsWith('video');
69
+ return /*#__PURE__*/_jsxs(View, {
70
+ children: [isImage ? /*#__PURE__*/_jsx(MediaImage, {
71
+ source: {
72
+ uri: file.uri
73
+ }
74
+ }) : isVideo ? /*#__PURE__*/_jsx(VideoThumb, {
75
+ uri: file.uri,
76
+ onPress: () => setPreviewUri(file.uri)
77
+ }) : /*#__PURE__*/_jsx(View, {
78
+ style: {
79
+ width: 70,
80
+ height: 70,
81
+ borderRadius: 8
82
+ },
83
+ children: /*#__PURE__*/_jsx(FileIcon, {
84
+ width: 70,
85
+ height: 70
86
+ })
87
+ }), /*#__PURE__*/_jsx(RemoveButton, {
88
+ testID: `media-tray-remove-${index}`,
89
+ accessibilityRole: "button",
90
+ accessibilityLabel: t('attachment.remove'),
91
+ onPress: () => handleRemoveImage(index),
92
+ children: /*#__PURE__*/_jsx(RemoveButtonText, {
93
+ children: "\xD7"
94
+ })
95
+ })]
96
+ }, `${file.name}_${index}`);
97
+ }), /*#__PURE__*/_jsx(Modal, {
98
+ visible: !!previewUri,
99
+ animationType: "fade",
100
+ transparent: true,
101
+ children: /*#__PURE__*/_jsxs(SafeAreaView, {
102
+ style: styles.modalContainer,
103
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
104
+ style: styles.closeButton,
105
+ onPress: () => setPreviewUri(null),
106
+ children: /*#__PURE__*/_jsx(Text, {
107
+ style: styles.closeText,
108
+ children: "\u2715"
109
+ })
110
+ }), previewUri && /*#__PURE__*/_jsx(FullscreenPreviewVideo, {
111
+ uri: previewUri
112
+ })]
113
+ })
114
+ })]
115
+ })
103
116
  });
104
117
  };
105
118
  const styles = StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"names":["View","Text","StyleSheet","Modal","TouchableOpacity","SafeAreaView","MediaContainer","MediaImage","FileIcon","RemoveButton","RemoveButtonText","useState","useVideoPlayer","VideoView","jsx","_jsx","jsxs","_jsxs","VideoThumb","uri","onPress","player","p","muted","activeOpacity","style","styles","videoThumb","children","absoluteFill","contentFit","nativeControls","surfaceType","pointerEvents","playOverlay","playIcon","FullscreenPreviewVideo","play","fullVideo","MediaFilePreview","filePreviews","handleRemoveImage","previewUri","setPreviewUri","map","file","index","isImage","type","startsWith","isVideo","source","width","height","borderRadius","name","visible","animationType","transparent","modalContainer","closeButton","closeText","create","overflow","backgroundColor","justifyContent","alignItems","fontSize","color","flex","position","top","right","zIndex","fontWeight"],"sourceRoot":"../../../../src","sources":["components/styled/MediaFilePreview.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,KAAK,EAAEC,gBAAgB,EAAEC,YAAY,QAAQ,cAAc;AAC5F,SACEC,cAAc,EACdC,UAAU,QACL,+CAA+C;AACtD,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,YAAY,EAAEC,gBAAgB,QAAQ,oBAAoB;AACnE,SAAaC,QAAQ,QAAQ,OAAO;AAEpC,SAASC,cAAc,EAAEC,SAAS,QAAQ,YAAY;AAAC,SAAAC,GAAA,IAAAC,IAAA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AE;IACVC,YAAY,EAAE,EAAE;IAChBU,eAAe,EAAE,uBAAuB;IACxCC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDL,SAAS,EAAE;IACTM,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE,MAAM;IACbM,UAAU,EAAE;EACd,CAAC;EACDpC,SAAS,EAAE;IACTc,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["View","Text","StyleSheet","Modal","TouchableOpacity","SafeAreaView","ScrollView","MediaContainer","MediaImage","FileIcon","RemoveButton","RemoveButtonText","useState","useVideoPlayer","VideoView","useT","jsx","_jsx","jsxs","_jsxs","VideoThumb","uri","onPress","player","p","muted","activeOpacity","style","styles","videoThumb","children","absoluteFill","contentFit","nativeControls","surfaceType","pointerEvents","playOverlay","playIcon","FullscreenPreviewVideo","play","fullVideo","MediaFilePreview","filePreviews","handleRemoveImage","previewUri","setPreviewUri","t","horizontal","showsHorizontalScrollIndicator","keyboardShouldPersistTaps","testID","map","file","index","isImage","type","startsWith","isVideo","source","width","height","borderRadius","accessibilityRole","accessibilityLabel","name","visible","animationType","transparent","modalContainer","closeButton","closeText","create","overflow","backgroundColor","justifyContent","alignItems","fontSize","color","flex","position","top","right","zIndex","fontWeight"],"sourceRoot":"../../../../src","sources":["components/styled/MediaFilePreview.tsx"],"mappings":";;AAAA,SAASA,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,KAAK,EAAEC,gBAAgB,EAAEC,YAAY,EAAEC,UAAU,QAAQ,cAAc;AACxG,SACEC,cAAc,EACdC,UAAU,QACL,+CAA+C;AACtD,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,YAAY,EAAEC,gBAAgB,QAAQ,oBAAoB;AACnE,SAAaC,QAAQ,QAAQ,OAAO;AAEpC,SAASC,cAAc,EAAEC,SAAS,QAAQ,YAAY;AACtD,SAASC,IAAI,QAAQ,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Q;IACpBF,eAAe,EAAE;EACnB,CAAC;EACDpC,QAAQ,EAAE;IACRuC,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE;EACT,CAAC;EACDT,cAAc,EAAE;IACdU,IAAI,EAAE,CAAC;IACPL,eAAe,EAAE,MAAM;IACvBC,cAAc,EAAE;EAClB,CAAC;EACDL,WAAW,EAAE;IACXU,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,EAAE;IACPC,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVvB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBY,eAAe,EAAE,uBAAuB;IACxCC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE;EACd,CAAC;EACDL,SAAS,EAAE;IACTM,QAAQ,EAAE,EAAE;IACZC,KAAK,EAAE,MAAM;IACbM,UAAU,EAAE;EACd,CAAC;EACD3C,SAAS,EAAE;IACTmB,KAAK,EAAE,MAAM;IACbC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
@@ -18,7 +18,9 @@ const CustomMessageImage = ({
18
18
  fileName,
19
19
  originalName,
20
20
  mimetype,
21
- locationPreview
21
+ locationPreview,
22
+ tile,
23
+ onOpen
22
24
  }) => {
23
25
  // Preview first, original only as a fallback — mirrors the web client,
24
26
  // where the <img> src is the preview and `fileURL` is reserved for the
@@ -27,10 +29,11 @@ const CustomMessageImage = ({
27
29
  const [loading, setLoading] = useState(true);
28
30
  // Start with a neutral box; swap to the real aspect ratio once the
29
31
  // image's natural dimensions are known so it's shown scaled, not cropped.
30
- const [dims, setDims] = useState(defaultMediaDims());
32
+ const [measured, setDims] = useState(defaultMediaDims());
33
+ const dims = tile ?? measured;
31
34
  const dispatch = useDispatch();
32
35
  useEffect(() => {
33
- if (!displayURL) {
36
+ if (!displayURL || tile) {
34
37
  return;
35
38
  }
36
39
  let active = true;
@@ -50,8 +53,12 @@ const CustomMessageImage = ({
50
53
  return () => {
51
54
  active = false;
52
55
  };
53
- }, [displayURL]);
56
+ }, [displayURL, tile]);
54
57
  const handleOpen = () => {
58
+ if (onOpen) {
59
+ onOpen();
60
+ return;
61
+ }
55
62
  dispatch(setActiveFile({
56
63
  fileName,
57
64
  fileURL,
@@ -61,7 +68,10 @@ const CustomMessageImage = ({
61
68
  dispatch(setActiveModal(MODAL_TYPES.FILE_PREVIEW));
62
69
  };
63
70
  return /*#__PURE__*/_jsx(Container, {
64
- style: {
71
+ style: tile ? {
72
+ width: dims.width,
73
+ borderRadius: 0
74
+ } : {
65
75
  width: dims.width
66
76
  },
67
77
  children: /*#__PURE__*/_jsxs(TouchableOpacity, {
@@ -87,7 +97,7 @@ const CustomMessageImage = ({
87
97
  style: {
88
98
  width: dims.width,
89
99
  height: dims.height,
90
- borderRadius: 10,
100
+ borderRadius: tile ? 0 : 10,
91
101
  backgroundColor: 'rgba(0, 0, 0, 0)'
92
102
  },
93
103
  onLoadEnd: () => setLoading(false),
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useState","isSecureFileUrl","requestFileTokenRecovery","pushLog","Container","useDispatch","setActiveFile","setActiveModal","MODAL_TYPES","ActivityIndicator","Image","TouchableOpacity","View","defaultMediaDims","fitMediaDimensions","jsx","_jsx","jsxs","_jsxs","maskToken","url","replace","FALLBACK_IMAGE","CustomMessageImage","fileURL","fileName","originalName","mimetype","locationPreview","displayURL","loading","setLoading","dims","setDims","dispatch","active","getSize","w","h","error","message","String","handleOpen","FILE_PREVIEW","style","width","children","onPress","activeOpacity","position","height","alignItems","justifyContent","zIndex","size","color","source","uri","borderRadius","backgroundColor","onLoadEnd","onError","event","usingPreview","nativeEvent","resizeMode"],"sourceRoot":"../../../../src","sources":["components/styled/MessageImage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,eAAe,EACfC,wBAAwB,QACnB,6BAA6B;AACpC,SAASC,OAAO,Q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,IAAI,CAACkB,MAAM;UACnBQ,YAAY,EAAE,EAAE;UAChBC,eAAe,EAAE;QACnB,CAAE;QACFC,SAAS,EAAEA,CAAA,KAAM7B,UAAU,CAAC,KAAK,CAAE;QACnC8B,OAAO,EAAGC,KAAK,IAAK;UAClB/B,UAAU,CAAC,KAAK,CAAC;UACjB5B,OAAO,CAAC,MAAM,EAAE,oBAAoB,EAAE;YACpCiB,GAAG,EAAED,SAAS,CAACU,UAAU,CAAC;YAC1BkC,YAAY,EAAE,CAAC,CAACnC,eAAe;YAC/BW,KAAK,EAAGuB,KAAK,EAAUE,WAAW,EAAEzB;UACtC,CAAC,CAAC;UACF,IAAItC,eAAe,CAAC4B,UAAU,CAAC,EAAE;YAC/B3B,wBAAwB,CAAC,CAAC;UAC5B;QACF;QACA;QACA;QAAA;QACA+D,UAAU,EAAC;MAAO,CACnB,CAAC;IAAA,CACc;EAAC,CACV,CAAC;AAEhB,CAAC;AAED,eAAe1C,kBAAkB","ignoreList":[]}
1
+ {"version":3,"names":["React","useEffect","useState","isSecureFileUrl","requestFileTokenRecovery","pushLog","Container","useDispatch","setActiveFile","setActiveModal","MODAL_TYPES","ActivityIndicator","Image","TouchableOpacity","View","defaultMediaDims","fitMediaDimensions","jsx","_jsx","jsxs","_jsxs","maskToken","url","replace","FALLBACK_IMAGE","CustomMessageImage","fileURL","fileName","originalName","mimetype","locationPreview","tile","onOpen","displayURL","loading","setLoading","measured","setDims","dims","dispatch","active","getSize","w","h","error","message","String","handleOpen","FILE_PREVIEW","style","width","borderRadius","children","onPress","activeOpacity","position","height","alignItems","justifyContent","zIndex","size","color","source","uri","backgroundColor","onLoadEnd","onError","event","usingPreview","nativeEvent","resizeMode"],"sourceRoot":"../../../../src","sources":["components/styled/MessageImage.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SACEC,eAAe,EACfC,wBAAwB,QACnB,6BAA6B;AACpC,SAASC,OAAO,QA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