@pixelverse/strichjs-sdk 1.1.2 → 1.1.4
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 +21 -0
- package/dist/strich.d.ts +36 -2
- package/dist/strich.js +1 -1
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [1.1.4] - 2023-06-26
|
|
4
|
+
|
|
5
|
+
### Added
|
|
6
|
+
|
|
7
|
+
- User-facing error messages (e.g. "Access to camera not permitted") are now localized. English, Spanish, German, French and Italian are the currently supported languages, with more to come.
|
|
8
|
+
- Prepared support for iOS 17 Safari OffscreenCanvas+WebGL support. STRICH will utilize a GPU-accelerated OffscreenCanvas if the browser supports it.
|
|
9
|
+
|
|
10
|
+
### Fixed
|
|
11
|
+
|
|
12
|
+
- Improved performance when scanning EAN/UPC codes with hysteresis enabled.
|
|
13
|
+
|
|
14
|
+
## [1.1.3] - 2023-06-07
|
|
15
|
+
|
|
16
|
+
### Added
|
|
17
|
+
|
|
18
|
+
- Configurable min/max length for variable-length symbologies. Instead of just the name, specify an object with `name`, `minLen` and/or `maxLen` in the `symbologies` array. Example: `symbologies: ['ean13', { name: 'code128', minLen: 8, maxLen: 12 }]`
|
|
19
|
+
|
|
20
|
+
### Fixed
|
|
21
|
+
|
|
22
|
+
- Removed a stray console output statement that was meant for debugging purposes only.
|
|
23
|
+
|
|
3
24
|
## [1.1.2] - 2023-06-06
|
|
4
25
|
|
|
5
26
|
### Fixed
|
package/dist/strich.d.ts
CHANGED
|
@@ -6,8 +6,19 @@ export class SdkError extends Error {
|
|
|
6
6
|
* Flag indicating if this error is related to camera access.
|
|
7
7
|
*/
|
|
8
8
|
duringCameraAccess: boolean;
|
|
9
|
+
/**
|
|
10
|
+
* A localized error message, if available, otherwise this will contain the non-localized message.
|
|
11
|
+
*/
|
|
12
|
+
localizedMessage: string;
|
|
13
|
+
/**
|
|
14
|
+
* An optional underlying error that caused this error.
|
|
15
|
+
*/
|
|
9
16
|
cause?: Error;
|
|
10
|
-
|
|
17
|
+
/**
|
|
18
|
+
* An optional detail message to display to disambiguate multiple errors (not-translated)
|
|
19
|
+
*/
|
|
20
|
+
detailMessage?: string;
|
|
21
|
+
constructor(keyOrMessage: string, cause?: Error);
|
|
11
22
|
}
|
|
12
23
|
/**
|
|
13
24
|
* Configuration for the frame source (camera).
|
|
@@ -83,6 +94,23 @@ export interface LocatorConfiguration {
|
|
|
83
94
|
* The supported symbologies.
|
|
84
95
|
*/
|
|
85
96
|
export type SymbologyName = 'ean13' | 'ean8' | 'ean5' | 'ean2' | 'upca' | 'upce' | 'databar' | 'databar-exp' | 'code39' | 'code93' | 'code128' | 'i25' | 'codabar' | 'qr' | 'aztec' | 'datamatrix';
|
|
97
|
+
/**
|
|
98
|
+
* For variable-length symbologies, min/max length can be specified in addition to the symbology.
|
|
99
|
+
*/
|
|
100
|
+
export type SymbologySpec = {
|
|
101
|
+
/**
|
|
102
|
+
* The name of the symbology.
|
|
103
|
+
*/
|
|
104
|
+
name: SymbologyName;
|
|
105
|
+
/**
|
|
106
|
+
* The minimum length of the barcode, only has an effect for variable-length symbologies.
|
|
107
|
+
*/
|
|
108
|
+
minLen?: number;
|
|
109
|
+
/**
|
|
110
|
+
* The maximum length of the barcode, only has an effect for variable-length symbologies.
|
|
111
|
+
*/
|
|
112
|
+
maxLen?: number;
|
|
113
|
+
};
|
|
86
114
|
/**
|
|
87
115
|
* Engine configuration
|
|
88
116
|
*/
|
|
@@ -97,7 +125,7 @@ export interface EngineConfiguration {
|
|
|
97
125
|
*
|
|
98
126
|
* @default undefined (all symbologies enabled - NOT RECOMMENDED)
|
|
99
127
|
*/
|
|
100
|
-
symbologies?: SymbologyName[];
|
|
128
|
+
symbologies?: (SymbologyName | SymbologySpec)[];
|
|
101
129
|
/**
|
|
102
130
|
* The number of scanlines to run over a located barcode candidate.
|
|
103
131
|
*
|
|
@@ -307,6 +335,12 @@ export class StrichSDK {
|
|
|
307
335
|
* @default No custom ID is set by default
|
|
308
336
|
*/
|
|
309
337
|
static setCustomId(customId: string | null): void;
|
|
338
|
+
/**
|
|
339
|
+
* Override the language that was detected from the browser's language (navigator.language)
|
|
340
|
+
*
|
|
341
|
+
* @param lang ISO language code, e.g. 'en'
|
|
342
|
+
*/
|
|
343
|
+
static setLanguage(lang: string): void;
|
|
310
344
|
}
|
|
311
345
|
/**
|
|
312
346
|
* A code detection reported by the STRICH SDK.
|