@sythos/js_barcode_universal 1.5.6 → 1.5.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.
Files changed (180) hide show
  1. package/NOTICE.md +1 -1
  2. package/README.md +55 -35
  3. package/bundle/sythos-barcode.esm.js +618 -465
  4. package/bundle/sythos-barcode.js +618 -465
  5. package/package.json +90 -24
  6. package/src/index.d.ts +363 -0
  7. package/src/index.js +286 -133
  8. package/src/{aztec → js/aztec}/decoder.js +0 -1
  9. package/src/{aztec → js/aztec}/detector.js +0 -1
  10. package/src/{aztec → js/aztec}/encoder.js +0 -1
  11. package/src/{aztec → js/aztec}/high-level.js +0 -1
  12. package/src/{aztec → js/aztec}/index.js +0 -1
  13. package/src/{aztec → js/aztec}/tables.js +0 -1
  14. package/src/{aztecrune → js/aztecrune}/decoder.js +0 -1
  15. package/src/{aztecrune → js/aztecrune}/detector.js +0 -1
  16. package/src/{aztecrune → js/aztecrune}/encoder.js +0 -1
  17. package/src/{aztecrune → js/aztecrune}/index.js +0 -1
  18. package/src/{aztecrune → js/aztecrune}/tables.js +0 -1
  19. package/src/{compactpdf417 → js/compactpdf417}/decoder.js +0 -1
  20. package/src/{compactpdf417 → js/compactpdf417}/detector.js +0 -1
  21. package/src/{compactpdf417 → js/compactpdf417}/encoder.js +0 -1
  22. package/src/{compactpdf417 → js/compactpdf417}/index.js +0 -5
  23. package/src/{compactpdf417 → js/compactpdf417}/tables.js +0 -1
  24. package/src/{core → js/core}/bit-buffer.js +0 -1
  25. package/src/{core → js/core}/bit-matrix.js +0 -1
  26. package/src/{core → js/core}/errors.js +0 -1
  27. package/src/{core → js/core}/galois-field.js +0 -1
  28. package/src/{core → js/core}/index.js +0 -1
  29. package/src/{core → js/core}/reed-solomon.js +0 -1
  30. package/src/{databar → js/databar}/codec.js +0 -1
  31. package/src/{databar → js/databar}/decoder.js +0 -1
  32. package/src/{databar → js/databar}/encoder.js +0 -1
  33. package/src/{databar → js/databar}/gs1.js +0 -1
  34. package/src/{databar → js/databar}/index.js +0 -1
  35. package/src/{databar → js/databar}/patterns.js +0 -1
  36. package/src/{databar → js/databar}/tables.js +0 -1
  37. package/src/{datamatrix → js/datamatrix}/decoder.js +0 -1
  38. package/src/{datamatrix → js/datamatrix}/detector.js +0 -1
  39. package/src/{datamatrix → js/datamatrix}/encoder.js +0 -1
  40. package/src/{datamatrix → js/datamatrix}/index.js +0 -1
  41. package/src/{datamatrix → js/datamatrix}/tables.js +0 -1
  42. package/src/{frameqr → js/frameqr}/decoder.js +15 -16
  43. package/src/{frameqr → js/frameqr}/detector.js +2 -3
  44. package/src/{frameqr → js/frameqr}/encoder.js +7 -8
  45. package/src/{frameqr → js/frameqr}/index.js +0 -1
  46. package/src/{frameqr → js/frameqr}/tables.js +10 -11
  47. package/src/{image → js/image}/binarizer.js +0 -1
  48. package/src/{image → js/image}/grid-sampler.js +0 -1
  49. package/src/js/image/index.js +40 -0
  50. package/src/{image → js/image}/luminance.js +0 -1
  51. package/src/{image → js/image}/perspective.js +0 -1
  52. package/src/{micropdf417 → js/micropdf417}/compaction.js +0 -1
  53. package/src/{micropdf417 → js/micropdf417}/decoder.js +0 -1
  54. package/src/{micropdf417 → js/micropdf417}/detector.js +0 -1
  55. package/src/{micropdf417 → js/micropdf417}/encoder.js +0 -1
  56. package/src/{micropdf417 → js/micropdf417}/error-correction.js +0 -1
  57. package/src/{micropdf417 → js/micropdf417}/index.js +0 -1
  58. package/src/{micropdf417 → js/micropdf417}/tables.js +0 -1
  59. package/src/{microqr → js/microqr}/decoder.js +0 -1
  60. package/src/{microqr → js/microqr}/detector.js +0 -1
  61. package/src/{microqr → js/microqr}/encoder.js +0 -1
  62. package/src/js/microqr/index.js +36 -0
  63. package/src/{microqr → js/microqr}/tables.js +0 -1
  64. package/src/{oned → js/oned}/addons.js +0 -1
  65. package/src/{oned → js/oned}/index.js +0 -1
  66. package/src/{oned → js/oned}/patterns.js +0 -1
  67. package/src/{oned → js/oned}/reader.js +0 -1
  68. package/src/{oned → js/oned}/writers.js +0 -1
  69. package/src/{pdf417 → js/pdf417}/compaction.js +0 -1
  70. package/src/{pdf417 → js/pdf417}/decoder.js +0 -1
  71. package/src/{pdf417 → js/pdf417}/detector.js +0 -1
  72. package/src/{pdf417 → js/pdf417}/encoder.js +0 -1
  73. package/src/{pdf417 → js/pdf417}/error-correction.js +0 -1
  74. package/src/js/pdf417/index.js +6 -0
  75. package/src/{pdf417 → js/pdf417}/tables.js +0 -1
  76. package/src/{qr → js/qr}/decoder.js +0 -1
  77. package/src/{qr → js/qr}/detector.js +0 -1
  78. package/src/{qr → js/qr}/encoder.js +0 -1
  79. package/src/js/qr/index.js +44 -0
  80. package/src/{qr → js/qr}/tables.js +0 -1
  81. package/src/{render → js/render}/image-data.js +0 -1
  82. package/src/{render → js/render}/index.js +0 -1
  83. package/src/{render → js/render}/options.js +0 -1
  84. package/src/{render → js/render}/png.js +0 -1
  85. package/src/{render → js/render}/svg.js +0 -1
  86. package/src/{render → js/render}/webgl.js +0 -1
  87. package/src/{render → js/render}/webgpu.js +0 -1
  88. package/src/{rmqr → js/rmqr}/decoder.js +0 -1
  89. package/src/{rmqr → js/rmqr}/detector.js +0 -1
  90. package/src/{rmqr → js/rmqr}/encoder.js +0 -1
  91. package/src/{rmqr → js/rmqr}/index.js +0 -1
  92. package/src/{rmqr → js/rmqr}/tables.js +0 -1
  93. package/src/ts/aztec/decoder.d.ts +57 -0
  94. package/src/ts/aztec/detector.d.ts +62 -0
  95. package/src/ts/aztec/encoder.d.ts +94 -0
  96. package/src/ts/aztec/high-level.d.ts +89 -0
  97. package/src/ts/aztec/index.d.ts +35 -0
  98. package/src/ts/aztec/tables.d.ts +144 -0
  99. package/src/ts/aztecrune/decoder.d.ts +56 -0
  100. package/src/ts/aztecrune/detector.d.ts +53 -0
  101. package/src/ts/aztecrune/encoder.d.ts +51 -0
  102. package/src/ts/aztecrune/index.d.ts +35 -0
  103. package/src/ts/aztecrune/tables.d.ts +75 -0
  104. package/src/ts/bundle/sythos-barcode.d.ts +31 -0
  105. package/src/ts/bundle/sythos-barcode.esm.d.ts +31 -0
  106. package/src/ts/compactpdf417/decoder.d.ts +64 -0
  107. package/src/ts/compactpdf417/detector.d.ts +48 -0
  108. package/src/ts/compactpdf417/encoder.d.ts +49 -0
  109. package/src/ts/compactpdf417/index.d.ts +8 -0
  110. package/src/ts/compactpdf417/tables.d.ts +84 -0
  111. package/src/ts/core/bit-buffer.d.ts +78 -0
  112. package/src/ts/core/bit-matrix.d.ts +129 -0
  113. package/src/ts/core/errors.d.ts +57 -0
  114. package/src/ts/core/galois-field.d.ts +141 -0
  115. package/src/ts/core/index.d.ts +40 -0
  116. package/src/ts/core/reed-solomon.d.ts +65 -0
  117. package/src/ts/databar/codec.d.ts +78 -0
  118. package/src/ts/databar/decoder.d.ts +55 -0
  119. package/src/ts/databar/encoder.d.ts +34 -0
  120. package/src/ts/databar/gs1.d.ts +48 -0
  121. package/src/ts/databar/index.d.ts +37 -0
  122. package/src/ts/databar/patterns.d.ts +46 -0
  123. package/src/ts/databar/tables.d.ts +119 -0
  124. package/src/ts/datamatrix/decoder.d.ts +57 -0
  125. package/src/ts/datamatrix/detector.d.ts +59 -0
  126. package/src/ts/datamatrix/encoder.d.ts +36 -0
  127. package/src/ts/datamatrix/index.d.ts +35 -0
  128. package/src/ts/datamatrix/tables.d.ts +88 -0
  129. package/src/ts/frameqr/decoder.d.ts +64 -0
  130. package/src/ts/frameqr/detector.d.ts +96 -0
  131. package/src/ts/frameqr/encoder.d.ts +73 -0
  132. package/src/ts/frameqr/index.d.ts +34 -0
  133. package/src/ts/frameqr/tables.d.ts +123 -0
  134. package/src/ts/image/binarizer.d.ts +85 -0
  135. package/src/ts/image/grid-sampler.d.ts +82 -0
  136. package/src/{image/index.js → ts/image/index.d.ts} +0 -2
  137. package/src/ts/image/luminance.d.ts +112 -0
  138. package/src/ts/image/perspective.d.ts +111 -0
  139. package/src/ts/index.d.ts +363 -0
  140. package/src/ts/micropdf417/compaction.d.ts +38 -0
  141. package/src/ts/micropdf417/decoder.d.ts +57 -0
  142. package/src/ts/micropdf417/detector.d.ts +95 -0
  143. package/src/ts/micropdf417/encoder.d.ts +34 -0
  144. package/src/ts/micropdf417/error-correction.d.ts +38 -0
  145. package/src/ts/micropdf417/index.d.ts +36 -0
  146. package/src/ts/micropdf417/tables.d.ts +73 -0
  147. package/src/ts/microqr/decoder.d.ts +49 -0
  148. package/src/ts/microqr/detector.d.ts +96 -0
  149. package/src/ts/microqr/encoder.d.ts +33 -0
  150. package/src/{microqr/index.js → ts/microqr/index.d.ts} +0 -2
  151. package/src/ts/microqr/tables.d.ts +107 -0
  152. package/src/ts/oned/addons.d.ts +181 -0
  153. package/src/ts/oned/index.d.ts +55 -0
  154. package/src/ts/oned/patterns.d.ts +259 -0
  155. package/src/ts/oned/reader.d.ts +129 -0
  156. package/src/ts/oned/writers.d.ts +218 -0
  157. package/src/ts/pdf417/compaction.d.ts +59 -0
  158. package/src/ts/pdf417/decoder.d.ts +48 -0
  159. package/src/ts/pdf417/detector.d.ts +73 -0
  160. package/src/ts/pdf417/encoder.d.ts +32 -0
  161. package/src/ts/pdf417/error-correction.d.ts +34 -0
  162. package/src/{pdf417/index.js → ts/pdf417/index.d.ts} +0 -1
  163. package/src/ts/pdf417/tables.d.ts +53 -0
  164. package/src/ts/qr/decoder.d.ts +79 -0
  165. package/src/ts/qr/detector.d.ts +93 -0
  166. package/src/ts/qr/encoder.d.ts +166 -0
  167. package/src/{qr/index.js → ts/qr/index.d.ts} +0 -2
  168. package/src/ts/qr/tables.d.ts +291 -0
  169. package/src/ts/render/image-data.d.ts +58 -0
  170. package/src/ts/render/index.d.ts +110 -0
  171. package/src/ts/render/options.d.ts +98 -0
  172. package/src/ts/render/png.d.ts +58 -0
  173. package/src/ts/render/svg.d.ts +46 -0
  174. package/src/ts/render/webgl.d.ts +45 -0
  175. package/src/ts/render/webgpu.d.ts +51 -0
  176. package/src/ts/rmqr/decoder.d.ts +42 -0
  177. package/src/ts/rmqr/detector.d.ts +81 -0
  178. package/src/ts/rmqr/encoder.d.ts +45 -0
  179. package/src/ts/rmqr/index.d.ts +34 -0
  180. package/src/ts/rmqr/tables.d.ts +89 -0
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -1,8 +1,3 @@
1
- /*!
2
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
3
- * SPDX-License-Identifier: MIT
4
- */
5
-
6
1
  /* Compact PDF417 public module exports. */
7
2
 
8
3
  export {
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -4,7 +4,6 @@
4
4
  * MIT License
5
5
  *
6
6
  * Copyright (c) 2026 Sythos
7
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
8
7
  *
9
8
  * Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
  * of this software and associated documentation files (the "Software"), to deal
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -4,7 +4,6 @@
4
4
  * MIT License
5
5
  *
6
6
  * Copyright (c) 2026 Sythos
7
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
8
7
  *
9
8
  * Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
  * of this software and associated documentation files (the "Software"), to deal
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -4,7 +4,6 @@
4
4
  * MIT License
5
5
  *
6
6
  * Copyright (c) 2026 Sythos
7
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
8
7
  *
9
8
  * Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
  * of this software and associated documentation files (the "Software"), to deal
@@ -30,7 +29,7 @@
30
29
  */
31
30
 
32
31
  /**
33
- * Decoder for FrameQR Code.
32
+ * Decoder for the Sythos Canvas QR profile.
34
33
  *
35
34
  * This is intentionally not a DENSO FrameQR decoder. The profile is a QR
36
35
  * symbol with a bounded artwork reservation and an explicit `frameqr` marker.
@@ -88,7 +87,7 @@ function isExpectedProfile(profile) {
88
87
  * @returns {{canvas: object, damage: object}}
89
88
  */
90
89
  function validateCanvas(symbolSize, version, canvas) {
91
- if (!isObject(canvas)) throw new FormatError('FrameQR Code: canvas metadata is missing');
90
+ if (!isObject(canvas)) throw new FormatError('Sythos Canvas QR: canvas metadata is missing');
92
91
 
93
92
  let normalized;
94
93
  try {
@@ -104,14 +103,14 @@ function validateCanvas(symbolSize, version, canvas) {
104
103
  }
105
104
  } catch (error) {
106
105
  if (error instanceof FormatError) throw error;
107
- throw new FormatError(`FrameQR Code: invalid canvas metadata: ${error.message}`);
106
+ throw new FormatError(`Sythos Canvas QR: invalid canvas metadata: ${error.message}`);
108
107
  }
109
108
 
110
109
  let damage;
111
110
  try {
112
111
  damage = analyzeCanvasDamage(version, normalized);
113
112
  } catch (error) {
114
- throw new FormatError(`FrameQR Code: cannot analyse canvas damage: ${error.message}`);
113
+ throw new FormatError(`Sythos Canvas QR: cannot analyse canvas damage: ${error.message}`);
115
114
  }
116
115
  return { canvas: normalized, damage };
117
116
  }
@@ -136,24 +135,24 @@ function resolveProfile(matrix, options) {
136
135
  const markerId = isObject(markerProfile) ? markerProfile.id : markerProfile;
137
136
  const suppliedId = isObject(suppliedProfile) ? suppliedProfile.id : suppliedProfile;
138
137
  if (markerId !== suppliedId) {
139
- throw new FormatError('FrameQR Code: matrix and requested profile markers disagree');
138
+ throw new FormatError('Sythos Canvas QR: matrix and requested profile markers disagree');
140
139
  }
141
140
  }
142
141
  const profile = markerProfile ?? suppliedProfile;
143
142
 
144
143
  if (!isExpectedProfile(profile)) {
145
144
  throw new FormatError(
146
- 'FrameQR Code: profile marker is missing or is not a FrameQR Code symbol'
145
+ 'Sythos Canvas QR: profile marker is missing or is not the Sythos Canvas QR profile'
147
146
  );
148
147
  }
149
148
  if (marker && marker.certified === true) {
150
149
  throw new FormatError(
151
- 'FrameQR Code: certified FrameQR input is not supported by this profile decoder'
150
+ 'Sythos Canvas QR: certified FrameQR input is not supported by this profile decoder'
152
151
  );
153
152
  }
154
153
  if (!marker && !options.allowUnmarked) {
155
154
  throw new FormatError(
156
- 'FrameQR Code: unmarked QR matrix rejected; provide a verified profile marker'
155
+ 'Sythos Canvas QR: unmarked QR matrix rejected; provide a verified profile marker'
157
156
  );
158
157
  }
159
158
 
@@ -161,7 +160,7 @@ function resolveProfile(matrix, options) {
161
160
  const canvas = options.canvas ?? markerCanvas;
162
161
  const version = (matrix.width - 17) / 4;
163
162
  if (!Number.isInteger(version) || version < 1 || version > 40) {
164
- throw new FormatError(`FrameQR Code: invalid QR symbol size ${matrix.width}`);
163
+ throw new FormatError(`Sythos Canvas QR: invalid QR symbol size ${matrix.width}`);
165
164
  }
166
165
  const checked = validateCanvas(matrix.width, version, canvas);
167
166
  if (markerCanvas && options.canvas) {
@@ -169,11 +168,11 @@ function resolveProfile(matrix, options) {
169
168
  try {
170
169
  marked = normalizeCanvasSpec(matrix.width, markerCanvas);
171
170
  } catch (error) {
172
- throw new FormatError(`FrameQR Code: invalid marker canvas: ${error.message}`);
171
+ throw new FormatError(`Sythos Canvas QR: invalid marker canvas: ${error.message}`);
173
172
  }
174
173
  const fields = ['shape', 'centerX', 'centerY', 'width', 'height', 'angle'];
175
174
  if (fields.some((field) => marked[field] !== checked.canvas[field])) {
176
- throw new FormatError('FrameQR Code: matrix and requested canvas metadata disagree');
175
+ throw new FormatError('Sythos Canvas QR: matrix and requested canvas metadata disagree');
177
176
  }
178
177
  }
179
178
  return {
@@ -185,7 +184,7 @@ function resolveProfile(matrix, options) {
185
184
  }
186
185
 
187
186
  /**
188
- * Decode a FrameQR Code matrix.
187
+ * Decode a Sythos Canvas QR matrix.
189
188
  *
190
189
  * @param {import('../core/bit-matrix.js').BitMatrix} matrix
191
190
  * Square QR modules, normally returned by `encodeFrameQR` or a FrameQR
@@ -205,11 +204,11 @@ function resolveProfile(matrix, options) {
205
204
  */
206
205
  export function decodeFrameQR(matrix, options = {}) {
207
206
  if (!matrix || !Number.isInteger(matrix.width) || !Number.isInteger(matrix.height)) {
208
- throw new FormatError('FrameQR Code: no matrix supplied');
207
+ throw new FormatError('Sythos Canvas QR: no matrix supplied');
209
208
  }
210
209
  if (matrix.width !== matrix.height) {
211
210
  throw new FormatError(
212
- `FrameQR Code: symbol must be square, got ${matrix.width}x${matrix.height}`
211
+ `Sythos Canvas QR: symbol must be square, got ${matrix.width}x${matrix.height}`
213
212
  );
214
213
  }
215
214
 
@@ -221,7 +220,7 @@ export function decodeFrameQR(matrix, options = {}) {
221
220
  // Preserve the original QR/RS error when possible, but give callers a
222
221
  // profile-specific context without exposing implementation details.
223
222
  if (error instanceof FormatError) {
224
- throw new FormatError(`FrameQR Code: payload is not recoverable: ${error.message}`);
223
+ throw new FormatError(`Sythos Canvas QR: payload is not recoverable: ${error.message}`);
225
224
  }
226
225
  throw error;
227
226
  }
@@ -4,7 +4,6 @@
4
4
  * MIT License
5
5
  *
6
6
  * Copyright (c) 2026 Sythos
7
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
8
7
  *
9
8
  * Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
  * of this software and associated documentation files (the "Software"), to deal
@@ -30,7 +29,7 @@
30
29
  */
31
30
 
32
31
  /**
33
- * Detector for the non-certified FrameQR Code profile.
32
+ * Detector for the non-certified Sythos Canvas QR profile.
34
33
  *
35
34
  * The profile deliberately reuses QR Model 2 geometry. Finder localisation and
36
35
  * projective sampling therefore use the QR detector; the additional profile
@@ -99,7 +98,7 @@ function sameCandidate(left, right) {
99
98
  }
100
99
 
101
100
  /**
102
- * Detect FrameQR Code symbols in a binarized raster.
101
+ * Detect Sythos Canvas QR symbols in a binarized raster.
103
102
  *
104
103
  * @param {import('../core/bit-matrix.js').BitMatrix} binaryImage Set bit = dark.
105
104
  * @param {object} [options]
@@ -4,7 +4,6 @@
4
4
  * MIT License
5
5
  *
6
6
  * Copyright (c) 2026 Sythos
7
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
8
7
  *
9
8
  * Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
  * of this software and associated documentation files (the "Software"), to deal
@@ -30,7 +29,7 @@
30
29
  */
31
30
 
32
31
  /**
33
- * FrameQR Code encoder.
32
+ * Sythos Canvas QR profile encoder.
34
33
  *
35
34
  * This encoder deliberately builds on this project's QR Code implementation
36
35
  * and then removes a conservatively bounded set of data modules for artwork.
@@ -69,7 +68,7 @@ function clearCanvas(matrix, modules) {
69
68
 
70
69
  /**
71
70
  * Encode a QR Code with a conservative artwork canvas according to the
72
- * non-certified FrameQR Code profile.
71
+ * non-certified Sythos Canvas QR profile.
73
72
  *
74
73
  * The profile forces QR H error correction and rejects a canvas whenever its
75
74
  * known codeword damage exceeds the per-block correction budget. When a
@@ -85,10 +84,10 @@ function clearCanvas(matrix, modules) {
85
84
  */
86
85
  export function encodeFrameQR(text, options = {}) {
87
86
  if (typeof text !== 'string') {
88
- throw new EncodeError('FrameQR Code: text must be a string');
87
+ throw new EncodeError('Sythos Canvas QR: text must be a string');
89
88
  }
90
89
  if (options.ecc !== undefined && options.ecc !== 'H') {
91
- throw new EncodeError('FrameQR Code: ecc is fixed to H for this profile');
90
+ throw new EncodeError('Sythos Canvas QR: ecc is fixed to H for this profile');
92
91
  }
93
92
 
94
93
  const qrOptions = {
@@ -124,7 +123,7 @@ export function encodeFrameQR(text, options = {}) {
124
123
  analysis = validateCanvasSpec(versionFor(matrix), canvas);
125
124
  } catch (error) {
126
125
  if (error instanceof EncodeError) throw error;
127
- throw new EncodeError(`FrameQR Code: invalid canvas: ${error.message}`);
126
+ throw new EncodeError(`Sythos Canvas QR: invalid canvas: ${error.message}`);
128
127
  }
129
128
  if (!analysis.safe) {
130
129
  unsafeAnalysis = analysis;
@@ -137,13 +136,13 @@ export function encodeFrameQR(text, options = {}) {
137
136
  if (!selected) {
138
137
  if (unsafeAnalysis) {
139
138
  throw new EncodeError(
140
- 'FrameQR Code: canvas is not safe for the selected QR version; ' +
139
+ 'Sythos Canvas QR: canvas is not safe for the selected QR version; ' +
141
140
  `it touches ${unsafeAnalysis.touchedCodewordCount} codewords and has ` +
142
141
  `a per-block correction budget of ${unsafeAnalysis.correctionBudgetPerBlock}`
143
142
  );
144
143
  }
145
144
  if (capacityError) throw capacityError;
146
- throw new EncodeError('FrameQR Code: unable to select a QR version');
145
+ throw new EncodeError('Sythos Canvas QR: unable to select a QR version');
147
146
  }
148
147
 
149
148
  const { matrix, canvas } = selected;
@@ -4,7 +4,6 @@
4
4
  * MIT License
5
5
  *
6
6
  * Copyright (c) 2026 Sythos
7
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
8
7
  *
9
8
  * Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
  * of this software and associated documentation files (the "Software"), to deal
@@ -4,7 +4,6 @@
4
4
  * MIT License
5
5
  *
6
6
  * Copyright (c) 2026 Sythos
7
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
8
7
  *
9
8
  * Permission is hereby granted, free of charge, to any person obtaining a copy
10
9
  * of this software and associated documentation files (the "Software"), to deal
@@ -30,7 +29,7 @@
30
29
  */
31
30
 
32
31
  /**
33
- * Structural contract for FrameQR Code.
32
+ * Structural contract for the Sythos Canvas QR profile.
34
33
  *
35
34
  * DENSO WAVE's public material describes FrameQR(R) as a proprietary symbol
36
35
  * with a freely shaped canvas, dedicated generation/reading software and no
@@ -42,7 +41,7 @@
42
41
  * symbol at level H and clears a bounded group of data modules. Its worst-case
43
42
  * damage is calculated per Reed-Solomon block and must remain within the
44
43
  * standard QR correction radius. Function modules are never canvas modules.
45
- * This provides a deterministic, independently testable FrameQR Code profile, but
44
+ * This provides a deterministic, independently testable canvas QR profile, but
46
45
  * it is explicitly non-certified and not a substitute for proprietary FrameQR
47
46
  * generation or validation software.
48
47
  *
@@ -59,7 +58,7 @@ import {
59
58
  /** Public identity and compatibility boundary of the implementable profile. */
60
59
  export const FRAMEQR_PROFILE = Object.freeze({
61
60
  id: 'sythos-canvas-qr/1',
62
- name: 'FrameQR Code',
61
+ name: 'Sythos Canvas QR profile',
63
62
  certified: false,
64
63
  densoFrameQrCompatible: false,
65
64
  baseSymbology: 'QR Code Model 2',
@@ -78,7 +77,7 @@ function oddAtMost(value, maximum) {
78
77
 
79
78
  function assertSymbolSize(symbolSize) {
80
79
  if (!Number.isInteger(symbolSize) || symbolSize < 21 || symbolSize > 177 || (symbolSize - 17) % 4 !== 0) {
81
- throw new RangeError(`FrameQR Code: ${symbolSize} is not a QR Model 2 symbol size`);
80
+ throw new RangeError(`Frame QR profile: ${symbolSize} is not a QR Model 2 symbol size`);
82
81
  }
83
82
  }
84
83
 
@@ -96,12 +95,12 @@ function assertSymbolSize(symbolSize) {
96
95
  export function normalizeCanvasSpec(symbolSize, canvas = {}) {
97
96
  assertSymbolSize(symbolSize);
98
97
  if (canvas === null || typeof canvas !== 'object' || Array.isArray(canvas)) {
99
- throw new TypeError('FrameQR Code: canvas must be an object');
98
+ throw new TypeError('Frame QR profile: canvas must be an object');
100
99
  }
101
100
 
102
101
  const shape = String(canvas.shape ?? 'square').toLowerCase();
103
102
  if (!FRAMEQR_CANVAS_SHAPES.includes(shape)) {
104
- throw new RangeError(`FrameQR Code: unsupported canvas shape "${shape}"`);
103
+ throw new RangeError(`Frame QR profile: unsupported canvas shape "${shape}"`);
105
104
  }
106
105
 
107
106
  const defaultSize = oddAtMost(Math.max(3, Math.round(symbolSize * 0.17)), symbolSize - 16);
@@ -112,7 +111,7 @@ export function normalizeCanvasSpec(symbolSize, canvas = {}) {
112
111
  for (const [name, value] of [['width', requestedWidth], ['height', requestedHeight]]) {
113
112
  if (!Number.isFinite(Number(value)) || Number(value) < 1 || Number(value) > maximumDimension) {
114
113
  throw new RangeError(
115
- `FrameQR Code: canvas ${name} must be between 1 and ${maximumDimension} modules`
114
+ `Frame QR profile: canvas ${name} must be between 1 and ${maximumDimension} modules`
116
115
  );
117
116
  }
118
117
  }
@@ -123,10 +122,10 @@ export function normalizeCanvasSpec(symbolSize, canvas = {}) {
123
122
  const angle = ((Number(canvas.angle ?? 0) % 360) + 360) % 360;
124
123
 
125
124
  if (![0, 90, 180, 270].includes(angle)) {
126
- throw new RangeError('FrameQR Code: angle must be 0, 90, 180 or 270 degrees');
125
+ throw new RangeError('Frame QR profile: angle must be 0, 90, 180 or 270 degrees');
127
126
  }
128
127
  if (centerX < 8 || centerY < 8 || centerX >= symbolSize - 8 || centerY >= symbolSize - 8) {
129
- throw new RangeError('FrameQR Code: canvas centre must remain inside the finder-pattern boundary');
128
+ throw new RangeError('Frame QR profile: canvas centre must remain inside the finder-pattern boundary');
130
129
  }
131
130
 
132
131
  return { shape, centerX, centerY, width, height, angle };
@@ -197,7 +196,7 @@ function codewordBlockMap(layout) {
197
196
  */
198
197
  export function analyzeCanvasDamage(version, canvas = {}) {
199
198
  if (!Number.isInteger(version) || version < 1 || version > 40) {
200
- throw new RangeError(`FrameQR Code: version must be an integer 1-40, got ${version}`);
199
+ throw new RangeError(`Frame QR profile: version must be an integer 1-40, got ${version}`);
201
200
  }
202
201
  const symbolSize = versionSize(version);
203
202
  const spec = normalizeCanvasSpec(symbolSize, canvas);
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -0,0 +1,40 @@
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-License-Identifier: MIT
27
+ *
28
+ * Original work. No code from any other barcode implementation.
29
+ */
30
+
31
+ /**
32
+ * Image pipeline, re-exported.
33
+ *
34
+ * @module image
35
+ */
36
+
37
+ export { LuminanceSource } from './luminance.js';
38
+ export { binarize, binarizeGlobal, binarizeHybrid } from './binarizer.js';
39
+ export { PerspectiveTransform } from './perspective.js';
40
+ export { sampleGrid, sampleGridVoting, sampleQuad } from './grid-sampler.js';
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.
@@ -23,7 +23,6 @@
23
23
  * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
24
24
  * SOFTWARE.
25
25
  *
26
- * SPDX-FileCopyrightText: 2026 Sythos (https://www.sythos.net)
27
26
  * SPDX-License-Identifier: MIT
28
27
  *
29
28
  * Original work. No code from any other barcode implementation.