@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.
- package/README.md +16 -46
- package/lib/commonjs/index.js +84 -10
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/notifications/deviceNotifications.js +380 -0
- package/lib/commonjs/notifications/deviceNotifications.js.map +1 -0
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +51 -9
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/client.js +0 -13
- package/lib/commonjs/ui/client.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/OxyAccountDialogScreen.js +14 -3
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +70 -1121
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyConsentScreen.js +50 -12
- package/lib/commonjs/ui/components/OxyConsentScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +4 -4
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +74 -40
- package/lib/commonjs/ui/components/OxySignInButton.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 +527 -0
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js +90 -0
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +106 -0
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/SignUpView.js +188 -0
- package/lib/commonjs/ui/components/authChooser/SignUpView.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +61 -0
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/primitives.js +170 -0
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +153 -0
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/signInProgress.js +54 -0
- package/lib/commonjs/ui/components/authChooser/signInProgress.js.map +1 -0
- package/lib/commonjs/ui/components/{oxyAuthChooserStyles.js → authChooser/styles.js} +19 -1
- package/lib/commonjs/ui/components/authChooser/styles.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/types.js +70 -0
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js +50 -0
- package/lib/commonjs/ui/components/authChooser/useUsernameAvailability.js.map +1 -0
- 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/context/OxyContext.js +200 -29
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +43 -0
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +13 -5
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +6 -1
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +1 -1
- package/lib/commonjs/ui/index.js +0 -13
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/oauth/browserAuthTransport.js +168 -0
- package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -0
- package/lib/commonjs/ui/oauth/completeOAuthCode.js +78 -0
- package/lib/commonjs/ui/oauth/completeOAuthCode.js.map +1 -0
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +48 -0
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +1 -0
- package/lib/commonjs/ui/oauth/oauthHandshake.js +53 -0
- package/lib/commonjs/ui/oauth/oauthHandshake.js.map +1 -0
- package/lib/commonjs/ui/oauth/oauthPopup.js +229 -0
- package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -0
- package/lib/commonjs/ui/oauth/oauthPopupMessages.js +141 -0
- package/lib/commonjs/ui/oauth/oauthPopupMessages.js.map +1 -0
- package/lib/commonjs/ui/oauth/types.js +2 -0
- package/lib/commonjs/ui/oauth/types.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +4 -3
- package/lib/commonjs/ui/screens/AccountMembersScreen.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 +11 -10
- 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/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 +9 -8
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +10 -10
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +3 -3
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +3 -2
- 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 +4 -3
- 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 +4 -3
- 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/server.js +2 -5
- package/lib/commonjs/ui/server.js.map +1 -1
- package/lib/commonjs/ui/session/authStore.js +6 -75
- package/lib/commonjs/ui/session/authStore.js.map +1 -1
- package/lib/commonjs/ui/session/createSessionClient.js +11 -3
- package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
- package/lib/commonjs/ui/session/identityBinding.js +95 -0
- package/lib/commonjs/ui/session/identityBinding.js.map +1 -0
- package/lib/commonjs/ui/session/index.js +13 -0
- package/lib/commonjs/ui/session/index.js.map +1 -1
- package/lib/commonjs/ui/session/nativeSecureStorage.js +90 -0
- package/lib/commonjs/ui/session/nativeSecureStorage.js.map +1 -0
- package/lib/commonjs/ui/session/tokenTransport.js +11 -1
- package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
- package/lib/commonjs/ui/utils/crossOriginRestore.js +3 -2
- package/lib/commonjs/ui/utils/crossOriginRestore.js.map +1 -1
- package/lib/commonjs/ui/utils/deliveryPlatform.js +58 -0
- package/lib/commonjs/ui/utils/deliveryPlatform.js.map +1 -0
- package/lib/commonjs/ui/utils/oauthReturn.js +70 -46
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/index.js +27 -4
- package/lib/module/index.js.map +1 -1
- package/lib/module/notifications/deviceNotifications.js +371 -0
- package/lib/module/notifications/deviceNotifications.js.map +1 -0
- package/lib/module/ui/boot/runProviderColdBoot.js +51 -9
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/client.js +0 -1
- package/lib/module/ui/client.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/OxyAccountDialogScreen.js +14 -3
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +74 -1126
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyConsentScreen.js +50 -12
- package/lib/module/ui/components/OxyConsentScreen.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +4 -4
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +76 -42
- package/lib/module/ui/components/OxySignInButton.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 +523 -0
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -0
- package/lib/module/ui/components/authChooser/SignInEntryView.js +85 -0
- package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -0
- package/lib/module/ui/components/authChooser/SignInRequestView.js +101 -0
- package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -0
- package/lib/module/ui/components/authChooser/SignUpView.js +184 -0
- package/lib/module/ui/components/authChooser/SignUpView.js.map +1 -0
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js +57 -0
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
- package/lib/module/ui/components/authChooser/primitives.js +163 -0
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -0
- package/lib/module/ui/components/authChooser/requestSurfaces.js +143 -0
- package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -0
- package/lib/module/ui/components/authChooser/signInProgress.js +50 -0
- package/lib/module/ui/components/authChooser/signInProgress.js.map +1 -0
- package/lib/module/ui/components/{oxyAuthChooserStyles.js → authChooser/styles.js} +19 -1
- package/lib/module/ui/components/authChooser/styles.js.map +1 -0
- package/lib/module/ui/components/authChooser/types.js +66 -0
- package/lib/module/ui/components/authChooser/types.js.map +1 -0
- package/lib/module/ui/components/authChooser/useUsernameAvailability.js +46 -0
- package/lib/module/ui/components/authChooser/useUsernameAvailability.js.map +1 -0
- 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/context/OxyContext.js +203 -32
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +42 -0
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +13 -5
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/useSwitchableAccounts.js +6 -1
- package/lib/module/ui/hooks/useSwitchableAccounts.js.map +1 -1
- package/lib/module/ui/index.js +0 -1
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/oauth/browserAuthTransport.js +165 -0
- package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -0
- package/lib/module/ui/oauth/completeOAuthCode.js +75 -0
- package/lib/module/ui/oauth/completeOAuthCode.js.map +1 -0
- package/lib/module/ui/oauth/legacyRedirectLanes.js +44 -0
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +1 -0
- package/lib/module/ui/oauth/oauthHandshake.js +50 -0
- package/lib/module/ui/oauth/oauthHandshake.js.map +1 -0
- package/lib/module/ui/oauth/oauthPopup.js +221 -0
- package/lib/module/ui/oauth/oauthPopup.js.map +1 -0
- package/lib/module/ui/oauth/oauthPopupMessages.js +135 -0
- package/lib/module/ui/oauth/oauthPopupMessages.js.map +1 -0
- package/lib/module/ui/oauth/types.js +2 -0
- package/lib/module/ui/oauth/types.js.map +1 -0
- package/lib/module/ui/screens/AccountMembersScreen.js +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.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 +1 -1
- 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/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 +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +1 -1
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +1 -1
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +1 -1
- 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 +2 -1
- 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 +1 -1
- 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/server.js +0 -2
- package/lib/module/ui/server.js.map +1 -1
- package/lib/module/ui/session/authStore.js +5 -75
- package/lib/module/ui/session/authStore.js.map +1 -1
- package/lib/module/ui/session/createSessionClient.js +11 -3
- package/lib/module/ui/session/createSessionClient.js.map +1 -1
- package/lib/module/ui/session/identityBinding.js +89 -0
- package/lib/module/ui/session/identityBinding.js.map +1 -0
- package/lib/module/ui/session/index.js +5 -2
- package/lib/module/ui/session/index.js.map +1 -1
- package/lib/module/ui/session/nativeSecureStorage.js +88 -0
- package/lib/module/ui/session/nativeSecureStorage.js.map +1 -0
- package/lib/module/ui/session/tokenTransport.js +11 -1
- package/lib/module/ui/session/tokenTransport.js.map +1 -1
- package/lib/module/ui/utils/crossOriginRestore.js +4 -3
- package/lib/module/ui/utils/crossOriginRestore.js.map +1 -1
- package/lib/module/ui/utils/deliveryPlatform.js +55 -0
- package/lib/module/ui/utils/deliveryPlatform.js.map +1 -0
- package/lib/module/ui/utils/oauthReturn.js +70 -46
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +9 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts +141 -0
- package/lib/typescript/commonjs/notifications/deviceNotifications.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +34 -2
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +0 -1
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +16 -29
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyConsentScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +17 -12
- package/lib/typescript/commonjs/ui/components/OxySignInButton.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/AccountsMenuView.d.ts +38 -0
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts +32 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +34 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts +34 -0
- package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +36 -0
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +55 -0
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +58 -0
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts +26 -0
- package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts.map +1 -0
- package/lib/typescript/{module/ui/components/oxyAuthChooserStyles.d.ts → commonjs/ui/components/authChooser/styles.d.ts} +19 -1
- package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +103 -0
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/authChooser/useUsernameAvailability.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/authChooser/useUsernameAvailability.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/payment/types.d.ts +1 -1
- 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 +40 -0
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +44 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +7 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +0 -1
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts +56 -0
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/completeOAuthCode.d.ts +49 -0
- package/lib/typescript/commonjs/ui/oauth/completeOAuthCode.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +40 -0
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts +50 -0
- package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +77 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopupMessages.d.ts +67 -0
- package/lib/typescript/commonjs/ui/oauth/oauthPopupMessages.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/oauth/types.d.ts +176 -0
- package/lib/typescript/commonjs/ui/oauth/types.d.ts.map +1 -0
- 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/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/server.d.ts +0 -2
- package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/authStore.d.ts +3 -7
- package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +8 -1
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/identityBinding.d.ts +66 -0
- package/lib/typescript/commonjs/ui/session/identityBinding.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/index.d.ts +6 -2
- package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts +25 -0
- package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +8 -1
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +44 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/crossOriginRestore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/deliveryPlatform.d.ts +33 -0
- package/lib/typescript/commonjs/ui/utils/deliveryPlatform.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts +30 -16
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +9 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/notifications/deviceNotifications.d.ts +141 -0
- package/lib/typescript/module/notifications/deviceNotifications.d.ts.map +1 -0
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +34 -2
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +0 -1
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +16 -29
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyConsentScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts +17 -12
- package/lib/typescript/module/ui/components/OxySignInButton.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/AccountsMenuView.d.ts +38 -0
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts +32 -0
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +34 -0
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts +34 -0
- package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +36 -0
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +55 -0
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +58 -0
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts +26 -0
- package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts.map +1 -0
- package/lib/typescript/{commonjs/ui/components/oxyAuthChooserStyles.d.ts → module/ui/components/authChooser/styles.d.ts} +19 -1
- package/lib/typescript/module/ui/components/authChooser/styles.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +103 -0
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/authChooser/useUsernameAvailability.d.ts +16 -0
- package/lib/typescript/module/ui/components/authChooser/useUsernameAvailability.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/payment/types.d.ts +1 -1
- 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 +40 -0
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +44 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +7 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +0 -1
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts +56 -0
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/completeOAuthCode.d.ts +49 -0
- package/lib/typescript/module/ui/oauth/completeOAuthCode.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +40 -0
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts +50 -0
- package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +77 -0
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/oauthPopupMessages.d.ts +67 -0
- package/lib/typescript/module/ui/oauth/oauthPopupMessages.d.ts.map +1 -0
- package/lib/typescript/module/ui/oauth/types.d.ts +176 -0
- package/lib/typescript/module/ui/oauth/types.d.ts.map +1 -0
- 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/fileManagement/PhotoPickerSection.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +0 -2
- package/lib/typescript/module/ui/server.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/authStore.d.ts +3 -7
- package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/createSessionClient.d.ts +8 -1
- package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/identityBinding.d.ts +66 -0
- package/lib/typescript/module/ui/session/identityBinding.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/index.d.ts +6 -2
- package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts +25 -0
- package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/tokenTransport.d.ts +8 -1
- package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +44 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/crossOriginRestore.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/deliveryPlatform.d.ts +33 -0
- package/lib/typescript/module/ui/utils/deliveryPlatform.d.ts.map +1 -0
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts +30 -16
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/package.json +15 -7
- package/src/index.ts +50 -5
- package/src/notifications/deviceNotifications.ts +395 -0
- package/src/ui/boot/__tests__/coldBootWebAuthMode.test.ts +281 -0
- package/src/ui/boot/runProviderColdBoot.ts +83 -13
- package/src/ui/client.ts +0 -1
- package/src/ui/components/AvatarCameraBadge.tsx +1 -1
- package/src/ui/components/OxyAccountDialogScreen.tsx +20 -3
- package/src/ui/components/OxyAuthChooser.tsx +91 -1230
- package/src/ui/components/OxyConsentScreen.tsx +56 -13
- package/src/ui/components/OxyProvider.tsx +4 -4
- package/src/ui/components/OxySignInButton.tsx +119 -78
- 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/__tests__/OxyConsentScreen.test.tsx +27 -0
- package/src/ui/components/authChooser/AccountsMenuView.tsx +569 -0
- package/src/ui/components/authChooser/SignInEntryView.tsx +121 -0
- package/src/ui/components/authChooser/SignInRequestView.tsx +130 -0
- package/src/ui/components/authChooser/SignUpView.tsx +174 -0
- package/src/ui/components/authChooser/TroubleDisclosure.tsx +73 -0
- package/src/ui/components/authChooser/primitives.tsx +144 -0
- package/src/ui/components/authChooser/requestSurfaces.tsx +120 -0
- package/src/ui/components/authChooser/signInProgress.ts +54 -0
- package/src/ui/components/{oxyAuthChooserStyles.ts → authChooser/styles.ts} +18 -0
- package/src/ui/components/authChooser/types.ts +120 -0
- package/src/ui/components/authChooser/useUsernameAvailability.ts +60 -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 +1 -1
- package/src/ui/context/OxyContext.tsx +220 -24
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +89 -0
- package/src/ui/context/commitSessionFlow.ts +61 -0
- package/src/ui/context/oxyContextTypes.ts +45 -1
- package/src/ui/context/useOxyAccountGraph.ts +19 -5
- package/src/ui/hooks/useSwitchableAccounts.ts +12 -1
- package/src/ui/index.ts +0 -1
- package/src/ui/oauth/__tests__/browserAuthTransport.test.ts +335 -0
- package/src/ui/oauth/__tests__/completeOAuthCode.test.ts +142 -0
- package/src/ui/oauth/__tests__/oauthPopup.test.ts +326 -0
- package/src/ui/oauth/__tests__/oauthPopupMessages.test.ts +189 -0
- package/src/ui/oauth/__tests__/sharedCompletionPath.test.ts +174 -0
- package/src/ui/oauth/browserAuthTransport.ts +187 -0
- package/src/ui/oauth/completeOAuthCode.ts +93 -0
- package/src/ui/oauth/legacyRedirectLanes.ts +43 -0
- package/src/ui/oauth/oauthHandshake.ts +74 -0
- package/src/ui/oauth/oauthPopup.ts +219 -0
- package/src/ui/oauth/oauthPopupMessages.ts +136 -0
- package/src/ui/oauth/types.ts +150 -0
- package/src/ui/screens/AccountMembersScreen.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 +2 -1
- package/src/ui/screens/FileManagementScreen.tsx +2 -1
- 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 +1 -1
- package/src/ui/screens/ProfileScreen.tsx +1 -1
- package/src/ui/screens/UserListScreen.tsx +1 -1
- package/src/ui/screens/WelcomeNewUserScreen.tsx +1 -1
- 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 +2 -1
- 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 +1 -1
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/server.ts +0 -2
- package/src/ui/session/__tests__/createSessionClient.test.ts +26 -0
- package/src/ui/session/__tests__/tokenTransport.test.ts +34 -0
- package/src/ui/session/authStore.ts +5 -89
- package/src/ui/session/createSessionClient.ts +15 -2
- package/src/ui/session/identityBinding.ts +116 -0
- package/src/ui/session/index.ts +6 -2
- package/src/ui/session/nativeSecureStorage.ts +98 -0
- package/src/ui/session/tokenTransport.ts +14 -1
- package/src/ui/types/navigation.ts +44 -1
- package/src/ui/utils/crossOriginRestore.ts +4 -7
- package/src/ui/utils/deliveryPlatform.ts +65 -0
- package/src/ui/utils/fileManagement.ts +1 -1
- package/src/ui/utils/oauthReturn.ts +74 -65
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/commonjs/ui/components/FontLoader.js +0 -35
- package/lib/commonjs/ui/components/FontLoader.js.map +0 -1
- package/lib/commonjs/ui/components/FontLoader.native.js +0 -88
- package/lib/commonjs/ui/components/FontLoader.native.js.map +0 -1
- package/lib/commonjs/ui/components/oxyAuthChooserStyles.js.map +0 -1
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/module/ui/components/FontLoader.js +0 -29
- package/lib/module/ui/components/FontLoader.js.map +0 -1
- package/lib/module/ui/components/FontLoader.native.js +0 -83
- package/lib/module/ui/components/FontLoader.native.js.map +0 -1
- package/lib/module/ui/components/oxyAuthChooserStyles.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/FontLoader.native.d.ts +0 -13
- package/lib/typescript/commonjs/ui/components/FontLoader.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/oxyAuthChooserStyles.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/FontLoader.d.ts +0 -24
- package/lib/typescript/module/ui/components/FontLoader.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/FontLoader.native.d.ts +0 -13
- package/lib/typescript/module/ui/components/FontLoader.native.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/oxyAuthChooserStyles.d.ts.map +0 -1
- package/src/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/src/ui/components/FontLoader.native.tsx +0 -88
- package/src/ui/components/FontLoader.tsx +0 -27
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The PRIMARY visual of an active "Sign in with Oxy" request — one surface per
|
|
3
|
+
* route, chosen by {@link RequestPrimarySurface} from the controller's own facts.
|
|
4
|
+
*
|
|
5
|
+
* Each is a leading visual and nothing else: the status sentence underneath is
|
|
6
|
+
* owned by `signInProgressLabel`, and the alternatives by `TroubleDisclosure`.
|
|
7
|
+
* That separation is what keeps exactly one primary action on screen (issue
|
|
8
|
+
* #691) — a surface here can never grow a competing button.
|
|
9
|
+
*
|
|
10
|
+
* Anti-phishing: the QR plate encodes `signIn.qrPayload` and renders NOTHING
|
|
11
|
+
* derived from it. Application identity, origin, and scopes are resolved
|
|
12
|
+
* server-side by the approver (Commons), never read out of the payload here.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import type React from 'react';
|
|
16
|
+
import { View } from 'react-native';
|
|
17
|
+
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
18
|
+
import QRCode from 'react-native-qrcode-svg';
|
|
19
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
20
|
+
import { Loading } from '@oxyhq/bloom/loading';
|
|
21
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
22
|
+
import type { CommonsDeliveryRoute, SignInProgress } from '@oxyhq/core';
|
|
23
|
+
import { authChooserStyles as styles } from './styles';
|
|
24
|
+
import type { Theme, Translate } from './types';
|
|
25
|
+
|
|
26
|
+
/** High-contrast QR colors — intentionally fixed (NOT themed) for scan reliability. */
|
|
27
|
+
const QR_PLATE_BG = '#FFFFFF';
|
|
28
|
+
const QR_FOREGROUND = '#000000';
|
|
29
|
+
const QR_SIZE = 196;
|
|
30
|
+
/** The leading route glyph, sized to sit where the QR plate otherwise would. */
|
|
31
|
+
const ROUTE_GLYPH_SIZE = 44;
|
|
32
|
+
|
|
33
|
+
/** The indeterminate leading visual: the request exists but has nothing to show yet. */
|
|
34
|
+
export const PreparingSurface: React.FC = () => <Loading variant="spinner" size="large" />;
|
|
35
|
+
|
|
36
|
+
/** The leading glyph for a route whose surface is elsewhere (the phone, Commons). */
|
|
37
|
+
export const RouteGlyph: React.FC<{
|
|
38
|
+
name: keyof typeof MaterialCommunityIcons.glyphMap;
|
|
39
|
+
color: string;
|
|
40
|
+
}> = ({ name, color }) => (
|
|
41
|
+
<MaterialCommunityIcons name={name} size={ROUTE_GLYPH_SIZE} color={color} />
|
|
42
|
+
);
|
|
43
|
+
|
|
44
|
+
/** The cross-device handoff: a headline over the fixed-contrast QR plate. */
|
|
45
|
+
export const QrPlate: React.FC<{ payload: string; theme: Theme; t: Translate }> = ({
|
|
46
|
+
payload,
|
|
47
|
+
theme,
|
|
48
|
+
t,
|
|
49
|
+
}) => (
|
|
50
|
+
<>
|
|
51
|
+
<Text style={[styles.qrHeadline, { color: theme.colors.text }]}>
|
|
52
|
+
{t('accountSwitcher.qrHeadline')}
|
|
53
|
+
</Text>
|
|
54
|
+
<View style={styles.qrPlate}>
|
|
55
|
+
<QRCode value={payload} size={QR_SIZE} backgroundColor={QR_PLATE_BG} color={QR_FOREGROUND} />
|
|
56
|
+
</View>
|
|
57
|
+
</>
|
|
58
|
+
);
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* The acquisition surface. For someone with no Commons at all this is the
|
|
62
|
+
* GENUINE primary route, not a fallback — a same-device QR they would have to
|
|
63
|
+
* scan with the very screen showing it is a dead end — so it renders as the
|
|
64
|
+
* surface's one primary action.
|
|
65
|
+
*/
|
|
66
|
+
export const GetCommonsPrompt: React.FC<{
|
|
67
|
+
theme: Theme;
|
|
68
|
+
t: Translate;
|
|
69
|
+
onGetCommons: () => void;
|
|
70
|
+
}> = ({ theme, t, onGetCommons }) => (
|
|
71
|
+
<>
|
|
72
|
+
<Text style={[styles.mutedText, { color: theme.colors.textSecondary }]}>
|
|
73
|
+
{t('accountSwitcher.commonsNotInstalled')}
|
|
74
|
+
</Text>
|
|
75
|
+
<Button
|
|
76
|
+
variant="primary"
|
|
77
|
+
onPress={onGetCommons}
|
|
78
|
+
style={styles.primaryButton}
|
|
79
|
+
testID="get-commons-button"
|
|
80
|
+
>
|
|
81
|
+
{t('accountSwitcher.getCommons')}
|
|
82
|
+
</Button>
|
|
83
|
+
</>
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
/**
|
|
87
|
+
* The one primary visual for the request's current state.
|
|
88
|
+
*
|
|
89
|
+
* Ordered most-terminal-first, so a late-arriving route can never pull the
|
|
90
|
+
* surface back from "confirming" to a QR the user has already scanned. Every
|
|
91
|
+
* branch reads only the facts it is handed — there is no local timeline, and no
|
|
92
|
+
* dependency on WHICH kind of request produced them (the account dialog's device
|
|
93
|
+
* flow and the IdP's OAuth-bound lane both resolve the same three).
|
|
94
|
+
*/
|
|
95
|
+
export const RequestPrimarySurface: React.FC<{
|
|
96
|
+
route: CommonsDeliveryRoute | null;
|
|
97
|
+
progress: SignInProgress;
|
|
98
|
+
qrPayload: string | null;
|
|
99
|
+
theme: Theme;
|
|
100
|
+
t: Translate;
|
|
101
|
+
}> = ({ route, progress, qrPayload, theme, t }) => {
|
|
102
|
+
if (progress === 'identity-confirmed') {
|
|
103
|
+
return <RouteGlyph name="check-circle" color={theme.colors.success} />;
|
|
104
|
+
}
|
|
105
|
+
if (progress === 'confirming-identity') {
|
|
106
|
+
return <PreparingSurface />;
|
|
107
|
+
}
|
|
108
|
+
if (route === 'qr' && qrPayload) {
|
|
109
|
+
return <QrPlate payload={qrPayload} theme={theme} t={t} />;
|
|
110
|
+
}
|
|
111
|
+
if (route === 'await-push') {
|
|
112
|
+
return <RouteGlyph name="cellphone-message" color={theme.colors.primary} />;
|
|
113
|
+
}
|
|
114
|
+
if (route === 'open-commons') {
|
|
115
|
+
return <RouteGlyph name="open-in-app" color={theme.colors.primary} />;
|
|
116
|
+
}
|
|
117
|
+
// No route resolved yet (or a route with no payload to render): the request is
|
|
118
|
+
// being prepared. Honest, and the only state that is not route-specific.
|
|
119
|
+
return <PreparingSurface />;
|
|
120
|
+
};
|
|
@@ -0,0 +1,54 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* The sign-in status line's copy (issue #691, Phase 5).
|
|
3
|
+
*
|
|
4
|
+
* One responsibility: map the controller's DERIVED `signIn.progress` — plus the
|
|
5
|
+
* chosen route, which only disambiguates the generic waiting step — onto a
|
|
6
|
+
* sentence. Pure and total, with no clock and no state of its own: the line can
|
|
7
|
+
* therefore only advance when the controller observed a real signal, never on a
|
|
8
|
+
* timer and never optimistically.
|
|
9
|
+
*
|
|
10
|
+
* The ladder the user sees:
|
|
11
|
+
*
|
|
12
|
+
* Preparing request
|
|
13
|
+
* Check Commons on your phone
|
|
14
|
+
* Opened in Commons
|
|
15
|
+
* Confirming identity
|
|
16
|
+
* Identity confirmed
|
|
17
|
+
*/
|
|
18
|
+
|
|
19
|
+
import type { CommonsDeliveryRoute, SignInProgress } from '@oxyhq/core';
|
|
20
|
+
import type { Translate } from './types';
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* The status sentence for the active request, or `null` when there is nothing
|
|
24
|
+
* honest to say (no live request, or a terminal error — which is toasted, never
|
|
25
|
+
* rendered inline).
|
|
26
|
+
*/
|
|
27
|
+
export function signInProgressLabel(
|
|
28
|
+
progress: SignInProgress,
|
|
29
|
+
route: CommonsDeliveryRoute | null,
|
|
30
|
+
t: Translate,
|
|
31
|
+
): string | null {
|
|
32
|
+
switch (progress) {
|
|
33
|
+
case 'idle':
|
|
34
|
+
return null;
|
|
35
|
+
case 'preparing':
|
|
36
|
+
return t('accountSwitcher.progress.preparing');
|
|
37
|
+
case 'awaiting-approval':
|
|
38
|
+
// The only step whose copy depends on the route: waiting means something
|
|
39
|
+
// different when the user is holding a QR than when Commons was opened
|
|
40
|
+
// for them. `await-push` never reaches here — a chosen push route is
|
|
41
|
+
// itself a confirmed dispatch, so it derives to `delivered-to-commons`.
|
|
42
|
+
if (route === 'qr') return t('accountSwitcher.progress.scanWithCommons');
|
|
43
|
+
if (route === 'open-commons') return t('accountSwitcher.progress.continueInCommons');
|
|
44
|
+
return t('accountSwitcher.progress.awaitingApproval');
|
|
45
|
+
case 'delivered-to-commons':
|
|
46
|
+
return t('accountSwitcher.progress.checkCommons');
|
|
47
|
+
case 'opened-in-commons':
|
|
48
|
+
return t('accountSwitcher.progress.openedInCommons');
|
|
49
|
+
case 'confirming-identity':
|
|
50
|
+
return t('accountSwitcher.progress.confirming');
|
|
51
|
+
case 'identity-confirmed':
|
|
52
|
+
return t('accountSwitcher.progress.confirmed');
|
|
53
|
+
}
|
|
54
|
+
}
|
|
@@ -7,6 +7,10 @@ const QR_PLATE_BG = '#FFFFFF';
|
|
|
7
7
|
* Shared styles for `OxyAuthChooser`'s views. Extracted from `OxyAccountDialogScreen`
|
|
8
8
|
* so both the Dialog-wrapped host and any bare host (e.g. a future
|
|
9
9
|
* auth.oxy.so hub page) render identically without duplicating a StyleSheet.
|
|
10
|
+
*
|
|
11
|
+
* Only what NativeWind cannot express lives here: the animated collapse, the
|
|
12
|
+
* fixed-contrast QR plate, per-account accent rings, and the small subordinate
|
|
13
|
+
* text-link rhythm every view's fallback affordances share.
|
|
10
14
|
*/
|
|
11
15
|
export const authChooserStyles = StyleSheet.create({
|
|
12
16
|
rows: {
|
|
@@ -192,4 +196,18 @@ export const authChooserStyles = StyleSheet.create({
|
|
|
192
196
|
borderRadius: 16,
|
|
193
197
|
backgroundColor: QR_PLATE_BG,
|
|
194
198
|
},
|
|
199
|
+
/**
|
|
200
|
+
* The revealed "Having trouble?" alternatives — a tight stack of subordinate
|
|
201
|
+
* text links. They share `footerLink`'s rhythm, so the stack itself only has
|
|
202
|
+
* to stop them drifting apart.
|
|
203
|
+
*/
|
|
204
|
+
troubleActions: {
|
|
205
|
+
width: '100%',
|
|
206
|
+
alignItems: 'center',
|
|
207
|
+
},
|
|
208
|
+
/** The disclosure trigger, aligned with the subordinate links it reveals. */
|
|
209
|
+
troubleTrigger: {
|
|
210
|
+
alignSelf: 'center',
|
|
211
|
+
marginTop: 12,
|
|
212
|
+
},
|
|
195
213
|
});
|
|
@@ -0,0 +1,120 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Shared types + per-account color resolution for the auth chooser's views.
|
|
3
|
+
*
|
|
4
|
+
* One responsibility: the vocabulary every view module in this folder speaks
|
|
5
|
+
* (theme/translate aliases, the container-supplied action bundles, and the
|
|
6
|
+
* account accent). No JSX, no state, no I/O — so a view can import it without
|
|
7
|
+
* dragging any other view in.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { APP_COLOR_NAMES, APP_COLOR_PRESETS, type AppColorName, type useTheme } from '@oxyhq/bloom/theme';
|
|
11
|
+
import type { useI18n } from '../../hooks/useI18n';
|
|
12
|
+
|
|
13
|
+
export type Theme = ReturnType<typeof useTheme>;
|
|
14
|
+
export type Translate = ReturnType<typeof useI18n>['t'];
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* One SUBORDINATE action on a sign-in surface — an alternative revealed behind
|
|
18
|
+
* "Having trouble?", or a non-competing link under the primary.
|
|
19
|
+
*
|
|
20
|
+
* Never a primary button: a sign-in surface presents exactly ONE of those (issue
|
|
21
|
+
* #691), and keeping every other affordance on this single shape is what stops
|
|
22
|
+
* one of them quietly growing into a co-equal button again.
|
|
23
|
+
*
|
|
24
|
+
* Part of the public SDK surface — `OxySignInRequestSurface` takes these.
|
|
25
|
+
*/
|
|
26
|
+
export interface OxySignInSurfaceAction {
|
|
27
|
+
/** Stable identity for the list, and the action's `testID`. */
|
|
28
|
+
key: string;
|
|
29
|
+
/** Already-localized label. The host resolves its own copy. */
|
|
30
|
+
label: string;
|
|
31
|
+
onPress: () => void;
|
|
32
|
+
disabled?: boolean;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
/** The account-row actions the container wires for the switcher + menu views. */
|
|
36
|
+
export interface OxyAuthChooserHandlers {
|
|
37
|
+
onSwitch: (accountId: string) => void;
|
|
38
|
+
onAdd: () => void;
|
|
39
|
+
onManage: () => void;
|
|
40
|
+
/**
|
|
41
|
+
* Change the current account's photo — opens the avatar-change flow. Because
|
|
42
|
+
* the account menu lives in the AccountDialog surface, this MORPHS that surface
|
|
43
|
+
* into `ChangeAvatar` (via `openAvatarPicker` → `openWithinOrPresent`), the same
|
|
44
|
+
* flow ManageAccount's avatar uses; it never stacks a new dialog.
|
|
45
|
+
*/
|
|
46
|
+
onEditAvatar: () => void;
|
|
47
|
+
}
|
|
48
|
+
|
|
49
|
+
/** Used/total storage bytes for the "Oxy storage" block, or `null` when unknown. */
|
|
50
|
+
export interface AccountStorageModel {
|
|
51
|
+
usedBytes: number;
|
|
52
|
+
limitBytes: number;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
/** The account-menu row actions the container wires (deep-links / sheets / sign-out). */
|
|
56
|
+
export interface AccountsMenuActions {
|
|
57
|
+
onOpenSettings: () => void;
|
|
58
|
+
onOpenData: () => void;
|
|
59
|
+
onManageStorage: () => void;
|
|
60
|
+
onUpgradeStorage: () => void;
|
|
61
|
+
onHelp: () => void;
|
|
62
|
+
onPrivacy: () => void;
|
|
63
|
+
onTerms: () => void;
|
|
64
|
+
onSignOut: () => void;
|
|
65
|
+
}
|
|
66
|
+
|
|
67
|
+
/**
|
|
68
|
+
* Where a WebAuthn ceremony can run from the current origin.
|
|
69
|
+
*
|
|
70
|
+
* A credential minted for `oxy.so` can only be ASSERTED there (or a loopback
|
|
71
|
+
* dev host) — a hard, browser-enforced RP-ID boundary, not feature detection.
|
|
72
|
+
* `'direct'` = a first-party Oxy web origin, the ceremony runs here.
|
|
73
|
+
* `'hub'` = any other web origin; it runs in the auth.oxy.so popup instead.
|
|
74
|
+
* `'none'` = native, where Commons owns identity.
|
|
75
|
+
*/
|
|
76
|
+
export type PasskeyMode = 'direct' | 'hub' | 'none';
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Everything that is NOT the sign-in surface's one primary action.
|
|
80
|
+
*
|
|
81
|
+
* The container wires these once; each view decides which of them are genuine
|
|
82
|
+
* alternatives to ITS primary surface and hands those to `TroubleDisclosure`
|
|
83
|
+
* (issue #691: fallbacks stay hidden until the user asks or the primary route
|
|
84
|
+
* fails). A view never renders one of these as a button.
|
|
85
|
+
*/
|
|
86
|
+
export interface SignInAlternatives {
|
|
87
|
+
/** Whether a WebAuthn ceremony is reachable from this origin at all. */
|
|
88
|
+
passkeyAvailable: boolean;
|
|
89
|
+
/**
|
|
90
|
+
* `true` while a DIRECT ceremony is in flight. The hub-popup variant reports
|
|
91
|
+
* its progress through `snapshot.signIn` instead, so it never sets this.
|
|
92
|
+
*/
|
|
93
|
+
passkeyPending: boolean;
|
|
94
|
+
onSignInWithPasskey: () => void;
|
|
95
|
+
/** Fall back to the cross-device QR handoff (restarts the request). */
|
|
96
|
+
onShowQr: () => void;
|
|
97
|
+
/** Open the Commons store listing / landing page for this platform. */
|
|
98
|
+
onGetCommons: () => void;
|
|
99
|
+
/** Enter the account-creation view. */
|
|
100
|
+
onCreateAccount: () => void;
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
/**
|
|
104
|
+
* Resolve an account's stored color (a named Bloom preset, e.g. `'purple'`) to
|
|
105
|
+
* a concrete brand hex for the row accent. Falls back to the theme primary when
|
|
106
|
+
* the account has no color or the value is not a recognized preset, so the accent
|
|
107
|
+
* renders in EVERY consumer regardless of NativeWind availability.
|
|
108
|
+
*/
|
|
109
|
+
export function resolveAccentHex(color: string | null, fallback: string): string {
|
|
110
|
+
const preset = toPreset(color);
|
|
111
|
+
return preset ? APP_COLOR_PRESETS[preset].hex : fallback;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/** Narrow a stored color string to a known `AppColorName`, or `undefined`. */
|
|
115
|
+
export function toPreset(color: string | null): AppColorName | undefined {
|
|
116
|
+
if (!color) return undefined;
|
|
117
|
+
return (APP_COLOR_NAMES as readonly string[]).includes(color)
|
|
118
|
+
? (color as AppColorName)
|
|
119
|
+
: undefined;
|
|
120
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Debounced username-availability check over the existing SDK method.
|
|
3
|
+
*
|
|
4
|
+
* One responsibility: turn keystrokes into an `idle | checking | available |
|
|
5
|
+
* taken` verdict without racing. A sequence guard drops superseded responses,
|
|
6
|
+
* and a NETWORK failure resets the (now stale) verdict and toasts — it never
|
|
7
|
+
* paints an inline error inside the dialog (owner mandate).
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { useCallback, useRef, useState } from 'react';
|
|
11
|
+
import { toast } from '@oxyhq/bloom';
|
|
12
|
+
import type { OxyServices } from '@oxyhq/core';
|
|
13
|
+
import type { Translate } from './types';
|
|
14
|
+
|
|
15
|
+
export type UsernameStatus = 'idle' | 'checking' | 'available' | 'taken';
|
|
16
|
+
|
|
17
|
+
/** Keystrokes settle for this long before a check is issued. */
|
|
18
|
+
const DEBOUNCE_MS = 400;
|
|
19
|
+
/** Shorter than this and there is nothing worth asking the server about. */
|
|
20
|
+
const MIN_USERNAME_LENGTH = 3;
|
|
21
|
+
|
|
22
|
+
export function useUsernameAvailability(
|
|
23
|
+
oxyServices: OxyServices,
|
|
24
|
+
t: Translate,
|
|
25
|
+
): {
|
|
26
|
+
status: UsernameStatus;
|
|
27
|
+
check: (value: string) => void;
|
|
28
|
+
} {
|
|
29
|
+
const [status, setStatus] = useState<UsernameStatus>('idle');
|
|
30
|
+
const timerRef = useRef<ReturnType<typeof setTimeout> | null>(null);
|
|
31
|
+
const requestSeqRef = useRef(0);
|
|
32
|
+
|
|
33
|
+
const check = useCallback(
|
|
34
|
+
(value: string) => {
|
|
35
|
+
if (timerRef.current) clearTimeout(timerRef.current);
|
|
36
|
+
const seq = ++requestSeqRef.current;
|
|
37
|
+
if (!value || value.length < MIN_USERNAME_LENGTH) {
|
|
38
|
+
setStatus('idle');
|
|
39
|
+
return;
|
|
40
|
+
}
|
|
41
|
+
setStatus('checking');
|
|
42
|
+
timerRef.current = setTimeout(() => {
|
|
43
|
+
void oxyServices
|
|
44
|
+
.checkUsernameAvailability(value)
|
|
45
|
+
.then((result) => {
|
|
46
|
+
if (seq !== requestSeqRef.current) return; // superseded by a newer check
|
|
47
|
+
setStatus(result.available ? 'available' : 'taken');
|
|
48
|
+
})
|
|
49
|
+
.catch(() => {
|
|
50
|
+
if (seq !== requestSeqRef.current) return;
|
|
51
|
+
setStatus('idle');
|
|
52
|
+
toast.error(t('accounts.create.username.checkFailed'));
|
|
53
|
+
});
|
|
54
|
+
}, DEBOUNCE_MS);
|
|
55
|
+
},
|
|
56
|
+
[oxyServices, t],
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
return { status, check };
|
|
60
|
+
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useEffect, useRef } from 'react';
|
|
3
3
|
import { TouchableOpacity, Animated, Easing } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
5
5
|
|
|
6
6
|
interface AnimatedButtonProps {
|
|
7
7
|
isSelected: boolean;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { View, Text } from 'react-native';
|
|
3
|
-
import
|
|
3
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
4
4
|
import { Button } from '@oxyhq/bloom/button';
|
|
5
5
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
6
6
|
import { surfaces, type SurfaceControls } from '@oxyhq/bloom/surfaces';
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import { useMemo, useState, useEffect } from 'react';
|
|
3
3
|
import { View, Text, TouchableOpacity, ScrollView, ActivityIndicator, Image, StyleSheet } from 'react-native';
|
|
4
4
|
import { Image as ExpoImage } from 'expo-image';
|
|
5
|
-
import
|
|
5
|
+
import MaterialCommunityIcons from '@expo/vector-icons/MaterialCommunityIcons';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
7
|
import type { FileMetadata } from '@oxyhq/core';
|
|
8
8
|
import { formatFileSize } from '../../utils/fileManagement';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { View, Text, TouchableOpacity, ScrollView, StyleSheet } from 'react-native';
|
|
3
3
|
import { Image as ExpoImage } from 'expo-image';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { Dialog, type DialogControlProps } from '@oxyhq/bloom';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
7
|
import { formatFileSize, getFileIcon } from '../../utils/fileManagement';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useState, useCallback } from 'react';
|
|
3
3
|
import { View, Text, TextInput } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { Button } from '@oxyhq/bloom/button';
|
|
6
6
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
7
|
import { surfaces, type SurfaceControls } from '@oxyhq/bloom/surfaces';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { View, Text, Animated, TouchableOpacity, Clipboard, Linking } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { Button } from '@oxyhq/bloom/button';
|
|
6
6
|
import { TextField, TextFieldInput } from '@oxyhq/bloom/text-field';
|
|
7
7
|
import FAIRWalletIcon from '../icon/FAIRWalletIcon';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { View, Text, Animated } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
6
|
import { Button } from '@oxyhq/bloom/button';
|
|
7
7
|
import FAIRWalletIcon from '../icon/FAIRWalletIcon';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { View, Text, Animated, ActivityIndicator } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
6
6
|
import { Button } from '@oxyhq/bloom/button';
|
|
7
7
|
import { createPaymentStyles } from './paymentStyles';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useMemo } from 'react';
|
|
3
3
|
import { View, Text, Animated } from 'react-native';
|
|
4
|
-
import
|
|
4
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
5
5
|
import { Button } from '@oxyhq/bloom/button';
|
|
6
6
|
import { createPaymentStyles } from './paymentStyles';
|
|
7
7
|
import type { PaymentColors, PaymentStepAnimations } from './types';
|
|
@@ -2,7 +2,7 @@ import type React from 'react';
|
|
|
2
2
|
import type { ComponentProps } from 'react';
|
|
3
3
|
import { useMemo } from 'react';
|
|
4
4
|
import { View, Text, Animated } from 'react-native';
|
|
5
|
-
import
|
|
5
|
+
import Ionicons from '@expo/vector-icons/Ionicons';
|
|
6
6
|
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
7
7
|
import { Button } from '@oxyhq/bloom/button';
|
|
8
8
|
import { createPaymentStyles } from './paymentStyles';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import type { Animated } from 'react-native';
|
|
3
|
-
import type
|
|
3
|
+
import type Ionicons from '@expo/vector-icons/Ionicons';
|
|
4
4
|
import type { ThemeColors } from '@oxyhq/bloom/theme';
|
|
5
5
|
|
|
6
6
|
export type PaymentItem = {
|