@sythos/js_barcode_universal 1.5.7 → 1.5.9
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/LICENSE +5 -4
- package/NOTICE.md +2 -2
- package/README.md +50 -37
- package/bundle/sythos-barcode.esm.js +12051 -11484
- package/bundle/sythos-barcode.js +12051 -11484
- package/package.json +52 -45
- package/src/index.d.ts +363 -0
- package/src/index.js +573 -428
- package/src/js/aztec/decoder.js +326 -0
- package/src/js/aztec/detector.js +251 -0
- package/src/js/aztec/encoder.js +276 -0
- package/src/js/aztec/high-level.js +216 -0
- package/src/js/aztec/index.js +34 -0
- package/src/js/aztec/tables.js +196 -0
- package/src/js/aztecrune/decoder.js +146 -0
- package/src/js/aztecrune/detector.js +180 -0
- package/src/js/aztecrune/encoder.js +103 -0
- package/src/js/aztecrune/index.js +34 -0
- package/src/js/aztecrune/tables.js +142 -0
- package/src/js/compactpdf417/decoder.js +123 -0
- package/src/js/compactpdf417/detector.js +138 -0
- package/src/js/compactpdf417/encoder.js +127 -0
- package/src/js/compactpdf417/index.js +5 -0
- package/src/js/compactpdf417/tables.js +164 -0
- package/src/js/core/bit-buffer.js +158 -0
- package/src/js/core/bit-matrix.js +243 -0
- package/src/js/core/errors.js +59 -0
- package/src/js/core/galois-field.js +193 -0
- package/src/js/core/index.js +39 -0
- package/src/js/core/reed-solomon.js +318 -0
- package/src/js/databar/codec.js +166 -0
- package/src/js/databar/decoder.js +224 -0
- package/src/js/databar/encoder.js +88 -0
- package/src/js/databar/gs1.js +176 -0
- package/src/js/databar/index.js +36 -0
- package/src/js/databar/patterns.js +139 -0
- package/src/js/databar/tables.js +123 -0
- package/src/js/datamatrix/decoder.js +296 -0
- package/src/js/datamatrix/detector.js +254 -0
- package/src/js/datamatrix/encoder.js +250 -0
- package/src/js/datamatrix/index.js +34 -0
- package/src/js/datamatrix/tables.js +122 -0
- package/src/js/frameqr/decoder.js +216 -0
- package/src/js/frameqr/detector.js +199 -0
- package/src/js/frameqr/encoder.js +143 -0
- package/src/js/frameqr/index.js +33 -0
- package/src/js/frameqr/tables.js +252 -0
- package/src/js/image/binarizer.js +254 -0
- package/src/js/image/grid-sampler.js +148 -0
- package/src/js/image/index.js +38 -0
- package/src/js/image/luminance.js +185 -0
- package/src/js/image/perspective.js +158 -0
- package/src/js/micropdf417/compaction.js +115 -0
- package/src/js/micropdf417/decoder.js +180 -0
- package/src/js/micropdf417/detector.js +152 -0
- package/src/js/micropdf417/encoder.js +184 -0
- package/src/js/micropdf417/error-correction.js +50 -0
- package/src/js/micropdf417/index.js +35 -0
- package/src/js/micropdf417/tables.js +197 -0
- package/src/js/microqr/decoder.js +240 -0
- package/src/js/microqr/detector.js +339 -0
- package/src/js/microqr/encoder.js +314 -0
- package/src/js/microqr/index.js +34 -0
- package/src/js/microqr/tables.js +324 -0
- package/src/js/oned/addons.js +396 -0
- package/src/js/oned/index.js +75 -0
- package/src/js/oned/patterns.js +365 -0
- package/src/js/oned/reader.js +1383 -0
- package/src/js/oned/writers.js +691 -0
- package/src/js/pdf417/compaction.js +391 -0
- package/src/js/pdf417/decoder.js +110 -0
- package/src/js/pdf417/detector.js +484 -0
- package/src/js/pdf417/encoder.js +102 -0
- package/src/js/pdf417/error-correction.js +44 -0
- package/src/{pdf417 → js/pdf417}/index.js +0 -5
- package/src/js/pdf417/tables.js +315 -0
- package/src/js/qr/decoder.js +539 -0
- package/src/js/qr/detector.js +613 -0
- package/src/js/qr/encoder.js +873 -0
- package/src/js/qr/index.js +42 -0
- package/src/js/qr/tables.js +690 -0
- package/src/js/render/image-data.js +120 -0
- package/src/js/render/index.js +128 -0
- package/src/js/render/options.js +152 -0
- package/src/js/render/png.js +270 -0
- package/src/js/render/svg.js +117 -0
- package/src/js/render/webgl.js +200 -0
- package/src/js/render/webgpu.js +357 -0
- package/src/js/rmqr/decoder.js +209 -0
- package/src/js/rmqr/detector.js +122 -0
- package/src/js/rmqr/encoder.js +321 -0
- package/src/js/rmqr/index.js +33 -0
- package/src/js/rmqr/tables.js +177 -0
- package/src/{aztec/decoder.js → ts/aztec/decoder.ts} +0 -1
- package/{typings → src/ts}/aztec/detector.d.ts +2 -2
- package/src/{aztec/detector.js → ts/aztec/detector.ts} +0 -1
- package/src/{aztec/encoder.js → ts/aztec/encoder.ts} +0 -1
- package/src/{aztec/high-level.js → ts/aztec/high-level.ts} +0 -1
- package/src/{aztec/index.js → ts/aztec/index.ts} +0 -1
- package/src/{aztec/tables.js → ts/aztec/tables.ts} +0 -1
- package/src/{aztecrune/decoder.js → ts/aztecrune/decoder.ts} +0 -1
- package/src/{aztecrune/detector.js → ts/aztecrune/detector.ts} +0 -1
- package/src/{aztecrune/encoder.js → ts/aztecrune/encoder.ts} +0 -1
- package/src/{aztecrune/index.js → ts/aztecrune/index.ts} +0 -1
- package/src/{aztecrune/tables.js → ts/aztecrune/tables.ts} +0 -1
- package/src/{compactpdf417/decoder.js → ts/compactpdf417/decoder.ts} +0 -1
- package/src/{compactpdf417/detector.js → ts/compactpdf417/detector.ts} +0 -1
- package/src/{compactpdf417/encoder.js → ts/compactpdf417/encoder.ts} +0 -1
- package/src/{compactpdf417/index.js → ts/compactpdf417/index.ts} +0 -5
- package/src/{compactpdf417/tables.js → ts/compactpdf417/tables.ts} +0 -1
- package/src/{core/bit-buffer.js → ts/core/bit-buffer.ts} +0 -1
- package/src/{core/bit-matrix.js → ts/core/bit-matrix.ts} +0 -1
- package/src/{core/errors.js → ts/core/errors.ts} +0 -1
- package/src/{core/galois-field.js → ts/core/galois-field.ts} +0 -1
- package/src/{core/index.js → ts/core/index.ts} +0 -1
- package/src/{core/reed-solomon.js → ts/core/reed-solomon.ts} +0 -1
- package/src/{databar/codec.js → ts/databar/codec.ts} +0 -1
- package/src/{databar/decoder.js → ts/databar/decoder.ts} +0 -1
- package/src/{databar/encoder.js → ts/databar/encoder.ts} +0 -1
- package/src/{databar/gs1.js → ts/databar/gs1.ts} +0 -1
- package/src/{databar/index.js → ts/databar/index.ts} +0 -1
- package/src/{databar/patterns.js → ts/databar/patterns.ts} +0 -1
- package/src/{databar/tables.js → ts/databar/tables.ts} +0 -1
- package/src/{datamatrix/decoder.js → ts/datamatrix/decoder.ts} +0 -1
- package/{typings → src/ts}/datamatrix/detector.d.ts +2 -2
- package/src/{datamatrix/detector.js → ts/datamatrix/detector.ts} +0 -1
- package/src/{datamatrix/encoder.js → ts/datamatrix/encoder.ts} +0 -1
- package/src/{datamatrix/index.js → ts/datamatrix/index.ts} +0 -1
- package/src/{datamatrix/tables.js → ts/datamatrix/tables.ts} +0 -1
- package/src/{frameqr/decoder.js → ts/frameqr/decoder.ts} +15 -16
- package/src/{frameqr/detector.js → ts/frameqr/detector.ts} +2 -3
- package/src/{frameqr/encoder.js → ts/frameqr/encoder.ts} +7 -8
- package/src/{frameqr/index.js → ts/frameqr/index.ts} +0 -1
- package/src/{frameqr/tables.js → ts/frameqr/tables.ts} +10 -11
- package/src/{image/binarizer.js → ts/image/binarizer.ts} +0 -1
- package/src/{image/grid-sampler.js → ts/image/grid-sampler.ts} +0 -1
- package/src/{image/index.js → ts/image/index.ts} +0 -1
- package/src/{image/luminance.js → ts/image/luminance.ts} +0 -1
- package/src/{image/perspective.js → ts/image/perspective.ts} +0 -1
- package/{typings → src/ts}/index.d.ts +3 -3
- package/src/ts/index.ts +790 -0
- package/src/{micropdf417/compaction.js → ts/micropdf417/compaction.ts} +0 -1
- package/src/{micropdf417/decoder.js → ts/micropdf417/decoder.ts} +0 -1
- package/src/{micropdf417/detector.js → ts/micropdf417/detector.ts} +0 -1
- package/src/{micropdf417/encoder.js → ts/micropdf417/encoder.ts} +0 -1
- package/src/{micropdf417/error-correction.js → ts/micropdf417/error-correction.ts} +0 -1
- package/src/{micropdf417/index.js → ts/micropdf417/index.ts} +0 -1
- package/src/{micropdf417/tables.js → ts/micropdf417/tables.ts} +0 -1
- package/src/{microqr/decoder.js → ts/microqr/decoder.ts} +0 -1
- package/src/{microqr/detector.js → ts/microqr/detector.ts} +0 -1
- package/src/{microqr/encoder.js → ts/microqr/encoder.ts} +0 -1
- package/src/{microqr/index.js → ts/microqr/index.ts} +0 -1
- package/src/{microqr/tables.js → ts/microqr/tables.ts} +0 -1
- package/src/{oned/addons.js → ts/oned/addons.ts} +0 -1
- package/src/{oned/index.js → ts/oned/index.ts} +0 -1
- package/src/{oned/patterns.js → ts/oned/patterns.ts} +0 -1
- package/src/{oned/reader.js → ts/oned/reader.ts} +0 -1
- package/src/{oned/writers.js → ts/oned/writers.ts} +0 -1
- package/src/{pdf417/compaction.js → ts/pdf417/compaction.ts} +0 -1
- package/src/{pdf417/decoder.js → ts/pdf417/decoder.ts} +0 -1
- package/src/{pdf417/detector.js → ts/pdf417/detector.ts} +0 -1
- package/src/{pdf417/encoder.js → ts/pdf417/encoder.ts} +0 -1
- package/src/{pdf417/error-correction.js → ts/pdf417/error-correction.ts} +0 -1
- package/src/ts/pdf417/index.ts +6 -0
- package/src/{pdf417/tables.js → ts/pdf417/tables.ts} +0 -1
- package/src/{qr/decoder.js → ts/qr/decoder.ts} +0 -1
- package/src/{qr/detector.js → ts/qr/detector.ts} +0 -1
- package/src/{qr/encoder.js → ts/qr/encoder.ts} +0 -1
- package/src/{qr/index.js → ts/qr/index.ts} +0 -1
- package/src/{qr/tables.js → ts/qr/tables.ts} +0 -1
- package/src/{render/image-data.js → ts/render/image-data.ts} +0 -1
- package/src/{render/index.js → ts/render/index.ts} +0 -1
- package/src/{render/options.js → ts/render/options.ts} +0 -1
- package/src/{render/png.js → ts/render/png.ts} +0 -1
- package/src/{render/svg.js → ts/render/svg.ts} +0 -1
- package/src/{render/webgl.js → ts/render/webgl.ts} +0 -1
- package/src/{render/webgpu.js → ts/render/webgpu.ts} +0 -1
- package/src/{rmqr/decoder.js → ts/rmqr/decoder.ts} +0 -1
- package/src/{rmqr/detector.js → ts/rmqr/detector.ts} +0 -1
- package/src/{rmqr/encoder.js → ts/rmqr/encoder.ts} +0 -1
- package/src/{rmqr/index.js → ts/rmqr/index.ts} +0 -1
- package/src/{rmqr/tables.js → ts/rmqr/tables.ts} +0 -1
- /package/{typings → src/ts}/aztec/decoder.d.ts +0 -0
- /package/{typings → src/ts}/aztec/encoder.d.ts +0 -0
- /package/{typings → src/ts}/aztec/high-level.d.ts +0 -0
- /package/{typings → src/ts}/aztec/index.d.ts +0 -0
- /package/{typings → src/ts}/aztec/tables.d.ts +0 -0
- /package/{typings → src/ts}/aztecrune/decoder.d.ts +0 -0
- /package/{typings → src/ts}/aztecrune/detector.d.ts +0 -0
- /package/{typings → src/ts}/aztecrune/encoder.d.ts +0 -0
- /package/{typings → src/ts}/aztecrune/index.d.ts +0 -0
- /package/{typings → src/ts}/aztecrune/tables.d.ts +0 -0
- /package/{typings → src/ts}/bundle/sythos-barcode.d.ts +0 -0
- /package/{typings → src/ts}/bundle/sythos-barcode.esm.d.ts +0 -0
- /package/{typings → src/ts}/compactpdf417/decoder.d.ts +0 -0
- /package/{typings → src/ts}/compactpdf417/detector.d.ts +0 -0
- /package/{typings → src/ts}/compactpdf417/encoder.d.ts +0 -0
- /package/{typings → src/ts}/compactpdf417/index.d.ts +0 -0
- /package/{typings → src/ts}/compactpdf417/tables.d.ts +0 -0
- /package/{typings → src/ts}/core/bit-buffer.d.ts +0 -0
- /package/{typings → src/ts}/core/bit-matrix.d.ts +0 -0
- /package/{typings → src/ts}/core/errors.d.ts +0 -0
- /package/{typings → src/ts}/core/galois-field.d.ts +0 -0
- /package/{typings → src/ts}/core/index.d.ts +0 -0
- /package/{typings → src/ts}/core/reed-solomon.d.ts +0 -0
- /package/{typings → src/ts}/databar/codec.d.ts +0 -0
- /package/{typings → src/ts}/databar/decoder.d.ts +0 -0
- /package/{typings → src/ts}/databar/encoder.d.ts +0 -0
- /package/{typings → src/ts}/databar/gs1.d.ts +0 -0
- /package/{typings → src/ts}/databar/index.d.ts +0 -0
- /package/{typings → src/ts}/databar/patterns.d.ts +0 -0
- /package/{typings → src/ts}/databar/tables.d.ts +0 -0
- /package/{typings → src/ts}/datamatrix/decoder.d.ts +0 -0
- /package/{typings → src/ts}/datamatrix/encoder.d.ts +0 -0
- /package/{typings → src/ts}/datamatrix/index.d.ts +0 -0
- /package/{typings → src/ts}/datamatrix/tables.d.ts +0 -0
- /package/{typings → src/ts}/frameqr/decoder.d.ts +0 -0
- /package/{typings → src/ts}/frameqr/detector.d.ts +0 -0
- /package/{typings → src/ts}/frameqr/encoder.d.ts +0 -0
- /package/{typings → src/ts}/frameqr/index.d.ts +0 -0
- /package/{typings → src/ts}/frameqr/tables.d.ts +0 -0
- /package/{typings → src/ts}/image/binarizer.d.ts +0 -0
- /package/{typings → src/ts}/image/grid-sampler.d.ts +0 -0
- /package/{typings → src/ts}/image/index.d.ts +0 -0
- /package/{typings → src/ts}/image/luminance.d.ts +0 -0
- /package/{typings → src/ts}/image/perspective.d.ts +0 -0
- /package/{typings → src/ts}/micropdf417/compaction.d.ts +0 -0
- /package/{typings → src/ts}/micropdf417/decoder.d.ts +0 -0
- /package/{typings → src/ts}/micropdf417/detector.d.ts +0 -0
- /package/{typings → src/ts}/micropdf417/encoder.d.ts +0 -0
- /package/{typings → src/ts}/micropdf417/error-correction.d.ts +0 -0
- /package/{typings → src/ts}/micropdf417/index.d.ts +0 -0
- /package/{typings → src/ts}/micropdf417/tables.d.ts +0 -0
- /package/{typings → src/ts}/microqr/decoder.d.ts +0 -0
- /package/{typings → src/ts}/microqr/detector.d.ts +0 -0
- /package/{typings → src/ts}/microqr/encoder.d.ts +0 -0
- /package/{typings → src/ts}/microqr/index.d.ts +0 -0
- /package/{typings → src/ts}/microqr/tables.d.ts +0 -0
- /package/{typings → src/ts}/oned/addons.d.ts +0 -0
- /package/{typings → src/ts}/oned/index.d.ts +0 -0
- /package/{typings → src/ts}/oned/patterns.d.ts +0 -0
- /package/{typings → src/ts}/oned/reader.d.ts +0 -0
- /package/{typings → src/ts}/oned/writers.d.ts +0 -0
- /package/{typings → src/ts}/pdf417/compaction.d.ts +0 -0
- /package/{typings → src/ts}/pdf417/decoder.d.ts +0 -0
- /package/{typings → src/ts}/pdf417/detector.d.ts +0 -0
- /package/{typings → src/ts}/pdf417/encoder.d.ts +0 -0
- /package/{typings → src/ts}/pdf417/error-correction.d.ts +0 -0
- /package/{typings → src/ts}/pdf417/index.d.ts +0 -0
- /package/{typings → src/ts}/pdf417/tables.d.ts +0 -0
- /package/{typings → src/ts}/qr/decoder.d.ts +0 -0
- /package/{typings → src/ts}/qr/detector.d.ts +0 -0
- /package/{typings → src/ts}/qr/encoder.d.ts +0 -0
- /package/{typings → src/ts}/qr/index.d.ts +0 -0
- /package/{typings → src/ts}/qr/tables.d.ts +0 -0
- /package/{typings → src/ts}/render/image-data.d.ts +0 -0
- /package/{typings → src/ts}/render/index.d.ts +0 -0
- /package/{typings → src/ts}/render/options.d.ts +0 -0
- /package/{typings → src/ts}/render/png.d.ts +0 -0
- /package/{typings → src/ts}/render/svg.d.ts +0 -0
- /package/{typings → src/ts}/render/webgl.d.ts +0 -0
- /package/{typings → src/ts}/render/webgpu.d.ts +0 -0
- /package/{typings → src/ts}/rmqr/decoder.d.ts +0 -0
- /package/{typings → src/ts}/rmqr/detector.d.ts +0 -0
- /package/{typings → src/ts}/rmqr/encoder.d.ts +0 -0
- /package/{typings → src/ts}/rmqr/index.d.ts +0 -0
- /package/{typings → src/ts}/rmqr/tables.d.ts +0 -0
package/LICENSE
CHANGED
|
@@ -61,7 +61,7 @@ qualified attorney.
|
|
|
61
61
|
-------------------------------- ----------- ---------------------------
|
|
62
62
|
independent barcode various differential encode and
|
|
63
63
|
implementations decode oracles
|
|
64
|
-
typescript (tsc) Apache-2.0
|
|
64
|
+
typescript (tsc) Apache-2.0 runtime compilation and public type checks
|
|
65
65
|
|
|
66
66
|
THE PROJECT RULE, STATED PRECISELY:
|
|
67
67
|
|
|
@@ -75,9 +75,10 @@ and legal review where required. None of this is a legal conclusion about
|
|
|
75
75
|
derivative works or license obligations.
|
|
76
76
|
|
|
77
77
|
typescript (tsc) is not a barcode library and carries no symbology logic at
|
|
78
|
-
all. It is
|
|
79
|
-
|
|
80
|
-
|
|
78
|
+
all. It is a development-only compiler and validator: it compiles this
|
|
79
|
+
project's own TypeScript runtime source into JavaScript and checks its public
|
|
80
|
+
declarations. TypeScript is not a runtime dependency and does not contribute
|
|
81
|
+
barcode data or algorithms.
|
|
81
82
|
|
|
82
83
|
No barcode library is a dependency of this package. None of the tools above is
|
|
83
84
|
a runtime dependency, none ships in the published package, and running or not
|
package/NOTICE.md
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
## Origin of this code
|
|
4
4
|
|
|
5
|
-
The
|
|
5
|
+
The TypeScript source and compiled JavaScript runtime integration work in this repository is
|
|
6
6
|
original work by **Sythos (https://www.sythos.net)**. No third-party barcode
|
|
7
7
|
source code is copied into or shipped by this package. Public or normative
|
|
8
8
|
format values may be represented in original Sythos data structures, with
|
|
@@ -96,7 +96,7 @@ Records any constant table whose values were transcribed from a documented
|
|
|
96
96
|
source rather than generated by `tools/`. Each entry names the source and the
|
|
97
97
|
date of transcription.
|
|
98
98
|
|
|
99
|
-
| PDF417 pattern ordering | AIM USS-PDF417 public reference ([reference copy](https://www.expresscorp.com/uploads/specifications/44/USS-PDF-417.pdf)), Appendix H / Table H1,
|
|
99
|
+
| PDF417 pattern ordering | AIM USS-PDF417 public reference ([reference copy](https://www.expresscorp.com/uploads/specifications/44/USS-PDF-417.pdf)), Appendix H / Table H1, represented in the TypeScript source `src/ts/pdf417/tables.ts` and emitted to `src/js/pdf417/tables.js`; accessed 2026-08-11. The reference copy is attributed here; its copyright and redistribution terms remain under legal review. |
|
|
100
100
|
| PDF417 black-box verification | ZXing Java 3.5.3 and bwip-js 4.5.1 were invoked as external black boxes on 2026-08-11 for bidirectional Text/Numeric/UTF-8 vectors. Their source and tables are not shipped. |
|
|
101
101
|
| PDF417 device evidence | User-provided 6/6 continuous-camera attestations on Pixel 10/Android 17/Chrome and iPhone 17/Safari, including printed Brother MFC-L2710DW symbols, low light/flash, blur and motion; recorded as user evidence, not independently captured by this repository. |
|
|
102
102
|
| MicroPDF417 technical and provenance review | [ISO/IEC 24728:2006](https://www.iso.org/standard/38838.html), [Wikipedia overview](https://en.wikipedia.org/wiki/MicroPDF417), [US 6,047,892 record](https://patents.google.com/patent/US6047892A/en) and its [direct PDF](https://patentimages.storage.googleapis.com/0a/79/f5/e8d374043414f3/US6047892.pdf) were consulted on 2026-08-11. ZXing-C++, Zint and bwip-js were consulted for implementation/review or black-box validation. No third-party source code is copied or shipped; normative/public values are represented in original Sythos data structures, with provenance and legal review pending. |
|
package/README.md
CHANGED
|
@@ -1,16 +1,10 @@
|
|
|
1
1
|
# Sythos Barcode Suite and SDK
|
|
2
2
|
|
|
3
|
-
Read and write barcodes in JavaScript.
|
|
3
|
+
Read and write barcodes in JavaScript and TypeScript.
|
|
4
4
|
|
|
5
|
-
[](https://www.npmjs.com/package/@sythos/js_barcode_universal)
|
|
6
|
-
[](LICENSE)
|
|
7
|
-
[](package.json)
|
|
8
|
-
[](https://nodejs.org/api/esm.html)
|
|
9
|
-
[](https://www.npmjs.com/package/@sythos/js_barcode_universal)
|
|
5
|
+
[](https://www.npmjs.com/package/@sythos/js_barcode_universal) [](LICENSE) [](package.json) [](https://nodejs.org/api/esm.html) 
|
|
10
6
|
|
|
11
|
-
[](https://www.npmjs.com/package/@sythos/js_barcode_universal)
|
|
12
|
-
[](https://github.com/Sythos/JS_Barcode_Universal/commits/main/)
|
|
13
|
-
[](https://github.com/Sythos/JS_Barcode_Universal/issues)
|
|
7
|
+
[](https://www.npmjs.com/package/@sythos/js_barcode_universal) [](https://github.com/Sythos/JS_Barcode_Universal/commits/main/) [](https://github.com/Sythos/JS_Barcode_Universal/issues) [](https://www.npmjs.com/package/@sythos/js_barcode_universal)
|
|
14
8
|
|
|
15
9
|
Original Sythos implementation, zero runtime dependencies, MIT. It runs unmodified in Node, in browsers
|
|
16
10
|
(including Safari on iOS) and in web workers. The core requires no canvas, no filesystem and no
|
|
@@ -64,7 +58,7 @@ npm install @sythos/js_barcode_universal
|
|
|
64
58
|
|
|
65
59
|
`yarn add @sythos/js_barcode_universal` and `pnpm add @sythos/js_barcode_universal` do the same thing. Nothing is installed
|
|
66
60
|
alongside it — there are no runtime dependencies, no postinstall script and no native build. The
|
|
67
|
-
package is plain ESM (`"type": "module"`) and asks for Node
|
|
61
|
+
package is plain ESM (`"type": "module"`) and asks for Node 24 or newer.
|
|
68
62
|
|
|
69
63
|
```js
|
|
70
64
|
import { encode, decode, toSVG, toImageData } from '@sythos/js_barcode_universal';
|
|
@@ -118,8 +112,8 @@ The `unpkg` and `jsdelivr` fields point at the IIFE bundle, so a CDN needs no in
|
|
|
118
112
|
|
|
119
113
|
```html
|
|
120
114
|
<script src="https://unpkg.com/@sythos/js_barcode_universal"></script>
|
|
121
|
-
<script src="https://unpkg.com/@sythos/js_barcode_universal@1.5.
|
|
122
|
-
<script src="https://cdn.jsdelivr.net/npm/@sythos/js_barcode_universal@1.5.
|
|
115
|
+
<script src="https://unpkg.com/@sythos/js_barcode_universal@1.5.9"></script>
|
|
116
|
+
<script src="https://cdn.jsdelivr.net/npm/@sythos/js_barcode_universal@1.5.9"></script>
|
|
123
117
|
```
|
|
124
118
|
|
|
125
119
|
Pin the version for anything you ship; the unpinned form resolves to `latest` and will move under
|
|
@@ -167,8 +161,22 @@ toPNG(ean, { scale: 3, barHeight: 80 }).then((bytes) => {
|
|
|
167
161
|
|
|
168
162
|
### 4. The source directly
|
|
169
163
|
|
|
170
|
-
[`src/index.js`](src/index.js) is
|
|
171
|
-
|
|
164
|
+
[`src/index.js`](src/index.js) is the generated ESM facade emitted from the TypeScript source
|
|
165
|
+
tree. The source layout is deliberately explicit:
|
|
166
|
+
|
|
167
|
+
- `src/ts/` contains the TypeScript runtime sources and their adjacent machine-readable `.d.ts`
|
|
168
|
+
declarations, including `src/ts/index.ts` and `src/ts/index.d.ts`.
|
|
169
|
+
- `src/js/` contains the compiled JavaScript runtime modules used by Node, browsers and the CDN
|
|
170
|
+
bundles.
|
|
171
|
+
- `src/index.js` and `src/index.d.ts` are the stable package-root facades.
|
|
172
|
+
|
|
173
|
+
From the development workspace, `npm run build:ts` compiles `src/ts/` into `src/js/` and the
|
|
174
|
+
root JavaScript facade; `npm run build` then regenerates both bundles. The published package
|
|
175
|
+
keeps both source languages visible while retaining zero runtime dependencies.
|
|
176
|
+
|
|
177
|
+
The package subpath exports therefore pair compiled runtime modules under `src/js/` with their
|
|
178
|
+
TypeScript sources and declarations under `src/ts/`; direct source imports should continue to use
|
|
179
|
+
the JavaScript facade above.
|
|
172
180
|
|
|
173
181
|
```js
|
|
174
182
|
import { encode, decode, toImageData, listFormats } from './src/index.js';
|
|
@@ -205,11 +213,14 @@ decode(frame, { formats, profile: 'camera', tryHarder: true })
|
|
|
205
213
|
```
|
|
206
214
|
|
|
207
215
|
The profile requires a compatible quiet zone and the same complete 1D symbol on at least two
|
|
208
|
-
scan samples. It
|
|
209
|
-
native orientation has no validated read.
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
216
|
+
scan samples. It evaluates the eight fixed in-plane orientations `0°`, `45°`, `90°`, `135°`,
|
|
217
|
+
`180°`, `225°`, `270°` and `315°` when the native orientation has no validated read. The same
|
|
218
|
+
orientation set is available to the supported 2D detector passes in the strict camera profile.
|
|
219
|
+
Code 11 and MSI require a verified check digit in this profile; other formats retain their own
|
|
220
|
+
structural and checksum validation. A frame without a validated barcode still returns `[]`. No
|
|
221
|
+
partial, structurally inconsistent or low-confidence value is emitted to the caller. This is a
|
|
222
|
+
finite in-plane retry policy, not a guarantee for arbitrary perspective, curved media, severe
|
|
223
|
+
occlusion or multi-symbol scenes.
|
|
213
224
|
|
|
214
225
|
Camera-profile 1D results add `confidence` (0–1), `bounds`, `rotation`, and
|
|
215
226
|
`quality: { quietZone, checksum, rows, consistency }`. `bounds` is reported in the raster
|
|
@@ -300,9 +311,9 @@ console.log(result.text, result.gs1); // 0101234567890128 true
|
|
|
300
311
|
|
|
301
312
|
Binary content is accepted as a `Uint8Array` with `encoding: 'base256'`. The current high-level
|
|
302
313
|
decoder handles ASCII and Base256 codewords; C40, Text, X12 and EDIFACT input symbols are not yet
|
|
303
|
-
decoded. The current detector accepts axis-aligned square or rectangular symbols;
|
|
304
|
-
`
|
|
305
|
-
Arbitrary
|
|
314
|
+
decoded. The current detector accepts axis-aligned square or rectangular symbols; with
|
|
315
|
+
`profile: 'camera'`, the decode pipeline evaluates the eight fixed in-plane orientations at 45°
|
|
316
|
+
steps. Arbitrary perspective and perspective-skewed Data Matrix photographs are not yet guaranteed.
|
|
306
317
|
|
|
307
318
|
### Aztec Code
|
|
308
319
|
|
|
@@ -320,9 +331,9 @@ const result = decodeAztec(symbol);
|
|
|
320
331
|
console.log(result.text); // Greetings My Lord Sythos 👋
|
|
321
332
|
```
|
|
322
333
|
|
|
323
|
-
The image detector handles
|
|
324
|
-
central bull’s-eye. Severe photographic perspective remains an
|
|
325
|
-
gate rather than a guaranteed capability.
|
|
334
|
+
The image detector handles the eight fixed camera-profile orientations, inverted polarity and
|
|
335
|
+
quadrilateral sampling around the central bull’s-eye. Severe photographic perspective remains an
|
|
336
|
+
interoperability and robustness gate rather than a guaranteed capability.
|
|
326
337
|
|
|
327
338
|
### PDF417 (writer, matrix decoder and camera reader)
|
|
328
339
|
|
|
@@ -330,8 +341,8 @@ gate rather than a guaranteed capability.
|
|
|
330
341
|
(UTF-8), ECC levels 0–8, row-height inference and Reed–Solomon erasure correction. The direct
|
|
331
342
|
matrix decoder is available from `@sythos/js_barcode_universal/pdf417`.
|
|
332
343
|
|
|
333
|
-
The image helper handles clean module-aligned raster symbols, integer scale,
|
|
334
|
-
|
|
344
|
+
The image helper handles clean module-aligned raster symbols, integer scale, fixed 45°-step
|
|
345
|
+
camera orientations, automatic perspective estimation, mild blur/noise and an application-supplied
|
|
335
346
|
quadrilateral. Results expose `bytes` and ordered `segments` for byte-preserving payloads. Real
|
|
336
347
|
device validation covers Pixel 10/Chrome and iPhone 17/Safari with printed symbols and continuous
|
|
337
348
|
camera capture. Extreme glare, severe occlusion, curved media and multi-symbol scenes remain
|
|
@@ -357,17 +368,18 @@ const symbol = encodeMicroPDF417('MICRO PDF417', { compaction: 'text' });
|
|
|
357
368
|
console.log(decodeMicroPDF417(symbol).text);
|
|
358
369
|
```
|
|
359
370
|
|
|
360
|
-
The detector accepts clean, integer-scaled raster symbols and
|
|
361
|
-
perspective, severe photographic degradation and multi-symbol scenes are
|
|
362
|
-
robust capabilities.
|
|
371
|
+
The detector accepts clean, integer-scaled raster symbols and the eight fixed camera-profile
|
|
372
|
+
orientations. Arbitrary perspective, severe photographic degradation and multi-symbol scenes are
|
|
373
|
+
not yet claimed as robust capabilities.
|
|
363
374
|
|
|
364
375
|
### Micro QR Code
|
|
365
376
|
|
|
366
377
|
`microqr` implements the M1–M4 family with Numeric, Alphanumeric, ISO-8859-1 Byte and Kanji
|
|
367
378
|
payloads, BCH format protection, the four Micro QR masks and Reed–Solomon correction. M1 is
|
|
368
379
|
detection-only. ECI, FNC1/GS1 and Structured Append are intentionally outside the current API.
|
|
369
|
-
The detector accepts clean scaled rasters,
|
|
370
|
-
sampling, and rejects normal QR Model 2 symbols.
|
|
380
|
+
The detector accepts clean scaled rasters, the eight fixed camera-profile orientations, inverted
|
|
381
|
+
polarity and mild projective sampling, and rejects normal QR Model 2 symbols. Arbitrary perspective
|
|
382
|
+
and curved-media robustness are not claimed.
|
|
371
383
|
|
|
372
384
|
```js
|
|
373
385
|
import { encodeMicroQR, decodeMicroQR } from '@sythos/js_barcode_universal/microqr';
|
|
@@ -379,8 +391,9 @@ console.log(decodeMicroQR(symbol).text);
|
|
|
379
391
|
### rMQR Code
|
|
380
392
|
|
|
381
393
|
`rmqr` implements all 32 standard rectangular geometries, M/H ECC, Numeric, Alphanumeric, Byte,
|
|
382
|
-
Kanji and ECI payloads. The detector accepts clean integer-scaled rasters, quiet zones and
|
|
383
|
-
|
|
394
|
+
Kanji and ECI payloads. The detector accepts clean integer-scaled rasters, quiet zones and the
|
|
395
|
+
eight fixed camera-profile orientations; arbitrary photographic perspective and multi-symbol
|
|
396
|
+
scenes are not claimed.
|
|
384
397
|
|
|
385
398
|
```js
|
|
386
399
|
import { encodeRMQR, decodeRMQR } from '@sythos/js_barcode_universal/rmqr';
|
|
@@ -414,7 +427,7 @@ exports the QR symbol without embedding the remote artwork.
|
|
|
414
427
|
### Aztec Rune, Compact PDF417 and EAN supplements
|
|
415
428
|
|
|
416
429
|
`aztecrune` implements the fixed 11×11 Rune values 0–255 with clean raster
|
|
417
|
-
detection, inversion and
|
|
430
|
+
detection, inversion and the eight fixed camera-profile orientations. Its matrices were compared
|
|
418
431
|
exhaustively with ZXing-C++ as an independent black-box runtime; no ZXing
|
|
419
432
|
source or table is shipped.
|
|
420
433
|
|
|
@@ -602,8 +615,8 @@ Luminance conversion flattens the image to greyscale. Binarization turns that in
|
|
|
602
615
|
either globally or with a hybrid local threshold that survives uneven lighting. Detection locates
|
|
603
616
|
a symbol and its corners in that bit plane. Detectors that recover four perspective-aware corners
|
|
604
617
|
(currently QR) sample the symbol back through a perspective transform. Data Matrix currently uses
|
|
605
|
-
an axis-aligned bounding box
|
|
606
|
-
lost. Only then is the payload decoded.
|
|
618
|
+
an axis-aligned bounding box; the strict camera profile evaluates the eight fixed in-plane
|
|
619
|
+
orientations before error correction repairs what the camera lost. Only then is the payload decoded.
|
|
607
620
|
|
|
608
621
|
**Reed–Solomon is generic over the finite field.** The `GaloisField` class is constructed with a
|
|
609
622
|
field order and a primitive polynomial rather than hard-coding GF(256), which is what lets one
|