Skip to content

pantoken-root / packages/model/src / PantokenPlugin

ממשק: PantokenPlugin ​

בטא

תוסף pantoken. כל hook הוא אופציונלי; תוסף משתתף רק בשלבים שבהם הוא מגדיר hook. לכן אותו תוסף יכול להזריק במספר שכבות.

תכונות ​

name ​

name: string

בטא

שם תוסף ייחודי וקריא לבני אדם.

שיטות ​

tokens()? ​

optional tokens(ctx): void | Token[]

בטא

שלב טוקנים: מחזיר את רשימת הטוקנים החלופית המלאה.

פרמטרים ​

ctx ​

TokenHookContext

מחזיר ​

void | Token[]


icons()? ​

optional icons(ctx): void | IconEntry[]

בטא

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

פרמטרים ​

ctx ​

IconHookContext

מחזיר ​

void | IconEntry[]


css()? ​

optional css(ctx): void | CssContribution

בטא

שלב CSS: לתרום CSS או לבצע עליו עיבוד לאחר מכן.

פרמטרים ​

ctx ​

CssHookContext

מחזיר ​

void | CssContribution


rehype()? ​

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

בטא

שלב Rehype: לספק resolver המשולב בתוך תוסף rehype.

פרמטרים ​

ctx ​

RehypeHookContext

מחזיר ​

void | { resolve?: IconResolver; }


native()? ​

optional native(ctx): void

בטא

שלב Native (Style Dictionary): רישום של transforms/פורמטים.

פרמטרים ​

ctx ​

unknown

מחזיר ​

void