Skip to content

Commit

Permalink
feat: support more barcode formats
Browse files Browse the repository at this point in the history
bump `barcode-detector` to v2.2.0, support more barcode formats:
`databar`, `databar_expanded`, `dx_film_edge`, `maxi_code`
(only generated ones, and no position info), `micro_qr_code`,
`rm_qr_code`, `linear_codes` and `matrix_codes` (for convenience)
  • Loading branch information
Sec-ant authored and gruhn committed Dec 19, 2023
1 parent 542d920 commit e12d1be
Show file tree
Hide file tree
Showing 7 changed files with 976 additions and 474 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<a href="https://vue-qrcode-reader.netlify.app/api/QrcodeStream.html">api reference</a>
</p>

A set of Vue.js components for detecting QR codes and [various other barcode formats](https://developer.mozilla.org/en-US/docs/Web/API/Barcode_Detection_API#supported_barcode_formats) right in the browser:
A set of Vue.js components for detecting QR codes and [various other barcode formats](https://github.com/Sec-ant/barcode-detector?tab=readme-ov-file#barcode-detector) right in the browser:

- :movie_camera: `QrcodeStream` continuously scans frames from a camera stream.
- :put_litter_in_its_place: `QrcodeDropZone` is an empty region where you can drag-and-drop images to be decoded.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ export default {
const selected = options[1]
const barcodeTypes = ["aztec", "code_128", "code_39", "code_93", "codabar", "data_matrix", "ean_13", "ean_8", "itf", "pdf417", "qr_code", "upc_a", "upc_e"]
const barcodeTypes = ["aztec", "code_128", "code_39", "code_93", "codabar", "databar", "databar_expanded", "data_matrix", "dx_film_edge", "ean_13", "ean_8", "itf", "maxi_code", "micro_qr_code", "pdf417", "qr_code", "rm_qr_code", "upc_a", "upc_e", "linear_codes", "matrix_codes"]
const selectedBarcodeTypes = ["qr_code"]
Expand Down
2 changes: 1 addition & 1 deletion docs/api/QrcodeCapture.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ Use `detect` instead. TODO: link old docs.
* **Default:** `['qr_code']`

The `formats` prop defines which barcode formats are detected.
[Supported Formats](https://github.com/Sec-ant/barcode-detector/blob/190c8d351e6ed18aea33b38a46e557750bbe5caa/src/utils.ts#L1-L16).
[Supported Formats](https://github.com/Sec-ant/barcode-detector?tab=readme-ov-file#barcode-detector).

```html
<qrcode-capture :formats="['qr_code', 'code_128']"></qrcode-capture>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/QrcodeDropZone.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ methods: {
* **Default:** `['qr_code']`

The `formats` prop defines which barcode formats are detected.
[Supported Formats](https://github.com/Sec-ant/barcode-detector/blob/190c8d351e6ed18aea33b38a46e557750bbe5caa/src/utils.ts#L1-L16).
[Supported Formats](https://github.com/Sec-ant/barcode-detector?tab=readme-ov-file#barcode-detector).

```html
<qrcode-drop-zone :formats="['qr_code', 'code_128']"></qrcode-drop-zone>
Expand Down
2 changes: 1 addition & 1 deletion docs/api/QrcodeStream.md
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@ However changing the value of `paused` resets this internal cache.
* **Default:** `['qr_code']`

The `formats` prop defines which barcode formats are detected.
[Supported Formats](https://github.com/Sec-ant/barcode-detector/blob/190c8d351e6ed18aea33b38a46e557750bbe5caa/src/utils.ts#L1-L16).
[Supported Formats](https://github.com/Sec-ant/barcode-detector?tab=readme-ov-file#barcode-detector).

```html
<qrcode-stream :formats="['qr_code', 'code_128']"></qrcode-stream>
Expand Down
36 changes: 18 additions & 18 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,32 +36,32 @@
"dist"
],
"dependencies": {
"barcode-detector": "2.1.1",
"barcode-detector": "2.2.0",
"webrtc-adapter": "8.2.3"
},
"devDependencies": {
"@tsconfig/node20": "20.1.2",
"@types/node": "20.8.8",
"@types/w3c-image-capture": "1.0.9",
"@vite-pwa/vitepress": "0.2.3",
"@vitejs/plugin-vue": "4.4.0",
"@vue/compiler-sfc": "3.3.6",
"@types/node": "20.10.5",
"@types/w3c-image-capture": "1.0.10",
"@vite-pwa/vitepress": "0.3.1",
"@vitejs/plugin-vue": "4.5.2",
"@vue/compiler-sfc": "3.3.13",
"@vue/eslint-config-prettier": "8.0.0",
"@vue/eslint-config-typescript": "12.0.0",
"@vue/tsconfig": "0.4.0",
"eslint": "8.52.0",
"@vue/tsconfig": "0.5.1",
"eslint": "8.56.0",
"eslint-plugin-prettier": "5.0.1",
"eslint-plugin-vue": "9.17.0",
"eslint-plugin-vue": "9.19.2",
"husky": "8.0.3",
"lint-staged": "15.0.2",
"prettier": "3.0.3",
"semantic-release": "22.0.5",
"typescript": "5.2.2",
"vite": "4.5.0",
"vite-plugin-dts": "3.6.1",
"vitepress": "1.0.0-rc.24",
"vue": "3.3.6",
"vue-tsc": "1.8.20",
"lint-staged": "15.2.0",
"prettier": "3.1.1",
"semantic-release": "22.0.12",
"typescript": "5.3.3",
"vite": "5.0.10",
"vite-plugin-dts": "3.6.4",
"vitepress": "1.0.0-rc.32",
"vue": "3.3.13",
"vue-tsc": "1.8.25",
"workbox-window": "7.0.0"
},
"bugs": "https://github.com/gruhn/vue-qrcode-reader/issues",
Expand Down
Loading

0 comments on commit e12d1be

Please sign in to comment.