Skip to content

pantoken-root / packages/core/src / PantokenPlugin

インターフェース: PantokenPlugin ​

ベータ

pantoken プラグイン。各フックは任意で、プラグインはフックを定義したステージにのみ参加します。したがって同じプラグインは複数のレイヤーに注入できます。

プロパティ ​

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 ステージ:rehype プラグインにマージされるリゾルバーを提供する。

パラメーター ​

ctx ​

RehypeHookContext

戻り値 ​

void | { resolve?: IconResolver; }


native()? ​

optional native(ctx): void

ベータ

ネイティブステージ(Style Dictionary):変換やフォーマットを登録する。

パラメーター ​

ctx ​

unknown

戻り値 ​

void