@pixelverse/strichjs-sdk 1.0.8 → 1.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.
package/CHANGELOG.md CHANGED
@@ -1,11 +1,25 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.1.0] - 2023-05-17
4
+
5
+ ### Added
6
+
7
+ - 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).
8
+ - Added an optional `onError` callback to the BarcodeReader instance.
9
+
10
+ ## [1.0.9] - 2023-05-15
11
+
12
+ ### Fixed
13
+
14
+ - Fixed an issue where an error in the WebAssembly engine was misinterpreted, and wrong results where generated.
15
+ - Do not draw the red 'laser line' when a 2D symbology is scanned
16
+
3
17
  ## [1.0.8] - 2023-05-11
4
18
 
5
19
  ### Added
6
20
 
7
- - 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.
8
- - If no Region of Interest is specified in the configuration, an appropriately sized region will now be automatically selected based on the configured symbologies.
21
+ - 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.
22
+ - If no `regionOfInterest` is specified in the configuration, an appropriately sized region will now be automatically selected based on the configured symbologies.
9
23
 
10
24
  ### Fixed
11
25
 
@@ -19,7 +33,7 @@
19
33
 
20
34
  ### Changed
21
35
 
22
- - Clarified acceptable use of StrichSDK.setCustomId(), personally identifying data must not be sent.
36
+ - Clarified acceptable use of `StrichSDK.setCustomId()`, personally identifying data must not be sent.
23
37
 
24
38
  ## [1.0.6] - 2023-04-19
25
39
 
@@ -47,7 +61,7 @@
47
61
 
48
62
  ### Changed
49
63
 
50
- - Not setting a duplicateInterval in the engine configuration will now lead to a default 750ms interval to be used.
64
+ - Not setting a `duplicateInterval` in the engine configuration will now lead to a default 750ms interval to be used.
51
65
 
52
66
  ### Fixed
53
67
 
@@ -68,7 +82,7 @@
68
82
  ### Fixed
69
83
 
70
84
  - Gracefully handle the situation where MediaStream does not implement getCapabilities() (e.g. Firefox Android).
71
- - Avoid spurious exception after BarcodeReader.destroy() from an asynchronous overlay update in destroyed state
85
+ - Avoid spurious exception after `BarcodeReader.destroy()` from an asynchronous overlay update in destroyed state
72
86
  - Aztec code detection rectangle was not displayed on overlay for some non-compact Aztec codes.
73
87
 
74
88
  ## [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
  */
@@ -301,6 +301,10 @@ export interface CodeDetection {
301
301
  * The type of detected code.
302
302
  */
303
303
  typeName: string;
304
+ /**
305
+ * Supplemental data for this code.
306
+ */
307
+ supplementalData: string | null;
304
308
  /**
305
309
  * The bounding rectangle in which the code was detected.
306
310
  *
@@ -322,6 +326,13 @@ export class BarcodeReader {
322
326
  * This is a synchronous call, so further processing will not happen until the handler returns.
323
327
  */
324
328
  detected?: (detections: CodeDetection[]) => (void);
329
+ /**
330
+ * Optional user-supplied error callback.
331
+ *
332
+ * This is invoked by the BarcodeReader if an error occurred while processing frames, and is usually not
333
+ * recoverable.
334
+ */
335
+ onError?: (error: Error) => (void);
325
336
  /**
326
337
  * Create a new BarcodeReader using a Configuration.
327
338
  *