@onairosofficial/onairos-capacitor 0.1.0 → 0.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CAPACITOR_QUICK_START.md +379 -0
- package/CONNECTORS.md +122 -0
- package/LICENSE +194 -10
- package/OnairosofficialOnairosCapacitor.podspec +13 -0
- package/Package.swift +26 -0
- package/README.md +176 -25
- package/dist/onairos.capacitor.esm.js +1 -0
- package/dist/onairos.capacitor.esm.turbopack.js +1 -0
- package/docs/CAPACITOR_INTEGRATION_GUIDE.md +159 -0
- package/docs/CAPACITOR_MOCK_APP_TESTING.md +213 -0
- package/docs/CAPACITOR_SDK_FIXES_SUMMARY.md +65 -0
- package/docs/CROSS_SDK_PARITY.md +239 -0
- package/docs/DATA_FREQUENCY.md +57 -0
- package/docs/DEVELOPER_SDK_CHANGES.md +532 -0
- package/docs/INCIDENT_ENABLETRAINING_PIN_WEB_8.1.9.md +82 -0
- package/docs/ONAIROS_BUTTON_PROPS.md +152 -0
- package/docs/PLATFORM_APIS.md +559 -0
- package/docs/RAW_MEMORIES_API.md +305 -0
- package/docs/RAW_MEMORIES_SDK_UPDATE.md +54 -0
- package/docs/SDK_PARITY_ROLLUP_2026_04_24_to_05_02.md +96 -0
- package/docs/oldFixes.md +216 -0
- package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosChatGPTNativePlugin.swift +993 -0
- package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosNetflixNativePlugin.swift +33 -0
- package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosSpotifyNativePlugin.swift +1082 -0
- package/onairos.d.ts +656 -0
- package/package.json +188 -37
- package/src/OnairosReconnectButton.jsx +272 -0
- package/src/RSA.jsx +57 -0
- package/src/assets/NewLogo.png +0 -0
- package/src/assets/OnairosNewLogo.png +0 -0
- package/src/assets/chatgpt-icon.png +0 -0
- package/src/assets/fire-horse.png +0 -0
- package/src/assets/fire-horse.transparent.png +0 -0
- package/src/assets/latest-firehorse.png +0 -0
- package/src/assets/perplexity.png +0 -0
- package/src/assets/persona.png +0 -0
- package/src/assets/persona1.png +0 -0
- package/src/assets/persona2.png +0 -0
- package/src/assets/persona3.png +0 -0
- package/src/assets/persona4.png +0 -0
- package/src/assets/persona5.png +0 -0
- package/src/capacitorConnectorCatalog.js +38 -0
- package/src/capacitorOAuthConfig.js +52 -0
- package/src/chatgptHostedImport/index.js +303 -0
- package/src/components/AuthButtons.jsx +48 -0
- package/src/components/ConnectChatGPTModal.jsx +666 -0
- package/src/components/ConnectClaudeModal.jsx +610 -0
- package/src/components/ConnectGeminiModal.jsx +639 -0
- package/src/components/ConnectGrokModal.jsx +701 -0
- package/src/components/ConnectPerplexityModal.jsx +726 -0
- package/src/components/DataExplainerScreen.jsx +349 -0
- package/src/components/DataRequest.js +885 -0
- package/src/components/DataRequest.jsx +1055 -0
- package/src/components/EmailAuth.js +1871 -0
- package/src/components/EmailAuth.jsx +2062 -0
- package/src/components/ExtensionInstallPrompt.jsx +142 -0
- package/src/components/GoogleButton.js +133 -0
- package/src/components/LLMConnectorManager.jsx +201 -0
- package/src/components/LoadingPage.jsx +19 -0
- package/src/components/LoadingScreen.jsx +81 -0
- package/src/components/LunarBirthdate.jsx +96 -0
- package/src/components/LunarLoadingPage.jsx +251 -0
- package/src/components/Notification.jsx +21 -0
- package/src/components/OnairosAppButton.jsx +85 -0
- package/src/components/OnairosSSO.jsx +645 -0
- package/src/components/OnairosTrigger.jsx +61 -0
- package/src/components/PerplexityLogo.jsx +43 -0
- package/src/components/PinSetup.js +200 -0
- package/src/components/PinSetup.jsx +228 -0
- package/src/components/SDK_PIN_INTEGRATION_REQUIRED_CHANGES.md +526 -0
- package/src/components/SdkErrorBoundary.jsx +36 -0
- package/src/components/SecuritySetup.js +81 -0
- package/src/components/SessionUserBar.jsx +83 -0
- package/src/components/SignUp.js +123 -0
- package/src/components/TestTelegramButton.js +53 -0
- package/src/components/TrainingComponent.jsx +200 -0
- package/src/components/TrainingScreen.jsx +897 -0
- package/src/components/UniversalOnboarding.js +306 -0
- package/src/components/UniversalOnboarding.jsx +4837 -0
- package/src/components/ValentineLoadingPage.jsx +502 -0
- package/src/components/ValentineModeSelector.jsx +162 -0
- package/src/components/WelcomeScreen.jsx +435 -0
- package/src/components/WrappedLoadingPage.jsx +205 -0
- package/src/components/connectors/ChatGPTConnector.js +348 -0
- package/src/components/connectors/ChatGPTConnector.jsx +348 -0
- package/src/components/connectors/ClaudeConnector.js +44 -0
- package/src/components/connectors/ClaudeConnector.jsx +44 -0
- package/src/components/connectors/GeminiConnector.js +170 -0
- package/src/components/connectors/GeminiConnector.jsx +170 -0
- package/src/components/connectors/GmailConnector.js +148 -0
- package/src/components/connectors/GmailConnector.jsx +148 -0
- package/src/components/connectors/GrokConnector.js +16 -0
- package/src/components/connectors/GrokConnector.jsx +16 -0
- package/src/components/connectors/HingeConnector.js +419 -0
- package/src/components/connectors/HingeConnector.jsx +419 -0
- package/src/components/connectors/InstagramDataConnector.js +726 -0
- package/src/components/connectors/InstagramDataConnector.jsx +726 -0
- package/src/components/connectors/LinkedInConnector.js +4 -0
- package/src/components/connectors/LinkedInConnector.jsx +296 -0
- package/src/components/connectors/PerplexityConnector.jsx +16 -0
- package/src/components/connectors/PinterestConnector.js +208 -0
- package/src/components/connectors/PinterestConnector.jsx +208 -0
- package/src/components/connectors/README.md +292 -0
- package/src/components/connectors/RedditConnector.js +229 -0
- package/src/components/connectors/RedditConnector.jsx +229 -0
- package/src/components/connectors/SephoraConnector.js +482 -0
- package/src/components/connectors/SephoraConnector.jsx +482 -0
- package/src/components/connectors/TikTokConnector.jsx +430 -0
- package/src/components/connectors/YoutubeConnector.js +361 -0
- package/src/components/connectors/YoutubeConnector.jsx +361 -0
- package/src/components/connectors/index.js +50 -0
- package/src/components/icons.jsx +46 -0
- package/src/components/icons.tsx +21 -0
- package/src/components/ui/PageLayout.jsx +1255 -0
- package/src/components/ui/PrimaryButton.jsx +162 -0
- package/src/components/ui/button.jsx +49 -0
- package/src/components/ui/card.jsx +61 -0
- package/src/components/ui/checkbox.jsx +33 -0
- package/src/components/ui/label.jsx +29 -0
- package/src/components/utils/UpdateConnections.js +45 -0
- package/src/components/utils/oauthHelper.js +97 -0
- package/src/config/api-config.js +138 -0
- package/src/deepLink.jsx +38 -0
- package/src/getPin.js +26 -0
- package/src/icons/Avatar.png +0 -0
- package/src/icons/Sentiment.png +0 -0
- package/src/icons/Trait.png +0 -0
- package/src/iframe/DataRequestPage.jsx +285 -0
- package/src/iframe/OnairosButtonIntegration.md +148 -0
- package/src/iframe/components/Box.jsx +56 -0
- package/src/iframe/components/IndividualConnection.jsx +88 -0
- package/src/iframe/dataRequestHandler.js +714 -0
- package/src/iframe/data_request_iframe.html +27 -0
- package/src/iframe/data_request_page.js +47 -0
- package/src/iframe/icons/Avatar.png +1 -0
- package/src/iframe/icons/Avatar2.png +1 -0
- package/src/iframe/icons/Sentiment.png +1 -0
- package/src/iframe/icons/Trait.png +1 -0
- package/src/iframe/icons/onairos_logo.png +0 -0
- package/src/iframe/utils/api.js +57 -0
- package/src/index.js +274 -0
- package/src/laravel/OnairosVue.vue +410 -0
- package/src/laravel/blade-helpers.js +320 -0
- package/src/laravel/vite-plugin.js +179 -0
- package/src/mobile/MobileDataRequestPage.jsx +233 -0
- package/src/mobile/components/MobileBox.jsx +71 -0
- package/src/mobile/components/MobileIndividualConnection.jsx +51 -0
- package/src/mobile/shims/browser-apis.js +78 -0
- package/src/mobile/shims/lucide-shim.js +85 -0
- package/src/nativeConnectors.js +5 -0
- package/src/newUI/EMAIL_VERIFICATION_API_SCHEMA.md +268 -0
- package/src/newUI/PlatformConnectorsStep.tsx +435 -0
- package/src/newUI/PrimaryButton.tsx +213 -0
- package/src/newUI/SignInStep.tsx +194 -0
- package/src/newUI/VerificationStep.tsx +133 -0
- package/src/newUI/WelcomeScreen.tsx +311 -0
- package/src/newUI/services/connectedAccountsService.js +129 -0
- package/src/onairos.capacitor.jsx +15 -0
- package/src/onairos.core.jsx +133 -0
- package/src/onairos.jsx +14 -0
- package/src/onairos.native.jsx +15 -0
- package/src/onairosButton.jsx +9000 -0
- package/src/overlay/CheckBox.jsx +114 -0
- package/src/overlay/IndividualConnection copy.js +86 -0
- package/src/overlay/IndividualConnection.js +191 -0
- package/src/overlay/IndividualConnectionNew.jsx +157 -0
- package/src/overlay/box.js +84 -0
- package/src/overlay/overlay.js +437 -0
- package/src/styles/onairos-scoped-preflight.css +97 -0
- package/src/styles/sdkCssRegistry.js +20 -0
- package/src/styles/styleLoaderInsertShadow.js +69 -0
- package/src/styles/tailwind.capacitor.css +395 -0
- package/src/styles/tailwind.css +395 -0
- package/src/theme/colors.js +40 -0
- package/src/utils/apiKeyValidation.js +341 -0
- package/src/utils/apiResponseLogger.js +316 -0
- package/src/utils/authHeaders.js +275 -0
- package/src/utils/biometrics.js +26 -0
- package/src/utils/bookmarkletUtils.js +28 -0
- package/src/utils/capacitorDetection.js +278 -0
- package/src/utils/capacitorLLMHelper.js +352 -0
- package/src/utils/capacitorPlugins.js +366 -0
- package/src/utils/crossDomainSSO.js +587 -0
- package/src/utils/deepLinking.js +27 -0
- package/src/utils/devLogger.js +46 -0
- package/src/utils/extensionDetection.js +418 -0
- package/src/utils/extractMemory.js +277 -0
- package/src/utils/framerBrandingOverrides.js +40 -0
- package/src/utils/googleWebClientId.js +55 -0
- package/src/utils/overlayHandler.js +224 -0
- package/src/utils/platformDisconnect.js +309 -0
- package/src/utils/pollTrainingStatus.js +200 -0
- package/src/utils/rawMemoriesAccess.js +211 -0
- package/src/utils/resolveBackendAppId.js +47 -0
- package/src/utils/responseFormatter.js +140 -0
- package/src/utils/sdkDebugStorage.js +113 -0
- package/src/utils/sdkInitialization.js +645 -0
- package/src/utils/sessionManager.js +1258 -0
- package/src/utils/startBackgroundTraining.js +100 -0
- package/src/utils/userDataFormatter.js +222 -0
- package/index.d.ts +0 -1
- package/index.js +0 -1
|
@@ -0,0 +1,213 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
TouchableOpacity,
|
|
6
|
+
StyleSheet,
|
|
7
|
+
ViewStyle,
|
|
8
|
+
TextStyle,
|
|
9
|
+
ActivityIndicator,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import { Svg, Defs, RadialGradient, Stop, Rect } from 'react-native-svg';
|
|
12
|
+
import LinearGradient from 'react-native-linear-gradient';
|
|
13
|
+
import { COLORS } from '../theme';
|
|
14
|
+
|
|
15
|
+
interface IconCircleProps {
|
|
16
|
+
size?: number;
|
|
17
|
+
children?: React.ReactNode;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
const IconCircle: React.FC<IconCircleProps> = ({
|
|
21
|
+
size = 40,
|
|
22
|
+
children
|
|
23
|
+
}) => {
|
|
24
|
+
return (
|
|
25
|
+
<View style={[styles.iconCircle, { width: size, height: size, borderRadius: size / 2 }]}>
|
|
26
|
+
{/* IconCircle has its own background - the only child that should */}
|
|
27
|
+
<LinearGradient
|
|
28
|
+
colors={[COLORS.iconCircleGradientStart, COLORS.iconCircleGradientEnd]}
|
|
29
|
+
style={[StyleSheet.absoluteFill, { borderRadius: size / 2 }]}
|
|
30
|
+
start={{ x: 0, y: 0 }}
|
|
31
|
+
end={{ x: 0, y: 1 }}
|
|
32
|
+
/>
|
|
33
|
+
|
|
34
|
+
{/* Content */}
|
|
35
|
+
<View style={styles.iconContent}>
|
|
36
|
+
{children || (
|
|
37
|
+
<Text style={styles.arrowText}>→</Text>
|
|
38
|
+
)}
|
|
39
|
+
</View>
|
|
40
|
+
</View>
|
|
41
|
+
);
|
|
42
|
+
};
|
|
43
|
+
|
|
44
|
+
interface PrimaryButtonProps {
|
|
45
|
+
label?: string;
|
|
46
|
+
onPress: () => void;
|
|
47
|
+
iconRight?: React.ReactNode;
|
|
48
|
+
loading?: boolean;
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
testID?: string;
|
|
51
|
+
style?: ViewStyle;
|
|
52
|
+
textStyle?: TextStyle;
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
const PrimaryButton: React.FC<PrimaryButtonProps> = ({
|
|
56
|
+
label = "Get Started",
|
|
57
|
+
onPress,
|
|
58
|
+
iconRight,
|
|
59
|
+
loading = false,
|
|
60
|
+
disabled = false,
|
|
61
|
+
testID,
|
|
62
|
+
style,
|
|
63
|
+
textStyle,
|
|
64
|
+
}) => {
|
|
65
|
+
const [pressed, setPressed] = useState(false);
|
|
66
|
+
|
|
67
|
+
const handlePressIn = () => setPressed(true);
|
|
68
|
+
const handlePressOut = () => setPressed(false);
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<TouchableOpacity
|
|
72
|
+
style={[
|
|
73
|
+
styles.outerPill,
|
|
74
|
+
!disabled && styles.outerShadow,
|
|
75
|
+
disabled && styles.disabled,
|
|
76
|
+
style
|
|
77
|
+
]}
|
|
78
|
+
onPress={onPress}
|
|
79
|
+
onPressIn={handlePressIn}
|
|
80
|
+
onPressOut={handlePressOut}
|
|
81
|
+
disabled={disabled || loading}
|
|
82
|
+
activeOpacity={1}
|
|
83
|
+
testID={testID}
|
|
84
|
+
accessibilityLabel={label}
|
|
85
|
+
accessibilityRole="button"
|
|
86
|
+
>
|
|
87
|
+
{/* ONLY ONE gradient - no overlays */}
|
|
88
|
+
<LinearGradient
|
|
89
|
+
colors={[COLORS.btnGradStart, COLORS.btnGradEnd]}
|
|
90
|
+
style={styles.baseGradient}
|
|
91
|
+
start={{ x: 0, y: 0 }}
|
|
92
|
+
end={{ x: 0, y: 1 }}
|
|
93
|
+
/>
|
|
94
|
+
|
|
95
|
+
{/* Simple pressed state */}
|
|
96
|
+
{pressed && (
|
|
97
|
+
<View style={styles.pressedOverlay} />
|
|
98
|
+
)}
|
|
99
|
+
|
|
100
|
+
{/* Centered text on top */}
|
|
101
|
+
<View style={styles.textContainer}>
|
|
102
|
+
{loading ? (
|
|
103
|
+
<ActivityIndicator color={COLORS.btnLabel} size="small" />
|
|
104
|
+
) : (
|
|
105
|
+
<Text style={[styles.label, textStyle]}>{label}</Text>
|
|
106
|
+
)}
|
|
107
|
+
</View>
|
|
108
|
+
|
|
109
|
+
{/* Icon in fixed position on right */}
|
|
110
|
+
<View style={styles.iconPosition}>
|
|
111
|
+
{!loading && (iconRight || <IconCircle />)}
|
|
112
|
+
</View>
|
|
113
|
+
</TouchableOpacity>
|
|
114
|
+
);
|
|
115
|
+
};
|
|
116
|
+
|
|
117
|
+
const styles = StyleSheet.create({
|
|
118
|
+
// Outer pill container - owns all backgrounds, border, shadow
|
|
119
|
+
outerPill: {
|
|
120
|
+
height: 48,
|
|
121
|
+
borderRadius: 100,
|
|
122
|
+
borderWidth: 1,
|
|
123
|
+
borderColor: COLORS.btnBorder, // ≈20% black
|
|
124
|
+
overflow: 'hidden',
|
|
125
|
+
width: '100%',
|
|
126
|
+
position: 'relative',
|
|
127
|
+
},
|
|
128
|
+
|
|
129
|
+
outerShadow: {
|
|
130
|
+
// Outer shadow: 20px 30px 40px rgba(0,0,0,0.10)
|
|
131
|
+
shadowColor: '#000000',
|
|
132
|
+
shadowOffset: { width: 20, height: 30 },
|
|
133
|
+
shadowOpacity: 0.10,
|
|
134
|
+
shadowRadius: 40,
|
|
135
|
+
elevation: 8,
|
|
136
|
+
},
|
|
137
|
+
|
|
138
|
+
disabled: {
|
|
139
|
+
opacity: 0.65,
|
|
140
|
+
shadowOpacity: 0,
|
|
141
|
+
elevation: 0,
|
|
142
|
+
},
|
|
143
|
+
|
|
144
|
+
// Single base gradient - fills entire button
|
|
145
|
+
baseGradient: {
|
|
146
|
+
...StyleSheet.absoluteFillObject,
|
|
147
|
+
borderRadius: 100,
|
|
148
|
+
},
|
|
149
|
+
|
|
150
|
+
pressedOverlay: {
|
|
151
|
+
...StyleSheet.absoluteFillObject,
|
|
152
|
+
backgroundColor: 'rgba(0,0,0,0.1)',
|
|
153
|
+
borderRadius: 100,
|
|
154
|
+
},
|
|
155
|
+
|
|
156
|
+
// Absolutely centered text container
|
|
157
|
+
textContainer: {
|
|
158
|
+
position: 'absolute',
|
|
159
|
+
left: 0,
|
|
160
|
+
right: 0,
|
|
161
|
+
top: 0,
|
|
162
|
+
bottom: 0,
|
|
163
|
+
justifyContent: 'center',
|
|
164
|
+
alignItems: 'center',
|
|
165
|
+
backgroundColor: 'transparent',
|
|
166
|
+
},
|
|
167
|
+
|
|
168
|
+
// Fixed icon position on right
|
|
169
|
+
iconPosition: {
|
|
170
|
+
position: 'absolute',
|
|
171
|
+
right: 4,
|
|
172
|
+
top: 4,
|
|
173
|
+
bottom: 4,
|
|
174
|
+
width: 40,
|
|
175
|
+
justifyContent: 'center',
|
|
176
|
+
alignItems: 'center',
|
|
177
|
+
backgroundColor: 'transparent',
|
|
178
|
+
},
|
|
179
|
+
|
|
180
|
+
label: {
|
|
181
|
+
fontFamily: 'Inter',
|
|
182
|
+
fontWeight: '600',
|
|
183
|
+
fontSize: 16,
|
|
184
|
+
color: COLORS.btnLabel,
|
|
185
|
+
textAlign: 'center',
|
|
186
|
+
backgroundColor: 'transparent', // Must be transparent
|
|
187
|
+
},
|
|
188
|
+
|
|
189
|
+
// IconCircle styles - ONLY child with background
|
|
190
|
+
iconCircle: {
|
|
191
|
+
justifyContent: 'center',
|
|
192
|
+
alignItems: 'center',
|
|
193
|
+
borderWidth: 1,
|
|
194
|
+
borderColor: 'rgba(0,0,0,0.25)',
|
|
195
|
+
},
|
|
196
|
+
|
|
197
|
+
iconContent: {
|
|
198
|
+
justifyContent: 'center',
|
|
199
|
+
alignItems: 'center',
|
|
200
|
+
backgroundColor: 'transparent',
|
|
201
|
+
},
|
|
202
|
+
|
|
203
|
+
arrowText: {
|
|
204
|
+
fontSize: 20,
|
|
205
|
+
color: COLORS.btnLabel,
|
|
206
|
+
fontWeight: '600',
|
|
207
|
+
opacity: 0.95,
|
|
208
|
+
backgroundColor: 'transparent',
|
|
209
|
+
},
|
|
210
|
+
});
|
|
211
|
+
|
|
212
|
+
export { IconCircle };
|
|
213
|
+
export default PrimaryButton;
|
|
@@ -0,0 +1,194 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
KeyboardAvoidingView,
|
|
7
|
+
Platform,
|
|
8
|
+
Keyboard,
|
|
9
|
+
Animated,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import { COLORS, SPACING, TEXT_STYLES } from '../theme';
|
|
12
|
+
import EmailInput from './EmailInput';
|
|
13
|
+
import GoogleButton from './GoogleButton';
|
|
14
|
+
import PrimaryButton from './PrimaryButton';
|
|
15
|
+
|
|
16
|
+
interface SignInStepProps {
|
|
17
|
+
onEmailSubmit: (email: string) => void;
|
|
18
|
+
onGoogleSignIn: () => void;
|
|
19
|
+
onContinue: () => void;
|
|
20
|
+
loading?: boolean;
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
const SignInStep: React.FC<SignInStepProps> = ({
|
|
24
|
+
onEmailSubmit,
|
|
25
|
+
onGoogleSignIn,
|
|
26
|
+
onContinue,
|
|
27
|
+
loading = false,
|
|
28
|
+
}) => {
|
|
29
|
+
const [email, setEmail] = useState('');
|
|
30
|
+
const [keyboardVisible, setKeyboardVisible] = useState(false);
|
|
31
|
+
|
|
32
|
+
const handleEmailSubmit = () => {
|
|
33
|
+
if (email.trim()) {
|
|
34
|
+
onEmailSubmit(email.trim());
|
|
35
|
+
}
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
useEffect(() => {
|
|
39
|
+
const keyboardDidShowListener = Keyboard.addListener(
|
|
40
|
+
'keyboardDidShow',
|
|
41
|
+
() => setKeyboardVisible(true)
|
|
42
|
+
);
|
|
43
|
+
const keyboardDidHideListener = Keyboard.addListener(
|
|
44
|
+
'keyboardDidHide',
|
|
45
|
+
() => setKeyboardVisible(false)
|
|
46
|
+
);
|
|
47
|
+
|
|
48
|
+
return () => {
|
|
49
|
+
keyboardDidHideListener?.remove();
|
|
50
|
+
keyboardDidShowListener?.remove();
|
|
51
|
+
};
|
|
52
|
+
}, []);
|
|
53
|
+
|
|
54
|
+
return (
|
|
55
|
+
<KeyboardAvoidingView
|
|
56
|
+
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
57
|
+
style={styles.container}
|
|
58
|
+
>
|
|
59
|
+
<View style={styles.content}>
|
|
60
|
+
{/* Heading */}
|
|
61
|
+
<View style={styles.headingContainer}>
|
|
62
|
+
<Text style={styles.title}>Your AI persona is getting closer</Text>
|
|
63
|
+
<Text style={styles.subtitle}>Sign in or create an account</Text>
|
|
64
|
+
</View>
|
|
65
|
+
|
|
66
|
+
{/* Email Input */}
|
|
67
|
+
<View style={styles.inputContainer}>
|
|
68
|
+
<EmailInput
|
|
69
|
+
value={email}
|
|
70
|
+
onChangeText={setEmail}
|
|
71
|
+
onSubmitEditing={handleEmailSubmit}
|
|
72
|
+
returnKeyType="done"
|
|
73
|
+
blurOnSubmit={true}
|
|
74
|
+
/>
|
|
75
|
+
</View>
|
|
76
|
+
|
|
77
|
+
{/* Divider */}
|
|
78
|
+
<View style={styles.dividerContainer}>
|
|
79
|
+
<View style={styles.dividerLine} />
|
|
80
|
+
<Text style={styles.dividerText}>Or</Text>
|
|
81
|
+
<View style={styles.dividerLine} />
|
|
82
|
+
</View>
|
|
83
|
+
|
|
84
|
+
{/* Google Button */}
|
|
85
|
+
<View style={styles.googleContainer}>
|
|
86
|
+
<GoogleButton
|
|
87
|
+
onPress={onGoogleSignIn}
|
|
88
|
+
disabled={loading}
|
|
89
|
+
/>
|
|
90
|
+
</View>
|
|
91
|
+
|
|
92
|
+
{/* Spacer */}
|
|
93
|
+
<View style={styles.spacer} />
|
|
94
|
+
|
|
95
|
+
{/* Continue Button */}
|
|
96
|
+
<View style={styles.continueContainer}>
|
|
97
|
+
<PrimaryButton
|
|
98
|
+
label="Continue"
|
|
99
|
+
onPress={() => {
|
|
100
|
+
if (email.trim()) {
|
|
101
|
+
onContinue();
|
|
102
|
+
}
|
|
103
|
+
}}
|
|
104
|
+
disabled={loading || !email.trim()}
|
|
105
|
+
loading={loading}
|
|
106
|
+
/>
|
|
107
|
+
</View>
|
|
108
|
+
</View>
|
|
109
|
+
</KeyboardAvoidingView>
|
|
110
|
+
);
|
|
111
|
+
};
|
|
112
|
+
|
|
113
|
+
const styles = StyleSheet.create({
|
|
114
|
+
container: {
|
|
115
|
+
flex: 1,
|
|
116
|
+
},
|
|
117
|
+
|
|
118
|
+
content: {
|
|
119
|
+
flex: 1,
|
|
120
|
+
paddingTop: 8, // Much smaller top padding to move headline higher
|
|
121
|
+
paddingHorizontal: 0, // No horizontal padding - let children control their own spacing
|
|
122
|
+
},
|
|
123
|
+
|
|
124
|
+
headingContainer: {
|
|
125
|
+
width: '100%', // Fill sheet width
|
|
126
|
+
marginBottom: 22, // Further reduced spacing to bring subtitle closer to email input
|
|
127
|
+
paddingHorizontal: 0, // No padding at all - text goes to absolute edges
|
|
128
|
+
// Removed alignItems: 'center' - no centering
|
|
129
|
+
},
|
|
130
|
+
|
|
131
|
+
title: {
|
|
132
|
+
fontFamily: 'IBM Plex Sans',
|
|
133
|
+
fontWeight: '700',
|
|
134
|
+
fontSize: 24,
|
|
135
|
+
lineHeight: 32,
|
|
136
|
+
color: COLORS.grey800,
|
|
137
|
+
textAlign: 'left', // Left-aligned as specified
|
|
138
|
+
marginBottom: SPACING.sm,
|
|
139
|
+
// No fixed width - let parent's 24px insets define available width (327px on 375pt device)
|
|
140
|
+
// Removed height constraint to allow natural wrapping
|
|
141
|
+
},
|
|
142
|
+
|
|
143
|
+
subtitle: {
|
|
144
|
+
fontFamily: 'Inter',
|
|
145
|
+
fontWeight: '400',
|
|
146
|
+
fontSize: 16,
|
|
147
|
+
lineHeight: 24,
|
|
148
|
+
color: COLORS.grey600,
|
|
149
|
+
textAlign: 'left', // Also left-align subtitle for consistency
|
|
150
|
+
},
|
|
151
|
+
|
|
152
|
+
inputContainer: {
|
|
153
|
+
marginBottom: 32, // Consistent spacing
|
|
154
|
+
paddingHorizontal: 0, // Match headline - no padding, full width
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
dividerContainer: {
|
|
158
|
+
flexDirection: 'row',
|
|
159
|
+
alignItems: 'center',
|
|
160
|
+
marginBottom: 32, // Consistent spacing
|
|
161
|
+
paddingHorizontal: 0, // Match headline - no padding, full width
|
|
162
|
+
},
|
|
163
|
+
|
|
164
|
+
dividerLine: {
|
|
165
|
+
flex: 1,
|
|
166
|
+
height: 1,
|
|
167
|
+
backgroundColor: '#E5E5E5',
|
|
168
|
+
},
|
|
169
|
+
|
|
170
|
+
dividerText: {
|
|
171
|
+
paddingHorizontal: SPACING.md,
|
|
172
|
+
fontSize: 14,
|
|
173
|
+
fontFamily: 'Inter',
|
|
174
|
+
fontWeight: '400',
|
|
175
|
+
color: COLORS.grey500,
|
|
176
|
+
},
|
|
177
|
+
|
|
178
|
+
googleContainer: {
|
|
179
|
+
marginBottom: SPACING.xl,
|
|
180
|
+
paddingHorizontal: 0, // Match headline - no padding, full width
|
|
181
|
+
},
|
|
182
|
+
|
|
183
|
+
spacer: {
|
|
184
|
+
flex: 1,
|
|
185
|
+
minHeight: 20,
|
|
186
|
+
},
|
|
187
|
+
|
|
188
|
+
continueContainer: {
|
|
189
|
+
paddingBottom: SPACING.xl,
|
|
190
|
+
paddingHorizontal: 0, // Match headline - no padding, full width
|
|
191
|
+
},
|
|
192
|
+
});
|
|
193
|
+
|
|
194
|
+
export default SignInStep;
|
|
@@ -0,0 +1,133 @@
|
|
|
1
|
+
import React, { useState } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
KeyboardAvoidingView,
|
|
8
|
+
Platform,
|
|
9
|
+
} from 'react-native';
|
|
10
|
+
import { COLORS, SPACING } from '../theme';
|
|
11
|
+
import CodeInput from './CodeInput';
|
|
12
|
+
import PrimaryButton from './PrimaryButton';
|
|
13
|
+
|
|
14
|
+
interface VerificationStepProps {
|
|
15
|
+
email: string;
|
|
16
|
+
onCodeSubmit: (code: string) => void;
|
|
17
|
+
onBack: () => void;
|
|
18
|
+
loading?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
const VerificationStep: React.FC<VerificationStepProps> = ({
|
|
22
|
+
email,
|
|
23
|
+
onCodeSubmit,
|
|
24
|
+
onBack,
|
|
25
|
+
loading = false,
|
|
26
|
+
}) => {
|
|
27
|
+
const [code, setCode] = useState('');
|
|
28
|
+
|
|
29
|
+
const handleCodeChange = (newCode: string) => {
|
|
30
|
+
setCode(newCode);
|
|
31
|
+
};
|
|
32
|
+
|
|
33
|
+
const handleContinue = () => {
|
|
34
|
+
if (code.length === 6) {
|
|
35
|
+
onCodeSubmit(code);
|
|
36
|
+
}
|
|
37
|
+
};
|
|
38
|
+
|
|
39
|
+
return (
|
|
40
|
+
<KeyboardAvoidingView
|
|
41
|
+
behavior={Platform.OS === 'ios' ? 'padding' : 'height'}
|
|
42
|
+
style={styles.container}
|
|
43
|
+
>
|
|
44
|
+
<View style={styles.content}>
|
|
45
|
+
{/* Heading */}
|
|
46
|
+
<View style={styles.headingContainer}>
|
|
47
|
+
<Text style={styles.title}>Enter verification code</Text>
|
|
48
|
+
<Text style={styles.subtitle}>
|
|
49
|
+
We've sent a 6-digit code to {email}
|
|
50
|
+
</Text>
|
|
51
|
+
</View>
|
|
52
|
+
|
|
53
|
+
{/* Code Input */}
|
|
54
|
+
<View style={styles.codeContainer}>
|
|
55
|
+
<CodeInput
|
|
56
|
+
length={6}
|
|
57
|
+
onCodeChange={handleCodeChange}
|
|
58
|
+
/>
|
|
59
|
+
</View>
|
|
60
|
+
|
|
61
|
+
{/* Continue Button - positioned right below code inputs */}
|
|
62
|
+
<View style={styles.continueContainer}>
|
|
63
|
+
<PrimaryButton
|
|
64
|
+
label="Continue"
|
|
65
|
+
onPress={handleContinue}
|
|
66
|
+
disabled={loading || code.length !== 6}
|
|
67
|
+
loading={loading}
|
|
68
|
+
/>
|
|
69
|
+
</View>
|
|
70
|
+
|
|
71
|
+
{/* Spacer */}
|
|
72
|
+
<View style={styles.spacer} />
|
|
73
|
+
</View>
|
|
74
|
+
</KeyboardAvoidingView>
|
|
75
|
+
);
|
|
76
|
+
};
|
|
77
|
+
|
|
78
|
+
const styles = StyleSheet.create({
|
|
79
|
+
container: {
|
|
80
|
+
flex: 1,
|
|
81
|
+
},
|
|
82
|
+
|
|
83
|
+
content: {
|
|
84
|
+
flex: 1,
|
|
85
|
+
paddingTop: 8,
|
|
86
|
+
paddingHorizontal: 0,
|
|
87
|
+
},
|
|
88
|
+
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
headingContainer: {
|
|
92
|
+
width: '100%',
|
|
93
|
+
marginBottom: 40,
|
|
94
|
+
paddingHorizontal: 0,
|
|
95
|
+
},
|
|
96
|
+
|
|
97
|
+
title: {
|
|
98
|
+
fontFamily: 'IBM Plex Sans',
|
|
99
|
+
fontWeight: '700',
|
|
100
|
+
fontSize: 24,
|
|
101
|
+
lineHeight: 32,
|
|
102
|
+
color: COLORS.grey800,
|
|
103
|
+
textAlign: 'left',
|
|
104
|
+
marginBottom: 2,
|
|
105
|
+
},
|
|
106
|
+
|
|
107
|
+
subtitle: {
|
|
108
|
+
fontFamily: 'Inter',
|
|
109
|
+
fontWeight: '400',
|
|
110
|
+
fontSize: 16,
|
|
111
|
+
lineHeight: 24,
|
|
112
|
+
color: COLORS.grey600,
|
|
113
|
+
textAlign: 'left',
|
|
114
|
+
marginBottom: 8,
|
|
115
|
+
},
|
|
116
|
+
|
|
117
|
+
codeContainer: {
|
|
118
|
+
paddingHorizontal: 16,
|
|
119
|
+
marginBottom: 24, // Reduced spacing to bring Continue button closer
|
|
120
|
+
},
|
|
121
|
+
|
|
122
|
+
spacer: {
|
|
123
|
+
flex: 1,
|
|
124
|
+
minHeight: 20,
|
|
125
|
+
},
|
|
126
|
+
|
|
127
|
+
continueContainer: {
|
|
128
|
+
paddingHorizontal: 0,
|
|
129
|
+
marginBottom: 24, // Add spacing below Continue button
|
|
130
|
+
},
|
|
131
|
+
});
|
|
132
|
+
|
|
133
|
+
export default VerificationStep;
|