import TinyHtmlTemplate from './TinyHtmlTemplate.mjs'; /** * {boolean} [config.fetchMode=TinyHtmlImage.#defaultFetchMode] - Whether to enable or disable fetch mode. Must be a boolean. */ /** * TinyImage is a helper class for managing elements. * It supports modern attributes like srcset, sizes, decoding, fetchpriority, * as well as width, height, alt, crossorigin, loading, and more. * * @example * const img = new TinyHtmlImage({ * src: '/logo.png', * alt: 'Logo', * width: 200, * height: 100, * loading: 'lazy', * decoding: 'async', * }); * * @extends TinyHtmlTemplate */ declare class TinyHtmlImage extends TinyHtmlTemplate { /** @type {boolean} */ /** @returns {boolean} */ /** @param {boolean} value */ /** @type {boolean} */ /** @returns {boolean} */ /** * Creates a new TinyHtmlImage instance wrapping an element. * This class simplifies working with images by providing a structured API * for common attributes and configuration options. * * @param {Object} config - Image configuration object. * @param {string} config.src - Image source URL (**required**). * @param {string} [config.alt=""] - Alternate text for the image. Defaults to an empty string. * @param {number} [config.width] - Width of the image in pixels. * @param {number} [config.height] - Height of the image in pixels. * @param {string|string[]|Set} [config.tags=[]] - Initial CSS classes to apply. * @param {string} [config.mainClass=""] - Main CSS class applied to the element. * @param {"anonymous"|"use-credentials"} [config.crossorigin] - Cross-origin policy for loading the image. * @param {"sync"|"async"|"auto"} [config.decoding] - Decoding mode for the image. * @param {string} [config.elementtiming] - Name used for performance timing attribution. * @param {"high"|"low"|"auto"} [config.fetchpriority] - Fetch priority for the image resource. * @param {boolean} [config.ismap=false] - Whether the image is part of a server-side image map. * @param {"eager"|"lazy"} [config.loading] - Loading behavior hint (`"lazy"` defers off-screen images). * @param {string} [config.referrerpolicy] - Referrer policy when fetching the image. * @param {string} [config.sizes] - Sizes attribute, used with `srcset` for responsive images. * @param {string} [config.srcset] - List of image sources for responsive loading. * @param {string} [config.usemap] - Name of an associated image map to use. */ constructor({ src, alt, width, height, tags, mainClass, crossorigin, decoding, elementtiming, fetchpriority, ismap, loading, referrerpolicy, sizes, srcset, usemap, }: { src: string; alt?: string; width?: number; height?: number; tags?: string | string[] | Set; mainClass?: string; crossorigin?: "anonymous" | "use-credentials"; decoding?: "sync" | "async" | "auto"; elementtiming?: string; fetchpriority?: "high" | "low" | "auto"; ismap?: boolean; loading?: "eager" | "lazy"; referrerpolicy?: string; sizes?: string; srcset?: string; usemap?: string; }); /** @param {string} value */ set src(value: string); /** @returns {string|null} */ get src(): string | null; /** @param {string} value */ set alt(value: string); /** @returns {string|null} */ get alt(): string | null; /** @param {'anonymous'|'use-credentials'} value */ set crossorigin(value: 'anonymous' | 'use-credentials'); /** @returns {string|null} */ get crossorigin(): string | null; /** @param {'sync'|'async'|'auto'} value */ set decoding(value: 'sync' | 'async' | 'auto'); /** @returns {string|null} */ get decoding(): string | null; /** @param {string} value */ set elementtiming(value: string); /** @returns {string|null} */ get elementtiming(): string | null; /** @param {'high'|'low'|'auto'} value */ set fetchpriority(value: 'high' | 'low' | 'auto'); /** @returns {string|null} */ get fetchpriority(): string | null; /** @param {boolean} value */ set ismap(value: boolean); /** @returns {boolean} */ get ismap(): boolean; /** @param {'eager'|'lazy'} value */ set loading(value: 'eager' | 'lazy'); /** @returns {string|null} */ get loading(): string | null; /** @param {string} value */ set referrerpolicy(value: string); /** @returns {string|null} */ get referrerpolicy(): string | null; /** @param {string} value */ set sizes(value: string); /** @returns {string|null} */ get sizes(): string | null; /** @param {string} value */ set srcset(value: string); /** @returns {string|null} */ get srcset(): string | null; /** @param {string} value */ set usemap(value: string); /** @returns {string|null} */ get usemap(): string | null; } export default TinyHtmlImage; //# sourceMappingURL=TinyHtmlImage.d.mts.map