export type ErrorCorrectionLevel = 'L' | 'M' | 'Q' | 'H'; export interface QrMatrix { /** Edge length in modules (e.g. 21 for version 1, 177 for version 40). */ size: number; /** Row-major `size * size` booleans — true = dark module. */ modules: boolean[]; } /** * Shape of the geometry `qrcode.create()` returns, so a host that has that * package installed can hand its output straight to the renderer. */ export interface QrcodeCreateResult { modules: { size: number; data: Uint8Array | number[]; }; } /** Injectable geometry provider (see {@link setQrCreate}). */ export type QrCreateFn = (value: string, options: { errorCorrectionLevel: ErrorCorrectionLevel; }) => QrcodeCreateResult; /** * OPTIONAL override, kept for backwards compatibility — no longer needed. * The shipped encoder (`uqr`) already supports versions 1–40, so there is no * capacity reason to swap in another library. A host that still registers the * npm `qrcode` package's `create` keeps working: * * import QRCode from 'qrcode'; * import { setQrCreate } from '@alfadocs/ui-kit/qr-code'; * setQrCreate(QRCode.create); * * Pass `null` to revert to the built-in `uqr` encoder. */ export declare function setQrCreate(fn: QrCreateFn | null): void; /** * Build the QR module matrix for `value` with `uqr` (versions 1–40), or with a * provider registered via {@link setQrCreate}. Returns raw module geometry * with no quiet zone — the component renders its own token-styled SVG. * * Throws when the value exceeds version-40 capacity at the requested level; * callers catch and render the empty state (see QrCode's try/catch). */ export declare function createQrMatrix(value: string, errorCorrectionLevel: ErrorCorrectionLevel): QrMatrix; //# sourceMappingURL=qr-encode.d.ts.map