pantoken / packages/model/src / PantokenPlugin
Interface: PantokenPlugin
Beta
A pantoken plugin. Every hook is optional; a plugin participates only in the stages it defines a hook for. The same plugin can therefore inject at more than one layer.
Properties
name
name:
string
Beta
A unique, human-readable plugin name.
Methods
tokens()?
optionaltokens(ctx):void|Token[]
Beta
Token stage: return the full replacement token list (use ctx.define to add).
Parameters
ctx
Returns
void | Token[]
icons()?
optionalicons(ctx):void
Beta
Icon stage: register providers via ctx.add, or wrap ctx.resolve.
Parameters
ctx
Returns
void
css()?
optionalcss(ctx):void|CssContribution
Beta
CSS stage: contribute or post-process CSS.
Parameters
ctx
Returns
void | CssContribution
rehype()?
optionalrehype(ctx):void| {resolve?:IconResolver; }
Beta
Rehype stage: provide a resolver merged into the rehype plugin.
Parameters
ctx
Returns
void | { resolve?: IconResolver; }
native()?
optionalnative(ctx):void
Beta
Native stage (Style Dictionary): register transforms/formats.
Parameters
ctx
unknown
Returns
void