@onairos/react-native 3.1.11 → 3.1.13
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 +75 -1
- package/lib/commonjs/api/index.js.map +1 -1
- package/lib/commonjs/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/lib/commonjs/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/lib/commonjs/assets/icons/Facebookicon.png +0 -0
- package/lib/commonjs/assets/icons/Gmail.png +0 -0
- package/lib/commonjs/assets/icons/Linkedinicon.png +0 -0
- package/lib/commonjs/assets/icons/Redditicon.png +0 -0
- package/lib/commonjs/assets/icons/YouTubeicon2.png +0 -0
- package/lib/commonjs/assets/icons/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/icons/farcaster.png +0 -0
- package/lib/commonjs/assets/icons/instagram.png +0 -0
- package/lib/commonjs/assets/icons/pinterest.png +0 -0
- package/lib/commonjs/assets/icons/swerv_logo.png +0 -0
- package/lib/commonjs/assets/icons/twitter.jpg +0 -0
- package/lib/commonjs/assets/images/Checkbox.svg +3 -0
- package/lib/commonjs/assets/images/EnochE.svg +19 -0
- package/lib/commonjs/assets/images/Enochicon1.png +0 -0
- package/lib/commonjs/assets/images/Face_ID_logo.png +0 -0
- package/lib/commonjs/assets/images/Facebookicon.png +0 -0
- package/lib/commonjs/assets/images/Gmail.png +0 -0
- package/lib/commonjs/assets/images/Googlelogo.png +0 -0
- package/lib/commonjs/assets/images/Linkedinicon.png +0 -0
- package/lib/commonjs/assets/images/Onairoslogo.png +0 -0
- package/lib/commonjs/assets/images/Personalityprofile.svg +3 -0
- package/lib/commonjs/assets/images/Personalitytraits.svg +3 -0
- package/lib/commonjs/assets/images/Redditicon.png +0 -0
- package/lib/commonjs/assets/images/Userpreferences.svg +3 -0
- package/lib/commonjs/assets/images/YouTubeicon3.png +0 -0
- package/lib/commonjs/assets/images/arrow.svg +20 -0
- package/lib/commonjs/assets/images/basicproficon.svg +43 -0
- package/lib/commonjs/assets/images/basicprofile.svg +3 -0
- package/lib/commonjs/assets/images/checkmark.svg +4 -0
- package/lib/commonjs/assets/images/contentanalysis.svg +3 -0
- package/lib/commonjs/assets/images/contenticon.svg +23 -0
- package/lib/commonjs/assets/images/persona1.png +0 -0
- package/lib/commonjs/assets/images/persona2.png +0 -0
- package/lib/commonjs/assets/images/persona3.png +0 -0
- package/lib/commonjs/assets/images/persona4.png +0 -0
- package/lib/commonjs/assets/images/persona5.png +0 -0
- package/lib/commonjs/assets/images/personalityicon.svg +18 -0
- package/lib/commonjs/assets/images/x-close.svg +3 -0
- package/lib/commonjs/components/BodyText.js +27 -0
- package/lib/commonjs/components/BodyText.js.map +1 -0
- package/lib/commonjs/components/BrandMark.js +44 -0
- package/lib/commonjs/components/BrandMark.js.map +1 -0
- package/lib/commonjs/components/CodeInput.js +30 -0
- package/lib/commonjs/components/CodeInput.js.map +1 -0
- package/lib/commonjs/components/EmailInput.js +30 -0
- package/lib/commonjs/components/EmailInput.js.map +1 -0
- package/lib/commonjs/components/ExistingUserDataConfirmation.js +474 -0
- package/lib/commonjs/components/ExistingUserDataConfirmation.js.map +1 -0
- package/lib/commonjs/components/GoogleButton.js +55 -0
- package/lib/commonjs/components/GoogleButton.js.map +1 -0
- package/lib/commonjs/components/HeadingGroup.js +43 -0
- package/lib/commonjs/components/HeadingGroup.js.map +1 -0
- package/lib/commonjs/components/ModalHeader.js +99 -0
- package/lib/commonjs/components/ModalHeader.js.map +1 -0
- package/lib/commonjs/components/ModalSheet.js +41 -0
- package/lib/commonjs/components/ModalSheet.js.map +1 -0
- package/lib/commonjs/components/Onairos.js +1 -3
- package/lib/commonjs/components/Onairos.js.map +1 -1
- package/lib/commonjs/components/OnairosButton.js +171 -190
- package/lib/commonjs/components/OnairosButton.js.map +1 -1
- package/lib/commonjs/components/OnairosSignInButton.js +169 -0
- package/lib/commonjs/components/OnairosSignInButton.js.map +1 -0
- package/lib/commonjs/components/Overlay.js +5 -5
- package/lib/commonjs/components/Overlay.js.map +1 -1
- package/lib/commonjs/components/PersonaImage.js +60 -0
- package/lib/commonjs/components/PersonaImage.js.map +1 -0
- package/lib/commonjs/components/PersonaLoadingScreen.js +156 -0
- package/lib/commonjs/components/PersonaLoadingScreen.js.map +1 -0
- package/lib/commonjs/components/PersonalizationConsentScreen.js +316 -0
- package/lib/commonjs/components/PersonalizationConsentScreen.js.map +1 -0
- package/lib/commonjs/components/PinCreationScreen.js +393 -0
- package/lib/commonjs/components/PinCreationScreen.js.map +1 -0
- package/lib/commonjs/components/PinInput.js +282 -120
- package/lib/commonjs/components/PinInput.js.map +1 -1
- package/lib/commonjs/components/PlatformConnectorsStep.js +828 -0
- package/lib/commonjs/components/PlatformConnectorsStep.js.map +1 -0
- package/lib/commonjs/components/PlatformToggle.js +180 -0
- package/lib/commonjs/components/PlatformToggle.js.map +1 -0
- package/lib/commonjs/components/PrimaryButton.js +180 -0
- package/lib/commonjs/components/PrimaryButton.js.map +1 -0
- package/lib/commonjs/components/SignInMatchAnimation.js +197 -0
- package/lib/commonjs/components/SignInMatchAnimation.js.map +1 -0
- package/lib/commonjs/components/SignInStep.js +179 -0
- package/lib/commonjs/components/SignInStep.js.map +1 -0
- package/lib/commonjs/components/TrainingModal.js +808 -563
- package/lib/commonjs/components/TrainingModal.js.map +1 -1
- package/lib/commonjs/components/UniversalOnboarding.js +2304 -1283
- package/lib/commonjs/components/UniversalOnboarding.js.map +1 -1
- package/lib/commonjs/components/VerificationStep.js +154 -0
- package/lib/commonjs/components/VerificationStep.js.map +1 -0
- package/lib/commonjs/components/WelcomeScreen.js +385 -0
- package/lib/commonjs/components/WelcomeScreen.js.map +1 -0
- package/lib/commonjs/components/icons/Basicproficon.js +37 -0
- package/lib/commonjs/components/icons/Basicproficon.js.map +1 -0
- package/lib/commonjs/components/icons/Basicprofile.js +21 -0
- package/lib/commonjs/components/icons/Basicprofile.js.map +1 -0
- package/lib/commonjs/components/icons/Checkbox.js +21 -0
- package/lib/commonjs/components/icons/Checkbox.js.map +1 -0
- package/lib/commonjs/components/icons/Checkmark.js +27 -0
- package/lib/commonjs/components/icons/Checkmark.js.map +1 -0
- package/lib/commonjs/components/icons/Contentanalysis.js +21 -0
- package/lib/commonjs/components/icons/Contentanalysis.js.map +1 -0
- package/lib/commonjs/components/icons/Contenticon.js +39 -0
- package/lib/commonjs/components/icons/Contenticon.js.map +1 -0
- package/lib/commonjs/components/icons/EnochE.js +41 -0
- package/lib/commonjs/components/icons/EnochE.js.map +1 -0
- package/lib/commonjs/components/icons/Personalityicon.js +30 -0
- package/lib/commonjs/components/icons/Personalityicon.js.map +1 -0
- package/lib/commonjs/components/icons/Personalityprofile.js +21 -0
- package/lib/commonjs/components/icons/Personalityprofile.js.map +1 -0
- package/lib/commonjs/components/icons/Personalitytraits.js +21 -0
- package/lib/commonjs/components/icons/Personalitytraits.js.map +1 -0
- package/lib/commonjs/components/icons/Userpreferences.js +21 -0
- package/lib/commonjs/components/icons/Userpreferences.js.map +1 -0
- package/lib/commonjs/components/icons/index.js +84 -0
- package/lib/commonjs/components/icons/index.js.map +1 -0
- package/lib/commonjs/components/onboarding/OAuthWebView.js +134 -743
- package/lib/commonjs/components/onboarding/OAuthWebView.js.map +1 -1
- package/lib/commonjs/config/api.js +34 -0
- package/lib/commonjs/config/api.js.map +1 -0
- package/lib/commonjs/context/AuthContext.js +345 -0
- package/lib/commonjs/context/AuthContext.js.map +1 -0
- package/lib/commonjs/hooks/useConnectedAccounts.js +111 -0
- package/lib/commonjs/hooks/useConnectedAccounts.js.map +1 -0
- package/lib/commonjs/hooks/useConnections.js +120 -125
- package/lib/commonjs/hooks/useConnections.js.map +1 -1
- package/lib/commonjs/hooks/useUserConnections.js +148 -0
- package/lib/commonjs/hooks/useUserConnections.js.map +1 -0
- package/lib/commonjs/index.js +149 -27
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/services/apiClient.js +302 -0
- package/lib/commonjs/services/apiClient.js.map +1 -0
- package/lib/commonjs/services/authService.js +935 -0
- package/lib/commonjs/services/authService.js.map +1 -0
- package/lib/commonjs/services/biometricPinService.js +184 -0
- package/lib/commonjs/services/biometricPinService.js.map +1 -0
- package/lib/commonjs/services/connectedAccountsService.js +268 -0
- package/lib/commonjs/services/connectedAccountsService.js.map +1 -0
- package/lib/commonjs/services/googleAuthService.js +268 -0
- package/lib/commonjs/services/googleAuthService.js.map +1 -0
- package/lib/commonjs/services/imageCompressionService.js +260 -0
- package/lib/commonjs/services/imageCompressionService.js.map +1 -0
- package/lib/commonjs/services/jwtStorageService.js +256 -0
- package/lib/commonjs/services/jwtStorageService.js.map +1 -0
- package/lib/commonjs/services/mobileTrainingService.js +185 -0
- package/lib/commonjs/services/mobileTrainingService.js.map +1 -0
- package/lib/commonjs/services/pinEncryptionService.js +84 -0
- package/lib/commonjs/services/pinEncryptionService.js.map +1 -0
- package/lib/commonjs/services/pinStorageUtils.js +105 -0
- package/lib/commonjs/services/pinStorageUtils.js.map +1 -0
- package/lib/commonjs/services/platformAuthService.js +956 -722
- package/lib/commonjs/services/platformAuthService.js.map +1 -1
- package/lib/commonjs/services/storageService.js +404 -0
- package/lib/commonjs/services/storageService.js.map +1 -0
- package/lib/commonjs/services/trainingApiHelpers.js +73 -0
- package/lib/commonjs/services/trainingApiHelpers.js.map +1 -0
- package/lib/commonjs/services/userConnectionsService.js +486 -0
- package/lib/commonjs/services/userConnectionsService.js.map +1 -0
- package/lib/commonjs/services/youtubeMigrationService.js +415 -0
- package/lib/commonjs/services/youtubeMigrationService.js.map +1 -0
- package/lib/commonjs/theme/index.js +249 -0
- package/lib/commonjs/theme/index.js.map +1 -0
- package/lib/commonjs/utils/eventUtils.js +288 -0
- package/lib/commonjs/utils/eventUtils.js.map +1 -0
- package/lib/commonjs/utils/haptics.js +66 -0
- package/lib/commonjs/utils/haptics.js.map +1 -0
- package/lib/commonjs/utils/imagePreloader.js +6 -0
- package/lib/commonjs/utils/imagePreloader.js.map +1 -0
- package/lib/module/api/index.js +72 -0
- package/lib/module/api/index.js.map +1 -1
- package/lib/module/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/lib/module/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/lib/module/assets/icons/Facebookicon.png +0 -0
- package/lib/module/assets/icons/Gmail.png +0 -0
- package/lib/module/assets/icons/Linkedinicon.png +0 -0
- package/lib/module/assets/icons/Redditicon.png +0 -0
- package/lib/module/assets/icons/YouTubeicon2.png +0 -0
- package/lib/module/assets/icons/YouTubeicon3.png +0 -0
- package/lib/module/assets/icons/farcaster.png +0 -0
- package/lib/module/assets/icons/instagram.png +0 -0
- package/lib/module/assets/icons/pinterest.png +0 -0
- package/lib/module/assets/icons/swerv_logo.png +0 -0
- package/lib/module/assets/icons/twitter.jpg +0 -0
- package/lib/module/assets/images/Checkbox.svg +3 -0
- package/lib/module/assets/images/EnochE.svg +19 -0
- package/lib/module/assets/images/Enochicon1.png +0 -0
- package/lib/module/assets/images/Face_ID_logo.png +0 -0
- package/lib/module/assets/images/Facebookicon.png +0 -0
- package/lib/module/assets/images/Gmail.png +0 -0
- package/lib/module/assets/images/Googlelogo.png +0 -0
- package/lib/module/assets/images/Linkedinicon.png +0 -0
- package/lib/module/assets/images/Onairoslogo.png +0 -0
- package/lib/module/assets/images/Personalityprofile.svg +3 -0
- package/lib/module/assets/images/Personalitytraits.svg +3 -0
- package/lib/module/assets/images/Redditicon.png +0 -0
- package/lib/module/assets/images/Userpreferences.svg +3 -0
- package/lib/module/assets/images/YouTubeicon3.png +0 -0
- package/lib/module/assets/images/arrow.svg +20 -0
- package/lib/module/assets/images/basicproficon.svg +43 -0
- package/lib/module/assets/images/basicprofile.svg +3 -0
- package/lib/module/assets/images/checkmark.svg +4 -0
- package/lib/module/assets/images/contentanalysis.svg +3 -0
- package/lib/module/assets/images/contenticon.svg +23 -0
- package/lib/module/assets/images/persona1.png +0 -0
- package/lib/module/assets/images/persona2.png +0 -0
- package/lib/module/assets/images/persona3.png +0 -0
- package/lib/module/assets/images/persona4.png +0 -0
- package/lib/module/assets/images/persona5.png +0 -0
- package/lib/module/assets/images/personalityicon.svg +18 -0
- package/lib/module/assets/images/x-close.svg +3 -0
- package/lib/module/components/BodyText.js +20 -0
- package/lib/module/components/BodyText.js.map +1 -0
- package/lib/module/components/BrandMark.js +37 -0
- package/lib/module/components/BrandMark.js.map +1 -0
- package/lib/module/components/CodeInput.js +23 -0
- package/lib/module/components/CodeInput.js.map +1 -0
- package/lib/module/components/EmailInput.js +23 -0
- package/lib/module/components/EmailInput.js.map +1 -0
- package/lib/module/components/ExistingUserDataConfirmation.js +465 -0
- package/lib/module/components/ExistingUserDataConfirmation.js.map +1 -0
- package/lib/module/components/GoogleButton.js +48 -0
- package/lib/module/components/GoogleButton.js.map +1 -0
- package/lib/module/components/HeadingGroup.js +36 -0
- package/lib/module/components/HeadingGroup.js.map +1 -0
- package/lib/module/components/ModalHeader.js +92 -0
- package/lib/module/components/ModalHeader.js.map +1 -0
- package/lib/module/components/ModalSheet.js +34 -0
- package/lib/module/components/ModalSheet.js.map +1 -0
- package/lib/module/components/Onairos.js +1 -3
- package/lib/module/components/Onairos.js.map +1 -1
- package/lib/module/components/OnairosButton.js +172 -192
- package/lib/module/components/OnairosButton.js.map +1 -1
- package/lib/module/components/OnairosSignInButton.js +160 -0
- package/lib/module/components/OnairosSignInButton.js.map +1 -0
- package/lib/module/components/Overlay.js +5 -5
- package/lib/module/components/Overlay.js.map +1 -1
- package/lib/module/components/PersonaImage.js +53 -0
- package/lib/module/components/PersonaImage.js.map +1 -0
- package/lib/module/components/PersonaLoadingScreen.js +148 -0
- package/lib/module/components/PersonaLoadingScreen.js.map +1 -0
- package/lib/module/components/PersonalizationConsentScreen.js +309 -0
- package/lib/module/components/PersonalizationConsentScreen.js.map +1 -0
- package/lib/module/components/PinCreationScreen.js +386 -0
- package/lib/module/components/PinCreationScreen.js.map +1 -0
- package/lib/module/components/PinInput.js +283 -120
- package/lib/module/components/PinInput.js.map +1 -1
- package/lib/module/components/PlatformConnectorsStep.js +820 -0
- package/lib/module/components/PlatformConnectorsStep.js.map +1 -0
- package/lib/module/components/PlatformToggle.js +173 -0
- package/lib/module/components/PlatformToggle.js.map +1 -0
- package/lib/module/components/PrimaryButton.js +172 -0
- package/lib/module/components/PrimaryButton.js.map +1 -0
- package/lib/module/components/SignInMatchAnimation.js +189 -0
- package/lib/module/components/SignInMatchAnimation.js.map +1 -0
- package/lib/module/components/SignInStep.js +171 -0
- package/lib/module/components/SignInStep.js.map +1 -0
- package/lib/module/components/TrainingModal.js +809 -565
- package/lib/module/components/TrainingModal.js.map +1 -1
- package/lib/module/components/UniversalOnboarding.js +2307 -1284
- package/lib/module/components/UniversalOnboarding.js.map +1 -1
- package/lib/module/components/VerificationStep.js +146 -0
- package/lib/module/components/VerificationStep.js.map +1 -0
- package/lib/module/components/WelcomeScreen.js +378 -0
- package/lib/module/components/WelcomeScreen.js.map +1 -0
- package/lib/module/components/icons/Basicproficon.js +30 -0
- package/lib/module/components/icons/Basicproficon.js.map +1 -0
- package/lib/module/components/icons/Basicprofile.js +14 -0
- package/lib/module/components/icons/Basicprofile.js.map +1 -0
- package/lib/module/components/icons/Checkbox.js +14 -0
- package/lib/module/components/icons/Checkbox.js.map +1 -0
- package/lib/module/components/icons/Checkmark.js +20 -0
- package/lib/module/components/icons/Checkmark.js.map +1 -0
- package/lib/module/components/icons/Contentanalysis.js +14 -0
- package/lib/module/components/icons/Contentanalysis.js.map +1 -0
- package/lib/module/components/icons/Contenticon.js +32 -0
- package/lib/module/components/icons/Contenticon.js.map +1 -0
- package/lib/module/components/icons/EnochE.js +34 -0
- package/lib/module/components/icons/EnochE.js.map +1 -0
- package/lib/module/components/icons/Personalityicon.js +23 -0
- package/lib/module/components/icons/Personalityicon.js.map +1 -0
- package/lib/module/components/icons/Personalityprofile.js +14 -0
- package/lib/module/components/icons/Personalityprofile.js.map +1 -0
- package/lib/module/components/icons/Personalitytraits.js +14 -0
- package/lib/module/components/icons/Personalitytraits.js.map +1 -0
- package/lib/module/components/icons/Userpreferences.js +14 -0
- package/lib/module/components/icons/Userpreferences.js.map +1 -0
- package/lib/module/components/icons/index.js +13 -0
- package/lib/module/components/icons/index.js.map +1 -0
- package/lib/module/components/onboarding/OAuthWebView.js +136 -744
- package/lib/module/components/onboarding/OAuthWebView.js.map +1 -1
- package/lib/module/config/api.js +26 -0
- package/lib/module/config/api.js.map +1 -0
- package/lib/module/context/AuthContext.js +335 -0
- package/lib/module/context/AuthContext.js.map +1 -0
- package/lib/module/hooks/useConnectedAccounts.js +106 -0
- package/lib/module/hooks/useConnectedAccounts.js.map +1 -0
- package/lib/module/hooks/useConnections.js +119 -125
- package/lib/module/hooks/useConnections.js.map +1 -1
- package/lib/module/hooks/useUserConnections.js +140 -0
- package/lib/module/hooks/useUserConnections.js.map +1 -0
- package/lib/module/index.js +51 -15
- package/lib/module/index.js.map +1 -1
- package/lib/module/services/apiClient.js +298 -0
- package/lib/module/services/apiClient.js.map +1 -0
- package/lib/module/services/authService.js +905 -0
- package/lib/module/services/authService.js.map +1 -0
- package/lib/module/services/biometricPinService.js +173 -0
- package/lib/module/services/biometricPinService.js.map +1 -0
- package/lib/module/services/connectedAccountsService.js +255 -0
- package/lib/module/services/connectedAccountsService.js.map +1 -0
- package/lib/module/services/googleAuthService.js +258 -0
- package/lib/module/services/googleAuthService.js.map +1 -0
- package/lib/module/services/imageCompressionService.js +250 -0
- package/lib/module/services/imageCompressionService.js.map +1 -0
- package/lib/module/services/jwtStorageService.js +239 -0
- package/lib/module/services/jwtStorageService.js.map +1 -0
- package/lib/module/services/mobileTrainingService.js +172 -0
- package/lib/module/services/mobileTrainingService.js.map +1 -0
- package/lib/module/services/pinEncryptionService.js +75 -0
- package/lib/module/services/pinEncryptionService.js.map +1 -0
- package/lib/module/services/pinStorageUtils.js +93 -0
- package/lib/module/services/pinStorageUtils.js.map +1 -0
- package/lib/module/services/platformAuthService.js +943 -704
- package/lib/module/services/platformAuthService.js.map +1 -1
- package/lib/module/services/storageService.js +383 -0
- package/lib/module/services/storageService.js.map +1 -0
- package/lib/module/services/trainingApiHelpers.js +67 -0
- package/lib/module/services/trainingApiHelpers.js.map +1 -0
- package/lib/module/services/userConnectionsService.js +476 -0
- package/lib/module/services/userConnectionsService.js.map +1 -0
- package/lib/module/services/youtubeMigrationService.js +404 -0
- package/lib/module/services/youtubeMigrationService.js.map +1 -0
- package/lib/module/theme/index.js +244 -0
- package/lib/module/theme/index.js.map +1 -0
- package/lib/module/utils/eventUtils.js +270 -0
- package/lib/module/utils/eventUtils.js.map +1 -0
- package/lib/module/utils/haptics.js +59 -0
- package/lib/module/utils/haptics.js.map +1 -0
- package/lib/module/utils/imagePreloader.js +3 -0
- package/lib/module/utils/imagePreloader.js.map +1 -0
- package/lib/typescript/api/index.d.ts +8 -0
- package/lib/typescript/api/index.d.ts.map +1 -1
- package/lib/typescript/components/BodyText.d.ts +10 -0
- package/lib/typescript/components/BodyText.d.ts.map +1 -0
- package/lib/typescript/components/BrandMark.d.ts +11 -0
- package/lib/typescript/components/BrandMark.d.ts.map +1 -0
- package/lib/typescript/components/CodeInput.d.ts +10 -0
- package/lib/typescript/components/CodeInput.d.ts.map +1 -0
- package/lib/typescript/components/EmailInput.d.ts +8 -0
- package/lib/typescript/components/EmailInput.d.ts.map +1 -0
- package/lib/typescript/components/ExistingUserDataConfirmation.d.ts +12 -0
- package/lib/typescript/components/ExistingUserDataConfirmation.d.ts.map +1 -0
- package/lib/typescript/components/GoogleButton.d.ts +11 -0
- package/lib/typescript/components/GoogleButton.d.ts.map +1 -0
- package/lib/typescript/components/HeadingGroup.d.ts +11 -0
- package/lib/typescript/components/HeadingGroup.d.ts.map +1 -0
- package/lib/typescript/components/ModalHeader.d.ts +11 -0
- package/lib/typescript/components/ModalHeader.d.ts.map +1 -0
- package/lib/typescript/components/ModalSheet.d.ts +13 -0
- package/lib/typescript/components/ModalSheet.d.ts.map +1 -0
- package/lib/typescript/components/Onairos.d.ts.map +1 -1
- package/lib/typescript/components/OnairosButton.d.ts +29 -4
- package/lib/typescript/components/OnairosButton.d.ts.map +1 -1
- package/lib/typescript/components/OnairosSignInButton.d.ts +14 -0
- package/lib/typescript/components/OnairosSignInButton.d.ts.map +1 -0
- package/lib/typescript/components/PersonaImage.d.ts +8 -0
- package/lib/typescript/components/PersonaImage.d.ts.map +1 -0
- package/lib/typescript/components/PersonaLoadingScreen.d.ts +10 -0
- package/lib/typescript/components/PersonaLoadingScreen.d.ts.map +1 -0
- package/lib/typescript/components/PersonalizationConsentScreen.d.ts +10 -0
- package/lib/typescript/components/PersonalizationConsentScreen.d.ts.map +1 -0
- package/lib/typescript/components/PinCreationScreen.d.ts +10 -0
- package/lib/typescript/components/PinCreationScreen.d.ts.map +1 -0
- package/lib/typescript/components/PinInput.d.ts +11 -1
- package/lib/typescript/components/PinInput.d.ts.map +1 -1
- package/lib/typescript/components/PlatformConnectorsStep.d.ts +11 -0
- package/lib/typescript/components/PlatformConnectorsStep.d.ts.map +1 -0
- package/lib/typescript/components/PlatformToggle.d.ts +20 -0
- package/lib/typescript/components/PlatformToggle.d.ts.map +1 -0
- package/lib/typescript/components/PrimaryButton.d.ts +22 -0
- package/lib/typescript/components/PrimaryButton.d.ts.map +1 -0
- package/lib/typescript/components/SignInMatchAnimation.d.ts +9 -0
- package/lib/typescript/components/SignInMatchAnimation.d.ts.map +1 -0
- package/lib/typescript/components/SignInStep.d.ts +12 -0
- package/lib/typescript/components/SignInStep.d.ts.map +1 -0
- package/lib/typescript/components/TrainingModal.d.ts +12 -1
- package/lib/typescript/components/TrainingModal.d.ts.map +1 -1
- package/lib/typescript/components/UniversalOnboarding.d.ts +14 -1
- package/lib/typescript/components/UniversalOnboarding.d.ts.map +1 -1
- package/lib/typescript/components/VerificationStep.d.ts +13 -0
- package/lib/typescript/components/VerificationStep.d.ts.map +1 -0
- package/lib/typescript/components/WelcomeScreen.d.ts +9 -0
- package/lib/typescript/components/WelcomeScreen.d.ts.map +1 -0
- package/lib/typescript/components/icons/Basicproficon.d.ts +5 -0
- package/lib/typescript/components/icons/Basicproficon.d.ts.map +1 -0
- package/lib/typescript/components/icons/Basicprofile.d.ts +5 -0
- package/lib/typescript/components/icons/Basicprofile.d.ts.map +1 -0
- package/lib/typescript/components/icons/Checkbox.d.ts +5 -0
- package/lib/typescript/components/icons/Checkbox.d.ts.map +1 -0
- package/lib/typescript/components/icons/Checkmark.d.ts +5 -0
- package/lib/typescript/components/icons/Checkmark.d.ts.map +1 -0
- package/lib/typescript/components/icons/Contentanalysis.d.ts +5 -0
- package/lib/typescript/components/icons/Contentanalysis.d.ts.map +1 -0
- package/lib/typescript/components/icons/Contenticon.d.ts +5 -0
- package/lib/typescript/components/icons/Contenticon.d.ts.map +1 -0
- package/lib/typescript/components/icons/EnochE.d.ts +5 -0
- package/lib/typescript/components/icons/EnochE.d.ts.map +1 -0
- package/lib/typescript/components/icons/Personalityicon.d.ts +5 -0
- package/lib/typescript/components/icons/Personalityicon.d.ts.map +1 -0
- package/lib/typescript/components/icons/Personalityprofile.d.ts +5 -0
- package/lib/typescript/components/icons/Personalityprofile.d.ts.map +1 -0
- package/lib/typescript/components/icons/Personalitytraits.d.ts +5 -0
- package/lib/typescript/components/icons/Personalitytraits.d.ts.map +1 -0
- package/lib/typescript/components/icons/Userpreferences.d.ts +5 -0
- package/lib/typescript/components/icons/Userpreferences.d.ts.map +1 -0
- package/lib/typescript/components/icons/index.d.ts +12 -0
- package/lib/typescript/components/icons/index.d.ts.map +1 -0
- package/lib/typescript/components/onboarding/OAuthWebView.d.ts.map +1 -1
- package/lib/typescript/config/api.d.ts +24 -0
- package/lib/typescript/config/api.d.ts.map +1 -0
- package/lib/typescript/context/AuthContext.d.ts +34 -0
- package/lib/typescript/context/AuthContext.d.ts.map +1 -0
- package/lib/typescript/hooks/useConnectedAccounts.d.ts +11 -0
- package/lib/typescript/hooks/useConnectedAccounts.d.ts.map +1 -0
- package/lib/typescript/hooks/useConnections.d.ts +10 -5
- package/lib/typescript/hooks/useConnections.d.ts.map +1 -1
- package/lib/typescript/hooks/useUserConnections.d.ts +12 -0
- package/lib/typescript/hooks/useUserConnections.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +24 -6
- package/lib/typescript/index.d.ts.map +1 -1
- package/lib/typescript/services/apiClient.d.ts +91 -0
- package/lib/typescript/services/apiClient.d.ts.map +1 -0
- package/lib/typescript/services/authService.d.ts +216 -0
- package/lib/typescript/services/authService.d.ts.map +1 -0
- package/lib/typescript/services/biometricPinService.d.ts +29 -0
- package/lib/typescript/services/biometricPinService.d.ts.map +1 -0
- package/lib/typescript/services/connectedAccountsService.d.ts +56 -0
- package/lib/typescript/services/connectedAccountsService.d.ts.map +1 -0
- package/lib/typescript/services/googleAuthService.d.ts +63 -0
- package/lib/typescript/services/googleAuthService.d.ts.map +1 -0
- package/lib/typescript/services/imageCompressionService.d.ts +37 -0
- package/lib/typescript/services/imageCompressionService.d.ts.map +1 -0
- package/lib/typescript/services/jwtStorageService.d.ts +86 -0
- package/lib/typescript/services/jwtStorageService.d.ts.map +1 -0
- package/lib/typescript/services/mobileTrainingService.d.ts +45 -0
- package/lib/typescript/services/mobileTrainingService.d.ts.map +1 -0
- package/lib/typescript/services/pinEncryptionService.d.ts +17 -0
- package/lib/typescript/services/pinEncryptionService.d.ts.map +1 -0
- package/lib/typescript/services/pinStorageUtils.d.ts +25 -0
- package/lib/typescript/services/pinStorageUtils.d.ts.map +1 -0
- package/lib/typescript/services/platformAuthService.d.ts +34 -109
- package/lib/typescript/services/platformAuthService.d.ts.map +1 -1
- package/lib/typescript/services/storageService.d.ts +128 -0
- package/lib/typescript/services/storageService.d.ts.map +1 -0
- package/lib/typescript/services/trainingApiHelpers.d.ts +38 -0
- package/lib/typescript/services/trainingApiHelpers.d.ts.map +1 -0
- package/lib/typescript/services/userConnectionsService.d.ts +90 -0
- package/lib/typescript/services/userConnectionsService.d.ts.map +1 -0
- package/lib/typescript/services/youtubeMigrationService.d.ts +12 -0
- package/lib/typescript/services/youtubeMigrationService.d.ts.map +1 -0
- package/lib/typescript/theme/index.d.ts +416 -0
- package/lib/typescript/theme/index.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +39 -0
- package/lib/typescript/types/index.d.ts.map +1 -1
- package/lib/typescript/utils/eventUtils.d.ts +108 -0
- package/lib/typescript/utils/eventUtils.d.ts.map +1 -0
- package/lib/typescript/utils/haptics.d.ts +11 -0
- package/lib/typescript/utils/haptics.d.ts.map +1 -0
- package/lib/typescript/utils/imagePreloader.d.ts +2 -0
- package/lib/typescript/utils/imagePreloader.d.ts.map +1 -0
- package/package.json +158 -145
- package/src/api/index.ts +41 -0
- package/src/assets/fonts/EBGaramond-VariableFont_wght.ttf +0 -0
- package/src/assets/fonts/IBMPlexSans-VariableFont_wdth,wght.ttf +0 -0
- package/src/assets/icons/Facebookicon.png +0 -0
- package/src/assets/icons/Gmail.png +0 -0
- package/src/assets/icons/Linkedinicon.png +0 -0
- package/src/assets/icons/Redditicon.png +0 -0
- package/src/assets/icons/YouTubeicon2.png +0 -0
- package/src/assets/icons/YouTubeicon3.png +0 -0
- package/src/assets/icons/farcaster.png +0 -0
- package/src/assets/icons/instagram.png +0 -0
- package/src/assets/icons/pinterest.png +0 -0
- package/src/assets/icons/swerv_logo.png +0 -0
- package/src/assets/icons/twitter.jpg +0 -0
- package/src/assets/images/Checkbox.svg +3 -0
- package/src/assets/images/EnochE.svg +19 -0
- package/src/assets/images/Enochicon1.png +0 -0
- package/src/assets/images/Face_ID_logo.png +0 -0
- package/src/assets/images/Facebookicon.png +0 -0
- package/src/assets/images/Gmail.png +0 -0
- package/src/assets/images/Googlelogo.png +0 -0
- package/src/assets/images/Linkedinicon.png +0 -0
- package/src/assets/images/Onairoslogo.png +0 -0
- package/src/assets/images/Personalityprofile.svg +3 -0
- package/src/assets/images/Personalitytraits.svg +3 -0
- package/src/assets/images/Redditicon.png +0 -0
- package/src/assets/images/Userpreferences.svg +3 -0
- package/src/assets/images/YouTubeicon3.png +0 -0
- package/src/assets/images/arrow.svg +20 -0
- package/src/assets/images/basicproficon.svg +43 -0
- package/src/assets/images/basicprofile.svg +3 -0
- package/src/assets/images/checkmark.svg +4 -0
- package/src/assets/images/contentanalysis.svg +3 -0
- package/src/assets/images/contenticon.svg +23 -0
- package/src/assets/images/persona1.png +0 -0
- package/src/assets/images/persona2.png +0 -0
- package/src/assets/images/persona3.png +0 -0
- package/src/assets/images/persona4.png +0 -0
- package/src/assets/images/persona5.png +0 -0
- package/src/assets/images/personalityicon.svg +18 -0
- package/src/assets/images/x-close.svg +3 -0
- package/src/components/BodyText.tsx +33 -0
- package/src/components/BrandMark.tsx +62 -0
- package/src/components/CodeInput.tsx +32 -0
- package/src/components/EmailInput.tsx +31 -0
- package/src/components/ExistingUserDataConfirmation.tsx +507 -0
- package/src/components/GoogleButton.tsx +55 -0
- package/src/components/HeadingGroup.tsx +49 -0
- package/src/components/ModalHeader.tsx +125 -0
- package/src/components/ModalSheet.tsx +57 -0
- package/src/components/Onairos.tsx +422 -424
- package/src/components/OnairosButton.tsx +339 -359
- package/src/components/OnairosSignInButton.tsx +166 -0
- package/src/components/Overlay.tsx +506 -506
- package/src/components/PersonaImage.tsx +79 -0
- package/src/components/PersonaLoadingScreen.tsx +201 -0
- package/src/components/PersonalizationConsentScreen.tsx +410 -0
- package/src/components/PinCreationScreen.tsx +492 -0
- package/src/components/PinInput.tsx +555 -343
- package/src/components/PlatformConnectorsStep.tsx +892 -0
- package/src/components/PlatformToggle.tsx +226 -0
- package/src/components/PrimaryButton.tsx +214 -0
- package/src/components/SignInMatchAnimation.tsx +225 -0
- package/src/components/SignInStep.tsx +217 -0
- package/src/components/TrainingModal.tsx +1047 -737
- package/src/components/UniversalOnboarding.tsx +2888 -1820
- package/src/components/VerificationStep.tsx +198 -0
- package/src/components/WelcomeScreen.tsx +473 -0
- package/src/components/icons/Basicproficon.tsx +30 -0
- package/src/components/icons/Basicprofile.tsx +17 -0
- package/src/components/icons/Checkbox.tsx +17 -0
- package/src/components/icons/Checkmark.tsx +24 -0
- package/src/components/icons/Contentanalysis.tsx +17 -0
- package/src/components/icons/Contenticon.tsx +30 -0
- package/src/components/icons/EnochE.tsx +39 -0
- package/src/components/icons/Personalityicon.tsx +22 -0
- package/src/components/icons/Personalityprofile.tsx +17 -0
- package/src/components/icons/Personalitytraits.tsx +17 -0
- package/src/components/icons/Userpreferences.tsx +17 -0
- package/src/components/icons/index.ts +12 -0
- package/src/components/onboarding/OAuthWebView.tsx +232 -838
- package/src/config/api.ts +25 -0
- package/src/context/AuthContext.tsx +393 -0
- package/src/hooks/useConnectedAccounts.ts +139 -0
- package/src/hooks/useConnections.ts +129 -131
- package/src/hooks/useUserConnections.ts +166 -0
- package/src/index.ts +94 -49
- package/src/services/apiClient.ts +337 -0
- package/src/services/authService.ts +1008 -0
- package/src/services/biometricPinService.ts +193 -0
- package/src/services/connectedAccountsService.ts +290 -0
- package/src/services/googleAuthService.ts +279 -0
- package/src/services/imageCompressionService.ts +303 -0
- package/src/services/jwtStorageService.ts +257 -0
- package/src/services/mobileTrainingService.ts +204 -0
- package/src/services/pinEncryptionService.ts +76 -0
- package/src/services/pinStorageUtils.ts +97 -0
- package/src/services/platformAuthService.ts +1346 -1113
- package/src/services/storageService.ts +452 -0
- package/src/services/trainingApiHelpers.ts +67 -0
- package/src/services/userConnectionsService.ts +557 -0
- package/src/services/youtubeMigrationService.ts +454 -0
- package/src/theme/index.ts +239 -0
- package/src/types/index.ts +265 -238
- package/src/utils/eventUtils.ts +303 -0
- package/src/utils/haptics.ts +59 -0
- package/src/utils/imagePreloader.ts +2 -0
- package/README.md +0 -375
- package/lib/commonjs/assets/images/email.png +0 -0
- package/lib/commonjs/assets/images/linkedin.png +0 -0
- package/lib/commonjs/assets/images/reddit.png +0 -0
- package/lib/commonjs/assets/images/youtube.png +0 -0
- package/lib/commonjs/components/UniversalOnboarding.tsx.new +0 -455
- package/lib/module/assets/images/email.png +0 -0
- package/lib/module/assets/images/linkedin.png +0 -0
- package/lib/module/assets/images/reddit.png +0 -0
- package/lib/module/assets/images/youtube.png +0 -0
- package/lib/module/components/UniversalOnboarding.tsx.new +0 -455
- package/src/assets/images/email.png +0 -0
- package/src/assets/images/linkedin.png +0 -0
- package/src/assets/images/reddit.png +0 -0
- package/src/assets/images/youtube.png +0 -0
- package/src/components/UniversalOnboarding.tsx.new +0 -455
|
@@ -0,0 +1,492 @@
|
|
|
1
|
+
import React, { useState, useEffect } from 'react';
|
|
2
|
+
import {
|
|
3
|
+
View,
|
|
4
|
+
Text,
|
|
5
|
+
StyleSheet,
|
|
6
|
+
TouchableOpacity,
|
|
7
|
+
TextInput,
|
|
8
|
+
Alert,
|
|
9
|
+
ActivityIndicator,
|
|
10
|
+
} from 'react-native';
|
|
11
|
+
import { COLORS } from '../theme';
|
|
12
|
+
import { triggerHaptic, HapticType } from '../utils/haptics';
|
|
13
|
+
import { biometricPinService } from '../services/biometricPinService';
|
|
14
|
+
import { setTemporaryPin } from '../services/pinStorageUtils';
|
|
15
|
+
|
|
16
|
+
interface PinCreationScreenProps {
|
|
17
|
+
visible: boolean;
|
|
18
|
+
onComplete: (pin: string) => void;
|
|
19
|
+
onBack: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
const PinCreationScreen: React.FC<PinCreationScreenProps> = ({
|
|
23
|
+
visible,
|
|
24
|
+
onComplete,
|
|
25
|
+
onBack,
|
|
26
|
+
}) => {
|
|
27
|
+
const [pin, setPin] = useState('');
|
|
28
|
+
const [requirements, setRequirements] = useState({
|
|
29
|
+
length: false,
|
|
30
|
+
uppercase: false,
|
|
31
|
+
number: false,
|
|
32
|
+
});
|
|
33
|
+
const [isLoading, setIsLoading] = useState(false);
|
|
34
|
+
const [biometricAvailable, setBiometricAvailable] = useState(false);
|
|
35
|
+
const [biometricStatus, setBiometricStatus] = useState<'checking' | 'available' | 'unavailable' | 'storing' | 'success' | 'error'>('checking');
|
|
36
|
+
|
|
37
|
+
const validatePin = (pinText: string) => {
|
|
38
|
+
const newRequirements = {
|
|
39
|
+
length: pinText.length >= 6,
|
|
40
|
+
uppercase: /[A-Z]/.test(pinText),
|
|
41
|
+
number: /[0-9]/.test(pinText),
|
|
42
|
+
};
|
|
43
|
+
setRequirements(newRequirements);
|
|
44
|
+
return Object.values(newRequirements).every(req => req);
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
const handlePinChange = (text: string) => {
|
|
48
|
+
setPin(text);
|
|
49
|
+
validatePin(text);
|
|
50
|
+
};
|
|
51
|
+
|
|
52
|
+
const handleContinue = async () => {
|
|
53
|
+
if (!validatePin(pin)) {
|
|
54
|
+
triggerHaptic(HapticType.ERROR);
|
|
55
|
+
Alert.alert('Invalid PIN', 'Please ensure your PIN meets all requirements.');
|
|
56
|
+
return;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
triggerHaptic(HapticType.BUTTON_PRESS);
|
|
60
|
+
setIsLoading(true);
|
|
61
|
+
|
|
62
|
+
try {
|
|
63
|
+
console.log('🔐 Starting PIN creation process...');
|
|
64
|
+
|
|
65
|
+
// Store PIN temporarily for the onboarding flow first
|
|
66
|
+
setTemporaryPin(pin);
|
|
67
|
+
console.log('📝 PIN stored temporarily for onboarding');
|
|
68
|
+
|
|
69
|
+
// If biometric is available, immediately trigger Face ID authentication
|
|
70
|
+
if (biometricAvailable) {
|
|
71
|
+
setBiometricStatus('storing');
|
|
72
|
+
console.log('🔐 [PIN CREATION] Biometric storage enabled, starting biometric flow...');
|
|
73
|
+
|
|
74
|
+
// Double-check biometric availability right before triggering
|
|
75
|
+
const biometricStillAvailable = await biometricPinService.isBiometricAvailable();
|
|
76
|
+
console.log('📱 [PIN CREATION] Biometric available before storage:', biometricStillAvailable);
|
|
77
|
+
|
|
78
|
+
if (!biometricStillAvailable) {
|
|
79
|
+
console.error('❌ [PIN CREATION] Face ID not available on this device');
|
|
80
|
+
setBiometricStatus('unavailable');
|
|
81
|
+
setIsLoading(false);
|
|
82
|
+
return;
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Immediately attempt to store PIN with biometric authentication
|
|
86
|
+
console.log('🔐 [PIN CREATION] Triggering biometric authentication for PIN storage...');
|
|
87
|
+
|
|
88
|
+
// This will immediately show the Face ID prompt
|
|
89
|
+
const stored = await biometricPinService.storePinWithBiometric(pin);
|
|
90
|
+
|
|
91
|
+
if (stored) {
|
|
92
|
+
console.log('✅ PIN stored successfully with Face ID');
|
|
93
|
+
|
|
94
|
+
// Verify the PIN was actually stored by checking if it can be retrieved
|
|
95
|
+
const isStored = await biometricPinService.isPinStored();
|
|
96
|
+
if (isStored) {
|
|
97
|
+
console.log('✅ PIN storage verified - proceeding with onboarding');
|
|
98
|
+
setBiometricStatus('success');
|
|
99
|
+
triggerHaptic(HapticType.SUCCESS);
|
|
100
|
+
|
|
101
|
+
// Brief success state, then continue
|
|
102
|
+
setTimeout(() => {
|
|
103
|
+
setIsLoading(false);
|
|
104
|
+
onComplete(pin);
|
|
105
|
+
}, 800);
|
|
106
|
+
} else {
|
|
107
|
+
console.error('❌ PIN storage verification failed');
|
|
108
|
+
setBiometricStatus('error');
|
|
109
|
+
setIsLoading(false);
|
|
110
|
+
triggerHaptic(HapticType.ERROR);
|
|
111
|
+
Alert.alert(
|
|
112
|
+
'PIN Storage Error',
|
|
113
|
+
'PIN storage verification failed. Please try again.',
|
|
114
|
+
[{ text: 'OK' }]
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
} else {
|
|
118
|
+
console.log('⚠️ Face ID authentication was cancelled or failed');
|
|
119
|
+
setBiometricStatus('error');
|
|
120
|
+
triggerHaptic(HapticType.ERROR);
|
|
121
|
+
|
|
122
|
+
// Show error but still allow continuation
|
|
123
|
+
Alert.alert(
|
|
124
|
+
'Face ID Setup',
|
|
125
|
+
'Face ID authentication was cancelled or failed. Your PIN is still saved securely.',
|
|
126
|
+
[
|
|
127
|
+
{
|
|
128
|
+
text: 'Try Again',
|
|
129
|
+
onPress: () => {
|
|
130
|
+
setIsLoading(false);
|
|
131
|
+
setBiometricStatus('available');
|
|
132
|
+
}
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
text: 'Continue Without Face ID',
|
|
136
|
+
onPress: () => {
|
|
137
|
+
setIsLoading(false);
|
|
138
|
+
onComplete(pin);
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
]
|
|
142
|
+
);
|
|
143
|
+
}
|
|
144
|
+
} else {
|
|
145
|
+
console.log('📱 Biometric not available, continuing without Face ID');
|
|
146
|
+
setBiometricStatus('unavailable');
|
|
147
|
+
setIsLoading(false);
|
|
148
|
+
onComplete(pin);
|
|
149
|
+
}
|
|
150
|
+
} catch (error) {
|
|
151
|
+
console.error('❌ Error in PIN creation process:', error);
|
|
152
|
+
setBiometricStatus('error');
|
|
153
|
+
setIsLoading(false);
|
|
154
|
+
triggerHaptic(HapticType.ERROR);
|
|
155
|
+
Alert.alert(
|
|
156
|
+
'PIN Creation Error',
|
|
157
|
+
'There was an issue creating your PIN. Please try again.',
|
|
158
|
+
[{ text: 'OK' }]
|
|
159
|
+
);
|
|
160
|
+
}
|
|
161
|
+
};
|
|
162
|
+
|
|
163
|
+
const handleBack = () => {
|
|
164
|
+
triggerHaptic(HapticType.BUTTON_PRESS);
|
|
165
|
+
onBack();
|
|
166
|
+
};
|
|
167
|
+
|
|
168
|
+
// Check biometric availability on component mount
|
|
169
|
+
useEffect(() => {
|
|
170
|
+
const checkBiometric = async () => {
|
|
171
|
+
try {
|
|
172
|
+
setBiometricStatus('checking');
|
|
173
|
+
const available = await biometricPinService.isBiometricAvailable();
|
|
174
|
+
setBiometricAvailable(available);
|
|
175
|
+
setBiometricStatus(available ? 'available' : 'unavailable');
|
|
176
|
+
console.log('📱 Biometric availability check:', available);
|
|
177
|
+
} catch (error) {
|
|
178
|
+
console.error('❌ Error checking biometric availability:', error);
|
|
179
|
+
setBiometricAvailable(false);
|
|
180
|
+
setBiometricStatus('unavailable');
|
|
181
|
+
}
|
|
182
|
+
};
|
|
183
|
+
|
|
184
|
+
if (visible) {
|
|
185
|
+
checkBiometric();
|
|
186
|
+
}
|
|
187
|
+
}, [visible]);
|
|
188
|
+
|
|
189
|
+
const allRequirementsMet = Object.values(requirements).every(req => req);
|
|
190
|
+
|
|
191
|
+
if (!visible) return null;
|
|
192
|
+
|
|
193
|
+
return (
|
|
194
|
+
<View style={styles.container}>
|
|
195
|
+
{/* Title */}
|
|
196
|
+
<View style={styles.titleContainer}>
|
|
197
|
+
<Text style={styles.title}>Create a PIN</Text>
|
|
198
|
+
<Text style={styles.subtitle}>A PIN so only you have access to your data.</Text>
|
|
199
|
+
</View>
|
|
200
|
+
|
|
201
|
+
{/* PIN Input */}
|
|
202
|
+
<View style={styles.pinContainer}>
|
|
203
|
+
<TextInput
|
|
204
|
+
style={styles.pinInput}
|
|
205
|
+
value={pin}
|
|
206
|
+
onChangeText={handlePinChange}
|
|
207
|
+
placeholder="Enter your PIN"
|
|
208
|
+
secureTextEntry
|
|
209
|
+
autoFocus
|
|
210
|
+
maxLength={20}
|
|
211
|
+
/>
|
|
212
|
+
</View>
|
|
213
|
+
|
|
214
|
+
{/* Requirements */}
|
|
215
|
+
<View style={styles.requirementsContainer}>
|
|
216
|
+
<Text style={styles.requirementsTitle}>Your PIN must:</Text>
|
|
217
|
+
|
|
218
|
+
<View style={styles.requirementItem}>
|
|
219
|
+
<View style={[styles.checkbox, requirements.length && styles.checkboxChecked]}>
|
|
220
|
+
{requirements.length && <Text style={styles.checkmark}>✓</Text>}
|
|
221
|
+
</View>
|
|
222
|
+
<Text style={[styles.requirementText, requirements.length && styles.requirementTextMet]}>
|
|
223
|
+
Be at least 6 characters in length.
|
|
224
|
+
</Text>
|
|
225
|
+
</View>
|
|
226
|
+
|
|
227
|
+
<View style={styles.requirementItem}>
|
|
228
|
+
<View style={[styles.checkbox, requirements.uppercase && styles.checkboxChecked]}>
|
|
229
|
+
{requirements.uppercase && <Text style={styles.checkmark}>✓</Text>}
|
|
230
|
+
</View>
|
|
231
|
+
<Text style={[styles.requirementText, requirements.uppercase && styles.requirementTextMet]}>
|
|
232
|
+
Contain an uppercase letter.
|
|
233
|
+
</Text>
|
|
234
|
+
</View>
|
|
235
|
+
|
|
236
|
+
<View style={styles.requirementItem}>
|
|
237
|
+
<View style={[styles.checkbox, requirements.number && styles.checkboxChecked]}>
|
|
238
|
+
{requirements.number && <Text style={styles.checkmark}>✓</Text>}
|
|
239
|
+
</View>
|
|
240
|
+
<Text style={[styles.requirementText, requirements.number && styles.requirementTextMet]}>
|
|
241
|
+
Contain a number.
|
|
242
|
+
</Text>
|
|
243
|
+
</View>
|
|
244
|
+
</View>
|
|
245
|
+
|
|
246
|
+
{/* FaceID Security Card */}
|
|
247
|
+
<View style={[
|
|
248
|
+
styles.securityCard,
|
|
249
|
+
biometricStatus === 'success' && styles.securityCardSuccess,
|
|
250
|
+
biometricStatus === 'error' && styles.securityCardError
|
|
251
|
+
]}>
|
|
252
|
+
<View style={styles.securityIconContainer}>
|
|
253
|
+
{biometricStatus === 'checking' && (
|
|
254
|
+
<ActivityIndicator size="small" color={COLORS.grey600} />
|
|
255
|
+
)}
|
|
256
|
+
{biometricStatus === 'storing' && (
|
|
257
|
+
<ActivityIndicator size="small" color="#D4A536" />
|
|
258
|
+
)}
|
|
259
|
+
{biometricStatus === 'available' && (
|
|
260
|
+
<Text style={styles.securityIcon}>🔐</Text>
|
|
261
|
+
)}
|
|
262
|
+
{biometricStatus === 'unavailable' && (
|
|
263
|
+
<Text style={styles.securityIcon}>⚠️</Text>
|
|
264
|
+
)}
|
|
265
|
+
{biometricStatus === 'success' && (
|
|
266
|
+
<Text style={styles.securityIcon}>✅</Text>
|
|
267
|
+
)}
|
|
268
|
+
{biometricStatus === 'error' && (
|
|
269
|
+
<Text style={styles.securityIcon}>❌</Text>
|
|
270
|
+
)}
|
|
271
|
+
</View>
|
|
272
|
+
<View style={styles.securityTextContainer}>
|
|
273
|
+
<Text style={styles.securityTitle}>
|
|
274
|
+
{biometricStatus === 'checking' && 'Checking Face ID...'}
|
|
275
|
+
{biometricStatus === 'available' && 'Enhanced Security'}
|
|
276
|
+
{biometricStatus === 'unavailable' && 'Face ID Unavailable'}
|
|
277
|
+
{biometricStatus === 'storing' && 'Securing with Face ID...'}
|
|
278
|
+
{biometricStatus === 'success' && 'PIN Secured with Face ID'}
|
|
279
|
+
{biometricStatus === 'error' && 'Face ID Setup Failed'}
|
|
280
|
+
</Text>
|
|
281
|
+
<Text style={styles.securityDescription}>
|
|
282
|
+
{biometricStatus === 'checking' && 'Verifying Face ID availability on your device.'}
|
|
283
|
+
{biometricStatus === 'available' && 'We use Face ID to ensure only you can access your data.'}
|
|
284
|
+
{biometricStatus === 'unavailable' && 'Face ID is not available on this device. Your PIN will be stored securely.'}
|
|
285
|
+
{biometricStatus === 'storing' && 'Please authenticate with Face ID to secure your PIN.'}
|
|
286
|
+
{biometricStatus === 'success' && 'Your PIN is now protected with Face ID authentication.'}
|
|
287
|
+
{biometricStatus === 'error' && 'Face ID setup failed, but your PIN is stored securely.'}
|
|
288
|
+
</Text>
|
|
289
|
+
</View>
|
|
290
|
+
</View>
|
|
291
|
+
|
|
292
|
+
{/* Continue Button */}
|
|
293
|
+
<View style={styles.buttonContainer}>
|
|
294
|
+
<TouchableOpacity
|
|
295
|
+
style={[
|
|
296
|
+
styles.continueButton,
|
|
297
|
+
allRequirementsMet && styles.continueButtonActive
|
|
298
|
+
]}
|
|
299
|
+
onPress={handleContinue}
|
|
300
|
+
disabled={!allRequirementsMet || isLoading}
|
|
301
|
+
>
|
|
302
|
+
{isLoading ? (
|
|
303
|
+
<ActivityIndicator size="small" color="#FFFFFF" />
|
|
304
|
+
) : (
|
|
305
|
+
<Text style={[
|
|
306
|
+
styles.continueButtonText,
|
|
307
|
+
allRequirementsMet && styles.continueButtonTextActive
|
|
308
|
+
]}>
|
|
309
|
+
Continue
|
|
310
|
+
</Text>
|
|
311
|
+
)}
|
|
312
|
+
</TouchableOpacity>
|
|
313
|
+
</View>
|
|
314
|
+
</View>
|
|
315
|
+
);
|
|
316
|
+
};
|
|
317
|
+
|
|
318
|
+
const styles = StyleSheet.create({
|
|
319
|
+
container: {
|
|
320
|
+
flex: 1,
|
|
321
|
+
backgroundColor: COLORS.surface,
|
|
322
|
+
paddingHorizontal: 24,
|
|
323
|
+
paddingTop: 0,
|
|
324
|
+
},
|
|
325
|
+
|
|
326
|
+
titleContainer: {
|
|
327
|
+
alignItems: 'center',
|
|
328
|
+
marginBottom: 15,
|
|
329
|
+
paddingTop: -10,
|
|
330
|
+
marginTop: -15,
|
|
331
|
+
},
|
|
332
|
+
|
|
333
|
+
title: {
|
|
334
|
+
fontSize: 24,
|
|
335
|
+
fontWeight: '700',
|
|
336
|
+
color: COLORS.grey800,
|
|
337
|
+
marginBottom: 8,
|
|
338
|
+
fontFamily: 'IBM Plex Sans',
|
|
339
|
+
},
|
|
340
|
+
|
|
341
|
+
subtitle: {
|
|
342
|
+
fontSize: 16,
|
|
343
|
+
color: COLORS.grey600,
|
|
344
|
+
lineHeight: 24,
|
|
345
|
+
fontFamily: 'Inter',
|
|
346
|
+
},
|
|
347
|
+
|
|
348
|
+
pinContainer: {
|
|
349
|
+
marginBottom: 32,
|
|
350
|
+
},
|
|
351
|
+
|
|
352
|
+
pinInput: {
|
|
353
|
+
backgroundColor: '#F8F9FA',
|
|
354
|
+
borderRadius: 12,
|
|
355
|
+
paddingVertical: 16,
|
|
356
|
+
paddingHorizontal: 16,
|
|
357
|
+
fontSize: 16,
|
|
358
|
+
fontFamily: 'Inter',
|
|
359
|
+
borderWidth: 1,
|
|
360
|
+
borderColor: '#E5E5E5',
|
|
361
|
+
},
|
|
362
|
+
|
|
363
|
+
requirementsContainer: {
|
|
364
|
+
marginBottom: 32,
|
|
365
|
+
},
|
|
366
|
+
|
|
367
|
+
requirementsTitle: {
|
|
368
|
+
fontSize: 16,
|
|
369
|
+
fontWeight: '600',
|
|
370
|
+
color: COLORS.grey800,
|
|
371
|
+
marginBottom: 16,
|
|
372
|
+
fontFamily: 'Inter',
|
|
373
|
+
},
|
|
374
|
+
|
|
375
|
+
requirementItem: {
|
|
376
|
+
flexDirection: 'row',
|
|
377
|
+
alignItems: 'center',
|
|
378
|
+
marginBottom: 12,
|
|
379
|
+
},
|
|
380
|
+
|
|
381
|
+
checkbox: {
|
|
382
|
+
width: 20,
|
|
383
|
+
height: 20,
|
|
384
|
+
borderRadius: 10,
|
|
385
|
+
borderWidth: 2,
|
|
386
|
+
borderColor: '#E5E5E5',
|
|
387
|
+
marginRight: 12,
|
|
388
|
+
alignItems: 'center',
|
|
389
|
+
justifyContent: 'center',
|
|
390
|
+
},
|
|
391
|
+
|
|
392
|
+
checkboxChecked: {
|
|
393
|
+
borderColor: '#4CD964',
|
|
394
|
+
backgroundColor: '#4CD964',
|
|
395
|
+
},
|
|
396
|
+
|
|
397
|
+
checkmark: {
|
|
398
|
+
color: '#FFFFFF',
|
|
399
|
+
fontSize: 12,
|
|
400
|
+
fontWeight: 'bold',
|
|
401
|
+
},
|
|
402
|
+
|
|
403
|
+
requirementText: {
|
|
404
|
+
fontSize: 14,
|
|
405
|
+
color: COLORS.grey600,
|
|
406
|
+
fontFamily: 'Inter',
|
|
407
|
+
flex: 1,
|
|
408
|
+
},
|
|
409
|
+
|
|
410
|
+
requirementTextMet: {
|
|
411
|
+
color: COLORS.grey800,
|
|
412
|
+
},
|
|
413
|
+
|
|
414
|
+
securityCard: {
|
|
415
|
+
backgroundColor: '#F8F9FA',
|
|
416
|
+
borderRadius: 12,
|
|
417
|
+
padding: 16,
|
|
418
|
+
flexDirection: 'row',
|
|
419
|
+
alignItems: 'center',
|
|
420
|
+
marginBottom: 24,
|
|
421
|
+
borderWidth: 1,
|
|
422
|
+
borderColor: '#E5E5E5',
|
|
423
|
+
},
|
|
424
|
+
|
|
425
|
+
securityCardSuccess: {
|
|
426
|
+
backgroundColor: '#F0FDF4',
|
|
427
|
+
borderColor: '#22C55E',
|
|
428
|
+
},
|
|
429
|
+
|
|
430
|
+
securityCardError: {
|
|
431
|
+
backgroundColor: '#FEF2F2',
|
|
432
|
+
borderColor: '#EF4444',
|
|
433
|
+
},
|
|
434
|
+
|
|
435
|
+
securityIconContainer: {
|
|
436
|
+
marginRight: 12,
|
|
437
|
+
},
|
|
438
|
+
|
|
439
|
+
securityIcon: {
|
|
440
|
+
fontSize: 24,
|
|
441
|
+
},
|
|
442
|
+
|
|
443
|
+
securityTextContainer: {
|
|
444
|
+
flex: 1,
|
|
445
|
+
},
|
|
446
|
+
|
|
447
|
+
securityTitle: {
|
|
448
|
+
fontSize: 14,
|
|
449
|
+
fontWeight: '600',
|
|
450
|
+
color: COLORS.grey800,
|
|
451
|
+
marginBottom: 4,
|
|
452
|
+
fontFamily: 'Inter',
|
|
453
|
+
},
|
|
454
|
+
|
|
455
|
+
securityDescription: {
|
|
456
|
+
fontSize: 13,
|
|
457
|
+
color: COLORS.grey600,
|
|
458
|
+
lineHeight: 18,
|
|
459
|
+
fontFamily: 'Inter',
|
|
460
|
+
},
|
|
461
|
+
|
|
462
|
+
buttonContainer: {
|
|
463
|
+
marginTop: 'auto',
|
|
464
|
+
paddingBottom: 34,
|
|
465
|
+
},
|
|
466
|
+
|
|
467
|
+
continueButton: {
|
|
468
|
+
backgroundColor: '#E5E5E5',
|
|
469
|
+
borderRadius: 25,
|
|
470
|
+
paddingVertical: 16,
|
|
471
|
+
alignItems: 'center',
|
|
472
|
+
justifyContent: 'center',
|
|
473
|
+
},
|
|
474
|
+
|
|
475
|
+
continueButtonActive: {
|
|
476
|
+
backgroundColor: '#2D3436',
|
|
477
|
+
},
|
|
478
|
+
|
|
479
|
+
continueButtonText: {
|
|
480
|
+
fontSize: 16,
|
|
481
|
+
fontWeight: '600',
|
|
482
|
+
color: '#999999',
|
|
483
|
+
fontFamily: 'Inter',
|
|
484
|
+
},
|
|
485
|
+
|
|
486
|
+
continueButtonTextActive: {
|
|
487
|
+
color: '#FFFFFF',
|
|
488
|
+
},
|
|
489
|
+
});
|
|
490
|
+
|
|
491
|
+
export { PinCreationScreen };
|
|
492
|
+
export default PinCreationScreen;
|