@oxyhq/services 5.21.7 → 5.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +201 -2
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/commonjs/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/commonjs/core/HttpService.js +87 -2
- package/lib/commonjs/core/HttpService.js.map +1 -1
- package/lib/commonjs/core/mixins/OxyServices.assets.js +3 -1
- package/lib/commonjs/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/commonjs/i18n/locales/en-US.json +3 -3
- package/lib/commonjs/i18n/locales/es-ES.json +240 -19
- package/lib/commonjs/ui/components/Avatar.js +1 -1
- package/lib/commonjs/ui/components/Avatar.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +1 -1
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/FontLoader.js +34 -34
- package/lib/commonjs/ui/components/FontLoader.js.map +1 -1
- package/lib/commonjs/ui/components/Header.js +4 -4
- package/lib/commonjs/ui/components/Header.js.map +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +2 -1
- 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/SectionTitle.js +1 -1
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js +2 -1
- package/lib/commonjs/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js +2 -1
- package/lib/commonjs/ui/components/feedback/feedbackStyles.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/styles.js +17 -17
- package/lib/commonjs/ui/components/fileManagement/styles.js.map +1 -1
- package/lib/commonjs/ui/components/payment/paymentStyles.js +7 -7
- package/lib/commonjs/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/commonjs/ui/navigation/routes.js +2 -0
- package/lib/commonjs/ui/navigation/routes.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +4 -2
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +13 -5
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +273 -1820
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +3 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +2 -2
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js +640 -0
- package/lib/commonjs/ui/screens/EditProfileFieldScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +39 -21
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +9 -3
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +4 -2
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +3 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +11 -12
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +12 -4
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +3 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +15 -5
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +3 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +2 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +2 -4
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +3 -3
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +3 -3
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/styles/authStyles.js +5 -4
- package/lib/commonjs/ui/styles/authStyles.js.map +1 -1
- package/lib/commonjs/ui/styles/fonts.js +27 -27
- package/lib/commonjs/ui/styles/fonts.js.map +1 -1
- package/lib/commonjs/ui/styles/theme.js +3 -3
- package/lib/commonjs/ui/styles/theme.js.map +1 -1
- package/lib/commonjs/web/WebOxyContext.js +224 -0
- package/lib/commonjs/web/WebOxyContext.js.map +1 -0
- package/lib/commonjs/web/index.js +146 -0
- package/lib/commonjs/web/index.js.map +1 -0
- package/lib/commonjs/web.js +659 -0
- package/lib/commonjs/web.js.map +1 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/module/assets/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/lib/module/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/lib/module/core/HttpService.js +87 -2
- package/lib/module/core/HttpService.js.map +1 -1
- package/lib/module/core/mixins/OxyServices.assets.js +3 -1
- package/lib/module/core/mixins/OxyServices.assets.js.map +1 -1
- package/lib/module/i18n/locales/en-US.json +3 -3
- package/lib/module/i18n/locales/es-ES.json +240 -19
- package/lib/module/ui/components/Avatar.js +1 -1
- package/lib/module/ui/components/Avatar.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 +34 -34
- package/lib/module/ui/components/FontLoader.js.map +1 -1
- package/lib/module/ui/components/Header.js +4 -4
- package/lib/module/ui/components/Header.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +1 -1
- package/lib/module/ui/components/OxyPayButton.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +2 -1
- 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/SectionTitle.js +1 -1
- package/lib/module/ui/components/SectionTitle.js.map +1 -1
- package/lib/module/ui/components/StepBasedScreen.js +2 -1
- package/lib/module/ui/components/StepBasedScreen.js.map +1 -1
- package/lib/module/ui/components/feedback/feedbackStyles.js +2 -1
- package/lib/module/ui/components/feedback/feedbackStyles.js.map +1 -1
- package/lib/module/ui/components/fileManagement/styles.js +17 -17
- package/lib/module/ui/components/fileManagement/styles.js.map +1 -1
- package/lib/module/ui/components/payment/paymentStyles.js +7 -7
- package/lib/module/ui/components/payment/paymentStyles.js.map +1 -1
- package/lib/module/ui/navigation/routes.js +2 -0
- package/lib/module/ui/navigation/routes.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +4 -2
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +13 -5
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +277 -1824
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +3 -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 +635 -0
- package/lib/module/ui/screens/EditProfileFieldScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +39 -21
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +9 -3
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +4 -2
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +3 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +11 -12
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +12 -4
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +3 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +15 -5
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +3 -1
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +2 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +2 -4
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +3 -3
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +3 -3
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/styles/authStyles.js +5 -4
- package/lib/module/ui/styles/authStyles.js.map +1 -1
- package/lib/module/ui/styles/fonts.js +27 -27
- package/lib/module/ui/styles/fonts.js.map +1 -1
- package/lib/module/ui/styles/theme.js +3 -3
- package/lib/module/ui/styles/theme.js.map +1 -1
- package/lib/module/web/WebOxyContext.js +218 -0
- package/lib/module/web/WebOxyContext.js.map +1 -0
- package/lib/module/web/index.js +51 -0
- package/lib/module/web/index.js.map +1 -0
- package/lib/module/web.js +75 -0
- package/lib/module/web.js.map +1 -0
- package/lib/typescript/commonjs/core/HttpService.d.ts +5 -0
- package/lib/typescript/commonjs/core/HttpService.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/feedback/feedbackStyles.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/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/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts +13 -0
- package/lib/typescript/commonjs/ui/screens/EditProfileFieldScreen.d.ts.map +1 -0
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.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/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.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/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/styles/fonts.d.ts +7 -7
- package/lib/typescript/commonjs/ui/styles/theme.d.ts.map +1 -1
- package/lib/typescript/commonjs/web/WebOxyContext.d.ts +43 -0
- package/lib/typescript/commonjs/web/WebOxyContext.d.ts.map +1 -0
- package/lib/typescript/commonjs/web/index.d.ts +42 -0
- package/lib/typescript/commonjs/web/index.d.ts.map +1 -0
- package/lib/typescript/commonjs/web.d.ts +53 -0
- package/lib/typescript/commonjs/web.d.ts.map +1 -0
- package/lib/typescript/module/core/HttpService.d.ts +5 -0
- package/lib/typescript/module/core/HttpService.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/StepBasedScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/feedback/feedbackStyles.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/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/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts +13 -0
- package/lib/typescript/module/ui/screens/EditProfileFieldScreen.d.ts.map +1 -0
- package/lib/typescript/module/ui/screens/FileManagementScreen.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/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.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/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/styles/fonts.d.ts +7 -7
- package/lib/typescript/module/ui/styles/theme.d.ts.map +1 -1
- package/lib/typescript/module/web/WebOxyContext.d.ts +43 -0
- package/lib/typescript/module/web/WebOxyContext.d.ts.map +1 -0
- package/lib/typescript/module/web/index.d.ts +42 -0
- package/lib/typescript/module/web/index.d.ts.map +1 -0
- package/lib/typescript/module/web.d.ts +53 -0
- package/lib/typescript/module/web.d.ts.map +1 -0
- package/package.json +27 -41
- package/src/assets/fonts/Inter/Inter_18pt-Black.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Bold.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Light.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Medium.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-Regular.ttf +0 -0
- package/src/assets/fonts/Inter/Inter_18pt-SemiBold.ttf +0 -0
- package/src/core/HttpService.ts +91 -0
- package/src/core/mixins/OxyServices.assets.ts +1 -1
- package/src/i18n/locales/en-US.json +3 -3
- package/src/i18n/locales/es-ES.json +240 -19
- package/src/ui/components/Avatar.tsx +1 -1
- package/src/ui/components/FollowButton.tsx +1 -1
- package/src/ui/components/FontLoader.tsx +34 -34
- package/src/ui/components/Header.tsx +4 -4
- package/src/ui/components/OxyPayButton.tsx +1 -1
- package/src/ui/components/OxySignInButton.tsx +2 -1
- package/src/ui/components/ProfileCard.tsx +1 -1
- package/src/ui/components/SectionTitle.tsx +1 -1
- package/src/ui/components/StepBasedScreen.tsx +2 -1
- package/src/ui/components/feedback/feedbackStyles.ts +2 -1
- package/src/ui/components/fileManagement/styles.ts +17 -17
- package/src/ui/components/payment/paymentStyles.ts +7 -7
- package/src/ui/navigation/routes.ts +3 -0
- package/src/ui/screens/AccountCenterScreen.tsx +4 -2
- package/src/ui/screens/AccountOverviewScreen.tsx +13 -5
- package/src/ui/screens/AccountSettingsScreen.tsx +35 -1511
- package/src/ui/screens/AccountSwitcherScreen.tsx +1 -1
- package/src/ui/screens/AccountVerificationScreen.tsx +3 -1
- package/src/ui/screens/AppInfoScreen.tsx +2 -2
- package/src/ui/screens/EditProfileFieldScreen.tsx +685 -0
- package/src/ui/screens/FileManagementScreen.tsx +33 -15
- package/src/ui/screens/HistoryViewScreen.tsx +9 -3
- package/src/ui/screens/LanguageSelectorScreen.tsx +4 -2
- package/src/ui/screens/LegalDocumentsScreen.tsx +3 -1
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +11 -13
- package/src/ui/screens/PrivacySettingsScreen.tsx +12 -4
- package/src/ui/screens/SearchSettingsScreen.tsx +3 -1
- package/src/ui/screens/SessionManagementScreen.tsx +15 -5
- package/src/ui/screens/UserLinksScreen.tsx +3 -1
- package/src/ui/screens/WelcomeNewUserScreen.tsx +2 -1
- package/src/ui/screens/karma/KarmaAboutScreen.tsx +6 -8
- package/src/ui/screens/karma/KarmaCenterScreen.tsx +3 -3
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +3 -3
- package/src/ui/styles/authStyles.ts +4 -4
- package/src/ui/styles/fonts.ts +26 -26
- package/src/ui/styles/theme.ts +3 -5
- package/src/web/WebOxyContext.tsx +257 -0
- package/src/web/index.ts +87 -0
- package/src/web.ts +230 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/commonjs/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/commonjs/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/commonjs/ui/components/profile/EditBioModal.js +0 -49
- package/lib/commonjs/ui/components/profile/EditBioModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js +0 -54
- package/lib/commonjs/ui/components/profile/EditDisplayNameModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditEmailModal.js +0 -57
- package/lib/commonjs/ui/components/profile/EditEmailModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditFieldModal.js +0 -412
- package/lib/commonjs/ui/components/profile/EditFieldModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditLinksModal.js +0 -315
- package/lib/commonjs/ui/components/profile/EditLinksModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditLocationModal.js +0 -91
- package/lib/commonjs/ui/components/profile/EditLocationModal.js.map +0 -1
- package/lib/commonjs/ui/components/profile/EditUsernameModal.js +0 -55
- package/lib/commonjs/ui/components/profile/EditUsernameModal.js.map +0 -1
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/module/assets/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/lib/module/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/lib/module/ui/components/profile/EditBioModal.js +0 -43
- package/lib/module/ui/components/profile/EditBioModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditDisplayNameModal.js +0 -48
- package/lib/module/ui/components/profile/EditDisplayNameModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditEmailModal.js +0 -51
- package/lib/module/ui/components/profile/EditEmailModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditFieldModal.js +0 -406
- package/lib/module/ui/components/profile/EditFieldModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditLinksModal.js +0 -309
- package/lib/module/ui/components/profile/EditLinksModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditLocationModal.js +0 -85
- package/lib/module/ui/components/profile/EditLocationModal.js.map +0 -1
- package/lib/module/ui/components/profile/EditUsernameModal.js +0 -49
- package/lib/module/ui/components/profile/EditUsernameModal.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts +0 -11
- package/lib/typescript/commonjs/ui/components/profile/EditBioModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts +0 -12
- package/lib/typescript/commonjs/ui/components/profile/EditDisplayNameModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts +0 -11
- package/lib/typescript/commonjs/ui/components/profile/EditEmailModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts +0 -110
- package/lib/typescript/commonjs/ui/components/profile/EditFieldModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditLinksModal.d.ts +0 -18
- package/lib/typescript/commonjs/ui/components/profile/EditLinksModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts +0 -21
- package/lib/typescript/commonjs/ui/components/profile/EditLocationModal.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts +0 -11
- package/lib/typescript/commonjs/ui/components/profile/EditUsernameModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts +0 -11
- package/lib/typescript/module/ui/components/profile/EditBioModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts +0 -12
- package/lib/typescript/module/ui/components/profile/EditDisplayNameModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts +0 -11
- package/lib/typescript/module/ui/components/profile/EditEmailModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts +0 -110
- package/lib/typescript/module/ui/components/profile/EditFieldModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditLinksModal.d.ts +0 -18
- package/lib/typescript/module/ui/components/profile/EditLinksModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts +0 -21
- package/lib/typescript/module/ui/components/profile/EditLocationModal.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts +0 -11
- package/lib/typescript/module/ui/components/profile/EditUsernameModal.d.ts.map +0 -1
- package/src/assets/fonts/Phudu/Phudu-Black.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-Bold.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-ExtraBold.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-Light.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-Medium.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-Regular.ttf +0 -0
- package/src/assets/fonts/Phudu/Phudu-SemiBold.ttf +0 -0
- package/src/ui/components/profile/EditBioModal.tsx +0 -46
- package/src/ui/components/profile/EditDisplayNameModal.tsx +0 -56
- package/src/ui/components/profile/EditEmailModal.tsx +0 -57
- package/src/ui/components/profile/EditFieldModal.tsx +0 -465
- package/src/ui/components/profile/EditLinksModal.tsx +0 -316
- package/src/ui/components/profile/EditLocationModal.tsx +0 -91
- package/src/ui/components/profile/EditUsernameModal.tsx +0 -55
|
@@ -0,0 +1,257 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Web-Only Oxy Context
|
|
3
|
+
* Clean implementation with ZERO React Native dependencies
|
|
4
|
+
*/
|
|
5
|
+
|
|
6
|
+
import {
|
|
7
|
+
createContext,
|
|
8
|
+
useCallback,
|
|
9
|
+
useContext,
|
|
10
|
+
useEffect,
|
|
11
|
+
useState,
|
|
12
|
+
type ReactNode,
|
|
13
|
+
} from 'react';
|
|
14
|
+
import { OxyServices } from '../core';
|
|
15
|
+
import type { User } from '../models/interfaces';
|
|
16
|
+
import type { ClientSession } from '../models/session';
|
|
17
|
+
import { QueryClientProvider } from '@tanstack/react-query';
|
|
18
|
+
import { createQueryClient } from '../ui/hooks/queryClient';
|
|
19
|
+
|
|
20
|
+
export interface WebAuthState {
|
|
21
|
+
user: User | null;
|
|
22
|
+
isAuthenticated: boolean;
|
|
23
|
+
isLoading: boolean;
|
|
24
|
+
error: string | null;
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
export interface WebAuthActions {
|
|
28
|
+
signIn: () => Promise<void>;
|
|
29
|
+
signOut: () => Promise<void>;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export interface WebOxyContextValue extends WebAuthState, WebAuthActions {
|
|
33
|
+
oxyServices: OxyServices;
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
const WebOxyContext = createContext<WebOxyContextValue | null>(null);
|
|
37
|
+
|
|
38
|
+
export interface WebOxyProviderProps {
|
|
39
|
+
children: ReactNode;
|
|
40
|
+
baseURL: string;
|
|
41
|
+
authWebUrl?: string;
|
|
42
|
+
onAuthStateChange?: (user: User | null) => void;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/**
|
|
46
|
+
* Web-only Oxy Provider
|
|
47
|
+
* Minimal, clean implementation for web apps
|
|
48
|
+
*/
|
|
49
|
+
export function WebOxyProvider({
|
|
50
|
+
children,
|
|
51
|
+
baseURL,
|
|
52
|
+
authWebUrl,
|
|
53
|
+
onAuthStateChange,
|
|
54
|
+
}: WebOxyProviderProps) {
|
|
55
|
+
const [oxyServices] = useState(() => new OxyServices({ baseURL, authWebUrl }));
|
|
56
|
+
const [user, setUser] = useState<User | null>(null);
|
|
57
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
58
|
+
const [error, setError] = useState<string | null>(null);
|
|
59
|
+
const [queryClient] = useState(() => createQueryClient());
|
|
60
|
+
|
|
61
|
+
const isAuthenticated = !!user;
|
|
62
|
+
|
|
63
|
+
// Initialize - check for existing session
|
|
64
|
+
useEffect(() => {
|
|
65
|
+
let mounted = true;
|
|
66
|
+
|
|
67
|
+
const initAuth = async () => {
|
|
68
|
+
try {
|
|
69
|
+
// Try to get sessions from storage (localStorage)
|
|
70
|
+
const sessions = await oxyServices.getAllSessions();
|
|
71
|
+
|
|
72
|
+
if (sessions && sessions.length > 0) {
|
|
73
|
+
const activeSession = sessions.find((s: ClientSession) => s.isCurrent) || sessions[0];
|
|
74
|
+
|
|
75
|
+
// Try to get user info from the active session's userId
|
|
76
|
+
if (activeSession && activeSession.userId) {
|
|
77
|
+
try {
|
|
78
|
+
const userProfile = await oxyServices.getProfile(activeSession.userId);
|
|
79
|
+
if (mounted && userProfile) {
|
|
80
|
+
setUser(userProfile as User);
|
|
81
|
+
setIsLoading(false);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
} catch (err) {
|
|
85
|
+
console.log('[WebOxy] Could not fetch user profile:', err);
|
|
86
|
+
}
|
|
87
|
+
}
|
|
88
|
+
}
|
|
89
|
+
|
|
90
|
+
// No active session - check for cross-domain SSO via FedCM
|
|
91
|
+
if (typeof window !== 'undefined' && 'IdentityCredential' in window) {
|
|
92
|
+
try {
|
|
93
|
+
const credential = await navigator.credentials.get({
|
|
94
|
+
// @ts-expect-error - FedCM identity property is not in standard types
|
|
95
|
+
identity: {
|
|
96
|
+
providers: [{
|
|
97
|
+
configURL: `${authWebUrl || 'https://auth.oxy.so'}/fedcm.json`,
|
|
98
|
+
clientId: window.location.origin,
|
|
99
|
+
}]
|
|
100
|
+
}
|
|
101
|
+
});
|
|
102
|
+
|
|
103
|
+
if (credential && 'token' in credential) {
|
|
104
|
+
// Use the token to authenticate
|
|
105
|
+
const session = await oxyServices.authenticateWithToken(credential.token);
|
|
106
|
+
if (mounted && session.user) {
|
|
107
|
+
setUser(session.user);
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
} catch (fedcmError) {
|
|
111
|
+
// FedCM not available or user cancelled - this is fine
|
|
112
|
+
console.log('[WebOxy] FedCM SSO not available:', fedcmError);
|
|
113
|
+
}
|
|
114
|
+
}
|
|
115
|
+
} catch (err) {
|
|
116
|
+
console.error('[WebOxy] Init error:', err);
|
|
117
|
+
if (mounted) {
|
|
118
|
+
setError(err instanceof Error ? err.message : 'Failed to initialize auth');
|
|
119
|
+
}
|
|
120
|
+
} finally {
|
|
121
|
+
if (mounted) {
|
|
122
|
+
setIsLoading(false);
|
|
123
|
+
}
|
|
124
|
+
}
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
initAuth();
|
|
128
|
+
|
|
129
|
+
return () => {
|
|
130
|
+
mounted = false;
|
|
131
|
+
};
|
|
132
|
+
}, [oxyServices, authWebUrl]);
|
|
133
|
+
|
|
134
|
+
// Notify parent of auth state changes
|
|
135
|
+
useEffect(() => {
|
|
136
|
+
onAuthStateChange?.(user);
|
|
137
|
+
}, [user, onAuthStateChange]);
|
|
138
|
+
|
|
139
|
+
const signIn = useCallback(async () => {
|
|
140
|
+
setError(null);
|
|
141
|
+
setIsLoading(true);
|
|
142
|
+
|
|
143
|
+
try {
|
|
144
|
+
// Open popup to auth.oxy.so
|
|
145
|
+
const popup = window.open(
|
|
146
|
+
`${authWebUrl || 'https://auth.oxy.so'}/login?origin=${encodeURIComponent(window.location.origin)}`,
|
|
147
|
+
'oxy-auth',
|
|
148
|
+
'width=500,height=700,popup=yes'
|
|
149
|
+
);
|
|
150
|
+
|
|
151
|
+
if (!popup) {
|
|
152
|
+
throw new Error('Popup blocked. Please allow popups for this site.');
|
|
153
|
+
}
|
|
154
|
+
|
|
155
|
+
// Listen for message from popup
|
|
156
|
+
const handleMessage = async (event: MessageEvent) => {
|
|
157
|
+
if (event.origin !== (authWebUrl || 'https://auth.oxy.so')) {
|
|
158
|
+
return;
|
|
159
|
+
}
|
|
160
|
+
|
|
161
|
+
if (event.data.type === 'oxy-auth-success') {
|
|
162
|
+
const { sessionId, accessToken, user: authUser } = event.data;
|
|
163
|
+
|
|
164
|
+
// Store session (note: user property doesn't exist in ClientSession type)
|
|
165
|
+
const session: ClientSession = {
|
|
166
|
+
sessionId,
|
|
167
|
+
deviceId: event.data.deviceId || '',
|
|
168
|
+
expiresAt: event.data.expiresAt || '',
|
|
169
|
+
lastActive: new Date().toISOString(),
|
|
170
|
+
userId: authUser.id,
|
|
171
|
+
isCurrent: true,
|
|
172
|
+
};
|
|
173
|
+
await oxyServices.storeSession(session);
|
|
174
|
+
|
|
175
|
+
setUser(authUser);
|
|
176
|
+
setIsLoading(false);
|
|
177
|
+
|
|
178
|
+
window.removeEventListener('message', handleMessage);
|
|
179
|
+
popup.close();
|
|
180
|
+
} else if (event.data.type === 'oxy-auth-error') {
|
|
181
|
+
setError(event.data.error || 'Authentication failed');
|
|
182
|
+
setIsLoading(false);
|
|
183
|
+
window.removeEventListener('message', handleMessage);
|
|
184
|
+
popup.close();
|
|
185
|
+
}
|
|
186
|
+
};
|
|
187
|
+
|
|
188
|
+
window.addEventListener('message', handleMessage);
|
|
189
|
+
|
|
190
|
+
// Check if popup was closed
|
|
191
|
+
const checkClosed = setInterval(() => {
|
|
192
|
+
if (popup.closed) {
|
|
193
|
+
clearInterval(checkClosed);
|
|
194
|
+
window.removeEventListener('message', handleMessage);
|
|
195
|
+
setIsLoading(false);
|
|
196
|
+
}
|
|
197
|
+
}, 500);
|
|
198
|
+
} catch (err) {
|
|
199
|
+
console.error('[WebOxy] Sign in error:', err);
|
|
200
|
+
setError(err instanceof Error ? err.message : 'Sign in failed');
|
|
201
|
+
setIsLoading(false);
|
|
202
|
+
}
|
|
203
|
+
}, [oxyServices, authWebUrl]);
|
|
204
|
+
|
|
205
|
+
const signOut = useCallback(async () => {
|
|
206
|
+
setError(null);
|
|
207
|
+
|
|
208
|
+
try {
|
|
209
|
+
await oxyServices.logout();
|
|
210
|
+
setUser(null);
|
|
211
|
+
} catch (err) {
|
|
212
|
+
console.error('[WebOxy] Sign out error:', err);
|
|
213
|
+
setError(err instanceof Error ? err.message : 'Sign out failed');
|
|
214
|
+
}
|
|
215
|
+
}, [oxyServices]);
|
|
216
|
+
|
|
217
|
+
const contextValue: WebOxyContextValue = {
|
|
218
|
+
user,
|
|
219
|
+
isAuthenticated,
|
|
220
|
+
isLoading,
|
|
221
|
+
error,
|
|
222
|
+
signIn,
|
|
223
|
+
signOut,
|
|
224
|
+
oxyServices,
|
|
225
|
+
};
|
|
226
|
+
|
|
227
|
+
return (
|
|
228
|
+
<QueryClientProvider client={queryClient}>
|
|
229
|
+
<WebOxyContext.Provider value={contextValue}>
|
|
230
|
+
{children}
|
|
231
|
+
</WebOxyContext.Provider>
|
|
232
|
+
</QueryClientProvider>
|
|
233
|
+
);
|
|
234
|
+
}
|
|
235
|
+
|
|
236
|
+
export function useWebOxy() {
|
|
237
|
+
const context = useContext(WebOxyContext);
|
|
238
|
+
if (!context) {
|
|
239
|
+
throw new Error('useWebOxy must be used within WebOxyProvider');
|
|
240
|
+
}
|
|
241
|
+
return context;
|
|
242
|
+
}
|
|
243
|
+
|
|
244
|
+
export function useAuth() {
|
|
245
|
+
const { user, isAuthenticated, isLoading, error, signIn, signOut, oxyServices } = useWebOxy();
|
|
246
|
+
|
|
247
|
+
return {
|
|
248
|
+
user,
|
|
249
|
+
isAuthenticated,
|
|
250
|
+
isLoading,
|
|
251
|
+
isReady: !isLoading,
|
|
252
|
+
error,
|
|
253
|
+
signIn,
|
|
254
|
+
signOut,
|
|
255
|
+
oxyServices,
|
|
256
|
+
};
|
|
257
|
+
}
|
package/src/web/index.ts
ADDED
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @oxyhq/services/web - Web-Only Module
|
|
3
|
+
*
|
|
4
|
+
* Clean, professional web module with ZERO React Native dependencies.
|
|
5
|
+
* Perfect for Next.js, Vite, Create React App, and other pure React web apps.
|
|
6
|
+
*
|
|
7
|
+
* Features:
|
|
8
|
+
* - WebOxyProvider for React context
|
|
9
|
+
* - useAuth hook for authentication
|
|
10
|
+
* - Cross-domain SSO via FedCM
|
|
11
|
+
* - Full TypeScript support
|
|
12
|
+
* - Zero bundler configuration needed
|
|
13
|
+
*
|
|
14
|
+
* Usage:
|
|
15
|
+
* ```tsx
|
|
16
|
+
* import { WebOxyProvider, useAuth } from '@oxyhq/services/web';
|
|
17
|
+
*
|
|
18
|
+
* function App() {
|
|
19
|
+
* return (
|
|
20
|
+
* <WebOxyProvider baseURL="https://api.oxy.so">
|
|
21
|
+
* <YourApp />
|
|
22
|
+
* </WebOxyProvider>
|
|
23
|
+
* );
|
|
24
|
+
* }
|
|
25
|
+
*
|
|
26
|
+
* function YourApp() {
|
|
27
|
+
* const { user, isAuthenticated, signIn, signOut } = useAuth();
|
|
28
|
+
* // ... your app logic
|
|
29
|
+
* }
|
|
30
|
+
* ```
|
|
31
|
+
*/
|
|
32
|
+
|
|
33
|
+
// ==================== Core API ====================
|
|
34
|
+
// Re-export core services (zero React Native deps)
|
|
35
|
+
export {
|
|
36
|
+
OxyServices,
|
|
37
|
+
OxyAuthenticationError,
|
|
38
|
+
OxyAuthenticationTimeoutError,
|
|
39
|
+
OXY_CLOUD_URL,
|
|
40
|
+
oxyClient,
|
|
41
|
+
CrossDomainAuth,
|
|
42
|
+
createCrossDomainAuth,
|
|
43
|
+
DeviceManager,
|
|
44
|
+
} from '../core';
|
|
45
|
+
|
|
46
|
+
export type {
|
|
47
|
+
CrossDomainAuthOptions,
|
|
48
|
+
DeviceFingerprint,
|
|
49
|
+
StoredDeviceInfo,
|
|
50
|
+
} from '../core';
|
|
51
|
+
|
|
52
|
+
// ==================== Web Components ====================
|
|
53
|
+
export { WebOxyProvider, useWebOxy, useAuth } from './WebOxyContext';
|
|
54
|
+
export type { WebOxyProviderProps, WebAuthState, WebAuthActions, WebOxyContextValue } from './WebOxyContext';
|
|
55
|
+
|
|
56
|
+
// ==================== Models & Types ====================
|
|
57
|
+
// Re-export commonly used types
|
|
58
|
+
export type {
|
|
59
|
+
User,
|
|
60
|
+
ApiError,
|
|
61
|
+
Notification,
|
|
62
|
+
FileMetadata,
|
|
63
|
+
AssetUploadProgress,
|
|
64
|
+
PaymentMethod,
|
|
65
|
+
KarmaLeaderboardEntry,
|
|
66
|
+
KarmaRule,
|
|
67
|
+
Transaction,
|
|
68
|
+
DeviceSession,
|
|
69
|
+
} from '../models/interfaces';
|
|
70
|
+
|
|
71
|
+
// Re-export session types
|
|
72
|
+
export type { ClientSession } from '../models/session';
|
|
73
|
+
|
|
74
|
+
// ==================== Utilities ====================
|
|
75
|
+
export {
|
|
76
|
+
SUPPORTED_LANGUAGES,
|
|
77
|
+
getLanguageMetadata,
|
|
78
|
+
getLanguageName,
|
|
79
|
+
getNativeLanguageName,
|
|
80
|
+
normalizeLanguageCode,
|
|
81
|
+
} from '../utils/languageUtils';
|
|
82
|
+
|
|
83
|
+
export type { LanguageMetadata } from '../utils/languageUtils';
|
|
84
|
+
|
|
85
|
+
// Default export for convenience
|
|
86
|
+
import { WebOxyProvider } from './WebOxyContext';
|
|
87
|
+
export default WebOxyProvider;
|
package/src/web.ts
ADDED
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* OxyHQServices Web Entry Point - Pure React/Next.js Apps
|
|
3
|
+
*
|
|
4
|
+
* This entry point is optimized for pure web applications without Expo or React Native.
|
|
5
|
+
* It excludes all React Native dependencies for a smaller bundle size.
|
|
6
|
+
*
|
|
7
|
+
* Use this for:
|
|
8
|
+
* - Pure React apps (Vite, Create React App)
|
|
9
|
+
* - Next.js apps
|
|
10
|
+
* - Any web-only application
|
|
11
|
+
*
|
|
12
|
+
* For Expo apps (native + web), use the main entry point instead:
|
|
13
|
+
* import { OxyProvider } from '@oxyhq/services';
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
// IMPORTANT: Import crypto module first to ensure polyfills are loaded
|
|
17
|
+
import './crypto/polyfill';
|
|
18
|
+
|
|
19
|
+
// Core exports (no React Native dependencies)
|
|
20
|
+
export { OxyServices, OxyAuthenticationError, OxyAuthenticationTimeoutError } from './core';
|
|
21
|
+
export { OXY_CLOUD_URL, oxyClient } from './core';
|
|
22
|
+
|
|
23
|
+
// Cross-domain authentication (Web SSO via FedCM/popup/redirect)
|
|
24
|
+
export { CrossDomainAuth, createCrossDomainAuth } from './core';
|
|
25
|
+
export type { CrossDomainAuthOptions } from './core';
|
|
26
|
+
|
|
27
|
+
// Crypto/Identity exports
|
|
28
|
+
export {
|
|
29
|
+
KeyManager,
|
|
30
|
+
SignatureService,
|
|
31
|
+
RecoveryPhraseService
|
|
32
|
+
} from './crypto';
|
|
33
|
+
export type {
|
|
34
|
+
KeyPair,
|
|
35
|
+
SignedMessage,
|
|
36
|
+
AuthChallenge,
|
|
37
|
+
RecoveryPhraseResult
|
|
38
|
+
} from './crypto';
|
|
39
|
+
|
|
40
|
+
// React context and auth hooks
|
|
41
|
+
export { useOxy } from './ui/context/OxyContext';
|
|
42
|
+
export { useAuth } from './ui/hooks/useAuth';
|
|
43
|
+
export type { AuthState, AuthActions, UseAuthReturn } from './ui/hooks/useAuth';
|
|
44
|
+
|
|
45
|
+
// Web-only provider (NO React Native dependencies)
|
|
46
|
+
export { default as WebOxyProvider } from './ui/components/WebOxyProvider';
|
|
47
|
+
|
|
48
|
+
// Device management
|
|
49
|
+
export { DeviceManager } from './utils/deviceManager';
|
|
50
|
+
export type { DeviceFingerprint, StoredDeviceInfo } from './utils/deviceManager';
|
|
51
|
+
|
|
52
|
+
// Language utilities
|
|
53
|
+
export {
|
|
54
|
+
SUPPORTED_LANGUAGES,
|
|
55
|
+
getLanguageMetadata,
|
|
56
|
+
getLanguageName,
|
|
57
|
+
getNativeLanguageName,
|
|
58
|
+
normalizeLanguageCode
|
|
59
|
+
} from './utils/languageUtils';
|
|
60
|
+
export type { LanguageMetadata } from './utils/languageUtils';
|
|
61
|
+
|
|
62
|
+
// Type exports
|
|
63
|
+
export type {
|
|
64
|
+
OxyConfig,
|
|
65
|
+
User,
|
|
66
|
+
LoginResponse,
|
|
67
|
+
Notification,
|
|
68
|
+
Wallet,
|
|
69
|
+
Transaction,
|
|
70
|
+
TransferFundsRequest,
|
|
71
|
+
PurchaseRequest,
|
|
72
|
+
WithdrawalRequest,
|
|
73
|
+
TransactionResponse,
|
|
74
|
+
KarmaRule,
|
|
75
|
+
KarmaHistory,
|
|
76
|
+
KarmaLeaderboardEntry,
|
|
77
|
+
KarmaAwardRequest,
|
|
78
|
+
ApiError,
|
|
79
|
+
PaymentMethod,
|
|
80
|
+
PaymentRequest,
|
|
81
|
+
PaymentResponse,
|
|
82
|
+
AnalyticsData,
|
|
83
|
+
FollowerDetails,
|
|
84
|
+
ContentViewer,
|
|
85
|
+
FileMetadata,
|
|
86
|
+
FileUploadResponse,
|
|
87
|
+
FileListResponse,
|
|
88
|
+
FileUpdateRequest,
|
|
89
|
+
FileDeleteResponse,
|
|
90
|
+
DeviceSession,
|
|
91
|
+
DeviceSessionsResponse,
|
|
92
|
+
DeviceSessionLogoutResponse,
|
|
93
|
+
UpdateDeviceNameResponse,
|
|
94
|
+
BlockedUser,
|
|
95
|
+
RestrictedUser,
|
|
96
|
+
FileVisibility,
|
|
97
|
+
AssetLink,
|
|
98
|
+
AssetVariant,
|
|
99
|
+
Asset,
|
|
100
|
+
AssetInitRequest,
|
|
101
|
+
AssetInitResponse,
|
|
102
|
+
AssetCompleteRequest,
|
|
103
|
+
AssetLinkRequest,
|
|
104
|
+
AssetUnlinkRequest,
|
|
105
|
+
AssetUrlResponse,
|
|
106
|
+
AssetDeleteSummary,
|
|
107
|
+
AssetUploadProgress,
|
|
108
|
+
AssetUpdateVisibilityRequest,
|
|
109
|
+
AssetUpdateVisibilityResponse,
|
|
110
|
+
AccountStorageCategoryUsage,
|
|
111
|
+
AccountStorageUsageResponse,
|
|
112
|
+
SecurityEventType,
|
|
113
|
+
SecurityEventSeverity,
|
|
114
|
+
SecurityActivity,
|
|
115
|
+
SecurityActivityResponse
|
|
116
|
+
} from './models/interfaces';
|
|
117
|
+
|
|
118
|
+
export { SECURITY_EVENT_SEVERITY_MAP } from './models/interfaces';
|
|
119
|
+
|
|
120
|
+
export type {
|
|
121
|
+
SessionLoginResponse,
|
|
122
|
+
ClientSession,
|
|
123
|
+
MinimalUserData
|
|
124
|
+
} from './models/session';
|
|
125
|
+
|
|
126
|
+
// UI hooks - Stores
|
|
127
|
+
export { useAuthStore } from './ui/stores/authStore';
|
|
128
|
+
export {
|
|
129
|
+
useAssetStore,
|
|
130
|
+
useAssets as useAssetsStore,
|
|
131
|
+
useAsset,
|
|
132
|
+
useUploadProgress,
|
|
133
|
+
useAssetLoading,
|
|
134
|
+
useAssetErrors,
|
|
135
|
+
useAssetsByApp,
|
|
136
|
+
useAssetsByEntity,
|
|
137
|
+
useAssetUsageCount,
|
|
138
|
+
useIsAssetLinked
|
|
139
|
+
} from './ui/stores/assetStore';
|
|
140
|
+
|
|
141
|
+
// UI hooks - Custom hooks
|
|
142
|
+
export { useSessionSocket } from './ui/hooks/useSessionSocket';
|
|
143
|
+
export { useAssets, setOxyAssetInstance } from './ui/hooks/useAssets';
|
|
144
|
+
export { useFileDownloadUrl, setOxyFileUrlInstance } from './ui/hooks/useFileDownloadUrl';
|
|
145
|
+
|
|
146
|
+
// UI hooks - Query hooks (TanStack Query)
|
|
147
|
+
export {
|
|
148
|
+
useUserProfile,
|
|
149
|
+
useUserProfiles,
|
|
150
|
+
useCurrentUser,
|
|
151
|
+
useUserById,
|
|
152
|
+
useUserByUsername,
|
|
153
|
+
useUsersBySessions,
|
|
154
|
+
usePrivacySettings,
|
|
155
|
+
useSessions,
|
|
156
|
+
useSession,
|
|
157
|
+
useDeviceSessions,
|
|
158
|
+
useUserDevices,
|
|
159
|
+
useSecurityInfo,
|
|
160
|
+
useSecurityActivity,
|
|
161
|
+
useRecentSecurityActivity,
|
|
162
|
+
} from './ui/hooks/queries';
|
|
163
|
+
|
|
164
|
+
// UI hooks - Mutation hooks (TanStack Query)
|
|
165
|
+
export {
|
|
166
|
+
useUpdateProfile,
|
|
167
|
+
useUploadAvatar,
|
|
168
|
+
useUpdateAccountSettings,
|
|
169
|
+
useUpdatePrivacySettings,
|
|
170
|
+
useUploadFile,
|
|
171
|
+
useSwitchSession,
|
|
172
|
+
useLogoutSession,
|
|
173
|
+
useLogoutAll,
|
|
174
|
+
useUpdateDeviceName,
|
|
175
|
+
useRemoveDevice,
|
|
176
|
+
} from './ui/hooks/mutations';
|
|
177
|
+
|
|
178
|
+
// Mutation factory utilities
|
|
179
|
+
export {
|
|
180
|
+
createProfileMutation,
|
|
181
|
+
createGenericMutation,
|
|
182
|
+
} from './ui/hooks/mutations/mutationFactory';
|
|
183
|
+
export type {
|
|
184
|
+
ProfileMutationConfig,
|
|
185
|
+
GenericMutationConfig,
|
|
186
|
+
} from './ui/hooks/mutations/mutationFactory';
|
|
187
|
+
|
|
188
|
+
// Authentication helpers
|
|
189
|
+
export {
|
|
190
|
+
ensureValidToken,
|
|
191
|
+
withAuthErrorHandling,
|
|
192
|
+
authenticatedApiCall,
|
|
193
|
+
isAuthenticationError,
|
|
194
|
+
SessionSyncRequiredError,
|
|
195
|
+
AuthenticationFailedError,
|
|
196
|
+
} from './ui/utils/authHelpers';
|
|
197
|
+
export type { HandleApiErrorOptions } from './ui/utils/authHelpers';
|
|
198
|
+
|
|
199
|
+
// File filtering hook
|
|
200
|
+
export { useFileFiltering } from './ui/hooks/useFileFiltering';
|
|
201
|
+
export type { ViewMode, SortBy, SortOrder } from './ui/hooks/useFileFiltering';
|
|
202
|
+
|
|
203
|
+
// Note: UI components like OxySignInButton and OxyLogo use React Native
|
|
204
|
+
// and are not included in the /web entry point. For pure web apps, use the
|
|
205
|
+
// useAuth hook and create your own sign-in button.
|
|
206
|
+
|
|
207
|
+
// Utilities
|
|
208
|
+
export * from './utils/apiUtils';
|
|
209
|
+
export {
|
|
210
|
+
ErrorCodes,
|
|
211
|
+
createApiError,
|
|
212
|
+
handleHttpError,
|
|
213
|
+
validateRequiredFields,
|
|
214
|
+
retryWithBackoff
|
|
215
|
+
} from './utils/errorUtils';
|
|
216
|
+
export * from './utils/validationUtils';
|
|
217
|
+
export {
|
|
218
|
+
logger,
|
|
219
|
+
LogLevel,
|
|
220
|
+
logAuth,
|
|
221
|
+
logApi,
|
|
222
|
+
logSession,
|
|
223
|
+
logUser,
|
|
224
|
+
logDevice,
|
|
225
|
+
logPayment,
|
|
226
|
+
logPerformance
|
|
227
|
+
} from './utils/loggerUtils';
|
|
228
|
+
export type { LogContext } from './utils/loggerUtils';
|
|
229
|
+
export * from './utils/asyncUtils';
|
|
230
|
+
export * from './utils/hookUtils';
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
Binary file
|
|
@@ -1,49 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.EditBioModal = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _EditFieldModal = require("./EditFieldModal.js");
|
|
9
|
-
var _useProfileEditing = require("../../hooks/useProfileEditing.js");
|
|
10
|
-
var _useI18n = require("../../hooks/useI18n.js");
|
|
11
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
12
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
13
|
-
const EditBioModal = ({
|
|
14
|
-
visible,
|
|
15
|
-
onClose,
|
|
16
|
-
initialValue = '',
|
|
17
|
-
theme = 'light',
|
|
18
|
-
onSave
|
|
19
|
-
}) => {
|
|
20
|
-
const {
|
|
21
|
-
t
|
|
22
|
-
} = (0, _useI18n.useI18n)();
|
|
23
|
-
const {
|
|
24
|
-
updateField
|
|
25
|
-
} = (0, _useProfileEditing.useProfileEditing)();
|
|
26
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_EditFieldModal.EditFieldModal, {
|
|
27
|
-
visible: visible,
|
|
28
|
-
onClose: onClose,
|
|
29
|
-
title: t('editProfile.items.bio.title') || 'Bio',
|
|
30
|
-
theme: theme,
|
|
31
|
-
onSave: onSave,
|
|
32
|
-
variant: "single",
|
|
33
|
-
fields: [{
|
|
34
|
-
key: 'bio',
|
|
35
|
-
label: t('editProfile.items.bio.label') || 'Bio',
|
|
36
|
-
initialValue,
|
|
37
|
-
placeholder: t('editProfile.items.bio.placeholder') || 'Tell people about yourself...',
|
|
38
|
-
inputProps: {
|
|
39
|
-
multiline: true,
|
|
40
|
-
numberOfLines: 6
|
|
41
|
-
}
|
|
42
|
-
}],
|
|
43
|
-
onSubmit: async data => {
|
|
44
|
-
return await updateField('bio', data.bio);
|
|
45
|
-
}
|
|
46
|
-
});
|
|
47
|
-
};
|
|
48
|
-
exports.EditBioModal = EditBioModal;
|
|
49
|
-
//# sourceMappingURL=EditBioModal.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_EditFieldModal","_useProfileEditing","_useI18n","_jsxRuntime","e","__esModule","default","EditBioModal","visible","onClose","initialValue","theme","onSave","t","useI18n","updateField","useProfileEditing","jsx","EditFieldModal","title","variant","fields","key","label","placeholder","inputProps","multiline","numberOfLines","onSubmit","data","bio","exports"],"sourceRoot":"../../../../../src","sources":["ui/components/profile/EditBioModal.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,eAAA,GAAAD,OAAA;AACA,IAAAE,kBAAA,GAAAF,OAAA;AACA,IAAAG,QAAA,GAAAH,OAAA;AAA8C,IAAAI,WAAA,GAAAJ,OAAA;AAAA,SAAAD,uBAAAM,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAUvC,MAAMG,YAAyC,GAAGA,CAAC;EACxDC,OAAO;EACPC,OAAO;EACPC,YAAY,GAAG,EAAE;EACjBC,KAAK,GAAG,OAAO;EACfC;AACF,CAAC,KAAK;EACJ,MAAM;IAAEC;EAAE,CAAC,GAAG,IAAAC,gBAAO,EAAC,CAAC;EACvB,MAAM;IAAEC;EAAY,CAAC,GAAG,IAAAC,oCAAiB,EAAC,CAAC;EAE3C,oBACE,IAAAb,WAAA,CAAAc,GAAA,EAACjB,eAAA,CAAAkB,cAAc;IACbV,OAAO,EAAEA,OAAQ;IACjBC,OAAO,EAAEA,OAAQ;IACjBU,KAAK,EAAEN,CAAC,CAAC,6BAA6B,CAAC,IAAI,KAAM;IACjDF,KAAK,EAAEA,KAAM;IACbC,MAAM,EAAEA,MAAO;IACfQ,OAAO,EAAC,QAAQ;IAChBC,MAAM,EAAE,CACN;MACEC,GAAG,EAAE,KAAK;MACVC,KAAK,EAAEV,CAAC,CAAC,6BAA6B,CAAC,IAAI,KAAK;MAChDH,YAAY;MACZc,WAAW,EAAEX,CAAC,CAAC,mCAAmC,CAAC,IAAI,+BAA+B;MACtFY,UAAU,EAAE;QAAEC,SAAS,EAAE,IAAI;QAAEC,aAAa,EAAE;MAAE;IAClD,CAAC,CACD;IACFC,QAAQ,EAAE,MAAOC,IAAI,IAAK;MACxB,OAAO,MAAMd,WAAW,CAAC,KAAK,EAAEc,IAAI,CAACC,GAAa,CAAC;IACrD;EAAE,CACH,CAAC;AAEN,CAAC;AAACC,OAAA,CAAAxB,YAAA,GAAAA,YAAA","ignoreList":[]}
|