18 lines
895 B
Markdown
18 lines
895 B
Markdown
# Architecture
|
|
|
|
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.
|
|
4. `labels/export.ts` exports exact SVG pages, deterministic fflate ZIPs, or
|
|
locally rasterized pdf-lib documents.
|
|
|
|
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
|
|
available for all bounded rows. The shared toolbox shell owns theme and portal
|
|
navigation; all app URLs are relative for nested deployment.
|