@oxyhq/services 26.0.0 → 26.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (583) hide show
  1. package/README.md +2 -2
  2. package/android/src/main/java/so/oxy/identity/OxyIdentityStore.kt +127 -21
  3. package/expo-module.config.json +1 -4
  4. package/lib/commonjs/index.js +49 -18
  5. package/lib/commonjs/index.js.map +1 -1
  6. package/lib/commonjs/notifications/deviceNotifications.js +0 -63
  7. package/lib/commonjs/notifications/deviceNotifications.js.map +1 -1
  8. package/lib/commonjs/ui/boot/runProviderColdBoot.js +64 -20
  9. package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
  10. package/lib/commonjs/ui/components/FollowButton.js +4 -4
  11. package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
  12. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +1 -13
  13. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
  14. package/lib/commonjs/ui/components/OxyAuthChooser.js +8 -9
  15. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  16. package/lib/commonjs/ui/components/OxyProvider.js +7 -8
  17. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  18. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  19. package/lib/commonjs/ui/components/ProfileButton.js +1 -1
  20. package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
  21. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +30 -25
  22. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  23. package/lib/commonjs/ui/components/authChooser/primitives.js +9 -9
  24. package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
  25. package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js +2 -2
  26. package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js.map +1 -1
  27. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +2 -2
  28. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
  29. package/lib/commonjs/ui/components/internal/PinInput.js +1 -3
  30. package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
  31. package/lib/commonjs/ui/components/logo/LogoText.js +4 -4
  32. package/lib/commonjs/ui/components/logo/LogoText.js.map +1 -1
  33. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +2 -2
  34. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  35. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +2 -2
  36. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  37. package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
  38. package/lib/commonjs/ui/context/OxyContext.js +46 -32
  39. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  40. package/lib/commonjs/ui/context/commitSessionFlow.js +43 -3
  41. package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
  42. package/lib/commonjs/ui/context/hooks/useAuthOperations.js +2 -15
  43. package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
  44. package/lib/commonjs/ui/context/useOxyAccountGraph.js +4 -3
  45. package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
  46. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +5 -5
  47. package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
  48. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +11 -11
  49. package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  50. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +9 -9
  51. package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  52. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +2 -3
  53. package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  54. package/lib/commonjs/ui/hooks/queries/userCache.js +17 -17
  55. package/lib/commonjs/ui/hooks/queries/userCache.js.map +1 -1
  56. package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
  57. package/lib/commonjs/ui/hooks/useAsyncAction.js +7 -7
  58. package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -1
  59. package/lib/commonjs/ui/hooks/useAuth.js +2 -4
  60. package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
  61. package/lib/commonjs/ui/hooks/useAvatarPicker.js +5 -5
  62. package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
  63. package/lib/commonjs/ui/hooks/useOnlineStatus.js +2 -3
  64. package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
  65. package/lib/commonjs/ui/hooks/useSessionManagement.js +2 -0
  66. package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
  67. package/lib/commonjs/ui/hooks/useSettingToggle.js +4 -4
  68. package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
  69. package/lib/commonjs/ui/hooks/useSurfaceHeader.js +11 -68
  70. package/lib/commonjs/ui/hooks/useSurfaceHeader.js.map +1 -1
  71. package/lib/commonjs/ui/oauth/browserAuthTransport.js +64 -66
  72. package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -1
  73. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +48 -0
  74. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +1 -0
  75. package/lib/commonjs/ui/oauth/oauthPopup.js +0 -47
  76. package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -1
  77. package/lib/commonjs/ui/screens/AccountMembersScreen.js +10 -10
  78. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  79. package/lib/commonjs/ui/screens/AccountSettingsScreen.js +19 -41
  80. package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
  81. package/lib/commonjs/ui/screens/AccountVerificationScreen.js +4 -4
  82. package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
  83. package/lib/commonjs/ui/screens/AppInfoScreen.js +9 -9
  84. package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
  85. package/lib/commonjs/ui/screens/AvatarCropScreen.js +3 -3
  86. package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
  87. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +7 -6
  88. package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -1
  89. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +4 -4
  90. package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
  91. package/lib/commonjs/ui/screens/CreateAccountScreen.js +13 -35
  92. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  93. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +5 -5
  94. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  95. package/lib/commonjs/ui/screens/EditProfileScreen.js +3 -2
  96. package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
  97. package/lib/commonjs/ui/screens/FAQScreen.js +2 -2
  98. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  99. package/lib/commonjs/ui/screens/FeedbackScreen.js +89 -90
  100. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  101. package/lib/commonjs/ui/screens/FileManagementScreen.js +20 -20
  102. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  103. package/lib/commonjs/ui/screens/FollowersListScreen.js.map +1 -1
  104. package/lib/commonjs/ui/screens/FollowingListScreen.js.map +1 -1
  105. package/lib/commonjs/ui/screens/HelpSupportScreen.js +7 -7
  106. package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
  107. package/lib/commonjs/ui/screens/HistoryViewScreen.js +34 -9
  108. package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
  109. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +3 -3
  110. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  111. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +3 -3
  112. package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
  113. package/lib/commonjs/ui/screens/ManageAccountScreen.js +15 -15
  114. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  115. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +19 -19
  116. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  117. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +15 -15
  118. package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
  119. package/lib/commonjs/ui/screens/ProfileScreen.js +7 -17
  120. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  121. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +2 -2
  122. package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
  123. package/lib/commonjs/ui/screens/UserListScreen.js +7 -13
  124. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  125. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -5
  126. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  127. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +4 -1
  128. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  129. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js +24 -34
  130. package/lib/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  131. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +1 -1
  132. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  133. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +4 -3
  134. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  135. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +1 -1
  136. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  137. package/lib/commonjs/ui/session/index.js +0 -7
  138. package/lib/commonjs/ui/session/index.js.map +1 -1
  139. package/lib/commonjs/ui/utils/crossOriginRestore.js +140 -0
  140. package/lib/commonjs/ui/utils/crossOriginRestore.js.map +1 -0
  141. package/lib/commonjs/ui/utils/fileManagement.js +24 -24
  142. package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
  143. package/lib/commonjs/ui/utils/oauthReturn.js +30 -19
  144. package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
  145. package/lib/commonjs/ui/utils/userUtils.js +28 -27
  146. package/lib/commonjs/ui/utils/userUtils.js.map +1 -1
  147. package/lib/module/index.js +8 -20
  148. package/lib/module/index.js.map +1 -1
  149. package/lib/module/notifications/deviceNotifications.js +0 -62
  150. package/lib/module/notifications/deviceNotifications.js.map +1 -1
  151. package/lib/module/ui/boot/runProviderColdBoot.js +65 -21
  152. package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
  153. package/lib/module/ui/components/FollowButton.js +1 -1
  154. package/lib/module/ui/components/FollowButton.js.map +1 -1
  155. package/lib/module/ui/components/OxyAccountDialogScreen.js +1 -13
  156. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
  157. package/lib/module/ui/components/OxyAuthChooser.js +4 -5
  158. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  159. package/lib/module/ui/components/OxyProvider.js +6 -7
  160. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  161. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  162. package/lib/module/ui/components/ProfileButton.js +2 -2
  163. package/lib/module/ui/components/ProfileButton.js.map +1 -1
  164. package/lib/module/ui/components/authChooser/AccountsMenuView.js +8 -3
  165. package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
  166. package/lib/module/ui/components/authChooser/primitives.js +1 -1
  167. package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
  168. package/lib/module/ui/components/authChooser/useUsernameAvailability.js +1 -1
  169. package/lib/module/ui/components/authChooser/useUsernameAvailability.js.map +1 -1
  170. package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
  171. package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
  172. package/lib/module/ui/components/internal/PinInput.js +1 -3
  173. package/lib/module/ui/components/internal/PinInput.js.map +1 -1
  174. package/lib/module/ui/components/logo/LogoText.js +4 -4
  175. package/lib/module/ui/components/logo/LogoText.js.map +1 -1
  176. package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
  177. package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  178. package/lib/module/ui/components/payment/PaymentSummaryStep.js +2 -2
  179. package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  180. package/lib/module/ui/components/styles/shadow.js.map +1 -1
  181. package/lib/module/ui/context/OxyContext.js +49 -35
  182. package/lib/module/ui/context/OxyContext.js.map +1 -1
  183. package/lib/module/ui/context/commitSessionFlow.js +42 -3
  184. package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
  185. package/lib/module/ui/context/hooks/useAuthOperations.js +2 -15
  186. package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
  187. package/lib/module/ui/context/useOxyAccountGraph.js +4 -3
  188. package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
  189. package/lib/module/ui/hooks/mutations/mutationFactory.js +1 -1
  190. package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
  191. package/lib/module/ui/hooks/mutations/useAccountMutations.js +1 -1
  192. package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
  193. package/lib/module/ui/hooks/mutations/useServicesMutations.js +1 -1
  194. package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
  195. package/lib/module/ui/hooks/queries/usePaymentQueries.js +2 -3
  196. package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
  197. package/lib/module/ui/hooks/queries/userCache.js +17 -17
  198. package/lib/module/ui/hooks/queries/userCache.js.map +1 -1
  199. package/lib/module/ui/hooks/useAssets.js.map +1 -1
  200. package/lib/module/ui/hooks/useAsyncAction.js +1 -1
  201. package/lib/module/ui/hooks/useAsyncAction.js.map +1 -1
  202. package/lib/module/ui/hooks/useAuth.js +2 -4
  203. package/lib/module/ui/hooks/useAuth.js.map +1 -1
  204. package/lib/module/ui/hooks/useAvatarPicker.js +1 -1
  205. package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
  206. package/lib/module/ui/hooks/useOnlineStatus.js +2 -3
  207. package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
  208. package/lib/module/ui/hooks/useSessionManagement.js +2 -0
  209. package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
  210. package/lib/module/ui/hooks/useSettingToggle.js +1 -1
  211. package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
  212. package/lib/module/ui/hooks/useSurfaceHeader.js +11 -68
  213. package/lib/module/ui/hooks/useSurfaceHeader.js.map +1 -1
  214. package/lib/module/ui/oauth/browserAuthTransport.js +64 -66
  215. package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -1
  216. package/lib/module/ui/oauth/legacyRedirectLanes.js +44 -0
  217. package/lib/module/ui/oauth/legacyRedirectLanes.js.map +1 -0
  218. package/lib/module/ui/oauth/oauthPopup.js +1 -48
  219. package/lib/module/ui/oauth/oauthPopup.js.map +1 -1
  220. package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
  221. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  222. package/lib/module/ui/screens/AccountSettingsScreen.js +15 -37
  223. package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
  224. package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
  225. package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
  226. package/lib/module/ui/screens/AppInfoScreen.js +1 -1
  227. package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
  228. package/lib/module/ui/screens/AvatarCropScreen.js +1 -1
  229. package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
  230. package/lib/module/ui/screens/ChangeAvatarScreen.js +5 -4
  231. package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -1
  232. package/lib/module/ui/screens/ConnectedAppsScreen.js +2 -2
  233. package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
  234. package/lib/module/ui/screens/CreateAccountScreen.js +12 -34
  235. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  236. package/lib/module/ui/screens/EditProfileFieldScreen.js +4 -4
  237. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  238. package/lib/module/ui/screens/EditProfileScreen.js +4 -3
  239. package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
  240. package/lib/module/ui/screens/FAQScreen.js +1 -1
  241. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  242. package/lib/module/ui/screens/FeedbackScreen.js +91 -94
  243. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  244. package/lib/module/ui/screens/FileManagementScreen.js +1 -1
  245. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  246. package/lib/module/ui/screens/FollowersListScreen.js.map +1 -1
  247. package/lib/module/ui/screens/FollowingListScreen.js.map +1 -1
  248. package/lib/module/ui/screens/HelpSupportScreen.js +1 -1
  249. package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
  250. package/lib/module/ui/screens/HistoryViewScreen.js +30 -5
  251. package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
  252. package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
  253. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  254. package/lib/module/ui/screens/LegalDocumentsScreen.js +1 -1
  255. package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
  256. package/lib/module/ui/screens/ManageAccountScreen.js +3 -3
  257. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  258. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +4 -4
  259. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  260. package/lib/module/ui/screens/PrivacySettingsScreen.js +11 -11
  261. package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
  262. package/lib/module/ui/screens/ProfileScreen.js +8 -18
  263. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  264. package/lib/module/ui/screens/SavesCollectionsScreen.js +1 -1
  265. package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
  266. package/lib/module/ui/screens/UserListScreen.js +8 -14
  267. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  268. package/lib/module/ui/screens/WelcomeNewUserScreen.js +6 -5
  269. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  270. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +4 -1
  271. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  272. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js +5 -15
  273. package/lib/module/ui/screens/fileManagement/hooks/useFileUploadState.js.map +1 -1
  274. package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
  275. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  276. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +5 -4
  277. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  278. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
  279. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  280. package/lib/module/ui/session/index.js +0 -1
  281. package/lib/module/ui/session/index.js.map +1 -1
  282. package/lib/module/ui/utils/crossOriginRestore.js +131 -0
  283. package/lib/module/ui/utils/crossOriginRestore.js.map +1 -0
  284. package/lib/module/ui/utils/fileManagement.js +25 -25
  285. package/lib/module/ui/utils/fileManagement.js.map +1 -1
  286. package/lib/module/ui/utils/oauthReturn.js +30 -20
  287. package/lib/module/ui/utils/oauthReturn.js.map +1 -1
  288. package/lib/module/ui/utils/userUtils.js +28 -27
  289. package/lib/module/ui/utils/userUtils.js.map +1 -1
  290. package/lib/typescript/commonjs/index.d.ts +2 -0
  291. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  292. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +0 -51
  293. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -1
  294. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +30 -11
  295. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  296. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  297. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +0 -7
  298. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  299. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  300. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +1 -2
  301. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
  302. package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
  303. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  304. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +1 -1
  305. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
  306. package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +1 -1
  307. package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/ui/components/internal/PinInput.d.ts.map +1 -1
  309. package/lib/typescript/commonjs/ui/components/payment/types.d.ts +6 -6
  310. package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
  311. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +40 -0
  313. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +2 -11
  315. package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  316. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +7 -26
  317. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  318. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +1 -0
  319. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  320. package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts +2 -3
  322. package/lib/typescript/commonjs/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
  323. package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts +2 -3
  324. package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
  325. package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts +2 -2
  326. package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts.map +1 -1
  327. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
  328. package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
  329. package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts +2 -2
  330. package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts.map +1 -1
  331. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +2 -4
  332. package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
  333. package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +2 -3
  334. package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
  335. package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
  336. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts +2 -7
  337. package/lib/typescript/commonjs/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
  338. package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -1
  339. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +40 -0
  340. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
  341. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +0 -6
  342. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -1
  343. package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  344. package/lib/typescript/commonjs/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
  345. package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  346. package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
  347. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +2 -2
  348. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  349. package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts +0 -3
  350. package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts.map +1 -1
  351. package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts +0 -3
  352. package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts.map +1 -1
  353. package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  354. package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  355. package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts +0 -7
  358. package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
  359. package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  360. package/lib/typescript/commonjs/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  361. package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  362. package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts +1 -1
  363. package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts.map +1 -1
  364. package/lib/typescript/commonjs/ui/session/index.d.ts +0 -1
  365. package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
  366. package/lib/typescript/commonjs/ui/types/navigation.d.ts +19 -27
  367. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  368. package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +43 -0
  369. package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +1 -0
  370. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +5 -5
  371. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
  372. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +12 -15
  373. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
  374. package/lib/typescript/commonjs/ui/utils/userUtils.d.ts +14 -7
  375. package/lib/typescript/commonjs/ui/utils/userUtils.d.ts.map +1 -1
  376. package/lib/typescript/module/index.d.ts +2 -0
  377. package/lib/typescript/module/index.d.ts.map +1 -1
  378. package/lib/typescript/module/notifications/deviceNotifications.d.ts +0 -51
  379. package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -1
  380. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +30 -11
  381. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  382. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  383. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +0 -7
  384. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  385. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  386. package/lib/typescript/module/ui/components/OxySignInButton.d.ts +1 -2
  387. package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
  388. package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
  389. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
  390. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +1 -1
  391. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
  392. package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +1 -1
  393. package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
  394. package/lib/typescript/module/ui/components/internal/PinInput.d.ts.map +1 -1
  395. package/lib/typescript/module/ui/components/payment/types.d.ts +6 -6
  396. package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
  397. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  398. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +40 -0
  399. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
  400. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +2 -11
  401. package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
  402. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +7 -26
  403. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  404. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +1 -0
  405. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  406. package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
  407. package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts +2 -3
  408. package/lib/typescript/module/ui/hooks/queries/paymentTypes.d.ts.map +1 -1
  409. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +2 -3
  410. package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
  411. package/lib/typescript/module/ui/hooks/queries/userCache.d.ts +2 -2
  412. package/lib/typescript/module/ui/hooks/queries/userCache.d.ts.map +1 -1
  413. package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
  414. package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
  415. package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts +2 -2
  416. package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts.map +1 -1
  417. package/lib/typescript/module/ui/hooks/useAuth.d.ts +2 -4
  418. package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
  419. package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +2 -3
  420. package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
  421. package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
  422. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts +2 -7
  423. package/lib/typescript/module/ui/hooks/useSurfaceHeader.d.ts.map +1 -1
  424. package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -1
  425. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +40 -0
  426. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
  427. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +0 -6
  428. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -1
  429. package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
  430. package/lib/typescript/module/ui/screens/ChangeAvatarScreen.d.ts.map +1 -1
  431. package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
  432. package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
  433. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +2 -2
  434. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  435. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +0 -3
  436. package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
  437. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +0 -3
  438. package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
  439. package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
  440. package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
  441. package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
  442. package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
  443. package/lib/typescript/module/ui/screens/UserListScreen.d.ts +0 -7
  444. package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
  445. package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
  446. package/lib/typescript/module/ui/screens/fileManagement/hooks/useFileUploadState.d.ts.map +1 -1
  447. package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
  448. package/lib/typescript/module/ui/screens/trust/trustTier.d.ts +1 -1
  449. package/lib/typescript/module/ui/screens/trust/trustTier.d.ts.map +1 -1
  450. package/lib/typescript/module/ui/session/index.d.ts +0 -1
  451. package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
  452. package/lib/typescript/module/ui/types/navigation.d.ts +19 -27
  453. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  454. package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +43 -0
  455. package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -0
  456. package/lib/typescript/module/ui/utils/fileManagement.d.ts +5 -5
  457. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  458. package/lib/typescript/module/ui/utils/oauthReturn.d.ts +12 -15
  459. package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
  460. package/lib/typescript/module/ui/utils/userUtils.d.ts +14 -7
  461. package/lib/typescript/module/ui/utils/userUtils.d.ts.map +1 -1
  462. package/package.json +10 -22
  463. package/src/index.ts +16 -18
  464. package/src/notifications/deviceNotifications.ts +0 -82
  465. package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +281 -0
  466. package/src/ui/boot/runProviderColdBoot.ts +101 -24
  467. package/src/ui/components/FollowButton.tsx +1 -1
  468. package/src/ui/components/OxyAccountDialogScreen.tsx +1 -13
  469. package/src/ui/components/OxyAuthChooser.tsx +4 -14
  470. package/src/ui/components/OxyProvider.tsx +7 -8
  471. package/src/ui/components/OxySignInButton.tsx +1 -2
  472. package/src/ui/components/ProfileButton.tsx +2 -5
  473. package/src/ui/components/authChooser/AccountsMenuView.tsx +10 -5
  474. package/src/ui/components/authChooser/primitives.tsx +1 -1
  475. package/src/ui/components/authChooser/useUsernameAvailability.ts +1 -1
  476. package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
  477. package/src/ui/components/internal/PinInput.tsx +0 -1
  478. package/src/ui/components/logo/LogoText.tsx +4 -4
  479. package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
  480. package/src/ui/components/payment/PaymentSummaryStep.tsx +2 -2
  481. package/src/ui/components/payment/types.ts +24 -24
  482. package/src/ui/components/styles/shadow.tsx +2 -2
  483. package/src/ui/context/OxyContext.tsx +46 -35
  484. package/src/ui/context/__tests__/commitSessionFlow.test.ts +89 -13
  485. package/src/ui/context/commitSessionFlow.ts +61 -3
  486. package/src/ui/context/hooks/useAuthOperations.ts +1 -26
  487. package/src/ui/context/oxyContextTypes.ts +7 -26
  488. package/src/ui/context/useOxyAccountGraph.ts +4 -4
  489. package/src/ui/hooks/mutations/mutationFactory.ts +1 -1
  490. package/src/ui/hooks/mutations/useAccountMutations.ts +1 -1
  491. package/src/ui/hooks/mutations/useServicesMutations.ts +1 -1
  492. package/src/ui/hooks/queries/paymentTypes.ts +2 -3
  493. package/src/ui/hooks/queries/usePaymentQueries.ts +2 -3
  494. package/src/ui/hooks/queries/userCache.ts +148 -169
  495. package/src/ui/hooks/useAssets.ts +1 -1
  496. package/src/ui/hooks/useAsyncAction.ts +3 -3
  497. package/src/ui/hooks/useAuth.ts +2 -4
  498. package/src/ui/hooks/useAvatarPicker.ts +1 -1
  499. package/src/ui/hooks/useOnlineStatus.ts +2 -3
  500. package/src/ui/hooks/useSessionManagement.ts +2 -0
  501. package/src/ui/hooks/useSettingToggle.ts +1 -1
  502. package/src/ui/hooks/useSurfaceHeader.ts +15 -90
  503. package/src/ui/oauth/__tests__/oauthPopup.test.ts +0 -26
  504. package/src/ui/oauth/browserAuthTransport.ts +49 -55
  505. package/src/ui/oauth/legacyRedirectLanes.ts +43 -0
  506. package/src/ui/oauth/oauthPopup.ts +3 -61
  507. package/src/ui/screens/AccountMembersScreen.tsx +1 -1
  508. package/src/ui/screens/AccountSettingsScreen.tsx +17 -45
  509. package/src/ui/screens/AccountVerificationScreen.tsx +1 -1
  510. package/src/ui/screens/AppInfoScreen.tsx +1 -1
  511. package/src/ui/screens/AvatarCropScreen.tsx +1 -1
  512. package/src/ui/screens/ChangeAvatarScreen.tsx +4 -7
  513. package/src/ui/screens/ConnectedAppsScreen.tsx +2 -2
  514. package/src/ui/screens/CreateAccountScreen.tsx +13 -43
  515. package/src/ui/screens/EditProfileFieldScreen.tsx +4 -4
  516. package/src/ui/screens/EditProfileScreen.tsx +3 -6
  517. package/src/ui/screens/FAQScreen.tsx +1 -1
  518. package/src/ui/screens/FeedbackScreen.tsx +575 -741
  519. package/src/ui/screens/FileManagementScreen.tsx +1 -1
  520. package/src/ui/screens/FollowersListScreen.tsx +0 -3
  521. package/src/ui/screens/FollowingListScreen.tsx +0 -3
  522. package/src/ui/screens/HelpSupportScreen.tsx +1 -1
  523. package/src/ui/screens/HistoryViewScreen.tsx +20 -5
  524. package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
  525. package/src/ui/screens/LegalDocumentsScreen.tsx +1 -1
  526. package/src/ui/screens/ManageAccountScreen.tsx +2 -9
  527. package/src/ui/screens/PremiumSubscriptionScreen.tsx +4 -4
  528. package/src/ui/screens/PrivacySettingsScreen.tsx +12 -15
  529. package/src/ui/screens/ProfileScreen.tsx +6 -24
  530. package/src/ui/screens/SavesCollectionsScreen.tsx +1 -1
  531. package/src/ui/screens/UserListScreen.tsx +8 -18
  532. package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
  533. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +1 -1
  534. package/src/ui/screens/fileManagement/hooks/useFileUploadState.ts +5 -14
  535. package/src/ui/screens/trust/TrustCenterScreen.tsx +2 -2
  536. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +5 -6
  537. package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
  538. package/src/ui/screens/trust/TrustRulesScreen.tsx +1 -1
  539. package/src/ui/screens/trust/trustTier.ts +1 -1
  540. package/src/ui/session/index.ts +0 -1
  541. package/src/ui/types/navigation.ts +19 -27
  542. package/src/ui/utils/__tests__/crossOriginRestore.test.ts +143 -0
  543. package/src/ui/utils/crossOriginRestore.ts +169 -0
  544. package/src/ui/utils/fileManagement.ts +92 -108
  545. package/src/ui/utils/oauthReturn.ts +33 -23
  546. package/src/ui/utils/userUtils.ts +32 -27
  547. package/android/src/main/java/so/oxy/session/OxyBackgroundSession.kt +0 -184
  548. package/android/src/main/java/so/oxy/session/OxyBackgroundSessionApi.kt +0 -162
  549. package/android/src/main/java/so/oxy/session/OxyBackgroundSessionModule.kt +0 -116
  550. package/android/src/main/java/so/oxy/session/OxyBackgroundSessionStore.kt +0 -179
  551. package/android/src/main/java/so/oxy/session/OxyBackgroundToken.kt +0 -61
  552. package/android/src/main/java/so/oxy/storage/OxyEncryptedPrefs.kt +0 -241
  553. package/lib/commonjs/ui/session/backgroundSession.js +0 -258
  554. package/lib/commonjs/ui/session/backgroundSession.js.map +0 -1
  555. package/lib/commonjs/ui/session/useBackgroundSessionSync.js +0 -81
  556. package/lib/commonjs/ui/session/useBackgroundSessionSync.js.map +0 -1
  557. package/lib/commonjs/ui/utils/netConnectivity.js +0 -28
  558. package/lib/commonjs/ui/utils/netConnectivity.js.map +0 -1
  559. package/lib/module/ui/session/backgroundSession.js +0 -252
  560. package/lib/module/ui/session/backgroundSession.js.map +0 -1
  561. package/lib/module/ui/session/useBackgroundSessionSync.js +0 -76
  562. package/lib/module/ui/session/useBackgroundSessionSync.js.map +0 -1
  563. package/lib/module/ui/utils/netConnectivity.js +0 -23
  564. package/lib/module/ui/utils/netConnectivity.js.map +0 -1
  565. package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts +0 -42
  566. package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts.map +0 -1
  567. package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts +0 -23
  568. package/lib/typescript/commonjs/ui/session/useBackgroundSessionSync.d.ts.map +0 -1
  569. package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +0 -17
  570. package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +0 -1
  571. package/lib/typescript/module/ui/session/backgroundSession.d.ts +0 -42
  572. package/lib/typescript/module/ui/session/backgroundSession.d.ts.map +0 -1
  573. package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts +0 -23
  574. package/lib/typescript/module/ui/session/useBackgroundSessionSync.d.ts.map +0 -1
  575. package/lib/typescript/module/ui/utils/netConnectivity.d.ts +0 -17
  576. package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +0 -1
  577. package/lib/typescript/types/expo-image-picker.d.ts +0 -35
  578. package/src/types/expo-image-picker.d.ts +0 -35
  579. package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +0 -215
  580. package/src/ui/session/__tests__/backgroundSession.test.ts +0 -392
  581. package/src/ui/session/backgroundSession.ts +0 -313
  582. package/src/ui/session/useBackgroundSessionSync.ts +0 -92
  583. package/src/ui/utils/netConnectivity.ts +0 -27
@@ -0,0 +1,140 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.clearCrossOriginRestoreGuards = clearCrossOriginRestoreGuards;
7
+ exports.consumeSilentOAuthError = consumeSilentOAuthError;
8
+ exports.isCrossOriginRestoreBlocked = isCrossOriginRestoreBlocked;
9
+ exports.isSilentRestoreEligibleOrigin = isSilentRestoreEligibleOrigin;
10
+ exports.markCrossOriginRestoreAttempted = markCrossOriginRestoreAttempted;
11
+ exports.maybeStartSilentOAuthRestore = maybeStartSilentOAuthRestore;
12
+ var _core = require("@oxyhq/core");
13
+ var _isWebBrowser = require("./isWebBrowser.js");
14
+ var _oauthReturn = require("./oauthReturn.js");
15
+ var _oauthNavigation = require("../components/oauthNavigation.js");
16
+ function sessionStore() {
17
+ return globalThis.sessionStorage;
18
+ }
19
+
20
+ /** True when this tab already attempted cross-origin silent OAuth restore. */
21
+ function isCrossOriginRestoreBlocked() {
22
+ const store = sessionStore();
23
+ if (!store) return false;
24
+ return Boolean(store.getItem(_core.OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY) || store.getItem(_core.OXY_SILENT_OAUTH_ATTEMPTED_KEY));
25
+ }
26
+
27
+ /** Mark restore as attempted — never auto-retry until sign-out clears guards. */
28
+ function markCrossOriginRestoreAttempted() {
29
+ const store = sessionStore();
30
+ if (!store) return;
31
+ store.setItem(_core.OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY, '1');
32
+ store.setItem(_core.OXY_SILENT_OAUTH_ATTEMPTED_KEY, '1');
33
+ }
34
+
35
+ /** Clear all cross-origin restore loop guards (call on sign-out). */
36
+ function clearCrossOriginRestoreGuards() {
37
+ const store = sessionStore();
38
+ if (!store) return;
39
+ for (const key of [_core.OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY, _core.OXY_SILENT_OAUTH_ATTEMPTED_KEY]) {
40
+ store.removeItem(key);
41
+ }
42
+ }
43
+
44
+ /**
45
+ * Whether cold boot should attempt silent cross-origin OAuth restore for the
46
+ * given web origin.
47
+ *
48
+ * Mirrors the hub-sync WRITE gate (`syncHubAfterSignIn`): only OFFICIAL Oxy web
49
+ * origins participate in cross-app SSO — a random third-party / preview origin
50
+ * must never have its tab bounced to the IdP. Additionally, loopback / local-dev
51
+ * origins are EXCLUDED here even though {@link isOfficialWebOrigin} treats them
52
+ * as official: a developer's local app must never be redirected to a hosted IdP
53
+ * on cold boot (it signs in through the in-app dialog instead). The central IdP
54
+ * hub's own origin is excluded to avoid a wasteful self-hop.
55
+ */
56
+ function isSilentRestoreEligibleOrigin(origin) {
57
+ if ((0, _core.isLoopbackOrigin)(origin)) return false;
58
+ if ((0, _core.isIdpHubOrigin)()) return false;
59
+ return (0, _core.isOfficialWebOrigin)(origin);
60
+ }
61
+ /**
62
+ * Top-level redirect to auth.oxy.so/authorize with `prompt=none` for silent
63
+ * cross-origin session restore on all web apps (official + third-party).
64
+ */
65
+ async function maybeStartSilentOAuthRestore(opts) {
66
+ if (!(0, _isWebBrowser.isWebBrowser)()) return false;
67
+ const location = globalThis.location;
68
+ if (!location) return false;
69
+
70
+ // Defense-in-depth: never bounce a loopback / non-official / IdP-hub origin to
71
+ // a hosted authorize endpoint (the caller gates on this too).
72
+ if (!isSilentRestoreEligibleOrigin(location.origin)) {
73
+ return false;
74
+ }
75
+ if (isCrossOriginRestoreBlocked()) {
76
+ return false;
77
+ }
78
+ const params = new URLSearchParams(location.search);
79
+ if (params.has('code') || params.has('error')) {
80
+ return false;
81
+ }
82
+ try {
83
+ const {
84
+ codeVerifier,
85
+ codeChallenge
86
+ } = await (0, _core.generatePkcePair)();
87
+ const state = await (0, _core.generateOAuthState)();
88
+ if (!(0, _core.persistOAuthHandshake)(state, codeVerifier)) {
89
+ return false;
90
+ }
91
+ const redirectUri = (0, _core.normalizeOAuthRedirectUri)(opts.redirectUri ?? location.origin);
92
+ const authorizeUrl = (0, _core.buildOAuthAuthorizeUrl)({
93
+ authorizeBaseUrl: opts.authorizeBaseUrl,
94
+ clientId: opts.clientId,
95
+ redirectUri,
96
+ state,
97
+ codeChallenge,
98
+ scope: opts.scope,
99
+ prompt: 'none'
100
+ });
101
+ markCrossOriginRestoreAttempted();
102
+ (0, _oauthNavigation.redirectToAuthorize)(authorizeUrl);
103
+ return true;
104
+ } catch (error) {
105
+ _core.logger.warn('Silent OAuth restore skipped', {
106
+ component: 'crossOriginRestore'
107
+ }, error);
108
+ return false;
109
+ }
110
+ }
111
+
112
+ /**
113
+ * When the RP lands with OAuth error params from a silent authorize attempt,
114
+ * strip them and return whether the error was terminal for silent restore.
115
+ */
116
+ function consumeSilentOAuthError() {
117
+ if (!(0, _isWebBrowser.isWebBrowser)()) return null;
118
+ const location = globalThis.location;
119
+ const history = globalThis.history;
120
+ if (!location) return null;
121
+ const params = new URLSearchParams(location.search);
122
+ const error = params.get('error');
123
+ if (error !== 'login_required' && error !== 'consent_required') {
124
+ return null;
125
+ }
126
+ markCrossOriginRestoreAttempted();
127
+ if (history?.replaceState) {
128
+ const url = new URL(location.href);
129
+ url.searchParams.delete('error');
130
+ url.searchParams.delete('error_description');
131
+ url.searchParams.delete('state');
132
+ // Silent restore failed, but the visitor still asked for a specific page.
133
+ // Put them back on it rather than leaving them on the bare origin the IdP
134
+ // redirected to.
135
+ (0, _oauthReturn.replaceUrlAfterOAuthReturn)(`${url.pathname}${url.search}${url.hash}`);
136
+ }
137
+ (0, _core.clearOAuthHandshake)();
138
+ return error;
139
+ }
140
+ //# sourceMappingURL=crossOriginRestore.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_core","require","_isWebBrowser","_oauthReturn","_oauthNavigation","sessionStore","globalThis","sessionStorage","isCrossOriginRestoreBlocked","store","Boolean","getItem","OXY_CROSS_ORIGIN_RESTORE_ATTEMPTED_KEY","OXY_SILENT_OAUTH_ATTEMPTED_KEY","markCrossOriginRestoreAttempted","setItem","clearCrossOriginRestoreGuards","key","removeItem","isSilentRestoreEligibleOrigin","origin","isLoopbackOrigin","isIdpHubOrigin","isOfficialWebOrigin","maybeStartSilentOAuthRestore","opts","isWebBrowser","location","params","URLSearchParams","search","has","codeVerifier","codeChallenge","generatePkcePair","state","generateOAuthState","persistOAuthHandshake","redirectUri","normalizeOAuthRedirectUri","authorizeUrl","buildOAuthAuthorizeUrl","authorizeBaseUrl","clientId","scope","prompt","redirectToAuthorize","error","logger","warn","component","consumeSilentOAuthError","history","get","replaceState","url","URL","href","searchParams","delete","replaceUrlAfterOAuthReturn","pathname","hash","clearOAuthHandshake"],"sourceRoot":"../../../../src","sources":["ui/utils/crossOriginRestore.ts"],"mappings":";;;;;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAcA,IAAAC,aAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,gBAAA,GAAAH,OAAA;AAEA,SAASI,YAAYA,CAAA,EAAwB;EAC3C,OAAQC,UAAU,CAAkCC,cAAc;AACpE;;AAEA;AACO,SAASC,2BAA2BA,CAAA,EAAY;EACrD,MAAMC,KAAK,GAAGJ,YAAY,CAAC,CAAC;EAC5B,IAAI,CAACI,KAAK,EAAE,OAAO,KAAK;EACxB,OAAOC,OAAO,CACZD,KAAK,CAACE,OAAO,CAACC,4CAAsC,CAAC,IACnDH,KAAK,CAACE,OAAO,CAACE,oCAA8B,CAChD,CAAC;AACH;;AAEA;AACO,SAASC,+BAA+BA,CAAA,EAAS;EACtD,MAAML,KAAK,GAAGJ,YAAY,CAAC,CAAC;EAC5B,IAAI,CAACI,KAAK,EAAE;EACZA,KAAK,CAACM,OAAO,CAACH,4CAAsC,EAAE,GAAG,CAAC;EAC1DH,KAAK,CAACM,OAAO,CAACF,oCAA8B,EAAE,GAAG,CAAC;AACpD;;AAEA;AACO,SAASG,6BAA6BA,CAAA,EAAS;EACpD,MAAMP,KAAK,GAAGJ,YAAY,CAAC,CAAC;EAC5B,IAAI,CAACI,KAAK,EAAE;EACZ,KAAK,MAAMQ,GAAG,IAAI,CAACL,4CAAsC,EAAEC,oCAA8B,CAAC,EAAE;IAC1FJ,KAAK,CAACS,UAAU,CAACD,GAAG,CAAC;EACvB;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASE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AC,uCAA0B,EAAC,GAAGL,GAAG,CAACM,QAAQ,GAAGN,GAAG,CAACzB,MAAM,GAAGyB,GAAG,CAACO,IAAI,EAAE,CAAC;EACvE;EACA,IAAAC,yBAAmB,EAAC,CAAC;EACrB,OAAOhB,KAAK;AACd","ignoreList":[]}
@@ -26,11 +26,11 @@ var _reactNative = require("react-native");
26
26
  * (carries a URI but is not a real DOM `File` / `Blob` instance).
27
27
  */
28
28
  function isRNFileDescriptor(input) {
29
- if (!input || typeof input !== "object") return false;
29
+ if (!input || typeof input !== 'object') return false;
30
30
  const obj = input;
31
- if (typeof obj.uri !== "string") return false;
32
- if (typeof File !== "undefined" && input instanceof File) return false;
33
- if (typeof Blob !== "undefined" && input instanceof Blob) return false;
31
+ if (typeof obj.uri !== 'string') return false;
32
+ if (typeof File !== 'undefined' && input instanceof File) return false;
33
+ if (typeof Blob !== 'undefined' && input instanceof Blob) return false;
34
34
  return true;
35
35
  }
36
36
 
@@ -38,9 +38,9 @@ function isRNFileDescriptor(input) {
38
38
  * Format file size in bytes to human-readable string
39
39
  */
40
40
  function formatFileSize(bytes) {
41
- if (bytes === 0) return "0 Bytes";
41
+ if (bytes === 0) return '0 Bytes';
42
42
  const k = 1024;
43
- const sizes = ["Bytes", "KB", "MB", "GB"];
43
+ const sizes = ['Bytes', 'KB', 'MB', 'GB'];
44
44
  const i = Math.floor(Math.log(bytes) / Math.log(k));
45
45
  return `${Number.parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;
46
46
  }
@@ -49,14 +49,14 @@ function formatFileSize(bytes) {
49
49
  * Get icon name for file based on content type
50
50
  */
51
51
  function getFileIcon(contentType) {
52
- if (contentType.startsWith("image/")) return "image";
53
- if (contentType.startsWith("video/")) return "videocam";
54
- if (contentType.startsWith("audio/")) return "musical-notes";
55
- if (contentType.includes("pdf")) return "document-text";
56
- if (contentType.includes("word") || contentType.includes("doc")) return "document";
57
- if (contentType.includes("excel") || contentType.includes("sheet")) return "grid";
58
- if (contentType.includes("zip") || contentType.includes("archive")) return "archive";
59
- return "document-outline";
52
+ if (contentType.startsWith('image/')) return 'image';
53
+ if (contentType.startsWith('video/')) return 'videocam';
54
+ if (contentType.startsWith('audio/')) return 'musical-notes';
55
+ if (contentType.includes('pdf')) return 'document-text';
56
+ if (contentType.includes('word') || contentType.includes('doc')) return 'document';
57
+ if (contentType.includes('excel') || contentType.includes('sheet')) return 'grid';
58
+ if (contentType.includes('zip') || contentType.includes('archive')) return 'archive';
59
+ return 'document-outline';
60
60
  }
61
61
 
62
62
  /**
@@ -73,18 +73,18 @@ function getFileIcon(contentType) {
73
73
  */
74
74
  async function convertDocumentPickerAssetToFile(doc, index) {
75
75
  const fileName = doc.name || `file-${index + 1}`;
76
- const fileType = doc.mimeType || "application/octet-stream";
76
+ const fileType = doc.mimeType || 'application/octet-stream';
77
77
 
78
78
  // React Native path — return the descriptor as-is. FormData handles it.
79
- if (_reactNative.Platform.OS !== "web") {
79
+ if (_reactNative.Platform.OS !== 'web') {
80
80
  if (!doc.uri) {
81
- throw new Error("Missing file data (no uri property)");
81
+ throw new Error('Missing file data (no uri property)');
82
82
  }
83
83
  return {
84
84
  uri: doc.uri,
85
85
  type: fileType,
86
86
  name: fileName,
87
- size: typeof doc.size === "number" ? doc.size : undefined
87
+ size: typeof doc.size === 'number' ? doc.size : undefined
88
88
  };
89
89
  }
90
90
  try {
@@ -92,7 +92,7 @@ async function convertDocumentPickerAssetToFile(doc, index) {
92
92
 
93
93
  // Priority 1: Use doc.file if available (web native File API).
94
94
  // This is the most efficient path as it doesn't require fetching.
95
- if (doc.file && typeof globalThis.File !== "undefined" && doc.file instanceof globalThis.File) {
95
+ if (doc.file && typeof globalThis.File !== 'undefined' && doc.file instanceof globalThis.File) {
96
96
  file = doc.file;
97
97
  // Ensure file has required properties
98
98
  if (!file.name && doc.name) {
@@ -116,22 +116,22 @@ async function convertDocumentPickerAssetToFile(doc, index) {
116
116
  throw new Error(`Failed to fetch file: ${response.statusText}`);
117
117
  }
118
118
  const blob = await response.blob();
119
- const resolvedType = doc.mimeType || blob.type || "application/octet-stream";
119
+ const resolvedType = doc.mimeType || blob.type || 'application/octet-stream';
120
120
  file = new globalThis.File([blob], fileName, {
121
121
  type: resolvedType
122
122
  });
123
123
  file.uri = doc.uri;
124
124
  return file;
125
125
  } catch (error) {
126
- console.error("Failed to read file from URI:", error);
127
- throw new Error(`Failed to load file: ${(error instanceof Error ? error.message : null) || "Unknown error"}`);
126
+ console.error('Failed to read file from URI:', error);
127
+ throw new Error(`Failed to load file: ${(error instanceof Error ? error.message : null) || 'Unknown error'}`);
128
128
  }
129
129
  }
130
130
 
131
131
  // No file or URI available - this shouldn't happen with Expo 54
132
- throw new Error("Missing file data (no file or uri property)");
132
+ throw new Error('Missing file data (no file or uri property)');
133
133
  } catch (error) {
134
- console.error("Error converting document to file:", error);
134
+ console.error('Error converting document to file:', error);
135
135
  throw error;
136
136
  }
137
137
  }
@@ -1 +1 @@
1
- {"version":3,"names":["_reactNative","require","isRNFileDescriptor","input","obj","uri","File","Blob","formatFileSize","bytes","k","sizes","i","Math","floor","log","Number","parseFloat","toFixed","getFileIcon","contentType","startsWith","includes","convertDocumentPickerAssetToFile","doc","index","fileName","name","fileType","mimeType","Platform","OS","Error","type","size","undefined","file","globalThis","response","fetch","ok","statusText","blob","resolvedType","error","console","message","uploadFileRaw","userId","oxyServices","visibility","uploadRawFile"],"sourceRoot":"../../../../src","sources":["ui/utils/fileManagement.ts"],"mappings":";;;;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAACC,KAAc,EAA6B;EAC7E,IAAI,CAACA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAO,KAAK;EACrD,MAAMC,GAAG,GAAGD,KAAgC;EAC5C,IAAI,OAAOC,GAAG,CAACC,GAAG,KAAK,QAAQ,E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ACA;AACA;AACO,eAAeG,aAAaA,CAClCX,IAAsB,EACtBY,MAAc;AACd;AACAC,WAAgB,EAChBC,UAA8C,EAC7C;EACD,OAAO,MAAMD,WAAW,CAACE,aAAa,CAACf,IAAI,EAAEc,UAAU,CAAC;AACzD","ignoreList":[]}
1
+ {"version":3,"names":["_reactNative","require","isRNFileDescriptor","input","obj","uri","File","Blob","formatFileSize","bytes","k","sizes","i","Math","floor","log","Number","parseFloat","toFixed","getFileIcon","contentType","startsWith","includes","convertDocumentPickerAssetToFile","doc","index","fileName","name","fileType","mimeType","Platform","OS","Error","type","size","undefined","file","globalThis","response","fetch","ok","statusText","blob","resolvedType","error","console","message","uploadFileRaw","userId","oxyServices","visibility","uploadRawFile"],"sourceRoot":"../../../../src","sources":["ui/utils/fileManagement.ts"],"mappings":";;;;;;;;;;AAGA,IAAAA,YAAA,GAAAC,OAAA;AAEA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;;AASA;AACA;AACA;AACA;AACO,SAASC,kBAAkBA,CAACC,KAAc,EAA6B;EAC5E,IAAI,CAACA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAO,KAAK;EACrD,MAAMC,GAAG,GAAGD,KAAgC;EAC5C,IAAI,OAAOC,GAAG,CAACC,GAAG,KAAK,QAAQ,EAAE,OAAO,KAAK;EAC7C,IAAI,OAAOC,IAAI,KAAK,WAAW,IAAIH,KAAK,YAAYG,IAAI,EAAE,OAAO,KAAK;EACtE,IAAI,OAAOC,IAAI,KAAK,WAAW,IAAIJ,KAAK,YAAYI,IAAI,EAAE,OAAO,KAAK;EACtE,OAAO,IAAI;AACb;;AAEA;AACA;AACA;AACO,SAASC,cAAcA,CAACC,KAAa,EAAU;EAClD,IAAIA,KAAK,KAAK,CAAC,EAAE,OAAO,SAAS;EACjC,MAAMC,CAAC,GAAG,IAAI;EACd,MAAMC,KAAK,GAAG,CAAC,OAAO,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,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AQ,CAACG,UAAU,EAAE,CAAC;QACnE;QACA,MAAMC,IAAI,GAAG,MAAMJ,QAAQ,CAACI,IAAI,CAAC,CAAC;QAClC,MAAMC,YAAY,GAAGnB,GAAG,CAACK,QAAQ,IAAIa,IAAI,CAACT,IAAI,IAAI,0BAA0B;QAC5EG,IAAI,GAAG,IAAIC,UAAU,CAAC/B,IAAI,CAAC,CAACoC,IAAI,CAAC,EAAEhB,QAAQ,EAAE;UAAEO,IAAI,EAAEU;QAAa,CAAC,CAAgB;QACnFP,IAAI,CAAC/B,GAAG,GAAGmB,GAAG,CAACnB,GAAG;QAClB,OAAO+B,IAAI;MACf,CAAC,CAAC,OAAOQ,KAAc,EAAE;QACrBC,OAAO,CAACD,KAAK,CAAC,+BAA+B,EAAEA,KAAK,CAAC;QACrD,MAAM,IAAIZ,KAAK,CAAC,wBAAwB,CAACY,KAAK,YAAYZ,KAAK,GAAGY,KAAK,CAACE,OAAO,GAAG,IAAI,KAAK,eAAe,EAAE,CAAC;MACjH;IACJ;;IAEA;IACA,MAAM,IAAId,KAAK,CAAC,6CAA6C,CAAC;EAClE,CAAC,CAAC,OAAOY,KAAc,EAAE;IACrBC,OAAO,CAACD,KAAK,CAAC,oCAAoC,EAAEA,KAAK,CAAC;IAC1D,MAAMA,KAAK;EACf;AACJ;;AAEA;AACA;AACA;AACO,eAAeG,aAAaA,CAC/BX,IAAsB,EACtBY,MAAc;AACd;AACAC,WAAgB,EAChBC,UAA8C,EAChD;EACE,OAAO,MAAMD,WAAW,CAACE,aAAa,CAACf,IAAI,EAAEc,UAAU,CAAC;AAC5D","ignoreList":[]}
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.consumeHubSyncFailure = consumeHubSyncFailure;
6
7
  exports.replaceUrlAfterOAuthReturn = replaceUrlAfterOAuthReturn;
7
8
  exports.tryCompleteOAuthReturn = tryCompleteOAuthReturn;
8
9
  var _core = require("@oxyhq/core");
@@ -12,21 +13,12 @@ var _isWebBrowser = require("./isWebBrowser.js");
12
13
  * When the RP lands with `?code=` after signing in at auth.oxy.so, exchange the
13
14
  * code for a device-first session before cold boot runs.
14
15
  *
15
- * This is the REDIRECT transport's return leg. The SDK never starts a full-page
16
- * authorize navigation on its own any more (#691 phase 7b), but this lane is
17
- * still load-bearing: a browser-BLOCKED sign-in popup falls back to a full-page
18
- * redirect (`startWebOAuthSignIn`), and that redirect comes back here.
19
- *
20
- * It owns only what is specific to a full-page round trip — reading the code off
21
- * the URL, recovering the handshake `sessionStorage` carried across the
22
- * navigation, and cleaning both up afterwards — and delegates state validation,
23
- * the PKCE exchange, and the session commit to `completeOAuthCode`, the same
24
- * function the popup transport runs.
25
- *
26
- * It is also the SINGLE cleanup path for an OAuth `error` landing on the URL:
27
- * any `?error=…` (including an `error=login_required` left over from the
28
- * now-deleted silent restore) is stripped along with `state` /
29
- * `error_description`, and the stale PKCE handshake is cleared.
16
+ * This is the REDIRECT transport's return leg. It owns only what is specific to
17
+ * a full-page round trip reading the code off the URL, recovering the
18
+ * handshake `sessionStorage` carried across the navigation, and cleaning both up
19
+ * afterwards and delegates state validation, the PKCE exchange, and the
20
+ * session commit to `completeOAuthCode`, the same function the popup transport
21
+ * runs.
30
22
  */
31
23
  async function tryCompleteOAuthReturn(opts) {
32
24
  if (!(0, _isWebBrowser.isWebBrowser)()) return false;
@@ -50,15 +42,13 @@ async function tryCompleteOAuthReturn(opts) {
50
42
  (0, _core.clearOAuthHandshake)();
51
43
  return false;
52
44
  }
53
- const handshake = (0, _core.readOAuthHandshake)();
54
- const redirectUri = (0, _core.canonicalizeOAuthRedirectUri)(handshake?.redirectUri ?? opts.authRedirectUri ?? location.origin);
55
45
  const result = await (0, _completeOAuthCode.completeOAuthCode)({
56
46
  oxyServices: opts.oxyServices,
57
47
  clientId,
58
48
  code,
59
49
  returnedState: params.get('state'),
60
- handshake,
61
- redirectUri,
50
+ handshake: (0, _core.readOAuthHandshake)(),
51
+ redirectUri: (0, _core.normalizeOAuthRedirectUri)(opts.authRedirectUri ?? location.origin),
62
52
  commitSession: opts.commitSession,
63
53
  // Strip the params before the commit so a stale `?code=` cannot re-enter the
64
54
  // exchange loop, and read the return path FIRST — clearOAuthHandshake drops
@@ -121,6 +111,27 @@ function stripOAuthParamsFromUrl() {
121
111
  url.searchParams.delete('state');
122
112
  url.searchParams.delete('error');
123
113
  url.searchParams.delete('error_description');
114
+ url.searchParams.delete('hub_sync');
115
+ replaceUrlAfterOAuthReturn(`${url.pathname}${url.search}${url.hash}`);
116
+ }
117
+
118
+ /**
119
+ * When auth.oxy.so hub-sync redeem fails, the IdP redirects back with
120
+ * `?hub_sync=failed`. Strip the param and log so cold boot can continue
121
+ * without leaving a stale query string.
122
+ */
123
+ function consumeHubSyncFailure() {
124
+ if (!(0, _isWebBrowser.isWebBrowser)()) return false;
125
+ const location = globalThis.location;
126
+ if (!location) return false;
127
+ const params = new URLSearchParams(location.search);
128
+ if (params.get('hub_sync') !== 'failed') return false;
129
+ _core.logger.warn('Hub sync failed — IdP device session may be out of sync', {
130
+ component: 'hubSync'
131
+ });
132
+ const url = new URL(location.href);
133
+ url.searchParams.delete('hub_sync');
124
134
  replaceUrlAfterOAuthReturn(`${url.pathname}${url.search}${url.hash}`);
135
+ return true;
125
136
  }
126
137
  //# sourceMappingURL=oauthReturn.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_core","require","_completeOAuthCode","_isWebBrowser","tryCompleteOAuthReturn","opts","isWebBrowser","location","globalThis","params","URLSearchParams","search","code","get","oauthError","stripOAuthParamsFromUrl","clearOAuthHandshake","clientId","logger","warn","component","handshake","readOAuthHandshake","redirectUri","canonicalizeOAuthRedirectUri","authRedirectUri","origin","result","completeOAuthCode","oxyServices","returnedState","commitSession","cleanup","ok","replaceUrlAfterOAuthReturn","fallbackUrl","history","replaceState","current","pathname","hash","target","consumeOAuthReturnPath","state","dispatch","dispatchEvent","event","PopStateEvent","Event","call","error","url","URL","href","searchParams","delete"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K,EAAEP,OAAO,CAACO;IAAM,CAAC,CAAC,GACvD,IAAIK,KAAK,CAAC,UAAU,CAAC;IAC3BJ,QAAQ,CAACK,IAAI,CAACzC,UAAU,EAAEsC,KAAK,CAAC;EAClC,CAAC,CAAC,OAAOI,KAAK,EAAE;IACdhC,YAAM,CAACC,IAAI,CAAC,yCAAyC,EAAE;MAAEC,SAAS,EAAE;IAAc,CAAC,EAAE8B,KAAK,CAAC;EAC7F;AACF;AAEA,SAASnC,uBAAuBA,CAAA,EAAS;EACvC,MAAMR,QAAQ,GAAIC,UAAU,CAAgDD,QAAQ;EACpF,MAAM6B,OAAO,GAAI5B,UAAU,CAA2B4B,OAAO;EAC7D,IAAI,CAAC7B,QAAQ,IAAI,CAAC6B,OAAO,EAAEC,YAAY,EAAE;EACzC,MAAMc,GAAG,GAAG,IAAIC,GAAG,CAAC7C,QAAQ,CAAC8C,IAAI,CAAC;EAClCF,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,MAAM,CAAC;EAC/BJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,OAAO,CAAC;EAChCJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,OAAO,CAAC;EAChCJ,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,mBAAmB,CAAC;EAC5CrB,0BAA0B,CAAC,GAAGiB,GAAG,CAACZ,QAAQ,GAAGY,GAAG,CAACxC,MAAM,GAAGwC,GAAG,CAACX,IAAI,EAAE,CAAC;AACvE","ignoreList":[]}
1
+ {"version":3,"names":["_core","require","_completeOAuthCode","_isWebBrowser","tryCompleteOAuthReturn","opts","isWebBrowser","location","globalThis","params","URLSearchParams","search","code","get","oauthError","stripOAuthParamsFromUrl","clearOAuthHandshake","clientId","logger","warn","component","result","completeOAuthCode","oxyServices","returnedState","handshake","readOAuthHandshake","redirectUri","normalizeOAuthRedirectUri","authRedirectUri","origin","commitSession","cleanup","ok","replaceUrlAfterOAuthReturn","fallbackUrl","history","replaceState","current","pathname","hash","target","consumeOAuthReturnPath","state","dispatch","dispatchEvent","event","PopStateEvent","Event","call","error","url","URL","href","searchParams","delete","consumeHubSyncFailure"],"sourceRoot":"../../../../src","sources":["ui/utils/oauthReturn.ts"],"mappings":";;;;;;;;AACA,IAAAA,KAAA,GAAAC,OAAA;AAOA,IAAAC,kBAAA,GAAAD,OAAA;AAEA,IAAAE,aAAA,GAAAF,OAAA;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,eAAeG,sBAAsBA,CAACC,IAK5C,EAAoB;EACnB,IAAI,CAAC,IAAAC,0BAAY,EAAC,CAAC,EAAE,OAAO,KAAK;EACjC,MAAMC,QAAQ,GAAIC,UAAU,CAA6BD,QAAQ;EACjE,IAAI,CAACA,QAAQ,EAAE,OAAO,KAAK;EAE3B,MAAME,MAAM,GAAG,IAAIC,eAAe,CAACH,QAAQ,CAACI,MAAM,CAAC;EACnD,MAAMC,IAAI,GAAGH,MAAM,CAACI,GAAG,CAAC,MAAM,CAAC;EAC/B,MAAMC,UAAU,GAAGL,MAAM,CAACI,GAAG,CAAC,OAAO,CAAC;EACtC,IAAIC,UAAU,EAAE;IACdC,uBAAuB,CAAC,CAAC;IACzB,IAAAC,yBAAmB,EAAC,CAAC;IACrB,OAAO,KAAK;EACd;EACA,IAAI,CAACJ,IAAI,EAAE,OAAO,KAAK;EAEvB,MAAMK,QAAQ,GAAGZ,IAAI,CAACY,QAAQ;EAC9B,IAAI,CAACA,QAAQ,EAAE;IACbC,YAAM,CAACC,IAAI,CAAC,wCAAwC,EAAE;MAAEC,SAAS,EAAE;IAAc,CAAC,CAAC;IACnFL,uBAAuB,CAAC,CAAC;IACzB,IAAAC,yBAAmB,EAAC,CAAC;IACrB,OAAO,KAAK;EACd;EAEA,MAAMK,MAAM,GAAG,MAAM,IAAAC,oCAAiB,EAAC;IACrCC,WAAW,EAAElB,IAAI,CAACkB,WAAW;IAC7BN,QAAQ;IACRL,IAAI;IACJY,aAAa,EAAEf,M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CAAC;EACnD,IAAIF,MAAM,CAACI,GAAG,CAAC,UAAU,CAAC,KAAK,QAAQ,EAAE,OAAO,KAAK;EAErDK,YAAM,CAACC,IAAI,CAAC,yDAAyD,EAAE;IACrEC,SAAS,EAAE;EACb,CAAC,CAAC;EAEF,MAAM+B,GAAG,GAAG,IAAIC,GAAG,CAAC7C,QAAQ,CAAC8C,IAAI,CAAC;EAClCF,GAAG,CAACG,YAAY,CAACC,MAAM,CAAC,UAAU,CAAC;EACnCrB,0BAA0B,CAAC,GAAGiB,GAAG,CAACZ,QAAQ,GAAGY,GAAG,CAACxC,MAAM,GAAGwC,GAAG,CAACX,IAAI,EAAE,CAAC;EACrE,OAAO,IAAI;AACb","ignoreList":[]}
@@ -8,9 +8,9 @@ var _core = require("@oxyhq/core");
8
8
  /**
9
9
  * User display name and date formatting utilities.
10
10
  *
11
- * Display-name helpers follow the API contract: prefer `name.displayName` when
12
- * present, otherwise fall back to the normalized handle via
13
- * `getNormalizedUserHandle`.
11
+ * The display-name helpers are thin wrappers around the canonical
12
+ * `getAccountDisplayName` in `@oxyhq/core`, which handles all the edge cases
13
+ * (missing username, missing name, fallback to truncated `publicKey`, i18n).
14
14
  */
15
15
 
16
16
  /**
@@ -30,40 +30,41 @@ const formatDate = dateString => {
30
30
  return '';
31
31
  }
32
32
  };
33
- exports.formatDate = formatDate;
34
- function readDisplayName(user) {
35
- const name = user?.name;
36
- if (!name || typeof name !== 'object') return '';
37
- return typeof name.displayName === 'string' ? name.displayName.trim() : '';
38
- }
39
33
 
40
34
  /**
41
35
  * Gets a display name from user data.
42
36
  *
43
- * Prefers API `name.displayName`, then the normalized handle.
37
+ * Prefers full name composed first+last → username → `Account 0x12345678…`
38
+ * (derived from publicKey) → translated "Unnamed".
39
+ *
40
+ * @param user - User-like object with optional name/username/publicKey
41
+ * @param locale - Optional locale for the final fallback label
44
42
  */
45
- const getDisplayName = user => {
46
- const displayName = readDisplayName(user);
47
- if (displayName) return displayName;
48
- return (0, _core.getNormalizedUserHandle)(user) ?? '';
49
- };
43
+ exports.formatDate = formatDate;
44
+ const getDisplayName = (user, locale) => (0, _core.getAccountDisplayName)(user, locale);
50
45
 
51
46
  /**
52
- * Gets a short display name (first token) for compact UI.
47
+ * Gets a short display name (first name or username).
48
+ *
49
+ * Used for compact UI (e.g. greetings). Falls back to the full display name
50
+ * helper, which also handles publicKey-only accounts.
53
51
  */
54
52
  exports.getDisplayName = getDisplayName;
55
- const getShortDisplayName = user => {
56
- const displayName = readDisplayName(user);
57
- if (displayName) {
58
- const firstToken = displayName.split(/\s+/).find(Boolean);
59
- if (firstToken) return firstToken;
60
- }
61
- const handle = (0, _core.getNormalizedUserHandle)(user);
62
- if (handle) {
63
- const firstToken = handle.split(/\s+/).find(Boolean);
64
- return firstToken ?? handle;
53
+ const getShortDisplayName = (user, locale) => {
54
+ if (!user) return (0, _core.getAccountDisplayName)(user, locale);
55
+ const name = user.name;
56
+ if (name && typeof name === 'object') {
57
+ const first = typeof name.first === 'string' ? name.first.trim() : '';
58
+ if (first) return first;
59
+ const full = typeof name.full === 'string' ? name.full.trim() : '';
60
+ if (full) return full.split(' ')[0];
61
+ } else if (typeof name === 'string' && name.trim()) {
62
+ return name.trim().split(' ')[0];
65
63
  }
66
- return '';
64
+ if (typeof user.username === 'string' && user.username.trim()) return user.username.trim();
65
+
66
+ // Defer to the canonical helper for publicKey/unnamed fallbacks.
67
+ return (0, _core.getAccountDisplayName)(user, locale);
67
68
  };
68
69
  exports.getShortDisplayName = getShortDisplayName;
69
70
  //# sourceMappingURL=userUtils.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_core","require","formatDate","dateString","date","Date","Number","isNaN","getTime","toLocaleDateString","month","day","year","exports","readDisplayName","user","name","displayName","trim","getDisplayName","getNormalizedUserHandle","getShortDisplayName","firstToken","split","find","Boolean","handle"],"sourceRoot":"../../../../src","sources":["ui/utils/userUtils.ts"],"mappings":";;;;;;AAQA,IAAAA,KAAA,GAAAC,OAAA;AARA;AACA;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f,MAAMK,UAAU,GAAGL,WAAW,CAACM,KAAK,CAAC,KAAK,CAAC,CAACC,IAAI,CAACC,OAAO,CAAC;IACzD,IAAIH,UAAU,EAAE,OAAOA,UAAU;EACnC;EAEA,MAAMI,MAAM,GAAG,IAAAN,6BAAuB,EAACL,IAAI,CAAC;EAC5C,IAAIW,MAAM,EAAE;IACV,MAAMJ,UAAU,GAAGI,MAAM,CAACH,KAAK,CAAC,KAAK,CAAC,CAACC,IAAI,CAACC,OAAO,CAAC;IACpD,OAAOH,UAAU,IAAII,MAAM;EAC7B;EAEA,OAAO,EAAE;AACX,CAAC;AAACb,OAAA,CAAAQ,mBAAA,GAAAA,mBAAA","ignoreList":[]}
1
+ {"version":3,"names":["_core","require","formatDate","dateString","date","Date","Number","isNaN","getTime","toLocaleDateString","month","day","year","exports","getDisplayName","user","locale","coreGetAccountDisplayName","getShortDisplayName","name","first","trim","full","split","username"],"sourceRoot":"../../../../src","sources":["ui/utils/userUtils.ts"],"mappings":";;;;;;AAQA,IAAAA,KAAA,GAAAC,OAAA;AARA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA;AACA;AACA;AACO,MAAMC,UAAU,GAAIC,UAA4C,IAAa;EAClF,IAAI,CAACA,UAAU,EAAE,OAAO,EAAE;EAE1B,IAAI;IACF,MAAMC,IAAI,GAAGD,UAAU,YAAYE,IAAI,GAAGF,UAAU,GAAG,IAAIE,IAAI,CAACF,UAAU,CAAC;IAC3E,IAAIG,MAAM,CAACC,KAAK,CAACH,IAAI,CAACI,OAAO,CAAC,CAAC,CAAC,EAAE,OAAO,EAAE;IAE3C,OAAOJ,IAAI,CAACK,kBAAkB,CAAC,OAAO,EAAE;MACtCC,KAAK,EAAE,OAAO;MACdC,GAAG,EAAE,SAAS;MACdC,IAAI,EAAE;IACR,CAAC,CAAC;EACJ,CAAC,CAAC,MAAM;IACN,OAAO,EAAE;EACX;AACF,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AARAC,O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EAAEC,MAAM,CAAC;AAChD,CAAC;AAACH,OAAA,CAAAK,mBAAA,GAAAA,mBAAA","ignoreList":[]}
@@ -103,26 +103,14 @@ export { handleAuthError, isInvalidSessionError, isTimeoutOrNetworkError, extrac
103
103
  // ---------------------------------------------------------------------------
104
104
  export { useFileFiltering } from "./ui/hooks/useFileFiltering.js";
105
105
  // ---------------------------------------------------------------------------
106
- // Device notifications DELIBERATELY NOT EXPORTED HERE
107
- // ---------------------------------------------------------------------------
108
- // The `expo-notifications` adapter lives behind its own entry point:
109
- //
110
- // import { getExpoPushToken } from '@oxyhq/services/notifications';
111
- //
112
- // It is the one module in this package whose dependencies (`expo-notifications`
113
- // and `expo-constants`) are optional peers that an app which does not use push
114
- // genuinely never installs. Re-exporting it from THIS barrel is what made that
115
- // optionality a lie: a barrel export puts the module in the import graph of
116
- // every consumer, and `tsc` must resolve the specifier of an `import()` even
117
- // when the call is lazy and wrapped in try/catch — so every consumer without
118
- // `expo-notifications` failed with TS2307 (plus TS7006 cascades) whether or not
119
- // it had ever heard of push. Behind a subpath the module is only ever pulled in
120
- // by an app that asked for it, which is what "optional peer" is supposed to
121
- // mean.
122
- //
123
- // Do NOT re-add these exports here. `__tests__/notifications/barrelIsolation.test.ts`
124
- // fails if you do.
125
-
106
+ // Device notifications (the ONE `expo-notifications` adapter)
107
+ // ---------------------------------------------------------------------------
108
+ // The Expo-side half of push: permission, platform tag, and the EXPO push token
109
+ // `@oxyhq/core`'s `registerPushToken` accepts (never a raw APNs/FCM token).
110
+ // Native-only by construction every entry point resolves its null/no-op result
111
+ // from `Platform.OS` before `expo-notifications` is ever imported, and both
112
+ // `expo-notifications` and `expo-constants` are OPTIONAL peers.
113
+ export { pushTokenPlatform, hasNotificationPermission, requestNotificationPermission, getExpoPushToken, takeLaunchNotificationData, installForegroundNotificationHandler, subscribeToNotificationResponses } from "./notifications/deviceNotifications.js";
126
114
  // ---------------------------------------------------------------------------
127
115
  // UI components
128
116
  // ---------------------------------------------------------------------------
@@ -1 +1 @@
1
- {"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useAuth","IdentityBoundSessionError","useAuthStore","useAccountStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","OXY_OAUTH_STATE_STORAGE_KEY","OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY","OxySignInButton","openOAuthPopup","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxyAuthChooser","OxySignInRequestSurface","useSwitchableAccounts","ProfileScreen","ManageAccountScreen","NotificationsScreen","PreferencesScreen","ConnectedAppsScreen","CreateAccountScreen","AccountMembersScreen","AccountSettingsScreen","showBottomSheet","closeBottomSheet","useSurfaceHeader","SurfaceHeaderAction","openAccountDialog","closeAccountDialog","subscribeToAccountDialog"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAASA,aAAa,QAAyB,aAAa;AAC5D,SAASC,QAAQ,QAAQ,cAAc;AACvCD,aAAa,CAACC,QAAQ,CAACC,EAAgB,CAAC;;AAExC;AACA;AACA;AACA,SAASC,OAAO,IAAIC,WAAW,QAAQ,gCAA6B;AACpE,SAASC,MAAM,QAAQ,4BAAyB;AAEhD,SAASC,OAAO,QAAQ,uBAAoB;AAE5C;AACA;AACA;AACA,SAASC,yBAAyB,QAAQ,iCAA8B;;AAExE;AACA;AACA;AACA,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,eAAe,QAAQ,6BAA0B;AAC1D,SACIC,aAAa,EACbC,SAAS,IAAIC,cAAc,EAC3BC,QAAQ,EACRC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,QACb,2BAAwB;;AAE/B;AACA;AACA;AACA,SAAST,SAAS,EAAEU,mBAAmB,QAAQ,yBAAsB;AACrE,SAASC,kBAAkB,QAAQ,kCAA+B;AAClE,SAASC,SAAS,EAAEC,iBAAiB,EAAEC,qBAAqB,QAAQ,yBAAsB;AAC1F,SAASC,UAAU,QAAQ,0BAAuB;AAGlD;AACA;AACA;AACA,SACIC,cAAc,EACdC,eAAe,EACfC,cAAc,EACdC,WAAW,EACXC,iBAAiB,EACjBC,kBAAkB,EAClBC,kBAAkB,EAClBC,gBAAgB,QACb,yCAAsC;AAC7C,SACIC,WAAW,EACXC,UAAU,EACVC,iBAAiB,EACjBC,cAAc,EACdC,eAAe,EACf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AgB,QAAQ,uCAAoC;AAGtF;AACA;AACA;AACA,SAASC,gBAAgB,QAAmC,gCAA6B;AACzF,SAASC,mBAAmB,QAAuC,wCAAqC;;AAExG;AACA;AACA;AACA;AACA,SACEC,iBAAiB,EACjBC,kBAAkB,EAClBC,wBAAwB,QACnB,yCAAsC","ignoreList":[]}
1
+ {"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useAuth","IdentityBoundSessionError","useAuthStore","useAccountStore","useAssetStore","useAssets","useAssetsStore","useAsset","useUploadProgress","useAssetLoading","useAssetErrors","useAssetsByApp","useAssetsByEntity","useAssetUsageCount","useIsAssetLinked","setOxyAssetInstance","useFileDownloadUrl","useFollow","useFollowerCounts","useSeedFollowStatuses","useStorage","useUserProfile","useUserProfiles","useCurrentUser","useUserById","useUserByUsername","useUsersBySessions","usePrivacySettings","useConnectedApps","useSessions","useSession","useDeviceSessions","useUserDevices","useSecurityInfo","useAccountStorageUsage","useSecurityActivity","useRecentSecurityActivity","useInfiniteSecurityActivity","useAuthMethods","useUserSubscription","useUserPayments","useUserWallet","useUserWalletTransactions","useUpdateProfile","useUploadAvatar","useUpdateAccountSettings","useUpdatePrivacySettings","useUpdateNotificationPreferences","useUpdateUserPreferences","useRevokeConnectedApp","useUploadFile","useSwitchSession","useLogoutSession","useLogoutAll","useUpdateDeviceName","useRemoveDevice","createProfileMutation","createGenericMutation","mutationKeys","queryKeys","invalidateAccountQueries","invalidateUserQueries","invalidateSessionQueries","invalidateDeviceQueries","invalidatePrivacyQueries","invalidateSecurityQueries","invalidateStorageQueries","invalidatePaymentsQueries","invalidateConnectedAppsQueries","invalidateAuthMethodsQueries","upsertCachedUser","upsertCachedUsers","useMutationStatus","useOnlineStatus","useOxyEvent","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage","useFileFiltering","pushTokenPlatform","hasNotificationPermission","requestNotificationPermission","getExpoPushToken","takeLaunchNotificationData","installForegroundNotificationHandler","subscribeToNotificationResponses","OXY_OAUTH_STATE_STORAGE_KEY","OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY","OxySignInButton","openOAuthPopup","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxyAuthChooser","OxySignInRequestSurface","useSwitchableAccounts","ProfileScreen","ManageAccountScreen","NotificationsScreen","PreferencesScreen","ConnectedAppsScreen","CreateAccountScreen","AccountMembersScreen","AccountSettingsScreen","showBottomSheet","closeBottomSheet","useSurfaceHeader","SurfaceHeaderAction","openAccountDialog","closeAccountDialog","subscribeToAccountDialog"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;AAEA,SAASA,aAAa,QAAyB,aAAa;AAC5D,SAASC,QAAQ,QAAQ,cAAc;AACvCD,aAAa,CAACC,QAAQ,CAACC,EAAgB,CAAC;;AAExC;AACA;AACA;AACA,SAASC,OAAO,IAAIC,WAAW,QAAQ,gCAA6B;AACpE,SAASC,MAAM,QAAQ,4BAAyB;AAEhD,SAASC,OAAO,QAAQ,uBAAoB;AAE5C;AACA;AACA;AACA,SAASC,yBAAyB,QAAQ,iCAA8B;;AAExE;AACA;AACA;AACA,SAASC,YAAY,QAAQ,0BAAuB;AACpD,SAASC,eAAe,QAAQ,6BAA0B;AAC1D,SACIC,aAAa,EACbC,SAAS,IAAIC,cAAc,EAC3BC,QAAQ,EACRC,iBAAiB,EACjBC,eAAe,EACfC,cAAc,EACdC,cAAc,EACdC,iBAAiB,EACjBC,kBAAkB,EAClBC,gBAAgB,QACb,2BAAwB;;AAE/B;AACA;AACA;AACA,SAAST,SAAS,EAAEU,mBAAmB,QAAQ,yBAAsB;AACrE,SAASC,kBAAkB,QAAQ,kCAA+B;AAClE,SAASC,SAAS,EAAEC,iBAAiB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