Skip to content

pantoken-root / packages/core/src / PantokenPlugin

Rhyngwyneb: PantokenPlugin ​

Bêta

Plwg pantoken. Mae pob cêl yn ddewisol; dim ond yn y camau y mae plugyn yn eu diffinio y bydd yn cymryd rhan. Felly gall yr un plugyn chwistrellu ar fwy nag un haen.

Eiddo ​

name ​

name: string

Bêta

Enw plugyn unigryw, darllenadwy gan bobl.

Dulliau ​

tokens()? ​

optional tokens(ctx): void | Token[]

Bêta

Cam token: dychwelyd y rhestr tokenau amnewid lawn.

Paramedrau ​

ctx ​

TokenHookContext

Yn dychwelyd ​

void | Token[]


icons()? ​

optional icons(ctx): void | IconEntry[]

Bêta

Icon stage: return new IconEntry records to register as <image> tokens. Returning undefined or an empty array leaves the current set unchanged.

Paramedrau ​

ctx ​

IconHookContext

Yn dychwelyd ​

void | IconEntry[]


css()? ​

optional css(ctx): void | CssContribution

Bêta

Cam CSS: cyfrannu neu Brosesu ôl CSS.

Paramedrau ​

ctx ​

CssHookContext

Yn dychwelyd ​

void | CssContribution


rehype()? ​

optional rehype(ctx): void | { resolve?: IconResolver; }

Bêta

Cam Rehype: darparu datryswr sy'n cael ei uno i'r plugyn rehype.

Paramedrau ​

ctx ​

RehypeHookContext

Yn dychwelyd ​

void | { resolve?: IconResolver; }


native()? ​

optional native(ctx): void

Bêta

Cam Native (Style Dictionary): cofrestru trawsnewidiadau/fformatiau.

Paramedrau ​

ctx ​

unknown

Yn dychwelyd ​

void