import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';export type LyraQrCodeErrorCorrection='L'|'M'|'Q'|'H'; /** * `` -- encodes `value` as a QR symbol with the optional * `qrcode` peer dependency (Reed-Solomon error correction and every other * algorithmic step of the QR spec is delegated to that library, never * hand-rolled) and draws the resulting module matrix across the full canvas, * one square (optionally rounded) cell per module. Like the mirrored WA/SL * components, it does not inject a quiet zone; add host CSS `padding` when a * scanner or physical output needs one. * * The stable host is the single semantic owner while a value is loading or * rendered. Its accessible name resolves, in order, from a host `aria-label` * attribute, `label`, then `value`; the canvas is presentational. The same * host publishes `aria-busy="true"` and `"false"`. An empty `value` renders * `[part="empty"]` without image semantics. * * Standard host `color` and `background-color` control foreground and * background paint. `--lr-qr-code-fill` and `--lr-qr-code-background` are * optional aliases for those host styles; otherwise inherited color and the * host's transparent background are preserved. The permanent upstream parity * properties `fill` and `background` take precedence over those CSS inputs. * Shoelace migration inserts its historical black/white defaults. * * The mirrored renderers use a fixed two backing pixels per CSS pixel rather * than the live device pixel ratio. Lyra preserves that geometry for ordinary * sizes and uniformly reduces only extreme allocations to a bounded pixel * budget; CSS size and aspect ratio do not change. * * Deliberately out of scope for this component, not oversights: a finder-pattern-corner accent * color; auto-shrinking to fit a * narrow container (this component's `size` is a direct request for a * specific rendered pixel density, like `` -- the consumer * picks a size that fits their layout, this component never second-guesses * it, though it still renders correctly at its default size inside a narrow * allocation); form association (`value` is caller-supplied display data the * user doesn't edit through this component -- no `FormAssociated` mixin, no * label/hint/error chrome, no form internals); and playback behavior. Keyboard * focus is intentionally absent -- the canvas is a static image * standing in for `value`, structurally like ``, not an interactive * grid. * * @customElement lr-qr-code * @csspart base - Deprecated in 8.2.3; compatibility name for the outer wrapper; use `qr-code`. * @csspart qr-code - The outer wrapper, sized to `size`×`size` CSS px in every state. It is the * same node as `base`. * @csspart canvas - The stable QR canvas. It remains hidden but reachable through `.canvas` * while the component is empty, loading, or in an error state. * @csspart empty - Shown when `value` is empty. * @csspart loading - Shown while the optional `qrcode` peer is loading, the first time it's needed. * @csspart error - Visible error shown when the peer is missing, or `value` failed to encode; the * transition is announced through the shared light-DOM assertive region. * @cssprop --lr-qr-code-fill - Optional alias for host `color`, used by foreground modules. * @cssprop --lr-qr-code-background - Optional alias for host `background-color`, used by the canvas background. * @status stable * @since 4.0.0 */ export declare class LyraQrCode extends LyraElement{static styles:import("lit").CSSResultGroup[]; /** Starts the shared optional-peer import without generating a QR code. Returns false when the * optional peer is unavailable, so applications can decide whether to render their own fallback * before connecting an element. */ static preload():Promise; /** The data to encode. Empty renders `[part="empty"]` -- no encode is attempted. */ value:string; /** Accessible-name fallback when the host has no `aria-label`; otherwise falls back to `value` * -- see the class doc * comment for the full precedence order. Caller-supplied data, not routed through `localize()`. */ label:string; /** Upstream-compatible foreground-module color. A non-empty value takes precedence over host * `color` and `--lr-qr-code-fill`. */ fill:string; /** Upstream-compatible canvas-background color. A non-empty value takes precedence over host * `background-color` and `--lr-qr-code-background`. */ background:string; /** Safe media URL for an optional centered logo/image. */ image:string|null; /** Optional CSS color painted behind the centered image and its padding. */ imageBackground:string|null; /** Fraction of the QR canvas side available to the embedded image, clamped to `[0, 1]`. */ imageCoverage:number|null; /** CSS-pixel padding inside the embedded image's coverage box, clamped to fit. */ imagePadding:number|null;private _size; /** CSS-px side length of the square canvas, clamped to `[1, 2048]`. */ get size():number;set size(value:number);private _radius; /** Per-module corner radius, as a fraction of one module's side length -- `0` (default) for * square modules, `0.5` for fully round/pill modules. Clamped to `[0, 0.5]`. */ get radius():number;set radius(value:number);private _errorCorrection; /** QR error-correction level. Normalized (upper-cased, validated against `L`/`M`/`Q`/`H`, * falling back to `H`) on every assignment, attribute or property, so it's never a transient * garbage value. */ get errorCorrection():LyraQrCodeErrorCorrection;set errorCorrection(value:LyraQrCodeErrorCorrection); /** The stable canvas used for QR paint. The same node remains reachable across empty, loading, * ready, error, reconnect, and redraw transitions. Readonly: an explicit `get` (rather than * `@query`) so the generated manifest marks it non-assignable. */ get canvas():HTMLCanvasElement;private loadState;private errorAnnouncementSink?;private statusAnnouncementSink?;private pendingLoadingAnnouncement;private readonly accessibilityInternals?;private visible;private visibilityKnown;private intersectionObserver?;private intersectionGeneration; /** Injectable loader seam -- overridden directly by tests with a synchronous fake instead of * needing the real `qrcode` package to load in the test browser (mirrors `LyraPdfViewer`'s * `loadLibrary` field). */ private loadLibrary;private generation;constructor();connectedCallback():void;disconnectedCallback():void;adoptedCallback():void; /** Binds visibility to the current owner realm. A valid observer entry is required before * painting, but a missing or failing platform capability preserves immediate rendering. */ private bindVisibilityObserver;private clearVisibilityObserver;private restoreImmediateVisibility;private syncAnnouncementSinks;private releaseAnnouncementSinks;private transitionTo;private syncSemanticOwner;protected updated(changed:PropertyValues):void;protected willUpdate(changed:PropertyValues):void; /** Re-encodes `value` via the optional `qrcode` peer's `create()` and caches the resulting * module matrix. Redraw-only geometry changes (`size`/`radius`) and theme refreshes never * call this -- see the class doc comment and `updated()`'s dispatch. */ generate():void;private generateCurrentValue;private loadEmbeddedImage; /** Redraws canvas content after an upstream token or theme change, reusing the already- * cached module matrix rather than re-encoding `value`. The component automatically observes * ancestor theme-attribute changes and color-scheme changes; this method remains available for * consumer-owned token changes that are not represented by those signals. */ refreshTheme():void;private fillColor;private backgroundColor;private draw; /** Pure allocation seam kept private so tests can cover extreme inputs without creating a * multi-megapixel canvas. */ private static canvasAllocation;private drawEmbeddedImage;private accessibleName;private renderBody;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-qr-code':LyraQrCode;}}