@oxy.so/services 4.0.6 → 6.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +1 -1
- package/lib/commonjs/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 +45 -8
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +26 -1
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/FollowTargetButton.js +6 -1
- package/lib/commonjs/ui/components/FollowTargetButton.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 -44
- 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 +29 -8
- 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/followButtonAccessibility.js +72 -0
- package/lib/commonjs/ui/components/followButtonAccessibility.js.map +1 -0
- 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/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/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/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/ManageAccountScreen.js +2 -3
- 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 +1 -1
- 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 +7 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +26 -1
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/FollowTargetButton.js +6 -1
- package/lib/module/ui/components/FollowTargetButton.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 -45
- 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 +21 -2
- 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/followButtonAccessibility.js +66 -0
- package/lib/module/ui/components/followButtonAccessibility.js.map +1 -0
- 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/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/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/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/ManageAccountScreen.js +3 -4
- 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 +2 -2
- 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 +8 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts +6 -0
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowTargetButton.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 +3 -3
- package/lib/typescript/commonjs/ui/components/followButtonAccessibility.d.ts +48 -0
- package/lib/typescript/commonjs/ui/components/followButtonAccessibility.d.ts.map +1 -0
- 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/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/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 +8 -9
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.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/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/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 +8 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts +6 -0
- package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowTargetButton.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 +3 -3
- package/lib/typescript/module/ui/components/followButtonAccessibility.d.ts +48 -0
- package/lib/typescript/module/ui/components/followButtonAccessibility.d.ts.map +1 -0
- 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/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/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 +8 -9
- package/lib/typescript/module/ui/context/oxyContextTypes.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/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/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 +6 -9
- 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 +16 -7
- package/src/ui/components/FollowButton.tsx +25 -0
- package/src/ui/components/FollowTargetButton.tsx +4 -0
- package/src/ui/components/OxyAccountDialogScreen.tsx +11 -72
- package/src/ui/components/OxyAuthChooser.tsx +37 -53
- package/src/ui/components/OxyProvider.tsx +0 -2
- package/src/ui/components/ProfileButton.tsx +1 -4
- package/src/ui/components/__tests__/followButtonAccessibility.test.tsx +191 -0
- package/src/ui/components/authChooser/AccountsMenuView.tsx +28 -1
- 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 +3 -3
- package/src/ui/components/followButtonAccessibility.ts +83 -0
- 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/OxySignInPanel.tsx +392 -0
- package/src/ui/components/signIn/OxySignUpPanel.tsx +86 -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 +21 -18
- package/src/ui/context/__tests__/commitSessionFlow.test.ts +0 -89
- package/src/ui/context/commitSessionFlow.ts +0 -61
- package/src/ui/context/oxyContextTypes.ts +9 -9
- 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/ManageAccountScreen.tsx +3 -4
- 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 +2 -2
- 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,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;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAUA,MAAMO,WAAW,GAAG,EAAE;AACtB,MAAMC,SAAS,GAAG,+DAA+D;AACjF,MAAMC,WAAW,GAAG,sDAAsD;AAE1E,MAAMC,KAAK,GAAG;EAAEC,QAAQ,EAAE,EAAE;EAAEC,UAAU,EAAE,EAAE;EAAEC,UAAU,EAAE,KAAK;EAAEC,aAAa,EAAE,CAAC;AAAI,CAAU;AAC/F,MAAMC,WAAW,GAAG;EAAEJ,QAAQ,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A,KAAM,KAAKC,oBAAO,CAACC,OAAO,CAAC9C,WAAW,CAAE;MAAAkB,QAAA,EAC5FsB,CAAC,CAAC,0BAA0B;IAAC,CACxB,CAAC,KAEX;EAAA,CAAM,CAAC;AAEX,CAAC;AAACX,OAAA,CAAAU,YAAA,GAAAA,YAAA","ignoreList":[]}
|
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OxySignInPanel = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _components = require("react-native-css/components");
|
|
10
|
+
var _authCard = require("@oxy.so/bloom/auth-card");
|
|
11
|
+
var _button = require("@oxy.so/bloom/button");
|
|
12
|
+
var _divider = require("@oxy.so/bloom/divider");
|
|
13
|
+
var _RiKey2Line = require("@oxy.so/bloom/icons/RiKey2Line");
|
|
14
|
+
var _RiQrCodeLine = require("@oxy.so/bloom/icons/RiQrCodeLine");
|
|
15
|
+
var _theme = require("@oxy.so/bloom/theme");
|
|
16
|
+
var _textField = require("@oxy.so/bloom/text-field");
|
|
17
|
+
var _toast = require("@oxy.so/bloom/toast");
|
|
18
|
+
var _typography = require("@oxy.so/bloom/typography");
|
|
19
|
+
var _reactQuery = require("@tanstack/react-query");
|
|
20
|
+
var _OxyContext = require("../../context/OxyContext.js");
|
|
21
|
+
var _accountDialogSnapshot = require("../../hooks/accountDialogSnapshot.js");
|
|
22
|
+
var _useDeviceSwitcher = require("../../hooks/useDeviceSwitcher.js");
|
|
23
|
+
var _useI18n = require("../../hooks/useI18n.js");
|
|
24
|
+
var _commonsStoreLinks = require("../../utils/commonsStoreLinks.js");
|
|
25
|
+
var _isWebBrowser = require("../../utils/isWebBrowser.js");
|
|
26
|
+
var _primitives = require("../authChooser/primitives.js");
|
|
27
|
+
var _artwork = require("./artwork.js");
|
|
28
|
+
var _InlineCommonsQr = require("./InlineCommonsQr.js");
|
|
29
|
+
var _OxyAccountPicker = require("./OxyAccountPicker.js");
|
|
30
|
+
var _OxyAuthScreen = require("./OxyAuthScreen.js");
|
|
31
|
+
var _passkeyError = require("./passkeyError.js");
|
|
32
|
+
var _signInMethods = require("./signInMethods.js");
|
|
33
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
34
|
+
/**
|
|
35
|
+
* THE Oxy sign-in screen. The account dialog every Oxy app opens and the
|
|
36
|
+
* auth.oxy.so page render this one component; only where it is mounted
|
|
37
|
+
* differs (`host`).
|
|
38
|
+
*
|
|
39
|
+
* picker a returning device: "Choose an account", then "Use another account"
|
|
40
|
+
* entry the header, the Commons way in, and the way in for someone with no
|
|
41
|
+
* account. On auth.oxy.so (`page`) also the username with its
|
|
42
|
+
* Continue — a username-first passkey sign-in, which takes a
|
|
43
|
+
* platform passkey AND a hardware security key with no resident
|
|
44
|
+
* credential (a U2F key such as a Titan) — and "or continue with" the
|
|
45
|
+
* discoverable passkey. From `md` that page is Bloom `AuthCard`'s
|
|
46
|
+
* split card, with the embedded QR over its photo carousel in the
|
|
47
|
+
* right column; below `md` it is "Continue with Oxy" at the top.
|
|
48
|
+
* In an app's dialog on the web, "Continue with Oxy" opens that page
|
|
49
|
+
* in a window over the app, like "Sign in with Google": the browser's
|
|
50
|
+
* session lives on auth.oxy.so, so every Oxy app shares it. On
|
|
51
|
+
* native it is "Continue with Oxy" ("Get Commons" without Commons).
|
|
52
|
+
*
|
|
53
|
+
* `signInMethods.ts` owns which blocks a platform gets.
|
|
54
|
+
*/
|
|
55
|
+
|
|
56
|
+
const OxySignInPanel = ({
|
|
57
|
+
onSignedIn,
|
|
58
|
+
onCreateAccount,
|
|
59
|
+
onRecover,
|
|
60
|
+
loginHint,
|
|
61
|
+
appName = null,
|
|
62
|
+
host = 'page'
|
|
63
|
+
}) => {
|
|
64
|
+
const theme = (0, _theme.useTheme)();
|
|
65
|
+
const {
|
|
66
|
+
t
|
|
67
|
+
} = (0, _useI18n.useI18n)();
|
|
68
|
+
const queryClient = (0, _reactQuery.useQueryClient)();
|
|
69
|
+
const {
|
|
70
|
+
accountDialogController: controller,
|
|
71
|
+
openAccountDialog,
|
|
72
|
+
signInWithPasskey,
|
|
73
|
+
continueOnAuth
|
|
74
|
+
} = (0, _OxyContext.useOxy)();
|
|
75
|
+
const snapshot = (0, _accountDialogSnapshot.useAccountDialogSnapshot)(controller);
|
|
76
|
+
const {
|
|
77
|
+
principals,
|
|
78
|
+
activeContext
|
|
79
|
+
} = (0, _useDeviceSwitcher.useDeviceSwitcher)();
|
|
80
|
+
const methods = (0, _signInMethods.resolveSignInMethods)({
|
|
81
|
+
web: (0, _isWebBrowser.isWebBrowser)(),
|
|
82
|
+
host,
|
|
83
|
+
commonsAvailability: snapshot.commonsAvailability
|
|
84
|
+
});
|
|
85
|
+
const [showForm, setShowForm] = (0, _react.useState)(Boolean(loginHint));
|
|
86
|
+
const [identifier, setIdentifier] = (0, _react.useState)(loginHint ?? '');
|
|
87
|
+
const [pending, setPending] = (0, _react.useState)(false);
|
|
88
|
+
const [error, setError] = (0, _react.useState)(null);
|
|
89
|
+
const [rateLimitSeconds, setRateLimitSeconds] = (0, _react.useState)(0);
|
|
90
|
+
const blocked = pending || rateLimitSeconds > 0;
|
|
91
|
+
|
|
92
|
+
// The countdown after a 429: one tick a second until the person may retry.
|
|
93
|
+
(0, _react.useEffect)(() => {
|
|
94
|
+
if (rateLimitSeconds <= 0) return;
|
|
95
|
+
const timer = setTimeout(() => setRateLimitSeconds(seconds => Math.max(0, seconds - 1)), 1000);
|
|
96
|
+
return () => clearTimeout(timer);
|
|
97
|
+
}, [rateLimitSeconds]);
|
|
98
|
+
|
|
99
|
+
// On a page, a request the controller runs (the embedded QR, or one shown in
|
|
100
|
+
// the dialog opened over it) finishes the page's sign-in too. Only one that
|
|
101
|
+
// STARTED here: a completion already on the controller is somebody else's.
|
|
102
|
+
const [mountedAttempt] = (0, _react.useState)(snapshot.signIn.attempt);
|
|
103
|
+
const completedHere = snapshot.signIn.phase === 'completed' && snapshot.signIn.attempt !== mountedAttempt;
|
|
104
|
+
(0, _react.useEffect)(() => {
|
|
105
|
+
if (host === 'page' && completedHere) onSignedIn();
|
|
106
|
+
}, [host, completedHere, onSignedIn]);
|
|
107
|
+
|
|
108
|
+
/** Show the request a controller call just started — the dialog is where it lives. */
|
|
109
|
+
const showRequest = (0, _react.useCallback)(() => {
|
|
110
|
+
if (host === 'page') openAccountDialog('qr');
|
|
111
|
+
}, [host, openAccountDialog]);
|
|
112
|
+
|
|
113
|
+
// These open a window or leave the page, so they run straight from the
|
|
114
|
+
// press, before any await.
|
|
115
|
+
const continueWithOxy = () => {
|
|
116
|
+
void controller?.signInWithOxy();
|
|
117
|
+
showRequest();
|
|
118
|
+
};
|
|
119
|
+
const signInOnOxy = () => {
|
|
120
|
+
void continueOnAuth('signin').then(result => {
|
|
121
|
+
if (result.status === 'signed-in') onSignedIn();else if (result.status === 'failed') _toast.toast.error(t('signin.errors.failed'));
|
|
122
|
+
});
|
|
123
|
+
};
|
|
124
|
+
const useAnotherDevice = () => {
|
|
125
|
+
void controller?.showQr();
|
|
126
|
+
showRequest();
|
|
127
|
+
};
|
|
128
|
+
const getCommons = () => {
|
|
129
|
+
Promise.resolve().then(() => _reactNative.Linking.openURL((0, _commonsStoreLinks.getCommonsAcquisitionUrl)(_reactNative.Platform.OS))).catch(() => _toast.toast.error(t('accountSwitcher.linkOpenFailed')));
|
|
130
|
+
};
|
|
131
|
+
const runPasskey = async (username, failToast) => {
|
|
132
|
+
if (blocked) return;
|
|
133
|
+
setError(null);
|
|
134
|
+
setPending(true);
|
|
135
|
+
try {
|
|
136
|
+
await signInWithPasskey({
|
|
137
|
+
username
|
|
138
|
+
});
|
|
139
|
+
onSignedIn();
|
|
140
|
+
} catch (err) {
|
|
141
|
+
if ((0, _passkeyError.isRateLimited)(err)) {
|
|
142
|
+
setRateLimitSeconds(_passkeyError.RATE_LIMIT_SECONDS);
|
|
143
|
+
} else {
|
|
144
|
+
const message = (0, _passkeyError.describePasskeyError)(err, t);
|
|
145
|
+
setError(message);
|
|
146
|
+
_toast.toast.error(failToast, {
|
|
147
|
+
description: message
|
|
148
|
+
});
|
|
149
|
+
}
|
|
150
|
+
} finally {
|
|
151
|
+
setPending(false);
|
|
152
|
+
}
|
|
153
|
+
};
|
|
154
|
+
const submitUsername = () => {
|
|
155
|
+
const username = identifier.trim();
|
|
156
|
+
if (username) void runPasskey(username, t('signin.errors.failed'));else setError(t('signin.username.required'));
|
|
157
|
+
};
|
|
158
|
+
|
|
159
|
+
// A returning device starts at WHO. Not while adding an account from inside
|
|
160
|
+
// a signed-in app: the rows are the accounts it would add.
|
|
161
|
+
const pickerAllowed = host === 'dialog' ? !snapshot.hasSession : activeContext !== null;
|
|
162
|
+
const reauthenticate = context => {
|
|
163
|
+
setIdentifier(context.handle ?? '');
|
|
164
|
+
setShowForm(true);
|
|
165
|
+
};
|
|
166
|
+
const selectContext = async context => {
|
|
167
|
+
const outcome = await controller?.chooseContext(context.contextId).catch(() => 'failed');
|
|
168
|
+
switch (outcome) {
|
|
169
|
+
case 'switched':
|
|
170
|
+
// Every account-scoped query now describes somebody else.
|
|
171
|
+
void queryClient.invalidateQueries();
|
|
172
|
+
onSignedIn();
|
|
173
|
+
return;
|
|
174
|
+
case 'current':
|
|
175
|
+
onSignedIn();
|
|
176
|
+
return;
|
|
177
|
+
case 'signing-in':
|
|
178
|
+
// The request for that account is running; it shows where requests do.
|
|
179
|
+
showRequest();
|
|
180
|
+
return;
|
|
181
|
+
case 'failed':
|
|
182
|
+
// The pair could not be activated as it stands: sign in as it explicitly.
|
|
183
|
+
if (methods.passkey && context.handle) reauthenticate(context);else _toast.toast.error(t('accountSwitcher.toasts.activateFailed'));
|
|
184
|
+
return;
|
|
185
|
+
default:
|
|
186
|
+
return;
|
|
187
|
+
}
|
|
188
|
+
};
|
|
189
|
+
const showsPicker = pickerAllowed && !showForm && principals.length > 0;
|
|
190
|
+
// auth.oxy.so's page is the split card from `md`.
|
|
191
|
+
const splits = methods.commons === 'qr';
|
|
192
|
+
if (showsPicker) {
|
|
193
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAccountPicker.OxyAccountPicker, {
|
|
194
|
+
principals: principals,
|
|
195
|
+
appName: appName,
|
|
196
|
+
signedOut: !snapshot.hasSession,
|
|
197
|
+
pendingContextId: snapshot.activatingContextId,
|
|
198
|
+
isLoading: snapshot.activatingContextId !== null,
|
|
199
|
+
onSelectContext: context => void selectContext(context),
|
|
200
|
+
onUseAnother: () => {
|
|
201
|
+
setIdentifier('');
|
|
202
|
+
setShowForm(true);
|
|
203
|
+
}
|
|
204
|
+
});
|
|
205
|
+
}
|
|
206
|
+
const shownError = rateLimitSeconds > 0 ? t('signin.errors.rateLimited', {
|
|
207
|
+
seconds: rateLimitSeconds
|
|
208
|
+
}) : error;
|
|
209
|
+
const adding = host === 'dialog' && snapshot.hasSession;
|
|
210
|
+
const title = adding ? t('signin.addAccountTitle') : t('signin.title');
|
|
211
|
+
const description = adding ? t('signin.addAccountSubtitle') : appName ? t('signin.subtitleToApp', {
|
|
212
|
+
app: appName
|
|
213
|
+
}) : t('signin.subtitle');
|
|
214
|
+
const noAccount = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_typography.Text, {
|
|
215
|
+
style: [styles.note, styles.noAccount, {
|
|
216
|
+
color: theme.colors.textSecondary
|
|
217
|
+
}],
|
|
218
|
+
children: [t('signin.noAccount'), ' ', /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
219
|
+
accessibilityRole: "link",
|
|
220
|
+
onPress: onCreateAccount,
|
|
221
|
+
style: [styles.noAccountLink, {
|
|
222
|
+
color: theme.colors.text
|
|
223
|
+
}],
|
|
224
|
+
testID: "create-account-link",
|
|
225
|
+
children: t('signin.createAccount')
|
|
226
|
+
})]
|
|
227
|
+
});
|
|
228
|
+
// One solid action per screen: the username's Continue when there is one.
|
|
229
|
+
const commonsAppearance = methods.passkey ? 'outline' : 'solid';
|
|
230
|
+
const continueWithOxyButton = /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
231
|
+
appearance: commonsAppearance,
|
|
232
|
+
tone: commonsAppearance === 'solid' ? 'action' : 'neutral',
|
|
233
|
+
size: "lg",
|
|
234
|
+
fullWidth: true,
|
|
235
|
+
onPress: methods.commons === 'window' ? signInOnOxy : continueWithOxy,
|
|
236
|
+
testID: "continue-with-oxy",
|
|
237
|
+
children: t('accountSwitcher.continueWithOxy')
|
|
238
|
+
});
|
|
239
|
+
const form = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_OxyAuthScreen.OxyAuthScreen, {
|
|
240
|
+
className: splits ? 'md:max-w-none' : undefined,
|
|
241
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthScreenHeader, {
|
|
242
|
+
title: title,
|
|
243
|
+
description: description
|
|
244
|
+
}), splits ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_components.View, {
|
|
245
|
+
className: "md:hidden",
|
|
246
|
+
children: continueWithOxyButton
|
|
247
|
+
}) : null, methods.commons === 'continue' || methods.commons === 'window' ? continueWithOxyButton : null, methods.commons === 'get-commons' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
248
|
+
style: styles.stack,
|
|
249
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_typography.Text, {
|
|
250
|
+
style: [styles.note, {
|
|
251
|
+
color: theme.colors.textSecondary
|
|
252
|
+
}],
|
|
253
|
+
children: t('accountSwitcher.commonsNotInstalled')
|
|
254
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
255
|
+
appearance: "solid",
|
|
256
|
+
tone: "action",
|
|
257
|
+
size: "lg",
|
|
258
|
+
fullWidth: true,
|
|
259
|
+
onPress: getCommons,
|
|
260
|
+
testID: "get-commons-button",
|
|
261
|
+
children: t('accountSwitcher.getCommons')
|
|
262
|
+
})]
|
|
263
|
+
}) : null, methods.passkey ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
264
|
+
style: styles.stack,
|
|
265
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
266
|
+
style: styles.field,
|
|
267
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_textField.TextFieldLabel, {
|
|
268
|
+
nativeID: "username-label",
|
|
269
|
+
children: t('signin.username.label')
|
|
270
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_textField.TextField, {
|
|
271
|
+
invalid: shownError !== null,
|
|
272
|
+
disabled: blocked,
|
|
273
|
+
radius: 999,
|
|
274
|
+
style: styles.input,
|
|
275
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_textField.TextFieldInput, {
|
|
276
|
+
testID: "username",
|
|
277
|
+
label: t('signin.username.label'),
|
|
278
|
+
value: identifier,
|
|
279
|
+
onValueChange: value => {
|
|
280
|
+
setIdentifier(value);
|
|
281
|
+
if (error) setError(null);
|
|
282
|
+
},
|
|
283
|
+
placeholder: t('signin.username.placeholder'),
|
|
284
|
+
autoComplete: "username",
|
|
285
|
+
autoCapitalize: "none",
|
|
286
|
+
autoCorrect: false,
|
|
287
|
+
autoFocus: _reactNative.Platform.OS === 'web',
|
|
288
|
+
returnKeyType: "go",
|
|
289
|
+
onSubmitEditing: submitUsername,
|
|
290
|
+
"aria-required": true
|
|
291
|
+
})
|
|
292
|
+
}), shownError ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_textField.TextFieldHint, {
|
|
293
|
+
invalid: true,
|
|
294
|
+
children: shownError
|
|
295
|
+
}) : null]
|
|
296
|
+
}), noAccount, /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
297
|
+
appearance: "solid",
|
|
298
|
+
tone: "action",
|
|
299
|
+
size: "lg",
|
|
300
|
+
fullWidth: true,
|
|
301
|
+
loading: pending,
|
|
302
|
+
disabled: blocked,
|
|
303
|
+
onPress: submitUsername,
|
|
304
|
+
testID: "username-continue",
|
|
305
|
+
children: t('signin.actions.continue')
|
|
306
|
+
})]
|
|
307
|
+
}) : null, methods.commons === 'window' ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_divider.Divider, {
|
|
308
|
+
children: t('signin.orContinueWith')
|
|
309
|
+
}), methods.passkey ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
310
|
+
appearance: "outline",
|
|
311
|
+
tone: "neutral",
|
|
312
|
+
size: "lg",
|
|
313
|
+
fullWidth: true,
|
|
314
|
+
leadingIcon: _RiKey2Line.RiKey2Line,
|
|
315
|
+
disabled: blocked,
|
|
316
|
+
onPress: () => void runPasskey(undefined, t('signin.errors.failed')),
|
|
317
|
+
testID: "passkey-sign-in",
|
|
318
|
+
children: t('signin.methods.passkey')
|
|
319
|
+
}) : methods.commons === 'window' ? null : /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
320
|
+
appearance: "outline",
|
|
321
|
+
tone: "neutral",
|
|
322
|
+
size: "lg",
|
|
323
|
+
fullWidth: true,
|
|
324
|
+
leadingIcon: _RiQrCodeLine.RiQrCodeLine,
|
|
325
|
+
onPress: useAnotherDevice,
|
|
326
|
+
testID: "scan-qr",
|
|
327
|
+
children: t('accountSwitcher.scanQr')
|
|
328
|
+
}), methods.passkey ? null : noAccount, onRecover ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SubtleLink, {
|
|
329
|
+
label: t('signin.recoverLink'),
|
|
330
|
+
theme: theme,
|
|
331
|
+
onPress: onRecover,
|
|
332
|
+
testID: "recover-link"
|
|
333
|
+
}) : null, /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthTerms, {})]
|
|
334
|
+
});
|
|
335
|
+
if (!splits) return form;
|
|
336
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthSplit, {
|
|
337
|
+
aside: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
338
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_authCard.AuthMediaCarousel, {
|
|
339
|
+
slides: _artwork.SIGN_IN_SLIDES,
|
|
340
|
+
style: _reactNative.StyleSheet.absoluteFill
|
|
341
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_InlineCommonsQr.InlineCommonsQr, {
|
|
342
|
+
controller: controller
|
|
343
|
+
})]
|
|
344
|
+
}),
|
|
345
|
+
children: form
|
|
346
|
+
});
|
|
347
|
+
};
|
|
348
|
+
exports.OxySignInPanel = OxySignInPanel;
|
|
349
|
+
const styles = _reactNative.StyleSheet.create({
|
|
350
|
+
stack: {
|
|
351
|
+
gap: 12
|
|
352
|
+
},
|
|
353
|
+
field: {
|
|
354
|
+
gap: 6
|
|
355
|
+
},
|
|
356
|
+
note: {
|
|
357
|
+
fontSize: 14,
|
|
358
|
+
lineHeight: 20,
|
|
359
|
+
textAlign: 'center'
|
|
360
|
+
},
|
|
361
|
+
noAccount: {
|
|
362
|
+
textAlign: 'left'
|
|
363
|
+
},
|
|
364
|
+
noAccountLink: {
|
|
365
|
+
textDecorationLine: 'underline'
|
|
366
|
+
},
|
|
367
|
+
input: {
|
|
368
|
+
height: 40
|
|
369
|
+
}
|
|
370
|
+
});
|
|
371
|
+
//# sourceMappingURL=OxySignInPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_components","_authCard","_button","_divider","_RiKey2Line","_RiQrCodeLine","_theme","_textField","_toast","_typography","_reactQuery","_OxyContext","_accountDialogSnapshot","_useDeviceSwitcher","_useI18n","_commonsStoreLinks","_isWebBrowser","_primitives","_artwork","_InlineCommonsQr","_OxyAccountPicker","_OxyAuthScreen","_passkeyError","_signInMethods","_jsxRuntime","OxySignInPanel","onSignedIn","onCreateAccount","onRecover","loginHint","appName","host","theme","useTheme","t","useI18n","queryClient","useQueryClient","accountDialogController","controller","openAccountDialog","signInWithPasskey","continueOnAuth","useOxy","snapshot","useAccountDialogSnapshot","principals","activeContext","useDeviceSwitcher","methods","resolveSignInMethods","web","isWebBrowser","commonsAvailability","showForm","setShowForm","useState","Boolean","identifier","setIdentifier","pending","setPending","error","setError","rateLimitSeconds","setRateLimitSeconds","blocked","useEffect","timer","setTimeout","seconds","Math","max","clearTimeout","mountedAttempt","signIn","attempt","completedHere","phase","showRequest","useCallback","continueWithOxy","signInWithOxy","signInOnOxy","then","result","status","toast","useAnotherDevice","showQr","getCommons","Promise","resolve","Linking","openURL","getCommonsAcquisitionUrl","Platform","OS","catch","runPasskey","username","failToast","err","isRateLimited","RATE_LIMIT_SECONDS","message","describePasskeyError","description","submitUsername","trim","pickerAllowed","hasSession","reauthenticate","context","handle","selectContext","outcome","chooseContext","contextId","invalidateQueries","passkey","showsPicker","length","splits","commons","jsx","OxyAccountPicker","signedOut","pendingContextId","activatingContextId","isLoading","onSelectContext","onUseAnother","shownError","adding","title","app","noAccount","jsxs","Text","style","styles","note","color","colors","textSecondary","children","accessibilityRole","onPress","noAccountLink","text","testID","commonsAppearance","continueWithOxyButton","Button","appearance","tone","size","fullWidth","form","OxyAuthScreen","className","undefined","OxyAuthScreenHeader","View","stack","field","TextFieldLabel","nativeID","TextField","invalid","disabled","radius","input","TextFieldInput","label","value","onValueChange","placeholder","autoComplete","autoCapitalize","autoCorrect","autoFocus","returnKeyType","onSubmitEditing","TextFieldHint","loading","Divider","leadingIcon","RiKey2Line","RiQrCodeLine","SubtleLink","OxyAuthTerms","OxyAuthSplit","aside","Fragment","AuthMediaCarousel","slides","SIGN_IN_SLIDES","StyleSheet","absoluteFill","InlineCommonsQr","exports","create","gap","fontSize","lineHeight","textAlign","textDecorationLine","height"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxySignInPanel.tsx"],"mappings":";;;;;;AAuBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAA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AA,CAAAqG,GAAA,EAACxG,cAAA,CAAA2K,YAAY,IAAE,CAAC;EAAA,CACH,CAChB;EAED,IAAI,CAACrE,MAAM,EAAE,OAAOoC,IAAI;EACxB,oBACE,IAAAvI,WAAA,CAAAqG,GAAA,EAACxG,cAAA,CAAA4K,YAAY;IACXC,KAAK,eACH,IAAA1K,WAAA,CAAAkH,IAAA,EAAAlH,WAAA,CAAA2K,QAAA;MAAAjD,QAAA,gBACE,IAAA1H,WAAA,CAAAqG,GAAA,EAAC5H,SAAA,CAAAmM,iBAAiB;QAACC,MAAM,EAAEC,uBAAe;QAAC1D,KAAK,EAAE2D,uBAAU,CAACC;MAAa,CAAE,CAAC,eAC7E,IAAAhL,WAAA,CAAAqG,GAAA,EAAC1G,gBAAA,CAAAsL,eAAe;QAAClK,UAAU,EAAEA;MAAW,CAAE,CAAC;IAAA,CAC3C,CACH;IAAA2G,QAAA,EAEAa;EAAI,CACO,CAAC;AAEnB,CAAC;AAAC2C,OAAA,CAAAjL,cAAA,GAAAA,cAAA;AAEF,MAAMoH,MAAM,GAAG0D,uBAAU,CAACI,MAAM,CAAC;EAC/BtC,KAAK,EAAE;IACLuC,GAAG,EAAE;EACP,CAAC;EACDtC,KAAK,EAAE;IACLsC,GAAG,EAAE;EACP,CAAC;EACD9D,IAAI,EAAE;IACJ+D,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,EAAE;IACdC,SAAS,EAAE;EACb,CAAC;EACDtE,SAAS,EAAE;IACTsE,SAAS,EAAE;EACb,CAAC;EACD1D,aAAa,EAAE;IACb2D,kBAAkB,EAAE;EACtB,CAAC;EACDnC,KAAK,EAAE;IACLoC,MAAM,EAAE;EACV;AACF,CAAC,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.OxySignUpPanel = void 0;
|
|
7
|
+
var _react = require("react");
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
var _button = require("@oxy.so/bloom/button");
|
|
10
|
+
var _RiKey2Line = require("@oxy.so/bloom/icons/RiKey2Line");
|
|
11
|
+
var _theme = require("@oxy.so/bloom/theme");
|
|
12
|
+
var _toast = require("@oxy.so/bloom/toast");
|
|
13
|
+
var _OxyContext = require("../../context/OxyContext.js");
|
|
14
|
+
var _accountDialogSnapshot = require("../../hooks/accountDialogSnapshot.js");
|
|
15
|
+
var _useI18n = require("../../hooks/useI18n.js");
|
|
16
|
+
var _commonsStoreLinks = require("../../utils/commonsStoreLinks.js");
|
|
17
|
+
var _isWebBrowser = require("../../utils/isWebBrowser.js");
|
|
18
|
+
var _primitives = require("../authChooser/primitives.js");
|
|
19
|
+
var _OxyAuthScreen = require("./OxyAuthScreen.js");
|
|
20
|
+
var _jsxRuntime = require("react/jsx-runtime");
|
|
21
|
+
/**
|
|
22
|
+
* Account creation in the account dialog.
|
|
23
|
+
*
|
|
24
|
+
* On the web the account is made on auth.oxy.so, in its window over the app
|
|
25
|
+
* (`onCreateOnWeb`), and this app is signed in as it. On native, Commons
|
|
26
|
+
* creates the identity: straight in when it is installed, "Get Commons"
|
|
27
|
+
* otherwise.
|
|
28
|
+
*/
|
|
29
|
+
|
|
30
|
+
/** Commons' own identity-creation deep link. */const COMMONS_CREATE_IDENTITY_URL = 'oxycommons://create-identity';
|
|
31
|
+
const OxySignUpPanel = ({
|
|
32
|
+
onSignIn,
|
|
33
|
+
onCreateOnWeb
|
|
34
|
+
}) => {
|
|
35
|
+
const theme = (0, _theme.useTheme)();
|
|
36
|
+
const {
|
|
37
|
+
t
|
|
38
|
+
} = (0, _useI18n.useI18n)();
|
|
39
|
+
const {
|
|
40
|
+
accountDialogController: controller
|
|
41
|
+
} = (0, _OxyContext.useOxy)();
|
|
42
|
+
const snapshot = (0, _accountDialogSnapshot.useAccountDialogSnapshot)(controller);
|
|
43
|
+
const web = (0, _isWebBrowser.isWebBrowser)();
|
|
44
|
+
const openExternal = (0, _react.useCallback)(url => {
|
|
45
|
+
Promise.resolve().then(() => _reactNative.Linking.openURL(url)).catch(() => _toast.toast.error(t('accountSwitcher.linkOpenFailed')));
|
|
46
|
+
}, [t]);
|
|
47
|
+
const commonsInstalled = snapshot.commonsAvailability === 'available';
|
|
48
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsxs)(_OxyAuthScreen.OxyAuthScreen, {
|
|
49
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthScreenHeader, {
|
|
50
|
+
title: t('signup.title'),
|
|
51
|
+
description: web ? t('signup.webSubtitle') : t('signup.subtitle')
|
|
52
|
+
}), web ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
53
|
+
appearance: "solid",
|
|
54
|
+
tone: "action",
|
|
55
|
+
size: "lg",
|
|
56
|
+
fullWidth: true,
|
|
57
|
+
leadingIcon: _RiKey2Line.RiKey2Line,
|
|
58
|
+
onPress: onCreateOnWeb,
|
|
59
|
+
testID: "signup-open-identity",
|
|
60
|
+
children: t('signup.createAccount')
|
|
61
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
62
|
+
appearance: "solid",
|
|
63
|
+
tone: "action",
|
|
64
|
+
size: "lg",
|
|
65
|
+
fullWidth: true,
|
|
66
|
+
onPress: () => openExternal(commonsInstalled ? COMMONS_CREATE_IDENTITY_URL : (0, _commonsStoreLinks.getCommonsAcquisitionUrl)(_reactNative.Platform.OS)),
|
|
67
|
+
testID: "signup-commons",
|
|
68
|
+
children: commonsInstalled ? t('signup.createInCommons') : t('accountSwitcher.getCommons')
|
|
69
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_primitives.SubtleLink, {
|
|
70
|
+
label: t('signup.backToSignInLink'),
|
|
71
|
+
theme: theme,
|
|
72
|
+
onPress: onSignIn,
|
|
73
|
+
testID: "back-to-sign-in"
|
|
74
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyAuthScreen.OxyAuthTerms, {})]
|
|
75
|
+
});
|
|
76
|
+
};
|
|
77
|
+
exports.OxySignUpPanel = OxySignUpPanel;
|
|
78
|
+
//# sourceMappingURL=OxySignUpPanel.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_button","_RiKey2Line","_theme","_toast","_OxyContext","_accountDialogSnapshot","_useI18n","_commonsStoreLinks","_isWebBrowser","_primitives","_OxyAuthScreen","_jsxRuntime","COMMONS_CREATE_IDENTITY_URL","OxySignUpPanel","onSignIn","onCreateOnWeb","theme","useTheme","t","useI18n","accountDialogController","controller","useOxy","snapshot","useAccountDialogSnapshot","web","isWebBrowser","openExternal","useCallback","url","Promise","resolve","then","Linking","openURL","catch","toast","error","commonsInstalled","commonsAvailability","jsxs","OxyAuthScreen","children","jsx","OxyAuthScreenHeader","title","description","Button","appearance","tone","size","fullWidth","leadingIcon","RiKey2Line","onPress","testID","getCommonsAcquisitionUrl","Platform","OS","SubtleLink","label","OxyAuthTerms","exports"],"sourceRoot":"../../../../../src","sources":["ui/components/signIn/OxySignUpPanel.tsx"],"mappings":";;;;;;AAUA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,OAAA,GAAAF,OAAA;AACA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,MAAA,GAAAL,OAAA;AACA,IAAAM,WAAA,GAAAN,OAAA;AACA,IAAAO,sBAAA,GAAAP,OAAA;AACA,IAAAQ,QAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AACA,IAAAU,aAAA,GAAAV,OAAA;AACA,IAAAW,WAAA,GAAAX,OAAA;AACA,IAAAY,cAAA,GAAAZ,OAAA;AAAmF,IAAAa,WAAA,GAAAb,OAAA;AAtBnF;AACA;AACA;AACA;AACA;AAC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