@oxyhq/services 27.1.3 → 29.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/LICENSE +202 -661
- package/NOTICE +16 -0
- package/README.md +67 -2
- package/android/src/main/java/so/oxy/devicesession/OxyDeviceSessionModule.kt +178 -0
- package/android/src/main/java/so/oxy/devicesession/OxyDeviceSessionProvider.kt +99 -0
- package/android/src/main/java/so/oxy/devicesession/OxyDeviceSessionStore.kt +115 -0
- package/expo-module.config.json +1 -0
- package/lib/commonjs/index.js +78 -16
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +7 -0
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/client.js +12 -7
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +10 -27
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +132 -44
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +4 -2
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/SurfaceScreen.js +31 -3
- package/lib/commonjs/ui/components/SurfaceScreen.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +209 -84
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js +25 -7
- package/lib/commonjs/ui/components/authChooser/SignInEntryView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/primitives.js +35 -22
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/signInProgress.js +5 -0
- package/lib/commonjs/ui/components/authChooser/signInProgress.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.js +11 -0
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +257 -306
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +27 -37
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/context/oxyContextHelpers.js +0 -29
- package/lib/commonjs/ui/context/oxyContextHelpers.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +6 -17
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/accountDialogSnapshot.js +42 -0
- package/lib/commonjs/ui/hooks/accountDialogSnapshot.js.map +1 -0
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +0 -19
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceSwitcher.js +57 -0
- package/lib/commonjs/ui/hooks/useDeviceSwitcher.js.map +1 -0
- package/lib/commonjs/ui/hooks/useI18n.js +22 -3
- package/lib/commonjs/ui/hooks/useI18n.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +46 -153
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/index.js +12 -7
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +85 -73
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaces.js +8 -7
- package/lib/commonjs/ui/navigation/surfaces.js.map +1 -1
- package/lib/commonjs/ui/runtime/createOxyRuntime.js +433 -0
- package/lib/commonjs/ui/runtime/createOxyRuntime.js.map +1 -0
- package/lib/commonjs/ui/runtime/index.js +63 -0
- package/lib/commonjs/ui/runtime/index.js.map +1 -0
- package/lib/commonjs/ui/runtime/runtimeContext.js +83 -0
- package/lib/commonjs/ui/runtime/runtimeContext.js.map +1 -0
- package/lib/commonjs/ui/runtime/types.js +6 -0
- package/lib/commonjs/ui/runtime/types.js.map +1 -0
- package/lib/commonjs/ui/runtime/useRuntimeSnapshot.js +57 -0
- package/lib/commonjs/ui/runtime/useRuntimeSnapshot.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +3 -4
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +3 -12
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +6 -5
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +4 -4
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +4 -2
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/server.js +1 -2
- package/lib/commonjs/ui/server.js.map +1 -1
- package/lib/commonjs/ui/session/authStore.js +45 -9
- package/lib/commonjs/ui/session/authStore.js.map +1 -1
- package/lib/commonjs/ui/session/sharedDeviceCredentialStore.js +306 -0
- package/lib/commonjs/ui/session/sharedDeviceCredentialStore.js.map +1 -0
- package/lib/commonjs/ui/stores/authStore.js +154 -55
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/stores/followTargetStore.js +27 -0
- package/lib/commonjs/ui/stores/followTargetStore.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +2 -36
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/index.js +20 -9
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/boot/runProviderColdBoot.js +7 -0
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/client.js +1 -2
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +10 -27
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +134 -44
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +5 -3
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/SurfaceScreen.js +33 -5
- package/lib/module/ui/components/SurfaceScreen.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +210 -85
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/SignInEntryView.js +25 -7
- package/lib/module/ui/components/authChooser/SignInEntryView.js.map +1 -1
- package/lib/module/ui/components/authChooser/primitives.js +35 -22
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/module/ui/components/authChooser/signInProgress.js +5 -0
- package/lib/module/ui/components/authChooser/signInProgress.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.js +11 -0
- package/lib/module/ui/components/authChooser/types.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +251 -303
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +27 -37
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/context/oxyContextHelpers.js +0 -28
- package/lib/module/ui/context/oxyContextHelpers.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +6 -17
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/accountDialogSnapshot.js +38 -0
- package/lib/module/ui/hooks/accountDialogSnapshot.js.map +1 -0
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +0 -19
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceSwitcher.js +53 -0
- package/lib/module/ui/hooks/useDeviceSwitcher.js.map +1 -0
- package/lib/module/ui/hooks/useI18n.js +24 -4
- package/lib/module/ui/hooks/useI18n.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +47 -155
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/index.js +1 -2
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +84 -72
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/navigation/surfaces.js +6 -6
- package/lib/module/ui/navigation/surfaces.js.map +1 -1
- package/lib/module/ui/runtime/createOxyRuntime.js +430 -0
- package/lib/module/ui/runtime/createOxyRuntime.js.map +1 -0
- package/lib/module/ui/runtime/index.js +15 -0
- package/lib/module/ui/runtime/index.js.map +1 -0
- package/lib/module/ui/runtime/runtimeContext.js +75 -0
- package/lib/module/ui/runtime/runtimeContext.js.map +1 -0
- package/lib/module/ui/runtime/types.js +4 -0
- package/lib/module/ui/runtime/types.js.map +1 -0
- package/lib/module/ui/runtime/useRuntimeSnapshot.js +52 -0
- package/lib/module/ui/runtime/useRuntimeSnapshot.js.map +1 -0
- package/lib/module/ui/screens/AccountMembersScreen.js +4 -5
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +4 -13
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +6 -5
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +5 -5
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +4 -2
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/server.js +0 -1
- package/lib/module/ui/server.js.map +1 -1
- package/lib/module/ui/session/authStore.js +46 -11
- package/lib/module/ui/session/authStore.js.map +1 -1
- package/lib/module/ui/session/sharedDeviceCredentialStore.js +302 -0
- package/lib/module/ui/session/sharedDeviceCredentialStore.js.map +1 -0
- package/lib/module/ui/stores/authStore.js +154 -55
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/stores/followTargetStore.js +25 -0
- package/lib/module/ui/stores/followTargetStore.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +2 -35
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +6 -4
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +1 -2
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SurfaceScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts +11 -4
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts +3 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +18 -6
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +33 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +35 -4
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +8 -12
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextHelpers.d.ts +0 -2
- package/lib/typescript/commonjs/ui/context/oxyContextHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +9 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +1 -3
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts +15 -0
- package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts +49 -0
- package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useI18n.d.ts +13 -0
- package/lib/typescript/commonjs/ui/hooks/useI18n.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts +23 -18
- package/lib/typescript/commonjs/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +1 -2
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +15 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaces.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/runtime/createOxyRuntime.d.ts +144 -0
- package/lib/typescript/commonjs/ui/runtime/createOxyRuntime.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/runtime/index.d.ts +16 -0
- package/lib/typescript/commonjs/ui/runtime/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/runtime/runtimeContext.d.ts +43 -0
- package/lib/typescript/commonjs/ui/runtime/runtimeContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/runtime/types.d.ts +89 -0
- package/lib/typescript/commonjs/ui/runtime/types.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/runtime/useRuntimeSnapshot.d.ts +23 -0
- package/lib/typescript/commonjs/ui/runtime/useRuntimeSnapshot.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/server.d.ts +0 -1
- package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/authStore.d.ts +60 -9
- package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/sharedDeviceCredentialStore.d.ts +32 -0
- package/lib/typescript/commonjs/ui/session/sharedDeviceCredentialStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/stores/authStore.d.ts +49 -5
- package/lib/typescript/commonjs/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/followTargetStore.d.ts +8 -1
- package/lib/typescript/commonjs/ui/stores/followTargetStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +26 -0
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts +2 -10
- package/lib/typescript/commonjs/ui/utils/avatarUtils.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +6 -4
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +1 -2
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SurfaceScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts +11 -4
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts +3 -1
- package/lib/typescript/module/ui/components/authChooser/SignInEntryView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +18 -6
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +33 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +35 -4
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +8 -12
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextHelpers.d.ts +0 -2
- package/lib/typescript/module/ui/context/oxyContextHelpers.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +9 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +1 -3
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts +15 -0
- package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts +49 -0
- package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useI18n.d.ts +13 -0
- package/lib/typescript/module/ui/hooks/useI18n.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +23 -18
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +1 -2
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +15 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaces.d.ts.map +1 -1
- package/lib/typescript/module/ui/runtime/createOxyRuntime.d.ts +144 -0
- package/lib/typescript/module/ui/runtime/createOxyRuntime.d.ts.map +1 -0
- package/lib/typescript/module/ui/runtime/index.d.ts +16 -0
- package/lib/typescript/module/ui/runtime/index.d.ts.map +1 -0
- package/lib/typescript/module/ui/runtime/runtimeContext.d.ts +43 -0
- package/lib/typescript/module/ui/runtime/runtimeContext.d.ts.map +1 -0
- package/lib/typescript/module/ui/runtime/types.d.ts +89 -0
- package/lib/typescript/module/ui/runtime/types.d.ts.map +1 -0
- package/lib/typescript/module/ui/runtime/useRuntimeSnapshot.d.ts +23 -0
- package/lib/typescript/module/ui/runtime/useRuntimeSnapshot.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +0 -1
- package/lib/typescript/module/ui/server.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/authStore.d.ts +60 -9
- package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/sharedDeviceCredentialStore.d.ts +32 -0
- package/lib/typescript/module/ui/session/sharedDeviceCredentialStore.d.ts.map +1 -0
- package/lib/typescript/module/ui/stores/authStore.d.ts +49 -5
- package/lib/typescript/module/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/followTargetStore.d.ts +8 -1
- package/lib/typescript/module/ui/stores/followTargetStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +26 -0
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/avatarUtils.d.ts +2 -10
- package/lib/typescript/module/ui/utils/avatarUtils.d.ts.map +1 -1
- package/package.json +8 -8
- package/plugins/withSharedDeviceSessionProvider.js +102 -0
- package/plugins/withSharedDeviceSessionReader.js +57 -0
- package/src/__tests__/esmSourcePurity.test.ts +61 -0
- package/src/index.ts +36 -9
- package/src/ui/boot/runProviderColdBoot.ts +7 -0
- package/src/ui/client.ts +1 -2
- package/src/ui/components/OxyAccountDialogScreen.tsx +10 -29
- package/src/ui/components/OxyAuthChooser.tsx +149 -50
- package/src/ui/components/OxyProvider.tsx +7 -5
- package/src/ui/components/SurfaceScreen.tsx +28 -4
- package/src/ui/components/__tests__/followTargetButton.test.ts +39 -0
- package/src/ui/components/authChooser/AccountsMenuView.tsx +246 -96
- package/src/ui/components/authChooser/SignInEntryView.tsx +31 -8
- package/src/ui/components/authChooser/primitives.tsx +37 -23
- package/src/ui/components/authChooser/signInProgress.ts +4 -0
- package/src/ui/components/authChooser/types.ts +34 -1
- package/src/ui/context/OxyContext.tsx +269 -324
- package/src/ui/context/hooks/useAuthOperations.ts +32 -35
- package/src/ui/context/oxyContextHelpers.ts +0 -30
- package/src/ui/context/oxyContextTypes.ts +9 -1
- package/src/ui/context/useOxyAccountGraph.ts +5 -19
- package/src/ui/hooks/accountDialogSnapshot.ts +37 -0
- package/src/ui/hooks/mutations/useAccountMutations.ts +0 -19
- package/src/ui/hooks/queries/__tests__/userCache.test.ts +12 -1
- package/src/ui/hooks/useDeviceSwitcher.ts +110 -0
- package/src/ui/hooks/useI18n.ts +23 -3
- package/src/ui/hooks/useSessionManagement.ts +62 -211
- package/src/ui/index.ts +1 -2
- package/src/ui/navigation/routes.ts +85 -75
- package/src/ui/navigation/surfaces.ts +6 -9
- package/src/ui/runtime/createOxyRuntime.ts +623 -0
- package/src/ui/runtime/index.ts +34 -0
- package/src/ui/runtime/runtimeContext.tsx +111 -0
- package/src/ui/runtime/types.ts +110 -0
- package/src/ui/runtime/useRuntimeSnapshot.ts +52 -0
- package/src/ui/screens/AccountMembersScreen.tsx +6 -5
- package/src/ui/screens/CreateAccountScreen.tsx +3 -16
- package/src/ui/screens/trust/TrustCenterScreen.tsx +7 -7
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +4 -5
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustRulesScreen.tsx +3 -2
- package/src/ui/server.ts +0 -1
- package/src/ui/session/__tests__/authStore.test.ts +90 -0
- package/src/ui/session/__tests__/sharedDeviceCredentialStore.test.ts +289 -0
- package/src/ui/session/authStore.ts +78 -9
- package/src/ui/session/sharedDeviceCredentialStore.ts +318 -0
- package/src/ui/stores/authStore.ts +171 -43
- package/src/ui/stores/followTargetStore.ts +24 -1
- package/src/ui/types/navigation.ts +26 -0
- package/src/ui/utils/avatarUtils.ts +2 -37
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js +0 -64
- package/lib/commonjs/ui/hooks/useSwitchableAccounts.js.map +0 -1
- package/lib/commonjs/ui/screens/trust/trustTier.js +0 -23
- package/lib/commonjs/ui/screens/trust/trustTier.js.map +0 -1
- package/lib/commonjs/ui/stores/accountStore.js +0 -221
- package/lib/commonjs/ui/stores/accountStore.js.map +0 -1
- package/lib/module/ui/hooks/useSwitchableAccounts.js +0 -60
- package/lib/module/ui/hooks/useSwitchableAccounts.js.map +0 -1
- package/lib/module/ui/screens/trust/trustTier.js +0 -19
- package/lib/module/ui/screens/trust/trustTier.js.map +0 -1
- package/lib/module/ui/stores/accountStore.js +0 -213
- package/lib/module/ui/stores/accountStore.js.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts +0 -23
- package/lib/typescript/commonjs/ui/hooks/useSwitchableAccounts.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts +0 -9
- package/lib/typescript/commonjs/ui/screens/trust/trustTier.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/stores/accountStore.d.ts +0 -27
- package/lib/typescript/commonjs/ui/stores/accountStore.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts +0 -23
- package/lib/typescript/module/ui/hooks/useSwitchableAccounts.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/trust/trustTier.d.ts +0 -9
- package/lib/typescript/module/ui/screens/trust/trustTier.d.ts.map +0 -1
- package/lib/typescript/module/ui/stores/accountStore.d.ts +0 -27
- package/lib/typescript/module/ui/stores/accountStore.d.ts.map +0 -1
- package/src/ui/hooks/useSwitchableAccounts.ts +0 -75
- package/src/ui/screens/trust/trustTier.ts +0 -20
- package/src/ui/stores/accountStore.ts +0 -264
package/lib/commonjs/index.js
CHANGED
|
@@ -129,6 +129,18 @@ Object.defineProperty(exports, "OxyProvider", {
|
|
|
129
129
|
return _OxyProvider.default;
|
|
130
130
|
}
|
|
131
131
|
});
|
|
132
|
+
Object.defineProperty(exports, "OxyProviderMissingError", {
|
|
133
|
+
enumerable: true,
|
|
134
|
+
get: function () {
|
|
135
|
+
return _OxyContext.OxyProviderMissingError;
|
|
136
|
+
}
|
|
137
|
+
});
|
|
138
|
+
Object.defineProperty(exports, "OxyRuntimeMissingError", {
|
|
139
|
+
enumerable: true,
|
|
140
|
+
get: function () {
|
|
141
|
+
return _index.OxyRuntimeMissingError;
|
|
142
|
+
}
|
|
143
|
+
});
|
|
132
144
|
Object.defineProperty(exports, "OxySignInButton", {
|
|
133
145
|
enumerable: true,
|
|
134
146
|
get: function () {
|
|
@@ -225,6 +237,18 @@ Object.defineProperty(exports, "extractErrorMessage", {
|
|
|
225
237
|
return _errorHandlers.extractErrorMessage;
|
|
226
238
|
}
|
|
227
239
|
});
|
|
240
|
+
Object.defineProperty(exports, "followRecordToStatus", {
|
|
241
|
+
enumerable: true,
|
|
242
|
+
get: function () {
|
|
243
|
+
return _followTargetStore.followRecordToStatus;
|
|
244
|
+
}
|
|
245
|
+
});
|
|
246
|
+
Object.defineProperty(exports, "followRecordsToStatusMap", {
|
|
247
|
+
enumerable: true,
|
|
248
|
+
get: function () {
|
|
249
|
+
return _followTargetStore.followRecordsToStatusMap;
|
|
250
|
+
}
|
|
251
|
+
});
|
|
228
252
|
Object.defineProperty(exports, "handleAuthError", {
|
|
229
253
|
enumerable: true,
|
|
230
254
|
get: function () {
|
|
@@ -291,6 +315,12 @@ Object.defineProperty(exports, "invalidateUserQueries", {
|
|
|
291
315
|
return _queryKeys.invalidateUserQueries;
|
|
292
316
|
}
|
|
293
317
|
});
|
|
318
|
+
Object.defineProperty(exports, "isCompleteFollowStatus", {
|
|
319
|
+
enumerable: true,
|
|
320
|
+
get: function () {
|
|
321
|
+
return _followTargetStore.isCompleteFollowStatus;
|
|
322
|
+
}
|
|
323
|
+
});
|
|
294
324
|
Object.defineProperty(exports, "isFollowedGlobally", {
|
|
295
325
|
enumerable: true,
|
|
296
326
|
get: function () {
|
|
@@ -375,10 +405,10 @@ Object.defineProperty(exports, "useAccountStorageUsage", {
|
|
|
375
405
|
return _useServicesQueries.useAccountStorageUsage;
|
|
376
406
|
}
|
|
377
407
|
});
|
|
378
|
-
Object.defineProperty(exports, "
|
|
408
|
+
Object.defineProperty(exports, "useActiveAccount", {
|
|
379
409
|
enumerable: true,
|
|
380
410
|
get: function () {
|
|
381
|
-
return
|
|
411
|
+
return _index.useActiveAccount;
|
|
382
412
|
}
|
|
383
413
|
});
|
|
384
414
|
Object.defineProperty(exports, "useAsset", {
|
|
@@ -465,12 +495,24 @@ Object.defineProperty(exports, "useCurrentUser", {
|
|
|
465
495
|
return _useAccountQueries.useCurrentUser;
|
|
466
496
|
}
|
|
467
497
|
});
|
|
498
|
+
Object.defineProperty(exports, "useDeviceDirectory", {
|
|
499
|
+
enumerable: true,
|
|
500
|
+
get: function () {
|
|
501
|
+
return _index.useDeviceDirectory;
|
|
502
|
+
}
|
|
503
|
+
});
|
|
468
504
|
Object.defineProperty(exports, "useDeviceSessions", {
|
|
469
505
|
enumerable: true,
|
|
470
506
|
get: function () {
|
|
471
507
|
return _useServicesQueries.useDeviceSessions;
|
|
472
508
|
}
|
|
473
509
|
});
|
|
510
|
+
Object.defineProperty(exports, "useDeviceSwitcher", {
|
|
511
|
+
enumerable: true,
|
|
512
|
+
get: function () {
|
|
513
|
+
return _useDeviceSwitcher.useDeviceSwitcher;
|
|
514
|
+
}
|
|
515
|
+
});
|
|
474
516
|
Object.defineProperty(exports, "useFileDownloadUrl", {
|
|
475
517
|
enumerable: true,
|
|
476
518
|
get: function () {
|
|
@@ -543,6 +585,12 @@ Object.defineProperty(exports, "useOnlineStatus", {
|
|
|
543
585
|
return _useOnlineStatus.useOnlineStatus;
|
|
544
586
|
}
|
|
545
587
|
});
|
|
588
|
+
Object.defineProperty(exports, "useOptionalOxy", {
|
|
589
|
+
enumerable: true,
|
|
590
|
+
get: function () {
|
|
591
|
+
return _OxyContext.useOptionalOxy;
|
|
592
|
+
}
|
|
593
|
+
});
|
|
546
594
|
Object.defineProperty(exports, "useOxy", {
|
|
547
595
|
enumerable: true,
|
|
548
596
|
get: function () {
|
|
@@ -555,6 +603,18 @@ Object.defineProperty(exports, "useOxyEvent", {
|
|
|
555
603
|
return _useOxyEvent.useOxyEvent;
|
|
556
604
|
}
|
|
557
605
|
});
|
|
606
|
+
Object.defineProperty(exports, "useOxyRuntime", {
|
|
607
|
+
enumerable: true,
|
|
608
|
+
get: function () {
|
|
609
|
+
return _index.useOxyRuntime;
|
|
610
|
+
}
|
|
611
|
+
});
|
|
612
|
+
Object.defineProperty(exports, "useOxySnapshot", {
|
|
613
|
+
enumerable: true,
|
|
614
|
+
get: function () {
|
|
615
|
+
return _index.useOxySnapshot;
|
|
616
|
+
}
|
|
617
|
+
});
|
|
558
618
|
Object.defineProperty(exports, "usePrivacySettings", {
|
|
559
619
|
enumerable: true,
|
|
560
620
|
get: function () {
|
|
@@ -627,12 +687,6 @@ Object.defineProperty(exports, "useSwitchSession", {
|
|
|
627
687
|
return _useServicesMutations.useSwitchSession;
|
|
628
688
|
}
|
|
629
689
|
});
|
|
630
|
-
Object.defineProperty(exports, "useSwitchableAccounts", {
|
|
631
|
-
enumerable: true,
|
|
632
|
-
get: function () {
|
|
633
|
-
return _useSwitchableAccounts.useSwitchableAccounts;
|
|
634
|
-
}
|
|
635
|
-
});
|
|
636
690
|
Object.defineProperty(exports, "useUpdateAccountSettings", {
|
|
637
691
|
enumerable: true,
|
|
638
692
|
get: function () {
|
|
@@ -757,10 +811,10 @@ var _core = require("@oxyhq/core");
|
|
|
757
811
|
var _reactNative = require("react-native");
|
|
758
812
|
var _OxyProvider = _interopRequireDefault(require("./ui/components/OxyProvider.js"));
|
|
759
813
|
var _OxyContext = require("./ui/context/OxyContext.js");
|
|
814
|
+
var _index = require("./ui/runtime/index.js");
|
|
760
815
|
var _useAuth = require("./ui/hooks/useAuth.js");
|
|
761
816
|
var _identityBinding = require("./ui/session/identityBinding.js");
|
|
762
817
|
var _authStore = require("./ui/stores/authStore.js");
|
|
763
|
-
var _accountStore = require("./ui/stores/accountStore.js");
|
|
764
818
|
var _assetStore = require("./ui/stores/assetStore.js");
|
|
765
819
|
var _useAssets = require("./ui/hooks/useAssets.js");
|
|
766
820
|
var _useFileDownloadUrl = require("./ui/hooks/useFileDownloadUrl.js");
|
|
@@ -798,7 +852,7 @@ var _LogoText = require("./ui/components/logo/LogoText.js");
|
|
|
798
852
|
var _ProfileButton = _interopRequireDefault(require("./ui/components/ProfileButton.js"));
|
|
799
853
|
var _OxyAuthChooser = _interopRequireDefault(require("./ui/components/OxyAuthChooser.js"));
|
|
800
854
|
var _OxySignInRequestSurface = require("./ui/components/OxySignInRequestSurface.js");
|
|
801
|
-
var
|
|
855
|
+
var _useDeviceSwitcher = require("./ui/hooks/useDeviceSwitcher.js");
|
|
802
856
|
var _ProfileScreen = _interopRequireDefault(require("./ui/screens/ProfileScreen.js"));
|
|
803
857
|
var _ManageAccountScreen = _interopRequireDefault(require("./ui/screens/ManageAccountScreen.js"));
|
|
804
858
|
var _NotificationsScreen = _interopRequireDefault(require("./ui/screens/NotificationsScreen.js"));
|
|
@@ -844,6 +898,14 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
844
898
|
// Provider + auth context
|
|
845
899
|
// ---------------------------------------------------------------------------
|
|
846
900
|
|
|
901
|
+
// `useOxy()` THROWS when no provider is mounted. `useOptionalOxy()` returns
|
|
902
|
+
// `null` instead, for the rare component that renders on both sides of the
|
|
903
|
+
// provider boundary; there is no fabricated forever-loading runtime.
|
|
904
|
+
|
|
905
|
+
// The runtime surface (ADR 0004). These subscribe to the ONE runtime with a
|
|
906
|
+
// selector, so — unlike `useOxy()`, whose value is rebuilt by any of its fifty
|
|
907
|
+
// members moving — a locale change or a dialog opening does not re-render them.
|
|
908
|
+
|
|
847
909
|
// Thrown by `switchToAccount` / `switchSession` while `OxyProvider` runs with
|
|
848
910
|
// `sessionMode="identity"` — an identity-bound app authenticates as the owner of
|
|
849
911
|
// the local identity key and cannot switch accounts.
|
|
@@ -950,12 +1012,12 @@ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e
|
|
|
950
1012
|
// no controller: `route` + `progress` + `qrPayload` + the failure flags are the
|
|
951
1013
|
// whole contract, and none of them is a secret credential.
|
|
952
1014
|
|
|
953
|
-
//
|
|
954
|
-
//
|
|
955
|
-
//
|
|
956
|
-
//
|
|
957
|
-
//
|
|
958
|
-
//
|
|
1015
|
+
// The device switcher — the server's own directory (ADR 0002) of who is signed
|
|
1016
|
+
// in here and what each of them may act as, grouped by PERSON, with the two
|
|
1017
|
+
// removals an account id cannot name. Backed by the shared
|
|
1018
|
+
// `AccountDialogController` in `@oxyhq/core`; selecting a row activates a
|
|
1019
|
+
// `contextId`. `DevicePrincipalGroup` and `DeviceContext` live in `@oxyhq/core`
|
|
1020
|
+
// — import them from there.
|
|
959
1021
|
|
|
960
1022
|
// Unified "Manage your Oxy Account" screen (the caller's own personal account)
|
|
961
1023
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_reactNative","_OxyProvider","_interopRequireDefault","_OxyContext","_useAuth","_identityBinding","_authStore","
|
|
1
|
+
{"version":3,"names":["_core","require","_reactNative","_OxyProvider","_interopRequireDefault","_OxyContext","_index","_useAuth","_identityBinding","_authStore","_assetStore","_useAssets","_useFileDownloadUrl","_useFollow","_useStorage","_useAccountQueries","_useServicesQueries","_useSecurityQueries","_useAuthMethods","_usePaymentQueries","_useAccountMutations","_useServicesMutations","_mutationFactory","_mutationKeys","_queryKeys","_userCache","_useMutationStatus","_useOnlineStatus","_useOxyEvent","_errorHandlers","_useFileFiltering","_OxySignInButton","_oauthPopup","_OxyAuthPrompt","_OxyOAuthCallback","_OxyConsentScreen","_RequireOxyAuth","_FollowButton","_FollowTargetButton","_useFollowTarget","_followTargetStore","_OxyPayButton","_LogoIcon","_LogoText","_ProfileButton","_OxyAuthChooser","_OxySignInRequestSurface","_useDeviceSwitcher","_ProfileScreen","_ManageAccountScreen","_NotificationsScreen","_PreferencesScreen","_ConnectedAppsScreen","_CreateAccountScreen","_AccountMembersScreen","_AccountSettingsScreen","_bottomSheetManager","_useSurfaceHeader","_SurfaceHeaderAction","_accountDialogManager","e","__esModule","default","setPlatformOS","Platform","OS"],"sourceRoot":"../../src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;AACA;AACA;AACA;;AAcA;;AAMA;AACA;AACA;;AASA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAQA;AACA;AACA;AACA;;AAsBA;AACA;AACA;AACA;AACA;;AAMA;;AAsCA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;;AAIA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAKA;AACA;AACA;AACA;AACA;AACA;;AAIA;;AAOA;;AAKA;AACA;AACA;;AAIA;AACA;AACA;;AAIA;AACA;AACA;AACA","ignoreList":[]}
|
|
@@ -7,6 +7,7 @@ exports.SESSION_HANDOFF_DEADLINE_MS = exports.COLD_BOOT_OVERALL_DEADLINE_MS = vo
|
|
|
7
7
|
exports.runProviderColdBoot = runProviderColdBoot;
|
|
8
8
|
var _core = require("@oxyhq/core");
|
|
9
9
|
var _deviceCredential = require("../utils/deviceCredential.js");
|
|
10
|
+
var _sharedDeviceCredentialStore = require("../session/sharedDeviceCredentialStore.js");
|
|
10
11
|
var _oauthReturn = require("../utils/oauthReturn.js");
|
|
11
12
|
var _isWebBrowser = require("../utils/isWebBrowser.js");
|
|
12
13
|
var _netConnectivity = require("../utils/netConnectivity.js");
|
|
@@ -132,6 +133,12 @@ async function runProviderColdBoot(opts) {
|
|
|
132
133
|
},
|
|
133
134
|
sessionMode,
|
|
134
135
|
identity,
|
|
136
|
+
// The device-wide shared credential slot, enabling the `shared-device-adopt`
|
|
137
|
+
// lane: a newly installed official app joins this device's existing session
|
|
138
|
+
// instead of falling back to signing a challenge with the Commons identity
|
|
139
|
+
// key. `null` on web, where each origin is its own device by design; the
|
|
140
|
+
// core lane is also skipped outright in `sessionMode: 'identity'`.
|
|
141
|
+
sharedDeviceCredential: (0, _sharedDeviceCredentialStore.createPlatformSharedDeviceCredentialStore)() ?? undefined,
|
|
135
142
|
overallDeadlineMs: COLD_BOOT_OVERALL_DEADLINE_MS,
|
|
136
143
|
isOffline: () => offline,
|
|
137
144
|
onStepDeadline: stepId => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_core","require","_deviceCredential","_oauthReturn","_isWebBrowser","_netConnectivity","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SESSION_HANDOFF_DEADLINE_MS","exports","COLD_BOOT_OVERALL_DEADLINE_MS","OFFLINE_PROBE_TIMEOUT_MS","detectOfflineHint","isWebBrowser","online","globalThis","navigator","onLine","NetInfo","Promise","resolve","then","state","race","fetch","setTimeout","isNetConnectivityExplicitlyOffline","runProviderColdBoot","opts","oxyServices","authStore","clientId","authRedirectUri","sessionMode","identity","sessionClient","syncDeviceCredentialToHost","commitSession","markAuthResolved","setTokenReady","identityBound","oauthCompleted","tryCompleteOAuthReturn","input","activate","offline","runSessionColdBoot","oxy","store","platform","isWeb","isNative","overallDeadlineMs","isOffline","onStepDeadline","stepId","loggerUtil","warn","component","method","onSession","session","handoff","sessionId","accessToken","userId","handoffDeadlineId","finally","
|
|
1
|
+
{"version":3,"names":["_core","require","_deviceCredential","_sharedDeviceCredentialStore","_oauthReturn","_isWebBrowser","_netConnectivity","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","SESSION_HANDOFF_DEADLINE_MS","exports","COLD_BOOT_OVERALL_DEADLINE_MS","OFFLINE_PROBE_TIMEOUT_MS","detectOfflineHint","isWebBrowser","online","globalThis","navigator","onLine","NetInfo","Promise","resolve","then","state","race","fetch","setTimeout","isNetConnectivityExplicitlyOffline","runProviderColdBoot","opts","oxyServices","authStore","clientId","authRedirectUri","sessionMode","identity","sessionClient","syncDeviceCredentialToHost","commitSession","markAuthResolved","setTokenReady","identityBound","oauthCompleted","tryCompleteOAuthReturn","input","activate","offline","runSessionColdBoot","oxy","store","platform","isWeb","isNative","sharedDeviceCredential","createPlatformSharedDeviceCredentialStore","undefined","overallDeadlineMs","isOffline","onStepDeadline","stepId","loggerUtil","warn","component","method","onSession","session","handoff","sessionId","accessToken","userId","handoffDeadlineId","finally","clearTimeout","onSignedOut","cred","loadPersistedDeviceCredential","start","socketError","__DEV__","debug","onStepError","id","error","Error","String"],"sourceRoot":"../../../../src","sources":["ui/boot/runProviderColdBoot.ts"],"mappings":";;;;;;;AAAA,IAAAA,KAAA,GAAAC,OAAA;AASA,IAAAC,iBAAA,GAAAD,OAAA;AACA,IAAAE,4BAAA,GAAAF,OAAA;AACA,IAAAG,YAAA,GAAAH,OAAA;AACA,IAAAI,aAAA,GAAAJ,OAAA;AACA,IAAAK,gBAAA,GAAAL,OAAA;AAA8E,SAAAM,wBAAAC,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAH,uBAAA,YAAAA,CAAAC,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CA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CAAC,CAAC;MACpB,CAAC;MACDyC,WAAW,EAAEA,CAACC,EAAE,EAAEC,KAAK,KAAK;QAC1B,IAAIJ,OAAO,EAAE;UACXlB,YAAU,CAACmB,KAAK,CACd,mBAAmBE,EAAE,wCAAwC,EAC7D;YAAEnB,SAAS,EAAE;UAAsB,CAAC,EACpCoB,KACF,CAAC;QACH;MACF;IACF,CAAC,CAAC;EACJ,CAAC,CAAC,OAAOA,KAAK,EAAE;IACd,IAAIJ,OAAO,EAAE;MACXlB,YAAU,CAACsB,KAAK,CACd,iBAAiB,EACjBA,KAAK,YAAYC,KAAK,GAAGD,KAAK,GAAG,IAAIC,KAAK,CAACC,MAAM,CAACF,KAAK,CAAC,CAAC,EACzD;QAAEpB,SAAS,EAAE;MAAsB,CACrC,CAAC;IACH;EACF,CAAC,SAAS;IACRvB,gBAAgB,CAAC,CAAC;EACpB;AACF","ignoreList":[]}
|
|
@@ -45,6 +45,12 @@ Object.defineProperty(exports, "OxyProvider", {
|
|
|
45
45
|
return _OxyProvider.default;
|
|
46
46
|
}
|
|
47
47
|
});
|
|
48
|
+
Object.defineProperty(exports, "OxyProviderMissingError", {
|
|
49
|
+
enumerable: true,
|
|
50
|
+
get: function () {
|
|
51
|
+
return _OxyContext.OxyProviderMissingError;
|
|
52
|
+
}
|
|
53
|
+
});
|
|
48
54
|
Object.defineProperty(exports, "OxySignInButton", {
|
|
49
55
|
enumerable: true,
|
|
50
56
|
get: function () {
|
|
@@ -81,12 +87,6 @@ Object.defineProperty(exports, "isTimeoutOrNetworkError", {
|
|
|
81
87
|
return _errorHandlers.isTimeoutOrNetworkError;
|
|
82
88
|
}
|
|
83
89
|
});
|
|
84
|
-
Object.defineProperty(exports, "useAccountStore", {
|
|
85
|
-
enumerable: true,
|
|
86
|
-
get: function () {
|
|
87
|
-
return _accountStore.useAccountStore;
|
|
88
|
-
}
|
|
89
|
-
});
|
|
90
90
|
Object.defineProperty(exports, "useAuth", {
|
|
91
91
|
enumerable: true,
|
|
92
92
|
get: function () {
|
|
@@ -105,6 +105,12 @@ Object.defineProperty(exports, "useFollow", {
|
|
|
105
105
|
return _useFollow.useFollow;
|
|
106
106
|
}
|
|
107
107
|
});
|
|
108
|
+
Object.defineProperty(exports, "useOptionalOxy", {
|
|
109
|
+
enumerable: true,
|
|
110
|
+
get: function () {
|
|
111
|
+
return _OxyContext.useOptionalOxy;
|
|
112
|
+
}
|
|
113
|
+
});
|
|
108
114
|
Object.defineProperty(exports, "useOxy", {
|
|
109
115
|
enumerable: true,
|
|
110
116
|
get: function () {
|
|
@@ -131,7 +137,6 @@ var _useStorage = require("./hooks/useStorage.js");
|
|
|
131
137
|
var _ProfileScreen = _interopRequireDefault(require("./screens/ProfileScreen.js"));
|
|
132
138
|
var _ManageAccountScreen = _interopRequireDefault(require("./screens/ManageAccountScreen.js"));
|
|
133
139
|
var _authStore = require("./stores/authStore.js");
|
|
134
|
-
var _accountStore = require("./stores/accountStore.js");
|
|
135
140
|
var _errorHandlers = require("./utils/errorHandlers.js");
|
|
136
141
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
137
142
|
//# sourceMappingURL=client.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_OxyProvider","_interopRequireDefault","require","_OxySignInButton","_OxyAuthPrompt","_LogoIcon","_LogoText","_FollowButton","_OxyPayButton","_OxyContext","_useAuth","_useFollow","_useStorage","_ProfileScreen","_ManageAccountScreen","_authStore","
|
|
1
|
+
{"version":3,"names":["_OxyProvider","_interopRequireDefault","require","_OxySignInButton","_OxyAuthPrompt","_LogoIcon","_LogoText","_FollowButton","_OxyPayButton","_OxyContext","_useAuth","_useFollow","_useStorage","_ProfileScreen","_ManageAccountScreen","_authStore","_errorHandlers","e","__esModule","default"],"sourceRoot":"../../../src","sources":["ui/client.ts"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAWA,IAAAA,YAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,gBAAA,GAAAF,sBAAA,CAAAC,OAAA;AACA,IAAAE,cAAA,GAAAH,sBAAA,CAAAC,OAAA;AAEA,IAAAG,SAAA,GAAAH,OAAA;AACA,IAAAI,SAAA,GAAAJ,OAAA;AACA,IAAAK,aAAA,GAAAN,sBAAA,CAAAC,OAAA;AACA,IAAAM,aAAA,GAAAP,sBAAA,CAAAC,OAAA;AAGA,IAAAO,WAAA,GAAAP,OAAA;AAGA,IAAAQ,QAAA,GAAAR,OAAA;AAEA,IAAAS,UAAA,GAAAT,OAAA;AACA,IAAAU,WAAA,GAAAV,OAAA;AAIA,IAAAW,cAAA,GAAAZ,sBAAA,CAAAC,OAAA;AACA,IAAAY,oBAAA,GAAAb,sBAAA,CAAAC,OAAA;AAGA,IAAAa,UAAA,GAAAb,OAAA;AAGA,IAAAc,cAAA,GAAAd,OAAA;AAK+B,SAAAD,uBAAAgB,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA","ignoreList":[]}
|
|
@@ -11,6 +11,7 @@ var _useI18n = require("../hooks/useI18n.js");
|
|
|
11
11
|
var _useSurfaceHeader = require("../hooks/useSurfaceHeader.js");
|
|
12
12
|
var _LogoText = _interopRequireDefault(require("./logo/LogoText.js"));
|
|
13
13
|
var _OxyAuthChooser = _interopRequireDefault(require("./OxyAuthChooser.js"));
|
|
14
|
+
var _accountDialogSnapshot = require("../hooks/accountDialogSnapshot.js");
|
|
14
15
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
16
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
17
|
/**
|
|
@@ -72,14 +73,17 @@ const OxyAccountDialogScreen = ({
|
|
|
72
73
|
|
|
73
74
|
// A lightweight, header-only binding to the same controller `OxyAuthChooser`
|
|
74
75
|
// binds independently — cheap, and the established pattern here (
|
|
75
|
-
// `
|
|
76
|
+
// `useDeviceSwitcher` also binds to this controller on its own).
|
|
76
77
|
const subscribe = (0, _react.useCallback)(listener => controller ? controller.subscribe(listener) : () => undefined, [controller]);
|
|
77
|
-
const getSnapshot = (0, _react.useCallback)(() => controller ? controller.getSnapshot() :
|
|
78
|
+
const getSnapshot = (0, _react.useCallback)(() => controller ? controller.getSnapshot() : _accountDialogSnapshot.EMPTY_ACCOUNT_DIALOG_SNAPSHOT, [controller]);
|
|
78
79
|
const snapshot = (0, _react.useSyncExternalStore)(subscribe, getSnapshot, getSnapshot);
|
|
79
80
|
const {
|
|
80
81
|
view
|
|
81
82
|
} = snapshot;
|
|
82
|
-
|
|
83
|
+
// "Add another account" only makes sense as a back destination when there IS
|
|
84
|
+
// another — i.e. somebody is already signed in on this device.
|
|
85
|
+
const hasSignedInAccounts = (snapshot.directory?.principals.length ?? 0) > 0;
|
|
86
|
+
const showBack = view === 'qr' || view === 'signup' || view === 'add' && hasSignedInAccounts;
|
|
83
87
|
const goToAccounts = (0, _react.useCallback)(() => {
|
|
84
88
|
if (!controller) return;
|
|
85
89
|
const {
|
|
@@ -105,7 +109,7 @@ const OxyAccountDialogScreen = ({
|
|
|
105
109
|
// by the bar. Every OTHER view keeps the SHARED Dialog nav header the rest of
|
|
106
110
|
// the SDK uses — a large in-content title/subtitle that collapses into the bar
|
|
107
111
|
// on scroll — because their copy is informative.
|
|
108
|
-
const copy = view === 'accounts' ? null : headerCopy(view,
|
|
112
|
+
const copy = view === 'accounts' ? null : headerCopy(view, hasSignedInAccounts, t);
|
|
109
113
|
(0, _useSurfaceHeader.useSurfaceHeader)({
|
|
110
114
|
titleContent: copy ? undefined : NAV_LOGO,
|
|
111
115
|
title: copy?.title,
|
|
@@ -127,7 +131,7 @@ const OxyAccountDialogScreen = ({
|
|
|
127
131
|
// Copy + helpers
|
|
128
132
|
// ---------------------------------------------------------------------------
|
|
129
133
|
|
|
130
|
-
function headerCopy(view,
|
|
134
|
+
function headerCopy(view, hasSignedInAccounts, t) {
|
|
131
135
|
switch (view) {
|
|
132
136
|
// The ACTIVE REQUEST. Its header is deliberately route-AGNOSTIC: Oxy picks
|
|
133
137
|
// the delivery route (QR here, a push to the user's phone, or opening
|
|
@@ -146,7 +150,7 @@ function headerCopy(view, accountCount, t) {
|
|
|
146
150
|
subtitle: t('signup.subtitle') || 'One identity for the whole ecosystem.'
|
|
147
151
|
};
|
|
148
152
|
default:
|
|
149
|
-
return
|
|
153
|
+
return hasSignedInAccounts ? {
|
|
150
154
|
title: t('signin.addAccountTitle') || 'Add another account',
|
|
151
155
|
subtitle: t('signin.addAccountSubtitle') || 'Sign in with another account.'
|
|
152
156
|
} : {
|
|
@@ -155,27 +159,6 @@ function headerCopy(view, accountCount, t) {
|
|
|
155
159
|
};
|
|
156
160
|
}
|
|
157
161
|
}
|
|
158
|
-
const EMPTY_SNAPSHOT = {
|
|
159
|
-
view: 'accounts',
|
|
160
|
-
accounts: [],
|
|
161
|
-
activeAccountId: null,
|
|
162
|
-
loading: false,
|
|
163
|
-
error: null,
|
|
164
|
-
switchingAccountId: null,
|
|
165
|
-
signIn: {
|
|
166
|
-
phase: 'idle',
|
|
167
|
-
authorizeCode: null,
|
|
168
|
-
qrPayload: null,
|
|
169
|
-
expiresAt: null,
|
|
170
|
-
error: null,
|
|
171
|
-
route: null,
|
|
172
|
-
routeFailed: false,
|
|
173
|
-
pushSentAt: null,
|
|
174
|
-
openedAt: null,
|
|
175
|
-
progress: 'idle'
|
|
176
|
-
},
|
|
177
|
-
commonsAvailability: 'unknown'
|
|
178
|
-
};
|
|
179
162
|
|
|
180
163
|
/**
|
|
181
164
|
* The screen gutter. In the Dialog's nav-header mode the surface adds NO content
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_OxyContext","_useI18n","_useSurfaceHeader","_LogoText","_interopRequireDefault","_OxyAuthChooser","_jsxRuntime","e","__esModule","default","NAV_LOGO","jsx","height","OxyAccountDialogScreen","canGoBack","accountDialogController","controller","closeAccountDialog","useOxy","t","useI18n","subscribe","useCallback","listener","undefined","getSnapshot","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_OxyContext","_useI18n","_useSurfaceHeader","_LogoText","_interopRequireDefault","_OxyAuthChooser","_accountDialogSnapshot","_jsxRuntime","e","__esModule","default","NAV_LOGO","jsx","height","OxyAccountDialogScreen","canGoBack","accountDialogController","controller","closeAccountDialog","useOxy","t","useI18n","subscribe","useCallback","listener","undefined","getSnapshot","EMPTY_ACCOUNT_DIALOG_SNAPSHOT","snapshot","useSyncExternalStore","view","hasSignedInAccounts","directory","principals","length","showBack","goToAccounts","currentView","signIn","phase","cancelSignIn","setView","backsToHost","copy","headerCopy","useSurfaceHeader","titleContent","title","subtitle","onBack","View","style","styles","bodyContent","children","onComplete","SCREEN_MARGIN","StyleSheet","create","paddingTop","paddingBottom","paddingHorizontal","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/OxyAccountDialogScreen.tsx"],"mappings":";;;;;;AAwBA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AACA,IAAAI,iBAAA,GAAAJ,OAAA;AAEA,IAAAK,SAAA,GAAAC,sBAAA,CAAAN,OAAA;AACA,IAAAO,eAAA,GAAAD,sBAAA,CAAAN,OAAA;AACA,IAAAQ,sBAAA,GAAAR,OAAA;AAA+E,IAAAS,WAAA,GAAAT,OAAA;AAAA,SAAAM,uBAAAI,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAjC/E;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAgBA;AAC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