/**
* 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