import type { FamilyId, IconCatalog, IconData, IconId, IconLoader, IconRegistry, Manifest } from '../domain'; /** * Only implementation of {@link IconRegistry} in v2, see ADR-0007 for * why it is named plainly `Registry`: it is not a swappable strategy, * it is the single coordination algorithm, see ADR-0004's typology. * * Coordinates a {@link Manifest} (what exists), an {@link IconCatalog} * (what is loaded), and per-family {@link IconLoader}s (how to load), * following the 4-step algorithm from ADR-0004, "Manifest vs Catalog * boundary": * * 1. Ask the Manifest if the id exists. Not there, throw. * 2. In the Catalog already? Done, nothing to do. * 3. Not there, ask the Loader for the id's family to load it. * 4. Hand the result to the Catalog. */ export declare class Registry implements IconRegistry { private readonly manifest; private readonly catalog; private readonly loaders; /** * Families currently being loaded, keyed by family, valued by the * in-flight load promise. See ADR-0004, "Icon lifecycle", * "Concurrency": concurrent {@link ensureLoaded} calls for the same * not-yet-loaded family must share this same promise, never trigger * a second call to that family's loader. Entries are removed once * the load settles, successfully or not, so a later call can retry * a family whose previous load failed (see ADR-0004: retry policy on * FAILED is otherwise left undefined, this at least does not * permanently wedge a family that failed once). */ private readonly loadingFamilies; constructor(manifest: Manifest, catalog: IconCatalog); registerLoader(family: FamilyId, loader: IconLoader): void; ensureLoaded(id: IconId): Promise; get(id: IconId): IconData | null; has(id: IconId): boolean; private ensureFamilyLoaded; private loadFamily; }