@oxyhq/services 6.9.45 → 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 +102 -38
- 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 +37 -13
- 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 +30 -23
- 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/index.js +0 -35
- package/lib/commonjs/ui/components/index.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 +28 -15
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +50 -28
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +83 -48
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +12 -11
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +38 -23
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.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 -2
- 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 +17 -19
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +131 -162
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +110 -87
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +268 -216
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +23 -23
- 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 +74 -66
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +822 -195
- 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 +58 -50
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +18 -13
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +63 -57
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +14 -11
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- 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 +185 -205
- 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 +23 -25
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +16 -17
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +83 -60
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +14 -31
- 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 +128 -73
- 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 +4 -6
- 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 +105 -41
- 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 +37 -13
- 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 +30 -22
- 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/index.js +0 -5
- package/lib/module/ui/components/index.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 +27 -14
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js +49 -26
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +84 -48
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +12 -10
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +38 -22
- package/lib/module/ui/components/payment/PaymentSummaryStep.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 -2
- 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 +16 -17
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +117 -148
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +109 -86
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +254 -201
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +21 -21
- 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 +62 -54
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +789 -161
- 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 +56 -47
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +17 -12
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +62 -56
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +14 -11
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- 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 +182 -202
- 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 +23 -25
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +17 -18
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +75 -52
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +16 -33
- 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 +126 -71
- 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 +5 -7
- 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/index.d.ts +0 -5
- package/lib/typescript/commonjs/ui/components/index.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/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentSummaryStep.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/bottomSheetManager.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.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/AccountVerificationScreen.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/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.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/SearchSettingsScreen.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/KarmaFAQScreen.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/index.d.ts +0 -5
- package/lib/typescript/module/ui/components/index.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/PaymentDetailsStep.d.ts.map +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.map +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.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/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 +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/AccountVerificationScreen.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/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.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/SearchSettingsScreen.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/KarmaFAQScreen.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 +129 -49
- 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 +38 -13
- 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 +31 -24
- package/src/ui/components/fileManagement/UploadPreview.tsx +21 -25
- package/src/ui/components/fileManagement/styles.ts +206 -18
- package/src/ui/components/index.ts +0 -5
- 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 +17 -20
- package/src/ui/components/payment/PaymentMethodStep.tsx +33 -35
- package/src/ui/components/payment/PaymentReviewStep.tsx +63 -67
- package/src/ui/components/payment/PaymentSuccessStep.tsx +5 -13
- package/src/ui/components/payment/PaymentSummaryStep.tsx +26 -33
- 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 -2
- 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 +17 -16
- package/src/ui/screens/AccountOverviewScreen.tsx +98 -129
- package/src/ui/screens/AccountSettingsScreen.tsx +138 -165
- package/src/ui/screens/AccountSwitcherScreen.tsx +414 -402
- package/src/ui/screens/AccountVerificationScreen.tsx +25 -24
- 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 +64 -50
- package/src/ui/screens/FileManagementScreen.tsx +911 -158
- package/src/ui/screens/HelpSupportScreen.tsx +2 -3
- package/src/ui/screens/HistoryViewScreen.tsx +51 -17
- package/src/ui/screens/LanguageSelectorScreen.tsx +20 -10
- package/src/ui/screens/LegalDocumentsScreen.tsx +47 -64
- package/src/ui/screens/PaymentGatewayScreen.tsx +13 -14
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +51 -56
- package/src/ui/screens/PrivacySettingsScreen.tsx +97 -207
- package/src/ui/screens/ProfileScreen.tsx +1 -2
- package/src/ui/screens/SavesCollectionsScreen.tsx +25 -25
- package/src/ui/screens/SearchSettingsScreen.tsx +11 -19
- package/src/ui/screens/SessionManagementScreen.tsx +64 -50
- package/src/ui/screens/UserLinksScreen.tsx +15 -33
- package/src/ui/screens/UserListScreen.tsx +30 -19
- package/src/ui/screens/WelcomeNewUserScreen.tsx +60 -38
- 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 +5 -7
- 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/components/GroupedItem.js +0 -138
- package/lib/commonjs/ui/components/GroupedItem.js.map +0 -1
- package/lib/commonjs/ui/components/GroupedSection.js +0 -41
- package/lib/commonjs/ui/components/GroupedSection.js.map +0 -1
- package/lib/commonjs/ui/components/Section.js +0 -39
- package/lib/commonjs/ui/components/Section.js.map +0 -1
- package/lib/commonjs/ui/components/SectionTitle.js +0 -29
- package/lib/commonjs/ui/components/SectionTitle.js.map +0 -1
- package/lib/commonjs/ui/components/SettingRow.js +0 -96
- package/lib/commonjs/ui/components/SettingRow.js.map +0 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +0 -208
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.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/components/GroupedItem.js +0 -135
- package/lib/module/ui/components/GroupedItem.js.map +0 -1
- package/lib/module/ui/components/GroupedSection.js +0 -37
- package/lib/module/ui/components/GroupedSection.js.map +0 -1
- package/lib/module/ui/components/Section.js +0 -34
- package/lib/module/ui/components/Section.js.map +0 -1
- package/lib/module/ui/components/SectionTitle.js +0 -25
- package/lib/module/ui/components/SectionTitle.js.map +0 -1
- package/lib/module/ui/components/SettingRow.js +0 -91
- package/lib/module/ui/components/SettingRow.js.map +0 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +0 -204
- package/lib/module/ui/components/internal/GroupedPillButtons.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/components/GroupedItem.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts +0 -30
- package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Section.d.ts +0 -12
- package/lib/typescript/commonjs/ui/components/Section.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SectionTitle.d.ts +0 -10
- package/lib/typescript/commonjs/ui/components/SectionTitle.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SettingRow.d.ts +0 -20
- package/lib/typescript/commonjs/ui/components/SettingRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.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/components/GroupedItem.d.ts +0 -24
- package/lib/typescript/module/ui/components/GroupedItem.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/GroupedSection.d.ts +0 -30
- package/lib/typescript/module/ui/components/GroupedSection.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Section.d.ts +0 -12
- package/lib/typescript/module/ui/components/Section.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SectionTitle.d.ts +0 -10
- package/lib/typescript/module/ui/components/SectionTitle.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SettingRow.d.ts +0 -20
- package/lib/typescript/module/ui/components/SettingRow.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts +0 -24
- package/lib/typescript/module/ui/components/internal/GroupedPillButtons.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/components/GroupedItem.tsx +0 -161
- package/src/ui/components/GroupedSection.tsx +0 -60
- package/src/ui/components/Section.tsx +0 -42
- package/src/ui/components/SectionTitle.tsx +0 -27
- package/src/ui/components/SettingRow.tsx +0 -105
- package/src/ui/components/internal/GroupedPillButtons.tsx +0 -253
- 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,7 +1,7 @@
|
|
|
1
|
-
import { useQuery } from '@tanstack/react-query';
|
|
1
|
+
import { useQuery, useInfiniteQuery } from '@tanstack/react-query';
|
|
2
2
|
import { queryKeys } from './queryKeys';
|
|
3
3
|
import { useOxy } from '../../context/OxyContext';
|
|
4
|
-
import type { SecurityActivity, SecurityEventType } from '@oxyhq/core';
|
|
4
|
+
import type { SecurityActivity, SecurityActivityResponse, SecurityEventType } from '@oxyhq/core';
|
|
5
5
|
|
|
6
6
|
/**
|
|
7
7
|
* Get user's security activity with pagination
|
|
@@ -62,3 +62,43 @@ export const useRecentSecurityActivity = (limit = 10) => {
|
|
|
62
62
|
});
|
|
63
63
|
};
|
|
64
64
|
|
|
65
|
+
/**
|
|
66
|
+
* Get user's security activity with infinite pagination.
|
|
67
|
+
* Each page returns up to `limit` events; `getNextPageParam` walks the
|
|
68
|
+
* `offset` cursor until the API reports `hasMore: false`.
|
|
69
|
+
*/
|
|
70
|
+
export const useInfiniteSecurityActivity = (
|
|
71
|
+
options?: {
|
|
72
|
+
limit?: number;
|
|
73
|
+
eventType?: SecurityEventType;
|
|
74
|
+
enabled?: boolean;
|
|
75
|
+
}
|
|
76
|
+
) => {
|
|
77
|
+
const { oxyServices, activeSessionId } = useOxy();
|
|
78
|
+
const limit = options?.limit ?? 30;
|
|
79
|
+
|
|
80
|
+
return useInfiniteQuery<SecurityActivityResponse, Error>({
|
|
81
|
+
queryKey: queryKeys.security.infinite(limit, options?.eventType),
|
|
82
|
+
queryFn: async ({ pageParam }) => {
|
|
83
|
+
if (!activeSessionId) {
|
|
84
|
+
throw new Error('No active session');
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
const offset = typeof pageParam === 'number' ? pageParam : 0;
|
|
88
|
+
return await oxyServices.getSecurityActivity(
|
|
89
|
+
limit,
|
|
90
|
+
offset,
|
|
91
|
+
options?.eventType
|
|
92
|
+
);
|
|
93
|
+
},
|
|
94
|
+
initialPageParam: 0,
|
|
95
|
+
getNextPageParam: (lastPage) => {
|
|
96
|
+
if (!lastPage.hasMore) return undefined;
|
|
97
|
+
return lastPage.offset + lastPage.limit;
|
|
98
|
+
},
|
|
99
|
+
enabled: (options?.enabled !== false) && !!activeSessionId,
|
|
100
|
+
staleTime: 5 * 60 * 1000, // 5 minutes
|
|
101
|
+
gcTime: 10 * 60 * 1000, // 10 minutes
|
|
102
|
+
});
|
|
103
|
+
};
|
|
104
|
+
|
|
@@ -1,74 +1,115 @@
|
|
|
1
|
-
|
|
1
|
+
/**
|
|
2
|
+
* Offline-first QueryClient with cross-restart persistence.
|
|
3
|
+
*
|
|
4
|
+
* Wires together:
|
|
5
|
+
* - TanStack Query with `networkMode: 'offlineFirst'` for queries and mutations
|
|
6
|
+
* so cached data is served immediately and mutations are queued (paused) while
|
|
7
|
+
* the browser/device reports offline.
|
|
8
|
+
* - `persistQueryClient(...)` from `@tanstack/react-query-persist-client` so that
|
|
9
|
+
* query results AND paused mutations survive a cold restart (kill-and-relaunch).
|
|
10
|
+
* - `onlineManager` resume hook so paused mutations replay the moment the
|
|
11
|
+
* network is reported back, even if the host app swapped in a custom
|
|
12
|
+
* onlineManager implementation.
|
|
13
|
+
*
|
|
14
|
+
* Storage layer:
|
|
15
|
+
* - React Native -> AsyncStorage via `createAsyncStoragePersister`.
|
|
16
|
+
* - Web -> localStorage via `createSyncStoragePersister` (wrapped in the
|
|
17
|
+
* async persister API for a single call site).
|
|
18
|
+
* - Both adapters are content-shape compatible with our `StorageInterface`.
|
|
19
|
+
*
|
|
20
|
+
* Whitelist policy:
|
|
21
|
+
* - Persist every account/user/session/privacy query and every queued mutation.
|
|
22
|
+
* - DO NOT persist large list queries (e.g. activity feeds) — they go stale
|
|
23
|
+
* fast and would balloon storage. Add new keys to `PERSISTED_QUERY_PREFIXES`
|
|
24
|
+
* when introducing reads that should survive restart.
|
|
25
|
+
*/
|
|
26
|
+
|
|
27
|
+
import { QueryClient, onlineManager, type Query, type Mutation } from '@tanstack/react-query';
|
|
28
|
+
import {
|
|
29
|
+
persistQueryClient,
|
|
30
|
+
type PersistedClient,
|
|
31
|
+
} from '@tanstack/react-query-persist-client';
|
|
32
|
+
import { createAsyncStoragePersister } from '@tanstack/query-async-storage-persister';
|
|
2
33
|
import { isDev } from '@oxyhq/core';
|
|
3
34
|
import type { StorageInterface } from '../utils/storageHelpers';
|
|
4
35
|
|
|
5
|
-
const QUERY_CACHE_KEY = '
|
|
6
|
-
const
|
|
36
|
+
const QUERY_CACHE_KEY = 'oxy_query_cache_v2';
|
|
37
|
+
const QUERY_CACHE_MAX_AGE = 30 * 24 * 60 * 60 * 1000; // 30 days
|
|
38
|
+
const QUERY_PERSIST_THROTTLE_MS = 1_000;
|
|
39
|
+
|
|
40
|
+
/**
|
|
41
|
+
* Query-key prefixes that should survive cold restart. Anything not listed
|
|
42
|
+
* is dropped during dehydration so the persisted blob stays small.
|
|
43
|
+
*
|
|
44
|
+
* Mutations are persisted independently (always) so the offline write queue
|
|
45
|
+
* works regardless of the read whitelist.
|
|
46
|
+
*/
|
|
47
|
+
const PERSISTED_QUERY_PREFIXES: ReadonlyArray<string> = [
|
|
48
|
+
'accounts',
|
|
49
|
+
'users',
|
|
50
|
+
'sessions',
|
|
51
|
+
'devices',
|
|
52
|
+
'privacy',
|
|
53
|
+
];
|
|
7
54
|
|
|
8
55
|
/**
|
|
9
|
-
*
|
|
56
|
+
* Adapt our `StorageInterface` (which always returns `null` for missing keys)
|
|
57
|
+
* to TanStack's `AsyncStorage` shape. The two are structurally identical
|
|
58
|
+
* apart from naming; this also gives us a single place to add error
|
|
59
|
+
* suppression if a host platform's storage throws.
|
|
10
60
|
*/
|
|
11
|
-
|
|
61
|
+
function adaptStorage(storage: StorageInterface): {
|
|
62
|
+
getItem: (key: string) => Promise<string | null>;
|
|
63
|
+
setItem: (key: string, value: string) => Promise<void>;
|
|
64
|
+
removeItem: (key: string) => Promise<void>;
|
|
65
|
+
} {
|
|
12
66
|
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
|
-
|
|
32
|
-
const parsed = JSON.parse(cached);
|
|
33
|
-
|
|
34
|
-
// Check version compatibility
|
|
35
|
-
if (parsed.version !== QUERY_CACHE_VERSION) {
|
|
36
|
-
// Clear old cache on version mismatch
|
|
37
|
-
await storage.removeItem(QUERY_CACHE_KEY);
|
|
38
|
-
return undefined;
|
|
39
|
-
}
|
|
67
|
+
getItem: (key) => storage.getItem(key),
|
|
68
|
+
setItem: (key, value) => storage.setItem(key, value),
|
|
69
|
+
removeItem: (key) => storage.removeItem(key),
|
|
70
|
+
};
|
|
71
|
+
}
|
|
40
72
|
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
73
|
+
/**
|
|
74
|
+
* Decide whether a given query should be written to persistent storage.
|
|
75
|
+
*
|
|
76
|
+
* Two gates:
|
|
77
|
+
* 1. The query must be in our prefix whitelist.
|
|
78
|
+
* 2. The query must have completed successfully at least once — there's no
|
|
79
|
+
* point persisting a `pending`/`error` state, and persisting `error` would
|
|
80
|
+
* leak failure objects across restarts.
|
|
81
|
+
*/
|
|
82
|
+
function shouldDehydrateQuery(query: Query): boolean {
|
|
83
|
+
if (query.state.status !== 'success') {
|
|
84
|
+
return false;
|
|
85
|
+
}
|
|
86
|
+
const head = query.queryKey[0];
|
|
87
|
+
if (typeof head !== 'string') {
|
|
88
|
+
return false;
|
|
89
|
+
}
|
|
90
|
+
return PERSISTED_QUERY_PREFIXES.includes(head);
|
|
91
|
+
}
|
|
47
92
|
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
},
|
|
56
|
-
removeClient: async () => {
|
|
57
|
-
try {
|
|
58
|
-
await storage.removeItem(QUERY_CACHE_KEY);
|
|
59
|
-
} catch (error) {
|
|
60
|
-
if (isDev()) {
|
|
61
|
-
console.warn('[QueryClient] Failed to remove cache:', error);
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
},
|
|
65
|
-
};
|
|
66
|
-
};
|
|
93
|
+
/**
|
|
94
|
+
* Persist every mutation regardless of status — paused mutations are
|
|
95
|
+
* exactly the ones that must survive restart to replay when online.
|
|
96
|
+
*/
|
|
97
|
+
function shouldDehydrateMutation(_mutation: Mutation): boolean {
|
|
98
|
+
return true;
|
|
99
|
+
}
|
|
67
100
|
|
|
68
101
|
/**
|
|
69
|
-
* Create a QueryClient with offline-first
|
|
102
|
+
* Create a QueryClient with offline-first defaults.
|
|
103
|
+
*
|
|
104
|
+
* Mutations marked with `networkMode: 'offlineFirst'` are queued by TanStack
|
|
105
|
+
* Query when offline (status "paused") and resumed automatically when
|
|
106
|
+
* `onlineManager` transitions back to online. Network monitoring wiring lives
|
|
107
|
+
* in `OxyProvider.tsx`.
|
|
108
|
+
*
|
|
109
|
+
* Persistence is attached separately via `attachQueryPersistence(...)`.
|
|
110
|
+
* Splitting the steps lets test/SSR callers create a stateless client.
|
|
70
111
|
*/
|
|
71
|
-
export const createQueryClient = (
|
|
112
|
+
export const createQueryClient = (): QueryClient => {
|
|
72
113
|
const client = new QueryClient({
|
|
73
114
|
defaultOptions: {
|
|
74
115
|
queries: {
|
|
@@ -79,35 +120,119 @@ export const createQueryClient = (storage?: StorageInterface | null): QueryClien
|
|
|
79
120
|
// Retry 3 times with exponential backoff
|
|
80
121
|
retry: 3,
|
|
81
122
|
retryDelay: (attemptIndex) => Math.min(1000 * 2 ** attemptIndex, 30000),
|
|
82
|
-
// Refetch on reconnect
|
|
123
|
+
// Refetch on reconnect so stale data is refreshed once online again.
|
|
83
124
|
refetchOnReconnect: true,
|
|
84
125
|
// Don't refetch on window focus (better for mobile)
|
|
85
126
|
refetchOnWindowFocus: false,
|
|
86
|
-
// Offline-first:
|
|
127
|
+
// Offline-first: serve cached data immediately, refetch in background.
|
|
87
128
|
networkMode: 'offlineFirst',
|
|
88
129
|
},
|
|
89
130
|
mutations: {
|
|
90
131
|
// Retry once for mutations
|
|
91
132
|
retry: 1,
|
|
92
|
-
// Offline-first: queue mutations when offline
|
|
133
|
+
// Offline-first: pause and queue mutations when offline.
|
|
93
134
|
networkMode: 'offlineFirst',
|
|
94
135
|
},
|
|
95
136
|
},
|
|
96
137
|
});
|
|
97
138
|
|
|
98
|
-
//
|
|
99
|
-
//
|
|
100
|
-
//
|
|
101
|
-
//
|
|
139
|
+
// Defensive: explicitly resume paused mutations whenever the network
|
|
140
|
+
// transitions back to online. TanStack Query does this internally too,
|
|
141
|
+
// but wiring it here keeps the behaviour robust if a custom onlineManager
|
|
142
|
+
// implementation is swapped in by the host app.
|
|
143
|
+
const unsubscribe = onlineManager.subscribe((isOnline) => {
|
|
144
|
+
if (isOnline) {
|
|
145
|
+
void client.getMutationCache().resumePausedMutations();
|
|
146
|
+
}
|
|
147
|
+
});
|
|
148
|
+
|
|
149
|
+
Object.defineProperty(client, '__oxyOnlineUnsubscribe', {
|
|
150
|
+
value: unsubscribe,
|
|
151
|
+
enumerable: false,
|
|
152
|
+
configurable: true,
|
|
153
|
+
writable: false,
|
|
154
|
+
});
|
|
102
155
|
|
|
103
156
|
return client;
|
|
104
157
|
};
|
|
105
158
|
|
|
159
|
+
export interface AttachPersistenceResult {
|
|
160
|
+
/** Promise that resolves once the persisted cache has been restored. */
|
|
161
|
+
restored: Promise<void>;
|
|
162
|
+
/** Detach the persistence subscription (tests + teardown). */
|
|
163
|
+
unsubscribe: () => void;
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
/**
|
|
167
|
+
* Wire `persistQueryClient` to the supplied storage adapter.
|
|
168
|
+
*
|
|
169
|
+
* Returns once the in-flight restore promise is available so callers can
|
|
170
|
+
* `await result.restored` before rendering UI that depends on cached data.
|
|
171
|
+
*
|
|
172
|
+
* Safe to no-op if `storage` is null/undefined (e.g. server-side render
|
|
173
|
+
* with no host storage).
|
|
174
|
+
*/
|
|
175
|
+
export const attachQueryPersistence = (
|
|
176
|
+
queryClient: QueryClient,
|
|
177
|
+
storage: StorageInterface | null | undefined,
|
|
178
|
+
): AttachPersistenceResult => {
|
|
179
|
+
if (!storage) {
|
|
180
|
+
return {
|
|
181
|
+
restored: Promise.resolve(),
|
|
182
|
+
unsubscribe: () => {},
|
|
183
|
+
};
|
|
184
|
+
}
|
|
185
|
+
|
|
186
|
+
const persister = createAsyncStoragePersister({
|
|
187
|
+
storage: adaptStorage(storage),
|
|
188
|
+
key: QUERY_CACHE_KEY,
|
|
189
|
+
throttleTime: QUERY_PERSIST_THROTTLE_MS,
|
|
190
|
+
});
|
|
191
|
+
|
|
192
|
+
const [unsubscribe, restored] = persistQueryClient({
|
|
193
|
+
queryClient,
|
|
194
|
+
persister,
|
|
195
|
+
maxAge: QUERY_CACHE_MAX_AGE,
|
|
196
|
+
dehydrateOptions: {
|
|
197
|
+
shouldDehydrateQuery,
|
|
198
|
+
shouldDehydrateMutation,
|
|
199
|
+
},
|
|
200
|
+
});
|
|
201
|
+
|
|
202
|
+
restored.catch((error) => {
|
|
203
|
+
if (isDev()) {
|
|
204
|
+
console.warn('[QueryClient] Failed to restore persisted cache', error);
|
|
205
|
+
}
|
|
206
|
+
});
|
|
207
|
+
|
|
208
|
+
return { unsubscribe, restored };
|
|
209
|
+
};
|
|
210
|
+
|
|
211
|
+
// Legacy v1 cache key — kept so we can opportunistically purge stale blobs
|
|
212
|
+
// written by older builds. Safe to drop after a few releases.
|
|
213
|
+
const LEGACY_QUERY_CACHE_KEYS: ReadonlyArray<string> = ['oxy_query_cache'];
|
|
214
|
+
|
|
106
215
|
/**
|
|
107
|
-
*
|
|
216
|
+
* Remove the persisted query+mutation cache (used on full sign-out / data
|
|
217
|
+
* reset). Safe to call even if persistence was never attached. Also clears
|
|
218
|
+
* legacy cache keys from older builds.
|
|
108
219
|
*/
|
|
109
220
|
export const clearQueryCache = async (storage: StorageInterface): Promise<void> => {
|
|
110
|
-
const
|
|
111
|
-
await
|
|
221
|
+
const keys = [QUERY_CACHE_KEY, ...LEGACY_QUERY_CACHE_KEYS];
|
|
222
|
+
await Promise.all(
|
|
223
|
+
keys.map(async (key) => {
|
|
224
|
+
try {
|
|
225
|
+
await storage.removeItem(key);
|
|
226
|
+
} catch (error) {
|
|
227
|
+
if (isDev()) {
|
|
228
|
+
console.warn(`[QueryClient] Failed to clear persisted query cache (${key})`, error);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
}),
|
|
232
|
+
);
|
|
112
233
|
};
|
|
113
234
|
|
|
235
|
+
/**
|
|
236
|
+
* Re-export the persisted client shape so callers can type custom persisters.
|
|
237
|
+
*/
|
|
238
|
+
export type { PersistedClient };
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { useState, useCallback } from 'react';
|
|
2
|
-
import { toast } from '
|
|
2
|
+
import { toast } from '@oxyhq/bloom';
|
|
3
3
|
|
|
4
4
|
interface UseAsyncActionOptions<T> {
|
|
5
5
|
/** Function to execute */
|
|
@@ -63,7 +63,7 @@ export function useAsyncAction<T = void>(
|
|
|
63
63
|
setError(null);
|
|
64
64
|
|
|
65
65
|
if (showLoadingToast && loadingMessage) {
|
|
66
|
-
toast.
|
|
66
|
+
toast.info(loadingMessage);
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
try {
|
|
@@ -111,7 +111,7 @@ export async function executeWithToast<T>(
|
|
|
111
111
|
const { successMessage, errorMessage, loadingMessage } = options || {};
|
|
112
112
|
|
|
113
113
|
if (loadingMessage) {
|
|
114
|
-
toast.
|
|
114
|
+
toast.info(loadingMessage);
|
|
115
115
|
}
|
|
116
116
|
|
|
117
117
|
try {
|
package/src/ui/hooks/useAuth.ts
CHANGED
|
@@ -2,18 +2,26 @@
|
|
|
2
2
|
* Avatar Picker Hook
|
|
3
3
|
*
|
|
4
4
|
* Extracts avatar selection logic from OxyContext for better modularity.
|
|
5
|
-
*
|
|
6
|
-
*
|
|
5
|
+
*
|
|
6
|
+
* Flow:
|
|
7
|
+
* 1. Open the FileManagement bottom sheet in select mode for image files.
|
|
8
|
+
* 2. After the user picks an image, route to the AvatarCrop screen so they
|
|
9
|
+
* can square-crop + zoom before the avatar is set.
|
|
10
|
+
* 3. The cropped JPEG is uploaded as a NEW file via `oxyServices.assetUpload`
|
|
11
|
+
* and that file becomes the user's avatar.
|
|
12
|
+
*
|
|
13
|
+
* `expo-image-manipulator` is required for the crop step (declared as an
|
|
14
|
+
* optional peer in the consuming app) — see AvatarCropScreen.
|
|
7
15
|
*/
|
|
8
16
|
|
|
9
17
|
import { useCallback } from 'react';
|
|
10
|
-
import type { OxyServices } from '@oxyhq/core';
|
|
11
|
-
import { translate } from '@oxyhq/core';
|
|
18
|
+
import type { FileMetadata, OxyServices } from '@oxyhq/core';
|
|
19
|
+
import { translate, updateAvatarVisibility } from '@oxyhq/core';
|
|
12
20
|
import type { QueryClient } from '@tanstack/react-query';
|
|
13
|
-
import { toast } from '
|
|
21
|
+
import { toast } from '@oxyhq/bloom';
|
|
14
22
|
import type { RouteName } from '../navigation/routes';
|
|
15
|
-
import { updateAvatarVisibility } from '@oxyhq/core';
|
|
16
23
|
import { updateProfileWithAvatar } from '../utils/avatarUtils';
|
|
24
|
+
import type { AvatarCropResult } from '../screens/AvatarCropScreen';
|
|
17
25
|
|
|
18
26
|
interface UseAvatarPickerOptions {
|
|
19
27
|
oxyServices: OxyServices;
|
|
@@ -23,6 +31,22 @@ interface UseAvatarPickerOptions {
|
|
|
23
31
|
showBottomSheet: (config: { screen: RouteName; props?: Record<string, unknown> }) => void;
|
|
24
32
|
}
|
|
25
33
|
|
|
34
|
+
/** Upload result shape returned by oxyServices.assetUpload (single-file path). */
|
|
35
|
+
interface AssetUploadResult {
|
|
36
|
+
file?: { id?: string };
|
|
37
|
+
files?: Array<{ id?: string }>;
|
|
38
|
+
id?: string;
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
function extractUploadedFileId(result: AssetUploadResult | undefined): string | undefined {
|
|
42
|
+
if (!result) return undefined;
|
|
43
|
+
if (typeof result.id === 'string') return result.id;
|
|
44
|
+
if (result.file?.id) return result.file.id;
|
|
45
|
+
const first = result.files?.[0];
|
|
46
|
+
if (first?.id) return first.id;
|
|
47
|
+
return undefined;
|
|
48
|
+
}
|
|
49
|
+
|
|
26
50
|
export function useAvatarPicker({
|
|
27
51
|
oxyServices,
|
|
28
52
|
currentLanguage,
|
|
@@ -30,36 +54,93 @@ export function useAvatarPicker({
|
|
|
30
54
|
queryClient,
|
|
31
55
|
showBottomSheet,
|
|
32
56
|
}: UseAvatarPickerOptions) {
|
|
57
|
+
/**
|
|
58
|
+
* Final step: take the cropped JPEG, upload it as a new public file, then
|
|
59
|
+
* set it as the user's avatar. Fires success/error toasts.
|
|
60
|
+
*/
|
|
61
|
+
const finalizeCroppedAvatar = useCallback(
|
|
62
|
+
async (cropped: AvatarCropResult) => {
|
|
63
|
+
try {
|
|
64
|
+
const uploadResult = (await oxyServices.assetUpload(
|
|
65
|
+
{
|
|
66
|
+
uri: cropped.uri,
|
|
67
|
+
type: cropped.mime,
|
|
68
|
+
name: `avatar-${Date.now()}.jpg`,
|
|
69
|
+
},
|
|
70
|
+
'public',
|
|
71
|
+
)) as AssetUploadResult;
|
|
72
|
+
|
|
73
|
+
const newFileId = extractUploadedFileId(uploadResult);
|
|
74
|
+
if (!newFileId) {
|
|
75
|
+
throw new Error('Avatar upload succeeded but no file ID was returned');
|
|
76
|
+
}
|
|
77
|
+
|
|
78
|
+
await updateAvatarVisibility(newFileId, oxyServices, 'useAvatarPicker');
|
|
79
|
+
await updateProfileWithAvatar(
|
|
80
|
+
{ avatar: newFileId },
|
|
81
|
+
oxyServices,
|
|
82
|
+
activeSessionId,
|
|
83
|
+
queryClient,
|
|
84
|
+
);
|
|
85
|
+
|
|
86
|
+
toast.success(
|
|
87
|
+
translate(currentLanguage ?? undefined, 'editProfile.toasts.avatarUpdated') ||
|
|
88
|
+
'Avatar updated',
|
|
89
|
+
);
|
|
90
|
+
} catch (e: unknown) {
|
|
91
|
+
const message = e instanceof Error ? e.message : undefined;
|
|
92
|
+
toast.error(
|
|
93
|
+
message ||
|
|
94
|
+
translate(currentLanguage ?? undefined, 'editProfile.toasts.updateAvatarFailed') ||
|
|
95
|
+
'Failed to update avatar',
|
|
96
|
+
);
|
|
97
|
+
}
|
|
98
|
+
},
|
|
99
|
+
[activeSessionId, currentLanguage, oxyServices, queryClient],
|
|
100
|
+
);
|
|
101
|
+
|
|
102
|
+
/**
|
|
103
|
+
* After the user picks a file in the FileManagement sheet, route to the
|
|
104
|
+
* crop screen with the file's download URL as the source image.
|
|
105
|
+
*/
|
|
106
|
+
const handleFilePicked = useCallback(
|
|
107
|
+
(file: FileMetadata) => {
|
|
108
|
+
if (!file.contentType?.startsWith('image/')) {
|
|
109
|
+
toast.error(
|
|
110
|
+
translate(currentLanguage ?? undefined, 'editProfile.toasts.selectImage') ||
|
|
111
|
+
'Please select an image file',
|
|
112
|
+
);
|
|
113
|
+
return;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
// Use the public download URL of the picked file as the crop source.
|
|
117
|
+
// The OxyServices file URL endpoints accept image variants, but for
|
|
118
|
+
// cropping we want the original — passing no variant returns it.
|
|
119
|
+
const sourceUri = oxyServices.getFileDownloadUrl(file.id);
|
|
120
|
+
|
|
121
|
+
showBottomSheet({
|
|
122
|
+
screen: 'AvatarCrop',
|
|
123
|
+
props: {
|
|
124
|
+
imageUri: sourceUri,
|
|
125
|
+
onConfirm: finalizeCroppedAvatar,
|
|
126
|
+
},
|
|
127
|
+
});
|
|
128
|
+
},
|
|
129
|
+
[currentLanguage, finalizeCroppedAvatar, oxyServices, showBottomSheet],
|
|
130
|
+
);
|
|
131
|
+
|
|
33
132
|
const openAvatarPicker = useCallback(() => {
|
|
34
133
|
showBottomSheet({
|
|
35
|
-
screen: 'FileManagement'
|
|
134
|
+
screen: 'FileManagement',
|
|
36
135
|
props: {
|
|
37
136
|
selectMode: true,
|
|
38
137
|
multiSelect: false,
|
|
39
138
|
disabledMimeTypes: ['video/', 'audio/', 'application/pdf'],
|
|
40
139
|
afterSelect: 'none',
|
|
41
|
-
onSelect:
|
|
42
|
-
if (!file.contentType.startsWith('image/')) {
|
|
43
|
-
toast.error(translate(currentLanguage ?? undefined, 'editProfile.toasts.selectImage') || 'Please select an image file');
|
|
44
|
-
return;
|
|
45
|
-
}
|
|
46
|
-
try {
|
|
47
|
-
await updateAvatarVisibility(file.id, oxyServices, 'OxyContext');
|
|
48
|
-
await updateProfileWithAvatar(
|
|
49
|
-
{ avatar: file.id },
|
|
50
|
-
oxyServices,
|
|
51
|
-
activeSessionId,
|
|
52
|
-
queryClient
|
|
53
|
-
);
|
|
54
|
-
toast.success(translate(currentLanguage ?? undefined, 'editProfile.toasts.avatarUpdated') || 'Avatar updated');
|
|
55
|
-
} catch (e: unknown) {
|
|
56
|
-
const message = e instanceof Error ? e.message : undefined;
|
|
57
|
-
toast.error(message || translate(currentLanguage ?? undefined, 'editProfile.toasts.updateAvatarFailed') || 'Failed to update avatar');
|
|
58
|
-
}
|
|
59
|
-
},
|
|
140
|
+
onSelect: handleFilePicked,
|
|
60
141
|
},
|
|
61
142
|
});
|
|
62
|
-
}, [
|
|
143
|
+
}, [handleFilePicked, showBottomSheet]);
|
|
63
144
|
|
|
64
145
|
return { openAvatarPicker };
|
|
65
146
|
}
|
|
@@ -1,11 +1,5 @@
|
|
|
1
1
|
import { useEffect, useState } from 'react';
|
|
2
|
-
import { OxyServices } from '@oxyhq/core';
|
|
3
|
-
|
|
4
|
-
let oxyInstance: OxyServices | null = null;
|
|
5
|
-
|
|
6
|
-
export const setOxyFileUrlInstance = (instance: OxyServices) => {
|
|
7
|
-
oxyInstance = instance;
|
|
8
|
-
};
|
|
2
|
+
import type { OxyServices } from '@oxyhq/core';
|
|
9
3
|
|
|
10
4
|
export interface UseFileDownloadUrlOptions {
|
|
11
5
|
variant?: string;
|
|
@@ -21,38 +15,21 @@ export interface UseFileDownloadUrlResult {
|
|
|
21
15
|
/**
|
|
22
16
|
* Hook to resolve a file's download URL asynchronously.
|
|
23
17
|
*
|
|
24
|
-
* Prefers the provided `oxyServices` instance, falls back to the module-level
|
|
25
|
-
* singleton set via `setOxyFileUrlInstance`.
|
|
26
|
-
*
|
|
27
18
|
* Uses `getFileDownloadUrlAsync` first, falling back to the synchronous
|
|
28
19
|
* `getFileDownloadUrl` if the async call fails.
|
|
29
20
|
*/
|
|
30
21
|
export const useFileDownloadUrl = (
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
22
|
+
oxyServices: OxyServices | null | undefined,
|
|
23
|
+
fileId: string | null | undefined,
|
|
24
|
+
options?: UseFileDownloadUrlOptions,
|
|
34
25
|
): UseFileDownloadUrlResult => {
|
|
35
|
-
// Support two call signatures:
|
|
36
|
-
// 1. useFileDownloadUrl(oxyServices, fileId, options) — preferred
|
|
37
|
-
// 2. useFileDownloadUrl(fileId, options) — legacy (uses singleton)
|
|
38
|
-
let services: OxyServices | null;
|
|
39
|
-
let fileId: string | null | undefined;
|
|
40
|
-
let options: UseFileDownloadUrlOptions | undefined;
|
|
41
|
-
|
|
42
|
-
if (fileIdOrServices instanceof OxyServices) {
|
|
43
|
-
services = fileIdOrServices;
|
|
44
|
-
fileId = typeof fileIdOrOptions === 'string' ? fileIdOrOptions : null;
|
|
45
|
-
options = maybeOptions;
|
|
46
|
-
} else {
|
|
47
|
-
services = oxyInstance;
|
|
48
|
-
fileId = typeof fileIdOrServices === 'string' ? fileIdOrServices : null;
|
|
49
|
-
options = typeof fileIdOrOptions === 'object' && fileIdOrOptions !== null ? fileIdOrOptions as UseFileDownloadUrlOptions : undefined;
|
|
50
|
-
}
|
|
51
|
-
|
|
52
26
|
const [url, setUrl] = useState<string | null>(null);
|
|
53
27
|
const [loading, setLoading] = useState(false);
|
|
54
28
|
const [error, setError] = useState<Error | null>(null);
|
|
55
29
|
|
|
30
|
+
const variant = options?.variant;
|
|
31
|
+
const expiresIn = options?.expiresIn;
|
|
32
|
+
|
|
56
33
|
useEffect(() => {
|
|
57
34
|
if (!fileId) {
|
|
58
35
|
setUrl(null);
|
|
@@ -61,7 +38,7 @@ export const useFileDownloadUrl = (
|
|
|
61
38
|
return;
|
|
62
39
|
}
|
|
63
40
|
|
|
64
|
-
if (!
|
|
41
|
+
if (!oxyServices) {
|
|
65
42
|
setUrl(null);
|
|
66
43
|
setLoading(false);
|
|
67
44
|
setError(new Error('OxyServices instance not configured for useFileDownloadUrl'));
|
|
@@ -69,22 +46,22 @@ export const useFileDownloadUrl = (
|
|
|
69
46
|
}
|
|
70
47
|
|
|
71
48
|
let cancelled = false;
|
|
72
|
-
const instance =
|
|
49
|
+
const instance = oxyServices;
|
|
50
|
+
const targetFileId = fileId;
|
|
73
51
|
|
|
74
52
|
const load = async () => {
|
|
75
53
|
setLoading(true);
|
|
76
54
|
setError(null);
|
|
77
55
|
|
|
78
56
|
try {
|
|
79
|
-
const { variant, expiresIn } = options || {};
|
|
80
57
|
let resolvedUrl: string | null = null;
|
|
81
58
|
|
|
82
59
|
if (typeof instance.getFileDownloadUrlAsync === 'function') {
|
|
83
|
-
resolvedUrl = await instance.getFileDownloadUrlAsync(
|
|
60
|
+
resolvedUrl = await instance.getFileDownloadUrlAsync(targetFileId, variant, expiresIn);
|
|
84
61
|
}
|
|
85
62
|
|
|
86
63
|
if (!resolvedUrl && typeof instance.getFileDownloadUrl === 'function') {
|
|
87
|
-
resolvedUrl = instance.getFileDownloadUrl(
|
|
64
|
+
resolvedUrl = instance.getFileDownloadUrl(targetFileId, variant, expiresIn);
|
|
88
65
|
}
|
|
89
66
|
|
|
90
67
|
if (!cancelled) {
|
|
@@ -94,8 +71,7 @@ export const useFileDownloadUrl = (
|
|
|
94
71
|
// Fallback to sync URL on error where possible
|
|
95
72
|
try {
|
|
96
73
|
if (typeof instance.getFileDownloadUrl === 'function') {
|
|
97
|
-
const
|
|
98
|
-
const fallbackUrl = instance.getFileDownloadUrl(fileId!, variant, expiresIn);
|
|
74
|
+
const fallbackUrl = instance.getFileDownloadUrl(targetFileId, variant, expiresIn);
|
|
99
75
|
if (!cancelled) {
|
|
100
76
|
setUrl(fallbackUrl || null);
|
|
101
77
|
setError(err instanceof Error ? err : new Error(String(err)));
|
|
@@ -103,7 +79,7 @@ export const useFileDownloadUrl = (
|
|
|
103
79
|
return;
|
|
104
80
|
}
|
|
105
81
|
} catch {
|
|
106
|
-
//
|
|
82
|
+
// Secondary failure: surface the original error below.
|
|
107
83
|
}
|
|
108
84
|
|
|
109
85
|
if (!cancelled) {
|
|
@@ -121,7 +97,7 @@ export const useFileDownloadUrl = (
|
|
|
121
97
|
return () => {
|
|
122
98
|
cancelled = true;
|
|
123
99
|
};
|
|
124
|
-
}, [fileId,
|
|
100
|
+
}, [fileId, oxyServices, variant, expiresIn]);
|
|
125
101
|
|
|
126
102
|
return { url, loading, error };
|
|
127
103
|
};
|