/** * Props accepted by every icon function. * * The four named props are consumed by the renderer; any other key is emitted * verbatim as an attribute on the `` element, so * `{ "aria-hidden": "true" }` renders `aria-hidden="true"`. */ export interface IconProps extends Record { /** Both `width` and `height`. Falls back to the icon's natural size. */ size: number; /** The `class` attribute. Omitted entirely when falsy. */ class: string; /** The `style` attribute. Omitted entirely when falsy. */ style: string; /** * The `stroke-width` attribute. Only honored by stroke-based families * (Bytesize, Feather, Lucide); ignored everywhere else. */ strokeWidth: number; } /** The signature shared by every icon function in this package. */ export type IconFn = (props?: Partial | null) => string; /** * Builds an icon function from the static parts extracted at build time. * * Every generated icon module is a single call to this factory. Hoisting the * renderer here instead of inlining it into each of the ~19k icon modules is * what keeps the package inside JSR's 20 MiB per-version budget. * * @param size Natural size of the icon, used when `props.size` is falsy. * @param strokeWidth Default `stroke-width`, or `null` to omit the attribute * (and ignore `props.strokeWidth`) for fill-based families. * @param head Markup preceding `