@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
|
@@ -7,7 +7,6 @@
|
|
|
7
7
|
* store shape + logic (`createWebAuthStateStore` / `createNativeAuthStateStore` /
|
|
8
8
|
* `createMemoryAuthStateStore`); this module only selects the seam:
|
|
9
9
|
*
|
|
10
|
-
* - `storage: 'ephemeral'` → `createMemoryAuthStateStore()`, on EVERY platform.
|
|
11
10
|
* - web → `createWebAuthStateStore()` (localStorage, in-memory fallback).
|
|
12
11
|
* - native → `createNativeAuthStateStore(secureKV)` for the SESSION blob over
|
|
13
12
|
* the shared `createNativeSecureKeyValueStorage()` adapter
|
|
@@ -35,20 +34,6 @@ export interface PlatformAuthStateStoreOptions {
|
|
|
35
34
|
* a decision a storage seam gets to make.
|
|
36
35
|
*/
|
|
37
36
|
sessionMode?: SessionMode;
|
|
38
|
-
/**
|
|
39
|
-
* Whether this origin/app may persist a durable device credential AT ALL.
|
|
40
|
-
*
|
|
41
|
-
* `'ephemeral'` stores nothing durable and mirrors nothing: the session lives
|
|
42
|
-
* in memory for the lifetime of the page and is gone on reload. Its one caller
|
|
43
|
-
* is `auth.oxy.so` with the browser hub enabled (issue #937 Phase 5, ADR 0003),
|
|
44
|
-
* where the durable credential for the browser profile is the server-side
|
|
45
|
-
* DeviceSession behind the `__Host-oxy-device` handle.
|
|
46
|
-
*
|
|
47
|
-
* See `OxyProviderProps.deviceCredentialStorage` for why the answer to "let the
|
|
48
|
-
* hub be authoritative" is to stop persisting the other credential rather than
|
|
49
|
-
* to consult it second.
|
|
50
|
-
*/
|
|
51
|
-
storage?: 'persistent' | 'ephemeral';
|
|
52
37
|
}
|
|
53
38
|
/**
|
|
54
39
|
* Build the platform {@link AuthStateStore} for this runtime.
|
|
@@ -56,21 +41,6 @@ export interface PlatformAuthStateStoreOptions {
|
|
|
56
41
|
* Native persists the SESSION blob (`deviceId` + `deviceSecret` + cached access
|
|
57
42
|
* token) per-app in SecureStore; the SDK re-mints the access token from the
|
|
58
43
|
* device credential on the next cold boot.
|
|
59
|
-
*
|
|
60
|
-
* ## The ephemeral check is FIRST, and the order is load-bearing
|
|
61
|
-
*
|
|
62
|
-
* It short-circuits above the `isReactNative()` branch so an ephemeral caller can
|
|
63
|
-
* never reach the native path — and therefore can never reach the shared-slot
|
|
64
|
-
* mirroring wrapper. Checked after that branch instead, an origin that has
|
|
65
|
-
* declined to persist a credential would publish one into the device-wide slot
|
|
66
|
-
* every sibling app adopts on cold boot: it would keep nothing itself while
|
|
67
|
-
* deciding which session five other apps boot into.
|
|
68
|
-
*
|
|
69
|
-
* That is unreachable today because the only ephemeral caller is a web origin, so
|
|
70
|
-
* `isReactNative()` is false there anyway. Unreachable today is exactly the kind
|
|
71
|
-
* of guarantee that stops holding when someone adds the second caller, so it is
|
|
72
|
-
* structural here rather than incidental, and
|
|
73
|
-
* `__tests__/session/authStoreEphemeral.test.ts` holds the ordering directly.
|
|
74
44
|
*/
|
|
75
45
|
export declare function createPlatformAuthStateStore(options?: PlatformAuthStateStoreOptions): AuthStateStore;
|
|
76
46
|
//# sourceMappingURL=authStore.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/authStore.ts"],"names":[],"mappings":"AAAA
|
|
1
|
+
{"version":3,"file":"authStore.d.ts","sourceRoot":"","sources":["../../../../../src/ui/session/authStore.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;GAoBG;AACH,OAAO,EAIL,KAAK,cAAc,EACnB,KAAK,WAAW,EACjB,MAAM,cAAc,CAAC;AAKtB,MAAM,WAAW,6BAA6B;IAC5C;;;;;;;;;;;OAWG;IACH,WAAW,CAAC,EAAE,WAAW,CAAC;CAC3B;AAED;;;;;;GAMG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,GAAE,6BAAkC,GAC1C,cAAc,CAWhB"}
|
|
@@ -126,32 +126,6 @@ export interface OxyProviderProps {
|
|
|
126
126
|
* @default false
|
|
127
127
|
*/
|
|
128
128
|
backgroundSession?: boolean;
|
|
129
|
-
/**
|
|
130
|
-
* Whether this origin/app may persist the durable device credential
|
|
131
|
-
* (`deviceId` + `deviceSecret`) at all.
|
|
132
|
-
*
|
|
133
|
-
* `'persistent'` (the default, and every app's behaviour) stores it — web
|
|
134
|
-
* localStorage per origin, SecureStore per app on native — so the SDK can
|
|
135
|
-
* re-mint an access token on the next cold boot.
|
|
136
|
-
*
|
|
137
|
-
* `'ephemeral'` stores NOTHING durable: the session lives in memory for the
|
|
138
|
-
* lifetime of the page and is gone on reload. It exists for ONE caller,
|
|
139
|
-
* `auth.oxy.so` with the browser hub enabled (issue #937 Phase 5, ADR 0003),
|
|
140
|
-
* where the durable credential for the browser profile is the server-side
|
|
141
|
-
* DeviceSession behind the `__Host-oxy-device` handle. Two durable
|
|
142
|
-
* credentials for one origin is the dual authority that phase exists to
|
|
143
|
-
* remove — revoking the hub while a localStorage secret still mints would
|
|
144
|
-
* make a sign-out look like it worked — so the way to let the hub be
|
|
145
|
-
* authoritative is to stop persisting the other one, not to consult it
|
|
146
|
-
* second.
|
|
147
|
-
*
|
|
148
|
-
* Do NOT reach for this to make an app "more private". A relying-party
|
|
149
|
-
* origin set to `'ephemeral'` simply signs the user out on every reload,
|
|
150
|
-
* because nothing else on that origin remembers the device.
|
|
151
|
-
*
|
|
152
|
-
* @default 'persistent'
|
|
153
|
-
*/
|
|
154
|
-
deviceCredentialStorage?: 'persistent' | 'ephemeral';
|
|
155
129
|
/**
|
|
156
130
|
* Wires the app's OWN i18n library to Oxy's resolved language, so the
|
|
157
131
|
* account (or, signed out, the device/guest locale) drives the app's
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"navigation.d.ts","sourceRoot":"","sources":["../../../../../src/ui/types/navigation.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAClD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,uBAAuB,CAAC;AACzD,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IAAI,GAAG,OAAO,CAAC,IAAI,CAAC,CAAC;IACnD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,CAAC;CACtD"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@oxy.so/services",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "6.0.0",
|
|
4
4
|
"description": "OxyHQ Expo/React Native SDK — UI components, screens, and native features",
|
|
5
5
|
"main": "lib/commonjs/index.js",
|
|
6
6
|
"module": "lib/module/index.js",
|
|
@@ -155,7 +155,7 @@
|
|
|
155
155
|
},
|
|
156
156
|
"dependencies": {
|
|
157
157
|
"@expo/config-plugins": "57.0.9",
|
|
158
|
-
"@oxy.so/contracts": "^
|
|
158
|
+
"@oxy.so/contracts": "^2.0.0",
|
|
159
159
|
"@simplewebauthn/browser": "^13.3.0",
|
|
160
160
|
"color": "^4.2.3"
|
|
161
161
|
},
|
|
@@ -164,7 +164,7 @@
|
|
|
164
164
|
"@commitlint/cli": "^21.2.1",
|
|
165
165
|
"@commitlint/config-conventional": "^21.2.0",
|
|
166
166
|
"@expo/vector-icons": "^15.0.3",
|
|
167
|
-
"@oxy.so/core": "1.
|
|
167
|
+
"@oxy.so/core": "1.16.0",
|
|
168
168
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
169
169
|
"@react-native-community/netinfo": "^12.0.1",
|
|
170
170
|
"@react-native/babel-preset": "^0.86.2",
|
|
@@ -179,7 +179,7 @@
|
|
|
179
179
|
"@types/jest": "^30.0.0",
|
|
180
180
|
"@types/node": "^20.19.43",
|
|
181
181
|
"@types/react": "*",
|
|
182
|
-
"@oxy.so/bloom": "^4.
|
|
182
|
+
"@oxy.so/bloom": "^4.26.0",
|
|
183
183
|
"copyfiles": "^2.4.1",
|
|
184
184
|
"expo-constants": "~57.0.5",
|
|
185
185
|
"expo-file-system": "~57.0.1",
|
|
@@ -215,8 +215,8 @@
|
|
|
215
215
|
"//@oxy.so/bloom": "RE-RAISE THIS FLOOR ON EVERY BREAKING BLOOM RELEASE, in the same commit as the root package.json catalog entry and the code that requires it. The breaking position is the MAJOR, so `^3.0.1` means `>=3.0.1 <4.0.0`: 3.x minors are admitted on semver's additive promise, and Bloom 4.0.0 is refused until someone raises this deliberately. The CAP is the part that is load-bearing. An earlier revision of this key recorded the opposite trade -- an uncapped `>=` floor, accepted so that intentionally-breaking Bloom 0.x minors would not be blocked -- and that trade is closed by evidence rather than by preference: an unbounded range is exactly what let `bun install` pair this package with Bloom 1.0.0 and emit no warning at all, and 1.0.0 broke it four ways (a deleted provider, a renamed confirm option, a renamed Chip fill, and two REMOVED SUBPATHS that fail at bundle time, before any typecheck runs). A floor is a claim about what was measured; a cap is the claim that nothing beyond it was. RAISED TO 3.0.1 from `^2.1.0`. Bloom 3.0.0 breaks exactly two things -- `PageHeader` defaults to `presentation=\"floating\"` and stops hiding the title under `transparent`, and `Field disabled` now reaches the control that reads the field context -- and THIS PACKAGE IMPORTS NEITHER: it renders no `PageHeader` and no `Field`, and 3.0 removes no subpath (unlike 2.0.0, which is why that floor cost code changes and this one does not). Its six `transparent` occurrences are CSS colour values, not the PageHeader prop. The cap had to move rather than widen to a union, because leaving `^2.1.0` in place is what made `bun install` resolve a SECOND, nested Bloom 2.12.4 under this package for any app on Bloom 3 -- two copies of a library whose 3.0 contracts (`control-surface`, `TopEdgeProvider`, `ScrollOffsetProvider`) are React contexts, so a provider from one copy cannot be read by a consumer from the other. Mention's `oxyRuntimeCompatibility` test is what caught it; nothing in a typecheck can. RAISED AGAIN TO 3.2.0 from `^3.0.1`, for the same class of reason the 2.x note records, only in the other direction: 3.2.0 ADDS the per-glyph icon subpaths (`@oxy.so/bloom/icons/RiAtLine`) that this package's screens now import instead of the `@oxy.so/bloom/icons` barrel, and a missing subpath fails at bundle time, in the consumer's Metro, long after this package has typechecked and shipped. `^3.0.1` would have admitted Bloom 3.0.1 and 3.1.0, neither of which has those subpaths, so the floor is the only thing standing between a consumer and a red build. Nothing else about 3.1.0 or 3.2.0 is required here; the cap stays at the major. RAISED TO ^4.2.0: FollowButton now delegates its visuals to Bloom media-header FollowButton with loading, textStyle and large size; the new shared UI contracts require one Bloom4 context across Services and its consumer.",
|
|
216
216
|
"peerDependencies": {
|
|
217
217
|
"@expo/vector-icons": "^15.0.3",
|
|
218
|
-
"@oxy.so/bloom": "^4.
|
|
219
|
-
"@oxy.so/core": "^1.
|
|
218
|
+
"@oxy.so/bloom": "^4.26.0",
|
|
219
|
+
"@oxy.so/core": "^1.16.0",
|
|
220
220
|
"@react-native-async-storage/async-storage": "^2.0.0",
|
|
221
221
|
"@react-native-community/netinfo": ">=11.4.1",
|
|
222
222
|
"@tanstack/query-async-storage-persister": "^5.101",
|
|
@@ -253,9 +253,6 @@
|
|
|
253
253
|
"nativewind": {
|
|
254
254
|
"optional": true
|
|
255
255
|
},
|
|
256
|
-
"react-native-css": {
|
|
257
|
-
"optional": true
|
|
258
|
-
},
|
|
259
256
|
"expo-modules-core": {
|
|
260
257
|
"optional": true
|
|
261
258
|
},
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
package/src/index.ts
CHANGED
|
@@ -359,13 +359,22 @@ export { default as ProfileButton } from './ui/components/ProfileButton';
|
|
|
359
359
|
export type { ProfileButtonProps } from './ui/components/ProfileButton';
|
|
360
360
|
export type { AccountDialogMenuItem } from './ui/navigation/accountDialogManager';
|
|
361
361
|
|
|
362
|
-
//
|
|
363
|
-
//
|
|
364
|
-
//
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
export {
|
|
368
|
-
export type {
|
|
362
|
+
// THE sign-in screens. The account dialog renders them, and so does every page
|
|
363
|
+
// of the auth.oxy.so IdP: one implementation of what a person sees when they
|
|
364
|
+
// sign in, create an account, or choose which account continues.
|
|
365
|
+
export { OxySignInPanel } from './ui/components/signIn/OxySignInPanel';
|
|
366
|
+
export type { OxySignInPanelProps } from './ui/components/signIn/OxySignInPanel';
|
|
367
|
+
export { OxySignUpPanel } from './ui/components/signIn/OxySignUpPanel';
|
|
368
|
+
export type { OxySignUpPanelProps } from './ui/components/signIn/OxySignUpPanel';
|
|
369
|
+
export { OxyAccountPicker } from './ui/components/signIn/OxyAccountPicker';
|
|
370
|
+
export type { OxyAccountPickerProps } from './ui/components/signIn/OxyAccountPicker';
|
|
371
|
+
export {
|
|
372
|
+
OxyAuthScreen,
|
|
373
|
+
OxyAuthScreenHeader,
|
|
374
|
+
OxyAuthLoading,
|
|
375
|
+
OxyAuthTerms,
|
|
376
|
+
} from './ui/components/signIn/OxyAuthScreen';
|
|
377
|
+
export type { OxyAuthScreenHeaderProps } from './ui/components/signIn/OxyAuthScreen';
|
|
369
378
|
|
|
370
379
|
// The in-flight "Sign in with Oxy" REQUEST surface — the route's primary visual,
|
|
371
380
|
// the progress line, and the "Having trouble?" alternatives — as a purely
|
|
@@ -12,6 +12,7 @@ import { useFollow, useFollowForButton } from '../hooks/useFollow';
|
|
|
12
12
|
import { useFollowStore } from '../stores/followStore';
|
|
13
13
|
import type { OxyServices, BulkFollowResult, BulkUnfollowResult } from '@oxy.so/core';
|
|
14
14
|
import { useShallow } from 'zustand/react/shallow';
|
|
15
|
+
import { describeFollowAllButton, describeFollowButton } from './followButtonAccessibility';
|
|
15
16
|
|
|
16
17
|
const DEFAULT_FOLLOW_ALL_LABEL = 'Follow all';
|
|
17
18
|
const DEFAULT_FOLLOWED_ALL_LABEL = 'Following';
|
|
@@ -32,6 +33,12 @@ interface FollowButtonBaseProps {
|
|
|
32
33
|
export interface SingleFollowButtonProps extends FollowButtonBaseProps {
|
|
33
34
|
userId: string;
|
|
34
35
|
initiallyFollowing?: boolean;
|
|
36
|
+
/**
|
|
37
|
+
* The account's handle, with or without the `@`. A screen reader then hears
|
|
38
|
+
* "Following @nate" rather than a bare "Following"; omit it and the name
|
|
39
|
+
* still follows the state.
|
|
40
|
+
*/
|
|
41
|
+
username?: string;
|
|
35
42
|
userIds?: never;
|
|
36
43
|
}
|
|
37
44
|
|
|
@@ -59,6 +66,7 @@ const FollowButtonInner = memo(function FollowButtonInner({
|
|
|
59
66
|
userId,
|
|
60
67
|
oxyServices,
|
|
61
68
|
initiallyFollowing,
|
|
69
|
+
username,
|
|
62
70
|
size = 'medium',
|
|
63
71
|
onFollowChange,
|
|
64
72
|
style,
|
|
@@ -106,6 +114,12 @@ const FollowButtonInner = memo(function FollowButtonInner({
|
|
|
106
114
|
const isBusy = isLoading || !isKnown;
|
|
107
115
|
const showFollowing = isKnown && isFollowing;
|
|
108
116
|
const showSpinner = showLoadingState && isBusy;
|
|
117
|
+
const { accessibilityLabel, accessibilityHint } = describeFollowButton({
|
|
118
|
+
isKnown,
|
|
119
|
+
isFollowing: showFollowing,
|
|
120
|
+
isPending: isLoading,
|
|
121
|
+
username,
|
|
122
|
+
});
|
|
109
123
|
|
|
110
124
|
return (
|
|
111
125
|
<BloomFollowButton
|
|
@@ -117,6 +131,8 @@ const FollowButtonInner = memo(function FollowButtonInner({
|
|
|
117
131
|
style={style}
|
|
118
132
|
textStyle={textStyle}
|
|
119
133
|
label={isKnown || showSpinner ? 'Follow' : ''}
|
|
134
|
+
accessibilityLabel={accessibilityLabel}
|
|
135
|
+
accessibilityHint={accessibilityHint}
|
|
120
136
|
/>
|
|
121
137
|
);
|
|
122
138
|
});
|
|
@@ -226,10 +242,19 @@ const FollowButtonMultiInner = memo(function FollowButtonMultiInner({
|
|
|
226
242
|
}, [disabled, isLoading, allFollowing, followAllUsers, unfollowAllUsers, onFollowChange, onBulkFollow, onBulkUnfollow, preventParentActions]);
|
|
227
243
|
|
|
228
244
|
const showSpinner = showLoadingState && isLoading;
|
|
245
|
+
const { accessibilityLabel, accessibilityHint } = describeFollowAllButton({
|
|
246
|
+
allFollowing,
|
|
247
|
+
isPending: Boolean(isLoading),
|
|
248
|
+
count: userIds.length,
|
|
249
|
+
followAllLabel,
|
|
250
|
+
followedAllLabel,
|
|
251
|
+
});
|
|
229
252
|
|
|
230
253
|
return (
|
|
231
254
|
<BloomFollowButton
|
|
232
255
|
following={allFollowing}
|
|
256
|
+
accessibilityLabel={accessibilityLabel}
|
|
257
|
+
accessibilityHint={accessibilityHint}
|
|
233
258
|
onFollowChange={() => { void handlePress(); }}
|
|
234
259
|
label={followAllLabel}
|
|
235
260
|
followingLabel={followedAllLabel}
|
|
@@ -385,6 +385,10 @@ export const FollowTargetButton = memo(function FollowTargetButton({
|
|
|
385
385
|
following={isFollowing}
|
|
386
386
|
label={isFollowing ? text.idle : label}
|
|
387
387
|
followingLabel={label}
|
|
388
|
+
// The visible text says Following / Requested / Off here, but Bloom
|
|
389
|
+
// names the button by its idle label in every state. Name it by the
|
|
390
|
+
// state it shows (OxyHQ/oxy#1375 item 22).
|
|
391
|
+
accessibilityLabel={label}
|
|
388
392
|
size={size}
|
|
389
393
|
disabled={disabled || isUnknown}
|
|
390
394
|
loading={isPending || isUnknown}
|
|
@@ -22,18 +22,15 @@
|
|
|
22
22
|
*/
|
|
23
23
|
|
|
24
24
|
import type React from 'react';
|
|
25
|
-
import { useCallback
|
|
25
|
+
import { useCallback } from 'react';
|
|
26
26
|
import { StyleSheet, View } from 'react-native';
|
|
27
|
-
import type { AccountDialogSnapshot } from '@oxy.so/core';
|
|
28
27
|
import { useOxy } from '../context/OxyContext';
|
|
29
28
|
import { useI18n } from '../hooks/useI18n';
|
|
30
29
|
import { useSurfaceHeader } from '../hooks/useSurfaceHeader';
|
|
31
30
|
import type { BaseScreenProps } from '../types/navigation';
|
|
32
31
|
import LogoText from './logo/LogoText';
|
|
33
32
|
import OxyAuthChooser from './OxyAuthChooser';
|
|
34
|
-
import {
|
|
35
|
-
|
|
36
|
-
type Translate = ReturnType<typeof useI18n>['t'];
|
|
33
|
+
import { useAccountDialogSnapshot } from '../hooks/accountDialogSnapshot';
|
|
37
34
|
|
|
38
35
|
/**
|
|
39
36
|
* The account MENU's nav bar carries the Oxy wordmark instead of a title — the
|
|
@@ -60,25 +57,9 @@ const OxyAccountDialogScreen: React.FC<BaseScreenProps> = ({ canGoBack }) => {
|
|
|
60
57
|
const { accountDialogController: controller, closeAccountDialog } = useOxy();
|
|
61
58
|
const { t } = useI18n();
|
|
62
59
|
|
|
63
|
-
|
|
64
|
-
// binds independently — cheap, and the established pattern here (
|
|
65
|
-
// `useDeviceSwitcher` also binds to this controller on its own).
|
|
66
|
-
const subscribe = useCallback(
|
|
67
|
-
(listener: () => void) => (controller ? controller.subscribe(listener) : () => undefined),
|
|
68
|
-
[controller],
|
|
69
|
-
);
|
|
70
|
-
const getSnapshot = useCallback(
|
|
71
|
-
() => (controller ? controller.getSnapshot() : EMPTY_ACCOUNT_DIALOG_SNAPSHOT),
|
|
72
|
-
[controller],
|
|
73
|
-
);
|
|
74
|
-
const snapshot = useSyncExternalStore(subscribe, getSnapshot, getSnapshot);
|
|
60
|
+
const snapshot = useAccountDialogSnapshot(controller);
|
|
75
61
|
|
|
76
62
|
const { view } = snapshot;
|
|
77
|
-
// Names the entry view "Add another account" rather than "Sign in" only when
|
|
78
|
-
// THIS app is signed in. Not the directory's size: the device can go on
|
|
79
|
-
// listing a shared identity (Commons') after the app signed out, and that
|
|
80
|
-
// titled a signed-out sheet "Add another account" (OxyHQ/oxy#1375 item 21).
|
|
81
|
-
const hasSignedInAccounts = snapshot.hasSession;
|
|
82
63
|
// Where back leads is the CONTROLLER's answer (`snapshot.backView`), never a
|
|
83
64
|
// table here: a host-side "back = accounts" assumed a signed-in origin and
|
|
84
65
|
// opened the account menu for nobody on a signed-out Back from sign-up.
|
|
@@ -93,18 +74,15 @@ const OxyAccountDialogScreen: React.FC<BaseScreenProps> = ({ canGoBack }) => {
|
|
|
93
74
|
// `closeAccountDialog` so the pop + state teardown stay in one place. Opened
|
|
94
75
|
// cold (detached) it is the root frame → `canGoBack` is false → no back.
|
|
95
76
|
const backsToHost = !showBack && (canGoBack?.() ?? false);
|
|
96
|
-
// The
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
// on scroll — because their copy is informative.
|
|
102
|
-
const copy = view === 'accounts' ? null : headerCopy(view, hasSignedInAccounts, t);
|
|
77
|
+
// The sign-in and sign-up screens carry their own header — the Oxy mark and
|
|
78
|
+
// the large title auth.oxy.so shows — so the bar holds only the way back.
|
|
79
|
+
// The account MENU is branded with the wordmark (the hero under it names the
|
|
80
|
+
// account); the active request is titled, route-agnostically, because Oxy
|
|
81
|
+
// picks how it travels (issue #691).
|
|
103
82
|
|
|
104
83
|
useSurfaceHeader({
|
|
105
|
-
titleContent:
|
|
106
|
-
title:
|
|
107
|
-
subtitle: copy?.subtitle ?? undefined,
|
|
84
|
+
titleContent: view === 'accounts' ? NAV_LOGO : undefined,
|
|
85
|
+
title: view === 'qr' ? t('accountSwitcher.signInWithOxy') : undefined,
|
|
108
86
|
onBack: showBack ? goBack : backsToHost ? closeAccountDialog : undefined,
|
|
109
87
|
});
|
|
110
88
|
|
|
@@ -119,45 +97,6 @@ const OxyAccountDialogScreen: React.FC<BaseScreenProps> = ({ canGoBack }) => {
|
|
|
119
97
|
);
|
|
120
98
|
};
|
|
121
99
|
|
|
122
|
-
// ---------------------------------------------------------------------------
|
|
123
|
-
// Copy + helpers
|
|
124
|
-
// ---------------------------------------------------------------------------
|
|
125
|
-
|
|
126
|
-
function headerCopy(
|
|
127
|
-
view: Exclude<AccountDialogSnapshot['view'], 'accounts'>,
|
|
128
|
-
hasSignedInAccounts: boolean,
|
|
129
|
-
t: Translate,
|
|
130
|
-
): { title: string; subtitle: string | null } {
|
|
131
|
-
switch (view) {
|
|
132
|
-
// The ACTIVE REQUEST. Its header is deliberately route-AGNOSTIC: Oxy picks
|
|
133
|
-
// the delivery route (QR here, a push to the user's phone, or opening
|
|
134
|
-
// Commons on this device — issue #691), so naming one of them in the bar
|
|
135
|
-
// would contradict the other two. The route-specific status line lives in
|
|
136
|
-
// the body, derived from `signIn.progress`, and is the only thing that
|
|
137
|
-
// describes HOW the request is travelling.
|
|
138
|
-
case 'qr':
|
|
139
|
-
return {
|
|
140
|
-
title: t('accountSwitcher.signInWithOxy') || 'Sign in with Oxy',
|
|
141
|
-
subtitle: null,
|
|
142
|
-
};
|
|
143
|
-
case 'signup':
|
|
144
|
-
return {
|
|
145
|
-
title: t('signup.title') || 'Create your account',
|
|
146
|
-
subtitle: t('signup.subtitle') || 'One identity for the whole ecosystem.',
|
|
147
|
-
};
|
|
148
|
-
default:
|
|
149
|
-
return hasSignedInAccounts
|
|
150
|
-
? {
|
|
151
|
-
title: t('signin.addAccountTitle') || 'Add another account',
|
|
152
|
-
subtitle: t('signin.addAccountSubtitle') || 'Sign in with another account.',
|
|
153
|
-
}
|
|
154
|
-
: {
|
|
155
|
-
title: t('signin.title') || 'Sign in',
|
|
156
|
-
subtitle: t('signin.subtitle') || 'One identity for the whole ecosystem.',
|
|
157
|
-
};
|
|
158
|
-
}
|
|
159
|
-
}
|
|
160
|
-
|
|
161
100
|
/**
|
|
162
101
|
* The screen gutter. In the Dialog's nav-header mode the surface adds NO content
|
|
163
102
|
* padding of its own — the large title and each screen own theirs — so this must
|
|
@@ -169,7 +108,7 @@ const SCREEN_MARGIN = 20;
|
|
|
169
108
|
const styles = StyleSheet.create({
|
|
170
109
|
bodyContent: {
|
|
171
110
|
paddingTop: 4,
|
|
172
|
-
paddingBottom:
|
|
111
|
+
paddingBottom: 20,
|
|
173
112
|
paddingHorizontal: SCREEN_MARGIN,
|
|
174
113
|
},
|
|
175
114
|
});
|
|
@@ -15,17 +15,16 @@
|
|
|
15
15
|
* responsibility each:
|
|
16
16
|
*
|
|
17
17
|
* - `accounts` → `AccountsMenuView` — the signed-in Oxy account menu.
|
|
18
|
-
* - `add` / `signin` → `
|
|
19
|
-
*
|
|
20
|
-
*
|
|
21
|
-
* (a QR on an unknown desktop, "Check Commons on your phone" where Oxy could
|
|
22
|
-
* deliver) IS the primary route there, never something behind a second tap.
|
|
18
|
+
* - `add` / `signin` → `OxySignInPanel` — THE sign-in screen, the one
|
|
19
|
+
* auth.oxy.so renders too: the device's accounts, then "Continue with
|
|
20
|
+
* Oxy" (on the web, auth.oxy.so's window over the app).
|
|
23
21
|
* - `qr` → `SignInRequestView` — the ACTIVE REQUEST: the controller-bound
|
|
24
22
|
* wiring over the shared, presentational `OxySignInRequestSurface` (the same
|
|
25
23
|
* component the auth.oxy.so IdP mounts from its OAuth-bound request). It maps
|
|
26
24
|
* `snapshot.signIn` onto that surface's props; alternatives stay behind
|
|
27
25
|
* "Having trouble?" until the chosen route reports `routeFailed`.
|
|
28
|
-
* - `signup` → `
|
|
26
|
+
* - `signup` → `OxySignUpPanel` — account creation: auth.oxy.so's window on
|
|
27
|
+
* the web, Commons on native.
|
|
29
28
|
*
|
|
30
29
|
* Per-account color re-theming uses Bloom's `APP_COLOR_PRESETS` + `BloomColorScope`
|
|
31
30
|
* (same visual language auth.oxy.so uses). Base theming is `useTheme()` + a
|
|
@@ -39,7 +38,7 @@ import { Linking, Platform } from 'react-native';
|
|
|
39
38
|
import { toast } from '@oxy.so/bloom/toast';
|
|
40
39
|
import { surfaces } from '@oxy.so/bloom/surfaces';
|
|
41
40
|
import { useTheme } from '@oxy.so/bloom/theme';
|
|
42
|
-
import {
|
|
41
|
+
import { AUTH_WEB_ORIGIN, getNormalizedUserHandle, type OxyAuthScreen, type User } from '@oxy.so/core';
|
|
43
42
|
import { useQueryClient } from '@tanstack/react-query';
|
|
44
43
|
import { useOxy } from '../context/OxyContext';
|
|
45
44
|
import { useDeviceSwitcher } from '../hooks/useDeviceSwitcher';
|
|
@@ -52,9 +51,7 @@ import { isWebBrowser } from '../utils/isWebBrowser';
|
|
|
52
51
|
import { getCommonsAcquisitionUrl } from '../utils/commonsStoreLinks';
|
|
53
52
|
import { useAccountStorageUsage } from '../hooks/queries/useServicesQueries';
|
|
54
53
|
import AccountsMenuView from './authChooser/AccountsMenuView';
|
|
55
|
-
import SignInEntryView from './authChooser/SignInEntryView';
|
|
56
54
|
import SignInRequestView from './authChooser/SignInRequestView';
|
|
57
|
-
import SignUpView from './authChooser/SignUpView';
|
|
58
55
|
import { signInFailureMessage } from './authChooser/signInFailureMessage';
|
|
59
56
|
import {
|
|
60
57
|
resolveAccentHex,
|
|
@@ -66,9 +63,9 @@ import {
|
|
|
66
63
|
type SignInAlternatives,
|
|
67
64
|
} from './authChooser/types';
|
|
68
65
|
import { EMPTY_ACCOUNT_DIALOG_SNAPSHOT } from '../hooks/accountDialogSnapshot';
|
|
66
|
+
import { OxySignInPanel } from './signIn/OxySignInPanel';
|
|
67
|
+
import { OxySignUpPanel } from './signIn/OxySignUpPanel';
|
|
69
68
|
|
|
70
|
-
/** Commons' own identity-creation deep link (mirrors the `approve`/`attest`/`card` intents). */
|
|
71
|
-
const COMMONS_CREATE_IDENTITY_URL = 'oxycommons://create-identity';
|
|
72
69
|
/**
|
|
73
70
|
* "Accounts by Oxy" management app — the canonical home for account settings,
|
|
74
71
|
* data export, and storage management. The account-menu rows deep-link into it
|
|
@@ -90,12 +87,6 @@ const toastedFailureAttempt = new WeakMap<object, number>();
|
|
|
90
87
|
export interface OxyAuthChooserProps {
|
|
91
88
|
/** Called after a completed switch, sign-in, or sign-up. */
|
|
92
89
|
onComplete?: () => void;
|
|
93
|
-
/**
|
|
94
|
-
* @deprecated No effect. The web sign-in entry no longer auto-starts a
|
|
95
|
-
* device-flow request: its primary action opens the identity origin
|
|
96
|
-
* (`id.oxy.so`) in a popup, which a browser only allows from a user gesture.
|
|
97
|
-
*/
|
|
98
|
-
autoStartSignIn?: boolean;
|
|
99
90
|
}
|
|
100
91
|
|
|
101
92
|
/**
|
|
@@ -111,6 +102,7 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
111
102
|
logout,
|
|
112
103
|
openAvatarPicker,
|
|
113
104
|
user,
|
|
105
|
+
continueOnAuth,
|
|
114
106
|
} = useOxy();
|
|
115
107
|
const theme = useTheme();
|
|
116
108
|
const { t } = useI18n();
|
|
@@ -120,13 +112,23 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
120
112
|
// so the two switchers cannot drift.
|
|
121
113
|
const { principals } = useDeviceSwitcher();
|
|
122
114
|
|
|
123
|
-
//
|
|
124
|
-
//
|
|
125
|
-
//
|
|
126
|
-
//
|
|
127
|
-
// no passkey path: Commons owns identity there ('none').
|
|
115
|
+
// On the web every sign-in and sign-up runs in auth.oxy.so's window over the
|
|
116
|
+
// app (`continueOnAuth`): the passkey belongs to that origin, and the
|
|
117
|
+
// browser's session lives there, shared by every Oxy app. Native has no
|
|
118
|
+
// passkey path: Commons owns identity there ('none').
|
|
128
119
|
const passkeyMode = useMemo<PasskeyMode>(() => (isWebBrowser() ? 'hub' : 'none'), []);
|
|
129
120
|
|
|
121
|
+
/** auth.oxy.so's window; this surface closes once it signs the app in. */
|
|
122
|
+
const openOnOxy = useCallback(
|
|
123
|
+
(screen: OxyAuthScreen) => {
|
|
124
|
+
void continueOnAuth(screen).then((result) => {
|
|
125
|
+
if (result.status === 'signed-in') onComplete?.();
|
|
126
|
+
else if (result.status === 'failed') toast.error(t('signin.errors.failed'));
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
[continueOnAuth, onComplete, t],
|
|
130
|
+
);
|
|
131
|
+
|
|
130
132
|
// Bind the headless controller. `getSnapshot` returns a stable reference
|
|
131
133
|
// between changes, so it is `useSyncExternalStore`-safe. Guard the no-provider
|
|
132
134
|
// loading state (`controller` is `null`) with an inert store.
|
|
@@ -140,7 +142,8 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
140
142
|
if (!controller) return () => undefined;
|
|
141
143
|
const maybeToastSignInError = () => {
|
|
142
144
|
const { signIn } = controller.getSnapshot();
|
|
143
|
-
|
|
145
|
+
// The embedded QR's failures are its own to handle (it renews itself).
|
|
146
|
+
if (signIn.phase !== 'error' || signIn.inline) return;
|
|
144
147
|
if (toastedFailureAttempt.get(controller) === signIn.attempt) return;
|
|
145
148
|
toastedFailureAttempt.set(controller, signIn.attempt);
|
|
146
149
|
const message = signInFailureMessage(signIn.failure, t);
|
|
@@ -363,18 +366,14 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
363
366
|
const alternatives = useMemo<SignInAlternatives>(
|
|
364
367
|
() => ({
|
|
365
368
|
passkeyAvailable: passkeyMode !== 'none',
|
|
366
|
-
//
|
|
367
|
-
onSignInWithPasskey: () =>
|
|
369
|
+
// auth.oxy.so asserts the passkey, in its window.
|
|
370
|
+
onSignInWithPasskey: () => openOnOxy('signin'),
|
|
368
371
|
onShowQr: () => void controller?.showQr(),
|
|
369
372
|
onGetCommons: () => openExternal(getCommonsAcquisitionUrl(Platform.OS)),
|
|
370
|
-
// Web: the
|
|
371
|
-
|
|
372
|
-
onCreateAccount: () => {
|
|
373
|
-
if (passkeyMode === 'hub') void controller?.startPasskeyHubSignIn();
|
|
374
|
-
else controller?.startSignup();
|
|
375
|
-
},
|
|
373
|
+
// Web: the account is made on auth.oxy.so. Native: Commons makes it.
|
|
374
|
+
onCreateAccount: () => (passkeyMode === 'hub' ? openOnOxy('signup') : controller?.startSignup()),
|
|
376
375
|
}),
|
|
377
|
-
[passkeyMode, controller, openExternal],
|
|
376
|
+
[passkeyMode, controller, openExternal, openOnOxy],
|
|
378
377
|
);
|
|
379
378
|
|
|
380
379
|
// Real storage usage for the account menu's "Oxy storage" block. Disabled
|
|
@@ -420,7 +419,7 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
420
419
|
onSignOut: () => {
|
|
421
420
|
void handleSignOut();
|
|
422
421
|
},
|
|
423
|
-
onOpenIdentity: passkeyMode === 'hub' ? () => openUrl(`${
|
|
422
|
+
onOpenIdentity: passkeyMode === 'hub' ? () => openUrl(`${AUTH_WEB_ORIGIN}/identity`) : undefined,
|
|
424
423
|
customItems: (consumerHooks?.menuItems ?? []).map((item) => ({
|
|
425
424
|
...item,
|
|
426
425
|
onPress: () => {
|
|
@@ -462,29 +461,14 @@ const OxyAuthChooser: React.FC<OxyAuthChooserProps> = ({ onComplete }) => {
|
|
|
462
461
|
}
|
|
463
462
|
|
|
464
463
|
if (view === 'signup') {
|
|
465
|
-
return (
|
|
466
|
-
<SignUpView
|
|
467
|
-
snapshot={snapshot}
|
|
468
|
-
theme={theme}
|
|
469
|
-
t={t}
|
|
470
|
-
passkeyMode={passkeyMode}
|
|
471
|
-
onOpenHub={() => void controller.startPasskeyHubSignIn()}
|
|
472
|
-
onCreateIdentityInCommons={() => openExternal(COMMONS_CREATE_IDENTITY_URL)}
|
|
473
|
-
onGetCommons={alternatives.onGetCommons}
|
|
474
|
-
onBackToSignIn={() => controller.setView('signin')}
|
|
475
|
-
/>
|
|
476
|
-
);
|
|
464
|
+
return <OxySignUpPanel onSignIn={() => controller.setView('signin')} onCreateOnWeb={() => openOnOxy('signup')} />;
|
|
477
465
|
}
|
|
478
466
|
|
|
479
467
|
return (
|
|
480
|
-
<
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
t={t}
|
|
485
|
-
handlers={handlers}
|
|
486
|
-
onContinueWithOxy={() => void controller.signInWithOxy()}
|
|
487
|
-
alternatives={alternatives}
|
|
468
|
+
<OxySignInPanel
|
|
469
|
+
host="dialog"
|
|
470
|
+
onSignedIn={() => onComplete?.()}
|
|
471
|
+
onCreateAccount={alternatives.onCreateAccount}
|
|
488
472
|
/>
|
|
489
473
|
);
|
|
490
474
|
};
|
|
@@ -90,7 +90,6 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
90
90
|
queryClient: providedQueryClient,
|
|
91
91
|
requireAuth = 'off',
|
|
92
92
|
backgroundSession = false,
|
|
93
|
-
deviceCredentialStorage = 'persistent',
|
|
94
93
|
language,
|
|
95
94
|
}) => {
|
|
96
95
|
|
|
@@ -240,7 +239,6 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
240
239
|
sessionMode={sessionMode}
|
|
241
240
|
webAuthMode={webAuthMode}
|
|
242
241
|
backgroundSession={backgroundSession}
|
|
243
|
-
deviceCredentialStorage={deviceCredentialStorage}
|
|
244
242
|
platformStorage={platformStorage}
|
|
245
243
|
onAuthStateChange={onAuthStateChange as OxyRuntimeProviderProps['onAuthStateChange']}
|
|
246
244
|
>
|