@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.
Files changed (202) hide show
  1. package/CAPACITOR_QUICK_START.md +379 -0
  2. package/CONNECTORS.md +122 -0
  3. package/LICENSE +194 -10
  4. package/OnairosofficialOnairosCapacitor.podspec +13 -0
  5. package/Package.swift +26 -0
  6. package/README.md +176 -25
  7. package/dist/onairos.capacitor.esm.js +1 -0
  8. package/dist/onairos.capacitor.esm.turbopack.js +1 -0
  9. package/docs/CAPACITOR_INTEGRATION_GUIDE.md +159 -0
  10. package/docs/CAPACITOR_MOCK_APP_TESTING.md +213 -0
  11. package/docs/CAPACITOR_SDK_FIXES_SUMMARY.md +65 -0
  12. package/docs/CROSS_SDK_PARITY.md +239 -0
  13. package/docs/DATA_FREQUENCY.md +57 -0
  14. package/docs/DEVELOPER_SDK_CHANGES.md +532 -0
  15. package/docs/INCIDENT_ENABLETRAINING_PIN_WEB_8.1.9.md +82 -0
  16. package/docs/ONAIROS_BUTTON_PROPS.md +152 -0
  17. package/docs/PLATFORM_APIS.md +559 -0
  18. package/docs/RAW_MEMORIES_API.md +305 -0
  19. package/docs/RAW_MEMORIES_SDK_UPDATE.md +54 -0
  20. package/docs/SDK_PARITY_ROLLUP_2026_04_24_to_05_02.md +96 -0
  21. package/docs/oldFixes.md +216 -0
  22. package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosChatGPTNativePlugin.swift +993 -0
  23. package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosNetflixNativePlugin.swift +33 -0
  24. package/ios/Sources/OnairosNativeConnectorsPlugin/OnairosSpotifyNativePlugin.swift +1082 -0
  25. package/onairos.d.ts +656 -0
  26. package/package.json +188 -37
  27. package/src/OnairosReconnectButton.jsx +272 -0
  28. package/src/RSA.jsx +57 -0
  29. package/src/assets/NewLogo.png +0 -0
  30. package/src/assets/OnairosNewLogo.png +0 -0
  31. package/src/assets/chatgpt-icon.png +0 -0
  32. package/src/assets/fire-horse.png +0 -0
  33. package/src/assets/fire-horse.transparent.png +0 -0
  34. package/src/assets/latest-firehorse.png +0 -0
  35. package/src/assets/perplexity.png +0 -0
  36. package/src/assets/persona.png +0 -0
  37. package/src/assets/persona1.png +0 -0
  38. package/src/assets/persona2.png +0 -0
  39. package/src/assets/persona3.png +0 -0
  40. package/src/assets/persona4.png +0 -0
  41. package/src/assets/persona5.png +0 -0
  42. package/src/capacitorConnectorCatalog.js +38 -0
  43. package/src/capacitorOAuthConfig.js +52 -0
  44. package/src/chatgptHostedImport/index.js +303 -0
  45. package/src/components/AuthButtons.jsx +48 -0
  46. package/src/components/ConnectChatGPTModal.jsx +666 -0
  47. package/src/components/ConnectClaudeModal.jsx +610 -0
  48. package/src/components/ConnectGeminiModal.jsx +639 -0
  49. package/src/components/ConnectGrokModal.jsx +701 -0
  50. package/src/components/ConnectPerplexityModal.jsx +726 -0
  51. package/src/components/DataExplainerScreen.jsx +349 -0
  52. package/src/components/DataRequest.js +885 -0
  53. package/src/components/DataRequest.jsx +1055 -0
  54. package/src/components/EmailAuth.js +1871 -0
  55. package/src/components/EmailAuth.jsx +2062 -0
  56. package/src/components/ExtensionInstallPrompt.jsx +142 -0
  57. package/src/components/GoogleButton.js +133 -0
  58. package/src/components/LLMConnectorManager.jsx +201 -0
  59. package/src/components/LoadingPage.jsx +19 -0
  60. package/src/components/LoadingScreen.jsx +81 -0
  61. package/src/components/LunarBirthdate.jsx +96 -0
  62. package/src/components/LunarLoadingPage.jsx +251 -0
  63. package/src/components/Notification.jsx +21 -0
  64. package/src/components/OnairosAppButton.jsx +85 -0
  65. package/src/components/OnairosSSO.jsx +645 -0
  66. package/src/components/OnairosTrigger.jsx +61 -0
  67. package/src/components/PerplexityLogo.jsx +43 -0
  68. package/src/components/PinSetup.js +200 -0
  69. package/src/components/PinSetup.jsx +228 -0
  70. package/src/components/SDK_PIN_INTEGRATION_REQUIRED_CHANGES.md +526 -0
  71. package/src/components/SdkErrorBoundary.jsx +36 -0
  72. package/src/components/SecuritySetup.js +81 -0
  73. package/src/components/SessionUserBar.jsx +83 -0
  74. package/src/components/SignUp.js +123 -0
  75. package/src/components/TestTelegramButton.js +53 -0
  76. package/src/components/TrainingComponent.jsx +200 -0
  77. package/src/components/TrainingScreen.jsx +897 -0
  78. package/src/components/UniversalOnboarding.js +306 -0
  79. package/src/components/UniversalOnboarding.jsx +4837 -0
  80. package/src/components/ValentineLoadingPage.jsx +502 -0
  81. package/src/components/ValentineModeSelector.jsx +162 -0
  82. package/src/components/WelcomeScreen.jsx +435 -0
  83. package/src/components/WrappedLoadingPage.jsx +205 -0
  84. package/src/components/connectors/ChatGPTConnector.js +348 -0
  85. package/src/components/connectors/ChatGPTConnector.jsx +348 -0
  86. package/src/components/connectors/ClaudeConnector.js +44 -0
  87. package/src/components/connectors/ClaudeConnector.jsx +44 -0
  88. package/src/components/connectors/GeminiConnector.js +170 -0
  89. package/src/components/connectors/GeminiConnector.jsx +170 -0
  90. package/src/components/connectors/GmailConnector.js +148 -0
  91. package/src/components/connectors/GmailConnector.jsx +148 -0
  92. package/src/components/connectors/GrokConnector.js +16 -0
  93. package/src/components/connectors/GrokConnector.jsx +16 -0
  94. package/src/components/connectors/HingeConnector.js +419 -0
  95. package/src/components/connectors/HingeConnector.jsx +419 -0
  96. package/src/components/connectors/InstagramDataConnector.js +726 -0
  97. package/src/components/connectors/InstagramDataConnector.jsx +726 -0
  98. package/src/components/connectors/LinkedInConnector.js +4 -0
  99. package/src/components/connectors/LinkedInConnector.jsx +296 -0
  100. package/src/components/connectors/PerplexityConnector.jsx +16 -0
  101. package/src/components/connectors/PinterestConnector.js +208 -0
  102. package/src/components/connectors/PinterestConnector.jsx +208 -0
  103. package/src/components/connectors/README.md +292 -0
  104. package/src/components/connectors/RedditConnector.js +229 -0
  105. package/src/components/connectors/RedditConnector.jsx +229 -0
  106. package/src/components/connectors/SephoraConnector.js +482 -0
  107. package/src/components/connectors/SephoraConnector.jsx +482 -0
  108. package/src/components/connectors/TikTokConnector.jsx +430 -0
  109. package/src/components/connectors/YoutubeConnector.js +361 -0
  110. package/src/components/connectors/YoutubeConnector.jsx +361 -0
  111. package/src/components/connectors/index.js +50 -0
  112. package/src/components/icons.jsx +46 -0
  113. package/src/components/icons.tsx +21 -0
  114. package/src/components/ui/PageLayout.jsx +1255 -0
  115. package/src/components/ui/PrimaryButton.jsx +162 -0
  116. package/src/components/ui/button.jsx +49 -0
  117. package/src/components/ui/card.jsx +61 -0
  118. package/src/components/ui/checkbox.jsx +33 -0
  119. package/src/components/ui/label.jsx +29 -0
  120. package/src/components/utils/UpdateConnections.js +45 -0
  121. package/src/components/utils/oauthHelper.js +97 -0
  122. package/src/config/api-config.js +138 -0
  123. package/src/deepLink.jsx +38 -0
  124. package/src/getPin.js +26 -0
  125. package/src/icons/Avatar.png +0 -0
  126. package/src/icons/Sentiment.png +0 -0
  127. package/src/icons/Trait.png +0 -0
  128. package/src/iframe/DataRequestPage.jsx +285 -0
  129. package/src/iframe/OnairosButtonIntegration.md +148 -0
  130. package/src/iframe/components/Box.jsx +56 -0
  131. package/src/iframe/components/IndividualConnection.jsx +88 -0
  132. package/src/iframe/dataRequestHandler.js +714 -0
  133. package/src/iframe/data_request_iframe.html +27 -0
  134. package/src/iframe/data_request_page.js +47 -0
  135. package/src/iframe/icons/Avatar.png +1 -0
  136. package/src/iframe/icons/Avatar2.png +1 -0
  137. package/src/iframe/icons/Sentiment.png +1 -0
  138. package/src/iframe/icons/Trait.png +1 -0
  139. package/src/iframe/icons/onairos_logo.png +0 -0
  140. package/src/iframe/utils/api.js +57 -0
  141. package/src/index.js +274 -0
  142. package/src/laravel/OnairosVue.vue +410 -0
  143. package/src/laravel/blade-helpers.js +320 -0
  144. package/src/laravel/vite-plugin.js +179 -0
  145. package/src/mobile/MobileDataRequestPage.jsx +233 -0
  146. package/src/mobile/components/MobileBox.jsx +71 -0
  147. package/src/mobile/components/MobileIndividualConnection.jsx +51 -0
  148. package/src/mobile/shims/browser-apis.js +78 -0
  149. package/src/mobile/shims/lucide-shim.js +85 -0
  150. package/src/nativeConnectors.js +5 -0
  151. package/src/newUI/EMAIL_VERIFICATION_API_SCHEMA.md +268 -0
  152. package/src/newUI/PlatformConnectorsStep.tsx +435 -0
  153. package/src/newUI/PrimaryButton.tsx +213 -0
  154. package/src/newUI/SignInStep.tsx +194 -0
  155. package/src/newUI/VerificationStep.tsx +133 -0
  156. package/src/newUI/WelcomeScreen.tsx +311 -0
  157. package/src/newUI/services/connectedAccountsService.js +129 -0
  158. package/src/onairos.capacitor.jsx +15 -0
  159. package/src/onairos.core.jsx +133 -0
  160. package/src/onairos.jsx +14 -0
  161. package/src/onairos.native.jsx +15 -0
  162. package/src/onairosButton.jsx +9000 -0
  163. package/src/overlay/CheckBox.jsx +114 -0
  164. package/src/overlay/IndividualConnection copy.js +86 -0
  165. package/src/overlay/IndividualConnection.js +191 -0
  166. package/src/overlay/IndividualConnectionNew.jsx +157 -0
  167. package/src/overlay/box.js +84 -0
  168. package/src/overlay/overlay.js +437 -0
  169. package/src/styles/onairos-scoped-preflight.css +97 -0
  170. package/src/styles/sdkCssRegistry.js +20 -0
  171. package/src/styles/styleLoaderInsertShadow.js +69 -0
  172. package/src/styles/tailwind.capacitor.css +395 -0
  173. package/src/styles/tailwind.css +395 -0
  174. package/src/theme/colors.js +40 -0
  175. package/src/utils/apiKeyValidation.js +341 -0
  176. package/src/utils/apiResponseLogger.js +316 -0
  177. package/src/utils/authHeaders.js +275 -0
  178. package/src/utils/biometrics.js +26 -0
  179. package/src/utils/bookmarkletUtils.js +28 -0
  180. package/src/utils/capacitorDetection.js +278 -0
  181. package/src/utils/capacitorLLMHelper.js +352 -0
  182. package/src/utils/capacitorPlugins.js +366 -0
  183. package/src/utils/crossDomainSSO.js +587 -0
  184. package/src/utils/deepLinking.js +27 -0
  185. package/src/utils/devLogger.js +46 -0
  186. package/src/utils/extensionDetection.js +418 -0
  187. package/src/utils/extractMemory.js +277 -0
  188. package/src/utils/framerBrandingOverrides.js +40 -0
  189. package/src/utils/googleWebClientId.js +55 -0
  190. package/src/utils/overlayHandler.js +224 -0
  191. package/src/utils/platformDisconnect.js +309 -0
  192. package/src/utils/pollTrainingStatus.js +200 -0
  193. package/src/utils/rawMemoriesAccess.js +211 -0
  194. package/src/utils/resolveBackendAppId.js +47 -0
  195. package/src/utils/responseFormatter.js +140 -0
  196. package/src/utils/sdkDebugStorage.js +113 -0
  197. package/src/utils/sdkInitialization.js +645 -0
  198. package/src/utils/sessionManager.js +1258 -0
  199. package/src/utils/startBackgroundTraining.js +100 -0
  200. package/src/utils/userDataFormatter.js +222 -0
  201. package/index.d.ts +0 -1
  202. 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;