/** * Opt-in DOM scanner — the `` ergonomics, kept * tree-shakable. Unlike Lucide's zero-arg `createIcons()` (which reaches into a * full internal registry and pulls the whole catalog), this helper holds NO icon * references itself: the caller supplies the `{ key → factory }` map from their * own named imports, so only the icons they wire can ever enter the bundle. * * import { createGeoIcons, Us, Jp } from '@geoicons/vanilla/countries'; * createGeoIcons({ us: Us, jp: Jp }); // only Us + Jp bundled * * Elements whose key is not in the supplied map are left untouched. */ /** Any icon factory (the shape of the generated `Us`, `Jp`, … exports). */ export type IconFactory = (options?: Record) => SVGSVGElement; export interface CreateGeoIconsOptions { /** Attribute to scan for. Default `'data-geoicon'`. */ attr?: string; /** Root to scan within. Default `document`. */ root?: ParentNode; } /** * Replace every `[data-geoicon]` element within `root` with its icon . * * `data-geoicon` is the ONLY data attribute — it names the icon. Everything * visual is done in CSS: icons render at the default 24px / `strokeWidth` 1 / * `currentColor`, and CSS beats those presentation attributes, so a `class` * (copied through) or any selector fully controls `width`/`height`, `color` / * `stroke`, `stroke-width`, and `fill`. `aria-label` is copied through too * (semantics can't live in CSS); `class` and `style` are forwarded as styling * hooks. * * Call again after injecting new DOM (SPA route change, htmx swap) to hydrate * fresh nodes. Browser only. */ export declare function createGeoIcons(icons: Record, options?: CreateGeoIconsOptions): void;