@oxyhq/services 22.12.4 → 22.13.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 +16 -46
- package/lib/commonjs/index.js +18 -12
- package/lib/commonjs/index.js.map +1 -1
- 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/OxyAccountDialogScreen.js +27 -4
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +72 -1123
- 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/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 +144 -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 +63 -0
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/primitives.js +169 -0
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -0
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js +149 -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 +59 -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/context/OxyContext.js +205 -30
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +46 -0
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +15 -2
- package/lib/commonjs/ui/context/hooks/useAuthOperations.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 +170 -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 +276 -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/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 +5 -4
- 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 +72 -46
- package/lib/commonjs/ui/utils/oauthReturn.js.map +1 -1
- package/lib/module/index.js +9 -4
- package/lib/module/index.js.map +1 -1
- 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/OxyAccountDialogScreen.js +27 -4
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +76 -1128
- 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/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 +139 -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 +59 -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 +139 -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 +55 -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/context/OxyContext.js +208 -33
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +45 -0
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +15 -2
- package/lib/module/ui/context/hooks/useAuthOperations.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 +167 -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 +268 -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/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 +6 -5
- 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 +73 -47
- package/lib/module/ui/utils/oauthReturn.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +4 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- 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 +21 -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/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 +43 -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 +54 -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 +85 -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/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/hooks/useAuthOperations.d.ts +11 -2
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.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 +83 -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/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/oauthReturn.d.ts +30 -16
- package/lib/typescript/commonjs/ui/utils/oauthReturn.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +4 -1
- package/lib/typescript/module/index.d.ts.map +1 -1
- 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 +21 -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/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 +43 -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 +54 -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 +85 -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/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/hooks/useAuthOperations.d.ts +11 -2
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.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 +83 -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/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/oauthReturn.d.ts +30 -16
- package/lib/typescript/module/ui/utils/oauthReturn.d.ts.map +1 -1
- package/package.json +6 -8
- package/src/index.ts +19 -5
- 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/OxyAccountDialogScreen.tsx +33 -4
- package/src/ui/components/OxyAuthChooser.tsx +100 -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/__tests__/OxyConsentScreen.test.tsx +27 -0
- package/src/ui/components/authChooser/AccountsMenuView.tsx +569 -0
- package/src/ui/components/authChooser/SignInEntryView.tsx +115 -0
- package/src/ui/components/authChooser/SignInRequestView.tsx +163 -0
- package/src/ui/components/authChooser/SignUpView.tsx +174 -0
- package/src/ui/components/authChooser/TroubleDisclosure.tsx +81 -0
- package/src/ui/components/authChooser/primitives.tsx +144 -0
- package/src/ui/components/authChooser/requestSurfaces.tsx +116 -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 +101 -0
- package/src/ui/components/authChooser/useUsernameAvailability.ts +60 -0
- package/src/ui/context/OxyContext.tsx +226 -24
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +102 -0
- package/src/ui/context/commitSessionFlow.ts +64 -0
- package/src/ui/context/hooks/useAuthOperations.ts +26 -1
- 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 +352 -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 +193 -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 +277 -0
- package/src/ui/oauth/oauthPopupMessages.ts +136 -0
- package/src/ui/oauth/types.ts +150 -0
- 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/__tests__/crossOriginRestore.test.ts +17 -0
- package/src/ui/utils/crossOriginRestore.ts +9 -13
- package/src/ui/utils/deliveryPlatform.ts +65 -0
- package/src/ui/utils/oauthReturn.ts +79 -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
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useState","useEffect","useRef","Platform","logger","generatePkcePair","generateOAuthState","buildOAuthAuthorizeUrl","
|
|
1
|
+
{"version":3,"names":["useCallback","useState","useEffect","useRef","Platform","logger","generatePkcePair","generateOAuthState","buildOAuthAuthorizeUrl","useAuthStore","useShallow","useTheme","Button","useOxy","useI18n","LogoIcon","subscribeToAccountDialog","openAuthorizeUrlNative","closeOAuthPopup","openOAuthPopup","jsx","_jsx","OxySignInButton","variant","onPress","style","textStyle","text","disabled","showWhenAuthenticated","oauthRedirectUri","onOAuthResult","theme","t","openAccountDialog","oxyServices","clientId","webAuthMode","startWebOAuthSignIn","isAuthenticated","isLoading","state","isModalOpen","setIsModalOpen","appResolutionRef","routingRef","shouldPreOpenPopup","OS","Boolean","resolvePublicApplication","cached","current","promise","getPublicApplication","catch","error","startOfficialSignIn","startThirdPartyOAuth","app","popup","undefined","component","application","name","result","redirectUri","status","warn","reason","description","pkce","Promise","all","authorizeUrl","codeChallenge","redirectUrl","codeVerifier","routeSignIn","resolving","type","isOfficial","handlePress","isButtonDisabled","buttonVariant","isContained","logoColor","colors","primary","logoLetterColor","label","fontWeight","icon","height","color","letterColor","marginRight","children"],"sourceRoot":"../../../../src","sources":["ui/components/OxySignInButton.tsx"],"mappings":";;AACA,SAASA,WAAW,EAAEC,QAAQ,EAAEC,SAAS,EAAEC,MAAM,QAAQ,OAAO;AAChE,SAAyDC,QAAQ,QAAQ,cAAc;AACvF,SACIC,MAAM,EACNC,gBAAgB,EAChBC,kBAAkB,EAClBC,sBAAsB,QAEnB,aAAa;AACpB,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IACrBrD,QAAQ,EAAEsD,gBAAiB;IAC3BzD,KAAK,EAAEA,KAAM;IACbC,SAAS,EAAE,CAACtB,QAAQ,CAAC2C,EAAE,KAAK,KAAK,GAAG;MAAE2C,UAAU,EAAE;IAAM,CAAC,GAAG,IAAI,EAAEhE,SAAS,CAAE;IAC7EiE,IAAI,eACAtE,IAAA,CAACN,QAAQ;MACL6E,MAAM,EAAE,EAAG;MACXC,KAAK,EAAER,SAAU;MACjBS,WAAW,EAAEN,eAAgB;MAC7B/D,KAAK,EAAE;QAAEsE,WAAW,EAAE;MAAG;IAAE,CAC9B,CACJ;IAAAC,QAAA,EAEAxD,SAAS,IAAIE,WAAW,GAAGT,CAAC,CAAC,yBAAyB,CAAC,GAAGwD;EAAK,CAC5D,CAAC;AAEjB,CAAC;AAED,eAAenE,eAAe","ignoreList":[]}
|
|
@@ -0,0 +1,523 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* The signed-in Oxy account MENU (`accounts` view) — a Google-account-menu-style
|
|
5
|
+
* full menu built entirely with NativeWind `className` (the dynamic per-account
|
|
6
|
+
* accent hex is the one inline style NativeWind cannot express). Structure:
|
|
7
|
+
*
|
|
8
|
+
* - HERO on its own chrome-free block: the current account's large pressable
|
|
9
|
+
* avatar (with a camera badge to change the photo), the greeting, the account
|
|
10
|
+
* address, and a "Manage your Oxy account" pill.
|
|
11
|
+
* - SWITCH ACCOUNT: a disclosure row whose corner animates from pill to card as
|
|
12
|
+
* the other switchable accounts + "Add another account" + "Manage accounts on
|
|
13
|
+
* this device" reveal beneath it.
|
|
14
|
+
* - OXY STORAGE: cloud + used/total + a composition meter + Upgrade / Manage chips.
|
|
15
|
+
* - MENU rows: Your data in Oxy · Oxy settings · Help & feedback · Sign out —
|
|
16
|
+
* Bloom's grouped section, the same component every other SDK settings surface
|
|
17
|
+
* uses, not a local row copy.
|
|
18
|
+
* - FOOTER: Privacy Policy · Terms of Service.
|
|
19
|
+
*
|
|
20
|
+
* All three blocks share ONE rhythm taken from that grouped section: a 12px
|
|
21
|
+
* content inset, a 12px gap after the leading element, 16px between blocks, and
|
|
22
|
+
* a 16px trailing chevron column.
|
|
23
|
+
*
|
|
24
|
+
* Collapse state is a plain `useState` toggled in the row's press handler — no
|
|
25
|
+
* effect hook, no derived-from-props sync.
|
|
26
|
+
*/
|
|
27
|
+
|
|
28
|
+
import { Fragment, useCallback, useState } from 'react';
|
|
29
|
+
import { Pressable, View } from 'react-native';
|
|
30
|
+
import Animated, { Extrapolation, interpolate, useAnimatedStyle, useSharedValue, withTiming } from 'react-native-reanimated';
|
|
31
|
+
import { MaterialCommunityIcons } from '@expo/vector-icons';
|
|
32
|
+
import { Avatar } from '@oxyhq/bloom/avatar';
|
|
33
|
+
import { AvatarGroup } from '@oxyhq/bloom/avatar-group';
|
|
34
|
+
import { Button } from '@oxyhq/bloom/button';
|
|
35
|
+
import { PressableScale } from '@oxyhq/bloom/pressable-scale';
|
|
36
|
+
import { CompositionBar } from '@oxyhq/bloom/composition-bar';
|
|
37
|
+
import { SettingsListGroup, SettingsListItem } from '@oxyhq/bloom/settings-list';
|
|
38
|
+
import { Text } from '@oxyhq/bloom/typography';
|
|
39
|
+
import { getNormalizedUserHandle } from '@oxyhq/core';
|
|
40
|
+
import AvatarCameraBadge from "../AvatarCameraBadge.js";
|
|
41
|
+
import { HoverPressable } from "./primitives.js";
|
|
42
|
+
import { authChooserStyles as styles } from "./styles.js";
|
|
43
|
+
import { resolveAccentHex } from "./types.js";
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Leading glyph for the rows that live in a Bloom grouped section (the MENU
|
|
47
|
+
* block) and for the storage card's cloud, which lines its title up with them.
|
|
48
|
+
* It is Bloom's OWN icon-slot size: `SettingsListItem` reserves a fixed 20px
|
|
49
|
+
* leading column and Bloom is consumed exactly as it ships, so a menu glyph
|
|
50
|
+
* larger than this would overhang into the row's title.
|
|
51
|
+
*/
|
|
52
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
53
|
+
const ROW_ICON_SIZE = 20;
|
|
54
|
+
/**
|
|
55
|
+
* The switch card's two corner states. Collapsed it is one row and reads as a
|
|
56
|
+
* PILL; opened it is a card holding rows, on the same 16px corner the Bloom
|
|
57
|
+
* grouped section below it uses. Interpolated across the reveal, never snapped.
|
|
58
|
+
*/
|
|
59
|
+
const SWITCH_CARD_PILL_RADIUS = 999;
|
|
60
|
+
const SWITCH_CARD_RADIUS = 16;
|
|
61
|
+
/**
|
|
62
|
+
* The fraction of the reveal over which the corner resolves. The corner is a
|
|
63
|
+
* FASTER gesture than the reveal — it has to be finished before the rows read as
|
|
64
|
+
* rows, or the card still looks like a pill while a list falls out of it — so it
|
|
65
|
+
* is clamped to the reveal's opening fraction instead of tracking it end to end.
|
|
66
|
+
* Measured in a browser against the 240ms reveal: the corner reaches its card
|
|
67
|
+
* value ~120ms in, with the list only ~20% revealed, and (mirrored) the pill is
|
|
68
|
+
* back ~250ms into the close, with the list already down to ~0.
|
|
69
|
+
*/
|
|
70
|
+
const SWITCH_CARD_RADIUS_SETTLE = 0.2;
|
|
71
|
+
/** Duration of the switch-list reveal. */
|
|
72
|
+
const SWITCH_REVEAL_MS = 240;
|
|
73
|
+
/** Diameter of an account row's avatar in the switch list (own markup). */
|
|
74
|
+
const SWITCH_AVATAR_SIZE = 36;
|
|
75
|
+
/** Glyph inside a bordered affordance badge, sized to the avatar it stands in for. */
|
|
76
|
+
const BADGE_GLYPH_SIZE = 19;
|
|
77
|
+
/** The hero block's large current-account avatar. */
|
|
78
|
+
const HERO_AVATAR_SIZE = 72;
|
|
79
|
+
/** Avatars shown in the switch row's facepile before it collapses into `+N`. */
|
|
80
|
+
const FACEPILE_MAX = 2;
|
|
81
|
+
/** Facepile avatar diameter — one clear step down from a switch-list avatar. */
|
|
82
|
+
const FACEPILE_AVATAR_SIZE = 32;
|
|
83
|
+
/**
|
|
84
|
+
* Facepile overlap. Well under Bloom's `size / 3` default: the stack draws the
|
|
85
|
+
* FIRST item on top, so a deep overlap would bury the trailing `+N` chip's own
|
|
86
|
+
* label under the avatar before it.
|
|
87
|
+
*/
|
|
88
|
+
const FACEPILE_OVERLAP = 4;
|
|
89
|
+
|
|
90
|
+
/**
|
|
91
|
+
* The hero's address line, shown under the "Hi, <name>!" greeting: the account's
|
|
92
|
+
* canonical `@oxy.so` email when it has one, else its normalized `@handle`. Never
|
|
93
|
+
* synthesizes a `username@oxy.so` address (the identity contract forbids it) — a
|
|
94
|
+
* non-Oxy or missing email falls back to `getNormalizedUserHandle`.
|
|
95
|
+
*/
|
|
96
|
+
function heroAddressLine(account) {
|
|
97
|
+
if (account.email?.toLowerCase().endsWith('@oxy.so')) {
|
|
98
|
+
return account.email;
|
|
99
|
+
}
|
|
100
|
+
const handle = getNormalizedUserHandle(account.user);
|
|
101
|
+
return handle ? `@${handle}` : null;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* `bytes` → `"11.6 GB"`. Whole plan sizes read as whole numbers (`"17 GB"`, not
|
|
106
|
+
* `"17.0 GB"`), and anything ≥ 100 GB drops the decimal entirely.
|
|
107
|
+
*/
|
|
108
|
+
function formatStorageGb(bytes) {
|
|
109
|
+
const gb = bytes / 1024 ** 3;
|
|
110
|
+
if (gb >= 100 || Number.isInteger(gb)) return `${Math.round(gb)} GB`;
|
|
111
|
+
return `${gb.toFixed(1)} GB`;
|
|
112
|
+
}
|
|
113
|
+
const AccountsMenuView = ({
|
|
114
|
+
snapshot,
|
|
115
|
+
theme,
|
|
116
|
+
t,
|
|
117
|
+
handlers,
|
|
118
|
+
storage,
|
|
119
|
+
menu
|
|
120
|
+
}) => {
|
|
121
|
+
const [expanded, setExpanded] = useState(false);
|
|
122
|
+
// Measured natural height of the switch list, so the reveal animates to an
|
|
123
|
+
// exact height (and the content below reflows down smoothly) instead of a
|
|
124
|
+
// guessed max. The measuring wrapper is style-based, NOT className'd — on
|
|
125
|
+
// RN-Web `onLayout` never fires for className'd Views (see AGENTS.md).
|
|
126
|
+
const [listContentHeight, setListContentHeight] = useState(0);
|
|
127
|
+
// 0 = collapsed, 1 = expanded. Set imperatively in the toggle handler (no
|
|
128
|
+
// effect hook). On RN-Web there is no worklets plugin, so every shared value a
|
|
129
|
+
// mapper reads MUST be in its deps array or it freezes on the first frame
|
|
130
|
+
// (AGENTS.md "Reanimated (web)").
|
|
131
|
+
const listProgress = useSharedValue(0);
|
|
132
|
+
const listStyle = useAnimatedStyle(() => ({
|
|
133
|
+
height: listProgress.value * listContentHeight,
|
|
134
|
+
opacity: listProgress.value
|
|
135
|
+
}), [listProgress, listContentHeight]);
|
|
136
|
+
const chevronStyle = useAnimatedStyle(() => ({
|
|
137
|
+
transform: [{
|
|
138
|
+
rotate: `${listProgress.value * 180}deg`
|
|
139
|
+
}]
|
|
140
|
+
}), [listProgress]);
|
|
141
|
+
// Collapsed, the switch card is a single row and reads as a PILL; opened, it
|
|
142
|
+
// becomes a card holding rows and takes the grouped-section corner. The corner
|
|
143
|
+
// is driven off the SAME `listProgress` as the reveal — but clamped to its
|
|
144
|
+
// opening fraction, so it resolves early instead of trailing the rows.
|
|
145
|
+
const switchCardStyle = useAnimatedStyle(() => ({
|
|
146
|
+
borderRadius: interpolate(listProgress.value, [0, SWITCH_CARD_RADIUS_SETTLE], [SWITCH_CARD_PILL_RADIUS, SWITCH_CARD_RADIUS], Extrapolation.CLAMP)
|
|
147
|
+
}), [listProgress]);
|
|
148
|
+
// `CompositionBar` ships as an interactive breakdown: a selected segment
|
|
149
|
+
// replaces its hint line with that segment's readout. Tapping the selected one
|
|
150
|
+
// again clears it.
|
|
151
|
+
const [storageSegment, setStorageSegment] = useState(null);
|
|
152
|
+
const toggleStorageSegment = useCallback(key => setStorageSegment(previous => previous === key ? null : key), []);
|
|
153
|
+
const toggleExpanded = useCallback(() => {
|
|
154
|
+
const next = !expanded;
|
|
155
|
+
setExpanded(next);
|
|
156
|
+
listProgress.value = withTiming(next ? 1 : 0, {
|
|
157
|
+
duration: SWITCH_REVEAL_MS
|
|
158
|
+
});
|
|
159
|
+
}, [expanded, listProgress]);
|
|
160
|
+
if (snapshot.loading && snapshot.accounts.length === 0) {
|
|
161
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
162
|
+
className: "items-center justify-center gap-space-12 py-space-24",
|
|
163
|
+
children: [/*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
164
|
+
name: "loading",
|
|
165
|
+
size: 24,
|
|
166
|
+
color: theme.colors.textSecondary
|
|
167
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
168
|
+
className: "text-body text-text-secondary text-center",
|
|
169
|
+
children: t('accountSwitcher.loading')
|
|
170
|
+
})]
|
|
171
|
+
});
|
|
172
|
+
}
|
|
173
|
+
const switchingDisabled = snapshot.switchingAccountId !== null;
|
|
174
|
+
const current = snapshot.accounts.find(account => account.isCurrent) ?? snapshot.accounts[0];
|
|
175
|
+
const others = current ? snapshot.accounts.filter(account => account.accountId !== current.accountId) : snapshot.accounts;
|
|
176
|
+
const currentAccent = current ? resolveAccentHex(current.color, theme.colors.primary) : theme.colors.primary;
|
|
177
|
+
const currentAddress = current ? heroAddressLine(current) : null;
|
|
178
|
+
// The switch list repeats the CURRENT account (first, ringed) — unlike the old
|
|
179
|
+
// compact header it is not represented anywhere else once the hero moved out
|
|
180
|
+
// of the card, and the list is where you switch back to it.
|
|
181
|
+
const switchableAccounts = current ? [current, ...others] : others;
|
|
182
|
+
const facepile = switchableAccounts.map(account => ({
|
|
183
|
+
id: account.accountId,
|
|
184
|
+
uri: account.avatarUrl ?? undefined,
|
|
185
|
+
displayName: account.displayName
|
|
186
|
+
}));
|
|
187
|
+
|
|
188
|
+
// Used vs free is a two-part COMPOSITION (the parts always fill the bar), not
|
|
189
|
+
// a progress value — exactly what Bloom's `CompositionBar` models. Both colors
|
|
190
|
+
// are theme tokens, so the bar is correct in light and dark.
|
|
191
|
+
const storageCategories = storage ? [{
|
|
192
|
+
key: 'used',
|
|
193
|
+
name: t('accountMenu.storage.used'),
|
|
194
|
+
amount: storage.usedBytes,
|
|
195
|
+
color: theme.colors.primary
|
|
196
|
+
}, {
|
|
197
|
+
key: 'free',
|
|
198
|
+
name: t('accountMenu.storage.free'),
|
|
199
|
+
amount: Math.max(0, storage.limitBytes - storage.usedBytes),
|
|
200
|
+
color: theme.colors.contrast50
|
|
201
|
+
}] : [];
|
|
202
|
+
const usageLabel = storage ? t('accountMenu.storage.usage', {
|
|
203
|
+
used: formatStorageGb(storage.usedBytes),
|
|
204
|
+
total: formatStorageGb(storage.limitBytes)
|
|
205
|
+
}) : t('accountMenu.storage.unavailable');
|
|
206
|
+
|
|
207
|
+
// The switch list body, revealed under the "Switch account" row. Own markup,
|
|
208
|
+
// not a Bloom grouped section: this is not a list of settings rows and the
|
|
209
|
+
// component is not a card container. It mirrors the section's rhythm by hand —
|
|
210
|
+
// 12px content inset, 12px after the avatar, a hairline between rows — and
|
|
211
|
+
// draws those hairlines INSIDE the animated clip, so a collapsed list never
|
|
212
|
+
// strands one against the header row.
|
|
213
|
+
const listItems = /*#__PURE__*/_jsxs(_Fragment, {
|
|
214
|
+
children: [switchableAccounts.map((account, index) => {
|
|
215
|
+
const accent = resolveAccentHex(account.color, theme.colors.primary);
|
|
216
|
+
const isSwitching = snapshot.switchingAccountId === account.accountId;
|
|
217
|
+
return /*#__PURE__*/_jsxs(Fragment, {
|
|
218
|
+
children: [index > 0 ? /*#__PURE__*/_jsx(View, {
|
|
219
|
+
className: "h-px bg-border opacity-30 ml-space-12"
|
|
220
|
+
}) : null, /*#__PURE__*/_jsxs(HoverPressable, {
|
|
221
|
+
baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px]${switchingDisabled ? ' opacity-60' : ''}`,
|
|
222
|
+
hoverClassName: "bg-fill-secondary",
|
|
223
|
+
onPress: () => handlers.onSwitch(account.accountId),
|
|
224
|
+
disabled: switchingDisabled,
|
|
225
|
+
accessibilityRole: "button",
|
|
226
|
+
accessibilityLabel: account.displayName,
|
|
227
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
228
|
+
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
229
|
+
source: account.avatarUrl ?? undefined,
|
|
230
|
+
variant: "thumb",
|
|
231
|
+
name: account.displayName,
|
|
232
|
+
size: SWITCH_AVATAR_SIZE
|
|
233
|
+
}), account.isCurrent ? /*#__PURE__*/_jsx(View, {
|
|
234
|
+
style: [styles.currentAvatarRing, {
|
|
235
|
+
borderColor: accent
|
|
236
|
+
}],
|
|
237
|
+
pointerEvents: "none"
|
|
238
|
+
}) : null]
|
|
239
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
240
|
+
className: "flex-1 min-w-0",
|
|
241
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
242
|
+
className: "text-body font-semibold text-text",
|
|
243
|
+
numberOfLines: 1,
|
|
244
|
+
children: account.displayName
|
|
245
|
+
}), account.email ? /*#__PURE__*/_jsx(Text, {
|
|
246
|
+
className: "text-caption text-text-secondary",
|
|
247
|
+
numberOfLines: 1,
|
|
248
|
+
children: account.email
|
|
249
|
+
}) : null]
|
|
250
|
+
}), isSwitching ? /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
251
|
+
name: "loading",
|
|
252
|
+
size: 20,
|
|
253
|
+
color: accent
|
|
254
|
+
}) : null]
|
|
255
|
+
})]
|
|
256
|
+
}, account.accountId);
|
|
257
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
258
|
+
className: "h-px bg-border opacity-30 ml-space-12"
|
|
259
|
+
}), /*#__PURE__*/_jsx(AccountAffordanceRow, {
|
|
260
|
+
icon: "plus",
|
|
261
|
+
label: t('accountMenu.addAnother'),
|
|
262
|
+
onPress: handlers.onAdd,
|
|
263
|
+
disabled: switchingDisabled,
|
|
264
|
+
theme: theme
|
|
265
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
266
|
+
className: "h-px bg-border opacity-30 ml-space-12"
|
|
267
|
+
}), /*#__PURE__*/_jsx(AccountAffordanceRow, {
|
|
268
|
+
icon: "account-multiple-outline",
|
|
269
|
+
label: t('accountSwitcher.manageOnDevice'),
|
|
270
|
+
onPress: handlers.onManage,
|
|
271
|
+
disabled: switchingDisabled,
|
|
272
|
+
theme: theme
|
|
273
|
+
})]
|
|
274
|
+
});
|
|
275
|
+
const manageLabel = t('accountMenu.manage');
|
|
276
|
+
const switchLabel = t('accountMenu.switchAccount');
|
|
277
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
278
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
279
|
+
style: styles.hero,
|
|
280
|
+
children: [current ? /*#__PURE__*/_jsxs(_Fragment, {
|
|
281
|
+
children: [/*#__PURE__*/_jsxs(PressableScale, {
|
|
282
|
+
onPress: handlers.onEditAvatar,
|
|
283
|
+
accessibilityRole: "button",
|
|
284
|
+
accessibilityLabel: t('editProfile.changeAvatar'),
|
|
285
|
+
style: styles.heroAvatarPressable,
|
|
286
|
+
children: [/*#__PURE__*/_jsx(Avatar, {
|
|
287
|
+
source: current.avatarUrl ?? undefined,
|
|
288
|
+
name: current.displayName,
|
|
289
|
+
size: HERO_AVATAR_SIZE
|
|
290
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
291
|
+
style: [styles.heroAvatarRing, {
|
|
292
|
+
borderColor: currentAccent
|
|
293
|
+
}],
|
|
294
|
+
pointerEvents: "none"
|
|
295
|
+
}), /*#__PURE__*/_jsx(AvatarCameraBadge, {})]
|
|
296
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
297
|
+
style: styles.heroNameBlock,
|
|
298
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
299
|
+
style: [styles.heroGreeting, {
|
|
300
|
+
color: theme.colors.text
|
|
301
|
+
}],
|
|
302
|
+
numberOfLines: 2,
|
|
303
|
+
children: t('accountMenu.greeting', {
|
|
304
|
+
name: current.displayName
|
|
305
|
+
})
|
|
306
|
+
}), currentAddress ? /*#__PURE__*/_jsx(Text, {
|
|
307
|
+
style: [styles.heroAddress, {
|
|
308
|
+
color: theme.colors.textSecondary
|
|
309
|
+
}],
|
|
310
|
+
numberOfLines: 1,
|
|
311
|
+
children: currentAddress
|
|
312
|
+
}) : null]
|
|
313
|
+
})]
|
|
314
|
+
}) : null, /*#__PURE__*/_jsx(Button, {
|
|
315
|
+
variant: "secondary",
|
|
316
|
+
size: "small",
|
|
317
|
+
onPress: handlers.onManage,
|
|
318
|
+
accessibilityLabel: manageLabel,
|
|
319
|
+
children: manageLabel
|
|
320
|
+
})]
|
|
321
|
+
}), /*#__PURE__*/_jsxs(Animated.View, {
|
|
322
|
+
className: "bg-fill overflow-hidden mb-space-16",
|
|
323
|
+
style: switchCardStyle,
|
|
324
|
+
children: [/*#__PURE__*/_jsxs(HoverPressable, {
|
|
325
|
+
baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px] min-h-[44px]${switchingDisabled ? ' opacity-60' : ''}`,
|
|
326
|
+
hoverClassName: "bg-fill-secondary",
|
|
327
|
+
onPress: toggleExpanded,
|
|
328
|
+
disabled: switchingDisabled,
|
|
329
|
+
accessibilityRole: "button"
|
|
330
|
+
// The ARIA prop, not `accessibilityState`: react-native-web 0.21
|
|
331
|
+
// forwards only this one, and RN maps it to
|
|
332
|
+
// `accessibilityState.expanded` natively — so the disclosure state
|
|
333
|
+
// reaches assistive tech on BOTH platforms.
|
|
334
|
+
,
|
|
335
|
+
"aria-expanded": expanded,
|
|
336
|
+
accessibilityLabel: switchLabel,
|
|
337
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
338
|
+
className: "flex-1 text-body text-text",
|
|
339
|
+
numberOfLines: 1,
|
|
340
|
+
children: switchLabel
|
|
341
|
+
}), expanded ? null : /*#__PURE__*/_jsx(AvatarGroup, {
|
|
342
|
+
items: facepile,
|
|
343
|
+
layout: "stack",
|
|
344
|
+
size: FACEPILE_AVATAR_SIZE,
|
|
345
|
+
max: FACEPILE_MAX,
|
|
346
|
+
overlap: FACEPILE_OVERLAP,
|
|
347
|
+
variant: "thumb",
|
|
348
|
+
showInitials: true,
|
|
349
|
+
ringColor: theme.colors.card
|
|
350
|
+
}), /*#__PURE__*/_jsx(View, {
|
|
351
|
+
style: [styles.chevronCircle, {
|
|
352
|
+
backgroundColor: theme.colors.contrast50
|
|
353
|
+
}],
|
|
354
|
+
children: /*#__PURE__*/_jsx(Animated.View, {
|
|
355
|
+
style: chevronStyle,
|
|
356
|
+
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
357
|
+
name: "chevron-down",
|
|
358
|
+
size: 20,
|
|
359
|
+
color: theme.colors.text
|
|
360
|
+
})
|
|
361
|
+
})
|
|
362
|
+
})]
|
|
363
|
+
}), /*#__PURE__*/_jsx(Animated.View, {
|
|
364
|
+
style: [styles.collapse, listStyle],
|
|
365
|
+
pointerEvents: expanded ? 'auto' : 'none',
|
|
366
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
367
|
+
style: styles.collapseMeasure,
|
|
368
|
+
onLayout: event => setListContentHeight(event.nativeEvent.layout.height),
|
|
369
|
+
children: /*#__PURE__*/_jsx(View, {
|
|
370
|
+
children: listItems
|
|
371
|
+
})
|
|
372
|
+
})
|
|
373
|
+
})]
|
|
374
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
375
|
+
className: "bg-fill rounded-[16px] overflow-hidden mb-space-16 px-space-12 py-[10px] gap-space-12",
|
|
376
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
377
|
+
className: "flex-row items-center gap-space-12 min-h-[24px]",
|
|
378
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
379
|
+
className: "w-[20px] items-center",
|
|
380
|
+
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
381
|
+
name: "cloud-outline",
|
|
382
|
+
size: ROW_ICON_SIZE,
|
|
383
|
+
color: theme.colors.textSecondary
|
|
384
|
+
})
|
|
385
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
386
|
+
className: "flex-1 text-body font-semibold text-text",
|
|
387
|
+
numberOfLines: 1,
|
|
388
|
+
children: t('accountMenu.storage.title')
|
|
389
|
+
})]
|
|
390
|
+
}), /*#__PURE__*/_jsx(CompositionBar, {
|
|
391
|
+
categories: storageCategories,
|
|
392
|
+
selectedKey: storageSegment,
|
|
393
|
+
onSelect: toggleStorageSegment,
|
|
394
|
+
hintLabel: usageLabel,
|
|
395
|
+
formatReadout: (bytes, percent) => `${formatStorageGb(bytes)} · ${percent}%`
|
|
396
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
397
|
+
className: "flex-row gap-space-8",
|
|
398
|
+
children: [/*#__PURE__*/_jsx(StorageChip, {
|
|
399
|
+
label: t('accountMenu.storage.upgrade'),
|
|
400
|
+
onPress: menu.onUpgradeStorage
|
|
401
|
+
}), /*#__PURE__*/_jsx(StorageChip, {
|
|
402
|
+
label: t('accountMenu.storage.manage'),
|
|
403
|
+
onPress: menu.onManageStorage
|
|
404
|
+
})]
|
|
405
|
+
})]
|
|
406
|
+
}), /*#__PURE__*/_jsxs(SettingsListGroup, {
|
|
407
|
+
children: [/*#__PURE__*/_jsx(SettingsListItem, {
|
|
408
|
+
icon: /*#__PURE__*/_jsx(MenuIcon, {
|
|
409
|
+
name: "tray-arrow-down",
|
|
410
|
+
theme: theme
|
|
411
|
+
}),
|
|
412
|
+
title: t('accountMenu.data'),
|
|
413
|
+
onPress: menu.onOpenData
|
|
414
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
415
|
+
icon: /*#__PURE__*/_jsx(MenuIcon, {
|
|
416
|
+
name: "cog-outline",
|
|
417
|
+
theme: theme
|
|
418
|
+
}),
|
|
419
|
+
title: t('accountMenu.settings'),
|
|
420
|
+
onPress: menu.onOpenSettings
|
|
421
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
422
|
+
icon: /*#__PURE__*/_jsx(MenuIcon, {
|
|
423
|
+
name: "help-circle-outline",
|
|
424
|
+
theme: theme
|
|
425
|
+
}),
|
|
426
|
+
title: t('accountMenu.help'),
|
|
427
|
+
onPress: menu.onHelp
|
|
428
|
+
}), /*#__PURE__*/_jsx(SettingsListItem, {
|
|
429
|
+
icon: /*#__PURE__*/_jsx(MenuIcon, {
|
|
430
|
+
name: "logout",
|
|
431
|
+
theme: theme
|
|
432
|
+
}),
|
|
433
|
+
title: t('accountMenu.signOut'),
|
|
434
|
+
onPress: menu.onSignOut,
|
|
435
|
+
showChevron: false
|
|
436
|
+
})]
|
|
437
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
438
|
+
className: "flex-row items-center justify-center gap-space-12 px-space-12 pb-space-8",
|
|
439
|
+
children: [/*#__PURE__*/_jsx(Pressable, {
|
|
440
|
+
onPress: menu.onPrivacy,
|
|
441
|
+
accessibilityRole: "link",
|
|
442
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
443
|
+
className: "text-bodySmall text-text-secondary",
|
|
444
|
+
children: t('accountMenu.privacy')
|
|
445
|
+
})
|
|
446
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
447
|
+
className: "text-bodySmall text-text-tertiary",
|
|
448
|
+
children: "\xB7"
|
|
449
|
+
}), /*#__PURE__*/_jsx(Pressable, {
|
|
450
|
+
onPress: menu.onTerms,
|
|
451
|
+
accessibilityRole: "link",
|
|
452
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
453
|
+
className: "text-bodySmall text-text-secondary",
|
|
454
|
+
children: t('accountMenu.terms')
|
|
455
|
+
})
|
|
456
|
+
})]
|
|
457
|
+
})]
|
|
458
|
+
});
|
|
459
|
+
};
|
|
460
|
+
|
|
461
|
+
/**
|
|
462
|
+
* An account-list AFFORDANCE row ("Add another account", "Manage accounts on
|
|
463
|
+
* this device") — a bordered circle sized to the avatar it stands in for, so its
|
|
464
|
+
* label lands on the same line as every account name above it. Own markup, like
|
|
465
|
+
* the account rows it closes: this list is not a Bloom grouped section.
|
|
466
|
+
*/
|
|
467
|
+
const AccountAffordanceRow = ({
|
|
468
|
+
icon,
|
|
469
|
+
label,
|
|
470
|
+
onPress,
|
|
471
|
+
disabled,
|
|
472
|
+
theme
|
|
473
|
+
}) => /*#__PURE__*/_jsxs(HoverPressable, {
|
|
474
|
+
baseClassName: `flex-row items-center gap-space-12 px-space-12 py-[10px]${disabled ? ' opacity-60' : ''}`,
|
|
475
|
+
hoverClassName: "bg-fill-secondary",
|
|
476
|
+
onPress: onPress,
|
|
477
|
+
disabled: disabled,
|
|
478
|
+
accessibilityRole: "button",
|
|
479
|
+
accessibilityLabel: label,
|
|
480
|
+
children: [/*#__PURE__*/_jsx(View, {
|
|
481
|
+
className: "w-[36px] h-[36px] items-center justify-center rounded-radius-max border border-border",
|
|
482
|
+
children: /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
483
|
+
name: icon,
|
|
484
|
+
size: BADGE_GLYPH_SIZE,
|
|
485
|
+
color: theme.colors.textSecondary
|
|
486
|
+
})
|
|
487
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
488
|
+
className: "flex-1 text-body font-semibold text-text",
|
|
489
|
+
numberOfLines: 1,
|
|
490
|
+
children: label
|
|
491
|
+
})]
|
|
492
|
+
});
|
|
493
|
+
|
|
494
|
+
/**
|
|
495
|
+
* The leading glyph for a grouped-section menu row, sized to Bloom's 20px icon
|
|
496
|
+
* column so the icons, the storage block's cloud and every row title align.
|
|
497
|
+
*/
|
|
498
|
+
const MenuIcon = ({
|
|
499
|
+
name,
|
|
500
|
+
theme
|
|
501
|
+
}) => /*#__PURE__*/_jsx(MaterialCommunityIcons, {
|
|
502
|
+
name: name,
|
|
503
|
+
size: ROW_ICON_SIZE,
|
|
504
|
+
color: theme.colors.textSecondary
|
|
505
|
+
});
|
|
506
|
+
|
|
507
|
+
/** A storage action chip — a bordered pill on the sheet background. */
|
|
508
|
+
const StorageChip = ({
|
|
509
|
+
label,
|
|
510
|
+
onPress
|
|
511
|
+
}) => /*#__PURE__*/_jsx(HoverPressable, {
|
|
512
|
+
baseClassName: "rounded-radius-max border border-border bg-bg py-[9px] px-[14px]",
|
|
513
|
+
hoverClassName: "bg-fill-secondary",
|
|
514
|
+
onPress: onPress,
|
|
515
|
+
accessibilityRole: "button",
|
|
516
|
+
accessibilityLabel: label,
|
|
517
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
518
|
+
className: "text-bodySmall font-semibold text-text",
|
|
519
|
+
children: label
|
|
520
|
+
})
|
|
521
|
+
});
|
|
522
|
+
export default AccountsMenuView;
|
|
523
|
+
//# sourceMappingURL=AccountsMenuView.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["Fragment","useCallback","useState","Pressable","View","Animated","Extrapolation","interpolate","useAnimatedStyle","useSharedValue","withTiming","MaterialCommunityIcons","Avatar","AvatarGroup","Button","PressableScale","CompositionBar","SettingsListGroup","SettingsListItem","Text","getNormalizedUserHandle","AvatarCameraBadge","HoverPressable","authChooserStyles","styles","resolveAccentHex","jsx","_jsx","jsxs","_jsxs","_Fragment","ROW_ICON_SIZE","SWITCH_CARD_PILL_RADIUS","SWITCH_CARD_RADIUS","SWITCH_CARD_RADIUS_SETTLE","SWITCH_REVEAL_MS","SWITCH_AVATAR_SIZE","BADGE_GLYPH_SIZE","HERO_AVATAR_SIZE","FACEPILE_MAX","FACEPILE_AVATAR_SIZE","FACEPILE_OVERLAP","heroAddressLine","account","email","toLowerCase","endsWith","handle","user","formatStorageGb","bytes","gb","Number","isInteger","Math","round","toFixed","AccountsMenuView","snapshot","theme","t","handlers","storage","menu","expanded","setExpanded","listContentHeight","setListContentHeight","listProgress","listStyle","height","value","opacity","chevronStyle","transform","rotate","switchCardStyle","borderRadius","CLAMP","storageSegment","setStorageSegment","toggleStorageSegment","key","previous","toggleExpanded","next","duration","loading","accounts","length","className","children","name","size","color","colors","textSecondary","switchingDisabled","switchingAccountId","current","find","isCurrent","others","filter","accountId","currentAccent","primary","currentAddress","switchableAccounts","facepile","map","id","uri","avatarUrl","undefined","displayName","storageCategories","amount","usedBytes","max","limitBytes","contrast50","usageLabel","used","total","listItems","index","accent","isSwitching","baseClassName","hoverClassName","onPress","onSwitch","disabled","accessibilityRole","accessibilityLabel","source","variant","style","currentAvatarRing","borderColor","pointerEvents","numberOfLines","AccountAffordanceRow","icon","label","onAdd","onManage","manageLabel","switchLabel","hero","onEditAvatar","heroAvatarPressable","heroAvatarRing","heroNameBlock","heroGreeting","text","heroAddress","items","layout","overlap","showInitials","ringColor","card","chevronCircle","backgroundColor","collapse","collapseMeasure","onLayout","event","nativeEvent","categories","selectedKey","onSelect","hintLabel","formatReadout","percent","StorageChip","onUpgradeStorage","onManageStorage","MenuIcon","title","onOpenData","onOpenSettings","onHelp","onSignOut","showChevron","onPrivacy","onTerms"],"sourceRoot":"../../../../../src","sources":["ui/components/authChooser/AccountsMenuView.tsx"],"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;;AAGA,SAASA,QAAQ,EAAEC,WAAW,EAAEC,QAAQ,QAAQ,OAAO;AACvD,SAASC,SAAS,EAAEC,IAAI,QAAQ,cAAc;AAC9C,OAAOC,QAAQ,IACbC,aAAa,EACbC,WAAW,EACXC,gBAAgB,EAChBC,cAAc,EACdC,UAAU,QACL,yBAAyB;AAChC,SAASC,sBAAsB,QAAQ,oBAAoB;AAC3D,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,WAAW,QAA8B,2BAA2B;AAC7E,SAASC,MAAM,QAAQ,qBAAqB;AAC5C,SAASC,cAAc,QAAQ,8BAA8B;AAC7D,SAASC,cAAc,QAAkC,8BAA8B;AACvF,SAASC,iBAAiB,EAAEC,gBAAgB,QAAQ,4BAA4B;AAChF,SAASC,IAAI,QAAQ,yBAAyB;AAE9C,SAASC,uBAAuB,QAAQ,aAAa;AACrD,OAAOC,iBAAiB,MAAM,yBAAsB;AACpD,SAASC,cAAc,QAAQ,iBAAc;AA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