@oxyhq/services 22.12.4 → 22.12.7

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 (639) hide show
  1. package/README.md +16 -46
  2. package/lib/commonjs/index.js +84 -10
  3. package/lib/commonjs/index.js.map +1 -1
  4. package/lib/commonjs/notifications/deviceNotifications.js +380 -0
  5. package/lib/commonjs/notifications/deviceNotifications.js.map +1 -0
  6. package/lib/commonjs/ui/boot/runProviderColdBoot.js +51 -9
  7. package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
  8. package/lib/commonjs/ui/client.js +0 -13
  9. package/lib/commonjs/ui/client.js.map +1 -1
  10. package/lib/commonjs/ui/components/AvatarCameraBadge.js +3 -2
  11. package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -1
  12. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +14 -3
  13. package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
  14. package/lib/commonjs/ui/components/OxyAuthChooser.js +70 -1121
  15. package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
  16. package/lib/commonjs/ui/components/OxyConsentScreen.js +50 -12
  17. package/lib/commonjs/ui/components/OxyConsentScreen.js.map +1 -1
  18. package/lib/commonjs/ui/components/OxyProvider.js +4 -4
  19. package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
  20. package/lib/commonjs/ui/components/OxySignInButton.js +74 -40
  21. package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
  22. package/lib/commonjs/ui/components/OxySignInRequestSurface.js +147 -0
  23. package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -0
  24. package/lib/commonjs/ui/components/ProfileButton.js +4 -3
  25. package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
  26. package/lib/commonjs/ui/components/SettingsIcon.js +3 -2
  27. package/lib/commonjs/ui/components/SettingsIcon.js.map +1 -1
  28. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +527 -0
  29. package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -0
  30. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js +90 -0
  31. package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -0
  32. package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +106 -0
  33. package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -0
  34. package/lib/commonjs/ui/components/authChooser/SignUpView.js +188 -0
  35. package/lib/commonjs/ui/components/authChooser/SignUpView.js.map +1 -0
  36. package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +61 -0
  37. package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
  38. package/lib/commonjs/ui/components/authChooser/primitives.js +170 -0
  39. package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -0
  40. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +153 -0
  41. package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -0
  42. package/lib/commonjs/ui/components/authChooser/signInProgress.js +54 -0
  43. package/lib/commonjs/ui/components/authChooser/signInProgress.js.map +1 -0
  44. package/lib/commonjs/ui/components/{oxyAuthChooserStyles.js → authChooser/styles.js} +19 -1
  45. package/lib/commonjs/ui/components/authChooser/styles.js.map +1 -0
  46. package/lib/commonjs/ui/components/authChooser/types.js +70 -0
  47. package/lib/commonjs/ui/components/authChooser/types.js.map +1 -0
  48. package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js +50 -0
  49. package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js.map +1 -0
  50. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +3 -2
  51. package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
  52. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +3 -2
  53. package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  54. package/lib/commonjs/ui/components/fileManagement/FileViewer.js +15 -14
  55. package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
  56. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +6 -5
  57. package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
  58. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +3 -2
  59. package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
  60. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +6 -6
  61. package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  62. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +5 -5
  63. package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
  64. package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +10 -9
  65. package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
  66. package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +4 -3
  67. package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
  68. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +6 -5
  69. package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  70. package/lib/commonjs/ui/context/OxyContext.js +200 -29
  71. package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
  72. package/lib/commonjs/ui/context/commitSessionFlow.js +43 -0
  73. package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
  74. package/lib/commonjs/ui/context/useOxyAccountGraph.js +13 -5
  75. package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
  76. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +6 -1
  77. package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +1 -1
  78. package/lib/commonjs/ui/index.js +0 -13
  79. package/lib/commonjs/ui/index.js.map +1 -1
  80. package/lib/commonjs/ui/oauth/browserAuthTransport.js +168 -0
  81. package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -0
  82. package/lib/commonjs/ui/oauth/completeOAuthCode.js +78 -0
  83. package/lib/commonjs/ui/oauth/completeOAuthCode.js.map +1 -0
  84. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +48 -0
  85. package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +1 -0
  86. package/lib/commonjs/ui/oauth/oauthHandshake.js +53 -0
  87. package/lib/commonjs/ui/oauth/oauthHandshake.js.map +1 -0
  88. package/lib/commonjs/ui/oauth/oauthPopup.js +229 -0
  89. package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -0
  90. package/lib/commonjs/ui/oauth/oauthPopupMessages.js +141 -0
  91. package/lib/commonjs/ui/oauth/oauthPopupMessages.js.map +1 -0
  92. package/lib/commonjs/ui/oauth/types.js +2 -0
  93. package/lib/commonjs/ui/oauth/types.js.map +1 -0
  94. package/lib/commonjs/ui/screens/AccountMembersScreen.js +4 -3
  95. package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
  96. package/lib/commonjs/ui/screens/CreateAccountScreen.js +7 -6
  97. package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
  98. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +4 -3
  99. package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
  100. package/lib/commonjs/ui/screens/FAQScreen.js +3 -2
  101. package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
  102. package/lib/commonjs/ui/screens/FeedbackScreen.js +11 -10
  103. package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
  104. package/lib/commonjs/ui/screens/FileManagementScreen.js +19 -18
  105. package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
  106. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -3
  107. package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
  108. package/lib/commonjs/ui/screens/ManageAccountScreen.js +2 -2
  109. package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
  110. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -3
  111. package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
  112. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +9 -8
  113. package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  114. package/lib/commonjs/ui/screens/ProfileScreen.js +10 -10
  115. package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
  116. package/lib/commonjs/ui/screens/UserListScreen.js +3 -3
  117. package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
  118. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +3 -2
  119. package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  120. package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +4 -3
  121. package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
  122. package/lib/commonjs/ui/screens/fileManagement/FileListSection.js +4 -3
  123. package/lib/commonjs/ui/screens/fileManagement/FileListSection.js.map +1 -1
  124. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +4 -3
  125. package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  126. package/lib/commonjs/ui/screens/fileManagement/UploadBar.js +3 -2
  127. package/lib/commonjs/ui/screens/fileManagement/UploadBar.js.map +1 -1
  128. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +3 -2
  129. package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  130. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +4 -3
  131. package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  132. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -3
  133. package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  134. package/lib/commonjs/ui/server.js +2 -5
  135. package/lib/commonjs/ui/server.js.map +1 -1
  136. package/lib/commonjs/ui/session/authStore.js +6 -75
  137. package/lib/commonjs/ui/session/authStore.js.map +1 -1
  138. package/lib/commonjs/ui/session/createSessionClient.js +11 -3
  139. package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
  140. package/lib/commonjs/ui/session/identityBinding.js +95 -0
  141. package/lib/commonjs/ui/session/identityBinding.js.map +1 -0
  142. package/lib/commonjs/ui/session/index.js +13 -0
  143. package/lib/commonjs/ui/session/index.js.map +1 -1
  144. package/lib/commonjs/ui/session/nativeSecureStorage.js +90 -0
  145. package/lib/commonjs/ui/session/nativeSecureStorage.js.map +1 -0
  146. package/lib/commonjs/ui/session/tokenTransport.js +11 -1
  147. package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
  148. package/lib/commonjs/ui/utils/crossOriginRestore.js +3 -2
  149. package/lib/commonjs/ui/utils/crossOriginRestore.js.map +1 -1
  150. package/lib/commonjs/ui/utils/deliveryPlatform.js +58 -0
  151. package/lib/commonjs/ui/utils/deliveryPlatform.js.map +1 -0
  152. package/lib/commonjs/ui/utils/oauthReturn.js +70 -46
  153. package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
  154. package/lib/module/index.js +27 -4
  155. package/lib/module/index.js.map +1 -1
  156. package/lib/module/notifications/deviceNotifications.js +371 -0
  157. package/lib/module/notifications/deviceNotifications.js.map +1 -0
  158. package/lib/module/ui/boot/runProviderColdBoot.js +51 -9
  159. package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
  160. package/lib/module/ui/client.js +0 -1
  161. package/lib/module/ui/client.js.map +1 -1
  162. package/lib/module/ui/components/AvatarCameraBadge.js +1 -1
  163. package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -1
  164. package/lib/module/ui/components/OxyAccountDialogScreen.js +14 -3
  165. package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
  166. package/lib/module/ui/components/OxyAuthChooser.js +74 -1126
  167. package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
  168. package/lib/module/ui/components/OxyConsentScreen.js +50 -12
  169. package/lib/module/ui/components/OxyConsentScreen.js.map +1 -1
  170. package/lib/module/ui/components/OxyProvider.js +4 -4
  171. package/lib/module/ui/components/OxyProvider.js.map +1 -1
  172. package/lib/module/ui/components/OxySignInButton.js +76 -42
  173. package/lib/module/ui/components/OxySignInButton.js.map +1 -1
  174. package/lib/module/ui/components/OxySignInRequestSurface.js +141 -0
  175. package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -0
  176. package/lib/module/ui/components/ProfileButton.js +1 -1
  177. package/lib/module/ui/components/ProfileButton.js.map +1 -1
  178. package/lib/module/ui/components/SettingsIcon.js +1 -1
  179. package/lib/module/ui/components/SettingsIcon.js.map +1 -1
  180. package/lib/module/ui/components/authChooser/AccountsMenuView.js +523 -0
  181. package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -0
  182. package/lib/module/ui/components/authChooser/SignInEntryView.js +85 -0
  183. package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -0
  184. package/lib/module/ui/components/authChooser/SignInRequestView.js +101 -0
  185. package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -0
  186. package/lib/module/ui/components/authChooser/SignUpView.js +184 -0
  187. package/lib/module/ui/components/authChooser/SignUpView.js.map +1 -0
  188. package/lib/module/ui/components/authChooser/TroubleDisclosure.js +57 -0
  189. package/lib/module/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
  190. package/lib/module/ui/components/authChooser/primitives.js +163 -0
  191. package/lib/module/ui/components/authChooser/primitives.js.map +1 -0
  192. package/lib/module/ui/components/authChooser/requestSurfaces.js +143 -0
  193. package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -0
  194. package/lib/module/ui/components/authChooser/signInProgress.js +50 -0
  195. package/lib/module/ui/components/authChooser/signInProgress.js.map +1 -0
  196. package/lib/module/ui/components/{oxyAuthChooserStyles.js → authChooser/styles.js} +19 -1
  197. package/lib/module/ui/components/authChooser/styles.js.map +1 -0
  198. package/lib/module/ui/components/authChooser/types.js +66 -0
  199. package/lib/module/ui/components/authChooser/types.js.map +1 -0
  200. package/lib/module/ui/components/authChooser/useUsernameAvailability.js +46 -0
  201. package/lib/module/ui/components/authChooser/useUsernameAvailability.js.map +1 -0
  202. package/lib/module/ui/components/fileManagement/AnimatedButton.js +1 -1
  203. package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
  204. package/lib/module/ui/components/fileManagement/FileDetailsModal.js +1 -1
  205. package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
  206. package/lib/module/ui/components/fileManagement/FileViewer.js +1 -1
  207. package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
  208. package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
  209. package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
  210. package/lib/module/ui/components/modals/DeleteAccountModal.js +1 -1
  211. package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
  212. package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
  213. package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
  214. package/lib/module/ui/components/payment/PaymentMethodStep.js +1 -1
  215. package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
  216. package/lib/module/ui/components/payment/PaymentReviewStep.js +1 -1
  217. package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
  218. package/lib/module/ui/components/payment/PaymentSuccessStep.js +1 -1
  219. package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
  220. package/lib/module/ui/components/payment/PaymentSummaryStep.js +1 -1
  221. package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
  222. package/lib/module/ui/context/OxyContext.js +203 -32
  223. package/lib/module/ui/context/OxyContext.js.map +1 -1
  224. package/lib/module/ui/context/commitSessionFlow.js +42 -0
  225. package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
  226. package/lib/module/ui/context/useOxyAccountGraph.js +13 -5
  227. package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
  228. package/lib/module/ui/hooks/useSwitchableAccounts.js +6 -1
  229. package/lib/module/ui/hooks/useSwitchableAccounts.js.map +1 -1
  230. package/lib/module/ui/index.js +0 -1
  231. package/lib/module/ui/index.js.map +1 -1
  232. package/lib/module/ui/oauth/browserAuthTransport.js +165 -0
  233. package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -0
  234. package/lib/module/ui/oauth/completeOAuthCode.js +75 -0
  235. package/lib/module/ui/oauth/completeOAuthCode.js.map +1 -0
  236. package/lib/module/ui/oauth/legacyRedirectLanes.js +44 -0
  237. package/lib/module/ui/oauth/legacyRedirectLanes.js.map +1 -0
  238. package/lib/module/ui/oauth/oauthHandshake.js +50 -0
  239. package/lib/module/ui/oauth/oauthHandshake.js.map +1 -0
  240. package/lib/module/ui/oauth/oauthPopup.js +221 -0
  241. package/lib/module/ui/oauth/oauthPopup.js.map +1 -0
  242. package/lib/module/ui/oauth/oauthPopupMessages.js +135 -0
  243. package/lib/module/ui/oauth/oauthPopupMessages.js.map +1 -0
  244. package/lib/module/ui/oauth/types.js +2 -0
  245. package/lib/module/ui/oauth/types.js.map +1 -0
  246. package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
  247. package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
  248. package/lib/module/ui/screens/CreateAccountScreen.js +1 -1
  249. package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
  250. package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
  251. package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
  252. package/lib/module/ui/screens/FAQScreen.js +1 -1
  253. package/lib/module/ui/screens/FAQScreen.js.map +1 -1
  254. package/lib/module/ui/screens/FeedbackScreen.js +1 -1
  255. package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
  256. package/lib/module/ui/screens/FileManagementScreen.js +2 -1
  257. package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
  258. package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
  259. package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
  260. package/lib/module/ui/screens/ManageAccountScreen.js +1 -1
  261. package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
  262. package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
  263. package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
  264. package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1 -1
  265. package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
  266. package/lib/module/ui/screens/ProfileScreen.js +1 -1
  267. package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
  268. package/lib/module/ui/screens/UserListScreen.js +1 -1
  269. package/lib/module/ui/screens/UserListScreen.js.map +1 -1
  270. package/lib/module/ui/screens/WelcomeNewUserScreen.js +1 -1
  271. package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
  272. package/lib/module/ui/screens/fileManagement/FileLibraryError.js +1 -1
  273. package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
  274. package/lib/module/ui/screens/fileManagement/FileListSection.js +1 -1
  275. package/lib/module/ui/screens/fileManagement/FileListSection.js.map +1 -1
  276. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +2 -1
  277. package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
  278. package/lib/module/ui/screens/fileManagement/UploadBar.js +1 -1
  279. package/lib/module/ui/screens/fileManagement/UploadBar.js.map +1 -1
  280. package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
  281. package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
  282. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +1 -1
  283. package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
  284. package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
  285. package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
  286. package/lib/module/ui/server.js +0 -2
  287. package/lib/module/ui/server.js.map +1 -1
  288. package/lib/module/ui/session/authStore.js +5 -75
  289. package/lib/module/ui/session/authStore.js.map +1 -1
  290. package/lib/module/ui/session/createSessionClient.js +11 -3
  291. package/lib/module/ui/session/createSessionClient.js.map +1 -1
  292. package/lib/module/ui/session/identityBinding.js +89 -0
  293. package/lib/module/ui/session/identityBinding.js.map +1 -0
  294. package/lib/module/ui/session/index.js +5 -2
  295. package/lib/module/ui/session/index.js.map +1 -1
  296. package/lib/module/ui/session/nativeSecureStorage.js +88 -0
  297. package/lib/module/ui/session/nativeSecureStorage.js.map +1 -0
  298. package/lib/module/ui/session/tokenTransport.js +11 -1
  299. package/lib/module/ui/session/tokenTransport.js.map +1 -1
  300. package/lib/module/ui/utils/crossOriginRestore.js +4 -3
  301. package/lib/module/ui/utils/crossOriginRestore.js.map +1 -1
  302. package/lib/module/ui/utils/deliveryPlatform.js +55 -0
  303. package/lib/module/ui/utils/deliveryPlatform.js.map +1 -0
  304. package/lib/module/ui/utils/oauthReturn.js +70 -46
  305. package/lib/module/ui/utils/oauthReturn.js.map +1 -1
  306. package/lib/typescript/commonjs/index.d.ts +9 -1
  307. package/lib/typescript/commonjs/index.d.ts.map +1 -1
  308. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +141 -0
  309. package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -0
  310. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +34 -2
  311. package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  312. package/lib/typescript/commonjs/ui/client.d.ts +0 -1
  313. package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
  314. package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  315. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +16 -29
  316. package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
  317. package/lib/typescript/commonjs/ui/components/OxyConsentScreen.d.ts.map +1 -1
  318. package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
  319. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +17 -12
  320. package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
  321. package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts +108 -0
  322. package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
  323. package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts +1 -1
  324. package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts.map +1 -1
  325. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts +38 -0
  326. package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -0
  327. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts +32 -0
  328. package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -0
  329. package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +34 -0
  330. package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -0
  331. package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts +34 -0
  332. package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts.map +1 -0
  333. package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +36 -0
  334. package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -0
  335. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +55 -0
  336. package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -0
  337. package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +58 -0
  338. package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -0
  339. package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts +26 -0
  340. package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts.map +1 -0
  341. package/lib/typescript/{module/ui/components/oxyAuthChooserStyles.d.ts → commonjs/ui/components/authChooser/styles.d.ts} +19 -1
  342. package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts.map +1 -0
  343. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +103 -0
  344. package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -0
  345. package/lib/typescript/commonjs/ui/components/authChooser/useUsernameAvailability.d.ts +16 -0
  346. package/lib/typescript/commonjs/ui/components/authChooser/useUsernameAvailability.d.ts.map +1 -0
  347. package/lib/typescript/commonjs/ui/components/payment/types.d.ts +1 -1
  348. package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
  349. package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
  350. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +40 -0
  351. package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
  352. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +44 -1
  353. package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
  354. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +7 -1
  355. package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  356. package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
  357. package/lib/typescript/commonjs/ui/index.d.ts +0 -1
  358. package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
  359. package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts +56 -0
  360. package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -0
  361. package/lib/typescript/commonjs/ui/oauth/completeOAuthCode.d.ts +49 -0
  362. package/lib/typescript/commonjs/ui/oauth/completeOAuthCode.d.ts.map +1 -0
  363. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +40 -0
  364. package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
  365. package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts +50 -0
  366. package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts.map +1 -0
  367. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +77 -0
  368. package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -0
  369. package/lib/typescript/commonjs/ui/oauth/oauthPopupMessages.d.ts +67 -0
  370. package/lib/typescript/commonjs/ui/oauth/oauthPopupMessages.d.ts.map +1 -0
  371. package/lib/typescript/commonjs/ui/oauth/types.d.ts +176 -0
  372. package/lib/typescript/commonjs/ui/oauth/types.d.ts.map +1 -0
  373. package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
  374. package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
  375. package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
  376. package/lib/typescript/commonjs/ui/server.d.ts +0 -2
  377. package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
  378. package/lib/typescript/commonjs/ui/session/authStore.d.ts +3 -7
  379. package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
  380. package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +8 -1
  381. package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
  382. package/lib/typescript/commonjs/ui/session/identityBinding.d.ts +66 -0
  383. package/lib/typescript/commonjs/ui/session/identityBinding.d.ts.map +1 -0
  384. package/lib/typescript/commonjs/ui/session/index.d.ts +6 -2
  385. package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
  386. package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts +25 -0
  387. package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts.map +1 -0
  388. package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +8 -1
  389. package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
  390. package/lib/typescript/commonjs/ui/types/navigation.d.ts +44 -0
  391. package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
  392. package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +1 -1
  393. package/lib/typescript/commonjs/ui/utils/deliveryPlatform.d.ts +33 -0
  394. package/lib/typescript/commonjs/ui/utils/deliveryPlatform.d.ts.map +1 -0
  395. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +1 -1
  396. package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
  397. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +30 -16
  398. package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
  399. package/lib/typescript/module/index.d.ts +9 -1
  400. package/lib/typescript/module/index.d.ts.map +1 -1
  401. package/lib/typescript/module/notifications/deviceNotifications.d.ts +141 -0
  402. package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -0
  403. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +34 -2
  404. package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
  405. package/lib/typescript/module/ui/client.d.ts +0 -1
  406. package/lib/typescript/module/ui/client.d.ts.map +1 -1
  407. package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
  408. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +16 -29
  409. package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
  410. package/lib/typescript/module/ui/components/OxyConsentScreen.d.ts.map +1 -1
  411. package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
  412. package/lib/typescript/module/ui/components/OxySignInButton.d.ts +17 -12
  413. package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
  414. package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts +108 -0
  415. package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
  416. package/lib/typescript/module/ui/components/SettingsIcon.d.ts +1 -1
  417. package/lib/typescript/module/ui/components/SettingsIcon.d.ts.map +1 -1
  418. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts +38 -0
  419. package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -0
  420. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts +32 -0
  421. package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -0
  422. package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +34 -0
  423. package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -0
  424. package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts +34 -0
  425. package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts.map +1 -0
  426. package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +36 -0
  427. package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -0
  428. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +55 -0
  429. package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -0
  430. package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +58 -0
  431. package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -0
  432. package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts +26 -0
  433. package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts.map +1 -0
  434. package/lib/typescript/{commonjs/ui/components/oxyAuthChooserStyles.d.ts → module/ui/components/authChooser/styles.d.ts} +19 -1
  435. package/lib/typescript/module/ui/components/authChooser/styles.d.ts.map +1 -0
  436. package/lib/typescript/module/ui/components/authChooser/types.d.ts +103 -0
  437. package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -0
  438. package/lib/typescript/module/ui/components/authChooser/useUsernameAvailability.d.ts +16 -0
  439. package/lib/typescript/module/ui/components/authChooser/useUsernameAvailability.d.ts.map +1 -0
  440. package/lib/typescript/module/ui/components/payment/types.d.ts +1 -1
  441. package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
  442. package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
  443. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +40 -0
  444. package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
  445. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +44 -1
  446. package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
  447. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +7 -1
  448. package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
  449. package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
  450. package/lib/typescript/module/ui/index.d.ts +0 -1
  451. package/lib/typescript/module/ui/index.d.ts.map +1 -1
  452. package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts +56 -0
  453. package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -0
  454. package/lib/typescript/module/ui/oauth/completeOAuthCode.d.ts +49 -0
  455. package/lib/typescript/module/ui/oauth/completeOAuthCode.d.ts.map +1 -0
  456. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +40 -0
  457. package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
  458. package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts +50 -0
  459. package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts.map +1 -0
  460. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +77 -0
  461. package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -0
  462. package/lib/typescript/module/ui/oauth/oauthPopupMessages.d.ts +67 -0
  463. package/lib/typescript/module/ui/oauth/oauthPopupMessages.d.ts.map +1 -0
  464. package/lib/typescript/module/ui/oauth/types.d.ts +176 -0
  465. package/lib/typescript/module/ui/oauth/types.d.ts.map +1 -0
  466. package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
  467. package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
  468. package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
  469. package/lib/typescript/module/ui/server.d.ts +0 -2
  470. package/lib/typescript/module/ui/server.d.ts.map +1 -1
  471. package/lib/typescript/module/ui/session/authStore.d.ts +3 -7
  472. package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
  473. package/lib/typescript/module/ui/session/createSessionClient.d.ts +8 -1
  474. package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
  475. package/lib/typescript/module/ui/session/identityBinding.d.ts +66 -0
  476. package/lib/typescript/module/ui/session/identityBinding.d.ts.map +1 -0
  477. package/lib/typescript/module/ui/session/index.d.ts +6 -2
  478. package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
  479. package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts +25 -0
  480. package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts.map +1 -0
  481. package/lib/typescript/module/ui/session/tokenTransport.d.ts +8 -1
  482. package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
  483. package/lib/typescript/module/ui/types/navigation.d.ts +44 -0
  484. package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
  485. package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -1
  486. package/lib/typescript/module/ui/utils/deliveryPlatform.d.ts +33 -0
  487. package/lib/typescript/module/ui/utils/deliveryPlatform.d.ts.map +1 -0
  488. package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
  489. package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
  490. package/lib/typescript/module/ui/utils/oauthReturn.d.ts +30 -16
  491. package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
  492. package/package.json +15 -7
  493. package/src/index.ts +50 -5
  494. package/src/notifications/deviceNotifications.ts +395 -0
  495. package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +281 -0
  496. package/src/ui/boot/runProviderColdBoot.ts +83 -13
  497. package/src/ui/client.ts +0 -1
  498. package/src/ui/components/AvatarCameraBadge.tsx +1 -1
  499. package/src/ui/components/OxyAccountDialogScreen.tsx +20 -3
  500. package/src/ui/components/OxyAuthChooser.tsx +91 -1230
  501. package/src/ui/components/OxyConsentScreen.tsx +56 -13
  502. package/src/ui/components/OxyProvider.tsx +4 -4
  503. package/src/ui/components/OxySignInButton.tsx +119 -78
  504. package/src/ui/components/OxySignInRequestSurface.tsx +202 -0
  505. package/src/ui/components/ProfileButton.tsx +1 -1
  506. package/src/ui/components/SettingsIcon.tsx +1 -1
  507. package/src/ui/components/__tests__/OxyConsentScreen.test.tsx +27 -0
  508. package/src/ui/components/authChooser/AccountsMenuView.tsx +569 -0
  509. package/src/ui/components/authChooser/SignInEntryView.tsx +121 -0
  510. package/src/ui/components/authChooser/SignInRequestView.tsx +130 -0
  511. package/src/ui/components/authChooser/SignUpView.tsx +174 -0
  512. package/src/ui/components/authChooser/TroubleDisclosure.tsx +73 -0
  513. package/src/ui/components/authChooser/primitives.tsx +144 -0
  514. package/src/ui/components/authChooser/requestSurfaces.tsx +120 -0
  515. package/src/ui/components/authChooser/signInProgress.ts +54 -0
  516. package/src/ui/components/{oxyAuthChooserStyles.ts → authChooser/styles.ts} +18 -0
  517. package/src/ui/components/authChooser/types.ts +120 -0
  518. package/src/ui/components/authChooser/useUsernameAvailability.ts +60 -0
  519. package/src/ui/components/fileManagement/AnimatedButton.tsx +1 -1
  520. package/src/ui/components/fileManagement/FileDetailsModal.tsx +1 -1
  521. package/src/ui/components/fileManagement/FileViewer.tsx +1 -1
  522. package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
  523. package/src/ui/components/modals/DeleteAccountModal.tsx +1 -1
  524. package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
  525. package/src/ui/components/payment/PaymentMethodStep.tsx +1 -1
  526. package/src/ui/components/payment/PaymentReviewStep.tsx +1 -1
  527. package/src/ui/components/payment/PaymentSuccessStep.tsx +1 -1
  528. package/src/ui/components/payment/PaymentSummaryStep.tsx +1 -1
  529. package/src/ui/components/payment/types.ts +1 -1
  530. package/src/ui/context/OxyContext.tsx +220 -24
  531. package/src/ui/context/__tests__/commitSessionFlow.test.ts +89 -0
  532. package/src/ui/context/commitSessionFlow.ts +61 -0
  533. package/src/ui/context/oxyContextTypes.ts +45 -1
  534. package/src/ui/context/useOxyAccountGraph.ts +19 -5
  535. package/src/ui/hooks/useSwitchableAccounts.ts +12 -1
  536. package/src/ui/index.ts +0 -1
  537. package/src/ui/oauth/__tests__/browserAuthTransport.test.ts +335 -0
  538. package/src/ui/oauth/__tests__/completeOAuthCode.test.ts +142 -0
  539. package/src/ui/oauth/__tests__/oauthPopup.test.ts +326 -0
  540. package/src/ui/oauth/__tests__/oauthPopupMessages.test.ts +189 -0
  541. package/src/ui/oauth/__tests__/sharedCompletionPath.test.ts +174 -0
  542. package/src/ui/oauth/browserAuthTransport.ts +187 -0
  543. package/src/ui/oauth/completeOAuthCode.ts +93 -0
  544. package/src/ui/oauth/legacyRedirectLanes.ts +43 -0
  545. package/src/ui/oauth/oauthHandshake.ts +74 -0
  546. package/src/ui/oauth/oauthPopup.ts +219 -0
  547. package/src/ui/oauth/oauthPopupMessages.ts +136 -0
  548. package/src/ui/oauth/types.ts +150 -0
  549. package/src/ui/screens/AccountMembersScreen.tsx +1 -1
  550. package/src/ui/screens/CreateAccountScreen.tsx +1 -1
  551. package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
  552. package/src/ui/screens/FAQScreen.tsx +1 -1
  553. package/src/ui/screens/FeedbackScreen.tsx +2 -1
  554. package/src/ui/screens/FileManagementScreen.tsx +2 -1
  555. package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
  556. package/src/ui/screens/ManageAccountScreen.tsx +1 -1
  557. package/src/ui/screens/PaymentGatewayScreen.tsx +1 -1
  558. package/src/ui/screens/PremiumSubscriptionScreen.tsx +1 -1
  559. package/src/ui/screens/ProfileScreen.tsx +1 -1
  560. package/src/ui/screens/UserListScreen.tsx +1 -1
  561. package/src/ui/screens/WelcomeNewUserScreen.tsx +1 -1
  562. package/src/ui/screens/fileManagement/FileLibraryError.tsx +1 -1
  563. package/src/ui/screens/fileManagement/FileListSection.tsx +1 -1
  564. package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +2 -1
  565. package/src/ui/screens/fileManagement/UploadBar.tsx +1 -1
  566. package/src/ui/screens/trust/TrustCenterScreen.tsx +1 -1
  567. package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +1 -1
  568. package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
  569. package/src/ui/server.ts +0 -2
  570. package/src/ui/session/__tests__/createSessionClient.test.ts +26 -0
  571. package/src/ui/session/__tests__/tokenTransport.test.ts +34 -0
  572. package/src/ui/session/authStore.ts +5 -89
  573. package/src/ui/session/createSessionClient.ts +15 -2
  574. package/src/ui/session/identityBinding.ts +116 -0
  575. package/src/ui/session/index.ts +6 -2
  576. package/src/ui/session/nativeSecureStorage.ts +98 -0
  577. package/src/ui/session/tokenTransport.ts +14 -1
  578. package/src/ui/types/navigation.ts +44 -1
  579. package/src/ui/utils/crossOriginRestore.ts +4 -7
  580. package/src/ui/utils/deliveryPlatform.ts +65 -0
  581. package/src/ui/utils/fileManagement.ts +1 -1
  582. package/src/ui/utils/oauthReturn.ts +74 -65
  583. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  584. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  585. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  586. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  587. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  588. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  589. package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  590. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  591. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  592. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  593. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  594. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  595. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  596. package/lib/commonjs/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  597. package/lib/commonjs/ui/components/FontLoader.js +0 -35
  598. package/lib/commonjs/ui/components/FontLoader.js.map +0 -1
  599. package/lib/commonjs/ui/components/FontLoader.native.js +0 -88
  600. package/lib/commonjs/ui/components/FontLoader.native.js.map +0 -1
  601. package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +0 -1
  602. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  603. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  604. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  605. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  606. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  607. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  608. package/lib/module/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  609. package/lib/module/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  610. package/lib/module/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  611. package/lib/module/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  612. package/lib/module/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  613. package/lib/module/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  614. package/lib/module/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  615. package/lib/module/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  616. package/lib/module/ui/components/FontLoader.js +0 -29
  617. package/lib/module/ui/components/FontLoader.js.map +0 -1
  618. package/lib/module/ui/components/FontLoader.native.js +0 -83
  619. package/lib/module/ui/components/FontLoader.native.js.map +0 -1
  620. package/lib/module/ui/components/oxyAuthChooserStyles.js.map +0 -1
  621. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +0 -24
  622. package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +0 -1
  623. package/lib/typescript/commonjs/ui/components/FontLoader.native.d.ts +0 -13
  624. package/lib/typescript/commonjs/ui/components/FontLoader.native.d.ts.map +0 -1
  625. package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +0 -1
  626. package/lib/typescript/module/ui/components/FontLoader.d.ts +0 -24
  627. package/lib/typescript/module/ui/components/FontLoader.d.ts.map +0 -1
  628. package/lib/typescript/module/ui/components/FontLoader.native.d.ts +0 -13
  629. package/lib/typescript/module/ui/components/FontLoader.native.d.ts.map +0 -1
  630. package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +0 -1
  631. package/src/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
  632. package/src/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
  633. package/src/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
  634. package/src/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
  635. package/src/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
  636. package/src/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
  637. package/src/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
  638. package/src/ui/components/FontLoader.native.tsx +0 -88
  639. package/src/ui/components/FontLoader.tsx +0 -27
@@ -36,10 +36,10 @@ setPlatformOS(Platform.OS);
36
36
  export { default as OxyProvider } from "./ui/components/OxyProvider.js";
37
37
  export { useOxy } from "./ui/context/OxyContext.js";
38
38
  export { useAuth } from "./ui/hooks/useAuth.js";
39
- // ---------------------------------------------------------------------------
40
- // Font loading
41
- // ---------------------------------------------------------------------------
42
- export { FontLoader, setupFonts } from './ui/components/FontLoader';
39
+ // Thrown by `switchToAccount` / `switchSession` while `OxyProvider` runs with
40
+ // `sessionMode="identity"` — an identity-bound app authenticates as the owner of
41
+ // the local identity key and cannot switch accounts.
42
+ export { IdentityBoundSessionError } from "./ui/session/identityBinding.js";
43
43
 
44
44
  // ---------------------------------------------------------------------------
45
45
  // Zustand stores
@@ -103,10 +103,24 @@ export { handleAuthError, isInvalidSessionError, isTimeoutOrNetworkError, extrac
103
103
  // ---------------------------------------------------------------------------
104
104
  export { useFileFiltering } from "./ui/hooks/useFileFiltering.js";
105
105
  // ---------------------------------------------------------------------------
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";
114
+ // ---------------------------------------------------------------------------
106
115
  // UI components
107
116
  // ---------------------------------------------------------------------------
108
117
  export { OXY_OAUTH_STATE_STORAGE_KEY, OXY_OAUTH_CODE_VERIFIER_STORAGE_KEY } from '@oxyhq/core';
109
118
  export { default as OxySignInButton } from "./ui/components/OxySignInButton.js";
119
+ // Web OAuth transport (popup / redirect). RPs that ship their own sign-in
120
+ // button call `useOxy().startWebOAuthSignIn(...)`; only the popup opener is
121
+ // exported, because it MUST run synchronously inside the press handler to keep
122
+ // the browser's user-gesture attribution.
123
+ export { openOAuthPopup } from "./ui/oauth/oauthPopup.js";
110
124
  export { OxyAuthPrompt } from "./ui/components/OxyAuthPrompt.js";
111
125
  export { OxyOAuthCallback } from "./ui/components/OxyOAuthCallback.js";
112
126
  export { OxyConsentScreen } from "./ui/components/OxyConsentScreen.js";
@@ -131,6 +145,15 @@ export { default as ProfileButton } from "./ui/components/ProfileButton.js";
131
145
  // host (e.g. a future auth.oxy.so hub page) can mount the exact same chooser
132
146
  // with its own completion strategy.
133
147
  export { default as OxyAuthChooser } from "./ui/components/OxyAuthChooser.js";
148
+ // The in-flight "Sign in with Oxy" REQUEST surface — the route's primary visual,
149
+ // the progress line, and the "Having trouble?" alternatives — as a purely
150
+ // presentational component driven by plain facts. `OxyAuthChooser` renders it
151
+ // from `AccountDialogController`'s device flow; a host with a request of its own
152
+ // (the auth.oxy.so IdP's OAuth-bound lane) renders the SAME component from its
153
+ // own facts, so there is one implementation of this surface, not two. It needs
154
+ // no controller: `route` + `progress` + `qrPayload` + the failure flags are the
155
+ // whole contract, and none of them is a secret credential.
156
+ export { OxySignInRequestSurface } from "./ui/components/OxySignInRequestSurface.js";
134
157
  // Unified switchable-accounts hook — the single source of everything the user
135
158
  // can switch into: device sign-ins AND linked graph accounts (owned orgs +
136
159
  // shared-with-you), deduped by account id and hydrated with real
@@ -1 +1 @@
1
- {"version":3,"names":["setPlatformOS","Platform","OS","default","OxyProvider","useOxy","useAuth","FontLoader","setupFonts","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","OxyAuthPrompt","OxyOAuthCallback","OxyConsentScreen","RequireOxyAuth","FollowButton","OxyPayButton","LogoIcon","LogoText","ProfileButton","OxyAuthChooser","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,S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OAAO,IAAIgG,cAAc,QAAQ,mCAAgC;AAG1E;AACA;AACA;AACA;AACA;AACA;AACA,SAASC,qBAAqB,QAAQ,qCAAkC;AAGxE;AACA,SAASjG,OAAO,IAAIkG,aAAa,QAAQ,+BAA4B;AACrE,SAASlG,OAAO,IAAImG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASnG,OAAO,IAAIoG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASpG,OAAO,IAAIqG,iBAAiB,QAAQ,mCAAgC;AAC7E,SAASrG,OAAO,IAAIsG,mBAAmB,QAAQ,qCAAkC;;AAEjF;AACA,SAAStG,OAAO,IAAIuG,mBAAmB,QAAQ,qCAAkC;AACjF,SAASvG,OAAO,IAAIwG,oBAAoB,QAAQ,sCAAmC;AACnF,SAASxG,OAAO,IAAIyG,qBAAqB,QAAQ,uCAAoC;;AAErF;AACA;AACA;AACA,SAASC,eAAe,EAAEC,gBAAgB,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;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6
+ * Every Oxy app that receives push needs the identical adapter — native-only,
7
+ * dynamically imported, reading the OS permission and minting an EXPO push
8
+ * token — so it lives here instead of being copied into each app. The
9
+ * bearer-authenticated transport (`registerPushToken` / `unregisterPushToken`)
10
+ * already lives in `@oxyhq/core`; core may never import an `expo-*` module, and
11
+ * this adapter is the Expo-side half that closes that gap.
12
+ *
13
+ * ## Native-only by construction
14
+ *
15
+ * Every entry point resolves its null/no-op result from `Platform.OS` BEFORE the
16
+ * dynamic `import()`, so a web bundle never requests `expo-notifications` at all.
17
+ * `expo-notifications` and `expo-constants` are OPTIONAL peer dependencies: an
18
+ * app that does not use push never installs them, and a build without them
19
+ * degrades to "notifications unavailable" rather than throwing at
20
+ * module-evaluation time.
21
+ *
22
+ * ## The token is an EXPO push token — never a raw device token
23
+ *
24
+ * {@link getExpoPushToken} calls `getExpoPushTokenAsync()`, which returns the
25
+ * `ExponentPushToken[…]` handle Expo's push service delivers through — the only
26
+ * form it accepts. `getDevicePushTokenAsync()` — the raw APNs/FCM token — is
27
+ * deliberately NOT used anywhere: registering one of those looks entirely
28
+ * successful (the row is stored, the endpoint returns 200) and then every push
29
+ * silently fails at delivery time. `@oxyhq/core`'s `registerPushToken` rejects a
30
+ * raw device token before sending, and this module is the reason it never has to.
31
+ *
32
+ * ## The payload is untrusted
33
+ *
34
+ * Nothing here surfaces a notification's `title` / `body` / `subtitle`. The only
35
+ * payload that leaves this module is the raw `content.data` — the routing keys —
36
+ * typed `unknown`, so a caller has to validate it before acting on it and there
37
+ * is no exported shape that invites rendering push-delivered text. The
38
+ * foreground handler likewise answers with a visibility verdict and nothing else.
39
+ */
40
+
41
+ import { createLogger } from '@oxyhq/core';
42
+ import { Platform } from 'react-native';
43
+ const log = createLogger('deviceNotifications');
44
+ function isRecord(value) {
45
+ return typeof value === 'object' && value !== null;
46
+ }
47
+
48
+ /**
49
+ * Load `expo-notifications`, or `null` when it cannot serve this platform/build.
50
+ *
51
+ * The web guard runs before the `import()`, so a web bundle never reaches for the
52
+ * native module. The dynamic import is intentional: the module registry caches
53
+ * it, so repeated calls are cheap and no module-level mutable cache is
54
+ * introduced here.
55
+ */
56
+ async function loadNotifications() {
57
+ if (Platform.OS === 'web') {
58
+ return null;
59
+ }
60
+ try {
61
+ return await import('expo-notifications');
62
+ } catch (error) {
63
+ log.warn('expo-notifications is unavailable in this build — push is disabled', {
64
+ method: 'loadNotifications'
65
+ }, error);
66
+ return null;
67
+ }
68
+ }
69
+
70
+ /**
71
+ * The EAS project id an Expo push token is minted against, or `null` when the
72
+ * app config carries none.
73
+ *
74
+ * Resolved exactly the way `expo-notifications` resolves it internally
75
+ * (`easConfig.projectId`, then `expoConfig.extra.eas.projectId`) and then handed
76
+ * BACK to `getExpoPushTokenAsync` explicitly, so the two can never disagree.
77
+ * Reading it here is what turns "no project id" from an opaque
78
+ * `ERR_NOTIFICATIONS_NO_EXPERIENCE_ID` rejection into a named, actionable state
79
+ * instead of one more entry in the indistinguishable "permission denied /
80
+ * offline" bucket.
81
+ *
82
+ * A missing `expo-constants` lands on the same `null` outcome — the single
83
+ * actionable warning is emitted once by the caller, so this path only records
84
+ * the extra detail at debug level rather than warning twice for one condition.
85
+ */
86
+ async function easProjectId() {
87
+ let constants;
88
+ try {
89
+ constants = (await import('expo-constants')).default;
90
+ } catch (error) {
91
+ log.debug('expo-constants is unavailable in this build — no EAS project id can be resolved', {
92
+ method: 'easProjectId'
93
+ }, error);
94
+ return null;
95
+ }
96
+ const fromEasConfig = constants.easConfig?.projectId;
97
+ if (typeof fromEasConfig === 'string' && fromEasConfig.length > 0) {
98
+ return fromEasConfig;
99
+ }
100
+ const extra = constants.expoConfig?.extra;
101
+ const eas = isRecord(extra) ? extra.eas : undefined;
102
+ const projectId = isRecord(eas) ? eas.projectId : undefined;
103
+ return typeof projectId === 'string' && projectId.length > 0 ? projectId : null;
104
+ }
105
+
106
+ /**
107
+ * The platform tag the push-token registry stores this installation under, or
108
+ * `null` on a platform Oxy does not deliver push to.
109
+ *
110
+ * Synchronous and import-free — the answer is a property of the bundle, not of
111
+ * any native module.
112
+ *
113
+ * Web is `null` on purpose: the registry accepts a `web` platform, but browser
114
+ * push needs a VAPID key + service-worker subscription no Oxy app has wired, so
115
+ * there is no token to register and claiming otherwise would store a row nothing
116
+ * can ever deliver to.
117
+ */
118
+ export function pushTokenPlatform() {
119
+ return Platform.OS === 'ios' || Platform.OS === 'android' ? Platform.OS : null;
120
+ }
121
+
122
+ /**
123
+ * Whether the OS notification permission is ALREADY granted.
124
+ *
125
+ * Never prompts, so an app can re-check on every cold boot without ever asking
126
+ * the user twice. Use {@link requestNotificationPermission} for the one place
127
+ * that is allowed to show the system dialog.
128
+ */
129
+ export async function hasNotificationPermission() {
130
+ const notifications = await loadNotifications();
131
+ if (!notifications) {
132
+ return false;
133
+ }
134
+ try {
135
+ const permissions = await notifications.getPermissionsAsync();
136
+ return permissions.granted === true;
137
+ } catch (error) {
138
+ log.warn('could not read the notification permission', {
139
+ method: 'hasNotificationPermission'
140
+ }, error);
141
+ return false;
142
+ }
143
+ }
144
+
145
+ /**
146
+ * Ensure the OS notification permission, prompting at most once.
147
+ *
148
+ * An installation that already answered the system dialog is never asked again:
149
+ * an already-granted permission resolves `true` without a second dialog, and a
150
+ * denial with `canAskAgain: false` resolves `false` without issuing a request
151
+ * the OS would silently ignore.
152
+ *
153
+ * @returns Whether notifications are granted once this call is done.
154
+ */
155
+ export async function requestNotificationPermission() {
156
+ const notifications = await loadNotifications();
157
+ if (!notifications) {
158
+ return false;
159
+ }
160
+ try {
161
+ const existing = await notifications.getPermissionsAsync();
162
+ if (existing.granted === true) {
163
+ return true;
164
+ }
165
+ if (existing.canAskAgain === false) {
166
+ return false;
167
+ }
168
+ const requested = await notifications.requestPermissionsAsync();
169
+ return requested.granted === true;
170
+ } catch (error) {
171
+ log.warn('the notification permission could not be resolved', {
172
+ method: 'requestNotificationPermission'
173
+ }, error);
174
+ return false;
175
+ }
176
+ }
177
+
178
+ /**
179
+ * This installation's Expo push token (`ExponentPushToken[…]`), or `null` when
180
+ * one cannot be minted.
181
+ *
182
+ * Deliberately `getExpoPushTokenAsync` — see the module header for why the raw
183
+ * device-token variant is never used.
184
+ *
185
+ * Every `null` is logged with the reason it happened. A missing EAS project id
186
+ * in particular is a BUILD MISCONFIGURATION, not a user state: no token can ever
187
+ * be minted, so push is off for every install of that build until the config is
188
+ * fixed. It is reported as such rather than blending into the
189
+ * indistinguishable "permission denied / offline" bucket.
190
+ */
191
+ export async function getExpoPushToken() {
192
+ const notifications = await loadNotifications();
193
+ if (!notifications) {
194
+ return null;
195
+ }
196
+ const projectId = await easProjectId();
197
+ if (!projectId) {
198
+ log.warn('no EAS project id in the app config (expo.extra.eas.projectId) — an Expo push token cannot be minted, so push is disabled for this build', {
199
+ method: 'getExpoPushToken'
200
+ });
201
+ return null;
202
+ }
203
+ try {
204
+ const token = await notifications.getExpoPushTokenAsync({
205
+ projectId
206
+ });
207
+ if (token.data.length === 0) {
208
+ log.warn('the Expo push service returned an empty token', {
209
+ method: 'getExpoPushToken'
210
+ });
211
+ return null;
212
+ }
213
+ return token.data;
214
+ } catch (error) {
215
+ log.warn('could not mint an Expo push token', {
216
+ method: 'getExpoPushToken'
217
+ }, error);
218
+ return null;
219
+ }
220
+ }
221
+
222
+ /**
223
+ * Take the payload of the notification that COLD-LAUNCHED the app, if any.
224
+ *
225
+ * "Take" is literal: the response is cleared from `expo-notifications` once
226
+ * read, so a listener attached later in the same launch is not handed the same
227
+ * tap again. Clearing is best-effort across OS/module versions, so a caller that
228
+ * must not act twice still needs its own idempotency ledger.
229
+ *
230
+ * @returns The raw, untrusted `content.data` of the launching notification, or
231
+ * `null`. Parsing/validation is the caller's job.
232
+ */
233
+ export async function takeLaunchNotificationData() {
234
+ const notifications = await loadNotifications();
235
+ if (!notifications) {
236
+ return null;
237
+ }
238
+ try {
239
+ const response = notifications.getLastNotificationResponse();
240
+ if (!response) {
241
+ return null;
242
+ }
243
+ const data = response.notification.request.content.data;
244
+ try {
245
+ notifications.clearLastNotificationResponse();
246
+ } catch (clearError) {
247
+ log.warn('could not clear the launching notification response', {
248
+ method: 'takeLaunchNotificationData'
249
+ }, clearError);
250
+ }
251
+ return data;
252
+ } catch (error) {
253
+ log.warn('could not read the launching notification', {
254
+ method: 'takeLaunchNotificationData'
255
+ }, error);
256
+ return null;
257
+ }
258
+ }
259
+
260
+ /**
261
+ * What the OS should do with a notification that arrives while the app is
262
+ * FOREGROUNDED.
263
+ *
264
+ * `'suppress'` is `expo-notifications`' own default for a foregrounded app, so a
265
+ * decision function that only ever returns `'show'` for the payloads it
266
+ * recognises leaves every other notification exactly as it behaves today.
267
+ */
268
+
269
+ /**
270
+ * Whether the process-wide foreground handler has already been ATTEMPTED.
271
+ *
272
+ * `setNotificationHandler` is global, last-writer-wins process state, so this is
273
+ * a one-shot install rather than something a mount/unmount cycle owns. A failed
274
+ * attempt is deliberately not retried: the only failure modes are permanent for
275
+ * the life of the process (web, a build without the native module, a native
276
+ * module that threw on registration).
277
+ *
278
+ * Module-scoped and only ever touched from an async install call — never read
279
+ * during render, so the React Compiler has no memoizable position to freeze it
280
+ * into.
281
+ */
282
+ let foregroundHandlerAttempted = false;
283
+
284
+ /**
285
+ * Install the ONE process-wide handler that decides whether an incoming
286
+ * notification is shown while the app is in the FOREGROUND.
287
+ *
288
+ * Without a handler, `expo-notifications` shows nothing at all while the app is
289
+ * open — which is exactly when a time-critical notification (a "Sign in with
290
+ * Oxy" approval request, say) matters most, because the user is already holding
291
+ * the phone.
292
+ *
293
+ * The handler ONLY decides visibility. It never navigates, never acts on the
294
+ * notification, and never reads the payload for display — `decide` is handed the
295
+ * raw, untrusted `content.data` and may answer nothing but `'show'` /
296
+ * `'suppress'`. Acting on a notification stays with a TAP, routed by
297
+ * {@link subscribeToNotificationResponses}. No notification actions/categories
298
+ * are registered here, so the banner cannot carry an action button.
299
+ *
300
+ * The one-shot latch is set BEFORE the first `await`, so concurrent callers
301
+ * cannot both reach `setNotificationHandler`.
302
+ *
303
+ * @param decide - Maps the raw, untrusted payload to a presentation verdict.
304
+ * Must not throw; a throw is reported by the OS as a handling error and the
305
+ * notification is dropped.
306
+ * @returns Whether a handler was installed by THIS call (`false` on a repeat
307
+ * call, on web, or when the native module is unavailable).
308
+ */
309
+ export async function installForegroundNotificationHandler(decide) {
310
+ if (foregroundHandlerAttempted) {
311
+ return false;
312
+ }
313
+ foregroundHandlerAttempted = true;
314
+ const notifications = await loadNotifications();
315
+ if (!notifications) {
316
+ return false;
317
+ }
318
+ try {
319
+ notifications.setNotificationHandler({
320
+ handleNotification: async notification => {
321
+ const data = notification.request.content.data;
322
+ const show = decide(data) === 'show';
323
+ return {
324
+ // Banner: the whole point — make the notification visible on screen.
325
+ shouldShowBanner: show,
326
+ // Notification centre: so the user can still review it after
327
+ // dismissing the banner.
328
+ shouldShowList: show,
329
+ // No sound: the app is foregrounded, so the user is already looking at
330
+ // the screen the banner appears on.
331
+ shouldPlaySound: false,
332
+ // Badging is an app-level unread concept this adapter has no view of.
333
+ shouldSetBadge: false
334
+ };
335
+ }
336
+ });
337
+ return true;
338
+ } catch (error) {
339
+ log.warn('could not install the foreground notification handler', {
340
+ method: 'installForegroundNotificationHandler'
341
+ }, error);
342
+ return false;
343
+ }
344
+ }
345
+
346
+ /**
347
+ * Subscribe to notification TAPS (responses) while the app is running.
348
+ *
349
+ * @param listener - Receives the raw, untrusted `content.data` of the tapped
350
+ * notification. Parsing/validation is the caller's job.
351
+ * @returns An unsubscribe function. Safe to call even if the subscription could
352
+ * not be established.
353
+ */
354
+ export async function subscribeToNotificationResponses(listener) {
355
+ const notifications = await loadNotifications();
356
+ if (!notifications) {
357
+ return () => undefined;
358
+ }
359
+ try {
360
+ const subscription = notifications.addNotificationResponseReceivedListener(response => {
361
+ listener(response.notification.request.content.data);
362
+ });
363
+ return () => subscription.remove();
364
+ } catch (error) {
365
+ log.warn('could not subscribe to notification taps', {
366
+ method: 'subscribeToNotificationResponses'
367
+ }, error);
368
+ return () => undefined;
369
+ }
370
+ }
371
+ //# sourceMappingURL=deviceNotifications.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["createLogger","Platform","log","isRecord","value","loadNotifications","OS","error","warn","method","easProjectId","constants","default","debug","fromEasConfig","easConfig","projectId","length","extra","expoConfig","eas","undefined","pushTokenPlatform","hasNotificationPermission","notifications","permissions","getPermissionsAsync","granted","requestNotificationPermission","existing","canAskAgain","requested","requestPermissionsAsync","getExpoPushToken","token","getExpoPushTokenAsync","data","takeLaunchNotificationData","response","getLastNotificationResponse","notification","request","content","clearLastNotificationResponse","clearError","foregroundHandlerAttempted","installForegroundNotificationHandler","decide","setNotificationHandler","handleNotification","show","shouldShowBanner","shouldShowList","shouldPlaySound","shouldSetBadge","subscribeToNotificationResponses","listener","subscription","addNotificationResponseReceivedListener","remove"],"sourceRoot":"../../../src","sources":["notifications/deviceNotifications.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,aAAa;AAE1C,SAASC,QAAQ,QAAQ,cAAc;AAEvC,MAAMC,GAAG,GAAGF,YAAY,CAAC,qBAAqB,CAAC;AAK/C,SAASG,QAAQA,CAACC,KAAc,EAAoC;EAClE,OAAO,OAAOA,KAAK,KAAK,QAAQ,IAAIA,KAAK,KAAK,IAAI;AACpD;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAeC,iBAAiBA,CAAA,EAAwC;EACtE,IAAIJ,QAAQ,CAACK,EAAE,KAAK,KAAK,EAAE;IACzB,OAAO,IAAI;EACb;EACA,IAAI;IACF,OAAO,MAAM,MAAM,CAAC,oBAAoB,CAAC;EAC3C,CAAC,CAAC,OAAOC,KAAK,EAAE;IACdL,GAAG,CAACM,IAAI,CAC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I;EACb,CAAC,CAAC,OAAO/C,KAAK,EAAE;IACdL,GAAG,CAACM,IAAI,CACN,uDAAuD,EACvD;MAAEC,MAAM,EAAE;IAAuC,CAAC,EAClDF,KACF,CAAC;IACD,OAAO,KAAK;EACd;AACF;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,eAAegD,gCAAgCA,CACpDC,QAAiC,EACZ;EACrB,MAAMhC,aAAa,GAAG,MAAMnB,iBAAiB,CAAC,CAAC;EAC/C,IAAI,CAACmB,aAAa,EAAE;IAClB,OAAO,MAAMH,SAAS;EACxB;EACA,IAAI;IACF,MAAMoC,YAAY,GAAGjC,aAAa,CAACkC,uCAAuC,CAAEpB,QAAQ,IAAK;MACvFkB,QAAQ,CAAClB,QAAQ,CAACE,YAAY,CAACC,OAAO,CAACC,OAAO,CAACN,IAAI,CAAC;IACtD,CAAC,CAAC;IACF,OAAO,MAAMqB,YAAY,CAACE,MAAM,CAAC,CAAC;EACpC,CAAC,CAAC,OAAOpD,KAAK,EAAE;IACdL,GAAG,CAACM,IAAI,CACN,0CAA0C,EAC1C;MAAEC,MAAM,EAAE;IAAmC,CAAC,EAC9CF,KACF,CAAC;IACD,OAAO,MAAMc,SAAS;EACxB;AACF","ignoreList":[]}
@@ -5,6 +5,7 @@ import { loadPersistedDeviceCredential } from "../utils/deviceCredential.js";
5
5
  import { consumeSilentOAuthError, isSilentRestoreEligibleOrigin, maybeStartSilentOAuthRestore } from "../utils/crossOriginRestore.js";
6
6
  import { tryCompleteOAuthReturn, consumeHubSyncFailure } from "../utils/oauthReturn.js";
7
7
  import { isWebBrowser } from "../utils/isWebBrowser.js";
8
+ import { allowsAutomaticIdpRedirect } from "../oauth/legacyRedirectLanes.js";
8
9
  /** How long the cold boot waits for the post-boot SessionClient handoff (ms). */
9
10
  export const SESSION_HANDOFF_DEADLINE_MS = 6000;
10
11
 
@@ -62,8 +63,18 @@ async function detectOfflineHint() {
62
63
  *
63
64
  * Ordered pipeline:
64
65
  * 1. Complete OAuth authorization-code return (web)
65
- * 2. `runSessionColdBoot` — device-secret mint (+ native shared-key)
66
+ * 2. `runSessionColdBoot` — device-secret mint (+ native shared-key, or the
67
+ * primary-identity-key lane in `sessionMode: 'identity'`)
66
68
  * 3. Silent OAuth for all web apps when mint finds no session
69
+ *
70
+ * Steps 1 and 3 are ACCOUNT-MODE ONLY: both commit whichever account the IdP
71
+ * resolves, which for an identity-bound client is somebody else's account by
72
+ * construction. In `'identity'` mode the boot is exactly step 2.
73
+ *
74
+ * Step 3 is additionally REDIRECT-MODE ONLY: it navigates the top-level window
75
+ * with no user gesture behind it, which `webAuthMode: 'popup'` exists to
76
+ * eliminate. In popup mode the boot is steps 1 and 2, and a domain with no local
77
+ * credential simply resolves signed out. See `allowsAutomaticIdpRedirect`.
67
78
  */
68
79
  export async function runProviderColdBoot(opts) {
69
80
  const {
@@ -72,17 +83,34 @@ export async function runProviderColdBoot(opts) {
72
83
  clientId,
73
84
  authRedirectUri,
74
85
  authorizeBaseUrl,
86
+ sessionMode = 'account',
87
+ identity,
88
+ webAuthMode = 'redirect',
75
89
  sessionClient,
76
90
  syncDeviceCredentialToHost,
77
91
  commitSession,
78
92
  markAuthResolved,
79
93
  setTokenReady
80
94
  } = opts;
95
+ const identityBound = sessionMode === 'identity';
81
96
  setTokenReady(false);
82
97
  try {
98
+ // MODE-INDEPENDENT URL cleanup, deliberately so: both consume query params a
99
+ // PREVIOUS redirect-mode session left in the address bar (`?error=login_required`
100
+ // from a silent authorize, `?hub_sync=failed` from the hub) and restore the
101
+ // page the visit started on. Flipping an app to popup mode must not strand
102
+ // those params, so neither is gated on `webAuthMode`. Neither starts a
103
+ // navigation — they only rewrite the URL via `history.replaceState`.
83
104
  consumeSilentOAuthError();
84
105
  consumeHubSyncFailure();
85
- const oauthCompleted = await tryCompleteOAuthReturn({
106
+
107
+ // The redirect transport's RETURN leg — also NOT gated on `webAuthMode`. A
108
+ // popup-mode app legitimately lands here with `?code=` whenever the browser
109
+ // blocked the popup and `startWebOAuthSignIn` fell back to a full-page
110
+ // redirect (`popup-blocked` / `popup-navigation-failed`), and an app that
111
+ // switched modes mid-flight must not be stranded with a dead `?code=`
112
+ // either. It consumes a code already on the URL; it never starts one.
113
+ const oauthCompleted = identityBound ? false : await tryCompleteOAuthReturn({
86
114
  oxyServices,
87
115
  clientId,
88
116
  authRedirectUri,
@@ -109,6 +137,8 @@ export async function runProviderColdBoot(opts) {
109
137
  isWeb: isWebBrowser(),
110
138
  isNative: !isWebBrowser()
111
139
  },
140
+ sessionMode,
141
+ identity,
112
142
  overallDeadlineMs: COLD_BOOT_OVERALL_DEADLINE_MS,
113
143
  isOffline: () => offline,
114
144
  onStepDeadline: stepId => {
@@ -163,14 +193,26 @@ export async function runProviderColdBoot(opts) {
163
193
  }
164
194
  });
165
195
 
166
- // Silent cross-origin OAuth restore (web cross-app SSO). Gate it the SAME
167
- // way the hub-sync WRITE side (`syncHubAfterSignIn`) gates: official web
168
- // origins only, never the IdP hub itself, and — unlike the write side —
169
- // never a loopback / local-dev origin (which must not be bounced to a hosted
170
- // IdP on cold boot). The authorize endpoint is env-configurable so a
171
- // local/staging app targets its own IdP instead of production.
196
+ // Silent cross-origin OAuth restore (web cross-app SSO): a full-page
197
+ // `prompt=none` bounce to the IdP when the mint found no local session.
198
+ //
199
+ // TRANSPORT gate (`allowsAutomaticIdpRedirect`): `webAuthMode: 'popup'`
200
+ // FORBIDS this lane. It navigates the top-level window with no user gesture
201
+ // behind it, which is precisely what popup mode exists to eliminate — a
202
+ // popup-mode domain without a local credential resolves signed out right
203
+ // here and waits for the user's next explicit "Continue with Oxy" (issue
204
+ // #691, "Cold boot and cross-domain behavior"). `'redirect'` — still the
205
+ // default and the compatibility path — reaches this lane unchanged, and this
206
+ // whole block disappears with the transport in phase 7b.
207
+ //
208
+ // ORIGIN gate: same as the hub-sync WRITE side (`syncHubAfterSignIn`) —
209
+ // official web origins only, never the IdP hub itself, and — unlike the
210
+ // write side — never a loopback / local-dev origin (which must not be
211
+ // bounced to a hosted IdP on cold boot). The authorize endpoint is
212
+ // env-configurable so a local/staging app targets its own IdP instead of
213
+ // production.
172
214
  const webOrigin = isWebBrowser() ? globalThis.location?.origin : undefined;
173
- if (clientId && outcome.kind !== 'session' && webOrigin && isSilentRestoreEligibleOrigin(webOrigin)) {
215
+ if (!identityBound && allowsAutomaticIdpRedirect(webAuthMode) && clientId && outcome.kind !== 'session' && webOrigin && isSilentRestoreEligibleOrigin(webOrigin)) {
174
216
  const redirected = await maybeStartSilentOAuthRestore({
175
217
  oxyServices,
176
218
  clientId,
@@ -1 +1 @@
1
- {"version":3,"names":["logger","loggerUtil","runSessionColdBoot","loadPersistedDeviceCredential","consumeSilentOAuthError","isSilentRestoreEligibleOrigin","maybeStartSilentOAuthRestore","tryCompleteOAuthReturn","consumeHubSyncFailure","isWebBrowser","SESSION_HANDOFF_DEADLINE_MS","COLD_BOOT_OVERALL_DEADLINE_MS","OFFLINE_PROBE_TIMEOUT_MS","detectOfflineHint","online","globalThis","navigator","onLine","NetInfo","state","Promise","race","default","fetch","resolve","setTimeout","isConnected","runProviderColdBoot","opts","oxyServices","authStore","clientId","authRedirectUri","authorizeBaseUrl","sessionClient","syncDeviceCredentialToHost","commitSession","markAuthResolved","setTokenReady","oauthCompleted","input","activate","hubSync","offline","outcome","oxy","store","platform","isWeb","isNative","overallDeadlineMs","isOffline","onStepDeadline","stepId","warn","component","method","onSession","session","handoff","sessionId","accessToken","userId","handoffDeadlineId","finally","undefined","clearTimeout","onSignedOut","cred","start","socketError","__DEV__","debug","onStepError","id","error","webOrigin","location","origin","kind","redirected","redirectUri","Error","String"],"sourceRoot":"../../../../src","sources":["ui/boot/runProviderColdBoot.ts"],"mappings":";;AAAA,SACEA,MAAM,IAAIC,UAAU,EACpBC,kBAAkB,QAGb,aAAa;AAEpB,SAASC,6BAA6B,QAAQ,8BAA2B;AACzE,SACEC,uBAAuB,EACvBC,6BAA6B,EAC7BC,4BAA4B,QACvB,gCAA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,SAAS,IACTvE,6BAA6B,CAACuE,SAAS,CAAC,EACxC;MACA,MAAMI,UAAU,GAAG,MAAM1E,4BAA4B,CAAC;QACpDuB,WAAW;QACXE,QAAQ;QACRkD,WAAW,EAAEjD,eAAe;QAC5BC;MACF,CAAC,CAAC;MACF,IAAI+C,UAAU,EAAE;QACd;MACF;IACF;EACF,CAAC,CAAC,OAAOL,KAAK,EAAE;IACd,IAAIJ,OAAO,EAAE;MACXtE,UAAU,CAAC0E,KAAK,CACd,iBAAiB,EACjBA,KAAK,YAAYO,KAAK,GAAGP,KAAK,GAAG,IAAIO,KAAK,CAACC,MAAM,CAACR,KAAK,CAAC,CAAC,EACzD;QAAEpB,SAAS,EAAE;MAAsB,CACrC,CAAC;IACH;EACF,CAAC,SAAS;IACRlB,gBAAgB,CAAC,CAAC;EACpB;AACF","ignoreList":[]}
1
+ {"version":3,"names":["logger","loggerUtil","runSessionColdBoot","loadPersistedDeviceCredential","consumeSilentOAuthError","isSilentRestoreEligibleOrigin","maybeStartSilentOAuthRestore","tryCompleteOAuthReturn","consumeHubSyncFailure","isWebBrowser","allowsAutomaticIdpRedirect","SESSION_HANDOFF_DEADLINE_MS","COLD_BOOT_OVERALL_DEADLINE_MS","OFFLINE_PROBE_TIMEOUT_MS","detectOfflineHint","online","globalThis","navigator","onLine","NetInfo","state","Promise","race","default","fetch","resolve","setTimeout","isConnected","runProviderColdBoot","opts","oxyServices","authStore","clientId","authRedirectUri","authorizeBaseUrl","sessionMode","identity","webAuthMode","sessionClient","syncDeviceCredentialToHost","commitSession","markAuthResolved","setTokenReady","identityBound","oauthCompleted","input","activate","hubSync","offline","outcome","oxy","store","platform","isWeb","isNative","overallDeadlineMs","isOffline","onStepDeadline","stepId","warn","component","method","onSession","session","handoff","sessionId","accessToken","userId","handoffDeadlineId","finally","undefined","clearTimeout","onSignedOut","cred","start","socketError","__DEV__","debug","onStepError","id","error","webOrigin","location","origin","kind","redirected","redirectUri","Error","String"],"sourceRoot":"../../../../src","s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cAAsB,CAAC,EACpCe,WACF,CAAC;YACH;UACF;QACF;QACAlC,gBAAgB,CAAC,CAAC;MACpB,CAAC;MACDqC,WAAW,EAAEA,CAACC,EAAE,EAAEC,KAAK,KAAK;QAC1B,IAAIJ,OAAO,EAAE;UACX3E,UAAU,CAAC4E,KAAK,CACd,mBAAmBE,EAAE,wCAAwC,EAC7D;YAAEnB,SAAS,EAAE;UAAsB,CAAC,EACpCoB,KACF,CAAC;QACH;MACF;IACF,CAAC,CAAC;;IAEF;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA;IACA,MAAMC,SAAS,GAAGxE,YAAY,CAAC,CAAC,GAC3BO,UAAU,CAA6BkE,QAAQ,EAAEC,MAAM,GACxDb,SAAS;IACb,IACE,CAAC3B,aAAa,IACdjC,0BAA0B,CAAC2B,WAAW,CAAC,IACvCL,QAAQ,IACRiB,OAAO,CAACmC,IAAI,KAAK,SAAS,IAC1BH,SAAS,IACT5E,6BAA6B,CAAC4E,SAAS,CAAC,EACxC;MACA,MAAMI,UAAU,GAAG,MAAM/E,4BAA4B,CAAC;QACpDwB,WAAW;QACXE,QAAQ;QACRsD,WAAW,EAAErD,eAAe;QAC5BC;MACF,CAAC,CAAC;MACF,IAAImD,UAAU,EAAE;QACd;MACF;IACF;EACF,CAAC,CAAC,OAAOL,KAAK,EAAE;IACd,IAAIJ,OAAO,EAAE;MACX3E,UAAU,CAAC+E,KAAK,CACd,iBAAiB,EACjBA,KAAK,YAAYO,KAAK,GAAGP,KAAK,GAAG,IAAIO,KAAK,CAACC,MAAM,CAACR,KAAK,CAAC,CAAC,EACzD;QAAEpB,SAAS,EAAE;MAAsB,CACrC,CAAC;IACH;EACF,CAAC,SAAS;IACRnB,gBAAgB,CAAC,CAAC;EACpB;AACF","ignoreList":[]}
@@ -18,7 +18,6 @@ export { LogoIcon } from "./components/logo/LogoIcon.js";
18
18
  export { LogoText } from "./components/logo/LogoText.js";
19
19
  export { default as FollowButton } from "./components/FollowButton.js";
20
20
  export { default as OxyPayButton } from "./components/OxyPayButton.js";
21
- export { FontLoader, setupFonts } from './components/FontLoader';
22
21
 
23
22
  // Context
24
23
  export { useOxy } from "./context/OxyContext.js";
@@ -1 +1 @@
1
- {"version":3,"names":["default","OxyProvider","OxySignInButton","OxyAuthPrompt","LogoIcon","LogoText","FollowButton","OxyPayButton","FontLoader","setupFonts","useOxy","useAuth","useFollow","useStorage","ProfileScreen","ManageAccountScreen","useAuthStore","useAccountStore","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage"],"sourceRoot":"../../../src","sources":["ui/client.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,6BAA0B;AACjE,SAASD,OAAO,IAAIE,eAAe,QAAQ,iCAA8B;AACzE,SAASF,OAAO,IAAIG,aAAa,QAAQ,+BAA4B;AAErE,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASL,OAAO,IAAIM,YAAY,QAAQ,8BAA2B;AACnE,SAASN,OAAO,IAAIO,YAAY,QAAQ,8BAA2B;AACnE,SAASC,UAAU,EAAEC,UAAU,QAAQ,yBAAyB;;AAEhE;AACA,SAASC,MAAM,QAAQ,yBAAsB;;AAE7C;AACA,SAASC,OAAO,QAAQ,oBAAiB;AAEzC,SAASC,SAAS,QAAQ,sBAAmB;AAC7C,SAASC,UAAU,QAAQ,uBAAoB;AAG/C;AACA,SAASb,OAAO,IAAIc,aAAa,QAAQ,4BAAyB;AAClE,SAASd,OAAO,IAAIe,mBAAmB,QAAQ,kCAA+B;;AAE9E;AACA,SAASC,YAAY,QAAQ,uBAAoB;AACjD,SAASC,eAAe,QAAQ,0BAAuB;;AAEvD;AACA,SACIC,eAAe,EACfC,qBAAqB,EACrBC,uBAAuB,EACvBC,mBAAmB,QAChB,0BAAuB","ignoreList":[]}
1
+ {"version":3,"names":["default","OxyProvider","OxySignInButton","OxyAuthPrompt","LogoIcon","LogoText","FollowButton","OxyPayButton","useOxy","useAuth","useFollow","useStorage","ProfileScreen","ManageAccountScreen","useAuthStore","useAccountStore","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage"],"sourceRoot":"../../../src","sources":["ui/client.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,6BAA0B;AACjE,SAASD,OAAO,IAAIE,eAAe,QAAQ,iCAA8B;AACzE,SAASF,OAAO,IAAIG,aAAa,QAAQ,+BAA4B;AAErE,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASC,QAAQ,QAAQ,+BAA4B;AACrD,SAASL,OAAO,IAAIM,YAAY,QAAQ,8BAA2B;AACnE,SAASN,OAAO,IAAIO,YAAY,QAAQ,8BAA2B;;AAEnE;AACA,SAASC,MAAM,QAAQ,yBAAsB;;AAE7C;AACA,SAASC,OAAO,QAAQ,oBAAiB;AAEzC,SAASC,SAAS,QAAQ,sBAAmB;AAC7C,SAASC,UAAU,QAAQ,uBAAoB;AAG/C;AACA,SAASX,OAAO,IAAIY,aAAa,QAAQ,4BAAyB;AAClE,SAASZ,OAAO,IAAIa,mBAAmB,QAAQ,kCAA+B;;AAE9E;AACA,SAASC,YAAY,QAAQ,uBAAoB;AACjD,SAASC,eAAe,QAAQ,0BAAuB;;AAEvD;AACA,SACIC,eAAe,EACfC,qBAAqB,EACrBC,uBAAuB,EACvBC,mBAAmB,QAChB,0BAAuB","ignoreList":[]}
@@ -1,7 +1,7 @@
1
1
  "use strict";
2
2
 
3
3
  import { View } from 'react-native';
4
- import { Ionicons } from '@expo/vector-icons';
4
+ import Ionicons from '@expo/vector-icons/Ionicons';
5
5
  import { useTheme } from '@oxyhq/bloom/theme';
6
6
 
7
7
  /**