@oxyhq/services 13.0.2 → 13.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/lib/commonjs/index.js +18 -11
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/components/AccountMenuButton.js +8 -10
- package/lib/commonjs/ui/components/AccountMenuButton.js.map +1 -1
- package/lib/commonjs/ui/components/AccountSwitcher.js +65 -35
- package/lib/commonjs/ui/components/AccountSwitcher.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileButton.js +233 -0
- package/lib/commonjs/ui/components/ProfileButton.js.map +1 -0
- package/lib/commonjs/ui/components/ProfileMenu.js +374 -0
- package/lib/commonjs/ui/components/ProfileMenu.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +213 -101
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +28 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +2 -2
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js +12 -12
- package/lib/commonjs/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js +8 -7
- package/lib/commonjs/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/commonjs/ui/index.js +14 -0
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +11 -6
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +3 -3
- package/lib/commonjs/ui/screens/CreateAccountScreen.js +6 -4
- package/lib/commonjs/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +8 -7
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +13 -13
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +7 -7
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +5 -5
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ManageAccountScreen.js +17 -18
- package/lib/commonjs/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +3 -3
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +9 -9
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +4 -4
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +6 -6
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +6 -6
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js +4 -4
- package/lib/commonjs/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js +4 -4
- package/lib/commonjs/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/activeAuthuser.js +76 -8
- package/lib/commonjs/ui/utils/activeAuthuser.js.map +1 -1
- package/lib/module/index.js +5 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/components/AccountMenuButton.js +8 -10
- package/lib/module/ui/components/AccountMenuButton.js.map +1 -1
- package/lib/module/ui/components/AccountSwitcher.js +65 -35
- package/lib/module/ui/components/AccountSwitcher.js.map +1 -1
- package/lib/module/ui/components/ProfileButton.js +228 -0
- package/lib/module/ui/components/ProfileButton.js.map +1 -0
- package/lib/module/ui/components/ProfileMenu.js +370 -0
- package/lib/module/ui/components/ProfileMenu.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +214 -102
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +29 -2
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +2 -2
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/usePaymentQueries.js +12 -12
- package/lib/module/ui/hooks/queries/usePaymentQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useServicesQueries.js +9 -7
- package/lib/module/ui/hooks/queries/useServicesQueries.js.map +1 -1
- package/lib/module/ui/index.js +2 -0
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +11 -6
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +3 -3
- package/lib/module/ui/screens/CreateAccountScreen.js +6 -4
- package/lib/module/ui/screens/CreateAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +8 -7
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +13 -13
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +7 -7
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +5 -5
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/ManageAccountScreen.js +17 -18
- package/lib/module/ui/screens/ManageAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +3 -3
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +9 -9
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +1 -1
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +4 -4
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +6 -6
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +6 -6
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustCenterScreen.js +4 -4
- package/lib/module/ui/screens/trust/TrustCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js +4 -4
- package/lib/module/ui/screens/trust/TrustRewardsScreen.js.map +1 -1
- package/lib/module/ui/utils/activeAuthuser.js +74 -9
- package/lib/module/ui/utils/activeAuthuser.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +4 -1
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts +5 -7
- package/lib/typescript/commonjs/ui/components/AccountMenuButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/AccountSwitcher.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/ActivityIndicator.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/CrossFadeIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/HelperText.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/HelperText.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts +46 -0
- package/lib/typescript/commonjs/ui/components/ProfileButton.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/ProfileMenu.d.ts +39 -0
- package/lib/typescript/commonjs/ui/components/ProfileMenu.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldAffix.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Adornment/TextFieldIcon.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Label/InputLabel.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldFlat.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts +2 -1
- package/lib/typescript/commonjs/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +11 -26
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts +1 -1
- package/lib/typescript/commonjs/ui/context/ThemeContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +2 -0
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts +3 -3
- package/lib/typescript/commonjs/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts +24 -0
- package/lib/typescript/commonjs/ui/utils/activeAuthuser.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +64 -61
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +26 -26
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AccountMenuButton.d.ts +5 -7
- package/lib/typescript/module/ui/components/AccountMenuButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/AccountSwitcher.d.ts +1 -1
- package/lib/typescript/module/ui/components/AccountSwitcher.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ActivityIndicator.d.ts +2 -2
- package/lib/typescript/module/ui/components/ActivityIndicator.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts +1 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts +4 -3
- package/lib/typescript/module/ui/components/CrossFadeIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FontLoader.d.ts +1 -1
- package/lib/typescript/module/ui/components/FontLoader.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/HelperText.d.ts +1 -1
- package/lib/typescript/module/ui/components/HelperText.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Icon.d.ts +1 -1
- package/lib/typescript/module/ui/components/Icon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts +3 -3
- package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/IconButton/utils.d.ts +1 -1
- package/lib/typescript/module/ui/components/IconButton/utils.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyPayButton.d.ts +1 -1
- package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileButton.d.ts +46 -0
- package/lib/typescript/module/ui/components/ProfileButton.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/ProfileMenu.d.ts +39 -0
- package/lib/typescript/module/ui/components/ProfileMenu.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts +2 -2
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Surface.d.ts +2 -2
- package/lib/typescript/module/ui/components/Surface.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts +3 -2
- package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts +3 -2
- package/lib/typescript/module/ui/components/TextField/Addons/Underline.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts +3 -3
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAdornment.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts +3 -3
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldAffix.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts +4 -4
- package/lib/typescript/module/ui/components/TextField/Adornment/TextFieldIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts +1 -1
- package/lib/typescript/module/ui/components/TextField/Adornment/utils.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts +2 -2
- package/lib/typescript/module/ui/components/TextField/Label/InputLabel.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts +3 -2
- package/lib/typescript/module/ui/components/TextField/Label/LabelBackground.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts +3 -2
- package/lib/typescript/module/ui/components/TextField/TextFieldFlat.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts +3 -2
- package/lib/typescript/module/ui/components/TextField/TextFieldOutlined.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/helpers.d.ts +3 -3
- package/lib/typescript/module/ui/components/TextField/helpers.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/types.d.ts +1 -1
- package/lib/typescript/module/ui/components/TextField/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField.d.ts +4 -4
- package/lib/typescript/module/ui/components/TextField.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts +3 -3
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts +3 -3
- package/lib/typescript/module/ui/components/TouchableRipple/TouchableRipple.native.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts +1 -1
- package/lib/typescript/module/ui/components/TouchableRipple/utils.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts +3 -3
- package/lib/typescript/module/ui/components/Typography/AnimatedText.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/accountMenuRows.d.ts +1 -1
- package/lib/typescript/module/ui/components/accountMenuRows.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts +1 -1
- package/lib/typescript/module/ui/components/feedback/ProgressIndicator.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/constants.d.ts +1 -1
- package/lib/typescript/module/ui/components/feedback/constants.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/useFeedbackForm.d.ts +1 -1
- package/lib/typescript/module/ui/components/feedback/useFeedbackForm.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/constants.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/constants.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts +1 -1
- package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/theming.d.ts +1 -1
- package/lib/typescript/module/ui/components/theming.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/OxyContext.d.ts +14 -29
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/ThemeContext.d.ts +1 -1
- package/lib/typescript/module/ui/context/ThemeContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts +2 -2
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/usePaymentQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queryClient.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useLanguageManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useSessionManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useStorage.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useStorage.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +30 -28
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.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/screens/AccountMembersScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AccountMembersScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts +4 -4
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ConnectedAppsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/CreateAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/FAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/HelpSupportScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ManageAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/NotificationsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts +2 -2
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/PreferencesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/ProfileScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/SavesCollectionsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRewardsScreen.d.ts +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 +1 -1
- package/lib/typescript/module/ui/screens/trust/TrustRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +2 -2
- package/lib/typescript/module/ui/server.d.ts.map +1 -1
- package/lib/typescript/module/ui/types/fileManagement.d.ts +1 -1
- package/lib/typescript/module/ui/types/fileManagement.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/activeAuthuser.d.ts +24 -0
- package/lib/typescript/module/ui/utils/activeAuthuser.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/package.json +21 -20
- package/src/index.ts +8 -5
- package/src/ui/components/AccountMenuButton.tsx +9 -11
- package/src/ui/components/AccountSwitcher.tsx +71 -37
- package/src/ui/components/ProfileButton.tsx +270 -0
- package/src/ui/components/ProfileMenu.tsx +416 -0
- package/src/ui/context/OxyContext.tsx +217 -130
- package/src/ui/context/hooks/useAuthOperations.ts +35 -2
- package/src/ui/hooks/queries/useAccountQueries.ts +2 -2
- package/src/ui/hooks/queries/usePaymentQueries.ts +12 -12
- package/src/ui/hooks/queries/useServicesQueries.ts +9 -6
- package/src/ui/index.ts +2 -0
- package/src/ui/screens/AccountSettingsScreen.tsx +9 -5
- package/src/ui/screens/AccountSwitcherScreen.tsx +3 -3
- package/src/ui/screens/CreateAccountScreen.tsx +6 -4
- package/src/ui/screens/EditProfileFieldScreen.tsx +8 -7
- package/src/ui/screens/FileManagementScreen.tsx +13 -13
- package/src/ui/screens/HistoryViewScreen.tsx +7 -7
- package/src/ui/screens/LanguageSelectorScreen.tsx +5 -5
- package/src/ui/screens/ManageAccountScreen.tsx +17 -18
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +3 -3
- package/src/ui/screens/PrivacySettingsScreen.tsx +9 -9
- package/src/ui/screens/ProfileScreen.tsx +1 -1
- package/src/ui/screens/SavesCollectionsScreen.tsx +5 -5
- package/src/ui/screens/SearchSettingsScreen.tsx +6 -6
- package/src/ui/screens/WelcomeNewUserScreen.tsx +6 -6
- package/src/ui/screens/trust/TrustCenterScreen.tsx +5 -5
- package/src/ui/screens/trust/TrustRewardsScreen.tsx +4 -4
- package/src/ui/utils/__tests__/activeAuthuser.test.ts +75 -0
- package/src/ui/utils/activeAuthuser.ts +74 -8
- package/lib/commonjs/ui/components/ActiveAccountBanner.js +0 -144
- package/lib/commonjs/ui/components/ActiveAccountBanner.js.map +0 -1
- package/lib/module/ui/components/ActiveAccountBanner.js +0 -141
- package/lib/module/ui/components/ActiveAccountBanner.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts +0 -4
- package/lib/typescript/commonjs/ui/components/ActiveAccountBanner.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts +0 -4
- package/lib/typescript/module/ui/components/ActiveAccountBanner.d.ts.map +0 -1
- package/src/ui/components/ActiveAccountBanner.tsx +0 -130
|
@@ -22,7 +22,7 @@ const TrustCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
22
22
|
}) => {
|
|
23
23
|
// Reputation/trust is the ACTIVE account's standing (the org/project/bot
|
|
24
24
|
// when switched, else the personal user).
|
|
25
|
-
const {
|
|
25
|
+
const { user, oxyServices, isAuthenticated } = useOxy();
|
|
26
26
|
const { t } = useI18n();
|
|
27
27
|
const [reputationTotal, setReputationTotal] = useState<number | null>(null);
|
|
28
28
|
const [trustTier, setTrustTier] = useState<TrustTier | null>(null);
|
|
@@ -34,12 +34,12 @@ const TrustCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
34
34
|
const primaryColor = bloomTheme.colors.primary;
|
|
35
35
|
|
|
36
36
|
useEffect(() => {
|
|
37
|
-
if (!
|
|
37
|
+
if (!user) return;
|
|
38
38
|
setIsLoading(true);
|
|
39
39
|
setError(null);
|
|
40
40
|
Promise.all([
|
|
41
|
-
oxyServices.getReputationBalance(
|
|
42
|
-
oxyServices.getReputationTransactions(
|
|
41
|
+
oxyServices.getReputationBalance(user.id),
|
|
42
|
+
oxyServices.getReputationTransactions(user.id, 20, 0),
|
|
43
43
|
])
|
|
44
44
|
.then(([balance, txns]) => {
|
|
45
45
|
setReputationTotal(balance.total);
|
|
@@ -53,7 +53,7 @@ const TrustCenterScreen: React.FC<BaseScreenProps> = ({
|
|
|
53
53
|
);
|
|
54
54
|
})
|
|
55
55
|
.finally(() => setIsLoading(false));
|
|
56
|
-
}, [
|
|
56
|
+
}, [user, oxyServices, t]);
|
|
57
57
|
|
|
58
58
|
const trustTierLabel = useMemo(
|
|
59
59
|
() => (trustTier ? getTrustTierLabel(trustTier, t) : null),
|
|
@@ -79,7 +79,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack }) => {
|
|
|
79
79
|
const { t } = useI18n();
|
|
80
80
|
// Reputation/trust is the ACTIVE account's standing (the org/project/bot
|
|
81
81
|
// when switched, else the personal user).
|
|
82
|
-
const {
|
|
82
|
+
const { user, oxyServices, isAuthenticated } = useOxy();
|
|
83
83
|
const [reputationTotal, setReputationTotal] = useState<number>(0);
|
|
84
84
|
const [, setIsLoading] = useState(true);
|
|
85
85
|
|
|
@@ -87,12 +87,12 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack }) => {
|
|
|
87
87
|
const colors = bloomTheme.colors;
|
|
88
88
|
|
|
89
89
|
useEffect(() => {
|
|
90
|
-
if (!
|
|
90
|
+
if (!user || !isAuthenticated) {
|
|
91
91
|
setIsLoading(false);
|
|
92
92
|
return;
|
|
93
93
|
}
|
|
94
94
|
setIsLoading(true);
|
|
95
|
-
oxyServices.getReputationBalance(
|
|
95
|
+
oxyServices.getReputationBalance(user.id)
|
|
96
96
|
.then((balance) => {
|
|
97
97
|
setReputationTotal(balance.total || 0);
|
|
98
98
|
})
|
|
@@ -100,7 +100,7 @@ const TrustRewardsScreen: React.FC<BaseScreenProps> = ({ goBack }) => {
|
|
|
100
100
|
setReputationTotal(0);
|
|
101
101
|
})
|
|
102
102
|
.finally(() => setIsLoading(false));
|
|
103
|
-
}, [
|
|
103
|
+
}, [user, isAuthenticated, oxyServices]);
|
|
104
104
|
|
|
105
105
|
const achievements: Achievement[] = useMemo(() => [
|
|
106
106
|
{
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Fail-safe guarantees for the web `activeAuthuser` storage helpers.
|
|
3
|
+
*
|
|
4
|
+
* The PROPERTY ACCESS `window.localStorage` can throw a `SecurityError`
|
|
5
|
+
* synchronously in opaque-origin / sandboxed iframes or when storage is
|
|
6
|
+
* disabled — not just `getItem`/`setItem`. These helpers run during cold boot
|
|
7
|
+
* (and feed render-phase gate values in the providers), so they MUST never
|
|
8
|
+
* propagate that throw: reads fail safe to a benign default and writes no-op.
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import {
|
|
12
|
+
readActiveAuthuser,
|
|
13
|
+
writeActiveAuthuser,
|
|
14
|
+
clearActiveAuthuser,
|
|
15
|
+
markSignedOut,
|
|
16
|
+
clearSignedOut,
|
|
17
|
+
isSilentRestoreSuppressed,
|
|
18
|
+
} from '../activeAuthuser';
|
|
19
|
+
|
|
20
|
+
describe('activeAuthuser helpers — localStorage fail-safe', () => {
|
|
21
|
+
const realDescriptor = Object.getOwnPropertyDescriptor(window, 'localStorage');
|
|
22
|
+
|
|
23
|
+
afterEach(() => {
|
|
24
|
+
if (realDescriptor) {
|
|
25
|
+
Object.defineProperty(window, 'localStorage', realDescriptor);
|
|
26
|
+
}
|
|
27
|
+
window.localStorage?.clear?.();
|
|
28
|
+
});
|
|
29
|
+
|
|
30
|
+
/** Replace the `localStorage` accessor so reading the property throws. */
|
|
31
|
+
function makeLocalStorageGetterThrow(): void {
|
|
32
|
+
Object.defineProperty(window, 'localStorage', {
|
|
33
|
+
configurable: true,
|
|
34
|
+
get() {
|
|
35
|
+
throw new DOMException('denied', 'SecurityError');
|
|
36
|
+
},
|
|
37
|
+
});
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
it('readActiveAuthuser returns null (never throws) when the getter throws', () => {
|
|
41
|
+
makeLocalStorageGetterThrow();
|
|
42
|
+
expect(() => readActiveAuthuser()).not.toThrow();
|
|
43
|
+
expect(readActiveAuthuser()).toBeNull();
|
|
44
|
+
});
|
|
45
|
+
|
|
46
|
+
it('isSilentRestoreSuppressed returns false (never throws) when the getter throws', () => {
|
|
47
|
+
makeLocalStorageGetterThrow();
|
|
48
|
+
expect(() => isSilentRestoreSuppressed()).not.toThrow();
|
|
49
|
+
expect(isSilentRestoreSuppressed()).toBe(false);
|
|
50
|
+
});
|
|
51
|
+
|
|
52
|
+
it('writeActiveAuthuser / clearActiveAuthuser / markSignedOut / clearSignedOut no-op when the getter throws', () => {
|
|
53
|
+
makeLocalStorageGetterThrow();
|
|
54
|
+
expect(() => {
|
|
55
|
+
writeActiveAuthuser(2);
|
|
56
|
+
clearActiveAuthuser();
|
|
57
|
+
markSignedOut();
|
|
58
|
+
clearSignedOut();
|
|
59
|
+
}).not.toThrow();
|
|
60
|
+
});
|
|
61
|
+
|
|
62
|
+
it('round-trips normally when storage works (zero behavior change)', () => {
|
|
63
|
+
writeActiveAuthuser(3);
|
|
64
|
+
expect(readActiveAuthuser()).toBe(3);
|
|
65
|
+
|
|
66
|
+
expect(isSilentRestoreSuppressed()).toBe(false);
|
|
67
|
+
markSignedOut();
|
|
68
|
+
expect(isSilentRestoreSuppressed()).toBe(true);
|
|
69
|
+
clearSignedOut();
|
|
70
|
+
expect(isSilentRestoreSuppressed()).toBe(false);
|
|
71
|
+
|
|
72
|
+
clearActiveAuthuser();
|
|
73
|
+
expect(readActiveAuthuser()).toBeNull();
|
|
74
|
+
});
|
|
75
|
+
});
|
|
@@ -24,12 +24,28 @@ import {
|
|
|
24
24
|
ssoGuardKey,
|
|
25
25
|
ssoStateKey,
|
|
26
26
|
ssoDestKey,
|
|
27
|
+
ssoSignedOutKey,
|
|
28
|
+
silentRestoreSuppressed,
|
|
27
29
|
} from '@oxyhq/core';
|
|
28
30
|
|
|
29
31
|
const ACTIVE_AUTHUSER_KEY = 'oxy_active_authuser';
|
|
30
32
|
|
|
31
|
-
|
|
32
|
-
|
|
33
|
+
/**
|
|
34
|
+
* Safely resolve `window.localStorage`, returning `null` when it is
|
|
35
|
+
* unavailable. The PROPERTY ACCESS itself (`window.localStorage`) can throw a
|
|
36
|
+
* `SecurityError` synchronously in opaque-origin / sandboxed iframes or when
|
|
37
|
+
* storage is disabled — even `typeof window.localStorage` evaluates the getter
|
|
38
|
+
* and throws. Every read/write in this module routes through here so the getter
|
|
39
|
+
* throw is caught once, at the source, and callers stay clean. Returns `null`
|
|
40
|
+
* off-web and on any access failure (fail safe).
|
|
41
|
+
*/
|
|
42
|
+
function getLocalStorage(): Storage | null {
|
|
43
|
+
if (typeof window === 'undefined') return null;
|
|
44
|
+
try {
|
|
45
|
+
return window.localStorage ?? null;
|
|
46
|
+
} catch {
|
|
47
|
+
return null;
|
|
48
|
+
}
|
|
33
49
|
}
|
|
34
50
|
|
|
35
51
|
function getSessionStorage(): Storage | null {
|
|
@@ -49,11 +65,12 @@ function getSessionStorage(): Storage | null {
|
|
|
49
65
|
* fall back to deterministic selection (lowest authuser).
|
|
50
66
|
*/
|
|
51
67
|
export function readActiveAuthuser(): number | null {
|
|
52
|
-
|
|
68
|
+
const storage = getLocalStorage();
|
|
69
|
+
if (!storage) {
|
|
53
70
|
return null;
|
|
54
71
|
}
|
|
55
72
|
try {
|
|
56
|
-
const raw =
|
|
73
|
+
const raw = storage.getItem(ACTIVE_AUTHUSER_KEY);
|
|
57
74
|
if (raw === null) return null;
|
|
58
75
|
const parsed = Number.parseInt(raw, 10);
|
|
59
76
|
if (!Number.isFinite(parsed) || parsed < 0) return null;
|
|
@@ -69,10 +86,11 @@ export function readActiveAuthuser(): number | null {
|
|
|
69
86
|
* this succeeding — it is best-effort UX persistence, not authoritative.
|
|
70
87
|
*/
|
|
71
88
|
export function writeActiveAuthuser(authuser: number): void {
|
|
72
|
-
if (!hasLocalStorage()) return;
|
|
73
89
|
if (!Number.isFinite(authuser) || authuser < 0) return;
|
|
90
|
+
const storage = getLocalStorage();
|
|
91
|
+
if (!storage) return;
|
|
74
92
|
try {
|
|
75
|
-
|
|
93
|
+
storage.setItem(ACTIVE_AUTHUSER_KEY, String(authuser));
|
|
76
94
|
} catch {
|
|
77
95
|
// Best-effort persistence; swallow QuotaExceededError / SecurityError.
|
|
78
96
|
}
|
|
@@ -84,14 +102,62 @@ export function writeActiveAuthuser(authuser: number): void {
|
|
|
84
102
|
* cleared slot.
|
|
85
103
|
*/
|
|
86
104
|
export function clearActiveAuthuser(): void {
|
|
87
|
-
|
|
105
|
+
const storage = getLocalStorage();
|
|
106
|
+
if (!storage) return;
|
|
107
|
+
try {
|
|
108
|
+
storage.removeItem(ACTIVE_AUTHUSER_KEY);
|
|
109
|
+
} catch {
|
|
110
|
+
// Best-effort.
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Mark this origin as DELIBERATELY signed out (durable `localStorage`, via the
|
|
116
|
+
* core {@link ssoSignedOutKey}). Called ONLY on EXPLICIT full sign-out so that
|
|
117
|
+
* the next cold boot does NOT silently re-mint a session from a still-live IdP
|
|
118
|
+
* session (`fedcm-silent` / per-apex `/auth/silent` iframe). Cleared by any
|
|
119
|
+
* deliberate sign-in (see {@link clearSignedOut}). No-ops on native / storage
|
|
120
|
+
* failure (best-effort).
|
|
121
|
+
*/
|
|
122
|
+
export function markSignedOut(): void {
|
|
123
|
+
const storage = getLocalStorage();
|
|
124
|
+
if (!storage) return;
|
|
88
125
|
try {
|
|
89
|
-
window.
|
|
126
|
+
storage.setItem(ssoSignedOutKey(window.location.origin), '1');
|
|
127
|
+
} catch {
|
|
128
|
+
// Best-effort; swallow QuotaExceededError / SecurityError (private mode).
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Clear the durable deliberately-signed-out flag. Called on ANY deliberate
|
|
134
|
+
* sign-in (password, FedCM, account switch, device claim) so a real sign-in
|
|
135
|
+
* fully re-enables automatic silent restore — there is no "stuck signed out"
|
|
136
|
+
* state. No-ops on native / storage failure.
|
|
137
|
+
*/
|
|
138
|
+
export function clearSignedOut(): void {
|
|
139
|
+
const storage = getLocalStorage();
|
|
140
|
+
if (!storage) return;
|
|
141
|
+
try {
|
|
142
|
+
storage.removeItem(ssoSignedOutKey(window.location.origin));
|
|
90
143
|
} catch {
|
|
91
144
|
// Best-effort.
|
|
92
145
|
}
|
|
93
146
|
}
|
|
94
147
|
|
|
148
|
+
/**
|
|
149
|
+
* Whether AUTOMATIC silent restore is suppressed for the current origin because
|
|
150
|
+
* the user deliberately signed out. Reads the durable flag through the core
|
|
151
|
+
* {@link silentRestoreSuppressed} predicate. Returns `false` off-web and on any
|
|
152
|
+
* storage failure (fail safe toward normal restore). Used to gate the
|
|
153
|
+
* `fedcm-silent` and `silent-iframe` cold-boot steps.
|
|
154
|
+
*/
|
|
155
|
+
export function isSilentRestoreSuppressed(): boolean {
|
|
156
|
+
const storage = getLocalStorage();
|
|
157
|
+
if (!storage) return false;
|
|
158
|
+
return silentRestoreSuppressed(storage, window.location.origin);
|
|
159
|
+
}
|
|
160
|
+
|
|
95
161
|
/**
|
|
96
162
|
* Clear all per-origin SSO bounce sessionStorage keys. Called ONLY on EXPLICIT
|
|
97
163
|
* user sign-out (logout / logoutAll) — never on a cold-boot failure path — so a
|
|
@@ -1,144 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _vectorIcons = require("@expo/vector-icons");
|
|
10
|
-
var _theme = require("@oxyhq/bloom/theme");
|
|
11
|
-
var _OxyContext = require("../context/OxyContext.js");
|
|
12
|
-
var _core = require("@oxyhq/core");
|
|
13
|
-
var _useI18n = require("../hooks/useI18n.js");
|
|
14
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
15
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
16
|
-
/**
|
|
17
|
-
* ActiveAccountBanner — a subtle context cue shown when the active account is an
|
|
18
|
-
* account the user switched INTO (an org / project / bot / shared account)
|
|
19
|
-
* rather than their own personal account.
|
|
20
|
-
*
|
|
21
|
-
* Framing: this reads as the CURRENT account, NOT as delegation. There is no
|
|
22
|
-
* "acting as" / "on behalf of" copy and no "switch back" affordance — switching
|
|
23
|
-
* into an account makes the whole app become that account, and the banner simply
|
|
24
|
-
* confirms which account is active. To change accounts (including returning to
|
|
25
|
-
* the personal account) the user opens the unified account switcher and picks
|
|
26
|
-
* one; tapping the banner opens it.
|
|
27
|
-
*
|
|
28
|
-
* Renders nothing on the personal account. Place it in your app's layout where a
|
|
29
|
-
* persistent "you're in <Account>" cue is useful (typically below the header).
|
|
30
|
-
* The "account" here is the relational Account, NOT the cryptographic
|
|
31
|
-
* Commons/DID identity.
|
|
32
|
-
*/const ActiveAccountBanner = () => {
|
|
33
|
-
const bloomTheme = (0, _theme.useTheme)();
|
|
34
|
-
const {
|
|
35
|
-
actingAsAccount,
|
|
36
|
-
showBottomSheet,
|
|
37
|
-
oxyServices
|
|
38
|
-
} = (0, _OxyContext.useOxy)();
|
|
39
|
-
const {
|
|
40
|
-
t,
|
|
41
|
-
locale
|
|
42
|
-
} = (0, _useI18n.useI18n)();
|
|
43
|
-
const account = actingAsAccount?.account ?? null;
|
|
44
|
-
|
|
45
|
-
// Only a switched-into account warrants the cue; the personal account is the
|
|
46
|
-
// default and needs no banner.
|
|
47
|
-
if (!account) {
|
|
48
|
-
return null;
|
|
49
|
-
}
|
|
50
|
-
const displayName = (0, _core.getAccountDisplayName)(account, locale);
|
|
51
|
-
const handlePress = () => {
|
|
52
|
-
showBottomSheet?.('AccountSwitcher');
|
|
53
|
-
};
|
|
54
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
55
|
-
style: [styles.container, {
|
|
56
|
-
backgroundColor: `${bloomTheme.colors.primary}14`
|
|
57
|
-
}],
|
|
58
|
-
onPress: handlePress,
|
|
59
|
-
activeOpacity: 0.7,
|
|
60
|
-
accessibilityRole: "button",
|
|
61
|
-
accessibilityLabel: t('accounts.activeAccount.a11y', {
|
|
62
|
-
name: displayName
|
|
63
|
-
}) || `Active account: ${displayName}. Tap to switch accounts.`,
|
|
64
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
65
|
-
style: styles.content,
|
|
66
|
-
children: [account.avatar ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Image, {
|
|
67
|
-
source: {
|
|
68
|
-
uri: oxyServices.getFileDownloadUrl(account.avatar, 'thumb')
|
|
69
|
-
},
|
|
70
|
-
style: styles.avatar
|
|
71
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
72
|
-
style: [styles.avatarFallback, {
|
|
73
|
-
backgroundColor: `${bloomTheme.colors.primary}30`
|
|
74
|
-
}],
|
|
75
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
76
|
-
style: [styles.avatarText, {
|
|
77
|
-
color: bloomTheme.colors.primary
|
|
78
|
-
}],
|
|
79
|
-
children: displayName.charAt(0).toUpperCase()
|
|
80
|
-
})
|
|
81
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
82
|
-
style: styles.textContainer,
|
|
83
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
84
|
-
style: [styles.name, {
|
|
85
|
-
color: bloomTheme.colors.primary
|
|
86
|
-
}],
|
|
87
|
-
numberOfLines: 1,
|
|
88
|
-
children: displayName
|
|
89
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
90
|
-
style: [styles.caption, {
|
|
91
|
-
color: bloomTheme.colors.primary
|
|
92
|
-
}],
|
|
93
|
-
numberOfLines: 1,
|
|
94
|
-
children: t('accounts.activeAccount.label') || 'Active account'
|
|
95
|
-
})]
|
|
96
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
97
|
-
name: "chevron-down",
|
|
98
|
-
size: 18,
|
|
99
|
-
color: bloomTheme.colors.primary
|
|
100
|
-
})]
|
|
101
|
-
})
|
|
102
|
-
});
|
|
103
|
-
};
|
|
104
|
-
const styles = _reactNative.StyleSheet.create({
|
|
105
|
-
container: {
|
|
106
|
-
paddingHorizontal: 16,
|
|
107
|
-
paddingVertical: 10
|
|
108
|
-
},
|
|
109
|
-
content: {
|
|
110
|
-
flexDirection: 'row',
|
|
111
|
-
alignItems: 'center'
|
|
112
|
-
},
|
|
113
|
-
avatar: {
|
|
114
|
-
width: 24,
|
|
115
|
-
height: 24,
|
|
116
|
-
borderRadius: 12
|
|
117
|
-
},
|
|
118
|
-
avatarFallback: {
|
|
119
|
-
width: 24,
|
|
120
|
-
height: 24,
|
|
121
|
-
borderRadius: 12,
|
|
122
|
-
alignItems: 'center',
|
|
123
|
-
justifyContent: 'center'
|
|
124
|
-
},
|
|
125
|
-
avatarText: {
|
|
126
|
-
fontSize: 12,
|
|
127
|
-
fontWeight: _reactNative.Platform.OS === 'web' ? '600' : undefined
|
|
128
|
-
},
|
|
129
|
-
textContainer: {
|
|
130
|
-
flex: 1,
|
|
131
|
-
marginLeft: 10
|
|
132
|
-
},
|
|
133
|
-
name: {
|
|
134
|
-
fontSize: 14,
|
|
135
|
-
fontWeight: _reactNative.Platform.OS === 'web' ? '600' : undefined
|
|
136
|
-
},
|
|
137
|
-
caption: {
|
|
138
|
-
fontSize: 11,
|
|
139
|
-
opacity: 0.8,
|
|
140
|
-
marginTop: 1
|
|
141
|
-
}
|
|
142
|
-
});
|
|
143
|
-
var _default = exports.default = /*#__PURE__*/_react.default.memo(ActiveAccountBanner);
|
|
144
|
-
//# sourceMappingURL=ActiveAccountBanner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_vectorIcons","_theme","_OxyContext","_core","_useI18n","_jsxRuntime","e","__esModule","default","ActiveAccountBanner","bloomTheme","useTheme","actingAsAccount","showBottomSheet","oxyServices","useOxy","t","locale","useI18n","account","displayName","getAccountDisplayName","handlePress","jsx","TouchableOpacity","style","styles","container","backgroundColor","colors","primary","onPress","activeOpacity","accessibilityRole","accessibilityLabel","name","children","jsxs","View","content","avatar","Image","source","uri","getFileDownloadUrl","avatarFallback","Text","avatarText","color","charAt","toUpperCase","textContainer","numberOfLines","caption","Ionicons","size","StyleSheet","create","paddingHorizontal","paddingVertical","flexDirection","alignItems","width","height","borderRadius","justifyContent","fontSize","fontWeight","Platform","OS","undefined","flex","marginLeft","opacity","marginTop","_default","exports","React","memo"],"sourceRoot":"../../../../src","sources":["ui/components/ActiveAccountBanner.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAQA,IAAAE,YAAA,GAAAF,OAAA;AACA,IAAAG,MAAA,GAAAH,OAAA;AACA,IAAAI,WAAA,GAAAJ,OAAA;AACA,IAAAK,KAAA,GAAAL,OAAA;AACA,IAAAM,QAAA,GAAAN,OAAA;AAA2C,IAAAO,WAAA,GAAAP,OAAA;AAAA,SAAAD,uBAAAS,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAE3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GACA,MAAMG,mBAA6B,GAAGA,CAAA,KAAM;EAC1C,MAAMC,UAAU,GAAG,IAAAC,eAAQ,EAAC,CAAC;EAC7B,MAAM;IAAEC,eAAe;IAAEC,eAAe;IAAEC;EAAY,CAAC,GAAG,IAAAC,kBAAM,EAAC,CAAC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E;EAAC,CACS,CAAC;AAEvB,CAAC;AAED,MAAMJ,MAAM,GAAG8B,uBAAU,CAACC,MAAM,CAAC;EAC/B9B,SAAS,EAAE;IACT+B,iBAAiB,EAAE,EAAE;IACrBC,eAAe,EAAE;EACnB,CAAC;EACDpB,OAAO,EAAE;IACPqB,aAAa,EAAE,KAAK;IACpBC,UAAU,EAAE;EACd,CAAC;EACDrB,MAAM,EAAE;IACNsB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE;EAChB,CAAC;EACDnB,cAAc,EAAE;IACdiB,KAAK,EAAE,EAAE;IACTC,MAAM,EAAE,EAAE;IACVC,YAAY,EAAE,EAAE;IAChBH,UAAU,EAAE,QAAQ;IACpBI,cAAc,EAAE;EAClB,CAAC;EACDlB,UAAU,EAAE;IACVmB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAEC,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAAG,KAAK,GAAGC;EAC9C,CAAC;EACDnB,aAAa,EAAE;IACboB,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE;EACd,CAAC;EACDrC,IAAI,EAAE;IACJ+B,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAEC,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAAG,KAAK,GAAGC;EAC9C,CAAC;EACDjB,OAAO,EAAE;IACPa,QAAQ,EAAE,EAAE;IACZO,OAAO,EAAE,GAAG;IACZC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAApE,OAAA,gBAEYqE,cAAK,CAACC,IAAI,CAACrE,mBAAmB,CAAC","ignoreList":[]}
|
|
@@ -1,141 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
import React from 'react';
|
|
4
|
-
import { View, Text, TouchableOpacity, StyleSheet, Platform, Image } from 'react-native';
|
|
5
|
-
import { Ionicons } from '@expo/vector-icons';
|
|
6
|
-
import { useTheme } from '@oxyhq/bloom/theme';
|
|
7
|
-
import { useOxy } from "../context/OxyContext.js";
|
|
8
|
-
import { getAccountDisplayName } from '@oxyhq/core';
|
|
9
|
-
import { useI18n } from "../hooks/useI18n.js";
|
|
10
|
-
|
|
11
|
-
/**
|
|
12
|
-
* ActiveAccountBanner — a subtle context cue shown when the active account is an
|
|
13
|
-
* account the user switched INTO (an org / project / bot / shared account)
|
|
14
|
-
* rather than their own personal account.
|
|
15
|
-
*
|
|
16
|
-
* Framing: this reads as the CURRENT account, NOT as delegation. There is no
|
|
17
|
-
* "acting as" / "on behalf of" copy and no "switch back" affordance — switching
|
|
18
|
-
* into an account makes the whole app become that account, and the banner simply
|
|
19
|
-
* confirms which account is active. To change accounts (including returning to
|
|
20
|
-
* the personal account) the user opens the unified account switcher and picks
|
|
21
|
-
* one; tapping the banner opens it.
|
|
22
|
-
*
|
|
23
|
-
* Renders nothing on the personal account. Place it in your app's layout where a
|
|
24
|
-
* persistent "you're in <Account>" cue is useful (typically below the header).
|
|
25
|
-
* The "account" here is the relational Account, NOT the cryptographic
|
|
26
|
-
* Commons/DID identity.
|
|
27
|
-
*/
|
|
28
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
29
|
-
const ActiveAccountBanner = () => {
|
|
30
|
-
const bloomTheme = useTheme();
|
|
31
|
-
const {
|
|
32
|
-
actingAsAccount,
|
|
33
|
-
showBottomSheet,
|
|
34
|
-
oxyServices
|
|
35
|
-
} = useOxy();
|
|
36
|
-
const {
|
|
37
|
-
t,
|
|
38
|
-
locale
|
|
39
|
-
} = useI18n();
|
|
40
|
-
const account = actingAsAccount?.account ?? null;
|
|
41
|
-
|
|
42
|
-
// Only a switched-into account warrants the cue; the personal account is the
|
|
43
|
-
// default and needs no banner.
|
|
44
|
-
if (!account) {
|
|
45
|
-
return null;
|
|
46
|
-
}
|
|
47
|
-
const displayName = getAccountDisplayName(account, locale);
|
|
48
|
-
const handlePress = () => {
|
|
49
|
-
showBottomSheet?.('AccountSwitcher');
|
|
50
|
-
};
|
|
51
|
-
return /*#__PURE__*/_jsx(TouchableOpacity, {
|
|
52
|
-
style: [styles.container, {
|
|
53
|
-
backgroundColor: `${bloomTheme.colors.primary}14`
|
|
54
|
-
}],
|
|
55
|
-
onPress: handlePress,
|
|
56
|
-
activeOpacity: 0.7,
|
|
57
|
-
accessibilityRole: "button",
|
|
58
|
-
accessibilityLabel: t('accounts.activeAccount.a11y', {
|
|
59
|
-
name: displayName
|
|
60
|
-
}) || `Active account: ${displayName}. Tap to switch accounts.`,
|
|
61
|
-
children: /*#__PURE__*/_jsxs(View, {
|
|
62
|
-
style: styles.content,
|
|
63
|
-
children: [account.avatar ? /*#__PURE__*/_jsx(Image, {
|
|
64
|
-
source: {
|
|
65
|
-
uri: oxyServices.getFileDownloadUrl(account.avatar, 'thumb')
|
|
66
|
-
},
|
|
67
|
-
style: styles.avatar
|
|
68
|
-
}) : /*#__PURE__*/_jsx(View, {
|
|
69
|
-
style: [styles.avatarFallback, {
|
|
70
|
-
backgroundColor: `${bloomTheme.colors.primary}30`
|
|
71
|
-
}],
|
|
72
|
-
children: /*#__PURE__*/_jsx(Text, {
|
|
73
|
-
style: [styles.avatarText, {
|
|
74
|
-
color: bloomTheme.colors.primary
|
|
75
|
-
}],
|
|
76
|
-
children: displayName.charAt(0).toUpperCase()
|
|
77
|
-
})
|
|
78
|
-
}), /*#__PURE__*/_jsxs(View, {
|
|
79
|
-
style: styles.textContainer,
|
|
80
|
-
children: [/*#__PURE__*/_jsx(Text, {
|
|
81
|
-
style: [styles.name, {
|
|
82
|
-
color: bloomTheme.colors.primary
|
|
83
|
-
}],
|
|
84
|
-
numberOfLines: 1,
|
|
85
|
-
children: displayName
|
|
86
|
-
}), /*#__PURE__*/_jsx(Text, {
|
|
87
|
-
style: [styles.caption, {
|
|
88
|
-
color: bloomTheme.colors.primary
|
|
89
|
-
}],
|
|
90
|
-
numberOfLines: 1,
|
|
91
|
-
children: t('accounts.activeAccount.label') || 'Active account'
|
|
92
|
-
})]
|
|
93
|
-
}), /*#__PURE__*/_jsx(Ionicons, {
|
|
94
|
-
name: "chevron-down",
|
|
95
|
-
size: 18,
|
|
96
|
-
color: bloomTheme.colors.primary
|
|
97
|
-
})]
|
|
98
|
-
})
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
const styles = StyleSheet.create({
|
|
102
|
-
container: {
|
|
103
|
-
paddingHorizontal: 16,
|
|
104
|
-
paddingVertical: 10
|
|
105
|
-
},
|
|
106
|
-
content: {
|
|
107
|
-
flexDirection: 'row',
|
|
108
|
-
alignItems: 'center'
|
|
109
|
-
},
|
|
110
|
-
avatar: {
|
|
111
|
-
width: 24,
|
|
112
|
-
height: 24,
|
|
113
|
-
borderRadius: 12
|
|
114
|
-
},
|
|
115
|
-
avatarFallback: {
|
|
116
|
-
width: 24,
|
|
117
|
-
height: 24,
|
|
118
|
-
borderRadius: 12,
|
|
119
|
-
alignItems: 'center',
|
|
120
|
-
justifyContent: 'center'
|
|
121
|
-
},
|
|
122
|
-
avatarText: {
|
|
123
|
-
fontSize: 12,
|
|
124
|
-
fontWeight: Platform.OS === 'web' ? '600' : undefined
|
|
125
|
-
},
|
|
126
|
-
textContainer: {
|
|
127
|
-
flex: 1,
|
|
128
|
-
marginLeft: 10
|
|
129
|
-
},
|
|
130
|
-
name: {
|
|
131
|
-
fontSize: 14,
|
|
132
|
-
fontWeight: Platform.OS === 'web' ? '600' : undefined
|
|
133
|
-
},
|
|
134
|
-
caption: {
|
|
135
|
-
fontSize: 11,
|
|
136
|
-
opacity: 0.8,
|
|
137
|
-
marginTop: 1
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
export default /*#__PURE__*/React.memo(ActiveAccountBanner);
|
|
141
|
-
//# sourceMappingURL=ActiveAccountBanner.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["React","View","Text","TouchableOpacity","StyleSheet","Platform","Image","Ionicons","useTheme","useOxy","getAccountDisplayName","useI18n","jsx","_jsx","jsxs","_jsxs","ActiveAccountBanner","bloomTheme","actingAsAccount","showBottomSheet","oxyServices","t","locale","account","displayName","handlePress","style","styles","container","backgroundColor","colors","primary","onPress","activeOpacity","accessibilityRole","accessibilityLabel","name","children","content","avatar","source","uri","getFileDownloadUrl","avatarFallback","avatarText","color","charAt","toUpperCase","textContainer","numberOfLines","caption","size","create","paddingHorizontal","paddingVertical","flexDirection","alignItems","width","height","borderRadius","justifyContent","fontSize","fontWeight","OS","undefined","flex","marginLeft","opacity","marginTop","memo"],"sourceRoot":"../../../../src","sources":["ui/components/ActiveAccountBanner.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SACEC,IAAI,EACJC,IAAI,EACJC,gBAAgB,EAChBC,UAAU,EACVC,QAAQ,EACRC,KAAK,QACA,cAAc;AACrB,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,QAAQ,QAAQ,oBAAoB;AAC7C,SAASC,MAAM,QAAQ,0BAAuB;AAC9C,SAASC,qBAAqB,QAAQ,aAAa;AACnD,SAASC,OAAO,QAAQ,qBAAkB;;AAE1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AAhBA,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAiBA,MAAMC,mBAA6B,GAAGA,CAAA,KAAM;EAC1C,MAAMC,UAAU,GAAGT,QAAQ,CAAC,CAAC;EAC7B,MAAM;IAAEU,eAAe;IAAEC,eAAe;IAAEC;EAAY,CAAC,GAAGX,MAAM,CAAC,CAAC;EAClE,MAAM;IAAEY,CAAC;IAAEC;EAAO,CAAC,GAAGX,OAAO,CAAC,CAAC;EAE/B,MAAMY,OAAO,GAAGL,eAAe,EAAEK,OAAO,IAAI,IAAI;;EAEhD;EACA;EACA,IAAI,CAACA,OAAO,EAAE;IACZ,OAAO,IAAI;EACb;EAEA,MAAMC,WAA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CAAC0D,EAAE,KAAK,KAAK,GAAG,KAAK,GAAGC;EAC9C,CAAC;EACDhB,aAAa,EAAE;IACbiB,IAAI,EAAE,CAAC;IACPC,UAAU,EAAE;EACd,CAAC;EACD9B,IAAI,EAAE;IACJyB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAEzD,QAAQ,CAAC0D,EAAE,KAAK,KAAK,GAAG,KAAK,GAAGC;EAC9C,CAAC;EACDd,OAAO,EAAE;IACPW,QAAQ,EAAE,EAAE;IACZM,OAAO,EAAE,GAAG;IACZC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAEF,4BAAepE,KAAK,CAACqE,IAAI,CAACrD,mBAAmB,CAAC","ignoreList":[]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActiveAccountBanner.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ActiveAccountBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;;AAiI1B,wBAA+C"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"ActiveAccountBanner.d.ts","sourceRoot":"","sources":["../../../../../src/ui/components/ActiveAccountBanner.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;;AAiI1B,wBAA+C"}
|