import { onSrcUpdate } from "../integration-utils/index"; import { WebComponent, WebComponentDefinitionOptions } from './WebComponent'; import { CustomElement } from 'typed-custom-elements'; /** * Basic SVG image. Implements SVG sprites. Adds `` element with the symbols to the ``. * * Pass SVG source code to the `src` property, so the image will be rendered. * * Every attribute that starts with `svg-` string will be passed down to the `` element. * * Every attribute that starts with `use-` string will be passed down to the `` element. * * @example * * // Import SVG source code: * import imgSrc from "@/assets/image.svg?src"; * * // Import web component: * import { SvgImage } from "vite-awesome-svg-loader/web-components-integration"; * * // Define a custom element: * SvgImage.define(); * * // Create image: * const img = new SvgImage(); * // or: * const img = document.createElement("svg-image"); * * // Assign SVG source code to the image: * img.src = imgSrc; * * // Add image to the DOM: * document.body.appendChild(img); * * // Set attributes to element: * img.setAttribute("svg-preserveAspectRatio", "xMaxYMin"); // Will set preserveAspectRatio="xMaxYMin" * * // Set attributes to element: * img.setAttribute("use-data-test", "use-el"); // will set data-test="use-el" */ export declare class SvgImage extends WebComponent implements CustomElement { static readonly props: { name: string; default: string; }[]; /** SVG source code */ src: string; /** * Last src update result */ protected _updateSrcRes: ReturnType; private readonly _svgEl; private readonly _useEl; /** * `` element */ get useEl(): SVGUseElement; /** * `` element */ get svgEl(): SVGElement; constructor(); connectedCallback(): void; disconnectedCallback(): void; attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void; /** @returns ID of a `