Documentation navigation

Published API · 0.1.0-rc.1

foldkit · html

Published foldkit API declarations for html.

./html

@wsagency/wseffect-foldkit · MIT · source · MIT license · WS-AGENCY-NOTICE · THIRD-PARTY-NOTICES

This entry point is published in @wsagency/wseffect-foldkit@0.1.0-rc.1. Import it from the package subpath shown below; the signatures and documentation are read from the installed package declarations.

import * as Wseffect from '@wsagency/wseffect-foldkit/html'

Exported declarations

Attribute

export type Attribute<Message> = Data.TaggedEnum<{
    Key: {
        readonly value: string;
    };
    Class: {
        readonly value: string;
    };
    Id: {
        readonly value: string;
    };
    Title: {
        readonly value: string;
    };
    Lang: {
        readonly value: string;
    };
    Dir: {
        readonly value: string;
    };
    Tabindex: {
        readonly value: number;
    };
    Hidden: {
        readonly value: boolean;
    };
    Contenteditable: {
        readonly value: string;
    };
    Draggable: {
        readonly value: boolean;
    };
    Accesskey: {
        readonly value: string;
    };
    Translate: {
        readonly value: string;
    };
    Inert: {
        readonly value: boolean;
    };
    Popover: {
        readonly value: string;
    };
    Popovertarget: {
        readonly value: string;
    };
    Popovertargetaction: {
        readonly value: string;
    };
    OnClick: {
        readonly message: Message;
        readonly options?: ClickOptions;
    };
    OnDoubleClick: {
        readonly message: Message;
    };
    OnMouseDown: {
        readonly message: Message;
    };
    OnMouseUp: {
        readonly message: Message;
    };
    OnMouseEnter: {
        readonly message: Message;
    };
    OnMouseLeave: {
        readonly message: Message;
    };
    OnMouseOver: {
        readonly message: Message;
    };
    OnMouseOut: {
        readonly message: Message;
    };
    OnMouseMove: {
        readonly message: Message;
    };
    OnPointerMove: {
        readonly f: (screenX: number, screenY: number, pointerType: string) => Option.Option<Message>;
    };
    OnPointerLeave: {
        readonly f: (pointerType: string) => Option.Option<Message>;
    };
    OnPointerDown: {
        readonly f: (pointerType: string, button: number, screenX: number, screenY: number, timeStamp: number, clientX: number, clientY: number, pointerId: number, target: EventTarget | null) => Option.Option<Message>;
    };
    OnPointerUp: {
        readonly f: (screenX: number, screenY: number, pointerType: string, timeStamp: number) => Option.Option<Message>;
    };
    OnKeyDown: {
        readonly f: (key: string, modifiers: KeyboardModifiers) => Message;
    };
    OnKeyDownPreventDefault: {
        readonly f: (key: string, modifiers: KeyboardModifiers) => Option.Option<Message>;
    };
    OnKeyDownSelf: {
        readonly f: (key: string, modifiers: KeyboardModifiers) => Message;
    };
    OnKeyDownSelfPreventDefault: {
        readonly f: (key: string, modifiers: KeyboardModifiers) => Option.Option<Message>;
    };
    OnKeyDownFocus: {
        readonly f: (key: string, modifiers: KeyboardModifiers) => Option.Option<Readonly<{
            focusSelector: string;
            message: Message;
        }>>;
    };
    OnKeyUp: {
        readonly f: (key: string, modifiers: KeyboardModifiers) => Message;
    };
    OnKeyUpPreventDefault: {
        readonly f: (key: string, modifiers: KeyboardModifiers) => Option.Option<Message>;
    };
    OnKeyPress: {
        readonly f: (key: string, modifiers: KeyboardModifiers) => Message;
    };
    OnFocus: {
        readonly message: Message;
    };
    OnBlur: {
        readonly message: Message;
    };
    OnFocusEnter: {
        readonly message: Message;
    };
    OnFocusLeave: {
        readonly message: Message;
    };
    OnInput: {
        readonly f: (value: string) => Message;
    };
    OnChange: {
        readonly f: (value: string) => Message;
    };
    OnBeforeInput: {
        readonly f: (inputType: string, data: Option.Option<string>) => Message;
    };
    OnBeforeInputPreventDefault: {
        readonly f: (inputType: string, data: Option.Option<string>) => Option.Option<Message>;
    };
    OnFileChange: {
        readonly f: (files: ReadonlyArray<File>) => Message;
    };
    OnSubmit: {
        readonly message: Message;
    };
    OnReset: {
        readonly message: Message;
    };
    OnScroll: {
        readonly f: (scrollTop: number) => Message;
    };
    OnWheel: {
        readonly message: Message;
    };
    OnCopy: {
        readonly message: Message;
    };
    OnCut: {
        readonly message: Message;
    };
    OnPaste: {
        readonly message: Message;
    };
    OnPastePreventDefault: {
        readonly f: (text: string) => Option.Option<Message>;
    };
    OnCopyText: {
        readonly text: string;
    };
    OnCutText: {
        readonly text: string;
        readonly message: Message;
    };
    OnCancel: {
        readonly message: Message;
    };
    OnCancelPreventDefault: {
        readonly maybeCustomEventMessage: Option.Option<Message>;
    };
    OnToggle: {
        readonly f: (isOpen: boolean) => Message;
    };
    OnContextMenu: {
        readonly message: Message;
    };
    OnDragStart: {
        readonly message: Message;
    };
    OnDrag: {
        readonly message: Message;
    };
    OnDragEnd: {
        readonly message: Message;
    };
    OnDragEnter: {
        readonly message: Message;
    };
    OnDragLeave: {
        readonly message: Message;
    };
    OnDragOver: {
        readonly message: Message;
    };
    AllowDrop: {};
    OnDrop: {
        readonly message: Message;
    };
    OnDropFiles: {
        readonly f: (files: ReadonlyArray<File>) => Message;
    };
    OnTouchStart: {
        readonly message: Message;
    };
    OnTouchEnd: {
        readonly message: Message;
    };
    OnTouchMove: {
        readonly message: Message;
    };
    OnTouchCancel: {
        readonly message: Message;
    };
    OnAnimationStart: {
        readonly message: Message;
    };
    OnAnimationEnd: {
        readonly message: Message;
    };
    OnAnimationIteration: {
        readonly message: Message;
    };
    OnTransitionEnd: {
        readonly message: Message;
    };
    OnLoad: {
        readonly message: Message;
    };
    OnError: {
        readonly message: Message;
    };
    OnPlay: {
        readonly message: Message;
    };
    OnPause: {
        readonly message: Message;
    };
    OnEnded: {
        readonly message: Message;
    };
    OnTimeUpdate: {
        readonly message: Message;
    };
    OnVolumeChange: {
        readonly message: Message;
    };
    OnSelect: {
        readonly message: Message;
    };
    Value: {
        readonly value: string;
    };
    Checked: {
        readonly value: boolean;
    };
    Selected: {
        readonly value: boolean;
    };
    Open: {
        readonly value: boolean;
    };
    Placeholder: {
        readonly value: string;
    };
    Name: {
        readonly value: string;
    };
    Disabled: {
        readonly value: boolean;
    };
    Readonly: {
        readonly value: boolean;
    };
    Required: {
        readonly value: boolean;
    };
    Autofocus: {
        readonly value: boolean;
    };
    Spellcheck: {
        readonly value: boolean;
    };
    Autocorrect: {
        readonly value: string;
    };
    Autocapitalize: {
        readonly value: string;
    };
    InputMode: {
        readonly value: string;
    };
    EnterKeyHint: {
        readonly value: string;
    };
    Multiple: {
        readonly value: boolean;
    };
    Type: {
        readonly value: string;
    };
    Accept: {
        readonly value: string;
    };
    Autocomplete: {
        readonly value: string;
    };
    Pattern: {
        readonly value: string;
    };
    Maxlength: {
        readonly value: number;
    };
    Minlength: {
        readonly value: number;
    };
    Size: {
        readonly value: number;
    };
    Cols: {
        readonly value: number;
    };
    Rows: {
        readonly value: number;
    };
    Max: {
        readonly value: string;
    };
    Min: {
        readonly value: string;
    };
    Step: {
        readonly value: string;
    };
    For: {
        readonly value: string;
    };
    Href: {
        readonly value: string;
    };
    Src: {
        readonly value: string;
    };
    Alt: {
        readonly value: string;
    };
    Target: {
        readonly value: string;
    };
    Rel: {
        readonly value: string;
    };
    Download: {
        readonly value: string;
    };
    Action: {
        readonly value: string;
    };
    Method: {
        readonly value: string;
    };
    Enctype: {
        readonly value: string;
    };
    Novalidate: {
        readonly value: boolean;
    };
    Formaction: {
        readonly value: string;
    };
    Formmethod: {
        readonly value: string;
    };
    Formnovalidate: {
        readonly value: boolean;
    };
    Formtarget: {
        readonly value: string;
    };
    Formenctype: {
        readonly value: string;
    };
    Colspan: {
        readonly value: number;
    };
    Rowspan: {
        readonly value: number;
    };
    Scope: {
        readonly value: string;
    };
    Headers: {
        readonly value: string;
    };
    Span: {
        readonly value: number;
    };
    Start: {
        readonly value: number;
    };
    Reversed: {
        readonly value: boolean;
    };
    CiteAttr: {
        readonly value: string;
    };
    Datetime: {
        readonly value: string;
    };
    Wrap: {
        readonly value: string;
    };
    List: {
        readonly value: string;
    };
    FormAttr: {
        readonly value: string;
    };
    LabelAttr: {
        readonly value: string;
    };
    ContentAttr: {
        readonly value: string;
    };
    Charset: {
        readonly value: string;
    };
    HttpEquiv: {
        readonly value: string;
    };
    Srcset: {
        readonly value: string;
    };
    Sizes: {
        readonly value: string;
    };
    Loading: {
        readonly value: string;
    };
    Decoding: {
        readonly value: string;
    };
    Fetchpriority: {
        readonly value: string;
    };
    Crossorigin: {
        readonly value: string;
    };
    Referrerpolicy: {
        readonly value: string;
    };
    Integrity: {
        readonly value: string;
    };
    Hreflang: {
        readonly value: string;
    };
    Ping: {
        readonly value: string;
    };
    Sandbox: {
        readonly value: string;
    };
    Allow: {
        readonly value: string;
    };
    Srcdoc: {
        readonly value: string;
    };
    Autoplay: {
        readonly value: boolean;
    };
    Controls: {
        readonly value: boolean;
    };
    Loop: {
        readonly value: boolean;
    };
    Muted: {
        readonly value: boolean;
    };
    Poster: {
        readonly value: string;
    };
    Preload: {
        readonly value: string;
    };
    Playsinline: {
        readonly value: boolean;
    };
    High: {
        readonly value: number;
    };
    Low: {
        readonly value: number;
    };
    Optimum: {
        readonly value: number;
    };
    Usemap: {
        readonly value: string;
    };
    Ismap: {
        readonly value: boolean;
    };
    Role: {
        readonly value: string;
    };
    AriaLabel: {
        readonly value: string;
    };
    AriaLabelledBy: {
        readonly value: string;
    };
    AriaDescribedBy: {
        readonly value: string;
    };
    AriaHidden: {
        readonly value: boolean;
    };
    AriaExpanded: {
        readonly value: boolean;
    };
    AriaSelected: {
        readonly value: boolean;
    };
    AriaChecked: {
        readonly value: boolean | 'mixed';
    };
    AriaDisabled: {
        readonly value: boolean;
    };
    AriaRequired: {
        readonly value: boolean;
    };
    AriaInvalid: {
        readonly value: boolean;
    };
    AriaLive: {
        readonly value: string;
    };
    AriaControls: {
        readonly value: string;
    };
    AriaCurrent: {
        readonly value: string;
    };
    AriaOrientation: {
        readonly value: string;
    };
    AriaPressed: {
        readonly value: string;
    };
    AriaHasPopup: {
        readonly value: string;
    };
    AriaActiveDescendant: {
        readonly value: string;
    };
    AriaSort: {
        readonly value: string;
    };
    AriaMultiSelectable: {
        readonly value: boolean;
    };
    AriaModal: {
        readonly value: boolean;
    };
    AriaBusy: {
        readonly value: boolean;
    };
    AriaErrorMessage: {
        readonly value: string;
    };
    AriaRoleDescription: {
        readonly value: string;
    };
    AriaAtomic: {
        readonly value: boolean;
    };
    AriaAutocomplete: {
        readonly value: string;
    };
    AriaColcount: {
        readonly value: number;
    };
    AriaColindex: {
        readonly value: number;
    };
    AriaColspan: {
        readonly value: number;
    };
    AriaDescription: {
        readonly value: string;
    };
    AriaDetails: {
        readonly value: string;
    };
    AriaFlowto: {
        readonly value: string;
    };
    AriaKeyshortcuts: {
        readonly value: string;
    };
    AriaLevel: {
        readonly value: number;
    };
    AriaOwns: {
        readonly value: string;
    };
    AriaPlaceholder: {
        readonly value: string;
    };
    AriaPosinset: {
        readonly value: number;
    };
    AriaReadonly: {
        readonly value: boolean;
    };
    AriaRelevant: {
        readonly value: string;
    };
    AriaRowcount: {
        readonly value: number;
    };
    AriaRowindex: {
        readonly value: number;
    };
    AriaRowspan: {
        readonly value: number;
    };
    AriaSetsize: {
        readonly value: number;
    };
    AriaValuemax: {
        readonly value: number;
    };
    AriaValuemin: {
        readonly value: number;
    };
    AriaValuenow: {
        readonly value: number;
    };
    AriaValuetext: {
        readonly value: string;
    };
    Attribute: {
        readonly key: string;
        readonly value: string;
    };
    DataAttribute: {
        readonly key: string;
        readonly value: string;
    };
    Style: {
        readonly value: Record<string, string>;
    };
    InnerHTML: {
        readonly value: string;
    };
    ViewBox: {
        readonly value: string;
    };
    Xmlns: {
        readonly value: string;
    };
    Fill: {
        readonly value: string;
    };
    FillRule: {
        readonly value: string;
    };
    ClipRule: {
        readonly value: string;
    };
    Stroke: {
        readonly value: string;
    };
    StrokeWidth: {
        readonly value: string;
    };
    StrokeLinecap: {
        readonly value: string;
    };
    StrokeLinejoin: {
        readonly value: string;
    };
    D: {
        readonly value: string;
    };
    Cx: {
        readonly value: string;
    };
    Cy: {
        readonly value: string;
    };
    R: {
        readonly value: string;
    };
    X: {
        readonly value: string;
    };
    Y: {
        readonly value: string;
    };
    Width: {
        readonly value: string;
    };
    Height: {
        readonly value: string;
    };
    X1: {
        readonly value: string;
    };
    Y1: {
        readonly value: string;
    };
    X2: {
        readonly value: string;
    };
    Y2: {
        readonly value: string;
    };
    Points: {
        readonly value: string;
    };
    Transform: {
        readonly value: string;
    };
    Opacity: {
        readonly value: string;
    };
    StrokeDasharray: {
        readonly value: string;
    };
    StrokeDashoffset: {
        readonly value: string;
    };
    Dx: {
        readonly value: string;
    };
    Dy: {
        readonly value: string;
    };
    Rotate: {
        readonly value: string;
    };
    TextAnchor: {
        readonly value: string;
    };
    DominantBaseline: {
        readonly value: string;
    };
    AlignmentBaseline: {
        readonly value: string;
    };
    BaselineShift: {
        readonly value: string;
    };
    TextLength: {
        readonly value: string;
    };
    LengthAdjust: {
        readonly value: string;
    };
    FontFamily: {
        readonly value: string;
    };
    FontSize: {
        readonly value: string;
    };
    FontWeight: {
        readonly value: string;
    };
    FontStyle: {
        readonly value: string;
    };
    LetterSpacing: {
        readonly value: string;
    };
    WordSpacing: {
        readonly value: string;
    };
    TextDecoration: {
        readonly value: string;
    };
    WritingMode: {
        readonly value: string;
    };
    Rx: {
        readonly value: string;
    };
    Ry: {
        readonly value: string;
    };
    PathLength: {
        readonly value: string;
    };
    FillOpacity: {
        readonly value: string;
    };
    StrokeOpacity: {
        readonly value: string;
    };
    StrokeMiterlimit: {
        readonly value: string;
    };
    PaintOrder: {
        readonly value: string;
    };
    VectorEffect: {
        readonly value: string;
    };
    Color: {
        readonly value: string;
    };
    Visibility: {
        readonly value: string;
    };
    Display: {
        readonly value: string;
    };
    Overflow: {
        readonly value: string;
    };
    PointerEvents: {
        readonly value: string;
    };
    Cursor: {
        readonly value: string;
    };
    ShapeRendering: {
        readonly value: string;
    };
    TextRendering: {
        readonly value: string;
    };
    ImageRendering: {
        readonly value: string;
    };
    ClipPath: {
        readonly value: string;
    };
    Mask: {
        readonly value: string;
    };
    Filter: {
        readonly value: string;
    };
    ClipPathUnits: {
        readonly value: string;
    };
    MaskUnits: {
        readonly value: string;
    };
    MaskContentUnits: {
        readonly value: string;
    };
    FilterUnits: {
        readonly value: string;
    };
    PrimitiveUnits: {
        readonly value: string;
    };
    Offset: {
        readonly value: string;
    };
    StopColor: {
        readonly value: string;
    };
    StopOpacity: {
        readonly value: string;
    };
    GradientUnits: {
        readonly value: string;
    };
    GradientTransform: {
        readonly value: string;
    };
    SpreadMethod: {
        readonly value: string;
    };
    Fx: {
        readonly value: string;
    };
    Fy: {
        readonly value: string;
    };
    Fr: {
        readonly value: string;
    };
    PatternUnits: {
        readonly value: string;
    };
    PatternContentUnits: {
        readonly value: string;
    };
    PatternTransform: {
        readonly value: string;
    };
    MarkerStart: {
        readonly value: string;
    };
    MarkerMid: {
        readonly value: string;
    };
    MarkerEnd: {
        readonly value: string;
    };
    MarkerWidth: {
        readonly value: string;
    };
    MarkerHeight: {
        readonly value: string;
    };
    MarkerUnits: {
        readonly value: string;
    };
    RefX: {
        readonly value: string;
    };
    RefY: {
        readonly value: string;
    };
    Orient: {
        readonly value: string;
    };
    PreserveAspectRatio: {
        readonly value: string;
    };
    Prop: {
        readonly key: string;
        readonly value: unknown;
    };
    OnCustomEvent: {
        readonly name: string;
        readonly f: (event: CustomEvent<unknown>) => Option.Option<Message>;
    };
    OnMount: {
        readonly action: MountAction<Message, any>;
    };
    OnUnmount: {
        readonly message: Message;
    };
}>;

ChildAttribute

export type ChildAttribute = Readonly<{
    readonly [BRAND]: true;
    readonly attribute: unknown;
    readonly dispatch: DispatchSync;
    readonly resolveUnmount: (message: unknown) => () => void;
    readonly boundaryMappers: ReadonlyArray<(message: unknown) => unknown>;
    readonly resolveMountDispatch?: MountDispatchResolver;
}>;

childAttributes

Captures the current boundary's dispatcher and wraps each attribute so handlers inside it route through that boundary's wrapping chain at event-fire time, even when the attribute is later spread into a parent's element in a different boundary. Submodels call this when publishing attribute groups to a consumer's `toView` slot callback: ```ts // Inside a SubmodelView running in the child's boundary: return viewInputs.toView({ checkbox: childAttributes([ h.OnClick(Toggled()), h.Role('checkbox'), ]), ... }) ``` Without this binding step the consumer's element constructor would process `h.OnClick(Toggled())` using the parent's dispatcher (because the consumer's `toView` runs in the parent's boundary), bypassing the Submodel's `toParentMessage`.

childAttributes: <Attribute>(attributes: ReadonlyArray<Attribute>) => ReadonlyArray<ChildAttribute>

ClickOptions

Declarative controls for an `OnClick` handler. Omitted fields keep the browser default, allow the click to bubble, and leave focus unchanged.

ClickOptions: Schema.Struct<{
    readonly defaultAction: Schema.optional<Schema.Literals<readonly ["Allow", "Prevent"]>>;
    readonly propagation: Schema.optional<Schema.Literals<readonly ["Bubble", "Stop"]>>;
    readonly focusSelector: Schema.optional<Schema.String>;
}>

ClickOptions

Declarative controls for an `OnClick` handler. Omitted fields keep the browser default, allow the click to bubble, and leave focus unchanged.

export type ClickOptions = typeof ClickOptions.Type;

createKeyedLazy

Creates a keyed memoization map for one view function rendered under many keys. Each key gets its own independent cache slot, compared exactly the way `createLazy` compares its single slot: on each render, only the keys whose function reference, dispatch, or arguments changed by reference are recomputed. For example: a list rendering one row view per item, a detail view rendering one entity per route, or one view function rendered at two call sites. Key by the identifier that already gives the rendered thing its DOM identity. A row keyed `todo.id` through `h.keyed` memoizes under `todo.id`; a detail page keyed `post.slug` memoizes under `post.slug`. Reusing that one identifier keeps the memo and the DOM invalidating together. Entries are never evicted, so keys are expected to be bounded, such as an entity registry, a route table, or a fixed set of call sites. A key drawn from something unbounded, such as a search query or a paged cursor, grows the map for the lifetime of the page. If that becomes the shape an app needs, the upgrade path is a variant that drops keys absent from the latest render pass, not a cap on this one. Like `createLazy`, each key's cached VNode must be rendered at a single position in the tree. If the same content needs to appear in multiple positions, give each position its own key.

createKeyedLazy: () => (<Args extends ReadonlyArray<unknown>>(key: PropertyKey, fn: (...args: Args) => VNode | null, args: Args) => VNode | null)

createLazy

Creates a memoization slot for a view function. On each render, if the function reference, dispatchers, Mount render owner, and all arguments are equal to the previous call, the cached VNode is returned without re-running the view function. Snabbdom's `patchVnode` short-circuits when it sees the same VNode reference, so both VNode construction and subtree diffing are skipped. Dispatchers and Mount render ownership are part of the cache key because event handlers and Mounts in the cached VNode close over the frame active when the VNode was built. Returning a VNode built under a different frame would silently misroute events or retain the wrong Mount lifecycle owner. The cached VNode must be rendered at a single position in the tree. Snabbdom tracks the real DOM through each VNode's mutable `.elm` field and assumes one VNode per position. Rendering the same cached VNode at two positions causes patches to collide and can duplicate or misplace DOM nodes. If the same content needs to appear in multiple positions, create one slot per position.

createLazy: () => (<Args extends ReadonlyArray<unknown>>(fn: (...args: Args) => VNode | null, args: Args) => VNode | null)

DefaultAction

Whether an event handler leaves the browser's default action in place or prevents it synchronously.

DefaultAction: Schema.Literals<readonly ["Allow", "Prevent"]>

DefaultAction

Whether an event handler leaves the browser's default action in place or prevents it synchronously.

export type DefaultAction = typeof DefaultAction.Type;

Document

The complete output of a page-owning view. The runtime patches `body` into the application container, writes `title` to `document.title`, and manages the optional document metadata. Supplied `lang` and `dir` values are written to the `<html>` element. An omitted value leaves the current attribute unchanged, including a value from the served HTML or an earlier render. Drive both fields from the Model when the application can switch languages at runtime. `canonical` has no address-bar default. Derive it from the typed route in the Model, where the application can decide which route and query values identify the page. If the view never supplies it, the runtime leaves a served `<link rel="canonical">` unchanged or keeps the document without one. Before the client first writes `canonical` or `ogUrl`, it records the value already present on the corresponding element. A later omission restores that value, or removes the element if the runtime created it. During hydration, the recorded value may be metadata rendered for the initial route. `ogUrl` can be supplied independently; when omitted alongside an explicit `canonical`, it uses that canonical. Server rendering returns only the canonical supplied by the view. It returns `ogUrl` when supplied or falls back to an explicit canonical. This is the return type of a `makeApplication` view. An application embedded at a node should use `makeElement`; its view returns `Html` and never changes the `<head>` or `<html>` element.

export type Document = Readonly<{
    title: string;
    lang?: string;
    dir?: TextDirection;
    canonical?: string;
    ogUrl?: string;
    body: Html;
}>;

EventPropagation

Whether an event continues through its DOM propagation path or stops after the handlers on its current element have run.

EventPropagation: Schema.Literals<readonly ["Bubble", "Stop"]>

EventPropagation

Whether an event continues through its DOM propagation path or stops after the handlers on its current element have run.

export type EventPropagation = typeof EventPropagation.Type;

Html

export type Html = VNode | null;

HtmlBuilder

export type HtmlBuilder<Message> = MessageUniverse<Message> & HtmlElements<Message> & HtmlAttributes<Message> & Readonly<{
    empty: null;
    keyed: KeyedFunction<Message>;
    submodel: <View extends AnySubmodelView>(config: SubmodelConfig<View, Message>) => Html;
}>;

inertHtml

Builder whose Message universe is empty. Its Message type is `never`, so every event-handler constructor is uncallable and nothing built with it can dispatch a Message. Elements, attributes, and keying behave exactly as they do on any other builder, and the markup itself is free to vary with runtime data. Inert describes what the result can do, not how it is computed. Inert to Foldkit's dispatch, not to the browser. A raw DOM attribute still does whatever the browser makes of it, which is exactly how the default crash view gets a working reload button: `h.Attribute('onclick', 'location.reload()')`. What `never` rules out is a Message reaching `update`, not every possible behavior. Use it where no builder is in scope, which in practice means module scope and the frameless renders the framework performs itself: ```ts import { inertHtml as ih } from 'foldkit/html' const PagefindBody = ih.DataAttribute('pagefind-body', '') ``` Attributes it produces are `Attribute<never>`, so they flow into any Message universe by covariance. That makes it the right builder for library code emitting handler-free attribute bundles for arbitrary apps. Inside a view, use the view's own `h` parameter. A view already holds a builder, and reaching past it for this one is the habit that made a caller-chosen Message type possible in the first place.

inertHtml: HtmlBuilder<never>

KeyboardModifiers

Modifier key state extracted from a `KeyboardEvent`.

export type KeyboardModifiers = Readonly<{
    shiftKey: boolean;
    ctrlKey: boolean;
    altKey: boolean;
    metaKey: boolean;
}>;

TagName

Union of all valid HTML, SVG, and MathML tag names.

export type TagName = 'a' | 'abbr' | 'address' | 'area' | 'article' | 'aside' | 'audio' | 'b' | 'base' | 'bdi' | 'bdo' | 'blockquote' | 'body' | 'br' | 'button' | 'canvas' | 'caption' | 'cite' | 'code' | 'col' | 'colgroup' | 'data' | 'datalist' | 'dd' | 'del' | 'details' | 'dfn' | 'dialog' | 'div' | 'dl' | 'dt' | 'em' | 'embed' | 'fieldset' | 'figcaption' | 'figure' | 'footer' | 'form' | 'h1' | 'h2' | 'h3' | 'h4' | 'h5' | 'h6' | 'head' | 'header' | 'hgroup' | 'hr' | 'html' | 'i' | 'iframe' | 'img' | 'input' | 'ins' | 'kbd' | 'label' | 'legend' | 'li' | 'link' | 'main' | 'map' | 'mark' | 'menu' | 'meta' | 'meter' | 'nav' | 'noscript' | 'object' | 'ol' | 'optgroup' | 'option' | 'output' | 'p' | 'picture' | 'portal' | 'pre' | 'progress' | 'q' | 'rp' | 'rt' | 'ruby' | 's' | 'samp' | 'script' | 'search' | 'section' | 'select' | 'slot' | 'small' | 'source' | 'span' | 'strong' | 'style' | 'sub' | 'summary' | 'sup' | 'table' | 'tbody' | 'td' | 'template' | 'textarea' | 'tfoot' | 'th' | 'thead' | 'time' | 'title' | 'tr' | 'track' | 'u' | 'ul' | 'var' | 'video' | 'wbr' | 'animate' | 'animateMotion' | 'animateTransform' | 'circle' | 'clipPath' | 'defs' | 'desc' | 'ellipse' | 'feBlend' | 'feColorMatrix' | 'feComponentTransfer' | 'feComposite' | 'feConvolveMatrix' | 'feDiffuseLighting' | 'feDisplacementMap' | 'feDistantLight' | 'feDropShadow' | 'feFlood' | 'feFuncA' | 'feFuncB' | 'feFuncG' | 'feFuncR' | 'feGaussianBlur' | 'feImage' | 'feMerge' | 'feMergeNode' | 'feMorphology' | 'feOffset' | 'fePointLight' | 'feSpecularLighting' | 'feSpotLight' | 'feTile' | 'feTurbulence' | 'filter' | 'foreignObject' | 'g' | 'image' | 'line' | 'linearGradient' | 'marker' | 'mask' | 'metadata' | 'mpath' | 'path' | 'pattern' | 'polygon' | 'polyline' | 'radialGradient' | 'rect' | 'set' | 'stop' | 'svg' | 'switch' | 'symbol' | 'text' | 'textPath' | 'tspan' | 'use' | 'view' | 'annotation' | 'annotation-xml' | 'math' | 'maction' | 'menclose' | 'merror' | 'mfenced' | 'mfrac' | 'mglyph' | 'mi' | 'mlabeledtr' | 'mlongdiv' | 'mmultiscripts' | 'mn' | 'mo' | 'mover' | 'mpadded' | 'mphantom' | 'mprescripts' | 'mroot' | 'mrow' | 'ms' | 'mscarries' | 'mscarry' | 'msgroup' | 'msline' | 'mspace' | 'msqrt' | 'msrow' | 'mstack' | 'mstyle' | 'msub' | 'msubsup' | 'msup' | 'mtable' | 'mtd' | 'mtext' | 'mtr' | 'munder' | 'munderover' | 'semantics';

TextareaAttribute

An attribute accepted by textarea builders. Textarea content must use `h.Value`; innerHTML does not keep the live value tracking the Model after the field is dirty.

export type TextareaAttribute<Message> = Exclude<Attribute<Message>, Readonly<{
    _tag: 'InnerHTML';
}>>;

TextDirection

Text direction for the document root, applied to `dir` on the `<html>` element. `Auto` defers to the browser's first-strong-character heuristic.

export type TextDirection = typeof TextDirection.Type;

TextDirection

Text direction for the document root, applied to `dir` on the `<html>` element. `Auto` defers to the browser's first-strong-character heuristic.

TextDirection: Schema.Literals<readonly ["Ltr", "Rtl", "Auto"]>