@oxyhq/services 6.9.46 → 6.10.1
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 +36 -13
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/ui/client.js +0 -20
- package/lib/commonjs/ui/client.js.map +1 -1
- package/lib/commonjs/ui/components/ActingAsBanner.js +0 -4
- package/lib/commonjs/ui/components/ActingAsBanner.js.map +1 -1
- package/lib/commonjs/ui/components/ActivityIndicator.js +1 -1
- package/lib/commonjs/ui/components/ActivityIndicator.js.map +1 -1
- package/lib/commonjs/ui/components/Avatar.js +0 -2
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheet.js +33 -398
- package/lib/commonjs/ui/components/BottomSheet.js.map +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +8 -0
- package/lib/commonjs/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +3 -5
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +0 -5
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/Icon.js +6 -7
- package/lib/commonjs/ui/components/Icon.js.map +1 -1
- package/lib/commonjs/ui/components/IconButton/IconButton.js +1 -5
- package/lib/commonjs/ui/components/IconButton/IconButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js +0 -2
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +100 -37
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +23 -9
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +11 -8
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
- package/lib/commonjs/ui/components/QuickActions.js +2 -2
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +139 -284
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js +0 -2
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/components/TextField.js +0 -1
- package/lib/commonjs/ui/components/TextField.js.map +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js +1 -1
- package/lib/commonjs/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +0 -2
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js +0 -2
- package/lib/commonjs/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +80 -76
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +6 -8
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +18 -23
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/styles.js +213 -25
- package/lib/commonjs/ui/components/fileManagement/styles.js.map +1 -1
- package/lib/commonjs/ui/components/logo/LogoIcon.js +63 -0
- package/lib/commonjs/ui/components/logo/LogoIcon.js.map +1 -0
- package/lib/commonjs/ui/components/logo/LogoText.js +50 -0
- package/lib/commonjs/ui/components/logo/LogoText.js.map +1 -0
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +54 -88
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +2 -2
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/paymentStyles.js +2 -10
- package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/commonjs/ui/components/styles/overlay.js +7 -9
- package/lib/commonjs/ui/components/styles/overlay.js.map +1 -1
- package/lib/commonjs/ui/components/theming.js +0 -1
- package/lib/commonjs/ui/components/theming.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +34 -21
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +1 -3
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +32 -12
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +10 -5
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationKeys.js +34 -0
- package/lib/commonjs/ui/hooks/mutations/mutationKeys.js.map +1 -0
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +235 -57
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +17 -13
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/index.js +6 -0
- package/lib/commonjs/ui/hooks/queries/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js +2 -1
- package/lib/commonjs/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js +80 -3
- package/lib/commonjs/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js +36 -1
- package/lib/commonjs/ui/hooks/queries/useSecurityQueries.js.map +1 -1
- package/lib/commonjs/ui/hooks/queryClient.js +168 -70
- package/lib/commonjs/ui/hooks/queryClient.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js +7 -7
- package/lib/commonjs/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAuth.js +0 -8
- package/lib/commonjs/ui/hooks/useAuth.js.map +1 -1
- package/lib/commonjs/ui/hooks/useAvatarPicker.js +71 -20
- package/lib/commonjs/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js +12 -41
- package/lib/commonjs/ui/hooks/useFileDownloadUrl.js.map +1 -1
- package/lib/commonjs/ui/hooks/useMutationStatus.js +86 -0
- package/lib/commonjs/ui/hooks/useMutationStatus.js.map +1 -0
- package/lib/commonjs/ui/hooks/useOnlineStatus.js +33 -0
- package/lib/commonjs/ui/hooks/useOnlineStatus.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSessionSocket.js +101 -130
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js +4 -4
- package/lib/commonjs/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/commonjs/ui/index.js +1 -11
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +55 -3
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +16 -16
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +108 -123
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +20 -19
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +204 -161
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +18 -18
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +22 -23
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AvatarCropScreen.js +939 -0
- package/lib/commonjs/ui/screens/AvatarCropScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js +13 -20
- package/lib/commonjs/ui/screens/CreateManagedAccountScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +10 -13
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FAQScreen.js +4 -4
- package/lib/commonjs/ui/screens/FAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +17 -15
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +797 -159
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +8 -9
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +29 -21
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +3 -5
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +5 -5
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +2 -2
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +75 -73
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +32 -21
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +4 -3
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +3 -3
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +57 -56
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +2 -3
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +39 -22
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +18 -21
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +0 -3
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +6 -10
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +6 -6
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +13 -19
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +5 -5
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/commonjs/ui/server.js +0 -5
- package/lib/commonjs/ui/server.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +0 -5
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
- package/lib/commonjs/ui/styles/index.js +0 -11
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/commonjs/ui/styles/spacing.js +1 -42
- package/lib/commonjs/ui/styles/spacing.js.map +1 -1
- package/lib/commonjs/ui/styles/theme.js +0 -4
- package/lib/commonjs/ui/styles/theme.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +58 -39
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/commonjs/ui/utils/sessionHelpers.js +3 -1
- package/lib/commonjs/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/commonjs/ui/utils/userUtils.js +33 -16
- package/lib/commonjs/ui/utils/userUtils.js.map +1 -1
- package/lib/module/index.js +9 -5
- package/lib/module/index.js.map +1 -1
- package/lib/module/ui/client.js +0 -6
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/ActingAsBanner.js +0 -4
- package/lib/module/ui/components/ActingAsBanner.js.map +1 -1
- package/lib/module/ui/components/ActivityIndicator.js +1 -1
- package/lib/module/ui/components/ActivityIndicator.js.map +1 -1
- package/lib/module/ui/components/Avatar.js +0 -2
- package/lib/module/ui/components/Avatar.js.map +1 -1
- package/lib/module/ui/components/BottomSheet.js +35 -400
- package/lib/module/ui/components/BottomSheet.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +9 -1
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +2 -4
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/Header.js +0 -5
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/Icon.js +6 -7
- package/lib/module/ui/components/Icon.js.map +1 -1
- package/lib/module/ui/components/IconButton/IconButton.js +1 -5
- package/lib/module/ui/components/IconButton/IconButton.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +0 -2
- package/lib/module/ui/components/OxyPayButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +103 -40
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +23 -9
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +11 -8
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/QuickActions.js +2 -2
- package/lib/module/ui/components/QuickActions.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +137 -284
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/StepBasedScreen.js +0 -2
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/module/ui/components/TextField.js +0 -1
- package/lib/module/ui/components/TextField.js.map +1 -1
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js +1 -1
- package/lib/module/ui/components/TouchableRipple/TouchableRipple.native.js.map +1 -1
- package/lib/module/ui/components/feedback/feedbackStyles.js +0 -2
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js +0 -1
- package/lib/module/ui/components/fileManagement/AnimatedButton.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +80 -75
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +6 -7
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +18 -22
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/fileManagement/styles.js +212 -24
- package/lib/module/ui/components/fileManagement/styles.js.map +1 -1
- package/lib/module/ui/components/logo/LogoIcon.js +56 -0
- package/lib/module/ui/components/logo/LogoIcon.js.map +1 -0
- package/lib/module/ui/components/logo/LogoText.js +43 -0
- package/lib/module/ui/components/logo/LogoText.js.map +1 -0
- package/lib/module/ui/components/modals/DeleteAccountModal.js +55 -88
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/paymentStyles.js +2 -10
- package/lib/module/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/module/ui/components/styles/overlay.js +8 -8
- package/lib/module/ui/components/styles/overlay.js.map +1 -1
- package/lib/module/ui/components/theming.js +0 -1
- package/lib/module/ui/components/theming.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +32 -19
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +1 -3
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/hooks/index.js +5 -3
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +6 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationKeys.js +30 -0
- package/lib/module/ui/hooks/mutations/mutationKeys.js.map +1 -0
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +231 -52
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +9 -5
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/queries/index.js +1 -1
- package/lib/module/ui/hooks/queries/index.js.map +1 -1
- package/lib/module/ui/hooks/queries/queryKeys.js +2 -1
- package/lib/module/ui/hooks/queries/queryKeys.js.map +1 -1
- package/lib/module/ui/hooks/queries/useAccountQueries.js +80 -3
- package/lib/module/ui/hooks/queries/useAccountQueries.js.map +1 -1
- package/lib/module/ui/hooks/queries/useSecurityQueries.js +35 -1
- package/lib/module/ui/hooks/queries/useSecurityQueries.js.map +1 -1
- package/lib/module/ui/hooks/queryClient.js +166 -68
- package/lib/module/ui/hooks/queryClient.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +3 -3
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/module/ui/hooks/useAuth.js +0 -3
- package/lib/module/ui/hooks/useAuth.js.map +1 -1
- package/lib/module/ui/hooks/useAvatarPicker.js +73 -22
- package/lib/module/ui/hooks/useAvatarPicker.js.map +1 -1
- package/lib/module/ui/hooks/useFileDownloadUrl.js +11 -39
- package/lib/module/ui/hooks/useFileDownloadUrl.js.map +1 -1
- package/lib/module/ui/hooks/useMutationStatus.js +82 -0
- package/lib/module/ui/hooks/useMutationStatus.js.map +1 -0
- package/lib/module/ui/hooks/useOnlineStatus.js +29 -0
- package/lib/module/ui/hooks/useOnlineStatus.js.map +1 -0
- package/lib/module/ui/hooks/useSessionSocket.js +101 -130
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js +1 -1
- package/lib/module/ui/hooks/useSettingToggle.js.map +1 -1
- package/lib/module/ui/index.js +1 -10
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +54 -2
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +15 -14
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +96 -111
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +19 -18
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +189 -145
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +15 -15
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +14 -15
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/AvatarCropScreen.js +936 -0
- package/lib/module/ui/screens/AvatarCropScreen.js.map +1 -0
- package/lib/module/ui/screens/CreateManagedAccountScreen.js +11 -18
- package/lib/module/ui/screens/CreateManagedAccountScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +8 -11
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +3 -3
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +14 -12
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +764 -125
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HelpSupportScreen.js +2 -3
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +26 -17
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +1 -3
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +3 -3
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +2 -2
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +60 -57
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +27 -16
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +4 -3
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +2 -2
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +48 -47
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +2 -3
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +40 -23
- package/lib/module/ui/screens/UserListScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +16 -19
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +0 -3
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +6 -10
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +6 -6
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +13 -19
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +5 -5
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/server.js +0 -4
- package/lib/module/ui/server.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +0 -5
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/module/ui/styles/index.js +0 -1
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/styles/spacing.js +0 -42
- package/lib/module/ui/styles/spacing.js.map +1 -1
- package/lib/module/ui/styles/theme.js +0 -4
- package/lib/module/ui/styles/theme.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +54 -36
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/sessionHelpers.js +3 -1
- package/lib/module/ui/utils/sessionHelpers.js.map +1 -1
- package/lib/module/ui/utils/userUtils.js +34 -16
- package/lib/module/ui/utils/userUtils.js.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +7 -3
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/client.d.ts +0 -2
- package/lib/typescript/commonjs/ui/client.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ActingAsBanner.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/Avatar.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts +27 -27
- package/lib/typescript/commonjs/ui/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/Icon.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/Icon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/ProfileCard.d.ts +4 -1
- package/lib/typescript/commonjs/ui/components/ProfileCard.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField/Addons/Outline.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/TextField/helpers.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/TextField/types.d.ts +0 -1
- package/lib/typescript/commonjs/ui/components/TextField/types.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/TextField.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/TextField.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts +0 -1
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts +0 -2
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +3 -2
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/styles.d.ts +200 -17
- package/lib/typescript/commonjs/ui/components/fileManagement/styles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/logo/LogoIcon.d.ts +22 -0
- package/lib/typescript/commonjs/ui/components/logo/LogoIcon.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/logo/LogoText.d.ts +22 -0
- package/lib/typescript/commonjs/ui/components/logo/LogoText.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/paymentStyles.d.ts +0 -7
- package/lib/typescript/commonjs/ui/components/payment/paymentStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/styles/overlay.d.ts +3 -1
- package/lib/typescript/commonjs/ui/components/styles/overlay.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/theming.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/types.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.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/index.d.ts +5 -3
- package/lib/typescript/commonjs/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts +11 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationFactory.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts +25 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/mutationKeys.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts +161 -9
- package/lib/typescript/commonjs/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/index.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts +1 -0
- package/lib/typescript/commonjs/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts +22 -8
- package/lib/typescript/commonjs/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts +13 -3
- package/lib/typescript/commonjs/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts +7 -5
- package/lib/typescript/commonjs/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts +57 -9
- package/lib/typescript/commonjs/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts +0 -1
- package/lib/typescript/commonjs/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts +10 -2
- package/lib/typescript/commonjs/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useFileDownloadUrl.d.ts +2 -6
- package/lib/typescript/commonjs/ui/hooks/useFileDownloadUrl.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/useMutationStatus.d.ts +23 -0
- package/lib/typescript/commonjs/ui/hooks/useMutationStatus.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts +13 -0
- package/lib/typescript/commonjs/ui/hooks/useOnlineStatus.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSessionSocket.d.ts +1 -2
- package/lib/typescript/commonjs/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/index.d.ts +1 -4
- package/lib/typescript/commonjs/ui/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +48 -2
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.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.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts +49 -0
- package/lib/typescript/commonjs/ui/screens/AvatarCropScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- 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/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.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/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/server.d.ts +0 -2
- package/lib/typescript/commonjs/ui/server.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/authStyles.d.ts +0 -4
- package/lib/typescript/commonjs/ui/styles/authStyles.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/index.d.ts +0 -1
- package/lib/typescript/commonjs/ui/styles/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/spacing.d.ts +0 -36
- package/lib/typescript/commonjs/ui/styles/spacing.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/theme.d.ts +0 -1
- package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +39 -12
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts +3 -1
- package/lib/typescript/commonjs/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts +19 -18
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +7 -3
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/client.d.ts +0 -2
- package/lib/typescript/module/ui/client.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ActingAsBanner.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Avatar.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheet.d.ts +27 -27
- package/lib/typescript/module/ui/components/BottomSheet.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/BottomSheetRouter.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Header.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/Icon.d.ts +3 -2
- package/lib/typescript/module/ui/components/Icon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/IconButton/IconButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/ProfileCard.d.ts +4 -1
- package/lib/typescript/module/ui/components/ProfileCard.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField/Addons/Outline.d.ts +2 -2
- package/lib/typescript/module/ui/components/TextField/helpers.d.ts +2 -2
- package/lib/typescript/module/ui/components/TextField/types.d.ts +0 -1
- package/lib/typescript/module/ui/components/TextField/types.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/TextField.d.ts +1 -1
- package/lib/typescript/module/ui/components/TextField.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts +0 -1
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/AnimatedButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts +0 -2
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +3 -2
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/styles.d.ts +200 -17
- package/lib/typescript/module/ui/components/fileManagement/styles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/logo/LogoIcon.d.ts +22 -0
- package/lib/typescript/module/ui/components/logo/LogoIcon.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/logo/LogoText.d.ts +22 -0
- package/lib/typescript/module/ui/components/logo/LogoText.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +2 -2
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts +0 -7
- package/lib/typescript/module/ui/components/payment/paymentStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/styles/overlay.d.ts +3 -1
- package/lib/typescript/module/ui/components/styles/overlay.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/theming.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/types.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.map +1 -1
- package/lib/typescript/module/ui/hooks/index.d.ts +5 -3
- package/lib/typescript/module/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts +11 -0
- package/lib/typescript/module/ui/hooks/mutations/mutationFactory.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts +25 -0
- package/lib/typescript/module/ui/hooks/mutations/mutationKeys.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts +161 -9
- package/lib/typescript/module/ui/hooks/mutations/useAccountMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/mutations/useServicesMutations.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/index.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/queries/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts +1 -0
- package/lib/typescript/module/ui/hooks/queries/queryKeys.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts +22 -8
- package/lib/typescript/module/ui/hooks/queries/useAccountQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts +13 -3
- package/lib/typescript/module/ui/hooks/queries/useSecurityQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts +7 -5
- package/lib/typescript/module/ui/hooks/queries/useServicesQueries.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/queryClient.d.ts +57 -9
- package/lib/typescript/module/ui/hooks/queryClient.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAssets.d.ts +1 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts +0 -1
- package/lib/typescript/module/ui/hooks/useAuth.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts +10 -2
- package/lib/typescript/module/ui/hooks/useAvatarPicker.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useFileDownloadUrl.d.ts +2 -6
- package/lib/typescript/module/ui/hooks/useFileDownloadUrl.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/useMutationStatus.d.ts +23 -0
- package/lib/typescript/module/ui/hooks/useMutationStatus.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts +13 -0
- package/lib/typescript/module/ui/hooks/useOnlineStatus.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSessionSocket.d.ts +1 -2
- package/lib/typescript/module/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/module/ui/index.d.ts +1 -4
- package/lib/typescript/module/ui/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +48 -2
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts +49 -0
- package/lib/typescript/module/ui/screens/AvatarCropScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/CreateManagedAccountScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- 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/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.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/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/server.d.ts +0 -2
- package/lib/typescript/module/ui/server.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/authStyles.d.ts +0 -4
- package/lib/typescript/module/ui/styles/authStyles.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/index.d.ts +0 -1
- package/lib/typescript/module/ui/styles/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/spacing.d.ts +0 -36
- package/lib/typescript/module/ui/styles/spacing.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/theme.d.ts +0 -1
- package/lib/typescript/module/ui/styles/theme.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +39 -12
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts +3 -1
- package/lib/typescript/module/ui/utils/sessionHelpers.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/userUtils.d.ts +19 -18
- package/lib/typescript/module/ui/utils/userUtils.d.ts.map +1 -1
- package/lib/typescript/types/expo-vector-icons.d.ts +7 -4
- package/package.json +64 -31
- package/src/index.ts +11 -4
- package/src/types/expo-vector-icons.d.ts +7 -4
- package/src/ui/client.ts +0 -6
- package/src/ui/components/ActingAsBanner.tsx +0 -4
- package/src/ui/components/ActivityIndicator.tsx +1 -1
- package/src/ui/components/Avatar.tsx +0 -2
- package/src/ui/components/BottomSheet.tsx +41 -440
- package/src/ui/components/BottomSheetRouter.tsx +12 -1
- package/src/ui/components/FollowButton.tsx +2 -4
- package/src/ui/components/Header.tsx +0 -5
- package/src/ui/components/Icon.tsx +12 -6
- package/src/ui/components/IconButton/IconButton.tsx +0 -3
- package/src/ui/components/OxyPayButton.tsx +0 -2
- package/src/ui/components/OxyProvider.tsx +127 -48
- package/src/ui/components/OxySignInButton.tsx +21 -9
- package/src/ui/components/ProfileCard.tsx +13 -10
- package/src/ui/components/QuickActions.tsx +2 -2
- package/src/ui/components/SignInModal.tsx +80 -199
- package/src/ui/components/StepBasedScreen.tsx +0 -2
- package/src/ui/components/TextField/Addons/Outline.tsx +2 -2
- package/src/ui/components/TextField/helpers.tsx +2 -2
- package/src/ui/components/TextField/types.tsx +0 -1
- package/src/ui/components/TextField.tsx +1 -2
- package/src/ui/components/TouchableRipple/TouchableRipple.native.tsx +1 -1
- package/src/ui/components/feedback/feedbackStyles.ts +0 -2
- package/src/ui/components/fileManagement/AnimatedButton.tsx +0 -1
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +71 -65
- package/src/ui/components/fileManagement/FileViewer.tsx +6 -9
- package/src/ui/components/fileManagement/UploadPreview.tsx +21 -25
- package/src/ui/components/fileManagement/styles.ts +206 -18
- package/src/ui/components/logo/LogoIcon.tsx +70 -0
- package/src/ui/components/logo/LogoText.tsx +70 -0
- package/src/ui/components/modals/DeleteAccountModal.tsx +56 -91
- package/src/ui/components/payment/PaymentDetailsStep.tsx +1 -1
- package/src/ui/components/payment/PaymentReviewStep.tsx +1 -1
- package/src/ui/components/payment/PaymentSuccessStep.tsx +1 -1
- package/src/ui/components/payment/paymentStyles.ts +0 -8
- package/src/ui/components/styles/overlay.tsx +17 -8
- package/src/ui/components/theming.tsx +0 -1
- package/src/ui/components/types.tsx +3 -2
- package/src/ui/context/OxyContext.tsx +34 -19
- package/src/ui/context/hooks/useAuthOperations.ts +1 -3
- package/src/ui/hooks/index.ts +11 -4
- package/src/ui/hooks/mutations/mutationFactory.ts +16 -1
- package/src/ui/hooks/mutations/mutationKeys.ts +28 -0
- package/src/ui/hooks/mutations/useAccountMutations.ts +251 -59
- package/src/ui/hooks/mutations/useServicesMutations.ts +10 -4
- package/src/ui/hooks/queries/index.ts +1 -0
- package/src/ui/hooks/queries/queryKeys.ts +2 -0
- package/src/ui/hooks/queries/useAccountQueries.ts +83 -3
- package/src/ui/hooks/queries/useSecurityQueries.ts +42 -2
- package/src/ui/hooks/queryClient.ts +194 -69
- package/src/ui/hooks/useAsyncAction.ts +3 -3
- package/src/ui/hooks/useAuth.ts +0 -2
- package/src/ui/hooks/useAvatarPicker.ts +108 -27
- package/src/ui/hooks/useFileDownloadUrl.ts +15 -39
- package/src/ui/hooks/useMutationStatus.ts +111 -0
- package/src/ui/hooks/useOnlineStatus.ts +29 -0
- package/src/ui/hooks/useSessionSocket.ts +136 -126
- package/src/ui/hooks/useSettingToggle.ts +1 -1
- package/src/ui/index.ts +0 -12
- package/src/ui/navigation/routes.ts +93 -2
- package/src/ui/screens/AccountCenterScreen.tsx +15 -13
- package/src/ui/screens/AccountOverviewScreen.tsx +94 -104
- package/src/ui/screens/AccountSettingsScreen.tsx +18 -17
- package/src/ui/screens/AccountSwitcherScreen.tsx +331 -298
- package/src/ui/screens/AccountVerificationScreen.tsx +15 -15
- package/src/ui/screens/AppInfoScreen.tsx +8 -13
- package/src/ui/screens/AvatarCropScreen.tsx +1073 -0
- package/src/ui/screens/CreateManagedAccountScreen.tsx +5 -16
- package/src/ui/screens/EditProfileFieldScreen.tsx +5 -10
- package/src/ui/screens/FAQScreen.tsx +3 -3
- package/src/ui/screens/FeedbackScreen.tsx +14 -12
- package/src/ui/screens/FileManagementScreen.tsx +885 -124
- package/src/ui/screens/HelpSupportScreen.tsx +2 -3
- package/src/ui/screens/HistoryViewScreen.tsx +24 -9
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -3
- package/src/ui/screens/LegalDocumentsScreen.tsx +3 -3
- package/src/ui/screens/PaymentGatewayScreen.tsx +2 -2
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +51 -56
- package/src/ui/screens/PrivacySettingsScreen.tsx +22 -20
- package/src/ui/screens/ProfileScreen.tsx +1 -2
- package/src/ui/screens/SavesCollectionsScreen.tsx +2 -2
- package/src/ui/screens/SessionManagementScreen.tsx +35 -47
- package/src/ui/screens/UserLinksScreen.tsx +1 -2
- package/src/ui/screens/UserListScreen.tsx +30 -19
- package/src/ui/screens/WelcomeNewUserScreen.tsx +14 -18
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +0 -3
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +4 -8
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +1 -1
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +3 -4
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +13 -18
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +3 -4
- package/src/ui/server.ts +0 -4
- package/src/ui/styles/authStyles.ts +0 -5
- package/src/ui/styles/index.ts +0 -1
- package/src/ui/styles/spacing.ts +0 -43
- package/src/ui/styles/theme.ts +0 -4
- package/src/ui/utils/fileManagement.ts +66 -38
- package/src/ui/utils/sessionHelpers.ts +3 -1
- package/src/ui/utils/userUtils.ts +45 -29
- package/lib/commonjs/lib/sonner-safe.js +0 -32
- package/lib/commonjs/lib/sonner-safe.js.map +0 -1
- package/lib/commonjs/lib/sonner.js +0 -19
- package/lib/commonjs/lib/sonner.js.map +0 -1
- package/lib/commonjs/lib/sonner.native.js +0 -24
- package/lib/commonjs/lib/sonner.native.js.map +0 -1
- package/lib/commonjs/lib/sonner.web.js +0 -24
- package/lib/commonjs/lib/sonner.web.js.map +0 -1
- package/lib/commonjs/ui/hooks/useThemeColors.js +0 -33
- package/lib/commonjs/ui/hooks/useThemeColors.js.map +0 -1
- package/lib/commonjs/ui/hooks/useThemeStyles.js +0 -38
- package/lib/commonjs/ui/hooks/useThemeStyles.js.map +0 -1
- package/lib/commonjs/ui/styles/fonts.js +0 -84
- package/lib/commonjs/ui/styles/fonts.js.map +0 -1
- package/lib/module/lib/sonner-safe.js +0 -29
- package/lib/module/lib/sonner-safe.js.map +0 -1
- package/lib/module/lib/sonner.js +0 -14
- package/lib/module/lib/sonner.js.map +0 -1
- package/lib/module/lib/sonner.native.js +0 -19
- package/lib/module/lib/sonner.native.js.map +0 -1
- package/lib/module/lib/sonner.web.js +0 -19
- package/lib/module/lib/sonner.web.js.map +0 -1
- package/lib/module/ui/hooks/useThemeColors.js +0 -29
- package/lib/module/ui/hooks/useThemeColors.js.map +0 -1
- package/lib/module/ui/hooks/useThemeStyles.js +0 -33
- package/lib/module/ui/hooks/useThemeStyles.js.map +0 -1
- package/lib/module/ui/styles/fonts.js +0 -81
- package/lib/module/ui/styles/fonts.js.map +0 -1
- package/lib/typescript/commonjs/lib/sonner-safe.d.ts +0 -9
- package/lib/typescript/commonjs/lib/sonner-safe.d.ts.map +0 -1
- package/lib/typescript/commonjs/lib/sonner.d.ts +0 -12
- package/lib/typescript/commonjs/lib/sonner.d.ts.map +0 -1
- package/lib/typescript/commonjs/lib/sonner.native.d.ts +0 -15
- package/lib/typescript/commonjs/lib/sonner.native.d.ts.map +0 -1
- package/lib/typescript/commonjs/lib/sonner.web.d.ts +0 -15
- package/lib/typescript/commonjs/lib/sonner.web.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useThemeColors.d.ts +0 -87
- package/lib/typescript/commonjs/ui/hooks/useThemeColors.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/useThemeStyles.d.ts +0 -22
- package/lib/typescript/commonjs/ui/hooks/useThemeStyles.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/styles/fonts.d.ts +0 -21
- package/lib/typescript/commonjs/ui/styles/fonts.d.ts.map +0 -1
- package/lib/typescript/module/lib/sonner-safe.d.ts +0 -9
- package/lib/typescript/module/lib/sonner-safe.d.ts.map +0 -1
- package/lib/typescript/module/lib/sonner.d.ts +0 -12
- package/lib/typescript/module/lib/sonner.d.ts.map +0 -1
- package/lib/typescript/module/lib/sonner.native.d.ts +0 -15
- package/lib/typescript/module/lib/sonner.native.d.ts.map +0 -1
- package/lib/typescript/module/lib/sonner.web.d.ts +0 -15
- package/lib/typescript/module/lib/sonner.web.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useThemeColors.d.ts +0 -87
- package/lib/typescript/module/ui/hooks/useThemeColors.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/useThemeStyles.d.ts +0 -22
- package/lib/typescript/module/ui/hooks/useThemeStyles.d.ts.map +0 -1
- package/lib/typescript/module/ui/styles/fonts.d.ts +0 -21
- package/lib/typescript/module/ui/styles/fonts.d.ts.map +0 -1
- package/src/lib/sonner-safe.ts +0 -31
- package/src/lib/sonner.native.ts +0 -28
- package/src/lib/sonner.ts +0 -11
- package/src/lib/sonner.web.ts +0 -28
- package/src/ui/hooks/useThemeColors.ts +0 -27
- package/src/ui/hooks/useThemeStyles.ts +0 -50
- package/src/ui/styles/fonts.ts +0 -77
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
import {
|
|
3
|
+
import { useEffect } from 'react';
|
|
4
|
+
import { useQuery, useQueries, useQueryClient } from '@tanstack/react-query';
|
|
4
5
|
import { authenticatedApiCall } from '@oxyhq/core';
|
|
5
6
|
import { queryKeys } from "./queryKeys.js";
|
|
7
|
+
import { mutationKeys } from "../mutations/mutationKeys.js";
|
|
6
8
|
import { useOxy } from "../../context/OxyContext.js";
|
|
9
|
+
import { useAuthStore } from "../../stores/authStore.js";
|
|
7
10
|
|
|
8
11
|
/**
|
|
9
12
|
* Get user profile by session ID
|
|
@@ -49,7 +52,17 @@ export const useUserProfiles = (sessionIds, options) => {
|
|
|
49
52
|
};
|
|
50
53
|
|
|
51
54
|
/**
|
|
52
|
-
* Get current authenticated user
|
|
55
|
+
* Get current authenticated user.
|
|
56
|
+
*
|
|
57
|
+
* The store-mirror effect must NOT overwrite the in-memory user while a
|
|
58
|
+
* write mutation is in flight — otherwise a stale background refetch
|
|
59
|
+
* landing between optimistic update and server-confirmed update would
|
|
60
|
+
* revert the optimistic value and flicker the UI.
|
|
61
|
+
*
|
|
62
|
+
* We gate the mirror on the mutation-cache state for any mutation that
|
|
63
|
+
* touches `User` shape (profile, avatar, settings, privacy). When any of
|
|
64
|
+
* those is in flight we skip the mirror entirely; the winning onSuccess
|
|
65
|
+
* handler is responsible for writing the final value to the store.
|
|
53
66
|
*/
|
|
54
67
|
export const useCurrentUser = options => {
|
|
55
68
|
const {
|
|
@@ -57,7 +70,8 @@ export const useCurrentUser = options => {
|
|
|
57
70
|
activeSessionId,
|
|
58
71
|
isAuthenticated
|
|
59
72
|
} = useOxy();
|
|
60
|
-
|
|
73
|
+
const queryClient = useQueryClient();
|
|
74
|
+
const query = useQuery({
|
|
61
75
|
queryKey: queryKeys.accounts.current(),
|
|
62
76
|
queryFn: async () => {
|
|
63
77
|
if (!activeSessionId) {
|
|
@@ -70,8 +84,71 @@ export const useCurrentUser = options => {
|
|
|
70
84
|
// 1 minute for current user
|
|
71
85
|
gcTime: 30 * 60 * 1000
|
|
72
86
|
});
|
|
87
|
+
|
|
88
|
+
// Mirror fresh server-side user into the auth store so consumers reading
|
|
89
|
+
// useOxy().user pick up newly-arriving fields (createdAt, updatedAt, etc.).
|
|
90
|
+
//
|
|
91
|
+
// Guard 1 (mutation in flight): skip if ANY user-shape mutation is in
|
|
92
|
+
// flight — the in-progress optimistic value must not be reverted by a
|
|
93
|
+
// background refetch.
|
|
94
|
+
// Guard 2 (staleness): if the existing store user has a strictly newer
|
|
95
|
+
// `updatedAt` than the incoming data, skip. Protects against late-
|
|
96
|
+
// arriving refetches that race with an already-completed mutation.
|
|
97
|
+
const data = query.data;
|
|
98
|
+
useEffect(() => {
|
|
99
|
+
if (!data) return;
|
|
100
|
+
|
|
101
|
+
// Check for any write mutation that mutates the user shape. Match by
|
|
102
|
+
// any prefix of the user-write mutation keys we own — `isMutating`
|
|
103
|
+
// matches mutations whose `mutationKey` starts with the provided key.
|
|
104
|
+
const userWriteMutationsInFlight = queryClient.isMutating({
|
|
105
|
+
mutationKey: mutationKeys.account.updateProfile
|
|
106
|
+
}) + queryClient.isMutating({
|
|
107
|
+
mutationKey: mutationKeys.account.uploadAvatar
|
|
108
|
+
}) + queryClient.isMutating({
|
|
109
|
+
mutationKey: mutationKeys.account.updateSettings
|
|
110
|
+
}) + queryClient.isMutating({
|
|
111
|
+
mutationKey: mutationKeys.account.updatePrivacySettings
|
|
112
|
+
});
|
|
113
|
+
if (userWriteMutationsInFlight > 0) {
|
|
114
|
+
return;
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
// updatedAt-based staleness gate. Tolerates missing fields on either
|
|
118
|
+
// side: when the server response or stored user omits `updatedAt`
|
|
119
|
+
// (partial updates, legacy users), fall through to the mirror — the
|
|
120
|
+
// mutation-in-flight guard above is the primary defense.
|
|
121
|
+
const storedUser = useAuthStore.getState().user;
|
|
122
|
+
const incomingUpdatedAt = parseUpdatedAt(data.updatedAt);
|
|
123
|
+
const storedUpdatedAt = parseUpdatedAt(storedUser?.updatedAt);
|
|
124
|
+
if (incomingUpdatedAt !== null && storedUpdatedAt !== null && incomingUpdatedAt < storedUpdatedAt) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
127
|
+
useAuthStore.getState().setUser(data);
|
|
128
|
+
}, [data, queryClient]);
|
|
129
|
+
return query;
|
|
73
130
|
};
|
|
74
131
|
|
|
132
|
+
/**
|
|
133
|
+
* Best-effort parser for the various `updatedAt` representations the API
|
|
134
|
+
* returns (ISO string, epoch number, Date instance, undefined). Returns
|
|
135
|
+
* `null` when the value can't be interpreted as a finite timestamp — the
|
|
136
|
+
* caller then falls back to the mutation-in-flight guard.
|
|
137
|
+
*/
|
|
138
|
+
function parseUpdatedAt(value) {
|
|
139
|
+
if (value == null) return null;
|
|
140
|
+
if (typeof value === 'number') return Number.isFinite(value) ? value : null;
|
|
141
|
+
if (value instanceof Date) {
|
|
142
|
+
const t = value.getTime();
|
|
143
|
+
return Number.isFinite(t) ? t : null;
|
|
144
|
+
}
|
|
145
|
+
if (typeof value === 'string') {
|
|
146
|
+
const t = Date.parse(value);
|
|
147
|
+
return Number.isFinite(t) ? t : null;
|
|
148
|
+
}
|
|
149
|
+
return null;
|
|
150
|
+
}
|
|
151
|
+
|
|
75
152
|
/**
|
|
76
153
|
* Get user by ID
|
|
77
154
|
*/
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useQuery","useQueries","authenticatedApiCall","queryKeys","useOxy","useUserProfile","sessionId","options","oxyServices","queryKey","users","profile","queryFn","Error","getUserBySession","enabled","staleTime","gcTime","useUserProfiles","sessionIds","queries","map","results","getUsersBySessions","user","useCurrentUser","activeSessionId","isAuthenticated","accounts","current","useUserById","userId","detail","getUserById","useUserByUsername","username","details","getProfileByUsername","useUsersBySessions","list","length","usePrivacySettings","targetUserId","id","privacy","settings","getPrivacySettings"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/useAccountQueries.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,UAAU,QAAQ,uBAAuB;
|
|
1
|
+
{"version":3,"names":["useEffect","useQuery","useQueries","useQueryClient","authenticatedApiCall","queryKeys","mutationKeys","useOxy","useAuthStore","useUserProfile","sessionId","options","oxyServices","queryKey","users","profile","queryFn","Error","getUserBySession","enabled","staleTime","gcTime","useUserProfiles","sessionIds","queries","map","results","getUsersBySessions","user","useCurrentUser","activeSessionId","isAuthenticated","queryClient","query","accounts","current","data","userWriteMutationsInFlight","isMutating","mutationKey","account","updateProfile","uploadAvatar","updateSettings","updatePrivacySettings","storedUser","getState","incomingUpdatedAt","parseUpdatedAt","updatedAt","storedUpdatedAt","setUser","value","Number","isFinite","Date","t","getTime","parse","useUserById","userId","detail","getUserById","useUserByUsername","username","details","getProfileByUsername","useUsersBySessions","list","length","usePrivacySettings","targetUserId","id","privacy","settings","getPrivacySettings"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/useAccountQueries.ts"],"mappings":";;AAAA,SAASA,SAAS,QAAQ,OAAO;AACjC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,cAAc,QAAQ,uBAAuB;AAC5E,SAASC,oBAAoB,QAAQ,aAAa;AAElD,SAASC,SAAS,QAAQ,gBAAa;AACvC,SAASC,YAAY,QAAQ,8BAA2B;AACxD,SAASC,MAAM,QAAQ,6BAA0B;AACjD,SAASC,YAAY,QAAQ,2BAAwB;;AAErD;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAGA,CAACC,SAAwB,EAAEC,OAA+B,KAAK;EAC3F,MAAM;IAAEC;EAAY,CAAC,GAAGL,MAAM,CAAC,CAAC;EAEhC,OAAON,QAAQ,CAAC;IACdY,QAAQ,EAAER,SAAS,CAACS,KAAK,CAACC,OAAO,CAACL,SAAS,IAAI,EAAE,CAAC;IAClDM,OAAO,EAAE,MAAAA,CAAA,KAAY;MACnB,IAAI,CAACN,SAAS,EAAE;QACd,MAAM,IAAIO,KAAK,CAAC,wBAAwB,CAAC;MAC3C;MACA,OAAO,MAAML,WAAW,CAACM,gBAAgB,CAACR,SAAS,CAAC;IACtD,CAAC;IACDS,OAAO,EAAGR,OAAO,EAAEQ,OAAO,KAAK,KAAK,IAAK,CAAC,CAACT,SAAS;IACpDU,SAAS,EAAE,CAAC,G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
|
|
|
3
|
-
import { useQuery } from '@tanstack/react-query';
|
|
3
|
+
import { useQuery, useInfiniteQuery } from '@tanstack/react-query';
|
|
4
4
|
import { queryKeys } from "./queryKeys.js";
|
|
5
5
|
import { useOxy } from "../../context/OxyContext.js";
|
|
6
6
|
/**
|
|
@@ -49,4 +49,38 @@ export const useRecentSecurityActivity = (limit = 10) => {
|
|
|
49
49
|
gcTime: 10 * 60 * 1000 // 10 minutes
|
|
50
50
|
});
|
|
51
51
|
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Get user's security activity with infinite pagination.
|
|
55
|
+
* Each page returns up to `limit` events; `getNextPageParam` walks the
|
|
56
|
+
* `offset` cursor until the API reports `hasMore: false`.
|
|
57
|
+
*/
|
|
58
|
+
export const useInfiniteSecurityActivity = options => {
|
|
59
|
+
const {
|
|
60
|
+
oxyServices,
|
|
61
|
+
activeSessionId
|
|
62
|
+
} = useOxy();
|
|
63
|
+
const limit = options?.limit ?? 30;
|
|
64
|
+
return useInfiniteQuery({
|
|
65
|
+
queryKey: queryKeys.security.infinite(limit, options?.eventType),
|
|
66
|
+
queryFn: async ({
|
|
67
|
+
pageParam
|
|
68
|
+
}) => {
|
|
69
|
+
if (!activeSessionId) {
|
|
70
|
+
throw new Error('No active session');
|
|
71
|
+
}
|
|
72
|
+
const offset = typeof pageParam === 'number' ? pageParam : 0;
|
|
73
|
+
return await oxyServices.getSecurityActivity(limit, offset, options?.eventType);
|
|
74
|
+
},
|
|
75
|
+
initialPageParam: 0,
|
|
76
|
+
getNextPageParam: lastPage => {
|
|
77
|
+
if (!lastPage.hasMore) return undefined;
|
|
78
|
+
return lastPage.offset + lastPage.limit;
|
|
79
|
+
},
|
|
80
|
+
enabled: options?.enabled !== false && !!activeSessionId,
|
|
81
|
+
staleTime: 5 * 60 * 1000,
|
|
82
|
+
// 5 minutes
|
|
83
|
+
gcTime: 10 * 60 * 1000 // 10 minutes
|
|
84
|
+
});
|
|
85
|
+
};
|
|
52
86
|
//# sourceMappingURL=useSecurityQueries.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useQuery","queryKeys","useOxy","useSecurityActivity","options","oxyServices","activeSessionId","queryKey","security","activity","limit","offset","eventType","queryFn","Error","response","getSecurityActivity","enabled","staleTime","gcTime","useRecentSecurityActivity","recent","getRecentSecurityActivity"],"sourceRoot":"../../../../../src","sources":["ui/hooks/queries/useSecurityQueries.ts"],"mappings":";;AAAA,SAASA,QAAQ,QAAQ,uBAAuB;
|
|
1
|
+
{"version":3,"names":["useQuery","useInfiniteQuery","queryKeys","useOxy","useSecurityActivity","options","oxyServices","activeSessionId","queryKey","security","activity","limit","offset","eventType","queryFn","Error","response","getSecurityActivity","enabled","staleTime","gcTime","useRecentSecurityActivity","recent","getRecentSecurityActivity","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,mBAAmB,CACpDZ,OAAO,EAAEM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d,KAAK,EAAEN,OAAO,EAAEQ,SAAS,CAAC;IAChEC,OAAO,EAAE,MAAAA,CAAO;MAAEY;IAAU,CAAC,KAAK;MAChC,IAAI,CAACnB,eAAe,EAAE;QACpB,MAAM,IAAIQ,KAAK,CAAC,mBAAmB,CAAC;MACtC;MAEA,MAAMH,MAAM,GAAG,OAAOc,SAAS,KAAK,QAAQ,GAAGA,SAAS,GAAG,CAAC;MAC5D,OAAO,MAAMpB,WAAW,CAACW,mBAAmB,CAC1CN,KAAK,EACLC,MAAM,EACNP,OAAO,EAAEQ,SACX,CAAC;IACH,CAAC;IACDc,gBAAgB,EAAE,CAAC;IACnBC,gBAAgB,EAAGC,QAAQ,IAAK;MAC9B,IAAI,CAACA,QAAQ,CAACC,OAAO,EAAE,OAAOC,SAAS;MACvC,OAAOF,QAAQ,CAACjB,MAAM,GAAGiB,QAAQ,CAAClB,KAAK;IACzC,CAAC;IACDO,OAAO,EAAGb,OAAO,EAAEa,OAAO,KAAK,KAAK,IAAK,CAAC,CAACX,eAAe;IAC1DY,SAAS,EAAE,CAAC,GAAG,EAAE,GAAG,IAAI;IAAE;IAC1BC,MAAM,EAAE,EAAE,GAAG,EAAE,GAAG,IAAI,CAAE;EAC1B,CAAC,CAAC;AACJ,CAAC","ignoreList":[]}
|
|
@@ -1,72 +1,102 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
|
-
|
|
3
|
+
/**
|
|
4
|
+
* Offline-first QueryClient with cross-restart persistence.
|
|
5
|
+
*
|
|
6
|
+
* Wires together:
|
|
7
|
+
* - TanStack Query with `networkMode: 'offlineFirst'` for queries and mutations
|
|
8
|
+
* so cached data is served immediately and mutations are queued (paused) while
|
|
9
|
+
* the browser/device reports offline.
|
|
10
|
+
* - `persistQueryClient(...)` from `@tanstack/react-query-persist-client` so that
|
|
11
|
+
* query results AND paused mutations survive a cold restart (kill-and-relaunch).
|
|
12
|
+
* - `onlineManager` resume hook so paused mutations replay the moment the
|
|
13
|
+
* network is reported back, even if the host app swapped in a custom
|
|
14
|
+
* onlineManager implementation.
|
|
15
|
+
*
|
|
16
|
+
* Storage layer:
|
|
17
|
+
* - React Native -> AsyncStorage via `createAsyncStoragePersister`.
|
|
18
|
+
* - Web -> localStorage via `createSyncStoragePersister` (wrapped in the
|
|
19
|
+
* async persister API for a single call site).
|
|
20
|
+
* - Both adapters are content-shape compatible with our `StorageInterface`.
|
|
21
|
+
*
|
|
22
|
+
* Whitelist policy:
|
|
23
|
+
* - Persist every account/user/session/privacy query and every queued mutation.
|
|
24
|
+
* - DO NOT persist large list queries (e.g. activity feeds) — they go stale
|
|
25
|
+
* fast and would balloon storage. Add new keys to `PERSISTED_QUERY_PREFIXES`
|
|
26
|
+
* when introducing reads that should survive restart.
|
|
27
|
+
*/
|
|
28
|
+
|
|
29
|
+
import { QueryClient, onlineManager } from '@tanstack/react-query';
|
|
30
|
+
import { persistQueryClient } from '@tanstack/react-query-persist-client';
|
|
31
|
+
import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persister';
|
|
4
32
|
import { isDev } from '@oxyhq/core';
|
|
5
|
-
const QUERY_CACHE_KEY = '
|
|
6
|
-
const
|
|
33
|
+
const QUERY_CACHE_KEY = 'oxy_query_cache_v2';
|
|
34
|
+
const QUERY_CACHE_MAX_AGE = 30 * 24 * 60 * 60 * 1000; // 30 days
|
|
35
|
+
const QUERY_PERSIST_THROTTLE_MS = 1_000;
|
|
36
|
+
|
|
37
|
+
/**
|
|
38
|
+
* Query-key prefixes that should survive cold restart. Anything not listed
|
|
39
|
+
* is dropped during dehydration so the persisted blob stays small.
|
|
40
|
+
*
|
|
41
|
+
* Mutations are persisted independently (always) so the offline write queue
|
|
42
|
+
* works regardless of the read whitelist.
|
|
43
|
+
*/
|
|
44
|
+
const PERSISTED_QUERY_PREFIXES = ['accounts', 'users', 'sessions', 'devices', 'privacy'];
|
|
7
45
|
|
|
8
46
|
/**
|
|
9
|
-
*
|
|
47
|
+
* Adapt our `StorageInterface` (which always returns `null` for missing keys)
|
|
48
|
+
* to TanStack's `AsyncStorage` shape. The two are structurally identical
|
|
49
|
+
* apart from naming; this also gives us a single place to add error
|
|
50
|
+
* suppression if a host platform's storage throws.
|
|
10
51
|
*/
|
|
11
|
-
|
|
52
|
+
function adaptStorage(storage) {
|
|
12
53
|
return {
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
version: QUERY_CACHE_VERSION
|
|
19
|
-
});
|
|
20
|
-
await storage.setItem(QUERY_CACHE_KEY, serialized);
|
|
21
|
-
} catch (error) {
|
|
22
|
-
if (isDev()) {
|
|
23
|
-
console.warn('[QueryClient] Failed to persist cache:', error);
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
},
|
|
27
|
-
restoreClient: async () => {
|
|
28
|
-
try {
|
|
29
|
-
const cached = await storage.getItem(QUERY_CACHE_KEY);
|
|
30
|
-
if (!cached) return undefined;
|
|
31
|
-
const parsed = JSON.parse(cached);
|
|
54
|
+
getItem: key => storage.getItem(key),
|
|
55
|
+
setItem: (key, value) => storage.setItem(key, value),
|
|
56
|
+
removeItem: key => storage.removeItem(key)
|
|
57
|
+
};
|
|
58
|
+
}
|
|
32
59
|
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
60
|
+
/**
|
|
61
|
+
* Decide whether a given query should be written to persistent storage.
|
|
62
|
+
*
|
|
63
|
+
* Two gates:
|
|
64
|
+
* 1. The query must be in our prefix whitelist.
|
|
65
|
+
* 2. The query must have completed successfully at least once — there's no
|
|
66
|
+
* point persisting a `pending`/`error` state, and persisting `error` would
|
|
67
|
+
* leak failure objects across restarts.
|
|
68
|
+
*/
|
|
69
|
+
function shouldDehydrateQuery(query) {
|
|
70
|
+
if (query.state.status !== 'success') {
|
|
71
|
+
return false;
|
|
72
|
+
}
|
|
73
|
+
const head = query.queryKey[0];
|
|
74
|
+
if (typeof head !== 'string') {
|
|
75
|
+
return false;
|
|
76
|
+
}
|
|
77
|
+
return PERSISTED_QUERY_PREFIXES.includes(head);
|
|
78
|
+
}
|
|
39
79
|
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
} catch (error) {
|
|
48
|
-
if (isDev()) {
|
|
49
|
-
console.warn('[QueryClient] Failed to restore cache:', error);
|
|
50
|
-
}
|
|
51
|
-
return undefined;
|
|
52
|
-
}
|
|
53
|
-
},
|
|
54
|
-
removeClient: async () => {
|
|
55
|
-
try {
|
|
56
|
-
await storage.removeItem(QUERY_CACHE_KEY);
|
|
57
|
-
} catch (error) {
|
|
58
|
-
if (isDev()) {
|
|
59
|
-
console.warn('[QueryClient] Failed to remove cache:', error);
|
|
60
|
-
}
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
};
|
|
64
|
-
};
|
|
80
|
+
/**
|
|
81
|
+
* Persist every mutation regardless of status — paused mutations are
|
|
82
|
+
* exactly the ones that must survive restart to replay when online.
|
|
83
|
+
*/
|
|
84
|
+
function shouldDehydrateMutation(_mutation) {
|
|
85
|
+
return true;
|
|
86
|
+
}
|
|
65
87
|
|
|
66
88
|
/**
|
|
67
|
-
* Create a QueryClient with offline-first
|
|
89
|
+
* Create a QueryClient with offline-first defaults.
|
|
90
|
+
*
|
|
91
|
+
* Mutations marked with `networkMode: 'offlineFirst'` are queued by TanStack
|
|
92
|
+
* Query when offline (status "paused") and resumed automatically when
|
|
93
|
+
* `onlineManager` transitions back to online. Network monitoring wiring lives
|
|
94
|
+
* in `OxyProvider.tsx`.
|
|
95
|
+
*
|
|
96
|
+
* Persistence is attached separately via `attachQueryPersistence(...)`.
|
|
97
|
+
* Splitting the steps lets test/SSR callers create a stateless client.
|
|
68
98
|
*/
|
|
69
|
-
export const createQueryClient =
|
|
99
|
+
export const createQueryClient = () => {
|
|
70
100
|
const client = new QueryClient({
|
|
71
101
|
defaultOptions: {
|
|
72
102
|
queries: {
|
|
@@ -77,35 +107,103 @@ export const createQueryClient = storage => {
|
|
|
77
107
|
// Retry 3 times with exponential backoff
|
|
78
108
|
retry: 3,
|
|
79
109
|
retryDelay: attemptIndex => Math.min(1000 * 2 ** attemptIndex, 30000),
|
|
80
|
-
// Refetch on reconnect
|
|
110
|
+
// Refetch on reconnect so stale data is refreshed once online again.
|
|
81
111
|
refetchOnReconnect: true,
|
|
82
112
|
// Don't refetch on window focus (better for mobile)
|
|
83
113
|
refetchOnWindowFocus: false,
|
|
84
|
-
// Offline-first:
|
|
114
|
+
// Offline-first: serve cached data immediately, refetch in background.
|
|
85
115
|
networkMode: 'offlineFirst'
|
|
86
116
|
},
|
|
87
117
|
mutations: {
|
|
88
118
|
// Retry once for mutations
|
|
89
119
|
retry: 1,
|
|
90
|
-
// Offline-first: queue mutations when offline
|
|
120
|
+
// Offline-first: pause and queue mutations when offline.
|
|
91
121
|
networkMode: 'offlineFirst'
|
|
92
122
|
}
|
|
93
123
|
}
|
|
94
124
|
});
|
|
95
125
|
|
|
96
|
-
//
|
|
97
|
-
//
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
|
|
126
|
+
// Defensive: explicitly resume paused mutations whenever the network
|
|
127
|
+
// transitions back to online. TanStack Query does this internally too,
|
|
128
|
+
// but wiring it here keeps the behaviour robust if a custom onlineManager
|
|
129
|
+
// implementation is swapped in by the host app.
|
|
130
|
+
const unsubscribe = onlineManager.subscribe(isOnline => {
|
|
131
|
+
if (isOnline) {
|
|
132
|
+
void client.getMutationCache().resumePausedMutations();
|
|
133
|
+
}
|
|
134
|
+
});
|
|
135
|
+
Object.defineProperty(client, '__oxyOnlineUnsubscribe', {
|
|
136
|
+
value: unsubscribe,
|
|
137
|
+
enumerable: false,
|
|
138
|
+
configurable: true,
|
|
139
|
+
writable: false
|
|
140
|
+
});
|
|
101
141
|
return client;
|
|
102
142
|
};
|
|
143
|
+
/**
|
|
144
|
+
* Wire `persistQueryClient` to the supplied storage adapter.
|
|
145
|
+
*
|
|
146
|
+
* Returns once the in-flight restore promise is available so callers can
|
|
147
|
+
* `await result.restored` before rendering UI that depends on cached data.
|
|
148
|
+
*
|
|
149
|
+
* Safe to no-op if `storage` is null/undefined (e.g. server-side render
|
|
150
|
+
* with no host storage).
|
|
151
|
+
*/
|
|
152
|
+
export const attachQueryPersistence = (queryClient, storage) => {
|
|
153
|
+
if (!storage) {
|
|
154
|
+
return {
|
|
155
|
+
restored: Promise.resolve(),
|
|
156
|
+
unsubscribe: () => {}
|
|
157
|
+
};
|
|
158
|
+
}
|
|
159
|
+
const persister = createAsyncStoragePersister({
|
|
160
|
+
storage: adaptStorage(storage),
|
|
161
|
+
key: QUERY_CACHE_KEY,
|
|
162
|
+
throttleTime: QUERY_PERSIST_THROTTLE_MS
|
|
163
|
+
});
|
|
164
|
+
const [unsubscribe, restored] = persistQueryClient({
|
|
165
|
+
queryClient,
|
|
166
|
+
persister,
|
|
167
|
+
maxAge: QUERY_CACHE_MAX_AGE,
|
|
168
|
+
dehydrateOptions: {
|
|
169
|
+
shouldDehydrateQuery,
|
|
170
|
+
shouldDehydrateMutation
|
|
171
|
+
}
|
|
172
|
+
});
|
|
173
|
+
restored.catch(error => {
|
|
174
|
+
if (isDev()) {
|
|
175
|
+
console.warn('[QueryClient] Failed to restore persisted cache', error);
|
|
176
|
+
}
|
|
177
|
+
});
|
|
178
|
+
return {
|
|
179
|
+
unsubscribe,
|
|
180
|
+
restored
|
|
181
|
+
};
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
// Legacy v1 cache key — kept so we can opportunistically purge stale blobs
|
|
185
|
+
// written by older builds. Safe to drop after a few releases.
|
|
186
|
+
const LEGACY_QUERY_CACHE_KEYS = ['oxy_query_cache'];
|
|
103
187
|
|
|
104
188
|
/**
|
|
105
|
-
*
|
|
189
|
+
* Remove the persisted query+mutation cache (used on full sign-out / data
|
|
190
|
+
* reset). Safe to call even if persistence was never attached. Also clears
|
|
191
|
+
* legacy cache keys from older builds.
|
|
106
192
|
*/
|
|
107
193
|
export const clearQueryCache = async storage => {
|
|
108
|
-
const
|
|
109
|
-
await
|
|
194
|
+
const keys = [QUERY_CACHE_KEY, ...LEGACY_QUERY_CACHE_KEYS];
|
|
195
|
+
await Promise.all(keys.map(async key => {
|
|
196
|
+
try {
|
|
197
|
+
await storage.removeItem(key);
|
|
198
|
+
} catch (error) {
|
|
199
|
+
if (isDev()) {
|
|
200
|
+
console.warn(`[QueryClient] Failed to clear persisted query cache (${key})`, error);
|
|
201
|
+
}
|
|
202
|
+
}
|
|
203
|
+
}));
|
|
110
204
|
};
|
|
205
|
+
|
|
206
|
+
/**
|
|
207
|
+
* Re-export the persisted client shape so callers can type custom persisters.
|
|
208
|
+
*/
|
|
111
209
|
//# sourceMappingURL=queryClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["QueryClient","
|
|
1
|
+
{"version":3,"names":["QueryClient","onlineManager","persistQueryClient","createAsyncStoragePersister","isDev","QUERY_CACHE_KEY","QUERY_CACHE_MAX_AGE","QUERY_PERSIST_THROTTLE_MS","PERSISTED_QUERY_PREFIXES","adaptStorage","storage","getItem","key","setItem","value","removeItem","shouldDehydrateQuery","query","state","status","head","queryKey","includes","shouldDehydrateMutation","_mutation","createQueryClient","client","defaultOptions","queries","staleTime","gcTime","retry","retryDelay","attemptIndex","Math","min","refetchOnReconnect","refetchOnWindowFocus","networkMode","mutations","unsubscribe","subscribe","isOnline","getMutationCache","resumePausedMutations","Object","defineProperty","enumerable","configurable","writable","attachQueryPersistence","queryClient","restored","Promise","resolve","persister","throttleTime","maxAge","dehydrateOptions","catch","error","console","warn","LEGACY_QUERY_CACHE_KEYS","clearQueryCache","keys","all","map"],"sourceRoot":"../../../../src","sources":["ui/hooks/queryClient.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
|
|
3
3
|
import { useState, useCallback } from 'react';
|
|
4
|
-
import { toast } from '
|
|
4
|
+
import { toast } from '@oxyhq/bloom';
|
|
5
5
|
/**
|
|
6
6
|
* Hook for handling async actions with loading state, error handling, and toast notifications.
|
|
7
7
|
* Reduces boilerplate for common patterns like try-catch with toast feedback.
|
|
@@ -31,7 +31,7 @@ export function useAsyncAction(options) {
|
|
|
31
31
|
setIsLoading(true);
|
|
32
32
|
setError(null);
|
|
33
33
|
if (showLoadingToast && loadingMessage) {
|
|
34
|
-
toast.
|
|
34
|
+
toast.info(loadingMessage);
|
|
35
35
|
}
|
|
36
36
|
try {
|
|
37
37
|
const result = await action();
|
|
@@ -72,7 +72,7 @@ export async function executeWithToast(action, options) {
|
|
|
72
72
|
loadingMessage
|
|
73
73
|
} = options || {};
|
|
74
74
|
if (loadingMessage) {
|
|
75
|
-
toast.
|
|
75
|
+
toast.info(loadingMessage);
|
|
76
76
|
}
|
|
77
77
|
try {
|
|
78
78
|
const result = await action();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useState","useCallback","toast","useAsyncAction","options","isLoading","setIsLoading","error","setError","execute","action","successMessage","errorMessage","onSuccess","onError","showLoadingToast","loadingMessage","
|
|
1
|
+
{"version":3,"names":["useState","useCallback","toast","useAsyncAction","options","isLoading","setIsLoading","error","setError","execute","action","successMessage","errorMessage","onSuccess","onError","showLoadingToast","loadingMessage","info","result","success","err","message","Error","undefined","resetError","executeWithToast"],"sourceRoot":"../../../../src","sources":["ui/hooks/useAsyncAction.ts"],"mappings":";;AAAA,SAASA,QAAQ,EAAEC,WAAW,QAAQ,OAAO;AAC7C,SAASC,KAAK,QAAQ,cAAc;AA8BpC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,cAAcA,CAC1BC,OAAiC,EACV;EACvB,MAAM,CAACC,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AC;EAClB,CAAC,EAAE,EAAE,CAAC;EAEN,OAAO;IAAEC,OAAO;IAAEJ,SAAS;IAAEE,KAAK;IAAEiB;EAAW,CAAC;AACpD;;AAEA;AACA;AACA;AACA;AACA,OAAO,eAAeC,gBAAgBA,CAClCf,MAAwB,EACxBN,OAIC,EACqB;EACtB,MAAM;IAAEO,cAAc;IAAEC,YAAY;IAAEI;EAAe,CAAC,GAAGZ,OAAO,IAAI,CAAC,CAAC;EAEtE,IAAIY,cAAc,EAAE;IAChBd,KAAK,CAACe,IAAI,CAACD,cAAc,CAAC;EAC9B;EAEA,IAAI;IACA,MAAME,MAAM,GAAG,MAAMR,MAAM,CAAC,CAAC;IAC7B,IAAIC,cAAc,EAAE;MAChBT,KAAK,CAACiB,OAAO,CAACR,cAAc,CAAC;IACjC;IACA,OAAOO,MAAM;EACjB,CAAC,CAAC,OAAOE,GAAY,EAAE;IACnBlB,KAAK,CAACK,KAAK,CAACK,YAAY,KAAKQ,GAAG,YAAYE,KAAK,GAAGF,GAAG,CAACC,OAAO,GAAG,IAAI,CAAC,IAAI,mBAAmB,CAAC;IAC/F,OAAOE,SAAS;EACpB;AACJ;AAEA,eAAepB,cAAc","ignoreList":[]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useCallback","useOxy","isWebBrowser","useAuth","user","isAuthenticated","isLoading","isTokenReady","error","signIn","oxySignIn","handlePopupSession","logout","logoutAll","refreshSessions","oxyServices","hasIdentity","getPublicKey","showBottomSheet","openAvatarPicker","publicKey","authWebUrl","config","idpHostname","URL","hostname","isIdentityProvider","window","location","popupSession","signInWithPopup","sessionWithUser","Error","popupError","message","includes","hasExisting","existingKey","Promise","_","reject","authBase","loginUrl","href","signOut","signOutAll","refresh","isReady"],"sourceRoot":"../../../../src","sources":["ui/hooks/useAuth.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;A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AW,EAAEC,YAAY,EAAEC,eAAe,EAAEH,WAAW,EAAEJ,kBAAkB,CAAC,CAAC;EAE5F,MAAMiC,OAAO,GAAG5C,WAAW,CAAC,YAA2B;IACrD,MAAMY,MAAM,CAAC,CAAC;EAChB,CAAC,EAAE,CAACA,MAAM,CAAC,CAAC;EAEZ,MAAMiC,UAAU,GAAG7C,WAAW,CAAC,YAA2B;IACxD,MAAMa,SAAS,CAAC,CAAC;EACnB,CAAC,EAAE,CAACA,SAAS,CAAC,CAAC;EAEf,MAAMiC,OAAO,GAAG9C,WAAW,CAAC,YAA2B;IACrD,MAAMc,eAAe,CAAC,CAAC;EACzB,CAAC,EAAE,CAACA,eAAe,CAAC,CAAC;EAErB,OAAO;IACL;IACAV,IAAI;IACJC,eAAe;IACfC,SAAS;IACTyC,OAAO,EAAExC,YAAY;IACrBC,KAAK;IAEL;IACAC,MAAM;IACNmC,OAAO;IACPC,UAAU;IACVC,OAAO;IAEP;IACA/B,WAAW;IACXG,eAAe;IACfC;EACF,CAAC;AACH
|
|
1
|
+
{"version":3,"names":["useCallback","useOxy","isWebBrowser","useAuth","user","isAuthenticated","isLoading","isTokenReady","error","signIn","oxySignIn","handlePopupSession","logout","logoutAll","refreshSessions","oxyServices","hasIdentity","getPublicKey","showBottomSheet","openAvatarPicker","publicKey","authWebUrl","config","idpHostname","URL","hostname","isIdentityProvider","window","location","popupSession","signInWithPopup","sessionWithUser","Error","popupError","message","includes","hasExisting","existingKey","Promise","_","reject","authBase","loginUrl","href","signOut","signOutAll","refresh","isReady"],"sourceRoot":"../../../../src","sources":["ui/hooks/useAuth.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,QAAkB,OAAO;AAC7C,SAASC,MAAM,QAAQ,0BAAuB;AAE9C,SAASC,YAAY,QAAQ,gBAAa;AAoD1C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