import type { QrCodeGenerateData } from 'uqr'; export type QrModuleShape = 'square' | 'rounded' | 'chamfer' | 'dot'; export type QrEyeShape = 'square' | 'rounded' | 'chamfer' | 'circle'; export interface QrGradientStop { offset: number; color: string; } export interface QrGradient { type?: 'linear' | 'radial'; /** Rotation in degrees, linear gradients only. */ rotation?: number; stops: QrGradientStop[]; } export interface QrEyeStyle { /** Finder-pattern (eye) shape. Defaults to match `moduleShape`. */ shape?: QrEyeShape; /** Solid color or gradient. Defaults to `eyeColor`, then the foreground. */ color?: string | QrGradient; /** Corner radius for `rounded` eyes, in modules. Defaults to `eyeRadius`. */ radius?: number; } export interface QrLogoOptions { /** Image source (URL or data URI). */ href: string; /** Logo width/height as a fraction of the code, excluding margin. @default 0.2 */ size?: number; /** Clear padding around the logo, in modules. @default 1 */ margin?: number; /** Knockout color behind the logo. Defaults to the code background or white. */ background?: string; /** Corner radius of the knockout, in modules. */ borderRadius?: number; } export interface QrCodeSvgOptions { /** Error correction level. Defaults to `'H'` when a logo is set, otherwise `'M'`. */ ecc?: 'L' | 'M' | 'Q' | 'H'; minVersion?: number | undefined; maxVersion?: number | undefined; boostEcc?: boolean | undefined; maskPattern?: number | undefined; /** Quiet zone around the code, in modules. @default 4 */ margin?: number; /** Output width/height in px. Omit for a responsive (viewBox-only) SVG. */ size?: number; /** Solid color or gradient for the modules. @default 'black' */ foreground?: string | QrGradient; /** Background color. `null` or `'transparent'` omits the background rect. @default 'white' */ background?: string | null; moduleShape?: QrModuleShape; /** Corner radius (`rounded`) or bevel cut (`chamfer`) for modules, 0..0.5 of a module. @default 0.35 */ moduleRadius?: number; /** Shrinks each module within its cell for a gapped/breathing look, 0..1. @default 1 */ moduleScale?: number; /** Finder-pattern (eye) shape. Defaults to match `moduleShape`. */ eyeShape?: QrEyeShape; /** Solid color or gradient for the eyes. Defaults to the foreground. */ eyeColor?: string | QrGradient; /** Corner radius for `rounded` eyes, in modules. @default 0.8 */ eyeRadius?: number; /** Per-eye overrides, in order: top-left, top-right, bottom-left. */ eyes?: [QrEyeStyle, QrEyeStyle, QrEyeStyle]; logo?: QrLogoOptions; /** Accessible name. Emits `role="img"` + a `` element and, unless `ariaLabel` is set, an `aria-label`. */ title?: string; /** Overrides the `aria-label` value; implies `role="img"` even without a `title`. */ ariaLabel?: string; /** Prefix for internal SVG ids. Pass a unique value when embedding many codes in one document. @default 'qr' */ id?: string; } /** * Generate a strongly-customizable QR code as an SVG string. * * Uses `uqr` for encoding and renders vector modules, styled finder patterns, * gradients, and an optional center logo. When a logo is set the error * correction defaults to `'H'` and the logo size is clamped to what the ECC * budget can tolerate, so the code stays scannable. */ export declare function qrCodeSvg(data: QrCodeGenerateData, options?: QrCodeSvgOptions): string; /** * Generate a QR code as a `data:image/svg+xml` URI, ready for `<img src>` or CSS `background`. */ export declare function qrCodeDataUri(data: QrCodeGenerateData, options?: QrCodeSvgOptions): string; //# sourceMappingURL=QrCode.d.ts.map