@oxy.so/services 4.0.7 → 6.1.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 +2 -2
- package/lib/commonjs/assets/assets/signIn/slide-1.jpg +0 -0
- package/lib/commonjs/assets/assets/signIn/slide-1.jpg.d.ts +3 -0
- package/lib/commonjs/assets/assets/signIn/slide-2.jpg +0 -0
- package/lib/commonjs/assets/assets/signIn/slide-2.jpg.d.ts +3 -0
- package/lib/commonjs/assets/assets/signIn/slide-3.jpg +0 -0
- package/lib/commonjs/assets/assets/signIn/slide-3.jpg.d.ts +3 -0
- package/lib/commonjs/assets/assets/signIn/slide-4.jpg +0 -0
- package/lib/commonjs/assets/assets/signIn/slide-4.jpg.d.ts +3 -0
- package/lib/commonjs/assets/signIn/slide-1.jpg +0 -0
- package/lib/commonjs/assets/signIn/slide-2.jpg +0 -0
- package/lib/commonjs/assets/signIn/slide-3.jpg +0 -0
- package/lib/commonjs/assets/signIn/slide-4.jpg +0 -0
- package/lib/commonjs/index.js +77 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +11 -58
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +36 -45
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +0 -2
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +30 -16
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/primitives.js +7 -52
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/signInFailureMessage.js +1 -7
- package/lib/commonjs/ui/components/authChooser/signInFailureMessage.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/styles.js +0 -31
- package/lib/commonjs/ui/components/authChooser/styles.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.js +2 -2
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
- package/lib/commonjs/ui/components/oauthNavigation.js +1 -1
- package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js +161 -0
- package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js +111 -0
- package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js +160 -0
- package/lib/commonjs/ui/components/signIn/OxyAuthScreen.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyCreateAccountPanel.js +236 -0
- package/lib/commonjs/ui/components/signIn/OxyCreateAccountPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyDeleteAccountPanel.js +114 -0
- package/lib/commonjs/ui/components/signIn/OxyDeleteAccountPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js +275 -0
- package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyRecoverAccountPanel.js +170 -0
- package/lib/commonjs/ui/components/signIn/OxyRecoverAccountPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +371 -0
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js +78 -0
- package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/accountFlowParts.js +244 -0
- package/lib/commonjs/ui/components/signIn/accountFlowParts.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/artwork.js +21 -0
- package/lib/commonjs/ui/components/signIn/artwork.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/passkeyError.js +46 -0
- package/lib/commonjs/ui/components/signIn/passkeyError.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/signInMethods.js +46 -0
- package/lib/commonjs/ui/components/signIn/signInMethods.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +16 -16
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/commitSessionFlow.js +0 -43
- package/lib/commonjs/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/commonjs/ui/context/passkeyFlow.js +22 -0
- package/lib/commonjs/ui/context/passkeyFlow.js.map +1 -1
- package/lib/commonjs/ui/hooks/accountDialogSnapshot.js +15 -1
- package/lib/commonjs/ui/hooks/accountDialogSnapshot.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceSwitcher.js +1 -3
- package/lib/commonjs/ui/hooks/useDeviceSwitcher.js.map +1 -1
- package/lib/commonjs/ui/oauth/browserAuthTransport.js +11 -4
- package/lib/commonjs/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/commonjs/ui/oauth/oauthHandshake.js +3 -0
- package/lib/commonjs/ui/oauth/oauthHandshake.js.map +1 -1
- package/lib/commonjs/ui/oauth/oauthPopup.js +2 -3
- package/lib/commonjs/ui/oauth/oauthPopup.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +0 -23
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js +0 -8
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +3 -4
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/session/authStore.js +0 -21
- package/lib/commonjs/ui/session/authStore.js.map +1 -1
- package/lib/commonjs/ui/utils/accountDeletionHandoff.js +2 -2
- package/lib/commonjs/ui/utils/accountDeletionHandoff.js.map +1 -1
- package/lib/module/assets/assets/signIn/slide-1.jpg +0 -0
- package/lib/module/assets/assets/signIn/slide-1.jpg.d.ts +3 -0
- package/lib/module/assets/assets/signIn/slide-2.jpg +0 -0
- package/lib/module/assets/assets/signIn/slide-2.jpg.d.ts +3 -0
- package/lib/module/assets/assets/signIn/slide-3.jpg +0 -0
- package/lib/module/assets/assets/signIn/slide-3.jpg.d.ts +3 -0
- package/lib/module/assets/assets/signIn/slide-4.jpg +0 -0
- package/lib/module/assets/assets/signIn/slide-4.jpg.d.ts +3 -0
- package/lib/module/assets/signIn/slide-1.jpg +0 -0
- package/lib/module/assets/signIn/slide-2.jpg +0 -0
- package/lib/module/assets/signIn/slide-3.jpg +0 -0
- package/lib/module/assets/signIn/slide-4.jpg +0 -0
- package/lib/module/index.js +14 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +14 -59
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +37 -46
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +0 -2
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +22 -10
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/primitives.js +1 -44
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/module/ui/components/authChooser/signInFailureMessage.js +1 -7
- package/lib/module/ui/components/authChooser/signInFailureMessage.js.map +1 -1
- package/lib/module/ui/components/authChooser/styles.js +0 -31
- package/lib/module/ui/components/authChooser/styles.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.js +2 -2
- package/lib/module/ui/components/authChooser/types.js.map +1 -1
- package/lib/module/ui/components/oauthNavigation.js +1 -1
- package/lib/module/ui/components/signIn/InlineCommonsQr.js +157 -0
- package/lib/module/ui/components/signIn/InlineCommonsQr.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyAccountPicker.js +106 -0
- package/lib/module/ui/components/signIn/OxyAccountPicker.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyAuthScreen.js +151 -0
- package/lib/module/ui/components/signIn/OxyAuthScreen.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyCreateAccountPanel.js +231 -0
- package/lib/module/ui/components/signIn/OxyCreateAccountPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyDeleteAccountPanel.js +109 -0
- package/lib/module/ui/components/signIn/OxyDeleteAccountPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js +270 -0
- package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyRecoverAccountPanel.js +165 -0
- package/lib/module/ui/components/signIn/OxyRecoverAccountPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxySignInPanel.js +366 -0
- package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxySignUpPanel.js +75 -0
- package/lib/module/ui/components/signIn/OxySignUpPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/accountFlowParts.js +235 -0
- package/lib/module/ui/components/signIn/accountFlowParts.js.map +1 -0
- package/lib/module/ui/components/signIn/artwork.js +16 -0
- package/lib/module/ui/components/signIn/artwork.js.map +1 -0
- package/lib/module/ui/components/signIn/passkeyError.js +40 -0
- package/lib/module/ui/components/signIn/passkeyError.js.map +1 -0
- package/lib/module/ui/components/signIn/signInMethods.js +42 -0
- package/lib/module/ui/components/signIn/signInMethods.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +17 -17
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/commitSessionFlow.js +0 -42
- package/lib/module/ui/context/commitSessionFlow.js.map +1 -1
- package/lib/module/ui/context/passkeyFlow.js +21 -0
- package/lib/module/ui/context/passkeyFlow.js.map +1 -1
- package/lib/module/ui/hooks/accountDialogSnapshot.js +14 -1
- package/lib/module/ui/hooks/accountDialogSnapshot.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceSwitcher.js +3 -5
- package/lib/module/ui/hooks/useDeviceSwitcher.js.map +1 -1
- package/lib/module/ui/oauth/browserAuthTransport.js +11 -4
- package/lib/module/ui/oauth/browserAuthTransport.js.map +1 -1
- package/lib/module/ui/oauth/oauthHandshake.js +3 -0
- package/lib/module/ui/oauth/oauthHandshake.js.map +1 -1
- package/lib/module/ui/oauth/oauthPopup.js +2 -3
- package/lib/module/ui/oauth/oauthPopup.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +1 -24
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js +0 -8
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +4 -5
- package/lib/module/ui/screens/ManageAccountScreen.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/session/authStore.js +1 -22
- package/lib/module/ui/session/authStore.js.map +1 -1
- package/lib/module/ui/utils/accountDeletionHandoff.js +3 -3
- package/lib/module/ui/utils/accountDeletionHandoff.js.map +1 -1
- package/lib/typescript/assets/signIn/slide-1.jpg.d.ts +3 -0
- package/lib/typescript/assets/signIn/slide-2.jpg.d.ts +3 -0
- package/lib/typescript/assets/signIn/slide-3.jpg.d.ts +3 -0
- package/lib/typescript/assets/signIn/slide-4.jpg.d.ts +3 -0
- package/lib/typescript/commonjs/index.d.ts +16 -2
- package/lib/typescript/commonjs/index.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 +5 -12
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +0 -19
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/signInFailureMessage.d.ts +1 -5
- package/lib/typescript/commonjs/ui/components/authChooser/signInFailureMessage.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts +0 -31
- package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +2 -7
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/oauthNavigation.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts +20 -0
- package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts +34 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts +43 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyCreateAccountPanel.d.ts +24 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyCreateAccountPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyDeleteAccountPanel.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyDeleteAccountPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyLinkCommonsPanel.d.ts +21 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyLinkCommonsPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyRecoverAccountPanel.d.ts +20 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyRecoverAccountPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts +43 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts +17 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/accountFlowParts.d.ts +60 -0
- package/lib/typescript/commonjs/ui/components/signIn/accountFlowParts.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/artwork.d.ts +8 -0
- package/lib/typescript/commonjs/ui/components/signIn/artwork.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/passkeyError.d.ts +16 -0
- package/lib/typescript/commonjs/ui/components/signIn/passkeyError.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/signInMethods.d.ts +39 -0
- package/lib/typescript/commonjs/ui/components/signIn/signInMethods.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 +0 -40
- package/lib/typescript/commonjs/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +15 -10
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts +16 -1
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts +7 -1
- package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts +9 -0
- package/lib/typescript/commonjs/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts +3 -0
- package/lib/typescript/commonjs/ui/oauth/oauthHandshake.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts +2 -3
- package/lib/typescript/commonjs/ui/oauth/oauthPopup.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/authStore.d.ts +0 -30
- package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +0 -26
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +16 -2
- package/lib/typescript/module/index.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 +5 -12
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +0 -19
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/signInFailureMessage.d.ts +1 -5
- package/lib/typescript/module/ui/components/authChooser/signInFailureMessage.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/styles.d.ts +0 -31
- package/lib/typescript/module/ui/components/authChooser/styles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +2 -7
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/oauthNavigation.d.ts +1 -1
- package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts +20 -0
- package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts +34 -0
- package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts +43 -0
- package/lib/typescript/module/ui/components/signIn/OxyAuthScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyCreateAccountPanel.d.ts +24 -0
- package/lib/typescript/module/ui/components/signIn/OxyCreateAccountPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyDeleteAccountPanel.d.ts +16 -0
- package/lib/typescript/module/ui/components/signIn/OxyDeleteAccountPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyLinkCommonsPanel.d.ts +21 -0
- package/lib/typescript/module/ui/components/signIn/OxyLinkCommonsPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyRecoverAccountPanel.d.ts +20 -0
- package/lib/typescript/module/ui/components/signIn/OxyRecoverAccountPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts +43 -0
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts +17 -0
- package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/accountFlowParts.d.ts +60 -0
- package/lib/typescript/module/ui/components/signIn/accountFlowParts.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/artwork.d.ts +8 -0
- package/lib/typescript/module/ui/components/signIn/artwork.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/passkeyError.d.ts +16 -0
- package/lib/typescript/module/ui/components/signIn/passkeyError.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/signInMethods.d.ts +39 -0
- package/lib/typescript/module/ui/components/signIn/signInMethods.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 +0 -40
- package/lib/typescript/module/ui/context/commitSessionFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +15 -10
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts +16 -1
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts +7 -1
- package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts +9 -0
- package/lib/typescript/module/ui/oauth/browserAuthTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts +3 -0
- package/lib/typescript/module/ui/oauth/oauthHandshake.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts +2 -3
- package/lib/typescript/module/ui/oauth/oauthPopup.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/authStore.d.ts +0 -30
- package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +0 -26
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/package.json +4 -7
- package/src/assets/signIn/slide-1.jpg +0 -0
- package/src/assets/signIn/slide-1.jpg.d.ts +3 -0
- package/src/assets/signIn/slide-2.jpg +0 -0
- package/src/assets/signIn/slide-2.jpg.d.ts +3 -0
- package/src/assets/signIn/slide-3.jpg +0 -0
- package/src/assets/signIn/slide-3.jpg.d.ts +3 -0
- package/src/assets/signIn/slide-4.jpg +0 -0
- package/src/assets/signIn/slide-4.jpg.d.ts +3 -0
- package/src/index.ts +27 -7
- package/src/ui/components/OxyAccountDialogScreen.tsx +11 -72
- package/src/ui/components/OxyAuthChooser.tsx +37 -54
- package/src/ui/components/OxyProvider.tsx +0 -2
- package/src/ui/components/ProfileButton.tsx +1 -4
- package/src/ui/components/authChooser/AccountsMenuView.tsx +28 -8
- package/src/ui/components/authChooser/primitives.tsx +1 -39
- package/src/ui/components/authChooser/signInFailureMessage.ts +1 -7
- package/src/ui/components/authChooser/styles.ts +0 -31
- package/src/ui/components/authChooser/types.ts +2 -7
- package/src/ui/components/oauthNavigation.ts +1 -1
- package/src/ui/components/signIn/InlineCommonsQr.tsx +135 -0
- package/src/ui/components/signIn/OxyAccountPicker.tsx +129 -0
- package/src/ui/components/signIn/OxyAuthScreen.tsx +123 -0
- package/src/ui/components/signIn/OxyCreateAccountPanel.tsx +207 -0
- package/src/ui/components/signIn/OxyDeleteAccountPanel.tsx +106 -0
- package/src/ui/components/signIn/OxyLinkCommonsPanel.tsx +222 -0
- package/src/ui/components/signIn/OxyRecoverAccountPanel.tsx +154 -0
- package/src/ui/components/signIn/OxySignInPanel.tsx +392 -0
- package/src/ui/components/signIn/OxySignUpPanel.tsx +86 -0
- package/src/ui/components/signIn/accountFlowParts.tsx +204 -0
- package/src/ui/components/signIn/artwork.ts +13 -0
- package/src/ui/components/signIn/passkeyError.ts +44 -0
- package/src/ui/components/signIn/signInMethods.ts +51 -0
- package/src/ui/context/OxyContext.tsx +23 -19
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +0 -89
- package/src/ui/context/__tests__/passkeyFlow.test.ts +59 -1
- package/src/ui/context/commitSessionFlow.ts +0 -61
- package/src/ui/context/oxyContextTypes.ts +16 -10
- package/src/ui/context/passkeyFlow.ts +28 -0
- package/src/ui/hooks/accountDialogSnapshot.ts +20 -1
- package/src/ui/hooks/useDeviceSwitcher.ts +3 -11
- package/src/ui/oauth/__tests__/browserAuthTransport.test.ts +21 -0
- package/src/ui/oauth/browserAuthTransport.ts +14 -4
- package/src/ui/oauth/oauthHandshake.ts +4 -1
- package/src/ui/oauth/oauthPopup.ts +2 -3
- package/src/ui/screens/EditProfileFieldScreen.tsx +1 -27
- package/src/ui/screens/EditProfileScreen.tsx +0 -6
- package/src/ui/screens/ManageAccountScreen.tsx +4 -5
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +1 -1
- package/src/ui/session/authStore.ts +0 -37
- package/src/ui/types/navigation.ts +0 -26
- package/src/ui/utils/accountDeletionHandoff.ts +3 -3
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js +0 -132
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +0 -1
- package/lib/commonjs/ui/components/authChooser/SignUpView.js +0 -77
- package/lib/commonjs/ui/components/authChooser/SignUpView.js.map +0 -1
- package/lib/commonjs/ui/components/passkeyHubPopup.js +0 -33
- package/lib/commonjs/ui/components/passkeyHubPopup.js.map +0 -1
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js +0 -48
- package/lib/commonjs/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/module/ui/components/authChooser/SignInEntryView.js +0 -127
- package/lib/module/ui/components/authChooser/SignInEntryView.js.map +0 -1
- package/lib/module/ui/components/authChooser/SignUpView.js +0 -73
- package/lib/module/ui/components/authChooser/SignUpView.js.map +0 -1
- package/lib/module/ui/components/passkeyHubPopup.js +0 -29
- package/lib/module/ui/components/passkeyHubPopup.js.map +0 -1
- package/lib/module/ui/oauth/legacyRedirectLanes.js +0 -44
- package/lib/module/ui/oauth/legacyRedirectLanes.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts +0 -39
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts +0 -31
- package/lib/typescript/commonjs/ui/components/authChooser/SignUpView.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/passkeyHubPopup.d.ts +0 -23
- package/lib/typescript/commonjs/ui/components/passkeyHubPopup.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/commonjs/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts +0 -39
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts +0 -31
- package/lib/typescript/module/ui/components/authChooser/SignUpView.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/passkeyHubPopup.d.ts +0 -23
- package/lib/typescript/module/ui/components/passkeyHubPopup.d.ts.map +0 -1
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts +0 -40
- package/lib/typescript/module/ui/oauth/legacyRedirectLanes.d.ts.map +0 -1
- package/src/ui/components/authChooser/SignInEntryView.tsx +0 -157
- package/src/ui/components/authChooser/SignUpView.tsx +0 -76
- package/src/ui/components/passkeyHubPopup.ts +0 -28
- package/src/ui/oauth/legacyRedirectLanes.ts +0 -43
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.InlineCommonsQr = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _reactNativeQrcodeSvg = _interopRequireDefault(require("react-native-qrcode-svg"));
|
|
10
|
+
var _button = require("@oxy.so/bloom/button");
|
|
11
|
+
var _RiCheckboxCircleLine = require("@oxy.so/bloom/icons/RiCheckboxCircleLine");
|
|
12
|
+
var _RiRefreshLine = require("@oxy.so/bloom/icons/RiRefreshLine");
|
|
13
|
+
var _theme = require("@oxy.so/bloom/theme");
|
|
14
|
+
var _typography = require("@oxy.so/bloom/typography");
|
|
15
|
+
var _useI18n = require("../../hooks/useI18n.js");
|
|
16
|
+
var _accountDialogSnapshot = require("../../hooks/accountDialogSnapshot.js");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
19
|
+
/**
|
|
20
|
+
* The sign-in entry's embedded QR, over the split card's photo carousel: scan
|
|
21
|
+
* it with Commons on a phone and this screen is signed in.
|
|
22
|
+
*
|
|
23
|
+
* It owns one QR-only request (`controller.startInlineQr()`): started the
|
|
24
|
+
* first time the block is actually laid out on screen — never while its column
|
|
25
|
+
* is hidden below `md` — renewed when it expires, and withdrawn when the block
|
|
26
|
+
* goes away while it is still approvable. It never pushes to a phone or opens Commons —
|
|
27
|
+
* the person did not ask for either by opening the screen. Any other sign-in
|
|
28
|
+
* they choose supersedes it like any new attempt.
|
|
29
|
+
*
|
|
30
|
+
* Anti-phishing: the plate encodes `signIn.qrPayload` and renders nothing
|
|
31
|
+
* derived from it; the approver resolves the app server-side.
|
|
32
|
+
*/
|
|
33
|
+
|
|
34
|
+
/** High-contrast, un-themed on purpose: scan reliability. */const QR_PLATE_BG = '#FFFFFF';
|
|
35
|
+
const QR_FOREGROUND = '#000000';
|
|
36
|
+
const QR_SIZE = 112;
|
|
37
|
+
const PLATE_PADDING = 8;
|
|
38
|
+
const PLATE_SIZE = QR_SIZE + PLATE_PADDING * 2;
|
|
39
|
+
const InlineCommonsQr = ({
|
|
40
|
+
controller
|
|
41
|
+
}) => {
|
|
42
|
+
const theme = (0, _theme.useTheme)();
|
|
43
|
+
const {
|
|
44
|
+
t
|
|
45
|
+
} = (0, _useI18n.useI18n)();
|
|
46
|
+
const {
|
|
47
|
+
signIn
|
|
48
|
+
} = (0, _accountDialogSnapshot.useAccountDialogSnapshot)(controller);
|
|
49
|
+
const live = signIn.inline && (signIn.phase === 'starting' || signIn.phase === 'waiting');
|
|
50
|
+
const expired = signIn.inline && signIn.phase === 'error' && signIn.failure === 'expired';
|
|
51
|
+
|
|
52
|
+
// Laid out with a size only where its column shows (`display: none` below
|
|
53
|
+
// `md` lays out empty), so that is when a request is worth having.
|
|
54
|
+
const [shown, setShown] = (0, _react.useState)(false);
|
|
55
|
+
|
|
56
|
+
// One request for as long as the block is on screen. Withdrawn on the way
|
|
57
|
+
// out only while it is still ours and still approvable: an attempt the
|
|
58
|
+
// person started meanwhile (a passkey window, "Continue with Oxy") is theirs.
|
|
59
|
+
(0, _react.useEffect)(() => {
|
|
60
|
+
if (!controller || !shown) return;
|
|
61
|
+
const {
|
|
62
|
+
signIn: current
|
|
63
|
+
} = controller.getSnapshot();
|
|
64
|
+
if (!(current.inline && (current.phase === 'starting' || current.phase === 'waiting'))) {
|
|
65
|
+
void controller.startInlineQr();
|
|
66
|
+
}
|
|
67
|
+
return () => {
|
|
68
|
+
const {
|
|
69
|
+
signIn: last
|
|
70
|
+
} = controller.getSnapshot();
|
|
71
|
+
if (last.inline && (last.phase === 'starting' || last.phase === 'waiting')) controller.cancelSignIn();
|
|
72
|
+
};
|
|
73
|
+
}, [controller, shown]);
|
|
74
|
+
|
|
75
|
+
// A code only lives a few minutes; an expired one is replaced, not reported.
|
|
76
|
+
(0, _react.useEffect)(() => {
|
|
77
|
+
if (controller && expired) void controller.startInlineQr();
|
|
78
|
+
}, [controller, expired]);
|
|
79
|
+
let plate;
|
|
80
|
+
if (signIn.inline && signIn.progress === 'identity-confirmed') {
|
|
81
|
+
plate = /*#__PURE__*/(0, _jsxRuntime.jsx)(_RiCheckboxCircleLine.RiCheckboxCircleLine, {
|
|
82
|
+
size: "3xl",
|
|
83
|
+
fill: theme.colors.success
|
|
84
|
+
});
|
|
85
|
+
} else if (live && signIn.qrPayload && signIn.progress !== 'confirming-identity') {
|
|
86
|
+
plate = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeQrcodeSvg.default, {
|
|
87
|
+
value: signIn.qrPayload,
|
|
88
|
+
size: QR_SIZE,
|
|
89
|
+
backgroundColor: QR_PLATE_BG,
|
|
90
|
+
color: QR_FOREGROUND
|
|
91
|
+
});
|
|
92
|
+
} else if (live || expired || signIn.inline && signIn.phase === 'completed') {
|
|
93
|
+
plate = /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
94
|
+
size: "large",
|
|
95
|
+
color: QR_FOREGROUND
|
|
96
|
+
});
|
|
97
|
+
} else {
|
|
98
|
+
// Failed for a reason renewing will not fix by itself, or superseded and
|
|
99
|
+
// then withdrawn: one press for a new code.
|
|
100
|
+
plate = /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
101
|
+
appearance: "plain",
|
|
102
|
+
tone: "neutral",
|
|
103
|
+
size: "sm",
|
|
104
|
+
iconOnly: true,
|
|
105
|
+
leadingIcon: _RiRefreshLine.RiRefreshLine,
|
|
106
|
+
accessibilityLabel: t('signin.qr.renew'),
|
|
107
|
+
onPress: () => void controller?.startInlineQr(),
|
|
108
|
+
testID: "inline-qr-renew"
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
112
|
+
style: styles.block,
|
|
113
|
+
testID: "inline-commons-qr",
|
|
114
|
+
onLayout: event => {
|
|
115
|
+
if (event.nativeEvent.layout.width > 0) setShown(true);
|
|
116
|
+
},
|
|
117
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
118
|
+
style: [styles.plate, {
|
|
119
|
+
borderColor: theme.colors.border
|
|
120
|
+
}],
|
|
121
|
+
children: plate
|
|
122
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
123
|
+
style: [styles.caption, styles.captionOnMedia],
|
|
124
|
+
children: t('signin.qr.caption')
|
|
125
|
+
})]
|
|
126
|
+
});
|
|
127
|
+
};
|
|
128
|
+
exports.InlineCommonsQr = InlineCommonsQr;
|
|
129
|
+
const styles = _reactNative.StyleSheet.create({
|
|
130
|
+
block: {
|
|
131
|
+
width: PLATE_SIZE,
|
|
132
|
+
alignItems: 'center',
|
|
133
|
+
gap: 6
|
|
134
|
+
},
|
|
135
|
+
plate: {
|
|
136
|
+
width: PLATE_SIZE,
|
|
137
|
+
height: PLATE_SIZE,
|
|
138
|
+
padding: PLATE_PADDING,
|
|
139
|
+
borderRadius: 12,
|
|
140
|
+
borderWidth: _reactNative.StyleSheet.hairlineWidth,
|
|
141
|
+
backgroundColor: QR_PLATE_BG,
|
|
142
|
+
alignItems: 'center',
|
|
143
|
+
justifyContent: 'center'
|
|
144
|
+
},
|
|
145
|
+
caption: {
|
|
146
|
+
fontSize: 12,
|
|
147
|
+
lineHeight: 16,
|
|
148
|
+
textAlign: 'center'
|
|
149
|
+
},
|
|
150
|
+
captionOnMedia: {
|
|
151
|
+
color: '#FFFFFF',
|
|
152
|
+
fontWeight: '500',
|
|
153
|
+
textShadowColor: 'rgba(0, 0, 0, 0.6)',
|
|
154
|
+
textShadowOffset: {
|
|
155
|
+
width: 0,
|
|
156
|
+
height: 1
|
|
157
|
+
},
|
|
158
|
+
textShadowRadius: 4
|
|
159
|
+
}
|
|
160
|
+
});
|
|
161
|
+
//# sourceMappingURL=InlineCommonsQr.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_reactNativeQrcodeSvg","_interopRequireDefault","_button","_RiCheckboxCircleLine","_RiRefreshLine","_theme","_typography","_useI18n","_accountDialogSnapshot","_jsxRuntime","e","__esModule","default","QR_PLATE_BG","QR_FOREGROUND","QR_SIZE","PLATE_PADDING","PLATE_SIZE","InlineCommonsQr","controller","theme","useTheme","t","useI18n","signIn","useAccountDialogSnapshot","live","inline","phase","expired","failure","shown","setShown","useState","useEffect","current","getSnapshot","startInlineQr","last","cancelSignIn","plate","progress","jsx","RiCheckboxCircleLine","size","fill","colors","success","qrPayload","value","backgroundColor","color","ActivityIndicator","Button","appearance","tone","iconOnly","leadingIcon","RiRefreshLine","accessibilityLabel","onPress","testID","jsxs","View","style","styles","block","onLayout","event","nativeEvent","layout","width","children","borderColor","border","Text","caption","captionOnMedia","exports","StyleSheet","create","alignItems","gap","height","padding","borderRadius","borderWidth","hairlineWidth","justifyContent","fontSize","lineHeight","textAlign","fontWeight","textShadowColor","textShadowOffset","textShadowRadius"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/InlineCommonsQr.tsx"],"mappings":";;;;;;AAgBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,qBAAA,GAAAC,sBAAA,CAAAH,OAAA;AACA,IAAAI,OAAA,GAAAJ,OAAA;AACA,IAAAK,qBAAA,GAAAL,OAAA;AACA,IAAAM,cAAA,GAAAN,OAAA;AACA,IAAAO,MAAA,GAAAP,OAAA;AACA,IAAAQ,WAAA,GAAAR,OAAA;AAEA,IAAAS,QAAA,GAAAT,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,IAAI;MAACX,KAAK,EAAE,CAACC,MAAM,CAACW,OAAO,EAAEX,MAAM,CAACY,cAAc,CAAE;MAAAL,QAAA,EAClDlD,CAAC,CAAC,mBAAmB;IAAC,CACnB,CAAC;EAAA,CACH,CAAC;AAEX,CAAC;AAACwD,OAAA,CAAA5D,eAAA,GAAAA,eAAA;AAEF,MAAM+C,MAAM,GAAGc,uBAAU,CAACC,MAAM,CAAC;EAC/Bd,KAAK,EAAE;IACLK,KAAK,EAAEtD,UAAU;IACjBgE,UAAU,EAAE,QAAQ;IACpBC,GAAG,EAAE;EACP,CAAC;EACD1C,KAAK,EAAE;IACL+B,KAAK,EAAEtD,UAAU;IACjBkE,MAAM,EAAElE,UAAU;IAClBmE,OAAO,EAAEpE,aAAa;IACtBqE,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAEP,uBAAU,CAACQ,aAAa;IACrCrC,eAAe,EAAErC,WAAW;IAC5BoE,UAAU,EAAE,QAAQ;IACpBO,cAAc,EAAE;EAClB,CAAC;EACDZ,OAAO,EAAE;IACPa,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE;EACb,CAAC;EACDd,cAAc,EAAE;IACd1B,KAAK,EAAE,SAAS;IAChByC,UAAU,EAAE,KAAK;IACjBC,eAAe,EAAE,oBAAoB;IACrCC,gBAAgB,EAAE;MAAEvB,KAAK,EAAE,CAAC;MAAEY,MAAM,EAAE;IAAE,CAAC;IACzCY,gBAAgB,EAAE;EACpB;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OxyAccountPicker = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _RiArrowRightSLine = require("@oxy.so/bloom/icons/RiArrowRightSLine");
|
|
9
|
+
var _RiUserAddLine = require("@oxy.so/bloom/icons/RiUserAddLine");
|
|
10
|
+
var _theme = require("@oxy.so/bloom/theme");
|
|
11
|
+
var _typography = require("@oxy.so/bloom/typography");
|
|
12
|
+
var _core = require("@oxy.so/core");
|
|
13
|
+
var _useI18n = require("../../hooks/useI18n.js");
|
|
14
|
+
var _primitives = require("../authChooser/primitives.js");
|
|
15
|
+
var _styles = require("../authChooser/styles.js");
|
|
16
|
+
var _OxyAuthScreen = require("./OxyAuthScreen.js");
|
|
17
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
18
|
+
/**
|
|
19
|
+
* "Choose an account" — every `principal acting as account` pair on this
|
|
20
|
+
* device, then "Use another account".
|
|
21
|
+
*
|
|
22
|
+
* The front screen of sign-in on a returning device, in the account dialog and
|
|
23
|
+
* on every auth.oxy.so page that asks WHO (sign-in, OAuth authorize, device
|
|
24
|
+
* approval, MCP linking). Presentational: the host decides what choosing a row
|
|
25
|
+
* means — a switch, a "Continue as" sign-in, or activating the pair before an
|
|
26
|
+
* OAuth consent — and passes the pair back, never an account id, which cannot
|
|
27
|
+
* say whose route was chosen.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
const OxyAccountPicker = ({
|
|
31
|
+
principals,
|
|
32
|
+
appName,
|
|
33
|
+
onSelectContext,
|
|
34
|
+
onUseAnother,
|
|
35
|
+
pendingContextId = null,
|
|
36
|
+
isLoading = false,
|
|
37
|
+
signedOut = false
|
|
38
|
+
}) => {
|
|
39
|
+
const theme = (0, _theme.useTheme)();
|
|
40
|
+
const {
|
|
41
|
+
t
|
|
42
|
+
} = (0, _useI18n.useI18n)();
|
|
43
|
+
// Whose route a row is only needs naming once someone holds more than one
|
|
44
|
+
// account here — the same rule the account menu's group headers follow.
|
|
45
|
+
const namesTheOperator = (0, _core.showsPrincipalHeaders)(principals);
|
|
46
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_OxyAuthScreen.OxyAuthScreen, {
|
|
47
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthScreenHeader, {
|
|
48
|
+
title: t('signin.chooser.title'),
|
|
49
|
+
description: appName ? t('signin.chooser.subtitleToApp', {
|
|
50
|
+
app: appName
|
|
51
|
+
}) : t('signin.chooser.subtitle')
|
|
52
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
53
|
+
style: _styles.authChooserStyles.rows,
|
|
54
|
+
children: [principals.flatMap(principal => principal.contexts.map(context => /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.AccountRow, {
|
|
55
|
+
context: context,
|
|
56
|
+
operatedBy: namesTheOperator && context.isDelegated ? t('accountSwitcher.context.operatedBy', {
|
|
57
|
+
name: principal.displayName
|
|
58
|
+
}) : null,
|
|
59
|
+
continueAsLabel: signedOut ? t('signin.chooser.continueAs', {
|
|
60
|
+
name: context.handle ? `@${context.handle}` : context.displayName
|
|
61
|
+
}) : null,
|
|
62
|
+
theme: theme,
|
|
63
|
+
activating: pendingContextId === context.contextId,
|
|
64
|
+
disabled: isLoading,
|
|
65
|
+
onPress: () => onSelectContext(context)
|
|
66
|
+
}, context.contextId))), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.Pressable, {
|
|
67
|
+
onPress: onUseAnother,
|
|
68
|
+
disabled: isLoading,
|
|
69
|
+
accessibilityRole: "button",
|
|
70
|
+
accessibilityLabel: t('signin.chooser.useAnother'),
|
|
71
|
+
style: [_styles.authChooserStyles.accountRow, {
|
|
72
|
+
borderColor: theme.colors.border,
|
|
73
|
+
backgroundColor: theme.colors.card
|
|
74
|
+
}, isLoading ? _styles.authChooserStyles.rowDisabled : null],
|
|
75
|
+
testID: "use-another-account",
|
|
76
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
77
|
+
style: [styles.addGlyph, {
|
|
78
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
79
|
+
}],
|
|
80
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_RiUserAddLine.RiUserAddLine, {
|
|
81
|
+
size: "md",
|
|
82
|
+
fill: theme.colors.textSecondary
|
|
83
|
+
})
|
|
84
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
85
|
+
style: [_styles.authChooserStyles.rowName, styles.addLabel, {
|
|
86
|
+
color: theme.colors.text
|
|
87
|
+
}],
|
|
88
|
+
children: t('signin.chooser.useAnother')
|
|
89
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_RiArrowRightSLine.RiArrowRightSLine, {
|
|
90
|
+
size: "md",
|
|
91
|
+
fill: theme.colors.textSecondary
|
|
92
|
+
})]
|
|
93
|
+
})]
|
|
94
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthTerms, {})]
|
|
95
|
+
});
|
|
96
|
+
};
|
|
97
|
+
exports.OxyAccountPicker = OxyAccountPicker;
|
|
98
|
+
const styles = _reactNative.StyleSheet.create({
|
|
99
|
+
// Matches `AccountRow`'s 40px avatar plus its 2px ring and 1px gap.
|
|
100
|
+
addGlyph: {
|
|
101
|
+
width: 46,
|
|
102
|
+
height: 46,
|
|
103
|
+
borderRadius: 23,
|
|
104
|
+
alignItems: 'center',
|
|
105
|
+
justifyContent: 'center'
|
|
106
|
+
},
|
|
107
|
+
addLabel: {
|
|
108
|
+
flex: 1
|
|
109
|
+
}
|
|
110
|
+
});
|
|
111
|
+
//# sourceMappingURL=OxyAccountPicker.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_RiArrowRightSLine","_RiUserAddLine","_theme","_typography","_core","_useI18n","_primitives","_styles","_OxyAuthScreen","_jsxRuntime","OxyAccountPicker","principals","appName","onSelectContext","onUseAnother","pendingContextId","isLoading","signedOut","theme","useTheme","t","useI18n","namesTheOperator","showsPrincipalHeaders","jsxs","OxyAuthScreen","children","jsx","OxyAuthScreenHeader","title","description","app","View","style","authChooserStyles","rows","flatMap","principal","contexts","map","context","AccountRow","operatedBy","isDelegated","name","displayName","continueAsLabel","handle","activating","contextId","disabled","onPress","Pressable","accessibilityRole","accessibilityLabel","accountRow","borderColor","colors","border","backgroundColor","card","rowDisabled","testID","styles","addGlyph","backgroundSecondary","RiUserAddLine","size","fill","textSecondary","Text","rowName","addLabel","color","text","RiArrowRightSLine","OxyAuthTerms","exports","StyleSheet","create","width","height","borderRadius","alignItems","justifyContent","flex"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxyAccountPicker.tsx"],"mappings":";;;;;;AAaA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,kBAAA,GAAAD,OAAA;AACA,IAAAE,cAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AACA,IAAAO,WAAA,GAAAP,OAAA;AACA,IAAAQ,OAAA,GAAAR,OAAA;AACA,IAAAS,cAAA,GAAAT,OAAA;AAAmF,IAAAU,WAAA,GAAAV,OAAA;AAtBnF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAkCO,MAAMW,gBAAiD,GAAGA,CAAC;EAChEC,UAAU;EACVC,OAAO;EACPC,eAAe;EACfC,YAAY;EACZC,gBAAgB,GAAG,IAAI;EACvBC,SAAS,GAAG,KAAK;EACjBC,SAAS,GAAG;AACd,CAAC,KAAK;EACJ,MAAMC,KAAK,GAAG,IAAAC,eAAQ,EAAC,CAAC;EACxB,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,gBAAO,EAAC,CAAC;EACvB;EACA;EACA,MAAMC,gBAAgB,GAAG,IAAAC,2BAAqB,EAACZ,UAAU,CAAC;EAE1D,oBACE,IAAAF,WAAA,CAAAe,IAAA,EAAChB,cAAA,CAAAiB,aAAa;IAAAC,QAAA,gBACZ,IAAAjB,WAAA,CAAAk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B,CAAC;AAACC,OAAA,CAAAnE,gBAAA,GAAAA,gBAAA;AAEF,MAAMqD,MAAM,GAAGe,uBAAU,CAACC,MAAM,CAAC;EAC/B;EACAf,QAAQ,EAAE;IACRgB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBC,UAAU,EAAE,QAAQ;IACpBC,cAAc,EAAE;EAClB,CAAC;EACDZ,QAAQ,EAAE;IACRa,IAAI,EAAE;EACR;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,160 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OxyAuthTerms = exports.OxyAuthSplit = exports.OxyAuthScreenHeader = exports.OxyAuthScreen = exports.OxyAuthLoading = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
var _components = require("react-native-css/components");
|
|
9
|
+
var _theme = require("@oxy.so/bloom/theme");
|
|
10
|
+
var _typography = require("@oxy.so/bloom/typography");
|
|
11
|
+
var _useI18n = require("../../hooks/useI18n.js");
|
|
12
|
+
var _LogoIcon = require("../logo/LogoIcon.js");
|
|
13
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
+
/**
|
|
15
|
+
* The shell every Oxy sign-in screen shares — the in-app account dialog and
|
|
16
|
+
* every page of the auth.oxy.so IdP render these, so the two cannot drift:
|
|
17
|
+
*
|
|
18
|
+
* header the Oxy mark (56), then the title (48/800, tight) and a 18px
|
|
19
|
+
* description, 8 apart
|
|
20
|
+
* screen blocks 24 apart, at most 448 wide
|
|
21
|
+
* split from `md`, Bloom `AuthCard`'s split base — max 880, radius 24,
|
|
22
|
+
* 1px border, two equal columns, the right one on the secondary
|
|
23
|
+
* surface; below `md` the right column is dropped, not stacked
|
|
24
|
+
* loading an indeterminate spinner holding the screen's height
|
|
25
|
+
* terms one centred caption linking the Terms of Service and Privacy Policy
|
|
26
|
+
*
|
|
27
|
+
* Layout is NativeWind `className` (breakpoints included). Type stays on
|
|
28
|
+
* Bloom `Text`'s own ramp through `style` — a `className` there drops its
|
|
29
|
+
* default family — and colours come from the Bloom theme.
|
|
30
|
+
*/
|
|
31
|
+
|
|
32
|
+
const LOGO_HEIGHT = 56;
|
|
33
|
+
const TERMS_URL = 'https://oxy.so/company/transparency/policies/terms-of-service';
|
|
34
|
+
const PRIVACY_URL = 'https://oxy.so/company/transparency/policies/privacy';
|
|
35
|
+
const TITLE = {
|
|
36
|
+
fontSize: 48,
|
|
37
|
+
lineHeight: 48,
|
|
38
|
+
fontWeight: '800',
|
|
39
|
+
letterSpacing: -1.2
|
|
40
|
+
};
|
|
41
|
+
const DESCRIPTION = {
|
|
42
|
+
fontSize: 18,
|
|
43
|
+
lineHeight: 28
|
|
44
|
+
};
|
|
45
|
+
const TERMS = {
|
|
46
|
+
fontSize: 14,
|
|
47
|
+
lineHeight: 20,
|
|
48
|
+
textAlign: 'center',
|
|
49
|
+
paddingHorizontal: 24
|
|
50
|
+
};
|
|
51
|
+
/** The Oxy mark over the screen's title and description. */
|
|
52
|
+
const OxyAuthScreenHeader = ({
|
|
53
|
+
title,
|
|
54
|
+
description
|
|
55
|
+
}) => {
|
|
56
|
+
const theme = (0, _theme.useTheme)();
|
|
57
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.View, {
|
|
58
|
+
className: "gap-6",
|
|
59
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_LogoIcon.LogoIcon, {
|
|
60
|
+
height: LOGO_HEIGHT
|
|
61
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.View, {
|
|
62
|
+
className: "max-w-[90%] gap-2",
|
|
63
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
64
|
+
accessibilityRole: "header",
|
|
65
|
+
style: [TITLE, {
|
|
66
|
+
color: theme.colors.text
|
|
67
|
+
}],
|
|
68
|
+
children: title
|
|
69
|
+
}), description != null && description !== '' ? typeof description === 'string' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
70
|
+
style: [DESCRIPTION, {
|
|
71
|
+
color: theme.colors.textSecondary
|
|
72
|
+
}],
|
|
73
|
+
children: description
|
|
74
|
+
}) : description : null]
|
|
75
|
+
})]
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/** A sign-in screen's column: its blocks 24 apart. `className` extends it (the split's form column). */
|
|
80
|
+
exports.OxyAuthScreenHeader = OxyAuthScreenHeader;
|
|
81
|
+
const OxyAuthScreen = ({
|
|
82
|
+
children,
|
|
83
|
+
className
|
|
84
|
+
}) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, {
|
|
85
|
+
className: `w-full max-w-[448px] self-center gap-6 ${className ?? ''}`,
|
|
86
|
+
children: children
|
|
87
|
+
});
|
|
88
|
+
|
|
89
|
+
/** The split card: `children` on the left and, from `md`, `aside` on the right. */
|
|
90
|
+
exports.OxyAuthScreen = OxyAuthScreen;
|
|
91
|
+
const OxyAuthSplit = ({
|
|
92
|
+
children,
|
|
93
|
+
aside
|
|
94
|
+
}) => {
|
|
95
|
+
const theme = (0, _theme.useTheme)();
|
|
96
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_components.View, {
|
|
97
|
+
className: "w-full self-center md:max-w-[880px] md:flex-row md:rounded-3xl md:border md:border-border md:bg-card md:overflow-hidden",
|
|
98
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, {
|
|
99
|
+
className: "md:flex-1 md:basis-0 md:min-w-0",
|
|
100
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, {
|
|
101
|
+
className: "md:p-8",
|
|
102
|
+
children: children
|
|
103
|
+
})
|
|
104
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, {
|
|
105
|
+
className: "hidden md:flex md:flex-1 md:basis-0 md:min-w-0 items-center justify-center overflow-hidden p-8",
|
|
106
|
+
style: {
|
|
107
|
+
backgroundColor: theme.colors.backgroundSecondary
|
|
108
|
+
},
|
|
109
|
+
children: aside
|
|
110
|
+
})]
|
|
111
|
+
});
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* The screen while there is nothing to show yet. React Native's own indicator:
|
|
116
|
+
* `@oxy.so/bloom/loading` can tree-shake to `undefined` in a rolldown-vite
|
|
117
|
+
* production bundle when co-imported with `@oxy.so/bloom/button`.
|
|
118
|
+
*/
|
|
119
|
+
exports.OxyAuthSplit = OxyAuthSplit;
|
|
120
|
+
const OxyAuthLoading = () => {
|
|
121
|
+
const theme = (0, _theme.useTheme)();
|
|
122
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, {
|
|
123
|
+
className: "min-h-[300px] items-center justify-center",
|
|
124
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
125
|
+
size: "large",
|
|
126
|
+
color: theme.colors.primary
|
|
127
|
+
})
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
|
|
131
|
+
/** "By continuing, you agree to our Terms of Service and Privacy Policy." */
|
|
132
|
+
exports.OxyAuthLoading = OxyAuthLoading;
|
|
133
|
+
const OxyAuthTerms = () => {
|
|
134
|
+
const theme = (0, _theme.useTheme)();
|
|
135
|
+
const {
|
|
136
|
+
t
|
|
137
|
+
} = (0, _useI18n.useI18n)();
|
|
138
|
+
const link = {
|
|
139
|
+
color: theme.colors.text,
|
|
140
|
+
textDecorationLine: 'underline'
|
|
141
|
+
};
|
|
142
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_typography.Text, {
|
|
143
|
+
style: [TERMS, {
|
|
144
|
+
color: theme.colors.textSecondary
|
|
145
|
+
}],
|
|
146
|
+
children: [t('signin.terms.before'), ' ', /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
147
|
+
accessibilityRole: "link",
|
|
148
|
+
style: link,
|
|
149
|
+
onPress: () => void _reactNative.Linking.openURL(TERMS_URL),
|
|
150
|
+
children: t('signin.terms.termsLink')
|
|
151
|
+
}), ' ', t('signin.terms.and'), ' ', /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
152
|
+
accessibilityRole: "link",
|
|
153
|
+
style: link,
|
|
154
|
+
onPress: () => void _reactNative.Linking.openURL(PRIVACY_URL),
|
|
155
|
+
children: t('signin.terms.privacyLink')
|
|
156
|
+
}), "."]
|
|
157
|
+
});
|
|
158
|
+
};
|
|
159
|
+
exports.OxyAuthTerms = OxyAuthTerms;
|
|
160
|
+
//# sourceMappingURL=OxyAuthScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_reactNative","require","_components","_theme","_typography","_useI18n","_LogoIcon","_jsxRuntime","LOGO_HEIGHT","TERMS_URL","PRIVACY_URL","TITLE","fontSize","lineHeight","fontWeight","letterSpacing","DESCRIPTION","TERMS","textAlign","paddingHorizontal","OxyAuthScreenHeader","title","description","theme","useTheme","jsxs","View","className","children","jsx","LogoIcon","height","Text","accessibilityRole","style","color","colors","text","textSecondary","exports","OxyAuthScreen","OxyAuthSplit","aside","backgroundColor","backgroundSecondary","OxyAuthLoading","ActivityIndicator","size","primary","OxyAuthTerms","t","useI18n","link","textDecorationLine","onPress","Linking","openURL"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxyAuthScreen.tsx"],"mappings":";;;;;;AAmBA,IAAAA,YAAA,GAAAC,OAAA;AACA,IAAAC,WAAA,GAAAD,OAAA;AACA,IAAAE,MAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,QAAA,GAAAJ,OAAA;AACA,IAAAK,SAAA,GAAAL,OAAA;AAA4C,IAAAM,WAAA,GAAAN,OAAA;AAxB5C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA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