@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,89 @@
|
|
|
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
|
+
/** The 32 rMQR dimensions in ISO/IEC 23941 order (width, height). */
|
|
33
|
+
export declare const RMQR_SIZES: readonly number[][];
|
|
34
|
+
/** @param {number} version */
|
|
35
|
+
export declare function versionInfo(version: number): Readonly<{
|
|
36
|
+
version: number;
|
|
37
|
+
width: number;
|
|
38
|
+
height: number;
|
|
39
|
+
name: `R${number}x${number}`;
|
|
40
|
+
indicator: number;
|
|
41
|
+
remainderBits: number;
|
|
42
|
+
totalCodewords: number;
|
|
43
|
+
countBits(mode: any): any;
|
|
44
|
+
blockLayout: (ecc: any) => {
|
|
45
|
+
blocks: {
|
|
46
|
+
total: number;
|
|
47
|
+
data: number;
|
|
48
|
+
ecc: number;
|
|
49
|
+
}[];
|
|
50
|
+
totalCodewords: number;
|
|
51
|
+
totalDataCodewords: number;
|
|
52
|
+
eccCodewords: number;
|
|
53
|
+
};
|
|
54
|
+
}>;
|
|
55
|
+
/** @param {number} width @param {number} height */
|
|
56
|
+
export declare function versionForSize(width: number, height: number): Readonly<{
|
|
57
|
+
version: number;
|
|
58
|
+
width: number;
|
|
59
|
+
height: number;
|
|
60
|
+
name: `R${number}x${number}`;
|
|
61
|
+
indicator: number;
|
|
62
|
+
remainderBits: number;
|
|
63
|
+
totalCodewords: number;
|
|
64
|
+
countBits(mode: any): any;
|
|
65
|
+
blockLayout: (ecc: any) => {
|
|
66
|
+
blocks: {
|
|
67
|
+
total: number;
|
|
68
|
+
data: number;
|
|
69
|
+
ecc: number;
|
|
70
|
+
}[];
|
|
71
|
+
totalCodewords: number;
|
|
72
|
+
totalDataCodewords: number;
|
|
73
|
+
eccCodewords: number;
|
|
74
|
+
};
|
|
75
|
+
}> | null;
|
|
76
|
+
/** @param {number} version */
|
|
77
|
+
export declare function alignmentCoordinates(version: number): any;
|
|
78
|
+
/** Unmasked 18-bit format sequence: 5-bit version indicator plus ECC bit. */
|
|
79
|
+
export declare function formatBits(version: any, ecc: any): number;
|
|
80
|
+
export declare const FORMAT_MASK_FINDER = 129714;
|
|
81
|
+
export declare const FORMAT_MASK_SUB = 133755;
|
|
82
|
+
/** rMQR has one fixed mask: floor(y/2)+floor(x/3) even. */
|
|
83
|
+
export declare function maskBit(x: any, y: any): boolean;
|
|
84
|
+
/** Function modules; set bits are non-data cells. */
|
|
85
|
+
export declare function functionModules(version: any): BitMatrix;
|
|
86
|
+
/** Data coordinates in the standard right-to-left two-column traversal. */
|
|
87
|
+
export declare function dataModuleOrder(version: any): number[][];
|
|
88
|
+
export declare function dataBitCapacity(version: any, ecc: any): number;
|
|
89
|
+
export declare function validateTables(): string[];
|