Skip to content

pantoken-root / renderers/web-components/src / RegisterContext

インターフェース: RegisterContext ​

アルファ

register() 呼び出しが一度構築し、すべての ElementDefinition に渡される共有状態。 プレフィックス対応のレジストリアダプタ、ネストされたマークアップ用の tag() ヘルパー、CSS クラス接頭辞 I、Invoker Commands のサポートフラグとルーター、wrapper/variantClass/iconSvg のファクトリ、およびロケールデータ(strings, locale, dir, firstDay)を保持します。

プロパティ ​

registry ​

registry: ElementRegistry

アルファ

The scoped registry: rewrites instui-<base> → the active-prefix tag on get/define.


tag ​

tag: (base) => string

アルファ

ベース名をアクティブプレフィックスのタグにマップします(ネストされたマークアップ、querySelector, tagName 用)。

パラメーター ​

base ​

string

戻り値 ​

string


I ​

I: object

アルファ

インライン化されたコンポーネントシートの CSS クラス接頭辞 — 常に instui で、タグの接頭辞とは別です。

prefix ​

readonly prefix: "instui"


invokerSupported ​

invokerSupported: boolean

アルファ

ブラウザが Invoker Commands API をサポートしているかどうか(command/commandfor)。


onCommand ​

onCommand: OnCommand

アルファ

ターゲットの command イベント(またはクリックフォールバック)をハンドラにルーティングします。


wrapper ​

wrapper: (tag, css, render, options?) => void

アルファ

Define a shadow-DOM element: <style>:host{display}css</style> + markup from render(host). invoker: true forwards the host's popovertarget/command to the inner <button> (IDL).

パラメーター ​

tag ​

string

css ​

string

render ​

(host) => string

options? ​
display? ​

string

invoker? ​

boolean

戻り値 ​

void


variantClass ​

variantClass: (name, host) => string

アルファ

Build a .instui-<name> class with an optional -color-<variant> modifier from variant.

パラメーター ​

name ​

string

host ​

HTMLElement

戻り値 ​

string


iconSvg ​

iconSvg: (name) => string

アルファ

アイコン名をインライン SVG に解決します(不明な場合は空文字列)。

パラメーター ​

name ​

string

戻り値 ​

string


locale ​

locale: string

アルファ

toLocaleDateString と Intl のフォーマットに使用される BCP47 ロケールタグ。


dir ​

dir: "ltr" | "rtl"

アルファ

アクティブなロケールバンドルから導出されたテキストの向き。


firstDay ​

firstDay: number

アルファ

週の最初の日を JS の Date.getDay() インデックスで表します(0=日曜 … 6=土曜)。


strings ​

strings: WebComponentStrings

アルファ

すべての振る舞い要素のための翻訳済み UI 文字列。