import type { IconSet } from '../types/icon.types'; export interface IconRegistryOptions { /** Default edge length, in px, for icons rendered without an explicit size. */ defaultSize?: number; /** Default CSS colour for rendered icons. `currentColor` lets themes tint them. */ defaultColor?: string; /** Host icons applied at construction. Highest precedence — see the class doc. */ icons?: IconSet; } /** * Resolves icon names to SVG markup, in three layers. * * ``` * overrides (host) ← register() / registerAll() / GridOptions.icons * ↓ falls through to * variant (active theme) ← setVariantIcons(), swapped on every theme change * ↓ falls through to * base (coreIcons) ← the shared default set * ``` * * **Host outranks theme, deliberately.** A variant pack is replaced wholesale * whenever the theme changes; if host registrations lived below it, switching * theme would silently discard an application's own icons. Putting them on top * means a host that overrides `check` keeps that glyph in every theme, while * every name it did *not* override still follows the theme. * * Because a variant pack is partial, an icon it omits falls through to `base` * — so a pack only has to draw the glyphs that carry the theme's identity. * * Note that {@link loadCoreIcons} and `registerAll(coreIcons)` are **not** * interchangeable: the former refills the base layer (the reset), while the * latter would pin the entire core set as host overrides and permanently defeat * every variant pack. */ export declare class IconRegistry { /** Shared defaults. Lowest precedence. */ private base; /** Active variant's pack, or `null` when no variant is applied. */ private variant; /** Host registrations. Highest precedence; never touched by a theme change. */ private readonly overrides; private readonly options; constructor(options?: IconRegistryOptions); /** Default edge length for icons rendered without an explicit size. */ get defaultSize(): number; /** Default CSS colour applied to rendered icons. */ get defaultColor(): string; /** Registers a host icon. Outranks the active variant and the base set. */ register(name: string, svgContent: string): void; /** Registers host icons in bulk. Outranks the active variant and the base set. */ registerAll(iconSet: IconSet): void; /** * Swaps the active variant layer. Pass `null` to clear it (variant `'none'`). * * Replaces the layer wholesale rather than merging, so switching themes never * leaves glyphs behind from the previous one. */ setVariantIcons(icons: IconSet | null): void; has(name: string): boolean; /** Resolves a name through the layer stack: overrides → variant → base. */ get(name: string): string | undefined; /** A flattened snapshot with the same precedence the lookup uses. */ getAll(): Map; /** Removes a name from every layer — "gone" means gone, whichever layer supplied it. */ remove(name: string): void; /** Empties every layer. {@link loadCoreIcons} restores the defaults. */ clear(): void; /** Restores the shared default set into the base layer. The documented reset. */ loadCoreIcons(): void; /** Every resolvable name, across all three layers. */ getNames(): string[]; } //# sourceMappingURL=icon-registry.d.ts.map