pantoken / formats/icons/src / buildIconResolverChain
Function: buildIconResolverChain()
buildIconResolverChain(
options):IconResolver
Beta
Build the shared icon-resolver chain: plugin rehype resolvers first, then an explicit resolve, then the built-in pantoken icon set. Used by @pantoken/rehype and @pantoken/markdown-it so the resolution order stays identical across renderers.
Parameters
options
Returns
Example
ts
import { buildIconResolverChain } from "@pantoken/icons";
const resolveIcon = buildIconResolverChain({ plugins: [myBrandIconsPlugin] });
resolveIcon("arrow-left"); // { name, svg, viewBox, source } | undefined