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
+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.