@sythos/js_barcode_universal 1.5.5 → 1.5.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -118,8 +118,8 @@ The `unpkg` and `jsdelivr` fields point at the IIFE bundle, so a CDN needs no in
118
118
 
119
119
  ```html
120
120
  <script src="https://unpkg.com/@sythos/js_barcode_universal"></script>
121
- <script src="https://unpkg.com/@sythos/js_barcode_universal@1.5.5"></script>
122
- <script src="https://cdn.jsdelivr.net/npm/@sythos/js_barcode_universal@1.5.5"></script>
121
+ <script src="https://unpkg.com/@sythos/js_barcode_universal@1.5.6"></script>
122
+ <script src="https://cdn.jsdelivr.net/npm/@sythos/js_barcode_universal@1.5.6"></script>
123
123
  ```
124
124
 
125
125
  Pin the version for anything you ship; the unpinned form resolves to `latest` and will move under
@@ -208,7 +208,8 @@ The profile requires a compatible quiet zone and the same complete 1D symbol on
208
208
  scan samples. It retries only the two quarter-turn orientations needed for 1D symbols when the
209
209
  native orientation has no validated read. Code 11 and MSI require a verified check digit in this
210
210
  profile; other formats retain their own structural and checksum validation. A frame without a
211
- validated barcode still returns `[]`.
211
+ validated barcode still returns `[]`. No partial, structurally inconsistent or low-confidence value is
212
+ emitted to the caller.
212
213
 
213
214
  Camera-profile 1D results add `confidence` (0–1), `bounds`, `rotation`, and
214
215
  `quality: { quietZone, checksum, rows, consistency }`. `bounds` is reported in the raster
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Sythos Barcode Suite v1.5.5
2
+ * Sythos Barcode Suite v1.5.6
3
3
  *
4
4
  * MIT License
5
5
  *
@@ -16987,7 +16987,7 @@ function decodeStrict(image, options) {
16987
16987
  }
16988
16988
 
16989
16989
  /** Library version, matching package.json. */
16990
- const VERSION = '1.5.5';
16990
+ const VERSION = '1.5.6';
16991
16991
 
16992
16992
  __exports.listFormats = listFormats;
16993
16993
  __exports.encode = encode;
@@ -1,5 +1,5 @@
1
1
  /*!
2
- * Sythos Barcode Suite v1.5.5
2
+ * Sythos Barcode Suite v1.5.6
3
3
  *
4
4
  * MIT License
5
5
  *
@@ -16988,7 +16988,7 @@ function decodeStrict(image, options) {
16988
16988
  }
16989
16989
 
16990
16990
  /** Library version, matching package.json. */
16991
- const VERSION = '1.5.5';
16991
+ const VERSION = '1.5.6';
16992
16992
 
16993
16993
  __exports.listFormats = listFormats;
16994
16994
  __exports.encode = encode;
@@ -180,12 +180,14 @@
180
180
  return true;
181
181
  }
182
182
 
183
- function scanCanvas(canvas) {
183
+ function scanCanvas(canvas, profile) {
184
184
  var ctx = canvas.getContext('2d', { willReadFrequently: true });
185
185
  if (!ctx || !canvas.width || !canvas.height) return [];
186
186
  var image = ctx.getImageData(0, 0, canvas.width, canvas.height);
187
187
  try {
188
- return B.decode(image, { tryHarder: true });
188
+ var options = { tryHarder: true };
189
+ if (profile) options.profile = profile;
190
+ return B.decode(image, options);
189
191
  } catch (e) {
190
192
  return [];
191
193
  }
@@ -325,7 +327,7 @@
325
327
  .drawImage(video, 0, 0, work.width, work.height);
326
328
 
327
329
  frames++;
328
- var hits = scanCanvas(work);
330
+ var hits = scanCanvas(work, 'camera');
329
331
  if (hits.length) {
330
332
  show(hits, 'camera');
331
333
  stopCamera();
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sythos/js_barcode_universal",
3
- "version": "1.5.5",
3
+ "version": "1.5.6",
4
4
  "description": "Read and write barcodes in JavaScript with zero runtime dependencies. QR Code, Micro QR, rMQR, FrameQR Code, Aztec Code and Rune, PDF417 variants, GS1 DataBar Omnidirectional/Truncated, EAN supplements and one-dimensional formats.",
5
5
  "author": {
6
6
  "name": "Sythos",
package/src/index.js CHANGED
@@ -634,4 +634,4 @@ export function decodeStrict(image, options) {
634
634
  }
635
635
 
636
636
  /** Library version, matching package.json. */
637
- export const VERSION = '1.5.5';
637
+ export const VERSION = '1.5.6';