diff --git a/.changeset/serious-chicken-shop.md b/.changeset/serious-chicken-shop.md new file mode 100644 index 0000000..14477f7 --- /dev/null +++ b/.changeset/serious-chicken-shop.md @@ -0,0 +1,5 @@ +--- +"barcode-detector": minor +--- + +feat: add `databar_limited` detection support diff --git a/README.md b/README.md index 4f4226d..e118041 100644 --- a/README.md +++ b/README.md @@ -4,7 +4,7 @@ A [Barcode Detection API](https://wicg.github.io/shape-detection-api/#barcode-detection-api) polyfill that uses [ZXing-C++ WebAssembly](https://github.com/Sec-ant/zxing-wasm) under the hood. -Supported barcode formats: `aztec`, `code_128`, `code_39`, `code_93`, `codabar`, `databar`, `databar_expanded`, `data_matrix`, `dx_film_edge`, `ean_13`, `ean_8`, `itf`, `maxi_code` (only generated ones, and no position info), `micro_qr_code`, `pdf417`, `qr_code`, `rm_qr_code`, `upc_a`, `upc_e`, `linear_codes` and `matrix_codes` (for convenience). +Supported barcode formats: `aztec`, `code_128`, `code_39`, `code_93`, `codabar`, `databar`, `databar_expanded`, `databar_limited`, `data_matrix`, `dx_film_edge`, `ean_13`, `ean_8`, `itf`, `maxi_code` (only generated ones, and no position info), `micro_qr_code`, `pdf417`, `qr_code`, `rm_qr_code`, `upc_a`, `upc_e`, `linear_codes` and `matrix_codes` (for convenience). ## Install diff --git a/package.json b/package.json index 88a45b5..8cad0c6 100644 --- a/package.json +++ b/package.json @@ -106,7 +106,7 @@ }, "dependencies": { "@types/dom-webcodecs": "0.1.11", - "zxing-wasm": "1.2.15" + "zxing-wasm": "1.3.3" }, "packageManager": "pnpm@9.12.3+sha512.cce0f9de9c5a7c95bef944169cc5dfe8741abfb145078c0d508b868056848a87c81e626246cb60967cbd7fd29a6c062ef73ff840d96b3c86c40ac92cf4a813ee" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 8594b62..2e3bcad 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -12,8 +12,8 @@ importers: specifier: 0.1.11 version: 0.1.11 zxing-wasm: - specifier: 1.2.15 - version: 1.2.15 + specifier: 1.3.3 + version: 1.3.3 devDependencies: '@biomejs/biome': specifier: 1.9.3 @@ -2528,8 +2528,8 @@ packages: resolution: {integrity: sha512-cYVsTjKl8b+FrnidjibDWskAv7UKOfcwaVZdp/it9n1s9fU3IkgDbhdIRKCW4JDsAlECJY0ytoVPT3sK6kideA==} engines: {node: '>=18'} - zxing-wasm@1.2.15: - resolution: {integrity: sha512-jX1yh/+iWlkvaxaJmQO1oYPf8c4sL8H+ZxFFYw4sriYnAmNTdo3Zthm/28WVHv0n8rXIP4GgUcuEIT4EKR1LKw==} + zxing-wasm@1.3.3: + resolution: {integrity: sha512-7ZpRWvFRWkAnXOlvf839K5XIHjdafyUJ2m6SS6PPPq3+/mvGkptHmc/1CPrZ1emvuMQF1gHIWpWVC8FxzEZgHA==} snapshots: @@ -4951,6 +4951,6 @@ snapshots: yoctocolors-cjs@2.1.2: {} - zxing-wasm@1.2.15: + zxing-wasm@1.3.3: dependencies: '@types/emscripten': 1.39.13 diff --git a/src/utils.ts b/src/utils.ts index af8f083..dbb709e 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -11,6 +11,7 @@ const formatMapEntries = [ ["codabar", "Codabar"], ["databar", "DataBar"], ["databar_expanded", "DataBarExpanded"], + ["databar_limited", "DataBarLimited"], ["data_matrix", "DataMatrix"], ["dx_film_edge", "DXFilmEdge"], ["ean_13", "EAN-13"],