@velion-la/onboarding-sdk-react-native 1.0.0-beta.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/CHANGELOG.md +66 -0
- package/LICENSE +12 -0
- package/README.md +803 -0
- package/lib/commonjs/camera/AddressSearchBar.js +304 -0
- package/lib/commonjs/camera/AddressSearchBar.js.map +1 -0
- package/lib/commonjs/camera/DocumentCapture.js +505 -0
- package/lib/commonjs/camera/DocumentCapture.js.map +1 -0
- package/lib/commonjs/camera/LivenessCamera.js +534 -0
- package/lib/commonjs/camera/LivenessCamera.js.map +1 -0
- package/lib/commonjs/camera/MapAddressPicker.js +341 -0
- package/lib/commonjs/camera/MapAddressPicker.js.map +1 -0
- package/lib/commonjs/core/VelionOnboarding.js +815 -0
- package/lib/commonjs/core/VelionOnboarding.js.map +1 -0
- package/lib/commonjs/core/sessionDeclinedCopy.js +56 -0
- package/lib/commonjs/core/sessionDeclinedCopy.js.map +1 -0
- package/lib/commonjs/core/sessionStateMapper.js +137 -0
- package/lib/commonjs/core/sessionStateMapper.js.map +1 -0
- package/lib/commonjs/core/sseReasonMessages.js +450 -0
- package/lib/commonjs/core/sseReasonMessages.js.map +1 -0
- package/lib/commonjs/data/iso3166Alpha2Codes.json +1 -0
- package/lib/commonjs/data/iso3166CountryNames.json +251 -0
- package/lib/commonjs/i18n/index.js +30 -0
- package/lib/commonjs/i18n/index.js.map +1 -0
- package/lib/commonjs/i18n/strings/en.js +261 -0
- package/lib/commonjs/i18n/strings/en.js.map +1 -0
- package/lib/commonjs/i18n/strings/es.js +266 -0
- package/lib/commonjs/i18n/strings/es.js.map +1 -0
- package/lib/commonjs/index.js +213 -0
- package/lib/commonjs/index.js.map +1 -0
- package/lib/commonjs/package.json +1 -0
- package/lib/commonjs/steps/AddressInfoStep.js +650 -0
- package/lib/commonjs/steps/AddressInfoStep.js.map +1 -0
- package/lib/commonjs/steps/DocumentsOcrStep.js +397 -0
- package/lib/commonjs/steps/DocumentsOcrStep.js.map +1 -0
- package/lib/commonjs/steps/EmailContactStep.js +145 -0
- package/lib/commonjs/steps/EmailContactStep.js.map +1 -0
- package/lib/commonjs/steps/EmailOtpStep.js +220 -0
- package/lib/commonjs/steps/EmailOtpStep.js.map +1 -0
- package/lib/commonjs/steps/FaceMatchStep.js +166 -0
- package/lib/commonjs/steps/FaceMatchStep.js.map +1 -0
- package/lib/commonjs/steps/FingerprintStep.js +92 -0
- package/lib/commonjs/steps/FingerprintStep.js.map +1 -0
- package/lib/commonjs/steps/HumanBasicInfoStep.js +243 -0
- package/lib/commonjs/steps/HumanBasicInfoStep.js.map +1 -0
- package/lib/commonjs/steps/HumanExtendedInfoStep.js +268 -0
- package/lib/commonjs/steps/HumanExtendedInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LegalBasicInfoStep.js +188 -0
- package/lib/commonjs/steps/LegalBasicInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LegalExtendedInfoStep.js +166 -0
- package/lib/commonjs/steps/LegalExtendedInfoStep.js.map +1 -0
- package/lib/commonjs/steps/LivenessMatchStep.js +707 -0
- package/lib/commonjs/steps/LivenessMatchStep.js.map +1 -0
- package/lib/commonjs/steps/PhoneContactStep.js +146 -0
- package/lib/commonjs/steps/PhoneContactStep.js.map +1 -0
- package/lib/commonjs/steps/PhoneOtpStep.js +219 -0
- package/lib/commonjs/steps/PhoneOtpStep.js.map +1 -0
- package/lib/commonjs/steps/SwornDeclarationStep.js +196 -0
- package/lib/commonjs/steps/SwornDeclarationStep.js.map +1 -0
- package/lib/commonjs/steps/TaxInfoStep.js +244 -0
- package/lib/commonjs/steps/TaxInfoStep.js.map +1 -0
- package/lib/commonjs/steps/TermsAndConditionsStep.js +238 -0
- package/lib/commonjs/steps/TermsAndConditionsStep.js.map +1 -0
- package/lib/commonjs/steps/_shared.js +40 -0
- package/lib/commonjs/steps/_shared.js.map +1 -0
- package/lib/commonjs/steps/types.js +6 -0
- package/lib/commonjs/steps/types.js.map +1 -0
- package/lib/commonjs/transport/api.js +176 -0
- package/lib/commonjs/transport/api.js.map +1 -0
- package/lib/commonjs/transport/irisWebSocket.js +121 -0
- package/lib/commonjs/transport/irisWebSocket.js.map +1 -0
- package/lib/commonjs/transport/secureUrl.js +50 -0
- package/lib/commonjs/transport/secureUrl.js.map +1 -0
- package/lib/commonjs/transport/sse.js +248 -0
- package/lib/commonjs/transport/sse.js.map +1 -0
- package/lib/commonjs/types/index.js +391 -0
- package/lib/commonjs/types/index.js.map +1 -0
- package/lib/commonjs/ui/MapFallbackBoundary.js +42 -0
- package/lib/commonjs/ui/MapFallbackBoundary.js.map +1 -0
- package/lib/commonjs/ui/StepShell.js +118 -0
- package/lib/commonjs/ui/StepShell.js.map +1 -0
- package/lib/commonjs/ui/VelionOnboardingScreen.js +217 -0
- package/lib/commonjs/ui/VelionOnboardingScreen.js.map +1 -0
- package/lib/commonjs/ui/forms/index.js +38 -0
- package/lib/commonjs/ui/forms/index.js.map +1 -0
- package/lib/commonjs/ui/forms/useInlineValidation.js +88 -0
- package/lib/commonjs/ui/forms/useInlineValidation.js.map +1 -0
- package/lib/commonjs/ui/forms/validators.js +34 -0
- package/lib/commonjs/ui/forms/validators.js.map +1 -0
- package/lib/commonjs/ui/icons/HomeHeartIcon.js +38 -0
- package/lib/commonjs/ui/icons/HomeHeartIcon.js.map +1 -0
- package/lib/commonjs/ui/icons/StepIcon.js +59 -0
- package/lib/commonjs/ui/icons/StepIcon.js.map +1 -0
- package/lib/commonjs/ui/overlays/AnalyzingOverlay.js +284 -0
- package/lib/commonjs/ui/overlays/AnalyzingOverlay.js.map +1 -0
- package/lib/commonjs/ui/overlays/LoadingOverlay.js +108 -0
- package/lib/commonjs/ui/overlays/LoadingOverlay.js.map +1 -0
- package/lib/commonjs/ui/overlays/ProgressBar.js +95 -0
- package/lib/commonjs/ui/overlays/ProgressBar.js.map +1 -0
- package/lib/commonjs/ui/overlays/RetryDialog.js +125 -0
- package/lib/commonjs/ui/overlays/RetryDialog.js.map +1 -0
- package/lib/commonjs/ui/overlays/index.js +33 -0
- package/lib/commonjs/ui/overlays/index.js.map +1 -0
- package/lib/commonjs/ui/primitives/Banner.js +81 -0
- package/lib/commonjs/ui/primitives/Banner.js.map +1 -0
- package/lib/commonjs/ui/primitives/Button.js +142 -0
- package/lib/commonjs/ui/primitives/Button.js.map +1 -0
- package/lib/commonjs/ui/primitives/Card.js +50 -0
- package/lib/commonjs/ui/primitives/Card.js.map +1 -0
- package/lib/commonjs/ui/primitives/Checkbox.js +139 -0
- package/lib/commonjs/ui/primitives/Checkbox.js.map +1 -0
- package/lib/commonjs/ui/primitives/CountrySelect.js +288 -0
- package/lib/commonjs/ui/primitives/CountrySelect.js.map +1 -0
- package/lib/commonjs/ui/primitives/DatePicker.js +245 -0
- package/lib/commonjs/ui/primitives/DatePicker.js.map +1 -0
- package/lib/commonjs/ui/primitives/Input.js +101 -0
- package/lib/commonjs/ui/primitives/Input.js.map +1 -0
- package/lib/commonjs/ui/primitives/Select.js +209 -0
- package/lib/commonjs/ui/primitives/Select.js.map +1 -0
- package/lib/commonjs/ui/primitives/Spinner.js +25 -0
- package/lib/commonjs/ui/primitives/Spinner.js.map +1 -0
- package/lib/commonjs/ui/primitives/index.js +69 -0
- package/lib/commonjs/ui/primitives/index.js.map +1 -0
- package/lib/commonjs/ui/theme/ThemeProvider.js +74 -0
- package/lib/commonjs/ui/theme/ThemeProvider.js.map +1 -0
- package/lib/commonjs/ui/theme/index.js +68 -0
- package/lib/commonjs/ui/theme/index.js.map +1 -0
- package/lib/commonjs/ui/theme/tokens.js +154 -0
- package/lib/commonjs/ui/theme/tokens.js.map +1 -0
- package/lib/commonjs/utils/EventEmitter.js +144 -0
- package/lib/commonjs/utils/EventEmitter.js.map +1 -0
- package/lib/commonjs/utils/base64.js +53 -0
- package/lib/commonjs/utils/base64.js.map +1 -0
- package/lib/commonjs/utils/deviceFingerprint.js +132 -0
- package/lib/commonjs/utils/deviceFingerprint.js.map +1 -0
- package/lib/commonjs/utils/documentTypeOptions.js +35 -0
- package/lib/commonjs/utils/documentTypeOptions.js.map +1 -0
- package/lib/commonjs/utils/googleMapsPreflight.js +77 -0
- package/lib/commonjs/utils/googleMapsPreflight.js.map +1 -0
- package/lib/commonjs/utils/hmac.js +58 -0
- package/lib/commonjs/utils/hmac.js.map +1 -0
- package/lib/commonjs/utils/iso3166Countries.js +98 -0
- package/lib/commonjs/utils/iso3166Countries.js.map +1 -0
- package/lib/commonjs/utils/jpegFromUri.js +44 -0
- package/lib/commonjs/utils/jpegFromUri.js.map +1 -0
- package/lib/commonjs/utils/keepAwake.js +58 -0
- package/lib/commonjs/utils/keepAwake.js.map +1 -0
- package/lib/commonjs/utils/log.js +42 -0
- package/lib/commonjs/utils/log.js.map +1 -0
- package/lib/commonjs/utils/osGeocoder.js +70 -0
- package/lib/commonjs/utils/osGeocoder.js.map +1 -0
- package/lib/commonjs/utils/parseGoogleAddressComponents.js +74 -0
- package/lib/commonjs/utils/parseGoogleAddressComponents.js.map +1 -0
- package/lib/commonjs/utils/personNameNormalize.js +24 -0
- package/lib/commonjs/utils/personNameNormalize.js.map +1 -0
- package/lib/commonjs/utils/sdkError.js +34 -0
- package/lib/commonjs/utils/sdkError.js.map +1 -0
- package/lib/commonjs/utils/sdkVersion.js +13 -0
- package/lib/commonjs/utils/sdkVersion.js.map +1 -0
- package/lib/commonjs/utils/stepConfig.js +65 -0
- package/lib/commonjs/utils/stepConfig.js.map +1 -0
- package/lib/commonjs/utils/taxInfoConfig.js +19 -0
- package/lib/commonjs/utils/taxInfoConfig.js.map +1 -0
- package/lib/module/camera/AddressSearchBar.js +299 -0
- package/lib/module/camera/AddressSearchBar.js.map +1 -0
- package/lib/module/camera/DocumentCapture.js +500 -0
- package/lib/module/camera/DocumentCapture.js.map +1 -0
- package/lib/module/camera/LivenessCamera.js +529 -0
- package/lib/module/camera/LivenessCamera.js.map +1 -0
- package/lib/module/camera/MapAddressPicker.js +337 -0
- package/lib/module/camera/MapAddressPicker.js.map +1 -0
- package/lib/module/core/VelionOnboarding.js +811 -0
- package/lib/module/core/VelionOnboarding.js.map +1 -0
- package/lib/module/core/sessionDeclinedCopy.js +52 -0
- package/lib/module/core/sessionDeclinedCopy.js.map +1 -0
- package/lib/module/core/sessionStateMapper.js +128 -0
- package/lib/module/core/sessionStateMapper.js.map +1 -0
- package/lib/module/core/sseReasonMessages.js +446 -0
- package/lib/module/core/sseReasonMessages.js.map +1 -0
- package/lib/module/data/iso3166Alpha2Codes.json +1 -0
- package/lib/module/data/iso3166CountryNames.json +251 -0
- package/lib/module/i18n/index.js +25 -0
- package/lib/module/i18n/index.js.map +1 -0
- package/lib/module/i18n/strings/en.js +257 -0
- package/lib/module/i18n/strings/en.js.map +1 -0
- package/lib/module/i18n/strings/es.js +262 -0
- package/lib/module/i18n/strings/es.js.map +1 -0
- package/lib/module/index.js +36 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/steps/AddressInfoStep.js +646 -0
- package/lib/module/steps/AddressInfoStep.js.map +1 -0
- package/lib/module/steps/DocumentsOcrStep.js +391 -0
- package/lib/module/steps/DocumentsOcrStep.js.map +1 -0
- package/lib/module/steps/EmailContactStep.js +140 -0
- package/lib/module/steps/EmailContactStep.js.map +1 -0
- package/lib/module/steps/EmailOtpStep.js +215 -0
- package/lib/module/steps/EmailOtpStep.js.map +1 -0
- package/lib/module/steps/FaceMatchStep.js +161 -0
- package/lib/module/steps/FaceMatchStep.js.map +1 -0
- package/lib/module/steps/FingerprintStep.js +87 -0
- package/lib/module/steps/FingerprintStep.js.map +1 -0
- package/lib/module/steps/HumanBasicInfoStep.js +238 -0
- package/lib/module/steps/HumanBasicInfoStep.js.map +1 -0
- package/lib/module/steps/HumanExtendedInfoStep.js +263 -0
- package/lib/module/steps/HumanExtendedInfoStep.js.map +1 -0
- package/lib/module/steps/LegalBasicInfoStep.js +183 -0
- package/lib/module/steps/LegalBasicInfoStep.js.map +1 -0
- package/lib/module/steps/LegalExtendedInfoStep.js +161 -0
- package/lib/module/steps/LegalExtendedInfoStep.js.map +1 -0
- package/lib/module/steps/LivenessMatchStep.js +701 -0
- package/lib/module/steps/LivenessMatchStep.js.map +1 -0
- package/lib/module/steps/PhoneContactStep.js +141 -0
- package/lib/module/steps/PhoneContactStep.js.map +1 -0
- package/lib/module/steps/PhoneOtpStep.js +214 -0
- package/lib/module/steps/PhoneOtpStep.js.map +1 -0
- package/lib/module/steps/SwornDeclarationStep.js +191 -0
- package/lib/module/steps/SwornDeclarationStep.js.map +1 -0
- package/lib/module/steps/TaxInfoStep.js +239 -0
- package/lib/module/steps/TaxInfoStep.js.map +1 -0
- package/lib/module/steps/TermsAndConditionsStep.js +233 -0
- package/lib/module/steps/TermsAndConditionsStep.js.map +1 -0
- package/lib/module/steps/_shared.js +33 -0
- package/lib/module/steps/_shared.js.map +1 -0
- package/lib/module/steps/types.js +4 -0
- package/lib/module/steps/types.js.map +1 -0
- package/lib/module/transport/api.js +173 -0
- package/lib/module/transport/api.js.map +1 -0
- package/lib/module/transport/irisWebSocket.js +115 -0
- package/lib/module/transport/irisWebSocket.js.map +1 -0
- package/lib/module/transport/secureUrl.js +45 -0
- package/lib/module/transport/secureUrl.js.map +1 -0
- package/lib/module/transport/sse.js +242 -0
- package/lib/module/transport/sse.js.map +1 -0
- package/lib/module/types/index.js +457 -0
- package/lib/module/types/index.js.map +1 -0
- package/lib/module/ui/MapFallbackBoundary.js +37 -0
- package/lib/module/ui/MapFallbackBoundary.js.map +1 -0
- package/lib/module/ui/StepShell.js +114 -0
- package/lib/module/ui/StepShell.js.map +1 -0
- package/lib/module/ui/VelionOnboardingScreen.js +212 -0
- package/lib/module/ui/VelionOnboardingScreen.js.map +1 -0
- package/lib/module/ui/forms/index.js +5 -0
- package/lib/module/ui/forms/index.js.map +1 -0
- package/lib/module/ui/forms/useInlineValidation.js +84 -0
- package/lib/module/ui/forms/useInlineValidation.js.map +1 -0
- package/lib/module/ui/forms/validators.js +27 -0
- package/lib/module/ui/forms/validators.js.map +1 -0
- package/lib/module/ui/icons/HomeHeartIcon.js +33 -0
- package/lib/module/ui/icons/HomeHeartIcon.js.map +1 -0
- package/lib/module/ui/icons/StepIcon.js +55 -0
- package/lib/module/ui/icons/StepIcon.js.map +1 -0
- package/lib/module/ui/overlays/AnalyzingOverlay.js +279 -0
- package/lib/module/ui/overlays/AnalyzingOverlay.js.map +1 -0
- package/lib/module/ui/overlays/LoadingOverlay.js +104 -0
- package/lib/module/ui/overlays/LoadingOverlay.js.map +1 -0
- package/lib/module/ui/overlays/ProgressBar.js +90 -0
- package/lib/module/ui/overlays/ProgressBar.js.map +1 -0
- package/lib/module/ui/overlays/RetryDialog.js +121 -0
- package/lib/module/ui/overlays/RetryDialog.js.map +1 -0
- package/lib/module/ui/overlays/index.js +6 -0
- package/lib/module/ui/overlays/index.js.map +1 -0
- package/lib/module/ui/primitives/Banner.js +77 -0
- package/lib/module/ui/primitives/Banner.js.map +1 -0
- package/lib/module/ui/primitives/Button.js +138 -0
- package/lib/module/ui/primitives/Button.js.map +1 -0
- package/lib/module/ui/primitives/Card.js +46 -0
- package/lib/module/ui/primitives/Card.js.map +1 -0
- package/lib/module/ui/primitives/Checkbox.js +136 -0
- package/lib/module/ui/primitives/Checkbox.js.map +1 -0
- package/lib/module/ui/primitives/CountrySelect.js +284 -0
- package/lib/module/ui/primitives/CountrySelect.js.map +1 -0
- package/lib/module/ui/primitives/DatePicker.js +241 -0
- package/lib/module/ui/primitives/DatePicker.js.map +1 -0
- package/lib/module/ui/primitives/Input.js +97 -0
- package/lib/module/ui/primitives/Input.js.map +1 -0
- package/lib/module/ui/primitives/Select.js +205 -0
- package/lib/module/ui/primitives/Select.js.map +1 -0
- package/lib/module/ui/primitives/Spinner.js +21 -0
- package/lib/module/ui/primitives/Spinner.js.map +1 -0
- package/lib/module/ui/primitives/index.js +12 -0
- package/lib/module/ui/primitives/index.js.map +1 -0
- package/lib/module/ui/theme/ThemeProvider.js +67 -0
- package/lib/module/ui/theme/ThemeProvider.js.map +1 -0
- package/lib/module/ui/theme/index.js +5 -0
- package/lib/module/ui/theme/index.js.map +1 -0
- package/lib/module/ui/theme/tokens.js +145 -0
- package/lib/module/ui/theme/tokens.js.map +1 -0
- package/lib/module/utils/EventEmitter.js +139 -0
- package/lib/module/utils/EventEmitter.js.map +1 -0
- package/lib/module/utils/base64.js +47 -0
- package/lib/module/utils/base64.js.map +1 -0
- package/lib/module/utils/deviceFingerprint.js +129 -0
- package/lib/module/utils/deviceFingerprint.js.map +1 -0
- package/lib/module/utils/documentTypeOptions.js +31 -0
- package/lib/module/utils/documentTypeOptions.js.map +1 -0
- package/lib/module/utils/googleMapsPreflight.js +73 -0
- package/lib/module/utils/googleMapsPreflight.js.map +1 -0
- package/lib/module/utils/hmac.js +53 -0
- package/lib/module/utils/hmac.js.map +1 -0
- package/lib/module/utils/iso3166Countries.js +92 -0
- package/lib/module/utils/iso3166Countries.js.map +1 -0
- package/lib/module/utils/jpegFromUri.js +40 -0
- package/lib/module/utils/jpegFromUri.js.map +1 -0
- package/lib/module/utils/keepAwake.js +53 -0
- package/lib/module/utils/keepAwake.js.map +1 -0
- package/lib/module/utils/log.js +37 -0
- package/lib/module/utils/log.js.map +1 -0
- package/lib/module/utils/osGeocoder.js +65 -0
- package/lib/module/utils/osGeocoder.js.map +1 -0
- package/lib/module/utils/parseGoogleAddressComponents.js +69 -0
- package/lib/module/utils/parseGoogleAddressComponents.js.map +1 -0
- package/lib/module/utils/personNameNormalize.js +20 -0
- package/lib/module/utils/personNameNormalize.js.map +1 -0
- package/lib/module/utils/sdkError.js +29 -0
- package/lib/module/utils/sdkError.js.map +1 -0
- package/lib/module/utils/sdkVersion.js +9 -0
- package/lib/module/utils/sdkVersion.js.map +1 -0
- package/lib/module/utils/stepConfig.js +59 -0
- package/lib/module/utils/stepConfig.js.map +1 -0
- package/lib/module/utils/taxInfoConfig.js +15 -0
- package/lib/module/utils/taxInfoConfig.js.map +1 -0
- package/lib/typescript/camera/AddressSearchBar.d.ts +37 -0
- package/lib/typescript/camera/AddressSearchBar.d.ts.map +1 -0
- package/lib/typescript/camera/DocumentCapture.d.ts +34 -0
- package/lib/typescript/camera/DocumentCapture.d.ts.map +1 -0
- package/lib/typescript/camera/LivenessCamera.d.ts +50 -0
- package/lib/typescript/camera/LivenessCamera.d.ts.map +1 -0
- package/lib/typescript/camera/MapAddressPicker.d.ts +57 -0
- package/lib/typescript/camera/MapAddressPicker.d.ts.map +1 -0
- package/lib/typescript/core/VelionOnboarding.d.ts +115 -0
- package/lib/typescript/core/VelionOnboarding.d.ts.map +1 -0
- package/lib/typescript/core/sessionDeclinedCopy.d.ts +16 -0
- package/lib/typescript/core/sessionDeclinedCopy.d.ts.map +1 -0
- package/lib/typescript/core/sessionStateMapper.d.ts +33 -0
- package/lib/typescript/core/sessionStateMapper.d.ts.map +1 -0
- package/lib/typescript/core/sseReasonMessages.d.ts +20 -0
- package/lib/typescript/core/sseReasonMessages.d.ts.map +1 -0
- package/lib/typescript/i18n/index.d.ts +13 -0
- package/lib/typescript/i18n/index.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/en.d.ts +3 -0
- package/lib/typescript/i18n/strings/en.d.ts.map +1 -0
- package/lib/typescript/i18n/strings/es.d.ts +260 -0
- package/lib/typescript/i18n/strings/es.d.ts.map +1 -0
- package/lib/typescript/index.d.ts +26 -0
- package/lib/typescript/index.d.ts.map +1 -0
- package/lib/typescript/steps/AddressInfoStep.d.ts +26 -0
- package/lib/typescript/steps/AddressInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/DocumentsOcrStep.d.ts +26 -0
- package/lib/typescript/steps/DocumentsOcrStep.d.ts.map +1 -0
- package/lib/typescript/steps/EmailContactStep.d.ts +15 -0
- package/lib/typescript/steps/EmailContactStep.d.ts.map +1 -0
- package/lib/typescript/steps/EmailOtpStep.d.ts +21 -0
- package/lib/typescript/steps/EmailOtpStep.d.ts.map +1 -0
- package/lib/typescript/steps/FaceMatchStep.d.ts +27 -0
- package/lib/typescript/steps/FaceMatchStep.d.ts.map +1 -0
- package/lib/typescript/steps/FingerprintStep.d.ts +25 -0
- package/lib/typescript/steps/FingerprintStep.d.ts.map +1 -0
- package/lib/typescript/steps/HumanBasicInfoStep.d.ts +25 -0
- package/lib/typescript/steps/HumanBasicInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/HumanExtendedInfoStep.d.ts +23 -0
- package/lib/typescript/steps/HumanExtendedInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/LegalBasicInfoStep.d.ts +17 -0
- package/lib/typescript/steps/LegalBasicInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/LegalExtendedInfoStep.d.ts +17 -0
- package/lib/typescript/steps/LegalExtendedInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/LivenessMatchStep.d.ts +26 -0
- package/lib/typescript/steps/LivenessMatchStep.d.ts.map +1 -0
- package/lib/typescript/steps/PhoneContactStep.d.ts +15 -0
- package/lib/typescript/steps/PhoneContactStep.d.ts.map +1 -0
- package/lib/typescript/steps/PhoneOtpStep.d.ts +19 -0
- package/lib/typescript/steps/PhoneOtpStep.d.ts.map +1 -0
- package/lib/typescript/steps/SwornDeclarationStep.d.ts +20 -0
- package/lib/typescript/steps/SwornDeclarationStep.d.ts.map +1 -0
- package/lib/typescript/steps/TaxInfoStep.d.ts +19 -0
- package/lib/typescript/steps/TaxInfoStep.d.ts.map +1 -0
- package/lib/typescript/steps/TermsAndConditionsStep.d.ts +21 -0
- package/lib/typescript/steps/TermsAndConditionsStep.d.ts.map +1 -0
- package/lib/typescript/steps/_shared.d.ts +11 -0
- package/lib/typescript/steps/_shared.d.ts.map +1 -0
- package/lib/typescript/steps/types.d.ts +68 -0
- package/lib/typescript/steps/types.d.ts.map +1 -0
- package/lib/typescript/transport/api.d.ts +35 -0
- package/lib/typescript/transport/api.d.ts.map +1 -0
- package/lib/typescript/transport/irisWebSocket.d.ts +72 -0
- package/lib/typescript/transport/irisWebSocket.d.ts.map +1 -0
- package/lib/typescript/transport/secureUrl.d.ts +14 -0
- package/lib/typescript/transport/secureUrl.d.ts.map +1 -0
- package/lib/typescript/transport/sse.d.ts +54 -0
- package/lib/typescript/transport/sse.d.ts.map +1 -0
- package/lib/typescript/types/index.d.ts +1010 -0
- package/lib/typescript/types/index.d.ts.map +1 -0
- package/lib/typescript/ui/MapFallbackBoundary.d.ts +28 -0
- package/lib/typescript/ui/MapFallbackBoundary.d.ts.map +1 -0
- package/lib/typescript/ui/StepShell.d.ts +19 -0
- package/lib/typescript/ui/StepShell.d.ts.map +1 -0
- package/lib/typescript/ui/VelionOnboardingScreen.d.ts +19 -0
- package/lib/typescript/ui/VelionOnboardingScreen.d.ts.map +1 -0
- package/lib/typescript/ui/forms/index.d.ts +3 -0
- package/lib/typescript/ui/forms/index.d.ts.map +1 -0
- package/lib/typescript/ui/forms/useInlineValidation.d.ts +30 -0
- package/lib/typescript/ui/forms/useInlineValidation.d.ts.map +1 -0
- package/lib/typescript/ui/forms/validators.d.ts +11 -0
- package/lib/typescript/ui/forms/validators.d.ts.map +1 -0
- package/lib/typescript/ui/icons/HomeHeartIcon.d.ts +14 -0
- package/lib/typescript/ui/icons/HomeHeartIcon.d.ts.map +1 -0
- package/lib/typescript/ui/icons/StepIcon.d.ts +26 -0
- package/lib/typescript/ui/icons/StepIcon.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts +24 -0
- package/lib/typescript/ui/overlays/AnalyzingOverlay.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/LoadingOverlay.d.ts +19 -0
- package/lib/typescript/ui/overlays/LoadingOverlay.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/ProgressBar.d.ts +26 -0
- package/lib/typescript/ui/overlays/ProgressBar.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/RetryDialog.d.ts +17 -0
- package/lib/typescript/ui/overlays/RetryDialog.d.ts.map +1 -0
- package/lib/typescript/ui/overlays/index.d.ts +4 -0
- package/lib/typescript/ui/overlays/index.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Banner.d.ts +11 -0
- package/lib/typescript/ui/primitives/Banner.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Button.d.ts +27 -0
- package/lib/typescript/ui/primitives/Button.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Card.d.ts +10 -0
- package/lib/typescript/ui/primitives/Card.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Checkbox.d.ts +25 -0
- package/lib/typescript/ui/primitives/Checkbox.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/CountrySelect.d.ts +31 -0
- package/lib/typescript/ui/primitives/CountrySelect.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/DatePicker.d.ts +42 -0
- package/lib/typescript/ui/primitives/DatePicker.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Input.d.ts +17 -0
- package/lib/typescript/ui/primitives/Input.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Select.d.ts +26 -0
- package/lib/typescript/ui/primitives/Select.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/Spinner.d.ts +10 -0
- package/lib/typescript/ui/primitives/Spinner.d.ts.map +1 -0
- package/lib/typescript/ui/primitives/index.d.ts +10 -0
- package/lib/typescript/ui/primitives/index.d.ts.map +1 -0
- package/lib/typescript/ui/theme/ThemeProvider.d.ts +23 -0
- package/lib/typescript/ui/theme/ThemeProvider.d.ts.map +1 -0
- package/lib/typescript/ui/theme/index.d.ts +3 -0
- package/lib/typescript/ui/theme/index.d.ts.map +1 -0
- package/lib/typescript/ui/theme/tokens.d.ts +42 -0
- package/lib/typescript/ui/theme/tokens.d.ts.map +1 -0
- package/lib/typescript/utils/EventEmitter.d.ts +98 -0
- package/lib/typescript/utils/EventEmitter.d.ts.map +1 -0
- package/lib/typescript/utils/base64.d.ts +19 -0
- package/lib/typescript/utils/base64.d.ts.map +1 -0
- package/lib/typescript/utils/deviceFingerprint.d.ts +42 -0
- package/lib/typescript/utils/deviceFingerprint.d.ts.map +1 -0
- package/lib/typescript/utils/documentTypeOptions.d.ts +13 -0
- package/lib/typescript/utils/documentTypeOptions.d.ts.map +1 -0
- package/lib/typescript/utils/googleMapsPreflight.d.ts +44 -0
- package/lib/typescript/utils/googleMapsPreflight.d.ts.map +1 -0
- package/lib/typescript/utils/hmac.d.ts +39 -0
- package/lib/typescript/utils/hmac.d.ts.map +1 -0
- package/lib/typescript/utils/iso3166Countries.d.ts +27 -0
- package/lib/typescript/utils/iso3166Countries.d.ts.map +1 -0
- package/lib/typescript/utils/jpegFromUri.d.ts +29 -0
- package/lib/typescript/utils/jpegFromUri.d.ts.map +1 -0
- package/lib/typescript/utils/keepAwake.d.ts +16 -0
- package/lib/typescript/utils/keepAwake.d.ts.map +1 -0
- package/lib/typescript/utils/log.d.ts +18 -0
- package/lib/typescript/utils/log.d.ts.map +1 -0
- package/lib/typescript/utils/osGeocoder.d.ts +38 -0
- package/lib/typescript/utils/osGeocoder.d.ts.map +1 -0
- package/lib/typescript/utils/parseGoogleAddressComponents.d.ts +43 -0
- package/lib/typescript/utils/parseGoogleAddressComponents.d.ts.map +1 -0
- package/lib/typescript/utils/personNameNormalize.d.ts +10 -0
- package/lib/typescript/utils/personNameNormalize.d.ts.map +1 -0
- package/lib/typescript/utils/sdkError.d.ts +14 -0
- package/lib/typescript/utils/sdkError.d.ts.map +1 -0
- package/lib/typescript/utils/sdkVersion.d.ts +7 -0
- package/lib/typescript/utils/sdkVersion.d.ts.map +1 -0
- package/lib/typescript/utils/stepConfig.d.ts +8 -0
- package/lib/typescript/utils/stepConfig.d.ts.map +1 -0
- package/lib/typescript/utils/taxInfoConfig.d.ts +7 -0
- package/lib/typescript/utils/taxInfoConfig.d.ts.map +1 -0
- package/package.json +99 -0
- package/src/camera/AddressSearchBar.tsx +363 -0
- package/src/camera/DocumentCapture.tsx +505 -0
- package/src/camera/LivenessCamera.tsx +602 -0
- package/src/camera/MapAddressPicker.tsx +397 -0
- package/src/core/VelionOnboarding.ts +974 -0
- package/src/core/sessionDeclinedCopy.ts +76 -0
- package/src/core/sessionStateMapper.ts +167 -0
- package/src/core/sseReasonMessages.ts +531 -0
- package/src/data/iso3166Alpha2Codes.json +1 -0
- package/src/data/iso3166CountryNames.json +251 -0
- package/src/i18n/index.ts +26 -0
- package/src/i18n/strings/en.ts +289 -0
- package/src/i18n/strings/es.ts +291 -0
- package/src/index.ts +137 -0
- package/src/steps/AddressInfoStep.tsx +726 -0
- package/src/steps/DocumentsOcrStep.tsx +472 -0
- package/src/steps/EmailContactStep.tsx +159 -0
- package/src/steps/EmailOtpStep.tsx +250 -0
- package/src/steps/FaceMatchStep.tsx +177 -0
- package/src/steps/FingerprintStep.tsx +99 -0
- package/src/steps/HumanBasicInfoStep.tsx +274 -0
- package/src/steps/HumanExtendedInfoStep.tsx +353 -0
- package/src/steps/LegalBasicInfoStep.tsx +205 -0
- package/src/steps/LegalExtendedInfoStep.tsx +171 -0
- package/src/steps/LivenessMatchStep.tsx +846 -0
- package/src/steps/PhoneContactStep.tsx +160 -0
- package/src/steps/PhoneOtpStep.tsx +249 -0
- package/src/steps/SwornDeclarationStep.tsx +220 -0
- package/src/steps/TaxInfoStep.tsx +277 -0
- package/src/steps/TermsAndConditionsStep.tsx +261 -0
- package/src/steps/_shared.ts +44 -0
- package/src/steps/types.ts +72 -0
- package/src/transport/api.ts +257 -0
- package/src/transport/irisWebSocket.ts +186 -0
- package/src/transport/secureUrl.ts +47 -0
- package/src/transport/sse.ts +310 -0
- package/src/types/index.ts +1198 -0
- package/src/ui/MapFallbackBoundary.tsx +46 -0
- package/src/ui/StepShell.tsx +137 -0
- package/src/ui/VelionOnboardingScreen.tsx +223 -0
- package/src/ui/forms/index.ts +12 -0
- package/src/ui/forms/useInlineValidation.ts +115 -0
- package/src/ui/forms/validators.ts +29 -0
- package/src/ui/icons/HomeHeartIcon.tsx +34 -0
- package/src/ui/icons/StepIcon.tsx +77 -0
- package/src/ui/overlays/AnalyzingOverlay.tsx +323 -0
- package/src/ui/overlays/LoadingOverlay.tsx +115 -0
- package/src/ui/overlays/ProgressBar.tsx +99 -0
- package/src/ui/overlays/RetryDialog.tsx +128 -0
- package/src/ui/overlays/index.ts +3 -0
- package/src/ui/primitives/Banner.tsx +81 -0
- package/src/ui/primitives/Button.tsx +164 -0
- package/src/ui/primitives/Card.tsx +55 -0
- package/src/ui/primitives/Checkbox.tsx +153 -0
- package/src/ui/primitives/CountrySelect.tsx +356 -0
- package/src/ui/primitives/DatePicker.tsx +266 -0
- package/src/ui/primitives/Input.tsx +110 -0
- package/src/ui/primitives/Select.tsx +259 -0
- package/src/ui/primitives/Spinner.tsx +17 -0
- package/src/ui/primitives/index.ts +9 -0
- package/src/ui/theme/ThemeProvider.tsx +102 -0
- package/src/ui/theme/index.ts +17 -0
- package/src/ui/theme/tokens.ts +159 -0
- package/src/utils/EventEmitter.ts +155 -0
- package/src/utils/base64.ts +44 -0
- package/src/utils/deviceFingerprint.ts +184 -0
- package/src/utils/documentTypeOptions.ts +31 -0
- package/src/utils/googleMapsPreflight.ts +72 -0
- package/src/utils/hmac.ts +61 -0
- package/src/utils/iso3166Countries.ts +111 -0
- package/src/utils/jpegFromUri.ts +42 -0
- package/src/utils/keepAwake.ts +62 -0
- package/src/utils/log.ts +37 -0
- package/src/utils/osGeocoder.ts +75 -0
- package/src/utils/parseGoogleAddressComponents.ts +123 -0
- package/src/utils/personNameNormalize.ts +17 -0
- package/src/utils/sdkError.ts +40 -0
- package/src/utils/sdkVersion.ts +6 -0
- package/src/utils/stepConfig.ts +75 -0
- package/src/utils/taxInfoConfig.ts +14 -0
|
@@ -0,0 +1,323 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full-screen overlay shown after the last liveness challenge completes,
|
|
3
|
+
* while the SDK waits for SESSION_COMPLETE + /liveness-verify to resolve.
|
|
4
|
+
*
|
|
5
|
+
* Without this the camera would freeze on the last challenge's headline
|
|
6
|
+
* for several seconds while the worker drains its queue, which felt
|
|
7
|
+
* stuck. The animation here gives the user a clear "we're working on it"
|
|
8
|
+
* signal — three concentric rings pulse out from a central face/scan
|
|
9
|
+
* icon and a small dot loop trails the headline.
|
|
10
|
+
*
|
|
11
|
+
* Pure JS animations via `Animated` + react-native-svg. No Lottie / no
|
|
12
|
+
* native dependency beyond what the SDK already needs.
|
|
13
|
+
*/
|
|
14
|
+
|
|
15
|
+
import { useEffect, useMemo } from 'react';
|
|
16
|
+
import {
|
|
17
|
+
Animated,
|
|
18
|
+
Easing,
|
|
19
|
+
StyleSheet,
|
|
20
|
+
Text,
|
|
21
|
+
useWindowDimensions,
|
|
22
|
+
View,
|
|
23
|
+
} from 'react-native';
|
|
24
|
+
import Svg, { Circle, Path } from 'react-native-svg';
|
|
25
|
+
|
|
26
|
+
import { useTheme, withAlpha } from '../theme';
|
|
27
|
+
|
|
28
|
+
export interface AnalyzingOverlayProps {
|
|
29
|
+
/** Main headline shown under the animation (e.g. "Analyzing your video"). */
|
|
30
|
+
headline: string;
|
|
31
|
+
/**
|
|
32
|
+
* Optional second-line caption (e.g. "Hang tight, this only takes a
|
|
33
|
+
* moment"). Pass `null` to omit.
|
|
34
|
+
*/
|
|
35
|
+
caption?: string | null;
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
const RING_COUNT = 3;
|
|
39
|
+
const RING_DURATION_MS = 1800;
|
|
40
|
+
const DOT_DURATION_MS = 1200;
|
|
41
|
+
|
|
42
|
+
export function AnalyzingOverlay({ headline, caption }: AnalyzingOverlayProps) {
|
|
43
|
+
const theme = useTheme();
|
|
44
|
+
const { width: screenW, height: screenH } = useWindowDimensions();
|
|
45
|
+
const ringSize = Math.min(screenW * 0.55, 260);
|
|
46
|
+
const iconSize = ringSize * 0.36;
|
|
47
|
+
|
|
48
|
+
// One Animated.Value per ring, started staggered so the pulses don't all
|
|
49
|
+
// line up. `useNativeDriver: true` keeps the animation on the UI thread
|
|
50
|
+
// even when JS is busy decoding frames / posting verify.
|
|
51
|
+
const ringAnims = useMemo(
|
|
52
|
+
() => Array.from({ length: RING_COUNT }, () => new Animated.Value(0)),
|
|
53
|
+
[],
|
|
54
|
+
);
|
|
55
|
+
|
|
56
|
+
useEffect(() => {
|
|
57
|
+
const loops = ringAnims.map((value, index) => {
|
|
58
|
+
const loop = Animated.loop(
|
|
59
|
+
Animated.sequence([
|
|
60
|
+
Animated.delay((RING_DURATION_MS / RING_COUNT) * index),
|
|
61
|
+
Animated.timing(value, {
|
|
62
|
+
toValue: 1,
|
|
63
|
+
duration: RING_DURATION_MS,
|
|
64
|
+
easing: Easing.out(Easing.cubic),
|
|
65
|
+
useNativeDriver: true,
|
|
66
|
+
}),
|
|
67
|
+
Animated.timing(value, {
|
|
68
|
+
toValue: 0,
|
|
69
|
+
duration: 0,
|
|
70
|
+
useNativeDriver: true,
|
|
71
|
+
}),
|
|
72
|
+
]),
|
|
73
|
+
);
|
|
74
|
+
loop.start();
|
|
75
|
+
return loop;
|
|
76
|
+
});
|
|
77
|
+
return () => loops.forEach((l) => l.stop());
|
|
78
|
+
}, [ringAnims]);
|
|
79
|
+
|
|
80
|
+
// Three trailing dots cycling under the headline.
|
|
81
|
+
const dotAnims = useMemo(
|
|
82
|
+
() => Array.from({ length: 3 }, () => new Animated.Value(0)),
|
|
83
|
+
[],
|
|
84
|
+
);
|
|
85
|
+
useEffect(() => {
|
|
86
|
+
const loops = dotAnims.map((value, index) => {
|
|
87
|
+
const loop = Animated.loop(
|
|
88
|
+
Animated.sequence([
|
|
89
|
+
Animated.delay((DOT_DURATION_MS / 3) * index),
|
|
90
|
+
Animated.timing(value, {
|
|
91
|
+
toValue: 1,
|
|
92
|
+
duration: DOT_DURATION_MS / 2,
|
|
93
|
+
easing: Easing.out(Easing.quad),
|
|
94
|
+
useNativeDriver: true,
|
|
95
|
+
}),
|
|
96
|
+
Animated.timing(value, {
|
|
97
|
+
toValue: 0,
|
|
98
|
+
duration: DOT_DURATION_MS / 2,
|
|
99
|
+
easing: Easing.in(Easing.quad),
|
|
100
|
+
useNativeDriver: true,
|
|
101
|
+
}),
|
|
102
|
+
]),
|
|
103
|
+
);
|
|
104
|
+
loop.start();
|
|
105
|
+
return loop;
|
|
106
|
+
});
|
|
107
|
+
return () => loops.forEach((l) => l.stop());
|
|
108
|
+
}, [dotAnims]);
|
|
109
|
+
|
|
110
|
+
return (
|
|
111
|
+
<View
|
|
112
|
+
style={[
|
|
113
|
+
styles.root,
|
|
114
|
+
{ backgroundColor: theme.backgroundColor, minHeight: screenH },
|
|
115
|
+
]}
|
|
116
|
+
accessible
|
|
117
|
+
accessibilityRole="alert"
|
|
118
|
+
accessibilityLiveRegion="polite"
|
|
119
|
+
accessibilityLabel={headline}
|
|
120
|
+
>
|
|
121
|
+
<View
|
|
122
|
+
style={[styles.stage, { width: ringSize, height: ringSize }]}
|
|
123
|
+
pointerEvents="none"
|
|
124
|
+
>
|
|
125
|
+
{ringAnims.map((value, i) => (
|
|
126
|
+
<Animated.View
|
|
127
|
+
key={i}
|
|
128
|
+
style={[
|
|
129
|
+
styles.ring,
|
|
130
|
+
{
|
|
131
|
+
width: ringSize,
|
|
132
|
+
height: ringSize,
|
|
133
|
+
borderRadius: ringSize / 2,
|
|
134
|
+
borderColor: theme.primaryColor,
|
|
135
|
+
transform: [
|
|
136
|
+
{
|
|
137
|
+
scale: value.interpolate({
|
|
138
|
+
inputRange: [0, 1],
|
|
139
|
+
outputRange: [0.55, 1],
|
|
140
|
+
}),
|
|
141
|
+
},
|
|
142
|
+
],
|
|
143
|
+
opacity: value.interpolate({
|
|
144
|
+
inputRange: [0, 0.15, 1],
|
|
145
|
+
outputRange: [0, 0.55, 0],
|
|
146
|
+
}),
|
|
147
|
+
},
|
|
148
|
+
]}
|
|
149
|
+
/>
|
|
150
|
+
))}
|
|
151
|
+
<View
|
|
152
|
+
style={[
|
|
153
|
+
styles.iconBubble,
|
|
154
|
+
{
|
|
155
|
+
width: iconSize * 1.55,
|
|
156
|
+
height: iconSize * 1.55,
|
|
157
|
+
borderRadius: (iconSize * 1.55) / 2,
|
|
158
|
+
backgroundColor: withAlpha(theme.primaryColor, 0.12),
|
|
159
|
+
},
|
|
160
|
+
]}
|
|
161
|
+
>
|
|
162
|
+
<FaceScanIcon size={iconSize} color={theme.primaryColor} />
|
|
163
|
+
</View>
|
|
164
|
+
</View>
|
|
165
|
+
|
|
166
|
+
<View style={styles.copy}>
|
|
167
|
+
<View style={styles.headlineRow}>
|
|
168
|
+
<Text
|
|
169
|
+
style={[styles.headline, { color: theme.textColor }]}
|
|
170
|
+
numberOfLines={2}
|
|
171
|
+
>
|
|
172
|
+
{headline}
|
|
173
|
+
</Text>
|
|
174
|
+
<View style={styles.dots}>
|
|
175
|
+
{dotAnims.map((value, i) => (
|
|
176
|
+
<Animated.View
|
|
177
|
+
key={i}
|
|
178
|
+
style={[
|
|
179
|
+
styles.dot,
|
|
180
|
+
{
|
|
181
|
+
backgroundColor: theme.textColor,
|
|
182
|
+
opacity: value.interpolate({
|
|
183
|
+
inputRange: [0, 1],
|
|
184
|
+
outputRange: [0.2, 1],
|
|
185
|
+
}),
|
|
186
|
+
transform: [
|
|
187
|
+
{
|
|
188
|
+
translateY: value.interpolate({
|
|
189
|
+
inputRange: [0, 1],
|
|
190
|
+
outputRange: [0, -3],
|
|
191
|
+
}),
|
|
192
|
+
},
|
|
193
|
+
],
|
|
194
|
+
},
|
|
195
|
+
]}
|
|
196
|
+
/>
|
|
197
|
+
))}
|
|
198
|
+
</View>
|
|
199
|
+
</View>
|
|
200
|
+
{caption ? (
|
|
201
|
+
<Text
|
|
202
|
+
style={[styles.caption, { color: theme.textSecondaryColor }]}
|
|
203
|
+
numberOfLines={3}
|
|
204
|
+
>
|
|
205
|
+
{caption}
|
|
206
|
+
</Text>
|
|
207
|
+
) : null}
|
|
208
|
+
</View>
|
|
209
|
+
</View>
|
|
210
|
+
);
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
/**
|
|
214
|
+
* Schematic face inside a viewfinder bracket. Reads as "we're scanning
|
|
215
|
+
* the captured face" without depending on @expo/vector-icons (which is
|
|
216
|
+
* optional in the SDK's dependency tree).
|
|
217
|
+
*/
|
|
218
|
+
function FaceScanIcon({ size, color }: { size: number; color: string }) {
|
|
219
|
+
return (
|
|
220
|
+
<Svg width={size} height={size} viewBox="0 0 48 48">
|
|
221
|
+
{/* Viewfinder corner brackets */}
|
|
222
|
+
<Path
|
|
223
|
+
d="M6 14 V8 H14"
|
|
224
|
+
stroke={color}
|
|
225
|
+
strokeWidth={2.5}
|
|
226
|
+
strokeLinecap="round"
|
|
227
|
+
fill="none"
|
|
228
|
+
/>
|
|
229
|
+
<Path
|
|
230
|
+
d="M42 14 V8 H34"
|
|
231
|
+
stroke={color}
|
|
232
|
+
strokeWidth={2.5}
|
|
233
|
+
strokeLinecap="round"
|
|
234
|
+
fill="none"
|
|
235
|
+
/>
|
|
236
|
+
<Path
|
|
237
|
+
d="M6 34 V40 H14"
|
|
238
|
+
stroke={color}
|
|
239
|
+
strokeWidth={2.5}
|
|
240
|
+
strokeLinecap="round"
|
|
241
|
+
fill="none"
|
|
242
|
+
/>
|
|
243
|
+
<Path
|
|
244
|
+
d="M42 34 V40 H34"
|
|
245
|
+
stroke={color}
|
|
246
|
+
strokeWidth={2.5}
|
|
247
|
+
strokeLinecap="round"
|
|
248
|
+
fill="none"
|
|
249
|
+
/>
|
|
250
|
+
{/* Face oval */}
|
|
251
|
+
<Path
|
|
252
|
+
d="M24 16 C 30 16 33 20 33 26 C 33 31 29 35 24 35 C 19 35 15 31 15 26 C 15 20 18 16 24 16 Z"
|
|
253
|
+
stroke={color}
|
|
254
|
+
strokeWidth={2}
|
|
255
|
+
fill="none"
|
|
256
|
+
/>
|
|
257
|
+
{/* Eyes */}
|
|
258
|
+
<Circle cx={20} cy={24} r={1.4} fill={color} />
|
|
259
|
+
<Circle cx={28} cy={24} r={1.4} fill={color} />
|
|
260
|
+
{/* Smile */}
|
|
261
|
+
<Path
|
|
262
|
+
d="M20 29 C 22 31 26 31 28 29"
|
|
263
|
+
stroke={color}
|
|
264
|
+
strokeWidth={1.8}
|
|
265
|
+
strokeLinecap="round"
|
|
266
|
+
fill="none"
|
|
267
|
+
/>
|
|
268
|
+
</Svg>
|
|
269
|
+
);
|
|
270
|
+
}
|
|
271
|
+
|
|
272
|
+
const styles = StyleSheet.create({
|
|
273
|
+
root: {
|
|
274
|
+
flex: 1,
|
|
275
|
+
alignItems: 'center',
|
|
276
|
+
justifyContent: 'center',
|
|
277
|
+
paddingHorizontal: 32,
|
|
278
|
+
gap: 32,
|
|
279
|
+
},
|
|
280
|
+
stage: {
|
|
281
|
+
alignItems: 'center',
|
|
282
|
+
justifyContent: 'center',
|
|
283
|
+
position: 'relative',
|
|
284
|
+
},
|
|
285
|
+
ring: {
|
|
286
|
+
position: 'absolute',
|
|
287
|
+
borderWidth: 2,
|
|
288
|
+
},
|
|
289
|
+
iconBubble: {
|
|
290
|
+
alignItems: 'center',
|
|
291
|
+
justifyContent: 'center',
|
|
292
|
+
},
|
|
293
|
+
copy: {
|
|
294
|
+
alignItems: 'center',
|
|
295
|
+
gap: 8,
|
|
296
|
+
maxWidth: 360,
|
|
297
|
+
},
|
|
298
|
+
headlineRow: {
|
|
299
|
+
flexDirection: 'row',
|
|
300
|
+
alignItems: 'flex-end',
|
|
301
|
+
gap: 6,
|
|
302
|
+
},
|
|
303
|
+
headline: {
|
|
304
|
+
fontSize: 18,
|
|
305
|
+
fontWeight: '600',
|
|
306
|
+
textAlign: 'center',
|
|
307
|
+
},
|
|
308
|
+
dots: {
|
|
309
|
+
flexDirection: 'row',
|
|
310
|
+
gap: 3,
|
|
311
|
+
paddingBottom: 6,
|
|
312
|
+
},
|
|
313
|
+
dot: {
|
|
314
|
+
width: 4,
|
|
315
|
+
height: 4,
|
|
316
|
+
borderRadius: 2,
|
|
317
|
+
},
|
|
318
|
+
caption: {
|
|
319
|
+
fontSize: 14,
|
|
320
|
+
textAlign: 'center',
|
|
321
|
+
lineHeight: 20,
|
|
322
|
+
},
|
|
323
|
+
});
|
|
@@ -0,0 +1,115 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Full-bleed loading overlay.
|
|
3
|
+
*
|
|
4
|
+
* Visual rules (per UI/UX Pro Max guidance):
|
|
5
|
+
* - Solid surface, no halo / radial gradient that "ghosts" the underlying
|
|
6
|
+
* UI. Surfaces must read as a clean replacement, not a translucent veil.
|
|
7
|
+
* - Spinner is a thin ring with one tinted segment that rotates — the
|
|
8
|
+
* classic indeterminate progress affordance. Single visual element on
|
|
9
|
+
* screen, motion expresses ongoing work (animation §motion-meaning).
|
|
10
|
+
* - Honors `useReducedMotion()` (animation §reduced-motion). When motion
|
|
11
|
+
* is reduced, the ring stays static and the message stays visible.
|
|
12
|
+
* - Token-driven colors only — primary for the active segment, border
|
|
13
|
+
* color for the track. No raw hex inside the component.
|
|
14
|
+
*/
|
|
15
|
+
|
|
16
|
+
import { useEffect, useRef } from 'react';
|
|
17
|
+
import { Animated, Easing, StyleSheet, Text, View } from 'react-native';
|
|
18
|
+
import { useReducedMotion, useTheme } from '../theme';
|
|
19
|
+
|
|
20
|
+
export interface LoadingOverlayProps {
|
|
21
|
+
message?: string | null;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
const RING_SIZE = 56;
|
|
25
|
+
const RING_THICKNESS = 4;
|
|
26
|
+
|
|
27
|
+
export function LoadingOverlay({ message }: LoadingOverlayProps) {
|
|
28
|
+
const theme = useTheme();
|
|
29
|
+
const reduceMotion = useReducedMotion();
|
|
30
|
+
const trimmed = (message ?? '').trim();
|
|
31
|
+
const isAnimationOnly = trimmed.length === 0;
|
|
32
|
+
|
|
33
|
+
const rotation = useRef(new Animated.Value(0)).current;
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
if (reduceMotion) {
|
|
37
|
+
rotation.setValue(0);
|
|
38
|
+
return;
|
|
39
|
+
}
|
|
40
|
+
const loop = Animated.loop(
|
|
41
|
+
Animated.timing(rotation, {
|
|
42
|
+
toValue: 1,
|
|
43
|
+
duration: 900,
|
|
44
|
+
easing: Easing.linear,
|
|
45
|
+
useNativeDriver: true,
|
|
46
|
+
}),
|
|
47
|
+
);
|
|
48
|
+
loop.start();
|
|
49
|
+
return () => loop.stop();
|
|
50
|
+
}, [reduceMotion, rotation]);
|
|
51
|
+
|
|
52
|
+
const spin = rotation.interpolate({
|
|
53
|
+
inputRange: [0, 1],
|
|
54
|
+
outputRange: ['0deg', '360deg'],
|
|
55
|
+
});
|
|
56
|
+
|
|
57
|
+
return (
|
|
58
|
+
<View
|
|
59
|
+
accessibilityRole="progressbar"
|
|
60
|
+
accessibilityLiveRegion="polite"
|
|
61
|
+
accessibilityLabel={isAnimationOnly ? 'Loading' : trimmed}
|
|
62
|
+
style={[
|
|
63
|
+
styles.root,
|
|
64
|
+
{ backgroundColor: theme.backgroundColor },
|
|
65
|
+
]}
|
|
66
|
+
pointerEvents="auto"
|
|
67
|
+
>
|
|
68
|
+
<View style={styles.content}>
|
|
69
|
+
<Animated.View
|
|
70
|
+
style={[
|
|
71
|
+
styles.ring,
|
|
72
|
+
{
|
|
73
|
+
borderColor: theme.borderColor,
|
|
74
|
+
borderTopColor: theme.primaryColor,
|
|
75
|
+
transform: [{ rotate: spin }],
|
|
76
|
+
},
|
|
77
|
+
]}
|
|
78
|
+
/>
|
|
79
|
+
{!isAnimationOnly ? (
|
|
80
|
+
<Text style={[styles.text, { color: theme.textColor }]}>
|
|
81
|
+
{trimmed}
|
|
82
|
+
</Text>
|
|
83
|
+
) : null}
|
|
84
|
+
</View>
|
|
85
|
+
</View>
|
|
86
|
+
);
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
const styles = StyleSheet.create({
|
|
90
|
+
root: {
|
|
91
|
+
...StyleSheet.absoluteFillObject,
|
|
92
|
+
alignItems: 'center',
|
|
93
|
+
justifyContent: 'center',
|
|
94
|
+
paddingHorizontal: 32,
|
|
95
|
+
zIndex: 1000,
|
|
96
|
+
},
|
|
97
|
+
content: {
|
|
98
|
+
alignItems: 'center',
|
|
99
|
+
justifyContent: 'center',
|
|
100
|
+
},
|
|
101
|
+
ring: {
|
|
102
|
+
width: RING_SIZE,
|
|
103
|
+
height: RING_SIZE,
|
|
104
|
+
borderRadius: RING_SIZE / 2,
|
|
105
|
+
borderWidth: RING_THICKNESS,
|
|
106
|
+
},
|
|
107
|
+
text: {
|
|
108
|
+
fontSize: 15,
|
|
109
|
+
fontWeight: '500',
|
|
110
|
+
textAlign: 'center',
|
|
111
|
+
maxWidth: 320,
|
|
112
|
+
lineHeight: 22,
|
|
113
|
+
marginTop: 18,
|
|
114
|
+
},
|
|
115
|
+
});
|
|
@@ -0,0 +1,99 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Top-of-screen progress bar. Trickling model:
|
|
3
|
+
* - `tick()` advances 12% per step, soft-cap at 90%.
|
|
4
|
+
* - `complete()` jumps to 100% and fades out.
|
|
5
|
+
*
|
|
6
|
+
* Animated with `Animated.timing` (driver: native) so we don't pull in
|
|
7
|
+
* Reanimated yet; respects `useReducedMotion()`.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { useEffect, useRef } from 'react';
|
|
11
|
+
import { Animated, StyleSheet } from 'react-native';
|
|
12
|
+
import { mixHex, useReducedMotion, useTheme } from '../theme';
|
|
13
|
+
|
|
14
|
+
export interface ProgressBarProps {
|
|
15
|
+
/** 0–100. Components compute the trickling logic externally and pass it in. */
|
|
16
|
+
value: number;
|
|
17
|
+
/** When true, the bar fades out (used after `complete()`). */
|
|
18
|
+
hidden?: boolean;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
export function ProgressBar({ value, hidden = false }: ProgressBarProps) {
|
|
22
|
+
const theme = useTheme();
|
|
23
|
+
const reduceMotion = useReducedMotion();
|
|
24
|
+
const widthAnim = useRef(new Animated.Value(value)).current;
|
|
25
|
+
const opacityAnim = useRef(new Animated.Value(hidden ? 0 : 1)).current;
|
|
26
|
+
|
|
27
|
+
useEffect(() => {
|
|
28
|
+
Animated.timing(widthAnim, {
|
|
29
|
+
toValue: value,
|
|
30
|
+
duration: reduceMotion ? 0 : 360,
|
|
31
|
+
useNativeDriver: false,
|
|
32
|
+
}).start();
|
|
33
|
+
}, [value, reduceMotion, widthAnim]);
|
|
34
|
+
|
|
35
|
+
useEffect(() => {
|
|
36
|
+
Animated.timing(opacityAnim, {
|
|
37
|
+
toValue: hidden ? 0 : 1,
|
|
38
|
+
duration: reduceMotion ? 0 : 240,
|
|
39
|
+
useNativeDriver: true,
|
|
40
|
+
}).start();
|
|
41
|
+
}, [hidden, reduceMotion, opacityAnim]);
|
|
42
|
+
|
|
43
|
+
const trackColor = mixHex(theme.borderColor, theme.backgroundColor, 50);
|
|
44
|
+
|
|
45
|
+
return (
|
|
46
|
+
<Animated.View
|
|
47
|
+
accessibilityRole="progressbar"
|
|
48
|
+
accessibilityValue={{ now: Math.round(value), min: 0, max: 100 }}
|
|
49
|
+
style={[
|
|
50
|
+
styles.track,
|
|
51
|
+
{ backgroundColor: trackColor, opacity: opacityAnim },
|
|
52
|
+
]}
|
|
53
|
+
>
|
|
54
|
+
<Animated.View
|
|
55
|
+
style={[
|
|
56
|
+
styles.bar,
|
|
57
|
+
{
|
|
58
|
+
backgroundColor: theme.primaryColor,
|
|
59
|
+
width: widthAnim.interpolate({
|
|
60
|
+
inputRange: [0, 100],
|
|
61
|
+
outputRange: ['0%', '100%'],
|
|
62
|
+
}),
|
|
63
|
+
},
|
|
64
|
+
]}
|
|
65
|
+
/>
|
|
66
|
+
</Animated.View>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
|
|
70
|
+
const STEP_INCREMENT_PCT = 12;
|
|
71
|
+
const SOFT_CAP_PCT = 90;
|
|
72
|
+
|
|
73
|
+
/**
|
|
74
|
+
* Helper that encapsulates the trickling logic. Exposed so step modules /
|
|
75
|
+
* the orchestrator hold the value in plain state and pass it down to
|
|
76
|
+
* `<ProgressBar value={...} />`.
|
|
77
|
+
*/
|
|
78
|
+
export const PROGRESS_BAR = {
|
|
79
|
+
tick(current: number): number {
|
|
80
|
+
return Math.min(SOFT_CAP_PCT, current + STEP_INCREMENT_PCT);
|
|
81
|
+
},
|
|
82
|
+
complete(): number {
|
|
83
|
+
return 100;
|
|
84
|
+
},
|
|
85
|
+
reset(): number {
|
|
86
|
+
return 0;
|
|
87
|
+
},
|
|
88
|
+
};
|
|
89
|
+
|
|
90
|
+
const styles = StyleSheet.create({
|
|
91
|
+
track: {
|
|
92
|
+
height: 4,
|
|
93
|
+
width: '100%',
|
|
94
|
+
overflow: 'hidden',
|
|
95
|
+
},
|
|
96
|
+
bar: {
|
|
97
|
+
height: '100%',
|
|
98
|
+
},
|
|
99
|
+
});
|
|
@@ -0,0 +1,128 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* In-flow recoverable error dialog. Solid backdrop (no transparency), warning
|
|
3
|
+
* accent, "Try again / Cancel" buttons, primary focus on retry.
|
|
4
|
+
*
|
|
5
|
+
* Used by every step module's POST catch handler — gives the user a chance to
|
|
6
|
+
* recover without losing their inputs.
|
|
7
|
+
*/
|
|
8
|
+
|
|
9
|
+
import { StyleSheet, Text, View } from 'react-native';
|
|
10
|
+
import { Button } from '../primitives/Button';
|
|
11
|
+
import { mixHex, useTheme, withAlpha } from '../theme';
|
|
12
|
+
|
|
13
|
+
export interface RetryDialogProps {
|
|
14
|
+
title: string;
|
|
15
|
+
message: string;
|
|
16
|
+
retryLabel: string;
|
|
17
|
+
cancelLabel: string;
|
|
18
|
+
onRetry: () => void;
|
|
19
|
+
onCancel: () => void;
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function RetryDialog({
|
|
23
|
+
title,
|
|
24
|
+
message,
|
|
25
|
+
retryLabel,
|
|
26
|
+
cancelLabel,
|
|
27
|
+
onRetry,
|
|
28
|
+
onCancel,
|
|
29
|
+
}: RetryDialogProps) {
|
|
30
|
+
const theme = useTheme();
|
|
31
|
+
|
|
32
|
+
return (
|
|
33
|
+
<View
|
|
34
|
+
accessibilityViewIsModal
|
|
35
|
+
accessibilityRole="alert"
|
|
36
|
+
accessibilityLiveRegion="assertive"
|
|
37
|
+
style={[
|
|
38
|
+
styles.root,
|
|
39
|
+
{ backgroundColor: theme.backgroundColor },
|
|
40
|
+
]}
|
|
41
|
+
>
|
|
42
|
+
<View style={styles.card}>
|
|
43
|
+
<View
|
|
44
|
+
style={[
|
|
45
|
+
styles.iconWrap,
|
|
46
|
+
{
|
|
47
|
+
backgroundColor: mixHex(theme.warningColor, theme.backgroundColor, 16),
|
|
48
|
+
borderColor: withAlpha(theme.warningColor, 0.35),
|
|
49
|
+
},
|
|
50
|
+
]}
|
|
51
|
+
>
|
|
52
|
+
<Text style={[styles.iconText, { color: theme.warningColor }]}>!</Text>
|
|
53
|
+
</View>
|
|
54
|
+
<Text style={[styles.title, { color: theme.textColor }]}>{title}</Text>
|
|
55
|
+
<Text
|
|
56
|
+
style={[styles.body, { color: theme.textSecondaryColor }]}
|
|
57
|
+
numberOfLines={6}
|
|
58
|
+
>
|
|
59
|
+
{message}
|
|
60
|
+
</Text>
|
|
61
|
+
<View style={styles.actions}>
|
|
62
|
+
<Button
|
|
63
|
+
variant="ghost"
|
|
64
|
+
label={cancelLabel}
|
|
65
|
+
onPress={onCancel}
|
|
66
|
+
fullWidth={false}
|
|
67
|
+
style={styles.btn}
|
|
68
|
+
/>
|
|
69
|
+
<Button
|
|
70
|
+
variant="primary"
|
|
71
|
+
label={retryLabel}
|
|
72
|
+
onPress={onRetry}
|
|
73
|
+
fullWidth={false}
|
|
74
|
+
style={styles.btn}
|
|
75
|
+
/>
|
|
76
|
+
</View>
|
|
77
|
+
</View>
|
|
78
|
+
</View>
|
|
79
|
+
);
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
const styles = StyleSheet.create({
|
|
83
|
+
root: {
|
|
84
|
+
...StyleSheet.absoluteFillObject,
|
|
85
|
+
alignItems: 'center',
|
|
86
|
+
justifyContent: 'center',
|
|
87
|
+
padding: 24,
|
|
88
|
+
zIndex: 1100,
|
|
89
|
+
},
|
|
90
|
+
card: {
|
|
91
|
+
width: '100%',
|
|
92
|
+
maxWidth: 420,
|
|
93
|
+
alignItems: 'center',
|
|
94
|
+
gap: 14,
|
|
95
|
+
},
|
|
96
|
+
iconWrap: {
|
|
97
|
+
width: 64,
|
|
98
|
+
height: 64,
|
|
99
|
+
borderRadius: 32,
|
|
100
|
+
alignItems: 'center',
|
|
101
|
+
justifyContent: 'center',
|
|
102
|
+
borderWidth: 1,
|
|
103
|
+
},
|
|
104
|
+
iconText: {
|
|
105
|
+
fontSize: 28,
|
|
106
|
+
fontWeight: '800',
|
|
107
|
+
lineHeight: 32,
|
|
108
|
+
},
|
|
109
|
+
title: {
|
|
110
|
+
fontSize: 17,
|
|
111
|
+
fontWeight: '700',
|
|
112
|
+
textAlign: 'center',
|
|
113
|
+
},
|
|
114
|
+
body: {
|
|
115
|
+
fontSize: 14,
|
|
116
|
+
lineHeight: 20,
|
|
117
|
+
textAlign: 'center',
|
|
118
|
+
},
|
|
119
|
+
actions: {
|
|
120
|
+
flexDirection: 'row',
|
|
121
|
+
gap: 10,
|
|
122
|
+
marginTop: 6,
|
|
123
|
+
alignSelf: 'stretch',
|
|
124
|
+
},
|
|
125
|
+
btn: {
|
|
126
|
+
flex: 1,
|
|
127
|
+
},
|
|
128
|
+
});
|