@sythos/js_barcode_universal 1.5.6 → 1.5.7
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 +13 -2
- package/bundle/sythos-barcode.esm.js +2 -2
- package/bundle/sythos-barcode.js +2 -2
- package/package.json +91 -25
- package/src/index.js +1 -1
- package/typings/aztec/decoder.d.ts +57 -0
- package/typings/aztec/detector.d.ts +62 -0
- package/typings/aztec/encoder.d.ts +94 -0
- package/typings/aztec/high-level.d.ts +89 -0
- package/typings/aztec/index.d.ts +35 -0
- package/typings/aztec/tables.d.ts +144 -0
- package/typings/aztecrune/decoder.d.ts +56 -0
- package/typings/aztecrune/detector.d.ts +53 -0
- package/typings/aztecrune/encoder.d.ts +51 -0
- package/typings/aztecrune/index.d.ts +35 -0
- package/typings/aztecrune/tables.d.ts +75 -0
- package/typings/bundle/sythos-barcode.d.ts +31 -0
- package/typings/bundle/sythos-barcode.esm.d.ts +31 -0
- package/typings/compactpdf417/decoder.d.ts +64 -0
- package/typings/compactpdf417/detector.d.ts +48 -0
- package/typings/compactpdf417/encoder.d.ts +49 -0
- package/typings/compactpdf417/index.d.ts +8 -0
- package/typings/compactpdf417/tables.d.ts +84 -0
- package/typings/core/bit-buffer.d.ts +78 -0
- package/typings/core/bit-matrix.d.ts +129 -0
- package/typings/core/errors.d.ts +57 -0
- package/typings/core/galois-field.d.ts +141 -0
- package/typings/core/index.d.ts +40 -0
- package/typings/core/reed-solomon.d.ts +65 -0
- package/typings/databar/codec.d.ts +78 -0
- package/typings/databar/decoder.d.ts +55 -0
- package/typings/databar/encoder.d.ts +34 -0
- package/typings/databar/gs1.d.ts +48 -0
- package/typings/databar/index.d.ts +37 -0
- package/typings/databar/patterns.d.ts +46 -0
- package/typings/databar/tables.d.ts +119 -0
- package/typings/datamatrix/decoder.d.ts +57 -0
- package/typings/datamatrix/detector.d.ts +59 -0
- package/typings/datamatrix/encoder.d.ts +36 -0
- package/typings/datamatrix/index.d.ts +35 -0
- package/typings/datamatrix/tables.d.ts +88 -0
- package/typings/frameqr/decoder.d.ts +64 -0
- package/typings/frameqr/detector.d.ts +96 -0
- package/typings/frameqr/encoder.d.ts +73 -0
- package/typings/frameqr/index.d.ts +34 -0
- package/typings/frameqr/tables.d.ts +123 -0
- package/typings/image/binarizer.d.ts +85 -0
- package/typings/image/grid-sampler.d.ts +82 -0
- package/typings/image/index.d.ts +39 -0
- package/typings/image/luminance.d.ts +112 -0
- package/typings/image/perspective.d.ts +111 -0
- package/typings/index.d.ts +363 -0
- package/typings/micropdf417/compaction.d.ts +38 -0
- package/typings/micropdf417/decoder.d.ts +57 -0
- package/typings/micropdf417/detector.d.ts +95 -0
- package/typings/micropdf417/encoder.d.ts +34 -0
- package/typings/micropdf417/error-correction.d.ts +38 -0
- package/typings/micropdf417/index.d.ts +36 -0
- package/typings/micropdf417/tables.d.ts +73 -0
- package/typings/microqr/decoder.d.ts +49 -0
- package/typings/microqr/detector.d.ts +96 -0
- package/typings/microqr/encoder.d.ts +33 -0
- package/typings/microqr/index.d.ts +35 -0
- package/typings/microqr/tables.d.ts +107 -0
- package/typings/oned/addons.d.ts +181 -0
- package/typings/oned/index.d.ts +55 -0
- package/typings/oned/patterns.d.ts +259 -0
- package/typings/oned/reader.d.ts +129 -0
- package/typings/oned/writers.d.ts +218 -0
- package/typings/pdf417/compaction.d.ts +59 -0
- package/typings/pdf417/decoder.d.ts +48 -0
- package/typings/pdf417/detector.d.ts +73 -0
- package/typings/pdf417/encoder.d.ts +32 -0
- package/typings/pdf417/error-correction.d.ts +34 -0
- package/typings/pdf417/index.d.ts +10 -0
- package/typings/pdf417/tables.d.ts +53 -0
- package/typings/qr/decoder.d.ts +79 -0
- package/typings/qr/detector.d.ts +93 -0
- package/typings/qr/encoder.d.ts +166 -0
- package/typings/qr/index.d.ts +43 -0
- package/typings/qr/tables.d.ts +291 -0
- package/typings/render/image-data.d.ts +58 -0
- package/typings/render/index.d.ts +110 -0
- package/typings/render/options.d.ts +98 -0
- package/typings/render/png.d.ts +58 -0
- package/typings/render/svg.d.ts +46 -0
- package/typings/render/webgl.d.ts +45 -0
- package/typings/render/webgpu.d.ts +51 -0
- package/typings/rmqr/decoder.d.ts +42 -0
- package/typings/rmqr/detector.d.ts +81 -0
- package/typings/rmqr/encoder.d.ts +45 -0
- package/typings/rmqr/index.d.ts +34 -0
- package/typings/rmqr/tables.d.ts +89 -0
|
@@ -0,0 +1,144 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
/** Reed-Solomon generator base defined for Aztec parameter and data fields. */
|
|
32
|
+
export declare const AZTEC_RS_GENERATOR_BASE = 1;
|
|
33
|
+
/** Minimum recommended error correction: 23 percent plus three codewords. */
|
|
34
|
+
export declare const AZTEC_DEFAULT_ECC_PERCENT = 23;
|
|
35
|
+
export declare const AZTEC_MIN_ECC_WORDS = 3;
|
|
36
|
+
/** Word size selected solely by the number of layers. */
|
|
37
|
+
export declare function wordSizeForLayers(layers: any): 6 | 8 | 10 | 12;
|
|
38
|
+
/** Return the field used by Aztec codewords of `wordSize` bits. */
|
|
39
|
+
export declare function fieldForWordSize(wordSize: any): import("../core/galois-field.js").GaloisField;
|
|
40
|
+
/** Return the data field selected for a symbol with `layers` layers. */
|
|
41
|
+
export declare function fieldForLayers(layers: any): import("../core/galois-field.js").GaloisField;
|
|
42
|
+
/** Matrix side length, including Full-mode reference grid lines. */
|
|
43
|
+
export declare function aztecSymbolSize(layers: any, compact?: boolean): number;
|
|
44
|
+
/** Compact Aztec layers 1 through 4, in encoding preference order. */
|
|
45
|
+
export declare const AZTEC_COMPACT_LAYERS: readonly Readonly<{
|
|
46
|
+
compact: any;
|
|
47
|
+
layers: any;
|
|
48
|
+
wordSize: 6 | 8 | 10 | 12;
|
|
49
|
+
totalBits: number;
|
|
50
|
+
usableBits: number;
|
|
51
|
+
totalCodewords: number;
|
|
52
|
+
maxDataCodewords: number;
|
|
53
|
+
baseMatrixSize: number;
|
|
54
|
+
symbolSize: number;
|
|
55
|
+
modeMessageDataWords: 2 | 4;
|
|
56
|
+
modeMessageWords: 7 | 10;
|
|
57
|
+
modeMessageBits: 28 | 40;
|
|
58
|
+
rsGeneratorBase: 1;
|
|
59
|
+
}>[];
|
|
60
|
+
/** Full Aztec layers 1 through 32, in ascending layer order. */
|
|
61
|
+
export declare const AZTEC_FULL_LAYERS: readonly Readonly<{
|
|
62
|
+
compact: any;
|
|
63
|
+
layers: any;
|
|
64
|
+
wordSize: 6 | 8 | 10 | 12;
|
|
65
|
+
totalBits: number;
|
|
66
|
+
usableBits: number;
|
|
67
|
+
totalCodewords: number;
|
|
68
|
+
maxDataCodewords: number;
|
|
69
|
+
baseMatrixSize: number;
|
|
70
|
+
symbolSize: number;
|
|
71
|
+
modeMessageDataWords: 2 | 4;
|
|
72
|
+
modeMessageWords: 7 | 10;
|
|
73
|
+
modeMessageBits: 28 | 40;
|
|
74
|
+
rsGeneratorBase: 1;
|
|
75
|
+
}>[];
|
|
76
|
+
/** All allowed symbols. Compact entries precede Full entries for automatic selection. */
|
|
77
|
+
export declare const AZTEC_LAYERS: readonly Readonly<{
|
|
78
|
+
compact: any;
|
|
79
|
+
layers: any;
|
|
80
|
+
wordSize: 6 | 8 | 10 | 12;
|
|
81
|
+
totalBits: number;
|
|
82
|
+
usableBits: number;
|
|
83
|
+
totalCodewords: number;
|
|
84
|
+
maxDataCodewords: number;
|
|
85
|
+
baseMatrixSize: number;
|
|
86
|
+
symbolSize: number;
|
|
87
|
+
modeMessageDataWords: 2 | 4;
|
|
88
|
+
modeMessageWords: 7 | 10;
|
|
89
|
+
modeMessageBits: 28 | 40;
|
|
90
|
+
rsGeneratorBase: 1;
|
|
91
|
+
}>[];
|
|
92
|
+
/** Return one immutable layer record. */
|
|
93
|
+
export declare function aztecLayer(layers: any, compact?: boolean): Readonly<{
|
|
94
|
+
compact: any;
|
|
95
|
+
layers: any;
|
|
96
|
+
wordSize: 6 | 8 | 10 | 12;
|
|
97
|
+
totalBits: number;
|
|
98
|
+
usableBits: number;
|
|
99
|
+
totalCodewords: number;
|
|
100
|
+
maxDataCodewords: number;
|
|
101
|
+
baseMatrixSize: number;
|
|
102
|
+
symbolSize: number;
|
|
103
|
+
modeMessageDataWords: 2 | 4;
|
|
104
|
+
modeMessageWords: 7 | 10;
|
|
105
|
+
modeMessageBits: 28 | 40;
|
|
106
|
+
rsGeneratorBase: 1;
|
|
107
|
+
}>;
|
|
108
|
+
/**
|
|
109
|
+
* Calculate the minimum parity count for a data word count.
|
|
110
|
+
*
|
|
111
|
+
* The percentage is rounded up because a fractional codeword cannot be
|
|
112
|
+
* emitted. The mandatory three words protect short payloads, where a bare
|
|
113
|
+
* percentage would otherwise round to zero.
|
|
114
|
+
*/
|
|
115
|
+
export declare function eccCodewordsFor(dataCodewords: any, eccPercent?: number): number;
|
|
116
|
+
/**
|
|
117
|
+
* Choose the first symbol which holds an already stuffed payload.
|
|
118
|
+
*
|
|
119
|
+
* `dataBits` must be a multiple of the candidate word size; callers which
|
|
120
|
+
* start from high-level bits must stuff separately per candidate word size.
|
|
121
|
+
*/
|
|
122
|
+
export declare function selectAztecLayer(dataBits: any, { eccPercent, layers, compact, }?: {
|
|
123
|
+
compact?: null | undefined;
|
|
124
|
+
eccPercent?: number | undefined;
|
|
125
|
+
layers?: null | undefined;
|
|
126
|
+
}): Readonly<{
|
|
127
|
+
compact: any;
|
|
128
|
+
layers: any;
|
|
129
|
+
wordSize: 6 | 8 | 10 | 12;
|
|
130
|
+
totalBits: number;
|
|
131
|
+
usableBits: number;
|
|
132
|
+
totalCodewords: number;
|
|
133
|
+
maxDataCodewords: number;
|
|
134
|
+
baseMatrixSize: number;
|
|
135
|
+
symbolSize: number;
|
|
136
|
+
modeMessageDataWords: 2 | 4;
|
|
137
|
+
modeMessageWords: 7 | 10;
|
|
138
|
+
modeMessageBits: 28 | 40;
|
|
139
|
+
rsGeneratorBase: 1;
|
|
140
|
+
dataCodewords: number;
|
|
141
|
+
eccCodewords: number;
|
|
142
|
+
}>;
|
|
143
|
+
/** Check static identities so table corruption fails explicitly in tests. */
|
|
144
|
+
export declare function validateAztecTables(): string[];
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
/** @param {import('../core/bit-matrix.js').BitMatrix} matrix @param {boolean} inverted */
|
|
32
|
+
declare function structureMatches(matrix: import('../core/bit-matrix.js').BitMatrix, inverted: boolean): boolean;
|
|
33
|
+
/** @param {import('../core/bit-matrix.js').BitMatrix} matrix @param {boolean} inverted */
|
|
34
|
+
declare function readCodewords(matrix: import('../core/bit-matrix.js').BitMatrix, inverted: boolean): number[];
|
|
35
|
+
/**
|
|
36
|
+
* Decode a square Aztec Rune matrix.
|
|
37
|
+
*
|
|
38
|
+
* @param {import('../core/bit-matrix.js').BitMatrix} matrix
|
|
39
|
+
* @param {{inverted?: boolean|'auto', rotation?: number|'auto'}} [options]
|
|
40
|
+
* @returns {{format:'aztecrune',value:number,text:string,bytes:Uint8Array,dimension:number,inverted:boolean,rotation:number,corrections:number}}
|
|
41
|
+
* @throws {FormatError} For non-Rune geometry, structure or uncorrectable data.
|
|
42
|
+
*/
|
|
43
|
+
export declare function decodeAztecRune(matrix: import('../core/bit-matrix.js').BitMatrix, options?: {
|
|
44
|
+
inverted?: boolean | 'auto';
|
|
45
|
+
rotation?: number | 'auto';
|
|
46
|
+
}): {
|
|
47
|
+
format: 'aztecrune';
|
|
48
|
+
value: number;
|
|
49
|
+
text: string;
|
|
50
|
+
bytes: Uint8Array;
|
|
51
|
+
dimension: number;
|
|
52
|
+
inverted: boolean;
|
|
53
|
+
rotation: number;
|
|
54
|
+
corrections: number;
|
|
55
|
+
};
|
|
56
|
+
export { readCodewords, structureMatches };
|
|
@@ -0,0 +1,53 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
import { BitMatrix } from '../core/bit-matrix.js';
|
|
32
|
+
export type Point = {
|
|
33
|
+
x: number;
|
|
34
|
+
y: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Detect the most prominent Aztec Rune in a binarized image.
|
|
38
|
+
*
|
|
39
|
+
* @param {import('../core/bit-matrix.js').BitMatrix} binaryImage
|
|
40
|
+
* @returns {{corners:Point[],dimension:11,moduleSize:number,matrix:BitMatrix,result:object}|null}
|
|
41
|
+
*/
|
|
42
|
+
export declare function detectAztecRune(binaryImage: import('../core/bit-matrix.js').BitMatrix): {
|
|
43
|
+
corners: Point[];
|
|
44
|
+
dimension: 11;
|
|
45
|
+
moduleSize: number;
|
|
46
|
+
matrix: BitMatrix;
|
|
47
|
+
result: object;
|
|
48
|
+
} | null;
|
|
49
|
+
/** Detect and decode one Aztec Rune, or return `null` when none is verified. */
|
|
50
|
+
export declare function detectAndDecodeAztecRune(binaryImage: any): {
|
|
51
|
+
corners: Point[];
|
|
52
|
+
moduleSize: number;
|
|
53
|
+
} | null;
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
/** @param {unknown} value @returns {number} */
|
|
32
|
+
export declare function normalizeAztecRuneValue(value: unknown): number;
|
|
33
|
+
/** @param {number} value @returns {number[]} */
|
|
34
|
+
declare function codewordsForValue(value: number): number[];
|
|
35
|
+
/**
|
|
36
|
+
* Encode one byte as an Aztec Rune.
|
|
37
|
+
*
|
|
38
|
+
* @param {number|string|ArrayBuffer|ArrayBufferView} value
|
|
39
|
+
* @param {{inverted?: boolean}} [options]
|
|
40
|
+
* @returns {import('../core/bit-matrix.js').BitMatrix & {
|
|
41
|
+
* format: 'aztecrune', value: number, inverted: boolean
|
|
42
|
+
* }}
|
|
43
|
+
*/
|
|
44
|
+
export declare function encodeAztecRune(value: number | string | ArrayBuffer | ArrayBufferView, options?: {
|
|
45
|
+
inverted?: boolean;
|
|
46
|
+
}): import('../core/bit-matrix.js').BitMatrix & {
|
|
47
|
+
format: 'aztecrune';
|
|
48
|
+
value: number;
|
|
49
|
+
inverted: boolean;
|
|
50
|
+
};
|
|
51
|
+
export { codewordsForValue };
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
/** Aztec Rune entry points. @module aztecrune */
|
|
32
|
+
export { encodeAztecRune, normalizeAztecRuneValue } from './encoder.js';
|
|
33
|
+
export { decodeAztecRune } from './decoder.js';
|
|
34
|
+
export { detectAztecRune, detectAndDecodeAztecRune } from './detector.js';
|
|
35
|
+
export { AZTEC_RUNE_SIZE, AZTEC_RUNE_DATA_BITS, AZTEC_RUNE_WORD_SIZE, AZTEC_RUNE_DATA_CODEWORDS, AZTEC_RUNE_ECC_CODEWORDS, AZTEC_RUNE_TOTAL_CODEWORDS, AZTEC_RUNE_MASK, AZTEC_RUNE_DATA_POSITIONS, aztecRuneStructuralValue, buildAztecRuneStructure, aztecRuneField, validateAztecRuneTables, } from './tables.js';
|
|
@@ -0,0 +1,75 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Aztec Rune geometry.
|
|
33
|
+
*
|
|
34
|
+
* Aztec Rune is the 11x11, one-byte member of the Aztec family. Two 4-bit
|
|
35
|
+
* data words and five 4-bit Reed-Solomon check words are XORed with the fixed
|
|
36
|
+
* Aztec Rune mask and written clockwise on the outer data ring. The finder and
|
|
37
|
+
* corner orientation marks are independent of the value.
|
|
38
|
+
*
|
|
39
|
+
* The constants below are derived from the public Aztec Code specification and
|
|
40
|
+
* are kept separate from the general Aztec implementation so a normal Aztec
|
|
41
|
+
* decoder can never accidentally treat an 11x11 Rune as a regular symbol.
|
|
42
|
+
*
|
|
43
|
+
* @module aztecrune/tables
|
|
44
|
+
*/
|
|
45
|
+
import { BitMatrix } from '../core/bit-matrix.js';
|
|
46
|
+
export declare const AZTEC_RUNE_SIZE = 11;
|
|
47
|
+
export declare const AZTEC_RUNE_DATA_BITS = 8;
|
|
48
|
+
export declare const AZTEC_RUNE_WORD_SIZE = 4;
|
|
49
|
+
export declare const AZTEC_RUNE_DATA_CODEWORDS = 2;
|
|
50
|
+
export declare const AZTEC_RUNE_ECC_CODEWORDS = 5;
|
|
51
|
+
export declare const AZTEC_RUNE_TOTAL_CODEWORDS: number;
|
|
52
|
+
export declare const AZTEC_RUNE_MASK = 10;
|
|
53
|
+
/**
|
|
54
|
+
* Data-module coordinates in wire order: clockwise, starting at the top.
|
|
55
|
+
* Every side contributes seven modules, for 28 bits in total.
|
|
56
|
+
*/
|
|
57
|
+
export declare const AZTEC_RUNE_DATA_POSITIONS: readonly (readonly number[])[];
|
|
58
|
+
/** @param {number} x @param {number} y @returns {boolean} */
|
|
59
|
+
export declare function isAztecRuneDataPosition(x: number, y: number): boolean;
|
|
60
|
+
/**
|
|
61
|
+
* Return the value of a structural module. Data positions return `null`.
|
|
62
|
+
* The bull's-eye has five square rings including its one-module centre; its
|
|
63
|
+
* even-radius rings are dark. The four corner groups are the orientation marks
|
|
64
|
+
* described by the Aztec Rune specification.
|
|
65
|
+
*
|
|
66
|
+
* @param {number} x @param {number} y
|
|
67
|
+
* @returns {boolean|null}
|
|
68
|
+
*/
|
|
69
|
+
export declare function aztecRuneStructuralValue(x: number, y: number): boolean | null;
|
|
70
|
+
/** Build only the fixed finder/orientation structure. */
|
|
71
|
+
export declare function buildAztecRuneStructure(): BitMatrix;
|
|
72
|
+
/** Return the field used by Rune data/check words. */
|
|
73
|
+
export declare function aztecRuneField(): import("../core/galois-field.js").GaloisField;
|
|
74
|
+
/** Validate the fixed Rune contract and coordinate layout. */
|
|
75
|
+
export declare function validateAztecRuneTables(): string[];
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
export * from '../index.js';
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
export * from '../index.js';
|
|
@@ -0,0 +1,64 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Decode a compact/truncated PDF417 module matrix.
|
|
33
|
+
*
|
|
34
|
+
* The high-level payload uses the normal PDF417 Text/Byte/Numeric compaction
|
|
35
|
+
* rules. This function only changes the physical row parser: no right row
|
|
36
|
+
* indicator is expected and the final module of each row must be dark.
|
|
37
|
+
*
|
|
38
|
+
* @param {import('../core/bit-matrix.js').BitMatrix} matrix
|
|
39
|
+
* @param {object} [options]
|
|
40
|
+
* @param {number} [options.rowHeight]
|
|
41
|
+
*/
|
|
42
|
+
export declare function decodeCompactPDF417(matrix: import('../core/bit-matrix.js').BitMatrix, options?: {
|
|
43
|
+
rowHeight?: number;
|
|
44
|
+
}): {
|
|
45
|
+
text: string;
|
|
46
|
+
bytes: Uint8Array<ArrayBuffer>;
|
|
47
|
+
segments: {
|
|
48
|
+
mode: string;
|
|
49
|
+
text: string;
|
|
50
|
+
bytes: Uint8Array<ArrayBuffer>;
|
|
51
|
+
eci: number;
|
|
52
|
+
latch: any;
|
|
53
|
+
codewordStart: number;
|
|
54
|
+
codewordEnd: number;
|
|
55
|
+
}[];
|
|
56
|
+
format: string;
|
|
57
|
+
compact: boolean;
|
|
58
|
+
codewords: number[];
|
|
59
|
+
rows: number;
|
|
60
|
+
columns: number;
|
|
61
|
+
eccLevel: number;
|
|
62
|
+
rowHeight: any;
|
|
63
|
+
corrections: number;
|
|
64
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
/**
|
|
32
|
+
* Detect one Compact PDF417 symbol in a binarized raster.
|
|
33
|
+
*
|
|
34
|
+
* The clean-raster detector uses the dark bounding box and enumerates legal
|
|
35
|
+
* compact widths, integer module scales, row counts and row heights. It is
|
|
36
|
+
* deliberately conservative: arbitrary perspective, non-integer resampling,
|
|
37
|
+
* grayscale thresholding and damaged stop bars belong to a future photo
|
|
38
|
+
* detector and are not claimed here.
|
|
39
|
+
*
|
|
40
|
+
* @param {import('../core/bit-matrix.js').BitMatrix} binaryImage
|
|
41
|
+
* @param {object} [options]
|
|
42
|
+
* @param {number} [options.rowHeight] Restrict the row-height search.
|
|
43
|
+
* @returns {object|null}
|
|
44
|
+
*/
|
|
45
|
+
export declare function detectCompactPDF417(binaryImage: import('../core/bit-matrix.js').BitMatrix, options?: {
|
|
46
|
+
rowHeight?: number;
|
|
47
|
+
}): object | null;
|
|
48
|
+
export declare function detectAndDecodeCompactPDF417(binaryImage: any, options?: {}): object | null;
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* Sythos Barcode Suite
|
|
3
|
+
*
|
|
4
|
+
* MIT License
|
|
5
|
+
*
|
|
6
|
+
* Copyright (c) 2026 Sythos
|
|
7
|
+
*
|
|
8
|
+
* Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
9
|
+
* of this software and associated documentation files (the "Software"), to deal
|
|
10
|
+
* in the Software without restriction, including without limitation the rights
|
|
11
|
+
* to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
12
|
+
* copies of the Software, and to permit persons to whom the Software is
|
|
13
|
+
* furnished to do so, subject to the following conditions:
|
|
14
|
+
*
|
|
15
|
+
* The above copyright notice and this permission notice shall be included in all
|
|
16
|
+
* copies or substantial portions of the Software.
|
|
17
|
+
*
|
|
18
|
+
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
19
|
+
* IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
20
|
+
* FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
21
|
+
* AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
22
|
+
* LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
23
|
+
* OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
24
|
+
* SOFTWARE.
|
|
25
|
+
*
|
|
26
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
27
|
+
* SPDX-License-Identifier: MIT
|
|
28
|
+
*
|
|
29
|
+
* Original work. No code from any other barcode implementation.
|
|
30
|
+
*/
|
|
31
|
+
declare function dimensions(needed: any, level: any, options: any, rowHeight: any): {
|
|
32
|
+
rows: any;
|
|
33
|
+
columns: any;
|
|
34
|
+
score: number;
|
|
35
|
+
};
|
|
36
|
+
/**
|
|
37
|
+
* Encode Compact PDF417.
|
|
38
|
+
*
|
|
39
|
+
* High-level Text/Byte/Numeric compaction is intentionally delegated to the
|
|
40
|
+
* existing PDF417 compaction implementation. `compact` here describes only
|
|
41
|
+
* the physical truncated layout: right row indicators are omitted and the
|
|
42
|
+
* stop pattern is reduced to one dark module.
|
|
43
|
+
*
|
|
44
|
+
* @param {string|Uint8Array|number[]} value
|
|
45
|
+
* @param {object} [options]
|
|
46
|
+
* @returns {import('../core/bit-matrix.js').BitMatrix}
|
|
47
|
+
*/
|
|
48
|
+
export declare function encodeCompactPDF417(value: string | Uint8Array | number[], options?: object): import('../core/bit-matrix.js').BitMatrix;
|
|
49
|
+
export { dimensions as compactPdf417Dimensions };
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/*!
|
|
2
|
+
* SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
|
|
3
|
+
* SPDX-License-Identifier: MIT
|
|
4
|
+
*/
|
|
5
|
+
export { COMPACT_PDF417_START, COMPACT_PDF417_START_BITS, COMPACT_PDF417_STOP_MODULES, COMPACT_PDF417_LIMITS, compactPdf417Width, compactPdf417Geometry, compactPdf417Indicators, compactPdf417MatchingLevels, validateCompactPdf417Options, validateCompactPdf417Tables, } from './tables.js';
|
|
6
|
+
export { encodeCompactPDF417, compactPdf417Dimensions } from './encoder.js';
|
|
7
|
+
export { decodeCompactPDF417 } from './decoder.js';
|
|
8
|
+
export { detectCompactPDF417, detectAndDecodeCompactPDF417 } from './detector.js';
|