@oxyhq/services 5.25.0 → 5.26.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/README.md +60 -8
- package/lib/commonjs/core/AuthManager.js +405 -0
- package/lib/commonjs/core/AuthManager.js.map +1 -0
- package/lib/commonjs/core/HttpService.js +39 -1
- package/lib/commonjs/core/HttpService.js.map +1 -1
- package/lib/commonjs/core/index.js +16 -0
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.fedcm.js +38 -44
- package/lib/commonjs/core/mixins/OxyServices.fedcm.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.popup.js +9 -7
- package/lib/commonjs/core/mixins/OxyServices.popup.js.map +1 -1
- package/lib/commonjs/crypto/keyManager.js +16 -21
- package/lib/commonjs/crypto/keyManager.js.map +1 -1
- package/lib/commonjs/index.js +386 -18
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/lib/sonner.js +13 -17
- package/lib/commonjs/lib/sonner.js.map +1 -1
- package/lib/commonjs/lib/sonner.native.js +24 -0
- package/lib/commonjs/lib/sonner.native.js.map +1 -0
- package/lib/commonjs/lib/sonner.web.js +24 -0
- package/lib/commonjs/lib/sonner.web.js.map +1 -0
- package/lib/commonjs/shared/index.js +227 -0
- package/lib/commonjs/shared/index.js.map +1 -0
- package/lib/commonjs/shared/utils/colorUtils.js +161 -0
- package/lib/commonjs/shared/utils/colorUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/debugUtils.js +84 -0
- package/lib/commonjs/shared/utils/debugUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/errorUtils.js +190 -0
- package/lib/commonjs/shared/utils/errorUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/index.js +196 -0
- package/lib/commonjs/shared/utils/index.js.map +1 -0
- package/lib/commonjs/shared/utils/networkUtils.js +213 -0
- package/lib/commonjs/shared/utils/networkUtils.js.map +1 -0
- package/lib/commonjs/shared/utils/themeUtils.js +118 -0
- package/lib/commonjs/shared/utils/themeUtils.js.map +1 -0
- package/lib/commonjs/ui/client.js +1 -1
- package/lib/commonjs/ui/components/BottomSheetRouter.js +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +1 -1
- package/lib/commonjs/ui/components/FontLoader.js +1 -1
- package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
- package/lib/commonjs/ui/components/GroupedItem.js +1 -1
- package/lib/commonjs/ui/components/Header.js +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +10 -2
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +19 -20
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js +1 -1
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -1
- package/lib/commonjs/ui/components/QuickActions.js +1 -1
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -1
- package/lib/commonjs/ui/components/Section.js +1 -1
- package/lib/commonjs/ui/components/SectionTitle.js +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +546 -0
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -0
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +3 -2
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/mutations/mutationFactory.js +1 -1
- package/lib/commonjs/ui/hooks/mutations/useAccountMutations.js +1 -1
- package/lib/commonjs/ui/hooks/mutations/useServicesMutations.js +1 -1
- package/lib/commonjs/ui/hooks/useAsyncAction.js +1 -1
- package/lib/commonjs/ui/hooks/{use-color-scheme.js → useColorScheme.js} +1 -1
- package/lib/commonjs/ui/hooks/useColorScheme.js.map +1 -0
- package/lib/commonjs/ui/hooks/useSessionSocket.js +7 -13
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSettingToggle.js +1 -1
- package/lib/commonjs/ui/hooks/useThemeColors.js +1 -1
- package/lib/commonjs/ui/hooks/useThemeStyles.js +1 -1
- package/lib/commonjs/ui/navigation/bottomSheetManager.js +5 -2
- package/lib/commonjs/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +7 -8
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +8 -8
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +7 -7
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +3 -3
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +5 -5
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +2 -2
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +2 -2
- package/lib/commonjs/ui/screens/FAQScreen.js +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +2 -2
- package/lib/commonjs/ui/screens/FollowersListScreen.js +18 -0
- package/lib/commonjs/ui/screens/FollowersListScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FollowingListScreen.js +18 -0
- package/lib/commonjs/ui/screens/FollowingListScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/HelpSupportScreen.js +2 -2
- package/lib/commonjs/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +2 -2
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +2 -2
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js +229 -0
- package/lib/commonjs/ui/screens/LearnMoreUsernamesScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +2 -2
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/OxyAuthScreen.js +9 -21
- package/lib/commonjs/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +2 -2
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +1 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +2 -2
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +1 -1
- package/lib/commonjs/ui/screens/UserListScreen.js +411 -0
- package/lib/commonjs/ui/screens/UserListScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +1 -1
- package/lib/commonjs/ui/stores/authStore.js +4 -6
- package/lib/commonjs/ui/stores/authStore.js.map +1 -1
- package/lib/commonjs/ui/utils/colorUtils.js +43 -46
- package/lib/commonjs/ui/utils/colorUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +1 -1
- package/lib/commonjs/ui/utils/themeUtils.js +29 -39
- package/lib/commonjs/ui/utils/themeUtils.js.map +1 -1
- package/lib/commonjs/ui/utils/{user-utils.js → userUtils.js} +1 -1
- package/lib/commonjs/ui/utils/userUtils.js.map +1 -0
- package/lib/commonjs/utils/errorUtils.js +0 -13
- package/lib/commonjs/utils/errorUtils.js.map +1 -1
- package/lib/commonjs/utils/hookUtils.js +8 -8
- package/lib/commonjs/utils/hookUtils.js.map +1 -1
- package/lib/commonjs/utils/platform.js +129 -0
- package/lib/commonjs/utils/platform.js.map +1 -0
- package/lib/commonjs/web/WebOxyContext.js +273 -41
- package/lib/commonjs/web/WebOxyContext.js.map +1 -1
- package/lib/commonjs/web/index.js +177 -4
- package/lib/commonjs/web/index.js.map +1 -1
- package/lib/commonjs/web.js +12 -12
- package/lib/commonjs/web.js.map +1 -1
- package/lib/module/core/AuthManager.js +399 -0
- package/lib/module/core/AuthManager.js.map +1 -0
- package/lib/module/core/HttpService.js +39 -1
- package/lib/module/core/HttpService.js.map +1 -1
- package/lib/module/core/index.js +2 -0
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.fedcm.js +38 -44
- package/lib/module/core/mixins/OxyServices.fedcm.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.popup.js +9 -7
- package/lib/module/core/mixins/OxyServices.popup.js.map +1 -1
- package/lib/module/crypto/keyManager.js +16 -21
- package/lib/module/crypto/keyManager.js.map +1 -1
- package/lib/module/index.js +34 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/lib/sonner.js +11 -16
- package/lib/module/lib/sonner.js.map +1 -1
- package/lib/module/lib/sonner.native.js +19 -0
- package/lib/module/lib/sonner.native.js.map +1 -0
- package/lib/module/lib/sonner.web.js +19 -0
- package/lib/module/lib/sonner.web.js.map +1 -0
- package/lib/module/shared/index.js +37 -0
- package/lib/module/shared/index.js.map +1 -0
- package/lib/module/shared/utils/colorUtils.js +150 -0
- package/lib/module/shared/utils/colorUtils.js.map +1 -0
- package/lib/module/shared/utils/debugUtils.js +75 -0
- package/lib/module/shared/utils/debugUtils.js.map +1 -0
- package/lib/module/shared/utils/errorUtils.js +176 -0
- package/lib/module/shared/utils/errorUtils.js.map +1 -0
- package/lib/module/shared/utils/index.js +21 -0
- package/lib/module/shared/utils/index.js.map +1 -0
- package/lib/module/shared/utils/networkUtils.js +202 -0
- package/lib/module/shared/utils/networkUtils.js.map +1 -0
- package/lib/module/shared/utils/themeUtils.js +109 -0
- package/lib/module/shared/utils/themeUtils.js.map +1 -0
- package/lib/module/ui/client.js +1 -1
- package/lib/module/ui/client.js.map +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js +1 -1
- package/lib/module/ui/components/BottomSheetRouter.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +1 -1
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/FontLoader.js +1 -1
- package/lib/module/ui/components/FontLoader.js.map +1 -1
- package/lib/module/ui/components/GroupedItem.js +1 -1
- package/lib/module/ui/components/GroupedItem.js.map +1 -1
- package/lib/module/ui/components/Header.js +1 -1
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +10 -2
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +20 -21
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/ProfileCard.js +1 -1
- package/lib/module/ui/components/ProfileCard.js.map +1 -1
- package/lib/module/ui/components/QuickActions.js +1 -1
- package/lib/module/ui/components/QuickActions.js.map +1 -1
- package/lib/module/ui/components/Section.js +1 -1
- package/lib/module/ui/components/Section.js.map +1 -1
- package/lib/module/ui/components/SectionTitle.js +1 -1
- package/lib/module/ui/components/SectionTitle.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +536 -0
- package/lib/module/ui/components/SignInModal.js.map +1 -0
- 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/context/OxyContext.js +2 -2
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js +1 -1
- package/lib/module/ui/hooks/mutations/mutationFactory.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js +1 -1
- package/lib/module/ui/hooks/mutations/useAccountMutations.js.map +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js +1 -1
- package/lib/module/ui/hooks/mutations/useServicesMutations.js.map +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js +1 -1
- package/lib/module/ui/hooks/useAsyncAction.js.map +1 -1
- package/lib/module/ui/hooks/{use-color-scheme.js → useColorScheme.js} +1 -1
- package/lib/module/ui/hooks/useColorScheme.js.map +1 -0
- package/lib/module/ui/hooks/useSessionSocket.js +7 -13
- 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/hooks/useThemeColors.js +1 -1
- package/lib/module/ui/hooks/useThemeColors.js.map +1 -1
- package/lib/module/ui/hooks/useThemeStyles.js +1 -1
- package/lib/module/ui/hooks/useThemeStyles.js.map +1 -1
- package/lib/module/ui/navigation/bottomSheetManager.js +5 -2
- package/lib/module/ui/navigation/bottomSheetManager.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +7 -8
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +8 -8
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +7 -7
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +3 -3
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +5 -5
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +2 -2
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/EditProfileFieldScreen.js +2 -2
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -1
- package/lib/module/ui/screens/FAQScreen.js +1 -1
- package/lib/module/ui/screens/FAQScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +2 -2
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/FollowersListScreen.js +13 -0
- package/lib/module/ui/screens/FollowersListScreen.js.map +1 -0
- package/lib/module/ui/screens/FollowingListScreen.js +13 -0
- package/lib/module/ui/screens/FollowingListScreen.js.map +1 -0
- package/lib/module/ui/screens/HelpSupportScreen.js +2 -2
- package/lib/module/ui/screens/HelpSupportScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +2 -2
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +2 -2
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js +224 -0
- package/lib/module/ui/screens/LearnMoreUsernamesScreen.js.map +1 -0
- package/lib/module/ui/screens/LegalDocumentsScreen.js +2 -2
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/OxyAuthScreen.js +9 -21
- package/lib/module/ui/screens/OxyAuthScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +2 -2
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/ProfileScreen.js +1 -1
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +2 -2
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserListScreen.js +405 -0
- package/lib/module/ui/screens/UserListScreen.js.map +1 -0
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +1 -1
- 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 +1 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +1 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +4 -6
- package/lib/module/ui/stores/authStore.js.map +1 -1
- package/lib/module/ui/utils/colorUtils.js +7 -40
- package/lib/module/ui/utils/colorUtils.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +1 -1
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/utils/themeUtils.js +7 -35
- package/lib/module/ui/utils/themeUtils.js.map +1 -1
- package/lib/module/ui/utils/{user-utils.js → userUtils.js} +1 -1
- package/lib/module/ui/utils/userUtils.js.map +1 -0
- package/lib/module/utils/errorUtils.js +0 -7
- package/lib/module/utils/errorUtils.js.map +1 -1
- package/lib/module/utils/hookUtils.js +8 -8
- package/lib/module/utils/hookUtils.js.map +1 -1
- package/lib/module/utils/platform.js +118 -0
- package/lib/module/utils/platform.js.map +1 -0
- package/lib/module/web/WebOxyContext.js +272 -41
- package/lib/module/web/WebOxyContext.js.map +1 -1
- package/lib/module/web/index.js +26 -5
- package/lib/module/web/index.js.map +1 -1
- package/lib/module/web.js +2 -1
- package/lib/module/web.js.map +1 -1
- package/lib/typescript/commonjs/core/AuthManager.d.ts +144 -0
- package/lib/typescript/commonjs/core/AuthManager.d.ts.map +1 -0
- package/lib/typescript/commonjs/core/HttpService.d.ts.map +1 -1
- package/lib/typescript/commonjs/core/index.d.ts +2 -0
- package/lib/typescript/commonjs/core/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.fedcm.d.ts.map +1 -1
- package/lib/typescript/commonjs/core/mixins/OxyServices.popup.d.ts.map +1 -1
- package/lib/typescript/commonjs/crypto/keyManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/index.d.ts +16 -2
- package/lib/typescript/commonjs/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/lib/sonner.d.ts +11 -14
- package/lib/typescript/commonjs/lib/sonner.d.ts.map +1 -1
- package/lib/typescript/commonjs/lib/sonner.native.d.ts +15 -0
- package/lib/typescript/commonjs/lib/sonner.native.d.ts.map +1 -0
- package/lib/typescript/commonjs/lib/sonner.web.d.ts +15 -0
- package/lib/typescript/commonjs/lib/sonner.web.d.ts.map +1 -0
- package/lib/typescript/commonjs/models/session.d.ts +4 -0
- package/lib/typescript/commonjs/models/session.d.ts.map +1 -1
- package/lib/typescript/commonjs/shared/index.d.ts +29 -0
- package/lib/typescript/commonjs/shared/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/shared/utils/colorUtils.d.ts +105 -0
- package/lib/typescript/commonjs/shared/utils/colorUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/shared/utils/debugUtils.d.ts +49 -0
- package/lib/typescript/commonjs/shared/utils/debugUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/shared/utils/errorUtils.d.ts +98 -0
- package/lib/typescript/commonjs/shared/utils/errorUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/shared/utils/index.d.ts +14 -0
- package/lib/typescript/commonjs/shared/utils/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/shared/utils/networkUtils.d.ts +140 -0
- package/lib/typescript/commonjs/shared/utils/networkUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/shared/utils/themeUtils.d.ts +91 -0
- package/lib/typescript/commonjs/shared/utils/themeUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/components/FontLoader.d.ts +1 -1
- package/lib/typescript/commonjs/ui/components/FontLoader.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts +18 -0
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts +1 -2
- package/lib/typescript/commonjs/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/hooks/{use-color-scheme.d.ts → useColorScheme.d.ts} +1 -1
- package/lib/typescript/commonjs/ui/hooks/useColorScheme.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +2 -0
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts +9 -0
- package/lib/typescript/commonjs/ui/screens/FollowersListScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts +9 -0
- package/lib/typescript/commonjs/ui/screens/FollowingListScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts +5 -0
- package/lib/typescript/commonjs/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts +11 -0
- package/lib/typescript/commonjs/ui/screens/UserListScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/colorUtils.d.ts +7 -11
- package/lib/typescript/commonjs/ui/utils/colorUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/themeUtils.d.ts +6 -19
- package/lib/typescript/commonjs/ui/utils/themeUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/{user-utils.d.ts → userUtils.d.ts} +1 -1
- package/lib/typescript/commonjs/ui/utils/userUtils.d.ts.map +1 -0
- package/lib/typescript/commonjs/utils/errorUtils.d.ts +0 -6
- package/lib/typescript/commonjs/utils/errorUtils.d.ts.map +1 -1
- package/lib/typescript/commonjs/utils/platform.d.ts +41 -0
- package/lib/typescript/commonjs/utils/platform.d.ts.map +1 -0
- package/lib/typescript/commonjs/web/WebOxyContext.d.ts +117 -9
- package/lib/typescript/commonjs/web/WebOxyContext.d.ts.map +1 -1
- package/lib/typescript/commonjs/web/index.d.ts +19 -8
- package/lib/typescript/commonjs/web/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/web.d.ts +2 -1
- package/lib/typescript/commonjs/web.d.ts.map +1 -1
- package/lib/typescript/module/core/AuthManager.d.ts +144 -0
- package/lib/typescript/module/core/AuthManager.d.ts.map +1 -0
- package/lib/typescript/module/core/HttpService.d.ts.map +1 -1
- package/lib/typescript/module/core/index.d.ts +2 -0
- package/lib/typescript/module/core/index.d.ts.map +1 -1
- package/lib/typescript/module/core/mixins/OxyServices.fedcm.d.ts.map +1 -1
- package/lib/typescript/module/core/mixins/OxyServices.popup.d.ts.map +1 -1
- package/lib/typescript/module/crypto/keyManager.d.ts.map +1 -1
- package/lib/typescript/module/index.d.ts +16 -2
- package/lib/typescript/module/index.d.ts.map +1 -1
- package/lib/typescript/module/lib/sonner.d.ts +11 -14
- package/lib/typescript/module/lib/sonner.d.ts.map +1 -1
- package/lib/typescript/module/lib/sonner.native.d.ts +15 -0
- package/lib/typescript/module/lib/sonner.native.d.ts.map +1 -0
- package/lib/typescript/module/lib/sonner.web.d.ts +15 -0
- package/lib/typescript/module/lib/sonner.web.d.ts.map +1 -0
- package/lib/typescript/module/models/session.d.ts +4 -0
- package/lib/typescript/module/models/session.d.ts.map +1 -1
- package/lib/typescript/module/shared/index.d.ts +29 -0
- package/lib/typescript/module/shared/index.d.ts.map +1 -0
- package/lib/typescript/module/shared/utils/colorUtils.d.ts +105 -0
- package/lib/typescript/module/shared/utils/colorUtils.d.ts.map +1 -0
- package/lib/typescript/module/shared/utils/debugUtils.d.ts +49 -0
- package/lib/typescript/module/shared/utils/debugUtils.d.ts.map +1 -0
- package/lib/typescript/module/shared/utils/errorUtils.d.ts +98 -0
- package/lib/typescript/module/shared/utils/errorUtils.d.ts.map +1 -0
- package/lib/typescript/module/shared/utils/index.d.ts +14 -0
- package/lib/typescript/module/shared/utils/index.d.ts.map +1 -0
- package/lib/typescript/module/shared/utils/networkUtils.d.ts +140 -0
- package/lib/typescript/module/shared/utils/networkUtils.d.ts.map +1 -0
- package/lib/typescript/module/shared/utils/themeUtils.d.ts +91 -0
- package/lib/typescript/module/shared/utils/themeUtils.d.ts.map +1 -0
- package/lib/typescript/module/ui/components/FontLoader.d.ts +1 -1
- package/lib/typescript/module/ui/components/FontLoader.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts +18 -0
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -0
- package/lib/typescript/module/ui/context/OxyContext.d.ts +1 -2
- package/lib/typescript/module/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/module/ui/hooks/{use-color-scheme.d.ts → useColorScheme.d.ts} +1 -1
- package/lib/typescript/module/ui/hooks/useColorScheme.d.ts.map +1 -0
- package/lib/typescript/module/ui/hooks/useSessionSocket.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +2 -0
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/routes.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts +9 -0
- package/lib/typescript/module/ui/screens/FollowersListScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts +9 -0
- package/lib/typescript/module/ui/screens/FollowingListScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts +5 -0
- package/lib/typescript/module/ui/screens/LearnMoreUsernamesScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/OxyAuthScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts +11 -0
- package/lib/typescript/module/ui/screens/UserListScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/stores/authStore.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/colorUtils.d.ts +7 -11
- package/lib/typescript/module/ui/utils/colorUtils.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/themeUtils.d.ts +6 -19
- package/lib/typescript/module/ui/utils/themeUtils.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/{user-utils.d.ts → userUtils.d.ts} +1 -1
- package/lib/typescript/module/ui/utils/userUtils.d.ts.map +1 -0
- package/lib/typescript/module/utils/errorUtils.d.ts +0 -6
- package/lib/typescript/module/utils/errorUtils.d.ts.map +1 -1
- package/lib/typescript/module/utils/platform.d.ts +41 -0
- package/lib/typescript/module/utils/platform.d.ts.map +1 -0
- package/lib/typescript/module/web/WebOxyContext.d.ts +117 -9
- package/lib/typescript/module/web/WebOxyContext.d.ts.map +1 -1
- package/lib/typescript/module/web/index.d.ts +19 -8
- package/lib/typescript/module/web/index.d.ts.map +1 -1
- package/lib/typescript/module/web.d.ts +2 -1
- package/lib/typescript/module/web.d.ts.map +1 -1
- package/package.json +8 -2
- package/src/core/AuthManager.ts +436 -0
- package/src/core/HttpService.ts +43 -1
- package/src/core/index.ts +4 -0
- package/src/core/mixins/OxyServices.fedcm.ts +37 -42
- package/src/core/mixins/OxyServices.popup.ts +10 -7
- package/src/crypto/keyManager.ts +16 -21
- package/src/index.ts +83 -12
- package/src/lib/sonner.native.ts +28 -0
- package/src/lib/sonner.ts +11 -28
- package/src/lib/sonner.web.ts +28 -0
- package/src/models/session.ts +4 -0
- package/src/shared/index.ts +82 -0
- package/src/shared/utils/colorUtils.ts +155 -0
- package/src/shared/utils/debugUtils.ts +73 -0
- package/src/shared/utils/errorUtils.ts +181 -0
- package/src/shared/utils/index.ts +59 -0
- package/src/shared/utils/networkUtils.ts +248 -0
- package/src/shared/utils/themeUtils.ts +115 -0
- package/src/ui/components/BottomSheetRouter.tsx +1 -1
- package/src/ui/components/FontLoader.tsx +1 -2
- package/src/ui/components/GroupedItem.tsx +1 -1
- package/src/ui/components/Header.tsx +1 -1
- package/src/ui/components/OxyProvider.tsx +10 -0
- package/src/ui/components/OxySignInButton.tsx +20 -22
- package/src/ui/components/ProfileCard.tsx +1 -1
- package/src/ui/components/QuickActions.tsx +1 -1
- package/src/ui/components/Section.tsx +1 -1
- package/src/ui/components/SectionTitle.tsx +1 -1
- package/src/ui/components/SignInModal.tsx +534 -0
- package/src/ui/context/OxyContext.tsx +1 -2
- package/src/ui/hooks/queries/queryKeys.ts +2 -2
- package/src/ui/hooks/useSessionSocket.ts +12 -17
- package/src/ui/hooks/useThemeColors.ts +1 -1
- package/src/ui/hooks/useThemeStyles.ts +1 -1
- package/src/ui/navigation/bottomSheetManager.ts +5 -1
- package/src/ui/navigation/routes.ts +8 -9
- package/src/ui/screens/AccountCenterScreen.tsx +7 -7
- package/src/ui/screens/AccountOverviewScreen.tsx +6 -6
- package/src/ui/screens/AccountSettingsScreen.tsx +2 -2
- package/src/ui/screens/AccountSwitcherScreen.tsx +4 -4
- package/src/ui/screens/AppInfoScreen.tsx +1 -1
- package/src/ui/screens/EditProfileFieldScreen.tsx +1 -1
- package/src/ui/screens/FileManagementScreen.tsx +1 -1
- package/src/ui/screens/FollowersListScreen.tsx +14 -0
- package/src/ui/screens/FollowingListScreen.tsx +14 -0
- package/src/ui/screens/HelpSupportScreen.tsx +1 -1
- package/src/ui/screens/HistoryViewScreen.tsx +1 -1
- package/src/ui/screens/LanguageSelectorScreen.tsx +1 -1
- package/src/ui/screens/LearnMoreUsernamesScreen.tsx +231 -0
- package/src/ui/screens/LegalDocumentsScreen.tsx +1 -1
- package/src/ui/screens/OxyAuthScreen.tsx +10 -21
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +1 -1
- package/src/ui/screens/ProfileScreen.tsx +1 -1
- package/src/ui/screens/SavesCollectionsScreen.tsx +1 -1
- package/src/ui/screens/UserListScreen.tsx +416 -0
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +1 -1
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +1 -1
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +1 -1
- package/src/ui/screens/karma/KarmaLeaderboardScreen.tsx +1 -1
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +1 -1
- package/src/ui/screens/karma/KarmaRulesScreen.tsx +1 -1
- package/src/ui/stores/authStore.ts +5 -6
- package/src/ui/utils/colorUtils.ts +15 -43
- package/src/ui/utils/themeUtils.ts +14 -39
- package/src/utils/errorUtils.ts +1 -6
- package/src/utils/hookUtils.ts +8 -8
- package/src/utils/platform.ts +117 -0
- package/src/web/WebOxyContext.tsx +331 -41
- package/src/web/index.ts +76 -6
- package/src/web.ts +1 -1
- package/lib/commonjs/ui/hooks/use-color-scheme.js.map +0 -1
- package/lib/commonjs/ui/utils/user-utils.js.map +0 -1
- package/lib/module/ui/hooks/use-color-scheme.js.map +0 -1
- package/lib/module/ui/utils/user-utils.js.map +0 -1
- package/lib/typescript/commonjs/ui/hooks/use-color-scheme.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/user-utils.d.ts.map +0 -1
- package/lib/typescript/module/ui/hooks/use-color-scheme.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/user-utils.d.ts.map +0 -1
- /package/src/ui/hooks/{use-color-scheme.ts → useColorScheme.ts} +0 -0
- /package/src/ui/utils/{user-utils.ts → userUtils.ts} +0 -0
|
@@ -0,0 +1,176 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Error Utility Functions
|
|
5
|
+
*
|
|
6
|
+
* Consolidated error handling utilities for the OxyServices ecosystem.
|
|
7
|
+
* These functions help with common error patterns like checking HTTP status codes.
|
|
8
|
+
*
|
|
9
|
+
* @module shared/utils/errorUtils
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Common HTTP status codes used in error checking.
|
|
14
|
+
*/
|
|
15
|
+
export const HttpStatus = {
|
|
16
|
+
BAD_REQUEST: 400,
|
|
17
|
+
UNAUTHORIZED: 401,
|
|
18
|
+
FORBIDDEN: 403,
|
|
19
|
+
NOT_FOUND: 404,
|
|
20
|
+
CONFLICT: 409,
|
|
21
|
+
UNPROCESSABLE_ENTITY: 422,
|
|
22
|
+
TOO_MANY_REQUESTS: 429,
|
|
23
|
+
INTERNAL_SERVER_ERROR: 500,
|
|
24
|
+
BAD_GATEWAY: 502,
|
|
25
|
+
SERVICE_UNAVAILABLE: 503,
|
|
26
|
+
GATEWAY_TIMEOUT: 504
|
|
27
|
+
};
|
|
28
|
+
|
|
29
|
+
/**
|
|
30
|
+
* Extracts the HTTP status code from an error object.
|
|
31
|
+
*
|
|
32
|
+
* @param error - Any error object
|
|
33
|
+
* @returns The status code if found, undefined otherwise
|
|
34
|
+
*/
|
|
35
|
+
export const getErrorStatus = error => {
|
|
36
|
+
if (!error || typeof error !== 'object') return undefined;
|
|
37
|
+
const err = error;
|
|
38
|
+
|
|
39
|
+
// Direct status property
|
|
40
|
+
if (typeof err.status === 'number') return err.status;
|
|
41
|
+
|
|
42
|
+
// Axios-style response.status
|
|
43
|
+
if (err.response && typeof err.response === 'object') {
|
|
44
|
+
const response = err.response;
|
|
45
|
+
if (typeof response.status === 'number') return response.status;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
// statusCode property (some libraries use this)
|
|
49
|
+
if (typeof err.statusCode === 'number') return err.statusCode;
|
|
50
|
+
return undefined;
|
|
51
|
+
};
|
|
52
|
+
|
|
53
|
+
/**
|
|
54
|
+
* Extracts the error message from an error object.
|
|
55
|
+
*
|
|
56
|
+
* @param error - Any error object
|
|
57
|
+
* @param fallback - Fallback message if none found
|
|
58
|
+
* @returns The error message
|
|
59
|
+
*/
|
|
60
|
+
export const getErrorMessage = (error, fallback = 'An unknown error occurred') => {
|
|
61
|
+
if (!error) return fallback;
|
|
62
|
+
if (typeof error === 'string') return error;
|
|
63
|
+
if (error instanceof Error) return error.message;
|
|
64
|
+
if (typeof error === 'object') {
|
|
65
|
+
const err = error;
|
|
66
|
+
if (typeof err.message === 'string') return err.message;
|
|
67
|
+
if (typeof err.error === 'string') return err.error;
|
|
68
|
+
|
|
69
|
+
// Axios-style response.data.message
|
|
70
|
+
if (err.response && typeof err.response === 'object') {
|
|
71
|
+
const response = err.response;
|
|
72
|
+
if (response.data && typeof response.data === 'object') {
|
|
73
|
+
const data = response.data;
|
|
74
|
+
if (typeof data.message === 'string') return data.message;
|
|
75
|
+
if (typeof data.error === 'string') return data.error;
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
}
|
|
79
|
+
return fallback;
|
|
80
|
+
};
|
|
81
|
+
|
|
82
|
+
/**
|
|
83
|
+
* Check if an error indicates the user is already registered (HTTP 409 Conflict).
|
|
84
|
+
*
|
|
85
|
+
* The backend should always return HTTP 409 for duplicate registrations.
|
|
86
|
+
*
|
|
87
|
+
* @param error - Any error object
|
|
88
|
+
* @returns true if the error is a 409 Conflict
|
|
89
|
+
*/
|
|
90
|
+
export const isAlreadyRegisteredError = error => {
|
|
91
|
+
return getErrorStatus(error) === HttpStatus.CONFLICT;
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Check if an error is an authentication error (HTTP 401).
|
|
96
|
+
*
|
|
97
|
+
* @param error - Any error object
|
|
98
|
+
* @returns true if the error is a 401 Unauthorized
|
|
99
|
+
*/
|
|
100
|
+
export const isUnauthorizedError = error => {
|
|
101
|
+
return getErrorStatus(error) === HttpStatus.UNAUTHORIZED;
|
|
102
|
+
};
|
|
103
|
+
|
|
104
|
+
/**
|
|
105
|
+
* Check if an error is a forbidden error (HTTP 403).
|
|
106
|
+
*
|
|
107
|
+
* @param error - Any error object
|
|
108
|
+
* @returns true if the error is a 403 Forbidden
|
|
109
|
+
*/
|
|
110
|
+
export const isForbiddenError = error => {
|
|
111
|
+
return getErrorStatus(error) === HttpStatus.FORBIDDEN;
|
|
112
|
+
};
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Check if an error is a not found error (HTTP 404).
|
|
116
|
+
*
|
|
117
|
+
* @param error - Any error object
|
|
118
|
+
* @returns true if the error is a 404 Not Found
|
|
119
|
+
*/
|
|
120
|
+
export const isNotFoundError = error => {
|
|
121
|
+
return getErrorStatus(error) === HttpStatus.NOT_FOUND;
|
|
122
|
+
};
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* Check if an error is a rate limit error (HTTP 429).
|
|
126
|
+
*
|
|
127
|
+
* @param error - Any error object
|
|
128
|
+
* @returns true if the error is a 429 Too Many Requests
|
|
129
|
+
*/
|
|
130
|
+
export const isRateLimitError = error => {
|
|
131
|
+
return getErrorStatus(error) === HttpStatus.TOO_MANY_REQUESTS;
|
|
132
|
+
};
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Check if an error is a server error (HTTP 5xx).
|
|
136
|
+
*
|
|
137
|
+
* @param error - Any error object
|
|
138
|
+
* @returns true if the error is a 5xx server error
|
|
139
|
+
*/
|
|
140
|
+
export const isServerError = error => {
|
|
141
|
+
const status = getErrorStatus(error);
|
|
142
|
+
return status !== undefined && status >= 500 && status < 600;
|
|
143
|
+
};
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Check if an error is a network error (no response received).
|
|
147
|
+
*
|
|
148
|
+
* @param error - Any error object
|
|
149
|
+
* @returns true if the error appears to be a network error
|
|
150
|
+
*/
|
|
151
|
+
export const isNetworkError = error => {
|
|
152
|
+
if (!error || typeof error !== 'object') return false;
|
|
153
|
+
const err = error;
|
|
154
|
+
|
|
155
|
+
// Check for common network error indicators
|
|
156
|
+
if (err.name === 'NetworkError') return true;
|
|
157
|
+
if (err.code === 'ENOTFOUND' || err.code === 'ECONNREFUSED' || err.code === 'ETIMEDOUT') return true;
|
|
158
|
+
|
|
159
|
+
// Axios-style: has request but no response
|
|
160
|
+
if (err.request && !err.response) return true;
|
|
161
|
+
|
|
162
|
+
// Message-based detection
|
|
163
|
+
const message = getErrorMessage(error, '').toLowerCase();
|
|
164
|
+
return message.includes('network') || message.includes('connection') || message.includes('timeout');
|
|
165
|
+
};
|
|
166
|
+
|
|
167
|
+
/**
|
|
168
|
+
* Check if an error is retryable (network errors or 5xx server errors).
|
|
169
|
+
*
|
|
170
|
+
* @param error - Any error object
|
|
171
|
+
* @returns true if the request should be retried
|
|
172
|
+
*/
|
|
173
|
+
export const isRetryableError = error => {
|
|
174
|
+
return isNetworkError(error) || isServerError(error) || isRateLimitError(error);
|
|
175
|
+
};
|
|
176
|
+
//# sourceMappingURL=errorUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["HttpStatus","BAD_REQUEST","UNAUTHORIZED","FORBIDDEN","NOT_FOUND","CONFLICT","UNPROCESSABLE_ENTITY","TOO_MANY_REQUESTS","INTERNAL_SERVER_ERROR","BAD_GATEWAY","SERVICE_UNAVAILABLE","GATEWAY_TIMEOUT","getErrorStatus","error","undefined","err","status","response","statusCode","getErrorMessage","fallback","Error","message","data","isAlreadyRegisteredError","isUnauthorizedError","isForbiddenError","isNotFoundError","isRateLimitError","isServerError","isNetworkError","name","code","request","toLowerCase","includes","isRetryableError"],"sourceRoot":"../../../../src","sources":["shared/utils/errorUtils.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,OAAO,MAAMA,UAAU,GAAG;EACxBC,WAAW,EAAE,GAAG;EAChBC,YAAY,EAAE,GAAG;EACjBC,SAAS,EAAE,GAAG;EACdC,SAAS,EAAE,GAAG;EACdC,QAAQ,EAAE,GAAG;EACbC,oBAAoB,EAAE,GAAG;EACzBC,iBAAiB,EAAE,GAAG;EACtBC,qBAAqB,EAAE,GAAG;EAC1BC,WAAW,EAAE,GAAG;EAChBC,mBAAmB,EAAE,GAAG;EACxBC,eAAe,EAAE;AACnB,CAAU;;AAEV;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,cAAc,GAAIC,KAAc,IAAyB;EACpE,IAAI,CAACA,KAAK,IAAI,OAAOA,KAAK,KAAK,QAAQ,EAAE,OAAOC,SAAS;EAEzD,MAAMC,GAAG,GAAGF,KAAgC;;EAE5C;EACA,IAAI,OAAOE,GAAG,CAACC,MAAM,KAAK,QAAQ,EAAE,OAAOD,GAAG,CAACC,MAAM;;EAErD;EACA,IAAID,GAAG,CAACE,QAAQ,IAAI,OAAOF,GAAG,CAACE,QAAQ,KAAK,QAAQ,EAAE;IACpD,MAAMA,QAAQ,GAAGF,GAAG,CAACE,QAAmC;IACxD,IAAI,OAAOA,QAAQ,CAACD,MAAM,KAAK,QAAQ,EAAE,OAAOC,QAAQ,CAACD,MAAM;EACjE;;EAEA;EACA,IAAI,OAAOD,GAAG,CAACG,UAAU,KAA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OAAO,IAAI;;EAEpG;EACA,IAAIjB,GAAG,CAACkB,OAAO,IAAI,CAAClB,GAAG,CAACE,QAAQ,EAAE,OAAO,IAAI;;EAE7C;EACA,MAAMK,OAAO,GAAGH,eAAe,CAACN,KAAK,EAAE,EAAE,CAAC,CAACqB,WAAW,CAAC,CAAC;EACxD,OAAOZ,OAAO,CAACa,QAAQ,CAAC,SAAS,CAAC,IAAIb,OAAO,CAACa,QAAQ,CAAC,YAAY,CAAC,IAAIb,OAAO,CAACa,QAAQ,CAAC,SAAS,CAAC;AACrG,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,gBAAgB,GAAIvB,KAAc,IAAc;EAC3D,OAAOiB,cAAc,CAACjB,KAAK,CAAC,IAAIgB,aAAa,CAAChB,KAAK,CAAC,IAAIe,gBAAgB,CAACf,KAAK,CAAC;AACjF,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Shared Utility Functions
|
|
5
|
+
*
|
|
6
|
+
* Re-exports all shared utilities for convenient importing.
|
|
7
|
+
*
|
|
8
|
+
* @module shared/utils
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
// Color utilities
|
|
12
|
+
export { darkenColor, lightenColor, hexToRgb, rgbToHex, withOpacity, isLightColor, getContrastTextColor } from "./colorUtils.js";
|
|
13
|
+
|
|
14
|
+
// Theme utilities
|
|
15
|
+
export { normalizeTheme, normalizeColorScheme, getOppositeTheme, systemPrefersDarkMode, getSystemColorScheme } from "./themeUtils.js";
|
|
16
|
+
// Error utilities
|
|
17
|
+
export { HttpStatus, getErrorStatus, getErrorMessage, isAlreadyRegisteredError, isUnauthorizedError, isForbiddenError, isNotFoundError, isRateLimitError, isServerError, isNetworkError, isRetryableError } from "./errorUtils.js";
|
|
18
|
+
|
|
19
|
+
// Network utilities
|
|
20
|
+
export { DEFAULT_CIRCUIT_BREAKER_CONFIG, createCircuitBreakerState, calculateBackoffInterval, recordFailure, recordSuccess, shouldAllowRequest, delay, withRetry } from "./networkUtils.js";
|
|
21
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["darkenColor","lightenColor","hexToRgb","rgbToHex","withOpacity","isLightColor","getContrastTextColor","normalizeTheme","normalizeColorScheme","getOppositeTheme","systemPrefersDarkMode","getSystemColorScheme","HttpStatus","getErrorStatus","getErrorMessage","isAlreadyRegisteredError","isUnauthorizedError","isForbiddenError","isNotFoundError","isRateLimitError","isServerError","isNetworkError","isRetryableError","DEFAULT_CIRCUIT_BREAKER_CONFIG","createCircuitBreakerState","calculateBackoffInterval","recordFailure","recordSuccess","shouldAllowRequest","delay","withRetry"],"sourceRoot":"../../../../src","sources":["shared/utils/index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SACEA,WAAW,EACXC,YAAY,EACZC,QAAQ,EACRC,QAAQ,EACRC,WAAW,EACXC,YAAY,EACZC,oBAAoB,QACf,iBAAc;;AAErB;AACA,SACEC,cAAc,EACdC,oBAAoB,EACpBC,gBAAgB,EAChBC,qBAAqB,EACrBC,oBAAoB,QACf,iBAAc;AAGrB;AACA,SACEC,UAAU,EACVC,cAAc,EACdC,eAAe,EACfC,wBAAwB,EACxBC,mBAAmB,EACnBC,gBAAgB,EAChBC,eAAe,EACfC,gBAAgB,EAChBC,aAAa,EACbC,cAAc,EACdC,gBAAgB,QACX,iBAAc;;AAErB;AACA,SACEC,8BAA8B,EAC9BC,yBAAyB,EACzBC,wBAAwB,EACxBC,aAAa,EACbC,aAAa,EACbC,kBAAkB,EAClBC,KAAK,EACLC,SAAS,QACJ,mBAAgB","ignoreList":[]}
|
|
@@ -0,0 +1,202 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Network Utility Functions
|
|
5
|
+
*
|
|
6
|
+
* Consolidated network utilities including circuit breaker pattern
|
|
7
|
+
* and exponential backoff for resilient API calls.
|
|
8
|
+
*
|
|
9
|
+
* @module shared/utils/networkUtils
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* State for circuit breaker pattern.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Configuration for circuit breaker.
|
|
18
|
+
*/
|
|
19
|
+
|
|
20
|
+
/**
|
|
21
|
+
* Default circuit breaker configuration.
|
|
22
|
+
*/
|
|
23
|
+
export const DEFAULT_CIRCUIT_BREAKER_CONFIG = {
|
|
24
|
+
baseInterval: 10000,
|
|
25
|
+
maxInterval: 60000,
|
|
26
|
+
maxFailures: 5,
|
|
27
|
+
recoveryTimeout: 30000
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Creates initial circuit breaker state.
|
|
32
|
+
*
|
|
33
|
+
* @param config - Optional custom configuration
|
|
34
|
+
* @returns Initial circuit breaker state
|
|
35
|
+
*
|
|
36
|
+
* @example
|
|
37
|
+
* ```ts
|
|
38
|
+
* const state = createCircuitBreakerState({ maxFailures: 3 });
|
|
39
|
+
* ```
|
|
40
|
+
*/
|
|
41
|
+
export const createCircuitBreakerState = (config = {}) => {
|
|
42
|
+
const {
|
|
43
|
+
baseInterval,
|
|
44
|
+
maxInterval,
|
|
45
|
+
maxFailures
|
|
46
|
+
} = {
|
|
47
|
+
...DEFAULT_CIRCUIT_BREAKER_CONFIG,
|
|
48
|
+
...config
|
|
49
|
+
};
|
|
50
|
+
return {
|
|
51
|
+
consecutiveFailures: 0,
|
|
52
|
+
currentInterval: baseInterval,
|
|
53
|
+
baseInterval,
|
|
54
|
+
maxInterval,
|
|
55
|
+
maxFailures,
|
|
56
|
+
isOpen: false
|
|
57
|
+
};
|
|
58
|
+
};
|
|
59
|
+
|
|
60
|
+
/**
|
|
61
|
+
* Calculates next interval using exponential backoff.
|
|
62
|
+
*
|
|
63
|
+
* @param state - Current circuit breaker state
|
|
64
|
+
* @returns Next interval in milliseconds
|
|
65
|
+
*
|
|
66
|
+
* @example
|
|
67
|
+
* ```ts
|
|
68
|
+
* const nextInterval = calculateBackoffInterval(state);
|
|
69
|
+
* await delay(nextInterval);
|
|
70
|
+
* ```
|
|
71
|
+
*/
|
|
72
|
+
export const calculateBackoffInterval = state => {
|
|
73
|
+
const {
|
|
74
|
+
consecutiveFailures,
|
|
75
|
+
baseInterval,
|
|
76
|
+
maxInterval
|
|
77
|
+
} = state;
|
|
78
|
+
if (consecutiveFailures === 0) return baseInterval;
|
|
79
|
+
const backoffMultiplier = Math.min(Math.pow(2, consecutiveFailures - 1), maxInterval / baseInterval);
|
|
80
|
+
return Math.min(baseInterval * backoffMultiplier, maxInterval);
|
|
81
|
+
};
|
|
82
|
+
|
|
83
|
+
/**
|
|
84
|
+
* Records a failure and updates circuit breaker state.
|
|
85
|
+
*
|
|
86
|
+
* @param state - Current circuit breaker state
|
|
87
|
+
* @returns Updated state after recording failure
|
|
88
|
+
*
|
|
89
|
+
* @example
|
|
90
|
+
* ```ts
|
|
91
|
+
* try {
|
|
92
|
+
* await apiCall();
|
|
93
|
+
* state = recordSuccess(state);
|
|
94
|
+
* } catch (error) {
|
|
95
|
+
* state = recordFailure(state);
|
|
96
|
+
* }
|
|
97
|
+
* ```
|
|
98
|
+
*/
|
|
99
|
+
export const recordFailure = state => {
|
|
100
|
+
const newFailures = state.consecutiveFailures + 1;
|
|
101
|
+
const newInterval = calculateBackoffInterval({
|
|
102
|
+
...state,
|
|
103
|
+
consecutiveFailures: newFailures
|
|
104
|
+
});
|
|
105
|
+
const shouldOpenCircuit = newFailures >= state.maxFailures;
|
|
106
|
+
const finalInterval = shouldOpenCircuit ? state.maxInterval : newInterval;
|
|
107
|
+
return {
|
|
108
|
+
...state,
|
|
109
|
+
consecutiveFailures: newFailures,
|
|
110
|
+
currentInterval: finalInterval,
|
|
111
|
+
isOpen: shouldOpenCircuit,
|
|
112
|
+
openedAt: shouldOpenCircuit ? Date.now() : state.openedAt
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Records a success and resets circuit breaker state.
|
|
118
|
+
*
|
|
119
|
+
* @param state - Current circuit breaker state
|
|
120
|
+
* @returns Reset state after successful request
|
|
121
|
+
*/
|
|
122
|
+
export const recordSuccess = state => {
|
|
123
|
+
return {
|
|
124
|
+
...state,
|
|
125
|
+
consecutiveFailures: 0,
|
|
126
|
+
currentInterval: state.baseInterval,
|
|
127
|
+
isOpen: false,
|
|
128
|
+
openedAt: undefined
|
|
129
|
+
};
|
|
130
|
+
};
|
|
131
|
+
|
|
132
|
+
/**
|
|
133
|
+
* Checks if the circuit breaker should allow a request.
|
|
134
|
+
*
|
|
135
|
+
* When the circuit is open, it will only allow requests after
|
|
136
|
+
* the recovery timeout has passed (half-open state).
|
|
137
|
+
*
|
|
138
|
+
* @param state - Current circuit breaker state
|
|
139
|
+
* @param recoveryTimeout - Time to wait before allowing recovery attempts
|
|
140
|
+
* @returns true if request should be allowed
|
|
141
|
+
*/
|
|
142
|
+
export const shouldAllowRequest = (state, recoveryTimeout = DEFAULT_CIRCUIT_BREAKER_CONFIG.recoveryTimeout) => {
|
|
143
|
+
if (!state.isOpen) return true;
|
|
144
|
+
if (!state.openedAt) return true;
|
|
145
|
+
const timeSinceOpen = Date.now() - state.openedAt;
|
|
146
|
+
return timeSinceOpen >= recoveryTimeout;
|
|
147
|
+
};
|
|
148
|
+
|
|
149
|
+
/**
|
|
150
|
+
* Delays execution for a specified duration.
|
|
151
|
+
*
|
|
152
|
+
* @param ms - Milliseconds to delay
|
|
153
|
+
* @returns Promise that resolves after the delay
|
|
154
|
+
*
|
|
155
|
+
* @example
|
|
156
|
+
* ```ts
|
|
157
|
+
* await delay(1000); // Wait 1 second
|
|
158
|
+
* ```
|
|
159
|
+
*/
|
|
160
|
+
export const delay = ms => new Promise(resolve => setTimeout(resolve, ms));
|
|
161
|
+
|
|
162
|
+
/**
|
|
163
|
+
* Executes a function with exponential backoff retry.
|
|
164
|
+
*
|
|
165
|
+
* @param fn - Async function to execute
|
|
166
|
+
* @param options - Retry options
|
|
167
|
+
* @returns Result of the function
|
|
168
|
+
* @throws Last error if all retries fail
|
|
169
|
+
*
|
|
170
|
+
* @example
|
|
171
|
+
* ```ts
|
|
172
|
+
* const result = await withRetry(
|
|
173
|
+
* () => fetchData(),
|
|
174
|
+
* { maxRetries: 3, baseDelay: 1000 }
|
|
175
|
+
* );
|
|
176
|
+
* ```
|
|
177
|
+
*/
|
|
178
|
+
export const withRetry = async (fn, options = {}) => {
|
|
179
|
+
const {
|
|
180
|
+
maxRetries = 3,
|
|
181
|
+
baseDelay = 1000,
|
|
182
|
+
maxDelay = 30000,
|
|
183
|
+
shouldRetry = () => true,
|
|
184
|
+
onRetry
|
|
185
|
+
} = options;
|
|
186
|
+
let lastError;
|
|
187
|
+
for (let attempt = 0; attempt <= maxRetries; attempt++) {
|
|
188
|
+
try {
|
|
189
|
+
return await fn();
|
|
190
|
+
} catch (error) {
|
|
191
|
+
lastError = error;
|
|
192
|
+
if (attempt === maxRetries || !shouldRetry(error)) {
|
|
193
|
+
throw error;
|
|
194
|
+
}
|
|
195
|
+
const delayMs = Math.min(baseDelay * Math.pow(2, attempt), maxDelay);
|
|
196
|
+
onRetry?.(error, attempt + 1);
|
|
197
|
+
await delay(delayMs);
|
|
198
|
+
}
|
|
199
|
+
}
|
|
200
|
+
throw lastError;
|
|
201
|
+
};
|
|
202
|
+
//# sourceMappingURL=networkUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["DEFAULT_CIRCUIT_BREAKER_CONFIG","baseInterval","maxInterval","maxFailures","recoveryTimeout","createCircuitBreakerState","config","consecutiveFailures","currentInterval","isOpen","calculateBackoffInterval","state","backoffMultiplier","Math","min","pow","recordFailure","newFailures","newInterval","shouldOpenCircuit","finalInterval","openedAt","Date","now","recordSuccess","undefined","shouldAllowRequest","timeSinceOpen","delay","ms","Promise","resolve","setTimeout","withRetry","fn","options","maxRetries","baseDelay","maxDelay","shouldRetry","onRetry","lastError","attempt","error","delayMs"],"sourceRoot":"../../../../src","sources":["shared/utils/networkUtils.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAkBA;AACA;AACA;;AAYA;AACA;AACA;AACA,OAAO,MAAMA,8BAA8D,GAAG;EAC5EC,YAAY,EAAE,KAAK;EACnBC,WAAW,EAAE,KAAK;EAClBC,WAAW,EAAE,CAAC;EACdC,eAAe,EAAE;AACnB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,yBAAyB,GAAGA,CACvCC,MAA4B,GAAG,CAAC,CAAC,KACT;EACxB,MAAM;IAAEL,YAAY;IAAEC,WAAW;IAAEC;EAAY,CAAC,GAAG;IACjD,GAAGH,8BAA8B;IACjC,GAAGM;EACL,CAAC;EAED,OAAO;IACLC,mBAAmB,EAAE,CAAC;IACtBC,eAAe,EAAEP,YAAY;IAC7BA,YAAY;IACZC,WAAW;IACXC,WAAW;IACXM,MAAM,EAAE;EACV,CAAC;AACH,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,wBAAwB,GAAIC,KAA0B,IAAa;EAC9E,MAAM;IAAEJ,mBAAmB;IAAEN,YAAY;IAAEC;EAAY,CAAC,GAAGS,KAAK;EAEhE,IAAIJ,mBAAmB,KAAK,CAAC,EAAE,OAAON,YAAY;EAElD,MAAMW,iBAAiB,GAAGC,IAAI,CAACC,GAAG,CAChCD,IAAI,CAACE,GAAG,CAAC,CAAC,EAAER,mBAAmB,GAAG,CAAC,CAAC,EACpCL,WAAW,GAAGD,YAChB,CAAC;EAED,OAAOY,IAAI,CAACC,GAAG,CAACb,YAAY,GAAGW,iBAAiB,EAAEV,WAAW,CAAC;AAChE,CA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
/**
|
|
4
|
+
* Theme Utility Functions
|
|
5
|
+
*
|
|
6
|
+
* Consolidated theme utilities for normalizing and handling color schemes
|
|
7
|
+
* across the OxyServices ecosystem.
|
|
8
|
+
*
|
|
9
|
+
* @module shared/utils/themeUtils
|
|
10
|
+
*/
|
|
11
|
+
|
|
12
|
+
/**
|
|
13
|
+
* Valid theme values in the Oxy ecosystem.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Normalizes a theme value to ensure it's always 'light' or 'dark'.
|
|
18
|
+
*
|
|
19
|
+
* @param theme - Theme value (may be 'light' | 'dark' | string | undefined)
|
|
20
|
+
* @returns Normalized 'light' | 'dark' theme (defaults to 'light')
|
|
21
|
+
*
|
|
22
|
+
* @example
|
|
23
|
+
* ```ts
|
|
24
|
+
* normalizeTheme('dark'); // 'dark'
|
|
25
|
+
* normalizeTheme('light'); // 'light'
|
|
26
|
+
* normalizeTheme('unknown'); // 'light'
|
|
27
|
+
* normalizeTheme(undefined); // 'light'
|
|
28
|
+
* normalizeTheme(null); // 'light'
|
|
29
|
+
* ```
|
|
30
|
+
*/
|
|
31
|
+
export const normalizeTheme = theme => theme === 'light' || theme === 'dark' ? theme : 'light';
|
|
32
|
+
|
|
33
|
+
/**
|
|
34
|
+
* Normalizes a color scheme value with optional fallback chain.
|
|
35
|
+
*
|
|
36
|
+
* Handles null/undefined cases from React Native's useColorScheme() hook
|
|
37
|
+
* with a proper fallback chain.
|
|
38
|
+
*
|
|
39
|
+
* @param colorScheme - The color scheme from useColorScheme() hook (may be null/undefined)
|
|
40
|
+
* @param theme - Optional theme prop as fallback
|
|
41
|
+
* @returns Normalized 'light' | 'dark' color scheme
|
|
42
|
+
*
|
|
43
|
+
* @example
|
|
44
|
+
* ```ts
|
|
45
|
+
* // In a React Native component:
|
|
46
|
+
* const systemScheme = useColorScheme(); // might be null
|
|
47
|
+
* const colorScheme = normalizeColorScheme(systemScheme, props.theme);
|
|
48
|
+
*
|
|
49
|
+
* normalizeColorScheme('dark', 'light'); // 'dark'
|
|
50
|
+
* normalizeColorScheme(null, 'dark'); // 'dark'
|
|
51
|
+
* normalizeColorScheme(undefined, undefined); // 'light'
|
|
52
|
+
* ```
|
|
53
|
+
*/
|
|
54
|
+
export const normalizeColorScheme = (colorScheme, theme) => {
|
|
55
|
+
if (colorScheme === 'light' || colorScheme === 'dark') {
|
|
56
|
+
return colorScheme;
|
|
57
|
+
}
|
|
58
|
+
if (theme === 'light' || theme === 'dark') {
|
|
59
|
+
return theme;
|
|
60
|
+
}
|
|
61
|
+
return 'light';
|
|
62
|
+
};
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Gets the opposite theme value.
|
|
66
|
+
*
|
|
67
|
+
* @param theme - Current theme value
|
|
68
|
+
* @returns The opposite theme ('light' → 'dark', 'dark' → 'light')
|
|
69
|
+
*
|
|
70
|
+
* @example
|
|
71
|
+
* ```ts
|
|
72
|
+
* getOppositeTheme('light'); // 'dark'
|
|
73
|
+
* getOppositeTheme('dark'); // 'light'
|
|
74
|
+
* ```
|
|
75
|
+
*/
|
|
76
|
+
export const getOppositeTheme = theme => theme === 'light' ? 'dark' : 'light';
|
|
77
|
+
|
|
78
|
+
/**
|
|
79
|
+
* Checks if the system prefers dark mode.
|
|
80
|
+
*
|
|
81
|
+
* This function only works in browser environments.
|
|
82
|
+
* Returns false in non-browser environments (Node.js, React Native).
|
|
83
|
+
*
|
|
84
|
+
* @returns true if system prefers dark mode, false otherwise
|
|
85
|
+
*
|
|
86
|
+
* @example
|
|
87
|
+
* ```ts
|
|
88
|
+
* if (systemPrefersDarkMode()) {
|
|
89
|
+
* setTheme('dark');
|
|
90
|
+
* }
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
export const systemPrefersDarkMode = () => {
|
|
94
|
+
if (typeof window === 'undefined') return false;
|
|
95
|
+
return window.matchMedia?.('(prefers-color-scheme: dark)').matches ?? false;
|
|
96
|
+
};
|
|
97
|
+
|
|
98
|
+
/**
|
|
99
|
+
* Gets the system's preferred color scheme.
|
|
100
|
+
*
|
|
101
|
+
* @returns 'dark' if system prefers dark mode, 'light' otherwise
|
|
102
|
+
*
|
|
103
|
+
* @example
|
|
104
|
+
* ```ts
|
|
105
|
+
* const theme = getSystemColorScheme();
|
|
106
|
+
* ```
|
|
107
|
+
*/
|
|
108
|
+
export const getSystemColorScheme = () => systemPrefersDarkMode() ? 'dark' : 'light';
|
|
109
|
+
//# sourceMappingURL=themeUtils.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["normalizeTheme","theme","normalizeColorScheme","colorScheme","getOppositeTheme","systemPrefersDarkMode","window","matchMedia","matches","getSystemColorScheme"],"sourceRoot":"../../../../src","sources":["shared/utils/themeUtils.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMA,cAAc,GAAIC,KAAqB,IAClDA,KAAK,KAAK,OAAO,IAAIA,KAAK,KAAK,MAAM,GAAGA,KAAK,GAAG,OAAO;;AAEzD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAGA,CAClCC,WAA2B,EAC3BF,KAAc,KACC;EACf,IAAIE,WAAW,KAAK,OAAO,IAAIA,WAAW,KAAK,MAAM,EAAE;IACrD,OAAOA,WAAW;EACpB;EAEA,IAAIF,KAAK,KAAK,OAAO,IAAIA,KAAK,KAAK,MAAM,EAAE;IACzC,OAAOA,KAAK;EACd;EAEA,OAAO,OAAO;AAChB,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMG,gBAAgB,GAAIH,KAAiB,IAChDA,KAAK,KAAK,OAAO,GAAG,MAAM,GAAG,OAAO;;AAEtC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMI,qBAAqB,GAAGA,CAAA,KAAe;EAClD,IAAI,OAAOC,MAAM,KAAK,WAAW,EAAE,OAAO,KAAK;EAC/C,OAAOA,MAAM,CAACC,UAAU,GAAG,8BAA8B,CAAC,CAACC,OAAO,IAAI,KAAK;AAC7E,CAAC;;AAED;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,MAAMC,oBAAoB,GAAGA,CAAA,KAClCJ,qBAAqB,CAAC,CAAC,GAAG,MAAM,GAAG,OAAO","ignoreList":[]}
|
package/lib/module/ui/client.js
CHANGED
|
@@ -39,7 +39,7 @@ export { useAccountStore } from "./stores/accountStore.js";
|
|
|
39
39
|
export { fontFamilies, fontStyles } from "./styles/fonts.js";
|
|
40
40
|
|
|
41
41
|
// Toast
|
|
42
|
-
export { toast } from
|
|
42
|
+
export { toast } from '../lib/sonner';
|
|
43
43
|
|
|
44
44
|
// Core re-exports for convenience
|
|
45
45
|
export { OxyServices } from "../core/index.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["default","OxyProvider","WebOxyProvider","OxySignInButton","OxyLogo","Avatar","FollowButton","OxyPayButton","FontLoader","setupFonts","OxyIcon","useOxy","useAuth","useFollow","useStorage","ProfileScreen","useAuthStore","useAccountStore","fontFamilies","fontStyles","toast","OxyServices","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage"],"sourceRoot":"../../../src","sources":["ui/client.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,6BAA0B;AACjE,SAASD,OAAO,IAAIE,cAAc,QAAQ,gCAA6B;AACvE,SAASF,OAAO,IAAIG,eAAe,QAAQ,iCAA8B;AACzE,SAASH,OAAO,IAAII,OAAO,QAAQ,yBAAsB;AACzD,SAASJ,OAAO,IAAIK,MAAM,QAAQ,wBAAqB;AACvD,SAASL,OAAO,IAAIM,YAAY,QAAQ,8BAA2B;AACnE,SAASN,OAAO,IAAIO,YAAY,QAAQ,8BAA2B;AACnE,SAASC,UAAU,EAAEC,UAAU,QAAQ,4BAAyB;AAChE,SAASC,OAAO,QAAQ,4BAAmB;;AAE3C;AACA,SAASC,MAAM,QAAQ,yBAAsB;;AAE7C;AACA,SAASC,OAAO,QAAQ,oBAAiB;AAEzC,SAASC,SAAS,QAAQ,kBAAS;AACnC,SAASC,UAAU,QAAQ,uBAAoB;AAG/C;AACA,SAASd,OAAO,IAAIe,aAAa,QAAQ,4BAAyB;;AAElE;AACA,SAASC,YAAY,QAAQ,uBAAoB;AACjD,SAASC,eAAe,QAAQ,0BAAuB;;AAEvD;AACA,SAASC,YAAY,EAAEC,UAAU,QAAQ,mBAAgB;;AAEzD;AACA,SAASC,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"names":["default","OxyProvider","WebOxyProvider","OxySignInButton","OxyLogo","Avatar","FollowButton","OxyPayButton","FontLoader","setupFonts","OxyIcon","useOxy","useAuth","useFollow","useStorage","ProfileScreen","useAuthStore","useAccountStore","fontFamilies","fontStyles","toast","OxyServices","handleAuthError","isInvalidSessionError","isTimeoutOrNetworkError","extractErrorMessage"],"sourceRoot":"../../../src","sources":["ui/client.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,SAASA,OAAO,IAAIC,WAAW,QAAQ,6BAA0B;AACjE,SAASD,OAAO,IAAIE,cAAc,QAAQ,gCAA6B;AACvE,SAASF,OAAO,IAAIG,eAAe,QAAQ,iCAA8B;AACzE,SAASH,OAAO,IAAII,OAAO,QAAQ,yBAAsB;AACzD,SAASJ,OAAO,IAAIK,MAAM,QAAQ,wBAAqB;AACvD,SAASL,OAAO,IAAIM,YAAY,QAAQ,8BAA2B;AACnE,SAASN,OAAO,IAAIO,YAAY,QAAQ,8BAA2B;AACnE,SAASC,UAAU,EAAEC,UAAU,QAAQ,4BAAyB;AAChE,SAASC,OAAO,QAAQ,4BAAmB;;AAE3C;AACA,SAASC,MAAM,QAAQ,yBAAsB;;AAE7C;AACA,SAASC,OAAO,QAAQ,oBAAiB;AAEzC,SAASC,SAAS,QAAQ,kBAAS;AACnC,SAASC,UAAU,QAAQ,uBAAoB;AAG/C;AACA,SAASd,OAAO,IAAIe,aAAa,QAAQ,4BAAyB;;AAElE;AACA,SAASC,YAAY,QAAQ,uBAAoB;AACjD,SAASC,eAAe,QAAQ,0BAAuB;;AAEvD;AACA,SAASC,YAAY,EAAEC,UAAU,QAAQ,mBAAgB;;AAEzD;AACA,SAASC,KAAK,QAAQ,eAAe;;AAErC;AACA,SAASC,WAAW,QAAQ,kBAAS;AAGrC;AACA,SACIC,eAAe,EACfC,qBAAqB,EACrBC,uBAAuB,EACvBC,mBAAmB,QAChB,0BAAuB","ignoreList":[]}
|
|
@@ -4,7 +4,7 @@ import React, { useRef, useEffect, useCallback, useMemo } from 'react';
|
|
|
4
4
|
import { BackHandler, View, StyleSheet } from 'react-native';
|
|
5
5
|
import { useStore } from 'zustand';
|
|
6
6
|
import { getScreenComponent, isValidRoute } from "../navigation/routes.js";
|
|
7
|
-
import { useColorScheme } from "../hooks/
|
|
7
|
+
import { useColorScheme } from "../hooks/useColorScheme.js";
|
|
8
8
|
import { Colors } from "../constants/theme.js";
|
|
9
9
|
import BottomSheet from "./BottomSheet.js";
|
|
10
10
|
import { bottomSheetStore, getState, showBottomSheet, closeBottomSheet, goBack, updateState } from "../navigation/bottomSheetManager.js";
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["React","useRef","useEffect","useCallback","useMemo","BackHandler","View","StyleSheet","useStore","getScreenComponent","isValidRoute","useColorScheme","Colors","BottomSheet","bottomSheetStore","getState","showBottomSheet","closeBottomSheet","goBack","updateState","jsx","_jsx","BottomSheetRouter","onScreenChange","onDismiss","sheetRef","colorScheme","colors","prevScreenRef","currentScreen","screenProps","currentStep","isOpen","ScreenComponent","current","present","dismiss","handler","addEventListener","handleGoBack","remove","navigate","screen","props","__DEV__","console","warn","state","history","length","step","initialStep","canDismiss","handleDismissAttempt","handleDismiss","handleStepChange","scrollTo","y","animated","renderBackground","style","styles","background","backgroundColor","screenPropsValue","_","rest","onClose","onAuthenticated","theme","undefined","onStepChange","ref","enablePanDownToClose","enableHandlePanningGesture","backgroundComponent","container","onDismissAttempt","children","create","maxWidth","width","alignSelf","marginHorizontal","borderTopLeftRadius","borderTopRightRadius","overflow","memo"],"sourceRoot":"../../../../src","sources":["ui/components/BottomSheetRouter.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,SAAS,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACtE,SAASC,WAAW,EAAEC,IAAI,EAAEC,UAAU,QAAwC,cAAc;AAC5F,SAASC,QAAQ,QAAQ,SAAS;AAElC,SAASC,kBAAkB,EAAEC,YAAY,QAAQ,yBAAsB;AAEvE,SAASC,cAAc,QAAQ,
|
|
1
|
+
{"version":3,"names":["React","useRef","useEffect","useCallback","useMemo","BackHandler","View","StyleSheet","useStore","getScreenComponent","isValidRoute","useColorScheme","Colors","BottomSheet","bottomSheetStore","getState","showBottomSheet","closeBottomSheet","goBack","updateState","jsx","_jsx","BottomSheetRouter","onScreenChange","onDismiss","sheetRef","colorScheme","colors","prevScreenRef","currentScreen","screenProps","currentStep","isOpen","ScreenComponent","current","present","dismiss","handler","addEventListener","handleGoBack","remove","navigate","screen","props","__DEV__","console","warn","state","history","length","step","initialStep","canDismiss","handleDismissAttempt","handleDismiss","handleStepChange","scrollTo","y","animated","renderBackground","style","styles","background","backgroundColor","screenPropsValue","_","rest","onClose","onAuthenticated","theme","undefined","onStepChange","ref","enablePanDownToClose","enableHandlePanningGesture","backgroundComponent","container","onDismissAttempt","children","create","maxWidth","width","alignSelf","marginHorizontal","borderTopLeftRadius","borderTopRightRadius","overflow","memo"],"sourceRoot":"../../../../src","sources":["ui/components/BottomSheetRouter.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,MAAM,EAAEC,SAAS,EAAEC,WAAW,EAAEC,OAAO,QAAQ,OAAO;AACtE,SAASC,WAAW,EAAEC,IAAI,EAAEC,UAAU,QAAwC,cAAc;AAC5F,SAASC,QAAQ,QAAQ,SAAS;AAElC,SAASC,kBAAkB,EAAEC,YAAY,QAAQ,yBAAsB;AAEvE,SAASC,cAAc,QAAQ,4BAAyB;AACxD,SAASC,MAAM,QAAQ,uBAAoB;AAC3C,OAAOC,WAAW,MAA+B,kBAAe;AAChE,SACIC,gBAAgB,EAChBC,QAAQ,EACRC,eAAe,EACfC,gBAAgB,EAChBC,MAAM,EACNC,WAAW,QACR,qCAAkC;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAO1C;AACA;AACA;AACA,MAAMC,iBAAmD,GAAGA,CAAC;EAAEC,cAAc;EAAEC;AAAU,CAAC,KAAK;EAC3F,MAAMC,QAAQ,GAAGxB,MAAM,CAAiB,IAAI,CAAC;EAC7C,MAAMyB,WAAW,GAAGf,cAAc,CAAC,CAAC;EACpC,MAAMgB,MAAM,GAAGf,MAAM,CAACc,WAAW,IAAI,OAAO,CAAC;EAC7C,MAAME,aAAa,GAAG3B,MAAM,CAAmB,IAAI,CAAC;EAEpD,MAAM;IAAE4B,aAAa;IAAEC,WAAW;IAAEC,WAAW;IAAEC;EAAO,CAAC,GAAGxB,QAAQ,CAACM,gBAAgB,CAAC;EAEtF,MAAMmB,eAAe,GAAG7B,OAAO,CAC3B,MAAOyB,aAAa,GAAGpB,kBAAkB,CAACoB,aAAa,CAAC,GAAG,IAAK,EAChE,CAACA,aAAa,CAClB,CAAC;;EAED;EACA3B,SAAS,CAAC,MAAM;IACZ,IAAI0B,aAAa,CAACM,OAAO,KAAKL,aAAa,EAAE;MACzCN,cAAc,GAAGM,aAAa,CAAC;MAC/BD,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AAE8B,aAAc;IACzBuB,gBAAgB,EAAExB,oBAAqB;IAAAyB,QAAA,EAEtC7C,eAAe,IAAIJ,aAAa,iBAAIR,IAAA,CAACY,eAAe;MAAA,GAAK+B;IAAgB,CAAG;EAAC,CACrE,CAAC;AAEtB,CAAC;AAED,MAAMH,MAAM,GAAGtD,UAAU,CAACwE,MAAM,CAAC;EAC7BH,SAAS,EAAE;IACPI,QAAQ,EAAE,GAAG;IACbC,KAAK,EAAE,MAAM;IACbC,SAAS,EAAE,QAAQ;IACnBC,gBAAgB,EAAE;EACtB,CAAC;EACDrB,UAAU,EAAE;IACRsB,mBAAmB,EAAE,EAAE;IACvBC,oBAAoB,EAAE,EAAE;IACxBC,QAAQ,EAAE;EACd;AACJ,CAAC,CAAC;AAEF,4BAAetF,KAAK,CAACuF,IAAI,CAACjE,iBAAiB,CAAC","ignoreList":[]}
|
|
@@ -5,7 +5,7 @@ import { TouchableOpacity, Text, Platform, ActivityIndicator } from 'react-nativ
|
|
|
5
5
|
import Animated, { useSharedValue, useAnimatedStyle, withSpring, interpolateColor, Easing, withTiming } from 'react-native-reanimated';
|
|
6
6
|
import { useOxy } from "../context/OxyContext.js";
|
|
7
7
|
import { fontFamilies } from "../styles/fonts.js";
|
|
8
|
-
import { toast } from
|
|
8
|
+
import { toast } from '../../lib/sonner';
|
|
9
9
|
import { useFollow } from "../hooks/useFollow.js";
|
|
10
10
|
import { useThemeColors } from "../styles/theme.js";
|
|
11
11
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["useEffect","useCallback","TouchableOpacity","Text","Platform","ActivityIndicator","Animated","useSharedValue","useAnimatedStyle","withSpring","interpolateColor","Easing","withTiming","useOxy","fontFamilies","toast","useFollow","useThemeColors","jsx","_jsx","AnimatedTouchableOpacity","createAnimatedComponent","AnimatedText","FollowButton","userId","initiallyFollowing","size","onFollowChange","style","textStyle","disabled","showLoadingState","preventParentActions","theme","oxyServices","isAuthenticated","user","currentUser","colors","normalizeId","id","String","trim","currentUserId","targetUserId","isFollowing","isLoading","error","toggleFollow","setFollowStatus","fetchStatus","clearError","animationProgress","scale","handlePress","event","preventDefault","stopPropagation","value","duration","finished","damping","stiffness","err","Error","message","easing","inOut","ease","animatedButtonStyle","transform","backgroundColor","background","primary","borderColor","border","animatedTextStyle","color","text","getBaseButtonStyle","baseStyle","flexDirection","alignItems","justifyContent","borderWidth","select","web","boxShadow","default","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","sizeStyle","paddingVertical","paddingHorizontal","minWidth","borderRadius","getBaseTextStyle","baseTextStyle","fontFamily","interSemiBold","fontWeight","sizeTextStyle","fontSize","onPress","activeOpacity","children"],"sourceRoot":"../../../../src","sources":["ui/components/FollowButton.tsx"],"mappings":";;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,OAAO;AAC9C,SACEC,gBAAgB,EAChBC,IAAI,EAKJC,QAAQ,EACRC,iBAAiB,QACZ,cAAc;AACrB,OAAOC,QAAQ,IACbC,cAAc,EACdC,gBAAgB,EAChBC,UAAU,EACVC,gBAAgB,EAChBC,MAAM,EACNC,UAAU,QACL,yBAAyB;AAChC,SAASC,MAAM,QAAQ,0BAAuB;AAC9C,SAASC,YAAY,QAAQ,oBAAiB;AAC9C,SAASC,KAAK,QAAQ,
|
|
1
|
+
{"version":3,"names":["useEffect","useCallback","TouchableOpacity","Text","Platform","ActivityIndicator","Animated","useSharedValue","useAnimatedStyle","withSpring","interpolateColor","Easing","withTiming","useOxy","fontFamilies","toast","useFollow","useThemeColors","jsx","_jsx","AnimatedTouchableOpacity","createAnimatedComponent","AnimatedText","FollowButton","userId","initiallyFollowing","size","onFollowChange","style","textStyle","disabled","showLoadingState","preventParentActions","theme","oxyServices","isAuthenticated","user","currentUser","colors","normalizeId","id","String","trim","currentUserId","targetUserId","isFollowing","isLoading","error","toggleFollow","setFollowStatus","fetchStatus","clearError","animationProgress","scale","handlePress","event","preventDefault","stopPropagation","value","duration","finished","damping","stiffness","err","Error","message","easing","inOut","ease","animatedButtonStyle","transform","backgroundColor","background","primary","borderColor","border","animatedTextStyle","color","text","getBaseButtonStyle","baseStyle","flexDirection","alignItems","justifyContent","borderWidth","select","web","boxShadow","default","shadowColor","shadowOffset","width","height","shadowOpacity","shadowRadius","elevation","sizeStyle","paddingVertical","paddingHorizontal","minWidth","borderRadius","getBaseTextStyle","baseTextStyle","fontFamily","interSemiBold","fontWeight","sizeTextStyle","fontSize","onPress","activeOpacity","children"],"sourceRoot":"../../../../src","sources":["ui/components/FollowButton.tsx"],"mappings":";;AACA,SAASA,SAAS,EAAEC,WAAW,QAAQ,OAAO;AAC9C,SACEC,gBAAgB,EAChBC,IAAI,EAKJC,QAAQ,EACRC,iBAAiB,QACZ,cAAc;AACrB,OAAOC,QAAQ,IACbC,cAAc,EACdC,gBAAgB,EAChBC,UAAU,EACVC,gBAAgB,EAChBC,MAAM,EACNC,UAAU,QACL,yBAAyB;AAChC,SAASC,MAAM,QAAQ,0BAAuB;AAC9C,SAASC,YAAY,QAAQ,oBAAiB;AAC9C,SAASC,KAAK,QAAQ,kBAAkB;AACxC,SAASC,SAAS,QAAQ,uBAAoB;AAC9C,SAASC,cAAc,QAAQ,oBAAiB;;AAEhD;AAAA,SAAAC,GAAA,IAAAC,IAAA;AACA,MAAMC,wBAAwB,GAAGd,QAAQ,CAACe,uBAAuB,CAACnB,gBAAgB,CAAC;AACnF,MAAMoB,YAAY,GAAGhB,QAAQ,CAACe,uBAAuB,CAAClB,IAAI,CAAC;AAe3D,MAAMoB,YAAyC,GAAGA,CAAC;EACjDC,MAAM;EACNC,kBAAkB,GAAG,KAAK;EAC1BC,IAAI,GAAG,QAAQ;EACfC,cAAc;EACdC,KAAK;EACLC,SAAS;EACTC,QAAQ,GAAG,KAAK;EAChBC,gBAAgB,GAAG,IAAI;EACvBC,oBAAoB,GAAG,IAAI;EAC3BC,KAAK,GAAG;AACV,CAAC,KAAK;EACJ,MAAM;IAAEC,WAAW;IAAEC,eAAe;IAAEC,I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