@oxyhq/services 5.4.1 → 5.4.2
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/package.json +2 -2
- package/src/core/index.ts +68 -0
- package/src/ui/components/OxyProvider.tsx +5 -5
- package/src/ui/context/OxyContext.tsx +61 -41
- package/src/ui/screens/AccountOverviewScreen.tsx +44 -26
- package/src/ui/screens/AccountSettingsScreen.tsx +24 -18
- package/src/ui/screens/FileManagementScreen.tsx +246 -211
- package/src/ui/screens/SignInScreen.tsx +382 -326
- package/src/ui/screens/SignUpScreen.tsx +443 -273
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +50 -29
- package/lib/commonjs/assets/OxyLogo.svg +0 -1
- package/lib/commonjs/assets/assets/OxyLogo.svg +0 -1
- 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 +0 -67
- package/lib/commonjs/assets/assets/icons/logo_OxyServices.svg +0 -1
- 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 +0 -53
- package/lib/commonjs/assets/icons/OxyServices.js.map +0 -1
- package/lib/commonjs/assets/icons/logo_OxyServices.svg +0 -1
- package/lib/commonjs/constants/version.js +0 -28
- package/lib/commonjs/constants/version.js.map +0 -1
- package/lib/commonjs/core/index.js +0 -1578
- package/lib/commonjs/core/index.js.map +0 -1
- package/lib/commonjs/index.js +0 -160
- package/lib/commonjs/index.js.map +0 -1
- package/lib/commonjs/lib/sonner.js +0 -21
- package/lib/commonjs/lib/sonner.js.map +0 -1
- package/lib/commonjs/models/interfaces.js +0 -2
- package/lib/commonjs/models/interfaces.js.map +0 -1
- package/lib/commonjs/models/secureSession.js +0 -2
- package/lib/commonjs/models/secureSession.js.map +0 -1
- package/lib/commonjs/node/index.js +0 -54
- package/lib/commonjs/node/index.js.map +0 -1
- package/lib/commonjs/package.json +0 -1
- package/lib/commonjs/ui/components/Avatar.js +0 -98
- package/lib/commonjs/ui/components/Avatar.js.map +0 -1
- package/lib/commonjs/ui/components/FollowButton.js +0 -246
- package/lib/commonjs/ui/components/FollowButton.js.map +0 -1
- package/lib/commonjs/ui/components/FontLoader.js +0 -181
- package/lib/commonjs/ui/components/FontLoader.js.map +0 -1
- package/lib/commonjs/ui/components/GroupedItem.js +0 -109
- package/lib/commonjs/ui/components/GroupedItem.js.map +0 -1
- package/lib/commonjs/ui/components/GroupedSection.js +0 -33
- package/lib/commonjs/ui/components/GroupedSection.js.map +0 -1
- package/lib/commonjs/ui/components/OxyLogo.js +0 -56
- package/lib/commonjs/ui/components/OxyLogo.js.map +0 -1
- package/lib/commonjs/ui/components/OxyProvider.js +0 -517
- package/lib/commonjs/ui/components/OxyProvider.js.map +0 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +0 -178
- package/lib/commonjs/ui/components/OxySignInButton.js.map +0 -1
- package/lib/commonjs/ui/components/ProfileCard.js +0 -124
- package/lib/commonjs/ui/components/ProfileCard.js.map +0 -1
- package/lib/commonjs/ui/components/QuickActions.js +0 -87
- package/lib/commonjs/ui/components/QuickActions.js.map +0 -1
- package/lib/commonjs/ui/components/Section.js +0 -36
- package/lib/commonjs/ui/components/Section.js.map +0 -1
- package/lib/commonjs/ui/components/SectionTitle.js +0 -35
- package/lib/commonjs/ui/components/SectionTitle.js.map +0 -1
- package/lib/commonjs/ui/components/bottomSheet/index.js +0 -37
- package/lib/commonjs/ui/components/bottomSheet/index.js.map +0 -1
- package/lib/commonjs/ui/components/icon/OxyIcon.js +0 -27
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +0 -1
- package/lib/commonjs/ui/components/icon/index.js +0 -14
- package/lib/commonjs/ui/components/icon/index.js.map +0 -1
- package/lib/commonjs/ui/components/index.js +0 -97
- package/lib/commonjs/ui/components/index.js.map +0 -1
- package/lib/commonjs/ui/context/OxyContext.js +0 -568
- package/lib/commonjs/ui/context/OxyContext.js.map +0 -1
- package/lib/commonjs/ui/index.js +0 -128
- package/lib/commonjs/ui/index.js.map +0 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +0 -264
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +0 -1
- package/lib/commonjs/ui/navigation/types.js +0 -6
- package/lib/commonjs/ui/navigation/types.js.map +0 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +0 -313
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/AccountManagementDemo.js +0 -299
- package/lib/commonjs/ui/screens/AccountManagementDemo.js.map +0 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +0 -837
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +0 -836
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +0 -788
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +0 -664
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/BillingManagementScreen.js +0 -636
- package/lib/commonjs/ui/screens/BillingManagementScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +0 -2497
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +0 -1620
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/ProfileScreen.js +0 -450
- package/lib/commonjs/ui/screens/ProfileScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +0 -449
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +0 -956
- package/lib/commonjs/ui/screens/SignInScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +0 -762
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js +0 -88
- package/lib/commonjs/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js +0 -364
- package/lib/commonjs/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +0 -202
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js +0 -148
- package/lib/commonjs/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +0 -127
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js +0 -105
- package/lib/commonjs/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
- package/lib/commonjs/ui/styles/FONTS.md +0 -126
- package/lib/commonjs/ui/styles/fonts.js +0 -84
- package/lib/commonjs/ui/styles/fonts.js.map +0 -1
- package/lib/commonjs/ui/styles/index.js +0 -28
- package/lib/commonjs/ui/styles/index.js.map +0 -1
- package/lib/commonjs/ui/styles/theme.js +0 -121
- package/lib/commonjs/ui/styles/theme.js.map +0 -1
- package/lib/commonjs/utils/deviceManager.js +0 -173
- package/lib/commonjs/utils/deviceManager.js.map +0 -1
- package/lib/commonjs/utils/index.js +0 -13
- package/lib/commonjs/utils/index.js.map +0 -1
- package/lib/commonjs/utils/polyfills.js +0 -42
- package/lib/commonjs/utils/polyfills.js.map +0 -1
- package/lib/module/assets/OxyLogo.svg +0 -1
- package/lib/module/assets/assets/OxyLogo.svg +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/assets/icons/OxyServices.tsx +0 -67
- package/lib/module/assets/assets/icons/logo_OxyServices.svg +0 -1
- 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 +0 -46
- package/lib/module/assets/icons/OxyServices.js.map +0 -1
- package/lib/module/assets/icons/logo_OxyServices.svg +0 -1
- package/lib/module/constants/version.js +0 -21
- package/lib/module/constants/version.js.map +0 -1
- package/lib/module/core/index.js +0 -1552
- package/lib/module/core/index.js.map +0 -1
- package/lib/module/index.js +0 -48
- package/lib/module/index.js.map +0 -1
- package/lib/module/lib/sonner.js +0 -16
- package/lib/module/lib/sonner.js.map +0 -1
- package/lib/module/models/interfaces.js +0 -2
- package/lib/module/models/interfaces.js.map +0 -1
- package/lib/module/models/secureSession.js +0 -2
- package/lib/module/models/secureSession.js.map +0 -1
- package/lib/module/node/index.js +0 -23
- package/lib/module/node/index.js.map +0 -1
- package/lib/module/package.json +0 -1
- package/lib/module/ui/components/Avatar.js +0 -93
- package/lib/module/ui/components/Avatar.js.map +0 -1
- package/lib/module/ui/components/FollowButton.js +0 -241
- package/lib/module/ui/components/FollowButton.js.map +0 -1
- package/lib/module/ui/components/FontLoader.js +0 -176
- package/lib/module/ui/components/FontLoader.js.map +0 -1
- package/lib/module/ui/components/GroupedItem.js +0 -104
- package/lib/module/ui/components/GroupedItem.js.map +0 -1
- package/lib/module/ui/components/GroupedSection.js +0 -28
- package/lib/module/ui/components/GroupedSection.js.map +0 -1
- package/lib/module/ui/components/OxyLogo.js +0 -49
- package/lib/module/ui/components/OxyLogo.js.map +0 -1
- package/lib/module/ui/components/OxyProvider.js +0 -511
- package/lib/module/ui/components/OxyProvider.js.map +0 -1
- package/lib/module/ui/components/OxySignInButton.js +0 -172
- package/lib/module/ui/components/OxySignInButton.js.map +0 -1
- package/lib/module/ui/components/ProfileCard.js +0 -119
- package/lib/module/ui/components/ProfileCard.js.map +0 -1
- package/lib/module/ui/components/QuickActions.js +0 -82
- package/lib/module/ui/components/QuickActions.js.map +0 -1
- package/lib/module/ui/components/Section.js +0 -31
- package/lib/module/ui/components/Section.js.map +0 -1
- package/lib/module/ui/components/SectionTitle.js +0 -30
- package/lib/module/ui/components/SectionTitle.js.map +0 -1
- package/lib/module/ui/components/bottomSheet/index.js +0 -5
- package/lib/module/ui/components/bottomSheet/index.js.map +0 -1
- package/lib/module/ui/components/icon/OxyIcon.js +0 -22
- package/lib/module/ui/components/icon/OxyIcon.js.map +0 -1
- package/lib/module/ui/components/icon/index.js +0 -4
- package/lib/module/ui/components/icon/index.js.map +0 -1
- package/lib/module/ui/components/index.js +0 -18
- package/lib/module/ui/components/index.js.map +0 -1
- package/lib/module/ui/context/OxyContext.js +0 -563
- package/lib/module/ui/context/OxyContext.js.map +0 -1
- package/lib/module/ui/index.js +0 -24
- package/lib/module/ui/index.js.map +0 -1
- package/lib/module/ui/navigation/OxyRouter.js +0 -257
- package/lib/module/ui/navigation/OxyRouter.js.map +0 -1
- package/lib/module/ui/navigation/types.js +0 -4
- package/lib/module/ui/navigation/types.js.map +0 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +0 -308
- package/lib/module/ui/screens/AccountCenterScreen.js.map +0 -1
- package/lib/module/ui/screens/AccountManagementDemo.js +0 -296
- package/lib/module/ui/screens/AccountManagementDemo.js.map +0 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +0 -831
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +0 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +0 -830
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +0 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +0 -782
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +0 -1
- package/lib/module/ui/screens/AppInfoScreen.js +0 -658
- package/lib/module/ui/screens/AppInfoScreen.js.map +0 -1
- package/lib/module/ui/screens/BillingManagementScreen.js +0 -631
- package/lib/module/ui/screens/BillingManagementScreen.js.map +0 -1
- package/lib/module/ui/screens/FileManagementScreen.js +0 -2492
- package/lib/module/ui/screens/FileManagementScreen.js.map +0 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +0 -1615
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +0 -1
- package/lib/module/ui/screens/ProfileScreen.js +0 -444
- package/lib/module/ui/screens/ProfileScreen.js.map +0 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +0 -444
- package/lib/module/ui/screens/SessionManagementScreen.js.map +0 -1
- package/lib/module/ui/screens/SignInScreen.js +0 -950
- package/lib/module/ui/screens/SignInScreen.js.map +0 -1
- package/lib/module/ui/screens/SignUpScreen.js +0 -755
- package/lib/module/ui/screens/SignUpScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js +0 -83
- package/lib/module/ui/screens/karma/KarmaAboutScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js +0 -358
- package/lib/module/ui/screens/karma/KarmaCenterScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +0 -197
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js +0 -142
- package/lib/module/ui/screens/karma/KarmaLeaderboardScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +0 -122
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +0 -1
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js +0 -100
- package/lib/module/ui/screens/karma/KarmaRulesScreen.js.map +0 -1
- package/lib/module/ui/styles/FONTS.md +0 -126
- package/lib/module/ui/styles/fonts.js +0 -81
- package/lib/module/ui/styles/fonts.js.map +0 -1
- package/lib/module/ui/styles/index.js +0 -5
- package/lib/module/ui/styles/index.js.map +0 -1
- package/lib/module/ui/styles/theme.js +0 -114
- package/lib/module/ui/styles/theme.js.map +0 -1
- package/lib/module/utils/deviceManager.js +0 -167
- package/lib/module/utils/deviceManager.js.map +0 -1
- package/lib/module/utils/index.js +0 -4
- package/lib/module/utils/index.js.map +0 -1
- package/lib/module/utils/polyfills.js +0 -36
- package/lib/module/utils/polyfills.js.map +0 -1
- package/lib/typescript/assets/icons/OxyServices.d.ts +0 -29
- package/lib/typescript/assets/icons/OxyServices.d.ts.map +0 -1
- package/lib/typescript/constants/version.d.ts +0 -14
- package/lib/typescript/constants/version.d.ts.map +0 -1
- package/lib/typescript/core/index.d.ts +0 -579
- package/lib/typescript/core/index.d.ts.map +0 -1
- package/lib/typescript/index.d.ts +0 -20
- package/lib/typescript/index.d.ts.map +0 -1
- package/lib/typescript/lib/sonner.d.ts +0 -6
- package/lib/typescript/lib/sonner.d.ts.map +0 -1
- package/lib/typescript/models/interfaces.d.ts +0 -179
- package/lib/typescript/models/interfaces.d.ts.map +0 -1
- package/lib/typescript/models/secureSession.d.ts +0 -27
- package/lib/typescript/models/secureSession.d.ts.map +0 -1
- package/lib/typescript/node/index.d.ts +0 -11
- package/lib/typescript/node/index.d.ts.map +0 -1
- package/lib/typescript/ui/components/Avatar.d.ts +0 -62
- package/lib/typescript/ui/components/Avatar.d.ts.map +0 -1
- package/lib/typescript/ui/components/FollowButton.d.ts +0 -92
- package/lib/typescript/ui/components/FollowButton.d.ts.map +0 -1
- package/lib/typescript/ui/components/FontLoader.d.ts +0 -15
- package/lib/typescript/ui/components/FontLoader.d.ts.map +0 -1
- package/lib/typescript/ui/components/GroupedItem.d.ts +0 -17
- package/lib/typescript/ui/components/GroupedItem.d.ts.map +0 -1
- package/lib/typescript/ui/components/GroupedSection.d.ts +0 -19
- package/lib/typescript/ui/components/GroupedSection.d.ts.map +0 -1
- package/lib/typescript/ui/components/OxyLogo.d.ts +0 -29
- package/lib/typescript/ui/components/OxyLogo.d.ts.map +0 -1
- package/lib/typescript/ui/components/OxyProvider.d.ts +0 -12
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +0 -1
- package/lib/typescript/ui/components/OxySignInButton.d.ts +0 -70
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +0 -1
- package/lib/typescript/ui/components/ProfileCard.d.ts +0 -20
- package/lib/typescript/ui/components/ProfileCard.d.ts.map +0 -1
- package/lib/typescript/ui/components/QuickActions.d.ts +0 -15
- package/lib/typescript/ui/components/QuickActions.d.ts.map +0 -1
- package/lib/typescript/ui/components/Section.d.ts +0 -11
- package/lib/typescript/ui/components/Section.d.ts.map +0 -1
- package/lib/typescript/ui/components/SectionTitle.d.ts +0 -9
- package/lib/typescript/ui/components/SectionTitle.d.ts.map +0 -1
- package/lib/typescript/ui/components/bottomSheet/index.d.ts +0 -4
- package/lib/typescript/ui/components/bottomSheet/index.d.ts.map +0 -1
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts +0 -10
- package/lib/typescript/ui/components/icon/OxyIcon.d.ts.map +0 -1
- package/lib/typescript/ui/components/icon/index.d.ts +0 -3
- package/lib/typescript/ui/components/icon/index.d.ts.map +0 -1
- package/lib/typescript/ui/components/index.d.ts +0 -13
- package/lib/typescript/ui/components/index.d.ts.map +0 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +0 -42
- package/lib/typescript/ui/context/OxyContext.d.ts.map +0 -1
- package/lib/typescript/ui/index.d.ts +0 -15
- package/lib/typescript/ui/index.d.ts.map +0 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts +0 -5
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +0 -1
- package/lib/typescript/ui/navigation/types.d.ts +0 -116
- package/lib/typescript/ui/navigation/types.d.ts.map +0 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts +0 -8
- package/lib/typescript/ui/screens/AccountManagementDemo.d.ts.map +0 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/BillingManagementScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts +0 -8
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/ProfileScreen.d.ts +0 -9
- package/lib/typescript/ui/screens/ProfileScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/karma/KarmaAboutScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/karma/KarmaCenterScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/karma/KarmaFAQScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/karma/KarmaLeaderboardScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +0 -1
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts +0 -5
- package/lib/typescript/ui/screens/karma/KarmaRulesScreen.d.ts.map +0 -1
- package/lib/typescript/ui/styles/fonts.d.ts +0 -21
- package/lib/typescript/ui/styles/fonts.d.ts.map +0 -1
- package/lib/typescript/ui/styles/index.d.ts +0 -3
- package/lib/typescript/ui/styles/index.d.ts.map +0 -1
- package/lib/typescript/ui/styles/theme.d.ts +0 -68
- package/lib/typescript/ui/styles/theme.d.ts.map +0 -1
- package/lib/typescript/utils/deviceManager.d.ts +0 -66
- package/lib/typescript/utils/deviceManager.d.ts.map +0 -1
- package/lib/typescript/utils/index.d.ts +0 -3
- package/lib/typescript/utils/index.d.ts.map +0 -1
- package/lib/typescript/utils/polyfills.d.ts +0 -6
- package/lib/typescript/utils/polyfills.d.ts.map +0 -1
|
@@ -1,246 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _reactNativeReanimated = _interopRequireWildcard(require("react-native-reanimated"));
|
|
10
|
-
var _OxyContext = require("../context/OxyContext");
|
|
11
|
-
var _fonts = require("../styles/fonts");
|
|
12
|
-
var _sonner = require("../../lib/sonner");
|
|
13
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
14
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
15
|
-
/**
|
|
16
|
-
* An animated follow button with interactive state changes and preventDefault support
|
|
17
|
-
*
|
|
18
|
-
* @example
|
|
19
|
-
* ```tsx
|
|
20
|
-
* // Basic usage
|
|
21
|
-
* <FollowButton userId="123" />
|
|
22
|
-
*
|
|
23
|
-
* // With custom styling
|
|
24
|
-
* <FollowButton
|
|
25
|
-
* userId="123"
|
|
26
|
-
* initiallyFollowing={true}
|
|
27
|
-
* size="large"
|
|
28
|
-
* style={{ borderRadius: 12 }}
|
|
29
|
-
* onFollowChange={(isFollowing) => console.log(`User is now ${isFollowing ? 'followed' : 'unfollowed'}`)}
|
|
30
|
-
* />
|
|
31
|
-
*
|
|
32
|
-
* // Inside a pressable container (prevents parent actions)
|
|
33
|
-
* <TouchableOpacity onPress={() => navigateToProfile()}>
|
|
34
|
-
* <View>
|
|
35
|
-
* <Text>User Profile</Text>
|
|
36
|
-
* <FollowButton
|
|
37
|
-
* userId="123"
|
|
38
|
-
* preventParentActions={true} // Default: true
|
|
39
|
-
* />
|
|
40
|
-
* </View>
|
|
41
|
-
* </TouchableOpacity>
|
|
42
|
-
*
|
|
43
|
-
* // Custom onPress handler
|
|
44
|
-
* <FollowButton
|
|
45
|
-
* userId="123"
|
|
46
|
-
* onPress={(event) => {
|
|
47
|
-
* event.preventDefault(); // Custom preventDefault
|
|
48
|
-
* // Custom logic here
|
|
49
|
-
* }}
|
|
50
|
-
* />
|
|
51
|
-
* ```
|
|
52
|
-
*/
|
|
53
|
-
const FollowButton = ({
|
|
54
|
-
userId,
|
|
55
|
-
initiallyFollowing = false,
|
|
56
|
-
size = 'medium',
|
|
57
|
-
onFollowChange,
|
|
58
|
-
style,
|
|
59
|
-
textStyle,
|
|
60
|
-
disabled = false,
|
|
61
|
-
showLoadingState = true,
|
|
62
|
-
preventParentActions = true,
|
|
63
|
-
onPress
|
|
64
|
-
}) => {
|
|
65
|
-
const {
|
|
66
|
-
oxyServices,
|
|
67
|
-
isAuthenticated
|
|
68
|
-
} = (0, _OxyContext.useOxy)();
|
|
69
|
-
const [isFollowing, setIsFollowing] = (0, _react.useState)(initiallyFollowing);
|
|
70
|
-
const [isLoading, setIsLoading] = (0, _react.useState)(false);
|
|
71
|
-
|
|
72
|
-
// Animation values
|
|
73
|
-
const animationProgress = (0, _reactNativeReanimated.useSharedValue)(initiallyFollowing ? 1 : 0);
|
|
74
|
-
const scale = (0, _reactNativeReanimated.useSharedValue)(1);
|
|
75
|
-
|
|
76
|
-
// Update the animation value when isFollowing changes
|
|
77
|
-
(0, _react.useEffect)(() => {
|
|
78
|
-
animationProgress.value = (0, _reactNativeReanimated.withTiming)(isFollowing ? 1 : 0, {
|
|
79
|
-
duration: 300,
|
|
80
|
-
easing: _reactNativeReanimated.Easing.bezier(0.25, 0.1, 0.25, 1)
|
|
81
|
-
});
|
|
82
|
-
}, [isFollowing, animationProgress]);
|
|
83
|
-
|
|
84
|
-
// The button press handler with preventDefault support
|
|
85
|
-
const handlePress = async event => {
|
|
86
|
-
// Prevent parent actions if enabled (e.g., if inside a link or pressable container)
|
|
87
|
-
if (preventParentActions && event) {
|
|
88
|
-
// For React Native Web compatibility
|
|
89
|
-
if (_reactNative.Platform.OS === 'web' && event.preventDefault) {
|
|
90
|
-
event.preventDefault();
|
|
91
|
-
}
|
|
92
|
-
|
|
93
|
-
// Stop event propagation to prevent parent TouchableOpacity/Pressable actions
|
|
94
|
-
if (event.stopPropagation) {
|
|
95
|
-
event.stopPropagation();
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
// For React Native, prevent gesture bubbling
|
|
99
|
-
if (event.nativeEvent && event.nativeEvent.stopPropagation) {
|
|
100
|
-
event.nativeEvent.stopPropagation();
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
|
|
104
|
-
// If custom onPress is provided, use it instead of default behavior
|
|
105
|
-
if (onPress) {
|
|
106
|
-
onPress(event);
|
|
107
|
-
return;
|
|
108
|
-
}
|
|
109
|
-
if (disabled || isLoading || !isAuthenticated) return;
|
|
110
|
-
|
|
111
|
-
// Touch feedback animation
|
|
112
|
-
scale.value = (0, _reactNativeReanimated.withSpring)(0.95, {
|
|
113
|
-
damping: 10
|
|
114
|
-
}, () => {
|
|
115
|
-
scale.value = (0, _reactNativeReanimated.withSpring)(1);
|
|
116
|
-
});
|
|
117
|
-
setIsLoading(true);
|
|
118
|
-
try {
|
|
119
|
-
// This should be replaced with actual API call to your services
|
|
120
|
-
if (isFollowing) {
|
|
121
|
-
// Unfollow API call would go here
|
|
122
|
-
// await oxyServices.user.unfollowUser(userId);
|
|
123
|
-
console.log(`Unfollowing user: ${userId}`);
|
|
124
|
-
await new Promise(resolve => setTimeout(resolve, 500)); // Simulating API call
|
|
125
|
-
} else {
|
|
126
|
-
// Follow API call would go here
|
|
127
|
-
// await oxyServices.user.followUser(userId);
|
|
128
|
-
console.log(`Following user: ${userId}`);
|
|
129
|
-
await new Promise(resolve => setTimeout(resolve, 500)); // Simulating API call
|
|
130
|
-
}
|
|
131
|
-
|
|
132
|
-
// Toggle following state with animation
|
|
133
|
-
const newFollowingState = !isFollowing;
|
|
134
|
-
setIsFollowing(newFollowingState);
|
|
135
|
-
|
|
136
|
-
// Call the callback if provided
|
|
137
|
-
if (onFollowChange) {
|
|
138
|
-
onFollowChange(newFollowingState);
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
// Show success toast
|
|
142
|
-
_sonner.toast.success(newFollowingState ? 'Following user!' : 'Unfollowed user');
|
|
143
|
-
} catch (error) {
|
|
144
|
-
console.error('Follow action failed:', error);
|
|
145
|
-
_sonner.toast.error('Failed to update follow status. Please try again.');
|
|
146
|
-
} finally {
|
|
147
|
-
setIsLoading(false);
|
|
148
|
-
}
|
|
149
|
-
};
|
|
150
|
-
|
|
151
|
-
// Animated styles for the button
|
|
152
|
-
const animatedButtonStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
153
|
-
const backgroundColor = (0, _reactNativeReanimated.interpolateColor)(animationProgress.value, [0, 1], ['#d169e5', '#FFFFFF']);
|
|
154
|
-
const borderColor = (0, _reactNativeReanimated.interpolateColor)(animationProgress.value, [0, 1], ['#d169e5', '#d169e5']);
|
|
155
|
-
|
|
156
|
-
// Add a slight scaling effect during the transition
|
|
157
|
-
const transitionScale = 1 + 0.05 * Math.sin(animationProgress.value * Math.PI);
|
|
158
|
-
return {
|
|
159
|
-
backgroundColor,
|
|
160
|
-
borderColor,
|
|
161
|
-
borderWidth: 1,
|
|
162
|
-
transform: [{
|
|
163
|
-
scale: scale.value * transitionScale
|
|
164
|
-
}]
|
|
165
|
-
};
|
|
166
|
-
});
|
|
167
|
-
|
|
168
|
-
// Animated styles for the text
|
|
169
|
-
const animatedTextStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => {
|
|
170
|
-
const color = (0, _reactNativeReanimated.interpolateColor)(animationProgress.value, [0, 1], ['#FFFFFF', '#d169e5']);
|
|
171
|
-
return {
|
|
172
|
-
color
|
|
173
|
-
};
|
|
174
|
-
});
|
|
175
|
-
|
|
176
|
-
// Get size-specific styles
|
|
177
|
-
const getSizeStyles = () => {
|
|
178
|
-
switch (size) {
|
|
179
|
-
case 'small':
|
|
180
|
-
return {
|
|
181
|
-
button: {
|
|
182
|
-
paddingVertical: 6,
|
|
183
|
-
paddingHorizontal: 12
|
|
184
|
-
},
|
|
185
|
-
text: {
|
|
186
|
-
fontSize: 12
|
|
187
|
-
}
|
|
188
|
-
};
|
|
189
|
-
case 'large':
|
|
190
|
-
return {
|
|
191
|
-
button: {
|
|
192
|
-
paddingVertical: 12,
|
|
193
|
-
paddingHorizontal: 24
|
|
194
|
-
},
|
|
195
|
-
text: {
|
|
196
|
-
fontSize: 18
|
|
197
|
-
}
|
|
198
|
-
};
|
|
199
|
-
default:
|
|
200
|
-
// medium
|
|
201
|
-
return {
|
|
202
|
-
button: {
|
|
203
|
-
paddingVertical: 8,
|
|
204
|
-
paddingHorizontal: 16
|
|
205
|
-
},
|
|
206
|
-
text: {
|
|
207
|
-
fontSize: 14
|
|
208
|
-
}
|
|
209
|
-
};
|
|
210
|
-
}
|
|
211
|
-
};
|
|
212
|
-
const sizeStyles = getSizeStyles();
|
|
213
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
214
|
-
activeOpacity: 0.8,
|
|
215
|
-
onPress: handlePress,
|
|
216
|
-
disabled: disabled || isLoading || !isAuthenticated,
|
|
217
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
218
|
-
style: [styles.button, sizeStyles.button, animatedButtonStyle, style],
|
|
219
|
-
children: isLoading && showLoadingState ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
220
|
-
size: "small",
|
|
221
|
-
color: isFollowing ? '#d169e5' : '#FFFFFF'
|
|
222
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.Text, {
|
|
223
|
-
style: [styles.text, sizeStyles.text, animatedTextStyle, textStyle],
|
|
224
|
-
children: isFollowing ? 'Following' : 'Follow'
|
|
225
|
-
})
|
|
226
|
-
})
|
|
227
|
-
});
|
|
228
|
-
};
|
|
229
|
-
const styles = _reactNative.StyleSheet.create({
|
|
230
|
-
button: {
|
|
231
|
-
justifyContent: 'center',
|
|
232
|
-
alignItems: 'center',
|
|
233
|
-
flexDirection: 'row',
|
|
234
|
-
borderRadius: 100
|
|
235
|
-
},
|
|
236
|
-
text: {
|
|
237
|
-
fontFamily: _reactNative.Platform.select({
|
|
238
|
-
web: 'Phudu',
|
|
239
|
-
default: _fonts.fontFamilies.phuduSemiBold
|
|
240
|
-
}),
|
|
241
|
-
fontWeight: _reactNative.Platform.OS === 'web' ? '600' : undefined,
|
|
242
|
-
textAlign: 'center'
|
|
243
|
-
}
|
|
244
|
-
});
|
|
245
|
-
var _default = exports.default = FollowButton;
|
|
246
|
-
//# sourceMappingURL=FollowButton.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","_reactNativeReanimated","_OxyContext","_fonts","_sonner","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","FollowButton","userId","initiallyFollowing","size","onFollowChange","style","textStyle","disabled","showLoadingState","preventParentActions","onPress","oxyServices","isAuthenticated","useOxy","isFollowing","setIsFollowing","useState","isLoading","setIsLoading","animationProgress","useSharedValue","scale","useEffect","value","withTiming","duration","easing","Easing","bezier","handlePress","event","Platform","OS","preventDefault","stopPropagation","nativeEvent","withSpring","damping","console","log","Promise","resolve","setTimeout","newFollowingState","toast","success","error","animatedButtonStyle","useAnimatedStyle","backgroundColor","interpolateColor","borderColor","transitionScale","Math","sin","PI","borderWidth","transform","animatedTextStyle","color","getSizeStyles","button","paddingVertical","paddingHorizontal","text","fontSize","sizeStyles","jsx","TouchableOpacity","activeOpacity","children","View","styles","ActivityIndicator","Text","StyleSheet","create","justifyContent","alignItems","flexDirection","borderRadius","fontFamily","select","web","fontFamilies","phuduSemiBold","fontWeight","undefined","textAlign","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/FollowButton.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAUA,IAAAE,sBAAA,GAAAH,uBAAA,CAAAC,OAAA;AAQA,IAAAG,WAAA,GAAAH,OAAA;AACA,IAAAI,MAAA,GAAAJ,OAAA;AACA,IAAAK,OAAA,GAAAL,OAAA;AAAyC,IAAAM,WAAA,GAAAN,OAAA;AAAA,SAAAD,wBAAAQ,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OA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EAAE;IACNgB,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,aAAa,EAAE,KAAK;IACpBC,YAAY,EAAE;EAChB,CAAC;EACDhB,IAAI,EAAE;IACJiB,UAAU,EAAElD,qBAAQ,CAACmD,MAAM,CAAC;MAC1BC,GAAG,EAAE,OAAO;MACZ5F,OAAO,EAAE6F,mBAAY,CAACC;IACxB,CAAC,CAAC;IACFC,UAAU,EAAEvD,qBAAQ,CAACC,EAAE,KAAK,KAAK,GAAG,KAAK,GAAGuD,SAAS;IACrDC,SAAS,EAAE;EACb;AACF,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAnG,OAAA,GAEYS,YAAY","ignoreList":[]}
|
|
@@ -1,181 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.setupFonts = exports.FontLoader = void 0;
|
|
7
|
-
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var Font = _interopRequireWildcard(require("expo-font"));
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
12
|
-
/**
|
|
13
|
-
* Get the Phudu font sources for both native and web environments
|
|
14
|
-
* This is specifically designed to work when distributed as an npm package
|
|
15
|
-
*/const getPhuduFonts = () => {
|
|
16
|
-
try {
|
|
17
|
-
// For both development and when used as a package
|
|
18
|
-
// Load all static font weights
|
|
19
|
-
return {
|
|
20
|
-
'Phudu-Light': require('../../assets/fonts/Phudu/Phudu-Light.ttf'),
|
|
21
|
-
'Phudu-Regular': require('../../assets/fonts/Phudu/Phudu-Regular.ttf'),
|
|
22
|
-
'Phudu-Medium': require('../../assets/fonts/Phudu/Phudu-Medium.ttf'),
|
|
23
|
-
'Phudu-SemiBold': require('../../assets/fonts/Phudu/Phudu-SemiBold.ttf'),
|
|
24
|
-
'Phudu-Bold': require('../../assets/fonts/Phudu/Phudu-Bold.ttf'),
|
|
25
|
-
'Phudu-ExtraBold': require('../../assets/fonts/Phudu/Phudu-ExtraBold.ttf'),
|
|
26
|
-
'Phudu-Black': require('../../assets/fonts/Phudu/Phudu-Black.ttf')
|
|
27
|
-
};
|
|
28
|
-
} catch (error) {
|
|
29
|
-
console.warn('Failed to load Phudu fonts:', error);
|
|
30
|
-
return null;
|
|
31
|
-
}
|
|
32
|
-
};
|
|
33
|
-
|
|
34
|
-
/**
|
|
35
|
-
* FontLoader component that loads custom fonts before rendering children
|
|
36
|
-
* This works in both the package development and when consumed as an npm package
|
|
37
|
-
*/
|
|
38
|
-
const FontLoader = ({
|
|
39
|
-
children,
|
|
40
|
-
fallbackContent
|
|
41
|
-
}) => {
|
|
42
|
-
const [fontState, setFontState] = (0, _react.useState)('loading');
|
|
43
|
-
(0, _react.useEffect)(() => {
|
|
44
|
-
const loadFonts = async () => {
|
|
45
|
-
try {
|
|
46
|
-
// Get all the font weights
|
|
47
|
-
const phuduFonts = getPhuduFonts();
|
|
48
|
-
if (!phuduFonts) {
|
|
49
|
-
throw new Error('Phudu font files not found');
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
// Load all the static Phudu fonts with their respective weights
|
|
53
|
-
await Font.loadAsync(phuduFonts);
|
|
54
|
-
setFontState('loaded');
|
|
55
|
-
} catch (error) {
|
|
56
|
-
console.error('Error loading fonts:', error);
|
|
57
|
-
// Fallback to render without custom fonts
|
|
58
|
-
setFontState('error');
|
|
59
|
-
}
|
|
60
|
-
};
|
|
61
|
-
loadFonts();
|
|
62
|
-
}, []);
|
|
63
|
-
if (fontState === 'loading') {
|
|
64
|
-
// Render a loading placeholder while fonts are loading
|
|
65
|
-
if (fallbackContent) {
|
|
66
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
67
|
-
children: fallbackContent
|
|
68
|
-
});
|
|
69
|
-
}
|
|
70
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
71
|
-
style: styles.loaderContainer,
|
|
72
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.ActivityIndicator, {
|
|
73
|
-
size: "small",
|
|
74
|
-
color: "#d169e5"
|
|
75
|
-
})
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
if (fontState === 'error') {
|
|
79
|
-
console.warn('Fonts failed to load. Using system fonts instead.');
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
// Return children even on error - the app will use system fonts as fallback
|
|
83
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_jsxRuntime.Fragment, {
|
|
84
|
-
children: children
|
|
85
|
-
});
|
|
86
|
-
};
|
|
87
|
-
|
|
88
|
-
/**
|
|
89
|
-
* Setup fonts for applications consuming this package
|
|
90
|
-
* This should be called by applications using your package
|
|
91
|
-
*/
|
|
92
|
-
exports.FontLoader = FontLoader;
|
|
93
|
-
const setupFonts = async () => {
|
|
94
|
-
try {
|
|
95
|
-
const phuduFonts = getPhuduFonts();
|
|
96
|
-
if (!phuduFonts) {
|
|
97
|
-
throw new Error('Phudu font files not found');
|
|
98
|
-
}
|
|
99
|
-
if (_reactNative.Platform.OS === 'web') {
|
|
100
|
-
// For web platform, dynamically inject CSS to load the fonts
|
|
101
|
-
if (typeof document !== 'undefined') {
|
|
102
|
-
// Create a style element
|
|
103
|
-
const style = document.createElement('style');
|
|
104
|
-
|
|
105
|
-
// Define @font-face rules for each font weight
|
|
106
|
-
const fontFaceRules = `
|
|
107
|
-
@font-face {
|
|
108
|
-
font-family: 'Phudu';
|
|
109
|
-
src: url(${phuduFonts['Phudu-Light']}) format('truetype');
|
|
110
|
-
font-weight: 300;
|
|
111
|
-
font-style: normal;
|
|
112
|
-
}
|
|
113
|
-
@font-face {
|
|
114
|
-
font-family: 'Phudu';
|
|
115
|
-
src: url(${phuduFonts['Phudu-Regular']}) format('truetype');
|
|
116
|
-
font-weight: 400;
|
|
117
|
-
font-style: normal;
|
|
118
|
-
}
|
|
119
|
-
@font-face {
|
|
120
|
-
font-family: 'Phudu';
|
|
121
|
-
src: url(${phuduFonts['Phudu-Medium']}) format('truetype');
|
|
122
|
-
font-weight: 500;
|
|
123
|
-
font-style: normal;
|
|
124
|
-
}
|
|
125
|
-
@font-face {
|
|
126
|
-
font-family: 'Phudu';
|
|
127
|
-
src: url(${phuduFonts['Phudu-SemiBold']}) format('truetype');
|
|
128
|
-
font-weight: 600;
|
|
129
|
-
font-style: normal;
|
|
130
|
-
}
|
|
131
|
-
@font-face {
|
|
132
|
-
font-family: 'Phudu';
|
|
133
|
-
src: url(${phuduFonts['Phudu-Bold']}) format('truetype');
|
|
134
|
-
font-weight: 700;
|
|
135
|
-
font-style: normal;
|
|
136
|
-
}
|
|
137
|
-
@font-face {
|
|
138
|
-
font-family: 'Phudu';
|
|
139
|
-
src: url(${phuduFonts['Phudu-ExtraBold']}) format('truetype');
|
|
140
|
-
font-weight: 800;
|
|
141
|
-
font-style: normal;
|
|
142
|
-
}
|
|
143
|
-
@font-face {
|
|
144
|
-
font-family: 'Phudu';
|
|
145
|
-
src: url(${phuduFonts['Phudu-Black']}) format('truetype');
|
|
146
|
-
font-weight: 900;
|
|
147
|
-
font-style: normal;
|
|
148
|
-
}
|
|
149
|
-
`;
|
|
150
|
-
style.textContent = fontFaceRules;
|
|
151
|
-
// Append to the document head
|
|
152
|
-
document.head.appendChild(style);
|
|
153
|
-
console.info('All Phudu web fonts have been dynamically loaded');
|
|
154
|
-
}
|
|
155
|
-
} else {
|
|
156
|
-
// For native platforms, guidance for the package users
|
|
157
|
-
console.info('Fonts should be linked in native projects to use Phudu fonts');
|
|
158
|
-
|
|
159
|
-
// Attempt to load the fonts anyway (this works if the consumer has linked the assets)
|
|
160
|
-
await Font.loadAsync(phuduFonts);
|
|
161
|
-
}
|
|
162
|
-
return true;
|
|
163
|
-
} catch (error) {
|
|
164
|
-
console.warn('Error setting up fonts:', error?.message || error);
|
|
165
|
-
return false;
|
|
166
|
-
}
|
|
167
|
-
};
|
|
168
|
-
exports.setupFonts = setupFonts;
|
|
169
|
-
const styles = _reactNative.StyleSheet.create({
|
|
170
|
-
loaderContainer: {
|
|
171
|
-
position: 'absolute',
|
|
172
|
-
top: 0,
|
|
173
|
-
left: 0,
|
|
174
|
-
right: 0,
|
|
175
|
-
bottom: 0,
|
|
176
|
-
justifyContent: 'center',
|
|
177
|
-
alignItems: 'center',
|
|
178
|
-
backgroundColor: 'transparent'
|
|
179
|
-
}
|
|
180
|
-
});
|
|
181
|
-
//# sourceMappingURL=FontLoader.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireWildcard","require","_reactNative","Font","_jsxRuntime","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","getPhuduFonts","error","console","warn","FontLoader","children","fallbackContent","fontState","setFontState","useState","useEffect","loadFonts","phuduFonts","Error","loadAsync","jsx","Fragment","View","style","styles","loaderContainer","ActivityIndicator","size","color","exports","setupFonts","Platform","OS","document","createElement","fontFaceRules","textContent","head","appendChild","info","message","StyleSheet","create","position","top","left","right","bottom","justifyContent","alignItems","backgroundColor"],"sourceRoot":"../../../../src","sources":["ui/components/FontLoader.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,uBAAA,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A;AACA;AACA,mCAAmCA,UAAU,CAAC,YAAY,CAAC;AAC3D;AACA;AACA;AACA;AACA;AACA,mCAAmCA,UAAU,CAAC,iBAAiB,CAAC;AAChE;AACA;AACA;AACA;AACA;AACA,mCAAmCA,UAAU,CAAC,aAAa,CAAC;AAC5D;AACA;AACA;AACA,iBAAiB;QAEDM,KAAK,CAACa,WAAW,GAAGD,aAAa;QACjC;QACAF,QAAQ,CAACI,IAAI,CAACC,WAAW,CAACf,KAAK,CAAC;QAChChB,OAAO,CAACgC,IAAI,CAAC,kDAAkD,CAAC;MACpE;IACJ,CAAC,MAAM;MACH;MACAhC,OAAO,CAACgC,IAAI,CAAC,8DAA8D,CAAC;;MAE5E;MACA,MAAMvD,IAAI,CAACmC,SAAS,CAACF,UAAU,CAAC;IACpC;IAEA,OAAO,IAAI;EACf,CAAC,CAAC,OAAOX,KAAU,EAAE;IACjBC,OAAO,CAACC,IAAI,CAAC,yBAAyB,EAAEF,KAAK,EAAEkC,OAAO,IAAIlC,KAAK,CAAC;IAChE,OAAO,KAAK;EAChB;AACJ,CAAC;AAACuB,OAAA,CAAAC,UAAA,GAAAA,UAAA;AAEF,MAAMN,MAAM,GAAGiB,uBAAU,CAACC,MAAM,CAAC;EAC7BjB,eAAe,EAAE;IACbkB,QAAQ,EAAE,UAAU;IACpBC,GAAG,EAAE,CAAC;IACNC,IAAI,EAAE,CAAC;IACPC,KAAK,EAAE,CAAC;IACRC,MAAM,EAAE,CAAC;IACTC,cAAc,EAAE,QAAQ;IACxBC,UAAU,EAAE,QAAQ;IACpBC,eAAe,EAAE;EACrB;AACJ,CAAC,CAAC","ignoreList":[]}
|
|
@@ -1,109 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _vectorIcons = require("@expo/vector-icons");
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const GroupedItem = ({
|
|
13
|
-
icon,
|
|
14
|
-
iconColor = '#007AFF',
|
|
15
|
-
title,
|
|
16
|
-
subtitle,
|
|
17
|
-
theme,
|
|
18
|
-
onPress,
|
|
19
|
-
isFirst = false,
|
|
20
|
-
isLast = false,
|
|
21
|
-
showChevron = true,
|
|
22
|
-
disabled = false,
|
|
23
|
-
customContent
|
|
24
|
-
}) => {
|
|
25
|
-
const isDarkTheme = theme === 'dark';
|
|
26
|
-
const textColor = isDarkTheme ? '#FFFFFF' : '#000000';
|
|
27
|
-
const secondaryBackgroundColor = isDarkTheme ? '#222222' : '#FFFFFF';
|
|
28
|
-
const itemStyles = [styles.groupedItem, isFirst && styles.firstGroupedItem, isLast && styles.lastGroupedItem, {
|
|
29
|
-
backgroundColor: secondaryBackgroundColor
|
|
30
|
-
}];
|
|
31
|
-
const content = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
32
|
-
style: styles.groupedItemContent,
|
|
33
|
-
children: [icon && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
34
|
-
name: icon,
|
|
35
|
-
size: 20,
|
|
36
|
-
color: iconColor,
|
|
37
|
-
style: styles.actionIcon
|
|
38
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
39
|
-
style: styles.actionTextContainer,
|
|
40
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
41
|
-
style: [styles.actionButtonText, {
|
|
42
|
-
color: textColor
|
|
43
|
-
}],
|
|
44
|
-
children: title
|
|
45
|
-
}), subtitle && /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
46
|
-
style: [styles.actionButtonSubtext, {
|
|
47
|
-
color: isDarkTheme ? '#BBBBBB' : '#666666'
|
|
48
|
-
}],
|
|
49
|
-
children: subtitle
|
|
50
|
-
})]
|
|
51
|
-
}), customContent, showChevron && /*#__PURE__*/(0, _jsxRuntime.jsx)(_vectorIcons.Ionicons, {
|
|
52
|
-
name: "chevron-forward",
|
|
53
|
-
size: 16,
|
|
54
|
-
color: isDarkTheme ? '#666666' : '#999999'
|
|
55
|
-
})]
|
|
56
|
-
});
|
|
57
|
-
if (onPress && !disabled) {
|
|
58
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
59
|
-
style: itemStyles,
|
|
60
|
-
onPress: onPress,
|
|
61
|
-
children: content
|
|
62
|
-
});
|
|
63
|
-
}
|
|
64
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
65
|
-
style: itemStyles,
|
|
66
|
-
children: content
|
|
67
|
-
});
|
|
68
|
-
};
|
|
69
|
-
const styles = _reactNative.StyleSheet.create({
|
|
70
|
-
groupedItem: {
|
|
71
|
-
flexDirection: 'row',
|
|
72
|
-
alignItems: 'center',
|
|
73
|
-
justifyContent: 'space-between',
|
|
74
|
-
marginBottom: 2,
|
|
75
|
-
overflow: 'hidden'
|
|
76
|
-
},
|
|
77
|
-
firstGroupedItem: {
|
|
78
|
-
borderTopLeftRadius: 24,
|
|
79
|
-
borderTopRightRadius: 24
|
|
80
|
-
},
|
|
81
|
-
lastGroupedItem: {
|
|
82
|
-
borderBottomLeftRadius: 24,
|
|
83
|
-
borderBottomRightRadius: 24,
|
|
84
|
-
marginBottom: 8
|
|
85
|
-
},
|
|
86
|
-
groupedItemContent: {
|
|
87
|
-
flexDirection: 'row',
|
|
88
|
-
alignItems: 'center',
|
|
89
|
-
padding: 16,
|
|
90
|
-
width: '100%'
|
|
91
|
-
},
|
|
92
|
-
actionIcon: {
|
|
93
|
-
marginRight: 12
|
|
94
|
-
},
|
|
95
|
-
actionTextContainer: {
|
|
96
|
-
flex: 1
|
|
97
|
-
},
|
|
98
|
-
actionButtonText: {
|
|
99
|
-
fontSize: 16,
|
|
100
|
-
fontWeight: '500',
|
|
101
|
-
marginBottom: 2
|
|
102
|
-
},
|
|
103
|
-
actionButtonSubtext: {
|
|
104
|
-
fontSize: 13,
|
|
105
|
-
lineHeight: 18
|
|
106
|
-
}
|
|
107
|
-
});
|
|
108
|
-
var _default = exports.default = GroupedItem;
|
|
109
|
-
//# sourceMappingURL=GroupedItem.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_vectorIcons","_jsxRuntime","e","__esModule","default","GroupedItem","icon","iconColor","title","subtitle","theme","onPress","isFirst","isLast","showChevron","disabled","customContent","isDarkTheme","textColor","secondaryBackgroundColor","itemStyles","styles","groupedItem","firstGroupedItem","lastGroupedItem","backgroundColor","content","jsxs","View","style","groupedItemContent","children","jsx","Ionicons","name","size","color","actionIcon","actionTextContainer","Text","actionButtonText","actionButtonSubtext","TouchableOpacity","StyleSheet","create","flexDirection","alignItems","justifyContent","marginBottom","overflow","borderTopLeftRadius","borderTopRightRadius","borderBottomLeftRadius","borderBottomRightRadius","padding","width","marginRight","flex","fontSize","fontWeight","lineHeight","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/GroupedItem.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAF,OAAA;AAA8C,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAgB9C,MAAMG,WAAuC,GAAGA,CAAC;EAC7CC,IAAI;EACJC,SAAS,GAAG,SAAS;EACrBC,KAAK;EACLC,QAAQ;EACRC,KAAK;EACLC,OAAO;EACPC,O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IACRmB,WAAW,EAAE;EACjB,CAAC;EACDlB,mBAAmB,EAAE;IACjBmB,IAAI,EAAE;EACV,CAAC;EACDjB,gBAAgB,EAAE;IACdkB,QAAQ,EAAE,EAAE;IACZC,UAAU,EAAE,KAAK;IACjBX,YAAY,EAAE;EAClB,CAAC;EACDP,mBAAmB,EAAE;IACjBiB,QAAQ,EAAE,EAAE;IACZE,UAAU,EAAE;EAChB;AACJ,CAAC,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAA1D,OAAA,GAEYC,WAAW","ignoreList":[]}
|
|
@@ -1,33 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
|
|
3
|
-
Object.defineProperty(exports, "__esModule", {
|
|
4
|
-
value: true
|
|
5
|
-
});
|
|
6
|
-
exports.default = void 0;
|
|
7
|
-
var _react = _interopRequireDefault(require("react"));
|
|
8
|
-
var _reactNative = require("react-native");
|
|
9
|
-
var _GroupedItem = _interopRequireDefault(require("./GroupedItem"));
|
|
10
|
-
var _jsxRuntime = require("react/jsx-runtime");
|
|
11
|
-
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
12
|
-
const GroupedSection = ({
|
|
13
|
-
items,
|
|
14
|
-
theme
|
|
15
|
-
}) => {
|
|
16
|
-
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
17
|
-
children: items.map((item, index) => /*#__PURE__*/(0, _jsxRuntime.jsx)(_GroupedItem.default, {
|
|
18
|
-
icon: item.icon,
|
|
19
|
-
iconColor: item.iconColor,
|
|
20
|
-
title: item.title,
|
|
21
|
-
subtitle: item.subtitle,
|
|
22
|
-
theme: theme,
|
|
23
|
-
onPress: item.onPress,
|
|
24
|
-
isFirst: index === 0,
|
|
25
|
-
isLast: index === items.length - 1,
|
|
26
|
-
showChevron: item.showChevron,
|
|
27
|
-
disabled: item.disabled,
|
|
28
|
-
customContent: item.customContent
|
|
29
|
-
}, item.id))
|
|
30
|
-
});
|
|
31
|
-
};
|
|
32
|
-
var _default = exports.default = GroupedSection;
|
|
33
|
-
//# sourceMappingURL=GroupedSection.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"names":["_react","_interopRequireDefault","require","_reactNative","_GroupedItem","_jsxRuntime","e","__esModule","default","GroupedSection","items","theme","jsx","View","children","map","item","index","icon","iconColor","title","subtitle","onPress","isFirst","isLast","length","showChevron","disabled","customContent","id","_default","exports"],"sourceRoot":"../../../../src","sources":["ui/components/GroupedSection.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,sBAAA,CAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,YAAA,GAAAH,sBAAA,CAAAC,OAAA;AAAwC,IAAAG,WAAA,GAAAH,OAAA;AAAA,SAAAD,uBAAAK,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAmBxC,MAAMG,cAA6C,GAAGA,CAAC;EAAEC,KAAK;EAAEC;AAAM,CAAC,KAAK;EACxE,oBACI,IAAAN,WAAA,CAAAO,GAAA,EAACT,YAAA,CAAAU,IAAI;IAAAC,QAAA,EACAJ,KAAK,CAACK,GAAG,CAAC,CAACC,IAAI,EAAEC,KAAK,kBACnB,IAAAZ,WAAA,CAAAO,GAAA,EAACR,YAAA,CAAAI,OAAW;MAERU,IAAI,EAAEF,IAAI,CAACE,IAAK;MAChBC,SAAS,EAAEH,IAAI,CAACG,SAAU;MAC1BC,KAAK,EAAEJ,IAAI,CAACI,KAAM;MAClBC,QAAQ,EAAEL,IAAI,CAACK,QAAS;MACxBV,KAAK,EAAEA,KAAM;MACbW,OAAO,EAAEN,IAAI,CAACM,OAAQ;MACtBC,OAAO,EAAEN,KAAK,KAAK,CAAE;MACrBO,MAAM,EAAEP,KAAK,KAAKP,KAAK,CAACe,MAAM,GAAG,CAAE;MACnCC,WAAW,EAAEV,IAAI,CAACU,WAAY;MAC9BC,QAAQ,EAAEX,IAAI,CAACW,QAAS;MACxBC,aAAa,EAAEZ,IAAI,CAACY;IAAc,GAX7BZ,IAAI,CAACa,EAYb,CACJ;EAAC,CACA,CAAC;AAEf,CAAC;AAAC,IAAAC,QAAA,GAAAC,OAAA,CAAAvB,OAAA,GAEaC,cAAc","ignoreList":[]}
|