@mleonard9/vin-scanner 1.5.0 → 1.5.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +19 -2
- package/ios/VisionCameraBarcodeScanner.m +2 -23
- package/ios/VisionCameraTextRecognition.m +2 -21
- package/lib/commonjs/ManualVinInput.js +25 -15
- package/lib/commonjs/ManualVinInput.js.map +1 -1
- package/lib/commonjs/PendingVinBanner.js +44 -21
- package/lib/commonjs/PendingVinBanner.js.map +1 -1
- package/lib/commonjs/ScannerChromeOverlay.js +185 -0
- package/lib/commonjs/ScannerChromeOverlay.js.map +1 -0
- package/lib/commonjs/TextVinPrompt.js +33 -18
- package/lib/commonjs/TextVinPrompt.js.map +1 -1
- package/lib/commonjs/index.js +11 -3
- package/lib/commonjs/index.js.map +1 -1
- package/lib/commonjs/scanBarcodes.js +25 -24
- package/lib/commonjs/scanBarcodes.js.map +1 -1
- package/lib/commonjs/scanText.js +22 -22
- package/lib/commonjs/scanText.js.map +1 -1
- package/lib/commonjs/useVinScanner.js +15 -4
- package/lib/commonjs/useVinScanner.js.map +1 -1
- package/lib/commonjs/vinUtils.js +6 -4
- package/lib/commonjs/vinUtils.js.map +1 -1
- package/lib/module/ManualVinInput.js +25 -15
- package/lib/module/ManualVinInput.js.map +1 -1
- package/lib/module/PendingVinBanner.js +45 -22
- package/lib/module/PendingVinBanner.js.map +1 -1
- package/lib/module/ScannerChromeOverlay.js +177 -0
- package/lib/module/ScannerChromeOverlay.js.map +1 -0
- package/lib/module/TextVinPrompt.js +33 -18
- package/lib/module/TextVinPrompt.js.map +1 -1
- package/lib/module/index.js +5 -3
- package/lib/module/index.js.map +1 -1
- package/lib/module/scanBarcodes.js +25 -24
- package/lib/module/scanBarcodes.js.map +1 -1
- package/lib/module/scanText.js +22 -22
- package/lib/module/scanText.js.map +1 -1
- package/lib/module/useVinScanner.js +15 -4
- package/lib/module/useVinScanner.js.map +1 -1
- package/lib/module/vinUtils.js +6 -4
- package/lib/module/vinUtils.js.map +1 -1
- package/lib/typescript/src/ManualVinInput.d.ts.map +1 -1
- package/lib/typescript/src/PendingVinBanner.d.ts +2 -1
- package/lib/typescript/src/PendingVinBanner.d.ts.map +1 -1
- package/lib/typescript/src/ScannerChromeOverlay.d.ts +19 -0
- package/lib/typescript/src/ScannerChromeOverlay.d.ts.map +1 -0
- package/lib/typescript/src/TextVinPrompt.d.ts.map +1 -1
- package/lib/typescript/src/index.d.ts +1 -0
- package/lib/typescript/src/index.d.ts.map +1 -1
- package/lib/typescript/src/scanBarcodes.d.ts.map +1 -1
- package/lib/typescript/src/scanText.d.ts.map +1 -1
- package/lib/typescript/src/types.d.ts +8 -2
- package/lib/typescript/src/types.d.ts.map +1 -1
- package/lib/typescript/src/useVinScanner.d.ts.map +1 -1
- package/lib/typescript/src/vinUtils.d.ts.map +1 -1
- package/package.json +1 -1
- package/src/ManualVinInput.tsx +22 -15
- package/src/PendingVinBanner.tsx +66 -27
- package/src/ScannerChromeOverlay.tsx +214 -0
- package/src/TextVinPrompt.tsx +31 -16
- package/src/index.tsx +6 -2
- package/src/scanBarcodes.ts +46 -40
- package/src/scanText.ts +34 -45
- package/src/types.ts +8 -2
- package/src/useVinScanner.ts +20 -4
- package/src/vinUtils.ts +5 -1
package/src/vinUtils.ts
CHANGED
|
@@ -66,6 +66,7 @@ const DEFAULT_RESOLVED_OPTIONS: ResolvedVinScannerOptions = {
|
|
|
66
66
|
text: {
|
|
67
67
|
enabled: true,
|
|
68
68
|
language: 'latin',
|
|
69
|
+
validationPattern: '[A-Z0-9]{10,}',
|
|
69
70
|
requireConfirmation: false,
|
|
70
71
|
pendingTtlMs: 5000,
|
|
71
72
|
},
|
|
@@ -76,7 +77,7 @@ const DEFAULT_RESOLVED_OPTIONS: ResolvedVinScannerOptions = {
|
|
|
76
77
|
scanRegion: { x: 0.15, y: 0.15, width: 0.7, height: 0.7 },
|
|
77
78
|
minLuma: 30,
|
|
78
79
|
minSharpness: 12,
|
|
79
|
-
minConfidence: 0
|
|
80
|
+
minConfidence: 0,
|
|
80
81
|
barcodeFallbackAfter: 45,
|
|
81
82
|
},
|
|
82
83
|
showOverlay: false,
|
|
@@ -111,6 +112,9 @@ export const resolveOptions = (
|
|
|
111
112
|
enabled: options?.text?.enabled ?? DEFAULT_RESOLVED_OPTIONS.text.enabled,
|
|
112
113
|
language:
|
|
113
114
|
options?.text?.language ?? DEFAULT_RESOLVED_OPTIONS.text.language,
|
|
115
|
+
validationPattern:
|
|
116
|
+
options?.text?.validationPattern ??
|
|
117
|
+
DEFAULT_RESOLVED_OPTIONS.text.validationPattern,
|
|
114
118
|
requireConfirmation:
|
|
115
119
|
options?.text?.requireConfirmation ??
|
|
116
120
|
DEFAULT_RESOLVED_OPTIONS.text.requireConfirmation,
|