@oxyhq/services 6.9.44 → 6.9.46
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/commonjs/ui/components/OxyPayButton.js +4 -2
- package/lib/commonjs/ui/components/OxyPayButton.js.map +1 -1
- package/lib/commonjs/ui/components/OxyProvider.js +6 -5
- package/lib/commonjs/ui/components/OxyProvider.js.map +1 -1
- package/lib/commonjs/ui/components/OxySignInButton.js +83 -82
- package/lib/commonjs/ui/components/OxySignInButton.js.map +1 -1
- package/lib/commonjs/ui/components/SignInModal.js +271 -102
- package/lib/commonjs/ui/components/SignInModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js +76 -121
- package/lib/commonjs/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js +24 -15
- package/lib/commonjs/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js +32 -18
- package/lib/commonjs/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/commonjs/ui/components/icon/OxyIcon.js +5 -4
- package/lib/commonjs/ui/components/icon/OxyIcon.js.map +1 -1
- package/lib/commonjs/ui/components/index.js +0 -35
- package/lib/commonjs/ui/components/index.js.map +1 -1
- package/lib/commonjs/ui/components/internal/PinInput.js +3 -2
- package/lib/commonjs/ui/components/internal/PinInput.js.map +1 -1
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js +83 -219
- package/lib/commonjs/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js +26 -13
- package/lib/commonjs/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js +50 -28
- package/lib/commonjs/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js +83 -48
- package/lib/commonjs/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js +11 -10
- package/lib/commonjs/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js +38 -23
- package/lib/commonjs/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/commonjs/ui/constants/theme.js +2 -2
- package/lib/commonjs/ui/constants/theme.js.map +1 -1
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js +4 -3
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +13 -13
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +117 -142
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +112 -78
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +213 -144
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +26 -14
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FeedbackScreen.js +57 -51
- package/lib/commonjs/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/FileManagementScreen.js +108 -86
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +109 -130
- package/lib/commonjs/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js +15 -8
- package/lib/commonjs/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js +60 -54
- package/lib/commonjs/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js +12 -9
- package/lib/commonjs/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js +66 -93
- package/lib/commonjs/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js +159 -190
- package/lib/commonjs/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js +20 -22
- package/lib/commonjs/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js +16 -17
- package/lib/commonjs/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/SessionManagementScreen.js +127 -70
- package/lib/commonjs/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/UserLinksScreen.js +13 -29
- package/lib/commonjs/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js +110 -52
- package/lib/commonjs/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js +3 -5
- package/lib/commonjs/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/commonjs/ui/utils/fileManagement.js +0 -21
- package/lib/commonjs/ui/utils/fileManagement.js.map +1 -1
- package/lib/module/ui/components/OxyPayButton.js +4 -2
- package/lib/module/ui/components/OxyPayButton.js.map +1 -1
- package/lib/module/ui/components/OxyProvider.js +6 -5
- package/lib/module/ui/components/OxyProvider.js.map +1 -1
- package/lib/module/ui/components/OxySignInButton.js +84 -83
- package/lib/module/ui/components/OxySignInButton.js.map +1 -1
- package/lib/module/ui/components/SignInModal.js +271 -100
- package/lib/module/ui/components/SignInModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js +76 -122
- package/lib/module/ui/components/fileManagement/FileDetailsModal.js.map +1 -1
- package/lib/module/ui/components/fileManagement/FileViewer.js +24 -15
- package/lib/module/ui/components/fileManagement/FileViewer.js.map +1 -1
- package/lib/module/ui/components/fileManagement/UploadPreview.js +32 -19
- package/lib/module/ui/components/fileManagement/UploadPreview.js.map +1 -1
- package/lib/module/ui/components/icon/OxyIcon.js +5 -4
- package/lib/module/ui/components/icon/OxyIcon.js.map +1 -1
- package/lib/module/ui/components/index.js +0 -5
- package/lib/module/ui/components/index.js.map +1 -1
- package/lib/module/ui/components/internal/PinInput.js +3 -2
- package/lib/module/ui/components/internal/PinInput.js.map +1 -1
- package/lib/module/ui/components/modals/DeleteAccountModal.js +83 -220
- package/lib/module/ui/components/modals/DeleteAccountModal.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentDetailsStep.js +26 -13
- package/lib/module/ui/components/payment/PaymentDetailsStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentMethodStep.js +49 -26
- package/lib/module/ui/components/payment/PaymentMethodStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentReviewStep.js +84 -48
- package/lib/module/ui/components/payment/PaymentReviewStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSuccessStep.js +11 -9
- package/lib/module/ui/components/payment/PaymentSuccessStep.js.map +1 -1
- package/lib/module/ui/components/payment/PaymentSummaryStep.js +38 -22
- package/lib/module/ui/components/payment/PaymentSummaryStep.js.map +1 -1
- package/lib/module/ui/constants/theme.js +2 -2
- package/lib/module/ui/constants/theme.js.map +1 -1
- package/lib/module/ui/context/hooks/useAuthOperations.js +4 -3
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +12 -13
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +117 -142
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +112 -78
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +213 -145
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +28 -16
- package/lib/module/ui/screens/AccountVerificationScreen.js.map +1 -1
- package/lib/module/ui/screens/FeedbackScreen.js +48 -42
- package/lib/module/ui/screens/FeedbackScreen.js.map +1 -1
- package/lib/module/ui/screens/FileManagementScreen.js +110 -88
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +110 -131
- package/lib/module/ui/screens/HistoryViewScreen.js.map +1 -1
- package/lib/module/ui/screens/LanguageSelectorScreen.js +16 -9
- package/lib/module/ui/screens/LanguageSelectorScreen.js.map +1 -1
- package/lib/module/ui/screens/LegalDocumentsScreen.js +61 -55
- package/lib/module/ui/screens/LegalDocumentsScreen.js.map +1 -1
- package/lib/module/ui/screens/PaymentGatewayScreen.js +12 -9
- package/lib/module/ui/screens/PaymentGatewayScreen.js.map +1 -1
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js +66 -94
- package/lib/module/ui/screens/PremiumSubscriptionScreen.js.map +1 -1
- package/lib/module/ui/screens/PrivacySettingsScreen.js +161 -192
- package/lib/module/ui/screens/PrivacySettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SavesCollectionsScreen.js +21 -23
- package/lib/module/ui/screens/SavesCollectionsScreen.js.map +1 -1
- package/lib/module/ui/screens/SearchSettingsScreen.js +17 -18
- package/lib/module/ui/screens/SearchSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/SessionManagementScreen.js +128 -72
- package/lib/module/ui/screens/SessionManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/UserLinksScreen.js +15 -31
- package/lib/module/ui/screens/UserLinksScreen.js.map +1 -1
- package/lib/module/ui/screens/WelcomeNewUserScreen.js +110 -52
- package/lib/module/ui/screens/WelcomeNewUserScreen.js.map +1 -1
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js +4 -6
- package/lib/module/ui/screens/karma/KarmaFAQScreen.js.map +1 -1
- package/lib/module/ui/utils/fileManagement.js +0 -20
- package/lib/module/ui/utils/fileManagement.js.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts +0 -1
- package/lib/typescript/commonjs/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts +3 -4
- package/lib/typescript/commonjs/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts +2 -3
- package/lib/typescript/commonjs/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/icon/OxyIcon.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/index.d.ts +0 -5
- package/lib/typescript/commonjs/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts +2 -2
- package/lib/typescript/commonjs/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts +1 -1
- package/lib/typescript/commonjs/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts +0 -4
- package/lib/typescript/commonjs/ui/utils/fileManagement.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyPayButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts +0 -1
- package/lib/typescript/module/ui/components/OxySignInButton.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts +3 -4
- package/lib/typescript/module/ui/components/fileManagement/FileDetailsModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts +2 -3
- package/lib/typescript/module/ui/components/fileManagement/UploadPreview.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/icon/OxyIcon.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/index.d.ts +0 -5
- package/lib/typescript/module/ui/components/index.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/internal/PinInput.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts +2 -2
- package/lib/typescript/module/ui/components/modals/DeleteAccountModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentDetailsStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentMethodStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentReviewStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSuccessStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/payment/PaymentSummaryStep.d.ts.map +1 -1
- package/lib/typescript/module/ui/context/hooks/useAuthOperations.d.ts.map +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts +1 -1
- package/lib/typescript/module/ui/navigation/bottomSheetManager.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountCenterScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountOverviewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountSwitcherScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/AccountVerificationScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FeedbackScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/FileManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/HistoryViewScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LanguageSelectorScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/LegalDocumentsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PaymentGatewayScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PremiumSubscriptionScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/PrivacySettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SearchSettingsScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/SessionManagementScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/UserLinksScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/WelcomeNewUserScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/screens/karma/KarmaFAQScreen.d.ts.map +1 -1
- package/lib/typescript/module/ui/utils/fileManagement.d.ts +0 -4
- package/lib/typescript/module/ui/utils/fileManagement.d.ts.map +1 -1
- package/package.json +3 -3
- package/src/ui/components/OxyPayButton.tsx +5 -3
- package/src/ui/components/OxyProvider.tsx +6 -5
- package/src/ui/components/OxySignInButton.tsx +82 -81
- package/src/ui/components/SignInModal.tsx +186 -42
- package/src/ui/components/fileManagement/FileDetailsModal.tsx +69 -99
- package/src/ui/components/fileManagement/FileViewer.tsx +25 -15
- package/src/ui/components/fileManagement/UploadPreview.tsx +58 -46
- package/src/ui/components/icon/OxyIcon.tsx +5 -4
- package/src/ui/components/index.ts +0 -5
- package/src/ui/components/internal/PinInput.tsx +4 -3
- package/src/ui/components/modals/DeleteAccountModal.tsx +79 -221
- package/src/ui/components/payment/PaymentDetailsStep.tsx +16 -19
- package/src/ui/components/payment/PaymentMethodStep.tsx +33 -35
- package/src/ui/components/payment/PaymentReviewStep.tsx +63 -67
- package/src/ui/components/payment/PaymentSuccessStep.tsx +4 -12
- package/src/ui/components/payment/PaymentSummaryStep.tsx +26 -33
- package/src/ui/constants/theme.ts +2 -2
- package/src/ui/context/hooks/useAuthOperations.ts +4 -3
- package/src/ui/screens/AccountCenterScreen.tsx +36 -139
- package/src/ui/screens/AccountOverviewScreen.tsx +107 -163
- package/src/ui/screens/AccountSettingsScreen.tsx +142 -156
- package/src/ui/screens/AccountSwitcherScreen.tsx +226 -199
- package/src/ui/screens/AccountVerificationScreen.tsx +34 -25
- package/src/ui/screens/FeedbackScreen.tsx +50 -38
- package/src/ui/screens/FileManagementScreen.tsx +88 -88
- package/src/ui/screens/HistoryViewScreen.tsx +79 -207
- package/src/ui/screens/LanguageSelectorScreen.tsx +19 -7
- package/src/ui/screens/LegalDocumentsScreen.tsx +46 -63
- package/src/ui/screens/PaymentGatewayScreen.tsx +11 -12
- package/src/ui/screens/PremiumSubscriptionScreen.tsx +73 -93
- package/src/ui/screens/PrivacySettingsScreen.tsx +81 -193
- package/src/ui/screens/SavesCollectionsScreen.tsx +23 -23
- package/src/ui/screens/SearchSettingsScreen.tsx +11 -19
- package/src/ui/screens/SessionManagementScreen.tsx +130 -76
- package/src/ui/screens/UserLinksScreen.tsx +15 -32
- package/src/ui/screens/WelcomeNewUserScreen.tsx +46 -20
- package/src/ui/screens/karma/KarmaFAQScreen.tsx +4 -6
- package/src/ui/utils/fileManagement.ts +0 -30
- package/lib/commonjs/ui/components/GroupedItem.js +0 -138
- package/lib/commonjs/ui/components/GroupedItem.js.map +0 -1
- package/lib/commonjs/ui/components/GroupedSection.js +0 -41
- package/lib/commonjs/ui/components/GroupedSection.js.map +0 -1
- package/lib/commonjs/ui/components/Section.js +0 -39
- package/lib/commonjs/ui/components/Section.js.map +0 -1
- package/lib/commonjs/ui/components/SectionTitle.js +0 -29
- package/lib/commonjs/ui/components/SectionTitle.js.map +0 -1
- package/lib/commonjs/ui/components/SettingRow.js +0 -90
- package/lib/commonjs/ui/components/SettingRow.js.map +0 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +0 -206
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js.map +0 -1
- package/lib/commonjs/ui/utils/confirmAction.js +0 -28
- package/lib/commonjs/ui/utils/confirmAction.js.map +0 -1
- package/lib/module/ui/components/GroupedItem.js +0 -135
- package/lib/module/ui/components/GroupedItem.js.map +0 -1
- package/lib/module/ui/components/GroupedSection.js +0 -37
- package/lib/module/ui/components/GroupedSection.js.map +0 -1
- package/lib/module/ui/components/Section.js +0 -34
- package/lib/module/ui/components/Section.js.map +0 -1
- package/lib/module/ui/components/SectionTitle.js +0 -25
- package/lib/module/ui/components/SectionTitle.js.map +0 -1
- package/lib/module/ui/components/SettingRow.js +0 -85
- package/lib/module/ui/components/SettingRow.js.map +0 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +0 -202
- package/lib/module/ui/components/internal/GroupedPillButtons.js.map +0 -1
- package/lib/module/ui/utils/confirmAction.js +0 -25
- package/lib/module/ui/utils/confirmAction.js.map +0 -1
- package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/GroupedItem.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts +0 -30
- package/lib/typescript/commonjs/ui/components/GroupedSection.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/Section.d.ts +0 -12
- package/lib/typescript/commonjs/ui/components/Section.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SectionTitle.d.ts +0 -10
- package/lib/typescript/commonjs/ui/components/SectionTitle.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/SettingRow.d.ts +0 -20
- package/lib/typescript/commonjs/ui/components/SettingRow.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts +0 -24
- package/lib/typescript/commonjs/ui/components/internal/GroupedPillButtons.d.ts.map +0 -1
- package/lib/typescript/commonjs/ui/utils/confirmAction.d.ts +0 -7
- package/lib/typescript/commonjs/ui/utils/confirmAction.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/GroupedItem.d.ts +0 -24
- package/lib/typescript/module/ui/components/GroupedItem.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/GroupedSection.d.ts +0 -30
- package/lib/typescript/module/ui/components/GroupedSection.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/Section.d.ts +0 -12
- package/lib/typescript/module/ui/components/Section.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SectionTitle.d.ts +0 -10
- package/lib/typescript/module/ui/components/SectionTitle.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/SettingRow.d.ts +0 -20
- package/lib/typescript/module/ui/components/SettingRow.d.ts.map +0 -1
- package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts +0 -24
- package/lib/typescript/module/ui/components/internal/GroupedPillButtons.d.ts.map +0 -1
- package/lib/typescript/module/ui/utils/confirmAction.d.ts +0 -7
- package/lib/typescript/module/ui/utils/confirmAction.d.ts.map +0 -1
- package/src/ui/components/GroupedItem.tsx +0 -161
- package/src/ui/components/GroupedSection.tsx +0 -60
- package/src/ui/components/Section.tsx +0 -42
- package/src/ui/components/SectionTitle.tsx +0 -27
- package/src/ui/components/SettingRow.tsx +0 -98
- package/src/ui/components/internal/GroupedPillButtons.tsx +0 -250
- package/src/ui/utils/confirmAction.ts +0 -23
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
2
|
import { useState } from 'react';
|
|
3
3
|
import { TouchableOpacity, Text, View, StyleSheet, type ViewStyle, type TextStyle, type StyleProp, type LayoutChangeEvent } from 'react-native';
|
|
4
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
4
5
|
import { fontFamilies } from '../styles/fonts';
|
|
5
6
|
import type { PaymentItem, PaymentGatewayResult } from '../screens/PaymentGatewayScreen';
|
|
6
7
|
import OxyLogo from './OxyLogo';
|
|
@@ -42,13 +43,14 @@ const OxyPayButton: React.FC<OxyPayButtonProps> = ({
|
|
|
42
43
|
color,
|
|
43
44
|
variant = 'white',
|
|
44
45
|
}) => {
|
|
46
|
+
const theme = useTheme();
|
|
45
47
|
const [buttonHeight, setButtonHeight] = useState<number>(52);
|
|
46
48
|
const handlePress = () => {
|
|
47
49
|
console.warn('OxyPayButton: The bottom sheet payment flow has been removed. Provide a custom onPress handler.');
|
|
48
50
|
};
|
|
49
51
|
// Determine background and text color
|
|
50
|
-
const backgroundColor = color || (variant === 'black' ?
|
|
51
|
-
const textColor = variant === 'black' || (color && isColorDark(color)) ?
|
|
52
|
+
const backgroundColor = color || (variant === 'black' ? theme.colors.text : theme.colors.background);
|
|
53
|
+
const textColor = variant === 'black' || (color && isColorDark(color)) ? theme.colors.background : '#1b1f0a';
|
|
52
54
|
// Responsive sizing
|
|
53
55
|
const logoWidth = Math.round(buttonHeight * 0.5); // 50% of button height
|
|
54
56
|
const logoHeight = Math.round(buttonHeight * 0.25); // 25% of button height
|
|
@@ -120,4 +122,4 @@ const styles = StyleSheet.create({
|
|
|
120
122
|
},
|
|
121
123
|
});
|
|
122
124
|
|
|
123
|
-
export default OxyPayButton;
|
|
125
|
+
export default OxyPayButton;
|
|
@@ -19,7 +19,7 @@ const isWeb = Platform.OS === 'web';
|
|
|
19
19
|
// The .then() extracts + casts the default export so that `lazy()` sees
|
|
20
20
|
// `Promise<{ default: ComponentType }>` instead of the full module namespace.
|
|
21
21
|
const LazyBottomSheetRouter = lazy((): Promise<{ default: ComponentType }> =>
|
|
22
|
-
import('./BottomSheetRouter
|
|
22
|
+
import('./BottomSheetRouter').then(
|
|
23
23
|
(mod) => ({ default: mod.default as unknown as ComponentType }),
|
|
24
24
|
(error) => {
|
|
25
25
|
if (__DEV__) {
|
|
@@ -31,7 +31,7 @@ const LazyBottomSheetRouter = lazy((): Promise<{ default: ComponentType }> =>
|
|
|
31
31
|
);
|
|
32
32
|
|
|
33
33
|
const LazySignInModal = lazy((): Promise<{ default: ComponentType }> =>
|
|
34
|
-
import('./SignInModal
|
|
34
|
+
import('./SignInModal').then(
|
|
35
35
|
(mod) => ({ default: mod.default as unknown as ComponentType }),
|
|
36
36
|
() => ({ default: (() => null) as FC }),
|
|
37
37
|
),
|
|
@@ -83,12 +83,13 @@ const OxyProvider: FC<OxyProviderProps> = ({
|
|
|
83
83
|
colorPreset,
|
|
84
84
|
}) => {
|
|
85
85
|
|
|
86
|
-
// Dynamic KeyboardProvider for native (avoids require() for ESM compatibility)
|
|
86
|
+
// Dynamic KeyboardProvider for native (avoids require() for ESM compatibility).
|
|
87
|
+
// Literal-string import: Hermes/Metro require static strings in production
|
|
88
|
+
// bundles, not variable expressions or webpackIgnore comments.
|
|
87
89
|
const [KBProvider, setKBProvider] = useState<FC<{ children: ReactNode }> | null>(null);
|
|
88
90
|
useEffect(() => {
|
|
89
91
|
if (isWeb) return;
|
|
90
|
-
|
|
91
|
-
import(/* webpackIgnore: true */ moduleName)
|
|
92
|
+
import('react-native-keyboard-controller')
|
|
92
93
|
.then((mod) => setKBProvider(() => mod.KeyboardProvider))
|
|
93
94
|
.catch(() => { /* KeyboardProvider not available */ });
|
|
94
95
|
}, []);
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
import type React from 'react';
|
|
2
|
-
import { useCallback, useState, useEffect } from 'react';
|
|
2
|
+
import { useCallback, useState, useEffect, useMemo } from 'react';
|
|
3
3
|
import { TouchableOpacity, Text, View, StyleSheet, type ViewStyle, type TextStyle, type StyleProp, Platform } from 'react-native';
|
|
4
4
|
import { useAuthStore } from '../stores/authStore';
|
|
5
5
|
import { useShallow } from 'zustand/react/shallow';
|
|
6
|
+
import { useTheme } from '@oxyhq/bloom/theme';
|
|
6
7
|
import { fontFamilies } from '../styles/fonts';
|
|
7
8
|
import OxyLogo from './OxyLogo';
|
|
8
9
|
import { showSignInModal, subscribeToSignInModal } from './SignInModal';
|
|
@@ -51,26 +52,25 @@ export interface OxySignInButtonProps {
|
|
|
51
52
|
|
|
52
53
|
/**
|
|
53
54
|
* A pre-styled button component for signing in with Oxy identity
|
|
54
|
-
*
|
|
55
|
+
*
|
|
55
56
|
* This component opens the Oxy Auth flow which allows users to authenticate
|
|
56
57
|
* using their Oxy Accounts identity (via QR code or deep link).
|
|
57
|
-
*
|
|
58
|
+
*
|
|
58
59
|
* @example
|
|
59
60
|
* ```tsx
|
|
60
61
|
* // Basic usage
|
|
61
62
|
* <OxySignInButton />
|
|
62
|
-
*
|
|
63
|
+
*
|
|
63
64
|
* // Custom styling
|
|
64
|
-
* <OxySignInButton
|
|
65
|
-
* variant="contained"
|
|
66
|
-
* style={{ marginTop: 20 }}
|
|
67
|
-
* text="Login with Oxy"
|
|
65
|
+
* <OxySignInButton
|
|
66
|
+
* variant="contained"
|
|
67
|
+
* style={{ marginTop: 20 }}
|
|
68
|
+
* text="Login with Oxy"
|
|
68
69
|
* />
|
|
69
|
-
*
|
|
70
|
+
*
|
|
70
71
|
* // Custom handler
|
|
71
72
|
* <OxySignInButton onPress={() => {
|
|
72
73
|
* // Custom authentication flow
|
|
73
|
-
* console.log('Custom auth flow initiated');
|
|
74
74
|
* }} />
|
|
75
75
|
* ```
|
|
76
76
|
*/
|
|
@@ -83,6 +83,7 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
83
83
|
disabled = false,
|
|
84
84
|
showWhenAuthenticated = false,
|
|
85
85
|
}) => {
|
|
86
|
+
const theme = useTheme();
|
|
86
87
|
const { isAuthenticated, isLoading } = useAuthStore(
|
|
87
88
|
useShallow((state) => ({ isAuthenticated: state.isAuthenticated, isLoading: state.isLoading }))
|
|
88
89
|
);
|
|
@@ -105,6 +106,66 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
105
106
|
showSignInModal();
|
|
106
107
|
}, [onPress]);
|
|
107
108
|
|
|
109
|
+
const themedStyles = useMemo(() => StyleSheet.create({
|
|
110
|
+
button: {
|
|
111
|
+
padding: 14,
|
|
112
|
+
borderRadius: 35,
|
|
113
|
+
alignItems: 'center',
|
|
114
|
+
justifyContent: 'center',
|
|
115
|
+
},
|
|
116
|
+
buttonDefault: {
|
|
117
|
+
backgroundColor: '#FFFFFF',
|
|
118
|
+
borderWidth: 1,
|
|
119
|
+
borderColor: theme.colors.borderLight,
|
|
120
|
+
...Platform.select({
|
|
121
|
+
web: {
|
|
122
|
+
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
|
|
123
|
+
},
|
|
124
|
+
default: {
|
|
125
|
+
shadowColor: '#000000',
|
|
126
|
+
shadowOffset: { width: 0, height: 2 },
|
|
127
|
+
shadowOpacity: 0.1,
|
|
128
|
+
shadowRadius: 4,
|
|
129
|
+
elevation: 2,
|
|
130
|
+
}
|
|
131
|
+
}),
|
|
132
|
+
},
|
|
133
|
+
buttonOutline: {
|
|
134
|
+
backgroundColor: 'transparent',
|
|
135
|
+
borderWidth: 1,
|
|
136
|
+
borderColor: theme.colors.primary,
|
|
137
|
+
},
|
|
138
|
+
buttonContained: {
|
|
139
|
+
backgroundColor: theme.colors.primary,
|
|
140
|
+
},
|
|
141
|
+
buttonDisabled: {
|
|
142
|
+
opacity: 0.6,
|
|
143
|
+
},
|
|
144
|
+
buttonContent: {
|
|
145
|
+
flexDirection: 'row',
|
|
146
|
+
alignItems: 'center',
|
|
147
|
+
justifyContent: 'center',
|
|
148
|
+
},
|
|
149
|
+
text: {
|
|
150
|
+
fontFamily: fontFamilies.interSemiBold,
|
|
151
|
+
fontWeight: Platform.OS === 'web' ? '600' : undefined,
|
|
152
|
+
fontSize: 16,
|
|
153
|
+
marginLeft: 10,
|
|
154
|
+
},
|
|
155
|
+
textDefault: {
|
|
156
|
+
color: theme.colors.text,
|
|
157
|
+
},
|
|
158
|
+
textOutline: {
|
|
159
|
+
color: theme.colors.primary,
|
|
160
|
+
},
|
|
161
|
+
textContained: {
|
|
162
|
+
color: '#FFFFFF',
|
|
163
|
+
},
|
|
164
|
+
textDisabled: {
|
|
165
|
+
color: theme.colors.textTertiary,
|
|
166
|
+
},
|
|
167
|
+
}), [theme]);
|
|
168
|
+
|
|
108
169
|
// Don't show the button if already authenticated (unless explicitly overridden)
|
|
109
170
|
if (isAuthenticated && !showWhenAuthenticated) return null;
|
|
110
171
|
|
|
@@ -114,11 +175,11 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
114
175
|
const getButtonStyle = () => {
|
|
115
176
|
switch (variant) {
|
|
116
177
|
case 'outline':
|
|
117
|
-
return [
|
|
178
|
+
return [themedStyles.buttonOutline, style];
|
|
118
179
|
case 'contained':
|
|
119
|
-
return [
|
|
180
|
+
return [themedStyles.buttonContained, style];
|
|
120
181
|
default:
|
|
121
|
-
return [
|
|
182
|
+
return [themedStyles.buttonDefault, style];
|
|
122
183
|
}
|
|
123
184
|
};
|
|
124
185
|
|
|
@@ -126,29 +187,29 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
126
187
|
const getTextStyle = () => {
|
|
127
188
|
switch (variant) {
|
|
128
189
|
case 'outline':
|
|
129
|
-
return [
|
|
190
|
+
return [themedStyles.textOutline, textStyle];
|
|
130
191
|
case 'contained':
|
|
131
|
-
return [
|
|
192
|
+
return [themedStyles.textContained, textStyle];
|
|
132
193
|
default:
|
|
133
|
-
return [
|
|
194
|
+
return [themedStyles.textDefault, textStyle];
|
|
134
195
|
}
|
|
135
196
|
};
|
|
136
197
|
|
|
137
198
|
return (
|
|
138
199
|
<TouchableOpacity
|
|
139
|
-
style={[
|
|
200
|
+
style={[themedStyles.button, getButtonStyle(), isButtonDisabled && themedStyles.buttonDisabled]}
|
|
140
201
|
onPress={handlePress}
|
|
141
202
|
disabled={isButtonDisabled}
|
|
142
203
|
>
|
|
143
|
-
<View style={
|
|
204
|
+
<View style={themedStyles.buttonContent}>
|
|
144
205
|
<OxyLogo
|
|
145
206
|
variant="icon"
|
|
146
207
|
size={20}
|
|
147
|
-
fillColor={variant === 'contained' ? 'white' :
|
|
148
|
-
innerFillColor={variant === 'contained' ?
|
|
208
|
+
fillColor={variant === 'contained' ? 'white' : theme.colors.primary}
|
|
209
|
+
innerFillColor={variant === 'contained' ? theme.colors.primary : undefined}
|
|
149
210
|
style={isButtonDisabled ? { opacity: 0.6 } : undefined}
|
|
150
211
|
/>
|
|
151
|
-
<Text style={[
|
|
212
|
+
<Text style={[themedStyles.text, getTextStyle(), isButtonDisabled && themedStyles.textDisabled]}>
|
|
152
213
|
{isLoading || isModalOpen ? 'Signing in...' : text}
|
|
153
214
|
</Text>
|
|
154
215
|
</View>
|
|
@@ -156,64 +217,4 @@ export const OxySignInButton: React.FC<OxySignInButtonProps> = ({
|
|
|
156
217
|
);
|
|
157
218
|
};
|
|
158
219
|
|
|
159
|
-
const styles = StyleSheet.create({
|
|
160
|
-
button: {
|
|
161
|
-
padding: 14,
|
|
162
|
-
borderRadius: 35,
|
|
163
|
-
alignItems: 'center',
|
|
164
|
-
justifyContent: 'center',
|
|
165
|
-
},
|
|
166
|
-
buttonDefault: {
|
|
167
|
-
backgroundColor: '#FFFFFF',
|
|
168
|
-
borderWidth: 1,
|
|
169
|
-
borderColor: '#DDDDDD',
|
|
170
|
-
...Platform.select({
|
|
171
|
-
web: {
|
|
172
|
-
boxShadow: '0 2px 4px rgba(0,0,0,0.1)',
|
|
173
|
-
},
|
|
174
|
-
default: {
|
|
175
|
-
shadowColor: '#000000',
|
|
176
|
-
shadowOffset: { width: 0, height: 2 },
|
|
177
|
-
shadowOpacity: 0.1,
|
|
178
|
-
shadowRadius: 4,
|
|
179
|
-
elevation: 2,
|
|
180
|
-
}
|
|
181
|
-
}),
|
|
182
|
-
},
|
|
183
|
-
buttonOutline: {
|
|
184
|
-
backgroundColor: 'transparent',
|
|
185
|
-
borderWidth: 1,
|
|
186
|
-
borderColor: '#d169e5',
|
|
187
|
-
},
|
|
188
|
-
buttonContained: {
|
|
189
|
-
backgroundColor: '#d169e5',
|
|
190
|
-
},
|
|
191
|
-
buttonDisabled: {
|
|
192
|
-
opacity: 0.6,
|
|
193
|
-
},
|
|
194
|
-
buttonContent: {
|
|
195
|
-
flexDirection: 'row',
|
|
196
|
-
alignItems: 'center',
|
|
197
|
-
justifyContent: 'center',
|
|
198
|
-
},
|
|
199
|
-
text: {
|
|
200
|
-
fontFamily: fontFamilies.interSemiBold,
|
|
201
|
-
fontWeight: Platform.OS === 'web' ? '600' : undefined,
|
|
202
|
-
fontSize: 16,
|
|
203
|
-
marginLeft: 10,
|
|
204
|
-
},
|
|
205
|
-
textDefault: {
|
|
206
|
-
color: '#333333',
|
|
207
|
-
},
|
|
208
|
-
textOutline: {
|
|
209
|
-
color: '#d169e5',
|
|
210
|
-
},
|
|
211
|
-
textContained: {
|
|
212
|
-
color: '#FFFFFF',
|
|
213
|
-
},
|
|
214
|
-
textDisabled: {
|
|
215
|
-
color: '#888888',
|
|
216
|
-
},
|
|
217
|
-
});
|
|
218
|
-
|
|
219
220
|
export default OxySignInButton;
|
|
@@ -19,6 +19,7 @@ import {
|
|
|
19
19
|
Dimensions,
|
|
20
20
|
Platform,
|
|
21
21
|
Linking,
|
|
22
|
+
useWindowDimensions,
|
|
22
23
|
} from 'react-native';
|
|
23
24
|
import Animated, {
|
|
24
25
|
useSharedValue,
|
|
@@ -32,6 +33,7 @@ import QRCode from 'react-native-qrcode-svg';
|
|
|
32
33
|
import { useTheme } from '@oxyhq/bloom/theme';
|
|
33
34
|
import { Button } from '@oxyhq/bloom/button';
|
|
34
35
|
import { Loading } from '@oxyhq/bloom/loading';
|
|
36
|
+
import { BottomSheet, type BottomSheetRef } from '@oxyhq/bloom/bottom-sheet';
|
|
35
37
|
import { useOxy } from '../context/OxyContext';
|
|
36
38
|
import OxyLogo from './OxyLogo';
|
|
37
39
|
import { createDebugLogger } from '@oxyhq/core';
|
|
@@ -84,8 +86,11 @@ export const subscribeToSignInModal = (listener: (visible: boolean) => void): ((
|
|
|
84
86
|
return () => visibilityListeners.delete(listener);
|
|
85
87
|
};
|
|
86
88
|
|
|
89
|
+
type ModalView = 'main' | 'qr';
|
|
90
|
+
|
|
87
91
|
const SignInModal: React.FC = () => {
|
|
88
92
|
const [visible, setVisible] = useState(false);
|
|
93
|
+
const [view, setView] = useState<ModalView>('main');
|
|
89
94
|
const [authSession, setAuthSession] = useState<AuthSession | null>(null);
|
|
90
95
|
const [isLoading, setIsLoading] = useState(false);
|
|
91
96
|
const [error, setError] = useState<string | null>(null);
|
|
@@ -93,11 +98,14 @@ const SignInModal: React.FC = () => {
|
|
|
93
98
|
|
|
94
99
|
const insets = useSafeAreaInsets();
|
|
95
100
|
const theme = useTheme();
|
|
101
|
+
const { width: windowWidth } = useWindowDimensions();
|
|
102
|
+
const isWide = windowWidth >= 768;
|
|
96
103
|
const { oxyServices, switchSession } = useOxy();
|
|
97
104
|
|
|
98
105
|
const socketRef = useRef<Socket | null>(null);
|
|
99
106
|
const pollingIntervalRef = useRef<ReturnType<typeof setInterval> | null>(null);
|
|
100
107
|
const isProcessingRef = useRef(false);
|
|
108
|
+
const sheetRef = useRef<BottomSheetRef>(null);
|
|
101
109
|
|
|
102
110
|
// Animation values
|
|
103
111
|
const opacity = useSharedValue(0);
|
|
@@ -117,12 +125,15 @@ const SignInModal: React.FC = () => {
|
|
|
117
125
|
if (visible) {
|
|
118
126
|
opacity.value = withTiming(1, { duration: 250 });
|
|
119
127
|
scale.value = withTiming(1, { duration: 250 });
|
|
128
|
+
setView('main');
|
|
120
129
|
generateAuthSession();
|
|
130
|
+
if (!isWide) sheetRef.current?.present();
|
|
121
131
|
} else {
|
|
122
132
|
opacity.value = withTiming(0, { duration: 200 });
|
|
123
133
|
scale.value = withTiming(0.9, { duration: 200 });
|
|
134
|
+
if (!isWide) sheetRef.current?.dismiss();
|
|
124
135
|
}
|
|
125
|
-
}, [visible]);
|
|
136
|
+
}, [visible, isWide]);
|
|
126
137
|
|
|
127
138
|
const backdropStyle = useAnimatedStyle(() => ({
|
|
128
139
|
opacity: opacity.value,
|
|
@@ -138,6 +149,16 @@ const SignInModal: React.FC = () => {
|
|
|
138
149
|
if (isProcessingRef.current) return;
|
|
139
150
|
isProcessingRef.current = true;
|
|
140
151
|
|
|
152
|
+
// Dismiss the in-app browser (if any) so the user returns to the app.
|
|
153
|
+
if (Platform.OS !== 'web') {
|
|
154
|
+
try {
|
|
155
|
+
const WebBrowser = await import('expo-web-browser');
|
|
156
|
+
WebBrowser.dismissBrowser();
|
|
157
|
+
} catch {
|
|
158
|
+
/* expo-web-browser not available */
|
|
159
|
+
}
|
|
160
|
+
}
|
|
161
|
+
|
|
141
162
|
try {
|
|
142
163
|
if (switchSession) {
|
|
143
164
|
await switchSession(sessionId);
|
|
@@ -169,6 +190,11 @@ const SignInModal: React.FC = () => {
|
|
|
169
190
|
|
|
170
191
|
// Connect to socket for real-time updates
|
|
171
192
|
const connectSocket = useCallback((sessionToken: string) => {
|
|
193
|
+
// Disconnect any pre-existing socket to avoid duplicates on re-renders.
|
|
194
|
+
if (socketRef.current) {
|
|
195
|
+
socketRef.current.disconnect();
|
|
196
|
+
socketRef.current = null;
|
|
197
|
+
}
|
|
172
198
|
const baseURL = oxyServices.getBaseURL();
|
|
173
199
|
|
|
174
200
|
const socket = io(`${baseURL}/auth-session`, {
|
|
@@ -318,8 +344,17 @@ const SignInModal: React.FC = () => {
|
|
|
318
344
|
`width=${width},height=${height},left=${left},top=${top},popup=1`
|
|
319
345
|
);
|
|
320
346
|
} else {
|
|
321
|
-
// Open in browser on native
|
|
322
|
-
|
|
347
|
+
// Open in in-app browser on native via expo-web-browser. Falls back
|
|
348
|
+
// to system browser if expo-web-browser is not available.
|
|
349
|
+
try {
|
|
350
|
+
const WebBrowser = await import('expo-web-browser');
|
|
351
|
+
await WebBrowser.openBrowserAsync(webUrl.toString(), {
|
|
352
|
+
presentationStyle: WebBrowser.WebBrowserPresentationStyle.PAGE_SHEET,
|
|
353
|
+
dismissButtonStyle: 'close',
|
|
354
|
+
});
|
|
355
|
+
} catch {
|
|
356
|
+
Linking.openURL(webUrl.toString());
|
|
357
|
+
}
|
|
323
358
|
}
|
|
324
359
|
}, [authSession, oxyServices]);
|
|
325
360
|
|
|
@@ -342,30 +377,24 @@ const SignInModal: React.FC = () => {
|
|
|
342
377
|
};
|
|
343
378
|
}, [cleanup]);
|
|
344
379
|
|
|
345
|
-
if (!visible) return null;
|
|
346
|
-
|
|
347
|
-
|
|
348
|
-
|
|
349
|
-
|
|
350
|
-
<TouchableOpacity style={
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
358
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
<Text className="text-foreground" style={styles.title}>Sign in with Oxy</Text>
|
|
362
|
-
<Text className="text-muted-foreground" style={styles.subtitle}>
|
|
363
|
-
Scan with Oxy Accounts app or use the button below
|
|
364
|
-
</Text>
|
|
365
|
-
</View>
|
|
366
|
-
|
|
367
|
-
{isLoading ? (
|
|
380
|
+
if (!visible && isWide) return null;
|
|
381
|
+
|
|
382
|
+
const innerContent = (
|
|
383
|
+
<>
|
|
384
|
+
{!isWide && view === 'qr' ? (
|
|
385
|
+
<TouchableOpacity style={styles.backButton} onPress={() => setView('main')} accessibilityLabel="Back">
|
|
386
|
+
<Text style={styles.backButtonText}>‹</Text>
|
|
387
|
+
</TouchableOpacity>
|
|
388
|
+
) : null}
|
|
389
|
+
{isWide ? (
|
|
390
|
+
<TouchableOpacity style={styles.closeButton} onPress={handleClose} accessibilityLabel="Close">
|
|
391
|
+
<Text style={styles.closeButtonText}>×</Text>
|
|
392
|
+
</TouchableOpacity>
|
|
393
|
+
) : null}
|
|
394
|
+
|
|
395
|
+
{isLoading ? (
|
|
368
396
|
<View style={styles.loadingContainer}>
|
|
397
|
+
<OxyLogo variant="icon" size={56} />
|
|
369
398
|
<Loading size="large" />
|
|
370
399
|
<Text className="text-muted-foreground" style={styles.loadingText}>
|
|
371
400
|
Preparing sign in...
|
|
@@ -373,12 +402,20 @@ const SignInModal: React.FC = () => {
|
|
|
373
402
|
</View>
|
|
374
403
|
) : error ? (
|
|
375
404
|
<View style={styles.errorContainer}>
|
|
405
|
+
<OxyLogo variant="icon" size={56} />
|
|
376
406
|
<Text className="text-destructive" style={styles.errorText}>{error}</Text>
|
|
377
407
|
<Button onPress={handleRefresh}>Try Again</Button>
|
|
378
408
|
</View>
|
|
379
|
-
) : (
|
|
409
|
+
) : isWide ? (
|
|
380
410
|
<>
|
|
381
|
-
{
|
|
411
|
+
<View style={styles.header}>
|
|
412
|
+
<OxyLogo variant="icon" size={56} />
|
|
413
|
+
<Text style={[styles.title, { color: theme.colors.text }]}>Sign in with Oxy</Text>
|
|
414
|
+
<Text style={[styles.subtitle, { color: theme.colors.textSecondary }]}>
|
|
415
|
+
Scan with Oxy Accounts app or use the button below
|
|
416
|
+
</Text>
|
|
417
|
+
</View>
|
|
418
|
+
|
|
382
419
|
<View style={[styles.qrContainer, { backgroundColor: 'white' }]}>
|
|
383
420
|
{authSession ? (
|
|
384
421
|
<QRCode
|
|
@@ -392,14 +429,12 @@ const SignInModal: React.FC = () => {
|
|
|
392
429
|
)}
|
|
393
430
|
</View>
|
|
394
431
|
|
|
395
|
-
{/* Divider */}
|
|
396
432
|
<View style={styles.dividerContainer}>
|
|
397
|
-
<View style={[styles.divider, { backgroundColor:
|
|
398
|
-
<Text style={[styles.dividerText, { color:
|
|
399
|
-
<View style={[styles.divider, { backgroundColor:
|
|
433
|
+
<View style={[styles.divider, { backgroundColor: theme.colors.border }]} />
|
|
434
|
+
<Text style={[styles.dividerText, { color: theme.colors.textTertiary }]}>or</Text>
|
|
435
|
+
<View style={[styles.divider, { backgroundColor: theme.colors.border }]} />
|
|
400
436
|
</View>
|
|
401
437
|
|
|
402
|
-
{/* Open Auth Popup Button */}
|
|
403
438
|
<Button
|
|
404
439
|
onPress={handleOpenAuthPopup}
|
|
405
440
|
icon={<OxyLogo variant="icon" size={20} fillColor={theme.colors.card} />}
|
|
@@ -407,17 +442,94 @@ const SignInModal: React.FC = () => {
|
|
|
407
442
|
Open Oxy Auth
|
|
408
443
|
</Button>
|
|
409
444
|
|
|
410
|
-
{/* Status */}
|
|
411
445
|
{isWaiting && (
|
|
412
446
|
<View style={styles.statusContainer}>
|
|
413
447
|
<Loading size="small" />
|
|
414
|
-
<Text style={styles.statusText}>
|
|
415
|
-
Waiting for authorization
|
|
448
|
+
<Text style={[styles.statusText, { color: theme.colors.textSecondary }]}>
|
|
449
|
+
Waiting for authorization…
|
|
450
|
+
</Text>
|
|
451
|
+
</View>
|
|
452
|
+
)}
|
|
453
|
+
</>
|
|
454
|
+
) : view === 'main' ? (
|
|
455
|
+
<>
|
|
456
|
+
<View style={styles.header}>
|
|
457
|
+
<OxyLogo variant="icon" size={56} />
|
|
458
|
+
<Text style={[styles.title, { color: theme.colors.text }]}>Sign in with Oxy</Text>
|
|
459
|
+
<Text style={[styles.subtitle, { color: theme.colors.textSecondary }]}>
|
|
460
|
+
One account for the whole Oxy ecosystem. Continue to authorize this device.
|
|
461
|
+
</Text>
|
|
462
|
+
</View>
|
|
463
|
+
|
|
464
|
+
<View style={styles.actions}>
|
|
465
|
+
<Button
|
|
466
|
+
onPress={handleOpenAuthPopup}
|
|
467
|
+
icon={<OxyLogo variant="icon" size={20} fillColor={theme.colors.card} />}
|
|
468
|
+
>
|
|
469
|
+
Continue with Oxy
|
|
470
|
+
</Button>
|
|
471
|
+
|
|
472
|
+
<Button variant="ghost" onPress={() => setView('qr')}>
|
|
473
|
+
Scan QR code instead
|
|
474
|
+
</Button>
|
|
475
|
+
</View>
|
|
476
|
+
</>
|
|
477
|
+
) : (
|
|
478
|
+
<>
|
|
479
|
+
<View style={styles.header}>
|
|
480
|
+
<Text style={[styles.title, { color: theme.colors.text }]}>Scan QR</Text>
|
|
481
|
+
<Text style={[styles.subtitle, { color: theme.colors.textSecondary }]}>
|
|
482
|
+
Open the Oxy Accounts app on another device and scan this code.
|
|
483
|
+
</Text>
|
|
484
|
+
</View>
|
|
485
|
+
|
|
486
|
+
<View style={[styles.qrContainer, { backgroundColor: 'white' }]}>
|
|
487
|
+
{authSession ? (
|
|
488
|
+
<QRCode
|
|
489
|
+
value={getQRData()}
|
|
490
|
+
size={220}
|
|
491
|
+
backgroundColor="white"
|
|
492
|
+
color="black"
|
|
493
|
+
/>
|
|
494
|
+
) : (
|
|
495
|
+
<Loading size="large" />
|
|
496
|
+
)}
|
|
497
|
+
</View>
|
|
498
|
+
|
|
499
|
+
{isWaiting && (
|
|
500
|
+
<View style={styles.statusContainer}>
|
|
501
|
+
<Loading size="small" />
|
|
502
|
+
<Text style={[styles.statusText, { color: theme.colors.textSecondary }]}>
|
|
503
|
+
Waiting for authorization…
|
|
416
504
|
</Text>
|
|
417
505
|
</View>
|
|
418
506
|
)}
|
|
419
507
|
</>
|
|
420
508
|
)}
|
|
509
|
+
</>
|
|
510
|
+
);
|
|
511
|
+
|
|
512
|
+
if (!isWide) {
|
|
513
|
+
return (
|
|
514
|
+
<BottomSheet
|
|
515
|
+
ref={sheetRef}
|
|
516
|
+
onDismiss={handleClose}
|
|
517
|
+
enablePanDownToClose
|
|
518
|
+
>
|
|
519
|
+
<View style={[styles.sheetContent, { paddingBottom: insets.bottom + 24 }]}>
|
|
520
|
+
{innerContent}
|
|
521
|
+
</View>
|
|
522
|
+
</BottomSheet>
|
|
523
|
+
);
|
|
524
|
+
}
|
|
525
|
+
|
|
526
|
+
return (
|
|
527
|
+
<Modal visible={visible} transparent animationType="none" statusBarTranslucent onRequestClose={handleClose}>
|
|
528
|
+
<Animated.View style={[styles.backdrop, { backgroundColor: theme.colors.overlay }, backdropStyle]}>
|
|
529
|
+
<TouchableOpacity style={StyleSheet.absoluteFill} onPress={handleClose} activeOpacity={1} />
|
|
530
|
+
|
|
531
|
+
<Animated.View style={[styles.content, contentStyle, { paddingTop: insets.top + 20, paddingBottom: insets.bottom + 20 }]}>
|
|
532
|
+
{innerContent}
|
|
421
533
|
</Animated.View>
|
|
422
534
|
</Animated.View>
|
|
423
535
|
</Modal>
|
|
@@ -454,19 +566,51 @@ const styles = StyleSheet.create({
|
|
|
454
566
|
fontWeight: '300',
|
|
455
567
|
lineHeight: 32,
|
|
456
568
|
},
|
|
569
|
+
backButton: {
|
|
570
|
+
position: 'absolute',
|
|
571
|
+
top: 16,
|
|
572
|
+
left: 16,
|
|
573
|
+
width: 40,
|
|
574
|
+
height: 40,
|
|
575
|
+
borderRadius: 20,
|
|
576
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
577
|
+
justifyContent: 'center',
|
|
578
|
+
alignItems: 'center',
|
|
579
|
+
zIndex: 10,
|
|
580
|
+
},
|
|
581
|
+
backButtonText: {
|
|
582
|
+
color: 'white',
|
|
583
|
+
fontSize: 32,
|
|
584
|
+
fontWeight: '300',
|
|
585
|
+
lineHeight: 32,
|
|
586
|
+
marginRight: 2,
|
|
587
|
+
},
|
|
588
|
+
actions: {
|
|
589
|
+
width: '100%',
|
|
590
|
+
gap: 12,
|
|
591
|
+
},
|
|
592
|
+
sheetContent: {
|
|
593
|
+
paddingHorizontal: 24,
|
|
594
|
+
paddingTop: 48,
|
|
595
|
+
paddingBottom: 32,
|
|
596
|
+
alignItems: 'center',
|
|
597
|
+
gap: 24,
|
|
598
|
+
width: '100%',
|
|
599
|
+
},
|
|
457
600
|
header: {
|
|
458
601
|
alignItems: 'center',
|
|
459
|
-
|
|
602
|
+
gap: 8,
|
|
460
603
|
},
|
|
461
604
|
title: {
|
|
462
|
-
fontSize:
|
|
463
|
-
fontWeight: '
|
|
464
|
-
marginTop:
|
|
605
|
+
fontSize: 24,
|
|
606
|
+
fontWeight: '700',
|
|
607
|
+
marginTop: 8,
|
|
465
608
|
},
|
|
466
609
|
subtitle: {
|
|
467
|
-
fontSize:
|
|
468
|
-
marginTop: 8,
|
|
610
|
+
fontSize: 14,
|
|
469
611
|
textAlign: 'center',
|
|
612
|
+
lineHeight: 20,
|
|
613
|
+
maxWidth: 320,
|
|
470
614
|
},
|
|
471
615
|
qrContainer: {
|
|
472
616
|
padding: 20,
|