petrus-react-native 0.1.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 (163) hide show
  1. package/PetrusReactNative.podspec +20 -0
  2. package/android/build.gradle +64 -0
  3. package/android/src/main/AndroidManifest.xml +4 -0
  4. package/android/src/main/java/com/petrusreactnative/PDF417ScanSession.kt +86 -0
  5. package/android/src/main/java/com/petrusreactnative/PassportScanSession.kt +137 -0
  6. package/android/src/main/java/com/petrusreactnative/PetrusCameraView.kt +146 -0
  7. package/android/src/main/java/com/petrusreactnative/PetrusCameraViewManager.kt +93 -0
  8. package/android/src/main/java/com/petrusreactnative/PetrusOverlayView.kt +87 -0
  9. package/android/src/main/java/com/petrusreactnative/PetrusReactNativeModule.kt +253 -0
  10. package/android/src/main/java/com/petrusreactnative/PetrusReactNativePackage.kt +38 -0
  11. package/android/src/main/java/com/petrusreactnative/VehicleRegistrationScanSession.kt +119 -0
  12. package/android/src/main/java/com/petrusreactnative/events/CapturedEvent.kt +30 -0
  13. package/android/src/main/java/com/petrusreactnative/events/DocumentDetectedEvent.kt +49 -0
  14. package/android/src/main/java/com/petrusreactnative/events/FrameMetadataEvent.kt +24 -0
  15. package/android/src/main/java/com/petrusreactnative/mrz/PassportResultMapping.kt +54 -0
  16. package/android/src/main/java/com/petrusreactnative/ocr/OCRResultMapping.kt +52 -0
  17. package/android/src/main/java/com/petrusreactnative/pdf417/SouthAfricanDriversLicenseResultMapping.kt +80 -0
  18. package/android/src/main/java/com/petrusreactnative/sa/SouthAfricanIDResultMapping.kt +50 -0
  19. package/android/src/main/java/com/petrusreactnative/vehicle/VehicleRegistrationResultMapping.kt +72 -0
  20. package/ios/PetrusReactNative.h +5 -0
  21. package/ios/PetrusReactNative.mm +21 -0
  22. package/lib/module/NativePetrusReactNative.js +5 -0
  23. package/lib/module/NativePetrusReactNative.js.map +1 -0
  24. package/lib/module/PetrusCameraView.js +6 -0
  25. package/lib/module/PetrusCameraView.js.map +1 -0
  26. package/lib/module/PetrusCameraView.native.js +24 -0
  27. package/lib/module/PetrusCameraView.native.js.map +1 -0
  28. package/lib/module/PetrusCameraViewNativeComponent.ts +47 -0
  29. package/lib/module/cameraPermissions.js +9 -0
  30. package/lib/module/cameraPermissions.js.map +1 -0
  31. package/lib/module/cameraPermissions.native.js +10 -0
  32. package/lib/module/cameraPermissions.native.js.map +1 -0
  33. package/lib/module/getPipelineVersion.js +6 -0
  34. package/lib/module/getPipelineVersion.js.map +1 -0
  35. package/lib/module/getPipelineVersion.native.js +7 -0
  36. package/lib/module/getPipelineVersion.native.js.map +1 -0
  37. package/lib/module/index.js +45 -0
  38. package/lib/module/index.js.map +1 -0
  39. package/lib/module/package.json +1 -0
  40. package/lib/module/parseMRZ.js +6 -0
  41. package/lib/module/parseMRZ.js.map +1 -0
  42. package/lib/module/parseMRZ.native.js +12 -0
  43. package/lib/module/parseMRZ.native.js.map +1 -0
  44. package/lib/module/parseSouthAfricanDriversLicense.js +6 -0
  45. package/lib/module/parseSouthAfricanDriversLicense.js.map +1 -0
  46. package/lib/module/parseSouthAfricanDriversLicense.native.js +12 -0
  47. package/lib/module/parseSouthAfricanDriversLicense.native.js.map +1 -0
  48. package/lib/module/parseSouthAfricanID.js +6 -0
  49. package/lib/module/parseSouthAfricanID.js.map +1 -0
  50. package/lib/module/parseSouthAfricanID.native.js +8 -0
  51. package/lib/module/parseSouthAfricanID.native.js.map +1 -0
  52. package/lib/module/parseVehicleRegistration.js +6 -0
  53. package/lib/module/parseVehicleRegistration.js.map +1 -0
  54. package/lib/module/parseVehicleRegistration.native.js +8 -0
  55. package/lib/module/parseVehicleRegistration.native.js.map +1 -0
  56. package/lib/module/recognizeText.js +6 -0
  57. package/lib/module/recognizeText.js.map +1 -0
  58. package/lib/module/recognizeText.native.js +8 -0
  59. package/lib/module/recognizeText.native.js.map +1 -0
  60. package/lib/module/scanPDF417.js +6 -0
  61. package/lib/module/scanPDF417.js.map +1 -0
  62. package/lib/module/scanPDF417.native.js +8 -0
  63. package/lib/module/scanPDF417.native.js.map +1 -0
  64. package/lib/module/scanPassport.js +6 -0
  65. package/lib/module/scanPassport.js.map +1 -0
  66. package/lib/module/scanPassport.native.js +13 -0
  67. package/lib/module/scanPassport.native.js.map +1 -0
  68. package/lib/module/scanSouthAfricanDriversLicense.js +6 -0
  69. package/lib/module/scanSouthAfricanDriversLicense.js.map +1 -0
  70. package/lib/module/scanSouthAfricanDriversLicense.native.js +12 -0
  71. package/lib/module/scanSouthAfricanDriversLicense.native.js.map +1 -0
  72. package/lib/module/scanVehicleRegistration.js +6 -0
  73. package/lib/module/scanVehicleRegistration.js.map +1 -0
  74. package/lib/module/scanVehicleRegistration.native.js +13 -0
  75. package/lib/module/scanVehicleRegistration.native.js.map +1 -0
  76. package/lib/module/types.js +2 -0
  77. package/lib/module/types.js.map +1 -0
  78. package/lib/typescript/package.json +1 -0
  79. package/lib/typescript/src/NativePetrusReactNative.d.ts +271 -0
  80. package/lib/typescript/src/NativePetrusReactNative.d.ts.map +1 -0
  81. package/lib/typescript/src/PetrusCameraView.d.ts +10 -0
  82. package/lib/typescript/src/PetrusCameraView.d.ts.map +1 -0
  83. package/lib/typescript/src/PetrusCameraView.native.d.ts +4 -0
  84. package/lib/typescript/src/PetrusCameraView.native.d.ts.map +1 -0
  85. package/lib/typescript/src/PetrusCameraViewNativeComponent.d.ts +38 -0
  86. package/lib/typescript/src/PetrusCameraViewNativeComponent.d.ts.map +1 -0
  87. package/lib/typescript/src/cameraPermissions.d.ts +4 -0
  88. package/lib/typescript/src/cameraPermissions.d.ts.map +1 -0
  89. package/lib/typescript/src/cameraPermissions.native.d.ts +4 -0
  90. package/lib/typescript/src/cameraPermissions.native.d.ts.map +1 -0
  91. package/lib/typescript/src/getPipelineVersion.d.ts +2 -0
  92. package/lib/typescript/src/getPipelineVersion.d.ts.map +1 -0
  93. package/lib/typescript/src/getPipelineVersion.native.d.ts +2 -0
  94. package/lib/typescript/src/getPipelineVersion.native.d.ts.map +1 -0
  95. package/lib/typescript/src/index.d.ts +45 -0
  96. package/lib/typescript/src/index.d.ts.map +1 -0
  97. package/lib/typescript/src/parseMRZ.d.ts +3 -0
  98. package/lib/typescript/src/parseMRZ.d.ts.map +1 -0
  99. package/lib/typescript/src/parseMRZ.native.d.ts +8 -0
  100. package/lib/typescript/src/parseMRZ.native.d.ts.map +1 -0
  101. package/lib/typescript/src/parseSouthAfricanDriversLicense.d.ts +3 -0
  102. package/lib/typescript/src/parseSouthAfricanDriversLicense.d.ts.map +1 -0
  103. package/lib/typescript/src/parseSouthAfricanDriversLicense.native.d.ts +8 -0
  104. package/lib/typescript/src/parseSouthAfricanDriversLicense.native.d.ts.map +1 -0
  105. package/lib/typescript/src/parseSouthAfricanID.d.ts +3 -0
  106. package/lib/typescript/src/parseSouthAfricanID.d.ts.map +1 -0
  107. package/lib/typescript/src/parseSouthAfricanID.native.d.ts +4 -0
  108. package/lib/typescript/src/parseSouthAfricanID.native.d.ts.map +1 -0
  109. package/lib/typescript/src/parseVehicleRegistration.d.ts +3 -0
  110. package/lib/typescript/src/parseVehicleRegistration.d.ts.map +1 -0
  111. package/lib/typescript/src/parseVehicleRegistration.native.d.ts +4 -0
  112. package/lib/typescript/src/parseVehicleRegistration.native.d.ts.map +1 -0
  113. package/lib/typescript/src/recognizeText.d.ts +3 -0
  114. package/lib/typescript/src/recognizeText.d.ts.map +1 -0
  115. package/lib/typescript/src/recognizeText.native.d.ts +4 -0
  116. package/lib/typescript/src/recognizeText.native.d.ts.map +1 -0
  117. package/lib/typescript/src/scanPDF417.d.ts +3 -0
  118. package/lib/typescript/src/scanPDF417.d.ts.map +1 -0
  119. package/lib/typescript/src/scanPDF417.native.d.ts +4 -0
  120. package/lib/typescript/src/scanPDF417.native.d.ts.map +1 -0
  121. package/lib/typescript/src/scanPassport.d.ts +3 -0
  122. package/lib/typescript/src/scanPassport.d.ts.map +1 -0
  123. package/lib/typescript/src/scanPassport.native.d.ts +9 -0
  124. package/lib/typescript/src/scanPassport.native.d.ts.map +1 -0
  125. package/lib/typescript/src/scanSouthAfricanDriversLicense.d.ts +3 -0
  126. package/lib/typescript/src/scanSouthAfricanDriversLicense.d.ts.map +1 -0
  127. package/lib/typescript/src/scanSouthAfricanDriversLicense.native.d.ts +8 -0
  128. package/lib/typescript/src/scanSouthAfricanDriversLicense.native.d.ts.map +1 -0
  129. package/lib/typescript/src/scanVehicleRegistration.d.ts +3 -0
  130. package/lib/typescript/src/scanVehicleRegistration.d.ts.map +1 -0
  131. package/lib/typescript/src/scanVehicleRegistration.native.d.ts +9 -0
  132. package/lib/typescript/src/scanVehicleRegistration.native.d.ts.map +1 -0
  133. package/lib/typescript/src/types.d.ts +237 -0
  134. package/lib/typescript/src/types.d.ts.map +1 -0
  135. package/package.json +124 -0
  136. package/src/NativePetrusReactNative.ts +303 -0
  137. package/src/PetrusCameraView.native.tsx +44 -0
  138. package/src/PetrusCameraView.tsx +19 -0
  139. package/src/PetrusCameraViewNativeComponent.ts +47 -0
  140. package/src/cameraPermissions.native.tsx +10 -0
  141. package/src/cameraPermissions.tsx +13 -0
  142. package/src/getPipelineVersion.native.tsx +5 -0
  143. package/src/getPipelineVersion.tsx +5 -0
  144. package/src/index.tsx +83 -0
  145. package/src/parseMRZ.native.tsx +11 -0
  146. package/src/parseMRZ.tsx +7 -0
  147. package/src/parseSouthAfricanDriversLicense.native.tsx +13 -0
  148. package/src/parseSouthAfricanDriversLicense.tsx +9 -0
  149. package/src/parseSouthAfricanID.native.tsx +7 -0
  150. package/src/parseSouthAfricanID.tsx +7 -0
  151. package/src/parseVehicleRegistration.native.tsx +9 -0
  152. package/src/parseVehicleRegistration.tsx +9 -0
  153. package/src/recognizeText.native.tsx +7 -0
  154. package/src/recognizeText.tsx +7 -0
  155. package/src/scanPDF417.native.tsx +7 -0
  156. package/src/scanPDF417.tsx +7 -0
  157. package/src/scanPassport.native.tsx +12 -0
  158. package/src/scanPassport.tsx +7 -0
  159. package/src/scanSouthAfricanDriversLicense.native.tsx +11 -0
  160. package/src/scanSouthAfricanDriversLicense.tsx +7 -0
  161. package/src/scanVehicleRegistration.native.tsx +12 -0
  162. package/src/scanVehicleRegistration.tsx +7 -0
  163. package/src/types.ts +272 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PetrusReactNative","scanPassport"],"sourceRoot":"..\\..\\src","sources":["scanPassport.native.tsx"],"mappings":";;AAAA,OAAOA,iBAAiB,MAAM,8BAA2B;AAGzD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,YAAYA,CAAA,EAA4B;EACtD,OAAOD,iBAAiB,CAACC,YAAY,CAAC,CAAC;AACzC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export function scanSouthAfricanDriversLicense() {
4
+ return Promise.reject(new Error("'petrus-react-native' is only supported on native platforms."));
5
+ }
6
+ //# sourceMappingURL=scanSouthAfricanDriversLicense.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["scanSouthAfricanDriversLicense","Promise","reject","Error"],"sourceRoot":"..\\..\\src","sources":["scanSouthAfricanDriversLicense.tsx"],"mappings":";;AAEA,OAAO,SAASA,8BAA8BA,CAAA,EAA8C;EAC1F,OAAOC,OAAO,CAACC,MAAM,CACnB,IAAIC,KAAK,CAAC,8DAA8D,CAC1E,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ import PetrusReactNative from "./NativePetrusReactNative.js";
4
+ /**
5
+ * Opens a headless (no preview UI) camera session, scans for a PDF417 barcode, and
6
+ * parses it as an SA driver's licence in one call. Rejects on timeout (~20s) or if
7
+ * no Activity is available.
8
+ */
9
+ export function scanSouthAfricanDriversLicense() {
10
+ return PetrusReactNative.scanSouthAfricanDriversLicense();
11
+ }
12
+ //# sourceMappingURL=scanSouthAfricanDriversLicense.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PetrusReactNative","scanSouthAfricanDriversLicense"],"sourceRoot":"..\\..\\src","sources":["scanSouthAfricanDriversLicense.native.tsx"],"mappings":";;AAAA,OAAOA,iBAAiB,MAAM,8BAA2B;AAGzD;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,8BAA8BA,CAAA,EAA8C;EAC1F,OAAOD,iBAAiB,CAACC,8BAA8B,CAAC,CAAC;AAC3D","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ export function scanVehicleRegistration() {
4
+ return Promise.reject(new Error("'petrus-react-native' is only supported on native platforms."));
5
+ }
6
+ //# sourceMappingURL=scanVehicleRegistration.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["scanVehicleRegistration","Promise","reject","Error"],"sourceRoot":"..\\..\\src","sources":["scanVehicleRegistration.tsx"],"mappings":";;AAEA,OAAO,SAASA,uBAAuBA,CAAA,EAAuC;EAC5E,OAAOC,OAAO,CAACC,MAAM,CACnB,IAAIC,KAAK,CAAC,8DAA8D,CAC1E,CAAC;AACH","ignoreList":[]}
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ import PetrusReactNative from "./NativePetrusReactNative.js";
4
+ /**
5
+ * Opens a headless (no preview UI) camera session, runs OCR on frames, and parses
6
+ * each result as a vehicle registration document -- stops once a frame yields a
7
+ * registration number or VIN. Rejects on timeout (~20s) or if no Activity is
8
+ * available.
9
+ */
10
+ export function scanVehicleRegistration() {
11
+ return PetrusReactNative.scanVehicleRegistration();
12
+ }
13
+ //# sourceMappingURL=scanVehicleRegistration.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["PetrusReactNative","scanVehicleRegistration"],"sourceRoot":"..\\..\\src","sources":["scanVehicleRegistration.native.tsx"],"mappings":";;AAAA,OAAOA,iBAAiB,MAAM,8BAA2B;AAGzD;AACA;AACA;AACA;AACA;AACA;AACA,OAAO,SAASC,uBAAuBA,CAAA,EAAuC;EAC5E,OAAOD,iBAAiB,CAACC,uBAAuB,CAAC,CAAC;AACpD","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"..\\..\\src","sources":["types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1 @@
1
+ {"type":"module"}
@@ -0,0 +1,271 @@
1
+ import { type TurboModule } from 'react-native';
2
+ export interface Spec extends TurboModule {
3
+ getPipelineVersion(): string;
4
+ checkPermission(): Promise<'granted' | 'denied' | 'blocked'>;
5
+ requestPermission(): Promise<'granted' | 'denied' | 'blocked'>;
6
+ recognizeText(imagePath: string): Promise<{
7
+ fullText: string;
8
+ confidence: number;
9
+ blocks: Array<{
10
+ text: string;
11
+ boundingBox: {
12
+ left: number;
13
+ top: number;
14
+ right: number;
15
+ bottom: number;
16
+ };
17
+ lines: Array<{
18
+ text: string;
19
+ confidence: number;
20
+ boundingBox: {
21
+ left: number;
22
+ top: number;
23
+ right: number;
24
+ bottom: number;
25
+ };
26
+ words: Array<{
27
+ text: string;
28
+ confidence: number;
29
+ boundingBox: {
30
+ left: number;
31
+ top: number;
32
+ right: number;
33
+ bottom: number;
34
+ };
35
+ }>;
36
+ }>;
37
+ }>;
38
+ }>;
39
+ parseSouthAfricanID(text: string): {
40
+ idNumber: string | null;
41
+ isValid: boolean;
42
+ dateOfBirth: {
43
+ year: number;
44
+ month: number;
45
+ day: number;
46
+ } | null;
47
+ gender: 'male' | 'female' | null;
48
+ citizenship: 'citizen' | 'permanent_resident' | 'refugee' | 'unknown' | null;
49
+ validation: {
50
+ isValid: boolean;
51
+ hasValidChecksum: boolean;
52
+ hasValidDateOfBirth: boolean;
53
+ hasValidCitizenshipDigit: boolean;
54
+ } | null;
55
+ };
56
+ scanPDF417(imagePath: string): Promise<{
57
+ /** Base64-encoded raw decoded barcode bytes (binary for SA licence barcodes). */
58
+ rawDataBase64: string;
59
+ /** Best-effort ISO-8859-1 text view of the same bytes; rarely meaningful for encrypted payloads. */
60
+ rawText: string;
61
+ }>;
62
+ parseSouthAfricanDriversLicense(rawDataBase64: string): {
63
+ version: 'v1' | 'v2';
64
+ surname: string;
65
+ initials: string;
66
+ idNumber: string | null;
67
+ idNumberValidation: {
68
+ isValid: boolean;
69
+ hasValidChecksum: boolean;
70
+ hasValidDateOfBirth: boolean;
71
+ hasValidCitizenshipDigit: boolean;
72
+ } | null;
73
+ licenseNumber: string;
74
+ vehicleCodes: string[];
75
+ vehicleRestrictions: string[];
76
+ prdpCode: string | null;
77
+ idCountryOfIssue: string;
78
+ licenseCountryOfIssue: string;
79
+ gender: 'male' | 'female' | null;
80
+ dateOfBirth: {
81
+ year: number;
82
+ month: number;
83
+ day: number;
84
+ } | null;
85
+ licenseIssueNumber: number | null;
86
+ licenseValidFrom: {
87
+ year: number;
88
+ month: number;
89
+ day: number;
90
+ } | null;
91
+ licenseValidTo: {
92
+ year: number;
93
+ month: number;
94
+ day: number;
95
+ } | null;
96
+ prdpExpiry: {
97
+ year: number;
98
+ month: number;
99
+ day: number;
100
+ } | null;
101
+ driverRestrictionCodes: number[];
102
+ parseWarnings: string[];
103
+ };
104
+ scanSouthAfricanDriversLicense(): Promise<{
105
+ version: 'v1' | 'v2';
106
+ surname: string;
107
+ initials: string;
108
+ idNumber: string | null;
109
+ idNumberValidation: {
110
+ isValid: boolean;
111
+ hasValidChecksum: boolean;
112
+ hasValidDateOfBirth: boolean;
113
+ hasValidCitizenshipDigit: boolean;
114
+ } | null;
115
+ licenseNumber: string;
116
+ vehicleCodes: string[];
117
+ vehicleRestrictions: string[];
118
+ prdpCode: string | null;
119
+ idCountryOfIssue: string;
120
+ licenseCountryOfIssue: string;
121
+ gender: 'male' | 'female' | null;
122
+ dateOfBirth: {
123
+ year: number;
124
+ month: number;
125
+ day: number;
126
+ } | null;
127
+ licenseIssueNumber: number | null;
128
+ licenseValidFrom: {
129
+ year: number;
130
+ month: number;
131
+ day: number;
132
+ } | null;
133
+ licenseValidTo: {
134
+ year: number;
135
+ month: number;
136
+ day: number;
137
+ } | null;
138
+ prdpExpiry: {
139
+ year: number;
140
+ month: number;
141
+ day: number;
142
+ } | null;
143
+ driverRestrictionCodes: number[];
144
+ parseWarnings: string[];
145
+ }>;
146
+ parseVehicleRegistration(text: string): {
147
+ documentType: 'registration_certificate' | 'license_disc' | 'notification_of_change' | 'roadworthy_certificate' | 'unknown';
148
+ registrationNumber: string | null;
149
+ vin: string | null;
150
+ vinValidation: {
151
+ hasValidLength: boolean;
152
+ hasValidCharacterSet: boolean;
153
+ isStructurallyValid: boolean;
154
+ northAmericanCheckDigitValid: boolean | null;
155
+ } | null;
156
+ engineNumber: string | null;
157
+ make: string | null;
158
+ model: string | null;
159
+ yearModel: number | null;
160
+ ownerName: string | null;
161
+ ownerIdNumber: string | null;
162
+ ownerIdValidation: {
163
+ isValid: boolean;
164
+ hasValidChecksum: boolean;
165
+ hasValidDateOfBirth: boolean;
166
+ hasValidCitizenshipDigit: boolean;
167
+ } | null;
168
+ validation: {
169
+ isValid: boolean;
170
+ hasStructurallyValidVin: boolean;
171
+ hasPlausibleRegistrationNumber: boolean;
172
+ hasPlausibleYearModel: boolean;
173
+ };
174
+ parseWarnings: string[];
175
+ };
176
+ scanVehicleRegistration(): Promise<{
177
+ documentType: 'registration_certificate' | 'license_disc' | 'notification_of_change' | 'roadworthy_certificate' | 'unknown';
178
+ registrationNumber: string | null;
179
+ vin: string | null;
180
+ vinValidation: {
181
+ hasValidLength: boolean;
182
+ hasValidCharacterSet: boolean;
183
+ isStructurallyValid: boolean;
184
+ northAmericanCheckDigitValid: boolean | null;
185
+ } | null;
186
+ engineNumber: string | null;
187
+ make: string | null;
188
+ model: string | null;
189
+ yearModel: number | null;
190
+ ownerName: string | null;
191
+ ownerIdNumber: string | null;
192
+ ownerIdValidation: {
193
+ isValid: boolean;
194
+ hasValidChecksum: boolean;
195
+ hasValidDateOfBirth: boolean;
196
+ hasValidCitizenshipDigit: boolean;
197
+ } | null;
198
+ validation: {
199
+ isValid: boolean;
200
+ hasStructurallyValidVin: boolean;
201
+ hasPlausibleRegistrationNumber: boolean;
202
+ hasPlausibleYearModel: boolean;
203
+ };
204
+ parseWarnings: string[];
205
+ }>;
206
+ parseMRZ(text: string): {
207
+ documentCode: string;
208
+ issuingCountry: string;
209
+ surname: string;
210
+ givenNames: string;
211
+ passportNumber: string;
212
+ nationality: string;
213
+ dateOfBirth: {
214
+ year: number;
215
+ month: number;
216
+ day: number;
217
+ twoDigitYear: number;
218
+ } | null;
219
+ sex: 'male' | 'female' | 'unspecified';
220
+ dateOfExpiry: {
221
+ year: number;
222
+ month: number;
223
+ day: number;
224
+ twoDigitYear: number;
225
+ } | null;
226
+ personalNumber: string | null;
227
+ validation: {
228
+ isValid: boolean;
229
+ passportNumberCheckValid: boolean;
230
+ dateOfBirthCheckValid: boolean;
231
+ expiryDateCheckValid: boolean;
232
+ personalNumberCheckValid: boolean;
233
+ compositeCheckValid: boolean;
234
+ };
235
+ parseWarnings: string[];
236
+ };
237
+ scanPassport(): Promise<{
238
+ documentCode: string;
239
+ issuingCountry: string;
240
+ surname: string;
241
+ givenNames: string;
242
+ passportNumber: string;
243
+ nationality: string;
244
+ dateOfBirth: {
245
+ year: number;
246
+ month: number;
247
+ day: number;
248
+ twoDigitYear: number;
249
+ } | null;
250
+ sex: 'male' | 'female' | 'unspecified';
251
+ dateOfExpiry: {
252
+ year: number;
253
+ month: number;
254
+ day: number;
255
+ twoDigitYear: number;
256
+ } | null;
257
+ personalNumber: string | null;
258
+ validation: {
259
+ isValid: boolean;
260
+ passportNumberCheckValid: boolean;
261
+ dateOfBirthCheckValid: boolean;
262
+ expiryDateCheckValid: boolean;
263
+ personalNumberCheckValid: boolean;
264
+ compositeCheckValid: boolean;
265
+ };
266
+ parseWarnings: string[];
267
+ }>;
268
+ }
269
+ declare const _default: Spec;
270
+ export default _default;
271
+ //# sourceMappingURL=NativePetrusReactNative.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativePetrusReactNative.d.ts","sourceRoot":"","sources":["../../../src/NativePetrusReactNative.ts"],"names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O,CAAC;SAC9B,CAAC;QACF,aAAa,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC;IAQF,YAAY,IAAI,OAAO,CAAC;QACtB,YAAY,EAAE,MAAM,CAAC;QACrB,cAAc,EAAE,MAAM,CAAC;QACvB,OAAO,EAAE,MAAM,CAAC;QAChB,UAAU,EAAE,MAAM,CAAC;QACnB,cAAc,EAAE,MAAM,CAAC;QACvB,WAAW,EAAE,MAAM,CAAC;QACpB,WAAW,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAC;QACvF,GAAG,EAAE,MAAM,GAAG,QAAQ,GAAG,aAAa,CAAC;QACvC,YAAY,EAAE;YAAE,IAAI,EAAE,MAAM,CAAC;YAAC,KAAK,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAC;YAAC,YAAY,EAAE,MAAM,CAAA;SAAE,GAAG,IAAI,CAAC;QACxF,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;QAC9B,UAAU,EAAE;YACV,OAAO,EAAE,OAAO,CAAC;YACjB,wBAAwB,EAAE,OAAO,CAAC;YAClC,qBAAqB,EAAE,OAAO,CAAC;YAC/B,oBAAoB,EAAE,OAAO,CAAC;YAC9B,wBAAwB,EAAE,OAAO,CAAC;YAClC,mBAAmB,EAAE,OAAO,CAAC;SAC9B,CAAC;QACF,aAAa,EAAE,MAAM,EAAE,CAAC;KACzB,CAAC,CAAC;CACJ;;AAED,wBAA2E"}
@@ -0,0 +1,10 @@
1
+ import type { ViewProps } from 'react-native';
2
+ import type { PetrusFrameMetadata, PetrusDocumentDetectedEvent, PetrusCapturedEvent } from './types';
3
+ export interface PetrusCameraViewProps extends ViewProps {
4
+ isActive?: boolean;
5
+ onFrameMetadata?: (metadata: PetrusFrameMetadata) => void;
6
+ onDocumentDetected?: (event: PetrusDocumentDetectedEvent) => void;
7
+ onCaptured?: (event: PetrusCapturedEvent) => void;
8
+ }
9
+ export declare function PetrusCameraView(_props: PetrusCameraViewProps): never;
10
+ //# sourceMappingURL=PetrusCameraView.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PetrusCameraView.d.ts","sourceRoot":"","sources":["../../../src/PetrusCameraView.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAC9C,OAAO,KAAK,EACV,mBAAmB,EACnB,2BAA2B,EAC3B,mBAAmB,EACpB,MAAM,SAAS,CAAC;AAEjB,MAAM,WAAW,qBAAsB,SAAQ,SAAS;IACtD,QAAQ,CAAC,EAAE,OAAO,CAAC;IACnB,eAAe,CAAC,EAAE,CAAC,QAAQ,EAAE,mBAAmB,KAAK,IAAI,CAAC;IAC1D,kBAAkB,CAAC,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAC;IAClE,UAAU,CAAC,EAAE,CAAC,KAAK,EAAE,mBAAmB,KAAK,IAAI,CAAC;CACnD;AAED,wBAAgB,gBAAgB,CAAC,MAAM,EAAE,qBAAqB,GAAG,KAAK,CAIrE"}
@@ -0,0 +1,4 @@
1
+ import type { PetrusCameraViewProps } from './PetrusCameraView';
2
+ export type { PetrusCameraViewProps } from './PetrusCameraView';
3
+ export declare function PetrusCameraView({ onFrameMetadata, onDocumentDetected, onCaptured, ...rest }: PetrusCameraViewProps): import("react").JSX.Element;
4
+ //# sourceMappingURL=PetrusCameraView.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PetrusCameraView.native.d.ts","sourceRoot":"","sources":["../../../src/PetrusCameraView.native.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,YAAY,EAAE,qBAAqB,EAAE,MAAM,oBAAoB,CAAC;AAEhE,wBAAgB,gBAAgB,CAAC,EAC/B,eAAe,EACf,kBAAkB,EAClB,UAAU,EACV,GAAG,IAAI,EACR,EAAE,qBAAqB,+BA2BvB"}
@@ -0,0 +1,38 @@
1
+ import { type ViewProps, type CodegenTypes } from 'react-native';
2
+ type NativePoint2D = Readonly<{
3
+ x: CodegenTypes.Double;
4
+ y: CodegenTypes.Double;
5
+ }>;
6
+ type NativeDocumentCorners = Readonly<{
7
+ topLeft: NativePoint2D;
8
+ topRight: NativePoint2D;
9
+ bottomRight: NativePoint2D;
10
+ bottomLeft: NativePoint2D;
11
+ frameWidth: CodegenTypes.Int32;
12
+ frameHeight: CodegenTypes.Int32;
13
+ rotationDegrees: CodegenTypes.Int32;
14
+ }>;
15
+ export interface NativeProps extends ViewProps {
16
+ isActive?: CodegenTypes.WithDefault<boolean, false>;
17
+ onFrameMetadata?: CodegenTypes.DirectEventHandler<{
18
+ width: CodegenTypes.Int32;
19
+ height: CodegenTypes.Int32;
20
+ rotation: CodegenTypes.Int32;
21
+ timestamp: CodegenTypes.Double;
22
+ }>;
23
+ onDocumentDetected?: CodegenTypes.DirectEventHandler<{
24
+ detected: boolean;
25
+ isStable: boolean;
26
+ stableDurationMs: CodegenTypes.Double;
27
+ confidence: CodegenTypes.Double;
28
+ corners: NativeDocumentCorners;
29
+ }>;
30
+ onCaptured?: CodegenTypes.DirectEventHandler<{
31
+ corners: NativeDocumentCorners;
32
+ confidence: CodegenTypes.Double;
33
+ timestamp: CodegenTypes.Double;
34
+ }>;
35
+ }
36
+ declare const _default: import("react-native/types_generated/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
37
+ export default _default;
38
+ //# sourceMappingURL=PetrusCameraViewNativeComponent.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"PetrusCameraViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/PetrusCameraViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EAA0B,KAAK,SAAS,EAAE,KAAK,YAAY,EAAE,MAAM,cAAc,CAAC;AAEzF,KAAK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C,CAAC;CACJ;;AAED,wBAAuE"}
@@ -0,0 +1,4 @@
1
+ import type { PetrusCameraPermissionStatus } from './types';
2
+ export declare function checkPermission(): Promise<PetrusCameraPermissionStatus>;
3
+ export declare function requestPermission(): Promise<PetrusCameraPermissionStatus>;
4
+ //# sourceMappingURL=cameraPermissions.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cameraPermissions.d.ts","sourceRoot":"","sources":["../../../src/cameraPermissions.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAE5D,wBAAgB,eAAe,IAAI,OAAO,CAAC,4BAA4B,CAAC,CAIvE;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,4BAA4B,CAAC,CAIzE"}
@@ -0,0 +1,4 @@
1
+ import type { PetrusCameraPermissionStatus } from './types';
2
+ export declare function checkPermission(): Promise<PetrusCameraPermissionStatus>;
3
+ export declare function requestPermission(): Promise<PetrusCameraPermissionStatus>;
4
+ //# sourceMappingURL=cameraPermissions.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"cameraPermissions.native.d.ts","sourceRoot":"","sources":["../../../src/cameraPermissions.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,SAAS,CAAC;AAE5D,wBAAgB,eAAe,IAAI,OAAO,CAAC,4BAA4B,CAAC,CAEvE;AAED,wBAAgB,iBAAiB,IAAI,OAAO,CAAC,4BAA4B,CAAC,CAEzE"}
@@ -0,0 +1,2 @@
1
+ export declare function getPipelineVersion(): string;
2
+ //# sourceMappingURL=getPipelineVersion.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPipelineVersion.d.ts","sourceRoot":"","sources":["../../../src/getPipelineVersion.tsx"],"names":[],"mappings":"AAAA,wBAAgB,kBAAkB,IAAI,MAAM,CAI3C"}
@@ -0,0 +1,2 @@
1
+ export declare function getPipelineVersion(): string;
2
+ //# sourceMappingURL=getPipelineVersion.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"getPipelineVersion.native.d.ts","sourceRoot":"","sources":["../../../src/getPipelineVersion.native.tsx"],"names":[],"mappings":"AAEA,wBAAgB,kBAAkB,IAAI,MAAM,CAE3C"}
@@ -0,0 +1,45 @@
1
+ import { getPipelineVersion } from './getPipelineVersion';
2
+ import { checkPermission, requestPermission } from './cameraPermissions';
3
+ import { recognizeText } from './recognizeText';
4
+ import { parseSouthAfricanID } from './parseSouthAfricanID';
5
+ import { scanPDF417 } from './scanPDF417';
6
+ import { parseSouthAfricanDriversLicense } from './parseSouthAfricanDriversLicense';
7
+ import { scanSouthAfricanDriversLicense } from './scanSouthAfricanDriversLicense';
8
+ import { parseVehicleRegistration } from './parseVehicleRegistration';
9
+ import { scanVehicleRegistration } from './scanVehicleRegistration';
10
+ import { parseMRZ } from './parseMRZ';
11
+ import { scanPassport } from './scanPassport';
12
+ export { getPipelineVersion } from './getPipelineVersion';
13
+ export { PetrusCameraView } from './PetrusCameraView';
14
+ export type { PetrusCameraViewProps } from './PetrusCameraView';
15
+ export { checkPermission, requestPermission } from './cameraPermissions';
16
+ export { recognizeText } from './recognizeText';
17
+ export { parseSouthAfricanID } from './parseSouthAfricanID';
18
+ export { scanPDF417 } from './scanPDF417';
19
+ export { parseSouthAfricanDriversLicense } from './parseSouthAfricanDriversLicense';
20
+ export { scanSouthAfricanDriversLicense } from './scanSouthAfricanDriversLicense';
21
+ export { parseVehicleRegistration } from './parseVehicleRegistration';
22
+ export { scanVehicleRegistration } from './scanVehicleRegistration';
23
+ export { parseMRZ } from './parseMRZ';
24
+ export { scanPassport } from './scanPassport';
25
+ export type { PetrusCameraPermissionStatus, PetrusFrameMetadata, PetrusPoint2D, PetrusDocumentCorners, PetrusDocumentDetectedEvent, PetrusCapturedEvent, OCRBoundingBox, OCRWord, OCRLine, OCRBlock, OCRResult, SouthAfricanGender, SouthAfricanCitizenship, SouthAfricanDateOfBirth, SouthAfricanIDValidation, SouthAfricanIDResult, PDF417ScanResult, SouthAfricanDriversLicenseVersion, CalendarDate, SouthAfricanDriversLicenseResult, VehicleDocumentType, VINValidation, VehicleRegistrationValidation, VehicleRegistrationResult, MRZSex, MRZDate, MRZValidation, PassportResult, } from './types';
26
+ /**
27
+ * Namespaced convenience alias over the same functions above (e.g.
28
+ * `Petrus.parseSouthAfricanID(text)`), for callers who prefer a single import over
29
+ * multiple named ones. Both forms call the same underlying implementation.
30
+ */
31
+ export declare const Petrus: {
32
+ getPipelineVersion: typeof getPipelineVersion;
33
+ checkPermission: typeof checkPermission;
34
+ requestPermission: typeof requestPermission;
35
+ recognizeText: typeof recognizeText;
36
+ parseSouthAfricanID: typeof parseSouthAfricanID;
37
+ scanPDF417: typeof scanPDF417;
38
+ parseSouthAfricanDriversLicense: typeof parseSouthAfricanDriversLicense;
39
+ scanSouthAfricanDriversLicense: typeof scanSouthAfricanDriversLicense;
40
+ parseVehicleRegistration: typeof parseVehicleRegistration;
41
+ scanVehicleRegistration: typeof scanVehicleRegistration;
42
+ parseMRZ: typeof parseMRZ;
43
+ scanPassport: typeof scanPassport;
44
+ };
45
+ //# sourceMappingURL=index.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAC1D,OAAO,EAAE,eAAe,EAAE,iBAAiB,EAAE,MAAM,qBAAqB,CAAC;AACzE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,mBAAmB,EAAE,MAAM,uBAAuB,CAAC;AAC5D,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,+BAA+B,EAAE,MAAM,mCAAmC,CAAC;AACpF,OAAO,EAAE,8BAA8B,EAAE,MAAM,kCAAkC,CAAC;AAClF,OAAO,EAAE,wBAAwB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AO,EACP,aAAa,EACb,cAAc,GACf,MAAM,SAAS,CAAC;AAEjB;;;;GAIG;AACH,eAAO,MAAM,MAAM;;;;;;;;;;;;;CAalB,CAAC"}
@@ -0,0 +1,3 @@
1
+ import type { PassportResult } from './types';
2
+ export declare function parseMRZ(_text: string): PassportResult;
3
+ //# sourceMappingURL=parseMRZ.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseMRZ.d.ts","sourceRoot":"","sources":["../../../src/parseMRZ.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C,wBAAgB,QAAQ,CAAC,KAAK,EAAE,MAAM,GAAG,cAAc,CAItD"}
@@ -0,0 +1,8 @@
1
+ import type { PassportResult } from './types';
2
+ /**
3
+ * `text` is expected to be MRZ OCR output (e.g. recognizeText's `fullText`,
4
+ * already cropped to the MRZ region, or pasted raw two-line MRZ text). Never
5
+ * throws -- see PassportResult's doc comment for the "no MRZ found" shape.
6
+ */
7
+ export declare function parseMRZ(text: string): PassportResult;
8
+ //# sourceMappingURL=parseMRZ.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseMRZ.native.d.ts","sourceRoot":"","sources":["../../../src/parseMRZ.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,SAAS,CAAC;AAE9C;;;;GAIG;AACH,wBAAgB,QAAQ,CAAC,IAAI,EAAE,MAAM,GAAG,cAAc,CAErD"}
@@ -0,0 +1,3 @@
1
+ import type { SouthAfricanDriversLicenseResult } from './types';
2
+ export declare function parseSouthAfricanDriversLicense(_rawDataBase64: string): SouthAfricanDriversLicenseResult;
3
+ //# sourceMappingURL=parseSouthAfricanDriversLicense.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseSouthAfricanDriversLicense.d.ts","sourceRoot":"","sources":["../../../src/parseSouthAfricanDriversLicense.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAEhE,wBAAgB,+BAA+B,CAC7C,cAAc,EAAE,MAAM,GACrB,gCAAgC,CAIlC"}
@@ -0,0 +1,8 @@
1
+ import type { SouthAfricanDriversLicenseResult } from './types';
2
+ /**
3
+ * `rawDataBase64` is expected to be already-scanned raw barcode bytes (e.g.
4
+ * scanPDF417's `rawDataBase64`). Throws if it doesn't decode to a recognized SA
5
+ * driver's licence barcode format.
6
+ */
7
+ export declare function parseSouthAfricanDriversLicense(rawDataBase64: string): SouthAfricanDriversLicenseResult;
8
+ //# sourceMappingURL=parseSouthAfricanDriversLicense.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseSouthAfricanDriversLicense.native.d.ts","sourceRoot":"","sources":["../../../src/parseSouthAfricanDriversLicense.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,gCAAgC,EAAE,MAAM,SAAS,CAAC;AAEhE;;;;GAIG;AACH,wBAAgB,+BAA+B,CAC7C,aAAa,EAAE,MAAM,GACpB,gCAAgC,CAElC"}
@@ -0,0 +1,3 @@
1
+ import type { SouthAfricanIDResult } from './types';
2
+ export declare function parseSouthAfricanID(_text: string): SouthAfricanIDResult;
3
+ //# sourceMappingURL=parseSouthAfricanID.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseSouthAfricanID.d.ts","sourceRoot":"","sources":["../../../src/parseSouthAfricanID.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,GAAG,oBAAoB,CAIvE"}
@@ -0,0 +1,4 @@
1
+ import type { SouthAfricanIDResult } from './types';
2
+ /** `text` is expected to be OCR output (e.g. recognizeText's `fullText`). */
3
+ export declare function parseSouthAfricanID(text: string): SouthAfricanIDResult;
4
+ //# sourceMappingURL=parseSouthAfricanID.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseSouthAfricanID.native.d.ts","sourceRoot":"","sources":["../../../src/parseSouthAfricanID.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD,6EAA6E;AAC7E,wBAAgB,mBAAmB,CAAC,IAAI,EAAE,MAAM,GAAG,oBAAoB,CAEtE"}
@@ -0,0 +1,3 @@
1
+ import type { VehicleRegistrationResult } from './types';
2
+ export declare function parseVehicleRegistration(_text: string): VehicleRegistrationResult;
3
+ //# sourceMappingURL=parseVehicleRegistration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseVehicleRegistration.d.ts","sourceRoot":"","sources":["../../../src/parseVehicleRegistration.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,wBAAgB,wBAAwB,CACtC,KAAK,EAAE,MAAM,GACZ,yBAAyB,CAI3B"}
@@ -0,0 +1,4 @@
1
+ import type { VehicleRegistrationResult } from './types';
2
+ /** `text` is expected to be OCR output (e.g. recognizeText's `fullText`). */
3
+ export declare function parseVehicleRegistration(text: string): VehicleRegistrationResult;
4
+ //# sourceMappingURL=parseVehicleRegistration.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"parseVehicleRegistration.native.d.ts","sourceRoot":"","sources":["../../../src/parseVehicleRegistration.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,yBAAyB,EAAE,MAAM,SAAS,CAAC;AAEzD,6EAA6E;AAC7E,wBAAgB,wBAAwB,CACtC,IAAI,EAAE,MAAM,GACX,yBAAyB,CAE3B"}
@@ -0,0 +1,3 @@
1
+ import type { OCRResult } from './types';
2
+ export declare function recognizeText(_imagePath: string): Promise<OCRResult>;
3
+ //# sourceMappingURL=recognizeText.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recognizeText.d.ts","sourceRoot":"","sources":["../../../src/recognizeText.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,wBAAgB,aAAa,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAIpE"}
@@ -0,0 +1,4 @@
1
+ import type { OCRResult } from './types';
2
+ /** `imagePath` may be a bare filesystem path or a URI (file://, content://, ...). */
3
+ export declare function recognizeText(imagePath: string): Promise<OCRResult>;
4
+ //# sourceMappingURL=recognizeText.native.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"recognizeText.native.d.ts","sourceRoot":"","sources":["../../../src/recognizeText.native.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,SAAS,CAAC;AAEzC,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,SAAS,CAAC,CAEnE"}
@@ -0,0 +1,3 @@
1
+ import type { PDF417ScanResult } from './types';
2
+ export declare function scanPDF417(_imagePath: string): Promise<PDF417ScanResult>;
3
+ //# sourceMappingURL=scanPDF417.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"scanPDF417.d.ts","sourceRoot":"","sources":["../../../src/scanPDF417.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,SAAS,CAAC;AAEhD,wBAAgB,UAAU,CAAC,UAAU,EAAE,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,CAIxE"}