@oxy.so/services 6.2.0 → 8.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +80 -136
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/icons/manifest.json +5 -21
- package/lib/commonjs/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/commonjs/assets/fonts/icons/manifest.json +5 -21
- package/lib/commonjs/index.js +21 -15
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js +2 -1
- package/lib/commonjs/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js +2 -3
- package/lib/commonjs/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/commonjs/ui/components/OxyAuthChooser.js +15 -32
- package/lib/commonjs/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInRequestSurface.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js +2 -2
- package/lib/commonjs/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js +6 -17
- package/lib/commonjs/ui/components/authChooser/SignInRequestView.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/TroubleDisclosure.js +1 -1
- package/lib/commonjs/ui/components/authChooser/primitives.js +1 -102
- package/lib/commonjs/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/signInProgress.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/styles.js +0 -33
- package/lib/commonjs/ui/components/authChooser/styles.js.map +1 -1
- package/lib/commonjs/ui/components/authChooser/types.js +0 -8
- package/lib/commonjs/ui/components/authChooser/types.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/InlineCommonsQr.js +1 -1
- package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js +153 -58
- package/lib/commonjs/ui/components/signIn/OxyAccountPicker.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxyAuthenticatorPanel.js +325 -0
- package/lib/commonjs/ui/components/signIn/OxyAuthenticatorPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxyDeleteAccountPanel.js +52 -56
- package/lib/commonjs/ui/components/signIn/OxyDeleteAccountPanel.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js +48 -38
- package/lib/commonjs/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js +141 -0
- package/lib/commonjs/ui/components/signIn/OxyPasswordPanel.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js +496 -201
- package/lib/commonjs/ui/components/signIn/OxySignInPanel.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js +211 -42
- package/lib/commonjs/ui/components/signIn/OxySignUpPanel.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/ReauthStep.js +186 -0
- package/lib/commonjs/ui/components/signIn/ReauthStep.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/accountFlowParts.js +103 -26
- package/lib/commonjs/ui/components/signIn/accountFlowParts.js.map +1 -1
- package/lib/commonjs/ui/components/signIn/signInFlowStore.js +50 -0
- package/lib/commonjs/ui/components/signIn/signInFlowStore.js.map +1 -0
- package/lib/commonjs/ui/components/signIn/signInMethods.js +11 -25
- package/lib/commonjs/ui/components/signIn/signInMethods.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +125 -119
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +11 -10
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/context/useOxyAccountGraph.js +4 -4
- package/lib/commonjs/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +19 -9
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +4 -4
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +23 -3
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +8 -8
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAuthMethods.js +27 -15
- package/lib/commonjs/ui/hooks/queries/useAuthMethods.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useFileQueries.js +5 -2
- package/lib/commonjs/ui/hooks/queries/useFileQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +8 -8
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js +4 -3
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +6 -6
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAssets.js +36 -20
- package/lib/commonjs/ui/hooks/useAssets.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +6 -4
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceManagement.js +5 -5
- package/lib/commonjs/ui/hooks/useDeviceManagement.js.map +1 -1
- package/lib/commonjs/ui/hooks/useDeviceSwitcher.js +2 -2
- package/lib/commonjs/ui/hooks/useDeviceSwitcher.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js +1 -4
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +2 -2
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollowTarget.js +5 -5
- package/lib/commonjs/ui/hooks/useFollowTarget.js.map +1 -1
- package/lib/commonjs/ui/hooks/useI18n.js +4 -1
- package/lib/commonjs/ui/hooks/useI18n.js.map +1 -1
- package/lib/commonjs/ui/hooks/useResolvedFileUrls.js +2 -2
- package/lib/commonjs/ui/hooks/useResolvedFileUrls.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionManagement.js +3 -3
- package/lib/commonjs/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js +0 -16
- package/lib/commonjs/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +6 -4
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/navigation/surfaceRegistry.js +1 -1
- package/lib/commonjs/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/commonjs/ui/oauth/browserBridge.js +247 -0
- package/lib/commonjs/ui/oauth/browserBridge.js.map +1 -0
- package/lib/commonjs/ui/oauth/completeOAuthCode.js +1 -1
- package/lib/commonjs/ui/oauth/completeOAuthCode.js.map +1 -1
- package/lib/commonjs/ui/oauth/explicitOAuthConsent.js +1 -1
- package/lib/commonjs/ui/oauth/explicitOAuthConsent.js.map +1 -1
- package/lib/commonjs/ui/runtime/createOxyRuntime.js +9 -8
- package/lib/commonjs/ui/runtime/createOxyRuntime.js.map +1 -1
- package/lib/commonjs/ui/runtime/runtimeContext.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountMembersScreen.js +7 -7
- package/lib/commonjs/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSecurityPanelScreen.js +35 -0
- package/lib/commonjs/ui/screens/AccountSecurityPanelScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +3 -3
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +5 -5
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +3 -3
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js +1 -1
- package/lib/commonjs/ui/screens/ChangeAvatarScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +1 -1
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/DeleteAccountScreen.js +19 -0
- package/lib/commonjs/ui/screens/DeleteAccountScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/DomainsScreen.js +217 -0
- package/lib/commonjs/ui/screens/DomainsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/EditProfileScreen.js +1 -1
- package/lib/commonjs/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +25 -11
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +1 -17
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LinkCommonsScreen.js +14 -0
- package/lib/commonjs/ui/screens/LinkCommonsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +57 -61
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +52 -62
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +5 -13
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +15 -24
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInAuthenticatorScreen.js +14 -0
- package/lib/commonjs/ui/screens/SignInAuthenticatorScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SignInPasswordScreen.js +20 -0
- package/lib/commonjs/ui/screens/SignInPasswordScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/UserListScreen.js +3 -3
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +25 -17
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js +2 -2
- package/lib/commonjs/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +8 -14
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js +11 -9
- package/lib/commonjs/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/session/authStore.js +4 -4
- package/lib/commonjs/ui/session/authStore.js.map +1 -1
- package/lib/commonjs/ui/session/backgroundSession.js +5 -40
- package/lib/commonjs/ui/session/backgroundSession.js.map +1 -1
- package/lib/commonjs/ui/session/createSessionClient.js +3 -3
- package/lib/commonjs/ui/session/createSessionClient.js.map +1 -1
- package/lib/commonjs/ui/session/deviceCredentialTracker.js +42 -0
- package/lib/commonjs/ui/session/deviceCredentialTracker.js.map +1 -0
- package/lib/commonjs/ui/session/identityBinding.js +3 -3
- package/lib/commonjs/ui/session/identityBinding.js.map +1 -1
- package/lib/commonjs/ui/session/index.js +6 -6
- package/lib/commonjs/ui/session/index.js.map +1 -1
- package/lib/commonjs/ui/session/sharedDeviceCredentialStore.js +2 -2
- package/lib/commonjs/ui/session/sharedDeviceCredentialStore.js.map +1 -1
- package/lib/commonjs/ui/session/tokenTransport.js +3 -3
- package/lib/commonjs/ui/session/tokenTransport.js.map +1 -1
- package/lib/commonjs/ui/stores/assetStore.js +12 -0
- package/lib/commonjs/ui/stores/assetStore.js.map +1 -1
- package/lib/commonjs/ui/stores/followStore.js +6 -6
- package/lib/commonjs/ui/stores/followStore.js.map +1 -1
- package/lib/commonjs/ui/utils/accountDeletionHandoff.js +1 -4
- package/lib/commonjs/ui/utils/accountDeletionHandoff.js.map +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js +1 -1
- package/lib/commonjs/ui/utils/avatarUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/deviceCredential.js +11 -4
- package/lib/commonjs/ui/utils/deviceCredential.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +0 -10
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/sessionHelpers.js +2 -2
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/module/assets/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/assets/fonts/icons/manifest.json +5 -21
- package/lib/module/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/lib/module/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/lib/module/assets/fonts/icons/manifest.json +5 -21
- package/lib/module/index.js +6 -6
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/boot/runProviderColdBoot.js +2 -1
- package/lib/module/ui/boot/runProviderColdBoot.js.map +1 -1
- package/lib/module/ui/components/OxyAccountDialogScreen.js +2 -3
- package/lib/module/ui/components/OxyAccountDialogScreen.js.map +1 -1
- package/lib/module/ui/components/OxyAuthChooser.js +15 -32
- package/lib/module/ui/components/OxyAuthChooser.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +1 -1
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/OxySignInRequestSurface.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +1 -1
- package/lib/module/ui/components/ProfileButton.js.map +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js +1 -1
- package/lib/module/ui/components/authChooser/AccountsMenuView.js.map +1 -1
- package/lib/module/ui/components/authChooser/SignInRequestView.js +6 -17
- package/lib/module/ui/components/authChooser/SignInRequestView.js.map +1 -1
- package/lib/module/ui/components/authChooser/TroubleDisclosure.js +1 -1
- package/lib/module/ui/components/authChooser/primitives.js +2 -103
- package/lib/module/ui/components/authChooser/primitives.js.map +1 -1
- package/lib/module/ui/components/authChooser/requestSurfaces.js.map +1 -1
- package/lib/module/ui/components/authChooser/signInProgress.js.map +1 -1
- package/lib/module/ui/components/authChooser/styles.js +0 -33
- package/lib/module/ui/components/authChooser/styles.js.map +1 -1
- package/lib/module/ui/components/authChooser/types.js +0 -8
- package/lib/module/ui/components/authChooser/types.js.map +1 -1
- package/lib/module/ui/components/signIn/InlineCommonsQr.js +1 -1
- package/lib/module/ui/components/signIn/OxyAccountPicker.js +155 -58
- package/lib/module/ui/components/signIn/OxyAccountPicker.js.map +1 -1
- package/lib/module/ui/components/signIn/OxyAuthenticatorPanel.js +321 -0
- package/lib/module/ui/components/signIn/OxyAuthenticatorPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxyDeleteAccountPanel.js +54 -58
- package/lib/module/ui/components/signIn/OxyDeleteAccountPanel.js.map +1 -1
- package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js +48 -38
- package/lib/module/ui/components/signIn/OxyLinkCommonsPanel.js.map +1 -1
- package/lib/module/ui/components/signIn/OxyPasswordPanel.js +136 -0
- package/lib/module/ui/components/signIn/OxyPasswordPanel.js.map +1 -0
- package/lib/module/ui/components/signIn/OxySignInPanel.js +496 -201
- package/lib/module/ui/components/signIn/OxySignInPanel.js.map +1 -1
- package/lib/module/ui/components/signIn/OxySignUpPanel.js +212 -43
- package/lib/module/ui/components/signIn/OxySignUpPanel.js.map +1 -1
- package/lib/module/ui/components/signIn/ReauthStep.js +181 -0
- package/lib/module/ui/components/signIn/ReauthStep.js.map +1 -0
- package/lib/module/ui/components/signIn/accountFlowParts.js +97 -26
- package/lib/module/ui/components/signIn/accountFlowParts.js.map +1 -1
- package/lib/module/ui/components/signIn/signInFlowStore.js +44 -0
- package/lib/module/ui/components/signIn/signInFlowStore.js.map +1 -0
- package/lib/module/ui/components/signIn/signInMethods.js +11 -25
- package/lib/module/ui/components/signIn/signInMethods.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +121 -115
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +7 -7
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/context/useOxyAccountGraph.js +4 -4
- package/lib/module/ui/context/useOxyAccountGraph.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +19 -9
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +4 -4
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +23 -3
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +8 -8
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAuthMethods.js +25 -14
- package/lib/module/ui/hooks/queries/useAuthMethods.js.map +1 -1
- package/lib/module/ui/hooks/queries/useFileQueries.js +5 -2
- package/lib/module/ui/hooks/queries/useFileQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/usePaymentQueries.js +8 -8
- package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useSecurityQueries.js +4 -3
- package/lib/module/ui/hooks/queries/useSecurityQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +6 -6
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/hooks/useAssets.js +36 -20
- package/lib/module/ui/hooks/useAssets.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +6 -4
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceManagement.js +4 -4
- package/lib/module/ui/hooks/useDeviceManagement.js.map +1 -1
- package/lib/module/ui/hooks/useDeviceSwitcher.js +2 -2
- package/lib/module/ui/hooks/useDeviceSwitcher.js.map +1 -1
- package/lib/module/ui/hooks/useFileDownloadUrl.js +1 -4
- package/lib/module/ui/hooks/useFileDownloadUrl.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +2 -2
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useFollowTarget.js +5 -5
- package/lib/module/ui/hooks/useFollowTarget.js.map +1 -1
- package/lib/module/ui/hooks/useI18n.js +6 -3
- package/lib/module/ui/hooks/useI18n.js.map +1 -1
- package/lib/module/ui/hooks/useResolvedFileUrls.js +2 -2
- package/lib/module/ui/hooks/useResolvedFileUrls.js.map +1 -1
- package/lib/module/ui/hooks/useSessionManagement.js +3 -3
- package/lib/module/ui/hooks/useSessionManagement.js.map +1 -1
- package/lib/module/ui/icons/subsetGlyphMaps.js +0 -16
- package/lib/module/ui/icons/subsetGlyphMaps.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +6 -4
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/navigation/surfaceRegistry.js +1 -1
- package/lib/module/ui/navigation/surfaceRegistry.js.map +1 -1
- package/lib/module/ui/oauth/browserBridge.js +239 -0
- package/lib/module/ui/oauth/browserBridge.js.map +1 -0
- package/lib/module/ui/oauth/completeOAuthCode.js +1 -1
- package/lib/module/ui/oauth/completeOAuthCode.js.map +1 -1
- package/lib/module/ui/oauth/explicitOAuthConsent.js +1 -1
- package/lib/module/ui/oauth/explicitOAuthConsent.js.map +1 -1
- package/lib/module/ui/runtime/createOxyRuntime.js +4 -3
- package/lib/module/ui/runtime/createOxyRuntime.js.map +1 -1
- package/lib/module/ui/runtime/runtimeContext.js.map +1 -1
- package/lib/module/ui/screens/AccountMembersScreen.js +7 -7
- package/lib/module/ui/screens/AccountMembersScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSecurityPanelScreen.js +32 -0
- package/lib/module/ui/screens/AccountSecurityPanelScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountSettingsScreen.js +3 -3
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +5 -5
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +3 -3
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -1
- package/lib/module/ui/screens/ChangeAvatarScreen.js +1 -1
- package/lib/module/ui/screens/ChangeAvatarScreen.js.map +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js +1 -1
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/DeleteAccountScreen.js +17 -0
- package/lib/module/ui/screens/DeleteAccountScreen.js.map +1 -0
- package/lib/module/ui/screens/DomainsScreen.js +212 -0
- package/lib/module/ui/screens/DomainsScreen.js.map +1 -0
- package/lib/module/ui/screens/EditProfileScreen.js +1 -1
- package/lib/module/ui/screens/EditProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +25 -11
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +1 -17
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/LinkCommonsScreen.js +12 -0
- package/lib/module/ui/screens/LinkCommonsScreen.js.map +1 -0
- package/lib/module/ui/screens/ManageAccountScreen.js +58 -62
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +53 -63
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +5 -13
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +16 -25
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInAuthenticatorScreen.js +12 -0
- package/lib/module/ui/screens/SignInAuthenticatorScreen.js.map +1 -0
- package/lib/module/ui/screens/SignInPasswordScreen.js +18 -0
- package/lib/module/ui/screens/SignInPasswordScreen.js.map +1 -0
- package/lib/module/ui/screens/UserListScreen.js +3 -3
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +26 -18
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js +2 -2
- package/lib/module/ui/screens/trust/TrustLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +9 -15
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRulesScreen.js +12 -10
- package/lib/module/ui/screens/trust/TrustRulesScreen.js.map +1 -1
- package/lib/module/ui/session/authStore.js +1 -1
- package/lib/module/ui/session/authStore.js.map +1 -1
- package/lib/module/ui/session/backgroundSession.js +5 -40
- package/lib/module/ui/session/backgroundSession.js.map +1 -1
- package/lib/module/ui/session/createSessionClient.js +1 -1
- package/lib/module/ui/session/createSessionClient.js.map +1 -1
- package/lib/module/ui/session/deviceCredentialTracker.js +38 -0
- package/lib/module/ui/session/deviceCredentialTracker.js.map +1 -0
- package/lib/module/ui/session/identityBinding.js +1 -1
- package/lib/module/ui/session/identityBinding.js.map +1 -1
- package/lib/module/ui/session/index.js +1 -1
- package/lib/module/ui/session/index.js.map +1 -1
- package/lib/module/ui/session/sharedDeviceCredentialStore.js +1 -1
- package/lib/module/ui/session/sharedDeviceCredentialStore.js.map +1 -1
- package/lib/module/ui/session/tokenTransport.js +3 -3
- package/lib/module/ui/session/tokenTransport.js.map +1 -1
- package/lib/module/ui/stores/assetStore.js +12 -0
- package/lib/module/ui/stores/assetStore.js.map +1 -1
- package/lib/module/ui/stores/followStore.js +6 -6
- package/lib/module/ui/stores/followStore.js.map +1 -1
- package/lib/module/ui/utils/accountDeletionHandoff.js +2 -5
- package/lib/module/ui/utils/accountDeletionHandoff.js.map +1 -1
- package/lib/module/ui/utils/avatarUtils.js +1 -1
- package/lib/module/ui/utils/avatarUtils.js.map +1 -1
- package/lib/module/ui/utils/deviceCredential.js +10 -3
- package/lib/module/ui/utils/deviceCredential.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +0 -9
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/sessionHelpers.js +2 -2
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +5 -5
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts +3 -2
- package/lib/typescript/commonjs/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts +2 -3
- package/lib/typescript/commonjs/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts +7 -7
- package/lib/typescript/commonjs/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/OxySignInRequestSurface.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts +3 -4
- package/lib/typescript/commonjs/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/TroubleDisclosure.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts +1 -34
- package/lib/typescript/commonjs/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/signInFailureMessage.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/signInFailureMessage.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/authChooser/signInProgress.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts +0 -33
- package/lib/typescript/commonjs/ui/components/authChooser/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts +1 -12
- package/lib/typescript/commonjs/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts +10 -4
- package/lib/typescript/commonjs/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxyAuthenticatorPanel.d.ts +19 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyAuthenticatorPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyDeleteAccountPanel.d.ts +10 -6
- package/lib/typescript/commonjs/ui/components/signIn/OxyDeleteAccountPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxyLinkCommonsPanel.d.ts +6 -6
- package/lib/typescript/commonjs/ui/components/signIn/OxyLinkCommonsPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxyPasswordPanel.d.ts +15 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxyPasswordPanel.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts +21 -19
- package/lib/typescript/commonjs/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts +16 -7
- package/lib/typescript/commonjs/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/ReauthStep.d.ts +34 -0
- package/lib/typescript/commonjs/ui/components/signIn/ReauthStep.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/accountFlowParts.d.ts +38 -12
- package/lib/typescript/commonjs/ui/components/signIn/accountFlowParts.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/signIn/signInFlowStore.d.ts +20 -0
- package/lib/typescript/commonjs/ui/components/signIn/signInFlowStore.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/signIn/signInMethods.d.ts +8 -21
- package/lib/typescript/commonjs/ui/components/signIn/signInMethods.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts +2 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts +4 -39
- package/lib/typescript/commonjs/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts +2 -1
- package/lib/typescript/commonjs/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/accountDialogSnapshot.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +4 -4
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useServicesMutations.d.ts +5 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +19 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useAuthMethods.d.ts +13 -20
- package/lib/typescript/commonjs/ui/hooks/queries/useAuthMethods.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useFileQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/usePaymentQueries.d.ts +4 -4
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +3 -5
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +5 -5
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useDeviceSwitcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFileDownloadUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFollow.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useI18n.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useResolvedFileUrls.d.ts +9 -7
- package/lib/typescript/commonjs/ui/hooks/useResolvedFileUrls.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts +1 -1
- package/lib/typescript/commonjs/ui/icons/Ionicons.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts +1 -1
- package/lib/typescript/commonjs/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts +0 -16
- package/lib/typescript/commonjs/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts +7 -5
- package/lib/typescript/commonjs/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/oauth/browserBridge.d.ts +97 -0
- package/lib/typescript/commonjs/ui/oauth/browserBridge.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/runtime/createOxyRuntime.d.ts +6 -2
- package/lib/typescript/commonjs/ui/runtime/createOxyRuntime.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/runtime/runtimeContext.d.ts +2 -1
- package/lib/typescript/commonjs/ui/runtime/runtimeContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/runtime/types.d.ts +2 -1
- package/lib/typescript/commonjs/ui/runtime/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSecurityPanelScreen.d.ts +11 -0
- package/lib/typescript/commonjs/ui/screens/AccountSecurityPanelScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/DeleteAccountScreen.d.ts +6 -0
- package/lib/typescript/commonjs/ui/screens/DeleteAccountScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/{SavesCollectionsScreen.d.ts → DomainsScreen.d.ts} +1 -1
- package/lib/typescript/commonjs/ui/screens/DomainsScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LinkCommonsScreen.d.ts +6 -0
- package/lib/typescript/commonjs/ui/screens/LinkCommonsScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SignInAuthenticatorScreen.d.ts +6 -0
- package/lib/typescript/commonjs/ui/screens/SignInAuthenticatorScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/SignInPasswordScreen.d.ts +6 -0
- package/lib/typescript/commonjs/ui/screens/SignInPasswordScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/authStore.d.ts +1 -1
- package/lib/typescript/commonjs/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts +3 -4
- package/lib/typescript/commonjs/ui/session/backgroundSession.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts +2 -1
- package/lib/typescript/commonjs/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/deviceCredentialTracker.d.ts +23 -0
- package/lib/typescript/commonjs/ui/session/deviceCredentialTracker.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/session/identityBinding.d.ts +1 -1
- package/lib/typescript/commonjs/ui/session/identityBinding.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/index.d.ts +1 -1
- package/lib/typescript/commonjs/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts +1 -1
- package/lib/typescript/commonjs/ui/session/nativeSecureStorage.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/sharedDeviceCredentialStore.d.ts +1 -1
- package/lib/typescript/commonjs/ui/session/sharedDeviceCredentialStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts +3 -2
- package/lib/typescript/commonjs/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/stores/assetStore.d.ts +7 -0
- package/lib/typescript/commonjs/ui/stores/assetStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts +1 -1
- package/lib/typescript/commonjs/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/accountDeletionHandoff.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/deviceCredential.d.ts +10 -3
- package/lib/typescript/commonjs/ui/utils/deviceCredential.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +1 -5
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +5 -5
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts +3 -2
- package/lib/typescript/module/ui/boot/runProviderColdBoot.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts +2 -3
- package/lib/typescript/module/ui/components/OxyAccountDialogScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts +7 -7
- package/lib/typescript/module/ui/components/OxyAuthChooser.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts +2 -1
- package/lib/typescript/module/ui/components/OxySignInRequestSurface.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts +1 -1
- package/lib/typescript/module/ui/components/authChooser/AccountsMenuView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts +3 -4
- package/lib/typescript/module/ui/components/authChooser/SignInRequestView.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/TroubleDisclosure.d.ts +1 -1
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts +1 -34
- package/lib/typescript/module/ui/components/authChooser/primitives.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts +2 -1
- package/lib/typescript/module/ui/components/authChooser/requestSurfaces.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/signInFailureMessage.d.ts +1 -1
- package/lib/typescript/module/ui/components/authChooser/signInFailureMessage.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts +2 -1
- package/lib/typescript/module/ui/components/authChooser/signInProgress.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/styles.d.ts +0 -33
- package/lib/typescript/module/ui/components/authChooser/styles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/authChooser/types.d.ts +1 -12
- package/lib/typescript/module/ui/components/authChooser/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts +1 -1
- package/lib/typescript/module/ui/components/signIn/InlineCommonsQr.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts +10 -4
- package/lib/typescript/module/ui/components/signIn/OxyAccountPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxyAuthenticatorPanel.d.ts +19 -0
- package/lib/typescript/module/ui/components/signIn/OxyAuthenticatorPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxyDeleteAccountPanel.d.ts +10 -6
- package/lib/typescript/module/ui/components/signIn/OxyDeleteAccountPanel.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxyLinkCommonsPanel.d.ts +6 -6
- package/lib/typescript/module/ui/components/signIn/OxyLinkCommonsPanel.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxyPasswordPanel.d.ts +15 -0
- package/lib/typescript/module/ui/components/signIn/OxyPasswordPanel.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts +21 -19
- package/lib/typescript/module/ui/components/signIn/OxySignInPanel.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts +16 -7
- package/lib/typescript/module/ui/components/signIn/OxySignUpPanel.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/ReauthStep.d.ts +34 -0
- package/lib/typescript/module/ui/components/signIn/ReauthStep.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/accountFlowParts.d.ts +38 -12
- package/lib/typescript/module/ui/components/signIn/accountFlowParts.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/signIn/signInFlowStore.d.ts +20 -0
- package/lib/typescript/module/ui/components/signIn/signInFlowStore.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/signIn/signInMethods.d.ts +8 -21
- package/lib/typescript/module/ui/components/signIn/signInMethods.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +2 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts +4 -39
- package/lib/typescript/module/ui/context/oxyContextTypes.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts +2 -1
- package/lib/typescript/module/ui/context/useOxyAccountGraph.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/accountDialogSnapshot.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +4 -4
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useServicesMutations.d.ts +5 -1
- package/lib/typescript/module/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +19 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useAuthMethods.d.ts +13 -20
- package/lib/typescript/module/ui/hooks/queries/useAuthMethods.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/useFileQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +4 -4
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +3 -5
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +5 -5
- package/lib/typescript/module/ui/hooks/useAssets.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useDeviceSwitcher.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useFileDownloadUrl.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useFollow.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useI18n.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useResolvedFileUrls.d.ts +9 -7
- package/lib/typescript/module/ui/hooks/useResolvedFileUrls.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/Ionicons.d.ts +1 -1
- package/lib/typescript/module/ui/icons/Ionicons.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts +1 -1
- package/lib/typescript/module/ui/icons/MaterialCommunityIcons.d.ts.map +1 -1
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts +0 -16
- package/lib/typescript/module/ui/icons/subsetGlyphMaps.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/accountDialogManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts +7 -5
- package/lib/typescript/module/ui/navigation/surfaceRegistry.d.ts.map +1 -1
- package/lib/typescript/module/ui/oauth/browserBridge.d.ts +97 -0
- package/lib/typescript/module/ui/oauth/browserBridge.d.ts.map +1 -0
- package/lib/typescript/module/ui/runtime/createOxyRuntime.d.ts +6 -2
- package/lib/typescript/module/ui/runtime/createOxyRuntime.d.ts.map +1 -1
- package/lib/typescript/module/ui/runtime/runtimeContext.d.ts +2 -1
- package/lib/typescript/module/ui/runtime/runtimeContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/runtime/types.d.ts +2 -1
- package/lib/typescript/module/ui/runtime/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSecurityPanelScreen.d.ts +11 -0
- package/lib/typescript/module/ui/screens/AccountSecurityPanelScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/DeleteAccountScreen.d.ts +6 -0
- package/lib/typescript/module/ui/screens/DeleteAccountScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/{SavesCollectionsScreen.d.ts → DomainsScreen.d.ts} +1 -1
- package/lib/typescript/module/ui/screens/DomainsScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LinkCommonsScreen.d.ts +6 -0
- package/lib/typescript/module/ui/screens/LinkCommonsScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SignInAuthenticatorScreen.d.ts +6 -0
- package/lib/typescript/module/ui/screens/SignInAuthenticatorScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/SignInPasswordScreen.d.ts +6 -0
- package/lib/typescript/module/ui/screens/SignInPasswordScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/authStore.d.ts +1 -1
- package/lib/typescript/module/ui/session/authStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/backgroundSession.d.ts +3 -4
- package/lib/typescript/module/ui/session/backgroundSession.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/createSessionClient.d.ts +2 -1
- package/lib/typescript/module/ui/session/createSessionClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/deviceCredentialTracker.d.ts +23 -0
- package/lib/typescript/module/ui/session/deviceCredentialTracker.d.ts.map +1 -0
- package/lib/typescript/module/ui/session/identityBinding.d.ts +1 -1
- package/lib/typescript/module/ui/session/identityBinding.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/index.d.ts +1 -1
- package/lib/typescript/module/ui/session/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts +1 -1
- package/lib/typescript/module/ui/session/nativeSecureStorage.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/sharedDeviceCredentialStore.d.ts +1 -1
- package/lib/typescript/module/ui/session/sharedDeviceCredentialStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/session/tokenTransport.d.ts +3 -2
- package/lib/typescript/module/ui/session/tokenTransport.d.ts.map +1 -1
- package/lib/typescript/module/ui/stores/assetStore.d.ts +7 -0
- package/lib/typescript/module/ui/stores/assetStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts +1 -1
- package/lib/typescript/module/ui/types/navigation.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/accountDeletionHandoff.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/deviceCredential.d.ts +10 -3
- package/lib/typescript/module/ui/utils/deviceCredential.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -5
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/package.json +4 -5
- package/src/assets/fonts/icons/OxyServicesIonicons.ttf +0 -0
- package/src/assets/fonts/icons/OxyServicesMaterialCommunityIcons.ttf +0 -0
- package/src/assets/fonts/icons/manifest.json +5 -21
- package/src/index.ts +8 -8
- package/src/ui/boot/__tests__/coldBootNoIdpRedirect.test.ts +4 -4
- package/src/ui/boot/runProviderColdBoot.ts +3 -9
- package/src/ui/components/OxyAccountDialogScreen.tsx +2 -3
- package/src/ui/components/OxyAuthChooser.tsx +13 -36
- package/src/ui/components/OxySignInButton.tsx +1 -1
- package/src/ui/components/OxySignInRequestSurface.tsx +2 -1
- package/src/ui/components/ProfileButton.tsx +1 -1
- package/src/ui/components/authChooser/AccountsMenuView.tsx +1 -6
- package/src/ui/components/authChooser/SignInRequestView.tsx +5 -23
- package/src/ui/components/authChooser/TroubleDisclosure.tsx +1 -1
- package/src/ui/components/authChooser/primitives.tsx +2 -96
- package/src/ui/components/authChooser/requestSurfaces.tsx +2 -1
- package/src/ui/components/authChooser/signInFailureMessage.ts +1 -1
- package/src/ui/components/authChooser/signInProgress.ts +2 -1
- package/src/ui/components/authChooser/styles.ts +0 -33
- package/src/ui/components/authChooser/types.ts +1 -13
- package/src/ui/components/signIn/InlineCommonsQr.tsx +2 -2
- package/src/ui/components/signIn/OxyAccountPicker.tsx +131 -66
- package/src/ui/components/signIn/OxyAuthenticatorPanel.tsx +294 -0
- package/src/ui/components/signIn/OxyDeleteAccountPanel.tsx +48 -61
- package/src/ui/components/signIn/OxyLinkCommonsPanel.tsx +43 -35
- package/src/ui/components/signIn/OxyPasswordPanel.tsx +117 -0
- package/src/ui/components/signIn/OxySignInPanel.tsx +534 -214
- package/src/ui/components/signIn/OxySignUpPanel.tsx +186 -56
- package/src/ui/components/signIn/ReauthStep.tsx +201 -0
- package/src/ui/components/signIn/accountFlowParts.tsx +139 -33
- package/src/ui/components/signIn/signInFlowStore.ts +41 -0
- package/src/ui/components/signIn/signInMethods.ts +10 -29
- package/src/ui/context/OxyContext.tsx +124 -145
- package/src/ui/context/hooks/useAuthOperations.ts +9 -8
- package/src/ui/context/oxyContextTypes.ts +4 -41
- package/src/ui/context/useOxyAccountGraph.ts +6 -5
- package/src/ui/hooks/accountDialogSnapshot.ts +1 -1
- package/src/ui/hooks/mutations/mutationFactory.ts +1 -1
- package/src/ui/hooks/mutations/useAccountMutations.ts +11 -10
- package/src/ui/hooks/mutations/useServicesMutations.ts +4 -4
- package/src/ui/hooks/queries/queryKeys.ts +26 -2
- package/src/ui/hooks/queries/useAccountQueries.ts +8 -8
- package/src/ui/hooks/queries/useAuthMethods.ts +22 -19
- package/src/ui/hooks/queries/useFileQueries.ts +2 -2
- package/src/ui/hooks/queries/usePaymentQueries.ts +8 -8
- package/src/ui/hooks/queries/useSecurityQueries.ts +4 -3
- package/src/ui/hooks/queries/useServicesQueries.ts +6 -6
- package/src/ui/hooks/useAssets.ts +26 -31
- package/src/ui/hooks/useAvatarPicker.ts +4 -4
- package/src/ui/hooks/useDeviceManagement.ts +4 -4
- package/src/ui/hooks/useDeviceSwitcher.ts +2 -7
- package/src/ui/hooks/useFileDownloadUrl.ts +1 -5
- package/src/ui/hooks/useFollow.ts +2 -2
- package/src/ui/hooks/useFollowTarget.ts +5 -5
- package/src/ui/hooks/useI18n.ts +6 -3
- package/src/ui/hooks/useResolvedFileUrls.ts +8 -6
- package/src/ui/hooks/useSessionManagement.ts +3 -3
- package/src/ui/icons/subsetGlyphMaps.ts +0 -16
- package/src/ui/navigation/__tests__/getSurfaceConfig.test.ts +1 -1
- package/src/ui/navigation/accountDialogManager.ts +1 -1
- package/src/ui/navigation/routes.ts +11 -8
- package/src/ui/navigation/surfaceRegistry.ts +8 -6
- package/src/ui/oauth/__tests__/browserAuthTransport.test.ts +8 -8
- package/src/ui/oauth/__tests__/browserBridge.test.ts +198 -0
- package/src/ui/oauth/__tests__/completeOAuthCode.test.ts +1 -1
- package/src/ui/oauth/__tests__/explicitOAuthConsent.test.ts +11 -11
- package/src/ui/oauth/__tests__/sharedCompletionPath.test.ts +7 -7
- package/src/ui/oauth/browserBridge.ts +234 -0
- package/src/ui/oauth/completeOAuthCode.ts +1 -1
- package/src/ui/oauth/explicitOAuthConsent.ts +1 -1
- package/src/ui/runtime/createOxyRuntime.ts +8 -16
- package/src/ui/runtime/runtimeContext.tsx +2 -1
- package/src/ui/runtime/types.ts +2 -1
- package/src/ui/screens/AccountMembersScreen.tsx +7 -7
- package/src/ui/screens/AccountSecurityPanelScreen.tsx +26 -0
- package/src/ui/screens/AccountSettingsScreen.tsx +3 -3
- package/src/ui/screens/AccountVerificationScreen.tsx +1 -1
- package/src/ui/screens/AppInfoScreen.tsx +5 -5
- package/src/ui/screens/AvatarCropScreen.tsx +3 -3
- package/src/ui/screens/ChangeAvatarScreen.tsx +1 -1
- package/src/ui/screens/CreateAccountScreen.tsx +1 -1
- package/src/ui/screens/DeleteAccountScreen.tsx +13 -0
- package/src/ui/screens/DomainsScreen.tsx +187 -0
- package/src/ui/screens/EditProfileScreen.tsx +1 -1
- package/src/ui/screens/FileManagementScreen.tsx +15 -21
- package/src/ui/screens/HelpSupportScreen.tsx +0 -15
- package/src/ui/screens/LinkCommonsScreen.tsx +13 -0
- package/src/ui/screens/ManageAccountScreen.tsx +47 -82
- package/src/ui/screens/PrivacySettingsScreen.tsx +48 -67
- package/src/ui/screens/ProfileScreen.tsx +5 -10
- package/src/ui/screens/SearchSettingsScreen.tsx +15 -27
- package/src/ui/screens/SignInAuthenticatorScreen.tsx +13 -0
- package/src/ui/screens/SignInPasswordScreen.tsx +13 -0
- package/src/ui/screens/UserListScreen.tsx +3 -3
- package/src/ui/screens/WelcomeNewUserScreen.tsx +1 -1
- package/src/ui/screens/trust/TrustCenterScreen.tsx +25 -29
- package/src/ui/screens/trust/TrustLeaderboardScreen.tsx +2 -2
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +9 -19
- package/src/ui/screens/trust/TrustRulesScreen.tsx +14 -14
- package/src/ui/session/__tests__/authStore.test.ts +1 -1
- package/src/ui/session/__tests__/backgroundSession.test.ts +2 -61
- package/src/ui/session/__tests__/createSessionClient.test.ts +7 -9
- package/src/ui/session/__tests__/sharedDeviceCredentialStore.test.ts +1 -1
- package/src/ui/session/__tests__/tokenTransport.test.ts +9 -7
- package/src/ui/session/authStore.ts +1 -7
- package/src/ui/session/backgroundSession.ts +5 -41
- package/src/ui/session/createSessionClient.ts +2 -6
- package/src/ui/session/deviceCredentialTracker.ts +49 -0
- package/src/ui/session/identityBinding.ts +1 -6
- package/src/ui/session/index.ts +1 -1
- package/src/ui/session/nativeSecureStorage.ts +1 -1
- package/src/ui/session/sharedDeviceCredentialStore.ts +1 -6
- package/src/ui/session/tokenTransport.ts +5 -4
- package/src/ui/stores/__tests__/followStore.test.ts +13 -15
- package/src/ui/stores/assetStore.ts +15 -0
- package/src/ui/stores/followStore.ts +7 -7
- package/src/ui/types/navigation.ts +2 -1
- package/src/ui/utils/accountDeletionHandoff.ts +2 -4
- package/src/ui/utils/avatarUtils.ts +1 -1
- package/src/ui/utils/deviceCredential.ts +11 -4
- package/src/ui/utils/fileManagement.ts +0 -12
- package/src/ui/utils/sessionHelpers.ts +2 -2
- package/lib/commonjs/ui/components/signIn/OxyCreateAccountPanel.js +0 -236
- package/lib/commonjs/ui/components/signIn/OxyCreateAccountPanel.js.map +0 -1
- package/lib/commonjs/ui/components/signIn/OxyRecoverAccountPanel.js +0 -170
- package/lib/commonjs/ui/components/signIn/OxyRecoverAccountPanel.js.map +0 -1
- package/lib/commonjs/ui/components/signIn/passkeyError.js +0 -46
- package/lib/commonjs/ui/components/signIn/passkeyError.js.map +0 -1
- package/lib/commonjs/ui/context/passkeyFlow.js +0 -114
- package/lib/commonjs/ui/context/passkeyFlow.js.map +0 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +0 -162
- package/lib/commonjs/ui/screens/FAQScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +0 -601
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +0 -968
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +0 -132
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +0 -1
- package/lib/commonjs/webauthn/passkeyClient.js +0 -39
- package/lib/commonjs/webauthn/passkeyClient.js.map +0 -1
- package/lib/commonjs/webauthn/passkeyClient.native.js +0 -34
- package/lib/commonjs/webauthn/passkeyClient.native.js.map +0 -1
- package/lib/commonjs/webauthn/passkeyClient.web.js +0 -57
- package/lib/commonjs/webauthn/passkeyClient.web.js.map +0 -1
- package/lib/module/ui/components/signIn/OxyCreateAccountPanel.js +0 -231
- package/lib/module/ui/components/signIn/OxyCreateAccountPanel.js.map +0 -1
- package/lib/module/ui/components/signIn/OxyRecoverAccountPanel.js +0 -165
- package/lib/module/ui/components/signIn/OxyRecoverAccountPanel.js.map +0 -1
- package/lib/module/ui/components/signIn/passkeyError.js +0 -40
- package/lib/module/ui/components/signIn/passkeyError.js.map +0 -1
- package/lib/module/ui/context/passkeyFlow.js +0 -107
- package/lib/module/ui/context/passkeyFlow.js.map +0 -1
- package/lib/module/ui/screens/FAQScreen.js +0 -157
- package/lib/module/ui/screens/FAQScreen.js.map +0 -1
- package/lib/module/ui/screens/FeedbackScreen.js +0 -599
- package/lib/module/ui/screens/FeedbackScreen.js.map +0 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +0 -963
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +0 -127
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +0 -1
- package/lib/module/webauthn/passkeyClient.js +0 -33
- package/lib/module/webauthn/passkeyClient.js.map +0 -1
- package/lib/module/webauthn/passkeyClient.native.js +0 -28
- package/lib/module/webauthn/passkeyClient.native.js.map +0 -1
- package/lib/module/webauthn/passkeyClient.web.js +0 -52
- package/lib/module/webauthn/passkeyClient.web.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxyCreateAccountPanel.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/signIn/OxyCreateAccountPanel.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/signIn/OxyRecoverAccountPanel.d.ts +0 -20
- package/lib/typescript/commonjs/ui/components/signIn/OxyRecoverAccountPanel.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/signIn/passkeyError.d.ts +0 -16
- package/lib/typescript/commonjs/ui/components/signIn/passkeyError.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts +0 -92
- package/lib/typescript/commonjs/ui/context/passkeyFlow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts +0 -5
- package/lib/typescript/commonjs/ui/screens/FAQScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts +0 -5
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts +0 -5
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/screens/SavesCollectionsScreen.d.ts.map +0 -1
- package/lib/typescript/commonjs/webauthn/passkeyClient.d.ts +0 -20
- package/lib/typescript/commonjs/webauthn/passkeyClient.d.ts.map +0 -1
- package/lib/typescript/commonjs/webauthn/passkeyClient.native.d.ts +0 -15
- package/lib/typescript/commonjs/webauthn/passkeyClient.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/webauthn/passkeyClient.web.d.ts +0 -36
- package/lib/typescript/commonjs/webauthn/passkeyClient.web.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/signIn/OxyCreateAccountPanel.d.ts +0 -24
- package/lib/typescript/module/ui/components/signIn/OxyCreateAccountPanel.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/signIn/OxyRecoverAccountPanel.d.ts +0 -20
- package/lib/typescript/module/ui/components/signIn/OxyRecoverAccountPanel.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/signIn/passkeyError.d.ts +0 -16
- package/lib/typescript/module/ui/components/signIn/passkeyError.d.ts.map +0 -1
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts +0 -92
- package/lib/typescript/module/ui/context/passkeyFlow.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts +0 -5
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +0 -5
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts +0 -5
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +0 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +0 -1
- package/lib/typescript/module/webauthn/passkeyClient.d.ts +0 -20
- package/lib/typescript/module/webauthn/passkeyClient.d.ts.map +0 -1
- package/lib/typescript/module/webauthn/passkeyClient.native.d.ts +0 -15
- package/lib/typescript/module/webauthn/passkeyClient.native.d.ts.map +0 -1
- package/lib/typescript/module/webauthn/passkeyClient.web.d.ts +0 -36
- package/lib/typescript/module/webauthn/passkeyClient.web.d.ts.map +0 -1
- package/src/ui/components/signIn/OxyCreateAccountPanel.tsx +0 -207
- package/src/ui/components/signIn/OxyRecoverAccountPanel.tsx +0 -154
- package/src/ui/components/signIn/passkeyError.ts +0 -44
- package/src/ui/context/__tests__/passkeyFlow.test.ts +0 -239
- package/src/ui/context/passkeyFlow.ts +0 -145
- package/src/ui/screens/FAQScreen.tsx +0 -200
- package/src/ui/screens/FeedbackScreen.tsx +0 -766
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +0 -1103
- package/src/ui/screens/SavesCollectionsScreen.tsx +0 -167
- package/src/webauthn/passkeyClient.native.ts +0 -26
- package/src/webauthn/passkeyClient.ts +0 -31
- package/src/webauthn/passkeyClient.web.ts +0 -56
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import { useMemo } from 'react';
|
|
4
3
|
import { useQuery } from '@tanstack/react-query';
|
|
5
4
|
import { queryKeys } from "./queryKeys.js";
|
|
6
5
|
import { useOxy } from "../../context/OxyContext.js";
|
|
@@ -9,13 +8,9 @@ import { useOxy } from "../../context/OxyContext.js";
|
|
|
9
8
|
const EMPTY_METHODS = Object.freeze([]);
|
|
10
9
|
|
|
11
10
|
/**
|
|
12
|
-
* The current account's linked authentication methods (`GET /auth/methods`)
|
|
13
|
-
*
|
|
14
|
-
*
|
|
15
|
-
*
|
|
16
|
-
* `passkeys` is the `type === 'webauthn'` subset — one entry per registered
|
|
17
|
-
* credential. Invalidate via `queryKeys.authMethods.all` after linking a passkey
|
|
18
|
-
* (`useOxy().addPasskey()` does this) or removing one.
|
|
11
|
+
* The current account's linked authentication methods (`GET /auth/methods`).
|
|
12
|
+
* Backs the security / account surfaces that let a user see their identity key
|
|
13
|
+
* and social logins.
|
|
19
14
|
*/
|
|
20
15
|
export const useAuthMethods = options => {
|
|
21
16
|
const {
|
|
@@ -24,22 +19,38 @@ export const useAuthMethods = options => {
|
|
|
24
19
|
} = useOxy();
|
|
25
20
|
const query = useQuery({
|
|
26
21
|
queryKey: queryKeys.authMethods.list(),
|
|
27
|
-
queryFn: () => oxyServices.
|
|
22
|
+
queryFn: () => oxyServices.identity.authMethods(),
|
|
28
23
|
enabled: options?.enabled !== false && !!activeSessionId,
|
|
29
24
|
staleTime: 5 * 60 * 1000,
|
|
30
25
|
// 5 minutes
|
|
31
26
|
gcTime: 10 * 60 * 1000 // 10 minutes
|
|
32
27
|
});
|
|
33
|
-
const methods = query.data?.methods ?? EMPTY_METHODS;
|
|
34
|
-
const passkeys = useMemo(() => methods.filter(method => method.type === 'webauthn'), [methods]);
|
|
35
28
|
return {
|
|
36
29
|
...query,
|
|
37
30
|
/** Every linked auth method. Empty while loading. */
|
|
38
|
-
methods,
|
|
39
|
-
/** The registered passkeys (a `type === 'webauthn'` subset of `methods`). */
|
|
40
|
-
passkeys,
|
|
31
|
+
methods: query.data?.methods ?? EMPTY_METHODS,
|
|
41
32
|
/** The account's DID, or `null` while loading. */
|
|
42
33
|
did: query.data?.did ?? null
|
|
43
34
|
};
|
|
44
35
|
};
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* How the signed-in account signs in (`GET /users/me/sign-in-methods`): whether
|
|
39
|
+
* it has an email, a password, an authenticator app, and how many backup codes
|
|
40
|
+
* are left. Invalidate `queryKeys.signInMethods.all` after changing any of them
|
|
41
|
+
* (the security panels do).
|
|
42
|
+
*/
|
|
43
|
+
export const useSignInMethods = options => {
|
|
44
|
+
const {
|
|
45
|
+
oxyServices,
|
|
46
|
+
activeSessionId,
|
|
47
|
+
user
|
|
48
|
+
} = useOxy();
|
|
49
|
+
return useQuery({
|
|
50
|
+
queryKey: queryKeys.signInMethods.current(user?.id),
|
|
51
|
+
queryFn: () => oxyServices.auth.methods(),
|
|
52
|
+
enabled: options?.enabled !== false && !!activeSessionId,
|
|
53
|
+
staleTime: 60 * 1000
|
|
54
|
+
});
|
|
55
|
+
};
|
|
45
56
|
//# sourceMappingURL=useAuthMethods.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["
|
|
1
|
+
{"version":3,"names":["useQuery","queryKeys","useOxy","EMPTY_METHODS","Object","freeze","useAuthMethods","options","oxyServices","activeSessionId","query","queryKey","authMethods","list","queryFn","identity","enabled","staleTime","gcTime","methods","data","did","useSignInMethods","user","signInMethods","current","id","auth"],"sourceRoot":"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AAEA,CAAA,KAAMN,WAAW,CAACmB,IAAI,CAACR,OAAO,CAAC,CAAC;IACzCH,OAAO,EAAET,OAAO,EAAES,OAAO,KAAK,KAAK,IAAI,CAAC,CAACP,eAAe;IACxDQ,SAAS,EAAE,EAAE,GAAG;EAClB,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -18,7 +18,7 @@ import { queryKeys } from "./queryKeys.js";
|
|
|
18
18
|
/** Files fetched per page. */
|
|
19
19
|
export const FILES_PAGE_SIZE = 40;
|
|
20
20
|
|
|
21
|
-
/** Raw file record as returned by `oxyServices.
|
|
21
|
+
/** Raw file record as returned by `oxyServices.assets.list` / `assetUpload`. */
|
|
22
22
|
|
|
23
23
|
/** One page of the infinite file list. */
|
|
24
24
|
|
|
@@ -51,7 +51,10 @@ export const useUserFilesInfinite = ownerId => {
|
|
|
51
51
|
pageParam
|
|
52
52
|
}) => {
|
|
53
53
|
const offset = typeof pageParam === 'number' ? pageParam : 0;
|
|
54
|
-
const response = await oxyServices.
|
|
54
|
+
const response = await oxyServices.assets.list({
|
|
55
|
+
limit: FILES_PAGE_SIZE,
|
|
56
|
+
offset
|
|
57
|
+
});
|
|
55
58
|
const raw = response.files ?? [];
|
|
56
59
|
const files = raw.map(mapRawFileToMetadata);
|
|
57
60
|
return {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useInfiniteQuery","useOxy","queryKeys","FILES_PAGE_SIZE","mapRawFileToMetadata","raw","id","filename","originalName","sha256","contentType","mime","length","size","chunkSize","uploadDate","createdAt","metadata","variants","useUserFilesInfinite","ownerId","oxyServices","queryKey","files","list","queryFn","pageParam","offset","response","
|
|
1
|
+
{"version":3,"names":["useInfiniteQuery","useOxy","queryKeys","FILES_PAGE_SIZE","mapRawFileToMetadata","raw","id","filename","originalName","sha256","contentType","mime","length","size","chunkSize","uploadDate","createdAt","metadata","variants","useUserFilesInfinite","ownerId","oxyServices","queryKey","files","list","queryFn","pageParam","offset","response","assets","limit","map","total","hasMore","Boolean","nextOffset","initialPageParam","getNextPageParam","lastPage","undefined","enabled","staleTime","refetchOnWindowFocus","fileListKey","mapPages","data","fn","pages","page","prependFileToCache","queryClient","file","setQueryData","index","removeFileFromCache","fileId","filter","f","replaceFileInCache","oldId","newFile","patchFileMetadataInCache","metadataPatch"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/useFileQueries.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SACIA,gBAAgB,QAGb,uBAAuB;AAE9B,SAASC,MAAM,QAAQ,6BAA0B;AACjD,SAASC,SAAS,QAAQ,gBAAa;;AAEvC;AACA,OAAO,MAAMC,eAAe,GAAG,EAAE;;AAEjC;;AAYA;;AAUA;AACA,OAAO,SAASC,oBAAoBA,CAACC,GAAgB,EAAgB;EACjE,OAAO;IACHC,EAAE,EAAED,GAAG,CAACC,EAAE;IACVC,QAAQ,EAAEF,GAAG,CAACG,YAAY,IAAIH,GAAG,CAACI,MAAM,IAAI,EAAE;IAC9CC,WAAW,EAAEL,GAAG,CAACM,IAAI,IAAI,EAAE;IAC3BC,MAAM,EAAEP,GAAG,CAACQ,IAAI,IAAI,CAAC;IACrBC,SAAS,EAAE,CAAC;IACZC,UAAU,EAAEV,GAAG,CAACW,SAAS,IAAI,EAAE;IAC/BC,QAAQ,EAAEZ,GAAG,CAACY,QAAQ,IAAI,CAAC,CAAC;IAC5BC,QAAQ,EAAGb,GAAG,CAACa,QAAQ,IAAI;EAC/B,CAAC;AACL;;AAEA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAIC,OAAgB,IAAK;EACtD,MAAM;IAAEC;EAAY,CAAC,GAAGpB,MAAM,CAAC,CAAC;EAChC,OAAOD,gBAAgB,CAAuB;IAC1CsB,QAAQ,EAAEpB,SAAS,CAACqB,KAAK,CAACC,IAAI,CAACJ,OAAO,CAAC;IACvCK,OAAO,EAAE,MAAAA,CAAO;MAAEC;IA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AACA,OAAO,SAASgB,wBAAwBA,CACpCX,WAAwB,EACxB9B,OAA2B,EAC3BmC,MAAc,EACdO,aAAsC,EAClC;EACJZ,WAAW,CAACE,YAAY,CAAoBT,WAAW,CAACvB,OAAO,CAAC,EAAGyB,IAAI,IACnEA,IAAI,GACED,QAAQ,CAACC,IAAI,EAAGtB,KAAK,IACnBA,KAAK,CAACQ,GAAG,CAAE0B,CAAC,IACRA,CAAC,CAACnD,EAAE,KAAKiD,MAAM,GACT;IAAE,GAAGE,CAAC;IAAExC,QAAQ,EAAE;MAAE,GAAGwC,CAAC,CAACxC,QAAQ;MAAE,GAAG6C;IAAc;EAA8B,CAAC,GACnFL,CACV,CACJ,CAAC,GACCZ,IACV,CAAC;AACL","ignoreList":[]}
|
|
@@ -24,7 +24,7 @@ import { useOxy } from "../../context/OxyContext.js";
|
|
|
24
24
|
/**
|
|
25
25
|
* Get the current user's subscription.
|
|
26
26
|
*
|
|
27
|
-
* Wraps `oxyServices.
|
|
27
|
+
* Wraps `oxyServices.billing.subscription()`
|
|
28
28
|
* (`GET /subscription/:userId`, billing-first). Returns the persisted
|
|
29
29
|
* subscription or the API's `{ plan: 'basic' }` fallback when the user has
|
|
30
30
|
* never subscribed.
|
|
@@ -39,7 +39,7 @@ export const useUserSubscription = options => {
|
|
|
39
39
|
return useQuery({
|
|
40
40
|
queryKey: queryKeys.payments.subscription(user?.id),
|
|
41
41
|
queryFn: async () => {
|
|
42
|
-
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.
|
|
42
|
+
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.billing.subscription());
|
|
43
43
|
},
|
|
44
44
|
enabled: options?.enabled !== false && isAuthenticated && !!user?.id,
|
|
45
45
|
// Subscription state changes rarely; tolerate a longer fresh window.
|
|
@@ -52,7 +52,7 @@ export const useUserSubscription = options => {
|
|
|
52
52
|
/**
|
|
53
53
|
* Get the current user's payment / billing history.
|
|
54
54
|
*
|
|
55
|
-
* Wraps `oxyServices.
|
|
55
|
+
* Wraps `oxyServices.billing.payments()` (`GET /payments/user`), which
|
|
56
56
|
* returns the user's `deposit` and `purchase` transactions newest-first.
|
|
57
57
|
*/
|
|
58
58
|
export const useUserPayments = options => {
|
|
@@ -65,7 +65,7 @@ export const useUserPayments = options => {
|
|
|
65
65
|
return useQuery({
|
|
66
66
|
queryKey: queryKeys.payments.history(user?.id),
|
|
67
67
|
queryFn: async () => {
|
|
68
|
-
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.
|
|
68
|
+
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.billing.payments());
|
|
69
69
|
},
|
|
70
70
|
enabled: options?.enabled !== false && isAuthenticated && !!user?.id,
|
|
71
71
|
// Billing history is append-mostly; a short fresh window is fine.
|
|
@@ -78,7 +78,7 @@ export const useUserPayments = options => {
|
|
|
78
78
|
/**
|
|
79
79
|
* Get the current user's FairCoin wallet balance.
|
|
80
80
|
*
|
|
81
|
-
* Wraps `oxyServices.
|
|
81
|
+
* Wraps `oxyServices.billing.wallet()` (`GET /wallet/:userId`).
|
|
82
82
|
* Balance changes frequently, so the fresh window is intentionally short.
|
|
83
83
|
*/
|
|
84
84
|
export const useUserWallet = options => {
|
|
@@ -91,7 +91,7 @@ export const useUserWallet = options => {
|
|
|
91
91
|
return useQuery({
|
|
92
92
|
queryKey: queryKeys.payments.wallet(user?.id),
|
|
93
93
|
queryFn: async () => {
|
|
94
|
-
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.
|
|
94
|
+
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.billing.wallet());
|
|
95
95
|
},
|
|
96
96
|
enabled: options?.enabled !== false && isAuthenticated && !!user?.id,
|
|
97
97
|
staleTime: 60 * 1000,
|
|
@@ -103,7 +103,7 @@ export const useUserWallet = options => {
|
|
|
103
103
|
/**
|
|
104
104
|
* Get the current user's wallet transaction history (paginated).
|
|
105
105
|
*
|
|
106
|
-
* Wraps `oxyServices.
|
|
106
|
+
* Wraps `oxyServices.billing.walletTransactions(options)`
|
|
107
107
|
* (`GET /wallet/transactions/:userId`). The API responds with a
|
|
108
108
|
* `{ data, pagination }` envelope, preserved here as
|
|
109
109
|
* `WalletTransactionsResponse`.
|
|
@@ -123,7 +123,7 @@ export const useUserWalletTransactions = (params, options) => {
|
|
|
123
123
|
return useQuery({
|
|
124
124
|
queryKey: queryKeys.payments.walletTransactions(limit, offset, user?.id),
|
|
125
125
|
queryFn: async () => {
|
|
126
|
-
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.
|
|
126
|
+
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.billing.walletTransactions({
|
|
127
127
|
limit,
|
|
128
128
|
offset
|
|
129
129
|
}));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useQuery","authenticatedApiCall","queryKeys","useOxy","useUserSubscription","options","oxyServices","isAuthenticated","activeSessionId","user","queryKey","payments","subscription","id","queryFn","
|
|
1
|
+
{"version":3,"names":["useQuery","authenticatedApiCall","queryKeys","useOxy","useUserSubscription","options","oxyServices","isAuthenticated","activeSessionId","user","queryKey","payments","subscription","id","queryFn","billing","enabled","staleTime","gcTime","useUserPayments","history","useUserWallet","wallet","useUserWalletTransactions","params","limit","offset","walletTransactions"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/usePaymentQueries.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,oBAAoB,QAAQ,cAAc;AACnD,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,MAAM,QAAQ,6BAA0B;AAQjD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAAIC,OAA+B,IAAK;EACtE,MAAM;IAAEC,WAAW;IAAEC,eAAe;IAAEC,eAAe;IAAEC;EAAK,CAAC,GAAGN,MA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kBAAkB,CAAC;QAAEF,KAAK;QAAEC;MAAO,CAAC,CAChE,CAAC;IACH,CAAC;IACDV,OAAO,EAAGX,OAAO,EAAEW,OAAO,KAAK,KAAK,IAAKT,eAAe,IAAI,CAAC,CAACE,IAAI,EAAEI,EAAE;IACtEI,SAAS,EAAE,EAAE,GAAG,IAAI;IAAE;IACtBC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAE;EAC1B,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -17,7 +17,7 @@ export const useSecurityActivity = options => {
|
|
|
17
17
|
if (!activeSessionId) {
|
|
18
18
|
throw new Error('No active session');
|
|
19
19
|
}
|
|
20
|
-
const response = await oxyServices.
|
|
20
|
+
const response = await oxyServices.devices.securityActivity(options?.limit, options?.offset, options?.eventType);
|
|
21
21
|
return response;
|
|
22
22
|
},
|
|
23
23
|
enabled: options?.enabled !== false && !!activeSessionId,
|
|
@@ -41,7 +41,8 @@ export const useRecentSecurityActivity = (limit = 10) => {
|
|
|
41
41
|
if (!activeSessionId) {
|
|
42
42
|
throw new Error('No active session');
|
|
43
43
|
}
|
|
44
|
-
|
|
44
|
+
const page = await oxyServices.devices.securityActivity(limit, 0);
|
|
45
|
+
return page.data;
|
|
45
46
|
},
|
|
46
47
|
enabled: !!activeSessionId,
|
|
47
48
|
staleTime: 5 * 60 * 1000,
|
|
@@ -70,7 +71,7 @@ export const useInfiniteSecurityActivity = options => {
|
|
|
70
71
|
throw new Error('No active session');
|
|
71
72
|
}
|
|
72
73
|
const offset = typeof pageParam === 'number' ? pageParam : 0;
|
|
73
|
-
return await oxyServices.
|
|
74
|
+
return await oxyServices.devices.securityActivity(limit, offset, options?.eventType);
|
|
74
75
|
},
|
|
75
76
|
initialPageParam: 0,
|
|
76
77
|
getNextPageParam: lastPage => {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useQuery","useInfiniteQuery","queryKeys","useOxy","useSecurityActivity","options","oxyServices","activeSessionId","queryKey","security","activity","limit","offset","eventType","queryFn","Error","response","
|
|
1
|
+
{"version":3,"names":["useQuery","useInfiniteQuery","queryKeys","useOxy","useSecurityActivity","options","oxyServices","activeSessionId","queryKey","security","activity","limit","offset","eventType","queryFn","Error","response","devices","securityActivity","enabled","staleTime","gcTime","useRecentSecurityActivity","recent","page","data","useInfiniteSecurityActivity","infinite","pageParam","initialPageParam","getNextPageParam","lastPage","hasMore","undefined"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/useSecurityQueries.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,gBAAgB,QAAQ,uBAAuB;AAClE,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,MAAM,QAAQ,6BAA0B;AAGjD;AACA;AACA;AACA,OAAO,MAAMC,mBAAmB,GAC9BC,OAKC,IACE;EACH,MAAM;IAAEC,WAAW;IAAEC;EAAgB,CAAC,GAAGJ,MAAM,CAAC,CAAC;EAEjD,OAAOH,QAAQ,CAAC;IACdQ,QAAQ,EAAEN,SAAS,CAACO,QAAQ,CAACC,QAAQ,CACnCL,OAAO,EAAEM,KAAK,EACdN,OAAO,EAAEO,MAAM,EACfP,OAAO,EAAEQ,SACX,CAAC;IACDC,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnB,IAAI,CAACP,eAAe,EAAE;QACpB,MAAM,IAAIQ,KAAK,CAAC,mBAAmB,CAAC;MACtC;MAEA,MAAMC,QAAQ,GAAG,MAAMV,WAAW,CAACW,OAAO,CAACC,gBAAgB,CACzDb,OAAO,EAAEM,KAAK,EACdN,OAAO,EAAEO,MAAM,EACfP,OAAO,EAAEQ,SACX,CAAC;MAED,OAAOG,QAAQ;IACjB,CAAC;IACDG,OAAO,EAAGd,OAAO,EAAEc,OAAO,KAAK,KAAK,IAAK,CAAC,CAACZ,eAAe;IAC1Da,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;IAAE;IAC1BC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,IAA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GAAG,OAAOgB,SAAS,KAAK,QAAQ,GAAGA,SAAS,GAAG,CAAC;MAC5D,OAAO,MAAMtB,WAAW,CAACW,OAAO,CAACC,gBAAgB,CAC/CP,KAAK,EACLC,MAAM,EACNP,OAAO,EAAEQ,SACX,CAAC;IACH,CAAC;IACDgB,gBAAgB,EAAE,CAAC;IACnBC,gBAAgB,EAAGC,QAAQ,IAAK;MAC9B,IAAI,CAACA,QAAQ,CAACC,OAAO,EAAE,OAAOC,SAAS;MACvC,OAAOF,QAAQ,CAACnB,MAAM,GAAGmB,QAAQ,CAACpB,KAAK;IACzC,CAAC;IACDQ,OAAO,EAAGd,OAAO,EAAEc,OAAO,KAAK,KAAK,IAAK,CAAC,CAACZ,eAAe;IAC1Da,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;IAAE;IAC1BC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAE;EAC1B,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -51,7 +51,7 @@ export const useSession = (sessionId, options) => {
|
|
|
51
51
|
if (!sessionId) {
|
|
52
52
|
throw new Error('Session ID is required');
|
|
53
53
|
}
|
|
54
|
-
const validation = await oxyServices.
|
|
54
|
+
const validation = await oxyServices.session.validate(sessionId, {
|
|
55
55
|
useHeaderValidation: true
|
|
56
56
|
});
|
|
57
57
|
if (!validation?.valid || !validation.user) {
|
|
@@ -88,7 +88,7 @@ export const useDeviceSessions = options => {
|
|
|
88
88
|
if (!activeSessionId) {
|
|
89
89
|
throw new Error('No active session');
|
|
90
90
|
}
|
|
91
|
-
return await oxyServices.
|
|
91
|
+
return await oxyServices.devices.sessions(activeSessionId);
|
|
92
92
|
},
|
|
93
93
|
enabled: options?.enabled !== false && !!activeSessionId,
|
|
94
94
|
staleTime: 2 * 60 * 1000,
|
|
@@ -108,7 +108,7 @@ export const useUserDevices = options => {
|
|
|
108
108
|
return useQuery({
|
|
109
109
|
queryKey: queryKeys.devices.list(accountQueryScope(activeSessionId)),
|
|
110
110
|
queryFn: async () => {
|
|
111
|
-
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.
|
|
111
|
+
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.devices.list());
|
|
112
112
|
},
|
|
113
113
|
enabled: options?.enabled !== false && isAuthenticated && !!activeSessionId,
|
|
114
114
|
staleTime: 5 * 60 * 1000,
|
|
@@ -127,7 +127,7 @@ export const useSecurityInfo = options => {
|
|
|
127
127
|
return useQuery({
|
|
128
128
|
queryKey: [...queryKeys.devices.all, 'security'],
|
|
129
129
|
queryFn: async () => {
|
|
130
|
-
return await oxyServices.
|
|
130
|
+
return await oxyServices.devices.securityInfo();
|
|
131
131
|
},
|
|
132
132
|
enabled: options?.enabled !== false && isAuthenticated,
|
|
133
133
|
staleTime: 5 * 60 * 1000,
|
|
@@ -137,7 +137,7 @@ export const useSecurityInfo = options => {
|
|
|
137
137
|
|
|
138
138
|
/**
|
|
139
139
|
* Get account storage usage (server-aggregated usage across assets, mail,
|
|
140
|
-
* recordings, etc.). Wraps `oxyServices.
|
|
140
|
+
* recordings, etc.). Wraps `oxyServices.assets.usage()` in a
|
|
141
141
|
* TanStack query so consumers get caching, background refetch, and a
|
|
142
142
|
* consistent `isLoading` / `refetch` surface instead of hand-rolled
|
|
143
143
|
* `useEffect` fetches.
|
|
@@ -151,7 +151,7 @@ export const useAccountStorageUsage = options => {
|
|
|
151
151
|
return useQuery({
|
|
152
152
|
queryKey: queryKeys.storage.usage(accountQueryScope(activeSessionId)),
|
|
153
153
|
queryFn: async () => {
|
|
154
|
-
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.
|
|
154
|
+
return authenticatedApiCall(oxyServices, activeSessionId, () => oxyServices.assets.usage());
|
|
155
155
|
},
|
|
156
156
|
enabled: options?.enabled !== false && isAuthenticated && !!activeSessionId,
|
|
157
157
|
staleTime: 5 * 60 * 1000,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useQuery","authenticatedApiCall","queryKeys","useOxy","fetchSessionsWithFallback","mapSessionsToClient","accountQueryScope","activeSessionId","useSessions","userId","options","oxyServices","queryKey","sessions","list","queryFn","Error","fallbackDeviceId","undefined","fallbackUserId","enabled","staleTime","gcTime","useSession","sessionId","detail","validation","
|
|
1
|
+
{"version":3,"names":["useQuery","authenticatedApiCall","queryKeys","useOxy","fetchSessionsWithFallback","mapSessionsToClient","accountQueryScope","activeSessionId","useSessions","userId","options","oxyServices","queryKey","sessions","list","queryFn","Error","fallbackDeviceId","undefined","fallbackUserId","enabled","staleTime","gcTime","useSession","sessionId","detail","validation","session","validate","useHeaderValidation","valid","user","now","Date","deviceId","expiresAt","getTime","toISOString","lastActive","lastActivity","id","toString","isCurrent","useDeviceSessions","active","devices","useUserDevices","isAuthenticated","useSecurityInfo","all","securityInfo","useAccountStorageUsage","storage","usage","assets"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/useServicesQueries.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,uBAAuB;AAChD,SAASC,oBAAoB,QAAQ,cAAc;AAEnD,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,MAAM,QAAQ,6BAA0B;AACjD,SAASC,yBAAyB,EAAEC,mBAAmB,QAAQ,+BAA4B;;AAE3F;AACA;AACA;AACA,MAAMC,iBAAiB,GAAIC,eAA8B,IACvD,GAAGA,eAAe,IAAI,YAAY,EAAE;;AAEtC;AACA;AACA;AACA,OAAO,MAAMC,WAAW,GAAGA,CAACC,MAAe,EAAEC,OAA+B,KAAK;EAC/E,MAAM;IAAEC,WAAW;IAAEJ;EAAgB,CAAC,GAAGJ,MAAM,CAAC,CAAC;EAEjD,OAAOH,QAAQ,CAAC;IACdY,QAAQ,EAAEV,SAAS,CAACW,QAAQ,CAACC,IAAI,CAACL,MAAM,CAAC;IACzCM,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnB,IAAI,CAACR,eAAe,EAAE;QACpB,MAAM,IAAIS,KAAK,CAAC,m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AAM;IAAEC,WAAW;IAAEoC,eAAe;IAAExC;EAAgB,CAAC,GAAGJ,MAAM,CAAC,CAAC;EAElE,OAAOH,QAAQ,CAA8B;IAC3CY,QAAQ,EAAEV,SAAS,CAACkD,OAAO,CAACC,KAAK,CAAC/C,iBAAiB,CAACC,eAAe,CAAC,CAAC;IACrEQ,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnB,OAAOd,oBAAoB,CACzBU,WAAW,EACXJ,eAAe,EACf,MAAMI,WAAW,CAAC2C,MAAM,CAACD,KAAK,CAAC,CACjC,CAAC;IACH,CAAC;IACDjC,OAAO,EAAGV,OAAO,EAAEU,OAAO,KAAK,KAAK,IAAK2B,eAAe,IAAI,CAAC,CAACxC,eAAe;IAC7Ec,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;IACxBC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG;EACpB,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -17,7 +17,7 @@ export const useAssets = () => {
|
|
|
17
17
|
uploadProgress,
|
|
18
18
|
loading,
|
|
19
19
|
errors,
|
|
20
|
-
|
|
20
|
+
mergeAsset,
|
|
21
21
|
setAssets,
|
|
22
22
|
removeAsset,
|
|
23
23
|
setUploadProgress,
|
|
@@ -46,7 +46,9 @@ export const useAssets = () => {
|
|
|
46
46
|
try {
|
|
47
47
|
clearErrors();
|
|
48
48
|
setUploading(true);
|
|
49
|
-
const result = await oxyInstance.
|
|
49
|
+
const result = await oxyInstance.assets.upload(file, {
|
|
50
|
+
metadata
|
|
51
|
+
});
|
|
50
52
|
|
|
51
53
|
// Update progress with final status
|
|
52
54
|
if (result?.file) {
|
|
@@ -67,7 +69,7 @@ export const useAssets = () => {
|
|
|
67
69
|
|
|
68
70
|
// Add asset to store
|
|
69
71
|
if (result.file) {
|
|
70
|
-
|
|
72
|
+
mergeAsset(result.file);
|
|
71
73
|
return result.file;
|
|
72
74
|
}
|
|
73
75
|
return null;
|
|
@@ -77,7 +79,7 @@ export const useAssets = () => {
|
|
|
77
79
|
} finally {
|
|
78
80
|
setUploading(false);
|
|
79
81
|
}
|
|
80
|
-
}, [clearErrors, setUploading, setUploadProgress, removeUploadProgress,
|
|
82
|
+
}, [clearErrors, setUploading, setUploadProgress, removeUploadProgress, mergeAsset, setUploadError]);
|
|
81
83
|
|
|
82
84
|
// Link asset to entity
|
|
83
85
|
const link = useCallback(async (assetId, app, entityType, entityId) => {
|
|
@@ -90,9 +92,15 @@ export const useAssets = () => {
|
|
|
90
92
|
|
|
91
93
|
// Auto-detect visibility for avatars and profile banners
|
|
92
94
|
const visibility = entityType === 'avatar' || entityType === 'profile-banner' ? 'public' : undefined;
|
|
93
|
-
const result = await oxyInstance.
|
|
95
|
+
const result = await oxyInstance.assets.link(assetId, {
|
|
96
|
+
app,
|
|
97
|
+
entityType,
|
|
98
|
+
entityId
|
|
99
|
+
}, {
|
|
100
|
+
visibility
|
|
101
|
+
});
|
|
94
102
|
if (result.file) {
|
|
95
|
-
|
|
103
|
+
mergeAsset(result.file);
|
|
96
104
|
} else {
|
|
97
105
|
// If API doesn't return full file, update store optimistically
|
|
98
106
|
addLink(assetId, {
|
|
@@ -110,7 +118,7 @@ export const useAssets = () => {
|
|
|
110
118
|
} finally {
|
|
111
119
|
setLinking(false);
|
|
112
120
|
}
|
|
113
|
-
}, [clearErrors, setLinking,
|
|
121
|
+
}, [clearErrors, setLinking, mergeAsset, addLink, setLinkError]);
|
|
114
122
|
|
|
115
123
|
// Unlink asset from entity
|
|
116
124
|
const unlink = useCallback(async (assetId, app, entityType, entityId) => {
|
|
@@ -120,9 +128,13 @@ export const useAssets = () => {
|
|
|
120
128
|
try {
|
|
121
129
|
clearErrors();
|
|
122
130
|
setLinking(true);
|
|
123
|
-
const result = await oxyInstance.
|
|
131
|
+
const result = await oxyInstance.assets.unlink(assetId, {
|
|
132
|
+
app,
|
|
133
|
+
entityType,
|
|
134
|
+
entityId
|
|
135
|
+
});
|
|
124
136
|
if (result.file) {
|
|
125
|
-
|
|
137
|
+
mergeAsset(result.file);
|
|
126
138
|
} else {
|
|
127
139
|
// Update store optimistically
|
|
128
140
|
removeLink(assetId, app, entityType, entityId);
|
|
@@ -133,15 +145,14 @@ export const useAssets = () => {
|
|
|
133
145
|
} finally {
|
|
134
146
|
setLinking(false);
|
|
135
147
|
}
|
|
136
|
-
}, [clearErrors, setLinking,
|
|
148
|
+
}, [clearErrors, setLinking, mergeAsset, removeLink, setLinkError]);
|
|
137
149
|
|
|
138
150
|
// Get asset URL
|
|
139
151
|
const getUrl = useCallback(async (assetId, variant, expiresIn) => {
|
|
140
152
|
if (!oxyInstance) {
|
|
141
153
|
throw new Error('OxyServices instance not configured. Call setOxyAssetInstance first.');
|
|
142
154
|
}
|
|
143
|
-
|
|
144
|
-
return result.url;
|
|
155
|
+
return oxyInstance.assets.url(assetId, variant, expiresIn);
|
|
145
156
|
}, []);
|
|
146
157
|
|
|
147
158
|
// Get asset metadata
|
|
@@ -149,13 +160,13 @@ export const useAssets = () => {
|
|
|
149
160
|
if (!oxyInstance) {
|
|
150
161
|
throw new Error('OxyServices instance not configured. Call setOxyAssetInstance first.');
|
|
151
162
|
}
|
|
152
|
-
const result = await oxyInstance.
|
|
163
|
+
const result = await oxyInstance.assets.get(assetId);
|
|
153
164
|
if (result.file) {
|
|
154
|
-
|
|
165
|
+
mergeAsset(result.file);
|
|
155
166
|
return result.file;
|
|
156
167
|
}
|
|
157
168
|
throw new Error('Asset not found');
|
|
158
|
-
}, [
|
|
169
|
+
}, [mergeAsset]);
|
|
159
170
|
|
|
160
171
|
// Delete asset
|
|
161
172
|
const deleteAsset = useCallback(async (assetId, force = false) => {
|
|
@@ -165,7 +176,9 @@ export const useAssets = () => {
|
|
|
165
176
|
try {
|
|
166
177
|
clearErrors();
|
|
167
178
|
setDeleting(true);
|
|
168
|
-
await oxyInstance.
|
|
179
|
+
await oxyInstance.assets.delete(assetId, {
|
|
180
|
+
force
|
|
181
|
+
});
|
|
169
182
|
removeAsset(assetId);
|
|
170
183
|
} catch (error) {
|
|
171
184
|
setDeleteError((error instanceof Error ? error.message : null) || 'Delete failed');
|
|
@@ -180,18 +193,21 @@ export const useAssets = () => {
|
|
|
180
193
|
if (!oxyInstance) {
|
|
181
194
|
throw new Error('OxyServices instance not configured. Call setOxyAssetInstance first.');
|
|
182
195
|
}
|
|
183
|
-
const result = await oxyInstance.
|
|
196
|
+
const result = await oxyInstance.assets.restore(assetId);
|
|
184
197
|
if (result.file) {
|
|
185
|
-
|
|
198
|
+
mergeAsset(result.file);
|
|
186
199
|
}
|
|
187
|
-
}, [
|
|
200
|
+
}, [mergeAsset]);
|
|
188
201
|
|
|
189
202
|
// Get variants
|
|
190
203
|
const getVariants = useCallback(async assetId => {
|
|
191
204
|
if (!oxyInstance) {
|
|
192
205
|
throw new Error('OxyServices instance not configured. Call setOxyAssetInstance first.');
|
|
193
206
|
}
|
|
194
|
-
|
|
207
|
+
const {
|
|
208
|
+
file
|
|
209
|
+
} = await oxyInstance.assets.get(assetId);
|
|
210
|
+
return file?.variants ?? [];
|
|
195
211
|
}, []);
|
|
196
212
|
return {
|
|
197
213
|
// State
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useAssetStore","oxyInstance","setOxyAssetInstance","instance","useAssets","assets","uploadProgress","loading","errors","
|
|
1
|
+
{"version":3,"names":["useCallback","useAssetStore","oxyInstance","setOxyAssetInstance","instance","useAssets","assets","uploadProgress","loading","errors","mergeAsset","setAssets","removeAsset","setUploadProgress","removeUploadProgress","addLink","removeLink","setUploading","setLinking","setDeleting","setUploadError","setLinkError","setDeleteError","clearErrors","getAssetsByApp","getAssetsByEntity","getAssetUsageCount","isAssetLinked","reset","upload","file","metadata","Error","result","fileId","id","uploaded","size","total","percentage","status","setTimeout","error","message","link","assetId","app","entityType","entityId","visibility","undefined","createdBy","createdAt","Date","toISOString","unlink","getUrl","variant","expiresIn","url","getAsset","get","deleteAsset","force","delete","restore","getVariants","variants","Object","values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,OAAO;IACPC,WAAW;IAEX;IACA1C,cAAc;IACdC,iBAAiB;IACjBC,kBAAkB;IAClBC,aAAa;IAEb;IACAJ,WAAW;IACXK;EACF,CAAC;AACH,CAAC","ignoreList":[]}
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* one entry into it.
|
|
15
15
|
* 2. The surface resolves with the cropped JPEG, with `{ removed: true }` when
|
|
16
16
|
* the user removed their photo, or `undefined` when they cancelled.
|
|
17
|
-
* 3. A crop is uploaded as a NEW file via `oxyServices.
|
|
17
|
+
* 3. A crop is uploaded as a NEW file via `oxyServices.assets.upload` and set as
|
|
18
18
|
* the avatar; a removal clears the avatar field.
|
|
19
19
|
*
|
|
20
20
|
* `expo-image-manipulator` is required for the crop step and `expo-image-picker`
|
|
@@ -28,7 +28,7 @@ import { toast } from '@oxy.so/bloom/toast';
|
|
|
28
28
|
import { updateProfileWithAvatar } from "../utils/avatarUtils.js";
|
|
29
29
|
import { openWithinOrPresent } from "../navigation/surfaces.js";
|
|
30
30
|
|
|
31
|
-
/** Upload result shape returned by oxyServices.
|
|
31
|
+
/** Upload result shape returned by oxyServices.assets.upload (single-file path). */
|
|
32
32
|
|
|
33
33
|
function extractUploadedFileId(result) {
|
|
34
34
|
if (!result) return undefined;
|
|
@@ -50,11 +50,13 @@ export function useAvatarPicker({
|
|
|
50
50
|
*/
|
|
51
51
|
const finalizeCroppedAvatar = useCallback(async cropped => {
|
|
52
52
|
try {
|
|
53
|
-
const uploadResult = await oxyServices.
|
|
53
|
+
const uploadResult = await oxyServices.assets.upload({
|
|
54
54
|
uri: cropped.uri,
|
|
55
55
|
type: cropped.mime,
|
|
56
56
|
name: `avatar-${Date.now()}.jpg`
|
|
57
|
-
},
|
|
57
|
+
}, {
|
|
58
|
+
visibility: 'public'
|
|
59
|
+
});
|
|
58
60
|
const newFileId = extractUploadedFileId(uploadResult);
|
|
59
61
|
if (!newFileId) {
|
|
60
62
|
throw new Error('Avatar upload succeeded but no file ID was returned');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","translate","updateAvatarVisibility","toast","updateProfileWithAvatar","openWithinOrPresent","extractUploadedFileId","result","undefined","id","file","first","files","useAvatarPicker","oxyServices","currentLanguage","activeSessionId","queryClient","finalizeCroppedAvatar","cropped","uploadResult","
|
|
1
|
+
{"version":3,"names":["useCallback","translate","updateAvatarVisibility","toast","updateProfileWithAvatar","openWithinOrPresent","extractUploadedFileId","result","undefined","id","file","first","files","useAvatarPicker","oxyServices","currentLanguage","activeSessionId","queryClient","finalizeCroppedAvatar","cropped","uploadResult","assets","upload","uri","type","mime","name","Date","now","visibility","newFileId","Error","avatar","success","e","message","error","removeAvatar","openAvatarPicker"],"sourceRoot":"../../../../src","sources":["ui/hooks/useAvatarPicker.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAQ,OAAO;AAEnC,SAASC,SAAS,EAAEC,sBAAsB,QAAQ,cAAc;AAEhE,SAASC,KAAK,QAAQ,qBAAqB;AAC3C,SAASC,uBAAuB,QAAQ,yBAAsB;AAC9D,SAASC,mBAAmB,QAAQ,2BAAwB;;AAU5D;;AAOA,SAASC,qBAAqBA,CAACC,MAAqC,EAAsB;EACxF,IAAI,CAACA,MAAM,EAAE,OAAOC,SAAS;EAC7B,IAAI,OAAOD,MAAM,CAACE,EAAE,KAAK,QAAQ,EAAE,OAAOF,MAAM,CAACE,EAAE;EACnD,IAAIF,MAAM,CAACG,IAAI,EAAED,EAAE,EAAE,OAAOF,MAAM,CAACG,IAAI,CAACD,EAAE;EAC1C,MAAME,KAAK,GAAGJ,MAAM,CAACK,KAAK,GAAG,CAAC,CAAC;EAC/B,IAAID,KAAK,EAAEF,EAAE,EAAE,OAAOE,KAAK,CAACF,EAAE;EAC9B,OAAOD,SAAS;AAClB;AAEA,OAAO,SAASK,eAAeA,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