@denreport/designer
v0.1.0
Published
Embeddable, browser-based visual designer UI for denreport business documents (invoices, delivery notes, receipts), exposed as a small Designer class.
Maintainers
Readme
@denreport/designer
The embeddable, browser-based visual designer UI for
denreport. Lays out text, lines, rectangles,
ellipses, images, barcodes/QR codes, and paginated tables on an
absolute-coordinate canvas, and reads/writes the IR defined by
@denreport/core. Exposed
as a small Designer class you mount into a container element — no build
of the whole denreport app required.
Install
npm install @denreport/designer react react-domreact and react-dom (^19.2.7) are peer dependencies.
Usage
import { Designer } from "@denreport/designer";
import "@denreport/designer/styles/tokens.css";
import "@denreport/designer/styles/app.css";
const designer = new Designer(document.getElementById("app")!);Designer takes over the container's contents and renders the full editor
(canvas, panels, export dialog). Pass initialIr in the second argument to
open an existing document; see the
DesignerOptions
type for the rest (theme, locale, sample data, export target).
For a complete integration, including loading and autosaving an IR
document, see
apps/web/src/main.ts
in the monorepo.
License
MIT
