@pixelverse/strichjs-sdk 1.0.9 → 1.1.1
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/CHANGELOG.md +22 -5
- package/dist/strich.d.ts +31 -1
- package/dist/strich.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,22 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.1] - 2023-05-22
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- Added hysteresis for 1D barcodes with weak checksums (EAN/UPC symbologies) to decrease misreads. This feature improves reliability for EAN/UPC barcodes at the cost of slightly slower detection, and can be deactivated by setting the new `hysteresisMinCount` engine parameter to `0`.
|
|
8
|
+
|
|
9
|
+
### Fixed
|
|
10
|
+
|
|
11
|
+
- Fixed a memory violation in the Databar decoder, which would occasionally crash the engine.
|
|
12
|
+
|
|
13
|
+
## [1.1.0] - 2023-05-17
|
|
14
|
+
|
|
15
|
+
### Added
|
|
16
|
+
|
|
17
|
+
- Added experimental support for EAN-2/EAN-5 supplements (new `ean2` and `ean5` symbology options). Note that this feature is experimental: supplemental symbologies will not be enabled if you enable all symbologies (which we do not recommend).
|
|
18
|
+
- Added an optional `onError` callback to the BarcodeReader instance.
|
|
19
|
+
|
|
3
20
|
## [1.0.9] - 2023-05-15
|
|
4
21
|
|
|
5
22
|
### Fixed
|
|
@@ -11,8 +28,8 @@
|
|
|
11
28
|
|
|
12
29
|
### Added
|
|
13
30
|
|
|
14
|
-
- Not calling BarcodeReader.destroy() after no longer needing a BarcodeReader is a common cause of camera access errors. A warning is now logged to the browser console if a BarcodeReader is initialized when another instance remains that was not destroyed yet.
|
|
15
|
-
- If no
|
|
31
|
+
- Not calling `BarcodeReader.destroy()` after no longer needing a BarcodeReader is a common cause of camera access errors. A warning is now logged to the browser console if a BarcodeReader is initialized when another instance remains that was not destroyed yet.
|
|
32
|
+
- If no `regionOfInterest` is specified in the configuration, an appropriately sized region will now be automatically selected based on the configured symbologies.
|
|
16
33
|
|
|
17
34
|
### Fixed
|
|
18
35
|
|
|
@@ -26,7 +43,7 @@
|
|
|
26
43
|
|
|
27
44
|
### Changed
|
|
28
45
|
|
|
29
|
-
- Clarified acceptable use of StrichSDK.setCustomId()
|
|
46
|
+
- Clarified acceptable use of `StrichSDK.setCustomId()`, personally identifying data must not be sent.
|
|
30
47
|
|
|
31
48
|
## [1.0.6] - 2023-04-19
|
|
32
49
|
|
|
@@ -54,7 +71,7 @@
|
|
|
54
71
|
|
|
55
72
|
### Changed
|
|
56
73
|
|
|
57
|
-
- Not setting a duplicateInterval in the engine configuration will now lead to a default 750ms interval to be used.
|
|
74
|
+
- Not setting a `duplicateInterval` in the engine configuration will now lead to a default 750ms interval to be used.
|
|
58
75
|
|
|
59
76
|
### Fixed
|
|
60
77
|
|
|
@@ -75,7 +92,7 @@
|
|
|
75
92
|
### Fixed
|
|
76
93
|
|
|
77
94
|
- Gracefully handle the situation where MediaStream does not implement getCapabilities() (e.g. Firefox Android).
|
|
78
|
-
- Avoid spurious exception after BarcodeReader.destroy() from an asynchronous overlay update in destroyed state
|
|
95
|
+
- Avoid spurious exception after `BarcodeReader.destroy()` from an asynchronous overlay update in destroyed state
|
|
79
96
|
- Aztec code detection rectangle was not displayed on overlay for some non-compact Aztec codes.
|
|
80
97
|
|
|
81
98
|
## [1.0.0] - 2023-03-15
|
package/dist/strich.d.ts
CHANGED
|
@@ -82,7 +82,7 @@ export interface LocatorConfiguration {
|
|
|
82
82
|
/**
|
|
83
83
|
* The supported symbologies.
|
|
84
84
|
*/
|
|
85
|
-
export type SymbologyName = 'ean13' | 'ean8' | 'upca' | 'upce' | 'databar' | 'databar-exp' | 'code39' | 'code93' | 'code128' | 'i25' | 'codabar' | 'qr' | 'aztec' | 'datamatrix';
|
|
85
|
+
export type SymbologyName = 'ean13' | 'ean8' | 'ean5' | 'ean2' | 'upca' | 'upce' | 'databar' | 'databar-exp' | 'code39' | 'code93' | 'code128' | 'i25' | 'codabar' | 'qr' | 'aztec' | 'datamatrix';
|
|
86
86
|
/**
|
|
87
87
|
* Engine configuration
|
|
88
88
|
*/
|
|
@@ -131,6 +131,25 @@ export interface EngineConfiguration {
|
|
|
131
131
|
* It is recommended to set a low duplicateInterval as scans are metered in non-Enterprise subscriptions.
|
|
132
132
|
*/
|
|
133
133
|
duplicateInterval?: number;
|
|
134
|
+
/**
|
|
135
|
+
* Hysteresis parameterization for 1D barcodes with weak checksums.
|
|
136
|
+
*
|
|
137
|
+
* This parameter sets the minimum threshold for the number of detections of a barcode in the hysteresis
|
|
138
|
+
* window for it to be accepted.
|
|
139
|
+
*
|
|
140
|
+
* Setting this parameter to 0 disables hysteresis (default behavior for versions <= 1.1.0)
|
|
141
|
+
*
|
|
142
|
+
* @default 3
|
|
143
|
+
*/
|
|
144
|
+
hysteresisMinCount?: number;
|
|
145
|
+
/**
|
|
146
|
+
* Hysteresis parameterization for 1D barcodes with weak checksums.
|
|
147
|
+
*
|
|
148
|
+
* This parameter sets the size of the hysteresis window in milliseconds.
|
|
149
|
+
*
|
|
150
|
+
* @default 250
|
|
151
|
+
*/
|
|
152
|
+
hysteresisInterval?: number;
|
|
134
153
|
}
|
|
135
154
|
/**
|
|
136
155
|
* Overlay configuration
|
|
@@ -301,6 +320,10 @@ export interface CodeDetection {
|
|
|
301
320
|
* The type of detected code.
|
|
302
321
|
*/
|
|
303
322
|
typeName: string;
|
|
323
|
+
/**
|
|
324
|
+
* Supplemental data for this code.
|
|
325
|
+
*/
|
|
326
|
+
supplementalData: string | null;
|
|
304
327
|
/**
|
|
305
328
|
* The bounding rectangle in which the code was detected.
|
|
306
329
|
*
|
|
@@ -322,6 +345,13 @@ export class BarcodeReader {
|
|
|
322
345
|
* This is a synchronous call, so further processing will not happen until the handler returns.
|
|
323
346
|
*/
|
|
324
347
|
detected?: (detections: CodeDetection[]) => (void);
|
|
348
|
+
/**
|
|
349
|
+
* Optional user-supplied error callback.
|
|
350
|
+
*
|
|
351
|
+
* This is invoked by the BarcodeReader if an error occurred while processing frames, and is usually not
|
|
352
|
+
* recoverable.
|
|
353
|
+
*/
|
|
354
|
+
onError?: (error: Error) => (void);
|
|
325
355
|
/**
|
|
326
356
|
* Create a new BarcodeReader using a Configuration.
|
|
327
357
|
*
|