@oxyhq/services 5.5.8 → 5.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +16 -2
- package/lib/commonjs/core/index.js +69 -82
- package/lib/commonjs/core/index.js.map +1 -1
- package/lib/commonjs/index.js +24 -183
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/node/index.js +0 -2
- package/lib/commonjs/node/index.js.map +1 -1
- package/lib/commonjs/ui/components/FollowButton.js +100 -229
- package/lib/commonjs/ui/components/FollowButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyPayButton.js +131 -0
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -0
- package/lib/commonjs/ui/components/OxyProvider.js +41 -198
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +15 -2
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js +66 -0
- package/lib/commonjs/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/commonjs/ui/components/icon/index.js +7 -0
- package/lib/commonjs/ui/components/icon/index.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +7 -0
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +14 -7
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +108 -0
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -0
- package/lib/commonjs/ui/components/internal/TextField.js +20 -0
- package/lib/commonjs/ui/components/internal/TextField.js.map +1 -1
- package/lib/commonjs/ui/context/OxyContext.js +26 -23
- package/lib/commonjs/ui/context/OxyContext.js.map +1 -1
- package/lib/commonjs/ui/hooks/index.js +2 -15
- package/lib/commonjs/ui/hooks/index.js.map +1 -1
- package/lib/commonjs/ui/hooks/useFollow.js +52 -136
- package/lib/commonjs/ui/hooks/useFollow.js.map +1 -1
- package/lib/commonjs/ui/hooks/useSessionSocket.js +52 -0
- package/lib/commonjs/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/commonjs/ui/index.js +8 -191
- package/lib/commonjs/ui/index.js.map +1 -1
- package/lib/commonjs/ui/navigation/OxyRouter.js +52 -60
- package/lib/commonjs/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +18 -30
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +4 -22
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +6 -14
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +37 -66
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AppInfoScreen.js +21 -44
- package/lib/commonjs/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +44 -23
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +59 -78
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +1588 -0
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +22 -36
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js +269 -0
- package/lib/commonjs/ui/screens/RecoverAccountScreen.js.map +1 -0
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +47 -69
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignInScreen.js +99 -333
- package/lib/commonjs/ui/screens/SignInScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SignUpScreen.js +136 -340
- package/lib/commonjs/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js +192 -0
- package/lib/commonjs/ui/screens/internal/SignInPasswordStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js +135 -0
- package/lib/commonjs/ui/screens/internal/SignInUsernameStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js +108 -0
- package/lib/commonjs/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js +126 -0
- package/lib/commonjs/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js +84 -0
- package/lib/commonjs/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js +59 -0
- package/lib/commonjs/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js +15 -2
- package/lib/commonjs/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/commonjs/ui/stores/authStore.js +31 -0
- package/lib/commonjs/ui/stores/authStore.js.map +1 -0
- package/lib/commonjs/ui/stores/followStore.js +124 -0
- package/lib/commonjs/ui/stores/followStore.js.map +1 -0
- package/lib/commonjs/ui/styles/index.js +0 -11
- package/lib/commonjs/ui/styles/index.js.map +1 -1
- package/lib/commonjs/ui/utils/confirmAction.js +28 -0
- package/lib/commonjs/ui/utils/confirmAction.js.map +1 -0
- package/lib/module/core/index.js +69 -81
- package/lib/module/core/index.js.map +1 -1
- package/lib/module/index.js +14 -17
- package/lib/module/index.js.map +1 -1
- package/lib/module/node/index.js +0 -3
- package/lib/module/node/index.js.map +1 -1
- package/lib/module/ui/components/FollowButton.js +100 -229
- package/lib/module/ui/components/FollowButton.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +125 -0
- package/lib/module/ui/components/OxyPayButton.js.map +1 -0
- package/lib/module/ui/components/OxyProvider.js +42 -199
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +15 -2
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/icon/FAIRWalletIcon.js +60 -0
- package/lib/module/ui/components/icon/FAIRWalletIcon.js.map +1 -0
- package/lib/module/ui/components/icon/index.js +1 -0
- package/lib/module/ui/components/icon/index.js.map +1 -1
- package/lib/module/ui/components/index.js +1 -0
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +15 -8
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +103 -0
- package/lib/module/ui/components/internal/PinInput.js.map +1 -0
- package/lib/module/ui/components/internal/TextField.js +20 -0
- package/lib/module/ui/components/internal/TextField.js.map +1 -1
- package/lib/module/ui/context/OxyContext.js +26 -23
- package/lib/module/ui/context/OxyContext.js.map +1 -1
- package/lib/module/ui/hooks/index.js +1 -2
- package/lib/module/ui/hooks/index.js.map +1 -1
- package/lib/module/ui/hooks/useFollow.js +52 -137
- package/lib/module/ui/hooks/useFollow.js.map +1 -1
- package/lib/module/ui/hooks/useSessionSocket.js +47 -0
- package/lib/module/ui/hooks/useSessionSocket.js.map +1 -0
- package/lib/module/ui/index.js +2 -13
- package/lib/module/ui/index.js.map +1 -1
- package/lib/module/ui/navigation/OxyRouter.js +53 -61
- package/lib/module/ui/navigation/OxyRouter.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +6 -18
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +5 -23
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +7 -15
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +38 -67
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AppInfoScreen.js +22 -45
- package/lib/module/ui/screens/AppInfoScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +44 -23
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +59 -78
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +1583 -0
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -0
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +23 -37
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/RecoverAccountScreen.js +263 -0
- package/lib/module/ui/screens/RecoverAccountScreen.js.map +1 -0
- package/lib/module/ui/screens/SessionManagementScreen.js +47 -69
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/SignInScreen.js +100 -334
- package/lib/module/ui/screens/SignInScreen.js.map +1 -1
- package/lib/module/ui/screens/SignUpScreen.js +137 -341
- package/lib/module/ui/screens/SignUpScreen.js.map +1 -1
- package/lib/module/ui/screens/internal/SignInPasswordStep.js +186 -0
- package/lib/module/ui/screens/internal/SignInPasswordStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignInUsernameStep.js +129 -0
- package/lib/module/ui/screens/internal/SignInUsernameStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js +102 -0
- package/lib/module/ui/screens/internal/SignUpIdentityStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js +120 -0
- package/lib/module/ui/screens/internal/SignUpSecurityStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js +79 -0
- package/lib/module/ui/screens/internal/SignUpSummaryStep.js.map +1 -0
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js +54 -0
- package/lib/module/ui/screens/internal/SignUpWelcomeStep.js.map +1 -0
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js +16 -3
- package/lib/module/ui/screens/karma/KarmaRewardsScreen.js.map +1 -1
- package/lib/module/ui/stores/authStore.js +27 -0
- package/lib/module/ui/stores/authStore.js.map +1 -0
- package/lib/module/ui/stores/followStore.js +120 -0
- package/lib/module/ui/stores/followStore.js.map +1 -0
- package/lib/module/ui/styles/index.js +0 -1
- package/lib/module/ui/styles/index.js.map +1 -1
- package/lib/module/ui/utils/confirmAction.js +25 -0
- package/lib/module/ui/utils/confirmAction.js.map +1 -0
- package/lib/typescript/core/index.d.ts +28 -10
- package/lib/typescript/core/index.d.ts.map +1 -1
- package/lib/typescript/index.d.ts +5 -4
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/models/secureSession.d.ts +0 -1
- package/lib/typescript/models/secureSession.d.ts.map +1 -1
- package/lib/typescript/node/index.d.ts +0 -1
- package/lib/typescript/node/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/FollowButton.d.ts +1 -77
- package/lib/typescript/ui/components/FollowButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxyPayButton.d.ts +29 -0
- package/lib/typescript/ui/components/OxyPayButton.d.ts.map +1 -0
- package/lib/typescript/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts +8 -0
- package/lib/typescript/ui/components/icon/FAIRWalletIcon.d.ts.map +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts +1 -0
- package/lib/typescript/ui/components/icon/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/index.d.ts +1 -0
- package/lib/typescript/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/GroupedPillButtons.d.ts.map +1 -1
- package/lib/typescript/ui/components/internal/PinInput.d.ts +12 -0
- package/lib/typescript/ui/components/internal/PinInput.d.ts.map +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts +1 -0
- package/lib/typescript/ui/components/internal/TextField.d.ts.map +1 -1
- package/lib/typescript/ui/context/OxyContext.d.ts +0 -1
- package/lib/typescript/ui/context/OxyContext.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/index.d.ts +1 -2
- package/lib/typescript/ui/hooks/index.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useFollow.d.ts +14 -15
- package/lib/typescript/ui/hooks/useFollow.d.ts.map +1 -1
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts +11 -0
- package/lib/typescript/ui/hooks/useSessionSocket.d.ts.map +1 -0
- package/lib/typescript/ui/index.d.ts +2 -5
- package/lib/typescript/ui/index.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/OxyRouter.d.ts.map +1 -1
- package/lib/typescript/ui/navigation/types.d.ts +5 -23
- package/lib/typescript/ui/navigation/types.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/AppInfoScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts +27 -0
- package/lib/typescript/ui/screens/PaymentGatewayScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts +8 -0
- package/lib/typescript/ui/screens/RecoverAccountScreen.d.ts.map +1 -0
- package/lib/typescript/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignInScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/SignUpScreen.d.ts.map +1 -1
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts +27 -0
- package/lib/typescript/ui/screens/internal/SignInPasswordStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts +26 -0
- package/lib/typescript/ui/screens/internal/SignInUsernameStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts +20 -0
- package/lib/typescript/ui/screens/internal/SignUpIdentityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts +24 -0
- package/lib/typescript/ui/screens/internal/SignUpSecurityStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts +15 -0
- package/lib/typescript/ui/screens/internal/SignUpSummaryStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts +13 -0
- package/lib/typescript/ui/screens/internal/SignUpWelcomeStep.d.ts.map +1 -0
- package/lib/typescript/ui/screens/karma/KarmaRewardsScreen.d.ts.map +1 -1
- package/lib/typescript/ui/stores/authStore.d.ts +14 -0
- package/lib/typescript/ui/stores/authStore.d.ts.map +1 -0
- package/lib/typescript/ui/stores/followStore.d.ts +15 -0
- package/lib/typescript/ui/stores/followStore.d.ts.map +1 -0
- package/lib/typescript/ui/styles/index.d.ts +0 -1
- package/lib/typescript/ui/styles/index.d.ts.map +1 -1
- package/lib/typescript/ui/utils/confirmAction.d.ts +7 -0
- package/lib/typescript/ui/utils/confirmAction.d.ts.map +1 -0
- package/package.json +12 -7
- package/src/core/index.ts +78 -88
- package/src/index.ts +8 -45
- package/src/models/secureSession.ts +1 -2
- package/src/node/index.ts +0 -3
- package/src/ui/components/FollowButton.tsx +100 -322
- package/src/ui/components/OxyPayButton.tsx +133 -0
- package/src/ui/components/OxyProvider.tsx +39 -201
- package/src/ui/components/OxySignInButton.tsx +13 -2
- package/src/ui/components/icon/FAIRWalletIcon.tsx +49 -0
- package/src/ui/components/icon/index.ts +1 -0
- package/src/ui/components/index.ts +1 -0
- package/src/ui/components/internal/GroupedPillButtons.tsx +12 -8
- package/src/ui/components/internal/PinInput.tsx +102 -0
- package/src/ui/components/internal/TextField.tsx +9 -0
- package/src/ui/context/OxyContext.tsx +26 -26
- package/src/ui/hooks/index.ts +1 -2
- package/src/ui/hooks/useFollow.ts +58 -129
- package/src/ui/hooks/useSessionSocket.ts +50 -0
- package/src/ui/index.ts +2 -37
- package/src/ui/navigation/OxyRouter.tsx +47 -63
- package/src/ui/navigation/types.ts +5 -26
- package/src/ui/screens/AccountCenterScreen.tsx +12 -21
- package/src/ui/screens/AccountOverviewScreen.tsx +6 -30
- package/src/ui/screens/AccountSettingsScreen.tsx +7 -22
- package/src/ui/screens/AccountSwitcherScreen.tsx +46 -88
- package/src/ui/screens/AppInfoScreen.tsx +27 -47
- package/src/ui/screens/FeedbackScreen.tsx +34 -19
- package/src/ui/screens/FileManagementScreen.tsx +293 -321
- package/src/ui/screens/PaymentGatewayScreen.tsx +1315 -0
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +109 -124
- package/src/ui/screens/RecoverAccountScreen.tsx +260 -0
- package/src/ui/screens/SessionManagementScreen.tsx +65 -137
- package/src/ui/screens/SignInScreen.tsx +89 -283
- package/src/ui/screens/SignUpScreen.tsx +138 -291
- package/src/ui/screens/internal/SignInPasswordStep.tsx +179 -0
- package/src/ui/screens/internal/SignInUsernameStep.tsx +139 -0
- package/src/ui/screens/internal/SignUpIdentityStep.tsx +114 -0
- package/src/ui/screens/internal/SignUpSecurityStep.tsx +132 -0
- package/src/ui/screens/internal/SignUpSummaryStep.tsx +66 -0
- package/src/ui/screens/internal/SignUpWelcomeStep.tsx +52 -0
- package/src/ui/screens/karma/KarmaRewardsScreen.tsx +13 -3
- package/src/ui/stores/authStore.ts +24 -0
- package/src/ui/stores/followStore.ts +80 -0
- package/src/ui/styles/index.ts +0 -1
- package/src/ui/utils/confirmAction.ts +23 -0
- 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/hooks/useAuthFetch.js +0 -216
- package/lib/commonjs/ui/hooks/useAuthFetch.js.map +0 -1
- package/lib/commonjs/ui/hooks/useOxyFollow.js +0 -190
- package/lib/commonjs/ui/hooks/useOxyFollow.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/store/index.js +0 -67
- package/lib/commonjs/ui/store/index.js.map +0 -1
- package/lib/commonjs/ui/store/setupOxyStore.js +0 -63
- package/lib/commonjs/ui/store/setupOxyStore.js.map +0 -1
- package/lib/commonjs/ui/store/slices/authSlice.js +0 -56
- package/lib/commonjs/ui/store/slices/authSlice.js.map +0 -1
- package/lib/commonjs/ui/store/slices/followSlice.js +0 -238
- package/lib/commonjs/ui/store/slices/followSlice.js.map +0 -1
- package/lib/commonjs/ui/store/slices/index.js +0 -129
- package/lib/commonjs/ui/store/slices/index.js.map +0 -1
- package/lib/commonjs/ui/store/slices/types.js +0 -19
- package/lib/commonjs/ui/store/slices/types.js.map +0 -1
- package/lib/commonjs/ui/styles/shadows.js +0 -123
- package/lib/commonjs/ui/styles/shadows.js.map +0 -1
- package/lib/commonjs/utils/polyfills.js +0 -42
- package/lib/commonjs/utils/polyfills.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/hooks/useAuthFetch.js +0 -211
- package/lib/module/ui/hooks/useAuthFetch.js.map +0 -1
- package/lib/module/ui/hooks/useOxyFollow.js +0 -186
- package/lib/module/ui/hooks/useOxyFollow.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/store/index.js +0 -33
- package/lib/module/ui/store/index.js.map +0 -1
- package/lib/module/ui/store/setupOxyStore.js +0 -59
- package/lib/module/ui/store/setupOxyStore.js.map +0 -1
- package/lib/module/ui/store/slices/authSlice.js +0 -48
- package/lib/module/ui/store/slices/authSlice.js.map +0 -1
- package/lib/module/ui/store/slices/followSlice.js +0 -232
- package/lib/module/ui/store/slices/followSlice.js.map +0 -1
- package/lib/module/ui/store/slices/index.js +0 -11
- package/lib/module/ui/store/slices/index.js.map +0 -1
- package/lib/module/ui/store/slices/types.js +0 -15
- package/lib/module/ui/store/slices/types.js.map +0 -1
- package/lib/module/ui/styles/shadows.js +0 -119
- package/lib/module/ui/styles/shadows.js.map +0 -1
- package/lib/module/utils/polyfills.js +0 -36
- package/lib/module/utils/polyfills.js.map +0 -1
- package/lib/typescript/types/react-redux.d.ts +0 -5
- 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/hooks/useAuthFetch.d.ts +0 -34
- package/lib/typescript/ui/hooks/useAuthFetch.d.ts.map +0 -1
- package/lib/typescript/ui/hooks/useOxyFollow.d.ts +0 -81
- package/lib/typescript/ui/hooks/useOxyFollow.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/store/index.d.ts +0 -27
- package/lib/typescript/ui/store/index.d.ts.map +0 -1
- package/lib/typescript/ui/store/setupOxyStore.d.ts +0 -29
- package/lib/typescript/ui/store/setupOxyStore.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/authSlice.d.ts +0 -32
- package/lib/typescript/ui/store/slices/authSlice.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/followSlice.d.ts +0 -120
- package/lib/typescript/ui/store/slices/followSlice.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/index.d.ts +0 -9
- package/lib/typescript/ui/store/slices/index.d.ts.map +0 -1
- package/lib/typescript/ui/store/slices/types.d.ts +0 -16
- package/lib/typescript/ui/store/slices/types.d.ts.map +0 -1
- package/lib/typescript/ui/styles/shadows.d.ts +0 -233
- package/lib/typescript/ui/styles/shadows.d.ts.map +0 -1
- package/lib/typescript/utils/polyfills.d.ts +0 -6
- package/lib/typescript/utils/polyfills.d.ts.map +0 -1
- package/src/__tests__/backend-middleware.test.ts +0 -209
- package/src/__tests__/polyfills.test.ts +0 -30
- package/src/__tests__/setup.ts +0 -43
- package/src/__tests__/ui/hooks/useAuthFetch.test.ts +0 -70
- package/src/__tests__/ui/hooks/useOxyFollow.test.tsx +0 -92
- package/src/__tests__/ui/screens/AccountSettingsScreen.test.tsx +0 -112
- package/src/__tests__/ui/store/setupOxyStore.test.ts +0 -50
- package/src/__tests__/validate-structure.js +0 -91
- package/src/__tests__/validation.js +0 -42
- package/src/types/react-redux.d.ts +0 -5
- package/src/ui/components/bottomSheet/index.tsx +0 -14
- package/src/ui/hooks/useAuthFetch.ts +0 -238
- package/src/ui/hooks/useOxyFollow.ts +0 -188
- package/src/ui/screens/BillingManagementScreen.tsx +0 -589
- package/src/ui/store/index.ts +0 -36
- package/src/ui/store/setupOxyStore.ts +0 -58
- package/src/ui/store/slices/authSlice.ts +0 -43
- package/src/ui/store/slices/followSlice.ts +0 -207
- package/src/ui/store/slices/index.ts +0 -31
- package/src/ui/store/slices/types.ts +0 -33
- package/src/ui/styles/shadows.ts +0 -112
- package/src/utils/polyfills.ts +0 -34
|
@@ -4,15 +4,13 @@ import { SafeAreaProvider, useSafeAreaInsets } from 'react-native-safe-area-cont
|
|
|
4
4
|
import { GestureHandlerRootView } from 'react-native-gesture-handler';
|
|
5
5
|
import { OxyProviderProps } from '../navigation/types';
|
|
6
6
|
import { OxyContextProvider, useOxy } from '../context/OxyContext';
|
|
7
|
-
import { Provider } from 'react-redux';
|
|
8
|
-
import { store } from '../store';
|
|
9
7
|
import OxyRouter from '../navigation/OxyRouter';
|
|
10
8
|
import { FontLoader, setupFonts } from './FontLoader';
|
|
11
9
|
import { Toaster } from '../../lib/sonner';
|
|
12
10
|
|
|
13
11
|
// Import bottom sheet components directly - no longer a peer dependency
|
|
14
|
-
import { BottomSheetModal, BottomSheetBackdrop, BottomSheetBackdropProps, BottomSheetModalProvider, BottomSheetView, BottomSheetScrollView } from '
|
|
15
|
-
import type { BottomSheetModalRef } from '
|
|
12
|
+
import { BottomSheetModal, BottomSheetBackdrop, BottomSheetBackdropProps, BottomSheetModalProvider, BottomSheetView, BottomSheetScrollView } from '@gorhom/bottom-sheet';
|
|
13
|
+
import type { BottomSheetModalMethods as BottomSheetModalRef } from '@gorhom/bottom-sheet/lib/typescript/types';
|
|
16
14
|
|
|
17
15
|
// Initialize fonts automatically
|
|
18
16
|
setupFonts();
|
|
@@ -32,34 +30,15 @@ const OxyProvider: React.FC<OxyProviderProps> = (props) => {
|
|
|
32
30
|
onAuthStateChange,
|
|
33
31
|
storageKeyPrefix,
|
|
34
32
|
showInternalToaster = true,
|
|
35
|
-
store: externalStore,
|
|
36
|
-
skipReduxProvider = false,
|
|
37
33
|
...bottomSheetProps
|
|
38
34
|
} = props;
|
|
39
35
|
|
|
40
36
|
// Create internal bottom sheet ref
|
|
41
37
|
const internalBottomSheetRef = useRef<BottomSheetModalRef>(null);
|
|
42
38
|
|
|
43
|
-
// Determine which store to use
|
|
44
|
-
const storeToUse = externalStore || store;
|
|
45
|
-
|
|
46
|
-
// Helper function to wrap content with Redux Provider if needed
|
|
47
|
-
const wrapWithReduxProvider = (content: React.ReactNode) => {
|
|
48
|
-
if (skipReduxProvider) {
|
|
49
|
-
// App manages Redux Provider externally
|
|
50
|
-
return content;
|
|
51
|
-
}
|
|
52
|
-
|
|
53
|
-
return (
|
|
54
|
-
<Provider store={storeToUse}>
|
|
55
|
-
{content}
|
|
56
|
-
</Provider>
|
|
57
|
-
);
|
|
58
|
-
};
|
|
59
|
-
|
|
60
39
|
// If contextOnly is true, we just provide the context without the bottom sheet UI
|
|
61
40
|
if (contextOnly) {
|
|
62
|
-
return
|
|
41
|
+
return (
|
|
63
42
|
<OxyContextProvider
|
|
64
43
|
oxyServices={oxyServices}
|
|
65
44
|
storageKeyPrefix={storageKeyPrefix}
|
|
@@ -71,7 +50,7 @@ const OxyProvider: React.FC<OxyProviderProps> = (props) => {
|
|
|
71
50
|
}
|
|
72
51
|
|
|
73
52
|
// Otherwise, provide both the context and the bottom sheet UI
|
|
74
|
-
return
|
|
53
|
+
return (
|
|
75
54
|
<OxyContextProvider
|
|
76
55
|
oxyServices={oxyServices}
|
|
77
56
|
storageKeyPrefix={storageKeyPrefix}
|
|
@@ -118,166 +97,115 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
118
97
|
}) => {
|
|
119
98
|
// Use the internal ref (which is passed as a prop from OxyProvider)
|
|
120
99
|
const modalRef = useRef<BottomSheetModalRef>(null);
|
|
121
|
-
|
|
122
|
-
// Create a ref to store the navigation function from OxyRouter
|
|
123
100
|
const navigationRef = useRef<((screen: string, props?: Record<string, any>) => void) | null>(null);
|
|
124
|
-
|
|
125
|
-
//
|
|
126
|
-
const
|
|
127
|
-
const
|
|
128
|
-
const screenHeight = Dimensions.get('window').height;
|
|
129
|
-
|
|
130
|
-
// Set up effect to sync the internal ref with our modal ref
|
|
101
|
+
// Remove contentHeight, containerWidth, and snap point state/logic
|
|
102
|
+
// Animation values - keep for content fade/slide
|
|
103
|
+
const fadeAnim = useRef(new Animated.Value(Platform.OS === 'android' ? 1 : 0)).current;
|
|
104
|
+
const slideAnim = useRef(new Animated.Value(Platform.OS === 'android' ? 0 : 50)).current;
|
|
131
105
|
useEffect(() => {
|
|
132
106
|
if (bottomSheetRef && modalRef.current) {
|
|
133
|
-
// We need to expose certain methods to the internal ref
|
|
134
107
|
const methodsToExpose = ['snapToIndex', 'snapToPosition', 'close', 'expand', 'collapse', 'present', 'dismiss'];
|
|
135
|
-
|
|
136
108
|
methodsToExpose.forEach((method) => {
|
|
137
109
|
if (modalRef.current && typeof modalRef.current[method as keyof typeof modalRef.current] === 'function') {
|
|
138
|
-
//
|
|
139
|
-
// @ts-ignore - We're doing a runtime compatibility layer
|
|
110
|
+
// @ts-ignore
|
|
140
111
|
bottomSheetRef.current = bottomSheetRef.current || {};
|
|
141
|
-
// @ts-ignore
|
|
112
|
+
// @ts-ignore
|
|
142
113
|
bottomSheetRef.current[method] = (...args: any[]) => {
|
|
143
|
-
// @ts-ignore
|
|
114
|
+
// @ts-ignore
|
|
144
115
|
return modalRef.current?.[method]?.(...args);
|
|
145
116
|
};
|
|
146
117
|
}
|
|
147
118
|
});
|
|
148
|
-
|
|
149
119
|
// Add a method to navigate between screens
|
|
150
|
-
// @ts-ignore
|
|
120
|
+
// @ts-ignore
|
|
151
121
|
bottomSheetRef.current._navigateToScreen = (screenName: string, props?: Record<string, any>) => {
|
|
152
|
-
console.log(`Navigation requested: ${screenName}`, props);
|
|
153
|
-
|
|
154
|
-
// Try direct navigation function first (most reliable)
|
|
155
122
|
if (navigationRef.current) {
|
|
156
|
-
console.log('Using direct navigation function');
|
|
157
123
|
navigationRef.current(screenName, props);
|
|
158
124
|
return;
|
|
159
125
|
}
|
|
160
|
-
|
|
161
|
-
// Fallback to event-based navigation
|
|
162
126
|
if (typeof document !== 'undefined') {
|
|
163
|
-
// For web - use a custom event
|
|
164
|
-
console.log('Using web event navigation');
|
|
165
127
|
const event = new CustomEvent('oxy:navigate', { detail: { screen: screenName, props } });
|
|
166
128
|
document.dispatchEvent(event);
|
|
167
129
|
} else {
|
|
168
|
-
// For React Native - use the global variable approach
|
|
169
|
-
console.log('Using React Native global navigation');
|
|
170
130
|
(globalThis as any).oxyNavigateEvent = { screen: screenName, props };
|
|
171
131
|
}
|
|
172
132
|
};
|
|
173
133
|
}
|
|
174
134
|
}, [bottomSheetRef, modalRef]);
|
|
175
|
-
|
|
176
|
-
// Use percentage-based snap points for better cross-platform compatibility
|
|
177
|
-
const [snapPoints, setSnapPoints] = useState<(string | number)[]>(['60%', '90%']);
|
|
178
|
-
|
|
179
|
-
// Animation values - we'll use these for content animations
|
|
180
|
-
// Start with opacity 1 on Android to avoid visibility issues
|
|
181
|
-
const fadeAnim = useRef(new Animated.Value(Platform.OS === 'android' ? 1 : 0)).current;
|
|
182
|
-
const slideAnim = useRef(new Animated.Value(Platform.OS === 'android' ? 0 : 50)).current;
|
|
183
|
-
|
|
184
|
-
// Track keyboard status
|
|
135
|
+
// Keyboard handling (unchanged)
|
|
185
136
|
const [keyboardVisible, setKeyboardVisible] = useState(false);
|
|
186
137
|
const insets = useSafeAreaInsets();
|
|
187
|
-
|
|
188
|
-
// Handle keyboard events - memoized to prevent re-registration
|
|
189
138
|
useEffect(() => {
|
|
190
139
|
const keyboardWillShowListener = Keyboard.addListener(
|
|
191
140
|
Platform.OS === 'ios' ? 'keyboardWillShow' : 'keyboardDidShow',
|
|
192
|
-
(
|
|
141
|
+
() => {
|
|
193
142
|
setKeyboardVisible(true);
|
|
194
|
-
// Ensure the bottom sheet remains visible when keyboard opens
|
|
195
|
-
// by adjusting to the highest snap point
|
|
196
143
|
if (modalRef.current) {
|
|
197
|
-
// Use requestAnimationFrame to avoid conflicts
|
|
198
144
|
requestAnimationFrame(() => {
|
|
199
|
-
modalRef.current?.
|
|
145
|
+
modalRef.current?.expand?.();
|
|
200
146
|
});
|
|
201
147
|
}
|
|
202
148
|
}
|
|
203
149
|
);
|
|
204
|
-
|
|
205
150
|
const keyboardWillHideListener = Keyboard.addListener(
|
|
206
151
|
Platform.OS === 'ios' ? 'keyboardWillHide' : 'keyboardDidHide',
|
|
207
152
|
() => {
|
|
208
153
|
setKeyboardVisible(false);
|
|
209
154
|
}
|
|
210
155
|
);
|
|
211
|
-
|
|
212
|
-
// Cleanup listeners
|
|
213
156
|
return () => {
|
|
214
157
|
keyboardWillShowListener.remove();
|
|
215
158
|
keyboardWillHideListener.remove();
|
|
216
159
|
};
|
|
217
|
-
}, []);
|
|
218
|
-
|
|
160
|
+
}, []);
|
|
219
161
|
// Present the modal when component mounts, but only if autoPresent is true
|
|
220
162
|
useEffect(() => {
|
|
221
|
-
// Add expand method that handles presentation and animations
|
|
222
163
|
if (bottomSheetRef && modalRef.current) {
|
|
223
|
-
//
|
|
224
|
-
// @ts-ignore - Dynamic method assignment
|
|
164
|
+
// @ts-ignore
|
|
225
165
|
bottomSheetRef.current.expand = () => {
|
|
226
|
-
// Only present if not already presented
|
|
227
166
|
modalRef.current?.present();
|
|
228
|
-
|
|
229
|
-
// Start content animations after presenting
|
|
230
167
|
Animated.parallel([
|
|
231
168
|
Animated.timing(fadeAnim, {
|
|
232
169
|
toValue: 1,
|
|
233
170
|
duration: 300,
|
|
234
|
-
useNativeDriver: Platform.OS === 'ios',
|
|
171
|
+
useNativeDriver: Platform.OS === 'ios',
|
|
235
172
|
}),
|
|
236
173
|
Animated.spring(slideAnim, {
|
|
237
174
|
toValue: 0,
|
|
238
175
|
friction: 8,
|
|
239
176
|
tension: 40,
|
|
240
|
-
useNativeDriver: Platform.OS === 'ios',
|
|
177
|
+
useNativeDriver: Platform.OS === 'ios',
|
|
241
178
|
}),
|
|
242
179
|
]).start();
|
|
243
180
|
};
|
|
244
181
|
}
|
|
245
|
-
|
|
246
|
-
// Auto-present if the autoPresent prop is true
|
|
247
182
|
if (autoPresent && modalRef.current) {
|
|
248
|
-
// Small delay to allow everything to initialize
|
|
249
183
|
const timer = setTimeout(() => {
|
|
250
184
|
modalRef.current?.present();
|
|
251
|
-
|
|
252
|
-
// Start content animations after presenting
|
|
253
185
|
Animated.parallel([
|
|
254
186
|
Animated.timing(fadeAnim, {
|
|
255
187
|
toValue: 1,
|
|
256
188
|
duration: 300,
|
|
257
|
-
useNativeDriver: Platform.OS === 'ios',
|
|
189
|
+
useNativeDriver: Platform.OS === 'ios',
|
|
258
190
|
}),
|
|
259
191
|
Animated.spring(slideAnim, {
|
|
260
192
|
toValue: 0,
|
|
261
193
|
friction: 8,
|
|
262
194
|
tension: 40,
|
|
263
|
-
useNativeDriver: Platform.OS === 'ios',
|
|
195
|
+
useNativeDriver: Platform.OS === 'ios',
|
|
264
196
|
}),
|
|
265
197
|
]).start();
|
|
266
198
|
}, 100);
|
|
267
|
-
|
|
268
199
|
return () => clearTimeout(timer);
|
|
269
200
|
}
|
|
270
201
|
}, [bottomSheetRef, modalRef, fadeAnim, slideAnim, autoPresent]);
|
|
271
|
-
|
|
272
|
-
// Close the bottom sheet with animation
|
|
202
|
+
// Close the bottom sheet with animation (unchanged)
|
|
273
203
|
const handleClose = useCallback(() => {
|
|
274
|
-
// Animate content out
|
|
275
204
|
Animated.timing(fadeAnim, {
|
|
276
205
|
toValue: 0,
|
|
277
|
-
duration: Platform.OS === 'android' ? 100 : 200,
|
|
278
|
-
useNativeDriver: Platform.OS === 'ios',
|
|
206
|
+
duration: Platform.OS === 'android' ? 100 : 200,
|
|
207
|
+
useNativeDriver: Platform.OS === 'ios',
|
|
279
208
|
}).start(() => {
|
|
280
|
-
// Dismiss the sheet
|
|
281
209
|
modalRef.current?.dismiss();
|
|
282
210
|
if (onClose) {
|
|
283
211
|
setTimeout(() => {
|
|
@@ -286,33 +214,21 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
286
214
|
}
|
|
287
215
|
});
|
|
288
216
|
}, [onClose, fadeAnim]);
|
|
289
|
-
|
|
290
|
-
// Handle authentication success from the bottom sheet screens
|
|
217
|
+
// Handle authentication success (unchanged)
|
|
291
218
|
const handleAuthenticated = useCallback((user: any) => {
|
|
292
|
-
// Stop any ongoing animations that might interfere with dismissal
|
|
293
219
|
fadeAnim.stopAnimation();
|
|
294
220
|
slideAnim.stopAnimation();
|
|
295
|
-
|
|
296
|
-
// Call the prop callback if provided
|
|
297
221
|
if (onAuthenticated) {
|
|
298
222
|
onAuthenticated(user);
|
|
299
223
|
}
|
|
300
|
-
|
|
301
|
-
// Automatically dismiss the bottom sheet after successful authentication
|
|
302
|
-
// Use direct dismissal for immediate closure
|
|
303
224
|
modalRef.current?.dismiss();
|
|
304
|
-
|
|
305
|
-
// Call onClose callback if provided
|
|
306
225
|
if (onClose) {
|
|
307
226
|
setTimeout(() => {
|
|
308
227
|
onClose();
|
|
309
228
|
}, 100);
|
|
310
229
|
}
|
|
311
230
|
}, [onAuthenticated, onClose, fadeAnim, slideAnim]);
|
|
312
|
-
|
|
313
|
-
// Remove handle animation to prevent conflicts with bottom sheet animations
|
|
314
|
-
|
|
315
|
-
// Handle backdrop rendering
|
|
231
|
+
// Backdrop rendering (unchanged)
|
|
316
232
|
const renderBackdrop = useCallback(
|
|
317
233
|
(props: BottomSheetBackdropProps) => (
|
|
318
234
|
<BottomSheetBackdrop
|
|
@@ -324,93 +240,25 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
324
240
|
),
|
|
325
241
|
[]
|
|
326
242
|
);
|
|
327
|
-
|
|
328
|
-
// Memoize background style based on theme to prevent recalculation on every render
|
|
243
|
+
// Memoize background style
|
|
329
244
|
const backgroundStyle = useMemo(() => {
|
|
330
245
|
const baseColor = customStyles.backgroundColor || (theme === 'light' ? '#FFFFFF' : '#121212');
|
|
331
246
|
return {
|
|
332
247
|
backgroundColor: baseColor,
|
|
333
|
-
// Make sure there's no transparency
|
|
334
248
|
opacity: 1,
|
|
335
|
-
// Additional Android-specific styles
|
|
336
249
|
...Platform.select({
|
|
337
|
-
android: {
|
|
338
|
-
elevation: 24,
|
|
339
|
-
}
|
|
250
|
+
android: { elevation: 24 },
|
|
340
251
|
})
|
|
341
252
|
};
|
|
342
253
|
}, [customStyles.backgroundColor, theme]);
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
|
|
346
|
-
setSnapPoints(prevSnapPoints => {
|
|
347
|
-
// Ensure snap points are high enough when keyboard is visible
|
|
348
|
-
if (keyboardVisible) {
|
|
349
|
-
// If keyboard is visible, make sure we use higher snap points
|
|
350
|
-
// to ensure the sheet content remains visible
|
|
351
|
-
const highestPoint = points[points.length - 1];
|
|
352
|
-
const newSnapPoints = [highestPoint, highestPoint];
|
|
353
|
-
// Only update if actually different
|
|
354
|
-
if (JSON.stringify(prevSnapPoints) !== JSON.stringify(newSnapPoints)) {
|
|
355
|
-
return newSnapPoints;
|
|
356
|
-
}
|
|
357
|
-
return prevSnapPoints;
|
|
358
|
-
} else {
|
|
359
|
-
// If we have content height, use it as a constraint
|
|
360
|
-
if (contentHeight > 0) {
|
|
361
|
-
// Calculate content height as percentage of screen (plus some padding)
|
|
362
|
-
// Clamp to ensure we don't exceed 90% to leave space for UI elements
|
|
363
|
-
const contentHeightPercent = Math.min(Math.ceil((contentHeight) / screenHeight * 100), 90);
|
|
364
|
-
const contentHeightPercentStr = `${contentHeightPercent}%`;
|
|
365
|
-
// Use content height for first snap point if it's taller than the default
|
|
366
|
-
const firstPoint = contentHeight / screenHeight > 0.6 ? contentHeightPercentStr : points[0];
|
|
367
|
-
const newSnapPoints = [firstPoint, points[1] || '90%'];
|
|
368
|
-
// Only update if actually different
|
|
369
|
-
if (JSON.stringify(prevSnapPoints) !== JSON.stringify(newSnapPoints)) {
|
|
370
|
-
return newSnapPoints;
|
|
371
|
-
}
|
|
372
|
-
return prevSnapPoints;
|
|
373
|
-
} else {
|
|
374
|
-
// Only update if actually different
|
|
375
|
-
if (JSON.stringify(prevSnapPoints) !== JSON.stringify(points)) {
|
|
376
|
-
return points;
|
|
377
|
-
}
|
|
378
|
-
return prevSnapPoints;
|
|
379
|
-
}
|
|
380
|
-
}
|
|
381
|
-
});
|
|
382
|
-
}, [keyboardVisible, contentHeight, screenHeight]);
|
|
383
|
-
|
|
384
|
-
// Handle content layout changes to measure height and width - prevent rerender loops
|
|
385
|
-
const handleContentLayout = useCallback((event: any) => {
|
|
386
|
-
const { height: layoutHeight, width: layoutWidth } = event.nativeEvent.layout;
|
|
387
|
-
|
|
388
|
-
// Only update if values actually changed to prevent unnecessary rerenders
|
|
389
|
-
setContentHeight(prevHeight => {
|
|
390
|
-
if (Math.abs(prevHeight - layoutHeight) > 5) { // 5px threshold to prevent minor fluctuations
|
|
391
|
-
return layoutHeight;
|
|
392
|
-
}
|
|
393
|
-
return prevHeight;
|
|
394
|
-
});
|
|
395
|
-
|
|
396
|
-
setContainerWidth(prevWidth => {
|
|
397
|
-
if (Math.abs(prevWidth - layoutWidth) > 5) { // 5px threshold to prevent minor fluctuations
|
|
398
|
-
return layoutWidth;
|
|
399
|
-
}
|
|
400
|
-
return prevWidth;
|
|
401
|
-
});
|
|
402
|
-
}, []); // Remove dependencies that cause rerender loops
|
|
403
|
-
|
|
404
|
-
// Handle sheet index changes - simplified to prevent unnecessary rerenders
|
|
405
|
-
const handleSheetChanges = useCallback((index: number) => {
|
|
406
|
-
// Sheet change handling can be added here if needed
|
|
407
|
-
}, []);
|
|
408
|
-
|
|
254
|
+
// Handle sheet index changes (unchanged)
|
|
255
|
+
const handleSheetChanges = useCallback((index: number) => { }, []);
|
|
256
|
+
// Modernized BottomSheetModal usage
|
|
409
257
|
return (
|
|
410
258
|
<BottomSheetModal
|
|
411
259
|
ref={modalRef}
|
|
412
260
|
index={0}
|
|
413
|
-
|
|
261
|
+
enableDynamicSizing={true}
|
|
414
262
|
enablePanDownToClose
|
|
415
263
|
backdropComponent={renderBackdrop}
|
|
416
264
|
backgroundStyle={[
|
|
@@ -427,16 +275,17 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
427
275
|
}}
|
|
428
276
|
onChange={handleSheetChanges}
|
|
429
277
|
style={styles.bottomSheetContainer}
|
|
430
|
-
// Adding additional props to improve layout behavior
|
|
431
278
|
keyboardBehavior="interactive"
|
|
432
279
|
keyboardBlurBehavior="restore"
|
|
433
280
|
android_keyboardInputMode="adjustResize"
|
|
434
|
-
enableOverDrag={
|
|
281
|
+
enableOverDrag={false}
|
|
435
282
|
enableContentPanningGesture={true}
|
|
436
283
|
enableHandlePanningGesture={true}
|
|
437
284
|
overDragResistanceFactor={2.5}
|
|
438
285
|
enableBlurKeyboardOnGesture={true}
|
|
439
|
-
|
|
286
|
+
detached
|
|
287
|
+
// Uncomment below to use a sticky footer
|
|
288
|
+
// footerComponent={<YourFooterComponent />}
|
|
440
289
|
onAnimate={(fromIndex: number, toIndex: number) => {
|
|
441
290
|
console.log(`Animating from index ${fromIndex} to ${toIndex}`);
|
|
442
291
|
}}
|
|
@@ -444,23 +293,15 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
444
293
|
<BottomSheetScrollView
|
|
445
294
|
style={[
|
|
446
295
|
styles.contentContainer,
|
|
447
|
-
// Override padding if provided in customStyles
|
|
448
|
-
customStyles.contentPadding !== undefined && { padding: customStyles.contentPadding },
|
|
449
296
|
]}
|
|
450
|
-
onLayout={handleContentLayout}
|
|
451
297
|
>
|
|
452
298
|
<View style={styles.centeredContentWrapper}>
|
|
453
299
|
<Animated.View
|
|
454
300
|
style={[
|
|
455
301
|
styles.animatedContent,
|
|
456
|
-
// Apply animations - conditionally for Android
|
|
457
302
|
Platform.OS === 'android' ?
|
|
458
|
-
{
|
|
459
|
-
|
|
460
|
-
} : {
|
|
461
|
-
opacity: fadeAnim,
|
|
462
|
-
transform: [{ translateY: slideAnim }]
|
|
463
|
-
}
|
|
303
|
+
{ opacity: 1 } :
|
|
304
|
+
{ opacity: fadeAnim, transform: [{ translateY: slideAnim }] }
|
|
464
305
|
]}
|
|
465
306
|
>
|
|
466
307
|
<OxyRouter
|
|
@@ -469,14 +310,12 @@ const OxyBottomSheet: React.FC<OxyProviderProps> = ({
|
|
|
469
310
|
onClose={handleClose}
|
|
470
311
|
onAuthenticated={handleAuthenticated}
|
|
471
312
|
theme={theme}
|
|
472
|
-
adjustSnapPoints={adjustSnapPoints}
|
|
473
313
|
navigationRef={navigationRef}
|
|
474
|
-
containerWidth={
|
|
314
|
+
containerWidth={800} // static, since dynamic sizing is used
|
|
475
315
|
/>
|
|
476
316
|
</Animated.View>
|
|
477
317
|
</View>
|
|
478
318
|
</BottomSheetScrollView>
|
|
479
|
-
{/* Internal toaster - only show if showInternalToaster is true */}
|
|
480
319
|
{showInternalToaster && (
|
|
481
320
|
<View style={styles.toasterContainer}>
|
|
482
321
|
<Toaster position="top-center" swipeToDismissDirection="left" />
|
|
@@ -521,7 +360,6 @@ const styles = StyleSheet.create({
|
|
|
521
360
|
position: 'relative',
|
|
522
361
|
backgroundColor: 'transparent',
|
|
523
362
|
...Platform.select({
|
|
524
|
-
|
|
525
363
|
android: {
|
|
526
364
|
height: '100%',
|
|
527
365
|
width: '100%',
|
|
@@ -2,7 +2,7 @@ import React from 'react';
|
|
|
2
2
|
import { TouchableOpacity, Text, View, StyleSheet, ViewStyle, TextStyle, StyleProp, Platform } from 'react-native';
|
|
3
3
|
import { useOxy } from '../context/OxyContext';
|
|
4
4
|
import OxyLogo from './OxyLogo';
|
|
5
|
-
import { fontFamilies
|
|
5
|
+
import { fontFamilies } from '../styles/fonts';
|
|
6
6
|
|
|
7
7
|
export interface OxySignInButtonProps {
|
|
8
8
|
/**
|
|
@@ -168,7 +168,18 @@ const styles = StyleSheet.create({
|
|
|
168
168
|
backgroundColor: '#FFFFFF',
|
|
169
169
|
borderWidth: 1,
|
|
170
170
|
borderColor: '#DDDDDD',
|
|
171
|
-
...
|
|
171
|
+
...Platform.select({
|
|
172
|
+
web: {
|
|
173
|
+
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
|
|
174
|
+
},
|
|
175
|
+
default: {
|
|
176
|
+
shadowColor: '#000000',
|
|
177
|
+
shadowOffset: { width: 0, height: 2 },
|
|
178
|
+
shadowOpacity: 0.1,
|
|
179
|
+
shadowRadius: 4,
|
|
180
|
+
elevation: 2,
|
|
181
|
+
}
|
|
182
|
+
}),
|
|
172
183
|
},
|
|
173
184
|
buttonOutline: {
|
|
174
185
|
backgroundColor: 'transparent',
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { View, StyleSheet } from 'react-native';
|
|
3
|
+
import Svg, { G, Path } from 'react-native-svg';
|
|
4
|
+
|
|
5
|
+
interface FAIRWalletIconProps {
|
|
6
|
+
size?: number;
|
|
7
|
+
style?: any;
|
|
8
|
+
}
|
|
9
|
+
|
|
10
|
+
const FAIRWalletIcon: React.FC<FAIRWalletIconProps> = ({ size = 28, style }) => {
|
|
11
|
+
const containerSize = size + 18;
|
|
12
|
+
return (
|
|
13
|
+
<View
|
|
14
|
+
style={[
|
|
15
|
+
styles.circle,
|
|
16
|
+
{ width: containerSize, height: containerSize, borderRadius: containerSize / 2 },
|
|
17
|
+
style,
|
|
18
|
+
]}
|
|
19
|
+
>
|
|
20
|
+
<View style={{ flex: 1, alignItems: 'center', justifyContent: 'center' }}>
|
|
21
|
+
<Svg
|
|
22
|
+
viewBox="0 0 157.26 85.66"
|
|
23
|
+
width={containerSize * 0.8}
|
|
24
|
+
height={containerSize * 0.8}
|
|
25
|
+
preserveAspectRatio="xMidYMid meet"
|
|
26
|
+
>
|
|
27
|
+
<G data-name="Layer 2">
|
|
28
|
+
<G data-name="Layer 1">
|
|
29
|
+
<Path d="M10.25,20.81a20.49,20.49,0,0,1,28,7.5L53.6,54.92a20.49,20.49,0,0,1-7.5,28h0a20.49,20.49,0,0,1-28-7.5L2.75,48.8a20.49,20.49,0,0,1,7.5-28Z" fill="rgb(159, 251, 80)" />
|
|
30
|
+
<Path d="M74.38,2.75a20.49,20.49,0,0,0-28,7.5L20.6,54.92a20.5,20.5,0,0,0,7.5,28h0a20.5,20.5,0,0,0,28-7.5L81.88,30.74a20.48,20.48,0,0,0-7.5-28Z" fill="rgb(159, 251, 80)" />
|
|
31
|
+
<Path d="M127.87,2.75a20.49,20.49,0,0,0-28,7.5L74.09,54.92a20.49,20.49,0,0,0,7.5,28h0a20.49,20.49,0,0,0,28-7.5l25.79-44.67a20.49,20.49,0,0,0-7.5-28Z" fill="rgb(255, 255, 255)" />
|
|
32
|
+
<Path d="M121.84,67.51a17.71,17.71,0,1,1,17.71,17.71,17.71,17.71,0,0,1-17.71-17.71Z" fill="rgb(255, 255, 255)" />
|
|
33
|
+
</G>
|
|
34
|
+
</G>
|
|
35
|
+
</Svg>
|
|
36
|
+
</View>
|
|
37
|
+
</View>
|
|
38
|
+
);
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
const styles = StyleSheet.create({
|
|
42
|
+
circle: {
|
|
43
|
+
backgroundColor: '#1b1f0a',
|
|
44
|
+
alignItems: 'center',
|
|
45
|
+
justifyContent: 'center',
|
|
46
|
+
},
|
|
47
|
+
});
|
|
48
|
+
|
|
49
|
+
export default FAIRWalletIcon;
|
|
@@ -13,3 +13,4 @@ export { FontLoader, setupFonts } from './FontLoader';
|
|
|
13
13
|
export { default as OxyLogo } from './OxyLogo';
|
|
14
14
|
export { default as OxyProvider } from './OxyProvider';
|
|
15
15
|
export { default as OxySignInButton } from './OxySignInButton';
|
|
16
|
+
export { default as OxyPayButton } from './OxyPayButton';
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
-
import { View, TouchableOpacity, Text, ActivityIndicator, StyleSheet } from 'react-native';
|
|
2
|
+
import { View, TouchableOpacity, Text, ActivityIndicator, StyleSheet, Platform } from 'react-native';
|
|
3
3
|
import { Ionicons } from '@expo/vector-icons';
|
|
4
4
|
|
|
5
5
|
interface ButtonConfig {
|
|
@@ -32,13 +32,17 @@ const GroupedPillButtons: React.FC<GroupedPillButtonsProps> = ({
|
|
|
32
32
|
gap: 6,
|
|
33
33
|
minWidth: 70,
|
|
34
34
|
borderWidth: 1,
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
35
|
+
...Platform.select({
|
|
36
|
+
web: {
|
|
37
|
+
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
|
|
38
|
+
},
|
|
39
|
+
default: {
|
|
40
|
+
shadowOffset: { width: 0, height: 2 },
|
|
41
|
+
shadowOpacity: 0.1,
|
|
42
|
+
shadowRadius: 4,
|
|
43
|
+
elevation: 2,
|
|
44
|
+
}
|
|
45
|
+
}),
|
|
42
46
|
};
|
|
43
47
|
|
|
44
48
|
// Determine border radius based on position
|