@oxyhq/services 5.4.2 → 5.4.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/assets/OxyLogo.svg +1 -0
- package/lib/commonjs/assets/assets/OxyLogo.svg +1 -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/assets/icons/OxyServices.tsx +67 -0
- package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +1 -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/assets/icons/OxyServices.js +53 -0
- package/lib/commonjs/assets/icons/OxyServices.js.map +1 -0
- package/lib/commonjs/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/commonjs/constants/version.js +28 -0
- package/lib/commonjs/constants/version.js.map +1 -0
- package/lib/commonjs/core/index.js +1660 -0
- package/lib/commonjs/core/index.js.map +1 -0
- package/lib/commonjs/index.js +160 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/lib/sonner.js +21 -0
- package/lib/commonjs/lib/sonner.js.map +1 -0
- package/lib/commonjs/models/interfaces.js +2 -0
- package/lib/commonjs/models/interfaces.js.map +1 -0
- package/lib/commonjs/models/secureSession.js +2 -0
- package/lib/commonjs/models/secureSession.js.map +1 -0
- package/lib/commonjs/node/index.js +54 -0
- package/lib/commonjs/node/index.js.map +1 -0
- package/lib/commonjs/ui/components/Avatar.js +98 -0
- package/lib/commonjs/ui/components/Avatar.js.map +1 -0
- package/lib/commonjs/ui/components/FollowButton.js +246 -0
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -0
- package/lib/commonjs/ui/components/FontLoader.js +181 -0
- package/lib/commonjs/ui/components/FontLoader.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedItem.js +109 -0
- package/lib/commonjs/ui/components/GroupedItem.js.map +1 -0
- package/lib/commonjs/ui/components/GroupedSection.js +33 -0
- package/lib/commonjs/ui/components/GroupedSection.js.map +1 -0
- package/lib/commonjs/ui/components/OxyLogo.js +56 -0
- package/lib/commonjs/ui/components/OxyLogo.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +517 -0
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -0
- package/lib/commonjs/ui/components/OxySignInButton.js +178 -0
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -0
- package/lib/commonjs/ui/components/ProfileCard.js +124 -0
- package/lib/commonjs/ui/components/ProfileCard.js.map +1 -0
- package/lib/commonjs/ui/components/QuickActions.js +87 -0
- package/lib/commonjs/ui/components/QuickActions.js.map +1 -0
- package/lib/commonjs/ui/components/Section.js +36 -0
- package/lib/commonjs/ui/components/Section.js.map +1 -0
- package/lib/commonjs/ui/components/SectionTitle.js +35 -0
- package/lib/commonjs/ui/components/SectionTitle.js.map +1 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js +37 -0
- package/lib/commonjs/ui/components/bottomSheet/index.js.map +1 -0
- package/lib/commonjs/ui/components/icon/OxyIcon.js +27 -0
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -0
- package/lib/commonjs/ui/components/icon/index.js +14 -0
- package/lib/commonjs/ui/components/icon/index.js.map +1 -0
- package/lib/commonjs/ui/components/index.js +97 -0
- package/lib/commonjs/ui/components/index.js.map +1 -0
- package/lib/commonjs/ui/context/OxyContext.js +584 -0
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -0
- package/lib/commonjs/ui/index.js +128 -0
- package/lib/commonjs/ui/index.js.map +1 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js +264 -0
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -0
- package/lib/commonjs/ui/navigation/types.js +6 -0
- package/lib/commonjs/ui/navigation/types.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +313 -0
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +299 -0
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +855 -0
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +843 -0
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +788 -0
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/AppInfoScreen.js +664 -0
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +636 -0
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js +2515 -0
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +1620 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js +450 -0
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +449 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SignInScreen.js +1004 -0
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SignUpScreen.js +937 -0
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +88 -0
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +364 -0
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +227 -0
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +148 -0
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +127 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +105 -0
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +1 -0
- package/lib/commonjs/ui/styles/FONTS.md +126 -0
- package/lib/commonjs/ui/styles/fonts.js +84 -0
- package/lib/commonjs/ui/styles/fonts.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +28 -0
- package/lib/commonjs/ui/styles/index.js.map +1 -0
- package/lib/commonjs/ui/styles/theme.js +121 -0
- package/lib/commonjs/ui/styles/theme.js.map +1 -0
- package/lib/commonjs/utils/deviceManager.js +173 -0
- package/lib/commonjs/utils/deviceManager.js.map +1 -0
- package/lib/commonjs/utils/index.js +13 -0
- package/lib/commonjs/utils/index.js.map +1 -0
- package/lib/commonjs/utils/polyfills.js +42 -0
- package/lib/commonjs/utils/polyfills.js.map +1 -0
- package/lib/module/assets/OxyLogo.svg +1 -0
- package/lib/module/assets/assets/OxyLogo.svg +1 -0
- 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/assets/icons/OxyServices.tsx +67 -0
- package/lib/module/assets/assets/icons/logo_OxyServices.svg +1 -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/assets/icons/OxyServices.js +46 -0
- package/lib/module/assets/icons/OxyServices.js.map +1 -0
- package/lib/module/assets/icons/logo_OxyServices.svg +1 -0
- package/lib/module/constants/version.js +21 -0
- package/lib/module/constants/version.js.map +1 -0
- package/lib/module/core/index.js +1634 -0
- package/lib/module/core/index.js.map +1 -0
- package/lib/module/index.js +48 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/lib/sonner.js +16 -0
- package/lib/module/lib/sonner.js.map +1 -0
- package/lib/module/models/interfaces.js +2 -0
- package/lib/module/models/interfaces.js.map +1 -0
- package/lib/module/models/secureSession.js +2 -0
- package/lib/module/models/secureSession.js.map +1 -0
- package/lib/module/node/index.js +23 -0
- package/lib/module/node/index.js.map +1 -0
- package/lib/module/ui/components/Avatar.js +93 -0
- package/lib/module/ui/components/Avatar.js.map +1 -0
- package/lib/module/ui/components/FollowButton.js +241 -0
- package/lib/module/ui/components/FollowButton.js.map +1 -0
- package/lib/module/ui/components/FontLoader.js +176 -0
- package/lib/module/ui/components/FontLoader.js.map +1 -0
- package/lib/module/ui/components/GroupedItem.js +104 -0
- package/lib/module/ui/components/GroupedItem.js.map +1 -0
- package/lib/module/ui/components/GroupedSection.js +28 -0
- package/lib/module/ui/components/GroupedSection.js.map +1 -0
- package/lib/module/ui/components/OxyLogo.js +49 -0
- package/lib/module/ui/components/OxyLogo.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +511 -0
- package/lib/module/ui/components/OxyProvider.js.map +1 -0
- package/lib/module/ui/components/OxySignInButton.js +172 -0
- package/lib/module/ui/components/OxySignInButton.js.map +1 -0
- package/lib/module/ui/components/ProfileCard.js +119 -0
- package/lib/module/ui/components/ProfileCard.js.map +1 -0
- package/lib/module/ui/components/QuickActions.js +82 -0
- package/lib/module/ui/components/QuickActions.js.map +1 -0
- package/lib/module/ui/components/Section.js +31 -0
- package/lib/module/ui/components/Section.js.map +1 -0
- package/lib/module/ui/components/SectionTitle.js +30 -0
- package/lib/module/ui/components/SectionTitle.js.map +1 -0
- package/lib/module/ui/components/bottomSheet/index.js +5 -0
- package/lib/module/ui/components/bottomSheet/index.js.map +1 -0
- package/lib/module/ui/components/icon/OxyIcon.js +22 -0
- package/lib/module/ui/components/icon/OxyIcon.js.map +1 -0
- package/lib/module/ui/components/icon/index.js +4 -0
- package/lib/module/ui/components/icon/index.js.map +1 -0
- package/lib/module/ui/components/index.js +18 -0
- package/lib/module/ui/components/index.js.map +1 -0
- package/lib/module/ui/context/OxyContext.js +579 -0
- package/lib/module/ui/context/OxyContext.js.map +1 -0
- package/lib/module/ui/index.js +24 -0
- package/lib/module/ui/index.js.map +1 -0
- package/lib/module/ui/navigation/OxyRouter.js +257 -0
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -0
- package/lib/module/ui/navigation/types.js +4 -0
- package/lib/module/ui/navigation/types.js.map +1 -0
- package/lib/module/ui/screens/AccountCenterScreen.js +308 -0
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountManagementDemo.js +296 -0
- package/lib/module/ui/screens/AccountManagementDemo.js.map +1 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js +849 -0
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountSettingsScreen.js +837 -0
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -0
- package/lib/module/ui/screens/AccountSwitcherScreen.js +782 -0
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -0
- package/lib/module/ui/screens/AppInfoScreen.js +658 -0
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -0
- package/lib/module/ui/screens/BillingManagementScreen.js +631 -0
- package/lib/module/ui/screens/BillingManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/FileManagementScreen.js +2510 -0
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +1615 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -0
- package/lib/module/ui/screens/ProfileScreen.js +444 -0
- package/lib/module/ui/screens/ProfileScreen.js.map +1 -0
- package/lib/module/ui/screens/SessionManagementScreen.js +444 -0
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -0
- package/lib/module/ui/screens/SignInScreen.js +998 -0
- package/lib/module/ui/screens/SignInScreen.js.map +1 -0
- package/lib/module/ui/screens/SignUpScreen.js +932 -0
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +83 -0
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +358 -0
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +222 -0
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +142 -0
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +122 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +100 -0
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +1 -0
- package/lib/module/ui/styles/FONTS.md +126 -0
- package/lib/module/ui/styles/fonts.js +81 -0
- package/lib/module/ui/styles/fonts.js.map +1 -0
- package/lib/module/ui/styles/index.js +5 -0
- package/lib/module/ui/styles/index.js.map +1 -0
- package/lib/module/ui/styles/theme.js +114 -0
- package/lib/module/ui/styles/theme.js.map +1 -0
- package/lib/module/utils/deviceManager.js +167 -0
- package/lib/module/utils/deviceManager.js.map +1 -0
- package/lib/module/utils/index.js +4 -0
- package/lib/module/utils/index.js.map +1 -0
- package/lib/module/utils/polyfills.js +36 -0
- package/lib/module/utils/polyfills.js.map +1 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts +29 -0
- package/lib/typescript/assets/icons/OxyServices.d.ts.map +1 -0
- package/lib/typescript/constants/version.d.ts +14 -0
- package/lib/typescript/constants/version.d.ts.map +1 -0
- package/lib/typescript/core/index.d.ts +603 -0
- package/lib/typescript/core/index.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +20 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/lib/sonner.d.ts +6 -0
- package/lib/typescript/lib/sonner.d.ts.map +1 -0
- package/lib/typescript/models/interfaces.d.ts +179 -0
- package/lib/typescript/models/interfaces.d.ts.map +1 -0
- package/lib/typescript/models/secureSession.d.ts +27 -0
- package/lib/typescript/models/secureSession.d.ts.map +1 -0
- package/lib/typescript/node/index.d.ts +11 -0
- package/lib/typescript/node/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/Avatar.d.ts +62 -0
- package/lib/typescript/ui/components/Avatar.d.ts.map +1 -0
- package/lib/typescript/ui/components/FollowButton.d.ts +92 -0
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/FontLoader.d.ts +15 -0
- package/lib/typescript/ui/components/FontLoader.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts +17 -0
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +1 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts +19 -0
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyLogo.d.ts +29 -0
- package/lib/typescript/ui/components/OxyLogo.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts +12 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxySignInButton.d.ts +70 -0
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/ProfileCard.d.ts +20 -0
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +1 -0
- package/lib/typescript/ui/components/QuickActions.d.ts +15 -0
- package/lib/typescript/ui/components/QuickActions.d.ts.map +1 -0
- package/lib/typescript/ui/components/Section.d.ts +11 -0
- package/lib/typescript/ui/components/Section.d.ts.map +1 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts +9 -0
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +1 -0
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +4 -0
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts +10 -0
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts +3 -0
- package/lib/typescript/ui/components/icon/index.d.ts.map +1 -0
- package/lib/typescript/ui/components/index.d.ts +13 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -0
- package/lib/typescript/ui/context/OxyContext.d.ts +42 -0
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +15 -0
- package/lib/typescript/ui/index.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts +5 -0
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -0
- package/lib/typescript/ui/navigation/types.d.ts +116 -0
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +8 -0
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/ProfileScreen.d.ts +9 -0
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SignInScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SignUpScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +5 -0
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +1 -0
- package/lib/typescript/ui/styles/fonts.d.ts +21 -0
- package/lib/typescript/ui/styles/fonts.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +3 -0
- package/lib/typescript/ui/styles/index.d.ts.map +1 -0
- package/lib/typescript/ui/styles/theme.d.ts +68 -0
- package/lib/typescript/ui/styles/theme.d.ts.map +1 -0
- package/lib/typescript/utils/deviceManager.d.ts +66 -0
- package/lib/typescript/utils/deviceManager.d.ts.map +1 -0
- package/lib/typescript/utils/index.d.ts +3 -0
- package/lib/typescript/utils/index.d.ts.map +1 -0
- package/lib/typescript/utils/polyfills.d.ts +6 -0
- package/lib/typescript/utils/polyfills.d.ts.map +1 -0
- package/package.json +20 -4
|
@@ -0,0 +1,222 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useState, useMemo, useCallback } from 'react';
|
|
4
|
+
import { View, Text, StyleSheet, ScrollView, Platform, TouchableOpacity, TextInput, LayoutAnimation, UIManager } from 'react-native';
|
|
5
|
+
import { Ionicons } from '@expo/vector-icons';
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
if (Platform.OS === 'android' && UIManager.setLayoutAnimationEnabledExperimental) {
|
|
8
|
+
UIManager.setLayoutAnimationEnabledExperimental(true);
|
|
9
|
+
}
|
|
10
|
+
const FAQS = [{
|
|
11
|
+
q: 'What is karma?',
|
|
12
|
+
a: 'Karma is a recognition of your positive actions in the Oxy Ecosystem. It cannot be sent or received directly.'
|
|
13
|
+
}, {
|
|
14
|
+
q: 'How do I earn karma?',
|
|
15
|
+
a: 'By helping others, reporting bugs, contributing content, and participating in community events.'
|
|
16
|
+
}, {
|
|
17
|
+
q: 'Can I lose karma?',
|
|
18
|
+
a: 'Karma may be reduced for negative actions or breaking community rules.'
|
|
19
|
+
}, {
|
|
20
|
+
q: 'What can I do with karma?',
|
|
21
|
+
a: 'Unlock rewards, badges, and special features as you earn more karma.'
|
|
22
|
+
}, {
|
|
23
|
+
q: 'Can I transfer karma to others?',
|
|
24
|
+
a: 'No, karma cannot be sent or received. It is only earned by your actions.'
|
|
25
|
+
}, {
|
|
26
|
+
q: 'How do I get support?',
|
|
27
|
+
a: 'Contact Oxy support via the app or website for any karma-related questions.'
|
|
28
|
+
}];
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* KarmaFAQScreen - Optimized for performance
|
|
32
|
+
*
|
|
33
|
+
* Performance optimizations implemented:
|
|
34
|
+
* - useMemo for theme calculations (only recalculates when theme changes)
|
|
35
|
+
* - useMemo for filtered FAQs (only recalculates when search changes)
|
|
36
|
+
* - useCallback for event handlers to prevent unnecessary re-renders
|
|
37
|
+
* - React.memo wrapper to prevent re-renders when props haven't changed
|
|
38
|
+
*/
|
|
39
|
+
const KarmaFAQScreen = ({
|
|
40
|
+
goBack,
|
|
41
|
+
theme
|
|
42
|
+
}) => {
|
|
43
|
+
const [expanded, setExpanded] = useState(0);
|
|
44
|
+
const [search, setSearch] = useState('');
|
|
45
|
+
|
|
46
|
+
// Memoize theme-related calculations to prevent unnecessary recalculations
|
|
47
|
+
const themeStyles = useMemo(() => {
|
|
48
|
+
const isDarkTheme = theme === 'dark';
|
|
49
|
+
return {
|
|
50
|
+
isDarkTheme,
|
|
51
|
+
backgroundColor: isDarkTheme ? '#121212' : '#FFFFFF',
|
|
52
|
+
textColor: isDarkTheme ? '#FFFFFF' : '#000000',
|
|
53
|
+
cardColor: isDarkTheme ? '#23232b' : '#f7f7fa',
|
|
54
|
+
primaryColor: '#d169e5',
|
|
55
|
+
inputBg: isDarkTheme ? '#23232b' : '#f2f2f7',
|
|
56
|
+
inputBorder: isDarkTheme ? '#444' : '#e0e0e0'
|
|
57
|
+
};
|
|
58
|
+
}, [theme]);
|
|
59
|
+
|
|
60
|
+
// Memoize filtered FAQs to prevent filtering on every render
|
|
61
|
+
const filteredFaqs = useMemo(() => {
|
|
62
|
+
if (!search.trim()) return FAQS;
|
|
63
|
+
const searchLower = search.toLowerCase();
|
|
64
|
+
return FAQS.filter(faq => faq.q.toLowerCase().includes(searchLower) || faq.a.toLowerCase().includes(searchLower));
|
|
65
|
+
}, [search]);
|
|
66
|
+
|
|
67
|
+
// Memoize toggle handler to prevent recreation on every render
|
|
68
|
+
const handleToggle = useCallback(idx => {
|
|
69
|
+
LayoutAnimation.configureNext(LayoutAnimation.Presets.easeInEaseOut);
|
|
70
|
+
setExpanded(prev => prev === idx ? null : idx);
|
|
71
|
+
}, []);
|
|
72
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
73
|
+
style: [styles.container, {
|
|
74
|
+
backgroundColor: themeStyles.backgroundColor
|
|
75
|
+
}],
|
|
76
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
77
|
+
style: [styles.title, {
|
|
78
|
+
color: themeStyles.textColor
|
|
79
|
+
}],
|
|
80
|
+
children: "Karma FAQ"
|
|
81
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
82
|
+
style: [styles.searchBar, {
|
|
83
|
+
backgroundColor: themeStyles.inputBg,
|
|
84
|
+
borderColor: themeStyles.inputBorder
|
|
85
|
+
}],
|
|
86
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
87
|
+
name: "search-outline",
|
|
88
|
+
size: 20,
|
|
89
|
+
color: themeStyles.primaryColor,
|
|
90
|
+
style: {
|
|
91
|
+
marginRight: 8
|
|
92
|
+
}
|
|
93
|
+
}), /*#__PURE__*/_jsx(TextInput, {
|
|
94
|
+
style: [styles.searchInput, {
|
|
95
|
+
color: themeStyles.textColor
|
|
96
|
+
}],
|
|
97
|
+
placeholder: "Search FAQ...",
|
|
98
|
+
placeholderTextColor: themeStyles.isDarkTheme ? '#aaa' : '#888',
|
|
99
|
+
value: search,
|
|
100
|
+
onChangeText: setSearch,
|
|
101
|
+
returnKeyType: "search"
|
|
102
|
+
})]
|
|
103
|
+
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
104
|
+
contentContainerStyle: styles.contentContainer,
|
|
105
|
+
keyboardShouldPersistTaps: "handled",
|
|
106
|
+
children: [filteredFaqs.length === 0 ? /*#__PURE__*/_jsx(Text, {
|
|
107
|
+
style: [styles.noResults, {
|
|
108
|
+
color: themeStyles.textColor
|
|
109
|
+
}],
|
|
110
|
+
children: "No results found."
|
|
111
|
+
}) : filteredFaqs.map((item, idx) => {
|
|
112
|
+
const isOpen = expanded === idx;
|
|
113
|
+
return /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
114
|
+
style: [styles.card, {
|
|
115
|
+
backgroundColor: themeStyles.cardColor,
|
|
116
|
+
shadowColor: themeStyles.isDarkTheme ? '#000' : '#d169e5'
|
|
117
|
+
}],
|
|
118
|
+
activeOpacity: 0.95,
|
|
119
|
+
onPress: () => handleToggle(idx),
|
|
120
|
+
children: [/*#__PURE__*/_jsxs(View, {
|
|
121
|
+
style: styles.questionRow,
|
|
122
|
+
children: [/*#__PURE__*/_jsx(Ionicons, {
|
|
123
|
+
name: isOpen ? 'chevron-down' : 'chevron-forward',
|
|
124
|
+
size: 22,
|
|
125
|
+
color: themeStyles.primaryColor,
|
|
126
|
+
style: {
|
|
127
|
+
marginRight: 8
|
|
128
|
+
}
|
|
129
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
130
|
+
style: [styles.question, {
|
|
131
|
+
color: themeStyles.primaryColor
|
|
132
|
+
}],
|
|
133
|
+
children: item.q
|
|
134
|
+
})]
|
|
135
|
+
}), isOpen && /*#__PURE__*/_jsx(Text, {
|
|
136
|
+
style: [styles.answer, {
|
|
137
|
+
color: themeStyles.textColor
|
|
138
|
+
}],
|
|
139
|
+
children: item.a
|
|
140
|
+
})]
|
|
141
|
+
}, idx);
|
|
142
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
143
|
+
style: [styles.paragraph, {
|
|
144
|
+
color: themeStyles.textColor,
|
|
145
|
+
marginTop: 32,
|
|
146
|
+
textAlign: 'center'
|
|
147
|
+
}],
|
|
148
|
+
children: "Still have questions? Contact support!"
|
|
149
|
+
})]
|
|
150
|
+
})]
|
|
151
|
+
});
|
|
152
|
+
};
|
|
153
|
+
const styles = StyleSheet.create({
|
|
154
|
+
container: {
|
|
155
|
+
flex: 1
|
|
156
|
+
},
|
|
157
|
+
title: {
|
|
158
|
+
fontFamily: Platform.OS === 'web' ? 'Phudu' : 'Phudu-Bold',
|
|
159
|
+
fontWeight: Platform.OS === 'web' ? 'bold' : undefined,
|
|
160
|
+
fontSize: 38,
|
|
161
|
+
margin: 24,
|
|
162
|
+
marginBottom: 12,
|
|
163
|
+
textAlign: 'center'
|
|
164
|
+
},
|
|
165
|
+
searchBar: {
|
|
166
|
+
flexDirection: 'row',
|
|
167
|
+
alignItems: 'center',
|
|
168
|
+
borderRadius: 16,
|
|
169
|
+
borderWidth: 1,
|
|
170
|
+
marginHorizontal: 24,
|
|
171
|
+
marginBottom: 12,
|
|
172
|
+
paddingHorizontal: 12,
|
|
173
|
+
height: 44
|
|
174
|
+
},
|
|
175
|
+
searchInput: {
|
|
176
|
+
flex: 1,
|
|
177
|
+
fontSize: 16,
|
|
178
|
+
height: 44
|
|
179
|
+
},
|
|
180
|
+
contentContainer: {
|
|
181
|
+
padding: 24,
|
|
182
|
+
paddingBottom: 40
|
|
183
|
+
},
|
|
184
|
+
card: {
|
|
185
|
+
borderRadius: 18,
|
|
186
|
+
padding: 20,
|
|
187
|
+
marginBottom: 18,
|
|
188
|
+
shadowOpacity: 0.08,
|
|
189
|
+
shadowOffset: {
|
|
190
|
+
width: 0,
|
|
191
|
+
height: 2
|
|
192
|
+
},
|
|
193
|
+
shadowRadius: 8,
|
|
194
|
+
elevation: 2
|
|
195
|
+
},
|
|
196
|
+
questionRow: {
|
|
197
|
+
flexDirection: 'row',
|
|
198
|
+
alignItems: 'center',
|
|
199
|
+
marginBottom: 8
|
|
200
|
+
},
|
|
201
|
+
question: {
|
|
202
|
+
fontSize: 17,
|
|
203
|
+
fontWeight: 'bold'
|
|
204
|
+
},
|
|
205
|
+
answer: {
|
|
206
|
+
fontSize: 16,
|
|
207
|
+
lineHeight: 22,
|
|
208
|
+
marginTop: 8
|
|
209
|
+
},
|
|
210
|
+
paragraph: {
|
|
211
|
+
fontSize: 16,
|
|
212
|
+
marginBottom: 12
|
|
213
|
+
},
|
|
214
|
+
noResults: {
|
|
215
|
+
fontSize: 16,
|
|
216
|
+
marginTop: 32,
|
|
217
|
+
textAlign: 'center',
|
|
218
|
+
opacity: 0.7
|
|
219
|
+
}
|
|
220
|
+
});
|
|
221
|
+
export default /*#__PURE__*/React.memo(KarmaFAQScreen);
|
|
222
|
+
//# sourceMappingURL=KarmaFAQScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useState","useMemo","useCallback","View","Text","StyleSheet","ScrollView","Platform","TouchableOpacity","TextInput","LayoutAnimation","UIManager","Ionicons","jsx","_jsx","jsxs","_jsxs","OS","setLayoutAnimationEnabledExperimental","FAQS","q","a","KarmaFAQScreen","goBack","theme","expanded","setExpanded","search","setSearch","themeStyles","isDarkTheme","backgroundColor","textColor","cardColor","primaryColor","inputBg","inputBorder","filteredFaqs","trim","searchLower","toLowerCase","filter","faq","includes","handleToggle","idx","configureNext","Presets","easeInEaseOut","prev","style","styles","container","children","title","color","searchBar","borderColor","name","size","marginRight","searchInput","placeholder","placeholderTextColor","value","onChangeText","returnKeyType","contentContainerStyle","contentContainer","keyboardShouldPersistTaps","length","noResults","map","item","isOpen","card","shadowColor","activeOpacity","onPress","questionRow","question","answer","paragraph","marginTop","textAlign","create","flex","fontFamily","fontWeight","undefined","fontSize","margin","marginBottom","flexDirection","alignItems","borderRadius","borderWidth","marginHorizontal","paddingHorizontal","height","padding","paddingBottom","shadowOpacity","shadowOffset","width","shadowRadius","elevation","lineHeight","opacity","memo"],"sourceRoot":"../../../../../src","sources":["ui/screens/karma/KarmaFAQScreen.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,QAAQ,EAAEC,OAAO,EAAEC,WAAW,QAAQ,OAAO;AAC7D,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,UAAU,EAAEC,QAAQ,EAAEC,gBAAgB,EAAEC,SAAS,EAAEC,eAAe,EAAEC,SAAS,QAAQ,cAAc;AAEpI,SAASC,QAAQ,QAAQ,oBAAoB;AAAC,SAAAC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EAAE;IACZE,YAAY,EAAE;EAClB,CAAC;EACDrB,SAAS,EAAE;IACPmB,QAAQ,EAAE,EAAE;IACZP,SAAS,EAAE,EAAE;IACbC,SAAS,EAAE,QAAQ;IACnBwB,OAAO,EAAE;EACb;AACJ,CAAC,CAAC;AAEF,4BAAe7G,KAAK,CAAC8G,IAAI,CAACvF,cAAc,CAAC","ignoreList":[]}
|
|
@@ -0,0 +1,142 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { View, Text, StyleSheet, ScrollView, ActivityIndicator, TouchableOpacity } from 'react-native';
|
|
5
|
+
import { useOxy } from "../../context/OxyContext.js";
|
|
6
|
+
import Avatar from "../../components/Avatar.js";
|
|
7
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
8
|
+
const KarmaLeaderboardScreen = ({
|
|
9
|
+
goBack,
|
|
10
|
+
theme,
|
|
11
|
+
navigate
|
|
12
|
+
}) => {
|
|
13
|
+
const {
|
|
14
|
+
oxyServices
|
|
15
|
+
} = useOxy();
|
|
16
|
+
const [leaderboard, setLeaderboard] = useState([]);
|
|
17
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
18
|
+
const [error, setError] = useState(null);
|
|
19
|
+
const isDarkTheme = theme === 'dark';
|
|
20
|
+
const backgroundColor = isDarkTheme ? '#121212' : '#FFFFFF';
|
|
21
|
+
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
|
|
22
|
+
const primaryColor = '#d169e5';
|
|
23
|
+
useEffect(() => {
|
|
24
|
+
setIsLoading(true);
|
|
25
|
+
setError(null);
|
|
26
|
+
oxyServices.getKarmaLeaderboard().then(data => setLeaderboard(Array.isArray(data) ? data : [])).catch(err => setError(err.message || 'Failed to load leaderboard')).finally(() => setIsLoading(false));
|
|
27
|
+
}, [oxyServices]);
|
|
28
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
29
|
+
style: [styles.container, {
|
|
30
|
+
backgroundColor
|
|
31
|
+
}],
|
|
32
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
33
|
+
style: [styles.title, {
|
|
34
|
+
color: textColor
|
|
35
|
+
}],
|
|
36
|
+
children: "Karma Leaderboard"
|
|
37
|
+
}), isLoading ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
38
|
+
size: "large",
|
|
39
|
+
color: primaryColor,
|
|
40
|
+
style: {
|
|
41
|
+
marginTop: 40
|
|
42
|
+
}
|
|
43
|
+
}) : error ? /*#__PURE__*/_jsx(Text, {
|
|
44
|
+
style: [styles.error, {
|
|
45
|
+
color: '#D32F2F'
|
|
46
|
+
}],
|
|
47
|
+
children: error
|
|
48
|
+
}) : /*#__PURE__*/_jsx(ScrollView, {
|
|
49
|
+
contentContainerStyle: styles.listContainer,
|
|
50
|
+
children: leaderboard.length === 0 ? /*#__PURE__*/_jsx(Text, {
|
|
51
|
+
style: [styles.placeholder, {
|
|
52
|
+
color: textColor
|
|
53
|
+
}],
|
|
54
|
+
children: "No leaderboard data."
|
|
55
|
+
}) : leaderboard.map((entry, idx) => /*#__PURE__*/_jsxs(TouchableOpacity, {
|
|
56
|
+
style: [styles.row, idx < 3 && {
|
|
57
|
+
backgroundColor: '#f7eaff'
|
|
58
|
+
}],
|
|
59
|
+
onPress: () => navigate && navigate('KarmaProfile', {
|
|
60
|
+
userId: entry.userId,
|
|
61
|
+
username: entry.username
|
|
62
|
+
}),
|
|
63
|
+
activeOpacity: 0.7,
|
|
64
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
65
|
+
style: [styles.rank, {
|
|
66
|
+
color: primaryColor
|
|
67
|
+
}],
|
|
68
|
+
children: idx + 1
|
|
69
|
+
}), /*#__PURE__*/_jsx(Avatar, {
|
|
70
|
+
name: entry.username || 'User',
|
|
71
|
+
size: 40,
|
|
72
|
+
theme: theme,
|
|
73
|
+
style: styles.avatar
|
|
74
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
75
|
+
style: [styles.username, {
|
|
76
|
+
color: textColor
|
|
77
|
+
}],
|
|
78
|
+
children: entry.username || entry.userId
|
|
79
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
80
|
+
style: [styles.karma, {
|
|
81
|
+
color: primaryColor
|
|
82
|
+
}],
|
|
83
|
+
children: entry.total
|
|
84
|
+
})]
|
|
85
|
+
}, entry.userId))
|
|
86
|
+
})]
|
|
87
|
+
});
|
|
88
|
+
};
|
|
89
|
+
const styles = StyleSheet.create({
|
|
90
|
+
container: {
|
|
91
|
+
flex: 1
|
|
92
|
+
},
|
|
93
|
+
title: {
|
|
94
|
+
fontSize: 24,
|
|
95
|
+
fontWeight: 'bold',
|
|
96
|
+
margin: 24,
|
|
97
|
+
textAlign: 'center'
|
|
98
|
+
},
|
|
99
|
+
listContainer: {
|
|
100
|
+
paddingBottom: 40
|
|
101
|
+
},
|
|
102
|
+
row: {
|
|
103
|
+
flexDirection: 'row',
|
|
104
|
+
alignItems: 'center',
|
|
105
|
+
paddingVertical: 12,
|
|
106
|
+
paddingHorizontal: 20,
|
|
107
|
+
borderBottomWidth: 1,
|
|
108
|
+
borderColor: '#eee'
|
|
109
|
+
},
|
|
110
|
+
rank: {
|
|
111
|
+
fontSize: 20,
|
|
112
|
+
width: 32,
|
|
113
|
+
textAlign: 'center',
|
|
114
|
+
fontWeight: 'bold'
|
|
115
|
+
},
|
|
116
|
+
avatar: {
|
|
117
|
+
marginHorizontal: 8
|
|
118
|
+
},
|
|
119
|
+
username: {
|
|
120
|
+
flex: 1,
|
|
121
|
+
fontSize: 16,
|
|
122
|
+
marginLeft: 8
|
|
123
|
+
},
|
|
124
|
+
karma: {
|
|
125
|
+
fontSize: 18,
|
|
126
|
+
fontWeight: 'bold',
|
|
127
|
+
marginLeft: 12
|
|
128
|
+
},
|
|
129
|
+
placeholder: {
|
|
130
|
+
fontSize: 16,
|
|
131
|
+
color: '#888',
|
|
132
|
+
textAlign: 'center',
|
|
133
|
+
marginTop: 40
|
|
134
|
+
},
|
|
135
|
+
error: {
|
|
136
|
+
fontSize: 16,
|
|
137
|
+
textAlign: 'center',
|
|
138
|
+
marginTop: 40
|
|
139
|
+
}
|
|
140
|
+
});
|
|
141
|
+
export default KarmaLeaderboardScreen;
|
|
142
|
+
//# sourceMappingURL=KarmaLeaderboardScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","View","Text","StyleSheet","ScrollView","ActivityIndicator","TouchableOpacity","useOxy","Avatar","jsx","_jsx","jsxs","_jsxs","KarmaLeaderboardScreen","goBack","theme","navigate","oxyServices","leaderboard","setLeaderboard","isLoading","setIsLoading","error","setError","isDarkTheme","backgroundColor","textColor","primaryColor","getKarmaLeaderboard","then","data","Array","isArray","catch","err","message","finally","style","styles","container","children","title","color","size","marginTop","contentContainerStyle","listContainer","length","placeholder","map","entry","idx","row","onPress","userId","username","activeOpacity","rank","name","avatar","karma","total","create","flex","fontSize","fontWeight","margin","textAlign","paddingBottom","flexDirection","alignItems","paddingVertical","paddingHorizontal","borderBottomWidth","borderColor","width","marginHorizontal","marginLeft"],"sourceRoot":"../../../../../src","sources":["ui/screens/karma/KarmaLeaderboardScreen.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,UAAU,EAAEC,iBAAiB,EAAEC,gBAAgB,QAAQ,cAAc;AAEtG,SAASC,MAAM,QAAQ,6BAA0B;AACjD,OAAOC,MAAM,MAAM,4BAAyB;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAE7C,MAAMC,sBAAiD,GAAGA,CAAC;EAAEC,MAAM;EAAEC,KAAK;EAAEC;AAAS,CAAC,KAAK;EACvF,MAAM;IAAEC;EAAY,CAAC,GAAGV,MAAM,CAAC,CAAC;EAChC,MAAM,CAACW,WAAW,EAAEC,cAAc,CAAC,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EAAE;IAAEI,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE,MAAM;IAAEY,UAAU,EAAE;EAAG,CAAC;EAC3D7B,WAAW,EAAE;IAAEgB,QAAQ,EAAE,EAAE;IAAEtB,KAAK,EAAE,MAAM;IAAEyB,SAAS,EAAE,QAAQ;IAAEvB,SAAS,EAAE;EAAG,CAAC;EAChFtB,KAAK,EAAE;IAAE0C,QAAQ,EAAE,EAAE;IAAEG,SAAS,EAAE,QAAQ;IAAEvB,SAAS,EAAE;EAAG;AAC9D,CAAC,CAAC;AAEF,eAAe/B,sBAAsB","ignoreList":[]}
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React from 'react';
|
|
4
|
+
import { View, Text, StyleSheet, ScrollView } from 'react-native';
|
|
5
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
6
|
+
const KarmaRewardsScreen = ({
|
|
7
|
+
goBack,
|
|
8
|
+
theme
|
|
9
|
+
}) => {
|
|
10
|
+
const isDarkTheme = theme === 'dark';
|
|
11
|
+
const backgroundColor = isDarkTheme ? '#121212' : '#FFFFFF';
|
|
12
|
+
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
|
|
13
|
+
const primaryColor = '#d169e5';
|
|
14
|
+
|
|
15
|
+
// Placeholder: In a real app, fetch rewards from API
|
|
16
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
17
|
+
style: [styles.container, {
|
|
18
|
+
backgroundColor
|
|
19
|
+
}],
|
|
20
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
21
|
+
style: [styles.title, {
|
|
22
|
+
color: textColor
|
|
23
|
+
}],
|
|
24
|
+
children: "Karma Rewards"
|
|
25
|
+
}), /*#__PURE__*/_jsxs(ScrollView, {
|
|
26
|
+
contentContainerStyle: styles.contentContainer,
|
|
27
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
28
|
+
style: [styles.paragraph, {
|
|
29
|
+
color: textColor
|
|
30
|
+
}],
|
|
31
|
+
children: "Unlock special features and recognition by earning karma!"
|
|
32
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
33
|
+
style: styles.rewardBox,
|
|
34
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
35
|
+
style: [styles.rewardTitle, {
|
|
36
|
+
color: primaryColor
|
|
37
|
+
}],
|
|
38
|
+
children: "\uD83C\uDF89 Early Access"
|
|
39
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
40
|
+
style: [styles.rewardDesc, {
|
|
41
|
+
color: textColor
|
|
42
|
+
}],
|
|
43
|
+
children: "Get early access to new features with 100+ karma."
|
|
44
|
+
})]
|
|
45
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
46
|
+
style: styles.rewardBox,
|
|
47
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
48
|
+
style: [styles.rewardTitle, {
|
|
49
|
+
color: primaryColor
|
|
50
|
+
}],
|
|
51
|
+
children: "\uD83C\uDFC5 Community Badge"
|
|
52
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
53
|
+
style: [styles.rewardDesc, {
|
|
54
|
+
color: textColor
|
|
55
|
+
}],
|
|
56
|
+
children: "Earn a special badge for 500+ karma."
|
|
57
|
+
})]
|
|
58
|
+
}), /*#__PURE__*/_jsxs(View, {
|
|
59
|
+
style: styles.rewardBox,
|
|
60
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
61
|
+
style: [styles.rewardTitle, {
|
|
62
|
+
color: primaryColor
|
|
63
|
+
}],
|
|
64
|
+
children: "\uD83C\uDF1F Featured Member"
|
|
65
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
66
|
+
style: [styles.rewardDesc, {
|
|
67
|
+
color: textColor
|
|
68
|
+
}],
|
|
69
|
+
children: "Be featured in the community for 1000+ karma."
|
|
70
|
+
})]
|
|
71
|
+
}), /*#__PURE__*/_jsx(Text, {
|
|
72
|
+
style: [styles.paragraph, {
|
|
73
|
+
color: textColor,
|
|
74
|
+
marginTop: 24
|
|
75
|
+
}],
|
|
76
|
+
children: "More rewards coming soon!"
|
|
77
|
+
})]
|
|
78
|
+
})]
|
|
79
|
+
});
|
|
80
|
+
};
|
|
81
|
+
const styles = StyleSheet.create({
|
|
82
|
+
container: {
|
|
83
|
+
flex: 1
|
|
84
|
+
},
|
|
85
|
+
title: {
|
|
86
|
+
fontSize: 24,
|
|
87
|
+
fontWeight: 'bold',
|
|
88
|
+
margin: 24,
|
|
89
|
+
textAlign: 'center'
|
|
90
|
+
},
|
|
91
|
+
contentContainer: {
|
|
92
|
+
padding: 24
|
|
93
|
+
},
|
|
94
|
+
rewardBox: {
|
|
95
|
+
backgroundColor: '#f7eaff',
|
|
96
|
+
borderRadius: 16,
|
|
97
|
+
padding: 18,
|
|
98
|
+
marginBottom: 18,
|
|
99
|
+
shadowColor: '#000',
|
|
100
|
+
shadowOpacity: 0.04,
|
|
101
|
+
shadowOffset: {
|
|
102
|
+
width: 0,
|
|
103
|
+
height: 1
|
|
104
|
+
},
|
|
105
|
+
shadowRadius: 4,
|
|
106
|
+
elevation: 1
|
|
107
|
+
},
|
|
108
|
+
rewardTitle: {
|
|
109
|
+
fontSize: 18,
|
|
110
|
+
fontWeight: 'bold',
|
|
111
|
+
marginBottom: 6
|
|
112
|
+
},
|
|
113
|
+
rewardDesc: {
|
|
114
|
+
fontSize: 15
|
|
115
|
+
},
|
|
116
|
+
paragraph: {
|
|
117
|
+
fontSize: 16,
|
|
118
|
+
marginBottom: 12
|
|
119
|
+
}
|
|
120
|
+
});
|
|
121
|
+
export default KarmaRewardsScreen;
|
|
122
|
+
//# sourceMappingURL=KarmaRewardsScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","View","Text","StyleSheet","ScrollView","jsx","_jsx","jsxs","_jsxs","KarmaRewardsScreen","goBack","theme","isDarkTheme","backgroundColor","textColor","primaryColor","style","styles","container","children","title","color","contentContainerStyle","contentContainer","paragraph","rewardBox","rewardTitle","rewardDesc","marginTop","create","flex","fontSize","fontWeight","margin","textAlign","padding","borderRadius","marginBottom","shadowColor","shadowOpacity","shadowOffset","width","height","shadowRadius","elevation"],"sourceRoot":"../../../../../src","sources":["ui/screens/karma/KarmaRewardsScreen.tsx"],"mappings":";;AAAA,OAAOA,KAAK,MAAM,OAAO;AACzB,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,UAAU,QAAQ,cAAc;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAGlE,MAAMC,kBAA6C,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAAM,CAAC,KAAK;EACzE,MAAMC,WAAW,GAAGD,KAAK,KAAK,MAAM;EACpC,MAAME,eAAe,GAAGD,WAAW,GAAG,SAAS,GAAG,SAAS;EAC3D,MAAME,SAAS,GAAGF,WAAW,GAAG,SAAS,GAAG,SAAS;EACrD,MAAMG,YAAY,GAAG,SAAS;;EAE9B;EACA,oBACIP,KAAA,CAACP,IAAI;IAACe,KAAK,EAAE,CAACC,MAAM,CAACC,SAAS,EAAE;MAAEL;IAAgB,CAAC,CAAE;IAAAM,QAAA,gBACjDb,IAAA,CAACJ,IAAI;MAACc,KAAK,EAAE,CAACC,MAAM,CAACG,KAAK,EAAE;QAAEC,KAAK,EAAEP;MAAU,CAAC,CAAE;MAAAK,QAAA,EAAC;IAAa,CAAM,CAAC,eACvEX,KAAA,CAACJ,UAAU;MAACkB,qBAAqB,EAAEL,MAAM,CAACM,gBAAiB;MAAAJ,QAAA,gBACvDb,IAAA,CAACJ,IAAI;QAACc,KAAK,EAAE,CAACC,MAAM,CAACO,SAAS,EAAE;UAAEH,KAAK,EAAEP;QAAU,CAAC,CAAE;QAAAK,QAAA,EAAC;MAAyD,CAAM,CAAC,eACvHX,KAAA,CAACP,IAAI;QAACe,KAAK,EAAEC,MAAM,CAACQ,SAAU;QAAAN,QAAA,gBAC1Bb,IAAA,CAACJ,IAAI;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E;QAAAT,QAAA,EAAC;MAAyB,CAAM,CAAC;IAAA,CAC9F,CAAC;EAAA,CACX,CAAC;AAEf,CAAC;AAED,MAAMF,MAAM,GAAGd,UAAU,CAAC0B,MAAM,CAAC;EAC7BX,SAAS,EAAE;IAAEY,IAAI,EAAE;EAAE,CAAC;EACtBV,KAAK,EAAE;IAAEW,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE,MAAM;IAAEC,MAAM,EAAE,EAAE;IAAEC,SAAS,EAAE;EAAS,CAAC;EAC5EX,gBAAgB,EAAE;IAAEY,OAAO,EAAE;EAAG,CAAC;EACjCV,SAAS,EAAE;IACPZ,eAAe,EAAE,SAAS;IAC1BuB,YAAY,EAAE,EAAE;IAChBD,OAAO,EAAE,EAAE;IACXE,YAAY,EAAE,EAAE;IAChBC,WAAW,EAAE,MAAM;IACnBC,aAAa,EAAE,IAAI;IACnBC,YAAY,EAAE;MAAEC,KAAK,EAAE,CAAC;MAAEC,MAAM,EAAE;IAAE,CAAC;IACrCC,YAAY,EAAE,CAAC;IACfC,SAAS,EAAE;EACf,CAAC;EACDlB,WAAW,EAAE;IAAEK,QAAQ,EAAE,EAAE;IAAEC,UAAU,EAAE,MAAM;IAAEK,YAAY,EAAE;EAAE,CAAC;EAClEV,UAAU,EAAE;IAAEI,QAAQ,EAAE;EAAG,CAAC;EAC5BP,SAAS,EAAE;IAAEO,QAAQ,EAAE,EAAE;IAAEM,YAAY,EAAE;EAAG;AAChD,CAAC,CAAC;AAEF,eAAe5B,kBAAkB","ignoreList":[]}
|
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import React, { useEffect, useState } from 'react';
|
|
4
|
+
import { View, Text, StyleSheet, ScrollView, ActivityIndicator } from 'react-native';
|
|
5
|
+
import { useOxy } from "../../context/OxyContext.js";
|
|
6
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
7
|
+
const KarmaRulesScreen = ({
|
|
8
|
+
goBack,
|
|
9
|
+
theme
|
|
10
|
+
}) => {
|
|
11
|
+
const {
|
|
12
|
+
oxyServices
|
|
13
|
+
} = useOxy();
|
|
14
|
+
const [rules, setRules] = useState([]);
|
|
15
|
+
const [isLoading, setIsLoading] = useState(true);
|
|
16
|
+
const [error, setError] = useState(null);
|
|
17
|
+
const isDarkTheme = theme === 'dark';
|
|
18
|
+
const backgroundColor = isDarkTheme ? '#121212' : '#FFFFFF';
|
|
19
|
+
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
|
|
20
|
+
const primaryColor = '#d169e5';
|
|
21
|
+
useEffect(() => {
|
|
22
|
+
setIsLoading(true);
|
|
23
|
+
setError(null);
|
|
24
|
+
oxyServices.getKarmaRules().then(data => setRules(Array.isArray(data) ? data : [])).catch(err => setError(err.message || 'Failed to load rules')).finally(() => setIsLoading(false));
|
|
25
|
+
}, [oxyServices]);
|
|
26
|
+
return /*#__PURE__*/_jsxs(View, {
|
|
27
|
+
style: [styles.container, {
|
|
28
|
+
backgroundColor
|
|
29
|
+
}],
|
|
30
|
+
children: [/*#__PURE__*/_jsx(Text, {
|
|
31
|
+
style: [styles.title, {
|
|
32
|
+
color: textColor
|
|
33
|
+
}],
|
|
34
|
+
children: "Karma Rules"
|
|
35
|
+
}), isLoading ? /*#__PURE__*/_jsx(ActivityIndicator, {
|
|
36
|
+
size: "large",
|
|
37
|
+
color: primaryColor,
|
|
38
|
+
style: {
|
|
39
|
+
marginTop: 40
|
|
40
|
+
}
|
|
41
|
+
}) : error ? /*#__PURE__*/_jsx(Text, {
|
|
42
|
+
style: [styles.error, {
|
|
43
|
+
color: '#D32F2F'
|
|
44
|
+
}],
|
|
45
|
+
children: error
|
|
46
|
+
}) : /*#__PURE__*/_jsx(ScrollView, {
|
|
47
|
+
contentContainerStyle: styles.listContainer,
|
|
48
|
+
children: rules.length === 0 ? /*#__PURE__*/_jsx(Text, {
|
|
49
|
+
style: [styles.placeholder, {
|
|
50
|
+
color: textColor
|
|
51
|
+
}],
|
|
52
|
+
children: "No rules found."
|
|
53
|
+
}) : rules.map((rule, idx) => /*#__PURE__*/_jsx(View, {
|
|
54
|
+
style: styles.ruleRow,
|
|
55
|
+
children: /*#__PURE__*/_jsx(Text, {
|
|
56
|
+
style: [styles.ruleDesc, {
|
|
57
|
+
color: textColor
|
|
58
|
+
}],
|
|
59
|
+
children: rule.description
|
|
60
|
+
})
|
|
61
|
+
}, rule.id || idx))
|
|
62
|
+
})]
|
|
63
|
+
});
|
|
64
|
+
};
|
|
65
|
+
const styles = StyleSheet.create({
|
|
66
|
+
container: {
|
|
67
|
+
flex: 1
|
|
68
|
+
},
|
|
69
|
+
title: {
|
|
70
|
+
fontSize: 24,
|
|
71
|
+
fontWeight: 'bold',
|
|
72
|
+
margin: 24,
|
|
73
|
+
textAlign: 'center'
|
|
74
|
+
},
|
|
75
|
+
listContainer: {
|
|
76
|
+
paddingBottom: 40
|
|
77
|
+
},
|
|
78
|
+
ruleRow: {
|
|
79
|
+
paddingVertical: 14,
|
|
80
|
+
paddingHorizontal: 24,
|
|
81
|
+
borderBottomWidth: 1,
|
|
82
|
+
borderColor: '#eee'
|
|
83
|
+
},
|
|
84
|
+
ruleDesc: {
|
|
85
|
+
fontSize: 16
|
|
86
|
+
},
|
|
87
|
+
placeholder: {
|
|
88
|
+
fontSize: 16,
|
|
89
|
+
color: '#888',
|
|
90
|
+
textAlign: 'center',
|
|
91
|
+
marginTop: 40
|
|
92
|
+
},
|
|
93
|
+
error: {
|
|
94
|
+
fontSize: 16,
|
|
95
|
+
textAlign: 'center',
|
|
96
|
+
marginTop: 40
|
|
97
|
+
}
|
|
98
|
+
});
|
|
99
|
+
export default KarmaRulesScreen;
|
|
100
|
+
//# sourceMappingURL=KarmaRulesScreen.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["React","useEffect","useState","View","Text","StyleSheet","ScrollView","ActivityIndicator","useOxy","jsx","_jsx","jsxs","_jsxs","KarmaRulesScreen","goBack","theme","oxyServices","rules","setRules","isLoading","setIsLoading","error","setError","isDarkTheme","backgroundColor","textColor","primaryColor","getKarmaRules","then","data","Array","isArray","catch","err","message","finally","style","styles","container","children","title","color","size","marginTop","contentContainerStyle","listContainer","length","placeholder","map","rule","idx","ruleRow","ruleDesc","description","id","create","flex","fontSize","fontWeight","margin","textAlign","paddingBottom","paddingVertical","paddingHorizontal","borderBottomWidth","borderColor"],"sourceRoot":"../../../../../src","sources":["ui/screens/karma/KarmaRulesScreen.tsx"],"mappings":";;AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,QAAQ,QAAQ,OAAO;AAClD,SAASC,IAAI,EAAEC,IAAI,EAAEC,UAAU,EAAEC,UAAU,EAAEC,iBAAiB,QAAQ,cAAc;AAEpF,SAASC,MAAM,QAAQ,6BAA0B;AAAC,SAAAC,GAAA,IAAAC,IAAA,EAAAC,IAAA,IAAAC,KAAA;AAElD,MAAMC,gBAA2C,GAAGA,CAAC;EAAEC,MAAM;EAAEC;AAAM,CAAC,KAAK;EACvE,MAAM;IAAEC;EAAY,CAAC,GAAGR,MAAM,CAAC,CAAC;EAChC,MAAM,CAACS,KAAK,EAAEC,QAAQ,CAAC,GAAGhB,QAAQ,CAAQ,EAAE,CAAC;EAC7C,MAAM,CAACiB,SAAS,EAAEC,YAAY,CAAC,GAAGlB,QAAQ,CAAC,IAAI,CAAC;EAChD,MAAM,CAACmB,KAAK,EAAEC,QAAQ,CAAC,GAAGpB,QAAQ,CAAgB,IAAI,CAAC;EAEvD,MAAMqB,WAAW,GAAGR,KAAK,KAAK,MAAM;EACpC,MAAMS,eAAe,GAAGD,WAAW,GAAG,SAAS,GAAG,SAAS;EAC3D,MAAME,SAAS,GAAGF,WAAW,GAAG,SAAS,GAAG,SAAS;EACrD,MAAMG,YAAY,GAAG,SAAS;EAE9BzB,SAAS,CAAC,MAAM;IACZmB,YAAY,CAAC,IAAI,CAAC;IAClBE,QAAQ,CAAC,IAAI,CAAC;IACdN,WAAW,C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