@exige/web-scanner-sdk 0.2.33 → 0.2.35

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/dist/react.js CHANGED
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { A as e, C as t, G as n, I as r, J as i, K as a, L as o, R as s, U as c, V as l, a as u, f as d, o as f, r as p, v as m, w as ee } from "./driver-license-DBrWpI9w.js";
2
+ import { A as e, C as t, G as n, I as r, J as i, K as a, L as o, R as s, U as c, V as l, a as u, f as d, o as f, r as p, v as m, w as ee } from "./driver-license-CV0oawgf.js";
3
3
  import { createContext as h, useCallback as g, useContext as te, useEffect as _, useLayoutEffect as v, useMemo as ne, useRef as y, useState as b } from "react";
4
4
  import { Fragment as x, jsx as S, jsxs as C } from "react/jsx-runtime";
5
5
  //#region src/sdk/display-quad.ts
@@ -1,4 +1,4 @@
1
- import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as ee, M as te, N as ne, O as f, P as p, Q as m, R as h, S as g, T as _, U as v, V as y, W as b, X as x, Y as S, Z as C, _ as w, a as T, b as E, c as D, d as O, et as k, f as A, g as j, h as re, i as M, j as N, k as P, l as F, m as I, n as L, p as R, q as z, r as B, s as V, t as H, tt as U, u as W, v as G, w as K, x as q, y as J, z as Y } from "./driver-license-DBrWpI9w.js";
1
+ import { $ as e, A as t, B as n, C as r, D as i, E as a, F as o, G as s, H as c, I as l, J as u, K as d, L as ee, M as te, N as ne, O as f, P as p, Q as m, R as h, S as g, T as _, U as v, V as y, W as b, X as x, Y as S, Z as C, _ as w, a as T, b as E, c as D, d as O, et as k, f as A, g as j, h as re, i as M, j as N, k as P, l as F, m as I, n as L, p as R, q as z, r as B, s as V, t as H, tt as U, u as W, v as G, w as K, x as q, y as J, z as Y } from "./driver-license-CV0oawgf.js";
2
2
  //#region src/sdk/frame-geometry.ts
3
3
  function X(e, t, n) {
4
4
  let r = Math.max(1, t.width), i = Math.max(1, t.height), a = Math.max(1, n.width), o = Math.max(1, n.height), s = Math.max(r / a, i / o), c = (r - a * s) / 2, l = (i - o * s) / 2;
@@ -1,12 +1,23 @@
1
1
  import type { ImageSource } from './types';
2
+ /** Long-edge sizes after the original. Close-up PDF417 often fails at 4K. */
3
+ export declare const PDF417_DECODE_EDGES: readonly [1280, 960, 720, 480];
4
+ /**
5
+ * Decode scales, original first, then smaller copies. Never upscales.
6
+ * A US DL PDF417 that fills most of a 1080–4K frame often needs ~960–720.
7
+ */
8
+ export declare function pdf417DecodeEdges(width: number, height: number): number[];
2
9
  export type Pdf417DecodeSource = 'barcode-detector' | 'zxing-wasm';
3
10
  export interface Pdf417DecodeResult {
4
11
  text: string;
5
12
  source: Pdf417DecodeSource;
6
13
  }
7
14
  export declare function pdf417BarcodeDetectorSupported(): Promise<boolean>;
15
+ /** Original plus downscaled copies. Used by live back and system-camera stills. */
16
+ export declare function pdf417ScaleCanvases(canvas: HTMLCanvasElement): HTMLCanvasElement[];
8
17
  /**
9
- * PDF417 from a still. Prefers `BarcodeDetector` when the UA lists `pdf417`,
10
- * otherwise zxing-wasm with the packaged reader wasm.
18
+ * PDF417 from a live frame or still via packaged `zxing-wasm` only.
19
+ * Does not use `BarcodeDetector` (Chrome’s detector often misses a
20
+ * full-in-frame code until it is ~1/3 of the preview). Tries the original
21
+ * then downscaled copies so a close-up can still read.
11
22
  */
12
23
  export declare function decodePdf417(source: ImageSource): Promise<Pdf417DecodeResult | undefined>;
@@ -1,6 +1,6 @@
1
1
  /**
2
- * zxing-wasm reader 3.1.6. PDF417 fallback when BarcodeDetector cannot
3
- * decode it. Literal `new URL` is what Webpack and Turbopack copy.
2
+ * zxing-wasm reader 3.1.6. License-back PDF417 decode uses this, not
3
+ * BarcodeDetector. Literal `new URL` is what Webpack and Turbopack copy.
4
4
  */
5
5
  export declare const packagedZxingReaderWasm: URL;
6
6
  export declare const PINNED_ZXING_WASM_VERSION: "3.1.6";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@exige/web-scanner-sdk",
3
- "version": "0.2.33",
3
+ "version": "0.2.35",
4
4
  "description": "@exige/web-scanner-sdk is a client-side web document scanner SDK. ML document finding, OCR, and redaction run in the browser. The public demo is the only path that does not need an account. A hostname you control needs a signed license key.",
5
5
  "type": "module",
6
6
  "license": "MIT",