rxing-wasm 0.2.7 → 0.2.8
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 +1 -1
- package/rxing_wasm.d.ts +172 -172
- package/rxing_wasm_bg.js +167 -167
- package/rxing_wasm_bg.wasm +0 -0
package/package.json
CHANGED
package/rxing_wasm.d.ts
CHANGED
|
@@ -70,6 +70,178 @@ 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 EncodeHintTypes {
|
|
74
|
+
/**
|
|
75
|
+
*
|
|
76
|
+
* * Specifies what degree of error correction to use, for example in QR Codes.
|
|
77
|
+
* * Type depends on the encoder. For example for QR codes it's type
|
|
78
|
+
* * {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.
|
|
79
|
+
* * For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.
|
|
80
|
+
* * For PDF417 it is of type {@link Integer}, valid values being 0 to 8.
|
|
81
|
+
* * In all cases, it can also be a {@link String} representation of the desired value as well.
|
|
82
|
+
* * Note: an Aztec symbol should have a minimum of 25% EC words.
|
|
83
|
+
*
|
|
84
|
+
*/
|
|
85
|
+
ErrorCorrection = 0,
|
|
86
|
+
/**
|
|
87
|
+
*
|
|
88
|
+
* * Specifies what character encoding to use where applicable (type {@link String})
|
|
89
|
+
*
|
|
90
|
+
*/
|
|
91
|
+
CharacterSet = 1,
|
|
92
|
+
/**
|
|
93
|
+
*
|
|
94
|
+
* * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})
|
|
95
|
+
*
|
|
96
|
+
*/
|
|
97
|
+
DataMatrixShape = 2,
|
|
98
|
+
/**
|
|
99
|
+
*
|
|
100
|
+
* * Specifies whether to use compact mode for Data Matrix (type {@link Boolean}, or "true" or "false"
|
|
101
|
+
* * {@link String } value).
|
|
102
|
+
* * The compact encoding mode also supports the encoding of characters that are not in the ISO-8859-1
|
|
103
|
+
* * character set via ECIs.
|
|
104
|
+
* * Please note that in that case, the most compact character encoding is chosen for characters in
|
|
105
|
+
* * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
|
|
106
|
+
* * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
|
|
107
|
+
* * means of the {@link #CHARACTER_SET} encoding hint.
|
|
108
|
+
* * Compact encoding also provides GS1-FNC1 support when {@link #GS1_FORMAT} is selected. In this case
|
|
109
|
+
* * group-separator character (ASCII 29 decimal) can be used to encode the positions of FNC1 codewords
|
|
110
|
+
* * for the purpose of delimiting AIs.
|
|
111
|
+
* * This option and {@link #FORCE_C40} are mutually exclusive.
|
|
112
|
+
*
|
|
113
|
+
*/
|
|
114
|
+
DataMatrixCompact = 3,
|
|
115
|
+
/**
|
|
116
|
+
*
|
|
117
|
+
* * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
118
|
+
* *
|
|
119
|
+
* * @deprecated use width/height params in
|
|
120
|
+
* * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
|
|
121
|
+
*
|
|
122
|
+
*/
|
|
123
|
+
MinSize = 4,
|
|
124
|
+
/**
|
|
125
|
+
*
|
|
126
|
+
* * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
127
|
+
* *
|
|
128
|
+
* * @deprecated without replacement
|
|
129
|
+
*
|
|
130
|
+
*/
|
|
131
|
+
MaxSize = 5,
|
|
132
|
+
/**
|
|
133
|
+
*
|
|
134
|
+
* * Specifies margin, in pixels, to use when generating the barcode. The meaning can vary
|
|
135
|
+
* * by format; for example it controls margin before and after the barcode horizontally for
|
|
136
|
+
* * most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
137
|
+
*
|
|
138
|
+
*/
|
|
139
|
+
MARGIN = 6,
|
|
140
|
+
/**
|
|
141
|
+
*
|
|
142
|
+
* * Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or "true" or "false"
|
|
143
|
+
* * {@link String} value).
|
|
144
|
+
*
|
|
145
|
+
*/
|
|
146
|
+
Pdf417Compact = 7,
|
|
147
|
+
/**
|
|
148
|
+
*
|
|
149
|
+
* * Specifies what compaction mode to use for PDF417 (type
|
|
150
|
+
* * {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its
|
|
151
|
+
* * enum values).
|
|
152
|
+
*
|
|
153
|
+
*/
|
|
154
|
+
Pdf417Compaction = 8,
|
|
155
|
+
/**
|
|
156
|
+
*
|
|
157
|
+
* * Specifies the minimum and maximum number of rows and columns for PDF417 (type
|
|
158
|
+
* * {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).
|
|
159
|
+
*
|
|
160
|
+
*/
|
|
161
|
+
Pdf417Dimensions = 9,
|
|
162
|
+
/**
|
|
163
|
+
*
|
|
164
|
+
* * Specifies whether to automatically insert ECIs when encoding PDF417 (type {@link Boolean}, or "true" or "false"
|
|
165
|
+
* * {@link String} value).
|
|
166
|
+
* * Please note that in that case, the most compact character encoding is chosen for characters in
|
|
167
|
+
* * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
|
|
168
|
+
* * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
|
|
169
|
+
* * means of the {@link #CHARACTER_SET} encoding hint.
|
|
170
|
+
*
|
|
171
|
+
*/
|
|
172
|
+
Pdf417AutoEci = 10,
|
|
173
|
+
/**
|
|
174
|
+
*
|
|
175
|
+
* * Specifies the required number of layers for an Aztec code.
|
|
176
|
+
* * A negative number (-1, -2, -3, -4) specifies a compact Aztec code.
|
|
177
|
+
* * 0 indicates to use the minimum number of layers (the default).
|
|
178
|
+
* * A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.
|
|
179
|
+
* * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
180
|
+
*
|
|
181
|
+
*/
|
|
182
|
+
AztecLayers = 11,
|
|
183
|
+
/**
|
|
184
|
+
*
|
|
185
|
+
* * Specifies the exact version of QR code to be encoded.
|
|
186
|
+
* * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
187
|
+
*
|
|
188
|
+
*/
|
|
189
|
+
QrVersion = 12,
|
|
190
|
+
/**
|
|
191
|
+
*
|
|
192
|
+
* * Specifies the QR code mask pattern to be used. Allowed values are
|
|
193
|
+
* * 0..QRCode.NUM_MASK_PATTERNS-1. By default the code will automatically select
|
|
194
|
+
* * the optimal mask pattern.
|
|
195
|
+
* * * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
196
|
+
*
|
|
197
|
+
*/
|
|
198
|
+
QrMaskPattern = 13,
|
|
199
|
+
/**
|
|
200
|
+
*
|
|
201
|
+
* * Specifies whether to use compact mode for QR code (type {@link Boolean}, or "true" or "false"
|
|
202
|
+
* * {@link String } value).
|
|
203
|
+
* * Please note that when compaction is performed, the most compact character encoding is chosen
|
|
204
|
+
* * for characters in the input that are not in the ISO-8859-1 character set. Based on experience,
|
|
205
|
+
* * some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can
|
|
206
|
+
* * be forced to UTF-8 by means of the {@link #CHARACTER_SET} encoding hint.
|
|
207
|
+
*
|
|
208
|
+
*/
|
|
209
|
+
QrCompact = 14,
|
|
210
|
+
/**
|
|
211
|
+
*
|
|
212
|
+
* * Specifies whether the data should be encoded to the GS1 standard (type {@link Boolean}, or "true" or "false"
|
|
213
|
+
* * {@link String } value).
|
|
214
|
+
*
|
|
215
|
+
*/
|
|
216
|
+
Gs1Format = 15,
|
|
217
|
+
/**
|
|
218
|
+
*
|
|
219
|
+
* * Forces which encoding will be used. Currently only used for Code-128 code sets (Type {@link String}).
|
|
220
|
+
* * Valid values are "A", "B", "C".
|
|
221
|
+
* * This option and {@link #CODE128_COMPACT} are mutually exclusive.
|
|
222
|
+
*
|
|
223
|
+
*/
|
|
224
|
+
ForceCodeSet = 16,
|
|
225
|
+
/**
|
|
226
|
+
*
|
|
227
|
+
* * Forces C40 encoding for data-matrix (type {@link Boolean}, or "true" or "false") {@link String } value). This
|
|
228
|
+
* * option and {@link #DATA_MATRIX_COMPACT} are mutually exclusive.
|
|
229
|
+
*
|
|
230
|
+
*/
|
|
231
|
+
ForceC40 = 17,
|
|
232
|
+
/**
|
|
233
|
+
*
|
|
234
|
+
* * Specifies whether to use compact mode for Code-128 code (type {@link Boolean}, or "true" or "false"
|
|
235
|
+
* * {@link String } value).
|
|
236
|
+
* * This can yield slightly smaller bar codes. This option and {@link #FORCE_CODE_SET} are mutually
|
|
237
|
+
* * exclusive.
|
|
238
|
+
*
|
|
239
|
+
*/
|
|
240
|
+
Code128Compact = 18,
|
|
241
|
+
TelepenAsNumeric = 19,
|
|
242
|
+
}
|
|
243
|
+
/**
|
|
244
|
+
*/
|
|
73
245
|
export enum DecodeHintTypes {
|
|
74
246
|
/**
|
|
75
247
|
*
|
|
@@ -243,178 +415,6 @@ export enum BarcodeFormat {
|
|
|
243
415
|
}
|
|
244
416
|
/**
|
|
245
417
|
*/
|
|
246
|
-
export enum EncodeHintTypes {
|
|
247
|
-
/**
|
|
248
|
-
*
|
|
249
|
-
* * Specifies what degree of error correction to use, for example in QR Codes.
|
|
250
|
-
* * Type depends on the encoder. For example for QR codes it's type
|
|
251
|
-
* * {@link com.google.zxing.qrcode.decoder.ErrorCorrectionLevel ErrorCorrectionLevel}.
|
|
252
|
-
* * For Aztec it is of type {@link Integer}, representing the minimal percentage of error correction words.
|
|
253
|
-
* * For PDF417 it is of type {@link Integer}, valid values being 0 to 8.
|
|
254
|
-
* * In all cases, it can also be a {@link String} representation of the desired value as well.
|
|
255
|
-
* * Note: an Aztec symbol should have a minimum of 25% EC words.
|
|
256
|
-
*
|
|
257
|
-
*/
|
|
258
|
-
ErrorCorrection = 0,
|
|
259
|
-
/**
|
|
260
|
-
*
|
|
261
|
-
* * Specifies what character encoding to use where applicable (type {@link String})
|
|
262
|
-
*
|
|
263
|
-
*/
|
|
264
|
-
CharacterSet = 1,
|
|
265
|
-
/**
|
|
266
|
-
*
|
|
267
|
-
* * Specifies the matrix shape for Data Matrix (type {@link com.google.zxing.datamatrix.encoder.SymbolShapeHint})
|
|
268
|
-
*
|
|
269
|
-
*/
|
|
270
|
-
DataMatrixShape = 2,
|
|
271
|
-
/**
|
|
272
|
-
*
|
|
273
|
-
* * Specifies whether to use compact mode for Data Matrix (type {@link Boolean}, or "true" or "false"
|
|
274
|
-
* * {@link String } value).
|
|
275
|
-
* * The compact encoding mode also supports the encoding of characters that are not in the ISO-8859-1
|
|
276
|
-
* * character set via ECIs.
|
|
277
|
-
* * Please note that in that case, the most compact character encoding is chosen for characters in
|
|
278
|
-
* * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
|
|
279
|
-
* * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
|
|
280
|
-
* * means of the {@link #CHARACTER_SET} encoding hint.
|
|
281
|
-
* * Compact encoding also provides GS1-FNC1 support when {@link #GS1_FORMAT} is selected. In this case
|
|
282
|
-
* * group-separator character (ASCII 29 decimal) can be used to encode the positions of FNC1 codewords
|
|
283
|
-
* * for the purpose of delimiting AIs.
|
|
284
|
-
* * This option and {@link #FORCE_C40} are mutually exclusive.
|
|
285
|
-
*
|
|
286
|
-
*/
|
|
287
|
-
DataMatrixCompact = 3,
|
|
288
|
-
/**
|
|
289
|
-
*
|
|
290
|
-
* * Specifies a minimum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
291
|
-
* *
|
|
292
|
-
* * @deprecated use width/height params in
|
|
293
|
-
* * {@link com.google.zxing.datamatrix.DataMatrixWriter#encode(String, BarcodeFormat, int, int)}
|
|
294
|
-
*
|
|
295
|
-
*/
|
|
296
|
-
MinSize = 4,
|
|
297
|
-
/**
|
|
298
|
-
*
|
|
299
|
-
* * Specifies a maximum barcode size (type {@link Dimension}). Only applicable to Data Matrix now.
|
|
300
|
-
* *
|
|
301
|
-
* * @deprecated without replacement
|
|
302
|
-
*
|
|
303
|
-
*/
|
|
304
|
-
MaxSize = 5,
|
|
305
|
-
/**
|
|
306
|
-
*
|
|
307
|
-
* * Specifies margin, in pixels, to use when generating the barcode. The meaning can vary
|
|
308
|
-
* * by format; for example it controls margin before and after the barcode horizontally for
|
|
309
|
-
* * most 1D formats. (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
310
|
-
*
|
|
311
|
-
*/
|
|
312
|
-
MARGIN = 6,
|
|
313
|
-
/**
|
|
314
|
-
*
|
|
315
|
-
* * Specifies whether to use compact mode for PDF417 (type {@link Boolean}, or "true" or "false"
|
|
316
|
-
* * {@link String} value).
|
|
317
|
-
*
|
|
318
|
-
*/
|
|
319
|
-
Pdf417Compact = 7,
|
|
320
|
-
/**
|
|
321
|
-
*
|
|
322
|
-
* * Specifies what compaction mode to use for PDF417 (type
|
|
323
|
-
* * {@link com.google.zxing.pdf417.encoder.Compaction Compaction} or {@link String} value of one of its
|
|
324
|
-
* * enum values).
|
|
325
|
-
*
|
|
326
|
-
*/
|
|
327
|
-
Pdf417Compaction = 8,
|
|
328
|
-
/**
|
|
329
|
-
*
|
|
330
|
-
* * Specifies the minimum and maximum number of rows and columns for PDF417 (type
|
|
331
|
-
* * {@link com.google.zxing.pdf417.encoder.Dimensions Dimensions}).
|
|
332
|
-
*
|
|
333
|
-
*/
|
|
334
|
-
Pdf417Dimensions = 9,
|
|
335
|
-
/**
|
|
336
|
-
*
|
|
337
|
-
* * Specifies whether to automatically insert ECIs when encoding PDF417 (type {@link Boolean}, or "true" or "false"
|
|
338
|
-
* * {@link String} value).
|
|
339
|
-
* * Please note that in that case, the most compact character encoding is chosen for characters in
|
|
340
|
-
* * the input that are not in the ISO-8859-1 character set. Based on experience, some scanners do not
|
|
341
|
-
* * support encodings like cp-1256 (Arabic). In such cases the encoding can be forced to UTF-8 by
|
|
342
|
-
* * means of the {@link #CHARACTER_SET} encoding hint.
|
|
343
|
-
*
|
|
344
|
-
*/
|
|
345
|
-
Pdf417AutoEci = 10,
|
|
346
|
-
/**
|
|
347
|
-
*
|
|
348
|
-
* * Specifies the required number of layers for an Aztec code.
|
|
349
|
-
* * A negative number (-1, -2, -3, -4) specifies a compact Aztec code.
|
|
350
|
-
* * 0 indicates to use the minimum number of layers (the default).
|
|
351
|
-
* * A positive number (1, 2, .. 32) specifies a normal (non-compact) Aztec code.
|
|
352
|
-
* * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
353
|
-
*
|
|
354
|
-
*/
|
|
355
|
-
AztecLayers = 11,
|
|
356
|
-
/**
|
|
357
|
-
*
|
|
358
|
-
* * Specifies the exact version of QR code to be encoded.
|
|
359
|
-
* * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
360
|
-
*
|
|
361
|
-
*/
|
|
362
|
-
QrVersion = 12,
|
|
363
|
-
/**
|
|
364
|
-
*
|
|
365
|
-
* * Specifies the QR code mask pattern to be used. Allowed values are
|
|
366
|
-
* * 0..QRCode.NUM_MASK_PATTERNS-1. By default the code will automatically select
|
|
367
|
-
* * the optimal mask pattern.
|
|
368
|
-
* * * (Type {@link Integer}, or {@link String} representation of the integer value).
|
|
369
|
-
*
|
|
370
|
-
*/
|
|
371
|
-
QrMaskPattern = 13,
|
|
372
|
-
/**
|
|
373
|
-
*
|
|
374
|
-
* * Specifies whether to use compact mode for QR code (type {@link Boolean}, or "true" or "false"
|
|
375
|
-
* * {@link String } value).
|
|
376
|
-
* * Please note that when compaction is performed, the most compact character encoding is chosen
|
|
377
|
-
* * for characters in the input that are not in the ISO-8859-1 character set. Based on experience,
|
|
378
|
-
* * some scanners do not support encodings like cp-1256 (Arabic). In such cases the encoding can
|
|
379
|
-
* * be forced to UTF-8 by means of the {@link #CHARACTER_SET} encoding hint.
|
|
380
|
-
*
|
|
381
|
-
*/
|
|
382
|
-
QrCompact = 14,
|
|
383
|
-
/**
|
|
384
|
-
*
|
|
385
|
-
* * Specifies whether the data should be encoded to the GS1 standard (type {@link Boolean}, or "true" or "false"
|
|
386
|
-
* * {@link String } value).
|
|
387
|
-
*
|
|
388
|
-
*/
|
|
389
|
-
Gs1Format = 15,
|
|
390
|
-
/**
|
|
391
|
-
*
|
|
392
|
-
* * Forces which encoding will be used. Currently only used for Code-128 code sets (Type {@link String}).
|
|
393
|
-
* * Valid values are "A", "B", "C".
|
|
394
|
-
* * This option and {@link #CODE128_COMPACT} are mutually exclusive.
|
|
395
|
-
*
|
|
396
|
-
*/
|
|
397
|
-
ForceCodeSet = 16,
|
|
398
|
-
/**
|
|
399
|
-
*
|
|
400
|
-
* * Forces C40 encoding for data-matrix (type {@link Boolean}, or "true" or "false") {@link String } value). This
|
|
401
|
-
* * option and {@link #DATA_MATRIX_COMPACT} are mutually exclusive.
|
|
402
|
-
*
|
|
403
|
-
*/
|
|
404
|
-
ForceC40 = 17,
|
|
405
|
-
/**
|
|
406
|
-
*
|
|
407
|
-
* * Specifies whether to use compact mode for Code-128 code (type {@link Boolean}, or "true" or "false"
|
|
408
|
-
* * {@link String } value).
|
|
409
|
-
* * This can yield slightly smaller bar codes. This option and {@link #FORCE_CODE_SET} are mutually
|
|
410
|
-
* * exclusive.
|
|
411
|
-
*
|
|
412
|
-
*/
|
|
413
|
-
Code128Compact = 18,
|
|
414
|
-
TelepenAsNumeric = 19,
|
|
415
|
-
}
|
|
416
|
-
/**
|
|
417
|
-
*/
|
|
418
418
|
export class BarcodeResult {
|
|
419
419
|
free(): void;
|
|
420
420
|
/**
|
package/rxing_wasm_bg.js
CHANGED
|
@@ -375,173 +375,6 @@ 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", });
|
|
473
|
-
/**
|
|
474
|
-
* Available barcode types
|
|
475
|
-
*/
|
|
476
|
-
export const BarcodeFormat = Object.freeze({
|
|
477
|
-
/**
|
|
478
|
-
* Aztec 2D barcode format.
|
|
479
|
-
*/
|
|
480
|
-
AZTEC:0,"0":"AZTEC",
|
|
481
|
-
/**
|
|
482
|
-
* CODABAR 1D format.
|
|
483
|
-
*/
|
|
484
|
-
CODABAR:1,"1":"CODABAR",
|
|
485
|
-
/**
|
|
486
|
-
* Code 39 1D format.
|
|
487
|
-
*/
|
|
488
|
-
Code39:2,"2":"Code39",
|
|
489
|
-
/**
|
|
490
|
-
* Code 93 1D format.
|
|
491
|
-
*/
|
|
492
|
-
Code93:3,"3":"Code93",
|
|
493
|
-
/**
|
|
494
|
-
* Code 128 1D format.
|
|
495
|
-
*/
|
|
496
|
-
Code128:4,"4":"Code128",
|
|
497
|
-
/**
|
|
498
|
-
* Data Matrix 2D barcode format.
|
|
499
|
-
*/
|
|
500
|
-
DataMatrix:5,"5":"DataMatrix",
|
|
501
|
-
/**
|
|
502
|
-
* EAN-8 1D format.
|
|
503
|
-
*/
|
|
504
|
-
Ean8:6,"6":"Ean8",
|
|
505
|
-
/**
|
|
506
|
-
* EAN-13 1D format.
|
|
507
|
-
*/
|
|
508
|
-
Ean13:7,"7":"Ean13",
|
|
509
|
-
/**
|
|
510
|
-
* ITF (Interleaved Two of Five) 1D format.
|
|
511
|
-
*/
|
|
512
|
-
ITF:8,"8":"ITF",
|
|
513
|
-
/**
|
|
514
|
-
* MaxiCode 2D barcode format.
|
|
515
|
-
*/
|
|
516
|
-
MAXICODE:9,"9":"MAXICODE",
|
|
517
|
-
/**
|
|
518
|
-
* PDF417 format.
|
|
519
|
-
*/
|
|
520
|
-
Pdf417:10,"10":"Pdf417",
|
|
521
|
-
/**
|
|
522
|
-
* QR Code 2D barcode format.
|
|
523
|
-
*/
|
|
524
|
-
QrCode:11,"11":"QrCode",
|
|
525
|
-
/**
|
|
526
|
-
* RSS 14
|
|
527
|
-
*/
|
|
528
|
-
Rss14:12,"12":"Rss14",
|
|
529
|
-
/**
|
|
530
|
-
* RSS EXPANDED
|
|
531
|
-
*/
|
|
532
|
-
RssExpanded:13,"13":"RssExpanded",
|
|
533
|
-
/**
|
|
534
|
-
* UPC-A 1D format.
|
|
535
|
-
*/
|
|
536
|
-
UpcA:14,"14":"UpcA",
|
|
537
|
-
/**
|
|
538
|
-
* UPC-E 1D format.
|
|
539
|
-
*/
|
|
540
|
-
UpcE:15,"15":"UpcE",
|
|
541
|
-
/**
|
|
542
|
-
* UPC/EAN extension format. Not a stand-alone format.
|
|
543
|
-
*/
|
|
544
|
-
UpcEanExtension:16,"16":"UpcEanExtension",MicroQR:17,"17":"MicroQR",Telepen:18,"18":"Telepen",RectangularMicroQR:19,"19":"RectangularMicroQR",UnsuportedFormat:20,"20":"UnsuportedFormat", });
|
|
545
378
|
/**
|
|
546
379
|
*/
|
|
547
380
|
export const EncodeHintTypes = Object.freeze({
|
|
@@ -712,6 +545,173 @@ ForceC40:17,"17":"ForceC40",
|
|
|
712
545
|
*
|
|
713
546
|
*/
|
|
714
547
|
Code128Compact:18,"18":"Code128Compact",TelepenAsNumeric:19,"19":"TelepenAsNumeric", });
|
|
548
|
+
/**
|
|
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
|
+
* Available barcode types
|
|
645
|
+
*/
|
|
646
|
+
export const BarcodeFormat = Object.freeze({
|
|
647
|
+
/**
|
|
648
|
+
* Aztec 2D barcode format.
|
|
649
|
+
*/
|
|
650
|
+
AZTEC:0,"0":"AZTEC",
|
|
651
|
+
/**
|
|
652
|
+
* CODABAR 1D format.
|
|
653
|
+
*/
|
|
654
|
+
CODABAR:1,"1":"CODABAR",
|
|
655
|
+
/**
|
|
656
|
+
* Code 39 1D format.
|
|
657
|
+
*/
|
|
658
|
+
Code39:2,"2":"Code39",
|
|
659
|
+
/**
|
|
660
|
+
* Code 93 1D format.
|
|
661
|
+
*/
|
|
662
|
+
Code93:3,"3":"Code93",
|
|
663
|
+
/**
|
|
664
|
+
* Code 128 1D format.
|
|
665
|
+
*/
|
|
666
|
+
Code128:4,"4":"Code128",
|
|
667
|
+
/**
|
|
668
|
+
* Data Matrix 2D barcode format.
|
|
669
|
+
*/
|
|
670
|
+
DataMatrix:5,"5":"DataMatrix",
|
|
671
|
+
/**
|
|
672
|
+
* EAN-8 1D format.
|
|
673
|
+
*/
|
|
674
|
+
Ean8:6,"6":"Ean8",
|
|
675
|
+
/**
|
|
676
|
+
* EAN-13 1D format.
|
|
677
|
+
*/
|
|
678
|
+
Ean13:7,"7":"Ean13",
|
|
679
|
+
/**
|
|
680
|
+
* ITF (Interleaved Two of Five) 1D format.
|
|
681
|
+
*/
|
|
682
|
+
ITF:8,"8":"ITF",
|
|
683
|
+
/**
|
|
684
|
+
* MaxiCode 2D barcode format.
|
|
685
|
+
*/
|
|
686
|
+
MAXICODE:9,"9":"MAXICODE",
|
|
687
|
+
/**
|
|
688
|
+
* PDF417 format.
|
|
689
|
+
*/
|
|
690
|
+
Pdf417:10,"10":"Pdf417",
|
|
691
|
+
/**
|
|
692
|
+
* QR Code 2D barcode format.
|
|
693
|
+
*/
|
|
694
|
+
QrCode:11,"11":"QrCode",
|
|
695
|
+
/**
|
|
696
|
+
* RSS 14
|
|
697
|
+
*/
|
|
698
|
+
Rss14:12,"12":"Rss14",
|
|
699
|
+
/**
|
|
700
|
+
* RSS EXPANDED
|
|
701
|
+
*/
|
|
702
|
+
RssExpanded:13,"13":"RssExpanded",
|
|
703
|
+
/**
|
|
704
|
+
* UPC-A 1D format.
|
|
705
|
+
*/
|
|
706
|
+
UpcA:14,"14":"UpcA",
|
|
707
|
+
/**
|
|
708
|
+
* UPC-E 1D format.
|
|
709
|
+
*/
|
|
710
|
+
UpcE:15,"15":"UpcE",
|
|
711
|
+
/**
|
|
712
|
+
* UPC/EAN extension format. Not a stand-alone format.
|
|
713
|
+
*/
|
|
714
|
+
UpcEanExtension:16,"16":"UpcEanExtension",MicroQR:17,"17":"MicroQR",Telepen:18,"18":"Telepen",RectangularMicroQR:19,"19":"RectangularMicroQR",UnsuportedFormat:20,"20":"UnsuportedFormat", });
|
|
715
715
|
|
|
716
716
|
const BarcodeResultFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
717
717
|
? { register: () => {}, unregister: () => {} }
|
package/rxing_wasm_bg.wasm
CHANGED
|
Binary file
|