rxing-wasm 0.2.10 → 0.2.11

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/package.json CHANGED
@@ -2,7 +2,7 @@
2
2
  "name": "rxing-wasm",
3
3
  "type": "module",
4
4
  "description": "wasm bindings for rxing to provide commong barcode operations (decode/encode)",
5
- "version": "0.2.10",
5
+ "version": "0.2.11",
6
6
  "license": "Apache 2.0",
7
7
  "repository": {
8
8
  "type": "git",
package/rxing_wasm.d.ts CHANGED
@@ -70,6 +70,102 @@ export function decode_barcode_with_hints(data: Uint8Array, width: number, heigh
70
70
  export function decode_multi(data: Uint8Array, width: number, height: number, hints: DecodeHintDictionary): MultiDecodeResult;
71
71
  /**
72
72
  */
73
+ export enum DecodeHintTypes {
74
+ /**
75
+ *
76
+ * * Unspecified, application-specific hint. Maps to an unspecified {@link Object}.
77
+ *
78
+ */
79
+ Other = 0,
80
+ /**
81
+ *
82
+ * * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
83
+ * * use {@link Boolean#TRUE}.
84
+ *
85
+ */
86
+ PureBarcode = 1,
87
+ /**
88
+ *
89
+ * * Image is known to be of one of a few possible formats.
90
+ * * Maps to a {@link List} of {@link BarcodeFormat}s.
91
+ *
92
+ */
93
+ PossibleFormats = 2,
94
+ /**
95
+ *
96
+ * * Spend more time to try to find a barcode; optimize for accuracy, not speed.
97
+ * * Doesn't matter what it maps to; use {@link Boolean#TRUE}.
98
+ *
99
+ */
100
+ TryHarder = 3,
101
+ /**
102
+ *
103
+ * * Specifies what character encoding to use when decoding, where applicable (type String)
104
+ *
105
+ */
106
+ CharacterSet = 4,
107
+ /**
108
+ *
109
+ * * Allowed lengths of encoded data -- reject anything else. Maps to an {@code int[]}.
110
+ *
111
+ */
112
+ AllowedLengths = 5,
113
+ /**
114
+ *
115
+ * * Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;
116
+ * * use {@link Boolean#TRUE}.
117
+ *
118
+ */
119
+ AssumeCode39CheckDigit = 6,
120
+ /**
121
+ *
122
+ * * Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.
123
+ * * For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;
124
+ * * use {@link Boolean#TRUE}.
125
+ *
126
+ */
127
+ AssumeGs1 = 7,
128
+ /**
129
+ *
130
+ * * If true, return the start and end digits in a Codabar barcode instead of stripping them. They
131
+ * * are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
132
+ * * to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
133
+ *
134
+ */
135
+ ReturnCodabarStartEnd = 8,
136
+ /**
137
+ *
138
+ * * The caller needs to be notified via callback when a possible {@link RXingResultPoint}
139
+ * * is found. Maps to a {@link RXingResultPointCallback}.
140
+ *
141
+ */
142
+ NeedResultPointCallback = 9,
143
+ /**
144
+ *
145
+ * * Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.
146
+ * * Maps to an {@code int[]} of the allowed extension lengths, for example [2], [5], or [2, 5].
147
+ * * If it is optional to have an extension, do not set this hint. If this is set,
148
+ * * and a UPC or EAN barcode is found but an extension is not, then no result will be returned
149
+ * * at all.
150
+ *
151
+ */
152
+ AllowedEanExtensions = 10,
153
+ /**
154
+ *
155
+ * * If true, also tries to decode as inverted image. All configured decoders are simply called a
156
+ * * second time with an inverted image. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
157
+ *
158
+ */
159
+ AlsoInverted = 11,
160
+ /**
161
+ *
162
+ * * Translate the ASCII values parsed by the Telepen reader into the Telepen Numeric form; use {@link Boolean#TRUE}.
163
+ *
164
+ */
165
+ TelepenAsNumeric = 12,
166
+ }
167
+ /**
168
+ */
73
169
  export enum EncodeHintTypes {
74
170
  /**
75
171
  *
@@ -241,102 +337,6 @@ export enum EncodeHintTypes {
241
337
  TelepenAsNumeric = 19,
242
338
  }
243
339
  /**
244
- */
245
- export enum DecodeHintTypes {
246
- /**
247
- *
248
- * * Unspecified, application-specific hint. Maps to an unspecified {@link Object}.
249
- *
250
- */
251
- Other = 0,
252
- /**
253
- *
254
- * * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
255
- * * use {@link Boolean#TRUE}.
256
- *
257
- */
258
- PureBarcode = 1,
259
- /**
260
- *
261
- * * Image is known to be of one of a few possible formats.
262
- * * Maps to a {@link List} of {@link BarcodeFormat}s.
263
- *
264
- */
265
- PossibleFormats = 2,
266
- /**
267
- *
268
- * * Spend more time to try to find a barcode; optimize for accuracy, not speed.
269
- * * Doesn't matter what it maps to; use {@link Boolean#TRUE}.
270
- *
271
- */
272
- TryHarder = 3,
273
- /**
274
- *
275
- * * Specifies what character encoding to use when decoding, where applicable (type String)
276
- *
277
- */
278
- CharacterSet = 4,
279
- /**
280
- *
281
- * * Allowed lengths of encoded data -- reject anything else. Maps to an {@code int[]}.
282
- *
283
- */
284
- AllowedLengths = 5,
285
- /**
286
- *
287
- * * Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;
288
- * * use {@link Boolean#TRUE}.
289
- *
290
- */
291
- AssumeCode39CheckDigit = 6,
292
- /**
293
- *
294
- * * Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.
295
- * * For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;
296
- * * use {@link Boolean#TRUE}.
297
- *
298
- */
299
- AssumeGs1 = 7,
300
- /**
301
- *
302
- * * If true, return the start and end digits in a Codabar barcode instead of stripping them. They
303
- * * are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
304
- * * to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
305
- *
306
- */
307
- ReturnCodabarStartEnd = 8,
308
- /**
309
- *
310
- * * The caller needs to be notified via callback when a possible {@link RXingResultPoint}
311
- * * is found. Maps to a {@link RXingResultPointCallback}.
312
- *
313
- */
314
- NeedResultPointCallback = 9,
315
- /**
316
- *
317
- * * Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.
318
- * * Maps to an {@code int[]} of the allowed extension lengths, for example [2], [5], or [2, 5].
319
- * * If it is optional to have an extension, do not set this hint. If this is set,
320
- * * and a UPC or EAN barcode is found but an extension is not, then no result will be returned
321
- * * at all.
322
- *
323
- */
324
- AllowedEanExtensions = 10,
325
- /**
326
- *
327
- * * If true, also tries to decode as inverted image. All configured decoders are simply called a
328
- * * second time with an inverted image. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
329
- *
330
- */
331
- AlsoInverted = 11,
332
- /**
333
- *
334
- * * Translate the ASCII values parsed by the Telepen reader into the Telepen Numeric form; use {@link Boolean#TRUE}.
335
- *
336
- */
337
- TelepenAsNumeric = 12,
338
- }
339
- /**
340
340
  * Available barcode types
341
341
  */
342
342
  export enum BarcodeFormat {
package/rxing_wasm_bg.js CHANGED
@@ -375,6 +375,101 @@ export function decode_multi(data, width, height, hints) {
375
375
  }
376
376
  }
377
377
 
378
+ /**
379
+ */
380
+ export const DecodeHintTypes = Object.freeze({
381
+ /**
382
+ *
383
+ * * Unspecified, application-specific hint. Maps to an unspecified {@link Object}.
384
+ *
385
+ */
386
+ Other:0,"0":"Other",
387
+ /**
388
+ *
389
+ * * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
390
+ * * use {@link Boolean#TRUE}.
391
+ *
392
+ */
393
+ PureBarcode:1,"1":"PureBarcode",
394
+ /**
395
+ *
396
+ * * Image is known to be of one of a few possible formats.
397
+ * * Maps to a {@link List} of {@link BarcodeFormat}s.
398
+ *
399
+ */
400
+ PossibleFormats:2,"2":"PossibleFormats",
401
+ /**
402
+ *
403
+ * * Spend more time to try to find a barcode; optimize for accuracy, not speed.
404
+ * * Doesn't matter what it maps to; use {@link Boolean#TRUE}.
405
+ *
406
+ */
407
+ TryHarder:3,"3":"TryHarder",
408
+ /**
409
+ *
410
+ * * Specifies what character encoding to use when decoding, where applicable (type String)
411
+ *
412
+ */
413
+ CharacterSet:4,"4":"CharacterSet",
414
+ /**
415
+ *
416
+ * * Allowed lengths of encoded data -- reject anything else. Maps to an {@code int[]}.
417
+ *
418
+ */
419
+ AllowedLengths:5,"5":"AllowedLengths",
420
+ /**
421
+ *
422
+ * * Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;
423
+ * * use {@link Boolean#TRUE}.
424
+ *
425
+ */
426
+ AssumeCode39CheckDigit:6,"6":"AssumeCode39CheckDigit",
427
+ /**
428
+ *
429
+ * * Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.
430
+ * * For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;
431
+ * * use {@link Boolean#TRUE}.
432
+ *
433
+ */
434
+ AssumeGs1:7,"7":"AssumeGs1",
435
+ /**
436
+ *
437
+ * * If true, return the start and end digits in a Codabar barcode instead of stripping them. They
438
+ * * are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
439
+ * * to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
440
+ *
441
+ */
442
+ ReturnCodabarStartEnd:8,"8":"ReturnCodabarStartEnd",
443
+ /**
444
+ *
445
+ * * The caller needs to be notified via callback when a possible {@link RXingResultPoint}
446
+ * * is found. Maps to a {@link RXingResultPointCallback}.
447
+ *
448
+ */
449
+ NeedResultPointCallback:9,"9":"NeedResultPointCallback",
450
+ /**
451
+ *
452
+ * * Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.
453
+ * * Maps to an {@code int[]} of the allowed extension lengths, for example [2], [5], or [2, 5].
454
+ * * If it is optional to have an extension, do not set this hint. If this is set,
455
+ * * and a UPC or EAN barcode is found but an extension is not, then no result will be returned
456
+ * * at all.
457
+ *
458
+ */
459
+ AllowedEanExtensions:10,"10":"AllowedEanExtensions",
460
+ /**
461
+ *
462
+ * * If true, also tries to decode as inverted image. All configured decoders are simply called a
463
+ * * second time with an inverted image. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
464
+ *
465
+ */
466
+ AlsoInverted:11,"11":"AlsoInverted",
467
+ /**
468
+ *
469
+ * * Translate the ASCII values parsed by the Telepen reader into the Telepen Numeric form; use {@link Boolean#TRUE}.
470
+ *
471
+ */
472
+ TelepenAsNumeric:12,"12":"TelepenAsNumeric", });
378
473
  /**
379
474
  */
380
475
  export const EncodeHintTypes = Object.freeze({
@@ -546,101 +641,6 @@ ForceC40:17,"17":"ForceC40",
546
641
  */
547
642
  Code128Compact:18,"18":"Code128Compact",TelepenAsNumeric:19,"19":"TelepenAsNumeric", });
548
643
  /**
549
- */
550
- export const DecodeHintTypes = Object.freeze({
551
- /**
552
- *
553
- * * Unspecified, application-specific hint. Maps to an unspecified {@link Object}.
554
- *
555
- */
556
- Other:0,"0":"Other",
557
- /**
558
- *
559
- * * Image is a pure monochrome image of a barcode. Doesn't matter what it maps to;
560
- * * use {@link Boolean#TRUE}.
561
- *
562
- */
563
- PureBarcode:1,"1":"PureBarcode",
564
- /**
565
- *
566
- * * Image is known to be of one of a few possible formats.
567
- * * Maps to a {@link List} of {@link BarcodeFormat}s.
568
- *
569
- */
570
- PossibleFormats:2,"2":"PossibleFormats",
571
- /**
572
- *
573
- * * Spend more time to try to find a barcode; optimize for accuracy, not speed.
574
- * * Doesn't matter what it maps to; use {@link Boolean#TRUE}.
575
- *
576
- */
577
- TryHarder:3,"3":"TryHarder",
578
- /**
579
- *
580
- * * Specifies what character encoding to use when decoding, where applicable (type String)
581
- *
582
- */
583
- CharacterSet:4,"4":"CharacterSet",
584
- /**
585
- *
586
- * * Allowed lengths of encoded data -- reject anything else. Maps to an {@code int[]}.
587
- *
588
- */
589
- AllowedLengths:5,"5":"AllowedLengths",
590
- /**
591
- *
592
- * * Assume Code 39 codes employ a check digit. Doesn't matter what it maps to;
593
- * * use {@link Boolean#TRUE}.
594
- *
595
- */
596
- AssumeCode39CheckDigit:6,"6":"AssumeCode39CheckDigit",
597
- /**
598
- *
599
- * * Assume the barcode is being processed as a GS1 barcode, and modify behavior as needed.
600
- * * For example this affects FNC1 handling for Code 128 (aka GS1-128). Doesn't matter what it maps to;
601
- * * use {@link Boolean#TRUE}.
602
- *
603
- */
604
- AssumeGs1:7,"7":"AssumeGs1",
605
- /**
606
- *
607
- * * If true, return the start and end digits in a Codabar barcode instead of stripping them. They
608
- * * are alpha, whereas the rest are numeric. By default, they are stripped, but this causes them
609
- * * to not be. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
610
- *
611
- */
612
- ReturnCodabarStartEnd:8,"8":"ReturnCodabarStartEnd",
613
- /**
614
- *
615
- * * The caller needs to be notified via callback when a possible {@link RXingResultPoint}
616
- * * is found. Maps to a {@link RXingResultPointCallback}.
617
- *
618
- */
619
- NeedResultPointCallback:9,"9":"NeedResultPointCallback",
620
- /**
621
- *
622
- * * Allowed extension lengths for EAN or UPC barcodes. Other formats will ignore this.
623
- * * Maps to an {@code int[]} of the allowed extension lengths, for example [2], [5], or [2, 5].
624
- * * If it is optional to have an extension, do not set this hint. If this is set,
625
- * * and a UPC or EAN barcode is found but an extension is not, then no result will be returned
626
- * * at all.
627
- *
628
- */
629
- AllowedEanExtensions:10,"10":"AllowedEanExtensions",
630
- /**
631
- *
632
- * * If true, also tries to decode as inverted image. All configured decoders are simply called a
633
- * * second time with an inverted image. Doesn't matter what it maps to; use {@link Boolean#TRUE}.
634
- *
635
- */
636
- AlsoInverted:11,"11":"AlsoInverted",
637
- /**
638
- *
639
- * * Translate the ASCII values parsed by the Telepen reader into the Telepen Numeric form; use {@link Boolean#TRUE}.
640
- *
641
- */
642
- TelepenAsNumeric:12,"12":"TelepenAsNumeric", });
643
- /**
644
644
  * Available barcode types
645
645
  */
646
646
  export const BarcodeFormat = Object.freeze({
Binary file