/** * TyIcon Web Component * PORTED FROM: clj/ty/components/icon.cljs * SVG icon component with size variants and animations */ import type { IconSize, IconTempo, TyIconElement } from '../types/common.js'; import * as IconRegistry from '../utils/icon-registry.js'; /** * Ty Icon Component * * @example * ```html * * * * ``` */ export declare class TyIcon extends HTMLElement implements TyIconElement { private _name; private _size; private _spin; private _pulse; private _tempo; private _watchId; /** Track currently rendered SVG to avoid unnecessary re-renders */ private _currentSvg; constructor(); static get observedAttributes(): string[]; connectedCallback(): void; disconnectedCallback(): void; attributeChangedCallback(name: string, oldValue: string | null, newValue: string | null): void; get name(): string; set name(value: string); get size(): IconSize | undefined; set size(value: IconSize | undefined); get spin(): boolean; set spin(value: boolean); get pulse(): boolean; set pulse(value: boolean); get tempo(): IconTempo | undefined; set tempo(value: IconTempo | undefined); /** Build CSS classes for the host element */ private buildClasses; /** Update host element classes */ private updateClasses; /** * Render the icon SVG * Smart rendering strategy: * 1. Check memory registry (instant) * 2. If found in memory → render immediately * 3. If not in memory → show NOT_FOUND_ICON immediately (prevents empty state) * 4. Then check cache asynchronously and replace if found * 5. Only re-render if SVG actually changed */ private render; /** * Actually render SVG to shadow DOM * Only updates if content changed to prevent unnecessary reflows */ private renderSvg; } export { IconRegistry }; //# sourceMappingURL=icon.d.ts.map