@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
@@ -12,13 +12,26 @@
12
12
  */
13
13
  interface CallUiState {
14
14
  minimized: boolean;
15
+ /**
16
+ * iOS shows this incoming call in its own CallKit UI (banner / full
17
+ * screen), so the in-app ring card stays hidden instead of doubling it.
18
+ */
19
+ systemRinging: boolean;
15
20
  /** Id of the header that shows the strip, or null when none is mounted. */
16
21
  barHost: number | null;
22
+ /**
23
+ * Window y of the top of the strip slot under the hosting header, so the
24
+ * collapse animation can land exactly on the strip. Null: no header.
25
+ */
26
+ barAnchorY: number | null;
17
27
  }
18
28
  /** Current state, for non-React code and tests. */
19
29
  export declare const getCallUiState: () => CallUiState;
20
30
  export declare const useCallUi: () => CallUiState;
21
31
  export declare const setCallMinimized: (minimized: boolean) => void;
32
+ export declare const setCallSystemRinging: (systemRinging: boolean) => void;
22
33
  export declare const registerCallBarHost: (onId?: (id: number) => void) => (() => void);
34
+ /** The hosting header reports where its strip slot is on screen. */
35
+ export declare const setCallBarAnchor: (hostId: number, y: number) => void;
23
36
  export {};
24
37
  //# sourceMappingURL=callUiStore.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"callUiStore.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/callUiStore.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,UAAU,WAAW;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB;AAiCD,mDAAmD;AACnD,eAAO,MAAM,cAAc,QAAO,WAAoB,CAAC;AAEvD,eAAO,MAAM,SAAS,QAAO,WAC8B,CAAC;AAE5D,eAAO,MAAM,gBAAgB,GAAI,WAAW,OAAO,KAAG,IAErD,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,OAAO,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,KAC1B,CAAC,MAAM,IAAI,CAUb,CAAC"}
1
+ {"version":3,"file":"callUiStore.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/callUiStore.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;GAWG;AAEH,UAAU,WAAW;IACnB,SAAS,EAAE,OAAO,CAAC;IACnB;;;OAGG;IACH,aAAa,EAAE,OAAO,CAAC;IACvB,2EAA2E;IAC3E,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB;;;OAGG;IACH,UAAU,EAAE,MAAM,GAAG,IAAI,CAAC;CAC3B;AA0CD,mDAAmD;AACnD,eAAO,MAAM,cAAc,QAAO,WAAoB,CAAC;AAEvD,eAAO,MAAM,SAAS,QAAO,WAC8B,CAAC;AAE5D,eAAO,MAAM,gBAAgB,GAAI,WAAW,OAAO,KAAG,IAErD,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,eAAe,OAAO,KAAG,IAE7D,CAAC;AAEF,eAAO,MAAM,mBAAmB,GAC9B,OAAO,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,KAC1B,CAAC,MAAM,IAAI,CAWb,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,gBAAgB,GAAI,QAAQ,MAAM,EAAE,GAAG,MAAM,KAAG,IAG5D,CAAC"}
@@ -33,6 +33,11 @@ export interface LiveKitRuntime {
33
33
  AudioSession: any;
34
34
  /** Installs the WebRTC globals livekit-client expects. */
35
35
  registerGlobals: () => void;
36
+ /**
37
+ * `@livekit/react-native-webrtc` RTCAudioSession: tells WebRTC when
38
+ * CallKit activates/deactivates the iOS audio session.
39
+ */
40
+ RTCAudioSession: any;
36
41
  }
37
42
  export declare const isLiveKitAvailable: () => boolean;
38
43
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"livekitRuntime.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/livekitRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,IAAI,EAAE,GAAG,CAAC;IACV,uCAAuC;IACvC,SAAS,EAAE,GAAG,CAAC;IACf,6DAA6D;IAC7D,KAAK,EAAE,GAAG,CAAC;IACX,6CAA6C;IAC7C,eAAe,EAAE,GAAG,CAAC;IACrB,qDAAqD;IACrD,YAAY,EAAE,GAAG,CAAC;IAClB,mDAAmD;IACnD,UAAU,EAAE,GAAG,CAAC;IAChB,8DAA8D;IAC9D,YAAY,EAAE,GAAG,CAAC;IAClB,0DAA0D;IAC1D,eAAe,EAAE,MAAM,IAAI,CAAC;CAC7B;AAID,eAAO,MAAM,kBAAkB,QAAO,OAAiC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAO,cAAc,GAAG,IA8B/C,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,cAAc,KAAG,IAQ9D,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,6BAA6B,QAAO,IAGhD,CAAC"}
1
+ {"version":3,"file":"livekitRuntime.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/livekitRuntime.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;GAiBG;AAEH,MAAM,WAAW,cAAc;IAC7B,yCAAyC;IACzC,IAAI,EAAE,GAAG,CAAC;IACV,uCAAuC;IACvC,SAAS,EAAE,GAAG,CAAC;IACf,6DAA6D;IAC7D,KAAK,EAAE,GAAG,CAAC;IACX,6CAA6C;IAC7C,eAAe,EAAE,GAAG,CAAC;IACrB,qDAAqD;IACrD,YAAY,EAAE,GAAG,CAAC;IAClB,mDAAmD;IACnD,UAAU,EAAE,GAAG,CAAC;IAChB,8DAA8D;IAC9D,YAAY,EAAE,GAAG,CAAC;IAClB,0DAA0D;IAC1D,eAAe,EAAE,MAAM,IAAI,CAAC;IAC5B;;;OAGG;IACH,eAAe,EAAE,GAAG,CAAC;CACtB;AAID,eAAO,MAAM,kBAAkB,QAAO,OAAiC,CAAC;AAExE;;;;GAIG;AACH,eAAO,MAAM,WAAW,QAAO,cAAc,GAAG,IAsC/C,CAAC;AAIF;;;;;;GAMG;AACH,eAAO,MAAM,oBAAoB,GAAI,SAAS,cAAc,KAAG,IAQ9D,CAAC;AAEF,4CAA4C;AAC5C,eAAO,MAAM,6BAA6B,QAAO,IAGhD,CAAC"}
@@ -7,6 +7,12 @@
7
7
  * loaded lazily exactly like the LiveKit packages, so hosts that don't
8
8
  * install it get the plain in-app ring screen and nothing breaks.
9
9
  *
10
+ * On iOS every call, incoming or outgoing, is also reported to CallKit for
11
+ * as long as it lasts. That is what puts it in the Dynamic Island / the
12
+ * green status-bar pill when the app is in the background, with the
13
+ * system's own mute and end buttons, and what keeps the call's audio
14
+ * running in the background.
15
+ *
10
16
  * Platform reality, stated plainly:
11
17
  * - Android: full value. A ConnectionService call shows the system
12
18
  * incoming-call screen over the lock screen.
@@ -21,6 +27,12 @@ interface CallKeepModule {
21
27
  displayIncomingCall: (uuid: string, handle: string, localizedCallerName?: string, handleType?: string, hasVideo?: boolean) => void;
22
28
  endCall: (uuid: string) => void;
23
29
  endAllCalls: () => void;
30
+ startCall?: (uuid: string, handle: string, contactIdentifier?: string, handleType?: string, hasVideo?: boolean) => void;
31
+ answerIncomingCall?: (uuid: string) => void;
32
+ reportConnectingOutgoingCallWithUUID?: (uuid: string) => void;
33
+ reportConnectedOutgoingCallWithUUID?: (uuid: string) => void;
34
+ reportEndCallWithUUID?: (uuid: string, reason: number) => void;
35
+ setMutedCall?: (uuid: string, muted: boolean) => void;
24
36
  addEventListener: (event: string, handler: (payload: any) => void) => void;
25
37
  removeEventListener: (event: string) => void;
26
38
  setAvailable?: (available: boolean) => void;
@@ -1 +1 @@
1
- {"version":3,"file":"useCallKeep.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/useCallKeep.ts"],"names":[],"mappings":"AAOA;;;;;;;;;;;;;;;;;GAiBG;AAEH,UAAU,cAAc;IACtB,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,mBAAmB,EAAE,CACnB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,mBAAmB,CAAC,EAAE,MAAM,EAC5B,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,OAAO,KACf,IAAI,CAAC;IACV,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IAC3E,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAID,eAAO,MAAM,YAAY,QAAO,cAAc,GAAG,IA4BhD,CAAC;AAwBF,eAAO,MAAM,WAAW,QAAO,IA0J9B,CAAC"}
1
+ {"version":3,"file":"useCallKeep.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/useCallKeep.ts"],"names":[],"mappings":"AAWA;;;;;;;;;;;;;;;;;;;;;;;GAuBG;AAEH,UAAU,cAAc;IACtB,KAAK,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;IACvC,mBAAmB,EAAE,CACnB,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,mBAAmB,CAAC,EAAE,MAAM,EAC5B,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,OAAO,KACf,IAAI,CAAC;IACV,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAChC,WAAW,EAAE,MAAM,IAAI,CAAC;IACxB,SAAS,CAAC,EAAE,CACV,IAAI,EAAE,MAAM,EACZ,MAAM,EAAE,MAAM,EACd,iBAAiB,CAAC,EAAE,MAAM,EAC1B,UAAU,CAAC,EAAE,MAAM,EACnB,QAAQ,CAAC,EAAE,OAAO,KACf,IAAI,CAAC;IACV,kBAAkB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC5C,oCAAoC,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC9D,mCAAmC,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7D,qBAAqB,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,YAAY,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;IACtD,gBAAgB,EAAE,CAAC,KAAK,EAAE,MAAM,EAAE,OAAO,EAAE,CAAC,OAAO,EAAE,GAAG,KAAK,IAAI,KAAK,IAAI,CAAC;IAC3E,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,YAAY,CAAC,EAAE,CAAC,SAAS,EAAE,OAAO,KAAK,IAAI,CAAC;IAC5C,gBAAgB,CAAC,EAAE,MAAM,IAAI,CAAC;CAC/B;AAID,eAAO,MAAM,YAAY,QAAO,cAAc,GAAG,IA4BhD,CAAC;AA4BF,eAAO,MAAM,WAAW,QAAO,IA2S9B,CAAC"}
@@ -0,0 +1,10 @@
1
+ import type { OngoingCallNotification } from '../../types/types';
2
+ /**
3
+ * Drives the host's ongoing-call notification (`videoCalls.
4
+ * ongoingCallNotification`, an Android foreground-service notification in
5
+ * the Ethora app): shown while a call is connecting or connected, updated
6
+ * when the mic, camera or timer anchor change, and its buttons act on the
7
+ * call like the in-app ones.
8
+ */
9
+ export declare const useOngoingCallNotification: (adapter: OngoingCallNotification | undefined) => void;
10
+ //# sourceMappingURL=useOngoingCallNotification.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"useOngoingCallNotification.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/useOngoingCallNotification.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EACV,uBAAuB,EAExB,MAAM,mBAAmB,CAAC;AAK3B;;;;;;GAMG;AACH,eAAO,MAAM,0BAA0B,GACrC,SAAS,uBAAuB,GAAG,SAAS,KAC3C,IA2FF,CAAC"}
@@ -0,0 +1,46 @@
1
+ import { Animated, LayoutChangeEvent } from 'react-native';
2
+ /**
3
+ * The small video tile of a call, Telegram-style: drag it anywhere and it
4
+ * snaps to the nearest corner when released (a flick carries it towards
5
+ * the flick), pinch it to switch between a small and a large size.
6
+ *
7
+ * Positions are kept per corner rather than per pixel, so the tile stays
8
+ * glued to its corner when the stage changes size (rotation, iPad split
9
+ * view) or the tile itself changes size.
10
+ */
11
+ export type PipTileSize = 'small' | 'large';
12
+ export declare const PIP_TILE_SIZES: Record<PipTileSize, {
13
+ width: number;
14
+ height: number;
15
+ }>;
16
+ export declare const usePipTile: ({ topInset }?: {
17
+ topInset?: number;
18
+ }) => {
19
+ /** Put on the area the tile moves within. */
20
+ onStageLayout: (event: LayoutChangeEvent) => void;
21
+ panHandlers: import("react-native").GestureResponderHandlers;
22
+ size: PipTileSize;
23
+ /** Hidden until the stage is measured, so it never flashes at 0,0. */
24
+ style: {
25
+ position: "absolute";
26
+ left: number;
27
+ top: number;
28
+ width: Animated.Value;
29
+ height: Animated.Value;
30
+ opacity: number;
31
+ transform: ({
32
+ translateX: Animated.Value;
33
+ translateY?: undefined;
34
+ scale?: undefined;
35
+ } | {
36
+ translateY: Animated.Value;
37
+ translateX?: undefined;
38
+ scale?: undefined;
39
+ } | {
40
+ scale: Animated.Value;
41
+ translateX?: undefined;
42
+ translateY?: undefined;
43
+ })[];
44
+ };
45
+ };
46
+ //# sourceMappingURL=usePipTile.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"usePipTile.d.ts","sourceRoot":"","sources":["../../../../src/components/VideoCalls/usePipTile.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,iBAAiB,EAAgB,MAAM,cAAc,CAAC;AAEzE;;;;;;;;GAQG;AAEH,MAAM,MAAM,WAAW,GAAG,OAAO,GAAG,OAAO,CAAC;AAE5C,eAAO,MAAM,cAAc,EAAE,MAAM,CAAC,WAAW,EAAE;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,CAGjF,CAAC;AA0BF,eAAO,MAAM,UAAU,GAAI,eAAkB;IAAE,QAAQ,CAAC,EAAE,MAAM,CAAA;CAAO;IAsJnE,6CAA6C;2BAlGrC,iBAAiB;;;IAsGzB,sEAAsE;;;;;;;;;;;;;;;;;;;;;;CAezE,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"MediaFilePreview.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/MediaFilePreview.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAG9C,UAAU,qBAAqB;IAC7B,YAAY,EAAE,SAAS,EAAE,CAAC;IAC1B,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AA6CD,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CA0CtD,CAAC"}
1
+ {"version":3,"file":"MediaFilePreview.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/MediaFilePreview.tsx"],"names":[],"mappings":"AAOA,OAAO,EAAE,EAAE,EAAY,MAAM,OAAO,CAAC;AACrC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI9C,UAAU,qBAAqB;IAC7B,YAAY,EAAE,SAAS,EAAE,CAAC;IAC1B,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;CAC5C;AA6CD,eAAO,MAAM,gBAAgB,EAAE,EAAE,CAAC,qBAAqB,CAwDtD,CAAC"}
@@ -17,6 +17,16 @@ interface CustomMessageImageProps {
17
17
  * route; rendering it inline is what left the bubbles blank.
18
18
  */
19
19
  locationPreview?: string;
20
+ /**
21
+ * Album mode: fill a tile of exactly this size (cover, square corners; the
22
+ * tile clips) instead of sizing itself to the picture.
23
+ */
24
+ tile?: {
25
+ width: number;
26
+ height: number;
27
+ };
28
+ /** Replaces the default "open this one file" tap, e.g. to open an album at an index. */
29
+ onOpen?: () => void;
20
30
  }
21
31
  declare const CustomMessageImage: React.FC<CustomMessageImageProps>;
22
32
  export default CustomMessageImage;
@@ -1 +1 @@
1
- {"version":3,"file":"MessageImage.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/MessageImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoBnD,UAAU,uBAAuB;IAC/B,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;CAC1B;AASD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA8FzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"MessageImage.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/MessageImage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAoBnD,UAAU,uBAAuB;IAC/B,wEAAwE;IACxE,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;;OAKG;IACH,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB;;;OAGG;IACH,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AASD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAuGzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -5,7 +5,13 @@ interface SendInputProps {
5
5
  sendMessage: (message: string) => void;
6
6
  isLoading: boolean;
7
7
  editMessage?: string;
8
- sendMedia: (data: any, type: string) => void;
8
+ /**
9
+ * Sends one message carrying `data` (a file or the picked list). The typed
10
+ * text, when there is any, goes with it as the caption.
11
+ */
12
+ sendMedia: (data: any, type: string, caption?: {
13
+ text: string;
14
+ }) => unknown;
9
15
  config?: IConfig;
10
16
  onFocus?: () => void;
11
17
  onBlur?: () => void;
@@ -1 +1 @@
1
- {"version":3,"file":"SendInput.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/SendInput.tsx"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,KAAmD,MAAM,OAAO,CAAC;AAMxE,OAAO,EAAE,OAAO,EAAa,MAAM,mBAAmB,CAAC;AA+EvD,UAAU,cAAc;IACtB,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,KAAK,IAAI,CAAC;IAC7C,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CAytBvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
1
+ {"version":3,"file":"SendInput.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/SendInput.tsx"],"names":[],"mappings":"AAAA,cAAc;AAEd,OAAO,KAAmD,MAAM,OAAO,CAAC;AAMxE,OAAO,EAAE,OAAO,EAAa,MAAM,mBAAmB,CAAC;AAwEvD,UAAU,cAAc;IACtB,WAAW,EAAE,CAAC,OAAO,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB;;;OAGG;IACH,SAAS,EAAE,CAAC,IAAI,EAAE,GAAG,EAAE,IAAI,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC;IAC5E,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,OAAO,CAAC,EAAE,MAAM,IAAI,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;IACpB,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;IACzC,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,aAAa,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,CAAC,MAAM,GAAG,GAAG,CAAC,OAAO,CAAC,EAAE,CAAC;IAC3D,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB;AAED,QAAA,MAAM,SAAS,EAAE,KAAK,CAAC,EAAE,CAAC,cAAc,CA0uBvC,CAAC;AAEF,eAAe,SAAS,CAAC"}
@@ -11,6 +11,13 @@ interface CustomMessageVideoProps {
11
11
  mimetype: string;
12
12
  /** The backend-generated poster frame (message.locationPreview). */
13
13
  previewURL?: string;
14
+ /** Album mode: fill a tile of exactly this size (square corners; the tile clips). */
15
+ tile?: {
16
+ width: number;
17
+ height: number;
18
+ };
19
+ /** Replaces the default "open this one file" tap, e.g. to open an album at an index. */
20
+ onOpen?: () => void;
14
21
  }
15
22
  declare const CustomMessageVideo: React.FC<CustomMessageVideoProps>;
16
23
  export default CustomMessageVideo;
@@ -1 +1 @@
1
- {"version":3,"file":"VideoMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/VideoMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAmBnD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB;AAqGD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CA+BzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
1
+ {"version":3,"file":"VideoMessage.d.ts","sourceRoot":"","sources":["../../../../src/components/styled/VideoMessage.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA8B,MAAM,OAAO,CAAC;AAmBnD,UAAU,uBAAuB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB;;;;OAIG;IACH,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,oEAAoE;IACpE,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,qFAAqF;IACrF,IAAI,CAAC,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,MAAM,CAAA;KAAE,CAAC;IACzC,wFAAwF;IACxF,MAAM,CAAC,EAAE,MAAM,IAAI,CAAC;CACrB;AAgHD,QAAA,MAAM,kBAAkB,EAAE,KAAK,CAAC,EAAE,CAAC,uBAAuB,CAsCzD,CAAC;AAEF,eAAe,kBAAkB,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"xmppProvider.d.ts","sourceRoot":"","sources":["../../../src/context/xmppProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,SAAS,EAQV,MAAM,OAAO,CAAC;AAIf,OAAO,UAEN,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,OAAO,EACP,uBAAuB,EAEvB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AA2CxB,UAAU,QAAQ;IAChB,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC;CAC9B;AAED,UAAU,eAAe;IACvB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC9B,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,gBAAgB,EAAE,CAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,qBAAqB,KACjC,OAAO,CAAC,UAAU,CAAC,CAAC;CAC1B;AAID,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IAIjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAcD,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAw0BpD,CAAC;AAEF,eAAO,MAAM,aAAa,uBAkBzB,CAAC;AAEF,iFAAiF;AACjF,wBAAgB,cAAc,SAE7B"}
1
+ {"version":3,"file":"xmppProvider.d.ts","sourceRoot":"","sources":["../../../src/context/xmppProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EACZ,SAAS,EAQV,MAAM,OAAO,CAAC;AAIf,OAAO,UAEN,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EACL,OAAO,EACP,uBAAuB,EAEvB,qBAAqB,EACtB,MAAM,gBAAgB,CAAC;AA4CxB,UAAU,QAAQ;IAChB,OAAO,EAAE,UAAU,GAAG,MAAM,CAAC;CAC9B;AAED,UAAU,eAAe;IACvB,MAAM,EAAE,UAAU,GAAG,IAAI,CAAC;IAC1B,uBAAuB,EAAE,uBAAuB,CAAC;IACjD,QAAQ,EAAE,QAAQ,CAAC,SAAS,CAAC,CAAC;IAC9B,SAAS,EAAE,CAAC,MAAM,EAAE,UAAU,GAAG,IAAI,KAAK,IAAI,CAAC;IAC/C,gBAAgB,EAAE,CAChB,QAAQ,EAAE,MAAM,EAChB,QAAQ,EAAE,MAAM,EAChB,YAAY,CAAC,EAAE,qBAAqB,KACjC,OAAO,CAAC,UAAU,CAAC,CAAC;CAC1B;AAID,UAAU,iBAAiB;IACzB,QAAQ,EAAE,SAAS,CAAC;IACpB,MAAM,CAAC,EAAE,OAAO,CAAC;IAIjB,SAAS,CAAC,EAAE,OAAO,CAAC;CACrB;AAcD,iFAAiF;AACjF,eAAO,MAAM,kBAAkB,uBAAuB,CAAC;AAEvD,eAAO,MAAM,YAAY,EAAE,KAAK,CAAC,EAAE,CAAC,iBAAiB,CAu2BpD,CAAC;AAEF,eAAO,MAAM,aAAa,uBAkBzB,CAAC;AAEF,iFAAiF;AACjF,wBAAgB,cAAc,SAE7B"}
@@ -1,5 +1,5 @@
1
1
  import { type Progress } from './fileCipher';
2
- export { parseSealedMediaBody } from './sealedBody';
2
+ export { parseSealedMediaBody, parseSealedMediaPayload } from './sealedBody';
3
3
  export interface FileEnvelopeMeta {
4
4
  mimetype: string;
5
5
  originalname: string;
@@ -1 +1 @@
1
- {"version":3,"file":"fileEnvelope.d.ts","sourceRoot":"","sources":["../../../src/e2ee/fileEnvelope.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,oBAAoB,EAAE,MAAM,cAAc,CAAC;AAMpD,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,UAAU,GAChB,UAAU,CAgBZ;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,UAAU,GAAG;IACxD,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,UAAU,CAAC;CACnB,CA0BA;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACzD,UAAU,CAAC,EAAE,QAAQ,GACpB,OAAO,CAAC,UAAU,CAAC,CAiBrB;AAED,wBAAsB,cAAc,CAClC,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,QAAQ,GACpB,OAAO,CAAC;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC,CAIxD"}
1
+ {"version":3,"file":"fileEnvelope.d.ts","sourceRoot":"","sources":["../../../src/e2ee/fileEnvelope.ts"],"names":[],"mappings":"AAQA,OAAO,EAGL,KAAK,QAAQ,EACd,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,oBAAoB,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAM7E,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,EAAE,MAAM,CAAC;IACjB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;CACd;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,EAAE,UAAU,CAAC;IACvB,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB;AAED,wBAAgB,kBAAkB,CAChC,IAAI,EAAE,gBAAgB,EACtB,KAAK,EAAE,UAAU,GAChB,UAAU,CAgBZ;AAED,wBAAgB,kBAAkB,CAAC,QAAQ,EAAE,UAAU,GAAG;IACxD,IAAI,EAAE,gBAAgB,CAAC;IACvB,KAAK,EAAE,UAAU,CAAC;CACnB,CA0BA;AAED,wBAAsB,iBAAiB,CACrC,IAAI,EAAE;IAAE,KAAK,EAAE,UAAU,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,IAAI,CAAC,EAAE,MAAM,CAAA;CAAE,EACzD,UAAU,CAAC,EAAE,QAAQ,GACpB,OAAO,CAAC,UAAU,CAAC,CAiBrB;AAED,wBAAsB,cAAc,CAClC,UAAU,EAAE,UAAU,EACtB,WAAW,EAAE,MAAM,EACnB,UAAU,CAAC,EAAE,QAAQ,GACpB,OAAO,CAAC;IAAE,IAAI,EAAE,gBAAgB,CAAC;IAAC,KAAK,EAAE,UAAU,CAAA;CAAE,CAAC,CAIxD"}
@@ -1,2 +1,18 @@
1
+ import type { IMentionSpan } from '../types/models/message.model';
2
+ /** What a sealed media <body> carries besides the keys. */
3
+ export interface SealedMediaPayload {
4
+ keys: string[];
5
+ /** The text typed with the files. Sealed here, never on <data>. */
6
+ caption?: string;
7
+ captionMentions?: IMentionSpan[];
8
+ }
9
+ /**
10
+ * Pulls the attachment keys (and the caption, when there is one) out of a
11
+ * decrypted media <body>: `{v:1,keys:[...],caption?,captionMentions?}`, which
12
+ * the sender writes in place of the usual literal "media". Undefined for
13
+ * anything else, so an ordinary media message falls through untouched.
14
+ */
15
+ export declare function parseSealedMediaPayload(body?: string): SealedMediaPayload | undefined;
16
+ /** The attachment keys out of a sealed media <body>; see parseSealedMediaPayload. */
1
17
  export declare function parseSealedMediaBody(body?: string): string[] | undefined;
2
18
  //# sourceMappingURL=sealedBody.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sealedBody.d.ts","sourceRoot":"","sources":["../../../src/e2ee/sealedBody.ts"],"names":[],"mappings":"AAAA,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAgBxE"}
1
+ {"version":3,"file":"sealedBody.d.ts","sourceRoot":"","sources":["../../../src/e2ee/sealedBody.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,+BAA+B,CAAC;AAGlE,2DAA2D;AAC3D,MAAM,WAAW,kBAAkB;IACjC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,mEAAmE;IACnE,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,eAAe,CAAC,EAAE,YAAY,EAAE,CAAC;CAClC;AAED;;;;;GAKG;AACH,wBAAgB,uBAAuB,CACrC,IAAI,CAAC,EAAE,MAAM,GACZ,kBAAkB,GAAG,SAAS,CA+BhC;AAED,qFAAqF;AACrF,wBAAgB,oBAAoB,CAAC,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,SAAS,CAExE"}
@@ -0,0 +1,66 @@
1
+ import type { ViewStyle } from 'react-native';
2
+ /**
3
+ * Geometry for a multi-media album bubble. Pure numbers and RN style objects,
4
+ * so AlbumGrid stays a dumb renderer and the rules are testable without a
5
+ * renderer.
6
+ *
7
+ * 1 item full width, 4:3
8
+ * 2 items side by side, 2:1 (square cells)
9
+ * 3 items one large cell on the left, two stacked on the right
10
+ * 4 items 2 x 2
11
+ * 5+ items 2 x 2 showing the first four, the last cell carries "+N"
12
+ */
13
+ /** Gap between neighbouring tiles. */
14
+ export declare const ALBUM_GAP = 3;
15
+ /** Radius of a tile corner that sits on the bubble's own corner. */
16
+ export declare const ALBUM_OUTER_RADIUS = 10;
17
+ /** Radius of every other tile corner, the ones that face a neighbour. */
18
+ export declare const ALBUM_INNER_RADIUS = 3;
19
+ export interface AlbumCellPlacement {
20
+ /** 0-based grid column and row of the tile's top-left cell. */
21
+ column: number;
22
+ row: number;
23
+ columnSpan: number;
24
+ rowSpan: number;
25
+ }
26
+ export type AlbumKind = 'full' | 'pair' | 'hero' | 'quad';
27
+ export interface AlbumLayout {
28
+ kind: AlbumKind;
29
+ /** Number of tiles actually drawn. */
30
+ visible: number;
31
+ /** Items folded into the "+N" overlay on the last visible tile. */
32
+ hidden: number;
33
+ /** Relative width of each grid column. */
34
+ columns: number[];
35
+ /** Relative height of each grid row. */
36
+ rows: number[];
37
+ /** Width divided by height of the whole grid. */
38
+ aspectRatio: number;
39
+ /** One entry per visible tile, in order. */
40
+ placements: AlbumCellPlacement[];
41
+ }
42
+ /** Layout for `count` media tiles. Counts below 1 are treated as 1. */
43
+ export declare const getAlbumLayout: (count: number) => AlbumLayout;
44
+ export interface AlbumFrame {
45
+ width: number;
46
+ height: number;
47
+ /** One absolutely positioned style per visible tile, in order. */
48
+ tiles: ViewStyle[];
49
+ }
50
+ /** Pixel frame of the grid and of every tile for a grid `width` wide. */
51
+ export declare const getAlbumFrame: (layout: AlbumLayout, width: number) => AlbumFrame;
52
+ /**
53
+ * Which corners of one tile lie on the bubble's outer edge. Only those get
54
+ * the large radius; corners that face a neighbour get the small inner one.
55
+ */
56
+ export interface TileCorners {
57
+ topLeft: boolean;
58
+ topRight: boolean;
59
+ bottomRight: boolean;
60
+ bottomLeft: boolean;
61
+ }
62
+ /** Outer-corner flags for the tile at `position` (0-based) of `layout`. */
63
+ export declare const getTileCorners: (layout: AlbumLayout, position: number) => TileCorners;
64
+ /** The four border radii of one tile, as RN style props. */
65
+ export declare const getTileBorderRadius: (layout: AlbumLayout, position: number) => Pick<ViewStyle, "borderTopLeftRadius" | "borderTopRightRadius" | "borderBottomRightRadius" | "borderBottomLeftRadius">;
66
+ //# sourceMappingURL=albumLayout.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"albumLayout.d.ts","sourceRoot":"","sources":["../../../src/helpers/albumLayout.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C;;;;;;;;;;GAUG;AAEH,sCAAsC;AACtC,eAAO,MAAM,SAAS,IAAI,CAAC;AAC3B,oEAAoE;AACpE,eAAO,MAAM,kBAAkB,KAAK,CAAC;AACrC,yEAAyE;AACzE,eAAO,MAAM,kBAAkB,IAAI,CAAC;AAEpC,MAAM,WAAW,kBAAkB;IACjC,+DAA+D;IAC/D,MAAM,EAAE,MAAM,CAAC;IACf,GAAG,EAAE,MAAM,CAAC;IACZ,UAAU,EAAE,MAAM,CAAC;IACnB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,MAAM,SAAS,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE1D,MAAM,WAAW,WAAW;IAC1B,IAAI,EAAE,SAAS,CAAC;IAChB,sCAAsC;IACtC,OAAO,EAAE,MAAM,CAAC;IAChB,mEAAmE;IACnE,MAAM,EAAE,MAAM,CAAC;IACf,0CAA0C;IAC1C,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,wCAAwC;IACxC,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,iDAAiD;IACjD,WAAW,EAAE,MAAM,CAAC;IACpB,4CAA4C;IAC5C,UAAU,EAAE,kBAAkB,EAAE,CAAC;CAClC;AAuCD,uEAAuE;AACvE,eAAO,MAAM,cAAc,GAAI,OAAO,MAAM,KAAG,WAc9C,CAAC;AASF,MAAM,WAAW,UAAU;IACzB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;IACf,kEAAkE;IAClE,KAAK,EAAE,SAAS,EAAE,CAAC;CACpB;AAED,yEAAyE;AACzE,eAAO,MAAM,aAAa,GAAI,QAAQ,WAAW,EAAE,OAAO,MAAM,KAAG,UAuBlE,CAAC;AAEF;;;GAGG;AACH,MAAM,WAAW,WAAW;IAC1B,OAAO,EAAE,OAAO,CAAC;IACjB,QAAQ,EAAE,OAAO,CAAC;IAClB,WAAW,EAAE,OAAO,CAAC;IACrB,UAAU,EAAE,OAAO,CAAC;CACrB;AA2BD,2EAA2E;AAC3E,eAAO,MAAM,cAAc,GACzB,QAAQ,WAAW,EACnB,UAAU,MAAM,KACf,WAGF,CAAC;AAEF,4DAA4D;AAC5D,eAAO,MAAM,mBAAmB,GAC9B,QAAQ,WAAW,EACnB,UAAU,MAAM,KACf,IAAI,CACL,SAAS,EACP,qBAAqB,GACrB,sBAAsB,GACtB,yBAAyB,GACzB,wBAAwB,CAW3B,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { IAttachment, IMessage } from '../types/types';
2
+ /**
3
+ * Hard ceiling on how many attachments we will serialise into a stanza.
4
+ * The composer caps the picker far below this; this is the parser-side
5
+ * guard so a malformed or hostile stanza cannot make us render an
6
+ * unbounded grid.
7
+ */
8
+ export declare const MAX_ATTACHMENTS_PER_MESSAGE = 10;
9
+ /**
10
+ * Turns one raw wire/API object into an `IAttachment`, or null when there is
11
+ * nothing renderable in it. `location` is allowed to be empty: that is what
12
+ * an optimistic (still-uploading) attachment looks like.
13
+ */
14
+ export declare const normalizeAttachment: (raw: unknown) => IAttachment | null;
15
+ /** Accepts the parsed array, the raw JSON string, or junk. Never throws. */
16
+ export declare const parseAttachments: (raw: unknown) => IAttachment[];
17
+ /**
18
+ * The wire form: a JSON string on the `<data attachments="...">` attribute.
19
+ * Only the fields a receiver renders are sent - the stanza is already wide
20
+ * and every byte here is duplicated per attachment.
21
+ */
22
+ export declare const serializeAttachments: (attachments: IAttachment[]) => string;
23
+ /**
24
+ * The only supported way to read a media message's files.
25
+ *
26
+ * Order of truth: the multi-attach payload when present, otherwise the flat
27
+ * legacy fields synthesised into a single attachment. Every message that
28
+ * predates this feature - and every message from a client that does not
29
+ * speak it - takes the second path.
30
+ */
31
+ export declare const getMessageAttachments: (message?: (Pick<IMessage, "attachments" | "location" | "locationPreview" | "mimetype" | "originalName" | "fileName" | "size"> & {
32
+ duration?: unknown;
33
+ mediaDuration?: unknown;
34
+ }) | null) => IAttachment[];
35
+ /**
36
+ * True when the message carries a file: flagged `isMediafile`, or (older
37
+ * senders that never set the flag) with a real file URL or attachment. The
38
+ * one test every surface uses for "is this a media bubble".
39
+ */
40
+ export declare const isMediaMessage: (message?: (Partial<Pick<IMessage, "isDeleted" | "isMediafile" | "attachments">> & {
41
+ location?: unknown;
42
+ mimetype?: unknown;
43
+ originalName?: unknown;
44
+ fileName?: unknown;
45
+ locationPreview?: unknown;
46
+ }) | null) => boolean;
47
+ /**
48
+ * Maps one object from POST /files/ `results` to the attachment a sent
49
+ * message carries. Field names here follow the API's own spelling
50
+ * (`originalname`, `filename`), not the wire attribute names.
51
+ */
52
+ export declare const toUploadedAttachment: (raw: any) => IAttachment;
53
+ /** Name to show for an attachment, with the URL tail as the last resort. */
54
+ export declare const getAttachmentName: (attachment: IAttachment) => string;
55
+ //# sourceMappingURL=attachments.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"attachments.d.ts","sourceRoot":"","sources":["../../../src/helpers/attachments.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAWvD;;;;;GAKG;AACH,eAAO,MAAM,2BAA2B,KAAK,CAAC;AAsB9C;;;;GAIG;AACH,eAAO,MAAM,mBAAmB,GAAI,KAAK,OAAO,KAAG,WAAW,GAAG,IAuChE,CAAC;AAqEF,4EAA4E;AAC5E,eAAO,MAAM,gBAAgB,GAAI,KAAK,OAAO,KAAG,WAAW,EAQ1D,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,aAAa,WAAW,EAAE,KAAG,MAY/D,CAAC;AAEJ;;;;;;;GAOG;AACH,eAAO,MAAM,qBAAqB,GAChC,UAAU,CAAA,IAAI,CACZ,QAAQ,EACN,aAAa,GACb,UAAU,GACV,iBAAiB,GACjB,UAAU,GACV,cAAc,GACd,UAAU,GACV,MAAM,CACT,GAAG;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAAE,IAAG,IAAI,KACzD,WAAW,EAwCb,CAAC;AAiBF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,UACI,CAAC,OAAO,CAAC,IAAI,CAAC,QAAQ,EAAE,WAAW,GAAG,aAAa,GAAG,aAAa,CAAC,CAAC,GAAG;IACtE,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,OAAO,CAAC;CAC3B,CAAC,GACF,IAAI,KACP,OAMF,CAAC;AAEF;;;;GAIG;AACH,eAAO,MAAM,oBAAoB,GAAI,KAAK,GAAG,KAAG,WAsB9C,CAAC;AAEH,4EAA4E;AAC5E,eAAO,MAAM,iBAAiB,GAAI,YAAY,WAAW,KAAG,MAI/C,CAAC"}
@@ -0,0 +1,64 @@
1
+ import { IMentionSpan } from '../types/types';
2
+ /**
3
+ * The text typed with a set of attachments, sent as part of the media
4
+ * message itself (never as a separate text stanza).
5
+ *
6
+ * `mentions` index into `text`, the same way a text message's mention spans
7
+ * index into its body.
8
+ */
9
+ export interface CaptionInput {
10
+ text: string;
11
+ mentions?: IMentionSpan[];
12
+ }
13
+ export interface NormalizedCaption {
14
+ caption: string;
15
+ mentions?: IMentionSpan[];
16
+ }
17
+ /**
18
+ * Mention spans for a caption, checked against the caption text: a span that
19
+ * no longer reads "@Name" at its offset is dropped. Undefined when nothing is
20
+ * left, so a caption without mentions carries no empty attribute.
21
+ */
22
+ export declare const normalizeCaptionMentions: (value: unknown, caption: string) => IMentionSpan[] | undefined;
23
+ /**
24
+ * Turns what the composer typed into the caption that travels with the
25
+ * media. Undefined for blank text, which means "no caption".
26
+ */
27
+ export declare const normalizeCaptionInput: (input?: CaptionInput | null) => NormalizedCaption | undefined;
28
+ /** What a media message's text is, and the @-mention spans that index into it. */
29
+ export interface ResolvedCaption {
30
+ text: string;
31
+ mentions?: IMentionSpan[];
32
+ }
33
+ export interface CaptionOptions {
34
+ /**
35
+ * The caller already knows this is a media message (a thin `lastMessage`
36
+ * that only says so by its id). Otherwise it is read off the message.
37
+ */
38
+ isMedia?: boolean;
39
+ /** The message is sealed: only a caption that came out of the envelope counts. */
40
+ sealed?: boolean;
41
+ /** Extra names of the sender, which a body may merely echo. */
42
+ senderNames?: string[];
43
+ }
44
+ /**
45
+ * The text of a media message, from whichever format carried it. The one
46
+ * place that knows the formats, so every surface (bubble, room list preview,
47
+ * notification, reply quote, copy) agrees:
48
+ *
49
+ * 1. `caption` (+ `captionMentions`): what this SDK sends. The only source
50
+ * for a sealed message, whose caption comes out of the envelope.
51
+ * 2. The caption under another name on `<data>` (`captionText`, `text`,
52
+ * `message`, `description`, `title`) from other clients.
53
+ * 3. A real `body`: older clients and other SDKs put the text in the
54
+ * `<body>` of the media message itself. "media", the file's name or URL,
55
+ * the sender's own name or e-mail and generated labels are not text.
56
+ *
57
+ * Never derived for a sealed message, and never for a message with no file.
58
+ */
59
+ export declare const resolveMessageCaption: (message?: object | null, options?: CaptionOptions) => ResolvedCaption | undefined;
60
+ /** The caption a message carries, or undefined when it has none. */
61
+ export declare const getMessageCaption: (message?: object | null, options?: CaptionOptions) => string | undefined;
62
+ /** The mention spans of `getMessageCaption`'s text. */
63
+ export declare const getMessageCaptionMentions: (message?: object | null, options?: CaptionOptions) => IMentionSpan[] | undefined;
64
+ //# sourceMappingURL=caption.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"caption.d.ts","sourceRoot":"","sources":["../../../src/helpers/caption.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,YAAY,EAAE,MAAM,gBAAgB,CAAC;AAK9C;;;;;;GAMG;AACH,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,iBAAiB;IAChC,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AAeD;;;;GAIG;AACH,eAAO,MAAM,wBAAwB,GACnC,OAAO,OAAO,EACd,SAAS,MAAM,KACd,YAAY,EAAE,GAAG,SAMnB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,qBAAqB,GAChC,QAAQ,YAAY,GAAG,IAAI,KAC1B,iBAAiB,GAAG,SAKtB,CAAC;AAEF,kFAAkF;AAClF,MAAM,WAAW,eAAe;IAC9B,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,CAAC,EAAE,YAAY,EAAE,CAAC;CAC3B;AAED,MAAM,WAAW,cAAc;IAC7B;;;OAGG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,kFAAkF;IAClF,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB,+DAA+D;IAC/D,WAAW,CAAC,EAAE,MAAM,EAAE,CAAC;CACxB;AA2ID;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,qBAAqB,GAChC,UAAU,MAAM,GAAG,IAAI,EACvB,UAAS,cAAmB,KAC3B,eAAe,GAAG,SAiCpB,CAAC;AAEF,oEAAoE;AACpE,eAAO,MAAM,iBAAiB,GAC5B,UAAU,MAAM,GAAG,IAAI,EACvB,UAAU,cAAc,KACvB,MAAM,GAAG,SAA0D,CAAC;AAEvE,uDAAuD;AACvD,eAAO,MAAM,yBAAyB,GACpC,UAAU,MAAM,GAAG,IAAI,EACvB,UAAU,cAAc,KACvB,YAAY,EAAE,GAAG,SAA8D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createMainMessageForThread.d.ts","sourceRoot":"","sources":["../../../src/helpers/createMainMessageForThread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAE1C,eAAO,MAAM,0BAA0B,GAAI,SAAS,QAAQ,KAAG,MAoB9D,CAAC"}
1
+ {"version":3,"file":"createMainMessageForThread.d.ts","sourceRoot":"","sources":["../../../src/helpers/createMainMessageForThread.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAG1C,eAAO,MAAM,0BAA0B,GAAI,SAAS,QAAQ,KAAG,MAwB9D,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"createMessageFromXml.d.ts","sourceRoot":"","sources":["../../../src/helpers/createMessageFromXml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAK1C,UAAU,mBAAoB,SAAQ,QAAQ;IAC5C,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,KAAK,mBAAmB,EACxB,SAAS,GAAG,EACZ,eAAe,MAAM,EACrB,iBAAiB,MAAM,EACvB,oBAAoB,OAAO,KAC1B,OAAO,CAAC,QAAQ,CAmIlB,CAAC"}
1
+ {"version":3,"file":"createMessageFromXml.d.ts","sourceRoot":"","sources":["../../../src/helpers/createMessageFromXml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,MAAM,gBAAgB,CAAC;AAM1C,UAAU,mBAAoB,SAAQ,QAAQ;IAC5C,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAC;CAClB;AAED;;;;;;;;;;;;;;GAcG;AACH,eAAO,MAAM,oBAAoB,GAC/B,KAAK,mBAAmB,EACxB,SAAS,GAAG,EACZ,eAAe,MAAM,EACrB,iBAAiB,MAAM,EACvB,oBAAoB,OAAO,KAC1B,OAAO,CAAC,QAAQ,CAkJlB,CAAC"}
@@ -0,0 +1,20 @@
1
+ export type FileKind = 'image' | 'video' | 'audio' | 'file';
2
+ interface FileKindInput {
3
+ mimetype?: string | null;
4
+ name?: string | null;
5
+ url?: string | null;
6
+ duration?: number | string | null;
7
+ waveForm?: string | null;
8
+ originalName?: string | null;
9
+ }
10
+ /**
11
+ * Which card a file gets in a bubble. Mirrors the branches MediaMessage has
12
+ * always used for a single file (image, video, audio, octet-stream as a voice
13
+ * note, then the voice-message heuristics) so an album, a card stack and a
14
+ * lone file all agree on what a given file is.
15
+ */
16
+ export declare const getFileKind: (input: FileKindInput) => FileKind;
17
+ /** True for the kinds that sit in the picture/video album. */
18
+ export declare const isAlbumKind: (kind: FileKind) => boolean;
19
+ export {};
20
+ //# sourceMappingURL=fileKind.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"fileKind.d.ts","sourceRoot":"","sources":["../../../src/helpers/fileKind.ts"],"names":[],"mappings":"AAEA,MAAM,MAAM,QAAQ,GAAG,OAAO,GAAG,OAAO,GAAG,OAAO,GAAG,MAAM,CAAC;AAE5D,UAAU,aAAa;IACrB,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,IAAI,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,GAAG,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACpB,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,GAAG,IAAI,CAAC;IAClC,QAAQ,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACzB,YAAY,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;CAC9B;AAED;;;;;GAKG;AACH,eAAO,MAAM,WAAW,GAAI,OAAO,aAAa,KAAG,QAclD,CAAC;AAEF,8DAA8D;AAC9D,eAAO,MAAM,WAAW,GAAI,MAAM,QAAQ,KAAG,OACP,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"getDataFromXml.d.ts","sourceRoot":"","sources":["../../../src/helpers/getDataFromXml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAoDtD,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC5B;AACD,eAAO,MAAM,cAAc,GAAU,QAAQ,OAAO,KAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CAyEjF,CAAC"}
1
+ {"version":3,"file":"getDataFromXml.d.ts","sourceRoot":"","sources":["../../../src/helpers/getDataFromXml.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAC9B,OAAO,EAAE,aAAa,EAAE,KAAK,EAAE,MAAM,gBAAgB,CAAC;AAqDtD,UAAU,OAAO;IACf,EAAE,EAAE,MAAM,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,CAAC,EAAE,OAAO,CAAC;IAClB,YAAY,CAAC,EAAE,GAAG,CAAC;IACnB,UAAU,CAAC,EAAE,aAAa,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE;QAAE,CAAC,CAAC,EAAE,MAAM,GAAG,GAAG,CAAA;KAAE,CAAC;CAC5B;AACD,eAAO,MAAM,cAAc,GAAU,QAAQ,OAAO,KAAG,OAAO,CAAC,OAAO,GAAG,SAAS,CA4EjF,CAAC"}
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Runs `worker` over `items` with at most `limit` calls in flight, and
3
+ * resolves with the results in INPUT order, whatever order the calls finish
4
+ * in. Workers that throw are reported as rejected entries instead of
5
+ * aborting the rest of the batch, so one failed upload never stops its
6
+ * siblings.
7
+ */
8
+ export declare function mapWithConcurrency<T, R>(items: readonly T[], limit: number, worker: (item: T, index: number) => Promise<R>): Promise<PromiseSettledResult<R>[]>;
9
+ //# sourceMappingURL=mapWithConcurrency.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mapWithConcurrency.d.ts","sourceRoot":"","sources":["../../../src/helpers/mapWithConcurrency.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,wBAAsB,kBAAkB,CAAC,CAAC,EAAE,CAAC,EAC3C,KAAK,EAAE,SAAS,CAAC,EAAE,EACnB,KAAK,EAAE,MAAM,EACb,MAAM,EAAE,CAAC,IAAI,EAAE,CAAC,EAAE,KAAK,EAAE,MAAM,KAAK,OAAO,CAAC,CAAC,CAAC,GAC7C,OAAO,CAAC,oBAAoB,CAAC,CAAC,CAAC,EAAE,CAAC,CAoBpC"}
@@ -0,0 +1,13 @@
1
+ import type { IConfig } from '../types/types';
2
+ /** Hard client-side cap on a single upload. Mirrors the backend's body limit. */
3
+ export declare const MAX_MEDIA_BYTES: number;
4
+ /** The most files one message may carry (also the parser-side ceiling). */
5
+ export declare const MAX_MEDIA_FILES = 10;
6
+ /** Files per message the host allows: `attachments.maxFiles`, clamped to 1-10. */
7
+ export declare const mediaFileCap: (config?: Pick<IConfig, "attachments"> | null) => number;
8
+ /**
9
+ * Bytes allowed per file: the 50 MB upload cap, lowered by
10
+ * `attachments.maxSizeMB` when the host sets a smaller one.
11
+ */
12
+ export declare const mediaSizeLimit: (config?: Pick<IConfig, "attachments"> | null, override?: number) => number;
13
+ //# sourceMappingURL=mediaLimits.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mediaLimits.d.ts","sourceRoot":"","sources":["../../../src/helpers/mediaLimits.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,gBAAgB,CAAC;AAE9C,iFAAiF;AACjF,eAAO,MAAM,eAAe,QAAmB,CAAC;AAEhD,2EAA2E;AAC3E,eAAO,MAAM,eAAe,KAAK,CAAC;AAElC,kFAAkF;AAClF,eAAO,MAAM,YAAY,GAAI,SAAS,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,GAAG,IAAI,KAAG,MAI3E,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,cAAc,GACzB,SAAS,IAAI,CAAC,OAAO,EAAE,aAAa,CAAC,GAAG,IAAI,EAC5C,WAAW,MAAM,KAChB,MAIF,CAAC"}
@@ -0,0 +1,26 @@
1
+ /**
2
+ * Retry hooks for media messages whose uploads did not all land.
3
+ *
4
+ * The send closure lives inside useSendMessage, but the bubble that shows
5
+ * "Retry" on a tile is somewhere else in the tree and has no access to it.
6
+ * The send registers its retry runner under the message id while the
7
+ * message is unsent, and the bubble looks it up here. The runner is removed
8
+ * as soon as the message is delivered.
9
+ */
10
+ export type MediaRetryRunner = (indices?: number[]) => Promise<boolean>;
11
+ export declare const registerMediaRetry: (messageId: string, runner: MediaRetryRunner) => void;
12
+ export declare const unregisterMediaRetry: (messageId: string) => void;
13
+ export declare const hasMediaRetry: (messageId: string) => boolean;
14
+ /**
15
+ * Re-runs the uploads still missing for `messageId` (only `index` / `indices`
16
+ * when given), then sends the message once every file is in. Resolves to
17
+ * false when nothing is registered or the attempt did not deliver.
18
+ */
19
+ export declare const retryMediaSend: (messageId: string, index?: number | number[]) => Promise<boolean>;
20
+ /**
21
+ * Asks for one file of `messageId` to be retried. Requests made in the same
22
+ * tick are merged into one run: the runner takes a single run at a time, so
23
+ * a separate call per tile would drop every retry after the first.
24
+ */
25
+ export declare const requestMediaRetry: (messageId: string, index: number) => void;
26
+ //# sourceMappingURL=mediaSendRetry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mediaSendRetry.d.ts","sourceRoot":"","sources":["../../../src/helpers/mediaSendRetry.ts"],"names":[],"mappings":"AAAA;;;;;;;;GAQG;AAEH,MAAM,MAAM,gBAAgB,GAAG,CAAC,OAAO,CAAC,EAAE,MAAM,EAAE,KAAK,OAAO,CAAC,OAAO,CAAC,CAAC;AAIxE,eAAO,MAAM,kBAAkB,GAAI,WAAW,MAAM,EAAE,QAAQ,gBAAgB,KAAG,IAEhF,CAAC;AAEF,eAAO,MAAM,oBAAoB,GAAI,WAAW,MAAM,KAAG,IAExD,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,WAAW,MAAM,KAAG,OAAiC,CAAC;AAEpF;;;;GAIG;AACH,eAAO,MAAM,cAAc,GACzB,WAAW,MAAM,EACjB,QAAQ,MAAM,GAAG,MAAM,EAAE,KACxB,OAAO,CAAC,OAAO,CAKjB,CAAC;AAIF;;;;GAIG;AACH,eAAO,MAAM,iBAAiB,GAAI,WAAW,MAAM,EAAE,OAAO,MAAM,KAAG,IAYpE,CAAC"}
@@ -0,0 +1,16 @@
1
+ /**
2
+ * Normalises the media parts of a message's flat `<data>` attributes:
3
+ *
4
+ * - `attachments` (a JSON string on the wire) becomes the typed array, or is
5
+ * dropped when it decodes to nothing so the flat legacy fields win;
6
+ * - `caption` is kept only when it holds text, with `captionMentions` (JSON
7
+ * on the wire) checked against it;
8
+ * - in a sealed message (`clientEncrypted`) the caption attributes are
9
+ * always dropped: the only caption such a message may show is the one
10
+ * inside its encrypted body, which the caller lifts afterwards.
11
+ *
12
+ * Safe to apply twice, so the wrapped and the positional parsers can both
13
+ * call it.
14
+ */
15
+ export declare const normalizeMediaDataAttrs: (attrs: Record<string, any>) => Record<string, any>;
16
+ //# sourceMappingURL=mediaWireData.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"mediaWireData.d.ts","sourceRoot":"","sources":["../../../src/helpers/mediaWireData.ts"],"names":[],"mappings":"AAGA;;;;;;;;;;;;;GAaG;AACH,eAAO,MAAM,uBAAuB,GAClC,OAAO,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,KACzB,MAAM,CAAC,MAAM,EAAE,GAAG,CAqCpB,CAAC"}