@ethora/chat-component-rn 26.8.1 → 26.8.2

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 (604) hide show
  1. package/CHANGELOG.md +96 -0
  2. package/README.md +43 -10
  3. package/lib/commonjs/assets/icons.js +7 -2
  4. package/lib/commonjs/assets/icons.js.map +1 -1
  5. package/lib/commonjs/components/AuthForms/Login.js +4 -4
  6. package/lib/commonjs/components/AuthForms/Login.js.map +1 -1
  7. package/lib/commonjs/components/Header/HeaderRoomList.js +29 -8
  8. package/lib/commonjs/components/Header/HeaderRoomList.js.map +1 -1
  9. package/lib/commonjs/components/MainComponents/ChatHeader.js +9 -3
  10. package/lib/commonjs/components/MainComponents/ChatHeader.js.map +1 -1
  11. package/lib/commonjs/components/MainComponents/ChatRoom.js +150 -14
  12. package/lib/commonjs/components/MainComponents/ChatRoom.js.map +1 -1
  13. package/lib/commonjs/components/MainComponents/ChatWrapper.js +34 -13
  14. package/lib/commonjs/components/MainComponents/ChatWrapper.js.map +1 -1
  15. package/lib/commonjs/components/MainComponents/LoginWrapper.js +2 -1
  16. package/lib/commonjs/components/MainComponents/LoginWrapper.js.map +1 -1
  17. package/lib/commonjs/components/MainComponents/MediaMessage.js +29 -9
  18. package/lib/commonjs/components/MainComponents/MediaMessage.js.map +1 -1
  19. package/lib/commonjs/components/MainComponents/MessageContainer.js +5 -1
  20. package/lib/commonjs/components/MainComponents/MessageContainer.js.map +1 -1
  21. package/lib/commonjs/components/MainComponents/MessageList.js +13 -5
  22. package/lib/commonjs/components/MainComponents/MessageList.js.map +1 -1
  23. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js +14 -13
  24. package/lib/commonjs/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  25. package/lib/commonjs/components/MainComponents/RoomList.js +208 -35
  26. package/lib/commonjs/components/MainComponents/RoomList.js.map +1 -1
  27. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js +317 -98
  28. package/lib/commonjs/components/Menu/HeaderRoomListMenu.js.map +1 -1
  29. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js +322 -110
  30. package/lib/commonjs/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  31. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js +546 -203
  32. package/lib/commonjs/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  33. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js +226 -0
  34. package/lib/commonjs/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
  35. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js +69 -27
  36. package/lib/commonjs/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  37. package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js +2 -1
  38. package/lib/commonjs/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
  39. package/lib/commonjs/components/Modals/Modal/Modal.js +8 -0
  40. package/lib/commonjs/components/Modals/Modal/Modal.js.map +1 -1
  41. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js +2 -1
  42. package/lib/commonjs/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  43. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js +202 -106
  44. package/lib/commonjs/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  45. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
  46. package/lib/commonjs/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  47. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js +563 -0
  48. package/lib/commonjs/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
  49. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js +210 -0
  50. package/lib/commonjs/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
  51. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
  52. package/lib/commonjs/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  53. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js +7 -21
  54. package/lib/commonjs/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  55. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js +507 -244
  56. package/lib/commonjs/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  57. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js +74 -46
  58. package/lib/commonjs/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  59. package/lib/commonjs/components/Modals/styledModalComponents.js +9 -2
  60. package/lib/commonjs/components/Modals/styledModalComponents.js.map +1 -1
  61. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js +21 -7
  62. package/lib/commonjs/components/RoomComponents/ChatRoomItem.js.map +1 -1
  63. package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js +22 -3
  64. package/lib/commonjs/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
  65. package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js +17 -3
  66. package/lib/commonjs/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
  67. package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js +17 -3
  68. package/lib/commonjs/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
  69. package/lib/commonjs/components/VideoCalls/VideoCallSession.js +6 -3
  70. package/lib/commonjs/components/VideoCalls/VideoCallSession.js.map +1 -1
  71. package/lib/commonjs/components/styled/AudioMessage.js +2 -1
  72. package/lib/commonjs/components/styled/AudioMessage.js.map +1 -1
  73. package/lib/commonjs/components/styled/MessageImage.js +37 -9
  74. package/lib/commonjs/components/styled/MessageImage.js.map +1 -1
  75. package/lib/commonjs/components/styled/SendInput.js +80 -11
  76. package/lib/commonjs/components/styled/SendInput.js.map +1 -1
  77. package/lib/commonjs/components/styled/StyledComponents.js +9 -3
  78. package/lib/commonjs/components/styled/StyledComponents.js.map +1 -1
  79. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
  80. package/lib/commonjs/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  81. package/lib/commonjs/components/styled/UnsupportedType.js +14 -4
  82. package/lib/commonjs/components/styled/UnsupportedType.js.map +1 -1
  83. package/lib/commonjs/components/styled/VideoMessage.js +119 -61
  84. package/lib/commonjs/components/styled/VideoMessage.js.map +1 -1
  85. package/lib/commonjs/context/xmppProvider.js +184 -59
  86. package/lib/commonjs/context/xmppProvider.js.map +1 -1
  87. package/lib/commonjs/helpers/createMessageFromXml.js +19 -1
  88. package/lib/commonjs/helpers/createMessageFromXml.js.map +1 -1
  89. package/lib/commonjs/helpers/ensureScopedChatCache.js +2 -2
  90. package/lib/commonjs/helpers/ensureScopedChatCache.js.map +1 -1
  91. package/lib/commonjs/helpers/getChatBackground.js +23 -0
  92. package/lib/commonjs/helpers/getChatBackground.js.map +1 -0
  93. package/lib/commonjs/helpers/getDisplayFileName.js +79 -0
  94. package/lib/commonjs/helpers/getDisplayFileName.js.map +1 -0
  95. package/lib/commonjs/helpers/getServerReadTimestamp.js +188 -0
  96. package/lib/commonjs/helpers/getServerReadTimestamp.js.map +1 -0
  97. package/lib/commonjs/helpers/historyPreloadScheduler.js +65 -2
  98. package/lib/commonjs/helpers/historyPreloadScheduler.js.map +1 -1
  99. package/lib/commonjs/helpers/initXmppRooms.js +14 -8
  100. package/lib/commonjs/helpers/initXmppRooms.js.map +1 -1
  101. package/lib/commonjs/helpers/insertMessageWithDelimiter.js +51 -9
  102. package/lib/commonjs/helpers/insertMessageWithDelimiter.js.map +1 -1
  103. package/lib/commonjs/helpers/isOwnMessage.js +75 -0
  104. package/lib/commonjs/helpers/isOwnMessage.js.map +1 -0
  105. package/lib/commonjs/helpers/keyboardLayout.js +12 -2
  106. package/lib/commonjs/helpers/keyboardLayout.js.map +1 -1
  107. package/lib/commonjs/helpers/mediaLibraryRuntime.js +31 -0
  108. package/lib/commonjs/helpers/mediaLibraryRuntime.js.map +1 -0
  109. package/lib/commonjs/helpers/mimeToExtension.js +6 -14
  110. package/lib/commonjs/helpers/mimeToExtension.js.map +1 -1
  111. package/lib/commonjs/helpers/msgSortableMs.js +37 -0
  112. package/lib/commonjs/helpers/msgSortableMs.js.map +1 -0
  113. package/lib/commonjs/helpers/persistCrypto.js +122 -0
  114. package/lib/commonjs/helpers/persistCrypto.js.map +1 -0
  115. package/lib/commonjs/helpers/pickImageAsset.js +68 -0
  116. package/lib/commonjs/helpers/pickImageAsset.js.map +1 -0
  117. package/lib/commonjs/helpers/pushPayload.js +71 -0
  118. package/lib/commonjs/helpers/pushPayload.js.map +1 -0
  119. package/lib/commonjs/helpers/resolveInitBeforeLoadUser.js +130 -17
  120. package/lib/commonjs/helpers/resolveInitBeforeLoadUser.js.map +1 -1
  121. package/lib/commonjs/helpers/secureFileUrl.js +101 -0
  122. package/lib/commonjs/helpers/secureFileUrl.js.map +1 -0
  123. package/lib/commonjs/helpers/secureKeyValue.js +83 -0
  124. package/lib/commonjs/helpers/secureKeyValue.js.map +1 -0
  125. package/lib/commonjs/helpers/secureStoreRuntime.js +59 -0
  126. package/lib/commonjs/helpers/secureStoreRuntime.js.map +1 -0
  127. package/lib/commonjs/helpers/secureUserStorage.js +75 -0
  128. package/lib/commonjs/helpers/secureUserStorage.js.map +1 -0
  129. package/lib/commonjs/helpers/shallowEqual.js +36 -0
  130. package/lib/commonjs/helpers/shallowEqual.js.map +1 -0
  131. package/lib/commonjs/helpers/sheetGestures.js +32 -0
  132. package/lib/commonjs/helpers/sheetGestures.js.map +1 -0
  133. package/lib/commonjs/hooks/useChatRoomFocus.js +45 -12
  134. package/lib/commonjs/hooks/useChatRoomFocus.js.map +1 -1
  135. package/lib/commonjs/hooks/useChatWrapperInit.js +30 -10
  136. package/lib/commonjs/hooks/useChatWrapperInit.js.map +1 -1
  137. package/lib/commonjs/hooks/useComposing.js +27 -0
  138. package/lib/commonjs/hooks/useComposing.js.map +1 -1
  139. package/lib/commonjs/hooks/useFileToken.js +10 -0
  140. package/lib/commonjs/hooks/useFileToken.js.map +1 -0
  141. package/lib/commonjs/hooks/useLogout.js +23 -7
  142. package/lib/commonjs/hooks/useLogout.js.map +1 -1
  143. package/lib/commonjs/hooks/usePendingNotification.js +8 -11
  144. package/lib/commonjs/hooks/usePendingNotification.js.map +1 -1
  145. package/lib/commonjs/hooks/useSendMessage.js +50 -14
  146. package/lib/commonjs/hooks/useSendMessage.js.map +1 -1
  147. package/lib/commonjs/hooks/useUnreadMessagesCounter.js +6 -1
  148. package/lib/commonjs/hooks/useUnreadMessagesCounter.js.map +1 -1
  149. package/lib/commonjs/i18n/strings.js +145 -37
  150. package/lib/commonjs/i18n/strings.js.map +1 -1
  151. package/lib/commonjs/main.js +44 -0
  152. package/lib/commonjs/main.js.map +1 -1
  153. package/lib/commonjs/networking/api-requests/auth.api.js +134 -60
  154. package/lib/commonjs/networking/api-requests/auth.api.js.map +1 -1
  155. package/lib/commonjs/networking/api-requests/roomMembers.api.js +1 -1
  156. package/lib/commonjs/networking/api-requests/roomMembers.api.js.map +1 -1
  157. package/lib/commonjs/networking/api-requests/rooms.api.js +9 -9
  158. package/lib/commonjs/networking/api-requests/rooms.api.js.map +1 -1
  159. package/lib/commonjs/networking/api-requests/user.api.js +68 -9
  160. package/lib/commonjs/networking/api-requests/user.api.js.map +1 -1
  161. package/lib/commonjs/networking/apiClient.js +62 -112
  162. package/lib/commonjs/networking/apiClient.js.map +1 -1
  163. package/lib/commonjs/networking/authRefresh.js +332 -0
  164. package/lib/commonjs/networking/authRefresh.js.map +1 -0
  165. package/lib/commonjs/networking/stanzaHandlers.js +41 -28
  166. package/lib/commonjs/networking/stanzaHandlers.js.map +1 -1
  167. package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js +46 -8
  168. package/lib/commonjs/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
  169. package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js +8 -1
  170. package/lib/commonjs/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
  171. package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
  172. package/lib/commonjs/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
  173. package/lib/commonjs/networking/xmppClient.js +124 -8
  174. package/lib/commonjs/networking/xmppClient.js.map +1 -1
  175. package/lib/commonjs/roomStore/chatSettingsSlice.js +26 -7
  176. package/lib/commonjs/roomStore/chatSettingsSlice.js.map +1 -1
  177. package/lib/commonjs/roomStore/index.js +35 -2
  178. package/lib/commonjs/roomStore/index.js.map +1 -1
  179. package/lib/commonjs/roomStore/persistence.js +226 -23
  180. package/lib/commonjs/roomStore/persistence.js.map +1 -1
  181. package/lib/commonjs/roomStore/roomsSlice.js +151 -38
  182. package/lib/commonjs/roomStore/roomsSlice.js.map +1 -1
  183. package/lib/commonjs/services/pushSubscriptionService.js +15 -13
  184. package/lib/commonjs/services/pushSubscriptionService.js.map +1 -1
  185. package/lib/commonjs/version.js +1 -1
  186. package/lib/module/assets/icons.js +6 -1
  187. package/lib/module/assets/icons.js.map +1 -1
  188. package/lib/module/components/AuthForms/Login.js +4 -4
  189. package/lib/module/components/AuthForms/Login.js.map +1 -1
  190. package/lib/module/components/Header/HeaderRoomList.js +29 -8
  191. package/lib/module/components/Header/HeaderRoomList.js.map +1 -1
  192. package/lib/module/components/MainComponents/ChatHeader.js +9 -3
  193. package/lib/module/components/MainComponents/ChatHeader.js.map +1 -1
  194. package/lib/module/components/MainComponents/ChatRoom.js +152 -16
  195. package/lib/module/components/MainComponents/ChatRoom.js.map +1 -1
  196. package/lib/module/components/MainComponents/ChatWrapper.js +35 -14
  197. package/lib/module/components/MainComponents/ChatWrapper.js.map +1 -1
  198. package/lib/module/components/MainComponents/LoginWrapper.js +2 -1
  199. package/lib/module/components/MainComponents/LoginWrapper.js.map +1 -1
  200. package/lib/module/components/MainComponents/MediaMessage.js +30 -10
  201. package/lib/module/components/MainComponents/MediaMessage.js.map +1 -1
  202. package/lib/module/components/MainComponents/MessageContainer.js +5 -1
  203. package/lib/module/components/MainComponents/MessageContainer.js.map +1 -1
  204. package/lib/module/components/MainComponents/MessageList.js +13 -5
  205. package/lib/module/components/MainComponents/MessageList.js.map +1 -1
  206. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js +14 -13
  207. package/lib/module/components/MainComponents/ProfileImagePlaceholder.js.map +1 -1
  208. package/lib/module/components/MainComponents/RoomList.js +207 -35
  209. package/lib/module/components/MainComponents/RoomList.js.map +1 -1
  210. package/lib/module/components/Menu/HeaderRoomListMenu.js +319 -101
  211. package/lib/module/components/Menu/HeaderRoomListMenu.js.map +1 -1
  212. package/lib/module/components/Modals/AttachSheet/AttachSheet.js +313 -113
  213. package/lib/module/components/Modals/AttachSheet/AttachSheet.js.map +1 -1
  214. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js +549 -207
  215. package/lib/module/components/Modals/ChatProfileModal/ChatProfileModal.js.map +1 -1
  216. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js +223 -0
  217. package/lib/module/components/Modals/ChatProfileModal/ReportChatModal.js.map +1 -0
  218. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js +70 -28
  219. package/lib/module/components/Modals/FilePreviewModal/FilePreviewModal.js.map +1 -1
  220. package/lib/module/components/Modals/FilePreviewModal/PdfView.js +2 -1
  221. package/lib/module/components/Modals/FilePreviewModal/PdfView.js.map +1 -1
  222. package/lib/module/components/Modals/Modal/Modal.js +9 -1
  223. package/lib/module/components/Modals/Modal/Modal.js.map +1 -1
  224. package/lib/module/components/Modals/NewChatModal/ModalContent.js +2 -1
  225. package/lib/module/components/Modals/NewChatModal/ModalContent.js.map +1 -1
  226. package/lib/module/components/Modals/NewChatModal/NewChatModal.js +205 -108
  227. package/lib/module/components/Modals/NewChatModal/NewChatModal.js.map +1 -1
  228. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js +8 -0
  229. package/lib/module/components/Modals/NewChatModal/UpdNewChatModal.js.map +1 -1
  230. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js +555 -0
  231. package/lib/module/components/Modals/ProfileHeader/ProfileHeader.js.map +1 -0
  232. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js +205 -0
  233. package/lib/module/components/Modals/ProfileHeader/ProfileMenu.js.map +1 -0
  234. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js +4 -2
  235. package/lib/module/components/Modals/SelectUsersModal/SelectUsersModal.js.map +1 -1
  236. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js +9 -23
  237. package/lib/module/components/Modals/UserProfileModal/EditUserModal.js.map +1 -1
  238. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js +509 -248
  239. package/lib/module/components/Modals/UserProfileModal/UserProfileModal.js.map +1 -1
  240. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js +76 -48
  241. package/lib/module/components/Modals/UserSettingsModal/UserSettingsModal.js.map +1 -1
  242. package/lib/module/components/Modals/styledModalComponents.js +9 -2
  243. package/lib/module/components/Modals/styledModalComponents.js.map +1 -1
  244. package/lib/module/components/RoomComponents/ChatRoomItem.js +21 -7
  245. package/lib/module/components/RoomComponents/ChatRoomItem.js.map +1 -1
  246. package/lib/module/components/RoomComponents/styled/LastMessageFile.js +22 -3
  247. package/lib/module/components/RoomComponents/styled/LastMessageFile.js.map +1 -1
  248. package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js +17 -3
  249. package/lib/module/components/RoomComponents/styled/LastMessagePhoto.js.map +1 -1
  250. package/lib/module/components/RoomComponents/styled/LastMessageVideo.js +17 -3
  251. package/lib/module/components/RoomComponents/styled/LastMessageVideo.js.map +1 -1
  252. package/lib/module/components/VideoCalls/VideoCallSession.js +6 -3
  253. package/lib/module/components/VideoCalls/VideoCallSession.js.map +1 -1
  254. package/lib/module/components/styled/AudioMessage.js +2 -1
  255. package/lib/module/components/styled/AudioMessage.js.map +1 -1
  256. package/lib/module/components/styled/MessageImage.js +37 -9
  257. package/lib/module/components/styled/MessageImage.js.map +1 -1
  258. package/lib/module/components/styled/SendInput.js +81 -12
  259. package/lib/module/components/styled/SendInput.js.map +1 -1
  260. package/lib/module/components/styled/StyledComponents.js +9 -3
  261. package/lib/module/components/styled/StyledComponents.js.map +1 -1
  262. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js +11 -4
  263. package/lib/module/components/styled/StyledInputComponents/StyledInputComponents.js.map +1 -1
  264. package/lib/module/components/styled/UnsupportedType.js +14 -4
  265. package/lib/module/components/styled/UnsupportedType.js.map +1 -1
  266. package/lib/module/components/styled/VideoMessage.js +120 -62
  267. package/lib/module/components/styled/VideoMessage.js.map +1 -1
  268. package/lib/module/context/xmppProvider.js +184 -60
  269. package/lib/module/context/xmppProvider.js.map +1 -1
  270. package/lib/module/helpers/createMessageFromXml.js +19 -1
  271. package/lib/module/helpers/createMessageFromXml.js.map +1 -1
  272. package/lib/module/helpers/ensureScopedChatCache.js +2 -2
  273. package/lib/module/helpers/ensureScopedChatCache.js.map +1 -1
  274. package/lib/module/helpers/getChatBackground.js +18 -0
  275. package/lib/module/helpers/getChatBackground.js.map +1 -0
  276. package/lib/module/helpers/getDisplayFileName.js +73 -0
  277. package/lib/module/helpers/getDisplayFileName.js.map +1 -0
  278. package/lib/module/helpers/getServerReadTimestamp.js +181 -0
  279. package/lib/module/helpers/getServerReadTimestamp.js.map +1 -0
  280. package/lib/module/helpers/historyPreloadScheduler.js +66 -3
  281. package/lib/module/helpers/historyPreloadScheduler.js.map +1 -1
  282. package/lib/module/helpers/initXmppRooms.js +14 -8
  283. package/lib/module/helpers/initXmppRooms.js.map +1 -1
  284. package/lib/module/helpers/insertMessageWithDelimiter.js +52 -9
  285. package/lib/module/helpers/insertMessageWithDelimiter.js.map +1 -1
  286. package/lib/module/helpers/isOwnMessage.js +70 -0
  287. package/lib/module/helpers/isOwnMessage.js.map +1 -0
  288. package/lib/module/helpers/keyboardLayout.js +12 -2
  289. package/lib/module/helpers/keyboardLayout.js.map +1 -1
  290. package/lib/module/helpers/mediaLibraryRuntime.js +25 -0
  291. package/lib/module/helpers/mediaLibraryRuntime.js.map +1 -0
  292. package/lib/module/helpers/mimeToExtension.js +6 -13
  293. package/lib/module/helpers/mimeToExtension.js.map +1 -1
  294. package/lib/module/helpers/msgSortableMs.js +32 -0
  295. package/lib/module/helpers/msgSortableMs.js.map +1 -0
  296. package/lib/module/helpers/persistCrypto.js +115 -0
  297. package/lib/module/helpers/persistCrypto.js.map +1 -0
  298. package/lib/module/helpers/pickImageAsset.js +63 -0
  299. package/lib/module/helpers/pickImageAsset.js.map +1 -0
  300. package/lib/module/helpers/pushPayload.js +63 -0
  301. package/lib/module/helpers/pushPayload.js.map +1 -0
  302. package/lib/module/helpers/resolveInitBeforeLoadUser.js +130 -16
  303. package/lib/module/helpers/resolveInitBeforeLoadUser.js.map +1 -1
  304. package/lib/module/helpers/secureFileUrl.js +91 -0
  305. package/lib/module/helpers/secureFileUrl.js.map +1 -0
  306. package/lib/module/helpers/secureKeyValue.js +75 -0
  307. package/lib/module/helpers/secureKeyValue.js.map +1 -0
  308. package/lib/module/helpers/secureStoreRuntime.js +52 -0
  309. package/lib/module/helpers/secureStoreRuntime.js.map +1 -0
  310. package/lib/module/helpers/secureUserStorage.js +72 -0
  311. package/lib/module/helpers/secureUserStorage.js.map +1 -0
  312. package/lib/module/helpers/shallowEqual.js +31 -0
  313. package/lib/module/helpers/shallowEqual.js.map +1 -0
  314. package/lib/module/helpers/sheetGestures.js +26 -0
  315. package/lib/module/helpers/sheetGestures.js.map +1 -0
  316. package/lib/module/hooks/useChatRoomFocus.js +46 -13
  317. package/lib/module/hooks/useChatRoomFocus.js.map +1 -1
  318. package/lib/module/hooks/useChatWrapperInit.js +30 -10
  319. package/lib/module/hooks/useChatWrapperInit.js.map +1 -1
  320. package/lib/module/hooks/useComposing.js +28 -1
  321. package/lib/module/hooks/useComposing.js.map +1 -1
  322. package/lib/module/hooks/useFileToken.js +5 -0
  323. package/lib/module/hooks/useFileToken.js.map +1 -0
  324. package/lib/module/hooks/useLogout.js +23 -7
  325. package/lib/module/hooks/useLogout.js.map +1 -1
  326. package/lib/module/hooks/usePendingNotification.js +8 -11
  327. package/lib/module/hooks/usePendingNotification.js.map +1 -1
  328. package/lib/module/hooks/useSendMessage.js +52 -16
  329. package/lib/module/hooks/useSendMessage.js.map +1 -1
  330. package/lib/module/hooks/useUnreadMessagesCounter.js +6 -1
  331. package/lib/module/hooks/useUnreadMessagesCounter.js.map +1 -1
  332. package/lib/module/i18n/strings.js +145 -37
  333. package/lib/module/i18n/strings.js.map +1 -1
  334. package/lib/module/main.js +14 -2
  335. package/lib/module/main.js.map +1 -1
  336. package/lib/module/networking/api-requests/auth.api.js +131 -59
  337. package/lib/module/networking/api-requests/auth.api.js.map +1 -1
  338. package/lib/module/networking/api-requests/roomMembers.api.js +1 -1
  339. package/lib/module/networking/api-requests/roomMembers.api.js.map +1 -1
  340. package/lib/module/networking/api-requests/rooms.api.js +9 -9
  341. package/lib/module/networking/api-requests/rooms.api.js.map +1 -1
  342. package/lib/module/networking/api-requests/user.api.js +64 -7
  343. package/lib/module/networking/api-requests/user.api.js.map +1 -1
  344. package/lib/module/networking/apiClient.js +61 -113
  345. package/lib/module/networking/apiClient.js.map +1 -1
  346. package/lib/module/networking/authRefresh.js +321 -0
  347. package/lib/module/networking/authRefresh.js.map +1 -0
  348. package/lib/module/networking/stanzaHandlers.js +41 -28
  349. package/lib/module/networking/stanzaHandlers.js.map +1 -1
  350. package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js +46 -8
  351. package/lib/module/networking/xmpp/flushLastViewedToPrivateStore.js.map +1 -1
  352. package/lib/module/networking/xmpp/presenceInRoom.xmpp.js +8 -1
  353. package/lib/module/networking/xmpp/presenceInRoom.xmpp.js.map +1 -1
  354. package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js +5 -1
  355. package/lib/module/networking/xmpp/subscribeToRoomMessages.xmpp.js.map +1 -1
  356. package/lib/module/networking/xmppClient.js +124 -8
  357. package/lib/module/networking/xmppClient.js.map +1 -1
  358. package/lib/module/roomStore/chatSettingsSlice.js +26 -7
  359. package/lib/module/roomStore/chatSettingsSlice.js.map +1 -1
  360. package/lib/module/roomStore/index.js +37 -4
  361. package/lib/module/roomStore/index.js.map +1 -1
  362. package/lib/module/roomStore/persistence.js +223 -22
  363. package/lib/module/roomStore/persistence.js.map +1 -1
  364. package/lib/module/roomStore/roomsSlice.js +139 -34
  365. package/lib/module/roomStore/roomsSlice.js.map +1 -1
  366. package/lib/module/services/pushSubscriptionService.js +15 -13
  367. package/lib/module/services/pushSubscriptionService.js.map +1 -1
  368. package/lib/module/version.js +1 -1
  369. package/lib/typescript/assets/icons.d.ts +16 -0
  370. package/lib/typescript/assets/icons.d.ts.map +1 -1
  371. package/lib/typescript/components/AuthForms/Login.d.ts.map +1 -1
  372. package/lib/typescript/components/Header/HeaderRoomList.d.ts.map +1 -1
  373. package/lib/typescript/components/MainComponents/ChatHeader.d.ts.map +1 -1
  374. package/lib/typescript/components/MainComponents/ChatRoom.d.ts.map +1 -1
  375. package/lib/typescript/components/MainComponents/ChatWrapper.d.ts.map +1 -1
  376. package/lib/typescript/components/MainComponents/LoginWrapper.d.ts.map +1 -1
  377. package/lib/typescript/components/MainComponents/MediaMessage.d.ts.map +1 -1
  378. package/lib/typescript/components/MainComponents/MessageContainer.d.ts.map +1 -1
  379. package/lib/typescript/components/MainComponents/MessageList.d.ts +10 -1
  380. package/lib/typescript/components/MainComponents/MessageList.d.ts.map +1 -1
  381. package/lib/typescript/components/MainComponents/ProfileImagePlaceholder.d.ts.map +1 -1
  382. package/lib/typescript/components/MainComponents/RoomList.d.ts +7 -0
  383. package/lib/typescript/components/MainComponents/RoomList.d.ts.map +1 -1
  384. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts +3 -0
  385. package/lib/typescript/components/Menu/HeaderRoomListMenu.d.ts.map +1 -1
  386. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts +9 -0
  387. package/lib/typescript/components/Modals/AttachSheet/AttachSheet.d.ts.map +1 -1
  388. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts +10 -0
  389. package/lib/typescript/components/Modals/ChatProfileModal/ChatProfileModal.d.ts.map +1 -1
  390. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts +9 -0
  391. package/lib/typescript/components/Modals/ChatProfileModal/ReportChatModal.d.ts.map +1 -0
  392. package/lib/typescript/components/Modals/FilePreviewModal/FilePreviewModal.d.ts.map +1 -1
  393. package/lib/typescript/components/Modals/FilePreviewModal/PdfView.d.ts.map +1 -1
  394. package/lib/typescript/components/Modals/Modal/Modal.d.ts.map +1 -1
  395. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts +4 -2
  396. package/lib/typescript/components/Modals/NewChatModal/ModalContent.d.ts.map +1 -1
  397. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts +1 -1
  398. package/lib/typescript/components/Modals/NewChatModal/NewChatModal.d.ts.map +1 -1
  399. package/lib/typescript/components/Modals/NewChatModal/UpdNewChatModal.d.ts.map +1 -1
  400. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts +75 -0
  401. package/lib/typescript/components/Modals/ProfileHeader/ProfileHeader.d.ts.map +1 -0
  402. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts +25 -0
  403. package/lib/typescript/components/Modals/ProfileHeader/ProfileMenu.d.ts.map +1 -0
  404. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts +6 -1
  405. package/lib/typescript/components/Modals/SelectUsersModal/SelectUsersModal.d.ts.map +1 -1
  406. package/lib/typescript/components/Modals/UserProfileModal/EditUserModal.d.ts.map +1 -1
  407. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts +16 -0
  408. package/lib/typescript/components/Modals/UserProfileModal/UserProfileModal.d.ts.map +1 -1
  409. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts +1 -0
  410. package/lib/typescript/components/Modals/UserSettingsModal/UserSettingsModal.d.ts.map +1 -1
  411. package/lib/typescript/components/Modals/styledModalComponents.d.ts.map +1 -1
  412. package/lib/typescript/components/RoomComponents/ChatRoomItem.d.ts.map +1 -1
  413. package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts +1 -1
  414. package/lib/typescript/components/RoomComponents/styled/LastMessageFile.d.ts.map +1 -1
  415. package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts +1 -1
  416. package/lib/typescript/components/RoomComponents/styled/LastMessagePhoto.d.ts.map +1 -1
  417. package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts +1 -1
  418. package/lib/typescript/components/RoomComponents/styled/LastMessageVideo.d.ts.map +1 -1
  419. package/lib/typescript/components/VideoCalls/VideoCallSession.d.ts.map +1 -1
  420. package/lib/typescript/components/styled/AudioMessage.d.ts.map +1 -1
  421. package/lib/typescript/components/styled/MessageImage.d.ts +14 -0
  422. package/lib/typescript/components/styled/MessageImage.d.ts.map +1 -1
  423. package/lib/typescript/components/styled/SendInput.d.ts.map +1 -1
  424. package/lib/typescript/components/styled/StyledComponents.d.ts.map +1 -1
  425. package/lib/typescript/components/styled/StyledInputComponents/StyledInputComponents.d.ts.map +1 -1
  426. package/lib/typescript/components/styled/UnsupportedType.d.ts.map +1 -1
  427. package/lib/typescript/components/styled/VideoMessage.d.ts +8 -0
  428. package/lib/typescript/components/styled/VideoMessage.d.ts.map +1 -1
  429. package/lib/typescript/context/xmppProvider.d.ts.map +1 -1
  430. package/lib/typescript/helpers/createMessageFromXml.d.ts.map +1 -1
  431. package/lib/typescript/helpers/getChatBackground.d.ts +15 -0
  432. package/lib/typescript/helpers/getChatBackground.d.ts.map +1 -0
  433. package/lib/typescript/helpers/getDisplayFileName.d.ts +49 -0
  434. package/lib/typescript/helpers/getDisplayFileName.d.ts.map +1 -0
  435. package/lib/typescript/helpers/getServerReadTimestamp.d.ts +108 -0
  436. package/lib/typescript/helpers/getServerReadTimestamp.d.ts.map +1 -0
  437. package/lib/typescript/helpers/historyPreloadScheduler.d.ts.map +1 -1
  438. package/lib/typescript/helpers/initXmppRooms.d.ts.map +1 -1
  439. package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts +1 -1
  440. package/lib/typescript/helpers/insertMessageWithDelimiter.d.ts.map +1 -1
  441. package/lib/typescript/helpers/isOwnMessage.d.ts +36 -0
  442. package/lib/typescript/helpers/isOwnMessage.d.ts.map +1 -0
  443. package/lib/typescript/helpers/keyboardLayout.d.ts +5 -1
  444. package/lib/typescript/helpers/keyboardLayout.d.ts.map +1 -1
  445. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts +3 -0
  446. package/lib/typescript/helpers/mediaLibraryRuntime.d.ts.map +1 -0
  447. package/lib/typescript/helpers/mimeToExtension.d.ts +0 -15
  448. package/lib/typescript/helpers/mimeToExtension.d.ts.map +1 -1
  449. package/lib/typescript/helpers/msgSortableMs.d.ts +2 -0
  450. package/lib/typescript/helpers/msgSortableMs.d.ts.map +1 -0
  451. package/lib/typescript/helpers/persistCrypto.d.ts +13 -0
  452. package/lib/typescript/helpers/persistCrypto.d.ts.map +1 -0
  453. package/lib/typescript/helpers/pickImageAsset.d.ts +27 -0
  454. package/lib/typescript/helpers/pickImageAsset.d.ts.map +1 -0
  455. package/lib/typescript/helpers/pushPayload.d.ts +7 -0
  456. package/lib/typescript/helpers/pushPayload.d.ts.map +1 -0
  457. package/lib/typescript/helpers/resolveInitBeforeLoadUser.d.ts.map +1 -1
  458. package/lib/typescript/helpers/secureFileUrl.d.ts +7 -0
  459. package/lib/typescript/helpers/secureFileUrl.d.ts.map +1 -0
  460. package/lib/typescript/helpers/secureKeyValue.d.ts +13 -0
  461. package/lib/typescript/helpers/secureKeyValue.d.ts.map +1 -0
  462. package/lib/typescript/helpers/secureStoreRuntime.d.ts +29 -0
  463. package/lib/typescript/helpers/secureStoreRuntime.d.ts.map +1 -0
  464. package/lib/typescript/helpers/secureUserStorage.d.ts +23 -0
  465. package/lib/typescript/helpers/secureUserStorage.d.ts.map +1 -0
  466. package/lib/typescript/helpers/shallowEqual.d.ts +11 -0
  467. package/lib/typescript/helpers/shallowEqual.d.ts.map +1 -0
  468. package/lib/typescript/helpers/sheetGestures.d.ts +20 -0
  469. package/lib/typescript/helpers/sheetGestures.d.ts.map +1 -0
  470. package/lib/typescript/hooks/useChatRoomFocus.d.ts +4 -1
  471. package/lib/typescript/hooks/useChatRoomFocus.d.ts.map +1 -1
  472. package/lib/typescript/hooks/useChatWrapperInit.d.ts.map +1 -1
  473. package/lib/typescript/hooks/useComposing.d.ts.map +1 -1
  474. package/lib/typescript/hooks/useFileToken.d.ts +2 -0
  475. package/lib/typescript/hooks/useFileToken.d.ts.map +1 -0
  476. package/lib/typescript/hooks/useLogout.d.ts.map +1 -1
  477. package/lib/typescript/hooks/usePendingNotification.d.ts.map +1 -1
  478. package/lib/typescript/hooks/useSendMessage.d.ts.map +1 -1
  479. package/lib/typescript/hooks/useUnreadMessagesCounter.d.ts +1 -0
  480. package/lib/typescript/hooks/useUnreadMessagesCounter.d.ts.map +1 -1
  481. package/lib/typescript/i18n/strings.d.ts.map +1 -1
  482. package/lib/typescript/main.d.ts +9 -2
  483. package/lib/typescript/main.d.ts.map +1 -1
  484. package/lib/typescript/networking/api-requests/auth.api.d.ts +3 -1
  485. package/lib/typescript/networking/api-requests/auth.api.d.ts.map +1 -1
  486. package/lib/typescript/networking/api-requests/user.api.d.ts +27 -0
  487. package/lib/typescript/networking/api-requests/user.api.d.ts.map +1 -1
  488. package/lib/typescript/networking/apiClient.d.ts +12 -6
  489. package/lib/typescript/networking/apiClient.d.ts.map +1 -1
  490. package/lib/typescript/networking/authRefresh.d.ts +95 -0
  491. package/lib/typescript/networking/authRefresh.d.ts.map +1 -0
  492. package/lib/typescript/networking/stanzaHandlers.d.ts.map +1 -1
  493. package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts +10 -2
  494. package/lib/typescript/networking/xmpp/flushLastViewedToPrivateStore.d.ts.map +1 -1
  495. package/lib/typescript/networking/xmpp/presenceInRoom.xmpp.d.ts.map +1 -1
  496. package/lib/typescript/networking/xmpp/subscribeToRoomMessages.xmpp.d.ts.map +1 -1
  497. package/lib/typescript/networking/xmppClient.d.ts +14 -0
  498. package/lib/typescript/networking/xmppClient.d.ts.map +1 -1
  499. package/lib/typescript/roomStore/chatSettingsSlice.d.ts +16 -0
  500. package/lib/typescript/roomStore/chatSettingsSlice.d.ts.map +1 -1
  501. package/lib/typescript/roomStore/index.d.ts.map +1 -1
  502. package/lib/typescript/roomStore/persistence.d.ts +18 -1
  503. package/lib/typescript/roomStore/persistence.d.ts.map +1 -1
  504. package/lib/typescript/roomStore/roomsSlice.d.ts +43 -3
  505. package/lib/typescript/roomStore/roomsSlice.d.ts.map +1 -1
  506. package/lib/typescript/services/pushSubscriptionService.d.ts +1 -1
  507. package/lib/typescript/services/pushSubscriptionService.d.ts.map +1 -1
  508. package/lib/typescript/types/types.d.ts +50 -5
  509. package/lib/typescript/types/types.d.ts.map +1 -1
  510. package/lib/typescript/version.d.ts +1 -1
  511. package/package.json +41 -28
  512. package/src/assets/icons.tsx +48 -9
  513. package/src/components/AuthForms/Login.tsx +3 -3
  514. package/src/components/Header/HeaderRoomList.tsx +29 -7
  515. package/src/components/MainComponents/ChatHeader.tsx +9 -3
  516. package/src/components/MainComponents/ChatRoom.tsx +161 -15
  517. package/src/components/MainComponents/ChatWrapper.tsx +36 -20
  518. package/src/components/MainComponents/LoginWrapper.tsx +1 -0
  519. package/src/components/MainComponents/MediaMessage.tsx +26 -8
  520. package/src/components/MainComponents/MessageContainer.tsx +5 -1
  521. package/src/components/MainComponents/MessageList.tsx +23 -4
  522. package/src/components/MainComponents/ProfileImagePlaceholder.tsx +21 -14
  523. package/src/components/MainComponents/RoomList.tsx +236 -39
  524. package/src/components/Menu/HeaderRoomListMenu.tsx +328 -75
  525. package/src/components/Modals/AttachSheet/AttachSheet.tsx +333 -97
  526. package/src/components/Modals/ChatProfileModal/ChatProfileModal.tsx +600 -282
  527. package/src/components/Modals/ChatProfileModal/ReportChatModal.tsx +244 -0
  528. package/src/components/Modals/FilePreviewModal/FilePreviewModal.tsx +79 -38
  529. package/src/components/Modals/FilePreviewModal/PdfView.tsx +2 -1
  530. package/src/components/Modals/Modal/Modal.tsx +7 -0
  531. package/src/components/Modals/NewChatModal/ModalContent.tsx +6 -3
  532. package/src/components/Modals/NewChatModal/NewChatModal.tsx +219 -119
  533. package/src/components/Modals/NewChatModal/UpdNewChatModal.tsx +12 -1
  534. package/src/components/Modals/ProfileHeader/ProfileHeader.tsx +624 -0
  535. package/src/components/Modals/ProfileHeader/ProfileMenu.tsx +217 -0
  536. package/src/components/Modals/SelectUsersModal/SelectUsersModal.tsx +14 -4
  537. package/src/components/Modals/UserProfileModal/EditUserModal.tsx +9 -25
  538. package/src/components/Modals/UserProfileModal/UserProfileModal.tsx +617 -307
  539. package/src/components/Modals/UserSettingsModal/UserSettingsModal.tsx +75 -58
  540. package/src/components/Modals/styledModalComponents.tsx +9 -2
  541. package/src/components/RoomComponents/ChatRoomItem.tsx +18 -3
  542. package/src/components/RoomComponents/styled/LastMessageFile.tsx +28 -4
  543. package/src/components/RoomComponents/styled/LastMessagePhoto.tsx +18 -3
  544. package/src/components/RoomComponents/styled/LastMessageVideo.tsx +18 -3
  545. package/src/components/VideoCalls/VideoCallSession.tsx +8 -3
  546. package/src/components/styled/AudioMessage.tsx +2 -1
  547. package/src/components/styled/MessageImage.tsx +53 -7
  548. package/src/components/styled/SendInput.tsx +83 -12
  549. package/src/components/styled/StyledComponents.ts +9 -3
  550. package/src/components/styled/StyledInputComponents/StyledInputComponents.tsx +11 -4
  551. package/src/components/styled/UnsupportedType.tsx +14 -4
  552. package/src/components/styled/VideoMessage.tsx +131 -54
  553. package/src/context/xmppProvider.tsx +216 -57
  554. package/src/helpers/createMessageFromXml.ts +20 -1
  555. package/src/helpers/ensureScopedChatCache.ts +2 -2
  556. package/src/helpers/getChatBackground.ts +18 -0
  557. package/src/helpers/getDisplayFileName.ts +87 -0
  558. package/src/helpers/getServerReadTimestamp.ts +197 -0
  559. package/src/helpers/historyPreloadScheduler.ts +80 -3
  560. package/src/helpers/initXmppRooms.tsx +14 -10
  561. package/src/helpers/insertMessageWithDelimiter.ts +55 -19
  562. package/src/helpers/isOwnMessage.ts +90 -0
  563. package/src/helpers/keyboardLayout.ts +23 -2
  564. package/src/helpers/mediaLibraryRuntime.ts +25 -0
  565. package/src/helpers/mimeToExtension.ts +6 -22
  566. package/src/helpers/msgSortableMs.ts +25 -0
  567. package/src/helpers/persistCrypto.ts +127 -0
  568. package/src/helpers/pickImageAsset.ts +68 -0
  569. package/src/helpers/pushPayload.ts +62 -0
  570. package/src/helpers/resolveInitBeforeLoadUser.ts +125 -18
  571. package/src/helpers/secureFileUrl.ts +103 -0
  572. package/src/helpers/secureKeyValue.ts +80 -0
  573. package/src/helpers/secureStoreRuntime.ts +62 -0
  574. package/src/helpers/secureUserStorage.ts +80 -0
  575. package/src/helpers/shallowEqual.ts +33 -0
  576. package/src/helpers/sheetGestures.ts +25 -0
  577. package/src/hooks/useChatRoomFocus.ts +49 -9
  578. package/src/hooks/useChatWrapperInit.ts +30 -10
  579. package/src/hooks/useComposing.tsx +37 -1
  580. package/src/hooks/useFileToken.ts +7 -0
  581. package/src/hooks/useLogout.tsx +29 -9
  582. package/src/hooks/usePendingNotification.ts +5 -11
  583. package/src/hooks/useSendMessage.tsx +60 -15
  584. package/src/hooks/useUnreadMessagesCounter.ts +11 -0
  585. package/src/i18n/strings.ts +145 -37
  586. package/src/main.ts +26 -2
  587. package/src/networking/api-requests/auth.api.ts +156 -48
  588. package/src/networking/api-requests/roomMembers.api.ts +1 -1
  589. package/src/networking/api-requests/rooms.api.ts +9 -9
  590. package/src/networking/api-requests/user.api.ts +79 -7
  591. package/src/networking/apiClient.ts +68 -123
  592. package/src/networking/authRefresh.ts +451 -0
  593. package/src/networking/stanzaHandlers.ts +44 -28
  594. package/src/networking/xmpp/flushLastViewedToPrivateStore.ts +71 -10
  595. package/src/networking/xmpp/presenceInRoom.xmpp.ts +6 -1
  596. package/src/networking/xmpp/subscribeToRoomMessages.xmpp.ts +12 -1
  597. package/src/networking/xmppClient.ts +141 -9
  598. package/src/roomStore/chatSettingsSlice.ts +34 -10
  599. package/src/roomStore/index.ts +40 -4
  600. package/src/roomStore/persistence.ts +234 -24
  601. package/src/roomStore/roomsSlice.ts +161 -29
  602. package/src/services/pushSubscriptionService.ts +18 -13
  603. package/src/types/types.ts +72 -5
  604. package/src/version.ts +1 -1
@@ -2,23 +2,69 @@
2
2
 
3
3
  /** @format */
4
4
 
5
- import React, { useEffect, useRef, useState } from 'react';
6
- import { Animated, Easing, Modal, Platform, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
7
- import { CameraIcon, DocumentIcon, MediaIcon } from '../../../assets/icons';
5
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
6
+ import { ActivityIndicator, Animated, Easing, Image, Modal, PanResponder, Platform, ScrollView, StyleSheet, Text, TouchableOpacity, View } from 'react-native';
7
+ import { CameraIcon, DocumentIcon } from '../../../assets/icons';
8
8
  import { useChatSettingState } from '../../../hooks/useChatSettingState';
9
9
  import { chatTextStyle } from '../../../helpers/typography';
10
10
  import { useT } from '../../../i18n/useT';
11
+ import { getMediaLibrary } from '../../../helpers/mediaLibraryRuntime';
12
+ import { shouldClaimVerticalDrag, shouldDismissOnDrag } from '../../../helpers/sheetGestures';
11
13
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
12
14
  // Starting translateY for the sheet. Larger than any realistic sheet
13
15
  // height so it sits fully below the viewport before opening; the exact
14
16
  // number doesn't matter visually because it animates to 0.
15
- const SHEET_OFFSCREEN = 600;
17
+ const SHEET_OFFSCREEN = 800;
18
+ // Re-exported so this sheet's own tests keep addressing them here.
19
+ export { shouldClaimVerticalDrag, shouldDismissOnDrag };
20
+ const RECENTS_COUNT = 12;
21
+ const THUMB_SIZE = 88;
22
+ const THUMB_DECODE = THUMB_SIZE * 2;
23
+ const EXT_MIME = {
24
+ jpg: 'image/jpeg',
25
+ jpeg: 'image/jpeg',
26
+ png: 'image/png',
27
+ gif: 'image/gif',
28
+ webp: 'image/webp',
29
+ heic: 'image/heic',
30
+ heif: 'image/heif'
31
+ };
32
+ const guessMimeType = name => {
33
+ const ext = name.split('.').pop()?.toLowerCase() ?? '';
34
+ return EXT_MIME[ext] ?? 'image/jpeg';
35
+ };
36
+ const toRecentItem = async (MediaLibrary, asset) => {
37
+ const filename = asset?.filename || `photo_${asset?.id ?? Date.now()}`;
38
+ if (asset?.uri && !asset.uri.startsWith('ph://')) {
39
+ return {
40
+ id: asset.id,
41
+ uri: asset.uri,
42
+ filename
43
+ };
44
+ }
45
+ try {
46
+ const info = await MediaLibrary?.getAssetInfoAsync?.(asset, {
47
+ shouldDownloadFromNetwork: false
48
+ });
49
+ if (!info?.localUri) {
50
+ return null;
51
+ }
52
+ return {
53
+ id: asset.id,
54
+ uri: info.localUri,
55
+ filename
56
+ };
57
+ } catch {
58
+ return null;
59
+ }
60
+ };
16
61
  const AttachSheet = ({
17
62
  visible,
18
63
  onClose,
19
64
  onCamera,
20
65
  onGallery,
21
66
  onDocument,
67
+ onPickMedia,
22
68
  primaryColor = '#0052CD'
23
69
  }) => {
24
70
  const {
@@ -26,12 +72,12 @@ const AttachSheet = ({
26
72
  } = useChatSettingState();
27
73
  const ts = config?.typography?.attachSheet;
28
74
  const t = useT();
29
- // Pending handler captured on row tap — runs once the EXIT animation
30
- // finishes so iOS doesn't try to present an image picker over a
31
- // still-dismissing modal (was the original reason for the
32
- // platform-split + Modal.onDismiss dance). The animation completion
33
- // callback now drives this on both platforms.
34
75
  const pendingRef = useRef(null);
76
+ const runPending = () => {
77
+ const fn = pendingRef.current;
78
+ pendingRef.current = null;
79
+ fn?.();
80
+ };
35
81
 
36
82
  // Local "modal stays mounted while animating out" state. The parent
37
83
  // controls `visible`; we mirror it but delay unmount until the exit
@@ -47,6 +93,8 @@ const AttachSheet = ({
47
93
  // bottom-sheet feel.
48
94
  const backdropOpacity = useRef(new Animated.Value(0)).current;
49
95
  const sheetTranslateY = useRef(new Animated.Value(SHEET_OFFSCREEN)).current;
96
+ const onCloseRef = useRef(onClose);
97
+ onCloseRef.current = onClose;
50
98
  useEffect(() => {
51
99
  if (visible) {
52
100
  setMounted(true);
@@ -78,8 +126,6 @@ const AttachSheet = ({
78
126
  if (!mounted) {
79
127
  return;
80
128
  }
81
- // Exit: fade the backdrop, slide the sheet down, then unmount and
82
- // fire any pending picker handler.
83
129
  Animated.parallel([Animated.timing(backdropOpacity, {
84
130
  toValue: 0,
85
131
  duration: 180,
@@ -97,34 +143,120 @@ const AttachSheet = ({
97
143
  return;
98
144
  } // interrupted (rapid re-open) → leave state alone
99
145
  setMounted(false);
100
- const fn = pendingRef.current;
101
- pendingRef.current = null;
102
- fn?.();
146
+ if (Platform.OS !== 'ios') {
147
+ runPending();
148
+ }
103
149
  });
104
150
  return undefined;
105
151
  }, [visible]); // eslint-disable-line react-hooks/exhaustive-deps
106
152
 
153
+ const makeDragResponder = claimOnStart => PanResponder.create({
154
+ onStartShouldSetPanResponder: () => claimOnStart,
155
+ // Capture, so a pull that starts on a row (whose Touchable grabbed
156
+ // the responder on touch-down) still drags the sheet.
157
+ onMoveShouldSetPanResponderCapture: (_evt, g) => claimOnStart || shouldClaimVerticalDrag(g.dy, g.dx),
158
+ onMoveShouldSetPanResponder: (_evt, g) => claimOnStart || shouldClaimVerticalDrag(g.dy, g.dx),
159
+ onPanResponderTerminationRequest: () => false,
160
+ onPanResponderMove: (_evt, g) => {
161
+ sheetTranslateY.setValue(Math.max(0, g.dy));
162
+ },
163
+ onPanResponderRelease: (_evt, g) => {
164
+ if (shouldDismissOnDrag(g.dy, g.vy)) {
165
+ onCloseRef.current();
166
+ return;
167
+ }
168
+ Animated.spring(sheetTranslateY, {
169
+ toValue: 0,
170
+ tension: 90,
171
+ friction: 14,
172
+ useNativeDriver: true
173
+ }).start();
174
+ },
175
+ onPanResponderTerminate: () => {
176
+ Animated.spring(sheetTranslateY, {
177
+ toValue: 0,
178
+ tension: 90,
179
+ friction: 14,
180
+ useNativeDriver: true
181
+ }).start();
182
+ }
183
+ });
184
+ const sheetPanRef = useRef(null);
185
+ const grabberPanRef = useRef(null);
186
+ if (!sheetPanRef.current) {
187
+ sheetPanRef.current = makeDragResponder(false);
188
+ }
189
+ if (!grabberPanRef.current) {
190
+ grabberPanRef.current = makeDragResponder(true);
191
+ }
192
+ const sheetPan = sheetPanRef.current;
193
+ const grabberPan = grabberPanRef.current;
194
+ const [recents, setRecents] = useState([]);
195
+ const [loadingRecents, setLoadingRecents] = useState(false);
196
+ const lastLoadRef = useRef(0);
197
+ const RECENTS_TTL_MS = 15000;
198
+ const loadRecents = useCallback(async () => {
199
+ const MediaLibrary = getMediaLibrary();
200
+ if (!MediaLibrary?.getAssetsAsync) {
201
+ setLoadingRecents(false);
202
+ return;
203
+ }
204
+ try {
205
+ const perm = await MediaLibrary.getPermissionsAsync();
206
+ if (!perm?.granted) {
207
+ setRecents([]);
208
+ return;
209
+ }
210
+ const page = await MediaLibrary.getAssetsAsync({
211
+ first: RECENTS_COUNT,
212
+ sortBy: [MediaLibrary.SortBy?.creationTime ?? 'creationTime'],
213
+ mediaType: [MediaLibrary.MediaType?.photo ?? 'photo']
214
+ });
215
+ const items = await Promise.all((page?.assets ?? []).map(asset => toRecentItem(MediaLibrary, asset)));
216
+ lastLoadRef.current = Date.now();
217
+ setRecents(items.filter(Boolean));
218
+ } catch (err) {
219
+ console.warn('AttachSheet: could not read recent media', err);
220
+ setRecents([]);
221
+ } finally {
222
+ setLoadingRecents(false);
223
+ }
224
+ }, []);
225
+ useEffect(() => {
226
+ if (!visible) {
227
+ return undefined;
228
+ }
229
+ if (recents.length && Date.now() - lastLoadRef.current < RECENTS_TTL_MS) {
230
+ return undefined;
231
+ }
232
+ setLoadingRecents(true);
233
+ const timer = setTimeout(() => {
234
+ loadRecents();
235
+ }, 250);
236
+ return () => clearTimeout(timer);
237
+ }, [visible]);
107
238
  const trigger = handler => () => {
108
- // Capture the handler and ask parent to close. The exit-animation
109
- // completion above fires `handler` AFTER the sheet has slid away,
110
- // so iOS no longer tries to present a picker over a dismissing
111
- // modal — and Android no longer needs the ad-hoc 150ms setTimeout.
112
239
  pendingRef.current = handler;
240
+ if (Platform.OS === 'ios') {
241
+ setMounted(false);
242
+ }
113
243
  onClose();
114
244
  };
245
+ const handleRecentPress = item => trigger(() => {
246
+ if (onPickMedia) {
247
+ onPickMedia({
248
+ uri: item.uri,
249
+ name: item.filename,
250
+ mimeType: guessMimeType(item.filename),
251
+ isVideo: false
252
+ });
253
+ } else {
254
+ onGallery();
255
+ }
256
+ });
115
257
  const rows = [{
116
- label: t('attach.takePhoto'),
117
- hint: t('attach.takePhotoHint'),
118
- Icon: CameraIcon,
119
- handler: onCamera
120
- }, {
121
- label: t('attach.photoOrVideo'),
122
- hint: t('attach.photoOrVideoHint'),
123
- Icon: MediaIcon,
124
- handler: onGallery
125
- }, {
126
- label: t('attach.document'),
127
- hint: t('attach.documentHint'),
258
+ id: 'Document',
259
+ label: t('attach.uploadFile'),
128
260
  Icon: DocumentIcon,
129
261
  handler: onDocument
130
262
  }];
@@ -140,65 +272,115 @@ const AttachSheet = ({
140
272
  // Hardware-back / iOS gesture also routes through onClose, which
141
273
  // flips `visible` and triggers our exit animation above.
142
274
  ,
275
+ onDismiss: Platform.OS === 'ios' ? runPending : undefined,
143
276
  children: /*#__PURE__*/_jsxs(Animated.View, {
144
277
  style: [styles.backdrop, {
145
278
  opacity: backdropOpacity
146
279
  }],
147
280
  children: [/*#__PURE__*/_jsx(TouchableOpacity, {
281
+ testID: "attach-backdrop",
148
282
  style: StyleSheet.absoluteFill,
149
283
  activeOpacity: 1,
150
284
  onPress: onClose
151
- }), /*#__PURE__*/_jsx(Animated.View, {
285
+ }), /*#__PURE__*/_jsxs(Animated.View, {
152
286
  style: [styles.sheet, {
153
287
  transform: [{
154
288
  translateY: sheetTranslateY
155
289
  }]
156
290
  }],
157
- children: /*#__PURE__*/_jsxs(TouchableOpacity, {
158
- activeOpacity: 1,
159
- children: [/*#__PURE__*/_jsx(View, {
291
+ ...sheetPan.panHandlers,
292
+ children: [/*#__PURE__*/_jsx(View, {
293
+ testID: "attach-grabber",
294
+ style: styles.grabberArea,
295
+ ...grabberPan.panHandlers,
296
+ children: /*#__PURE__*/_jsx(View, {
160
297
  style: styles.grabber
161
- }), /*#__PURE__*/_jsx(Text, {
162
- style: [styles.title, chatTextStyle(ts?.title)],
163
- children: t('attach.title')
164
- }), rows.map(({
165
- label,
166
- hint,
167
- Icon,
168
- handler
169
- }, idx) => /*#__PURE__*/_jsxs(TouchableOpacity, {
298
+ })
299
+ }), /*#__PURE__*/_jsxs(View, {
300
+ style: styles.sectionHeader,
301
+ children: [/*#__PURE__*/_jsx(Text, {
302
+ style: [styles.sectionTitle, chatTextStyle(ts?.title)],
303
+ children: t('attach.photosAndVideos')
304
+ }), /*#__PURE__*/_jsx(TouchableOpacity, {
305
+ testID: "attach-view-library",
170
306
  activeOpacity: 0.6,
171
- style: [styles.row, idx < rows.length - 1 && styles.rowDivider],
172
- onPress: trigger(handler),
173
- children: [/*#__PURE__*/_jsx(View, {
174
- style: [styles.iconBubble, {
175
- backgroundColor: primaryColor + '14'
176
- }],
177
- children: /*#__PURE__*/_jsx(Icon, {
178
- color: primaryColor,
179
- width: 20,
180
- height: 20
181
- })
182
- }), /*#__PURE__*/_jsxs(View, {
183
- style: styles.rowText,
184
- children: [/*#__PURE__*/_jsx(Text, {
185
- style: [styles.rowLabel, chatTextStyle(ts?.rowLabel)],
186
- children: label
187
- }), /*#__PURE__*/_jsx(Text, {
188
- style: [styles.rowHint, chatTextStyle(ts?.rowHint)],
189
- children: hint
190
- })]
191
- })]
192
- }, label)), /*#__PURE__*/_jsx(TouchableOpacity, {
193
- activeOpacity: 0.6,
194
- style: styles.cancelRow,
195
- onPress: onClose,
307
+ onPress: trigger(onGallery),
308
+ hitSlop: {
309
+ top: 8,
310
+ bottom: 8,
311
+ left: 8,
312
+ right: 8
313
+ },
196
314
  children: /*#__PURE__*/_jsx(Text, {
197
- style: [styles.cancelLabel, chatTextStyle(ts?.cancelButton)],
198
- children: t('action.cancel')
315
+ style: [styles.sectionAction, {
316
+ color: primaryColor
317
+ }, chatTextStyle(ts?.viewLibrary)],
318
+ children: t('attach.viewLibrary')
319
+ })
320
+ })]
321
+ }), /*#__PURE__*/_jsxs(ScrollView, {
322
+ horizontal: true,
323
+ showsHorizontalScrollIndicator: false,
324
+ contentContainerStyle: styles.strip,
325
+ keyboardShouldPersistTaps: "handled",
326
+ children: [/*#__PURE__*/_jsx(TouchableOpacity, {
327
+ testID: "attach-row-Camera",
328
+ accessibilityRole: "button",
329
+ accessibilityLabel: t('attach.takePhoto'),
330
+ activeOpacity: 0.7,
331
+ style: styles.cameraTile,
332
+ onPress: trigger(onCamera),
333
+ children: /*#__PURE__*/_jsx(CameraIcon, {
334
+ color: "#8A8A8E",
335
+ width: 26,
336
+ height: 26
337
+ })
338
+ }), loadingRecents && recents.length === 0 && /*#__PURE__*/_jsx(View, {
339
+ style: styles.loadingTile,
340
+ children: /*#__PURE__*/_jsx(ActivityIndicator, {
341
+ color: "#8A8A8E"
199
342
  })
343
+ }), recents.map(item => /*#__PURE__*/_jsx(TouchableOpacity, {
344
+ testID: `attach-recent-${item.id}`,
345
+ activeOpacity: 0.8,
346
+ style: styles.thumbWrap,
347
+ onPress: handleRecentPress(item),
348
+ children: /*#__PURE__*/_jsx(Image, {
349
+ source: {
350
+ uri: item.uri,
351
+ width: THUMB_DECODE,
352
+ height: THUMB_DECODE
353
+ },
354
+ style: styles.thumb,
355
+ resizeMethod: "resize",
356
+ resizeMode: "cover",
357
+ fadeDuration: 0
358
+ })
359
+ }, item.id))]
360
+ }), /*#__PURE__*/_jsx(View, {
361
+ style: styles.rowsDivider
362
+ }), rows.map(({
363
+ id,
364
+ label,
365
+ Icon,
366
+ handler
367
+ }) => /*#__PURE__*/_jsxs(TouchableOpacity, {
368
+ testID: `attach-row-${id}`,
369
+ activeOpacity: 0.6,
370
+ style: styles.row,
371
+ onPress: trigger(handler),
372
+ children: [/*#__PURE__*/_jsx(View, {
373
+ style: styles.rowIcon,
374
+ children: /*#__PURE__*/_jsx(Icon, {
375
+ color: "#1C1C1E",
376
+ width: 20,
377
+ height: 20
378
+ })
379
+ }), /*#__PURE__*/_jsx(Text, {
380
+ style: [styles.rowLabel, chatTextStyle(ts?.rowLabel)],
381
+ children: label
200
382
  })]
201
- })
383
+ }, id))]
202
384
  })]
203
385
  })
204
386
  });
@@ -213,7 +395,7 @@ const styles = StyleSheet.create({
213
395
  backgroundColor: '#fff',
214
396
  borderTopLeftRadius: 24,
215
397
  borderTopRightRadius: 24,
216
- paddingTop: 8,
398
+ paddingTop: 4,
217
399
  paddingBottom: Platform.OS === 'ios' ? 32 : 20,
218
400
  shadowColor: '#000',
219
401
  shadowOffset: {
@@ -224,65 +406,83 @@ const styles = StyleSheet.create({
224
406
  shadowRadius: 12,
225
407
  elevation: 16
226
408
  },
409
+ grabberArea: {
410
+ alignItems: 'center',
411
+ paddingTop: 10,
412
+ paddingBottom: 14
413
+ },
227
414
  grabber: {
228
- alignSelf: 'center',
229
415
  width: 40,
230
416
  height: 4,
231
417
  borderRadius: 2,
232
- backgroundColor: '#D9D9DE',
233
- marginBottom: 12
234
- },
235
- title: {
236
- fontSize: 13,
237
- fontWeight: '600',
238
- color: '#8A8A8E',
239
- letterSpacing: 0.4,
240
- textTransform: 'uppercase',
241
- paddingHorizontal: 20,
242
- paddingBottom: 8
418
+ backgroundColor: '#D9D9DE'
243
419
  },
244
- row: {
420
+ sectionHeader: {
245
421
  flexDirection: 'row',
246
422
  alignItems: 'center',
423
+ justifyContent: 'space-between',
247
424
  paddingHorizontal: 20,
248
- paddingVertical: 14
425
+ paddingBottom: 12
249
426
  },
250
- rowDivider: {
251
- borderBottomWidth: StyleSheet.hairlineWidth,
252
- borderBottomColor: '#EFEFF2'
427
+ sectionTitle: {
428
+ fontSize: 17,
429
+ fontWeight: '700',
430
+ color: '#1C1C1E'
253
431
  },
254
- iconBubble: {
255
- width: 40,
256
- height: 40,
257
- borderRadius: 20,
432
+ sectionAction: {
433
+ fontSize: 15,
434
+ fontWeight: '500'
435
+ },
436
+ strip: {
437
+ paddingHorizontal: 16,
438
+ paddingBottom: 16,
439
+ gap: 8
440
+ },
441
+ cameraTile: {
442
+ width: THUMB_SIZE,
443
+ height: THUMB_SIZE,
444
+ borderRadius: 16,
445
+ borderWidth: 1,
446
+ borderColor: '#E4E4E9',
447
+ backgroundColor: '#FAFAFC',
258
448
  alignItems: 'center',
259
- justifyContent: 'center',
260
- marginRight: 14
449
+ justifyContent: 'center'
261
450
  },
262
- rowText: {
263
- flex: 1
451
+ loadingTile: {
452
+ width: THUMB_SIZE,
453
+ height: THUMB_SIZE,
454
+ alignItems: 'center',
455
+ justifyContent: 'center'
264
456
  },
265
- rowLabel: {
266
- fontSize: 16,
267
- fontWeight: '500',
268
- color: '#1C1C1E'
457
+ thumbWrap: {
458
+ width: THUMB_SIZE,
459
+ height: THUMB_SIZE,
460
+ borderRadius: 16,
461
+ overflow: 'hidden',
462
+ backgroundColor: '#EFEFF2'
463
+ },
464
+ thumb: {
465
+ width: '100%',
466
+ height: '100%'
269
467
  },
270
- rowHint: {
271
- fontSize: 12,
272
- color: '#8A8A8E',
273
- marginTop: 2
468
+ rowsDivider: {
469
+ height: StyleSheet.hairlineWidth,
470
+ backgroundColor: '#EFEFF2'
274
471
  },
275
- cancelRow: {
276
- marginTop: 8,
277
- marginHorizontal: 16,
278
- paddingVertical: 14,
279
- borderRadius: 14,
472
+ row: {
473
+ flexDirection: 'row',
280
474
  alignItems: 'center',
281
- backgroundColor: '#F2F2F7'
475
+ paddingHorizontal: 20,
476
+ paddingVertical: 16
282
477
  },
283
- cancelLabel: {
478
+ rowIcon: {
479
+ width: 28,
480
+ alignItems: 'center',
481
+ marginRight: 12
482
+ },
483
+ rowLabel: {
284
484
  fontSize: 16,
285
- fontWeight: '600',
485
+ fontWeight: '500',
286
486
  color: '#1C1C1E'
287
487
  }
288
488
  });
@@ -1 +1 @@
1
- {"version":3,"names":["React","useEffect","useRef","useState","Animated","Easing","Modal","Platform","StyleSheet","Text","TouchableOpacity","View","CameraIcon","DocumentIcon","MediaIcon","useChatSettingState","chatTextStyle","useT","jsx","_jsx","jsxs","_jsxs","SHEET_OFFSCREEN","AttachSheet","visible","onClose","onCamera","onGallery","onDocument","primaryColor","config","ts","typography","attachSheet","t","pendingRef","mounted","setMounted","backdropOpacity","Value","current","sheetTranslateY","setValue","raf","requestAnimationFrame","parallel","timing","toValue","duration","easing","out","cubic","useNativeDriver","spring","tension","friction","start","cancelAnimationFrame","in","finished","fn","undefined","trigger","handler","rows","label","hint","Icon","transparent","animationType","onRequestClose","children","style","styles","backdrop","opacity","absoluteFill","activeOpacity","onPress","sheet","transform","translateY","grabber","title","map","idx","row","length","rowDivider","iconBubble","backgroundColor","color","width","height","rowText","rowLabel","rowHint","cancelRow","cancelLabel","cancelButton","create","flex","justifyContent","borderTopLeftRadius","borderTopRightRadius","paddingTop","paddingBottom","OS","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","alignSelf","borderRadius","marginBottom","fontSize","fontWeight","letterSpacing","textTransform","paddingHorizontal","flexDirection","alignItems","paddingVertical","borderBottomWidth","hairlineWidth","borderBottomColor","marginRight","marginTop","marginHorizontal"],"sourceRoot":"../../../../../src","sources":["components/Modals/AttachSheet/AttachSheet.tsx"],"mappings":";;AAAA;;AAEA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AAC1D,SACEC,QAAQ,EACRC,MAAM,EACNC,KAAK,EACLC,QAAQ,EACRC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,QAC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S,EAAE;IACT+B,SAAS,EAAE,CAAC;IACZC,gBAAgB,EAAE,EAAE;IACpBN,eAAe,EAAE,EAAE;IACnBT,YAAY,EAAE,EAAE;IAChBQ,UAAU,EAAE,QAAQ;IACpBhC,eAAe,EAAE;EACnB,CAAC;EACDQ,WAAW,EAAE;IACXkB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjB1B,KAAK,EAAE;EACT;AACF,CAAC,CAAC;AAEF,eAAepE,WAAW","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useEffect","useRef","useState","ActivityIndicator","Animated","Easing","Image","Modal","PanResponder","Platform","ScrollView","StyleSheet","Text","TouchableOpacity","View","CameraIcon","DocumentIcon","useChatSettingState","chatTextStyle","useT","getMediaLibrary","shouldClaimVerticalDrag","shouldDismissOnDrag","jsx","_jsx","jsxs","_jsxs","SHEET_OFFSCREEN","RECENTS_COUNT","THUMB_SIZE","THUMB_DECODE","EXT_MIME","jpg","jpeg","png","gif","webp","heic","heif","guessMimeType","name","ext","split","pop","toLowerCase","toRecentItem","MediaLibrary","asset","filename","id","Date","now","uri","startsWith","info","getAssetInfoAsync","shouldDownloadFromNetwork","localUri","AttachSheet","visible","onClose","onCamera","onGallery","onDocument","onPickMedia","primaryColor","config","ts","typography","attachSheet","t","pendingRef","runPending","fn","current","mounted","setMounted","backdropOpacity","Value","sheetTranslateY","onCloseRef","setValue","raf","requestAnimationFrame","parallel","timing","toValue","duration","easing","out","cubic","useNativeDriver","spring","tension","friction","start","cancelAnimationFrame","in","finished","OS","undefined","makeDragResponder","claimOnStart","create","onStartShouldSetPanResponder","onMoveShouldSetPanResponderCapture","_evt","g","dy","dx","onMoveShouldSetPanResponder","onPanResponderTerminationRequest","onPanResponderMove","Math","max","onPanResponderRelease","vy","onPanResponderTerminate","sheetPanRef","grabberPanRef","sheetPan","grabberPan","recents","setRecents","loadingRecents","setLoadingRecents","lastLoadRef","RECENTS_TTL_MS","loadRecents","getAssetsAsync","perm","getPermissionsAsync","granted","page","first","sortBy","SortBy","creationTime","mediaType","MediaType","photo","items","Promise","all","assets","map","filter","Boolean","err","console","warn","length","timer","setTimeout","clearTimeout","trigger","handler","handleRecentPress","item","mimeType","isVideo","rows","label","Icon","transparent","animationType","onRequestClose","onDismiss","children","style","styles","backdrop","opacity","testID","absoluteFill","activeOpacity","onPress","sheet","transform","translateY","panHandlers","grabberArea","grabber","sectionHeader","sectionTitle","title","hitSlop","top","bottom","left","right","sectionAction","color","viewLibrary","horizontal","showsHorizontalScrollIndicator","contentContainerStyle","strip","keyboardShouldPersistTaps","accessibilityRole","accessibilityLabel","cameraTile","width","height","loadingTile","thumbWrap","source","thumb","resizeMethod","resizeMode","fadeDuration","rowsDivider","row","rowIcon","rowLabel","flex","backgroundColor","justifyContent","borderTopLeftRadius","borderTopRightRadius","paddingTop","paddingBottom","shadowColor","shadowOffset","shadowOpacity","shadowRadius","elevation","alignItems","borderRadius","flexDirection","paddingHorizontal","fontSize","fontWeight","gap","borderWidth","borderColor","overflow","hairlineWidth","paddingVertical","marginRight"],"sourceRoot":"../../../../../src","sources":["components/Modals/AttachSheet/AttachSheet.tsx"],"mappings":";;AAAA;;AAEA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACvE,SACEC,iBAAiB,EACjBC,QAAQ,EACRC,MAAM,EACNC,KAAK,EACLC,KAAK,EACLC,YAAY,EACZC,QAAQ,EACRC,UAAU,EACVC,UAAU,EACVC,IAAI,EACJC,gBAAgB,EAChBC,IAAI,QACC,cAAc;AACrB,SAASC,UAAU,EAAEC,YAAY,QAAQ,uBAAuB;AAChE,SAASC,mBAAmB,QAAQ,oCAAoC;AACxE,SAASC,aAAa,QAAQ,6BAA6B;AAC3D,SAASC,IAAI,QAAQ,oBAAoB;AACzC,SAASC,eAAe,QAAQ,sCAAsC;AACtE,SACEC,uBAAuB,EACvBC,mBAAmB,QACd,gCAAgC;AAAC,SAAAC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