@praxisjs/jsx 0.5.4 → 0.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +62 -0
- package/dist/__tests__/jsx-runtime.types.test.js +89 -0
- package/dist/__tests__/jsx-runtime.types.test.js.map +1 -1
- package/dist/dom-types.d.ts +348 -235
- package/dist/dom-types.d.ts.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/jsx-runtime.types.test.ts +193 -0
- package/src/dom-types.ts +360 -242
- package/src/index.ts +1 -0
package/dist/dom-types.d.ts
CHANGED
|
@@ -7,16 +7,16 @@ export type Booleanish = boolean | "true" | "false";
|
|
|
7
7
|
* Widens a string literal union so that any `string` value is assignable
|
|
8
8
|
* while IDE autocomplete still suggests the known members.
|
|
9
9
|
*/
|
|
10
|
-
type LiteralUnion<T extends string> = T | (string & {});
|
|
10
|
+
export type LiteralUnion<T extends string> = T | (string & {});
|
|
11
11
|
export type HTMLInputTypeAttribute = LiteralUnion<"button" | "checkbox" | "color" | "date" | "datetime-local" | "email" | "file" | "hidden" | "image" | "month" | "number" | "password" | "radio" | "range" | "reset" | "search" | "submit" | "tel" | "text" | "time" | "url" | "week">;
|
|
12
12
|
export type ButtonType = LiteralUnion<"submit" | "reset" | "button">;
|
|
13
13
|
export type FormMethod = LiteralUnion<"get" | "post" | "dialog">;
|
|
14
14
|
export type FormEncType = LiteralUnion<"application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain">;
|
|
15
15
|
export type LinkTarget = LiteralUnion<"_self" | "_blank" | "_parent" | "_top">;
|
|
16
16
|
export type ReferrerPolicy = LiteralUnion<"" | "no-referrer" | "no-referrer-when-downgrade" | "origin" | "origin-when-cross-origin" | "same-origin" | "strict-origin" | "strict-origin-when-cross-origin" | "unsafe-url">;
|
|
17
|
-
export type CrossOrigin = "anonymous" | "use-credentials" | ""
|
|
18
|
-
export type Decoding = "async" | "sync" | "auto"
|
|
19
|
-
export type Loading = "eager" | "lazy"
|
|
17
|
+
export type CrossOrigin = LiteralUnion<"anonymous" | "use-credentials" | "">;
|
|
18
|
+
export type Decoding = LiteralUnion<"async" | "sync" | "auto">;
|
|
19
|
+
export type Loading = LiteralUnion<"eager" | "lazy">;
|
|
20
20
|
export type Dir = LiteralUnion<"ltr" | "rtl" | "auto">;
|
|
21
21
|
export type AutoCapitalize = LiteralUnion<"off" | "none" | "on" | "sentences" | "words" | "characters">;
|
|
22
22
|
export type InputMode = LiteralUnion<"none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url">;
|
|
@@ -30,51 +30,57 @@ export type CSSProperties = {
|
|
|
30
30
|
} & Record<`--${string}`, string | number | undefined>;
|
|
31
31
|
export interface AriaAttributes {
|
|
32
32
|
/** Identifies the currently active element when DOM focus is on a composite widget, combobox, textbox, group, or application. */
|
|
33
|
-
"aria-activedescendant"?: string
|
|
33
|
+
"aria-activedescendant"?: Reactive<string>;
|
|
34
34
|
/** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
|
|
35
35
|
"aria-atomic"?: Reactive<Booleanish>;
|
|
36
|
+
/** Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for a combobox, searchbox, or textbox and specifies how predictions would be presented. */
|
|
37
|
+
"aria-autocomplete"?: Reactive<LiteralUnion<"none" | "inline" | "list" | "both">>;
|
|
36
38
|
/** Indicates an element's "busy" status. */
|
|
37
39
|
"aria-busy"?: Reactive<Booleanish>;
|
|
38
40
|
/** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. */
|
|
39
|
-
"aria-checked"?: Reactive<
|
|
41
|
+
"aria-checked"?: Reactive<Booleanish | LiteralUnion<"mixed">>;
|
|
40
42
|
/** Defines the total number of columns in a table, grid, or treegrid. */
|
|
41
|
-
"aria-colcount"?: number
|
|
43
|
+
"aria-colcount"?: Reactive<number>;
|
|
42
44
|
/** Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid. */
|
|
43
|
-
"aria-colindex"?: number
|
|
45
|
+
"aria-colindex"?: Reactive<number>;
|
|
44
46
|
/** Defines a human readable text alternative of aria-colindex. */
|
|
45
|
-
"aria-colindextext"?: string
|
|
47
|
+
"aria-colindextext"?: Reactive<string>;
|
|
46
48
|
/** Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. */
|
|
47
|
-
"aria-colspan"?: number
|
|
49
|
+
"aria-colspan"?: Reactive<number>;
|
|
48
50
|
/** Identifies the element(s) whose contents or presence are controlled by the current element. */
|
|
49
|
-
"aria-controls"?: string
|
|
51
|
+
"aria-controls"?: Reactive<string>;
|
|
50
52
|
/** Indicates the element that represents the current item within a container or set of related elements. */
|
|
51
|
-
"aria-current"?: Reactive<Booleanish | "page" | "step" | "location" | "date" | "time"
|
|
53
|
+
"aria-current"?: Reactive<Booleanish | LiteralUnion<"page" | "step" | "location" | "date" | "time">>;
|
|
52
54
|
/** Identifies the element(s) that describes the object. */
|
|
53
|
-
"aria-describedby"?: string
|
|
55
|
+
"aria-describedby"?: Reactive<string>;
|
|
54
56
|
/** Defines a string value that describes or annotates the current element. */
|
|
55
|
-
"aria-description"?: string
|
|
57
|
+
"aria-description"?: Reactive<string>;
|
|
56
58
|
/** Identifies the element that provides a detailed, extended description for the object. */
|
|
57
|
-
"aria-details"?: string
|
|
59
|
+
"aria-details"?: Reactive<string>;
|
|
58
60
|
/** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. */
|
|
59
61
|
"aria-disabled"?: Reactive<Booleanish>;
|
|
62
|
+
/** Identifies the element that provides an error message for the current element. */
|
|
63
|
+
"aria-errormessage"?: Reactive<string>;
|
|
64
|
+
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
|
|
65
|
+
"aria-expanded"?: Reactive<Booleanish>;
|
|
60
66
|
/** Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion, allows assistive technology to override the general default of reading in document source order. */
|
|
61
|
-
"aria-flowto"?: string
|
|
67
|
+
"aria-flowto"?: Reactive<string>;
|
|
62
68
|
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
|
|
63
|
-
"aria-haspopup"?: Reactive<Booleanish | "menu" | "listbox" | "tree" | "grid" | "dialog"
|
|
69
|
+
"aria-haspopup"?: Reactive<Booleanish | LiteralUnion<"menu" | "listbox" | "tree" | "grid" | "dialog">>;
|
|
64
70
|
/** Indicates whether the element is exposed to an accessibility API. */
|
|
65
71
|
"aria-hidden"?: Reactive<Booleanish>;
|
|
66
72
|
/** Indicates the entered value does not conform to the format expected by the application. */
|
|
67
|
-
"aria-invalid"?: Reactive<Booleanish | "grammar" | "spelling"
|
|
73
|
+
"aria-invalid"?: Reactive<Booleanish | LiteralUnion<"grammar" | "spelling">>;
|
|
68
74
|
/** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
|
|
69
|
-
"aria-keyshortcuts"?: string
|
|
75
|
+
"aria-keyshortcuts"?: Reactive<string>;
|
|
70
76
|
/** Defines a string value that labels the current element. */
|
|
71
77
|
"aria-label"?: Reactive<string>;
|
|
72
78
|
/** Identifies the element(s) that labels the current element. */
|
|
73
|
-
"aria-labelledby"?: string
|
|
79
|
+
"aria-labelledby"?: Reactive<string>;
|
|
74
80
|
/** Defines the hierarchical level of an element within a structure. */
|
|
75
|
-
"aria-level"?: number
|
|
81
|
+
"aria-level"?: Reactive<number>;
|
|
76
82
|
/** Indicates that an element will be updated, and describes the types of updates the user agents, assistive technologies, and user can expect from the live region. */
|
|
77
|
-
"aria-live"?: Reactive<"off" | "assertive" | "polite"
|
|
83
|
+
"aria-live"?: Reactive<LiteralUnion<"off" | "assertive" | "polite">>;
|
|
78
84
|
/** Indicates whether an element is modal when displayed. */
|
|
79
85
|
"aria-modal"?: Reactive<Booleanish>;
|
|
80
86
|
/** Indicates whether a text box accepts multiple lines of input or only a single line. */
|
|
@@ -82,47 +88,47 @@ export interface AriaAttributes {
|
|
|
82
88
|
/** Indicates that the user may select more than one item from the current selectable descendants. */
|
|
83
89
|
"aria-multiselectable"?: Reactive<Booleanish>;
|
|
84
90
|
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
|
|
85
|
-
"aria-orientation"?: "horizontal" | "vertical"
|
|
91
|
+
"aria-orientation"?: Reactive<LiteralUnion<"horizontal" | "vertical">>;
|
|
86
92
|
/** Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship between DOM elements where the DOM hierarchy cannot be used to represent the relationship. */
|
|
87
|
-
"aria-owns"?: string
|
|
93
|
+
"aria-owns"?: Reactive<string>;
|
|
88
94
|
/** Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value. */
|
|
89
|
-
"aria-placeholder"?: string
|
|
95
|
+
"aria-placeholder"?: Reactive<string>;
|
|
90
96
|
/** Defines an element's number or position in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. */
|
|
91
|
-
"aria-posinset"?: number
|
|
97
|
+
"aria-posinset"?: Reactive<number>;
|
|
92
98
|
/** Indicates the current "pressed" state of toggle buttons. */
|
|
93
|
-
"aria-pressed"?: Reactive<
|
|
99
|
+
"aria-pressed"?: Reactive<Booleanish | LiteralUnion<"mixed">>;
|
|
94
100
|
/** Indicates that the element is not editable, but is otherwise operable. */
|
|
95
101
|
"aria-readonly"?: Reactive<Booleanish>;
|
|
96
102
|
/** Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified. */
|
|
97
|
-
"aria-relevant"?: Reactive<"additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals"
|
|
103
|
+
"aria-relevant"?: Reactive<LiteralUnion<"additions" | "additions removals" | "additions text" | "all" | "removals" | "removals additions" | "removals text" | "text" | "text additions" | "text removals">>;
|
|
98
104
|
/** Indicates that user input is required on the element before a form may be submitted. */
|
|
99
105
|
"aria-required"?: Reactive<Booleanish>;
|
|
100
106
|
/** Defines a human-readable, author-localized description for the role of an element. */
|
|
101
|
-
"aria-roledescription"?: string
|
|
107
|
+
"aria-roledescription"?: Reactive<string>;
|
|
102
108
|
/** Defines the total number of rows in a table, grid, or treegrid. */
|
|
103
|
-
"aria-rowcount"?: number
|
|
109
|
+
"aria-rowcount"?: Reactive<number>;
|
|
104
110
|
/** Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid. */
|
|
105
|
-
"aria-rowindex"?: number
|
|
111
|
+
"aria-rowindex"?: Reactive<number>;
|
|
106
112
|
/** Defines a human readable text alternative of aria-rowindex. */
|
|
107
|
-
"aria-rowindextext"?: string
|
|
113
|
+
"aria-rowindextext"?: Reactive<string>;
|
|
108
114
|
/** Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. */
|
|
109
|
-
"aria-rowspan"?: number
|
|
115
|
+
"aria-rowspan"?: Reactive<number>;
|
|
110
116
|
/** Indicates the current "selected" state of various widgets. */
|
|
111
117
|
"aria-selected"?: Reactive<Booleanish>;
|
|
112
118
|
/** Defines the number of items in the current set of listitems or treeitems. Not required if all elements in the set are present in the DOM. */
|
|
113
|
-
"aria-setsize"?: number
|
|
119
|
+
"aria-setsize"?: Reactive<number>;
|
|
114
120
|
/** Indicates if items in a table or grid are sorted in ascending or descending order. */
|
|
115
|
-
"aria-sort"?: "none" | "ascending" | "descending" | "other"
|
|
121
|
+
"aria-sort"?: Reactive<LiteralUnion<"none" | "ascending" | "descending" | "other">>;
|
|
116
122
|
/** Defines the maximum allowed value for a range widget. */
|
|
117
|
-
"aria-valuemax"?: number
|
|
123
|
+
"aria-valuemax"?: Reactive<number>;
|
|
118
124
|
/** Defines the minimum allowed value for a range widget. */
|
|
119
|
-
"aria-valuemin"?: number
|
|
125
|
+
"aria-valuemin"?: Reactive<number>;
|
|
120
126
|
/** Defines the current value for a range widget. */
|
|
121
|
-
"aria-valuenow"?: number
|
|
127
|
+
"aria-valuenow"?: Reactive<number>;
|
|
122
128
|
/** Defines the human readable text alternative of aria-valuenow for a range widget. */
|
|
123
|
-
"aria-valuetext"?: string
|
|
129
|
+
"aria-valuetext"?: Reactive<string>;
|
|
124
130
|
/** Defines the ARIA role of the element. */
|
|
125
|
-
role?: LiteralUnion<"alert" | "alertdialog" | "application" | "article" | "banner" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "dialog" | "directory" | "document" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "meter" | "navigation" | "none" | "note" | "option" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem"
|
|
131
|
+
role?: Reactive<LiteralUnion<"alert" | "alertdialog" | "application" | "article" | "banner" | "button" | "cell" | "checkbox" | "columnheader" | "combobox" | "complementary" | "contentinfo" | "definition" | "dialog" | "directory" | "document" | "feed" | "figure" | "form" | "generic" | "grid" | "gridcell" | "group" | "heading" | "img" | "link" | "list" | "listbox" | "listitem" | "log" | "main" | "marquee" | "math" | "menu" | "menubar" | "menuitem" | "menuitemcheckbox" | "menuitemradio" | "meter" | "navigation" | "none" | "note" | "option" | "presentation" | "progressbar" | "radio" | "radiogroup" | "region" | "row" | "rowgroup" | "rowheader" | "scrollbar" | "search" | "searchbox" | "separator" | "slider" | "spinbutton" | "status" | "switch" | "tab" | "table" | "tablist" | "tabpanel" | "term" | "textbox" | "timer" | "toolbar" | "tooltip" | "tree" | "treegrid" | "treeitem">>;
|
|
126
132
|
}
|
|
127
133
|
/** Narrows `currentTarget` to the actual host element type `T`. */
|
|
128
134
|
type NativeEventOf<E extends Event, T extends EventTarget> = E & {
|
|
@@ -141,6 +147,10 @@ export interface DOMAttributes<T extends EventTarget = EventTarget> {
|
|
|
141
147
|
onMouseEnter?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
142
148
|
onMouseLeave?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
143
149
|
onMouseMove?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
150
|
+
/** Fires when the pointer moves over an element or its children (bubbles). */
|
|
151
|
+
onMouseOver?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
152
|
+
/** Fires when the pointer moves out of an element or its children (bubbles). */
|
|
153
|
+
onMouseOut?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
144
154
|
onContextMenu?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
145
155
|
onKeyDown?: (e: NativeEventOf<KeyboardEvent, T>) => void;
|
|
146
156
|
onKeyUp?: (e: NativeEventOf<KeyboardEvent, T>) => void;
|
|
@@ -148,19 +158,44 @@ export interface DOMAttributes<T extends EventTarget = EventTarget> {
|
|
|
148
158
|
onKeyPress?: (e: NativeEventOf<KeyboardEvent, T>) => void;
|
|
149
159
|
onFocus?: (e: NativeEventOf<FocusEvent, T>) => void;
|
|
150
160
|
onBlur?: (e: NativeEventOf<FocusEvent, T>) => void;
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
161
|
+
onPointerDown?: (e: NativeEventOf<PointerEvent, T>) => void;
|
|
162
|
+
onPointerUp?: (e: NativeEventOf<PointerEvent, T>) => void;
|
|
163
|
+
onPointerMove?: (e: NativeEventOf<PointerEvent, T>) => void;
|
|
164
|
+
onPointerEnter?: (e: NativeEventOf<PointerEvent, T>) => void;
|
|
165
|
+
onPointerLeave?: (e: NativeEventOf<PointerEvent, T>) => void;
|
|
166
|
+
onPointerOver?: (e: NativeEventOf<PointerEvent, T>) => void;
|
|
167
|
+
onPointerOut?: (e: NativeEventOf<PointerEvent, T>) => void;
|
|
168
|
+
onPointerCancel?: (e: NativeEventOf<PointerEvent, T>) => void;
|
|
169
|
+
onGotPointerCapture?: (e: NativeEventOf<PointerEvent, T>) => void;
|
|
170
|
+
onLostPointerCapture?: (e: NativeEventOf<PointerEvent, T>) => void;
|
|
171
|
+
onTouchStart?: (e: NativeEventOf<TouchEvent, T>) => void;
|
|
172
|
+
onTouchEnd?: (e: NativeEventOf<TouchEvent, T>) => void;
|
|
173
|
+
onTouchMove?: (e: NativeEventOf<TouchEvent, T>) => void;
|
|
174
|
+
onDrag?: (e: NativeEventOf<DragEvent, T>) => void;
|
|
155
175
|
onDragStart?: (e: NativeEventOf<DragEvent, T>) => void;
|
|
156
176
|
onDragEnd?: (e: NativeEventOf<DragEvent, T>) => void;
|
|
177
|
+
onDragEnter?: (e: NativeEventOf<DragEvent, T>) => void;
|
|
178
|
+
onDragLeave?: (e: NativeEventOf<DragEvent, T>) => void;
|
|
157
179
|
onDragOver?: (e: NativeEventOf<DragEvent, T>) => void;
|
|
158
180
|
onDrop?: (e: NativeEventOf<DragEvent, T>) => void;
|
|
159
|
-
onTouchStart?: (e: NativeEventOf<TouchEvent, T>) => void;
|
|
160
|
-
onTouchEnd?: (e: NativeEventOf<TouchEvent, T>) => void;
|
|
161
|
-
onTouchMove?: (e: NativeEventOf<TouchEvent, T>) => void;
|
|
162
181
|
onScroll?: (e: NativeEventOf<Event, T>) => void;
|
|
182
|
+
onScrollEnd?: (e: NativeEventOf<Event, T>) => void;
|
|
163
183
|
onWheel?: (e: NativeEventOf<WheelEvent, T>) => void;
|
|
184
|
+
onChange?: (e: NativeEventOf<Event, T>) => void;
|
|
185
|
+
onInput?: (e: NativeEventOf<InputEvent, T>) => void;
|
|
186
|
+
onBeforeInput?: (e: NativeEventOf<InputEvent, T>) => void;
|
|
187
|
+
onSubmit?: (e: NativeEventOf<SubmitEvent, T>) => void;
|
|
188
|
+
onReset?: (e: NativeEventOf<Event, T>) => void;
|
|
189
|
+
onSelect?: (e: NativeEventOf<Event, T>) => void;
|
|
190
|
+
onInvalid?: (e: NativeEventOf<Event, T>) => void;
|
|
191
|
+
onCopy?: (e: NativeEventOf<ClipboardEvent, T>) => void;
|
|
192
|
+
onCut?: (e: NativeEventOf<ClipboardEvent, T>) => void;
|
|
193
|
+
onPaste?: (e: NativeEventOf<ClipboardEvent, T>) => void;
|
|
194
|
+
onCompositionStart?: (e: NativeEventOf<CompositionEvent, T>) => void;
|
|
195
|
+
onCompositionUpdate?: (e: NativeEventOf<CompositionEvent, T>) => void;
|
|
196
|
+
onCompositionEnd?: (e: NativeEventOf<CompositionEvent, T>) => void;
|
|
197
|
+
onLoad?: (e: NativeEventOf<Event, T>) => void;
|
|
198
|
+
onError?: (e: NativeEventOf<Event, T>) => void;
|
|
164
199
|
onAnimationEnd?: (e: NativeEventOf<AnimationEvent, T>) => void;
|
|
165
200
|
onTransitionEnd?: (e: NativeEventOf<TransitionEvent, T>) => void;
|
|
166
201
|
}
|
|
@@ -173,92 +208,112 @@ export interface HTMLAttributes<T extends Element = HTMLElement> extends AriaAtt
|
|
|
173
208
|
title?: Reactive<string>;
|
|
174
209
|
lang?: Reactive<string>;
|
|
175
210
|
dir?: Reactive<Dir>;
|
|
176
|
-
slot
|
|
211
|
+
/** Web Components named-slot assignment. */
|
|
212
|
+
slot?: Reactive<string>;
|
|
213
|
+
accessKey?: Reactive<string>;
|
|
214
|
+
/** Content Security Policy nonce. Single-use: browsers blank this out after first read. */
|
|
215
|
+
nonce?: string;
|
|
177
216
|
hidden?: Reactive<boolean>;
|
|
178
217
|
tabIndex?: Reactive<number>;
|
|
179
218
|
draggable?: Reactive<boolean>;
|
|
180
|
-
|
|
219
|
+
/**
|
|
220
|
+
* Autofocus on mount (global HTML5 attribute). One-shot by spec — the browser
|
|
221
|
+
* only consults this at insertion time, so it is not reactive.
|
|
222
|
+
*/
|
|
223
|
+
autoFocus?: boolean;
|
|
224
|
+
contentEditable?: Reactive<Booleanish | LiteralUnion<"inherit" | "plaintext-only">>;
|
|
181
225
|
spellcheck?: Reactive<Booleanish>;
|
|
182
|
-
translate?: "yes" | "no"
|
|
226
|
+
translate?: Reactive<LiteralUnion<"yes" | "no">>;
|
|
227
|
+
/** Marks the element as inert — blocks all user interaction and assistive technology. */
|
|
228
|
+
inert?: Reactive<boolean>;
|
|
229
|
+
/** Declares the element as a popover. Use `"auto"` (default, light-dismiss) or `"manual"`. */
|
|
230
|
+
popover?: Reactive<boolean | LiteralUnion<"auto" | "manual">>;
|
|
231
|
+
/** CSS `::part()` export list for shadow DOM styling. */
|
|
232
|
+
part?: Reactive<string>;
|
|
183
233
|
inputMode?: Reactive<InputMode>;
|
|
184
234
|
enterKeyHint?: Reactive<EnterKeyHint>;
|
|
185
235
|
autoCapitalize?: Reactive<AutoCapitalize>;
|
|
186
236
|
autoCorrect?: Reactive<string>;
|
|
187
237
|
innerHTML?: Reactive<string>;
|
|
188
|
-
itemID?: string
|
|
189
|
-
itemProp?: string
|
|
190
|
-
itemRef?: string
|
|
191
|
-
itemScope?: boolean
|
|
192
|
-
itemType?: string
|
|
238
|
+
itemID?: Reactive<string>;
|
|
239
|
+
itemProp?: Reactive<string>;
|
|
240
|
+
itemRef?: Reactive<string>;
|
|
241
|
+
itemScope?: Reactive<boolean>;
|
|
242
|
+
itemType?: Reactive<string>;
|
|
243
|
+
/**
|
|
244
|
+
* Customized built-in element name (`is="my-button"`). Fixed at
|
|
245
|
+
* `document.createElement(tag, { is })` time — cannot change post-construction.
|
|
246
|
+
*/
|
|
193
247
|
is?: string;
|
|
194
248
|
key?: string | number | symbol;
|
|
195
249
|
ref?: (el: T) => void;
|
|
196
250
|
children?: Children;
|
|
251
|
+
[key: `data-${string}`]: Reactive<string | number | boolean> | undefined;
|
|
197
252
|
}
|
|
198
253
|
export interface BaseHTMLAttributes<T extends HTMLBaseElement = HTMLBaseElement> extends HTMLAttributes<T> {
|
|
199
|
-
href?: string
|
|
200
|
-
target?: LinkTarget
|
|
254
|
+
href?: Reactive<string>;
|
|
255
|
+
target?: Reactive<LinkTarget>;
|
|
201
256
|
}
|
|
202
257
|
export interface LinkHTMLAttributes<T extends HTMLLinkElement = HTMLLinkElement> extends HTMLAttributes<T> {
|
|
203
|
-
as?: LiteralUnion<"audio" | "document" | "embed" | "fetch" | "font" | "image" | "object" | "script" | "style" | "track" | "video" | "worker"
|
|
204
|
-
crossOrigin?: CrossOrigin
|
|
205
|
-
href?: string
|
|
206
|
-
hrefLang?: string
|
|
207
|
-
integrity?: string
|
|
208
|
-
media?: string
|
|
209
|
-
referrerPolicy?: ReferrerPolicy
|
|
210
|
-
rel?: string
|
|
211
|
-
sizes?: string
|
|
212
|
-
type?: string
|
|
213
|
-
charSet?: string
|
|
258
|
+
as?: Reactive<LiteralUnion<"audio" | "document" | "embed" | "fetch" | "font" | "image" | "object" | "script" | "style" | "track" | "video" | "worker">>;
|
|
259
|
+
crossOrigin?: Reactive<CrossOrigin>;
|
|
260
|
+
href?: Reactive<string>;
|
|
261
|
+
hrefLang?: Reactive<string>;
|
|
262
|
+
integrity?: Reactive<string>;
|
|
263
|
+
media?: Reactive<string>;
|
|
264
|
+
referrerPolicy?: Reactive<ReferrerPolicy>;
|
|
265
|
+
rel?: Reactive<string>;
|
|
266
|
+
sizes?: Reactive<string>;
|
|
267
|
+
type?: Reactive<string>;
|
|
268
|
+
charSet?: Reactive<string>;
|
|
214
269
|
}
|
|
215
270
|
export interface MetaHTMLAttributes<T extends HTMLMetaElement = HTMLMetaElement> extends HTMLAttributes<T> {
|
|
216
|
-
charSet?: string
|
|
217
|
-
content?: string
|
|
218
|
-
httpEquiv?: string
|
|
219
|
-
name?: string
|
|
220
|
-
media?: string
|
|
271
|
+
charSet?: Reactive<string>;
|
|
272
|
+
content?: Reactive<string>;
|
|
273
|
+
httpEquiv?: Reactive<string>;
|
|
274
|
+
name?: Reactive<string>;
|
|
275
|
+
media?: Reactive<string>;
|
|
221
276
|
}
|
|
222
277
|
export interface ScriptHTMLAttributes<T extends HTMLScriptElement = HTMLScriptElement> extends HTMLAttributes<T> {
|
|
223
|
-
async?: boolean
|
|
224
|
-
crossOrigin?: CrossOrigin
|
|
225
|
-
defer?: boolean
|
|
226
|
-
integrity?: string
|
|
227
|
-
noModule?: boolean
|
|
228
|
-
referrerPolicy?: ReferrerPolicy
|
|
229
|
-
src?: string
|
|
230
|
-
type?: string
|
|
231
|
-
charSet?: string
|
|
278
|
+
async?: Reactive<boolean>;
|
|
279
|
+
crossOrigin?: Reactive<CrossOrigin>;
|
|
280
|
+
defer?: Reactive<boolean>;
|
|
281
|
+
integrity?: Reactive<string>;
|
|
282
|
+
noModule?: Reactive<boolean>;
|
|
283
|
+
referrerPolicy?: Reactive<ReferrerPolicy>;
|
|
284
|
+
src?: Reactive<string>;
|
|
285
|
+
type?: Reactive<string>;
|
|
286
|
+
charSet?: Reactive<string>;
|
|
232
287
|
}
|
|
233
288
|
export interface StyleHTMLAttributes<T extends HTMLStyleElement = HTMLStyleElement> extends HTMLAttributes<T> {
|
|
234
|
-
media?: string
|
|
235
|
-
scoped?: boolean
|
|
236
|
-
type?: string
|
|
289
|
+
media?: Reactive<string>;
|
|
290
|
+
scoped?: Reactive<boolean>;
|
|
291
|
+
type?: Reactive<string>;
|
|
237
292
|
}
|
|
238
293
|
export interface BlockquoteHTMLAttributes<T extends HTMLQuoteElement = HTMLQuoteElement> extends HTMLAttributes<T> {
|
|
239
|
-
cite?: string
|
|
294
|
+
cite?: Reactive<string>;
|
|
240
295
|
}
|
|
241
296
|
export interface OlHTMLAttributes<T extends HTMLOListElement = HTMLOListElement> extends HTMLAttributes<T> {
|
|
242
|
-
reversed?: boolean
|
|
243
|
-
start?: number
|
|
244
|
-
type?: LiteralUnion<"1" | "a" | "A" | "i" | "I"
|
|
297
|
+
reversed?: Reactive<boolean>;
|
|
298
|
+
start?: Reactive<number>;
|
|
299
|
+
type?: Reactive<LiteralUnion<"1" | "a" | "A" | "i" | "I">>;
|
|
245
300
|
}
|
|
246
301
|
export interface LiHTMLAttributes<T extends HTMLLIElement = HTMLLIElement> extends HTMLAttributes<T> {
|
|
247
|
-
value?: number
|
|
302
|
+
value?: Reactive<number>;
|
|
248
303
|
}
|
|
249
304
|
export interface MenuHTMLAttributes<T extends HTMLMenuElement = HTMLMenuElement> extends HTMLAttributes<T> {
|
|
250
|
-
type?: string
|
|
305
|
+
type?: Reactive<string>;
|
|
251
306
|
}
|
|
252
307
|
export interface AnchorHTMLAttributes<T extends HTMLAnchorElement = HTMLAnchorElement> extends HTMLAttributes<T> {
|
|
253
308
|
download?: Reactive<string | boolean>;
|
|
254
309
|
href?: Reactive<string>;
|
|
255
|
-
hrefLang?: string
|
|
256
|
-
media?: string
|
|
257
|
-
ping?: string
|
|
258
|
-
referrerPolicy?: ReferrerPolicy
|
|
259
|
-
rel?: string
|
|
310
|
+
hrefLang?: Reactive<string>;
|
|
311
|
+
media?: Reactive<string>;
|
|
312
|
+
ping?: Reactive<string>;
|
|
313
|
+
referrerPolicy?: Reactive<ReferrerPolicy>;
|
|
314
|
+
rel?: Reactive<string>;
|
|
260
315
|
target?: Reactive<LinkTarget>;
|
|
261
|
-
type?: string
|
|
316
|
+
type?: Reactive<string>;
|
|
262
317
|
}
|
|
263
318
|
export interface DataHTMLAttributes<T extends HTMLDataElement = HTMLDataElement> extends HTMLAttributes<T> {
|
|
264
319
|
value?: Reactive<string | number>;
|
|
@@ -267,288 +322,337 @@ export interface TimeHTMLAttributes<T extends HTMLTimeElement = HTMLTimeElement>
|
|
|
267
322
|
dateTime?: Reactive<string>;
|
|
268
323
|
}
|
|
269
324
|
export interface ImgHTMLAttributes<T extends HTMLImageElement = HTMLImageElement> extends HTMLAttributes<T> {
|
|
270
|
-
alt?: string
|
|
271
|
-
crossOrigin?: CrossOrigin
|
|
272
|
-
decoding?: Decoding
|
|
325
|
+
alt?: Reactive<string>;
|
|
326
|
+
crossOrigin?: Reactive<CrossOrigin>;
|
|
327
|
+
decoding?: Reactive<Decoding>;
|
|
273
328
|
height?: Reactive<number | string>;
|
|
274
|
-
loading?: Loading
|
|
275
|
-
referrerPolicy?: ReferrerPolicy
|
|
276
|
-
sizes?: string
|
|
329
|
+
loading?: Reactive<Loading>;
|
|
330
|
+
referrerPolicy?: Reactive<ReferrerPolicy>;
|
|
331
|
+
sizes?: Reactive<string>;
|
|
277
332
|
src?: Reactive<string>;
|
|
278
333
|
srcSet?: Reactive<string>;
|
|
279
|
-
useMap?: string
|
|
334
|
+
useMap?: Reactive<string>;
|
|
280
335
|
width?: Reactive<number | string>;
|
|
281
|
-
fetchPriority?: "high" | "low" | "auto"
|
|
336
|
+
fetchPriority?: Reactive<LiteralUnion<"high" | "low" | "auto">>;
|
|
282
337
|
}
|
|
283
338
|
export interface IframeHTMLAttributes<T extends HTMLIFrameElement = HTMLIFrameElement> extends HTMLAttributes<T> {
|
|
284
|
-
allow?: string
|
|
339
|
+
allow?: Reactive<string>;
|
|
285
340
|
allowFullScreen?: Reactive<boolean>;
|
|
286
341
|
height?: Reactive<number | string>;
|
|
287
|
-
loading?: Loading
|
|
288
|
-
name?: string
|
|
289
|
-
referrerPolicy?: ReferrerPolicy
|
|
342
|
+
loading?: Reactive<Loading>;
|
|
343
|
+
name?: Reactive<string>;
|
|
344
|
+
referrerPolicy?: Reactive<ReferrerPolicy>;
|
|
290
345
|
sandbox?: Reactive<string>;
|
|
291
346
|
src?: Reactive<string>;
|
|
292
|
-
srcDoc?: string
|
|
347
|
+
srcDoc?: Reactive<string>;
|
|
293
348
|
title?: Reactive<string>;
|
|
294
349
|
width?: Reactive<number | string>;
|
|
295
350
|
}
|
|
296
351
|
export interface EmbedHTMLAttributes<T extends HTMLEmbedElement = HTMLEmbedElement> extends HTMLAttributes<T> {
|
|
297
352
|
height?: Reactive<number | string>;
|
|
298
353
|
src?: Reactive<string>;
|
|
299
|
-
type?: string
|
|
354
|
+
type?: Reactive<string>;
|
|
300
355
|
width?: Reactive<number | string>;
|
|
301
356
|
}
|
|
302
357
|
export interface ObjectHTMLAttributes<T extends HTMLObjectElement = HTMLObjectElement> extends HTMLAttributes<T> {
|
|
303
|
-
data?: string
|
|
304
|
-
form?: string
|
|
358
|
+
data?: Reactive<string>;
|
|
359
|
+
form?: Reactive<string>;
|
|
305
360
|
height?: Reactive<number | string>;
|
|
306
|
-
name?: string
|
|
307
|
-
type?: string
|
|
308
|
-
useMap?: string
|
|
361
|
+
name?: Reactive<string>;
|
|
362
|
+
type?: Reactive<string>;
|
|
363
|
+
useMap?: Reactive<string>;
|
|
309
364
|
width?: Reactive<number | string>;
|
|
310
365
|
}
|
|
311
366
|
export interface SourceHTMLAttributes<T extends HTMLSourceElement = HTMLSourceElement> extends HTMLAttributes<T> {
|
|
312
367
|
height?: Reactive<number | string>;
|
|
313
|
-
media?: string
|
|
314
|
-
sizes?: string
|
|
368
|
+
media?: Reactive<string>;
|
|
369
|
+
sizes?: Reactive<string>;
|
|
315
370
|
src?: Reactive<string>;
|
|
316
371
|
srcSet?: Reactive<string>;
|
|
317
|
-
type?: string
|
|
372
|
+
type?: Reactive<string>;
|
|
318
373
|
width?: Reactive<number | string>;
|
|
319
374
|
}
|
|
320
375
|
export interface TrackHTMLAttributes<T extends HTMLTrackElement = HTMLTrackElement> extends HTMLAttributes<T> {
|
|
321
|
-
default?: boolean
|
|
322
|
-
kind?: LiteralUnion<"subtitles" | "captions" | "descriptions" | "chapters" | "metadata"
|
|
323
|
-
label?: string
|
|
324
|
-
src?: string
|
|
325
|
-
srcLang?: string
|
|
376
|
+
default?: Reactive<boolean>;
|
|
377
|
+
kind?: Reactive<LiteralUnion<"subtitles" | "captions" | "descriptions" | "chapters" | "metadata">>;
|
|
378
|
+
label?: Reactive<string>;
|
|
379
|
+
src?: Reactive<string>;
|
|
380
|
+
srcLang?: Reactive<string>;
|
|
326
381
|
}
|
|
327
382
|
export interface MediaHTMLAttributes<T extends HTMLMediaElement = HTMLMediaElement> extends HTMLAttributes<T> {
|
|
383
|
+
/**
|
|
384
|
+
* One-shot by spec — the browser only consults `autoplay` at insertion
|
|
385
|
+
* time, so it is not reactive.
|
|
386
|
+
*/
|
|
328
387
|
autoPlay?: boolean;
|
|
329
388
|
controls?: Reactive<boolean>;
|
|
330
|
-
controlsList?: string
|
|
331
|
-
crossOrigin?: CrossOrigin
|
|
389
|
+
controlsList?: Reactive<string>;
|
|
390
|
+
crossOrigin?: Reactive<CrossOrigin>;
|
|
332
391
|
loop?: Reactive<boolean>;
|
|
333
|
-
mediaGroup?: string
|
|
392
|
+
mediaGroup?: Reactive<string>;
|
|
334
393
|
muted?: Reactive<boolean>;
|
|
335
|
-
playsInline?: boolean
|
|
336
|
-
preload?: LiteralUnion<"none" | "metadata" | "auto"
|
|
394
|
+
playsInline?: Reactive<boolean>;
|
|
395
|
+
preload?: Reactive<LiteralUnion<"none" | "metadata" | "auto">>;
|
|
337
396
|
src?: Reactive<string>;
|
|
397
|
+
onAbort?: (e: NativeEventOf<Event, T>) => void;
|
|
398
|
+
onCanPlay?: (e: NativeEventOf<Event, T>) => void;
|
|
399
|
+
onCanPlayThrough?: (e: NativeEventOf<Event, T>) => void;
|
|
400
|
+
onDurationChange?: (e: NativeEventOf<Event, T>) => void;
|
|
401
|
+
onEmptied?: (e: NativeEventOf<Event, T>) => void;
|
|
402
|
+
onEnded?: (e: NativeEventOf<Event, T>) => void;
|
|
403
|
+
onLoadedData?: (e: NativeEventOf<Event, T>) => void;
|
|
404
|
+
onLoadedMetadata?: (e: NativeEventOf<Event, T>) => void;
|
|
405
|
+
onLoadStart?: (e: NativeEventOf<Event, T>) => void;
|
|
406
|
+
onPause?: (e: NativeEventOf<Event, T>) => void;
|
|
407
|
+
onPlay?: (e: NativeEventOf<Event, T>) => void;
|
|
408
|
+
onPlaying?: (e: NativeEventOf<Event, T>) => void;
|
|
409
|
+
onProgress?: (e: NativeEventOf<ProgressEvent, T>) => void;
|
|
410
|
+
onRateChange?: (e: NativeEventOf<Event, T>) => void;
|
|
411
|
+
onSeeked?: (e: NativeEventOf<Event, T>) => void;
|
|
412
|
+
onSeeking?: (e: NativeEventOf<Event, T>) => void;
|
|
413
|
+
onStalled?: (e: NativeEventOf<Event, T>) => void;
|
|
414
|
+
onSuspend?: (e: NativeEventOf<Event, T>) => void;
|
|
415
|
+
onTimeUpdate?: (e: NativeEventOf<Event, T>) => void;
|
|
416
|
+
onVolumeChange?: (e: NativeEventOf<Event, T>) => void;
|
|
417
|
+
onWaiting?: (e: NativeEventOf<Event, T>) => void;
|
|
338
418
|
}
|
|
339
419
|
export type AudioHTMLAttributes<T extends HTMLAudioElement = HTMLAudioElement> = MediaHTMLAttributes<T>;
|
|
340
420
|
export interface VideoHTMLAttributes<T extends HTMLVideoElement = HTMLVideoElement> extends MediaHTMLAttributes<T> {
|
|
341
421
|
height?: Reactive<number | string>;
|
|
342
|
-
playsInline?: boolean
|
|
422
|
+
playsInline?: Reactive<boolean>;
|
|
343
423
|
poster?: Reactive<string>;
|
|
344
424
|
width?: Reactive<number | string>;
|
|
345
|
-
disablePictureInPicture?: boolean
|
|
346
|
-
disableRemotePlayback?: boolean
|
|
425
|
+
disablePictureInPicture?: Reactive<boolean>;
|
|
426
|
+
disableRemotePlayback?: Reactive<boolean>;
|
|
347
427
|
}
|
|
348
428
|
export interface CanvasHTMLAttributes<T extends HTMLCanvasElement = HTMLCanvasElement> extends HTMLAttributes<T> {
|
|
349
429
|
height?: Reactive<number | string>;
|
|
350
430
|
width?: Reactive<number | string>;
|
|
351
431
|
}
|
|
352
432
|
export interface MapHTMLAttributes<T extends HTMLMapElement = HTMLMapElement> extends HTMLAttributes<T> {
|
|
353
|
-
name?: string
|
|
433
|
+
name?: Reactive<string>;
|
|
354
434
|
}
|
|
355
435
|
export interface AreaHTMLAttributes<T extends HTMLAreaElement = HTMLAreaElement> extends HTMLAttributes<T> {
|
|
356
|
-
alt?: string
|
|
357
|
-
coords?: string
|
|
358
|
-
download?: string
|
|
436
|
+
alt?: Reactive<string>;
|
|
437
|
+
coords?: Reactive<string>;
|
|
438
|
+
download?: Reactive<string | boolean>;
|
|
359
439
|
href?: Reactive<string>;
|
|
360
|
-
hrefLang?: string
|
|
361
|
-
media?: string
|
|
362
|
-
referrerPolicy?: ReferrerPolicy
|
|
363
|
-
rel?: string
|
|
364
|
-
shape?: string
|
|
440
|
+
hrefLang?: Reactive<string>;
|
|
441
|
+
media?: Reactive<string>;
|
|
442
|
+
referrerPolicy?: Reactive<ReferrerPolicy>;
|
|
443
|
+
rel?: Reactive<string>;
|
|
444
|
+
shape?: Reactive<string>;
|
|
365
445
|
target?: Reactive<LinkTarget>;
|
|
366
446
|
}
|
|
367
447
|
export interface FormHTMLAttributes<T extends HTMLFormElement = HTMLFormElement> extends HTMLAttributes<T> {
|
|
368
|
-
acceptCharset?: string
|
|
448
|
+
acceptCharset?: Reactive<string>;
|
|
369
449
|
action?: Reactive<string>;
|
|
370
|
-
autoComplete?: string
|
|
371
|
-
encType?: FormEncType
|
|
372
|
-
method?: FormMethod
|
|
373
|
-
name?: string
|
|
374
|
-
noValidate?: boolean
|
|
375
|
-
target?: LinkTarget
|
|
376
|
-
rel?: string
|
|
450
|
+
autoComplete?: Reactive<string>;
|
|
451
|
+
encType?: Reactive<FormEncType>;
|
|
452
|
+
method?: Reactive<FormMethod>;
|
|
453
|
+
name?: Reactive<string>;
|
|
454
|
+
noValidate?: Reactive<boolean>;
|
|
455
|
+
target?: Reactive<LinkTarget>;
|
|
456
|
+
rel?: Reactive<string>;
|
|
377
457
|
}
|
|
378
458
|
export interface FieldsetHTMLAttributes<T extends HTMLFieldSetElement = HTMLFieldSetElement> extends HTMLAttributes<T> {
|
|
379
459
|
disabled?: Reactive<boolean>;
|
|
380
|
-
form?: string
|
|
381
|
-
name?: string
|
|
460
|
+
form?: Reactive<string>;
|
|
461
|
+
name?: Reactive<string>;
|
|
382
462
|
}
|
|
383
463
|
export interface InputHTMLAttributes<T extends HTMLInputElement = HTMLInputElement> extends HTMLAttributes<T> {
|
|
384
|
-
accept?: string
|
|
385
|
-
alt?: string
|
|
386
|
-
autoComplete?: LiteralUnion<string
|
|
464
|
+
accept?: Reactive<string>;
|
|
465
|
+
alt?: Reactive<string>;
|
|
466
|
+
autoComplete?: Reactive<LiteralUnion<string>>;
|
|
467
|
+
/**
|
|
468
|
+
* Autofocus on mount. One-shot by spec — the browser only consults this
|
|
469
|
+
* at insertion time, so it is not reactive.
|
|
470
|
+
*/
|
|
387
471
|
autoFocus?: boolean;
|
|
388
|
-
capture?: boolean | LiteralUnion<"user" | "environment"
|
|
472
|
+
capture?: Reactive<boolean | LiteralUnion<"user" | "environment">>;
|
|
389
473
|
checked?: Reactive<boolean>;
|
|
390
|
-
crossOrigin?: CrossOrigin
|
|
474
|
+
crossOrigin?: Reactive<CrossOrigin>;
|
|
475
|
+
/** Uncontrolled-baseline value, set once on mount — not reactive. */
|
|
391
476
|
defaultChecked?: boolean;
|
|
477
|
+
/** Uncontrolled-baseline value, set once on mount — not reactive. */
|
|
392
478
|
defaultValue?: string | number | readonly string[];
|
|
393
|
-
dirName?: string
|
|
479
|
+
dirName?: Reactive<string>;
|
|
394
480
|
disabled?: Reactive<boolean>;
|
|
395
481
|
enterKeyHint?: Reactive<EnterKeyHint>;
|
|
396
|
-
form?: string
|
|
397
|
-
formAction?: string
|
|
398
|
-
formEncType?: FormEncType
|
|
399
|
-
formMethod?: FormMethod
|
|
400
|
-
formNoValidate?: boolean
|
|
401
|
-
formTarget?: string
|
|
482
|
+
form?: Reactive<string>;
|
|
483
|
+
formAction?: Reactive<string>;
|
|
484
|
+
formEncType?: Reactive<FormEncType>;
|
|
485
|
+
formMethod?: Reactive<FormMethod>;
|
|
486
|
+
formNoValidate?: Reactive<boolean>;
|
|
487
|
+
formTarget?: Reactive<string>;
|
|
402
488
|
height?: Reactive<number | string>;
|
|
403
|
-
list?: string
|
|
489
|
+
list?: Reactive<string>;
|
|
404
490
|
max?: Reactive<number | string>;
|
|
405
|
-
maxLength?: number
|
|
491
|
+
maxLength?: Reactive<number>;
|
|
406
492
|
min?: Reactive<number | string>;
|
|
407
|
-
minLength?: number
|
|
408
|
-
multiple?: boolean
|
|
409
|
-
name?: string
|
|
410
|
-
pattern?: string
|
|
493
|
+
minLength?: Reactive<number>;
|
|
494
|
+
multiple?: Reactive<boolean>;
|
|
495
|
+
name?: Reactive<string>;
|
|
496
|
+
pattern?: Reactive<string>;
|
|
411
497
|
placeholder?: Reactive<string>;
|
|
412
498
|
readOnly?: Reactive<boolean>;
|
|
413
499
|
required?: Reactive<boolean>;
|
|
414
|
-
size?: number
|
|
415
|
-
src?: string
|
|
500
|
+
size?: Reactive<number>;
|
|
501
|
+
src?: Reactive<string>;
|
|
416
502
|
step?: Reactive<number | string>;
|
|
417
503
|
type?: Reactive<HTMLInputTypeAttribute>;
|
|
418
504
|
value?: Reactive<string | number | readonly string[]>;
|
|
419
505
|
width?: Reactive<number | string>;
|
|
506
|
+
popovertarget?: Reactive<string>;
|
|
507
|
+
popovertargetaction?: Reactive<LiteralUnion<"hide" | "show" | "toggle">>;
|
|
420
508
|
}
|
|
421
509
|
export interface ButtonHTMLAttributes<T extends HTMLButtonElement = HTMLButtonElement> extends HTMLAttributes<T> {
|
|
510
|
+
/**
|
|
511
|
+
* Autofocus on mount. One-shot by spec — the browser only consults this
|
|
512
|
+
* at insertion time, so it is not reactive.
|
|
513
|
+
*/
|
|
422
514
|
autoFocus?: boolean;
|
|
423
515
|
disabled?: Reactive<boolean>;
|
|
424
|
-
form?: string
|
|
425
|
-
formAction?: string
|
|
426
|
-
formEncType?: FormEncType
|
|
427
|
-
formMethod?: FormMethod
|
|
428
|
-
formNoValidate?: boolean
|
|
429
|
-
formTarget?: string
|
|
430
|
-
name?: string
|
|
516
|
+
form?: Reactive<string>;
|
|
517
|
+
formAction?: Reactive<string>;
|
|
518
|
+
formEncType?: Reactive<FormEncType>;
|
|
519
|
+
formMethod?: Reactive<FormMethod>;
|
|
520
|
+
formNoValidate?: Reactive<boolean>;
|
|
521
|
+
formTarget?: Reactive<string>;
|
|
522
|
+
name?: Reactive<string>;
|
|
431
523
|
type?: Reactive<ButtonType>;
|
|
432
524
|
value?: Reactive<string>;
|
|
433
|
-
popovertarget?: string
|
|
434
|
-
popovertargetaction?: LiteralUnion<"hide" | "show" | "toggle"
|
|
525
|
+
popovertarget?: Reactive<string>;
|
|
526
|
+
popovertargetaction?: Reactive<LiteralUnion<"hide" | "show" | "toggle">>;
|
|
435
527
|
}
|
|
436
528
|
export interface LabelHTMLAttributes<T extends HTMLLabelElement = HTMLLabelElement> extends HTMLAttributes<T> {
|
|
437
|
-
form?: string
|
|
438
|
-
htmlFor?: string
|
|
529
|
+
form?: Reactive<string>;
|
|
530
|
+
htmlFor?: Reactive<string>;
|
|
439
531
|
/** DOM attribute alias for `htmlFor`. */
|
|
440
|
-
for?: string
|
|
532
|
+
for?: Reactive<string>;
|
|
441
533
|
}
|
|
442
534
|
export interface SelectHTMLAttributes<T extends HTMLSelectElement = HTMLSelectElement> extends HTMLAttributes<T> {
|
|
443
|
-
autoComplete?: string
|
|
535
|
+
autoComplete?: Reactive<string>;
|
|
536
|
+
/**
|
|
537
|
+
* Autofocus on mount. One-shot by spec — the browser only consults this
|
|
538
|
+
* at insertion time, so it is not reactive.
|
|
539
|
+
*/
|
|
444
540
|
autoFocus?: boolean;
|
|
445
541
|
disabled?: Reactive<boolean>;
|
|
446
|
-
form?: string
|
|
447
|
-
multiple?: boolean
|
|
448
|
-
name?: string
|
|
542
|
+
form?: Reactive<string>;
|
|
543
|
+
multiple?: Reactive<boolean>;
|
|
544
|
+
name?: Reactive<string>;
|
|
449
545
|
required?: Reactive<boolean>;
|
|
450
|
-
size?: number
|
|
546
|
+
size?: Reactive<number>;
|
|
451
547
|
value?: Reactive<string | number | readonly string[]>;
|
|
452
548
|
}
|
|
453
549
|
export interface OptgroupHTMLAttributes<T extends HTMLOptGroupElement = HTMLOptGroupElement> extends HTMLAttributes<T> {
|
|
454
550
|
disabled?: Reactive<boolean>;
|
|
455
|
-
label?: string
|
|
551
|
+
label?: Reactive<string>;
|
|
456
552
|
}
|
|
457
553
|
export interface OptionHTMLAttributes<T extends HTMLOptionElement = HTMLOptionElement> extends HTMLAttributes<T> {
|
|
458
554
|
disabled?: Reactive<boolean>;
|
|
459
|
-
label?: string
|
|
555
|
+
label?: Reactive<string>;
|
|
460
556
|
selected?: Reactive<boolean>;
|
|
461
557
|
value?: Reactive<string | number>;
|
|
462
558
|
}
|
|
463
559
|
export interface OutputHTMLAttributes<T extends HTMLOutputElement = HTMLOutputElement> extends HTMLAttributes<T> {
|
|
464
|
-
form?: string
|
|
465
|
-
htmlFor?: string
|
|
466
|
-
name?: string
|
|
560
|
+
form?: Reactive<string>;
|
|
561
|
+
htmlFor?: Reactive<string>;
|
|
562
|
+
name?: Reactive<string>;
|
|
467
563
|
}
|
|
468
564
|
export interface TextareaHTMLAttributes<T extends HTMLTextAreaElement = HTMLTextAreaElement> extends HTMLAttributes<T> {
|
|
469
|
-
autoComplete?: string
|
|
565
|
+
autoComplete?: Reactive<string>;
|
|
566
|
+
/**
|
|
567
|
+
* Autofocus on mount. One-shot by spec — the browser only consults this
|
|
568
|
+
* at insertion time, so it is not reactive.
|
|
569
|
+
*/
|
|
470
570
|
autoFocus?: boolean;
|
|
471
|
-
cols?: number
|
|
571
|
+
cols?: Reactive<number>;
|
|
572
|
+
/** Uncontrolled-baseline value, set once on mount — not reactive. */
|
|
472
573
|
defaultValue?: string;
|
|
473
|
-
dirName?: string
|
|
574
|
+
dirName?: Reactive<string>;
|
|
474
575
|
disabled?: Reactive<boolean>;
|
|
475
|
-
form?: string
|
|
476
|
-
maxLength?: number
|
|
477
|
-
minLength?: number
|
|
478
|
-
name?: string
|
|
576
|
+
form?: Reactive<string>;
|
|
577
|
+
maxLength?: Reactive<number>;
|
|
578
|
+
minLength?: Reactive<number>;
|
|
579
|
+
name?: Reactive<string>;
|
|
479
580
|
placeholder?: Reactive<string>;
|
|
480
581
|
readOnly?: Reactive<boolean>;
|
|
481
582
|
required?: Reactive<boolean>;
|
|
482
|
-
rows?: number
|
|
583
|
+
rows?: Reactive<number>;
|
|
483
584
|
value?: Reactive<string>;
|
|
484
|
-
wrap?: LiteralUnion<"hard" | "soft" | "off"
|
|
585
|
+
wrap?: Reactive<LiteralUnion<"hard" | "soft" | "off">>;
|
|
485
586
|
}
|
|
486
587
|
export interface MeterHTMLAttributes<T extends HTMLMeterElement = HTMLMeterElement> extends HTMLAttributes<T> {
|
|
487
|
-
form?: string
|
|
488
|
-
high?: number
|
|
489
|
-
low?: number
|
|
588
|
+
form?: Reactive<string>;
|
|
589
|
+
high?: Reactive<number>;
|
|
590
|
+
low?: Reactive<number>;
|
|
490
591
|
max?: Reactive<number | string>;
|
|
491
592
|
min?: Reactive<number | string>;
|
|
492
|
-
optimum?: number
|
|
593
|
+
optimum?: Reactive<number>;
|
|
493
594
|
value?: Reactive<string | number>;
|
|
494
595
|
}
|
|
495
596
|
export interface ProgressHTMLAttributes<T extends HTMLProgressElement = HTMLProgressElement> extends HTMLAttributes<T> {
|
|
496
|
-
max?: number | string
|
|
597
|
+
max?: Reactive<number | string>;
|
|
497
598
|
value?: Reactive<string | number>;
|
|
498
599
|
}
|
|
499
600
|
export type DatalistHTMLAttributes<T extends HTMLDataListElement = HTMLDataListElement> = HTMLAttributes<T>;
|
|
500
601
|
export interface DetailsHTMLAttributes<T extends HTMLDetailsElement = HTMLDetailsElement> extends HTMLAttributes<T> {
|
|
501
602
|
open?: Reactive<boolean>;
|
|
502
|
-
name?: string
|
|
603
|
+
name?: Reactive<string>;
|
|
503
604
|
onToggle?: (e: NativeEventOf<Event, T>) => void;
|
|
605
|
+
onBeforeToggle?: (e: NativeEventOf<Event, T>) => void;
|
|
504
606
|
}
|
|
505
607
|
export interface DialogHTMLAttributes<T extends HTMLDialogElement = HTMLDialogElement> extends HTMLAttributes<T> {
|
|
506
608
|
open?: Reactive<boolean>;
|
|
507
609
|
onClose?: (e: NativeEventOf<Event, T>) => void;
|
|
508
610
|
onCancel?: (e: NativeEventOf<Event, T>) => void;
|
|
611
|
+
onToggle?: (e: NativeEventOf<Event, T>) => void;
|
|
612
|
+
onBeforeToggle?: (e: NativeEventOf<Event, T>) => void;
|
|
509
613
|
}
|
|
510
614
|
export interface SlotHTMLAttributes<T extends HTMLSlotElement = HTMLSlotElement> extends HTMLAttributes<T> {
|
|
511
|
-
name?: string
|
|
615
|
+
name?: Reactive<string>;
|
|
512
616
|
}
|
|
513
617
|
export interface TableHTMLAttributes<T extends HTMLTableElement = HTMLTableElement> extends HTMLAttributes<T> {
|
|
514
|
-
cellPadding?: number | string
|
|
515
|
-
cellSpacing?: number | string
|
|
516
|
-
summary?: string
|
|
517
|
-
width?: number | string
|
|
618
|
+
cellPadding?: Reactive<number | string>;
|
|
619
|
+
cellSpacing?: Reactive<number | string>;
|
|
620
|
+
summary?: Reactive<string>;
|
|
621
|
+
width?: Reactive<number | string>;
|
|
518
622
|
}
|
|
519
623
|
export interface ColHTMLAttributes<T extends HTMLTableColElement = HTMLTableColElement> extends HTMLAttributes<T> {
|
|
520
|
-
span?: number
|
|
521
|
-
width?: number | string
|
|
624
|
+
span?: Reactive<number>;
|
|
625
|
+
width?: Reactive<number | string>;
|
|
522
626
|
}
|
|
523
627
|
export interface ColgroupHTMLAttributes<T extends HTMLTableColElement = HTMLTableColElement> extends HTMLAttributes<T> {
|
|
524
|
-
span?: number
|
|
628
|
+
span?: Reactive<number>;
|
|
525
629
|
}
|
|
526
630
|
export interface TdHTMLAttributes<T extends HTMLTableCellElement = HTMLTableCellElement> extends HTMLAttributes<T> {
|
|
527
|
-
align?: LiteralUnion<"left" | "center" | "right" | "justify" | "char"
|
|
528
|
-
colSpan?: number
|
|
529
|
-
headers?: string
|
|
530
|
-
rowSpan?: number
|
|
531
|
-
scope?: LiteralUnion<"col" | "row" | "colgroup" | "rowgroup"
|
|
532
|
-
abbr?: string
|
|
533
|
-
height?: number | string
|
|
534
|
-
width?: number | string
|
|
535
|
-
valign?: LiteralUnion<"top" | "middle" | "bottom" | "baseline"
|
|
631
|
+
align?: Reactive<LiteralUnion<"left" | "center" | "right" | "justify" | "char">>;
|
|
632
|
+
colSpan?: Reactive<number>;
|
|
633
|
+
headers?: Reactive<string>;
|
|
634
|
+
rowSpan?: Reactive<number>;
|
|
635
|
+
scope?: Reactive<LiteralUnion<"col" | "row" | "colgroup" | "rowgroup">>;
|
|
636
|
+
abbr?: Reactive<string>;
|
|
637
|
+
height?: Reactive<number | string>;
|
|
638
|
+
width?: Reactive<number | string>;
|
|
639
|
+
valign?: Reactive<LiteralUnion<"top" | "middle" | "bottom" | "baseline">>;
|
|
536
640
|
}
|
|
537
641
|
export interface ThHTMLAttributes<T extends HTMLTableCellElement = HTMLTableCellElement> extends HTMLAttributes<T> {
|
|
538
|
-
align?: LiteralUnion<"left" | "center" | "right" | "justify" | "char"
|
|
539
|
-
colSpan?: number
|
|
540
|
-
headers?: string
|
|
541
|
-
rowSpan?: number
|
|
542
|
-
scope?: LiteralUnion<"col" | "row" | "colgroup" | "rowgroup"
|
|
543
|
-
abbr?: string
|
|
642
|
+
align?: Reactive<LiteralUnion<"left" | "center" | "right" | "justify" | "char">>;
|
|
643
|
+
colSpan?: Reactive<number>;
|
|
644
|
+
headers?: Reactive<string>;
|
|
645
|
+
rowSpan?: Reactive<number>;
|
|
646
|
+
scope?: Reactive<LiteralUnion<"col" | "row" | "colgroup" | "rowgroup">>;
|
|
647
|
+
abbr?: Reactive<string>;
|
|
544
648
|
}
|
|
545
649
|
export interface DelHTMLAttributes<T extends HTMLModElement = HTMLModElement> extends HTMLAttributes<T> {
|
|
546
|
-
cite?: string
|
|
547
|
-
dateTime?: string
|
|
650
|
+
cite?: Reactive<string>;
|
|
651
|
+
dateTime?: Reactive<string>;
|
|
548
652
|
}
|
|
549
653
|
export interface InsHTMLAttributes<T extends HTMLModElement = HTMLModElement> extends HTMLAttributes<T> {
|
|
550
|
-
cite?: string
|
|
551
|
-
dateTime?: string
|
|
654
|
+
cite?: Reactive<string>;
|
|
655
|
+
dateTime?: Reactive<string>;
|
|
552
656
|
}
|
|
553
657
|
export interface SVGAttributes<T extends Element = SVGElement> extends AriaAttributes, DOMAttributes<T> {
|
|
554
658
|
id?: Reactive<string>;
|
|
@@ -580,6 +684,15 @@ export interface SVGAttributes<T extends Element = SVGElement> extends AriaAttri
|
|
|
580
684
|
mask?: Reactive<string>;
|
|
581
685
|
filter?: Reactive<string>;
|
|
582
686
|
transform?: Reactive<string>;
|
|
687
|
+
cursor?: Reactive<string>;
|
|
688
|
+
/** Controls whether the element can be a hit-test target for pointer events. */
|
|
689
|
+
pointerEvents?: Reactive<LiteralUnion<"none" | "auto" | "visiblePainted" | "visibleFill" | "visibleStroke" | "visible" | "painted" | "fill" | "stroke" | "all">>;
|
|
690
|
+
vectorEffect?: Reactive<LiteralUnion<"none" | "non-scaling-stroke" | "non-scaling-size" | "non-rotation" | "fixed-position">>;
|
|
691
|
+
shapeRendering?: Reactive<LiteralUnion<"auto" | "optimizeSpeed" | "crispEdges" | "geometricPrecision">>;
|
|
692
|
+
textRendering?: Reactive<LiteralUnion<"auto" | "optimizeSpeed" | "optimizeLegibility" | "geometricPrecision">>;
|
|
693
|
+
imageRendering?: Reactive<LiteralUnion<"auto" | "optimizeSpeed" | "optimizeQuality" | "pixelated">>;
|
|
694
|
+
colorInterpolation?: Reactive<LiteralUnion<"auto" | "sRGB" | "linearRGB">>;
|
|
695
|
+
paintOrder?: Reactive<string>;
|
|
583
696
|
x?: Reactive<number | string>;
|
|
584
697
|
y?: Reactive<number | string>;
|
|
585
698
|
width?: Reactive<number | string>;
|