import type { FamilyId, IconCatalog, IconData, IconId } from '../domain'; /** * In-memory implementation of {@link IconCatalog}. Backed by a `Map` * for icons and a `Set` for families marked as loaded. * * Stores what it is given. Does not load anything, does not decide * when it is called, see ADR-0006: `IconCatalog` is a storage * contract, `IconRegistry` is the coordinator. */ export declare class MemoryIconCatalog implements IconCatalog { private readonly icons; private readonly loadedFamilies; /** * @param icons see ADR-0008 for why this is `readonly`. * @throws if any icon's id is already present in the catalog, or if * two icons within the same call share an id. Two icons sharing an * id almost always means a duplicate icon source file or a broken * loader, silently overwriting would hide that. Atomic: validates * the whole batch before inserting anything, a rejected call leaves * the catalog exactly as it was before, no partial insert. */ add(icons: readonly IconData[]): void; get(id: IconId): IconData | null; has(id: IconId): boolean; hasFamily(family: FamilyId): boolean; /** * Marks a family as loaded. Idempotent: calling this more than once * for the same family has no additional effect and never throws. * This was an open question in the {@link IconCatalog} contract, * closed here: see `notes/en/engineering-backlog.md`. */ markFamilyLoaded(family: FamilyId): void; }