@oxyhq/services 22.13.0 → 23.0.0
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.
- package/README.md +1 -1
- package/lib/commonjs/index.js +74 -0
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/deviceNotifications.js +424 -0
- package/lib/commonjs/notifications/deviceNotifications.js.map +1 -0
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +20 -64
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/AvatarCameraBadge.js +3 -2
- package/lib/commonjs/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +5 -4
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +5 -6
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInRequestSurface.js +147 -0
- package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -0
- package/lib/commonjs/ui/components/ProfileButton.js +4 -3
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/SettingsIcon.js +3 -2
- package/lib/commonjs/ui/components/SettingsIcon.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +7 -7
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +65 -103
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +0 -2
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/primitives.js +5 -4
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +14 -10
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.js +11 -0
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +3 -2
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +3 -2
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +15 -14
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +6 -5
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +3 -2
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +6 -6
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +5 -5
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +10 -9
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +4 -3
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +6 -5
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/components/styles/shadow.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +14 -45
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +0 -43
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/userCache.js +17 -17
- package/lib/commonjs/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +4 -2
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useOnlineStatus.js +3 -2
- package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +0 -2
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +4 -3
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js +1 -1
- package/lib/commonjs/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +7 -6
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +4 -3
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +3 -2
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +96 -96
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +19 -18
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +4 -29
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -3
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +2 -2
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +3 -3
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +10 -9
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +1 -0
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +12 -13
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +4 -4
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -6
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js +4 -3
- package/lib/commonjs/ui/screens/fileManagement/FileListSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js +5 -7
- package/lib/commonjs/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js +3 -2
- package/lib/commonjs/ui/screens/fileManagement/UploadBar.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +3 -2
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +5 -4
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -3
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +24 -24
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/netConnectivity.js +28 -0
- package/lib/commonjs/ui/utils/netConnectivity.js.map +1 -0
- package/lib/commonjs/ui/utils/oauthReturn.js +15 -28
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/index.js +18 -0
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/deviceNotifications.js +414 -0
- package/lib/module/notifications/deviceNotifications.js.map +1 -0
- package/lib/module/ui/boot/runProviderColdBoot.js +21 -65
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js +1 -1
- package/lib/module/ui/components/AvatarCameraBadge.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +5 -4
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +5 -6
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInRequestSurface.js +141 -0
- package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -0
- package/lib/module/ui/components/ProfileButton.js +1 -1
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/SettingsIcon.js +1 -1
- package/lib/module/ui/components/SettingsIcon.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -1
- package/lib/module/ui/components/authChooser/SignInRequestView.js +66 -104
- package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -1
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js +0 -2
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js.map +1 -1
- package/lib/module/ui/components/authChooser/primitives.js +1 -1
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/module/ui/components/authChooser/requestSurfaces.js +13 -9
- package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.js +11 -0
- package/lib/module/ui/components/authChooser/types.js.map +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/components/styles/shadow.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +16 -47
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +0 -42
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +3 -4
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/queries/userCache.js +17 -17
- package/lib/module/ui/hooks/queries/userCache.js.map +1 -1
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +4 -2
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useOnlineStatus.js +3 -2
- package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +0 -2
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js +1 -1
- package/lib/module/ui/screens/ConnectedAppsScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +1 -1
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +91 -90
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +2 -1
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +4 -29
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +2 -2
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +1 -0
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +4 -5
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +3 -3
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +5 -6
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js +1 -1
- package/lib/module/ui/screens/fileManagement/FileLibraryError.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js +1 -1
- package/lib/module/ui/screens/fileManagement/FileListSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js +3 -5
- package/lib/module/ui/screens/fileManagement/PhotoPickerSection.js.map +1 -1
- package/lib/module/ui/screens/fileManagement/UploadBar.js +1 -1
- package/lib/module/ui/screens/fileManagement/UploadBar.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +3 -3
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +25 -25
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/netConnectivity.js +23 -0
- package/lib/module/ui/utils/netConnectivity.js.map +1 -0
- package/lib/module/ui/utils/oauthReturn.js +15 -27
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +5 -0
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +173 -0
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +5 -3
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts +108 -0
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/SettingsIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +18 -18
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +3 -10
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +8 -4
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +18 -0
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts +0 -40
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +4 -7
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/commonjs/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +4 -2
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +3 -2
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +20 -19
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts +17 -0
- package/lib/typescript/commonjs/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +5 -0
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notifications/deviceNotifications.d.ts +173 -0
- package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -0
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +11 -30
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +5 -3
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts +108 -0
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/SettingsIcon.d.ts +1 -1
- package/lib/typescript/module/ui/components/SettingsIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +18 -18
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +3 -10
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +8 -4
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +18 -0
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/types.d.ts +6 -6
- package/lib/typescript/module/ui/components/payment/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts +0 -40
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +4 -7
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +0 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/queries/userCache.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts +2 -2
- package/lib/typescript/module/ui/hooks/useAsyncAction.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +4 -2
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +3 -2
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +2 -2
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +20 -19
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +5 -5
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts +17 -0
- package/lib/typescript/module/ui/utils/netConnectivity.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +15 -12
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/package.json +18 -8
- package/src/index.ts +32 -0
- package/src/notifications/deviceNotifications.ts +458 -0
- package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +215 -0
- package/src/ui/boot/runProviderColdBoot.ts +24 -101
- package/src/ui/components/AvatarCameraBadge.tsx +1 -1
- package/src/ui/components/OxyAuthChooser.tsx +5 -4
- package/src/ui/components/OxyProvider.tsx +5 -6
- package/src/ui/components/OxySignInRequestSurface.tsx +202 -0
- package/src/ui/components/ProfileButton.tsx +1 -1
- package/src/ui/components/SettingsIcon.tsx +1 -1
- package/src/ui/components/authChooser/AccountsMenuView.tsx +1 -1
- package/src/ui/components/authChooser/SignInEntryView.tsx +9 -3
- package/src/ui/components/authChooser/SignInRequestView.tsx +78 -111
- package/src/ui/components/authChooser/TroubleDisclosure.tsx +3 -11
- package/src/ui/components/authChooser/primitives.tsx +1 -1
- package/src/ui/components/authChooser/requestSurfaces.tsx +15 -11
- package/src/ui/components/authChooser/types.ts +19 -0
- package/src/ui/components/fileManagement/AnimatedButton.tsx +1 -1
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +1 -1
- package/src/ui/components/fileManagement/FileViewer.tsx +1 -1
- package/src/ui/components/fileManagement/UploadPreview.tsx +1 -1
- package/src/ui/components/modals/DeleteAccountModal.tsx +1 -1
- package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
- package/src/ui/components/payment/PaymentMethodStep.tsx +1 -1
- package/src/ui/components/payment/PaymentReviewStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSuccessStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSummaryStep.tsx +1 -1
- package/src/ui/components/payment/types.ts +24 -24
- package/src/ui/components/styles/shadow.tsx +2 -2
- package/src/ui/context/OxyContext.tsx +15 -46
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +0 -89
- package/src/ui/context/commitSessionFlow.ts +0 -61
- package/src/ui/context/oxyContextTypes.ts +4 -7
- package/src/ui/context/useOxyAccountGraph.ts +4 -4
- package/src/ui/hooks/queries/userCache.ts +169 -148
- package/src/ui/hooks/useAssets.ts +1 -1
- package/src/ui/hooks/useAsyncAction.ts +2 -2
- package/src/ui/hooks/useAuth.ts +4 -2
- package/src/ui/hooks/useOnlineStatus.ts +3 -2
- package/src/ui/hooks/useSessionManagement.ts +0 -2
- package/src/ui/screens/AccountMembersScreen.tsx +1 -1
- package/src/ui/screens/ConnectedAppsScreen.tsx +1 -1
- package/src/ui/screens/CreateAccountScreen.tsx +1 -1
- package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
- package/src/ui/screens/FAQScreen.tsx +1 -1
- package/src/ui/screens/FeedbackScreen.tsx +740 -574
- package/src/ui/screens/FileManagementScreen.tsx +2 -1
- package/src/ui/screens/HistoryViewScreen.tsx +4 -19
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/ManageAccountScreen.tsx +1 -1
- package/src/ui/screens/PaymentGatewayScreen.tsx +1 -1
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +2 -2
- package/src/ui/screens/PrivacySettingsScreen.tsx +1 -0
- package/src/ui/screens/ProfileScreen.tsx +6 -4
- package/src/ui/screens/UserListScreen.tsx +3 -3
- package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
- package/src/ui/screens/fileManagement/FileLibraryError.tsx +1 -1
- package/src/ui/screens/fileManagement/FileListSection.tsx +1 -1
- package/src/ui/screens/fileManagement/PhotoPickerSection.tsx +3 -2
- package/src/ui/screens/fileManagement/UploadBar.tsx +1 -1
- package/src/ui/screens/trust/TrustCenterScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +4 -3
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/types/navigation.ts +20 -19
- package/src/ui/utils/fileManagement.ts +108 -92
- package/src/ui/utils/netConnectivity.ts +27 -0
- package/src/ui/utils/oauthReturn.ts +15 -30
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/commonjs/ui/utils/crossOriginRestore.js +0 -140
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/module/ui/utils/crossOriginRestore.js +0 -131
- package/lib/module/ui/utils/crossOriginRestore.js.map +0 -1
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts +0 -43
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +0 -1
- package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +0 -281
- package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
- package/src/ui/utils/__tests__/crossOriginRestore.test.ts +0 -160
- package/src/ui/utils/crossOriginRestore.ts +0 -168
|
@@ -1,7 +1,7 @@
|
|
|
1
|
-
import type
|
|
2
|
-
import type { AssetUploadInput, RNFileDescriptor } from
|
|
3
|
-
import type { ComponentProps } from
|
|
4
|
-
import { Platform } from
|
|
1
|
+
import type Ionicons from "@expo/vector-icons/Ionicons";
|
|
2
|
+
import type { AssetUploadInput, RNFileDescriptor } from "@oxyhq/core";
|
|
3
|
+
import type { ComponentProps } from "react";
|
|
4
|
+
import { Platform } from "react-native";
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Extended File interface that includes a `uri` property for mobile preview support.
|
|
@@ -9,7 +9,7 @@ import { Platform } from 'react-native';
|
|
|
9
9
|
* on the File object for preview rendering.
|
|
10
10
|
*/
|
|
11
11
|
interface FileWithUri extends File {
|
|
12
|
-
|
|
12
|
+
uri?: string;
|
|
13
13
|
}
|
|
14
14
|
|
|
15
15
|
/**
|
|
@@ -18,11 +18,11 @@ interface FileWithUri extends File {
|
|
|
18
18
|
* descriptor straight to FormData on React Native.
|
|
19
19
|
*/
|
|
20
20
|
export interface PickerAsset {
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
21
|
+
file?: File | Blob;
|
|
22
|
+
uri?: string;
|
|
23
|
+
name?: string | null;
|
|
24
|
+
mimeType?: string | null;
|
|
25
|
+
size?: number | null;
|
|
26
26
|
}
|
|
27
27
|
|
|
28
28
|
/**
|
|
@@ -30,37 +30,42 @@ export interface PickerAsset {
|
|
|
30
30
|
* (carries a URI but is not a real DOM `File` / `Blob` instance).
|
|
31
31
|
*/
|
|
32
32
|
export function isRNFileDescriptor(input: unknown): input is RNFileDescriptor {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
33
|
+
if (!input || typeof input !== "object") return false;
|
|
34
|
+
const obj = input as Record<string, unknown>;
|
|
35
|
+
if (typeof obj.uri !== "string") return false;
|
|
36
|
+
if (typeof File !== "undefined" && input instanceof File) return false;
|
|
37
|
+
if (typeof Blob !== "undefined" && input instanceof Blob) return false;
|
|
38
|
+
return true;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* Format file size in bytes to human-readable string
|
|
43
43
|
*/
|
|
44
44
|
export function formatFileSize(bytes: number): string {
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
45
|
+
if (bytes === 0) return "0 Bytes";
|
|
46
|
+
const k = 1024;
|
|
47
|
+
const sizes = ["Bytes", "KB", "MB", "GB"];
|
|
48
|
+
const i = Math.floor(Math.log(bytes) / Math.log(k));
|
|
49
|
+
return `${Number.parseFloat((bytes / k ** i).toFixed(2))} ${sizes[i]}`;
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
/**
|
|
53
53
|
* Get icon name for file based on content type
|
|
54
54
|
*/
|
|
55
|
-
export function getFileIcon(
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
export function getFileIcon(
|
|
56
|
+
contentType: string,
|
|
57
|
+
): ComponentProps<typeof Ionicons>["name"] {
|
|
58
|
+
if (contentType.startsWith("image/")) return "image";
|
|
59
|
+
if (contentType.startsWith("video/")) return "videocam";
|
|
60
|
+
if (contentType.startsWith("audio/")) return "musical-notes";
|
|
61
|
+
if (contentType.includes("pdf")) return "document-text";
|
|
62
|
+
if (contentType.includes("word") || contentType.includes("doc"))
|
|
63
|
+
return "document";
|
|
64
|
+
if (contentType.includes("excel") || contentType.includes("sheet"))
|
|
65
|
+
return "grid";
|
|
66
|
+
if (contentType.includes("zip") || contentType.includes("archive"))
|
|
67
|
+
return "archive";
|
|
68
|
+
return "document-outline";
|
|
64
69
|
}
|
|
65
70
|
|
|
66
71
|
/**
|
|
@@ -76,79 +81,90 @@ export function getFileIcon(contentType: string): ComponentProps<typeof Ionicons
|
|
|
76
81
|
* 'ArrayBuffer' and 'ArrayBufferView' are not supported").
|
|
77
82
|
*/
|
|
78
83
|
export async function convertDocumentPickerAssetToFile(
|
|
79
|
-
|
|
80
|
-
|
|
84
|
+
doc: PickerAsset,
|
|
85
|
+
index: number,
|
|
81
86
|
): Promise<FileWithUri | RNFileDescriptor | null> {
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
const fileName = doc.name || `file-${index + 1}`;
|
|
88
|
+
const fileType = doc.mimeType || "application/octet-stream";
|
|
84
89
|
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
90
|
+
// React Native path — return the descriptor as-is. FormData handles it.
|
|
91
|
+
if (Platform.OS !== "web") {
|
|
92
|
+
if (!doc.uri) {
|
|
93
|
+
throw new Error("Missing file data (no uri property)");
|
|
94
|
+
}
|
|
95
|
+
return {
|
|
96
|
+
uri: doc.uri,
|
|
97
|
+
type: fileType,
|
|
98
|
+
name: fileName,
|
|
99
|
+
size: typeof doc.size === "number" ? doc.size : undefined,
|
|
100
|
+
};
|
|
101
|
+
}
|
|
97
102
|
|
|
98
|
-
|
|
99
|
-
|
|
103
|
+
try {
|
|
104
|
+
let file: FileWithUri | null = null;
|
|
100
105
|
|
|
101
|
-
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
106
|
+
// Priority 1: Use doc.file if available (web native File API).
|
|
107
|
+
// This is the most efficient path as it doesn't require fetching.
|
|
108
|
+
if (
|
|
109
|
+
doc.file &&
|
|
110
|
+
typeof globalThis.File !== "undefined" &&
|
|
111
|
+
doc.file instanceof globalThis.File
|
|
112
|
+
) {
|
|
113
|
+
file = doc.file as FileWithUri;
|
|
114
|
+
// Ensure file has required properties
|
|
115
|
+
if (!file.name && doc.name) {
|
|
116
|
+
// Create new File with proper name if missing
|
|
117
|
+
file = new globalThis.File([file], doc.name, {
|
|
118
|
+
type: file.type || fileType,
|
|
119
|
+
});
|
|
120
|
+
}
|
|
121
|
+
// Preserve URI for preview if available
|
|
122
|
+
if (doc.uri) {
|
|
123
|
+
file.uri = doc.uri;
|
|
124
|
+
}
|
|
125
|
+
return file;
|
|
126
|
+
}
|
|
116
127
|
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
128
|
+
// Priority 2: Build File from URI (web blob URLs or http(s) URLs).
|
|
129
|
+
if (doc.uri) {
|
|
130
|
+
try {
|
|
131
|
+
const response = await fetch(doc.uri);
|
|
132
|
+
if (!response.ok) {
|
|
133
|
+
throw new Error(`Failed to fetch file: ${response.statusText}`);
|
|
134
|
+
}
|
|
135
|
+
const blob = await response.blob();
|
|
136
|
+
const resolvedType =
|
|
137
|
+
doc.mimeType || blob.type || "application/octet-stream";
|
|
138
|
+
file = new globalThis.File([blob], fileName, {
|
|
139
|
+
type: resolvedType,
|
|
140
|
+
}) as FileWithUri;
|
|
141
|
+
file.uri = doc.uri;
|
|
142
|
+
return file;
|
|
143
|
+
} catch (error: unknown) {
|
|
144
|
+
console.error("Failed to read file from URI:", error);
|
|
145
|
+
throw new Error(
|
|
146
|
+
`Failed to load file: ${(error instanceof Error ? error.message : null) || "Unknown error"}`,
|
|
147
|
+
);
|
|
148
|
+
}
|
|
149
|
+
}
|
|
134
150
|
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
151
|
+
// No file or URI available - this shouldn't happen with Expo 54
|
|
152
|
+
throw new Error("Missing file data (no file or uri property)");
|
|
153
|
+
} catch (error: unknown) {
|
|
154
|
+
console.error("Error converting document to file:", error);
|
|
155
|
+
throw error;
|
|
156
|
+
}
|
|
141
157
|
}
|
|
142
158
|
|
|
143
159
|
/**
|
|
144
160
|
* Upload file raw - helper function for file uploads
|
|
145
161
|
*/
|
|
146
162
|
export async function uploadFileRaw(
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
163
|
+
file: AssetUploadInput,
|
|
164
|
+
userId: string,
|
|
165
|
+
// biome-ignore lint/suspicious/noExplicitAny: OxyServices type cannot be fully resolved due to mixin composition pattern
|
|
166
|
+
oxyServices: any,
|
|
167
|
+
visibility?: "private" | "public" | "unlisted",
|
|
152
168
|
) {
|
|
153
|
-
|
|
169
|
+
return await oxyServices.uploadRawFile(file, visibility);
|
|
154
170
|
}
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
export interface NetInfoLikeState {
|
|
2
|
+
isConnected: boolean | null;
|
|
3
|
+
isInternetReachable?: boolean | null;
|
|
4
|
+
}
|
|
5
|
+
|
|
6
|
+
/**
|
|
7
|
+
* Mirrors Bloom `ConnectionStatusToasts` reachability semantics: a link that
|
|
8
|
+
* reports connected but explicitly unreachable (captive portal, no route) counts
|
|
9
|
+
* as offline.
|
|
10
|
+
*/
|
|
11
|
+
export function isNetConnectivityOnline(state: NetInfoLikeState): boolean {
|
|
12
|
+
return Boolean(state.isConnected && state.isInternetReachable !== false);
|
|
13
|
+
}
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* Conservative offline verdict for boot-path probes. Unknown / probing states
|
|
17
|
+
* (`null`, timed-out fetch) resolve to "not offline" so a flaky probe never
|
|
18
|
+
* skips a real sign-in.
|
|
19
|
+
*/
|
|
20
|
+
export function isNetConnectivityExplicitlyOffline(
|
|
21
|
+
state: NetInfoLikeState | null | undefined,
|
|
22
|
+
): boolean {
|
|
23
|
+
if (!state) return false;
|
|
24
|
+
if (state.isConnected === false) return true;
|
|
25
|
+
if (state.isConnected === true && state.isInternetReachable === false) return true;
|
|
26
|
+
return false;
|
|
27
|
+
}
|
|
@@ -14,12 +14,21 @@ import { isWebBrowser } from './isWebBrowser';
|
|
|
14
14
|
* When the RP lands with `?code=` after signing in at auth.oxy.so, exchange the
|
|
15
15
|
* code for a device-first session before cold boot runs.
|
|
16
16
|
*
|
|
17
|
-
* This is the REDIRECT transport's return leg.
|
|
18
|
-
*
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
*
|
|
22
|
-
*
|
|
17
|
+
* This is the REDIRECT transport's return leg. The SDK never starts a full-page
|
|
18
|
+
* authorize navigation on its own any more (#691 phase 7b), but this lane is
|
|
19
|
+
* still load-bearing: a browser-BLOCKED sign-in popup falls back to a full-page
|
|
20
|
+
* redirect (`startWebOAuthSignIn`), and that redirect comes back here.
|
|
21
|
+
*
|
|
22
|
+
* It owns only what is specific to a full-page round trip — reading the code off
|
|
23
|
+
* the URL, recovering the handshake `sessionStorage` carried across the
|
|
24
|
+
* navigation, and cleaning both up afterwards — and delegates state validation,
|
|
25
|
+
* the PKCE exchange, and the session commit to `completeOAuthCode`, the same
|
|
26
|
+
* function the popup transport runs.
|
|
27
|
+
*
|
|
28
|
+
* It is also the SINGLE cleanup path for an OAuth `error` landing on the URL:
|
|
29
|
+
* any `?error=…` (including an `error=login_required` left over from the
|
|
30
|
+
* now-deleted silent restore) is stripped along with `state` /
|
|
31
|
+
* `error_description`, and the stale PKCE handshake is cleared.
|
|
23
32
|
*/
|
|
24
33
|
export async function tryCompleteOAuthReturn(opts: {
|
|
25
34
|
oxyServices: OxyServices;
|
|
@@ -125,29 +134,5 @@ function stripOAuthParamsFromUrl(): void {
|
|
|
125
134
|
url.searchParams.delete('state');
|
|
126
135
|
url.searchParams.delete('error');
|
|
127
136
|
url.searchParams.delete('error_description');
|
|
128
|
-
url.searchParams.delete('hub_sync');
|
|
129
|
-
replaceUrlAfterOAuthReturn(`${url.pathname}${url.search}${url.hash}`);
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* When auth.oxy.so hub-sync redeem fails, the IdP redirects back with
|
|
134
|
-
* `?hub_sync=failed`. Strip the param and log so cold boot can continue
|
|
135
|
-
* without leaving a stale query string.
|
|
136
|
-
*/
|
|
137
|
-
export function consumeHubSyncFailure(): boolean {
|
|
138
|
-
if (!isWebBrowser()) return false;
|
|
139
|
-
const location = (globalThis as { location?: Location }).location;
|
|
140
|
-
if (!location) return false;
|
|
141
|
-
|
|
142
|
-
const params = new URLSearchParams(location.search);
|
|
143
|
-
if (params.get('hub_sync') !== 'failed') return false;
|
|
144
|
-
|
|
145
|
-
logger.warn('Hub sync failed — IdP device session may be out of sync', {
|
|
146
|
-
component: 'hubSync',
|
|
147
|
-
});
|
|
148
|
-
|
|
149
|
-
const url = new URL(location.href);
|
|
150
|
-
url.searchParams.delete('hub_sync');
|
|
151
137
|
replaceUrlAfterOAuthReturn(`${url.pathname}${url.search}${url.hash}`);
|
|
152
|
-
return true;
|
|
153
138
|
}
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.allowsAutomaticIdpRedirect = allowsAutomaticIdpRedirect;
|
|
7
|
-
/**
|
|
8
|
-
* The legacy, redirect-mode-only lanes that navigate the RP's TOP-LEVEL window
|
|
9
|
-
* to the IdP without a user gesture.
|
|
10
|
-
*
|
|
11
|
-
* `webAuthMode: 'popup'` exists to guarantee exactly one thing: the relying
|
|
12
|
-
* party never leaves its route. Two mechanics in this SDK break that guarantee,
|
|
13
|
-
* because each replaces the whole document on its own initiative:
|
|
14
|
-
*
|
|
15
|
-
* 1. **Cold-boot silent restore** — a full-page `prompt=none` authorize bounce
|
|
16
|
-
* to `auth.oxy.so` when the device-secret mint finds no local session
|
|
17
|
-
* (`maybeStartSilentOAuthRestore`, called from `runProviderColdBoot`).
|
|
18
|
-
* 2. **Post-sign-in hub sync** — a full-page hop to `auth.oxy.so/sync` that
|
|
19
|
-
* plants this device's credential on the IdP hub so OTHER origins can later
|
|
20
|
-
* run lane 1 (`syncHubAfterSignIn`, called from the `commitSession` funnel).
|
|
21
|
-
*
|
|
22
|
-
* Both belong to the redirect transport and are kept only for the migration
|
|
23
|
-
* window (issue #691, "Cold boot and cross-domain behavior"). In popup mode a
|
|
24
|
-
* domain with no local credential simply resolves SIGNED OUT, and the user's
|
|
25
|
-
* next explicit "Continue with Oxy" opens the popup — from a real user gesture,
|
|
26
|
-
* never automatically.
|
|
27
|
-
*
|
|
28
|
-
* NOT covered here, and correctly enabled in BOTH modes: navigations the user
|
|
29
|
-
* asked for. When the browser blocks the popup, `startWebOAuthSignIn` still
|
|
30
|
-
* falls back to a full-page redirect rather than dead-ending the sign-in, and
|
|
31
|
-
* `tryCompleteOAuthReturn` still consumes a `?code=` that is already on the URL.
|
|
32
|
-
*
|
|
33
|
-
* PHASE 7b: once the pilot flips the default transport to `'popup'`, this
|
|
34
|
-
* predicate and BOTH lanes above are deleted outright. Grepping this symbol
|
|
35
|
-
* finds every site that has to go.
|
|
36
|
-
*/
|
|
37
|
-
|
|
38
|
-
/**
|
|
39
|
-
* Whether a provider running `webAuthMode` may perform an SDK-initiated,
|
|
40
|
-
* non-gesture, full-page navigation to the IdP.
|
|
41
|
-
*
|
|
42
|
-
* `true` only for `'redirect'` — still the default and the compatibility path,
|
|
43
|
-
* whose behaviour must stay byte-for-byte unchanged.
|
|
44
|
-
*/
|
|
45
|
-
function allowsAutomaticIdpRedirect(webAuthMode) {
|
|
46
|
-
return webAuthMode === 'redirect';
|
|
47
|
-
}
|
|
48
|
-
//# sourceMappingURL=legacyRedirectLanes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["allowsAutomaticIdpRedirect","webAuthMode"],"sourceRoot":"../../../../src","sources":["ui/oauth/legacyRedirectLanes.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;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASA,0BAA0BA,CAACC,WAAwB,EAAW;EAC5E,OAAOA,WAAW,KAAK,UAAU;AACnC","ignoreList":[]}
|
|
@@ -1,140 +0,0 @@
|
|
|
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
|
-
const redirectUri = (0, _core.canonicalizeOAuthRedirectUri)(opts.redirectUri ?? location.origin);
|
|
89
|
-
if (!(0, _core.persistOAuthHandshake)(state, codeVerifier, redirectUri)) {
|
|
90
|
-
return false;
|
|
91
|
-
}
|
|
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
|
|
@@ -1 +0,0 @@
|
|
|
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","redirectUri","canonicalizeOAuthRedirectUri","persistOAuthHandshake","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":"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","ignoreList":[]}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
/**
|
|
4
|
-
* The legacy, redirect-mode-only lanes that navigate the RP's TOP-LEVEL window
|
|
5
|
-
* to the IdP without a user gesture.
|
|
6
|
-
*
|
|
7
|
-
* `webAuthMode: 'popup'` exists to guarantee exactly one thing: the relying
|
|
8
|
-
* party never leaves its route. Two mechanics in this SDK break that guarantee,
|
|
9
|
-
* because each replaces the whole document on its own initiative:
|
|
10
|
-
*
|
|
11
|
-
* 1. **Cold-boot silent restore** — a full-page `prompt=none` authorize bounce
|
|
12
|
-
* to `auth.oxy.so` when the device-secret mint finds no local session
|
|
13
|
-
* (`maybeStartSilentOAuthRestore`, called from `runProviderColdBoot`).
|
|
14
|
-
* 2. **Post-sign-in hub sync** — a full-page hop to `auth.oxy.so/sync` that
|
|
15
|
-
* plants this device's credential on the IdP hub so OTHER origins can later
|
|
16
|
-
* run lane 1 (`syncHubAfterSignIn`, called from the `commitSession` funnel).
|
|
17
|
-
*
|
|
18
|
-
* Both belong to the redirect transport and are kept only for the migration
|
|
19
|
-
* window (issue #691, "Cold boot and cross-domain behavior"). In popup mode a
|
|
20
|
-
* domain with no local credential simply resolves SIGNED OUT, and the user's
|
|
21
|
-
* next explicit "Continue with Oxy" opens the popup — from a real user gesture,
|
|
22
|
-
* never automatically.
|
|
23
|
-
*
|
|
24
|
-
* NOT covered here, and correctly enabled in BOTH modes: navigations the user
|
|
25
|
-
* asked for. When the browser blocks the popup, `startWebOAuthSignIn` still
|
|
26
|
-
* falls back to a full-page redirect rather than dead-ending the sign-in, and
|
|
27
|
-
* `tryCompleteOAuthReturn` still consumes a `?code=` that is already on the URL.
|
|
28
|
-
*
|
|
29
|
-
* PHASE 7b: once the pilot flips the default transport to `'popup'`, this
|
|
30
|
-
* predicate and BOTH lanes above are deleted outright. Grepping this symbol
|
|
31
|
-
* finds every site that has to go.
|
|
32
|
-
*/
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* Whether a provider running `webAuthMode` may perform an SDK-initiated,
|
|
36
|
-
* non-gesture, full-page navigation to the IdP.
|
|
37
|
-
*
|
|
38
|
-
* `true` only for `'redirect'` — still the default and the compatibility path,
|
|
39
|
-
* whose behaviour must stay byte-for-byte unchanged.
|
|
40
|
-
*/
|
|
41
|
-
export function allowsAutomaticIdpRedirect(webAuthMode) {
|
|
42
|
-
return webAuthMode === 'redirect';
|
|
43
|
-
}
|
|
44
|
-
//# sourceMappingURL=legacyRedirectLanes.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["allowsAutomaticIdpRedirect","webAuthMode"],"sourceRoot":"../../../../src","sources":["ui/oauth/legacyRedirectLanes.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;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASA,0BAA0BA,CAACC,WAAwB,EAAW;EAC5E,OAAOA,WAAW,KAAK,UAAU;AACnC","ignoreList":[]}
|