@pixelverse/strichjs-sdk 0.8.7 → 0.9.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/README.md CHANGED
@@ -1,6 +1,7 @@
1
1
  # STRICH JavaScript SDK
2
2
 
3
- * [Getting Started](https://docs.strich.io/getting-started)
4
- * [API Reference Documentation](https://docs.strich.io)
5
- * [Customer Portal](https://portal.strich.io)
3
+ Fast, reliable barcode scanning for web apps.
6
4
 
5
+ Get started with the STRICH SDK by visiting the [Customer Portal](https://portal.strich.io) and signing up for a license key.
6
+
7
+ STRICH is commercial software, its use is governed by the terms available in the Customer Portal.
package/dist/strich.d.ts CHANGED
@@ -1,20 +1,3 @@
1
- /**
2
- * Encapsulation of a JWT-based license.
3
- *
4
- * @internal
5
- */
6
- interface License {
7
- iss: string;
8
- sub: string;
9
- iat: number;
10
- nbf: number;
11
- aud: string[];
12
- exp?: number;
13
- capabilities: {
14
- [key: string]: unknown;
15
- };
16
- version: number;
17
- }
18
1
  /**
19
2
  * STRICH SDK error class
20
3
  */
@@ -24,13 +7,6 @@ export class SdkError extends Error {
24
7
  */
25
8
  duringCameraAccess: boolean;
26
9
  constructor(message: string, cause?: Error);
27
- /**
28
- * Create an SDK error from a getUserMedia exception.
29
- * See: https://developer.mozilla.org/en-US/docs/Web/API/MediaDevices/getUserMedia#exceptions
30
- *
31
- * @internal
32
- */
33
- static fromGetUserMediaError(err: Error): SdkError;
34
10
  }
35
11
  /**
36
12
  * Configuration for the frame source (camera).
@@ -46,10 +22,6 @@ export interface FrameSourceConfiguration {
46
22
  * @default hd
47
23
  */
48
24
  resolution?: 'hd' | 'full-hd' | 'auto';
49
- /**
50
- * Allow other properties (for internal purposes)
51
- */
52
- [key: string]: unknown;
53
25
  }
54
26
  export function defaultFrameSourceConfiguration(): FrameSourceConfiguration;
55
27
  /**
@@ -105,12 +77,6 @@ export interface LocatorConfiguration {
105
77
  * @default false
106
78
  */
107
79
  chromaReject?: boolean;
108
- /**
109
- * Allow other properties (for internal purposes)
110
- *
111
- * @internal
112
- */
113
- [key: string]: unknown;
114
80
  }
115
81
  /**
116
82
  * The supported symbologies.
@@ -147,28 +113,6 @@ export interface EngineConfiguration {
147
113
  * @default 2
148
114
  */
149
115
  minScanlinesNeeded?: number;
150
- /**
151
- * Toggle fallback scanning.
152
- *
153
- * Enables additional scan passes if no barcodes were found in areas identified as candidates in the
154
- * location process. Can help with obscured/low contrast barcodes, at the expension of minor additional
155
- * complexity.
156
- *
157
- * @default true
158
- * @internal
159
- */
160
- fallbackScan?: boolean;
161
- /**
162
- * Toggle image preprocessing for 1D barcodes.
163
- *
164
- * Can help with degraded/damaged barcodes, at the expense of additional computational complexity.
165
- *
166
- * @default true
167
- * @internal
168
- */
169
- preProcess1D?: boolean;
170
- /** @internal */
171
- simple1DMode?: boolean;
172
116
  /**
173
117
  * Toggle recognition of inverted 2D codes (light on dark background).
174
118
  * Currently, this is only supported for 2D codes.
@@ -184,12 +128,6 @@ export interface EngineConfiguration {
184
128
  * It is recommended to set a low duplicateInterval as scans are metered in non-Enterprise subscriptions.
185
129
  */
186
130
  duplicateInterval?: number;
187
- /**
188
- * Allow other properties (for internal purposes)
189
- *
190
- * @internal
191
- */
192
- [key: string]: unknown;
193
131
  }
194
132
  /**
195
133
  * Overlay configuration
@@ -221,12 +159,6 @@ export interface OverlayConfiguration {
221
159
  * @default true
222
160
  */
223
161
  showFlashlight?: boolean;
224
- /**
225
- * Allow other properties (for internal purposes)
226
- *
227
- * @internal
228
- */
229
- [key: string]: unknown;
230
162
  }
231
163
  /**
232
164
  * User feedback configuration
@@ -244,24 +176,18 @@ export interface FeedbackConfiguration {
244
176
  * @default true
245
177
  */
246
178
  vibration?: boolean;
247
- /**
248
- * Allow other properties (for internal purposes)
249
- *
250
- * @internal
251
- */
252
- [key: string]: unknown;
253
179
  }
254
180
  /**
255
181
  * BarcodeReader configuration object.
256
182
  */
257
183
  export interface Configuration {
258
184
  /**
259
- * CSS Selector referencing an element that will host the visible elements of
185
+ * CSS Selector or reference to the HTML element that will host the visible elements of
260
186
  * the BarcodeReader.
261
187
  *
262
- * Make sure the selector only matches a single element.
188
+ * When using a selector, make sure the selector only matches a single element.
263
189
  */
264
- selector: string;
190
+ selector: string | HTMLElement;
265
191
  /**
266
192
  * Mode: can be 'immediate' (default) for always-on scanning, and 'touch', to only scan when a touch occurs.
267
193
  *
@@ -288,12 +214,6 @@ export interface Configuration {
288
214
  * Feedback configuration
289
215
  */
290
216
  feedback?: FeedbackConfiguration;
291
- /**
292
- * Allow other properties (for internal purposes)
293
- *
294
- * @internal
295
- */
296
- [key: string]: unknown;
297
217
  }
298
218
  /**
299
219
  * A point in two-dimensional space.
@@ -328,12 +248,6 @@ export interface Rect {
328
248
  * Before the STRICH SDK {@link BarcodeReader} can be used, a one-time initialization of the SDK must be performed.
329
249
  */
330
250
  export class StrichSDK {
331
- /** @internal */
332
- static license: License;
333
- /** @internal */
334
- static deviceId: string | null;
335
- /** @internal */
336
- static customId: string | null;
337
251
  /**
338
252
  * Return the version of the STRICH SDK.
339
253
  */