import{type PropertyValues,type TemplateResult}from'lit';import{LyraElement}from'../../../internal/lyra-element.js';import{type LyraAnchorTargetEventMap}from'../../../internal/anchor-target.js';import type{LyraAnchor,LyraAnchorKind}from'../document-viewer/anchors.js';export interface LyraSvgViewerEventMap extends Omit{'lr-render-error':CustomEvent<{error:unknown;}>;}declare class LyraSvgViewerBase extends LyraElement{}declare const LyraSvgViewer_base:Omit &(new(...args:ConstructorParameters)=>InstanceType &import("../../../lyra.js").LyraAnchorTarget&{renderAnchorLiveRegion():unknown;}); /** * Fetches and safely renders an inline SVG document. Author styles, SVG animation elements, and * external resource/paint-server references are removed before insertion; local fragment paint * servers and embedded raster data remain available without secondary network requests. * * Adopts `DocumentAnchorTarget`: a `region` anchor addresses one `highlights` entry by reference * or structural equality of its `rect` (and optional `page`) -- `scrollToAnchor()`/a declarative * `anchor` assignment scrolls the matching `[part="region-highlight"]` into view and fires * `lr-anchor-result`. No other anchor kind resolves here -- a sanitized SVG document has neither * pages nor extractable text to quote. At most 100 valid region highlights are painted from a * 1,000-entry candidate window; `activeHighlightId` is retained from anywhere in the bounded host * snapshot and placed first inside both paint ceilings. * * @customElement lr-svg-viewer * @event lr-render-error - Fired when fetching or sanitizing the document fails. * @event lr-highlight-activate - A region highlight was activated. `detail: { highlightId }`. * @event lr-anchor-result - Fired after an `anchor` property assignment or a `scrollToAnchor()` * call is applied. `detail: { found }`. * @csspart base - The root container. It owns `role="img"` only for passive loaded SVG content; * idle, loading, error, zoomable, and interactive-highlight states use `role="region"` so their * descendant state text and controls remain exposed to assistive technology. * @csspart body - The wrapper around the fetched-state content. * @csspart svg - The sanitized SVG document, once loaded. * @csspart spinner - Visible ordinary loading content with a motion-safe progress indicator; * transitions announce through the shared document-level polite region. * @csspart error - Visible ordinary error text; transitions announce through the shared * document-level assertive region. * @csspart frame-viewport - Forwarded from the internal `` when `zoomable`. * @csspart frame-content - Forwarded from the internal `` when `zoomable`. * @csspart frame-controls - Forwarded from the internal `` when `zoomable`. * @csspart frame-zoom-in - Forwarded from the internal `` when `zoomable`. * @csspart frame-zoom-out - Forwarded from the internal `` when `zoomable`. * @csspart frame-reset - Forwarded from the internal `` when `zoomable`. * @csspart highlight-layer - The wrapper around every rendered region highlight. * @csspart region-highlight - One region highlight (`data-tone`, `data-active`). * @csspart region-highlight-target - Transparent activation geometry around a region highlight, * with a minimum pointer/focus area independent of the visual rectangle. * @csspart highlight-actions - Non-overlapping actions used for multiple region highlights. * @csspart region-highlight-action - One non-overlapping highlight action. * @cssprop [--lr-svg-viewer-max-height=none] - Maximum block size of the scrollable body before it scrolls internally. Also settable via the `max-height` property. * @cssprop [--lr-svg-viewer-active-border=var(--lr-color-warning, var(--lr-color-brand))] - Border * color of the `[part="region-highlight"]` matching `activeHighlightId`. Distinct from the * resting highlight border, so the active region can be recolored without touching the rest. * @cssprop [--lr-svg-viewer-highlight-accent-color=var(--lr-color-brand)] - Accent highlight border and hover tint. * @cssprop [--lr-svg-viewer-highlight-success-color=var(--lr-color-success)] - Success highlight border and hover tint. * @cssprop [--lr-svg-viewer-highlight-warning-color=var(--lr-color-warning)] - Warning highlight border and hover tint. * @cssprop [--lr-svg-viewer-highlight-danger-color=var(--lr-color-danger)] - Danger highlight border and hover tint. * @cssprop [--lr-svg-viewer-highlight-neutral-color=var(--lr-color-neutral)] - Neutral highlight border and hover tint. * @status stable * @since 4.0.0 */ export declare class LyraSvgViewer extends LyraSvgViewer_base{static styles:import("lit").CSSResultGroup[]; /** URL to fetch and render as sanitized inline SVG. */ src:string; /** Accessible name for the rendered SVG surface. The surface is an image while passive and a * region when zoom controls or highlight actions make it interactive. */ name:string; /** CSS length that caps the scrollable body. Fitting content stays centered; overflowing * SVG content starts inside the reachable scroll range. Invalid values are ignored. */ maxHeight:string; /** Wraps the rendered content in an internal ``. `false` (the default) * preserves today's exact DOM -- an inline thumbnail (e.g. in a chat stream) must not * unexpectedly grow a focusable zoom-chrome viewport; an inspection surface opts in. */ zoomable:boolean; /** Anchor kinds this viewer resolves via `scrollToAnchor()`. `highlights`/`activeHighlightId`/ * `anchor` are inherited from `DocumentAnchorTarget` -- display-only, no creation UI here. */ readonly anchorKinds:readonly LyraAnchorKind[];private fetchState;private generation;private readonly announcements;connectedCallback():void;disconnectedCallback():void;adoptedCallback():void;protected updated(changed:PropertyValues):void;private load;private renderBody;private stopPanZoomEvent; /** Wraps `content` in the internal `` when `zoomable`; otherwise renders it * (plus the highlight layer, which needs the same relatively-positioned sibling context either * way) unwrapped, preserving pre-`zoomable` DOM exactly. */ private renderZoomableWrapper;private regionHighlights;private highlightActionLabel;private renderHighlightLayer;private renderHighlightActions; /** Per-viewer hook for `DocumentAnchorTarget`: resolves a `region` anchor back to its owning * `highlights` entry (matched by reference first, so `scrollToAnchor(highlight.anchor)` * resolves directly, then by structural equality of `rect`/`page` so an equivalent * freshly-built anchor also resolves) and scrolls its rendered box into view. Declines (no * retry-worthy transient state of its own here) when nothing is loaded yet or no region * matches -- the mixin's own retry loop covers the case where `anchor`/`scrollToAnchor()` is * called before `src` has finished loading. */ protected applyAnchor(anchor:LyraAnchor):Promise;render():TemplateResult;}declare global{interface HTMLElementTagNameMap{'lr-svg-viewer':LyraSvgViewer;}}export{};