@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.
Files changed (267) hide show
  1. package/LICENSE +5 -4
  2. package/NOTICE.md +2 -2
  3. package/README.md +50 -37
  4. package/bundle/sythos-barcode.esm.js +12051 -11484
  5. package/bundle/sythos-barcode.js +12051 -11484
  6. package/package.json +52 -45
  7. package/src/index.d.ts +363 -0
  8. package/src/index.js +573 -428
  9. package/src/js/aztec/decoder.js +326 -0
  10. package/src/js/aztec/detector.js +251 -0
  11. package/src/js/aztec/encoder.js +276 -0
  12. package/src/js/aztec/high-level.js +216 -0
  13. package/src/js/aztec/index.js +34 -0
  14. package/src/js/aztec/tables.js +196 -0
  15. package/src/js/aztecrune/decoder.js +146 -0
  16. package/src/js/aztecrune/detector.js +180 -0
  17. package/src/js/aztecrune/encoder.js +103 -0
  18. package/src/js/aztecrune/index.js +34 -0
  19. package/src/js/aztecrune/tables.js +142 -0
  20. package/src/js/compactpdf417/decoder.js +123 -0
  21. package/src/js/compactpdf417/detector.js +138 -0
  22. package/src/js/compactpdf417/encoder.js +127 -0
  23. package/src/js/compactpdf417/index.js +5 -0
  24. package/src/js/compactpdf417/tables.js +164 -0
  25. package/src/js/core/bit-buffer.js +158 -0
  26. package/src/js/core/bit-matrix.js +243 -0
  27. package/src/js/core/errors.js +59 -0
  28. package/src/js/core/galois-field.js +193 -0
  29. package/src/js/core/index.js +39 -0
  30. package/src/js/core/reed-solomon.js +318 -0
  31. package/src/js/databar/codec.js +166 -0
  32. package/src/js/databar/decoder.js +224 -0
  33. package/src/js/databar/encoder.js +88 -0
  34. package/src/js/databar/gs1.js +176 -0
  35. package/src/js/databar/index.js +36 -0
  36. package/src/js/databar/patterns.js +139 -0
  37. package/src/js/databar/tables.js +123 -0
  38. package/src/js/datamatrix/decoder.js +296 -0
  39. package/src/js/datamatrix/detector.js +254 -0
  40. package/src/js/datamatrix/encoder.js +250 -0
  41. package/src/js/datamatrix/index.js +34 -0
  42. package/src/js/datamatrix/tables.js +122 -0
  43. package/src/js/frameqr/decoder.js +216 -0
  44. package/src/js/frameqr/detector.js +199 -0
  45. package/src/js/frameqr/encoder.js +143 -0
  46. package/src/js/frameqr/index.js +33 -0
  47. package/src/js/frameqr/tables.js +252 -0
  48. package/src/js/image/binarizer.js +254 -0
  49. package/src/js/image/grid-sampler.js +148 -0
  50. package/src/js/image/index.js +38 -0
  51. package/src/js/image/luminance.js +185 -0
  52. package/src/js/image/perspective.js +158 -0
  53. package/src/js/micropdf417/compaction.js +115 -0
  54. package/src/js/micropdf417/decoder.js +180 -0
  55. package/src/js/micropdf417/detector.js +152 -0
  56. package/src/js/micropdf417/encoder.js +184 -0
  57. package/src/js/micropdf417/error-correction.js +50 -0
  58. package/src/js/micropdf417/index.js +35 -0
  59. package/src/js/micropdf417/tables.js +197 -0
  60. package/src/js/microqr/decoder.js +240 -0
  61. package/src/js/microqr/detector.js +339 -0
  62. package/src/js/microqr/encoder.js +314 -0
  63. package/src/js/microqr/index.js +34 -0
  64. package/src/js/microqr/tables.js +324 -0
  65. package/src/js/oned/addons.js +396 -0
  66. package/src/js/oned/index.js +75 -0
  67. package/src/js/oned/patterns.js +365 -0
  68. package/src/js/oned/reader.js +1383 -0
  69. package/src/js/oned/writers.js +691 -0
  70. package/src/js/pdf417/compaction.js +391 -0
  71. package/src/js/pdf417/decoder.js +110 -0
  72. package/src/js/pdf417/detector.js +484 -0
  73. package/src/js/pdf417/encoder.js +102 -0
  74. package/src/js/pdf417/error-correction.js +44 -0
  75. package/src/{pdf417 → js/pdf417}/index.js +0 -5
  76. package/src/js/pdf417/tables.js +315 -0
  77. package/src/js/qr/decoder.js +539 -0
  78. package/src/js/qr/detector.js +613 -0
  79. package/src/js/qr/encoder.js +873 -0
  80. package/src/js/qr/index.js +42 -0
  81. package/src/js/qr/tables.js +690 -0
  82. package/src/js/render/image-data.js +120 -0
  83. package/src/js/render/index.js +128 -0
  84. package/src/js/render/options.js +152 -0
  85. package/src/js/render/png.js +270 -0
  86. package/src/js/render/svg.js +117 -0
  87. package/src/js/render/webgl.js +200 -0
  88. package/src/js/render/webgpu.js +357 -0
  89. package/src/js/rmqr/decoder.js +209 -0
  90. package/src/js/rmqr/detector.js +122 -0
  91. package/src/js/rmqr/encoder.js +321 -0
  92. package/src/js/rmqr/index.js +33 -0
  93. package/src/js/rmqr/tables.js +177 -0
  94. package/src/{aztec/decoder.js → ts/aztec/decoder.ts} +0 -1
  95. package/{typings → src/ts}/aztec/detector.d.ts +2 -2
  96. package/src/{aztec/detector.js → ts/aztec/detector.ts} +0 -1
  97. package/src/{aztec/encoder.js → ts/aztec/encoder.ts} +0 -1
  98. package/src/{aztec/high-level.js → ts/aztec/high-level.ts} +0 -1
  99. package/src/{aztec/index.js → ts/aztec/index.ts} +0 -1
  100. package/src/{aztec/tables.js → ts/aztec/tables.ts} +0 -1
  101. package/src/{aztecrune/decoder.js → ts/aztecrune/decoder.ts} +0 -1
  102. package/src/{aztecrune/detector.js → ts/aztecrune/detector.ts} +0 -1
  103. package/src/{aztecrune/encoder.js → ts/aztecrune/encoder.ts} +0 -1
  104. package/src/{aztecrune/index.js → ts/aztecrune/index.ts} +0 -1
  105. package/src/{aztecrune/tables.js → ts/aztecrune/tables.ts} +0 -1
  106. package/src/{compactpdf417/decoder.js → ts/compactpdf417/decoder.ts} +0 -1
  107. package/src/{compactpdf417/detector.js → ts/compactpdf417/detector.ts} +0 -1
  108. package/src/{compactpdf417/encoder.js → ts/compactpdf417/encoder.ts} +0 -1
  109. package/src/{compactpdf417/index.js → ts/compactpdf417/index.ts} +0 -5
  110. package/src/{compactpdf417/tables.js → ts/compactpdf417/tables.ts} +0 -1
  111. package/src/{core/bit-buffer.js → ts/core/bit-buffer.ts} +0 -1
  112. package/src/{core/bit-matrix.js → ts/core/bit-matrix.ts} +0 -1
  113. package/src/{core/errors.js → ts/core/errors.ts} +0 -1
  114. package/src/{core/galois-field.js → ts/core/galois-field.ts} +0 -1
  115. package/src/{core/index.js → ts/core/index.ts} +0 -1
  116. package/src/{core/reed-solomon.js → ts/core/reed-solomon.ts} +0 -1
  117. package/src/{databar/codec.js → ts/databar/codec.ts} +0 -1
  118. package/src/{databar/decoder.js → ts/databar/decoder.ts} +0 -1
  119. package/src/{databar/encoder.js → ts/databar/encoder.ts} +0 -1
  120. package/src/{databar/gs1.js → ts/databar/gs1.ts} +0 -1
  121. package/src/{databar/index.js → ts/databar/index.ts} +0 -1
  122. package/src/{databar/patterns.js → ts/databar/patterns.ts} +0 -1
  123. package/src/{databar/tables.js → ts/databar/tables.ts} +0 -1
  124. package/src/{datamatrix/decoder.js → ts/datamatrix/decoder.ts} +0 -1
  125. package/{typings → src/ts}/datamatrix/detector.d.ts +2 -2
  126. package/src/{datamatrix/detector.js → ts/datamatrix/detector.ts} +0 -1
  127. package/src/{datamatrix/encoder.js → ts/datamatrix/encoder.ts} +0 -1
  128. package/src/{datamatrix/index.js → ts/datamatrix/index.ts} +0 -1
  129. package/src/{datamatrix/tables.js → ts/datamatrix/tables.ts} +0 -1
  130. package/src/{frameqr/decoder.js → ts/frameqr/decoder.ts} +15 -16
  131. package/src/{frameqr/detector.js → ts/frameqr/detector.ts} +2 -3
  132. package/src/{frameqr/encoder.js → ts/frameqr/encoder.ts} +7 -8
  133. package/src/{frameqr/index.js → ts/frameqr/index.ts} +0 -1
  134. package/src/{frameqr/tables.js → ts/frameqr/tables.ts} +10 -11
  135. package/src/{image/binarizer.js → ts/image/binarizer.ts} +0 -1
  136. package/src/{image/grid-sampler.js → ts/image/grid-sampler.ts} +0 -1
  137. package/src/{image/index.js → ts/image/index.ts} +0 -1
  138. package/src/{image/luminance.js → ts/image/luminance.ts} +0 -1
  139. package/src/{image/perspective.js → ts/image/perspective.ts} +0 -1
  140. package/{typings → src/ts}/index.d.ts +3 -3
  141. package/src/ts/index.ts +790 -0
  142. package/src/{micropdf417/compaction.js → ts/micropdf417/compaction.ts} +0 -1
  143. package/src/{micropdf417/decoder.js → ts/micropdf417/decoder.ts} +0 -1
  144. package/src/{micropdf417/detector.js → ts/micropdf417/detector.ts} +0 -1
  145. package/src/{micropdf417/encoder.js → ts/micropdf417/encoder.ts} +0 -1
  146. package/src/{micropdf417/error-correction.js → ts/micropdf417/error-correction.ts} +0 -1
  147. package/src/{micropdf417/index.js → ts/micropdf417/index.ts} +0 -1
  148. package/src/{micropdf417/tables.js → ts/micropdf417/tables.ts} +0 -1
  149. package/src/{microqr/decoder.js → ts/microqr/decoder.ts} +0 -1
  150. package/src/{microqr/detector.js → ts/microqr/detector.ts} +0 -1
  151. package/src/{microqr/encoder.js → ts/microqr/encoder.ts} +0 -1
  152. package/src/{microqr/index.js → ts/microqr/index.ts} +0 -1
  153. package/src/{microqr/tables.js → ts/microqr/tables.ts} +0 -1
  154. package/src/{oned/addons.js → ts/oned/addons.ts} +0 -1
  155. package/src/{oned/index.js → ts/oned/index.ts} +0 -1
  156. package/src/{oned/patterns.js → ts/oned/patterns.ts} +0 -1
  157. package/src/{oned/reader.js → ts/oned/reader.ts} +0 -1
  158. package/src/{oned/writers.js → ts/oned/writers.ts} +0 -1
  159. package/src/{pdf417/compaction.js → ts/pdf417/compaction.ts} +0 -1
  160. package/src/{pdf417/decoder.js → ts/pdf417/decoder.ts} +0 -1
  161. package/src/{pdf417/detector.js → ts/pdf417/detector.ts} +0 -1
  162. package/src/{pdf417/encoder.js → ts/pdf417/encoder.ts} +0 -1
  163. package/src/{pdf417/error-correction.js → ts/pdf417/error-correction.ts} +0 -1
  164. package/src/ts/pdf417/index.ts +6 -0
  165. package/src/{pdf417/tables.js → ts/pdf417/tables.ts} +0 -1
  166. package/src/{qr/decoder.js → ts/qr/decoder.ts} +0 -1
  167. package/src/{qr/detector.js → ts/qr/detector.ts} +0 -1
  168. package/src/{qr/encoder.js → ts/qr/encoder.ts} +0 -1
  169. package/src/{qr/index.js → ts/qr/index.ts} +0 -1
  170. package/src/{qr/tables.js → ts/qr/tables.ts} +0 -1
  171. package/src/{render/image-data.js → ts/render/image-data.ts} +0 -1
  172. package/src/{render/index.js → ts/render/index.ts} +0 -1
  173. package/src/{render/options.js → ts/render/options.ts} +0 -1
  174. package/src/{render/png.js → ts/render/png.ts} +0 -1
  175. package/src/{render/svg.js → ts/render/svg.ts} +0 -1
  176. package/src/{render/webgl.js → ts/render/webgl.ts} +0 -1
  177. package/src/{render/webgpu.js → ts/render/webgpu.ts} +0 -1
  178. package/src/{rmqr/decoder.js → ts/rmqr/decoder.ts} +0 -1
  179. package/src/{rmqr/detector.js → ts/rmqr/detector.ts} +0 -1
  180. package/src/{rmqr/encoder.js → ts/rmqr/encoder.ts} +0 -1
  181. package/src/{rmqr/index.js → ts/rmqr/index.ts} +0 -1
  182. package/src/{rmqr/tables.js → ts/rmqr/tables.ts} +0 -1
  183. /package/{typings → src/ts}/aztec/decoder.d.ts +0 -0
  184. /package/{typings → src/ts}/aztec/encoder.d.ts +0 -0
  185. /package/{typings → src/ts}/aztec/high-level.d.ts +0 -0
  186. /package/{typings → src/ts}/aztec/index.d.ts +0 -0
  187. /package/{typings → src/ts}/aztec/tables.d.ts +0 -0
  188. /package/{typings → src/ts}/aztecrune/decoder.d.ts +0 -0
  189. /package/{typings → src/ts}/aztecrune/detector.d.ts +0 -0
  190. /package/{typings → src/ts}/aztecrune/encoder.d.ts +0 -0
  191. /package/{typings → src/ts}/aztecrune/index.d.ts +0 -0
  192. /package/{typings → src/ts}/aztecrune/tables.d.ts +0 -0
  193. /package/{typings → src/ts}/bundle/sythos-barcode.d.ts +0 -0
  194. /package/{typings → src/ts}/bundle/sythos-barcode.esm.d.ts +0 -0
  195. /package/{typings → src/ts}/compactpdf417/decoder.d.ts +0 -0
  196. /package/{typings → src/ts}/compactpdf417/detector.d.ts +0 -0
  197. /package/{typings → src/ts}/compactpdf417/encoder.d.ts +0 -0
  198. /package/{typings → src/ts}/compactpdf417/index.d.ts +0 -0
  199. /package/{typings → src/ts}/compactpdf417/tables.d.ts +0 -0
  200. /package/{typings → src/ts}/core/bit-buffer.d.ts +0 -0
  201. /package/{typings → src/ts}/core/bit-matrix.d.ts +0 -0
  202. /package/{typings → src/ts}/core/errors.d.ts +0 -0
  203. /package/{typings → src/ts}/core/galois-field.d.ts +0 -0
  204. /package/{typings → src/ts}/core/index.d.ts +0 -0
  205. /package/{typings → src/ts}/core/reed-solomon.d.ts +0 -0
  206. /package/{typings → src/ts}/databar/codec.d.ts +0 -0
  207. /package/{typings → src/ts}/databar/decoder.d.ts +0 -0
  208. /package/{typings → src/ts}/databar/encoder.d.ts +0 -0
  209. /package/{typings → src/ts}/databar/gs1.d.ts +0 -0
  210. /package/{typings → src/ts}/databar/index.d.ts +0 -0
  211. /package/{typings → src/ts}/databar/patterns.d.ts +0 -0
  212. /package/{typings → src/ts}/databar/tables.d.ts +0 -0
  213. /package/{typings → src/ts}/datamatrix/decoder.d.ts +0 -0
  214. /package/{typings → src/ts}/datamatrix/encoder.d.ts +0 -0
  215. /package/{typings → src/ts}/datamatrix/index.d.ts +0 -0
  216. /package/{typings → src/ts}/datamatrix/tables.d.ts +0 -0
  217. /package/{typings → src/ts}/frameqr/decoder.d.ts +0 -0
  218. /package/{typings → src/ts}/frameqr/detector.d.ts +0 -0
  219. /package/{typings → src/ts}/frameqr/encoder.d.ts +0 -0
  220. /package/{typings → src/ts}/frameqr/index.d.ts +0 -0
  221. /package/{typings → src/ts}/frameqr/tables.d.ts +0 -0
  222. /package/{typings → src/ts}/image/binarizer.d.ts +0 -0
  223. /package/{typings → src/ts}/image/grid-sampler.d.ts +0 -0
  224. /package/{typings → src/ts}/image/index.d.ts +0 -0
  225. /package/{typings → src/ts}/image/luminance.d.ts +0 -0
  226. /package/{typings → src/ts}/image/perspective.d.ts +0 -0
  227. /package/{typings → src/ts}/micropdf417/compaction.d.ts +0 -0
  228. /package/{typings → src/ts}/micropdf417/decoder.d.ts +0 -0
  229. /package/{typings → src/ts}/micropdf417/detector.d.ts +0 -0
  230. /package/{typings → src/ts}/micropdf417/encoder.d.ts +0 -0
  231. /package/{typings → src/ts}/micropdf417/error-correction.d.ts +0 -0
  232. /package/{typings → src/ts}/micropdf417/index.d.ts +0 -0
  233. /package/{typings → src/ts}/micropdf417/tables.d.ts +0 -0
  234. /package/{typings → src/ts}/microqr/decoder.d.ts +0 -0
  235. /package/{typings → src/ts}/microqr/detector.d.ts +0 -0
  236. /package/{typings → src/ts}/microqr/encoder.d.ts +0 -0
  237. /package/{typings → src/ts}/microqr/index.d.ts +0 -0
  238. /package/{typings → src/ts}/microqr/tables.d.ts +0 -0
  239. /package/{typings → src/ts}/oned/addons.d.ts +0 -0
  240. /package/{typings → src/ts}/oned/index.d.ts +0 -0
  241. /package/{typings → src/ts}/oned/patterns.d.ts +0 -0
  242. /package/{typings → src/ts}/oned/reader.d.ts +0 -0
  243. /package/{typings → src/ts}/oned/writers.d.ts +0 -0
  244. /package/{typings → src/ts}/pdf417/compaction.d.ts +0 -0
  245. /package/{typings → src/ts}/pdf417/decoder.d.ts +0 -0
  246. /package/{typings → src/ts}/pdf417/detector.d.ts +0 -0
  247. /package/{typings → src/ts}/pdf417/encoder.d.ts +0 -0
  248. /package/{typings → src/ts}/pdf417/error-correction.d.ts +0 -0
  249. /package/{typings → src/ts}/pdf417/index.d.ts +0 -0
  250. /package/{typings → src/ts}/pdf417/tables.d.ts +0 -0
  251. /package/{typings → src/ts}/qr/decoder.d.ts +0 -0
  252. /package/{typings → src/ts}/qr/detector.d.ts +0 -0
  253. /package/{typings → src/ts}/qr/encoder.d.ts +0 -0
  254. /package/{typings → src/ts}/qr/index.d.ts +0 -0
  255. /package/{typings → src/ts}/qr/tables.d.ts +0 -0
  256. /package/{typings → src/ts}/render/image-data.d.ts +0 -0
  257. /package/{typings → src/ts}/render/index.d.ts +0 -0
  258. /package/{typings → src/ts}/render/options.d.ts +0 -0
  259. /package/{typings → src/ts}/render/png.d.ts +0 -0
  260. /package/{typings → src/ts}/render/svg.d.ts +0 -0
  261. /package/{typings → src/ts}/render/webgl.d.ts +0 -0
  262. /package/{typings → src/ts}/render/webgpu.d.ts +0 -0
  263. /package/{typings → src/ts}/rmqr/decoder.d.ts +0 -0
  264. /package/{typings → src/ts}/rmqr/detector.d.ts +0 -0
  265. /package/{typings → src/ts}/rmqr/encoder.d.ts +0 -0
  266. /package/{typings → src/ts}/rmqr/index.d.ts +0 -0
  267. /package/{typings → src/ts}/rmqr/tables.d.ts +0 -0
@@ -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.
@@ -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.
@@ -248,7 +248,7 @@ export type DecodeResult = {
248
248
  /**
249
249
  * Camera-profile orientation in degrees.
250
250
  */
251
- rotation?: 0 | 90 | 180 | 270;
251
+ rotation?: 0 | 45 | 90 | 135 | 180 | 225 | 270 | 315;
252
252
  /**
253
253
  * Camera-profile validation evidence.
254
254
  */
@@ -310,7 +310,7 @@ export type DecodeResult = {
310
310
  * @property {{format:'ean2'|'ean5', text:string, parity:string, checksum?:number}} [addon] Attached EAN/UPC supplement.
311
311
  * @property {number} [confidence] Camera-profile confidence from 0 to 1.
312
312
  * @property {{x:number,y:number,width:number,height:number}} [bounds] Camera-profile bounds in the scanned orientation.
313
- * @property {0|90|180|270} [rotation] Camera-profile orientation in degrees.
313
+ * @property {0|45|90|135|180|225|270|315} [rotation] Camera-profile orientation in degrees.
314
314
  * @property {{quietZone:boolean,checksum:boolean|null,rows:number|null,consistency:number|null}} [quality] Camera-profile validation evidence.
315
315
  * @property {boolean} [gs1] Whether the physical symbol is classified as GS1.
316
316
  * @property {string} [symbologyIdentifier] GS1 symbology identifier.
@@ -360,4 +360,4 @@ export declare function decodeStrict(image: {
360
360
  height: number;
361
361
  }, options?: object): DecodeResult;
362
362
  /** Library version, matching package.json. */
363
- export declare const VERSION = "1.5.6";
363
+ export declare const VERSION = "1.5.9";