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

This commit is contained in:
2026-09-02 11:52:44 +02:00
parent 4e3df8d4a4
commit d3e43bea98
37 changed files with 1733 additions and 119 deletions
+5
View File
@@ -1,5 +1,10 @@
# Changelog
## 0.2.0 - 2026-09-02
- Add a visual label designer, richer vector templates, deterministic
multi-page SVG/ZIP output and vector PDF export with calibrated geometry.
## 0.1.0 - 2026-09-01
- Add bounded CSV/JSON data merge, flattening and field mapping.
+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 ---
+15 -5
View File
@@ -1,9 +1,17 @@
# Label Tools
Label Tools combines bounded CSV/JSON data merge with calibrated label stocks
and a reusable visual template designer. Text, image, barcode and shape
elements can be positioned by drag, keyboard or exact mm/in/pt fields; template
JSON round-trips locally. Bleed, sheet bounds, barcode quiet zones and likely
scan-size problems are checked before print. Physical-size SVG and vector PDF
exports retain paths and text, while local raster images remain embedded image
objects.
Label Tools is a production-oriented, local-first browser studio for merging
CSV/JSON records into printable label, badge and asset-tag sheets.
Version 0.1.0 includes:
Version 0.2.0 includes:
- bounded CSV and JSON parsing with nested JSON field flattening;
- explicit field mapping plus local serial and cryptographically random values;
@@ -16,7 +24,7 @@ Version 0.1.0 includes:
- start-slot selection, X/Y offset and independent scale calibration;
- optional cut guides and registration marks;
- paginated print preview and explicit print calibration guidance;
- vector SVG, deterministic multi-page SVG/report ZIP, and 144 DPI PDF export.
- vector SVG, deterministic multi-page SVG/report ZIP, and vector PDF export.
Data and assets remain in browser memory. There is no telemetry, remote API,
font download, CDN asset or automatic request.
@@ -42,9 +50,11 @@ the actual sheet, print the registration/cut marks on plain paper, choose
stock. Printer feed and unprintable margins are outside browser control.
SVG uses one of four system font stacks and does not embed fonts. Results can
therefore vary by operating system. PDF export intentionally rasterizes each
generated SVG page at 144 DPI, preserving the preview appearance on the same
device but not creating an archival or press-quality font-embedded PDF.
therefore vary by operating system. PDF export maps application-owned SVG
geometry into pdf-lib vector paths, rectangles and embedded Helvetica text.
Characters outside the built-in WinAnsi repertoire are replaced visibly, and
unsupported WebP image objects remain available in SVG but are omitted from
PDF. The result is print-accurate in physical dimensions, not an archival PDF.
## Limits
+2 -1
View File
@@ -7,7 +7,8 @@ Label Tools keeps data in browser memory and accepts only bounded CSV/JSON and
PNG/JPEG/WebP assets. Merge text and SVG attributes are escaped. Generated
barcode markup comes from a pinned local encoder and is checked for active or
linked elements. Remote image URLs, user-provided SVG and arbitrary templates
are not accepted in v0.1.
containing markup or code are not accepted in v0.2. Imported template JSON is
restricted to the bounded declarative v1 element schema.
Generated labels can contain sensitive or guessable identifiers. Review the
preview and warnings before export, and do not treat serial/random values as an
+1 -1
View File
@@ -1,7 +1,7 @@
# Source identity
- Project: Label Tools
- Version: 0.1.0
- Version: 0.2.0
- Canonical repository: https://git.add-ideas.de/lotobo/label-tools
- Licence: GPL-3.0-or-later
- Toolbox app id: `de.add-ideas.label-tools`
+2 -1
View File
@@ -5,7 +5,8 @@ never loaded from a CDN. Their licence texts are copied into the production
artifact at build time.
- React and React DOM — MIT
- add·ideas Toolbox Contract, Shell React and Helpers — GPL-3.0-or-later
- add·ideas Toolbox Contract and Shell React 0.3.0 — Apache-2.0
- add·ideas Toolbox Helpers 0.2.0 — GPL-3.0-or-later
- bwip-js — MIT
- fflate — MIT
- pdf-lib and its runtime dependencies — MIT
+17 -3
View File
@@ -1,15 +1,29 @@
# Architecture
The sheet engine keeps all physical geometry in millimetres and converts only
at the editor boundary. Alongside the fixed address, badge and asset layouts,
`labels/template.ts` validates a reusable v1 element model for draggable text,
image, barcode and shape elements. Merge expressions are fixed `{{field}}`
lookups; they never evaluate code. Bounds include an explicit bleed allowance,
and barcode elements report format-specific quiet-zone and minimum-size risks.
SVG pages use physical dimensions and application-owned escaped markup. PDF
export walks that generated markup into `pdf-lib` vector paths, rectangles and
embedded standard-font text; local PNG/JPEG assets remain image objects. No
page-wide rasterization is used. Unsupported WebP embedding remains visible in
SVG and is omitted from PDF rather than fetched or executed.
Label Tools separates untrusted input from rendering:
1. `labels/data.ts` uses toolbox helpers for bounded CSV/JSON parsing and the
browser cryptographic RNG for optional virtual fields.
2. `labels/stocks.ts` stores canonical millimetre geometry and validates every
preset/custom grid before rendering.
3. `labels/render.ts` maps scalar fields into three fixed layouts, escapes XML,
embeds validated local raster data, and places reviewed bwip-js output.
3. `labels/render.ts` maps scalar fields into three fixed layouts or the
validated designer model, escapes XML, embeds validated local raster data,
and places reviewed bwip-js output.
4. `labels/export.ts` exports exact SVG pages, deterministic fflate ZIPs, or
locally rasterized pdf-lib documents.
vector pdf-lib documents assembled from application-owned SVG markup.
The React workbench retains the last valid data model after parse errors and
limits interactive preview to the first 12 pages. Complete SVG export remains
+6 -4
View File
@@ -7,10 +7,12 @@ inside the symbol; they are never requested.
CSV/JSON structure, field lengths, record counts, image bytes/pixels, grid
dimensions, calibration and output pages are bounded. Object URLs are revoked.
User strings are normalized for label display and XML-escaped. Only built-in
templates are supported, and only locally decoded PNG/JPEG/WebP is embedded.
User strings are normalized for label display and XML-escaped. Imported
templates use a bounded, declarative v1 schema with no script or remote-resource
field, and only locally decoded PNG/JPEG/WebP is embedded.
Printing crosses a physical boundary the browser cannot verify: installed font
metrics, device drivers, page scaling, feed skew and stock tolerances. Use the
calibration controls and test on plain paper. PDF is a 144 DPI raster export and
does not embed or preserve font semantics.
calibration controls and test on plain paper. PDF uses vector geometry and
embedded standard fonts, but it does not preserve the selected system-font
metrics or provide archival guarantees.
+1 -1
View File
@@ -1,4 +1,4 @@
const CACHE = "label-tools-v0.1.0";
const CACHE = "label-tools-v0.2.0";
const APP = [
"./",
"./index.html",
+18 -1
View File
@@ -3,7 +3,7 @@
"schemaVersion": 1,
"id": "de.add-ideas.label-tools",
"name": "Label Tools",
"version": "0.1.0",
"version": "0.2.0",
"description": "Merge and print labels locally.",
"entry": "./",
"icon": "./favicon.svg",
@@ -21,6 +21,23 @@
"crossOriginIsolated": false,
"topLevelContext": false
},
"io": {
"accepts": [
{ "mediaType": "text/csv", "extensions": [".csv"] },
{ "mediaType": "application/json", "extensions": [".json"] },
{
"mediaType": "image/*",
"extensions": [".png", ".jpg", ".jpeg", ".webp"]
}
],
"produces": [
{ "mediaType": "application/pdf", "extensions": [".pdf"] },
{ "mediaType": "image/svg+xml", "extensions": [".svg"] },
{ "mediaType": "application/zip", "extensions": [".zip"] },
{ "mediaType": "application/json", "extensions": [".json"] }
]
},
"capabilities": { "required": [], "optional": ["workers"] },
"privacy": {
"processing": "local",
"fileUploads": true,