@onairos/react-native 3.7.2 → 3.7.4
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/api/index.js +219 -9
- package/lib/commonjs/components/BodyText.js +27 -9
- package/lib/commonjs/components/BrandMark.js +111 -10
- package/lib/commonjs/components/CodeInput.js +120 -9
- package/lib/commonjs/components/EmailInput.js +30 -8
- package/lib/commonjs/components/GoogleButton.js +56 -9
- package/lib/commonjs/components/HeadingGroup.js +43 -9
- package/lib/commonjs/components/LLMDataInputModal.js +664 -14
- package/lib/commonjs/components/ModalHeader.js +99 -9
- package/lib/commonjs/components/ModalSheet.js +47 -9
- package/lib/commonjs/components/Onairos.js +380 -14
- package/lib/commonjs/components/OnairosButton.js +313 -13
- package/lib/commonjs/components/OnairosSignInButton.js +130 -12
- package/lib/commonjs/components/Overlay.js +465 -13
- package/lib/commonjs/components/PersonaImage.js +137 -10
- package/lib/commonjs/components/PersonaLoadingScreen.js +318 -12
- package/lib/commonjs/components/PersonalizationConsentScreen.js +467 -13
- package/lib/commonjs/components/PinCreationScreen.js +403 -12
- package/lib/commonjs/components/PinInput.js +464 -9
- package/lib/commonjs/components/PlatformConnectorsStep.js +1311 -23
- package/lib/commonjs/components/PlatformList.js +137 -10
- package/lib/commonjs/components/PlatformToggle.js +180 -9
- package/lib/commonjs/components/PrimaryButton.js +180 -10
- package/lib/commonjs/components/SignInMatchAnimation.js +197 -9
- package/lib/commonjs/components/SignInStep.js +345 -12
- package/lib/commonjs/components/UniversalOnboarding.js +2780 -30
- package/lib/commonjs/components/VerificationStep.js +176 -11
- package/lib/commonjs/components/WelcomeScreen.js +461 -22
- package/lib/commonjs/components/icons/Basicproficon.js +37 -8
- package/lib/commonjs/components/icons/Basicprofile.js +21 -8
- package/lib/commonjs/components/icons/Checkbox.js +21 -8
- package/lib/commonjs/components/icons/Checkmark.js +27 -8
- package/lib/commonjs/components/icons/Contentanalysis.js +21 -8
- package/lib/commonjs/components/icons/Contenticon.js +39 -8
- package/lib/commonjs/components/icons/EnochE.js +41 -8
- package/lib/commonjs/components/icons/Personalityicon.js +30 -8
- package/lib/commonjs/components/icons/Personalityprofile.js +21 -8
- package/lib/commonjs/components/icons/Personalitytraits.js +21 -8
- package/lib/commonjs/components/icons/Userpreferences.js +21 -8
- package/lib/commonjs/components/icons/index.js +84 -17
- package/lib/commonjs/components/onboarding/OAuthWebView.js +1754 -18
- package/lib/commonjs/components/onboarding/OnboardingHeader.js +74 -10
- package/lib/commonjs/components/onboarding/PinInput.js +283 -10
- package/lib/commonjs/components/onboarding/PlatformConnector.js +249 -11
- package/lib/commonjs/config/PLATFORM_APIS.md +849 -0
- package/lib/commonjs/config/api.js +56 -7
- package/lib/commonjs/constants/index.js +120 -7
- package/lib/commonjs/context/AuthContext.js +345 -10
- package/lib/commonjs/hooks/useConnectedAccounts.js +111 -9
- package/lib/commonjs/hooks/useConnections.js +102 -8
- package/lib/commonjs/hooks/useCredentials.js +178 -10
- package/lib/commonjs/hooks/useUserConnections.js +148 -10
- package/lib/commonjs/index.js +439 -34
- package/lib/commonjs/services/apiClient.js +298 -8
- package/lib/commonjs/services/biometricPinService.js +180 -8
- package/lib/commonjs/services/chatGPTConversationExtractor.js +155 -8
- package/lib/commonjs/services/chatGPTConversationService.js +275 -9
- package/lib/commonjs/services/claudeConversationExtractor.js +103 -8
- package/lib/commonjs/services/claudeConversationService.js +158 -9
- package/lib/commonjs/services/connectedAccountsService.js +310 -10
- package/lib/commonjs/services/googleAuthService.js +252 -11
- package/lib/commonjs/services/hingeDataExtractor.js +105 -8
- package/lib/commonjs/services/hingeDataService.js +150 -9
- package/lib/commonjs/services/imageCompressionService.js +260 -7
- package/lib/commonjs/services/instagramDataExtractor.js +126 -8
- package/lib/commonjs/services/instagramDataService.js +163 -9
- package/lib/commonjs/services/jwtStorageService.js +276 -7
- package/lib/commonjs/services/linkedinDOMExtractor.js +245 -7
- package/lib/commonjs/services/linkedinProfileService.js +222 -9
- package/lib/commonjs/services/linkedinScrapingService.js +230 -8
- package/lib/commonjs/services/llmDataStorage.js +294 -8
- package/lib/commonjs/services/mobileTrainingService.js +186 -8
- package/lib/commonjs/services/netflixDataExtractor.js +120 -8
- package/lib/commonjs/services/netflixDataService.js +198 -9
- package/lib/commonjs/services/pinEncryptionService.js +84 -8
- package/lib/commonjs/services/pinStorageUtils.js +105 -7
- package/lib/commonjs/services/platformAuthService.js +1484 -12
- package/lib/commonjs/services/sephoraDataExtractor.js +140 -8
- package/lib/commonjs/services/sephoraDataService.js +200 -9
- package/lib/commonjs/services/spotifyDataExtractor.js +148 -8
- package/lib/commonjs/services/spotifyDataService.js +241 -9
- package/lib/commonjs/services/storageService.js +404 -8
- package/lib/commonjs/services/telegramDataExtractor.js +115 -8
- package/lib/commonjs/services/telegramDataService.js +499 -9
- package/lib/commonjs/services/trainingApiHelpers.js +73 -7
- package/lib/commonjs/services/userConnectionsService.js +340 -10
- package/lib/commonjs/services/youtubeMigrationService.js +416 -10
- package/lib/commonjs/theme/index.js +250 -7
- package/lib/commonjs/types/ambient.d.js +2 -1
- package/lib/commonjs/types/declarations.d.js +2 -1
- package/lib/commonjs/types/index.js +6 -1
- package/lib/commonjs/types/node-fix.d.js +2 -1
- package/lib/commonjs/types/node-override.d.js +2 -1
- package/lib/commonjs/types/opacity.d.js +2 -1
- package/lib/commonjs/types.js +14 -1
- package/lib/commonjs/utils/Portal.js +98 -8
- package/lib/commonjs/utils/api.js +130 -9
- package/lib/commonjs/utils/assetRegistry.js +210 -35
- package/lib/commonjs/utils/auth.js +112 -9
- package/lib/commonjs/utils/connectorTests.js +613 -29
- package/lib/commonjs/utils/crypto.js +62 -8
- package/lib/commonjs/utils/debugHelper.js +64 -1
- package/lib/commonjs/utils/encryption.js +76 -7
- package/lib/commonjs/utils/eventUtils.js +288 -1
- package/lib/commonjs/utils/haptics.js +66 -9
- package/lib/commonjs/utils/imagePreloader.js +6 -1
- package/lib/commonjs/utils/networkDiagnostics.js +226 -8
- package/lib/commonjs/utils/onairosApi.js +350 -9
- package/lib/commonjs/utils/programmaticFlow.js +117 -9
- package/lib/commonjs/utils/retryHelper.js +220 -1
- package/lib/commonjs/utils/secureStorage.js +349 -10
- package/lib/commonjs/utils/webviewScripts/chatgpt.js +551 -1
- package/lib/commonjs/utils/webviewScripts/claude.js +376 -1
- package/lib/commonjs/utils/webviewScripts/hinge.js +411 -1
- package/lib/commonjs/utils/webviewScripts/index.js +698 -15
- package/lib/commonjs/utils/webviewScripts/instagram.js +454 -1
- package/lib/commonjs/utils/webviewScripts/linkedin.js +880 -1
- package/lib/commonjs/utils/webviewScripts/netflix.js +382 -1
- package/lib/commonjs/utils/webviewScripts/sephora.js +516 -1
- package/lib/commonjs/utils/webviewScripts/spotify.js +419 -1
- package/lib/commonjs/utils/webviewScripts/telegram.js +678 -1
- package/lib/module/api/index.js +211 -1
- package/lib/module/components/BodyText.js +20 -1
- package/lib/module/components/BrandMark.js +104 -1
- package/lib/module/components/CodeInput.js +113 -1
- package/lib/module/components/EmailInput.js +23 -1
- package/lib/module/components/GoogleButton.js +49 -1
- package/lib/module/components/HeadingGroup.js +36 -1
- package/lib/module/components/LLMDataInputModal.js +656 -7
- package/lib/module/components/ModalHeader.js +92 -1
- package/lib/module/components/ModalSheet.js +39 -1
- package/lib/module/components/Onairos.js +373 -1
- package/lib/module/components/OnairosButton.js +305 -1
- package/lib/module/components/OnairosSignInButton.js +121 -1
- package/lib/module/components/Overlay.js +456 -1
- package/lib/module/components/PersonaImage.js +129 -1
- package/lib/module/components/PersonaLoadingScreen.js +310 -1
- package/lib/module/components/PersonalizationConsentScreen.js +460 -1
- package/lib/module/components/PinCreationScreen.js +396 -1
- package/lib/module/components/PinInput.js +456 -1
- package/lib/module/components/PlatformConnectorsStep.js +1302 -6
- package/lib/module/components/PlatformList.js +129 -1
- package/lib/module/components/PlatformToggle.js +173 -1
- package/lib/module/components/PrimaryButton.js +172 -1
- package/lib/module/components/SignInMatchAnimation.js +189 -1
- package/lib/module/components/SignInStep.js +338 -1
- package/lib/module/components/UniversalOnboarding.js +2770 -1
- package/lib/module/components/VerificationStep.js +168 -1
- package/lib/module/components/WelcomeScreen.js +453 -1
- package/lib/module/components/icons/Basicproficon.js +30 -1
- package/lib/module/components/icons/Basicprofile.js +14 -1
- package/lib/module/components/icons/Checkbox.js +14 -1
- package/lib/module/components/icons/Checkmark.js +20 -1
- package/lib/module/components/icons/Contentanalysis.js +14 -1
- package/lib/module/components/icons/Contenticon.js +32 -1
- package/lib/module/components/icons/EnochE.js +34 -1
- package/lib/module/components/icons/Personalityicon.js +23 -1
- package/lib/module/components/icons/Personalityprofile.js +14 -1
- package/lib/module/components/icons/Personalitytraits.js +14 -1
- package/lib/module/components/icons/Userpreferences.js +14 -1
- package/lib/module/components/icons/index.js +13 -1
- package/lib/module/components/onboarding/OAuthWebView.js +1746 -1
- package/lib/module/components/onboarding/OnboardingHeader.js +66 -1
- package/lib/module/components/onboarding/PinInput.js +274 -1
- package/lib/module/components/onboarding/PlatformConnector.js +240 -1
- package/lib/module/config/PLATFORM_APIS.md +849 -0
- package/lib/module/config/api.js +47 -1
- package/lib/module/constants/index.js +114 -1
- package/lib/module/context/AuthContext.js +335 -1
- package/lib/module/hooks/useConnectedAccounts.js +106 -1
- package/lib/module/hooks/useConnections.js +95 -1
- package/lib/module/hooks/useCredentials.js +171 -6
- package/lib/module/hooks/useUserConnections.js +140 -1
- package/lib/module/index.js +172 -1
- package/lib/module/services/apiClient.js +295 -1
- package/lib/module/services/biometricPinService.js +169 -1
- package/lib/module/services/chatGPTConversationExtractor.js +149 -1
- package/lib/module/services/chatGPTConversationService.js +268 -1
- package/lib/module/services/claudeConversationExtractor.js +97 -1
- package/lib/module/services/claudeConversationService.js +151 -1
- package/lib/module/services/connectedAccountsService.js +293 -1
- package/lib/module/services/googleAuthService.js +241 -1
- package/lib/module/services/hingeDataExtractor.js +99 -1
- package/lib/module/services/hingeDataService.js +143 -1
- package/lib/module/services/imageCompressionService.js +250 -1
- package/lib/module/services/instagramDataExtractor.js +120 -1
- package/lib/module/services/instagramDataService.js +156 -1
- package/lib/module/services/jwtStorageService.js +257 -1
- package/lib/module/services/linkedinDOMExtractor.js +234 -1
- package/lib/module/services/linkedinProfileService.js +210 -1
- package/lib/module/services/linkedinScrapingService.js +219 -1
- package/lib/module/services/llmDataStorage.js +277 -1
- package/lib/module/services/mobileTrainingService.js +173 -1
- package/lib/module/services/netflixDataExtractor.js +114 -1
- package/lib/module/services/netflixDataService.js +191 -1
- package/lib/module/services/pinEncryptionService.js +74 -6
- package/lib/module/services/pinStorageUtils.js +93 -1
- package/lib/module/services/platformAuthService.js +1461 -1
- package/lib/module/services/sephoraDataExtractor.js +134 -1
- package/lib/module/services/sephoraDataService.js +193 -1
- package/lib/module/services/spotifyDataExtractor.js +142 -1
- package/lib/module/services/spotifyDataService.js +234 -1
- package/lib/module/services/storageService.js +383 -1
- package/lib/module/services/telegramDataExtractor.js +109 -1
- package/lib/module/services/telegramDataService.js +493 -1
- package/lib/module/services/trainingApiHelpers.js +67 -1
- package/lib/module/services/userConnectionsService.js +329 -1
- package/lib/module/services/youtubeMigrationService.js +405 -1
- package/lib/module/theme/index.js +245 -1
- package/lib/module/types.js +10 -1
- package/lib/module/utils/Portal.js +90 -1
- package/lib/module/utils/api.js +118 -1
- package/lib/module/utils/assetRegistry.js +200 -34
- package/lib/module/utils/auth.js +100 -1
- package/lib/module/utils/connectorTests.js +600 -27
- package/lib/module/utils/crypto.js +54 -1
- package/lib/module/utils/debugHelper.js +54 -1
- package/lib/module/utils/encryption.js +67 -1
- package/lib/module/utils/eventUtils.js +270 -1
- package/lib/module/utils/haptics.js +59 -8
- package/lib/module/utils/imagePreloader.js +3 -1
- package/lib/module/utils/networkDiagnostics.js +217 -1
- package/lib/module/utils/onairosApi.js +333 -1
- package/lib/module/utils/programmaticFlow.js +111 -1
- package/lib/module/utils/retryHelper.js +211 -1
- package/lib/module/utils/secureStorage.js +330 -6
- package/lib/module/utils/webviewScripts/chatgpt.js +545 -1
- package/lib/module/utils/webviewScripts/claude.js +370 -1
- package/lib/module/utils/webviewScripts/hinge.js +405 -1
- package/lib/module/utils/webviewScripts/index.js +434 -1
- package/lib/module/utils/webviewScripts/instagram.js +448 -1
- package/lib/module/utils/webviewScripts/linkedin.js +874 -1
- package/lib/module/utils/webviewScripts/netflix.js +376 -1
- package/lib/module/utils/webviewScripts/sephora.js +510 -1
- package/lib/module/utils/webviewScripts/spotify.js +413 -1
- package/lib/module/utils/webviewScripts/telegram.js +672 -1
- package/package.json +2 -2
|
@@ -1,7 +1,250 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.default = exports.TEXT_STYLES = exports.SPACING = exports.SHADOWS = exports.FONTS = exports.COLORS = exports.BORDER_RADIUS = void 0;
|
|
7
|
+
var _reactNative = require("react-native");
|
|
8
|
+
// Color Tokens as specified in the design brief
|
|
9
|
+
const COLORS = exports.COLORS = {
|
|
10
|
+
// Welcome Screen Specific Colors
|
|
11
|
+
surface: '#FAFAFA',
|
|
12
|
+
grey300: '#D1D5DB',
|
|
13
|
+
grey400: '#9CA3AF',
|
|
14
|
+
grey500: '#86888E',
|
|
15
|
+
grey600: '#62646C',
|
|
16
|
+
grey700: '#374151',
|
|
17
|
+
grey800: '#1F242F',
|
|
18
|
+
// PrimaryButton exact tokens
|
|
19
|
+
btnGradStart: '#29292B',
|
|
20
|
+
btnGradEnd: '#17181C',
|
|
21
|
+
btnBorder: 'rgba(0,0,0,0.20)',
|
|
22
|
+
btnShadowOuter: 'rgba(0,0,0,0.10)',
|
|
23
|
+
btnInnerShadow: 'rgba(0,0,0,0.06)',
|
|
24
|
+
btnLabel: '#FFFFFF',
|
|
25
|
+
iconCircleGradientStart: '#0A090E',
|
|
26
|
+
iconCircleGradientEnd: '#17171B',
|
|
27
|
+
// Legacy colors (preserved for backward compatibility)
|
|
28
|
+
primary: '#FFD700',
|
|
29
|
+
primaryDark: '#E9B104',
|
|
30
|
+
primaryLight: '#FFDF33',
|
|
31
|
+
background: {
|
|
32
|
+
dark: '#000000',
|
|
33
|
+
medium: '#121212',
|
|
34
|
+
light: '#1C2526'
|
|
35
|
+
},
|
|
36
|
+
text: {
|
|
37
|
+
primary: '#FFFFFF',
|
|
38
|
+
secondary: '#B0B0B0',
|
|
39
|
+
tertiary: '#808080',
|
|
40
|
+
gold: '#FFD700'
|
|
41
|
+
},
|
|
42
|
+
ui: {
|
|
43
|
+
cardBackground: 'rgba(255, 255, 255, 0.1)',
|
|
44
|
+
divider: 'rgba(255, 255, 255, 0.1)',
|
|
45
|
+
inputBackground: 'rgba(255, 255, 255, 0.1)',
|
|
46
|
+
buttonBackground: 'rgba(255, 255, 255, 0.1)'
|
|
47
|
+
},
|
|
48
|
+
status: {
|
|
49
|
+
success: '#4BB543',
|
|
50
|
+
error: '#FF3B30',
|
|
51
|
+
warning: '#FF9500',
|
|
52
|
+
info: '#5AC8FA'
|
|
53
|
+
},
|
|
54
|
+
transparent: 'transparent',
|
|
55
|
+
overlay: 'rgba(0, 0, 0, 0.7)'
|
|
56
|
+
};
|
|
57
|
+
|
|
58
|
+
// Typography - Font families and weights as specified
|
|
59
|
+
const FONTS = exports.FONTS = {
|
|
60
|
+
families: {
|
|
61
|
+
ibmPlexSans: _reactNative.Platform.OS === 'ios' ? 'IBM Plex Sans' : 'IBM Plex Sans',
|
|
62
|
+
ibmPlexSansBold: _reactNative.Platform.OS === 'ios' ? 'IBM Plex Sans' : 'IBM Plex Sans',
|
|
63
|
+
inter: _reactNative.Platform.OS === 'ios' ? 'Inter' : 'Inter-Regular',
|
|
64
|
+
// Legacy families
|
|
65
|
+
base: _reactNative.Platform.OS === 'ios' ? 'System' : 'Roboto',
|
|
66
|
+
serif: _reactNative.Platform.OS === 'ios' ? 'Georgia' : 'serif'
|
|
67
|
+
},
|
|
68
|
+
weights: {
|
|
69
|
+
light: '300',
|
|
70
|
+
regular: '400',
|
|
71
|
+
medium: '500',
|
|
72
|
+
semibold: '600',
|
|
73
|
+
bold: '700'
|
|
74
|
+
},
|
|
75
|
+
sizes: {
|
|
76
|
+
xs: 12,
|
|
77
|
+
sm: 14,
|
|
78
|
+
md: 16,
|
|
79
|
+
lg: 18,
|
|
80
|
+
xl: 20,
|
|
81
|
+
xxl: 24,
|
|
82
|
+
xxxl: 28,
|
|
83
|
+
title: 32,
|
|
84
|
+
large: 42,
|
|
85
|
+
// Welcome screen specific sizes
|
|
86
|
+
kicker: 18,
|
|
87
|
+
welcomeTitle: 48,
|
|
88
|
+
body: 16,
|
|
89
|
+
buttonLabel: 16
|
|
90
|
+
},
|
|
91
|
+
lineHeights: {
|
|
92
|
+
// Welcome screen specific line heights
|
|
93
|
+
kicker: 20,
|
|
94
|
+
// 111%
|
|
95
|
+
welcomeTitle: 54,
|
|
96
|
+
// 112.5%
|
|
97
|
+
body: 24,
|
|
98
|
+
// 150%
|
|
99
|
+
// Legacy line heights
|
|
100
|
+
sm: 16,
|
|
101
|
+
md: 20,
|
|
102
|
+
lg: 24,
|
|
103
|
+
xl: 28
|
|
104
|
+
},
|
|
105
|
+
letterSpacing: {
|
|
106
|
+
kicker: -0.24,
|
|
107
|
+
tight: -0.5,
|
|
108
|
+
normal: 0,
|
|
109
|
+
wide: 0.5
|
|
110
|
+
}
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
// Spacing tokens
|
|
114
|
+
const SPACING = exports.SPACING = {
|
|
115
|
+
xs: 4,
|
|
116
|
+
sm: 8,
|
|
117
|
+
md: 16,
|
|
118
|
+
lg: 24,
|
|
119
|
+
xl: 32,
|
|
120
|
+
xxl: 48,
|
|
121
|
+
xxxl: 64,
|
|
122
|
+
// Welcome screen specific spacing
|
|
123
|
+
modalTopPadding: 118,
|
|
124
|
+
modalHorizontal: 24
|
|
125
|
+
};
|
|
126
|
+
|
|
127
|
+
// Border radius tokens
|
|
128
|
+
const BORDER_RADIUS = exports.BORDER_RADIUS = {
|
|
129
|
+
xs: 4,
|
|
130
|
+
sm: 8,
|
|
131
|
+
md: 16,
|
|
132
|
+
lg: 24,
|
|
133
|
+
xl: 32,
|
|
134
|
+
pill: 100,
|
|
135
|
+
circle: 999,
|
|
136
|
+
// Welcome screen specific radii
|
|
137
|
+
modalTop: 24,
|
|
138
|
+
buttonPill: 100
|
|
139
|
+
};
|
|
140
|
+
|
|
141
|
+
// Shadow tokens
|
|
142
|
+
const SHADOWS = exports.SHADOWS = {
|
|
143
|
+
small: {
|
|
144
|
+
shadowColor: COLORS.primary,
|
|
145
|
+
shadowOffset: {
|
|
146
|
+
width: 0,
|
|
147
|
+
height: 2
|
|
148
|
+
},
|
|
149
|
+
shadowOpacity: 0.3,
|
|
150
|
+
shadowRadius: 4,
|
|
151
|
+
elevation: 3
|
|
152
|
+
},
|
|
153
|
+
medium: {
|
|
154
|
+
shadowColor: COLORS.primary,
|
|
155
|
+
shadowOffset: {
|
|
156
|
+
width: 0,
|
|
157
|
+
height: 4
|
|
158
|
+
},
|
|
159
|
+
shadowOpacity: 0.5,
|
|
160
|
+
shadowRadius: 8,
|
|
161
|
+
elevation: 5
|
|
162
|
+
},
|
|
163
|
+
large: {
|
|
164
|
+
shadowColor: COLORS.primary,
|
|
165
|
+
shadowOffset: {
|
|
166
|
+
width: 0,
|
|
167
|
+
height: 6
|
|
168
|
+
},
|
|
169
|
+
shadowOpacity: 0.8,
|
|
170
|
+
shadowRadius: 16,
|
|
171
|
+
elevation: 8
|
|
172
|
+
},
|
|
173
|
+
// Welcome screen specific shadows
|
|
174
|
+
button: {
|
|
175
|
+
// Inner shadow (simulated via overlay)
|
|
176
|
+
inner: {
|
|
177
|
+
shadowColor: COLORS.btnInnerShadow,
|
|
178
|
+
shadowOffset: {
|
|
179
|
+
width: 0,
|
|
180
|
+
height: -36
|
|
181
|
+
},
|
|
182
|
+
shadowOpacity: 1,
|
|
183
|
+
shadowRadius: 21.1
|
|
184
|
+
},
|
|
185
|
+
// Outer shadow
|
|
186
|
+
outer: {
|
|
187
|
+
shadowColor: COLORS.btnShadowOuter,
|
|
188
|
+
shadowOffset: {
|
|
189
|
+
width: 20,
|
|
190
|
+
height: 30
|
|
191
|
+
},
|
|
192
|
+
shadowOpacity: 1,
|
|
193
|
+
shadowRadius: 40,
|
|
194
|
+
elevation: 8
|
|
195
|
+
}
|
|
196
|
+
},
|
|
197
|
+
brandMark: {
|
|
198
|
+
shadowColor: '#000000',
|
|
199
|
+
shadowOffset: {
|
|
200
|
+
width: 0,
|
|
201
|
+
height: 4
|
|
202
|
+
},
|
|
203
|
+
shadowOpacity: 0.1,
|
|
204
|
+
shadowRadius: 8,
|
|
205
|
+
elevation: 4
|
|
206
|
+
}
|
|
207
|
+
};
|
|
208
|
+
|
|
209
|
+
// Typography style objects for easy use
|
|
210
|
+
const TEXT_STYLES = exports.TEXT_STYLES = {
|
|
211
|
+
// Welcome screen typography
|
|
212
|
+
kicker: {
|
|
213
|
+
fontFamily: FONTS.families.ibmPlexSansBold,
|
|
214
|
+
fontWeight: FONTS.weights.bold,
|
|
215
|
+
fontSize: FONTS.sizes.kicker,
|
|
216
|
+
lineHeight: FONTS.lineHeights.kicker,
|
|
217
|
+
letterSpacing: FONTS.letterSpacing.kicker,
|
|
218
|
+
color: COLORS.grey500
|
|
219
|
+
},
|
|
220
|
+
welcomeTitle: {
|
|
221
|
+
fontFamily: FONTS.families.ibmPlexSansBold,
|
|
222
|
+
fontWeight: FONTS.weights.bold,
|
|
223
|
+
fontSize: FONTS.sizes.welcomeTitle,
|
|
224
|
+
lineHeight: FONTS.lineHeights.welcomeTitle,
|
|
225
|
+
color: COLORS.grey800
|
|
226
|
+
},
|
|
227
|
+
body: {
|
|
228
|
+
fontFamily: FONTS.families.inter,
|
|
229
|
+
fontWeight: FONTS.weights.regular,
|
|
230
|
+
fontSize: FONTS.sizes.body,
|
|
231
|
+
lineHeight: FONTS.lineHeights.body,
|
|
232
|
+
textAlign: 'center',
|
|
233
|
+
color: COLORS.grey600
|
|
234
|
+
},
|
|
235
|
+
buttonLabel: {
|
|
236
|
+
fontFamily: FONTS.families.inter,
|
|
237
|
+
fontWeight: FONTS.weights.semibold,
|
|
238
|
+
fontSize: FONTS.sizes.buttonLabel,
|
|
239
|
+
color: COLORS.btnLabel
|
|
240
|
+
}
|
|
241
|
+
};
|
|
242
|
+
var _default = exports.default = {
|
|
243
|
+
COLORS,
|
|
244
|
+
FONTS,
|
|
245
|
+
SPACING,
|
|
246
|
+
BORDER_RADIUS,
|
|
247
|
+
SHADOWS,
|
|
248
|
+
TEXT_STYLES
|
|
249
|
+
};
|
|
250
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
//# sourceMappingURL=ambient.d.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
//# sourceMappingURL=declarations.d.js.map
|
|
@@ -1 +1,6 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
//# sourceMappingURL=index.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
//# sourceMappingURL=node-fix.d.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
//# sourceMappingURL=node-override.d.js.map
|
|
@@ -1 +1,2 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
//# sourceMappingURL=opacity.d.js.map
|
package/lib/commonjs/types.js
CHANGED
|
@@ -1 +1,14 @@
|
|
|
1
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.ApiKeyType = void 0;
|
|
7
|
+
// API key types
|
|
8
|
+
let ApiKeyType = exports.ApiKeyType = /*#__PURE__*/function (ApiKeyType) {
|
|
9
|
+
ApiKeyType["DEVELOPER"] = "developer";
|
|
10
|
+
ApiKeyType["ADMIN"] = "admin";
|
|
11
|
+
ApiKeyType["INVALID"] = "invalid";
|
|
12
|
+
return ApiKeyType;
|
|
13
|
+
}({}); // ... rest of the existing types ...
|
|
14
|
+
//# sourceMappingURL=types.js.map
|
|
@@ -1,8 +1,98 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.PortalHost = exports.Portal = void 0;
|
|
7
|
+
var _react = _interopRequireWildcard(require("react"));
|
|
8
|
+
var _reactNative = require("react-native");
|
|
9
|
+
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); }
|
|
10
|
+
// Store for portal instances
|
|
11
|
+
const portalRefs = {};
|
|
12
|
+
let portalId = 0;
|
|
13
|
+
|
|
14
|
+
// Context to pass portal host state
|
|
15
|
+
const PortalContext = /*#__PURE__*/_react.default.createContext({
|
|
16
|
+
mount: () => 0,
|
|
17
|
+
update: () => {},
|
|
18
|
+
unmount: () => {}
|
|
19
|
+
});
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Portal Host component - place this at the root of your app
|
|
23
|
+
*/
|
|
24
|
+
const PortalHost = ({
|
|
25
|
+
children
|
|
26
|
+
}) => {
|
|
27
|
+
const [portals, setPortals] = (0, _react.useState)({});
|
|
28
|
+
const mount = children => {
|
|
29
|
+
const key = ++portalId;
|
|
30
|
+
setPortals(state => ({
|
|
31
|
+
...state,
|
|
32
|
+
[key]: children
|
|
33
|
+
}));
|
|
34
|
+
return key;
|
|
35
|
+
};
|
|
36
|
+
const update = (key, children) => {
|
|
37
|
+
setPortals(state => ({
|
|
38
|
+
...state,
|
|
39
|
+
[key]: children
|
|
40
|
+
}));
|
|
41
|
+
};
|
|
42
|
+
const unmount = key => {
|
|
43
|
+
setPortals(state => {
|
|
44
|
+
const newState = {
|
|
45
|
+
...state
|
|
46
|
+
};
|
|
47
|
+
delete newState[key];
|
|
48
|
+
return newState;
|
|
49
|
+
});
|
|
50
|
+
};
|
|
51
|
+
return /*#__PURE__*/_react.default.createElement(PortalContext.Provider, {
|
|
52
|
+
value: {
|
|
53
|
+
mount,
|
|
54
|
+
update,
|
|
55
|
+
unmount
|
|
56
|
+
}
|
|
57
|
+
}, children, Object.keys(portals).map(key => /*#__PURE__*/_react.default.createElement(_reactNative.View, {
|
|
58
|
+
key: key,
|
|
59
|
+
style: {
|
|
60
|
+
position: 'absolute',
|
|
61
|
+
top: 0,
|
|
62
|
+
left: 0,
|
|
63
|
+
right: 0,
|
|
64
|
+
bottom: 0,
|
|
65
|
+
zIndex: 9999
|
|
66
|
+
}
|
|
67
|
+
}, portals[Number(key)])));
|
|
68
|
+
};
|
|
69
|
+
|
|
70
|
+
/**
|
|
71
|
+
* Portal component - renders children into the PortalHost
|
|
72
|
+
*/
|
|
73
|
+
exports.PortalHost = PortalHost;
|
|
74
|
+
const Portal = ({
|
|
75
|
+
children
|
|
76
|
+
}) => {
|
|
77
|
+
const {
|
|
78
|
+
mount,
|
|
79
|
+
update,
|
|
80
|
+
unmount
|
|
81
|
+
} = _react.default.useContext(PortalContext);
|
|
82
|
+
const [portalId, setPortalId] = (0, _react.useState)(null);
|
|
83
|
+
(0, _react.useEffect)(() => {
|
|
84
|
+
const id = mount(children);
|
|
85
|
+
setPortalId(id);
|
|
86
|
+
return () => {
|
|
87
|
+
if (portalId) unmount(portalId);
|
|
88
|
+
};
|
|
89
|
+
}, []);
|
|
90
|
+
(0, _react.useEffect)(() => {
|
|
91
|
+
if (portalId !== null) {
|
|
92
|
+
update(portalId, children);
|
|
93
|
+
}
|
|
94
|
+
}, [children, portalId]);
|
|
95
|
+
return null;
|
|
96
|
+
};
|
|
97
|
+
exports.Portal = Portal;
|
|
98
|
+
//# sourceMappingURL=Portal.js.map
|
|
@@ -1,9 +1,130 @@
|
|
|
1
|
-
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
Object.defineProperty(exports, "__esModule", {
|
|
4
|
+
value: true
|
|
5
|
+
});
|
|
6
|
+
exports.validateDomain = exports.getApiUrl = exports.fetchAccountInfo = exports.createApiInstance = exports.createAccount = void 0;
|
|
7
|
+
var _axios = _interopRequireDefault(require("axios"));
|
|
8
|
+
var _asyncStorage = _interopRequireDefault(require("@react-native-async-storage/async-storage"));
|
|
9
|
+
var _api = require("../config/api");
|
|
10
|
+
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
|
|
11
|
+
const API_URL = _api.API_CONFIG.BASE_URL;
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Create an API instance with authorization headers
|
|
15
|
+
* @returns {Promise<Object>} - The axios instance
|
|
16
|
+
*/
|
|
17
|
+
const createApiInstance = async () => {
|
|
18
|
+
const token = await _asyncStorage.default.getItem('onairosToken');
|
|
19
|
+
return _axios.default.create({
|
|
20
|
+
baseURL: API_URL,
|
|
21
|
+
headers: {
|
|
22
|
+
'Content-Type': 'application/json',
|
|
23
|
+
...(token ? {
|
|
24
|
+
'Authorization': `Bearer ${token}`
|
|
25
|
+
} : {})
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Validate the domain with the Onairos API
|
|
32
|
+
* @returns {Promise<Object>} - The validation response
|
|
33
|
+
*/
|
|
34
|
+
exports.createApiInstance = createApiInstance;
|
|
35
|
+
const validateDomain = async () => {
|
|
36
|
+
try {
|
|
37
|
+
const api = await createApiInstance();
|
|
38
|
+
const response = await api.post('/valid/validate-domain');
|
|
39
|
+
return response.data;
|
|
40
|
+
} catch (error) {
|
|
41
|
+
console.error('Error validating domain:', error);
|
|
42
|
+
return {
|
|
43
|
+
status: false
|
|
44
|
+
};
|
|
45
|
+
}
|
|
46
|
+
};
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* Fetch account information
|
|
50
|
+
* @param {string} identifier - The username or email
|
|
51
|
+
* @param {boolean} isEmail - Whether the identifier is an email
|
|
52
|
+
* @returns {Promise<Object>} - The account information
|
|
53
|
+
*/
|
|
54
|
+
exports.validateDomain = validateDomain;
|
|
55
|
+
const fetchAccountInfo = async (identifier, isEmail = false) => {
|
|
56
|
+
try {
|
|
57
|
+
const api = await createApiInstance();
|
|
58
|
+
const jsonData = isEmail ? {
|
|
59
|
+
Info: {
|
|
60
|
+
identifier
|
|
61
|
+
}
|
|
62
|
+
} : {
|
|
63
|
+
Info: {
|
|
64
|
+
userName: identifier
|
|
65
|
+
}
|
|
66
|
+
};
|
|
67
|
+
const endpoint = isEmail ? '/getAccountInfo/email' : '/getAccountInfo';
|
|
68
|
+
const response = await api.post(endpoint, jsonData);
|
|
69
|
+
return response.data;
|
|
70
|
+
} catch (error) {
|
|
71
|
+
console.error('Error fetching account info:', error);
|
|
72
|
+
throw error;
|
|
73
|
+
}
|
|
74
|
+
};
|
|
75
|
+
|
|
76
|
+
/**
|
|
77
|
+
* Get API URL for data requests
|
|
78
|
+
* @param {Array} approvedRequests - The approved data requests
|
|
79
|
+
* @param {string} pin - The encrypted PIN
|
|
80
|
+
* @param {string} othentSub - The hashed Othent sub
|
|
81
|
+
* @returns {Promise<Object>} - The API URL response
|
|
82
|
+
*/
|
|
83
|
+
exports.fetchAccountInfo = fetchAccountInfo;
|
|
84
|
+
const getApiUrl = async (approvedRequests, pin, othentSub) => {
|
|
85
|
+
try {
|
|
86
|
+
const api = await createApiInstance();
|
|
87
|
+
const jsonData = {
|
|
88
|
+
Info: {
|
|
89
|
+
EncryptedUserPin: pin,
|
|
90
|
+
confirmations: approvedRequests,
|
|
91
|
+
web3Type: 'othent',
|
|
92
|
+
Domain: Platform.OS,
|
|
93
|
+
proofMode: false,
|
|
94
|
+
OthentSub: othentSub
|
|
95
|
+
}
|
|
96
|
+
};
|
|
97
|
+
const response = await api.post('/getAPIurl', jsonData);
|
|
98
|
+
return response.data;
|
|
99
|
+
} catch (error) {
|
|
100
|
+
console.error('Error getting API URL:', error);
|
|
101
|
+
throw error;
|
|
102
|
+
}
|
|
103
|
+
};
|
|
104
|
+
|
|
105
|
+
/**
|
|
106
|
+
* Create a new user account
|
|
107
|
+
* @param {string} othentSub - The hashed Othent sub
|
|
108
|
+
* @param {string} pin - The PIN
|
|
109
|
+
* @param {Array} socialAccounts - The selected social accounts
|
|
110
|
+
* @param {string} email - The user's email
|
|
111
|
+
* @returns {Promise<Object>} - The account creation response
|
|
112
|
+
*/
|
|
113
|
+
exports.getApiUrl = getApiUrl;
|
|
114
|
+
const createAccount = async (othentSub, pin, socialAccounts, email) => {
|
|
115
|
+
try {
|
|
116
|
+
const api = await createApiInstance();
|
|
117
|
+
const response = await api.post('/createAccount', {
|
|
118
|
+
othentSub,
|
|
119
|
+
pin,
|
|
120
|
+
socialAccounts,
|
|
121
|
+
email
|
|
122
|
+
});
|
|
123
|
+
return response.data;
|
|
124
|
+
} catch (error) {
|
|
125
|
+
console.error('Error creating account:', error);
|
|
126
|
+
throw error;
|
|
127
|
+
}
|
|
128
|
+
};
|
|
129
|
+
exports.createAccount = createAccount;
|
|
130
|
+
//# sourceMappingURL=api.js.map
|