//#region src/core/qr/encode.d.ts type QrErrorCorrection = "L" | "M" | "Q" | "H"; interface QrMatrix { /** Modules per side (21..177). Excludes the quiet zone. */ size: number; /** `[row][col]`, true = dark. */ modules: boolean[][]; /** 1..40. */ version: number; ecc: QrErrorCorrection; /** The mask pattern (0..7) chosen by penalty scoring. */ mask: number; } /** * Encode `data` as a QR matrix. * * Throws only when the payload cannot fit version 40 at the chosen ECC level—roughly * 1.2KB even at H, far beyond any URL. */ declare function encodeQr(data: string, options?: { ecc?: QrErrorCorrection; minVersion?: number; }): QrMatrix; //#endregion //#region src/core/qr/svg.d.ts interface QrSvgOptions { ecc?: QrErrorCorrection; /** * Quiet zone in MODULES (not pixels). Default 4—the spec minimum. Anything * less and real scanners start failing against a busy shop wall. */ margin?: number; dark?: string; /** `null` for a transparent background (the default is an opaque white so a * code printed onto colored stock still scans). */ light?: string | null; /** Emit width/height in px alongside the viewBox. Set it for a downloadable * file; omit it for an inline SVG that should scale with its container. */ size?: number; /** Rendered as ``, so an inline code has an accessible name. */ title?: string; } /** A standalone SVG document string for `data`. */ declare function qrSvg(data: string, options?: QrSvgOptions): string; /** The same SVG as a `data:` URI, for an `<img src>`. */ declare function qrDataUri(data: string, options?: QrSvgOptions): string; //#endregion export { type QrErrorCorrection, type QrMatrix, type QrSvgOptions, encodeQr, qrDataUri, qrSvg };