import { LitElement } from 'lit'; export type SkyIconSizeValue = string | number; export type SkyIconRotateValue = string | number; export type SkyIconFlip = '' | 'horizontal' | 'vertical' | 'horizontal,vertical'; interface IconifyCollection { left?: number; top?: number; width?: number; height?: number; } interface IconifySetData extends IconifyCollection { icons?: Record; } interface IconifyIcon { body?: string; left?: number; top?: number; width?: number; height?: number; viewBox?: string; } /** * @element sky-icon * * @summary Icon renderer with Iconify fetch/caching, lazy loading, and optional slotted SVG fallback. * * @status stable * @since 1.0.0 * * @documentation https://sky-ui.com/components/icon * * @slot - Optional fallback `` content when remote icon data is unavailable. * @property {string} icon - Icon name in `prefix:icon-name` format. * @property {SkyIconSizeValue} width - Icon width value. * @property {SkyIconSizeValue} height - Icon height value. * @property {string} color - Icon color value. * @property {boolean} inline - Applies inline alignment behavior for text contexts. * @property {SkyIconFlip} flip - Flip transform descriptor. * @property {boolean} hFlip - Horizontal flip shortcut. * @property {boolean} vFlip - Vertical flip shortcut. * @property {SkyIconRotateValue} rotate - Rotation descriptor. * @property {boolean} lazy - Defers loading until the icon is visible. * * @method registerLocalSet Registers a local Iconify set for offline/custom usage. * @method registerLocalIcon Registers a single local icon override. * * @csspart icon - The icon container element. * @csspart svg - The rendered SVG element. * * @Behavior * - Resolves icons from local registrations first, then Iconify API. * - Uses bounded in-memory caching for fetched SVG payloads. * - Supports custom slotted SVG fallback when external fetch fails or is blocked. * * @example * ```html * * ``` * ```vue * * ``` * ```jsx * export default function Demo() { * return ; * } * ``` */ export declare class SkyIcon extends LitElement { /** Cache: icon name -> final SVG string (bounded by MAX_ICON_CACHE_SIZE, LRU eviction). */ private static _iconCache; /** Cache for in-flight fetches: icon name -> Promise */ private static _iconPromiseCache; /** Local icon sets (prefix -> Iconify set data) for offline/custom icons */ private static _localSets; /** Single local icons (full name -> icon data) */ private static _localIcons; /** * Register a local icon set (Iconify-compatible JSON) for offline or custom icons. * @param prefix - Set prefix (e.g. "ion", "custom"); use as icon="prefix:iconName". * @param data - Set data with `icons` and optional defaults (width, height, left, top). */ static registerLocalSet(prefix: string, data: IconifySetData): void; /** * Register a single local icon (one-off custom icon without a full set). * @param fullName - Full icon name, e.g. "ion:heart". * @param icon - Icon data (body, width, height, viewBox, etc.). */ static registerLocalIcon(fullName: string, icon: IconifyIcon): void; /** Named prop preset from nearest `sky-config-provider`. */ preset: string; private _presets; static styles: import("lit").CSSResult; icon: string; width: SkyIconSizeValue; height: SkyIconSizeValue; color: string; inline: boolean; flip: SkyIconFlip; hFlip: boolean; vFlip: boolean; rotate: SkyIconRotateValue; lazy: boolean; private _svgContent; private _hasSlottedSvg; private _observer; private _visible; connectedCallback(): void; disconnectedCallback(): void; updated(changed: Map): void; private _onSlotChange; private _startObserver; private _stopObserver; private _setSvgContent; private _loadIcon; private _fetchAndBuild; private _buildSvg; private _normalize; private _rotationDeg; private _flipHas; private _transform; private _baseStyle; render(): import("lit-html").TemplateResult<1>; } export {};