@trustchex/react-native-sdk 1.355.1 → 1.357.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.
Files changed (254) hide show
  1. package/README.md +2 -9
  2. package/TrustchexSDK.podspec +5 -4
  3. package/android/build.gradle +6 -4
  4. package/android/src/main/AndroidManifest.xml +1 -1
  5. package/android/src/main/java/com/trustchex/reactnativesdk/TrustchexSDKPackage.kt +45 -25
  6. package/android/src/main/java/com/trustchex/reactnativesdk/camera/TrustchexCameraManager.kt +168 -0
  7. package/android/src/main/java/com/trustchex/reactnativesdk/camera/TrustchexCameraView.kt +871 -0
  8. package/android/src/main/java/com/trustchex/reactnativesdk/mlkit/MLKitModule.kt +245 -0
  9. package/android/src/main/java/com/trustchex/reactnativesdk/mrz/MRZValidationModule.kt +785 -0
  10. package/android/src/main/java/com/trustchex/reactnativesdk/mrz/MRZValidator.kt +419 -0
  11. package/android/src/main/java/com/trustchex/reactnativesdk/opencv/OpenCVModule.kt +818 -0
  12. package/ios/Camera/TrustchexCameraManager.m +37 -0
  13. package/ios/Camera/TrustchexCameraManager.swift +125 -0
  14. package/ios/Camera/TrustchexCameraView.swift +1176 -0
  15. package/ios/MLKit/MLKitModule.m +23 -0
  16. package/ios/MLKit/MLKitModule.swift +250 -0
  17. package/ios/MRZValidation.m +39 -0
  18. package/ios/MRZValidation.swift +802 -0
  19. package/ios/MRZValidator.swift +466 -0
  20. package/ios/OpenCV/OpenCVModule.h +4 -0
  21. package/ios/OpenCV/OpenCVModule.mm +810 -0
  22. package/lib/module/Screens/Dynamic/IdentityDocumentEIDScanningScreen.js +2 -3
  23. package/lib/module/Screens/Dynamic/IdentityDocumentScanningScreen.js +1 -2
  24. package/lib/module/Screens/Dynamic/LivenessDetectionScreen.js +418 -193
  25. package/lib/module/Screens/Static/OTPVerificationScreen.js +11 -11
  26. package/lib/module/Screens/Static/QrCodeScanningScreen.js +5 -1
  27. package/lib/module/Screens/Static/ResultScreen.js +25 -2
  28. package/lib/module/Screens/Static/VerificationSessionCheckScreen.js +25 -7
  29. package/lib/module/Shared/Components/DebugNavigationPanel.js +234 -24
  30. package/lib/module/Shared/Components/EIDScanner.js +99 -9
  31. package/lib/module/Shared/Components/FaceCamera.js +170 -179
  32. package/lib/module/Shared/Components/IdentityDocumentCamera.js +2151 -771
  33. package/lib/module/Shared/Components/QrCodeScannerCamera.js +109 -107
  34. package/lib/module/Shared/Components/TrustchexCamera.js +122 -0
  35. package/lib/module/Shared/EIDReader/tlv/tlv.helpers.js +91 -0
  36. package/lib/module/Shared/EIDReader/tlv/tlv.utils.js +2 -124
  37. package/lib/module/Shared/EIDReader/tlv/tlvInputStream.js +4 -4
  38. package/lib/module/Shared/EIDReader/tlv/tlvOutputState.js +4 -4
  39. package/lib/module/Shared/EIDReader/tlv/tlvOutputStream.js +4 -4
  40. package/lib/module/Shared/Libs/analytics.utils.js +2 -2
  41. package/lib/module/Shared/Libs/debug.utils.js +132 -0
  42. package/lib/module/Shared/Libs/deeplink.utils.js +6 -5
  43. package/lib/module/Shared/Libs/demo.utils.js +13 -3
  44. package/lib/module/Shared/Libs/mrz.utils.js +1 -175
  45. package/lib/module/Shared/Libs/native-device-info.utils.js +12 -6
  46. package/lib/module/Shared/Libs/tts.utils.js +40 -6
  47. package/lib/module/Shared/Services/AnalyticsService.js +9 -8
  48. package/lib/module/Shared/Types/mrzFields.js +1 -0
  49. package/lib/module/Translation/Resources/en.js +87 -88
  50. package/lib/module/Translation/Resources/tr.js +84 -85
  51. package/lib/module/Trustchex.js +9 -2
  52. package/lib/module/index.js +1 -0
  53. package/lib/module/version.js +1 -1
  54. package/lib/typescript/src/Screens/Dynamic/IdentityDocumentEIDScanningScreen.d.ts.map +1 -1
  55. package/lib/typescript/src/Screens/Dynamic/IdentityDocumentScanningScreen.d.ts.map +1 -1
  56. package/lib/typescript/src/Screens/Dynamic/LivenessDetectionScreen.d.ts.map +1 -1
  57. package/lib/typescript/src/Screens/Static/OTPVerificationScreen.d.ts.map +1 -1
  58. package/lib/typescript/src/Screens/Static/QrCodeScanningScreen.d.ts.map +1 -1
  59. package/lib/typescript/src/Screens/Static/ResultScreen.d.ts.map +1 -1
  60. package/lib/typescript/src/Screens/Static/VerificationSessionCheckScreen.d.ts.map +1 -1
  61. package/lib/typescript/src/Shared/Components/DebugNavigationPanel.d.ts.map +1 -1
  62. package/lib/typescript/src/Shared/Components/EIDScanner.d.ts +2 -2
  63. package/lib/typescript/src/Shared/Components/EIDScanner.d.ts.map +1 -1
  64. package/lib/typescript/src/Shared/Components/FaceCamera.d.ts +18 -4
  65. package/lib/typescript/src/Shared/Components/FaceCamera.d.ts.map +1 -1
  66. package/lib/typescript/src/Shared/Components/IdentityDocumentCamera.d.ts +3 -4
  67. package/lib/typescript/src/Shared/Components/IdentityDocumentCamera.d.ts.map +1 -1
  68. package/lib/typescript/src/Shared/Components/QrCodeScannerCamera.d.ts +2 -1
  69. package/lib/typescript/src/Shared/Components/QrCodeScannerCamera.d.ts.map +1 -1
  70. package/lib/typescript/src/Shared/Components/TrustchexCamera.d.ts +124 -0
  71. package/lib/typescript/src/Shared/Components/TrustchexCamera.d.ts.map +1 -0
  72. package/lib/typescript/src/Shared/EIDReader/tlv/tlv.helpers.d.ts +11 -0
  73. package/lib/typescript/src/Shared/EIDReader/tlv/tlv.helpers.d.ts.map +1 -0
  74. package/lib/typescript/src/Shared/EIDReader/tlv/tlv.utils.d.ts +2 -39
  75. package/lib/typescript/src/Shared/EIDReader/tlv/tlv.utils.d.ts.map +1 -1
  76. package/lib/typescript/src/Shared/Libs/analytics.utils.d.ts.map +1 -1
  77. package/lib/typescript/src/Shared/Libs/debug.utils.d.ts +42 -0
  78. package/lib/typescript/src/Shared/Libs/debug.utils.d.ts.map +1 -0
  79. package/lib/typescript/src/Shared/Libs/deeplink.utils.d.ts.map +1 -1
  80. package/lib/typescript/src/Shared/Libs/demo.utils.d.ts.map +1 -1
  81. package/lib/typescript/src/Shared/Libs/http-client.d.ts.map +1 -1
  82. package/lib/typescript/src/Shared/Libs/mrz.utils.d.ts +0 -4
  83. package/lib/typescript/src/Shared/Libs/mrz.utils.d.ts.map +1 -1
  84. package/lib/typescript/src/Shared/Libs/native-device-info.utils.d.ts.map +1 -1
  85. package/lib/typescript/src/Shared/Libs/tts.utils.d.ts +4 -3
  86. package/lib/typescript/src/Shared/Libs/tts.utils.d.ts.map +1 -1
  87. package/lib/typescript/src/Shared/Services/AnalyticsService.d.ts.map +1 -1
  88. package/lib/typescript/src/Shared/Types/identificationInfo.d.ts +2 -2
  89. package/lib/typescript/src/Shared/Types/identificationInfo.d.ts.map +1 -1
  90. package/lib/typescript/src/Shared/Types/mrzFields.d.ts +11 -0
  91. package/lib/typescript/src/Shared/Types/mrzFields.d.ts.map +1 -0
  92. package/lib/typescript/src/Translation/Resources/en.d.ts +4 -5
  93. package/lib/typescript/src/Translation/Resources/en.d.ts.map +1 -1
  94. package/lib/typescript/src/Translation/Resources/tr.d.ts +4 -5
  95. package/lib/typescript/src/Translation/Resources/tr.d.ts.map +1 -1
  96. package/lib/typescript/src/Trustchex.d.ts +2 -0
  97. package/lib/typescript/src/Trustchex.d.ts.map +1 -1
  98. package/lib/typescript/src/index.d.ts +1 -0
  99. package/lib/typescript/src/index.d.ts.map +1 -1
  100. package/lib/typescript/src/version.d.ts +1 -1
  101. package/package.json +4 -35
  102. package/src/Screens/Dynamic/ContractAcceptanceScreen.tsx +1 -1
  103. package/src/Screens/Dynamic/IdentityDocumentEIDScanningScreen.tsx +7 -5
  104. package/src/Screens/Dynamic/IdentityDocumentScanningScreen.tsx +2 -3
  105. package/src/Screens/Dynamic/LivenessDetectionScreen.tsx +498 -216
  106. package/src/Screens/Static/OTPVerificationScreen.tsx +37 -31
  107. package/src/Screens/Static/QrCodeScanningScreen.tsx +8 -1
  108. package/src/Screens/Static/ResultScreen.tsx +136 -88
  109. package/src/Screens/Static/VerificationSessionCheckScreen.tsx +46 -13
  110. package/src/Shared/Components/DebugNavigationPanel.tsx +290 -34
  111. package/src/Shared/Components/EIDScanner.tsx +94 -16
  112. package/src/Shared/Components/FaceCamera.tsx +236 -203
  113. package/src/Shared/Components/IdentityDocumentCamera.tsx +3073 -1030
  114. package/src/Shared/Components/QrCodeScannerCamera.tsx +133 -127
  115. package/src/Shared/Components/TrustchexCamera.tsx +289 -0
  116. package/src/Shared/Config/camera-enhancement.config.ts +2 -2
  117. package/src/Shared/EIDReader/tlv/tlv.helpers.ts +96 -0
  118. package/src/Shared/EIDReader/tlv/tlv.utils.ts +2 -125
  119. package/src/Shared/EIDReader/tlv/tlvInputStream.ts +4 -4
  120. package/src/Shared/EIDReader/tlv/tlvOutputState.ts +4 -4
  121. package/src/Shared/EIDReader/tlv/tlvOutputStream.ts +4 -4
  122. package/src/Shared/Libs/analytics.utils.ts +48 -20
  123. package/src/Shared/Libs/debug.utils.ts +149 -0
  124. package/src/Shared/Libs/deeplink.utils.ts +7 -5
  125. package/src/Shared/Libs/demo.utils.ts +4 -0
  126. package/src/Shared/Libs/http-client.ts +12 -8
  127. package/src/Shared/Libs/mrz.utils.ts +1 -163
  128. package/src/Shared/Libs/native-device-info.utils.ts +12 -6
  129. package/src/Shared/Libs/tts.utils.ts +48 -6
  130. package/src/Shared/Services/AnalyticsService.ts +69 -24
  131. package/src/Shared/Types/identificationInfo.ts +2 -2
  132. package/src/Shared/Types/mrzFields.ts +29 -0
  133. package/src/Translation/Resources/en.ts +90 -100
  134. package/src/Translation/Resources/tr.ts +89 -97
  135. package/src/Translation/index.ts +1 -1
  136. package/src/Trustchex.tsx +21 -4
  137. package/src/index.tsx +14 -0
  138. package/src/version.ts +1 -1
  139. package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/barcodescanner/BarcodeScannerFrameProcessorPlugin.kt +0 -301
  140. package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/cropper/BitmapUtils.kt +0 -205
  141. package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/cropper/CropperPlugin.kt +0 -72
  142. package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/cropper/FrameMetadata.kt +0 -4
  143. package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/facedetector/FaceDetectorFrameProcessorPlugin.kt +0 -303
  144. package/android/src/main/java/com/trustchex/reactnativesdk/visioncameraplugins/textrecognition/TextRecognitionFrameProcessorPlugin.kt +0 -115
  145. package/ios/VisionCameraPlugins/BarcodeScanner/BarcodeScannerFrameProcessorPlugin-Bridging-Header.h +0 -9
  146. package/ios/VisionCameraPlugins/BarcodeScanner/BarcodeScannerFrameProcessorPlugin.mm +0 -22
  147. package/ios/VisionCameraPlugins/BarcodeScanner/BarcodeScannerFrameProcessorPlugin.swift +0 -188
  148. package/ios/VisionCameraPlugins/Cropper/Cropper-Bridging-Header.h +0 -13
  149. package/ios/VisionCameraPlugins/Cropper/Cropper.h +0 -20
  150. package/ios/VisionCameraPlugins/Cropper/Cropper.mm +0 -22
  151. package/ios/VisionCameraPlugins/Cropper/Cropper.swift +0 -145
  152. package/ios/VisionCameraPlugins/Cropper/CropperUtils.swift +0 -49
  153. package/ios/VisionCameraPlugins/FaceDetector/FaceDetectorFrameProcessorPlugin-Bridging-Header.h +0 -4
  154. package/ios/VisionCameraPlugins/FaceDetector/FaceDetectorFrameProcessorPlugin.mm +0 -22
  155. package/ios/VisionCameraPlugins/FaceDetector/FaceDetectorFrameProcessorPlugin.swift +0 -320
  156. package/ios/VisionCameraPlugins/TextRecognition/TextRecognitionFrameProcessorPlugin-Bridging-Header.h +0 -4
  157. package/ios/VisionCameraPlugins/TextRecognition/TextRecognitionFrameProcessorPlugin.mm +0 -27
  158. package/ios/VisionCameraPlugins/TextRecognition/TextRecognitionFrameProcessorPlugin.swift +0 -144
  159. package/lib/module/Shared/Libs/camera.utils.js +0 -308
  160. package/lib/module/Shared/Libs/frame-enhancement.utils.js +0 -133
  161. package/lib/module/Shared/Libs/opencv.utils.js +0 -21
  162. package/lib/module/Shared/Libs/worklet.utils.js +0 -68
  163. package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useBarcodeScanner.js +0 -46
  164. package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useCameraPermissions.js +0 -35
  165. package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/index.js +0 -19
  166. package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/scanCodes.js +0 -26
  167. package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/types.js +0 -3
  168. package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/utils/convert.js +0 -197
  169. package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/utils/geometry.js +0 -101
  170. package/lib/module/Shared/VisionCameraPlugins/BarcodeScanner/utils/highlights.js +0 -60
  171. package/lib/module/Shared/VisionCameraPlugins/Cropper/index.js +0 -47
  172. package/lib/module/Shared/VisionCameraPlugins/FaceDetector/Camera.js +0 -42
  173. package/lib/module/Shared/VisionCameraPlugins/FaceDetector/detectFaces.js +0 -35
  174. package/lib/module/Shared/VisionCameraPlugins/FaceDetector/index.js +0 -4
  175. package/lib/module/Shared/VisionCameraPlugins/FaceDetector/types.js +0 -3
  176. package/lib/module/Shared/VisionCameraPlugins/TextRecognition/Camera.js +0 -56
  177. package/lib/module/Shared/VisionCameraPlugins/TextRecognition/PhotoRecognizer.js +0 -20
  178. package/lib/module/Shared/VisionCameraPlugins/TextRecognition/RemoveLanguageModel.js +0 -9
  179. package/lib/module/Shared/VisionCameraPlugins/TextRecognition/index.js +0 -6
  180. package/lib/module/Shared/VisionCameraPlugins/TextRecognition/scanText.js +0 -20
  181. package/lib/module/Shared/VisionCameraPlugins/TextRecognition/translateText.js +0 -19
  182. package/lib/module/Shared/VisionCameraPlugins/TextRecognition/types.js +0 -3
  183. package/lib/typescript/src/Shared/Libs/camera.utils.d.ts +0 -87
  184. package/lib/typescript/src/Shared/Libs/camera.utils.d.ts.map +0 -1
  185. package/lib/typescript/src/Shared/Libs/frame-enhancement.utils.d.ts +0 -25
  186. package/lib/typescript/src/Shared/Libs/frame-enhancement.utils.d.ts.map +0 -1
  187. package/lib/typescript/src/Shared/Libs/opencv.utils.d.ts +0 -3
  188. package/lib/typescript/src/Shared/Libs/opencv.utils.d.ts.map +0 -1
  189. package/lib/typescript/src/Shared/Libs/worklet.utils.d.ts +0 -9
  190. package/lib/typescript/src/Shared/Libs/worklet.utils.d.ts.map +0 -1
  191. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useBarcodeScanner.d.ts +0 -13
  192. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useBarcodeScanner.d.ts.map +0 -1
  193. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useCameraPermissions.d.ts +0 -6
  194. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useCameraPermissions.d.ts.map +0 -1
  195. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/index.d.ts +0 -12
  196. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/index.d.ts.map +0 -1
  197. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/scanCodes.d.ts +0 -3
  198. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/scanCodes.d.ts.map +0 -1
  199. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/types.d.ts +0 -52
  200. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/types.d.ts.map +0 -1
  201. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/convert.d.ts +0 -62
  202. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/convert.d.ts.map +0 -1
  203. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/geometry.d.ts +0 -34
  204. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/geometry.d.ts.map +0 -1
  205. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/highlights.d.ts +0 -32
  206. package/lib/typescript/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/highlights.d.ts.map +0 -1
  207. package/lib/typescript/src/Shared/VisionCameraPlugins/Cropper/index.d.ts +0 -23
  208. package/lib/typescript/src/Shared/VisionCameraPlugins/Cropper/index.d.ts.map +0 -1
  209. package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/Camera.d.ts +0 -9
  210. package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/Camera.d.ts.map +0 -1
  211. package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/detectFaces.d.ts +0 -3
  212. package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/detectFaces.d.ts.map +0 -1
  213. package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/index.d.ts +0 -3
  214. package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/index.d.ts.map +0 -1
  215. package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/types.d.ts +0 -79
  216. package/lib/typescript/src/Shared/VisionCameraPlugins/FaceDetector/types.d.ts.map +0 -1
  217. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/Camera.d.ts +0 -6
  218. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/Camera.d.ts.map +0 -1
  219. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/PhotoRecognizer.d.ts +0 -3
  220. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/PhotoRecognizer.d.ts.map +0 -1
  221. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/RemoveLanguageModel.d.ts +0 -3
  222. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/RemoveLanguageModel.d.ts.map +0 -1
  223. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/index.d.ts +0 -5
  224. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/index.d.ts.map +0 -1
  225. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/scanText.d.ts +0 -3
  226. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/scanText.d.ts.map +0 -1
  227. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/translateText.d.ts +0 -3
  228. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/translateText.d.ts.map +0 -1
  229. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/types.d.ts +0 -67
  230. package/lib/typescript/src/Shared/VisionCameraPlugins/TextRecognition/types.d.ts.map +0 -1
  231. package/src/Shared/Libs/camera.utils.ts +0 -345
  232. package/src/Shared/Libs/frame-enhancement.utils.ts +0 -217
  233. package/src/Shared/Libs/opencv.utils.ts +0 -40
  234. package/src/Shared/Libs/worklet.utils.ts +0 -72
  235. package/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useBarcodeScanner.ts +0 -79
  236. package/src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useCameraPermissions.ts +0 -46
  237. package/src/Shared/VisionCameraPlugins/BarcodeScanner/index.ts +0 -60
  238. package/src/Shared/VisionCameraPlugins/BarcodeScanner/scanCodes.ts +0 -32
  239. package/src/Shared/VisionCameraPlugins/BarcodeScanner/types.ts +0 -82
  240. package/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/convert.ts +0 -195
  241. package/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/geometry.ts +0 -135
  242. package/src/Shared/VisionCameraPlugins/BarcodeScanner/utils/highlights.ts +0 -84
  243. package/src/Shared/VisionCameraPlugins/Cropper/index.ts +0 -78
  244. package/src/Shared/VisionCameraPlugins/FaceDetector/Camera.tsx +0 -63
  245. package/src/Shared/VisionCameraPlugins/FaceDetector/detectFaces.ts +0 -44
  246. package/src/Shared/VisionCameraPlugins/FaceDetector/index.ts +0 -3
  247. package/src/Shared/VisionCameraPlugins/FaceDetector/types.ts +0 -99
  248. package/src/Shared/VisionCameraPlugins/TextRecognition/Camera.tsx +0 -76
  249. package/src/Shared/VisionCameraPlugins/TextRecognition/PhotoRecognizer.ts +0 -18
  250. package/src/Shared/VisionCameraPlugins/TextRecognition/RemoveLanguageModel.ts +0 -7
  251. package/src/Shared/VisionCameraPlugins/TextRecognition/index.ts +0 -7
  252. package/src/Shared/VisionCameraPlugins/TextRecognition/scanText.ts +0 -27
  253. package/src/Shared/VisionCameraPlugins/TextRecognition/translateText.ts +0 -21
  254. package/src/Shared/VisionCameraPlugins/TextRecognition/types.ts +0 -141
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- import { NativeModules, Platform } from 'react-native';
4
- export async function PhotoRecognizer(options) {
5
- const {
6
- PhotoRecognizerModule
7
- } = NativeModules;
8
- const {
9
- uri,
10
- orientation
11
- } = options;
12
- if (!uri) {
13
- throw Error("Can't resolve img uri");
14
- }
15
- if (Platform.OS === 'ios') {
16
- return await PhotoRecognizerModule.process(uri.replace('file://', ''), orientation || 'portrait');
17
- } else {
18
- return await PhotoRecognizerModule.process(uri);
19
- }
20
- }
@@ -1,9 +0,0 @@
1
- "use strict";
2
-
3
- import { NativeModules } from 'react-native';
4
- export async function RemoveLanguageModel(code) {
5
- const {
6
- RemoveLanguageModel: Remove
7
- } = NativeModules;
8
- return await Remove.remove(code);
9
- }
@@ -1,6 +0,0 @@
1
- "use strict";
2
-
3
- export { Camera, useTranslate, useTextRecognition } from "./Camera.js";
4
- export { RemoveLanguageModel } from "./RemoveLanguageModel.js";
5
- export { PhotoRecognizer } from "./PhotoRecognizer.js";
6
- export * from "./types.js";
@@ -1,20 +0,0 @@
1
- "use strict";
2
-
3
- import { VisionCameraProxy } from 'react-native-vision-camera';
4
- const LINKING_ERROR = `Can't load plugin scanText.Try cleaning cache or reinstall plugin.`;
5
- export function createTextRecognitionPlugin(options) {
6
- const plugin = VisionCameraProxy.initFrameProcessorPlugin('scanText', {
7
- ...options
8
- });
9
- if (!plugin) {
10
- throw new Error(LINKING_ERROR);
11
- }
12
- return {
13
- scanText: frame => {
14
- 'worklet';
15
-
16
- // @ts-ignore
17
- return plugin.call(frame);
18
- }
19
- };
20
- }
@@ -1,19 +0,0 @@
1
- "use strict";
2
-
3
- import { VisionCameraProxy } from 'react-native-vision-camera';
4
- const LINKING_ERROR = `Can't load plugin translate.Try cleaning cache or reinstall plugin.`;
5
- export function createTranslatorPlugin(options) {
6
- const plugin = VisionCameraProxy.initFrameProcessorPlugin('translate', {
7
- ...options
8
- });
9
- if (!plugin) {
10
- throw new Error(LINKING_ERROR);
11
- }
12
- return {
13
- translate: frame => {
14
- 'worklet';
15
-
16
- return plugin.call(frame);
17
- }
18
- };
19
- }
@@ -1,3 +0,0 @@
1
- "use strict";
2
-
3
- export {};
@@ -1,87 +0,0 @@
1
- import type { Frame } from 'react-native-vision-camera';
2
- interface Rect {
3
- minX: number;
4
- minY: number;
5
- width: number;
6
- height: number;
7
- }
8
- /**
9
- * Check if frame is blurry using Laplacian variance
10
- * Uses both horizontal and vertical gradients for more accurate blur detection
11
- * Lower variance indicates a blurrier image
12
- * @param frame - The camera frame to analyze
13
- * @param threshold - Variance threshold below which image is considered blurry (default: 10)
14
- * @returns true if image is blurry, false otherwise
15
- */
16
- declare const isBlurry: (frame: Frame, threshold?: number) => boolean;
17
- /**
18
- * Get average brightness for entire frame (center area)
19
- */
20
- declare const getAverageBrightness: (frame: Frame) => number;
21
- /**
22
- * Get average brightness for a specific circular region (for face detection)
23
- * Calculates brightness only for pixels inside the circle defined by centerX, centerY, and radius
24
- */
25
- declare const getCircularRegionBrightness: (frame: Frame, circleRect: Rect) => number;
26
- declare const isFrameBright: (frame: Frame) => boolean;
27
- /**
28
- * Check if a circular region in the frame is bright enough
29
- */
30
- declare const isCircularRegionBright: (frame: Frame, circleRect: Rect, threshold?: number) => boolean;
31
- /**
32
- * Get average brightness for a specific rectangular region
33
- */
34
- declare const getRegionBrightness: (frame: Frame, bounds: Rect) => number;
35
- /**
36
- * Calculate adaptive exposure step based on distance from target brightness
37
- * Uses smooth scaling to prevent abrupt exposure changes that could cause dark frames
38
- */
39
- declare const calculateExposureStep: (currentBrightness: number, targetBrightness: number) => number;
40
- /**
41
- * Get the center point of the scan area
42
- * Scan area is typically 36%-64% of vertical space
43
- */
44
- declare const getScanAreaCenterPoint: (width: number, height: number) => {
45
- x: number;
46
- y: number;
47
- };
48
- /**
49
- * Document dimensions (in mm) for reference
50
- */
51
- declare const DOCUMENT_DIMENSIONS: {
52
- ID_CARD: {
53
- width: number;
54
- height: number;
55
- ratio: number;
56
- };
57
- PASSPORT: {
58
- width: number;
59
- height: number;
60
- ratio: number;
61
- };
62
- };
63
- /**
64
- * Detected document information
65
- */
66
- export interface DetectedDocument {
67
- type: 'ID_CARD' | 'PASSPORT' | 'UNKNOWN';
68
- size: 'TOO_SMALL' | 'TOO_LARGE' | 'GOOD';
69
- aspectRatio: number;
70
- confidence: number;
71
- framePercentage: number;
72
- }
73
- /**
74
- * Detect document contours and estimate document type based on aspect ratio
75
- * This is a simplified detection that looks for rectangular contours in the scan area
76
- * @param frame - The camera frame to analyze
77
- * @param scanAreaBounds - The bounds of the scan area {x, y, width, height}
78
- * @returns Detected document info or null if no document detected
79
- */
80
- declare const detectDocumentInFrame: (frame: Frame, scanAreaBounds: {
81
- x: number;
82
- y: number;
83
- width: number;
84
- height: number;
85
- }) => DetectedDocument | null;
86
- export { isBlurry, isFrameBright, getAverageBrightness, getCircularRegionBrightness, isCircularRegionBright, getRegionBrightness, calculateExposureStep, getScanAreaCenterPoint, detectDocumentInFrame, DOCUMENT_DIMENSIONS, };
87
- //# sourceMappingURL=camera.utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"camera.utils.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/camera.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,UAAU,IAAI;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;;;;;;GAOG;AACH,QAAA,MAAM,QAAQ,GAAI,OAAO,KAAK,EAAE,YAAW,MAAW,KAAG,OAgDxD,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,oBAAoB,GAAI,OAAO,KAAK,KAAG,MAwB5C,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,2BAA2B,GAC/B,OAAO,KAAK,EACZ,YAAY,IAAI,KACf,MAwCF,CAAC;AAEF,QAAA,MAAM,aAAa,GAAI,OAAO,KAAK,KAAG,OAGrC,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,sBAAsB,GAAI,OAAO,KAAK,EAAE,YAAY,IAAI,EAAE,YAAW,MAAW,KAAG,OAGxF,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,mBAAmB,GAAI,OAAO,KAAK,EAAE,QAAQ,IAAI,KAAG,MA0BzD,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,qBAAqB,GAAI,mBAAmB,MAAM,EAAE,kBAAkB,MAAM,KAAG,MAOpF,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,sBAAsB,GAAI,OAAO,MAAM,EAAE,QAAQ,MAAM,KAAG;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAA;CAUrF,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,mBAAmB;;;;;;;;;;;CAGxB,CAAC;AAEF;;GAEG;AACH,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,SAAS,GAAG,UAAU,GAAG,SAAS,CAAC;IACzC,IAAI,EAAE,WAAW,GAAG,WAAW,GAAG,MAAM,CAAC;IACzC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,eAAe,EAAE,MAAM,CAAC;CACzB;AAED;;;;;;GAMG;AACH,QAAA,MAAM,qBAAqB,GACzB,OAAO,KAAK,EACZ,gBAAgB;IAAE,CAAC,EAAE,MAAM,CAAC;IAAC,CAAC,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAA;CAAE,KACtE,gBAAgB,GAAG,IAoFrB,CAAC;AAEF,OAAO,EACL,QAAQ,EACR,aAAa,EACb,oBAAoB,EACpB,2BAA2B,EAC3B,sBAAsB,EACtB,mBAAmB,EACnB,qBAAqB,EACrB,sBAAsB,EACtB,qBAAqB,EACrB,mBAAmB,GACpB,CAAC"}
@@ -1,25 +0,0 @@
1
- import type { Frame } from 'react-native-vision-camera';
2
- import { type Mat } from 'react-native-fast-opencv';
3
- /**
4
- * Convert YUV frame to BGR Mat for OpenCV processing
5
- */
6
- declare const convertYUVToBGR: (frame: Frame) => Mat;
7
- /**
8
- * Apply CLAHE (Contrast Limited Adaptive Histogram Equalization) to enhance frame
9
- * This improves text and face recognition in varying lighting conditions
10
- */
11
- declare const enhanceFrameForOCR: (frame: Frame, options?: {
12
- clipLimit?: number;
13
- tileGridSize?: number;
14
- }) => Mat;
15
- /**
16
- * Apply sharpening to enhance text clarity
17
- * Uses unsharp mask technique
18
- */
19
- declare const sharpenForText: (mat: Mat, amount?: number) => Mat;
20
- /**
21
- * Determine if frame should be enhanced based on current scanning state
22
- */
23
- declare const shouldEnhanceFrame: (nextStep: string, detectedFaces: number, mrzRetryCount: number) => boolean;
24
- export { convertYUVToBGR, enhanceFrameForOCR, sharpenForText, shouldEnhanceFrame, };
25
- //# sourceMappingURL=frame-enhancement.utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"frame-enhancement.utils.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/frame-enhancement.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AACxD,OAAO,EAGL,KAAK,GAAG,EAGT,MAAM,0BAA0B,CAAC;AAMlC;;GAEG;AACH,QAAA,MAAM,eAAe,GAAI,OAAO,KAAK,KAAG,GAmCvC,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,kBAAkB,GACtB,OAAO,KAAK,EACZ,UAAU;IACR,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,CAAC,EAAE,MAAM,CAAC;CACvB,KACA,GA0EF,CAAC;AAEF;;;GAGG;AACH,QAAA,MAAM,cAAc,GAAI,KAAK,GAAG,EAAE,SAAQ,MAAY,KAAG,GAgCxD,CAAC;AAEF;;GAEG;AACH,QAAA,MAAM,kBAAkB,GACtB,UAAU,MAAM,EAChB,eAAe,MAAM,EACrB,eAAe,MAAM,KACpB,OAyBF,CAAC;AAEF,OAAO,EACL,eAAe,EACf,kBAAkB,EAClB,cAAc,EACd,kBAAkB,GACnB,CAAC"}
@@ -1,3 +0,0 @@
1
- declare const isImageBright: (width: number, height: number, frameBuffer: Uint8Array) => boolean;
2
- export { isImageBright };
3
- //# sourceMappingURL=opencv.utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"opencv.utils.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/opencv.utils.ts"],"names":[],"mappings":"AAOA,QAAA,MAAM,aAAa,GACjB,OAAO,MAAM,EACb,QAAQ,MAAM,EACd,aAAa,UAAU,YA2BxB,CAAC;AAEF,OAAO,EAAE,aAAa,EAAE,CAAC"}
@@ -1,9 +0,0 @@
1
- import type { Frame } from 'react-native-vision-camera';
2
- /**
3
- * Runs the given func asynchronously on a separate thread,
4
- * allowing the Frame Processor to continue executing without dropping a Frame.
5
- *
6
- * @note This is a custom implementation. For most cases, use runAsync from react-native-vision-camera.
7
- */
8
- export declare function runAsync(frame: Frame, func: () => void): void;
9
- //# sourceMappingURL=worklet.utils.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"worklet.utils.d.ts","sourceRoot":"","sources":["../../../../../src/Shared/Libs/worklet.utils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAiB,MAAM,4BAA4B,CAAC;AAgDvE;;;;;GAKG;AACH,wBAAgB,QAAQ,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,IAAI,GAAG,IAAI,CAiB7D"}
@@ -1,13 +0,0 @@
1
- import type { Frame } from 'react-native-vision-camera';
2
- import type { Barcode, ScanBarcodesOptions } from '../types';
3
- export interface UseBarcodeScannerOptions extends ScanBarcodesOptions {
4
- onBarcodeScanned?: (barcodes: Barcode[]) => void;
5
- onError?: (error: Error) => void;
6
- }
7
- export interface UseBarcodeScannerResult {
8
- scanBarcodes: (frame: Frame) => Barcode[];
9
- barcodes: Barcode[];
10
- isScanning: boolean;
11
- }
12
- export declare const useBarcodeScanner: (options?: UseBarcodeScannerOptions) => UseBarcodeScannerResult;
13
- //# sourceMappingURL=useBarcodeScanner.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useBarcodeScanner.d.ts","sourceRoot":"","sources":["../../../../../../../src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useBarcodeScanner.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,OAAO,KAAK,EAAE,OAAO,EAAE,mBAAmB,EAAE,MAAM,UAAU,CAAC;AAE7D,MAAM,WAAW,wBAAyB,SAAQ,mBAAmB;IACnE,gBAAgB,CAAC,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,KAAK,IAAI,CAAC;IACjD,OAAO,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;CAClC;AAED,MAAM,WAAW,uBAAuB;IACtC,YAAY,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,OAAO,EAAE,CAAC;IAC1C,QAAQ,EAAE,OAAO,EAAE,CAAC;IACpB,UAAU,EAAE,OAAO,CAAC;CACrB;AAKD,eAAO,MAAM,iBAAiB,GAC5B,UAAS,wBAA6B,KACrC,uBAyDF,CAAC"}
@@ -1,6 +0,0 @@
1
- export interface UseCameraPermissionResult {
2
- hasPermission: boolean;
3
- requestPermission: () => Promise<boolean>;
4
- }
5
- export declare const useCameraPermissions: () => UseCameraPermissionResult;
6
- //# sourceMappingURL=useCameraPermissions.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"useCameraPermissions.d.ts","sourceRoot":"","sources":["../../../../../../../src/Shared/VisionCameraPlugins/BarcodeScanner/hooks/useCameraPermissions.ts"],"names":[],"mappings":"AAIA,MAAM,WAAW,yBAAyB;IACxC,aAAa,EAAE,OAAO,CAAC;IACvB,iBAAiB,EAAE,MAAM,OAAO,CAAC,OAAO,CAAC,CAAC;CAC3C;AAED,eAAO,MAAM,oBAAoB,QAAO,yBAoCvC,CAAC"}
@@ -1,12 +0,0 @@
1
- export { createBarcodeScannerPlugin } from './scanCodes';
2
- export declare const scanCodes: (frame: import("react-native-vision-camera").Frame, options?: import("./types").ScanBarcodesOptions) => import("./types").Barcode[];
3
- export type { BarcodeType, Barcode, ScanBarcodesOptions, Point, Size, Rect, BoundingBox, CornerPoints, Highlight, FrameProcessorPlugin, BarcodeScannerPlugin, BarcodeScannerOptions, } from './types';
4
- export { useBarcodeScanner } from './hooks/useBarcodeScanner';
5
- export { useCameraPermissions } from './hooks/useCameraPermissions';
6
- export type { UseBarcodeScannerOptions, UseBarcodeScannerResult, } from './hooks/useBarcodeScanner';
7
- export type { UseCameraPermissionResult } from './hooks/useCameraPermissions';
8
- export { convertFrameToScreen, convertScreenToFrame, convertBarcodeToScreen, getRectCenter, getCornerPointsCenter, getBoundsFromCornerPoints, } from './utils/geometry';
9
- export type { FrameDimensions, ScreenDimensions } from './utils/geometry';
10
- export { boundingBoxToHighlight, barcodesToHighlights, getHighlightStyle, cornerPointsToPath, cornerPointsToPolygonPoints, } from './utils/highlights';
11
- export { barcodeTypeToAndroidFormat, barcodeTypeToIOSSymbology, androidFormatToBarcodeType, iosSymbologyToBarcodeType, AndroidBarcodeFormat, IOSBarcodeSymbology, } from './utils/convert';
12
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/VisionCameraPlugins/BarcodeScanner/index.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,0BAA0B,EAAE,MAAM,aAAa,CAAC;AAKzD,eAAO,MAAM,SAAS,qIAA0B,CAAC;AAGjD,YAAY,EACV,WAAW,EACX,OAAO,EACP,mBAAmB,EACnB,KAAK,EACL,IAAI,EACJ,IAAI,EACJ,WAAW,EACX,YAAY,EACZ,SAAS,EACT,oBAAoB,EACpB,oBAAoB,EACpB,qBAAqB,GACtB,MAAM,SAAS,CAAC;AAGjB,OAAO,EAAE,iBAAiB,EAAE,MAAM,2BAA2B,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,MAAM,8BAA8B,CAAC;AACpE,YAAY,EACV,wBAAwB,EACxB,uBAAuB,GACxB,MAAM,2BAA2B,CAAC;AACnC,YAAY,EAAE,yBAAyB,EAAE,MAAM,8BAA8B,CAAC;AAG9E,OAAO,EACL,oBAAoB,EACpB,oBAAoB,EACpB,sBAAsB,EACtB,aAAa,EACb,qBAAqB,EACrB,yBAAyB,GAC1B,MAAM,kBAAkB,CAAC;AAC1B,YAAY,EAAE,eAAe,EAAE,gBAAgB,EAAE,MAAM,kBAAkB,CAAC;AAE1E,OAAO,EACL,sBAAsB,EACtB,oBAAoB,EACpB,iBAAiB,EACjB,kBAAkB,EAClB,2BAA2B,GAC5B,MAAM,oBAAoB,CAAC;AAE5B,OAAO,EACL,0BAA0B,EAC1B,yBAAyB,EACzB,0BAA0B,EAC1B,yBAAyB,EACzB,oBAAoB,EACpB,mBAAmB,GACpB,MAAM,iBAAiB,CAAC"}
@@ -1,3 +0,0 @@
1
- import type { BarcodeScannerPlugin } from './types';
2
- export declare function createBarcodeScannerPlugin(): BarcodeScannerPlugin;
3
- //# sourceMappingURL=scanCodes.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"scanCodes.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/VisionCameraPlugins/BarcodeScanner/scanCodes.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,oBAAoB,EACrB,MAAM,SAAS,CAAC;AAIjB,wBAAgB,0BAA0B,IAAI,oBAAoB,CAsBjE"}
@@ -1,52 +0,0 @@
1
- import type { Frame } from 'react-native-vision-camera';
2
- export type Point = {
3
- x: number;
4
- y: number;
5
- };
6
- export type Size = {
7
- width: number;
8
- height: number;
9
- };
10
- export type Rect = Point & Size;
11
- export type Key = string | number | bigint;
12
- export type BoundingBox = {
13
- origin: Point;
14
- size: Size;
15
- };
16
- export type CornerPoints = Point[];
17
- export type Highlight = BoundingBox & {
18
- key: Key;
19
- };
20
- export type BarcodeType = 'aztec' | 'codabar' | 'code-128' | 'code-39' | 'code-93' | 'data-matrix' | 'ean-13' | 'ean-8' | 'gs1-databar' | 'itf' | 'msi-plessey' | 'pdf-417' | 'qr' | 'upc-a' | 'upc-e' | 'unknown';
21
- export type Barcode = {
22
- value: string | null;
23
- type: BarcodeType;
24
- boundingBox: BoundingBox;
25
- cornerPoints: Point[];
26
- native?: any;
27
- };
28
- export type ScanBarcodesOptions = {
29
- barcodeTypes?: BarcodeType[];
30
- regionOfInterest?: [number, number, number, number];
31
- };
32
- export type BasicParameterType = string | number | boolean | undefined;
33
- export type ParameterType = BasicParameterType | BasicParameterType[] | Record<string, BasicParameterType | undefined>;
34
- export interface FrameProcessorPlugin {
35
- call: (frame: Frame, options?: Record<string, ParameterType>) => ParameterType;
36
- }
37
- export interface BarcodeScannerPlugin {
38
- scanCodes: (frame: Frame, options?: ScanBarcodesOptions) => Barcode[];
39
- }
40
- export type BarcodeScannerOptions = {
41
- barcodeTypes?: BarcodeType[];
42
- regionOfInterest?: Rect;
43
- fps?: number;
44
- onBarcodeScanned: (barcodes: Barcode[], frame: Frame) => void;
45
- disableHighlighting?: boolean;
46
- resizeMode?: 'cover' | 'contain';
47
- scanMode?: 'continuous' | 'once';
48
- isMountedRef?: {
49
- value: boolean;
50
- };
51
- };
52
- //# sourceMappingURL=types.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/VisionCameraPlugins/BarcodeScanner/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAExD,MAAM,MAAM,KAAK,GAAG;IAClB,CAAC,EAAE,MAAM,CAAC;IACV,CAAC,EAAE,MAAM,CAAC;CACX,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB,CAAC;AAEF,MAAM,MAAM,IAAI,GAAG,KAAK,GAAG,IAAI,CAAC;AAEhC,MAAM,MAAM,GAAG,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,CAAC;AAE3C,MAAM,MAAM,WAAW,GAAG;IACxB,MAAM,EAAE,KAAK,CAAC;IACd,IAAI,EAAE,IAAI,CAAC;CACZ,CAAC;AAEF,MAAM,MAAM,YAAY,GAAG,KAAK,EAAE,CAAC;AACnC,MAAM,MAAM,SAAS,GAAG,WAAW,GAAG;IAAE,GAAG,EAAE,GAAG,CAAA;CAAE,CAAC;AAEnD,MAAM,MAAM,WAAW,GACnB,OAAO,GACP,SAAS,GACT,UAAU,GACV,SAAS,GACT,SAAS,GACT,aAAa,GACb,QAAQ,GACR,OAAO,GACP,aAAa,GACb,KAAK,GACL,aAAa,GACb,SAAS,GACT,IAAI,GACJ,OAAO,GACP,OAAO,GACP,SAAS,CAAC;AAEd,MAAM,MAAM,OAAO,GAAG;IACpB,KAAK,EAAE,MAAM,GAAG,IAAI,CAAC;IACrB,IAAI,EAAE,WAAW,CAAC;IAClB,WAAW,EAAE,WAAW,CAAC;IACzB,YAAY,EAAE,KAAK,EAAE,CAAC;IACtB,MAAM,CAAC,EAAE,GAAG,CAAC;CACd,CAAC;AAEF,MAAM,MAAM,mBAAmB,GAAG;IAChC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,CAAC,MAAM,EAAE,MAAM,EAAE,MAAM,EAAE,MAAM,CAAC,CAAC;CACrD,CAAC;AAEF,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,OAAO,GAAG,SAAS,CAAC;AACvE,MAAM,MAAM,aAAa,GACrB,kBAAkB,GAClB,kBAAkB,EAAE,GACpB,MAAM,CAAC,MAAM,EAAE,kBAAkB,GAAG,SAAS,CAAC,CAAC;AAEnD,MAAM,WAAW,oBAAoB;IACnC,IAAI,EAAE,CACJ,KAAK,EAAE,KAAK,EACZ,OAAO,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,aAAa,CAAC,KACpC,aAAa,CAAC;CACpB;AAED,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,OAAO,CAAC,EAAE,mBAAmB,KAAK,OAAO,EAAE,CAAC;CACvE;AAED,MAAM,MAAM,qBAAqB,GAAG;IAClC,YAAY,CAAC,EAAE,WAAW,EAAE,CAAC;IAC7B,gBAAgB,CAAC,EAAE,IAAI,CAAC;IACxB,GAAG,CAAC,EAAE,MAAM,CAAC;IACb,gBAAgB,EAAE,CAAC,QAAQ,EAAE,OAAO,EAAE,EAAE,KAAK,EAAE,KAAK,KAAK,IAAI,CAAC;IAC9D,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACjC,QAAQ,CAAC,EAAE,YAAY,GAAG,MAAM,CAAC;IACjC,YAAY,CAAC,EAAE;QAAE,KAAK,EAAE,OAAO,CAAA;KAAE,CAAC;CACnC,CAAC"}
@@ -1,62 +0,0 @@
1
- import type { BarcodeType } from '../types';
2
- /**
3
- * ML Kit Android barcode format constants
4
- */
5
- export declare const AndroidBarcodeFormat: {
6
- readonly UNKNOWN: -1;
7
- readonly ALL_FORMATS: 0;
8
- readonly CODE_128: 1;
9
- readonly CODE_39: 2;
10
- readonly CODE_93: 4;
11
- readonly CODABAR: 8;
12
- readonly DATA_MATRIX: 16;
13
- readonly EAN_13: 32;
14
- readonly EAN_8: 64;
15
- readonly ITF: 128;
16
- readonly QR_CODE: 256;
17
- readonly UPC_A: 512;
18
- readonly UPC_E: 1024;
19
- readonly PDF417: 2048;
20
- readonly AZTEC: 4096;
21
- };
22
- /**
23
- * iOS Vision framework barcode symbology constants
24
- */
25
- export declare const IOSBarcodeSymbology: {
26
- readonly aztec: "VNBarcodeSymbologyAztec";
27
- readonly code128: "VNBarcodeSymbologyCode128";
28
- readonly code39: "VNBarcodeSymbologyCode39";
29
- readonly code39Checksum: "VNBarcodeSymbologyCode39Checksum";
30
- readonly code39FullASCII: "VNBarcodeSymbologyCode39FullASCII";
31
- readonly code39FullASCIIChecksum: "VNBarcodeSymbologyCode39FullASCIIChecksum";
32
- readonly code93: "VNBarcodeSymbologyCode93";
33
- readonly code93i: "VNBarcodeSymbologyCode93i";
34
- readonly dataMatrix: "VNBarcodeSymbologyDataMatrix";
35
- readonly ean13: "VNBarcodeSymbologyEAN13";
36
- readonly ean8: "VNBarcodeSymbologyEAN8";
37
- readonly face: "VNBarcodeSymbologyFace";
38
- readonly i2of5: "VNBarcodeSymbologyI2of5";
39
- readonly i2of5Checksum: "VNBarcodeSymbologyI2of5Checksum";
40
- readonly itf14: "VNBarcodeSymbologyITF14";
41
- readonly pdf417: "VNBarcodeSymbologyPDF417";
42
- readonly qr: "VNBarcodeSymbologyQR";
43
- readonly upce: "VNBarcodeSymbologyUPCE";
44
- readonly codabar: "VNBarcodeSymbologyCodabar";
45
- };
46
- /**
47
- * Convert our BarcodeType to Android ML Kit format
48
- */
49
- export declare const barcodeTypeToAndroidFormat: (type: BarcodeType) => number;
50
- /**
51
- * Convert our BarcodeType to iOS Vision framework symbology
52
- */
53
- export declare const barcodeTypeToIOSSymbology: (type: BarcodeType) => string;
54
- /**
55
- * Convert Android ML Kit format to our BarcodeType
56
- */
57
- export declare const androidFormatToBarcodeType: (format: number) => BarcodeType;
58
- /**
59
- * Convert iOS Vision framework symbology to our BarcodeType
60
- */
61
- export declare const iosSymbologyToBarcodeType: (symbology: string) => BarcodeType;
62
- //# sourceMappingURL=convert.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"convert.d.ts","sourceRoot":"","sources":["../../../../../../../src/Shared/VisionCameraPlugins/BarcodeScanner/utils/convert.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,UAAU,CAAC;AAE5C;;GAEG;AACH,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;CAgBvB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,mBAAmB;;;;;;;;;;;;;;;;;;;;CAoBtB,CAAC;AAEX;;GAEG;AACH,eAAO,MAAM,0BAA0B,GAAI,MAAM,WAAW,KAAG,MA+B9D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,MAAM,WAAW,KAAG,MA+B7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,0BAA0B,GAAI,QAAQ,MAAM,KAAG,WA+B3D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,WAAW,MAAM,KAAG,WAmC7D,CAAC"}
@@ -1,34 +0,0 @@
1
- import type { Barcode, Point, Rect } from '../types';
2
- export interface FrameDimensions {
3
- width: number;
4
- height: number;
5
- }
6
- export interface ScreenDimensions {
7
- width: number;
8
- height: number;
9
- }
10
- /**
11
- * Convert frame coordinates to screen coordinates
12
- */
13
- export declare const convertFrameToScreen: (point: Point, frameDimensions: FrameDimensions, screenDimensions: ScreenDimensions) => Point;
14
- /**
15
- * Convert screen coordinates to frame coordinates
16
- */
17
- export declare const convertScreenToFrame: (point: Point, frameDimensions: FrameDimensions, screenDimensions: ScreenDimensions) => Point;
18
- /**
19
- * Convert barcode corner points to screen coordinates
20
- */
21
- export declare const convertBarcodeToScreen: (barcode: Barcode, frameDimensions: FrameDimensions, screenDimensions: ScreenDimensions) => Barcode;
22
- /**
23
- * Calculate center point of a rectangle
24
- */
25
- export declare const getRectCenter: (rect: Rect) => Point;
26
- /**
27
- * Calculate center point from corner points
28
- */
29
- export declare const getCornerPointsCenter: (cornerPoints: Point[]) => Point;
30
- /**
31
- * Calculate bounding rectangle from corner points
32
- */
33
- export declare const getBoundsFromCornerPoints: (cornerPoints: Point[]) => Rect;
34
- //# sourceMappingURL=geometry.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"geometry.d.ts","sourceRoot":"","sources":["../../../../../../../src/Shared/VisionCameraPlugins/BarcodeScanner/utils/geometry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAErD,MAAM,WAAW,eAAe;IAC9B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,iBAAiB,eAAe,EAChC,kBAAkB,gBAAgB,KACjC,KAQF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,OAAO,KAAK,EACZ,iBAAiB,eAAe,EAChC,kBAAkB,gBAAgB,KACjC,KAQF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,SAAS,OAAO,EAChB,iBAAiB,eAAe,EAChC,kBAAkB,gBAAgB,KACjC,OA4BF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,IAAI,KAAG,KAK1C,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,qBAAqB,GAAI,cAAc,KAAK,EAAE,KAAG,KAiB7D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,yBAAyB,GAAI,cAAc,KAAK,EAAE,KAAG,IAgBjE,CAAC"}
@@ -1,32 +0,0 @@
1
- import type { Barcode, Highlight, BoundingBox, Point } from '../types';
2
- import { type FrameDimensions, type ScreenDimensions } from './geometry';
3
- /**
4
- * Convert a BoundingBox to a Highlight with a key
5
- */
6
- export declare const boundingBoxToHighlight: (boundingBox: BoundingBox, key: string | number) => Highlight;
7
- /**
8
- * Convert barcodes to highlights for rendering
9
- */
10
- export declare const barcodesToHighlights: (barcodes: Barcode[], frameDimensions: FrameDimensions, screenDimensions: ScreenDimensions) => Highlight[];
11
- /**
12
- * Get highlight styles for rendering overlay
13
- */
14
- export declare const getHighlightStyle: (highlight: Highlight, color?: string, borderWidth?: number) => {
15
- position: "absolute";
16
- left: number;
17
- top: number;
18
- width: number;
19
- height: number;
20
- borderColor: string;
21
- borderWidth: number;
22
- backgroundColor: string;
23
- };
24
- /**
25
- * Create polygon path from corner points for more precise highlighting
26
- */
27
- export declare const cornerPointsToPath: (cornerPoints: Point[]) => string;
28
- /**
29
- * Get SVG polygon points string from corner points
30
- */
31
- export declare const cornerPointsToPolygonPoints: (cornerPoints: Point[]) => string;
32
- //# sourceMappingURL=highlights.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"highlights.d.ts","sourceRoot":"","sources":["../../../../../../../src/Shared/VisionCameraPlugins/BarcodeScanner/utils/highlights.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,SAAS,EAAE,WAAW,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AACvE,OAAO,EAEL,KAAK,eAAe,EACpB,KAAK,gBAAgB,EACtB,MAAM,YAAY,CAAC;AAEpB;;GAEG;AACH,eAAO,MAAM,sBAAsB,GACjC,aAAa,WAAW,EACxB,KAAK,MAAM,GAAG,MAAM,KACnB,SAKF,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,oBAAoB,GAC/B,UAAU,OAAO,EAAE,EACnB,iBAAiB,eAAe,EAChC,kBAAkB,gBAAgB,KACjC,SAAS,EAaX,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,iBAAiB,GAC5B,WAAW,SAAS,EACpB,QAAO,MAAkB,EACzB,cAAa,MAAU;;;;;;;;;CAYxB,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,kBAAkB,GAAI,cAAc,KAAK,EAAE,KAAG,MAW1D,CAAC;AAEF;;GAEG;AACH,eAAO,MAAM,2BAA2B,GAAI,cAAc,KAAK,EAAE,KAAG,MAEnE,CAAC"}
@@ -1,23 +0,0 @@
1
- import { type Frame } from 'react-native-vision-camera';
2
- export declare function createCropperPlugin(): CropperPlugin;
3
- export declare const crop: (frame: Frame, config?: CropConfig) => CropResult;
4
- export interface CropperPlugin {
5
- crop: (frame: Frame, config?: CropConfig) => CropResult;
6
- }
7
- export interface CropRegion {
8
- left: number;
9
- top: number;
10
- width: number;
11
- height: number;
12
- }
13
- export interface CropConfig {
14
- cropRegion?: CropRegion;
15
- includeImageBase64?: boolean;
16
- saveBitmap?: boolean;
17
- saveAsFile?: boolean;
18
- }
19
- export interface CropResult {
20
- base64?: string;
21
- path?: string;
22
- }
23
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/VisionCameraPlugins/Cropper/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAqB,KAAK,KAAK,EAAE,MAAM,4BAA4B,CAAC;AAI3E,wBAAgB,mBAAmB,IAAI,aAAa,CA4CnD;AAID,eAAO,MAAM,IAAI,UAID,KAAK,WAAW,UAAU,KAAK,UAAU,AAJnB,CAAC;AAGvC,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,MAAM,CAAC,EAAE,UAAU,KAAK,UAAU,CAAC;CACzD;AAGD,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;IACd,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,UAAU;IACzB,UAAU,CAAC,EAAE,UAAU,CAAC;IACxB,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB,UAAU,CAAC,EAAE,OAAO,CAAC;CACtB;AAED,MAAM,WAAW,UAAU;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,IAAI,CAAC,EAAE,MAAM,CAAC;CACf"}
@@ -1,9 +0,0 @@
1
- import React from 'react';
2
- import type { Face, FaceDetectorPlugin, FaceDetectorOptions } from './types';
3
- export declare const Camera: React.ForwardRefExoticComponent<{
4
- callback: (data: Face[]) => void;
5
- mode: "detectFaces";
6
- options?: FaceDetectorOptions;
7
- } & import("react-native-vision-camera").CameraProps & React.RefAttributes<any>>;
8
- export declare function useFaceDetector(options?: FaceDetectorOptions): FaceDetectorPlugin;
9
- //# sourceMappingURL=Camera.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"Camera.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/VisionCameraPlugins/FaceDetector/Camera.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAiD,MAAM,OAAO,CAAC;AAOtE,OAAO,KAAK,EAEV,IAAI,EAGJ,kBAAkB,EAClB,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,MAAM;;;;gFAqCjB,CAAC;AAEH,wBAAgB,eAAe,CAC7B,OAAO,CAAC,EAAE,mBAAmB,GAC5B,kBAAkB,CAKpB"}
@@ -1,3 +0,0 @@
1
- import type { FaceDetectorPlugin, FaceDetectorOptions } from './types';
2
- export declare function createFaceDetectorPlugin(options?: FaceDetectorOptions): FaceDetectorPlugin;
3
- //# sourceMappingURL=detectFaces.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"detectFaces.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/VisionCameraPlugins/FaceDetector/detectFaces.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,kBAAkB,EAClB,mBAAmB,EAEpB,MAAM,SAAS,CAAC;AAIjB,wBAAgB,wBAAwB,CACtC,OAAO,CAAC,EAAE,mBAAmB,GAC5B,kBAAkB,CA+BpB"}
@@ -1,3 +0,0 @@
1
- export { Camera, useFaceDetector } from './Camera';
2
- export * from './types';
3
- //# sourceMappingURL=index.d.ts.map
@@ -1 +0,0 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../../../src/Shared/VisionCameraPlugins/FaceDetector/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAEnD,cAAc,SAAS,CAAC"}
@@ -1,79 +0,0 @@
1
- export type { Frame, ReadonlyFrameProcessor, FrameProcessorPlugin, FrameInternal, CameraProps, CameraDevice, } from 'react-native-vision-camera';
2
- export type { ForwardedRef } from 'react';
3
- import type { CameraProps, Frame } from 'react-native-vision-camera';
4
- export type FaceDetectorOptions = {
5
- performanceMode?: 'fast' | 'accurate';
6
- landmarkMode?: 'none' | 'all';
7
- contourMode?: 'none' | 'all';
8
- classificationMode?: 'none' | 'all';
9
- minFaceSize?: number;
10
- trackingEnabled?: boolean;
11
- autoScale?: boolean;
12
- windowWidth?: number;
13
- windowHeight?: number;
14
- };
15
- export type CameraTypes = {
16
- callback: (data: Face[]) => void;
17
- mode: 'detectFaces';
18
- options?: FaceDetectorOptions;
19
- } & CameraProps;
20
- export type FaceDetectorPlugin = {
21
- detectFaces: (frame: Frame) => Face[];
22
- };
23
- export type Face = {
24
- bounds: Bounds;
25
- landmarks?: FaceLandmarks;
26
- contours?: FaceContours;
27
- trackingId?: number;
28
- leftEyeOpenProbability?: number;
29
- rightEyeOpenProbability?: number;
30
- smilingProbability?: number;
31
- headEulerAngleX?: number;
32
- headEulerAngleY?: number;
33
- headEulerAngleZ?: number;
34
- pitchAngle?: number;
35
- yawAngle?: number;
36
- rollAngle?: number;
37
- };
38
- export type Bounds = {
39
- x: number;
40
- y: number;
41
- width: number;
42
- height: number;
43
- };
44
- export type Point = {
45
- x: number;
46
- y: number;
47
- };
48
- export type FaceLandmarks = {
49
- leftEye?: Point;
50
- rightEye?: Point;
51
- noseBase?: Point;
52
- leftCheek?: Point;
53
- rightCheek?: Point;
54
- leftEar?: Point;
55
- rightEar?: Point;
56
- leftMouth?: Point;
57
- rightMouth?: Point;
58
- bottomMouth?: Point;
59
- };
60
- export type FaceContours = {
61
- face?: Point[];
62
- leftEyebrow?: Point[];
63
- rightEyebrow?: Point[];
64
- leftEye?: Point[];
65
- rightEye?: Point[];
66
- upperLipTop?: Point[];
67
- upperLipBottom?: Point[];
68
- lowerLipTop?: Point[];
69
- lowerLipBottom?: Point[];
70
- noseBridge?: Point[];
71
- noseBottom?: Point[];
72
- leftCheek?: Point[];
73
- rightCheek?: Point[];
74
- };
75
- export type PhotoOptions = {
76
- uri: string;
77
- orientation?: 'landscapeRight' | 'portrait' | 'portraitUpsideDown' | 'landscapeLeft';
78
- };
79
- //# sourceMappingURL=types.d.ts.map