@sanctum-key/react-native-sdk 1.0.6 → 1.0.8
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/README.md +3 -3
- package/android/build/.transforms/{f62cb96b2d1f78ca96ab35932dd530dc → c9d62bb333688ab562f51958998d5a48}/transformed/classes/classes_dex/classes.dex +0 -0
- package/android/build/generated/source/buildConfig/debug/kyc/{transfergratis → SanctumKey}/com/BuildConfig.java +2 -2
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/AndroidManifest.xml +1 -1
- package/android/build/intermediates/aapt_friendly_merged_manifests/debug/processDebugManifest/aapt/output-metadata.json +1 -1
- package/android/build/intermediates/compile_library_classes_jar/debug/bundleLibCompileToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/compile_r_class_jar/debug/generateDebugRFile/R.jar +0 -0
- package/android/build/intermediates/incremental/debug/packageDebugResources/compile-file-map.properties +2 -2
- package/android/build/intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/SanctumKey/com/BuildConfig.class +0 -0
- package/android/build/intermediates/manifest_merge_blame_file/debug/processDebugManifest/manifest-merger-blame-debug-report.txt +1 -1
- package/android/build/intermediates/merged_manifest/debug/processDebugManifest/AndroidManifest.xml +1 -1
- package/android/build/intermediates/runtime_library_classes_jar/debug/bundleLibRuntimeToJarDebug/classes.jar +0 -0
- package/android/build/intermediates/symbol_list_with_package_name/debug/generateDebugRFile/package-aware-r.txt +1 -1
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/inputs/source-to-output.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-attributes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/class-fq-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/internal-name-to-source.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/proto.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/source-to-classes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/subtypes.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/jvm/kotlin/supertypes.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.keystream.len +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab.values.at +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/caches-jvm/lookups/lookups.tab_i +0 -0
- package/android/build/kotlin/compileDebugKotlin/cacheable/last-build.bin +0 -0
- package/android/build/kotlin/compileDebugKotlin/local-state/build-history.bin +0 -0
- package/android/build/outputs/logs/manifest-merger-debug-report.txt +1 -1
- package/android/build/tmp/compileDebugJavaWithJavac/previous-compilation-data.bin +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$1$5$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$1$5$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$1.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$2.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$3.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$4.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$5.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunction$6.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$1.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$2.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$3.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$AsyncFunctionWithPromise$4.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$1.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class → SanctumKey/com/SanctumKeySdkModule$definition$lambda$5$lambda$4$$inlined$Prop$2.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkModule.class → SanctumKey/com/SanctumKeySdkModule.class} +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/{transfergratis/com/TransfergratisSdkView.class → SanctumKey/com/SanctumKeySdkView.class} +0 -0
- package/android/build.gradle +2 -2
- package/android/src/main/AndroidManifest.xml +1 -1
- package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkModule.kt +6 -6
- package/android/src/main/java/kyc/transfergratis/com/TransfergratisSdkView.kt +2 -2
- package/build/package.json +9 -7
- package/build/src/App.d.ts +2 -2
- package/build/src/App.d.ts.map +1 -1
- package/build/src/App.js +2 -2
- package/build/src/App.js.map +1 -1
- package/build/src/{TransfergratisSdk.types.d.ts → SanctumKeySdk.types.d.ts} +3 -3
- package/build/src/SanctumKeySdk.types.d.ts.map +1 -0
- package/build/src/SanctumKeySdk.types.js +2 -0
- package/build/src/SanctumKeySdk.types.js.map +1 -0
- package/build/src/{TransfergratisSdkModule.d.ts → SanctumKeySdkModule.d.ts} +4 -4
- package/build/src/SanctumKeySdkModule.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkModule.js → SanctumKeySdkModule.js} +2 -2
- package/build/src/SanctumKeySdkModule.js.map +1 -0
- package/build/src/{TransfergratisSdkModule.web.d.ts → SanctumKeySdkModule.web.d.ts} +4 -4
- package/build/src/SanctumKeySdkModule.web.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkModule.web.js → SanctumKeySdkModule.web.js} +3 -3
- package/build/src/SanctumKeySdkModule.web.js.map +1 -0
- package/build/src/SanctumKeySdkView.d.ts +4 -0
- package/build/src/SanctumKeySdkView.d.ts.map +1 -0
- package/build/src/SanctumKeySdkView.js +7 -0
- package/build/src/SanctumKeySdkView.js.map +1 -0
- package/build/src/SanctumKeySdkView.web.d.ts +4 -0
- package/build/src/SanctumKeySdkView.web.d.ts.map +1 -0
- package/build/src/{TransfergratisSdkView.web.js → SanctumKeySdkView.web.js} +2 -2
- package/build/src/SanctumKeySdkView.web.js.map +1 -0
- package/build/src/api/axios.js +2 -2
- package/build/src/api/axios.js.map +1 -1
- package/build/src/components/EnhancedCameraView.d.ts.map +1 -1
- package/build/src/components/EnhancedCameraView.js +107 -330
- package/build/src/components/EnhancedCameraView.js.map +1 -1
- package/build/src/components/KYCElements/EmailVerificationTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/EmailVerificationTemplate.js +114 -15
- package/build/src/components/KYCElements/EmailVerificationTemplate.js.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.d.ts.map +1 -1
- package/build/src/components/KYCElements/IDCardCapture.js +166 -695
- package/build/src/components/KYCElements/IDCardCapture.js.map +1 -1
- package/build/src/components/KYCElements/PhoneVerificationTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/PhoneVerificationTemplate.js +282 -40
- package/build/src/components/KYCElements/PhoneVerificationTemplate.js.map +1 -1
- package/build/src/components/KYCElements/SelfieCapture.d.ts +1 -1
- package/build/src/components/KYCElements/SelfieCapture.d.ts.map +1 -1
- package/build/src/components/KYCElements/SelfieCapture.js +130 -192
- package/build/src/components/KYCElements/SelfieCapture.js.map +1 -1
- package/build/src/components/KYCElements/SelfieCaptureTemplate.d.ts.map +1 -1
- package/build/src/components/KYCElements/SelfieCaptureTemplate.js +131 -433
- package/build/src/components/KYCElements/SelfieCaptureTemplate.js.map +1 -1
- package/build/src/components/NativeCameraView.js +1 -1
- package/build/src/components/NativeCameraView.js.map +1 -1
- package/build/src/components/OverLay/IdCard.d.ts +3 -2
- package/build/src/components/OverLay/IdCard.d.ts.map +1 -1
- package/build/src/components/OverLay/IdCard.js +149 -141
- package/build/src/components/OverLay/IdCard.js.map +1 -1
- package/build/src/components/OverLay/SelfieOverlay.d.ts +2 -1
- package/build/src/components/OverLay/SelfieOverlay.d.ts.map +1 -1
- package/build/src/components/OverLay/SelfieOverlay.js +37 -95
- package/build/src/components/OverLay/SelfieOverlay.js.map +1 -1
- package/build/src/components/OverLay/type.d.ts +1 -0
- package/build/src/components/OverLay/type.d.ts.map +1 -1
- package/build/src/components/OverLay/type.js.map +1 -1
- package/build/src/components/Svgs/scanningLine.d.ts +2 -1
- package/build/src/components/Svgs/scanningLine.d.ts.map +1 -1
- package/build/src/components/Svgs/scanningLine.js +55 -51
- package/build/src/components/Svgs/scanningLine.js.map +1 -1
- package/build/src/config/KYCConfig.js +1 -1
- package/build/src/config/KYCConfig.js.map +1 -1
- package/build/src/config/allowedDomains.js +6 -6
- package/build/src/config/allowedDomains.js.map +1 -1
- package/build/src/hooks/useTemplateKYCFlow.d.ts.map +1 -1
- package/build/src/hooks/useTemplateKYCFlow.js +37 -38
- package/build/src/hooks/useTemplateKYCFlow.js.map +1 -1
- package/build/src/index.d.ts +3 -3
- package/build/src/index.d.ts.map +1 -1
- package/build/src/index.js +3 -3
- package/build/src/index.js.map +1 -1
- package/build/src/modules/api/CardAuthentification.d.ts +0 -5
- package/build/src/modules/api/CardAuthentification.d.ts.map +1 -1
- package/build/src/modules/api/CardAuthentification.js +114 -116
- package/build/src/modules/api/CardAuthentification.js.map +1 -1
- package/build/src/modules/api/KYCService.d.ts +12 -1
- package/build/src/modules/api/KYCService.d.ts.map +1 -1
- package/build/src/modules/api/KYCService.js +102 -38
- package/build/src/modules/api/KYCService.js.map +1 -1
- package/build/src/modules/camera/NativeCameraModule.js +17 -17
- package/build/src/modules/camera/NativeCameraModule.js.map +1 -1
- package/expo-module.config.json +2 -2
- package/ios/TransfergratisSdk.podspec +2 -2
- package/ios/TransfergratisSdkModule.swift +12 -12
- package/package.json +9 -7
- package/src/App.tsx +2 -2
- package/src/{TransfergratisSdk.types.ts → SanctumKeySdk.types.ts} +2 -2
- package/src/{TransfergratisSdkModule.ts → SanctumKeySdkModule.ts} +3 -3
- package/src/{TransfergratisSdkModule.web.ts → SanctumKeySdkModule.web.ts} +3 -3
- package/src/SanctumKeySdkView.tsx +11 -0
- package/src/{TransfergratisSdkView.web.tsx → SanctumKeySdkView.web.tsx} +2 -2
- package/src/api/axios.ts +2 -2
- package/src/components/EnhancedCameraView.tsx +131 -385
- package/src/components/KYCElements/EmailVerificationTemplate.tsx +141 -26
- package/src/components/KYCElements/IDCardCapture.tsx +228 -868
- package/src/components/KYCElements/PhoneVerificationTemplate.tsx +342 -60
- package/src/components/KYCElements/SelfieCapture.tsx +184 -213
- package/src/components/KYCElements/SelfieCaptureTemplate.tsx +330 -662
- package/src/components/NativeCameraView.tsx +1 -1
- package/src/components/OverLay/IdCard.tsx +218 -217
- package/src/components/OverLay/SelfieOverlay.tsx +56 -134
- package/src/components/OverLay/type.ts +1 -0
- package/src/components/Svgs/scanningLine.tsx +71 -72
- package/src/config/KYCConfig.ts +1 -1
- package/src/config/allowedDomains.ts +6 -6
- package/src/hooks/useTemplateKYCFlow.tsx +45 -39
- package/src/i18n/README.md +1 -1
- package/src/index.ts +3 -3
- package/src/modules/api/CardAuthentification.ts +202 -200
- package/src/modules/api/KYCService.ts +169 -53
- package/src/modules/camera/NativeCameraModule.ts +17 -17
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$1.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$1$5$2.class +0 -0
- package/android/build/tmp/kotlin-classes/debug/kyc/transfergratis/com/TransfergratisSdkModule$definition$lambda$5$$inlined$View$1.class +0 -0
- package/build/src/TransfergratisSdk.types.d.ts.map +0 -1
- package/build/src/TransfergratisSdk.types.js +0 -2
- package/build/src/TransfergratisSdk.types.js.map +0 -1
- package/build/src/TransfergratisSdkModule.d.ts.map +0 -1
- package/build/src/TransfergratisSdkModule.js.map +0 -1
- package/build/src/TransfergratisSdkModule.web.d.ts.map +0 -1
- package/build/src/TransfergratisSdkModule.web.js.map +0 -1
- package/build/src/TransfergratisSdkView.d.ts +0 -4
- package/build/src/TransfergratisSdkView.d.ts.map +0 -1
- package/build/src/TransfergratisSdkView.js +0 -7
- package/build/src/TransfergratisSdkView.js.map +0 -1
- package/build/src/TransfergratisSdkView.web.d.ts +0 -4
- package/build/src/TransfergratisSdkView.web.d.ts.map +0 -1
- package/build/src/TransfergratisSdkView.web.js.map +0 -1
- package/src/TransfergratisSdkView.tsx +0 -11
- /package/android/build/.transforms/{532c0e65d82f446633d0a7dab2772198 → ab90740579f5bd05b27b4343ada2d1c9}/results.bin +0 -0
- /package/android/build/.transforms/{532c0e65d82f446633d0a7dab2772198 → ab90740579f5bd05b27b4343ada2d1c9}/transformed/classes/classes_dex/classes.dex +0 -0
- /package/android/build/.transforms/{f62cb96b2d1f78ca96ab35932dd530dc → c9d62bb333688ab562f51958998d5a48}/results.bin +0 -0
- /package/android/build/{intermediates/javac/debug/compileDebugJavaWithJavac/classes/kyc/transfergratis/com/BuildConfig.class → tmp/compileDebugJavaWithJavac/compileTransaction/stash-dir/BuildConfig.class.uniqueId0} +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"IdCard.js","sourceRoot":"","sources":["../../../../src/components/OverLay/IdCard.tsx"],"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,EAAE,KAAK;QACpB,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,eAAe;QAC/B,iBAAiB,EAAE,EAAE;QACrB,eAAe,EAAE,EAAE;QACnB,yCAAyC;QACzC,MAAM,EAAE,IAAI;KACf;IACD,WAAW,EAAE;QACT,IAAI,EAAE,CAAC;QACP,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KAC3B;IACD,cAAc,EAAE;QAEZ,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KAC3B;IACD,eAAe,EAAE;QACb,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,MAAM;KACrB;IACD,kBAAkB,EAAE;QAChB,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KACpB;IACD,IAAI,EAAE;QACF,WAAW;QACX,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KAC3B;IACD,IAAI,EAAE;QACF,IAAI,EAAE,CAAC;QACP,UAAU,EAAE,QAAQ;QACpB,cAAc,EAAE,QAAQ;KAC3B;CAEJ,CAAC,CAAA","sourcesContent":["import { Animated, Dimensions, StyleSheet, Text, View } from \"react-native\";\nimport Svg, { Defs, Mask, Rect, Path } from \"react-native-svg\";\nimport ScanningLine from \"../Svgs/scanningLine\";\nimport { IdCardOverlayProps } from \"./type\";\nimport StepOverlay from \"./StepOverlay\";\n\n\n\n\nconst IdCardOverlay = ({ xMin: xMinProps, yMin: yMinProps, xMax: xMaxProps, yMax: yMaxProps, cornerOpacity, instructions, cornerColor = \"#4CAF50\", stepperProps, isSuccess, language }: IdCardOverlayProps) => {\n const screenWidth = Dimensions.get('window').width;\n const screenHeight = Dimensions.get('window').height;\n\n const boxWidth = xMaxProps - xMinProps;\n const boxHeight = yMaxProps - yMinProps;\n\n \n\n\n\n\n // Calculer les coordonnées pour centrer le cadre\n const xMin = (screenWidth - boxWidth) / 2;\n const yMin = (screenHeight - boxHeight) / 3;\n const xMax = xMin + boxWidth;\n const yMax = yMin + boxHeight;\n\n return (\n <View style={StyleSheet.absoluteFill}>\n {stepperProps ? (\n <StepOverlay {...stepperProps} />\n ) : null}\n\n <Animated.View style={[styles.topIntruction]}>\n <Text style={styles.topIntructionText}>\n 💡 {instructions}\n </Text>\n </Animated.View>\n\n <Svg\n height={screenHeight}\n width={screenWidth}\n style={styles.svg}\n >\n <Defs>\n <Mask id=\"cameraMask\">\n {/* Fond blanc - zone visible */}\n <Rect\n x=\"0\"\n y=\"0\"\n width={screenWidth}\n height={screenHeight}\n fill=\"white\"\n />\n {/* Zone noire - zone masquée (transparente) */}\n <Rect\n x={xMin}\n y={yMin}\n width={boxWidth}\n height={boxHeight}\n fill=\"black\"\n />\n </Mask>\n </Defs>\n\n {/* Overlay semi-transparent avec masque */}\n <Rect\n x=\"0\"\n y=\"0\"\n width={screenWidth}\n height={screenHeight}\n fill=\"rgba(0, 0, 0, 0.5)\"\n mask=\"url(#cameraMask)\"\n />\n\n {/* Coins de la zone de capture - arrondis avec animation */}\n {/* Coin supérieur gauche */}\n <Path\n d={`M ${xMin + 15} ${yMin} Q ${xMin} ${yMin} ${xMin} ${yMin + 15} L ${xMin} ${yMin + 20}`}\n stroke={cornerColor}\n strokeWidth=\"8\"\n fill=\"none\"\n opacity={cornerOpacity}\n />\n <Path\n d={`M ${xMin + 20} ${yMin} L ${xMin + 15} ${yMin}`}\n stroke={cornerColor}\n strokeWidth=\"8\"\n opacity={cornerOpacity}\n />\n\n {/* Coin supérieur droit */}\n <Path\n d={`M ${xMax - 15} ${yMin} Q ${xMax} ${yMin} ${xMax} ${yMin + 15} L ${xMax} ${yMin + 20}`}\n stroke={cornerColor}\n strokeWidth=\"8\"\n fill=\"none\"\n opacity={cornerOpacity}\n />\n <Path\n d={`M ${xMax - 20} ${yMin} L ${xMax - 15} ${yMin}`}\n stroke={cornerColor}\n strokeWidth=\"8\"\n opacity={cornerOpacity}\n />\n\n {/* Coin inférieur gauche */}\n <Path\n d={`M ${xMin + 15} ${yMax} Q ${xMin} ${yMax} ${xMin} ${yMax - 15} L ${xMin} ${yMax - 20}`}\n stroke={cornerColor}\n strokeWidth=\"8\"\n fill=\"none\"\n opacity={cornerOpacity}\n />\n <Path\n d={`M ${xMin + 20} ${yMax} L ${xMin + 15} ${yMax}`}\n stroke={cornerColor}\n strokeWidth=\"8\"\n opacity={cornerOpacity}\n />\n\n {/* Coin inférieur droit */}\n <Path\n d={`M ${xMax - 15} ${yMax} Q ${xMax} ${yMax} ${xMax} ${yMax - 15} L ${xMax} ${yMax - 20}`}\n stroke={cornerColor}\n strokeWidth=\"8\"\n fill=\"none\"\n opacity={cornerOpacity}\n />\n <Path\n d={`M ${xMax - 20} ${yMax} L ${xMax - 15} ${yMax}`}\n stroke={cornerColor}\n strokeWidth=\"8\"\n opacity={cornerOpacity}\n />\n </Svg>\n {isSuccess ? null : (\n <ScanningLine yMin={yMin} screenWidth={screenWidth} height={screenHeight} yMax={yMax} />\n )}\n {/* <ScanningLine yMin={yMin} screenWidth={screenWidth} height={screenHeight} yMax={yMax} /> */}\n\n <View style={styles.bottomIntruction}>\n <Text style={styles.bottomTitle}>\n {language === \"en\" ? `Scan the ${stepperProps?.side === 'front' ? 'front' : 'back'} side of your ${stepperProps?.selectedDocumentType}.`:`Scanner de la face ${stepperProps?.side === 'front' ? 'avant' : 'arrière'} de votre ${stepperProps?.selectedDocumentType}.`}\n \n </Text>\n <Text style={styles.bottomSubtitle}>\n {\n language === \"en\" \n ? \"Hold your ID card steady and make sure all corners are visible. Do not move your phone while the image is being captured.\"\n : \"Maintenez votre carte d'identité stable et assurez-vous que tous les coins sont visibles. Ne déplacez pas votre téléphone pendant la capture.\"\n }\n \n </Text>\n </View>\n </View>)\n}\n\nexport default IdCardOverlay;\n\nconst styles = StyleSheet.create({\n overlay: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '50%',\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n },\n svg: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n },\n topIntruction: {\n zIndex: 1000,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n paddingVertical: 20,\n paddingHorizontal: 10,\n marginHorizontal: 20,\n marginTop: 10,\n backgroundColor: \"#FDE04730\",\n borderColor: \"#FDE047\",\n borderWidth: 1,\n borderRadius: 10,\n gap: 10,\n },\n topIntructionText: {\n color: '#FDE047',\n fontSize: 14,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomIntruction: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%',\n height: '35%',\n paddingHorizontal: 20,\n },\n bottomIntructionTextBold: {\n color: 'white',\n fontSize: 16,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomIntructionText: {\n color: 'white',\n fontSize: 14,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomTitle: {\n color: 'white',\n fontSize: 25,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomSubtitle: {\n color: 'white',\n marginTop: 15,\n fontSize: 14,\n fontWeight: '500',\n textAlign: 'center',\n },\n\n\n image: {\n position: 'absolute',\n borderRadius: 10,\n },\n stepperContainer: {\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'space-between',\n paddingHorizontal: 20,\n paddingVertical: 15,\n // backgroundColor: 'rgba(0, 0, 0, 0.5)',\n zIndex: 1000,\n },\n stepperItem: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n stepperDetails: {\n\n alignItems: 'center',\n justifyContent: 'center',\n },\n stepperItemText: {\n color: 'white',\n fontSize: 20,\n fontWeight: 'bold',\n },\n stepperDetailsText: {\n color: 'white',\n fontSize: 12,\n fontWeight: '500',\n },\n back: {\n // flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n next: {\n flex: 1,\n alignItems: 'center',\n justifyContent: 'center',\n },\n\n})"]}
|
|
1
|
+
{"version":3,"file":"IdCard.js","sour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AAE;QACR,QAAQ,EAAE,UAAU;QACpB,MAAM,EAAE,CAAC;QACT,IAAI,EAAE,CAAC;QACP,KAAK,EAAE,CAAC;QACR,MAAM,EAAE,EAAE;QACV,UAAU,EAAE,QAAQ;QACpB,iBAAiB,EAAE,EAAE;KACxB;IACD,WAAW,EAAE;QACT,KAAK,EAAE,SAAS;QAChB,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;QACnB,aAAa,EAAE,GAAG;QAClB,YAAY,EAAE,CAAC;KAClB;IACD,cAAc,EAAE;QACZ,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,KAAK;QACjB,YAAY,EAAE,EAAE;KACnB;IACD,UAAU,EAAE;QACR,eAAe,EAAE,uBAAuB;QACxC,eAAe,EAAE,CAAC;QAClB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;KACnB;IACD,UAAU,EAAE;QACR,KAAK,EAAE,uBAAuB;QAC9B,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;KACpB;CACJ,CAAC,CAAC","sourcesContent":["import React from 'react';\nimport {\n Animated,\n Dimensions,\n Platform,\n SafeAreaView,\n StatusBar,\n StyleSheet,\n Text,\n View,\n} from 'react-native';\nimport Svg, {\n Defs,\n G,\n LinearGradient,\n Mask,\n Path,\n Rect,\n Stop,\n} from 'react-native-svg';\nimport ScanningLine from '../Svgs/scanningLine';\nimport StepOverlay from './StepOverlay';\nimport { IdCardOverlayProps } from './type';\n\nconst { width: screenWidth, height: screenHeight } = Dimensions.get('window');\n\nconst IdCardOverlay = ({\n cornerOpacity,\n instructions,\n stepperProps,\n isSuccess,\n language = 'en',\n // Note: xMinPercent, yMinPercent, etc. are intentionally ignored below \n // to force a mathematically perfect ID card aspect ratio.\n}: IdCardOverlayProps) => {\n const AnimatedG = Animated.createAnimatedComponent(G);\n\n // --- 🚨 GEOMETRY FIX: Perfect ID Card Ratio ---\n // Standard ISO ID-1 ratio is 1.586 (85.6mm / 53.98mm)\n const ID_ASPECT_RATIO = 1.586;\n \n // Set width to 85% of the screen, and calculate perfect height\n const boxWidth = screenWidth * 0.85;\n const boxHeight = boxWidth / ID_ASPECT_RATIO;\n\n // Center horizontally\n const xMin = (screenWidth - boxWidth) / 2;\n const xMax = xMin + boxWidth;\n\n // Center vertically (shifted slightly up for better holding ergonomics)\n const yMin = (screenHeight - boxHeight) * 0.42; \n const yMax = yMin + boxHeight;\n\n // --- Clean, Professional Copy Formatting ---\n const formatDocType = (type?: string) => {\n if (!type) return 'document';\n // e.g., \"identity_card\" -> \"identity card\"\n return type.replace(/_/g, ' ').toLowerCase();\n };\n\n const getSideText = (side?: string) => {\n // Using \"recto/verso\" for French as it is much more professional for documents\n if (side === 'front') return language === 'en' ? 'front' : 'recto';\n return language === 'en' ? 'back' : 'verso';\n };\n\n const docTypeFormatted = formatDocType(stepperProps?.selectedDocumentType);\n const sideText = getSideText(stepperProps?.side);\n\n const bottomTitle = language === 'en'\n ? `Position the ${sideText} of your ${docTypeFormatted}`\n : `Positionnez le ${sideText} de votre ${docTypeFormatted}`;\n\n const bottomSubtitle = language === 'en'\n ? 'Ensure all details are clear and readable.'\n : 'Assurez-vous que tous les détails sont lisibles.';\n\n const helperText = language === 'en'\n ? 'No glare • All corners visible • Hold steady'\n : 'Pas de reflets • Coins visibles • Maintenez stable';\n\n // --- SVG Constants ---\n const CORNER_SIZE = 40; \n const STROKE_WIDTH = 4;\n const BORDER_RADIUS = 16; // Reduced slightly for a tighter, more realistic card feel\n\n return (\n <View style={StyleSheet.absoluteFill} pointerEvents=\"box-none\">\n <StatusBar translucent backgroundColor=\"transparent\" barStyle=\"light-content\" />\n \n {/* SVG Overlay */}\n <Svg width={screenWidth} height={screenHeight} style={styles.svg}>\n <Defs>\n <Mask id=\"cameraMask\">\n <Rect x=\"0\" y=\"0\" width={screenWidth} height={screenHeight} fill=\"white\" />\n {/* Transparent Cutout */}\n <Rect\n x={xMin}\n y={yMin}\n width={boxWidth}\n height={boxHeight}\n rx={BORDER_RADIUS}\n ry={BORDER_RADIUS}\n fill=\"black\"\n />\n </Mask>\n <LinearGradient id=\"scanBorderGradient\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"100%\">\n <Stop offset=\"0%\" stopColor=\"#4ADE80\" />\n <Stop offset=\"100%\" stopColor=\"#22C55E\" />\n </LinearGradient>\n </Defs>\n \n {/* Dim background */}\n <Rect x=\"0\" y=\"0\" width={screenWidth} height={screenHeight} fill=\"rgba(0,0,0,0.85)\" mask=\"url(#cameraMask)\" />\n \n {/* Main Card Border */}\n <Rect\n x={xMin}\n y={yMin}\n width={boxWidth}\n height={boxHeight}\n rx={BORDER_RADIUS}\n ry={BORDER_RADIUS}\n stroke=\"rgba(255,255,255,0.25)\" // Subtle inner frame\n strokeWidth={1.5}\n fill=\"transparent\"\n />\n \n {/* Professional Corner Guides */}\n <AnimatedG opacity={cornerOpacity || 1}>\n {/* Top Left */}\n <Path\n d={`M ${xMin} ${yMin + CORNER_SIZE} L ${xMin} ${yMin + BORDER_RADIUS} Q ${xMin} ${yMin} ${xMin + BORDER_RADIUS} ${yMin} L ${xMin + CORNER_SIZE} ${yMin}`}\n stroke=\"url(#scanBorderGradient)\"\n strokeWidth={STROKE_WIDTH}\n strokeLinecap=\"round\"\n fill=\"none\"\n />\n {/* Top Right */}\n <Path\n d={`M ${xMax - CORNER_SIZE} ${yMin} L ${xMax - BORDER_RADIUS} ${yMin} Q ${xMax} ${yMin} ${xMax} ${yMin + BORDER_RADIUS} L ${xMax} ${yMin + CORNER_SIZE}`}\n stroke=\"url(#scanBorderGradient)\"\n strokeWidth={STROKE_WIDTH}\n strokeLinecap=\"round\"\n fill=\"none\"\n />\n {/* Bottom Left */}\n <Path\n d={`M ${xMin} ${yMax - CORNER_SIZE} L ${xMin} ${yMax - BORDER_RADIUS} Q ${xMin} ${yMax} ${xMin + BORDER_RADIUS} ${yMax} L ${xMin + CORNER_SIZE} ${yMax}`}\n stroke=\"url(#scanBorderGradient)\"\n strokeWidth={STROKE_WIDTH}\n strokeLinecap=\"round\"\n fill=\"none\"\n />\n {/* Bottom Right */}\n <Path\n d={`M ${xMax - CORNER_SIZE} ${yMax} L ${xMax - BORDER_RADIUS} ${yMax} Q ${xMax} ${yMax} ${xMax} ${yMax - BORDER_RADIUS} L ${xMax} ${yMax - CORNER_SIZE}`}\n stroke=\"url(#scanBorderGradient)\"\n strokeWidth={STROKE_WIDTH}\n strokeLinecap=\"round\"\n fill=\"none\"\n />\n </AnimatedG>\n </Svg>\n\n {/* Scanning animation */}\n {!isSuccess && (\n <ScanningLine yMin={yMin} yMax={yMax} screenWidth={screenWidth} height={screenHeight} />\n )}\n\n {/* Top UI Zone */}\n <View style={[styles.topZone, { height: yMin }]} pointerEvents=\"box-none\">\n <SafeAreaView style={styles.safeAreaZone} pointerEvents=\"box-none\">\n {stepperProps && (\n <View style={styles.stepperWrapper}>\n <StepOverlay {...stepperProps} />\n </View>\n )}\n {instructions && (\n <View style={styles.instructionsContainer}>\n <View style={styles.instructionsBadge}>\n <Text style={styles.instructionsText}>{instructions}</Text>\n </View>\n </View>\n )}\n </SafeAreaView>\n </View>\n\n {/* Bottom UI Zone */}\n <View style={[styles.bottomZone, { top: yMax + 30 }]} pointerEvents=\"box-none\">\n <Text style={styles.bottomTitle}>{bottomTitle}</Text>\n <Text style={styles.bottomSubtitle}>{bottomSubtitle}</Text>\n <View style={styles.helperPill}>\n <Text style={styles.helperText}>{helperText}</Text>\n </View>\n </View>\n </View>\n );\n};\n\nexport default IdCardOverlay;\n\nconst styles = StyleSheet.create({\n svg: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 1,\n },\n topZone: {\n position: 'absolute',\n top: 0,\n left: 0,\n right: 0,\n zIndex: 10,\n justifyContent: 'flex-start',\n },\n safeAreaZone: {\n flex: 1,\n paddingTop: Platform.OS === 'android' ? (StatusBar.currentHeight || 0) + 8 : 8,\n },\n stepperWrapper: {\n paddingHorizontal: 20,\n },\n instructionsContainer: {\n alignItems: 'center',\n marginTop: 'auto',\n marginBottom: 24,\n paddingHorizontal: 20,\n },\n instructionsBadge: {\n backgroundColor: 'rgba(0,0,0,0.6)',\n borderRadius: 8,\n paddingVertical: 8,\n paddingHorizontal: 14,\n },\n instructionsText: {\n color: '#FFFFFF',\n fontSize: 13,\n fontWeight: '500',\n letterSpacing: 0.3,\n },\n bottomZone: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n right: 0,\n zIndex: 10,\n alignItems: 'center',\n paddingHorizontal: 24,\n },\n bottomTitle: {\n color: '#FFFFFF',\n fontSize: 18,\n fontWeight: '600',\n textAlign: 'center',\n letterSpacing: 0.3,\n marginBottom: 6,\n },\n bottomSubtitle: {\n color: 'rgba(255,255,255,0.7)',\n fontSize: 14,\n textAlign: 'center',\n fontWeight: '400',\n marginBottom: 20,\n },\n helperPill: {\n backgroundColor: 'rgba(255,255,255,0.1)',\n paddingVertical: 8,\n paddingHorizontal: 16,\n borderRadius: 20,\n },\n helperText: {\n color: 'rgba(255,255,255,0.9)',\n fontSize: 12,\n fontWeight: '500',\n },\n});"]}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
+
import React from "react";
|
|
1
2
|
import { IdCardOverlayProps } from "./type";
|
|
2
|
-
declare const SelfieOverlay: ({ xMin, yMin, xMax, yMax, cornerOpacity, instructions, cornerColor, stepperProps, instructionsTile, instructionsSubtitle, orientation, isSuccess }: IdCardOverlayProps) =>
|
|
3
|
+
declare const SelfieOverlay: ({ xMin, yMin, xMax, yMax, cornerOpacity, instructions, cornerColor, stepperProps, instructionsTile, instructionsSubtitle, orientation, isSuccess }: IdCardOverlayProps) => React.JSX.Element;
|
|
3
4
|
export default SelfieOverlay;
|
|
4
5
|
//# sourceMappingURL=SelfieOverlay.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelfieOverlay.d.ts","sourceRoot":"","sources":["../../../../src/components/OverLay/SelfieOverlay.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"SelfieOverlay.d.ts","sourceRoot":"","sources":["../../../../src/components/OverLay/SelfieOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAE1B,OAAO,EAAE,kBAAkB,EAAE,MAAM,QAAQ,CAAC;AAO5C,QAAA,MAAM,aAAa,GAAI,oJAAgK,kBAAkB,sBAuExM,CAAC;AAEF,eAAe,aAAa,CAAC"}
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
import
|
|
1
|
+
import React from "react";
|
|
2
|
+
import { Dimensions, StyleSheet, Text, View, Image } from "react-native";
|
|
2
3
|
import Svg, { Rect, Path, Mask, Defs } from 'react-native-svg';
|
|
3
4
|
import ScanningLine from "../Svgs/scanningLine";
|
|
4
5
|
import FrontSelfieIcon from "../Svgs/frontSelfieIcon";
|
|
@@ -7,163 +8,104 @@ import SideSelfieIcon from "../Svgs/sideSelfieIcon";
|
|
|
7
8
|
const SelfieOverlay = ({ xMin, yMin, xMax, yMax, cornerOpacity, instructions, cornerColor = "#4CAF50", stepperProps, instructionsTile, instructionsSubtitle, orientation, isSuccess }) => {
|
|
8
9
|
const screenWidth = Dimensions.get('window').width;
|
|
9
10
|
const screenHeight = Dimensions.get('window').height;
|
|
10
|
-
// Dimensions de l'icône FrontSelfieIcon (240x285 selon le viewBox)
|
|
11
11
|
const iconWidth = 240;
|
|
12
12
|
const iconHeight = 285;
|
|
13
|
-
// Calculer la position pour centrer l'icône
|
|
14
13
|
const iconX = (screenWidth - iconWidth) / 2;
|
|
15
14
|
const iconY = (screenHeight - iconHeight) / 3;
|
|
16
|
-
// Position du centre pour le masque (doit correspondre au centre de l'icône)
|
|
17
15
|
const maskCenterX = iconX + iconWidth / 2;
|
|
18
16
|
const maskCenterY = iconY + iconHeight / 2;
|
|
19
|
-
// Zone pour ScanningLine (basée sur la zone de l'icône)
|
|
20
17
|
const scanningYMin = iconY;
|
|
21
18
|
const scanningYMax = iconY + iconHeight;
|
|
22
|
-
return (<View style={StyleSheet.absoluteFill}>
|
|
19
|
+
return (<View style={StyleSheet.absoluteFill} pointerEvents="none">
|
|
23
20
|
{stepperProps ? (<StepOverlay {...stepperProps}/>) : null}
|
|
24
21
|
|
|
25
22
|
<Svg height="100%" width="100%" style={[StyleSheet.absoluteFill]}>
|
|
26
23
|
<Defs>
|
|
27
24
|
<Mask id="faceMask">
|
|
28
|
-
{/* Fond blanc - zone visible (extérieur) */}
|
|
29
25
|
<Rect x="0" y="0" width="100%" height="100%" fill="white"/>
|
|
30
|
-
|
|
31
|
-
<Path d="M35.4198 48.9242C38.2153 41.9014 42.5851 35.6693 48.3859 30.8232C61.3601 19.9842 88.1543 1.5 120 1.5C151.846 1.5 178.64 19.9842 191.614 30.8232C197.415 35.6693 201.785 41.9014 204.58 48.9242C210.484 63.7564 220 93.0114 220 127.5C220 168.082 204.19 212.617 198.234 227.954C196.792 231.667 194.971 235.196 192.628 238.417C183.46 251.021 156.313 283.5 120 283.5C83.6867 283.5 56.5401 251.021 47.3723 238.417C45.0294 235.196 43.2081 231.667 41.7663 227.954C35.8102 212.617 20 168.082 20 127.5C20 93.0114 29.5157 63.7564 35.4198 48.9242Z" fill="black" transform={`translate(${maskCenterX}, ${maskCenterY}) translate(-120, -142.5)`}/>
|
|
26
|
+
<Path d="M35.4198 48.9242C38.2153 41.9014 42.5851 30.8232 48.3859 30.8232C61.3601 19.9842 88.1543 1.5 120 1.5C151.846 1.5 178.64 19.9842 191.614 30.8232C197.415 35.6693 201.785 41.9014 204.58 48.9242C210.484 63.7564 220 93.0114 220 127.5C220 168.082 204.19 212.617 198.234 227.954C196.792 231.667 194.971 235.196 192.628 238.417C183.46 251.021 156.313 283.5 120 283.5C83.6867 283.5 56.5401 251.021 47.3723 238.417C45.0294 235.196 43.2081 231.667 41.7663 227.954C35.8102 212.617 20 168.082 20 127.5C20 93.0114 29.5157 63.7564 35.4198 48.9242Z" fill="black" transform={`translate(${maskCenterX}, ${maskCenterY}) translate(-120, -142.5)`}/>
|
|
32
27
|
</Mask>
|
|
33
28
|
</Defs>
|
|
34
29
|
|
|
35
|
-
|
|
36
|
-
<Rect x="0" y="0" width="100%" height="100%" fill="rgba(0, 0, 0, 0.5)" mask="url(#faceMask)"/>
|
|
30
|
+
<Rect x="0" y="0" width="100%" height="100%" fill="rgba(0, 0, 0, 0.65)" mask="url(#faceMask)"/>
|
|
37
31
|
{isSuccess ? null : <ScanningLine yMin={scanningYMin} screenWidth={screenWidth} height={screenHeight} yMax={scanningYMax}/>}
|
|
38
32
|
</Svg>
|
|
39
33
|
|
|
40
|
-
{
|
|
41
|
-
<View style={[styles.iconContainer, {
|
|
42
|
-
left: iconX,
|
|
43
|
-
top: iconY,
|
|
44
|
-
width: iconWidth,
|
|
45
|
-
height: iconHeight,
|
|
46
|
-
}]}>
|
|
34
|
+
<View style={[styles.iconContainer, { left: iconX, top: iconY, width: iconWidth, height: iconHeight }]}>
|
|
47
35
|
{orientation === "center" ? <FrontSelfieIcon /> : <SideSelfieIcon />}
|
|
48
36
|
</View>
|
|
49
37
|
|
|
50
|
-
{/*
|
|
51
|
-
{orientation !== "center" ? (<View style={[
|
|
38
|
+
{/* 🚨 REVERTED TO USE YOUR GIF FILE */}
|
|
39
|
+
{orientation && orientation !== "center" ? (<View style={[
|
|
52
40
|
styles.arrowContainer,
|
|
53
41
|
{
|
|
54
|
-
top: iconY + iconHeight / 2 - 50,
|
|
42
|
+
top: iconY + iconHeight / 2 - 50,
|
|
55
43
|
left: orientation === "left" ? iconX - 72 : 'auto',
|
|
56
44
|
right: orientation === "right" ? iconX - 75 : 'auto'
|
|
57
45
|
}
|
|
58
46
|
]}>
|
|
59
47
|
<Image source={require('../Svgs/directionArrow.gif')} resizeMode="contain" style={[
|
|
60
48
|
styles.arrowImage,
|
|
49
|
+
// If the orientation is right, we flip the image horizontally
|
|
61
50
|
{ transform: orientation === "right" ? [{ scaleX: -1 }] : [] }
|
|
62
51
|
]}/>
|
|
63
52
|
</View>) : null}
|
|
64
53
|
|
|
65
|
-
|
|
54
|
+
{/* UPGRADED INSTRUCTIONS UI */}
|
|
66
55
|
<View style={styles.bottomIntruction}>
|
|
67
|
-
<Text style={styles.bottomTitle}>
|
|
68
|
-
|
|
69
|
-
</Text>
|
|
70
|
-
<Text style={styles.bottomSubtitle}>
|
|
71
|
-
{instructionsSubtitle}
|
|
72
|
-
</Text>
|
|
56
|
+
<Text style={styles.bottomTitle}>{instructionsTile}</Text>
|
|
57
|
+
<Text style={styles.bottomSubtitle}>{instructionsSubtitle}</Text>
|
|
73
58
|
</View>
|
|
74
59
|
</View>);
|
|
75
60
|
};
|
|
76
61
|
export default SelfieOverlay;
|
|
77
62
|
const styles = StyleSheet.create({
|
|
78
|
-
overlay: {
|
|
79
|
-
position: 'absolute',
|
|
80
|
-
top: 0,
|
|
81
|
-
left: 0,
|
|
82
|
-
width: '100%',
|
|
83
|
-
height: '50%',
|
|
84
|
-
backgroundColor: 'rgba(0, 0, 0, 0.5)',
|
|
85
|
-
},
|
|
86
|
-
svg: {
|
|
87
|
-
position: 'absolute',
|
|
88
|
-
top: 0,
|
|
89
|
-
left: 0,
|
|
90
|
-
width: '100%',
|
|
91
|
-
height: '100%',
|
|
92
|
-
},
|
|
93
|
-
topIntruction: {
|
|
94
|
-
zIndex: 1000,
|
|
95
|
-
flexDirection: 'row',
|
|
96
|
-
alignItems: 'center',
|
|
97
|
-
justifyContent: 'center',
|
|
98
|
-
paddingVertical: 20,
|
|
99
|
-
paddingHorizontal: 10,
|
|
100
|
-
marginHorizontal: 20,
|
|
101
|
-
marginTop: 10,
|
|
102
|
-
backgroundColor: "#FDE04730",
|
|
103
|
-
borderColor: "#FDE047",
|
|
104
|
-
borderWidth: 1,
|
|
105
|
-
borderRadius: 10,
|
|
106
|
-
gap: 10,
|
|
107
|
-
},
|
|
108
|
-
topIntructionText: {
|
|
109
|
-
color: '#FDE047',
|
|
110
|
-
fontSize: 14,
|
|
111
|
-
fontWeight: 'bold',
|
|
112
|
-
textAlign: 'center',
|
|
113
|
-
},
|
|
114
63
|
bottomIntruction: {
|
|
115
64
|
position: 'absolute',
|
|
116
|
-
bottom:
|
|
65
|
+
bottom: 50,
|
|
117
66
|
left: 0,
|
|
67
|
+
right: 0,
|
|
118
68
|
width: '100%',
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
},
|
|
122
|
-
bottomIntructionTextBold: {
|
|
123
|
-
color: 'white',
|
|
124
|
-
fontSize: 16,
|
|
125
|
-
fontWeight: 'bold',
|
|
126
|
-
textAlign: 'center',
|
|
127
|
-
},
|
|
128
|
-
bottomIntructionText: {
|
|
129
|
-
color: 'white',
|
|
130
|
-
fontSize: 14,
|
|
131
|
-
fontWeight: 'bold',
|
|
132
|
-
textAlign: 'center',
|
|
69
|
+
paddingHorizontal: 24,
|
|
70
|
+
alignItems: 'center',
|
|
133
71
|
},
|
|
134
72
|
bottomTitle: {
|
|
135
|
-
color: '
|
|
136
|
-
fontSize:
|
|
73
|
+
color: '#FFFFFF',
|
|
74
|
+
fontSize: 24,
|
|
137
75
|
fontWeight: 'bold',
|
|
138
76
|
textAlign: 'center',
|
|
77
|
+
textShadowColor: 'rgba(0, 0, 0, 0.8)',
|
|
78
|
+
textShadowOffset: { width: 0, height: 2 },
|
|
79
|
+
textShadowRadius: 4,
|
|
139
80
|
},
|
|
140
81
|
bottomSubtitle: {
|
|
141
|
-
color: '
|
|
142
|
-
marginTop:
|
|
143
|
-
fontSize:
|
|
144
|
-
fontWeight: '
|
|
82
|
+
color: '#FFFFFF',
|
|
83
|
+
marginTop: 12,
|
|
84
|
+
fontSize: 15,
|
|
85
|
+
fontWeight: '600',
|
|
145
86
|
textAlign: 'center',
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
87
|
+
lineHeight: 22,
|
|
88
|
+
backgroundColor: 'rgba(0,0,0,0.6)',
|
|
89
|
+
paddingVertical: 10,
|
|
90
|
+
paddingHorizontal: 20,
|
|
91
|
+
borderRadius: 20,
|
|
92
|
+
overflow: 'hidden',
|
|
150
93
|
},
|
|
151
94
|
iconContainer: {
|
|
152
95
|
position: 'absolute',
|
|
153
96
|
justifyContent: 'center',
|
|
154
|
-
alignItems: 'center'
|
|
97
|
+
alignItems: 'center'
|
|
155
98
|
},
|
|
156
99
|
arrowContainer: {
|
|
157
100
|
position: 'absolute',
|
|
158
101
|
width: 100,
|
|
159
102
|
height: 100,
|
|
160
103
|
justifyContent: 'center',
|
|
161
|
-
alignItems: 'center'
|
|
104
|
+
alignItems: 'center'
|
|
162
105
|
},
|
|
163
106
|
arrowImage: {
|
|
164
|
-
width:
|
|
165
|
-
height:
|
|
166
|
-
|
|
167
|
-
},
|
|
107
|
+
width: 80,
|
|
108
|
+
height: 80,
|
|
109
|
+
}
|
|
168
110
|
});
|
|
169
111
|
//# sourceMappingURL=SelfieOverlay.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SelfieOverlay.js","sourceRoot":"","sources":["../../../../src/components/OverLay/SelfieOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,KAAK,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAChD,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,cAAc,MAAM,wBAAwB,CAAC;AAEpD,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,GAAG,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EA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,KAAK,EAAE,OAAO;QACd,SAAS,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;KACtB;IAGD,KAAK,EAAE;QACH,QAAQ,EAAE,UAAU;QACpB,YAAY,EAAE,EAAE;KACnB;IACD,aAAa,EAAE;QACX,QAAQ,EAAE,UAAU;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACvB;IACD,cAAc,EAAE;QACZ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACvB;IACD,UAAU,EAAE;QACR,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,SAAS,EAAE,SAAS;KACvB;CACJ,CAAC,CAAA","sourcesContent":["import { Dimensions, Image, StyleSheet, Text, View } from \"react-native\";\nimport { IdCardOverlayProps } from \"./type\";\nimport Svg, { Rect, Path, Mask, Defs } from 'react-native-svg';\nimport ScanningLine from \"../Svgs/scanningLine\";\nimport FrontSelfieIcon from \"../Svgs/frontSelfieIcon\";\nimport StepOverlay from \"./StepOverlay\";\nimport SideSelfieIcon from \"../Svgs/sideSelfieIcon\";\n\nconst SelfieOverlay = ({ xMin, yMin, xMax, yMax, cornerOpacity, instructions, cornerColor = \"#4CAF50\", stepperProps, instructionsTile, instructionsSubtitle, orientation, isSuccess }: IdCardOverlayProps) => {\n const screenWidth = Dimensions.get('window').width;\n const screenHeight = Dimensions.get('window').height;\n\n // Dimensions de l'icône FrontSelfieIcon (240x285 selon le viewBox)\n const iconWidth = 240;\n const iconHeight = 285;\n\n // Calculer la position pour centrer l'icône\n const iconX = (screenWidth - iconWidth) / 2;\n const iconY = (screenHeight - iconHeight) / 3;\n\n // Position du centre pour le masque (doit correspondre au centre de l'icône)\n const maskCenterX = iconX + iconWidth / 2;\n const maskCenterY = iconY + iconHeight / 2;\n\n // Zone pour ScanningLine (basée sur la zone de l'icône)\n const scanningYMin = iconY;\n const scanningYMax = iconY + iconHeight;\n\n return (\n <View style={StyleSheet.absoluteFill}>\n {stepperProps ? (\n <StepOverlay {...stepperProps} />\n ) : null}\n\n <Svg\n height=\"100%\"\n width=\"100%\"\n style={[StyleSheet.absoluteFill]}\n >\n <Defs>\n <Mask id=\"faceMask\">\n {/* Fond blanc - zone visible (extérieur) */}\n <Rect\n x=\"0\"\n y=\"0\"\n width=\"100%\"\n height=\"100%\"\n fill=\"white\"\n />\n {/* Zone noire - zone masquée (forme du visage) - exactement alignée avec l'icône */}\n <Path\n d=\"M35.4198 48.9242C38.2153 41.9014 42.5851 35.6693 48.3859 30.8232C61.3601 19.9842 88.1543 1.5 120 1.5C151.846 1.5 178.64 19.9842 191.614 30.8232C197.415 35.6693 201.785 41.9014 204.58 48.9242C210.484 63.7564 220 93.0114 220 127.5C220 168.082 204.19 212.617 198.234 227.954C196.792 231.667 194.971 235.196 192.628 238.417C183.46 251.021 156.313 283.5 120 283.5C83.6867 283.5 56.5401 251.021 47.3723 238.417C45.0294 235.196 43.2081 231.667 41.7663 227.954C35.8102 212.617 20 168.082 20 127.5C20 93.0114 29.5157 63.7564 35.4198 48.9242Z\"\n fill=\"black\"\n transform={`translate(${maskCenterX}, ${maskCenterY}) translate(-120, -142.5)`}\n />\n </Mask>\n </Defs>\n\n {/* Overlay semi-transparent avec masque */}\n <Rect\n x=\"0\"\n y=\"0\"\n width=\"100%\"\n height=\"100%\"\n fill=\"rgba(0, 0, 0, 0.5)\"\n mask=\"url(#faceMask)\"\n />\n {isSuccess ? null : <ScanningLine yMin={scanningYMin} screenWidth={screenWidth} height={screenHeight} yMax={scanningYMax} />}\n </Svg>\n\n {/* Container de l'icône - centré automatiquement */}\n <View style={[styles.iconContainer, {\n left: iconX,\n top: iconY,\n width: iconWidth,\n height: iconHeight,\n }]}>\n {orientation === \"center\" ? <FrontSelfieIcon /> : <SideSelfieIcon />}\n </View>\n\n {/* Flèche directionnelle pour les orientations latérales */}\n {orientation !== \"center\" ? (\n <View style={[\n styles.arrowContainer,\n {\n top: iconY + iconHeight / 2 - 50, // Centré verticalement par rapport à l'icône\n left: orientation === \"left\" ? iconX - 72 : 'auto',\n right: orientation === \"right\" ? iconX - 75 : 'auto'\n }\n ]}>\n <Image\n source={require('../Svgs/directionArrow.gif')}\n resizeMode=\"contain\"\n style={[\n styles.arrowImage,\n { transform: orientation === \"right\" ? [{ scaleX: -1 }] : [] }\n ]}\n />\n </View>\n ) : null}\n\n\n <View style={styles.bottomIntruction}>\n <Text style={styles.bottomTitle}>\n {instructionsTile}\n </Text>\n <Text style={styles.bottomSubtitle}>\n {instructionsSubtitle}\n </Text>\n </View>\n </View>\n )\n}\n\nexport default SelfieOverlay;\n\n\nconst styles = StyleSheet.create({\n overlay: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '50%',\n backgroundColor: 'rgba(0, 0, 0, 0.5)',\n },\n svg: {\n position: 'absolute',\n top: 0,\n left: 0,\n width: '100%',\n height: '100%',\n },\n topIntruction: {\n zIndex: 1000,\n flexDirection: 'row',\n alignItems: 'center',\n justifyContent: 'center',\n paddingVertical: 20,\n paddingHorizontal: 10,\n marginHorizontal: 20,\n marginTop: 10,\n backgroundColor: \"#FDE04730\",\n borderColor: \"#FDE047\",\n borderWidth: 1,\n borderRadius: 10,\n gap: 10,\n },\n topIntructionText: {\n color: '#FDE047',\n fontSize: 14,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomIntruction: {\n position: 'absolute',\n bottom: 0,\n left: 0,\n width: '100%',\n height: '35%',\n paddingHorizontal: 20,\n },\n bottomIntructionTextBold: {\n color: 'white',\n fontSize: 16,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomIntructionText: {\n color: 'white',\n fontSize: 14,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomTitle: {\n color: 'white',\n fontSize: 25,\n fontWeight: 'bold',\n textAlign: 'center',\n },\n bottomSubtitle: {\n color: 'white',\n marginTop: 15,\n fontSize: 14,\n fontWeight: '500',\n textAlign: 'center',\n },\n\n\n image: {\n position: 'absolute',\n borderRadius: 10,\n },\n iconContainer: {\n position: 'absolute',\n justifyContent: 'center',\n alignItems: 'center',\n },\n arrowContainer: {\n position: 'absolute',\n width: 100,\n height: 100,\n justifyContent: 'center',\n alignItems: 'center',\n },\n arrowImage: {\n width: 100,\n height: 100,\n objectFit: 'contain',\n },\n})\n"]}
|
|
1
|
+
{"version":3,"file":"SelfieOverlay.js","sourceRoot":"","sources":["../../../../src/components/OverLay/SelfieOverlay.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAE,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAEzE,OAAO,GAAG,EAAE,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,MAAM,kBAAkB,CAAC;AAC/D,OAAO,YAAY,MAAM,sBAAsB,CAAC;AAChD,OAAO,eAAe,MAAM,yBAAyB,CAAC;AACtD,OAAO,WAAW,MAAM,eAAe,CAAC;AACxC,OAAO,cAAc,MAAM,wBAAwB,CAAC;AAEpD,MAAM,aAAa,GAAG,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,IAAI,EAAE,aAAa,EAAE,YAAY,EAAE,WAAW,GAAG,SAAS,EAAE,YAAY,EAAE,gBAAgB,EAAE,oBAAoB,EAAE,WAAW,EAAE,SAAS,EAAsB,EAAE,EAAE;IACzM,MAAM,WAAW,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,KAAK,CAAC;IACnD,MAAM,YAAY,GAAG,UAAU,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC,MAAM,CAAC;IAErD,MAAM,SAAS,GAAG,GAAG,CAAC;IACtB,MAAM,UAAU,GAAG,GAAG,CAAC;IAE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,EAAE,EAAE;QACb,QAAQ,EAAE,EAAE;QACZ,UAAU,EAAE,KAAK;QACjB,SAAS,EAAE,QAAQ;QACnB,UAAU,EAAE,EAAE;QACd,eAAe,EAAE,iBAAiB;QAClC,eAAe,EAAE,EAAE;QACnB,iBAAiB,EAAE,EAAE;QACrB,YAAY,EAAE,EAAE;QAChB,QAAQ,EAAE,QAAQ;KACrB;IACD,aAAa,EAAE;QACX,QAAQ,EAAE,UAAU;QACpB,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACvB;IACD,cAAc,EAAE;QACZ,QAAQ,EAAE,UAAU;QACpB,KAAK,EAAE,GAAG;QACV,MAAM,EAAE,GAAG;QACX,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACvB;IACD,UAAU,EAAE;QACR,KAAK,EAAE,EAAE;QACT,MAAM,EAAE,EAAE;KACb;CACJ,CAAC,CAAC","sourcesContent":["import React from \"react\";\nimport { Dimensions, StyleSheet, Text, View, Image } from \"react-native\";\nimport { IdCardOverlayProps } from \"./type\";\nimport Svg, { Rect, Path, Mask, Defs } from 'react-native-svg';\nimport ScanningLine from \"../Svgs/scanningLine\";\nimport FrontSelfieIcon from \"../Svgs/frontSelfieIcon\";\nimport StepOverlay from \"./StepOverlay\";\nimport SideSelfieIcon from \"../Svgs/sideSelfieIcon\";\n\nconst SelfieOverlay = ({ xMin, yMin, xMax, yMax, cornerOpacity, instructions, cornerColor = \"#4CAF50\", stepperProps, instructionsTile, instructionsSubtitle, orientation, isSuccess }: IdCardOverlayProps) => {\n const screenWidth = Dimensions.get('window').width;\n const screenHeight = Dimensions.get('window').height;\n\n const iconWidth = 240;\n const iconHeight = 285;\n\n const iconX = (screenWidth - iconWidth) / 2;\n const iconY = (screenHeight - iconHeight) / 3;\n\n const maskCenterX = iconX + iconWidth / 2;\n const maskCenterY = iconY + iconHeight / 2;\n\n const scanningYMin = iconY;\n const scanningYMax = iconY + iconHeight;\n\n return (\n <View style={StyleSheet.absoluteFill} pointerEvents=\"none\">\n {stepperProps ? (\n <StepOverlay {...stepperProps} />\n ) : null}\n\n <Svg height=\"100%\" width=\"100%\" style={[StyleSheet.absoluteFill]}>\n <Defs>\n <Mask id=\"faceMask\">\n <Rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"white\" />\n <Path\n d=\"M35.4198 48.9242C38.2153 41.9014 42.5851 30.8232 48.3859 30.8232C61.3601 19.9842 88.1543 1.5 120 1.5C151.846 1.5 178.64 19.9842 191.614 30.8232C197.415 35.6693 201.785 41.9014 204.58 48.9242C210.484 63.7564 220 93.0114 220 127.5C220 168.082 204.19 212.617 198.234 227.954C196.792 231.667 194.971 235.196 192.628 238.417C183.46 251.021 156.313 283.5 120 283.5C83.6867 283.5 56.5401 251.021 47.3723 238.417C45.0294 235.196 43.2081 231.667 41.7663 227.954C35.8102 212.617 20 168.082 20 127.5C20 93.0114 29.5157 63.7564 35.4198 48.9242Z\"\n fill=\"black\"\n transform={`translate(${maskCenterX}, ${maskCenterY}) translate(-120, -142.5)`}\n />\n </Mask>\n </Defs>\n\n <Rect x=\"0\" y=\"0\" width=\"100%\" height=\"100%\" fill=\"rgba(0, 0, 0, 0.65)\" mask=\"url(#faceMask)\" />\n {isSuccess ? null : <ScanningLine yMin={scanningYMin} screenWidth={screenWidth} height={screenHeight} yMax={scanningYMax} />}\n </Svg>\n\n <View style={[styles.iconContainer, { left: iconX, top: iconY, width: iconWidth, height: iconHeight }]}>\n {orientation === \"center\" ? <FrontSelfieIcon /> : <SideSelfieIcon />}\n </View>\n\n {/* 🚨 REVERTED TO USE YOUR GIF FILE */}\n {orientation && orientation !== \"center\" ? (\n <View style={[\n styles.arrowContainer,\n {\n top: iconY + iconHeight / 2 - 50,\n left: orientation === \"left\" ? iconX - 72 : 'auto',\n right: orientation === \"right\" ? iconX - 75 : 'auto'\n }\n ]}>\n <Image\n source={require('../Svgs/directionArrow.gif')}\n resizeMode=\"contain\"\n style={[\n styles.arrowImage,\n // If the orientation is right, we flip the image horizontally\n { transform: orientation === \"right\" ? [{ scaleX: -1 }] : [] }\n ]}\n />\n </View>\n ) : null}\n\n {/* UPGRADED INSTRUCTIONS UI */}\n <View style={styles.bottomIntruction}>\n <Text style={styles.bottomTitle}>{instructionsTile}</Text>\n <Text style={styles.bottomSubtitle}>{instructionsSubtitle}</Text>\n </View>\n </View>\n );\n};\n\nexport default SelfieOverlay;\n\nconst styles = StyleSheet.create({\n bottomIntruction: { \n position: 'absolute', \n bottom: 50, \n left: 0, \n right: 0,\n width: '100%', \n paddingHorizontal: 24,\n alignItems: 'center',\n },\n bottomTitle: { \n color: '#FFFFFF', \n fontSize: 24, \n fontWeight: 'bold', \n textAlign: 'center',\n textShadowColor: 'rgba(0, 0, 0, 0.8)',\n textShadowOffset: { width: 0, height: 2 },\n textShadowRadius: 4,\n },\n bottomSubtitle: { \n color: '#FFFFFF', \n marginTop: 12, \n fontSize: 15, \n fontWeight: '600', \n textAlign: 'center', \n lineHeight: 22,\n backgroundColor: 'rgba(0,0,0,0.6)', \n paddingVertical: 10,\n paddingHorizontal: 20,\n borderRadius: 20,\n overflow: 'hidden',\n },\n iconContainer: { \n position: 'absolute', \n justifyContent: 'center', \n alignItems: 'center' \n },\n arrowContainer: { \n position: 'absolute', \n width: 100, \n height: 100, \n justifyContent: 'center', \n alignItems: 'center' \n },\n arrowImage: {\n width: 80,\n height: 80,\n }\n});"]}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.d.ts","sourceRoot":"","sources":["../../../../src/components/OverLay/type.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,oBAAoB,EAAE,MAAM,uBAAuB,CAAC;AAE7D,MAAM,WAAW,kBAAkB;IAC/B,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;I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B,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,SAAS,CAAC,EAAE,OAAO,CAAC;IACpB,OAAO,CAAC,EAAE,KAAK,GAAG,QAAQ,GAAG,MAAM,CAAC;IACpC,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAC3B,gBAAgB,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IACnC,YAAY,CAAC,EAAE,OAAO,CAAC;IACvB,IAAI,CAAC,EAAE;QACH,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,IAAI,EAAE,MAAM,CAAC;QACb,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,WAAW,CAAC,EAAE,MAAM,CAAC;QACrB,YAAY,CAAC,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,WAAW,CAAC,EAAE,OAAO,CAAC;IACtB,qBAAqB,CAAC,EAAE,MAAM,IAAI,CAAC;IACnC,oBAAoB,CAAC,EAAE,CAAC,MAAM,EAAE;QAAE,OAAO,EAAE,OAAO,CAAC;QAAC,IAAI,CAAC,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,KAAK,IAAI,CAAC;IAC7F,aAAa,CAAC,EAAE,MAAM,CAAC;IACvB,2IAA2I;IAC3I,2BAA2B,CAAC,EAAE,MAAM,CAAC;CACxC;AAED,MAAM,WAAW,yBAAyB;IACtC,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;CACvB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../../src/components/OverLay/type.ts"],"names":[],"mappings":"","sourcesContent":["import { ViewStyle } from \"react-native\";\nimport { ISilentCaptureResult } from \"../../types/KYC.types\";\n\nexport interface IdCardOverlayProps {\n xMin: number;\n yMin: number;\n xMax: number;\n yMax: number;\n cornerOpacity: number;\n instructions: string;\n cornerColor?: string;\n stepperProps?: StepperProps;\n instructionsTile?: string;\n instructionsSubtitle?: string;\n orientation?: 'center' | 'left' | 'right';\n isAnalyzing?: boolean;\n isSuccess?: boolean;\n language: string\n}\n\n\ninterface StepperProps {\n back: () => void;\n selectedDocumentType: string;\n step: number;\n totalSteps: number;\n side: string;\n}\n\nexport interface ExtractMrzTextResponse {\n parsed_data: {\n mrz_type: string;\n document_code: string;\n issuer_code: string;\n surname: string;\n given_name: string;\n document_number: string;\n document_number_checkdigit: string;\n nationality_code: string;\n birth_date: string;\n sex: string;\n expiry_date: string;\n optional_data: string;\n mrz_text: string;\n status: string;\n },\n success: boolean;\n}\n\n\n\nexport interface EnhancedCameraViewProps {\n instructions?: string;\n showCamera: boolean;\n cameraType?: 'front' | 'back';\n style?: ViewStyle;\n onCapture?: (result: { success: boolean; path?: string; error?: string }) => void;\n onSilentCapture?: (result: { success: boolean; path?: string; error?: string }) => void;\n silentCaptureResult?: ISilentCaptureResult;\n onError?: (event: { message: string }) => void;\n onClose?: () => void;\n enableFlash?: boolean;\n enableHdr?: boolean;\n quality?: 'low' | 'medium' | 'high';\n showCaptureButton?: boolean;\n showSwitchCamera?: boolean;\n overlayComponent?: React.ReactNode;\n bbox?: {\n xMin: number;\n yMin: number;\n xMax: number;\n yMax: number;\n borderColor?: string;\n borderWidth?: number;\n cornerRadius?: number;\n };\n canFlip?: boolean;\n // Video recording props\n enableVideo?: boolean;\n isRecording?: boolean;\n onVideoRecordingStart?: () => void;\n onVideoRecordingStop?: (result: { success: boolean; path?: string; error?: string }) => void;\n videoDuration?: number;\n /** Delay in ms before first auto-capture (lets camera focus and user position document). Recommended 2500–3000 for ID/document capture. */\n captureStabilizationDelayMs?: number;\n}\n\nexport interface CheckTemplateTypeResponse {\n template_path: string;\n lpips_score: number;\n}"]}
|
|
1
|
+
{"version":3,"file":"type.js","sourceRoot":"","sources":["../../../../src/components/OverLay/type.ts"],"names":[],"mappings":"","sourcesContent":["import { ViewStyle } from \"react-native\";\nimport { ISilentCaptureResult } from \"../../types/KYC.types\";\n\nexport interface IdCardOverlayProps {\n xMin: number;\n yMin: number;\n xMax: number;\n yMax: number;\n cornerOpacity: number;\n instructions: string;\n cornerColor?: string;\n stepperProps?: StepperProps;\n instructionsTile?: string;\n instructionsSubtitle?: string;\n orientation?: 'center' | 'left' | 'right';\n isAnalyzing?: boolean;\n isSuccess?: boolean;\n language: string\n}\n\n\ninterface StepperProps {\n back: () => void;\n selectedDocumentType: string;\n step: number;\n totalSteps: number;\n side: string;\n}\n\nexport interface ExtractMrzTextResponse {\n parsed_data: {\n mrz_type: string;\n document_code: string;\n issuer_code: string;\n surname: string;\n given_name: string;\n document_number: string;\n document_number_checkdigit: string;\n nationality_code: string;\n birth_date: string;\n sex: string;\n expiry_date: string;\n optional_data: string;\n mrz_text: string;\n status: string;\n },\n success: boolean;\n}\n\n\n\nexport interface EnhancedCameraViewProps {\n instructions?: string;\n showCamera: boolean;\n cameraType?: 'front' | 'back';\n style?: ViewStyle;\n onCapture?: (result: { success: boolean; path?: string; error?: string }) => void;\n onSilentCapture?: (result: { success: boolean; path?: string; error?: string }) => void;\n silentCaptureResult?: ISilentCaptureResult;\n onError?: (event: { message: string }) => void;\n onClose?: () => void;\n enableFlash?: boolean;\n enableHdr?: boolean;\n quality?: 'low' | 'medium' | 'high';\n showCaptureButton?: boolean;\n showSwitchCamera?: boolean;\n overlayComponent?: React.ReactNode;\n isProcessing?: boolean; \n bbox?: {\n xMin: number;\n yMin: number;\n xMax: number;\n yMax: number;\n borderColor?: string;\n borderWidth?: number;\n cornerRadius?: number;\n };\n canFlip?: boolean;\n // Video recording props\n enableVideo?: boolean;\n isRecording?: boolean;\n onVideoRecordingStart?: () => void;\n onVideoRecordingStop?: (result: { success: boolean; path?: string; error?: string }) => void;\n videoDuration?: number;\n /** Delay in ms before first auto-capture (lets camera focus and user position document). Recommended 2500–3000 for ID/document capture. */\n captureStabilizationDelayMs?: number;\n}\n\nexport interface CheckTemplateTypeResponse {\n template_path: string;\n lpips_score: number;\n}"]}
|
|
@@ -1,9 +1,10 @@
|
|
|
1
|
+
import React from 'react';
|
|
1
2
|
interface ScanningLineProps {
|
|
2
3
|
yMin: number;
|
|
3
4
|
yMax: number;
|
|
4
5
|
screenWidth: number;
|
|
5
6
|
height: number;
|
|
6
7
|
}
|
|
7
|
-
declare const ScanningLine: ({ yMin, screenWidth, height
|
|
8
|
+
declare const ScanningLine: ({ yMin, yMax, screenWidth, height }: ScanningLineProps) => React.ReactElement;
|
|
8
9
|
export default ScanningLine;
|
|
9
10
|
//# sourceMappingURL=scanningLine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanningLine.d.ts","sourceRoot":"","sources":["../../../../src/components/Svgs/scanningLine.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"scanningLine.d.ts","sourceRoot":"","sources":["../../../../src/components/Svgs/scanningLine.tsx"],"names":[],"mappings":"AAAA,OAAO,KAA4B,MAAM,OAAO,CAAC;AAIjD,UAAU,iBAAiB;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,WAAW,EAAE,MAAM,CAAC;IACpB,MAAM,EAAE,MAAM,CAAC;CAClB;AAED,QAAA,MAAM,YAAY,GAAI,qCAAqC,iBAAiB,KAAG,KAAK,CAAC,YAgEpF,CAAC;AAWF,eAAe,YAAY,CAAC"}
|
|
@@ -1,60 +1,64 @@
|
|
|
1
|
-
import { useEffect,
|
|
2
|
-
import { StyleSheet } from
|
|
3
|
-
import Svg, {
|
|
4
|
-
const ScanningLine = ({ yMin, screenWidth, height
|
|
5
|
-
const
|
|
6
|
-
|
|
7
|
-
direction: 'down'
|
|
8
|
-
});
|
|
1
|
+
import React, { useEffect, useRef } from 'react';
|
|
2
|
+
import { Animated, Easing, StyleSheet } from 'react-native';
|
|
3
|
+
import Svg, { LinearGradient, Rect, Stop, Defs } from 'react-native-svg';
|
|
4
|
+
const ScanningLine = ({ yMin, yMax, screenWidth, height }) => {
|
|
5
|
+
const animatedValue = useRef(new Animated.Value(0)).current;
|
|
6
|
+
const boxHeight = yMax - yMin;
|
|
9
7
|
useEffect(() => {
|
|
10
|
-
const
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
<
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
8
|
+
const startAnimation = () => {
|
|
9
|
+
animatedValue.setValue(0);
|
|
10
|
+
Animated.loop(Animated.timing(animatedValue, {
|
|
11
|
+
toValue: 1,
|
|
12
|
+
duration: 2500,
|
|
13
|
+
easing: Easing.linear,
|
|
14
|
+
useNativeDriver: true,
|
|
15
|
+
})).start();
|
|
16
|
+
};
|
|
17
|
+
startAnimation();
|
|
18
|
+
return () => {
|
|
19
|
+
animatedValue.stopAnimation();
|
|
20
|
+
};
|
|
21
|
+
}, [animatedValue, boxHeight]);
|
|
22
|
+
const translateY = animatedValue.interpolate({
|
|
23
|
+
inputRange: [0, 0.5, 1],
|
|
24
|
+
outputRange: [yMin, yMax, yMin],
|
|
25
|
+
});
|
|
26
|
+
return (<Animated.View style={[
|
|
27
|
+
styles.container,
|
|
28
|
+
{
|
|
29
|
+
width: screenWidth,
|
|
30
|
+
height: height,
|
|
31
|
+
transform: [{ translateY }],
|
|
32
|
+
},
|
|
33
|
+
]} pointerEvents="none">
|
|
34
|
+
<Svg height="4" width={screenWidth}>
|
|
35
|
+
<Defs>
|
|
36
|
+
<LinearGradient id="grad" x1="0%" y1="0%" x2="100%" y2="0%">
|
|
37
|
+
<Stop offset="0%" stopColor="transparent" stopOpacity="0"/>
|
|
38
|
+
<Stop offset="50%" stopColor="#22C55E" stopOpacity="1"/>
|
|
39
|
+
<Stop offset="100%" stopColor="transparent" stopOpacity="0"/>
|
|
40
|
+
</LinearGradient>
|
|
41
|
+
</Defs>
|
|
42
|
+
<Rect x="0" y="0" width={screenWidth} height="4" fill="url(#grad)"/>
|
|
43
|
+
</Svg>
|
|
44
|
+
|
|
45
|
+
<Svg height="40" width={screenWidth} style={{ marginTop: -2 }}>
|
|
46
|
+
<Defs>
|
|
47
|
+
<LinearGradient id="glow" x1="0%" y1="0%" x2="0%" y2="100%">
|
|
48
|
+
<Stop offset="0%" stopColor="#22C55E" stopOpacity="0.4"/>
|
|
49
|
+
<Stop offset="100%" stopColor="#22C55E" stopOpacity="0"/>
|
|
50
|
+
</LinearGradient>
|
|
51
|
+
</Defs>
|
|
52
|
+
<Rect x="0" y="0" width={screenWidth} height="40" fill="url(#glow)"/>
|
|
53
|
+
</Svg>
|
|
54
|
+
</Animated.View>);
|
|
50
55
|
};
|
|
51
56
|
const styles = StyleSheet.create({
|
|
52
|
-
|
|
57
|
+
container: {
|
|
53
58
|
position: 'absolute',
|
|
54
59
|
top: 0,
|
|
55
60
|
left: 0,
|
|
56
|
-
|
|
57
|
-
height: '100%',
|
|
61
|
+
zIndex: 10,
|
|
58
62
|
},
|
|
59
63
|
});
|
|
60
64
|
export default ScanningLine;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"scanningLine.js","sourceRoot":"","sources":["../../../../src/components/Svgs/scanningLine.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA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zD;iBAAA,CAAC,IAAI,CACF;oBAAA,CAAC,cAAc,CAAC,EAAE,CAAC,MAAM,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,MAAM,CACvD;wBAAA,CAAC,IAAI,CAAC,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,KAAK,EACvD;wBAAA,CAAC,IAAI,CAAC,MAAM,CAAC,MAAM,CAAC,SAAS,CAAC,SAAS,CAAC,WAAW,CAAC,GAAG,EAC3D;oBAAA,EAAE,cAAc,CACpB;gBAAA,EAAE,IAAI,CACN;gBAAA,CAAC,IAAI,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,YAAY,EACvE;YAAA,EAAE,GAAG,CACT;QAAA,EAAE,QAAQ,CAAC,IAAI,CAAC,CACnB,CAAC;AACN,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,UAAU,CAAC,MAAM,CAAC;IAC7B,SAAS,EAAE;QACP,QAAQ,EAAE,UAAU;QACpB,GAAG,EAAE,CAAC;QACN,IAAI,EAAE,CAAC;QACP,MAAM,EAAE,EAAE;KACb;CACJ,CAAC,CAAC;AAEH,eAAe,YAAY,CAAC","sourcesContent":["import React, { useEffect, useRef } from 'react';\nimport { Animated, Easing, StyleSheet } from 'react-native';\nimport Svg, { LinearGradient, Rect, Stop, Defs } from 'react-native-svg';\n\ninterface ScanningLineProps {\n yMin: number;\n yMax: number;\n screenWidth: number;\n height: number;\n}\n\nconst ScanningLine = ({ yMin, yMax, screenWidth, height }: ScanningLineProps): React.ReactElement => {\n const animatedValue = useRef(new Animated.Value(0)).current;\n\n const boxHeight = yMax - yMin;\n\n useEffect(() => {\n const startAnimation = () => {\n animatedValue.setValue(0);\n Animated.loop(\n Animated.timing(animatedValue, {\n toValue: 1,\n duration: 2500, \n easing: Easing.linear,\n useNativeDriver: true,\n })\n ).start();\n };\n\n startAnimation();\n \n return () => {\n animatedValue.stopAnimation();\n };\n }, [animatedValue, boxHeight]);\n\n const translateY = animatedValue.interpolate({\n inputRange: [0, 0.5, 1],\n outputRange: [yMin, yMax, yMin], \n });\n\n return (\n <Animated.View\n style={[\n styles.container,\n {\n width: screenWidth,\n height: height,\n transform: [{ translateY }],\n },\n ]}\n pointerEvents=\"none\"\n >\n <Svg height=\"4\" width={screenWidth}>\n <Defs>\n <LinearGradient id=\"grad\" x1=\"0%\" y1=\"0%\" x2=\"100%\" y2=\"0%\">\n <Stop offset=\"0%\" stopColor=\"transparent\" stopOpacity=\"0\" />\n <Stop offset=\"50%\" stopColor=\"#22C55E\" stopOpacity=\"1\" />\n <Stop offset=\"100%\" stopColor=\"transparent\" stopOpacity=\"0\" />\n </LinearGradient>\n </Defs>\n <Rect x=\"0\" y=\"0\" width={screenWidth} height=\"4\" fill=\"url(#grad)\" />\n </Svg>\n \n <Svg height=\"40\" width={screenWidth} style={{ marginTop: -2 }}>\n <Defs>\n <LinearGradient id=\"glow\" x1=\"0%\" y1=\"0%\" x2=\"0%\" y2=\"100%\">\n <Stop offset=\"0%\" stopColor=\"#22C55E\" stopOpacity=\"0.4\" />\n <Stop offset=\"100%\" stopColor=\"#22C55E\" stopOpacity=\"0\" />\n </LinearGradient>\n </Defs>\n <Rect x=\"0\" y=\"0\" width={screenWidth} height=\"40\" fill=\"url(#glow)\" />\n </Svg>\n </Animated.View>\n );\n};\n\nconst styles = StyleSheet.create({\n container: {\n position: 'absolute',\n top: 0,\n left: 0,\n zIndex: 10,\n },\n});\n\nexport default ScanningLine;"]}
|
|
@@ -3,7 +3,7 @@ class KYCConfig {
|
|
|
3
3
|
backendEnvironment = 'PRODUCTION';
|
|
4
4
|
backendUrls = {
|
|
5
5
|
PRODUCTION: 'https://service.sanctumkey.com/api/v1',
|
|
6
|
-
TEST: 'https://kyc-backend.
|
|
6
|
+
TEST: 'https://kyc-backend.SanctumKey.net/api/v1',
|
|
7
7
|
};
|
|
8
8
|
constructor() { }
|
|
9
9
|
static getInstance() {
|