Skip to content

pantoken / renderers/web-components/src / RegisterContext

Arayüz: RegisterContext

Alfa

Bir register() çağrısının bir kez oluşturduğu ve her ElementDefinition'e ilettiği paylaşılan durum. Önek-bilgili kayıt adaptörünü, iç içe işaretleme için tag() yardımcıyı, CSS-sınıfı önekini I, Invoker Commands destek bayrağı + yönlendiriciyi, wrapper/variantClass/iconSvg fabrika işlevlerini ve yerel ayar verilerini (strings, locale, dir, firstDay) taşır.

Özellikler

registry

registry: ElementRegistry

Alfa

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


tag

tag: (base) => string

Alfa

Bir temel adı, etkin-önek etikete eşle (iç içe işaretleme için, querySelector, tagName).

Parametreler

base

string

Döndürür

string


I

I: object

Alfa

Satır içi bileşen stilleri için CSS-sınıfı öneki — her zaman instui, etiket önekinden ayrı.

prefix

readonly prefix: "instui"


invokerSupported

invokerSupported: boolean

Alfa

Tarayıcının Invoker Commands API'sini destekleyip desteklemediği (command/commandfor).


onCommand

onCommand: OnCommand

Alfa

Bir hedefin command olaylarını (veya tıklama yedeğini) bir işleyiciye yönlendir.


wrapper

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

Alfa

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).

Parametreler

tag

string

css

string

render

(host) => string

options?
display?

string

invoker?

boolean

Döndürür

void


variantClass

variantClass: (name, host) => string

Alfa

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

Parametreler

name

string

host

HTMLElement

Döndürür

string


iconSvg

iconSvg: (name) => string

Alfa

Bir simge adını satır içi SVG'ye çözümler (bilinmiyorsa boş dize).

Parametreler

name

string

Döndürür

string


locale

locale: string

Alfa

toLocaleDateString ve Intl biçimlendirmeleri için kullanılan BCP47 yerel etiket.


dir

dir: "ltr" | "rtl"

Alfa

Etkin yerel paketinden türetilen metin yönü.


firstDay

firstDay: number

Alfa

Haftanın ilk günü olarak JS Date.getDay() indeksi (0=Pazar … 6=Cumartesi).


strings

strings: WebComponentStrings

Alfa

Tüm davranışsal öğeler için çevrilmiş kullanıcı arayüzü dizeleri.