Release Barcode Tools 0.2.0
Verify / verify (push) Canceled after 0s

This commit is contained in:
2026-09-02 11:08:20 +02:00
parent 81677e1134
commit d94e03b81a
29 changed files with 1266 additions and 100 deletions
+6
View File
@@ -1,5 +1,11 @@
# Changelog
## 0.2.0 - 2026-09-02
- Added bounded common-GS1 Application Identifier parsing and validation.
- Added physical-size/raster planning, honest quiet-zone guidance and print-sized SVG export.
- Added an explicitly permission-gated native `BarcodeDetector` camera path with local ZXing fallback.
## 0.1.0 - 2026-09-01
- Added the initial local-first Barcode Tools workbench.
+3 -3
View File
@@ -1,5 +1,5 @@
==============================================================================
@add-ideas/toolbox-contract@0.2.3
@add-ideas/toolbox-contract@0.3.0
Declared licence: Apache-2.0
==============================================================================
--- LICENSE ---
@@ -198,7 +198,7 @@ Declared licence: Apache-2.0
==============================================================================
@add-ideas/toolbox-helpers@0.1.0
@add-ideas/toolbox-helpers@0.2.0
Declared licence: GPL-3.0-or-later
==============================================================================
--- LICENSE ---
@@ -879,7 +879,7 @@ Public License instead of this License. But first, please read
==============================================================================
@add-ideas/toolbox-shell-react@0.2.3
@add-ideas/toolbox-shell-react@0.3.0
Declared licence: Apache-2.0
==============================================================================
--- LICENSE ---
+6 -5
View File
@@ -4,15 +4,16 @@ Generate and decode QR codes and barcodes locally in the browser.
Barcode Tools is a standalone local-first application in the [add·ideas Toolbox](https://git.add-ideas.de/lotobo/toolbox-portal). Inputs are processed in the browser and are not uploaded.
## Version 0.1 scope
## Current scope
- Local SVG generation for QR, Data Matrix, PDF417, Aztec and selected linear symbologies
- Local barcode decoding from a bounded image file or an explicitly enabled camera
- Local barcode decoding from a bounded image file or an explicitly enabled, permission-gated camera; native `BarcodeDetector` is preferred when available and local ZXing is the fallback
- Escaped URL, email, SMS, Wi-Fi, vCard and geo QR payload builders
- Bounded CSV batch generation into a deterministic SVG ZIP
- GTIN check-digit validation plus non-authoritative quiet-zone guidance
- Bounded parsing and validation for common GS1 Application Identifiers in parenthesized HRI and raw element strings, including FNC1/ASCII GS boundaries, dates, check digits and decimal indicators
- GTIN check-digit validation, physical SVG sizing, raster-dimension planning, nominal quiet-zone guidance and print-sized SVG export
Generated SVG is checked for active or linked content before preview/download. Decoded payloads are displayed as text and never opened automatically. Scanner interoperability, GS1 allocation and print quality still require testing against the applicable specifications. See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) and [docs/PRIVACY-SECURITY.md](docs/PRIVACY-SECURITY.md).
Generated SVG is checked for active or linked content before preview/download. Decoded payloads are displayed as text and never opened automatically. GS1 allocation/ownership is not queried. bwip-js padding is in points rather than barcode modules, so quiet-zone conformance must be measured on final output; scanner interoperability and print grade still require testing against the intended scanner and applicable specifications. See [docs/ARCHITECTURE.md](docs/ARCHITECTURE.md) and [docs/PRIVACY-SECURITY.md](docs/PRIVACY-SECURITY.md).
## Development
@@ -26,7 +27,7 @@ npm run test:browser
## Release
`npm run release:artifact` creates a deterministic `release/barcode-tools-0.1.0.zip` and checksum sidecar.
`npm run release:artifact` creates a deterministic `release/barcode-tools-0.2.0.zip` and checksum sidecar.
## Licence
+2 -2
View File
@@ -1,7 +1,7 @@
# Corresponding source
The corresponding source for Barcode Tools 0.1.0 is available at:
The corresponding source for Barcode Tools 0.2.0 is available at:
https://git.add-ideas.de/lotobo/barcode-tools/src/tag/v0.1.0
https://git.add-ideas.de/lotobo/barcode-tools/src/tag/v0.2.0
Build with Node.js 22, npm 11, `npm ci`, and `npm run release:artifact`.
+3 -3
View File
@@ -4,9 +4,9 @@ Barcode Tools 0.1.0 directly depends on these runtime packages:
| Package | Pinned version | Declared licence |
| -------------------------------- | -------------: | ---------------- |
| `@add-ideas/toolbox-contract` | 0.2.3 | Apache-2.0 |
| `@add-ideas/toolbox-helpers` | 0.1.0 | GPL-3.0-or-later |
| `@add-ideas/toolbox-shell-react` | 0.2.3 | Apache-2.0 |
| `@add-ideas/toolbox-contract` | 0.3.0 | Apache-2.0 |
| `@add-ideas/toolbox-helpers` | 0.2.0 | GPL-3.0-or-later |
| `@add-ideas/toolbox-shell-react` | 0.3.0 | Apache-2.0 |
| `@zxing/browser` | 0.1.5 | MIT |
| `@zxing/library` | 0.21.3 | MIT |
| `bwip-js` | 4.11.4 | MIT |
+5 -3
View File
@@ -1,7 +1,9 @@
# Architecture
Barcode Tools is a static React/Vite application wrapped in the shared Toolbox shell. `barcode/generate.ts` validates options, delegates encoding to the browser build of `bwip-js`, rejects active or linked constructs in the generated SVG string, and previews it through a revocable blob URL. It also parses the bounded two-column batch format and creates deterministic SVG ZIPs with `fflate`.
Barcode Tools is a static React/Vite application wrapped in the shared Toolbox shell. `barcode/generate.ts` validates options, delegates encoding to the browser build of `bwip-js`, rejects active or linked constructs in the generated SVG string, and previews it through a revocable blob URL. It also parses the bounded two-column batch format, creates deterministic SVG ZIPs, computes physical/raster planning dimensions from the generated aspect ratio, and adds millimetre dimensions to a print SVG without rasterizing it. Quiet-zone module values are guidance only because bwip-js padding is measured in points.
`barcode/payloads.ts` escapes structured QR fields and validates GTIN check digits. The decode workspace lazy-loads ZXing only after a file or camera action. Image files are passed through a revocable object URL; camera acquisition is explicit and its controls are stopped on request or unmount. Decoded values are rendered as text and never navigated.
`barcode/payloads.ts` escapes structured QR fields and validates GTIN check digits. `barcode/gs1.ts` recognizes a bounded table of common GS1 AIs, consumes fixed-width fields, requires GS separators for non-final variable fields, validates lengths/data classes/dates/check digits, and stops at an unknown raw AI rather than guessing its boundary.
Version 0.1 does not create an application worker or persist input. The camera requires a secure context but not a top-level browsing context. Relative entry and asset URLs keep the build relocatable below a nested portal path.
The decode workspace lazy-loads ZXing only after a file or camera action. Pressing **Start camera** is the sole path to `getUserMedia`. When the browser exposes `BarcodeDetector`, it processes at most one frame per animation frame; otherwise the local ZXing constraint decoder is used. Image files are passed through a revocable object URL; camera streams/animation/ZXing controls are stopped on request, failure or unmount. Decoded values are rendered as text and never navigated.
The application does not persist input. The camera requires a secure context and may be constrained by the embedding portal's Permissions Policy. Relative entry and asset URLs keep the build relocatable below a nested portal path.
+2 -2
View File
@@ -1,7 +1,7 @@
# Privacy and security
Payloads, images and camera frames are processed in the browser. There is no telemetry, analytics, account, persistence or server upload. Camera access happens only after pressing **Start camera**, is governed by browser permission, requests video without audio, and can be stopped from the workspace.
Payloads, images and camera frames are processed in the browser. There is no telemetry, analytics, account, persistence or server upload. Camera access happens only after pressing **Start camera**, is governed by browser permission/Permissions Policy, requests video without audio, and can be stopped from the workspace. The stream and scan loop are stopped on cancellation, failure and unmount.
Images are limited to 20 MiB, generated payloads to 4,096 characters, and batch input to 256 KiB/100 rows. Structured QR fields are escaped and Wi-Fi security is restricted to WPA, WEP or nopass. Generated SVG is rejected if it contains scripts, foreign objects, event handlers or linked content; previews use local blob URLs.
Decoded payloads are untrusted text and are never opened automatically. A valid check digit does not prove GS1 allocation, and the quiet-zone text is guidance rather than print-quality validation. Interoperability and physical print quality must be checked with the intended scanner and applicable specification.
Decoded payloads are untrusted text and are never opened automatically. A recognized AI or valid check digit does not prove GS1 allocation, ownership or complete carrier conformance. Unknown raw AIs stop parsing to avoid inventing field boundaries. Physical dimensions and raster pixels are planning values: generated padding is expressed in points, not modules, so quiet zones/X-dimension and physical print quality must be measured and tested with the intended scanner and applicable specification.
+1 -1
View File
@@ -1,5 +1,5 @@
const CACHE_PREFIX = "barcode-tools-shell-";
const CACHE_NAME = CACHE_PREFIX + "0.1.0";
const CACHE_NAME = CACHE_PREFIX + "0.2.0";
const CORE = ["./", "./manifest.webmanifest", "./favicon.svg"];
self.addEventListener("install", (event) => {
event.waitUntil(
+19 -1
View File
@@ -3,7 +3,7 @@
"schemaVersion": 1,
"id": "de.add-ideas.barcode-tools",
"name": "Barcode Tools",
"version": "0.1.0",
"version": "0.2.0",
"description": "Generate and decode QR codes and barcodes locally in the browser.",
"entry": "./",
"icon": "./favicon.svg",
@@ -21,6 +21,24 @@
"crossOriginIsolated": false,
"topLevelContext": false
},
"io": {
"accepts": [
{
"mediaType": "image/*",
"extensions": [".png", ".jpg", ".jpeg", ".webp"]
},
{ "mediaType": "text/csv", "extensions": [".csv"] }
],
"produces": [
{ "mediaType": "image/svg+xml", "extensions": [".svg"] },
{ "mediaType": "application/zip", "extensions": [".zip"] },
{ "mediaType": "application/json", "extensions": [".json"] }
]
},
"capabilities": {
"required": [],
"optional": ["barcode-detector", "camera"]
},
"privacy": {
"processing": "local",
"fileUploads": true,