@trustchex/react-native-sdk 1.161.0
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/LICENSE +49 -0
- package/README.md +223 -0
- package/TrustchexSDK.podspec +26 -0
- package/android/build.gradle +103 -0
- package/android/gradle.properties +5 -0
- package/android/src/main/AndroidManifest.xml +11 -0
- package/android/src/main/java/com/trustchex/reactnativesdk/TrustchexSDKModule.kt +40 -0
- package/android/src/main/java/com/trustchex/reactnativesdk/TrustchexSDKPackage.kt +61 -0
- package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/barcodescanner/BarcodeScannerFrameProcessorPlugin.kt +301 -0
- package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/cropper/BitmapUtils.kt +205 -0
- package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/cropper/CropperPlugin.kt +72 -0
- package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/cropper/FrameMetadata.kt +4 -0
- package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/facedetector/FaceDetectorFrameProcessorPlugin.kt +303 -0
- package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/textrecognition/TextRecognitionFrameProcessorPlugin.kt +115 -0
- package/ios/TrustchexSDK.h +5 -0
- package/ios/TrustchexSDK.mm +28 -0
- package/ios/VisionCameraPlugins/BarcodeScanner/BarcodeScannerFrameProcessorPlugin.mm +22 -0
- package/ios/VisionCameraPlugins/BarcodeScanner/BarcodeScannerFrameProcessorPlugin.swift +172 -0
- package/ios/VisionCameraPlugins/Cropper/Cropper-Bridging-Header.h +13 -0
- package/ios/VisionCameraPlugins/Cropper/Cropper.h +20 -0
- package/ios/VisionCameraPlugins/Cropper/Cropper.mm +22 -0
- package/ios/VisionCameraPlugins/Cropper/Cropper.swift +145 -0
- package/ios/VisionCameraPlugins/Cropper/CropperUtils.swift +49 -0
- package/ios/VisionCameraPlugins/FaceDetector/FaceDetectorFrameProcessorPlugin-Bridging-Header.h +4 -0
- package/ios/VisionCameraPlugins/FaceDetector/FaceDetectorFrameProcessorPlugin.mm +22 -0
- package/ios/VisionCameraPlugins/FaceDetector/FaceDetectorFrameProcessorPlugin.swift +320 -0
- package/ios/VisionCameraPlugins/TextRecognition/TextRecognitionFrameProcessorPlugin-Bridging-Header.h +4 -0
- package/ios/VisionCameraPlugins/TextRecognition/TextRecognitionFrameProcessorPlugin.mm +27 -0
- package/ios/VisionCameraPlugins/TextRecognition/TextRecognitionFrameProcessorPlugin.swift +144 -0
- package/lib/module/NativeTrustchexSDK.js +4 -0
- package/lib/module/Screens/Dynamic/ContractAcceptanceScreen.js +141 -0
- package/lib/module/Screens/Dynamic/IdentityDocumentEIDScanningScreen.js +140 -0
- package/lib/module/Screens/Dynamic/IdentityDocumentScanningScreen.js +100 -0
- package/lib/module/Screens/Dynamic/LivenessDetectionScreen.js +596 -0
- package/lib/module/Screens/Static/QrCodeScanningScreen.js +36 -0
- package/lib/module/Screens/Static/ResultScreen.js +627 -0
- package/lib/module/Screens/Static/VerificationSessionCheckScreen.js +381 -0
- package/lib/module/Shared/Animations/face-scan.json +1 -0
- package/lib/module/Shared/Animations/hole.json +76 -0
- package/lib/module/Shared/Animations/hologram-scan.json +1 -0
- package/lib/module/Shared/Animations/id-or-passport.json +1 -0
- package/lib/module/Shared/Animations/light.json +1 -0
- package/lib/module/Shared/Animations/loading.json +1 -0
- package/lib/module/Shared/Animations/nfc-scan.json +1 -0
- package/lib/module/Shared/Animations/nfc.json +1 -0
- package/lib/module/Shared/Animations/scanning.json +1 -0
- package/lib/module/Shared/Animations/success.json +1 -0
- package/lib/module/Shared/Assets/trustchex-logo-black.png +0 -0
- package/lib/module/Shared/Components/EIDScanner.js +372 -0
- package/lib/module/Shared/Components/FaceCamera.js +223 -0
- package/lib/module/Shared/Components/IdentityDocumentCamera.js +968 -0
- package/lib/module/Shared/Components/LanguageSelector.js +53 -0
- package/lib/module/Shared/Components/NativeCircularProgress.js +64 -0
- package/lib/module/Shared/Components/NativeProgressBar.js +53 -0
- package/lib/module/Shared/Components/NavigationManager.js +180 -0
- package/lib/module/Shared/Components/OTPCodeInput.js +74 -0
- package/lib/module/Shared/Components/QrCodeScannerCamera.js +262 -0
- package/lib/module/Shared/Contexts/AppContext.js +27 -0
- package/lib/module/Shared/EIDReader/abstractMRTDCardService.js +4 -0
- package/lib/module/Shared/EIDReader/accessKeySpec.js +1 -0
- package/lib/module/Shared/EIDReader/apduLevelBACCapable.js +1 -0
- package/lib/module/Shared/EIDReader/apduLevelReadBinaryCapable.js +3 -0
- package/lib/module/Shared/EIDReader/bacKey.js +112 -0
- package/lib/module/Shared/EIDReader/bacKeySpec.js +3 -0
- package/lib/module/Shared/EIDReader/cardFileInputStream.js +140 -0
- package/lib/module/Shared/EIDReader/cardService.js +31 -0
- package/lib/module/Shared/EIDReader/cbeff/biometricDataBlock.js +3 -0
- package/lib/module/Shared/EIDReader/cbeff/biometricDataBlockDecoder.js +3 -0
- package/lib/module/Shared/EIDReader/cbeff/biometricDataBlockEncoder.js +3 -0
- package/lib/module/Shared/EIDReader/cbeff/cbeffInfo.js +102 -0
- package/lib/module/Shared/EIDReader/cbeff/complexCBEFFInfo.js +46 -0
- package/lib/module/Shared/EIDReader/cbeff/faceDataBlockDecoder.js +8 -0
- package/lib/module/Shared/EIDReader/cbeff/iso781611.js +79 -0
- package/lib/module/Shared/EIDReader/cbeff/iso781611Decoder.js +141 -0
- package/lib/module/Shared/EIDReader/cbeff/iso781611Encoder.js +53 -0
- package/lib/module/Shared/EIDReader/cbeff/simpleCBEFFInfo.js +21 -0
- package/lib/module/Shared/EIDReader/cbeff/standardBiometricHeader.js +97 -0
- package/lib/module/Shared/EIDReader/cert/cvcPrincipal.js +48 -0
- package/lib/module/Shared/EIDReader/data/country.js +66 -0
- package/lib/module/Shared/EIDReader/data/gender.js +29 -0
- package/lib/module/Shared/EIDReader/data/isoCountry.js +283 -0
- package/lib/module/Shared/EIDReader/data/unicodeCountry.js +278 -0
- package/lib/module/Shared/EIDReader/defaultFileInfo.js +29 -0
- package/lib/module/Shared/EIDReader/defaultFileSystem.js +171 -0
- package/lib/module/Shared/EIDReader/eidReader.js +90 -0
- package/lib/module/Shared/EIDReader/eidService.js +280 -0
- package/lib/module/Shared/EIDReader/fileInfo.js +3 -0
- package/lib/module/Shared/EIDReader/fileSystemCardService.js +4 -0
- package/lib/module/Shared/EIDReader/fragment.js +17 -0
- package/lib/module/Shared/EIDReader/fragmentBuffer.js +130 -0
- package/lib/module/Shared/EIDReader/java/byteArrayInputStream.js +73 -0
- package/lib/module/Shared/EIDReader/java/byteArrayOutputStream.js +55 -0
- package/lib/module/Shared/EIDReader/java/dataInput.js +1 -0
- package/lib/module/Shared/EIDReader/java/dataInputStream.js +167 -0
- package/lib/module/Shared/EIDReader/java/dataOutputStream.js +91 -0
- package/lib/module/Shared/EIDReader/java/filterInputStream.js +134 -0
- package/lib/module/Shared/EIDReader/java/filterOutputStream.js +124 -0
- package/lib/module/Shared/EIDReader/java/inputStream.js +139 -0
- package/lib/module/Shared/EIDReader/java/inputStreamBuffer.js +144 -0
- package/lib/module/Shared/EIDReader/java/objectInputStream.js +39 -0
- package/lib/module/Shared/EIDReader/java/outputStream.js +77 -0
- package/lib/module/Shared/EIDReader/java/positionInputStream.js +50 -0
- package/lib/module/Shared/EIDReader/java/splittableInputStream.js +54 -0
- package/lib/module/Shared/EIDReader/lds/abstractImageInfo.js +137 -0
- package/lib/module/Shared/EIDReader/lds/abstractLDSFile.js +101 -0
- package/lib/module/Shared/EIDReader/lds/abstractLDSInfo.js +29 -0
- package/lib/module/Shared/EIDReader/lds/abstractListInfo.js +66 -0
- package/lib/module/Shared/EIDReader/lds/abstractTaggedLDSFile.js +65 -0
- package/lib/module/Shared/EIDReader/lds/cbeffDataGroup.js +118 -0
- package/lib/module/Shared/EIDReader/lds/cvcaFile.js +89 -0
- package/lib/module/Shared/EIDReader/lds/dataGroup.js +10 -0
- package/lib/module/Shared/EIDReader/lds/icao/comFile.js +101 -0
- package/lib/module/Shared/EIDReader/lds/icao/dg1File.js +33 -0
- package/lib/module/Shared/EIDReader/lds/icao/dg2File.js +42 -0
- package/lib/module/Shared/EIDReader/lds/icao/icaoCountry.js +114 -0
- package/lib/module/Shared/EIDReader/lds/icao/mrzInfo.js +1418 -0
- package/lib/module/Shared/EIDReader/lds/imageInfo.js +3 -0
- package/lib/module/Shared/EIDReader/lds/iso19794/faceImageInfo.js +817 -0
- package/lib/module/Shared/EIDReader/lds/iso19794/faceInfo.js +116 -0
- package/lib/module/Shared/EIDReader/lds/ldsElement.js +1 -0
- package/lib/module/Shared/EIDReader/lds/ldsFile.js +3 -0
- package/lib/module/Shared/EIDReader/nfcManagerCardService.js +44 -0
- package/lib/module/Shared/EIDReader/protocol/bacAPDUSender.js +83 -0
- package/lib/module/Shared/EIDReader/protocol/bacProtocol.js +70 -0
- package/lib/module/Shared/EIDReader/protocol/bacResult.js +32 -0
- package/lib/module/Shared/EIDReader/protocol/readBinaryAPDUSender.js +126 -0
- package/lib/module/Shared/EIDReader/protocol/secureMessagingAPDUSender.js +102 -0
- package/lib/module/Shared/EIDReader/secureMessagingWrapper.js +218 -0
- package/lib/module/Shared/EIDReader/smartcards/apduEvent.js +23 -0
- package/lib/module/Shared/EIDReader/smartcards/apduListener.js +3 -0
- package/lib/module/Shared/EIDReader/smartcards/apduWrapper.js +3 -0
- package/lib/module/Shared/EIDReader/smartcards/commandAPDU.js +124 -0
- package/lib/module/Shared/EIDReader/smartcards/fileSystemStructured.js +3 -0
- package/lib/module/Shared/EIDReader/smartcards/iso7816.js +107 -0
- package/lib/module/Shared/EIDReader/smartcards/responseAPDU.js +35 -0
- package/lib/module/Shared/EIDReader/tlv/asn1Constants.js +48 -0
- package/lib/module/Shared/EIDReader/tlv/tlv.utils.js +186 -0
- package/lib/module/Shared/EIDReader/tlv/tlvInputState.js +141 -0
- package/lib/module/Shared/EIDReader/tlv/tlvInputStream.js +180 -0
- package/lib/module/Shared/EIDReader/tlv/tlvOutputState.js +186 -0
- package/lib/module/Shared/EIDReader/tlv/tlvOutputStream.js +85 -0
- package/lib/module/Shared/EIDReader/tripleDesSecureMessagingWrapper.js +37 -0
- package/lib/module/Shared/EIDReader/utils/crypto.utils.js +218 -0
- package/lib/module/Shared/EIDReader/utils/random.js +166 -0
- package/lib/module/Shared/EIDReader/wrappedAPDUEvent.js +16 -0
- package/lib/module/Shared/Libs/camera.utils.js +32 -0
- package/lib/module/Shared/Libs/contains.js +40 -0
- package/lib/module/Shared/Libs/crypto.utils.js +35 -0
- package/lib/module/Shared/Libs/debounce.utils.js +35 -0
- package/lib/module/Shared/Libs/deeplink.utils.js +20 -0
- package/lib/module/Shared/Libs/demo.utils.js +57 -0
- package/lib/module/Shared/Libs/http-client.js +104 -0
- package/lib/module/Shared/Libs/mrz.utils.js +99 -0
- package/lib/module/Shared/Libs/native-device-info.utils.js +44 -0
- package/lib/module/Shared/Libs/native-keep-awake.utils.js +85 -0
- package/lib/module/Shared/Libs/opencv.utils.js +21 -0
- package/lib/module/Shared/Libs/promise.utils.js +17 -0
- package/lib/module/Shared/Libs/tts.utils.js +31 -0
- package/lib/module/Shared/Types/identificationInfo.js +3 -0
- package/lib/module/Shared/Types/instruction.js +1 -0
- package/lib/module/Shared/Types/livenessIntructionType.js +1 -0
- package/lib/module/Shared/Types/verificationSession.js +3 -0
- package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/components/BarcodeCamera.js +66 -0
- package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useBarcodeScanner.js +46 -0
- package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useCameraPermissions.js +34 -0
- package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/index.js +21 -0
- package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/scanCodes.js +24 -0
- package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/types.js +3 -0
- package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/utils/convert.js +197 -0
- package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/utils/geometry.js +101 -0
- package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/utils/highlights.js +60 -0
- package/lib/module/Shared/VisionCameraPlugins/Cropper/index.js +47 -0
- package/lib/module/Shared/VisionCameraPlugins/FaceDetector/Camera.js +42 -0
- package/lib/module/Shared/VisionCameraPlugins/FaceDetector/detectFaces.js +35 -0
- package/lib/module/Shared/VisionCameraPlugins/FaceDetector/index.js +4 -0
- package/lib/module/Shared/VisionCameraPlugins/FaceDetector/types.js +3 -0
- package/lib/module/Shared/VisionCameraPlugins/TextRecognition/Camera.js +56 -0
- package/lib/module/Shared/VisionCameraPlugins/TextRecognition/PhotoRecognizer.js +20 -0
- package/lib/module/Shared/VisionCameraPlugins/TextRecognition/RemoveLanguageModel.js +9 -0
- package/lib/module/Shared/VisionCameraPlugins/TextRecognition/index.js +6 -0
- package/lib/module/Shared/VisionCameraPlugins/TextRecognition/scanText.js +20 -0
- package/lib/module/Shared/VisionCameraPlugins/TextRecognition/translateText.js +19 -0
- package/lib/module/Shared/VisionCameraPlugins/TextRecognition/types.js +3 -0
- package/lib/module/Translation/Resources/en.js +109 -0
- package/lib/module/Translation/Resources/index.js +4 -0
- package/lib/module/Translation/Resources/tr.js +112 -0
- package/lib/module/Translation/index.js +27 -0
- package/lib/module/Trustchex.js +149 -0
- package/lib/module/index.js +5 -0
- package/lib/module/package.json +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NativeTrustchexSDK.d.ts +8 -0
- package/lib/typescript/src/NativeTrustchexSDK.d.ts.map +1 -0
- package/lib/typescript/src/Screens/Dynamic/ContractAcceptanceScreen.d.ts +3 -0
- package/lib/typescript/src/Screens/Dynamic/ContractAcceptanceScreen.d.ts.map +1 -0
- package/lib/typescript/src/Screens/Dynamic/IdentityDocumentEIDScanningScreen.d.ts +3 -0
- package/lib/typescript/src/Screens/Dynamic/IdentityDocumentEIDScanningScreen.d.ts.map +1 -0
- package/lib/typescript/src/Screens/Dynamic/IdentityDocumentScanningScreen.d.ts +3 -0
- package/lib/typescript/src/Screens/Dynamic/IdentityDocumentScanningScreen.d.ts.map +1 -0
- package/lib/typescript/src/Screens/Dynamic/LivenessDetectionScreen.d.ts +3 -0
- package/lib/typescript/src/Screens/Dynamic/LivenessDetectionScreen.d.ts.map +1 -0
- package/lib/typescript/src/Screens/Static/QrCodeScanningScreen.d.ts +3 -0
- package/lib/typescript/src/Screens/Static/QrCodeScanningScreen.d.ts.map +1 -0
- package/lib/typescript/src/Screens/Static/ResultScreen.d.ts +3 -0
- package/lib/typescript/src/Screens/Static/ResultScreen.d.ts.map +1 -0
- package/lib/typescript/src/Screens/Static/VerificationSessionCheckScreen.d.ts +3 -0
- package/lib/typescript/src/Screens/Static/VerificationSessionCheckScreen.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Components/EIDScanner.d.ts +12 -0
- package/lib/typescript/src/Shared/Components/EIDScanner.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Components/FaceCamera.d.ts +9 -0
- package/lib/typescript/src/Shared/Components/FaceCamera.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Components/IdentityDocumentCamera.d.ts +58 -0
- package/lib/typescript/src/Shared/Components/IdentityDocumentCamera.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Components/LanguageSelector.d.ts +3 -0
- package/lib/typescript/src/Shared/Components/LanguageSelector.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Components/NativeCircularProgress.d.ts +13 -0
- package/lib/typescript/src/Shared/Components/NativeCircularProgress.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Components/NativeProgressBar.d.ts +12 -0
- package/lib/typescript/src/Shared/Components/NativeProgressBar.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Components/NavigationManager.d.ts +11 -0
- package/lib/typescript/src/Shared/Components/NavigationManager.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Components/OTPCodeInput.d.ts +10 -0
- package/lib/typescript/src/Shared/Components/OTPCodeInput.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Components/QrCodeScannerCamera.d.ts +6 -0
- package/lib/typescript/src/Shared/Components/QrCodeScannerCamera.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Contexts/AppContext.d.ts +20 -0
- package/lib/typescript/src/Shared/Contexts/AppContext.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/abstractMRTDCardService.d.ts +50 -0
- package/lib/typescript/src/Shared/EIDReader/abstractMRTDCardService.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/accessKeySpec.d.ts +16 -0
- package/lib/typescript/src/Shared/EIDReader/accessKeySpec.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/apduLevelBACCapable.d.ts +5 -0
- package/lib/typescript/src/Shared/EIDReader/apduLevelBACCapable.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/apduLevelReadBinaryCapable.d.ts +8 -0
- package/lib/typescript/src/Shared/EIDReader/apduLevelReadBinaryCapable.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/bacKey.d.ts +65 -0
- package/lib/typescript/src/Shared/EIDReader/bacKey.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/bacKeySpec.d.ts +24 -0
- package/lib/typescript/src/Shared/EIDReader/bacKeySpec.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cardFileInputStream.d.ts +26 -0
- package/lib/typescript/src/Shared/EIDReader/cardFileInputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cardService.d.ts +22 -0
- package/lib/typescript/src/Shared/EIDReader/cardService.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/biometricDataBlock.d.ts +5 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/biometricDataBlock.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/biometricDataBlockDecoder.d.ts +7 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/biometricDataBlockDecoder.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/biometricDataBlockEncoder.d.ts +6 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/biometricDataBlockEncoder.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/cbeffInfo.d.ts +61 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/cbeffInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/complexCBEFFInfo.d.ts +33 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/complexCBEFFInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/faceDataBlockDecoder.d.ts +8 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/faceDataBlockDecoder.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/iso781611.d.ts +60 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/iso781611.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/iso781611Decoder.d.ts +19 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/iso781611Decoder.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/iso781611Encoder.d.ts +15 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/iso781611Encoder.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/simpleCBEFFInfo.d.ts +18 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/simpleCBEFFInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/standardBiometricHeader.d.ts +43 -0
- package/lib/typescript/src/Shared/EIDReader/cbeff/standardBiometricHeader.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/cert/cvcPrincipal.d.ts +14 -0
- package/lib/typescript/src/Shared/EIDReader/cert/cvcPrincipal.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/data/country.d.ts +14 -0
- package/lib/typescript/src/Shared/EIDReader/data/country.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/data/gender.d.ts +14 -0
- package/lib/typescript/src/Shared/EIDReader/data/gender.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/data/isoCountry.d.ts +268 -0
- package/lib/typescript/src/Shared/EIDReader/data/isoCountry.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/data/unicodeCountry.d.ts +263 -0
- package/lib/typescript/src/Shared/EIDReader/data/unicodeCountry.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/defaultFileInfo.d.ts +14 -0
- package/lib/typescript/src/Shared/EIDReader/defaultFileInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/defaultFileSystem.d.ts +30 -0
- package/lib/typescript/src/Shared/EIDReader/defaultFileSystem.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/eidReader.d.ts +8 -0
- package/lib/typescript/src/Shared/EIDReader/eidReader.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/eidService.d.ts +150 -0
- package/lib/typescript/src/Shared/EIDReader/eidService.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/fileInfo.d.ts +5 -0
- package/lib/typescript/src/Shared/EIDReader/fileInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/fileSystemCardService.d.ts +28 -0
- package/lib/typescript/src/Shared/EIDReader/fileSystemCardService.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/fragment.d.ts +9 -0
- package/lib/typescript/src/Shared/EIDReader/fragment.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/fragmentBuffer.d.ts +22 -0
- package/lib/typescript/src/Shared/EIDReader/fragmentBuffer.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/byteArrayInputStream.d.ts +22 -0
- package/lib/typescript/src/Shared/EIDReader/java/byteArrayInputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/byteArrayOutputStream.d.ts +18 -0
- package/lib/typescript/src/Shared/EIDReader/java/byteArrayOutputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/dataInput.d.ts +17 -0
- package/lib/typescript/src/Shared/EIDReader/java/dataInput.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/dataInputStream.d.ts +28 -0
- package/lib/typescript/src/Shared/EIDReader/java/dataInputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/dataOutputStream.d.ts +18 -0
- package/lib/typescript/src/Shared/EIDReader/java/dataOutputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/filterInputStream.d.ts +103 -0
- package/lib/typescript/src/Shared/EIDReader/java/filterInputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/filterOutputStream.d.ts +83 -0
- package/lib/typescript/src/Shared/EIDReader/java/filterOutputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/inputStream.d.ts +21 -0
- package/lib/typescript/src/Shared/EIDReader/java/inputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/inputStreamBuffer.d.ts +32 -0
- package/lib/typescript/src/Shared/EIDReader/java/inputStreamBuffer.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/objectInputStream.d.ts +11 -0
- package/lib/typescript/src/Shared/EIDReader/java/objectInputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/outputStream.d.ts +64 -0
- package/lib/typescript/src/Shared/EIDReader/java/outputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/positionInputStream.d.ts +17 -0
- package/lib/typescript/src/Shared/EIDReader/java/positionInputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/java/splittableInputStream.d.ts +19 -0
- package/lib/typescript/src/Shared/EIDReader/java/splittableInputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/abstractImageInfo.d.ts +50 -0
- package/lib/typescript/src/Shared/EIDReader/lds/abstractImageInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/abstractLDSFile.d.ts +71 -0
- package/lib/typescript/src/Shared/EIDReader/lds/abstractLDSFile.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/abstractLDSInfo.d.ts +19 -0
- package/lib/typescript/src/Shared/EIDReader/lds/abstractLDSInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/abstractListInfo.d.ts +45 -0
- package/lib/typescript/src/Shared/EIDReader/lds/abstractListInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/abstractTaggedLDSFile.d.ts +18 -0
- package/lib/typescript/src/Shared/EIDReader/lds/abstractTaggedLDSFile.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/cbeffDataGroup.d.ts +59 -0
- package/lib/typescript/src/Shared/EIDReader/lds/cbeffDataGroup.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/cvcaFile.d.ts +19 -0
- package/lib/typescript/src/Shared/EIDReader/lds/cvcaFile.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/dataGroup.d.ts +8 -0
- package/lib/typescript/src/Shared/EIDReader/lds/dataGroup.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/icao/comFile.d.ts +22 -0
- package/lib/typescript/src/Shared/EIDReader/lds/icao/comFile.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/icao/dg1File.d.ts +13 -0
- package/lib/typescript/src/Shared/EIDReader/lds/icao/dg1File.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/icao/dg2File.d.ts +14 -0
- package/lib/typescript/src/Shared/EIDReader/lds/icao/dg2File.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/icao/icaoCountry.d.ts +80 -0
- package/lib/typescript/src/Shared/EIDReader/lds/icao/icaoCountry.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/icao/mrzInfo.d.ts +579 -0
- package/lib/typescript/src/Shared/EIDReader/lds/icao/mrzInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/imageInfo.d.ts +52 -0
- package/lib/typescript/src/Shared/EIDReader/lds/imageInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/iso19794/faceImageInfo.d.ts +392 -0
- package/lib/typescript/src/Shared/EIDReader/lds/iso19794/faceImageInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/iso19794/faceInfo.d.ts +22 -0
- package/lib/typescript/src/Shared/EIDReader/lds/iso19794/faceInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/ldsElement.d.ts +9 -0
- package/lib/typescript/src/Shared/EIDReader/lds/ldsElement.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/lds/ldsFile.d.ts +10 -0
- package/lib/typescript/src/Shared/EIDReader/lds/ldsFile.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/nfcManagerCardService.d.ts +13 -0
- package/lib/typescript/src/Shared/EIDReader/nfcManagerCardService.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/bacAPDUSender.d.ts +9 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/bacAPDUSender.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/bacProtocol.d.ts +17 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/bacProtocol.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/bacResult.d.ts +26 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/bacResult.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/readBinaryAPDUSender.d.ts +15 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/readBinaryAPDUSender.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/secureMessagingAPDUSender.d.ts +19 -0
- package/lib/typescript/src/Shared/EIDReader/protocol/secureMessagingAPDUSender.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/secureMessagingWrapper.d.ts +30 -0
- package/lib/typescript/src/Shared/EIDReader/secureMessagingWrapper.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/apduEvent.d.ts +15 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/apduEvent.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/apduListener.d.ts +5 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/apduListener.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/apduWrapper.d.ts +8 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/apduWrapper.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/commandAPDU.d.ts +20 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/commandAPDU.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/fileSystemStructured.d.ts +7 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/fileSystemStructured.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/iso7816.d.ts +101 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/iso7816.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/responseAPDU.d.ts +13 -0
- package/lib/typescript/src/Shared/EIDReader/smartcards/responseAPDU.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/asn1Constants.d.ts +36 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/asn1Constants.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlv.utils.d.ts +44 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlv.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvInputState.d.ts +34 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvInputState.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvInputStream.d.ts +23 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvInputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvOutputState.d.ts +24 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvOutputState.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvOutputStream.d.ts +16 -0
- package/lib/typescript/src/Shared/EIDReader/tlv/tlvOutputStream.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/tripleDesSecureMessagingWrapper.d.ts +10 -0
- package/lib/typescript/src/Shared/EIDReader/tripleDesSecureMessagingWrapper.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/utils/crypto.utils.d.ts +16 -0
- package/lib/typescript/src/Shared/EIDReader/utils/crypto.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/utils/random.d.ts +25 -0
- package/lib/typescript/src/Shared/EIDReader/utils/random.d.ts.map +1 -0
- package/lib/typescript/src/Shared/EIDReader/wrappedAPDUEvent.d.ts +11 -0
- package/lib/typescript/src/Shared/EIDReader/wrappedAPDUEvent.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/camera.utils.d.ts +5 -0
- package/lib/typescript/src/Shared/Libs/camera.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/contains.d.ts +14 -0
- package/lib/typescript/src/Shared/Libs/contains.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/crypto.utils.d.ts +9 -0
- package/lib/typescript/src/Shared/Libs/crypto.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/debounce.utils.d.ts +10 -0
- package/lib/typescript/src/Shared/Libs/debounce.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/deeplink.utils.d.ts +5 -0
- package/lib/typescript/src/Shared/Libs/deeplink.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/demo.utils.d.ts +5 -0
- package/lib/typescript/src/Shared/Libs/demo.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/http-client.d.ts +27 -0
- package/lib/typescript/src/Shared/Libs/http-client.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/mrz.utils.d.ts +9 -0
- package/lib/typescript/src/Shared/Libs/mrz.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/native-device-info.utils.d.ts +14 -0
- package/lib/typescript/src/Shared/Libs/native-device-info.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/native-keep-awake.utils.d.ts +31 -0
- package/lib/typescript/src/Shared/Libs/native-keep-awake.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/opencv.utils.d.ts +3 -0
- package/lib/typescript/src/Shared/Libs/opencv.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/promise.utils.d.ts +3 -0
- package/lib/typescript/src/Shared/Libs/promise.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Libs/tts.utils.d.ts +6 -0
- package/lib/typescript/src/Shared/Libs/tts.utils.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Types/identificationInfo.d.ts +57 -0
- package/lib/typescript/src/Shared/Types/identificationInfo.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Types/instruction.d.ts +5 -0
- package/lib/typescript/src/Shared/Types/instruction.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Types/livenessIntructionType.d.ts +2 -0
- package/lib/typescript/src/Shared/Types/livenessIntructionType.d.ts.map +1 -0
- package/lib/typescript/src/Shared/Types/verificationSession.d.ts +16 -0
- package/lib/typescript/src/Shared/Types/verificationSession.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/components/BarcodeCamera.d.ts +13 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/components/BarcodeCamera.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useBarcodeScanner.d.ts +13 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useBarcodeScanner.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useCameraPermissions.d.ts +6 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useCameraPermissions.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/index.d.ts +14 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/index.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/scanCodes.d.ts +3 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/scanCodes.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/types.d.ts +52 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/types.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/convert.d.ts +62 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/convert.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/geometry.d.ts +34 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/geometry.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/highlights.d.ts +32 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/highlights.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/Cropper/index.d.ts +23 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/Cropper/index.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/Camera.d.ts +9 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/Camera.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/detectFaces.d.ts +3 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/detectFaces.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/index.d.ts +3 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/index.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/types.d.ts +79 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/types.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/Camera.d.ts +6 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/Camera.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/PhotoRecognizer.d.ts +3 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/PhotoRecognizer.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/RemoveLanguageModel.d.ts +3 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/RemoveLanguageModel.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/index.d.ts +5 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/index.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/scanText.d.ts +3 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/scanText.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/translateText.d.ts +3 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/translateText.d.ts.map +1 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/types.d.ts +67 -0
- package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/types.d.ts.map +1 -0
- package/lib/typescript/src/Translation/Resources/en.d.ts +109 -0
- package/lib/typescript/src/Translation/Resources/en.d.ts.map +1 -0
- package/lib/typescript/src/Translation/Resources/index.d.ts +3 -0
- package/lib/typescript/src/Translation/Resources/index.d.ts.map +1 -0
- package/lib/typescript/src/Translation/Resources/tr.d.ts +112 -0
- package/lib/typescript/src/Translation/Resources/tr.d.ts.map +1 -0
- package/lib/typescript/src/Translation/index.d.ts +3 -0
- package/lib/typescript/src/Translation/index.d.ts.map +1 -0
- package/lib/typescript/src/Trustchex.d.ts +18 -0
- package/lib/typescript/src/Trustchex.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +4 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/package.json +288 -0
- package/src/NativeTrustchexSDK.ts +9 -0
- package/src/Screens/Dynamic/ContractAcceptanceScreen.tsx +165 -0
- package/src/Screens/Dynamic/IdentityDocumentEIDScanningScreen.tsx +205 -0
- package/src/Screens/Dynamic/IdentityDocumentScanningScreen.tsx +152 -0
- package/src/Screens/Dynamic/LivenessDetectionScreen.tsx +699 -0
- package/src/Screens/Static/QrCodeScanningScreen.tsx +37 -0
- package/src/Screens/Static/ResultScreen.tsx +877 -0
- package/src/Screens/Static/VerificationSessionCheckScreen.tsx +524 -0
- package/src/Shared/Animations/face-scan.json +1 -0
- package/src/Shared/Animations/hole.json +76 -0
- package/src/Shared/Animations/hologram-scan.json +1 -0
- package/src/Shared/Animations/id-or-passport.json +1 -0
- package/src/Shared/Animations/light.json +1 -0
- package/src/Shared/Animations/loading.json +1 -0
- package/src/Shared/Animations/nfc-scan.json +1 -0
- package/src/Shared/Animations/nfc.json +1 -0
- package/src/Shared/Animations/scanning.json +1 -0
- package/src/Shared/Animations/success.json +1 -0
- package/src/Shared/Assets/trustchex-logo-black.png +0 -0
- package/src/Shared/Components/EIDScanner.tsx +472 -0
- package/src/Shared/Components/FaceCamera.tsx +267 -0
- package/src/Shared/Components/IdentityDocumentCamera.tsx +1377 -0
- package/src/Shared/Components/LanguageSelector.tsx +62 -0
- package/src/Shared/Components/NativeCircularProgress.tsx +76 -0
- package/src/Shared/Components/NativeProgressBar.tsx +74 -0
- package/src/Shared/Components/NavigationManager.tsx +275 -0
- package/src/Shared/Components/OTPCodeInput.tsx +93 -0
- package/src/Shared/Components/QrCodeScannerCamera.tsx +306 -0
- package/src/Shared/Contexts/AppContext.ts +47 -0
- package/src/Shared/EIDReader/abstractMRTDCardService.ts +195 -0
- package/src/Shared/EIDReader/accessKeySpec.ts +16 -0
- package/src/Shared/EIDReader/apduLevelBACCapable.ts +10 -0
- package/src/Shared/EIDReader/apduLevelReadBinaryCapable.ts +15 -0
- package/src/Shared/EIDReader/bacKey.ts +132 -0
- package/src/Shared/EIDReader/bacKeySpec.ts +26 -0
- package/src/Shared/EIDReader/cardFileInputStream.ts +188 -0
- package/src/Shared/EIDReader/cardService.ts +51 -0
- package/src/Shared/EIDReader/cbeff/biometricDataBlock.ts +5 -0
- package/src/Shared/EIDReader/cbeff/biometricDataBlockDecoder.ts +12 -0
- package/src/Shared/EIDReader/cbeff/biometricDataBlockEncoder.ts +6 -0
- package/src/Shared/EIDReader/cbeff/cbeffInfo.ts +100 -0
- package/src/Shared/EIDReader/cbeff/complexCBEFFInfo.ts +48 -0
- package/src/Shared/EIDReader/cbeff/faceDataBlockDecoder.ts +17 -0
- package/src/Shared/EIDReader/cbeff/iso781611.ts +79 -0
- package/src/Shared/EIDReader/cbeff/iso781611Decoder.ts +242 -0
- package/src/Shared/EIDReader/cbeff/iso781611Encoder.ts +91 -0
- package/src/Shared/EIDReader/cbeff/simpleCBEFFInfo.ts +26 -0
- package/src/Shared/EIDReader/cbeff/standardBiometricHeader.ts +116 -0
- package/src/Shared/EIDReader/cert/cvcPrincipal.ts +63 -0
- package/src/Shared/EIDReader/data/country.ts +76 -0
- package/src/Shared/EIDReader/data/gender.ts +36 -0
- package/src/Shared/EIDReader/data/isoCountry.ts +1251 -0
- package/src/Shared/EIDReader/data/unicodeCountry.ts +1516 -0
- package/src/Shared/EIDReader/defaultFileInfo.ts +41 -0
- package/src/Shared/EIDReader/defaultFileSystem.ts +287 -0
- package/src/Shared/EIDReader/eidReader.ts +113 -0
- package/src/Shared/EIDReader/eidService.ts +349 -0
- package/src/Shared/EIDReader/fileInfo.ts +5 -0
- package/src/Shared/EIDReader/fileSystemCardService.ts +32 -0
- package/src/Shared/EIDReader/fragment.ts +21 -0
- package/src/Shared/EIDReader/fragmentBuffer.ts +191 -0
- package/src/Shared/EIDReader/java/byteArrayInputStream.ts +103 -0
- package/src/Shared/EIDReader/java/byteArrayOutputStream.ts +67 -0
- package/src/Shared/EIDReader/java/dataInput.ts +16 -0
- package/src/Shared/EIDReader/java/dataInputStream.ts +203 -0
- package/src/Shared/EIDReader/java/dataOutputStream.ts +107 -0
- package/src/Shared/EIDReader/java/filterInputStream.ts +138 -0
- package/src/Shared/EIDReader/java/filterOutputStream.ts +126 -0
- package/src/Shared/EIDReader/java/inputStream.ts +186 -0
- package/src/Shared/EIDReader/java/inputStreamBuffer.ts +200 -0
- package/src/Shared/EIDReader/java/objectInputStream.ts +45 -0
- package/src/Shared/EIDReader/java/outputStream.ts +76 -0
- package/src/Shared/EIDReader/java/positionInputStream.ts +64 -0
- package/src/Shared/EIDReader/java/splittableInputStream.ts +69 -0
- package/src/Shared/EIDReader/lds/abstractImageInfo.ts +191 -0
- package/src/Shared/EIDReader/lds/abstractLDSFile.ts +106 -0
- package/src/Shared/EIDReader/lds/abstractLDSInfo.ts +31 -0
- package/src/Shared/EIDReader/lds/abstractListInfo.ts +72 -0
- package/src/Shared/EIDReader/lds/abstractTaggedLDSFile.ts +85 -0
- package/src/Shared/EIDReader/lds/cbeffDataGroup.ts +128 -0
- package/src/Shared/EIDReader/lds/cvcaFile.ts +112 -0
- package/src/Shared/EIDReader/lds/dataGroup.ts +11 -0
- package/src/Shared/EIDReader/lds/icao/comFile.ts +166 -0
- package/src/Shared/EIDReader/lds/icao/dg1File.ts +45 -0
- package/src/Shared/EIDReader/lds/icao/dg2File.ts +54 -0
- package/src/Shared/EIDReader/lds/icao/icaoCountry.ts +253 -0
- package/src/Shared/EIDReader/lds/icao/mrzInfo.ts +1669 -0
- package/src/Shared/EIDReader/lds/imageInfo.ts +58 -0
- package/src/Shared/EIDReader/lds/iso19794/faceImageInfo.ts +948 -0
- package/src/Shared/EIDReader/lds/iso19794/faceInfo.ts +198 -0
- package/src/Shared/EIDReader/lds/ldsElement.ts +8 -0
- package/src/Shared/EIDReader/lds/ldsFile.ts +14 -0
- package/src/Shared/EIDReader/nfcManagerCardService.ts +58 -0
- package/src/Shared/EIDReader/protocol/bacAPDUSender.ts +146 -0
- package/src/Shared/EIDReader/protocol/bacProtocol.ts +121 -0
- package/src/Shared/EIDReader/protocol/bacResult.ts +36 -0
- package/src/Shared/EIDReader/protocol/readBinaryAPDUSender.ts +251 -0
- package/src/Shared/EIDReader/protocol/secureMessagingAPDUSender.ts +170 -0
- package/src/Shared/EIDReader/secureMessagingWrapper.ts +361 -0
- package/src/Shared/EIDReader/smartcards/apduEvent.ts +38 -0
- package/src/Shared/EIDReader/smartcards/apduListener.ts +5 -0
- package/src/Shared/EIDReader/smartcards/apduWrapper.ts +10 -0
- package/src/Shared/EIDReader/smartcards/commandAPDU.ts +172 -0
- package/src/Shared/EIDReader/smartcards/fileSystemStructured.ts +7 -0
- package/src/Shared/EIDReader/smartcards/iso7816.ts +104 -0
- package/src/Shared/EIDReader/smartcards/responseAPDU.ts +44 -0
- package/src/Shared/EIDReader/tlv/asn1Constants.ts +46 -0
- package/src/Shared/EIDReader/tlv/tlv.utils.ts +201 -0
- package/src/Shared/EIDReader/tlv/tlvInputState.ts +186 -0
- package/src/Shared/EIDReader/tlv/tlvInputStream.ts +207 -0
- package/src/Shared/EIDReader/tlv/tlvOutputState.ts +244 -0
- package/src/Shared/EIDReader/tlv/tlvOutputStream.ts +112 -0
- package/src/Shared/EIDReader/tripleDesSecureMessagingWrapper.ts +48 -0
- package/src/Shared/EIDReader/utils/crypto.utils.ts +273 -0
- package/src/Shared/EIDReader/utils/random.ts +198 -0
- package/src/Shared/EIDReader/wrappedAPDUEvent.ts +36 -0
- package/src/Shared/Libs/camera.utils.ts +34 -0
- package/src/Shared/Libs/contains.ts +59 -0
- package/src/Shared/Libs/crypto.utils.ts +47 -0
- package/src/Shared/Libs/debounce.utils.ts +38 -0
- package/src/Shared/Libs/deeplink.utils.ts +19 -0
- package/src/Shared/Libs/demo.utils.ts +82 -0
- package/src/Shared/Libs/http-client.ts +148 -0
- package/src/Shared/Libs/mrz.utils.ts +110 -0
- package/src/Shared/Libs/native-device-info.utils.ts +50 -0
- package/src/Shared/Libs/native-keep-awake.utils.ts +104 -0
- package/src/Shared/Libs/opencv.utils.ts +40 -0
- package/src/Shared/Libs/promise.utils.ts +20 -0
- package/src/Shared/Libs/tts.utils.ts +40 -0
- package/src/Shared/Types/identificationInfo.ts +62 -0
- package/src/Shared/Types/instruction.ts +4 -0
- package/src/Shared/Types/livenessIntructionType.ts +8 -0
- package/src/Shared/Types/verificationSession.ts +17 -0
- package/src/Shared/VisionCameraPlugins/BarcodeScanner/components/BarcodeCamera.tsx +85 -0
- package/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useBarcodeScanner.ts +79 -0
- package/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useCameraPermissions.ts +45 -0
- package/src/Shared/VisionCameraPlugins/BarcodeScanner/index.ts +64 -0
- package/src/Shared/VisionCameraPlugins/BarcodeScanner/scanCodes.ts +30 -0
- package/src/Shared/VisionCameraPlugins/BarcodeScanner/types.ts +82 -0
- package/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/convert.ts +195 -0
- package/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/geometry.ts +135 -0
- package/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/highlights.ts +84 -0
- package/src/Shared/VisionCameraPlugins/Cropper/index.ts +78 -0
- package/src/Shared/VisionCameraPlugins/FaceDetector/Camera.tsx +63 -0
- package/src/Shared/VisionCameraPlugins/FaceDetector/detectFaces.ts +44 -0
- package/src/Shared/VisionCameraPlugins/FaceDetector/index.ts +3 -0
- package/src/Shared/VisionCameraPlugins/FaceDetector/types.ts +99 -0
- package/src/Shared/VisionCameraPlugins/TextRecognition/Camera.tsx +76 -0
- package/src/Shared/VisionCameraPlugins/TextRecognition/PhotoRecognizer.ts +18 -0
- package/src/Shared/VisionCameraPlugins/TextRecognition/RemoveLanguageModel.ts +7 -0
- package/src/Shared/VisionCameraPlugins/TextRecognition/index.ts +7 -0
- package/src/Shared/VisionCameraPlugins/TextRecognition/scanText.ts +27 -0
- package/src/Shared/VisionCameraPlugins/TextRecognition/translateText.ts +21 -0
- package/src/Shared/VisionCameraPlugins/TextRecognition/types.ts +141 -0
- package/src/Translation/Resources/en.ts +151 -0
- package/src/Translation/Resources/index.ts +2 -0
- package/src/Translation/Resources/tr.ts +152 -0
- package/src/Translation/index.ts +37 -0
- package/src/Trustchex.tsx +171 -0
- package/src/index.tsx +5 -0
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
// Main plugin function
|
|
2
|
+
export { createBarcodeScannerPlugin } from './scanCodes';
|
|
3
|
+
|
|
4
|
+
// Create default plugin instance and export scanCodes function
|
|
5
|
+
import { createBarcodeScannerPlugin } from './scanCodes';
|
|
6
|
+
const defaultPlugin = createBarcodeScannerPlugin();
|
|
7
|
+
export const scanCodes = defaultPlugin.scanCodes;
|
|
8
|
+
|
|
9
|
+
// Types
|
|
10
|
+
export type {
|
|
11
|
+
BarcodeType,
|
|
12
|
+
Barcode,
|
|
13
|
+
ScanBarcodesOptions,
|
|
14
|
+
Point,
|
|
15
|
+
Size,
|
|
16
|
+
Rect,
|
|
17
|
+
BoundingBox,
|
|
18
|
+
CornerPoints,
|
|
19
|
+
Highlight,
|
|
20
|
+
FrameProcessorPlugin,
|
|
21
|
+
BarcodeScannerPlugin,
|
|
22
|
+
BarcodeScannerOptions,
|
|
23
|
+
} from './types';
|
|
24
|
+
|
|
25
|
+
// Hooks
|
|
26
|
+
export { useBarcodeScanner } from './hooks/useBarcodeScanner';
|
|
27
|
+
export { useCameraPermissions } from './hooks/useCameraPermissions';
|
|
28
|
+
export type {
|
|
29
|
+
UseBarcodeScannerOptions,
|
|
30
|
+
UseBarcodeScannerResult,
|
|
31
|
+
} from './hooks/useBarcodeScanner';
|
|
32
|
+
export type { UseCameraPermissionResult } from './hooks/useCameraPermissions';
|
|
33
|
+
|
|
34
|
+
// Components
|
|
35
|
+
export { BarcodeCamera } from './components/BarcodeCamera';
|
|
36
|
+
export type { BarcodeCameraProps } from './components/BarcodeCamera';
|
|
37
|
+
|
|
38
|
+
// Utilities
|
|
39
|
+
export {
|
|
40
|
+
convertFrameToScreen,
|
|
41
|
+
convertScreenToFrame,
|
|
42
|
+
convertBarcodeToScreen,
|
|
43
|
+
getRectCenter,
|
|
44
|
+
getCornerPointsCenter,
|
|
45
|
+
getBoundsFromCornerPoints,
|
|
46
|
+
} from './utils/geometry';
|
|
47
|
+
export type { FrameDimensions, ScreenDimensions } from './utils/geometry';
|
|
48
|
+
|
|
49
|
+
export {
|
|
50
|
+
boundingBoxToHighlight,
|
|
51
|
+
barcodesToHighlights,
|
|
52
|
+
getHighlightStyle,
|
|
53
|
+
cornerPointsToPath,
|
|
54
|
+
cornerPointsToPolygonPoints,
|
|
55
|
+
} from './utils/highlights';
|
|
56
|
+
|
|
57
|
+
export {
|
|
58
|
+
barcodeTypeToAndroidFormat,
|
|
59
|
+
barcodeTypeToIOSSymbology,
|
|
60
|
+
androidFormatToBarcodeType,
|
|
61
|
+
iosSymbologyToBarcodeType,
|
|
62
|
+
AndroidBarcodeFormat,
|
|
63
|
+
IOSBarcodeSymbology,
|
|
64
|
+
} from './utils/convert';
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { VisionCameraProxy, type Frame } from 'react-native-vision-camera';
|
|
2
|
+
import type {
|
|
3
|
+
ScanBarcodesOptions,
|
|
4
|
+
Barcode,
|
|
5
|
+
BarcodeScannerPlugin,
|
|
6
|
+
} from './types';
|
|
7
|
+
|
|
8
|
+
const LINKING_ERROR = `Can't load plugin scanCodes. Try cleaning cache or reinstall plugin.`;
|
|
9
|
+
|
|
10
|
+
export function createBarcodeScannerPlugin(): BarcodeScannerPlugin {
|
|
11
|
+
const plugin = VisionCameraProxy.initFrameProcessorPlugin('scanCodes', {});
|
|
12
|
+
|
|
13
|
+
if (!plugin) {
|
|
14
|
+
throw new Error(LINKING_ERROR);
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
return {
|
|
18
|
+
scanCodes: (frame: Frame, options?: ScanBarcodesOptions): Barcode[] => {
|
|
19
|
+
'worklet';
|
|
20
|
+
try {
|
|
21
|
+
// @ts-ignore
|
|
22
|
+
const result = plugin.call(frame, options) as Barcode[];
|
|
23
|
+
return result || [];
|
|
24
|
+
} catch (error) {
|
|
25
|
+
console.warn('scanCodes: Plugin call failed:', error);
|
|
26
|
+
return [];
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
}
|
|
@@ -0,0 +1,82 @@
|
|
|
1
|
+
import type { Frame } from 'react-native-vision-camera';
|
|
2
|
+
|
|
3
|
+
export type Point = {
|
|
4
|
+
x: number;
|
|
5
|
+
y: number;
|
|
6
|
+
};
|
|
7
|
+
|
|
8
|
+
export type Size = {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
};
|
|
12
|
+
|
|
13
|
+
export type Rect = Point & Size;
|
|
14
|
+
|
|
15
|
+
export type Key = string | number | bigint;
|
|
16
|
+
|
|
17
|
+
export type BoundingBox = {
|
|
18
|
+
origin: Point;
|
|
19
|
+
size: Size;
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
export type CornerPoints = Point[];
|
|
23
|
+
export type Highlight = BoundingBox & { key: Key };
|
|
24
|
+
|
|
25
|
+
export type BarcodeType =
|
|
26
|
+
| 'aztec'
|
|
27
|
+
| 'codabar'
|
|
28
|
+
| 'code-128'
|
|
29
|
+
| 'code-39'
|
|
30
|
+
| 'code-93'
|
|
31
|
+
| 'data-matrix'
|
|
32
|
+
| 'ean-13'
|
|
33
|
+
| 'ean-8'
|
|
34
|
+
| 'gs1-databar'
|
|
35
|
+
| 'itf'
|
|
36
|
+
| 'msi-plessey'
|
|
37
|
+
| 'pdf-417'
|
|
38
|
+
| 'qr'
|
|
39
|
+
| 'upc-a'
|
|
40
|
+
| 'upc-e'
|
|
41
|
+
| 'unknown';
|
|
42
|
+
|
|
43
|
+
export type Barcode = {
|
|
44
|
+
value: string | null;
|
|
45
|
+
type: BarcodeType;
|
|
46
|
+
boundingBox: BoundingBox;
|
|
47
|
+
cornerPoints: Point[];
|
|
48
|
+
native?: any;
|
|
49
|
+
};
|
|
50
|
+
|
|
51
|
+
export type ScanBarcodesOptions = {
|
|
52
|
+
barcodeTypes?: BarcodeType[];
|
|
53
|
+
regionOfInterest?: [number, number, number, number];
|
|
54
|
+
};
|
|
55
|
+
|
|
56
|
+
export type BasicParameterType = string | number | boolean | undefined;
|
|
57
|
+
export type ParameterType =
|
|
58
|
+
| BasicParameterType
|
|
59
|
+
| BasicParameterType[]
|
|
60
|
+
| Record<string, BasicParameterType | undefined>;
|
|
61
|
+
|
|
62
|
+
export interface FrameProcessorPlugin {
|
|
63
|
+
call: (
|
|
64
|
+
frame: Frame,
|
|
65
|
+
options?: Record<string, ParameterType>
|
|
66
|
+
) => ParameterType;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
export interface BarcodeScannerPlugin {
|
|
70
|
+
scanCodes: (frame: Frame, options?: ScanBarcodesOptions) => Barcode[];
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
export type BarcodeScannerOptions = {
|
|
74
|
+
barcodeTypes?: BarcodeType[];
|
|
75
|
+
regionOfInterest?: Rect;
|
|
76
|
+
fps?: number;
|
|
77
|
+
onBarcodeScanned: (barcodes: Barcode[], frame: Frame) => void;
|
|
78
|
+
disableHighlighting?: boolean;
|
|
79
|
+
resizeMode?: 'cover' | 'contain';
|
|
80
|
+
scanMode?: 'continuous' | 'once';
|
|
81
|
+
isMountedRef?: { value: boolean };
|
|
82
|
+
};
|
|
@@ -0,0 +1,195 @@
|
|
|
1
|
+
import type { BarcodeType } from '../types';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* ML Kit Android barcode format constants
|
|
5
|
+
*/
|
|
6
|
+
export const AndroidBarcodeFormat = {
|
|
7
|
+
UNKNOWN: -1,
|
|
8
|
+
ALL_FORMATS: 0,
|
|
9
|
+
CODE_128: 1,
|
|
10
|
+
CODE_39: 2,
|
|
11
|
+
CODE_93: 4,
|
|
12
|
+
CODABAR: 8,
|
|
13
|
+
DATA_MATRIX: 16,
|
|
14
|
+
EAN_13: 32,
|
|
15
|
+
EAN_8: 64,
|
|
16
|
+
ITF: 128,
|
|
17
|
+
QR_CODE: 256,
|
|
18
|
+
UPC_A: 512,
|
|
19
|
+
UPC_E: 1024,
|
|
20
|
+
PDF417: 2048,
|
|
21
|
+
AZTEC: 4096,
|
|
22
|
+
} as const;
|
|
23
|
+
|
|
24
|
+
/**
|
|
25
|
+
* iOS Vision framework barcode symbology constants
|
|
26
|
+
*/
|
|
27
|
+
export const IOSBarcodeSymbology = {
|
|
28
|
+
aztec: 'VNBarcodeSymbologyAztec',
|
|
29
|
+
code128: 'VNBarcodeSymbologyCode128',
|
|
30
|
+
code39: 'VNBarcodeSymbologyCode39',
|
|
31
|
+
code39Checksum: 'VNBarcodeSymbologyCode39Checksum',
|
|
32
|
+
code39FullASCII: 'VNBarcodeSymbologyCode39FullASCII',
|
|
33
|
+
code39FullASCIIChecksum: 'VNBarcodeSymbologyCode39FullASCIIChecksum',
|
|
34
|
+
code93: 'VNBarcodeSymbologyCode93',
|
|
35
|
+
code93i: 'VNBarcodeSymbologyCode93i',
|
|
36
|
+
dataMatrix: 'VNBarcodeSymbologyDataMatrix',
|
|
37
|
+
ean13: 'VNBarcodeSymbologyEAN13',
|
|
38
|
+
ean8: 'VNBarcodeSymbologyEAN8',
|
|
39
|
+
face: 'VNBarcodeSymbologyFace',
|
|
40
|
+
i2of5: 'VNBarcodeSymbologyI2of5',
|
|
41
|
+
i2of5Checksum: 'VNBarcodeSymbologyI2of5Checksum',
|
|
42
|
+
itf14: 'VNBarcodeSymbologyITF14',
|
|
43
|
+
pdf417: 'VNBarcodeSymbologyPDF417',
|
|
44
|
+
qr: 'VNBarcodeSymbologyQR',
|
|
45
|
+
upce: 'VNBarcodeSymbologyUPCE',
|
|
46
|
+
codabar: 'VNBarcodeSymbologyCodabar',
|
|
47
|
+
} as const;
|
|
48
|
+
|
|
49
|
+
/**
|
|
50
|
+
* Convert our BarcodeType to Android ML Kit format
|
|
51
|
+
*/
|
|
52
|
+
export const barcodeTypeToAndroidFormat = (type: BarcodeType): number => {
|
|
53
|
+
switch (type) {
|
|
54
|
+
case 'aztec':
|
|
55
|
+
return AndroidBarcodeFormat.AZTEC;
|
|
56
|
+
case 'codabar':
|
|
57
|
+
return AndroidBarcodeFormat.CODABAR;
|
|
58
|
+
case 'code-128':
|
|
59
|
+
return AndroidBarcodeFormat.CODE_128;
|
|
60
|
+
case 'code-39':
|
|
61
|
+
return AndroidBarcodeFormat.CODE_39;
|
|
62
|
+
case 'code-93':
|
|
63
|
+
return AndroidBarcodeFormat.CODE_93;
|
|
64
|
+
case 'data-matrix':
|
|
65
|
+
return AndroidBarcodeFormat.DATA_MATRIX;
|
|
66
|
+
case 'ean-13':
|
|
67
|
+
return AndroidBarcodeFormat.EAN_13;
|
|
68
|
+
case 'ean-8':
|
|
69
|
+
return AndroidBarcodeFormat.EAN_8;
|
|
70
|
+
case 'itf':
|
|
71
|
+
return AndroidBarcodeFormat.ITF;
|
|
72
|
+
case 'pdf-417':
|
|
73
|
+
return AndroidBarcodeFormat.PDF417;
|
|
74
|
+
case 'qr':
|
|
75
|
+
return AndroidBarcodeFormat.QR_CODE;
|
|
76
|
+
case 'upc-a':
|
|
77
|
+
return AndroidBarcodeFormat.UPC_A;
|
|
78
|
+
case 'upc-e':
|
|
79
|
+
return AndroidBarcodeFormat.UPC_E;
|
|
80
|
+
default:
|
|
81
|
+
return AndroidBarcodeFormat.UNKNOWN;
|
|
82
|
+
}
|
|
83
|
+
};
|
|
84
|
+
|
|
85
|
+
/**
|
|
86
|
+
* Convert our BarcodeType to iOS Vision framework symbology
|
|
87
|
+
*/
|
|
88
|
+
export const barcodeTypeToIOSSymbology = (type: BarcodeType): string => {
|
|
89
|
+
switch (type) {
|
|
90
|
+
case 'aztec':
|
|
91
|
+
return IOSBarcodeSymbology.aztec;
|
|
92
|
+
case 'codabar':
|
|
93
|
+
return IOSBarcodeSymbology.codabar;
|
|
94
|
+
case 'code-128':
|
|
95
|
+
return IOSBarcodeSymbology.code128;
|
|
96
|
+
case 'code-39':
|
|
97
|
+
return IOSBarcodeSymbology.code39;
|
|
98
|
+
case 'code-93':
|
|
99
|
+
return IOSBarcodeSymbology.code93;
|
|
100
|
+
case 'data-matrix':
|
|
101
|
+
return IOSBarcodeSymbology.dataMatrix;
|
|
102
|
+
case 'ean-13':
|
|
103
|
+
return IOSBarcodeSymbology.ean13;
|
|
104
|
+
case 'ean-8':
|
|
105
|
+
return IOSBarcodeSymbology.ean8;
|
|
106
|
+
case 'itf':
|
|
107
|
+
return IOSBarcodeSymbology.i2of5;
|
|
108
|
+
case 'pdf-417':
|
|
109
|
+
return IOSBarcodeSymbology.pdf417;
|
|
110
|
+
case 'qr':
|
|
111
|
+
return IOSBarcodeSymbology.qr;
|
|
112
|
+
case 'upc-a':
|
|
113
|
+
return IOSBarcodeSymbology.ean13; // UPC-A is subset of EAN-13
|
|
114
|
+
case 'upc-e':
|
|
115
|
+
return IOSBarcodeSymbology.upce;
|
|
116
|
+
default:
|
|
117
|
+
return IOSBarcodeSymbology.qr; // Default fallback
|
|
118
|
+
}
|
|
119
|
+
};
|
|
120
|
+
|
|
121
|
+
/**
|
|
122
|
+
* Convert Android ML Kit format to our BarcodeType
|
|
123
|
+
*/
|
|
124
|
+
export const androidFormatToBarcodeType = (format: number): BarcodeType => {
|
|
125
|
+
switch (format) {
|
|
126
|
+
case AndroidBarcodeFormat.AZTEC:
|
|
127
|
+
return 'aztec';
|
|
128
|
+
case AndroidBarcodeFormat.CODABAR:
|
|
129
|
+
return 'codabar';
|
|
130
|
+
case AndroidBarcodeFormat.CODE_128:
|
|
131
|
+
return 'code-128';
|
|
132
|
+
case AndroidBarcodeFormat.CODE_39:
|
|
133
|
+
return 'code-39';
|
|
134
|
+
case AndroidBarcodeFormat.CODE_93:
|
|
135
|
+
return 'code-93';
|
|
136
|
+
case AndroidBarcodeFormat.DATA_MATRIX:
|
|
137
|
+
return 'data-matrix';
|
|
138
|
+
case AndroidBarcodeFormat.EAN_13:
|
|
139
|
+
return 'ean-13';
|
|
140
|
+
case AndroidBarcodeFormat.EAN_8:
|
|
141
|
+
return 'ean-8';
|
|
142
|
+
case AndroidBarcodeFormat.ITF:
|
|
143
|
+
return 'itf';
|
|
144
|
+
case AndroidBarcodeFormat.PDF417:
|
|
145
|
+
return 'pdf-417';
|
|
146
|
+
case AndroidBarcodeFormat.QR_CODE:
|
|
147
|
+
return 'qr';
|
|
148
|
+
case AndroidBarcodeFormat.UPC_A:
|
|
149
|
+
return 'upc-a';
|
|
150
|
+
case AndroidBarcodeFormat.UPC_E:
|
|
151
|
+
return 'upc-e';
|
|
152
|
+
default:
|
|
153
|
+
return 'unknown';
|
|
154
|
+
}
|
|
155
|
+
};
|
|
156
|
+
|
|
157
|
+
/**
|
|
158
|
+
* Convert iOS Vision framework symbology to our BarcodeType
|
|
159
|
+
*/
|
|
160
|
+
export const iosSymbologyToBarcodeType = (symbology: string): BarcodeType => {
|
|
161
|
+
switch (symbology) {
|
|
162
|
+
case IOSBarcodeSymbology.aztec:
|
|
163
|
+
return 'aztec';
|
|
164
|
+
case IOSBarcodeSymbology.codabar:
|
|
165
|
+
return 'codabar';
|
|
166
|
+
case IOSBarcodeSymbology.code128:
|
|
167
|
+
return 'code-128';
|
|
168
|
+
case IOSBarcodeSymbology.code39:
|
|
169
|
+
case IOSBarcodeSymbology.code39Checksum:
|
|
170
|
+
case IOSBarcodeSymbology.code39FullASCII:
|
|
171
|
+
case IOSBarcodeSymbology.code39FullASCIIChecksum:
|
|
172
|
+
return 'code-39';
|
|
173
|
+
case IOSBarcodeSymbology.code93:
|
|
174
|
+
case IOSBarcodeSymbology.code93i:
|
|
175
|
+
return 'code-93';
|
|
176
|
+
case IOSBarcodeSymbology.dataMatrix:
|
|
177
|
+
return 'data-matrix';
|
|
178
|
+
case IOSBarcodeSymbology.ean13:
|
|
179
|
+
return 'ean-13';
|
|
180
|
+
case IOSBarcodeSymbology.ean8:
|
|
181
|
+
return 'ean-8';
|
|
182
|
+
case IOSBarcodeSymbology.i2of5:
|
|
183
|
+
case IOSBarcodeSymbology.i2of5Checksum:
|
|
184
|
+
case IOSBarcodeSymbology.itf14:
|
|
185
|
+
return 'itf';
|
|
186
|
+
case IOSBarcodeSymbology.pdf417:
|
|
187
|
+
return 'pdf-417';
|
|
188
|
+
case IOSBarcodeSymbology.qr:
|
|
189
|
+
return 'qr';
|
|
190
|
+
case IOSBarcodeSymbology.upce:
|
|
191
|
+
return 'upc-e';
|
|
192
|
+
default:
|
|
193
|
+
return 'unknown';
|
|
194
|
+
}
|
|
195
|
+
};
|
|
@@ -0,0 +1,135 @@
|
|
|
1
|
+
import type { Barcode, Point, Rect } from '../types';
|
|
2
|
+
|
|
3
|
+
export interface FrameDimensions {
|
|
4
|
+
width: number;
|
|
5
|
+
height: number;
|
|
6
|
+
}
|
|
7
|
+
|
|
8
|
+
export interface ScreenDimensions {
|
|
9
|
+
width: number;
|
|
10
|
+
height: number;
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Convert frame coordinates to screen coordinates
|
|
15
|
+
*/
|
|
16
|
+
export const convertFrameToScreen = (
|
|
17
|
+
point: Point,
|
|
18
|
+
frameDimensions: FrameDimensions,
|
|
19
|
+
screenDimensions: ScreenDimensions
|
|
20
|
+
): Point => {
|
|
21
|
+
const scaleX = screenDimensions.width / frameDimensions.width;
|
|
22
|
+
const scaleY = screenDimensions.height / frameDimensions.height;
|
|
23
|
+
|
|
24
|
+
return {
|
|
25
|
+
x: point.x * scaleX,
|
|
26
|
+
y: point.y * scaleY,
|
|
27
|
+
};
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
/**
|
|
31
|
+
* Convert screen coordinates to frame coordinates
|
|
32
|
+
*/
|
|
33
|
+
export const convertScreenToFrame = (
|
|
34
|
+
point: Point,
|
|
35
|
+
frameDimensions: FrameDimensions,
|
|
36
|
+
screenDimensions: ScreenDimensions
|
|
37
|
+
): Point => {
|
|
38
|
+
const scaleX = frameDimensions.width / screenDimensions.width;
|
|
39
|
+
const scaleY = frameDimensions.height / screenDimensions.height;
|
|
40
|
+
|
|
41
|
+
return {
|
|
42
|
+
x: point.x * scaleX,
|
|
43
|
+
y: point.y * scaleY,
|
|
44
|
+
};
|
|
45
|
+
};
|
|
46
|
+
|
|
47
|
+
/**
|
|
48
|
+
* Convert barcode corner points to screen coordinates
|
|
49
|
+
*/
|
|
50
|
+
export const convertBarcodeToScreen = (
|
|
51
|
+
barcode: Barcode,
|
|
52
|
+
frameDimensions: FrameDimensions,
|
|
53
|
+
screenDimensions: ScreenDimensions
|
|
54
|
+
): Barcode => {
|
|
55
|
+
const convertedCornerPoints = barcode.cornerPoints?.map((point) =>
|
|
56
|
+
convertFrameToScreen(point, frameDimensions, screenDimensions)
|
|
57
|
+
);
|
|
58
|
+
|
|
59
|
+
const convertedBoundingBox = barcode.boundingBox
|
|
60
|
+
? {
|
|
61
|
+
origin: convertFrameToScreen(
|
|
62
|
+
barcode.boundingBox.origin,
|
|
63
|
+
frameDimensions,
|
|
64
|
+
screenDimensions
|
|
65
|
+
),
|
|
66
|
+
size: {
|
|
67
|
+
width:
|
|
68
|
+
(barcode.boundingBox.size.width * screenDimensions.width) /
|
|
69
|
+
frameDimensions.width,
|
|
70
|
+
height:
|
|
71
|
+
(barcode.boundingBox.size.height * screenDimensions.height) /
|
|
72
|
+
frameDimensions.height,
|
|
73
|
+
},
|
|
74
|
+
}
|
|
75
|
+
: barcode.boundingBox;
|
|
76
|
+
|
|
77
|
+
return {
|
|
78
|
+
...barcode,
|
|
79
|
+
cornerPoints: convertedCornerPoints,
|
|
80
|
+
boundingBox: convertedBoundingBox,
|
|
81
|
+
};
|
|
82
|
+
};
|
|
83
|
+
|
|
84
|
+
/**
|
|
85
|
+
* Calculate center point of a rectangle
|
|
86
|
+
*/
|
|
87
|
+
export const getRectCenter = (rect: Rect): Point => {
|
|
88
|
+
return {
|
|
89
|
+
x: rect.x + rect.width / 2,
|
|
90
|
+
y: rect.y + rect.height / 2,
|
|
91
|
+
};
|
|
92
|
+
};
|
|
93
|
+
|
|
94
|
+
/**
|
|
95
|
+
* Calculate center point from corner points
|
|
96
|
+
*/
|
|
97
|
+
export const getCornerPointsCenter = (cornerPoints: Point[]): Point => {
|
|
98
|
+
if (cornerPoints.length === 0) {
|
|
99
|
+
return { x: 0, y: 0 };
|
|
100
|
+
}
|
|
101
|
+
|
|
102
|
+
const sum = cornerPoints.reduce(
|
|
103
|
+
(acc, point) => ({
|
|
104
|
+
x: acc.x + point.x,
|
|
105
|
+
y: acc.y + point.y,
|
|
106
|
+
}),
|
|
107
|
+
{ x: 0, y: 0 }
|
|
108
|
+
);
|
|
109
|
+
|
|
110
|
+
return {
|
|
111
|
+
x: sum.x / cornerPoints.length,
|
|
112
|
+
y: sum.y / cornerPoints.length,
|
|
113
|
+
};
|
|
114
|
+
};
|
|
115
|
+
|
|
116
|
+
/**
|
|
117
|
+
* Calculate bounding rectangle from corner points
|
|
118
|
+
*/
|
|
119
|
+
export const getBoundsFromCornerPoints = (cornerPoints: Point[]): Rect => {
|
|
120
|
+
if (cornerPoints.length === 0) {
|
|
121
|
+
return { x: 0, y: 0, width: 0, height: 0 };
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
const minX = Math.min(...cornerPoints.map((p) => p.x));
|
|
125
|
+
const maxX = Math.max(...cornerPoints.map((p) => p.x));
|
|
126
|
+
const minY = Math.min(...cornerPoints.map((p) => p.y));
|
|
127
|
+
const maxY = Math.max(...cornerPoints.map((p) => p.y));
|
|
128
|
+
|
|
129
|
+
return {
|
|
130
|
+
x: minX,
|
|
131
|
+
y: minY,
|
|
132
|
+
width: maxX - minX,
|
|
133
|
+
height: maxY - minY,
|
|
134
|
+
};
|
|
135
|
+
};
|
|
@@ -0,0 +1,84 @@
|
|
|
1
|
+
import type { Barcode, Highlight, BoundingBox, Point } from '../types';
|
|
2
|
+
import {
|
|
3
|
+
convertBarcodeToScreen,
|
|
4
|
+
type FrameDimensions,
|
|
5
|
+
type ScreenDimensions,
|
|
6
|
+
} from './geometry';
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Convert a BoundingBox to a Highlight with a key
|
|
10
|
+
*/
|
|
11
|
+
export const boundingBoxToHighlight = (
|
|
12
|
+
boundingBox: BoundingBox,
|
|
13
|
+
key: string | number
|
|
14
|
+
): Highlight => {
|
|
15
|
+
return {
|
|
16
|
+
...boundingBox,
|
|
17
|
+
key,
|
|
18
|
+
};
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
/**
|
|
22
|
+
* Convert barcodes to highlights for rendering
|
|
23
|
+
*/
|
|
24
|
+
export const barcodesToHighlights = (
|
|
25
|
+
barcodes: Barcode[],
|
|
26
|
+
frameDimensions: FrameDimensions,
|
|
27
|
+
screenDimensions: ScreenDimensions
|
|
28
|
+
): Highlight[] => {
|
|
29
|
+
return barcodes.map((barcode, index) => {
|
|
30
|
+
const convertedBarcode = convertBarcodeToScreen(
|
|
31
|
+
barcode,
|
|
32
|
+
frameDimensions,
|
|
33
|
+
screenDimensions
|
|
34
|
+
);
|
|
35
|
+
|
|
36
|
+
return boundingBoxToHighlight(
|
|
37
|
+
convertedBarcode.boundingBox,
|
|
38
|
+
barcode.value || `barcode-${index}`
|
|
39
|
+
);
|
|
40
|
+
});
|
|
41
|
+
};
|
|
42
|
+
|
|
43
|
+
/**
|
|
44
|
+
* Get highlight styles for rendering overlay
|
|
45
|
+
*/
|
|
46
|
+
export const getHighlightStyle = (
|
|
47
|
+
highlight: Highlight,
|
|
48
|
+
color: string = '#00FF00',
|
|
49
|
+
borderWidth: number = 2
|
|
50
|
+
) => {
|
|
51
|
+
return {
|
|
52
|
+
position: 'absolute' as const,
|
|
53
|
+
left: highlight.origin.x,
|
|
54
|
+
top: highlight.origin.y,
|
|
55
|
+
width: highlight.size.width,
|
|
56
|
+
height: highlight.size.height,
|
|
57
|
+
borderColor: color,
|
|
58
|
+
borderWidth,
|
|
59
|
+
backgroundColor: 'transparent',
|
|
60
|
+
};
|
|
61
|
+
};
|
|
62
|
+
|
|
63
|
+
/**
|
|
64
|
+
* Create polygon path from corner points for more precise highlighting
|
|
65
|
+
*/
|
|
66
|
+
export const cornerPointsToPath = (cornerPoints: Point[]): string => {
|
|
67
|
+
if (cornerPoints.length === 0) {
|
|
68
|
+
return '';
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
const pathCommands = cornerPoints.map((point, index) => {
|
|
72
|
+
const command = index === 0 ? 'M' : 'L';
|
|
73
|
+
return `${command} ${point.x} ${point.y}`;
|
|
74
|
+
});
|
|
75
|
+
|
|
76
|
+
return `${pathCommands.join(' ')} Z`;
|
|
77
|
+
};
|
|
78
|
+
|
|
79
|
+
/**
|
|
80
|
+
* Get SVG polygon points string from corner points
|
|
81
|
+
*/
|
|
82
|
+
export const cornerPointsToPolygonPoints = (cornerPoints: Point[]): string => {
|
|
83
|
+
return cornerPoints.map((point) => `${point.x},${point.y}`).join(' ');
|
|
84
|
+
};
|
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
import { VisionCameraProxy, type Frame } from 'react-native-vision-camera';
|
|
2
|
+
|
|
3
|
+
const LINKING_ERROR = `Can't load plugin crop. Try cleaning cache or reinstall plugin.`;
|
|
4
|
+
|
|
5
|
+
export function createCropperPlugin(): CropperPlugin {
|
|
6
|
+
const plugin = VisionCameraProxy.initFrameProcessorPlugin('crop', {});
|
|
7
|
+
|
|
8
|
+
if (!plugin) {
|
|
9
|
+
throw new Error(LINKING_ERROR);
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
return {
|
|
13
|
+
crop: (frame: Frame, config?: CropConfig): CropResult => {
|
|
14
|
+
'worklet';
|
|
15
|
+
|
|
16
|
+
if (config) {
|
|
17
|
+
const record: Record<string, any> = {};
|
|
18
|
+
|
|
19
|
+
if (
|
|
20
|
+
config.includeImageBase64 !== undefined &&
|
|
21
|
+
config.includeImageBase64 !== null
|
|
22
|
+
) {
|
|
23
|
+
record.includeImageBase64 = config.includeImageBase64;
|
|
24
|
+
}
|
|
25
|
+
|
|
26
|
+
if (config.saveAsFile !== undefined && config.saveAsFile !== null) {
|
|
27
|
+
record.saveAsFile = config.saveAsFile;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
if (config.saveBitmap !== undefined && config.saveBitmap !== null) {
|
|
31
|
+
record.saveBitmap = config.saveBitmap;
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
if (config.cropRegion) {
|
|
35
|
+
const cropRegionRecord: Record<string, any> = {};
|
|
36
|
+
cropRegionRecord.left = config.cropRegion.left;
|
|
37
|
+
cropRegionRecord.top = config.cropRegion.top;
|
|
38
|
+
cropRegionRecord.width = config.cropRegion.width;
|
|
39
|
+
cropRegionRecord.height = config.cropRegion.height;
|
|
40
|
+
record.cropRegion = cropRegionRecord;
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
return plugin.call(frame, record) as CropResult;
|
|
44
|
+
} else {
|
|
45
|
+
return plugin.call(frame) as CropResult;
|
|
46
|
+
}
|
|
47
|
+
},
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Create default plugin instance and export crop function
|
|
52
|
+
const defaultPlugin = createCropperPlugin();
|
|
53
|
+
export const crop = defaultPlugin.crop;
|
|
54
|
+
|
|
55
|
+
// Types
|
|
56
|
+
export interface CropperPlugin {
|
|
57
|
+
crop: (frame: Frame, config?: CropConfig) => CropResult;
|
|
58
|
+
}
|
|
59
|
+
|
|
60
|
+
// The value is in percentage
|
|
61
|
+
export interface CropRegion {
|
|
62
|
+
left: number;
|
|
63
|
+
top: number;
|
|
64
|
+
width: number;
|
|
65
|
+
height: number;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
export interface CropConfig {
|
|
69
|
+
cropRegion?: CropRegion;
|
|
70
|
+
includeImageBase64?: boolean;
|
|
71
|
+
saveBitmap?: boolean;
|
|
72
|
+
saveAsFile?: boolean;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
export interface CropResult {
|
|
76
|
+
base64?: string;
|
|
77
|
+
path?: string;
|
|
78
|
+
}
|