@oxyhq/services 6.9.45 → 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/OxyProvider.js +6 -5
- package/lib/commonjs/ui/components/OxyProvider.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/FileViewer.js +24 -15
- package/lib/commonjs/ui/components/fileManagement/FileViewer.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/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/context/hooks/useAuthOperations.js +4 -3
- package/lib/commonjs/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountCenterScreen.js +1 -3
- package/lib/commonjs/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js +47 -63
- package/lib/commonjs/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js +90 -68
- package/lib/commonjs/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js +72 -63
- package/lib/commonjs/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/AccountVerificationScreen.js +5 -5
- 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 +25 -36
- package/lib/commonjs/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/commonjs/ui/screens/HistoryViewScreen.js +31 -31
- 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/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 +26 -4
- 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/module/ui/components/OxyProvider.js +6 -5
- package/lib/module/ui/components/OxyProvider.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/FileViewer.js +24 -15
- package/lib/module/ui/components/fileManagement/FileViewer.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/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/context/hooks/useAuthOperations.js +4 -3
- package/lib/module/ui/context/hooks/useAuthOperations.js.map +1 -1
- package/lib/module/ui/screens/AccountCenterScreen.js +1 -3
- package/lib/module/ui/screens/AccountCenterScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountOverviewScreen.js +46 -62
- package/lib/module/ui/screens/AccountOverviewScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSettingsScreen.js +90 -68
- package/lib/module/ui/screens/AccountSettingsScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountSwitcherScreen.js +73 -64
- package/lib/module/ui/screens/AccountSwitcherScreen.js.map +1 -1
- package/lib/module/ui/screens/AccountVerificationScreen.js +6 -6
- 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 +25 -36
- package/lib/module/ui/screens/FileManagementScreen.js.map +1 -1
- package/lib/module/ui/screens/HistoryViewScreen.js +32 -32
- 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/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 +27 -5
- 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/typescript/commonjs/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/commonjs/ui/components/fileManagement/FileViewer.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/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/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/module/ui/components/OxyProvider.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/SignInModal.d.ts.map +1 -1
- package/lib/typescript/module/ui/components/fileManagement/FileViewer.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/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/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/package.json +2 -2
- package/src/ui/components/OxyProvider.tsx +6 -5
- package/src/ui/components/SignInModal.tsx +186 -42
- package/src/ui/components/fileManagement/FileViewer.tsx +25 -15
- package/src/ui/components/index.ts +0 -5
- 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/context/hooks/useAuthOperations.ts +4 -3
- package/src/ui/screens/AccountCenterScreen.tsx +2 -3
- package/src/ui/screens/AccountOverviewScreen.tsx +44 -65
- package/src/ui/screens/AccountSettingsScreen.tsx +121 -149
- package/src/ui/screens/AccountSwitcherScreen.tsx +94 -115
- package/src/ui/screens/AccountVerificationScreen.tsx +10 -9
- package/src/ui/screens/FeedbackScreen.tsx +50 -38
- package/src/ui/screens/FileManagementScreen.tsx +26 -34
- package/src/ui/screens/HistoryViewScreen.tsx +29 -10
- 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/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 +29 -3
- 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/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 -96
- package/lib/commonjs/ui/components/SettingRow.js.map +0 -1
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.js +0 -208
- package/lib/commonjs/ui/components/internal/GroupedPillButtons.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 -91
- package/lib/module/ui/components/SettingRow.js.map +0 -1
- package/lib/module/ui/components/internal/GroupedPillButtons.js +0 -204
- package/lib/module/ui/components/internal/GroupedPillButtons.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/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/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 -105
- package/src/ui/components/internal/GroupedPillButtons.tsx +0 -253
|
@@ -23,7 +23,7 @@ const isWeb = _reactNative.Platform.OS === 'web';
|
|
|
23
23
|
// Lazy-load optional components (avoids require() for ESM compatibility).
|
|
24
24
|
// The .then() extracts + casts the default export so that `lazy()` sees
|
|
25
25
|
// `Promise<{ default: ComponentType }>` instead of the full module namespace.
|
|
26
|
-
const LazyBottomSheetRouter = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./BottomSheetRouter
|
|
26
|
+
const LazyBottomSheetRouter = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./BottomSheetRouter'))).then(mod => ({
|
|
27
27
|
default: mod.default
|
|
28
28
|
}), error => {
|
|
29
29
|
if (__DEV__) {
|
|
@@ -33,7 +33,7 @@ const LazyBottomSheetRouter = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolv
|
|
|
33
33
|
default: () => null
|
|
34
34
|
};
|
|
35
35
|
}));
|
|
36
|
-
const LazySignInModal = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./SignInModal
|
|
36
|
+
const LazySignInModal = /*#__PURE__*/(0, _react.lazy)(() => Promise.resolve().then(() => _interopRequireWildcard(require('./SignInModal'))).then(mod => ({
|
|
37
37
|
default: mod.default
|
|
38
38
|
}), () => ({
|
|
39
39
|
default: () => null
|
|
@@ -84,12 +84,13 @@ const OxyProvider = ({
|
|
|
84
84
|
themeMode = 'system',
|
|
85
85
|
colorPreset
|
|
86
86
|
}) => {
|
|
87
|
-
// Dynamic KeyboardProvider for native (avoids require() for ESM compatibility)
|
|
87
|
+
// Dynamic KeyboardProvider for native (avoids require() for ESM compatibility).
|
|
88
|
+
// Literal-string import: Hermes/Metro require static strings in production
|
|
89
|
+
// bundles, not variable expressions or webpackIgnore comments.
|
|
88
90
|
const [KBProvider, setKBProvider] = (0, _react.useState)(null);
|
|
89
91
|
(0, _react.useEffect)(() => {
|
|
90
92
|
if (isWeb) return;
|
|
91
|
-
|
|
92
|
-
(specifier => new Promise(r => r(`${specifier}`)).then(s => _interopRequireWildcard(require(s))))(/* webpackIgnore: true */moduleName).then(mod => setKBProvider(() => mod.KeyboardProvider)).catch(() => {/* KeyboardProvider not available */});
|
|
93
|
+
Promise.resolve().then(() => _interopRequireWildcard(require('react-native-keyboard-controller'))).then(mod => setKBProvider(() => mod.KeyboardProvider)).catch(() => {/* KeyboardProvider not available */});
|
|
93
94
|
}, []);
|
|
94
95
|
const KeyboardWrapper = KBProvider ?? (({
|
|
95
96
|
children
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"names":["_react","require","_reactNative","_OxyContext","_reactQuery","_bloom","_FontLoader","_sonner","_queryClient","_storageHelpers","_jsxRuntime","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","setupFonts","isWeb","Platform","OS","LazyBottomSheetRouter","lazy","Promise","resolve","then","mod","error","__DEV__","console","LazySignInModal","OxyProvider","oxyServices","children","onAuthStateChange","storageKeyPrefix","baseURL","authWebUrl","authRedirectUri","queryClient","providedQueryClient","themeMode","colorPreset","KBProvider","setKBProvider","useState","useEffect","
|
|
1
|
+
{"version":3,"names":["_react","require","_reactNative","_OxyContext","_reactQuery","_bloom","_FontLoader","_sonner","_queryClient","_storageHelpers","_jsxRuntime","_interopRequireWildcard","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","setupFonts","isWeb","Platform","OS","LazyBottomSheetRouter","lazy","Promise","resolve","then","mod","error","__DEV__","console","LazySignInModal","OxyProvider","oxyServices","children","onAuthStateChange","storageKeyPrefix","baseURL","authWebUrl","authRedirectUri","queryClient","providedQueryClient","themeMode","colorPreset","KBProvider","setKBProvider","useState","useEffect","KeyboardProvider","catch","KeyboardWrapper","jsx","Fragment","storageRef","useRef","queryClientRef","setQueryClient","current","mounted","createPlatformStorage","storage","client","createQueryClient","warn","handleVisibilityChange","focusManager","setFocused","document","visibilityState","addEventListener","removeEventListener","subscription","AppState","state","remove","cleanup","setupNetworkMonitoring","onlineManager","setOnline","navigator","onLine","handleOnline","handleOffline","window","NetInfo","fetch","isConnected","unsubscribe","coreContent","QueryClientProvider","BloomThemeProvider","mode","jsxs","OxyContextProvider","Susp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CAAC;MAAA,CACK;IAAC,CACL;EAAC,CACJ,CACxB;EAED,oBACI,IAAAnG,WAAA,CAAAsD,GAAA,EAACD,eAAe;IAAAhB,QAAA,EACXsD;EAAW,CACC,CAAC;AAE1B,CAAC;AAAC,IAAAS,QAAA,GAAAC,OAAA,CAAAzF,OAAA,GAEauB,WAAW","ignoreList":[]}
|
|
@@ -13,13 +13,13 @@ var _reactNativeQrcodeSvg = _interopRequireDefault(require("react-native-qrcode-
|
|
|
13
13
|
var _theme = require("@oxyhq/bloom/theme");
|
|
14
14
|
var _button = require("@oxyhq/bloom/button");
|
|
15
15
|
var _loading = require("@oxyhq/bloom/loading");
|
|
16
|
+
var _bottomSheet = require("@oxyhq/bloom/bottom-sheet");
|
|
16
17
|
var _OxyContext = require("../context/OxyContext.js");
|
|
17
18
|
var _OxyLogo = _interopRequireDefault(require("./OxyLogo.js"));
|
|
18
19
|
var _core = require("@oxyhq/core");
|
|
19
20
|
var _jsxRuntime = require("react/jsx-runtime");
|
|
20
21
|
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
21
|
-
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
|
|
22
|
-
/**
|
|
22
|
+
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); } /**
|
|
23
23
|
* SignInModal - Full screen sign-in modal with QR code
|
|
24
24
|
*
|
|
25
25
|
* A semi-transparent full-screen modal that displays:
|
|
@@ -28,7 +28,6 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
|
|
|
28
28
|
*
|
|
29
29
|
* Animates with fade-in effect.
|
|
30
30
|
*/
|
|
31
|
-
|
|
32
31
|
const debug = (0, _core.createDebugLogger)('SignInModal');
|
|
33
32
|
const {
|
|
34
33
|
width: SCREEN_WIDTH,
|
|
@@ -67,12 +66,17 @@ const subscribeToSignInModal = listener => {
|
|
|
67
66
|
exports.subscribeToSignInModal = subscribeToSignInModal;
|
|
68
67
|
const SignInModal = () => {
|
|
69
68
|
const [visible, setVisible] = (0, _react.useState)(false);
|
|
69
|
+
const [view, setView] = (0, _react.useState)('main');
|
|
70
70
|
const [authSession, setAuthSession] = (0, _react.useState)(null);
|
|
71
71
|
const [isLoading, setIsLoading] = (0, _react.useState)(false);
|
|
72
72
|
const [error, setError] = (0, _react.useState)(null);
|
|
73
73
|
const [isWaiting, setIsWaiting] = (0, _react.useState)(false);
|
|
74
74
|
const insets = (0, _reactNativeSafeAreaContext.useSafeAreaInsets)();
|
|
75
75
|
const theme = (0, _theme.useTheme)();
|
|
76
|
+
const {
|
|
77
|
+
width: windowWidth
|
|
78
|
+
} = (0, _reactNative.useWindowDimensions)();
|
|
79
|
+
const isWide = windowWidth >= 768;
|
|
76
80
|
const {
|
|
77
81
|
oxyServices,
|
|
78
82
|
switchSession
|
|
@@ -80,6 +84,7 @@ const SignInModal = () => {
|
|
|
80
84
|
const socketRef = (0, _react.useRef)(null);
|
|
81
85
|
const pollingIntervalRef = (0, _react.useRef)(null);
|
|
82
86
|
const isProcessingRef = (0, _react.useRef)(false);
|
|
87
|
+
const sheetRef = (0, _react.useRef)(null);
|
|
83
88
|
|
|
84
89
|
// Animation values
|
|
85
90
|
const opacity = (0, _reactNativeReanimated.useSharedValue)(0);
|
|
@@ -103,7 +108,9 @@ const SignInModal = () => {
|
|
|
103
108
|
scale.value = (0, _reactNativeReanimated.withTiming)(1, {
|
|
104
109
|
duration: 250
|
|
105
110
|
});
|
|
111
|
+
setView('main');
|
|
106
112
|
generateAuthSession();
|
|
113
|
+
if (!isWide) sheetRef.current?.present();
|
|
107
114
|
} else {
|
|
108
115
|
opacity.value = (0, _reactNativeReanimated.withTiming)(0, {
|
|
109
116
|
duration: 200
|
|
@@ -111,8 +118,9 @@ const SignInModal = () => {
|
|
|
111
118
|
scale.value = (0, _reactNativeReanimated.withTiming)(0.9, {
|
|
112
119
|
duration: 200
|
|
113
120
|
});
|
|
121
|
+
if (!isWide) sheetRef.current?.dismiss();
|
|
114
122
|
}
|
|
115
|
-
}, [visible]);
|
|
123
|
+
}, [visible, isWide]);
|
|
116
124
|
const backdropStyle = (0, _reactNativeReanimated.useAnimatedStyle)(() => ({
|
|
117
125
|
opacity: opacity.value
|
|
118
126
|
}));
|
|
@@ -127,6 +135,16 @@ const SignInModal = () => {
|
|
|
127
135
|
const handleAuthSuccess = (0, _react.useCallback)(async sessionId => {
|
|
128
136
|
if (isProcessingRef.current) return;
|
|
129
137
|
isProcessingRef.current = true;
|
|
138
|
+
|
|
139
|
+
// Dismiss the in-app browser (if any) so the user returns to the app.
|
|
140
|
+
if (_reactNative.Platform.OS !== 'web') {
|
|
141
|
+
try {
|
|
142
|
+
const WebBrowser = await Promise.resolve().then(() => _interopRequireWildcard(require('expo-web-browser')));
|
|
143
|
+
WebBrowser.dismissBrowser();
|
|
144
|
+
} catch {
|
|
145
|
+
/* expo-web-browser not available */
|
|
146
|
+
}
|
|
147
|
+
}
|
|
130
148
|
try {
|
|
131
149
|
if (switchSession) {
|
|
132
150
|
await switchSession(sessionId);
|
|
@@ -156,6 +174,11 @@ const SignInModal = () => {
|
|
|
156
174
|
|
|
157
175
|
// Connect to socket for real-time updates
|
|
158
176
|
const connectSocket = (0, _react.useCallback)(sessionToken => {
|
|
177
|
+
// Disconnect any pre-existing socket to avoid duplicates on re-renders.
|
|
178
|
+
if (socketRef.current) {
|
|
179
|
+
socketRef.current.disconnect();
|
|
180
|
+
socketRef.current = null;
|
|
181
|
+
}
|
|
159
182
|
const baseURL = oxyServices.getBaseURL();
|
|
160
183
|
const socket = (0, _socket.default)(`${baseURL}/auth-session`, {
|
|
161
184
|
transports: ['websocket', 'polling'],
|
|
@@ -289,8 +312,17 @@ const SignInModal = () => {
|
|
|
289
312
|
const top = (screenHeight - height) / 2;
|
|
290
313
|
window.open(webUrl.toString(), 'oxy-auth-popup', `width=${width},height=${height},left=${left},top=${top},popup=1`);
|
|
291
314
|
} else {
|
|
292
|
-
// Open in browser on native
|
|
293
|
-
|
|
315
|
+
// Open in in-app browser on native via expo-web-browser. Falls back
|
|
316
|
+
// to system browser if expo-web-browser is not available.
|
|
317
|
+
try {
|
|
318
|
+
const WebBrowser = await Promise.resolve().then(() => _interopRequireWildcard(require('expo-web-browser')));
|
|
319
|
+
await WebBrowser.openBrowserAsync(webUrl.toString(), {
|
|
320
|
+
presentationStyle: WebBrowser.WebBrowserPresentationStyle.PAGE_SHEET,
|
|
321
|
+
dismissButtonStyle: 'close'
|
|
322
|
+
});
|
|
323
|
+
} catch {
|
|
324
|
+
_reactNative.Linking.openURL(webUrl.toString());
|
|
325
|
+
}
|
|
294
326
|
}
|
|
295
327
|
}, [authSession, oxyServices]);
|
|
296
328
|
|
|
@@ -312,7 +344,198 @@ const SignInModal = () => {
|
|
|
312
344
|
cleanup();
|
|
313
345
|
};
|
|
314
346
|
}, [cleanup]);
|
|
315
|
-
if (!visible) return null;
|
|
347
|
+
if (!visible && isWide) return null;
|
|
348
|
+
const innerContent = /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
349
|
+
children: [!isWide && view === 'qr' ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
350
|
+
style: styles.backButton,
|
|
351
|
+
onPress: () => setView('main'),
|
|
352
|
+
accessibilityLabel: "Back",
|
|
353
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
354
|
+
style: styles.backButtonText,
|
|
355
|
+
children: "\u2039"
|
|
356
|
+
})
|
|
357
|
+
}) : null, isWide ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.TouchableOpacity, {
|
|
358
|
+
style: styles.closeButton,
|
|
359
|
+
onPress: handleClose,
|
|
360
|
+
accessibilityLabel: "Close",
|
|
361
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
362
|
+
style: styles.closeButtonText,
|
|
363
|
+
children: "\xD7"
|
|
364
|
+
})
|
|
365
|
+
}) : null, isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
366
|
+
style: styles.loadingContainer,
|
|
367
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyLogo.default, {
|
|
368
|
+
variant: "icon",
|
|
369
|
+
size: 56
|
|
370
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
371
|
+
size: "large"
|
|
372
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
373
|
+
className: "text-muted-foreground",
|
|
374
|
+
style: styles.loadingText,
|
|
375
|
+
children: "Preparing sign in..."
|
|
376
|
+
})]
|
|
377
|
+
}) : error ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
378
|
+
style: styles.errorContainer,
|
|
379
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyLogo.default, {
|
|
380
|
+
variant: "icon",
|
|
381
|
+
size: 56
|
|
382
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
383
|
+
className: "text-destructive",
|
|
384
|
+
style: styles.errorText,
|
|
385
|
+
children: error
|
|
386
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
387
|
+
onPress: handleRefresh,
|
|
388
|
+
children: "Try Again"
|
|
389
|
+
})]
|
|
390
|
+
}) : isWide ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
391
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
392
|
+
style: styles.header,
|
|
393
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyLogo.default, {
|
|
394
|
+
variant: "icon",
|
|
395
|
+
size: 56
|
|
396
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
397
|
+
style: [styles.title, {
|
|
398
|
+
color: theme.colors.text
|
|
399
|
+
}],
|
|
400
|
+
children: "Sign in with Oxy"
|
|
401
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
402
|
+
style: [styles.subtitle, {
|
|
403
|
+
color: theme.colors.textSecondary
|
|
404
|
+
}],
|
|
405
|
+
children: "Scan with Oxy Accounts app or use the button below"
|
|
406
|
+
})]
|
|
407
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
408
|
+
style: [styles.qrContainer, {
|
|
409
|
+
backgroundColor: 'white'
|
|
410
|
+
}],
|
|
411
|
+
children: authSession ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeQrcodeSvg.default, {
|
|
412
|
+
value: getQRData(),
|
|
413
|
+
size: 200,
|
|
414
|
+
backgroundColor: "white",
|
|
415
|
+
color: "black"
|
|
416
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
417
|
+
size: "large"
|
|
418
|
+
})
|
|
419
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
420
|
+
style: styles.dividerContainer,
|
|
421
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
422
|
+
style: [styles.divider, {
|
|
423
|
+
backgroundColor: theme.colors.border
|
|
424
|
+
}]
|
|
425
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
426
|
+
style: [styles.dividerText, {
|
|
427
|
+
color: theme.colors.textTertiary
|
|
428
|
+
}],
|
|
429
|
+
children: "or"
|
|
430
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
431
|
+
style: [styles.divider, {
|
|
432
|
+
backgroundColor: theme.colors.border
|
|
433
|
+
}]
|
|
434
|
+
})]
|
|
435
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
436
|
+
onPress: handleOpenAuthPopup,
|
|
437
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyLogo.default, {
|
|
438
|
+
variant: "icon",
|
|
439
|
+
size: 20,
|
|
440
|
+
fillColor: theme.colors.card
|
|
441
|
+
}),
|
|
442
|
+
children: "Open Oxy Auth"
|
|
443
|
+
}), isWaiting && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
444
|
+
style: styles.statusContainer,
|
|
445
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
446
|
+
size: "small"
|
|
447
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
448
|
+
style: [styles.statusText, {
|
|
449
|
+
color: theme.colors.textSecondary
|
|
450
|
+
}],
|
|
451
|
+
children: "Waiting for authorization\u2026"
|
|
452
|
+
})]
|
|
453
|
+
})]
|
|
454
|
+
}) : view === 'main' ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
455
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
456
|
+
style: styles.header,
|
|
457
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyLogo.default, {
|
|
458
|
+
variant: "icon",
|
|
459
|
+
size: 56
|
|
460
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
461
|
+
style: [styles.title, {
|
|
462
|
+
color: theme.colors.text
|
|
463
|
+
}],
|
|
464
|
+
children: "Sign in with Oxy"
|
|
465
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
466
|
+
style: [styles.subtitle, {
|
|
467
|
+
color: theme.colors.textSecondary
|
|
468
|
+
}],
|
|
469
|
+
children: "One account for the whole Oxy ecosystem. Continue to authorize this device."
|
|
470
|
+
})]
|
|
471
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
472
|
+
style: styles.actions,
|
|
473
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
474
|
+
onPress: handleOpenAuthPopup,
|
|
475
|
+
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyLogo.default, {
|
|
476
|
+
variant: "icon",
|
|
477
|
+
size: 20,
|
|
478
|
+
fillColor: theme.colors.card
|
|
479
|
+
}),
|
|
480
|
+
children: "Continue with Oxy"
|
|
481
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
482
|
+
variant: "ghost",
|
|
483
|
+
onPress: () => setView('qr'),
|
|
484
|
+
children: "Scan QR code instead"
|
|
485
|
+
})]
|
|
486
|
+
})]
|
|
487
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
488
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
489
|
+
style: styles.header,
|
|
490
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
491
|
+
style: [styles.title, {
|
|
492
|
+
color: theme.colors.text
|
|
493
|
+
}],
|
|
494
|
+
children: "Scan QR"
|
|
495
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
496
|
+
style: [styles.subtitle, {
|
|
497
|
+
color: theme.colors.textSecondary
|
|
498
|
+
}],
|
|
499
|
+
children: "Open the Oxy Accounts app on another device and scan this code."
|
|
500
|
+
})]
|
|
501
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
502
|
+
style: [styles.qrContainer, {
|
|
503
|
+
backgroundColor: 'white'
|
|
504
|
+
}],
|
|
505
|
+
children: authSession ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeQrcodeSvg.default, {
|
|
506
|
+
value: getQRData(),
|
|
507
|
+
size: 220,
|
|
508
|
+
backgroundColor: "white",
|
|
509
|
+
color: "black"
|
|
510
|
+
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
511
|
+
size: "large"
|
|
512
|
+
})
|
|
513
|
+
}), isWaiting && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
514
|
+
style: styles.statusContainer,
|
|
515
|
+
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
516
|
+
size: "small"
|
|
517
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
518
|
+
style: [styles.statusText, {
|
|
519
|
+
color: theme.colors.textSecondary
|
|
520
|
+
}],
|
|
521
|
+
children: "Waiting for authorization\u2026"
|
|
522
|
+
})]
|
|
523
|
+
})]
|
|
524
|
+
})]
|
|
525
|
+
});
|
|
526
|
+
if (!isWide) {
|
|
527
|
+
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_bottomSheet.BottomSheet, {
|
|
528
|
+
ref: sheetRef,
|
|
529
|
+
onDismiss: handleClose,
|
|
530
|
+
enablePanDownToClose: true,
|
|
531
|
+
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
532
|
+
style: [styles.sheetContent, {
|
|
533
|
+
paddingBottom: insets.bottom + 24
|
|
534
|
+
}],
|
|
535
|
+
children: innerContent
|
|
536
|
+
})
|
|
537
|
+
});
|
|
538
|
+
}
|
|
316
539
|
return /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Modal, {
|
|
317
540
|
visible: visible,
|
|
318
541
|
transparent: true,
|
|
@@ -327,98 +550,12 @@ const SignInModal = () => {
|
|
|
327
550
|
style: _reactNative.StyleSheet.absoluteFill,
|
|
328
551
|
onPress: handleClose,
|
|
329
552
|
activeOpacity: 1
|
|
330
|
-
}), /*#__PURE__*/(0, _jsxRuntime.
|
|
553
|
+
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeReanimated.default.View, {
|
|
331
554
|
style: [styles.content, contentStyle, {
|
|
332
555
|
paddingTop: insets.top + 20,
|
|
333
556
|
paddingBottom: insets.bottom + 20
|
|
334
557
|
}],
|
|
335
|
-
children:
|
|
336
|
-
style: styles.closeButton,
|
|
337
|
-
onPress: handleClose,
|
|
338
|
-
children: /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
339
|
-
style: styles.closeButtonText,
|
|
340
|
-
children: "\xD7"
|
|
341
|
-
})
|
|
342
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
343
|
-
style: styles.header,
|
|
344
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyLogo.default, {
|
|
345
|
-
variant: "icon",
|
|
346
|
-
size: 56
|
|
347
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
348
|
-
className: "text-foreground",
|
|
349
|
-
style: styles.title,
|
|
350
|
-
children: "Sign in with Oxy"
|
|
351
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
352
|
-
className: "text-muted-foreground",
|
|
353
|
-
style: styles.subtitle,
|
|
354
|
-
children: "Scan with Oxy Accounts app or use the button below"
|
|
355
|
-
})]
|
|
356
|
-
}), isLoading ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
357
|
-
style: styles.loadingContainer,
|
|
358
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
359
|
-
size: "large"
|
|
360
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
361
|
-
className: "text-muted-foreground",
|
|
362
|
-
style: styles.loadingText,
|
|
363
|
-
children: "Preparing sign in..."
|
|
364
|
-
})]
|
|
365
|
-
}) : error ? /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
366
|
-
style: styles.errorContainer,
|
|
367
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
368
|
-
className: "text-destructive",
|
|
369
|
-
style: styles.errorText,
|
|
370
|
-
children: error
|
|
371
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
372
|
-
onPress: handleRefresh,
|
|
373
|
-
children: "Try Again"
|
|
374
|
-
})]
|
|
375
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsxs)(_jsxRuntime.Fragment, {
|
|
376
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
377
|
-
style: [styles.qrContainer, {
|
|
378
|
-
backgroundColor: 'white'
|
|
379
|
-
}],
|
|
380
|
-
children: authSession ? /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNativeQrcodeSvg.default, {
|
|
381
|
-
value: getQRData(),
|
|
382
|
-
size: 200,
|
|
383
|
-
backgroundColor: "white",
|
|
384
|
-
color: "black"
|
|
385
|
-
}) : /*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
386
|
-
size: "large"
|
|
387
|
-
})
|
|
388
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
389
|
-
style: styles.dividerContainer,
|
|
390
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
391
|
-
style: [styles.divider, {
|
|
392
|
-
backgroundColor: 'rgba(255,255,255,0.3)'
|
|
393
|
-
}]
|
|
394
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
395
|
-
style: [styles.dividerText, {
|
|
396
|
-
color: 'rgba(255,255,255,0.7)'
|
|
397
|
-
}],
|
|
398
|
-
children: "or"
|
|
399
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.View, {
|
|
400
|
-
style: [styles.divider, {
|
|
401
|
-
backgroundColor: 'rgba(255,255,255,0.3)'
|
|
402
|
-
}]
|
|
403
|
-
})]
|
|
404
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_button.Button, {
|
|
405
|
-
onPress: handleOpenAuthPopup,
|
|
406
|
-
icon: /*#__PURE__*/(0, _jsxRuntime.jsx)(_OxyLogo.default, {
|
|
407
|
-
variant: "icon",
|
|
408
|
-
size: 20,
|
|
409
|
-
fillColor: theme.colors.card
|
|
410
|
-
}),
|
|
411
|
-
children: "Open Oxy Auth"
|
|
412
|
-
}), isWaiting && /*#__PURE__*/(0, _jsxRuntime.jsxs)(_reactNative.View, {
|
|
413
|
-
style: styles.statusContainer,
|
|
414
|
-
children: [/*#__PURE__*/(0, _jsxRuntime.jsx)(_loading.Loading, {
|
|
415
|
-
size: "small"
|
|
416
|
-
}), /*#__PURE__*/(0, _jsxRuntime.jsx)(_reactNative.Text, {
|
|
417
|
-
style: styles.statusText,
|
|
418
|
-
children: "Waiting for authorization..."
|
|
419
|
-
})]
|
|
420
|
-
})]
|
|
421
|
-
})]
|
|
558
|
+
children: innerContent
|
|
422
559
|
})]
|
|
423
560
|
})
|
|
424
561
|
});
|
|
@@ -453,19 +590,51 @@ const styles = _reactNative.StyleSheet.create({
|
|
|
453
590
|
fontWeight: '300',
|
|
454
591
|
lineHeight: 32
|
|
455
592
|
},
|
|
593
|
+
backButton: {
|
|
594
|
+
position: 'absolute',
|
|
595
|
+
top: 16,
|
|
596
|
+
left: 16,
|
|
597
|
+
width: 40,
|
|
598
|
+
height: 40,
|
|
599
|
+
borderRadius: 20,
|
|
600
|
+
backgroundColor: 'rgba(255, 255, 255, 0.1)',
|
|
601
|
+
justifyContent: 'center',
|
|
602
|
+
alignItems: 'center',
|
|
603
|
+
zIndex: 10
|
|
604
|
+
},
|
|
605
|
+
backButtonText: {
|
|
606
|
+
color: 'white',
|
|
607
|
+
fontSize: 32,
|
|
608
|
+
fontWeight: '300',
|
|
609
|
+
lineHeight: 32,
|
|
610
|
+
marginRight: 2
|
|
611
|
+
},
|
|
612
|
+
actions: {
|
|
613
|
+
width: '100%',
|
|
614
|
+
gap: 12
|
|
615
|
+
},
|
|
616
|
+
sheetContent: {
|
|
617
|
+
paddingHorizontal: 24,
|
|
618
|
+
paddingTop: 48,
|
|
619
|
+
paddingBottom: 32,
|
|
620
|
+
alignItems: 'center',
|
|
621
|
+
gap: 24,
|
|
622
|
+
width: '100%'
|
|
623
|
+
},
|
|
456
624
|
header: {
|
|
457
625
|
alignItems: 'center',
|
|
458
|
-
|
|
626
|
+
gap: 8
|
|
459
627
|
},
|
|
460
628
|
title: {
|
|
461
|
-
fontSize:
|
|
462
|
-
fontWeight: '
|
|
463
|
-
marginTop:
|
|
629
|
+
fontSize: 24,
|
|
630
|
+
fontWeight: '700',
|
|
631
|
+
marginTop: 8
|
|
464
632
|
},
|
|
465
633
|
subtitle: {
|
|
466
|
-
fontSize:
|
|
467
|
-
|
|
468
|
-
|
|
634
|
+
fontSize: 14,
|
|
635
|
+
textAlign: 'center',
|
|
636
|
+
lineHeight: 20,
|
|
637
|
+
maxWidth: 320
|
|
469
638
|
},
|
|
470
639
|
qrContainer: {
|
|
471
640
|
padding: 20,
|