@praxisjs/jsx 0.3.9 → 0.4.0
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 +32 -0
- package/dist/__tests__/jsx-runtime.types.test.d.ts +2 -0
- package/dist/__tests__/jsx-runtime.types.test.d.ts.map +1 -0
- package/dist/__tests__/jsx-runtime.types.test.js +110 -0
- package/dist/__tests__/jsx-runtime.types.test.js.map +1 -0
- package/dist/dom-types.d.ts +637 -0
- package/dist/dom-types.d.ts.map +1 -0
- package/dist/dom-types.js +2 -0
- package/dist/dom-types.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/jsx-runtime.d.ts +147 -193
- package/dist/jsx-runtime.d.ts.map +1 -1
- package/dist/jsx-runtime.js.map +1 -1
- package/package.json +2 -2
- package/src/__tests__/jsx-runtime.types.test.ts +167 -0
- package/src/dom-types.ts +1015 -0
- package/src/index.ts +73 -0
- package/src/jsx-runtime.ts +295 -224
|
@@ -0,0 +1,637 @@
|
|
|
1
|
+
import type { Children } from "@praxisjs/shared";
|
|
2
|
+
/** A value OR a zero-argument function returning that value (for reactive bindings). */
|
|
3
|
+
export type Reactive<T> = T | (() => T);
|
|
4
|
+
/** Boolean that can also be expressed as its string form for HTML attributes. */
|
|
5
|
+
export type Booleanish = boolean | "true" | "false";
|
|
6
|
+
/**
|
|
7
|
+
* Widens a string literal union so that any `string` value is assignable
|
|
8
|
+
* while IDE autocomplete still suggests the known members.
|
|
9
|
+
*/
|
|
10
|
+
type LiteralUnion<T extends string> = T | (string & {});
|
|
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
|
+
export type ButtonType = LiteralUnion<"submit" | "reset" | "button">;
|
|
13
|
+
export type FormMethod = LiteralUnion<"get" | "post" | "dialog">;
|
|
14
|
+
export type FormEncType = LiteralUnion<"application/x-www-form-urlencoded" | "multipart/form-data" | "text/plain">;
|
|
15
|
+
export type LinkTarget = LiteralUnion<"_self" | "_blank" | "_parent" | "_top">;
|
|
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";
|
|
20
|
+
export type Dir = LiteralUnion<"ltr" | "rtl" | "auto">;
|
|
21
|
+
export type AutoCapitalize = LiteralUnion<"off" | "none" | "on" | "sentences" | "words" | "characters">;
|
|
22
|
+
export type InputMode = LiteralUnion<"none" | "text" | "decimal" | "numeric" | "tel" | "search" | "email" | "url">;
|
|
23
|
+
export type EnterKeyHint = LiteralUnion<"enter" | "done" | "go" | "next" | "previous" | "search" | "send">;
|
|
24
|
+
/**
|
|
25
|
+
* Object-style CSS properties accepted by the `style` prop.
|
|
26
|
+
* Supports all camelCase CSS properties and CSS custom properties (`--xxx`).
|
|
27
|
+
*/
|
|
28
|
+
export type CSSProperties = {
|
|
29
|
+
[K in keyof CSSStyleDeclaration as K extends string ? CSSStyleDeclaration[K] extends string ? K : never : never]?: string | number;
|
|
30
|
+
} & Record<`--${string}`, string | number | undefined>;
|
|
31
|
+
export interface AriaAttributes {
|
|
32
|
+
/** Identifies the currently active element when DOM focus is on a composite widget, combobox, textbox, group, or application. */
|
|
33
|
+
"aria-activedescendant"?: string;
|
|
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
|
+
"aria-atomic"?: Reactive<Booleanish>;
|
|
36
|
+
/** Indicates an element's "busy" status. */
|
|
37
|
+
"aria-busy"?: Reactive<Booleanish>;
|
|
38
|
+
/** Indicates the current "checked" state of checkboxes, radio buttons, and other widgets. */
|
|
39
|
+
"aria-checked"?: Reactive<boolean | "true" | "false" | "mixed">;
|
|
40
|
+
/** Defines the total number of columns in a table, grid, or treegrid. */
|
|
41
|
+
"aria-colcount"?: number;
|
|
42
|
+
/** 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;
|
|
44
|
+
/** Defines a human readable text alternative of aria-colindex. */
|
|
45
|
+
"aria-colindextext"?: string;
|
|
46
|
+
/** Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid. */
|
|
47
|
+
"aria-colspan"?: number;
|
|
48
|
+
/** Identifies the element(s) whose contents or presence are controlled by the current element. */
|
|
49
|
+
"aria-controls"?: string;
|
|
50
|
+
/** 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">;
|
|
52
|
+
/** Identifies the element(s) that describes the object. */
|
|
53
|
+
"aria-describedby"?: string;
|
|
54
|
+
/** Defines a string value that describes or annotates the current element. */
|
|
55
|
+
"aria-description"?: string;
|
|
56
|
+
/** Identifies the element that provides a detailed, extended description for the object. */
|
|
57
|
+
"aria-details"?: string;
|
|
58
|
+
/** Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable. */
|
|
59
|
+
"aria-disabled"?: Reactive<Booleanish>;
|
|
60
|
+
/** 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;
|
|
62
|
+
/** 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">;
|
|
64
|
+
/** Indicates whether the element is exposed to an accessibility API. */
|
|
65
|
+
"aria-hidden"?: Reactive<Booleanish>;
|
|
66
|
+
/** Indicates the entered value does not conform to the format expected by the application. */
|
|
67
|
+
"aria-invalid"?: Reactive<Booleanish | "grammar" | "spelling">;
|
|
68
|
+
/** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
|
|
69
|
+
"aria-keyshortcuts"?: string;
|
|
70
|
+
/** Defines a string value that labels the current element. */
|
|
71
|
+
"aria-label"?: Reactive<string>;
|
|
72
|
+
/** Identifies the element(s) that labels the current element. */
|
|
73
|
+
"aria-labelledby"?: string;
|
|
74
|
+
/** Defines the hierarchical level of an element within a structure. */
|
|
75
|
+
"aria-level"?: number;
|
|
76
|
+
/** 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">;
|
|
78
|
+
/** Indicates whether an element is modal when displayed. */
|
|
79
|
+
"aria-modal"?: Reactive<Booleanish>;
|
|
80
|
+
/** Indicates whether a text box accepts multiple lines of input or only a single line. */
|
|
81
|
+
"aria-multiline"?: Reactive<Booleanish>;
|
|
82
|
+
/** Indicates that the user may select more than one item from the current selectable descendants. */
|
|
83
|
+
"aria-multiselectable"?: Reactive<Booleanish>;
|
|
84
|
+
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
|
|
85
|
+
"aria-orientation"?: "horizontal" | "vertical";
|
|
86
|
+
/** 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;
|
|
88
|
+
/** 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;
|
|
90
|
+
/** 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;
|
|
92
|
+
/** Indicates the current "pressed" state of toggle buttons. */
|
|
93
|
+
"aria-pressed"?: Reactive<boolean | "true" | "false" | "mixed">;
|
|
94
|
+
/** Indicates that the element is not editable, but is otherwise operable. */
|
|
95
|
+
"aria-readonly"?: Reactive<Booleanish>;
|
|
96
|
+
/** 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">;
|
|
98
|
+
/** Indicates that user input is required on the element before a form may be submitted. */
|
|
99
|
+
"aria-required"?: Reactive<Booleanish>;
|
|
100
|
+
/** Defines a human-readable, author-localized description for the role of an element. */
|
|
101
|
+
"aria-roledescription"?: string;
|
|
102
|
+
/** Defines the total number of rows in a table, grid, or treegrid. */
|
|
103
|
+
"aria-rowcount"?: number;
|
|
104
|
+
/** 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;
|
|
106
|
+
/** Defines a human readable text alternative of aria-rowindex. */
|
|
107
|
+
"aria-rowindextext"?: string;
|
|
108
|
+
/** Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid. */
|
|
109
|
+
"aria-rowspan"?: number;
|
|
110
|
+
/** Indicates the current "selected" state of various widgets. */
|
|
111
|
+
"aria-selected"?: Reactive<Booleanish>;
|
|
112
|
+
/** 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;
|
|
114
|
+
/** Indicates if items in a table or grid are sorted in ascending or descending order. */
|
|
115
|
+
"aria-sort"?: "none" | "ascending" | "descending" | "other";
|
|
116
|
+
/** Defines the maximum allowed value for a range widget. */
|
|
117
|
+
"aria-valuemax"?: number;
|
|
118
|
+
/** Defines the minimum allowed value for a range widget. */
|
|
119
|
+
"aria-valuemin"?: number;
|
|
120
|
+
/** Defines the current value for a range widget. */
|
|
121
|
+
"aria-valuenow"?: number;
|
|
122
|
+
/** Defines the human readable text alternative of aria-valuenow for a range widget. */
|
|
123
|
+
"aria-valuetext"?: string;
|
|
124
|
+
/** 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">;
|
|
126
|
+
}
|
|
127
|
+
/** Narrows `currentTarget` to the actual host element type `T`. */
|
|
128
|
+
type NativeEventOf<E extends Event, T extends EventTarget> = E & {
|
|
129
|
+
currentTarget: T;
|
|
130
|
+
};
|
|
131
|
+
/**
|
|
132
|
+
* Event handlers that the praxis runtime wires up via EVENT_MAP.
|
|
133
|
+
* Each handler receives the native browser event with `currentTarget`
|
|
134
|
+
* narrowed to the host element type `T`.
|
|
135
|
+
*/
|
|
136
|
+
export interface DOMAttributes<T extends EventTarget = EventTarget> {
|
|
137
|
+
onClick?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
138
|
+
onDblClick?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
139
|
+
onMouseDown?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
140
|
+
onMouseUp?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
141
|
+
onMouseEnter?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
142
|
+
onMouseLeave?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
143
|
+
onMouseMove?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
144
|
+
onContextMenu?: (e: NativeEventOf<MouseEvent, T>) => void;
|
|
145
|
+
onKeyDown?: (e: NativeEventOf<KeyboardEvent, T>) => void;
|
|
146
|
+
onKeyUp?: (e: NativeEventOf<KeyboardEvent, T>) => void;
|
|
147
|
+
/** @deprecated Use onKeyDown instead */
|
|
148
|
+
onKeyPress?: (e: NativeEventOf<KeyboardEvent, T>) => void;
|
|
149
|
+
onFocus?: (e: NativeEventOf<FocusEvent, T>) => void;
|
|
150
|
+
onBlur?: (e: NativeEventOf<FocusEvent, T>) => void;
|
|
151
|
+
onChange?: (e: NativeEventOf<Event, T>) => void;
|
|
152
|
+
onInput?: (e: NativeEventOf<InputEvent, T>) => void;
|
|
153
|
+
onSubmit?: (e: NativeEventOf<SubmitEvent, T>) => void;
|
|
154
|
+
onReset?: (e: NativeEventOf<Event, T>) => void;
|
|
155
|
+
onDragStart?: (e: NativeEventOf<DragEvent, T>) => void;
|
|
156
|
+
onDragEnd?: (e: NativeEventOf<DragEvent, T>) => void;
|
|
157
|
+
onDragOver?: (e: NativeEventOf<DragEvent, T>) => void;
|
|
158
|
+
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
|
+
onScroll?: (e: NativeEventOf<Event, T>) => void;
|
|
163
|
+
onWheel?: (e: NativeEventOf<WheelEvent, T>) => void;
|
|
164
|
+
onAnimationEnd?: (e: NativeEventOf<AnimationEvent, T>) => void;
|
|
165
|
+
onTransitionEnd?: (e: NativeEventOf<TransitionEvent, T>) => void;
|
|
166
|
+
}
|
|
167
|
+
export interface HTMLAttributes<T extends Element = HTMLElement> extends AriaAttributes, DOMAttributes<T> {
|
|
168
|
+
id?: Reactive<string>;
|
|
169
|
+
class?: Reactive<string>;
|
|
170
|
+
/** Alias for `class`. */
|
|
171
|
+
className?: Reactive<string>;
|
|
172
|
+
style?: Reactive<string | CSSProperties>;
|
|
173
|
+
title?: Reactive<string>;
|
|
174
|
+
lang?: Reactive<string>;
|
|
175
|
+
dir?: Reactive<Dir>;
|
|
176
|
+
slot?: string;
|
|
177
|
+
hidden?: Reactive<boolean>;
|
|
178
|
+
tabIndex?: Reactive<number>;
|
|
179
|
+
draggable?: Reactive<boolean>;
|
|
180
|
+
contentEditable?: Reactive<Booleanish | "inherit" | "plaintext-only">;
|
|
181
|
+
spellcheck?: Reactive<Booleanish>;
|
|
182
|
+
translate?: "yes" | "no";
|
|
183
|
+
inputMode?: Reactive<InputMode>;
|
|
184
|
+
enterKeyHint?: Reactive<EnterKeyHint>;
|
|
185
|
+
autoCapitalize?: Reactive<AutoCapitalize>;
|
|
186
|
+
autoCorrect?: Reactive<string>;
|
|
187
|
+
itemID?: string;
|
|
188
|
+
itemProp?: string;
|
|
189
|
+
itemRef?: string;
|
|
190
|
+
itemScope?: boolean;
|
|
191
|
+
itemType?: string;
|
|
192
|
+
is?: string;
|
|
193
|
+
key?: string | number | symbol;
|
|
194
|
+
ref?: (el: T) => void;
|
|
195
|
+
children?: Children;
|
|
196
|
+
}
|
|
197
|
+
export interface BaseHTMLAttributes<T extends HTMLBaseElement = HTMLBaseElement> extends HTMLAttributes<T> {
|
|
198
|
+
href?: string;
|
|
199
|
+
target?: LinkTarget;
|
|
200
|
+
}
|
|
201
|
+
export interface LinkHTMLAttributes<T extends HTMLLinkElement = HTMLLinkElement> extends HTMLAttributes<T> {
|
|
202
|
+
as?: LiteralUnion<"audio" | "document" | "embed" | "fetch" | "font" | "image" | "object" | "script" | "style" | "track" | "video" | "worker">;
|
|
203
|
+
crossOrigin?: CrossOrigin;
|
|
204
|
+
href?: string;
|
|
205
|
+
hrefLang?: string;
|
|
206
|
+
integrity?: string;
|
|
207
|
+
media?: string;
|
|
208
|
+
referrerPolicy?: ReferrerPolicy;
|
|
209
|
+
rel?: string;
|
|
210
|
+
sizes?: string;
|
|
211
|
+
type?: string;
|
|
212
|
+
charSet?: string;
|
|
213
|
+
}
|
|
214
|
+
export interface MetaHTMLAttributes<T extends HTMLMetaElement = HTMLMetaElement> extends HTMLAttributes<T> {
|
|
215
|
+
charSet?: string;
|
|
216
|
+
content?: string;
|
|
217
|
+
httpEquiv?: string;
|
|
218
|
+
name?: string;
|
|
219
|
+
media?: string;
|
|
220
|
+
}
|
|
221
|
+
export interface ScriptHTMLAttributes<T extends HTMLScriptElement = HTMLScriptElement> extends HTMLAttributes<T> {
|
|
222
|
+
async?: boolean;
|
|
223
|
+
crossOrigin?: CrossOrigin;
|
|
224
|
+
defer?: boolean;
|
|
225
|
+
integrity?: string;
|
|
226
|
+
noModule?: boolean;
|
|
227
|
+
referrerPolicy?: ReferrerPolicy;
|
|
228
|
+
src?: string;
|
|
229
|
+
type?: string;
|
|
230
|
+
charSet?: string;
|
|
231
|
+
}
|
|
232
|
+
export interface StyleHTMLAttributes<T extends HTMLStyleElement = HTMLStyleElement> extends HTMLAttributes<T> {
|
|
233
|
+
media?: string;
|
|
234
|
+
scoped?: boolean;
|
|
235
|
+
type?: string;
|
|
236
|
+
}
|
|
237
|
+
export interface BlockquoteHTMLAttributes<T extends HTMLQuoteElement = HTMLQuoteElement> extends HTMLAttributes<T> {
|
|
238
|
+
cite?: string;
|
|
239
|
+
}
|
|
240
|
+
export interface OlHTMLAttributes<T extends HTMLOListElement = HTMLOListElement> extends HTMLAttributes<T> {
|
|
241
|
+
reversed?: boolean;
|
|
242
|
+
start?: number;
|
|
243
|
+
type?: LiteralUnion<"1" | "a" | "A" | "i" | "I">;
|
|
244
|
+
}
|
|
245
|
+
export interface LiHTMLAttributes<T extends HTMLLIElement = HTMLLIElement> extends HTMLAttributes<T> {
|
|
246
|
+
value?: number;
|
|
247
|
+
}
|
|
248
|
+
export interface MenuHTMLAttributes<T extends HTMLMenuElement = HTMLMenuElement> extends HTMLAttributes<T> {
|
|
249
|
+
type?: string;
|
|
250
|
+
}
|
|
251
|
+
export interface AnchorHTMLAttributes<T extends HTMLAnchorElement = HTMLAnchorElement> extends HTMLAttributes<T> {
|
|
252
|
+
download?: Reactive<string | boolean>;
|
|
253
|
+
href?: Reactive<string>;
|
|
254
|
+
hrefLang?: string;
|
|
255
|
+
media?: string;
|
|
256
|
+
ping?: string;
|
|
257
|
+
referrerPolicy?: ReferrerPolicy;
|
|
258
|
+
rel?: string;
|
|
259
|
+
target?: Reactive<LinkTarget>;
|
|
260
|
+
type?: string;
|
|
261
|
+
}
|
|
262
|
+
export interface DataHTMLAttributes<T extends HTMLDataElement = HTMLDataElement> extends HTMLAttributes<T> {
|
|
263
|
+
value?: Reactive<string | number>;
|
|
264
|
+
}
|
|
265
|
+
export interface TimeHTMLAttributes<T extends HTMLTimeElement = HTMLTimeElement> extends HTMLAttributes<T> {
|
|
266
|
+
dateTime?: Reactive<string>;
|
|
267
|
+
}
|
|
268
|
+
export interface ImgHTMLAttributes<T extends HTMLImageElement = HTMLImageElement> extends HTMLAttributes<T> {
|
|
269
|
+
alt?: string;
|
|
270
|
+
crossOrigin?: CrossOrigin;
|
|
271
|
+
decoding?: Decoding;
|
|
272
|
+
height?: Reactive<number | string>;
|
|
273
|
+
loading?: Loading;
|
|
274
|
+
referrerPolicy?: ReferrerPolicy;
|
|
275
|
+
sizes?: string;
|
|
276
|
+
src?: Reactive<string>;
|
|
277
|
+
srcSet?: Reactive<string>;
|
|
278
|
+
useMap?: string;
|
|
279
|
+
width?: Reactive<number | string>;
|
|
280
|
+
fetchPriority?: "high" | "low" | "auto";
|
|
281
|
+
}
|
|
282
|
+
export interface IframeHTMLAttributes<T extends HTMLIFrameElement = HTMLIFrameElement> extends HTMLAttributes<T> {
|
|
283
|
+
allow?: string;
|
|
284
|
+
allowFullScreen?: Reactive<boolean>;
|
|
285
|
+
height?: Reactive<number | string>;
|
|
286
|
+
loading?: Loading;
|
|
287
|
+
name?: string;
|
|
288
|
+
referrerPolicy?: ReferrerPolicy;
|
|
289
|
+
sandbox?: Reactive<string>;
|
|
290
|
+
src?: Reactive<string>;
|
|
291
|
+
srcDoc?: string;
|
|
292
|
+
title?: Reactive<string>;
|
|
293
|
+
width?: Reactive<number | string>;
|
|
294
|
+
}
|
|
295
|
+
export interface EmbedHTMLAttributes<T extends HTMLEmbedElement = HTMLEmbedElement> extends HTMLAttributes<T> {
|
|
296
|
+
height?: Reactive<number | string>;
|
|
297
|
+
src?: Reactive<string>;
|
|
298
|
+
type?: string;
|
|
299
|
+
width?: Reactive<number | string>;
|
|
300
|
+
}
|
|
301
|
+
export interface ObjectHTMLAttributes<T extends HTMLObjectElement = HTMLObjectElement> extends HTMLAttributes<T> {
|
|
302
|
+
data?: string;
|
|
303
|
+
form?: string;
|
|
304
|
+
height?: Reactive<number | string>;
|
|
305
|
+
name?: string;
|
|
306
|
+
type?: string;
|
|
307
|
+
useMap?: string;
|
|
308
|
+
width?: Reactive<number | string>;
|
|
309
|
+
}
|
|
310
|
+
export interface SourceHTMLAttributes<T extends HTMLSourceElement = HTMLSourceElement> extends HTMLAttributes<T> {
|
|
311
|
+
height?: Reactive<number | string>;
|
|
312
|
+
media?: string;
|
|
313
|
+
sizes?: string;
|
|
314
|
+
src?: Reactive<string>;
|
|
315
|
+
srcSet?: Reactive<string>;
|
|
316
|
+
type?: string;
|
|
317
|
+
width?: Reactive<number | string>;
|
|
318
|
+
}
|
|
319
|
+
export interface TrackHTMLAttributes<T extends HTMLTrackElement = HTMLTrackElement> extends HTMLAttributes<T> {
|
|
320
|
+
default?: boolean;
|
|
321
|
+
kind?: LiteralUnion<"subtitles" | "captions" | "descriptions" | "chapters" | "metadata">;
|
|
322
|
+
label?: string;
|
|
323
|
+
src?: string;
|
|
324
|
+
srcLang?: string;
|
|
325
|
+
}
|
|
326
|
+
export interface MediaHTMLAttributes<T extends HTMLMediaElement = HTMLMediaElement> extends HTMLAttributes<T> {
|
|
327
|
+
autoPlay?: boolean;
|
|
328
|
+
controls?: Reactive<boolean>;
|
|
329
|
+
controlsList?: string;
|
|
330
|
+
crossOrigin?: CrossOrigin;
|
|
331
|
+
loop?: Reactive<boolean>;
|
|
332
|
+
mediaGroup?: string;
|
|
333
|
+
muted?: Reactive<boolean>;
|
|
334
|
+
playsInline?: boolean;
|
|
335
|
+
preload?: LiteralUnion<"none" | "metadata" | "auto">;
|
|
336
|
+
src?: Reactive<string>;
|
|
337
|
+
}
|
|
338
|
+
export type AudioHTMLAttributes<T extends HTMLAudioElement = HTMLAudioElement> = MediaHTMLAttributes<T>;
|
|
339
|
+
export interface VideoHTMLAttributes<T extends HTMLVideoElement = HTMLVideoElement> extends MediaHTMLAttributes<T> {
|
|
340
|
+
height?: Reactive<number | string>;
|
|
341
|
+
playsInline?: boolean;
|
|
342
|
+
poster?: Reactive<string>;
|
|
343
|
+
width?: Reactive<number | string>;
|
|
344
|
+
disablePictureInPicture?: boolean;
|
|
345
|
+
disableRemotePlayback?: boolean;
|
|
346
|
+
}
|
|
347
|
+
export interface CanvasHTMLAttributes<T extends HTMLCanvasElement = HTMLCanvasElement> extends HTMLAttributes<T> {
|
|
348
|
+
height?: Reactive<number | string>;
|
|
349
|
+
width?: Reactive<number | string>;
|
|
350
|
+
}
|
|
351
|
+
export interface MapHTMLAttributes<T extends HTMLMapElement = HTMLMapElement> extends HTMLAttributes<T> {
|
|
352
|
+
name?: string;
|
|
353
|
+
}
|
|
354
|
+
export interface AreaHTMLAttributes<T extends HTMLAreaElement = HTMLAreaElement> extends HTMLAttributes<T> {
|
|
355
|
+
alt?: string;
|
|
356
|
+
coords?: string;
|
|
357
|
+
download?: string;
|
|
358
|
+
href?: Reactive<string>;
|
|
359
|
+
hrefLang?: string;
|
|
360
|
+
media?: string;
|
|
361
|
+
referrerPolicy?: ReferrerPolicy;
|
|
362
|
+
rel?: string;
|
|
363
|
+
shape?: string;
|
|
364
|
+
target?: Reactive<LinkTarget>;
|
|
365
|
+
}
|
|
366
|
+
export interface FormHTMLAttributes<T extends HTMLFormElement = HTMLFormElement> extends HTMLAttributes<T> {
|
|
367
|
+
acceptCharset?: string;
|
|
368
|
+
action?: Reactive<string>;
|
|
369
|
+
autoComplete?: string;
|
|
370
|
+
encType?: FormEncType;
|
|
371
|
+
method?: FormMethod;
|
|
372
|
+
name?: string;
|
|
373
|
+
noValidate?: boolean;
|
|
374
|
+
target?: LinkTarget;
|
|
375
|
+
rel?: string;
|
|
376
|
+
}
|
|
377
|
+
export interface FieldsetHTMLAttributes<T extends HTMLFieldSetElement = HTMLFieldSetElement> extends HTMLAttributes<T> {
|
|
378
|
+
disabled?: Reactive<boolean>;
|
|
379
|
+
form?: string;
|
|
380
|
+
name?: string;
|
|
381
|
+
}
|
|
382
|
+
export interface InputHTMLAttributes<T extends HTMLInputElement = HTMLInputElement> extends HTMLAttributes<T> {
|
|
383
|
+
accept?: string;
|
|
384
|
+
alt?: string;
|
|
385
|
+
autoComplete?: LiteralUnion<string>;
|
|
386
|
+
autoFocus?: boolean;
|
|
387
|
+
capture?: boolean | LiteralUnion<"user" | "environment">;
|
|
388
|
+
checked?: Reactive<boolean>;
|
|
389
|
+
crossOrigin?: CrossOrigin;
|
|
390
|
+
defaultChecked?: boolean;
|
|
391
|
+
defaultValue?: string | number | readonly string[];
|
|
392
|
+
dirName?: string;
|
|
393
|
+
disabled?: Reactive<boolean>;
|
|
394
|
+
enterKeyHint?: Reactive<EnterKeyHint>;
|
|
395
|
+
form?: string;
|
|
396
|
+
formAction?: string;
|
|
397
|
+
formEncType?: FormEncType;
|
|
398
|
+
formMethod?: FormMethod;
|
|
399
|
+
formNoValidate?: boolean;
|
|
400
|
+
formTarget?: string;
|
|
401
|
+
height?: Reactive<number | string>;
|
|
402
|
+
list?: string;
|
|
403
|
+
max?: Reactive<number | string>;
|
|
404
|
+
maxLength?: number;
|
|
405
|
+
min?: Reactive<number | string>;
|
|
406
|
+
minLength?: number;
|
|
407
|
+
multiple?: boolean;
|
|
408
|
+
name?: string;
|
|
409
|
+
pattern?: string;
|
|
410
|
+
placeholder?: Reactive<string>;
|
|
411
|
+
readOnly?: Reactive<boolean>;
|
|
412
|
+
required?: Reactive<boolean>;
|
|
413
|
+
size?: number;
|
|
414
|
+
src?: string;
|
|
415
|
+
step?: Reactive<number | string>;
|
|
416
|
+
type?: Reactive<HTMLInputTypeAttribute>;
|
|
417
|
+
value?: Reactive<string | number | readonly string[]>;
|
|
418
|
+
width?: Reactive<number | string>;
|
|
419
|
+
}
|
|
420
|
+
export interface ButtonHTMLAttributes<T extends HTMLButtonElement = HTMLButtonElement> extends HTMLAttributes<T> {
|
|
421
|
+
autoFocus?: boolean;
|
|
422
|
+
disabled?: Reactive<boolean>;
|
|
423
|
+
form?: string;
|
|
424
|
+
formAction?: string;
|
|
425
|
+
formEncType?: FormEncType;
|
|
426
|
+
formMethod?: FormMethod;
|
|
427
|
+
formNoValidate?: boolean;
|
|
428
|
+
formTarget?: string;
|
|
429
|
+
name?: string;
|
|
430
|
+
type?: Reactive<ButtonType>;
|
|
431
|
+
value?: Reactive<string>;
|
|
432
|
+
popovertarget?: string;
|
|
433
|
+
popovertargetaction?: LiteralUnion<"hide" | "show" | "toggle">;
|
|
434
|
+
}
|
|
435
|
+
export interface LabelHTMLAttributes<T extends HTMLLabelElement = HTMLLabelElement> extends HTMLAttributes<T> {
|
|
436
|
+
form?: string;
|
|
437
|
+
htmlFor?: string;
|
|
438
|
+
/** DOM attribute alias for `htmlFor`. */
|
|
439
|
+
for?: string;
|
|
440
|
+
}
|
|
441
|
+
export interface SelectHTMLAttributes<T extends HTMLSelectElement = HTMLSelectElement> extends HTMLAttributes<T> {
|
|
442
|
+
autoComplete?: string;
|
|
443
|
+
autoFocus?: boolean;
|
|
444
|
+
disabled?: Reactive<boolean>;
|
|
445
|
+
form?: string;
|
|
446
|
+
multiple?: boolean;
|
|
447
|
+
name?: string;
|
|
448
|
+
required?: Reactive<boolean>;
|
|
449
|
+
size?: number;
|
|
450
|
+
value?: Reactive<string | number | readonly string[]>;
|
|
451
|
+
}
|
|
452
|
+
export interface OptgroupHTMLAttributes<T extends HTMLOptGroupElement = HTMLOptGroupElement> extends HTMLAttributes<T> {
|
|
453
|
+
disabled?: Reactive<boolean>;
|
|
454
|
+
label?: string;
|
|
455
|
+
}
|
|
456
|
+
export interface OptionHTMLAttributes<T extends HTMLOptionElement = HTMLOptionElement> extends HTMLAttributes<T> {
|
|
457
|
+
disabled?: Reactive<boolean>;
|
|
458
|
+
label?: string;
|
|
459
|
+
selected?: Reactive<boolean>;
|
|
460
|
+
value?: Reactive<string | number>;
|
|
461
|
+
}
|
|
462
|
+
export interface OutputHTMLAttributes<T extends HTMLOutputElement = HTMLOutputElement> extends HTMLAttributes<T> {
|
|
463
|
+
form?: string;
|
|
464
|
+
htmlFor?: string;
|
|
465
|
+
name?: string;
|
|
466
|
+
}
|
|
467
|
+
export interface TextareaHTMLAttributes<T extends HTMLTextAreaElement = HTMLTextAreaElement> extends HTMLAttributes<T> {
|
|
468
|
+
autoComplete?: string;
|
|
469
|
+
autoFocus?: boolean;
|
|
470
|
+
cols?: number;
|
|
471
|
+
defaultValue?: string;
|
|
472
|
+
dirName?: string;
|
|
473
|
+
disabled?: Reactive<boolean>;
|
|
474
|
+
form?: string;
|
|
475
|
+
maxLength?: number;
|
|
476
|
+
minLength?: number;
|
|
477
|
+
name?: string;
|
|
478
|
+
placeholder?: Reactive<string>;
|
|
479
|
+
readOnly?: Reactive<boolean>;
|
|
480
|
+
required?: Reactive<boolean>;
|
|
481
|
+
rows?: number;
|
|
482
|
+
value?: Reactive<string>;
|
|
483
|
+
wrap?: LiteralUnion<"hard" | "soft" | "off">;
|
|
484
|
+
}
|
|
485
|
+
export interface MeterHTMLAttributes<T extends HTMLMeterElement = HTMLMeterElement> extends HTMLAttributes<T> {
|
|
486
|
+
form?: string;
|
|
487
|
+
high?: number;
|
|
488
|
+
low?: number;
|
|
489
|
+
max?: Reactive<number | string>;
|
|
490
|
+
min?: Reactive<number | string>;
|
|
491
|
+
optimum?: number;
|
|
492
|
+
value?: Reactive<string | number>;
|
|
493
|
+
}
|
|
494
|
+
export interface ProgressHTMLAttributes<T extends HTMLProgressElement = HTMLProgressElement> extends HTMLAttributes<T> {
|
|
495
|
+
max?: number | string;
|
|
496
|
+
value?: Reactive<string | number>;
|
|
497
|
+
}
|
|
498
|
+
export type DatalistHTMLAttributes<T extends HTMLDataListElement = HTMLDataListElement> = HTMLAttributes<T>;
|
|
499
|
+
export interface DetailsHTMLAttributes<T extends HTMLDetailsElement = HTMLDetailsElement> extends HTMLAttributes<T> {
|
|
500
|
+
open?: Reactive<boolean>;
|
|
501
|
+
name?: string;
|
|
502
|
+
onToggle?: (e: NativeEventOf<Event, T>) => void;
|
|
503
|
+
}
|
|
504
|
+
export interface DialogHTMLAttributes<T extends HTMLDialogElement = HTMLDialogElement> extends HTMLAttributes<T> {
|
|
505
|
+
open?: Reactive<boolean>;
|
|
506
|
+
onClose?: (e: NativeEventOf<Event, T>) => void;
|
|
507
|
+
onCancel?: (e: NativeEventOf<Event, T>) => void;
|
|
508
|
+
}
|
|
509
|
+
export interface SlotHTMLAttributes<T extends HTMLSlotElement = HTMLSlotElement> extends HTMLAttributes<T> {
|
|
510
|
+
name?: string;
|
|
511
|
+
}
|
|
512
|
+
export interface TableHTMLAttributes<T extends HTMLTableElement = HTMLTableElement> extends HTMLAttributes<T> {
|
|
513
|
+
cellPadding?: number | string;
|
|
514
|
+
cellSpacing?: number | string;
|
|
515
|
+
summary?: string;
|
|
516
|
+
width?: number | string;
|
|
517
|
+
}
|
|
518
|
+
export interface ColHTMLAttributes<T extends HTMLTableColElement = HTMLTableColElement> extends HTMLAttributes<T> {
|
|
519
|
+
span?: number;
|
|
520
|
+
width?: number | string;
|
|
521
|
+
}
|
|
522
|
+
export interface ColgroupHTMLAttributes<T extends HTMLTableColElement = HTMLTableColElement> extends HTMLAttributes<T> {
|
|
523
|
+
span?: number;
|
|
524
|
+
}
|
|
525
|
+
export interface TdHTMLAttributes<T extends HTMLTableCellElement = HTMLTableCellElement> extends HTMLAttributes<T> {
|
|
526
|
+
align?: LiteralUnion<"left" | "center" | "right" | "justify" | "char">;
|
|
527
|
+
colSpan?: number;
|
|
528
|
+
headers?: string;
|
|
529
|
+
rowSpan?: number;
|
|
530
|
+
scope?: LiteralUnion<"col" | "row" | "colgroup" | "rowgroup">;
|
|
531
|
+
abbr?: string;
|
|
532
|
+
height?: number | string;
|
|
533
|
+
width?: number | string;
|
|
534
|
+
valign?: LiteralUnion<"top" | "middle" | "bottom" | "baseline">;
|
|
535
|
+
}
|
|
536
|
+
export interface ThHTMLAttributes<T extends HTMLTableCellElement = HTMLTableCellElement> extends HTMLAttributes<T> {
|
|
537
|
+
align?: LiteralUnion<"left" | "center" | "right" | "justify" | "char">;
|
|
538
|
+
colSpan?: number;
|
|
539
|
+
headers?: string;
|
|
540
|
+
rowSpan?: number;
|
|
541
|
+
scope?: LiteralUnion<"col" | "row" | "colgroup" | "rowgroup">;
|
|
542
|
+
abbr?: string;
|
|
543
|
+
}
|
|
544
|
+
export interface DelHTMLAttributes<T extends HTMLModElement = HTMLModElement> extends HTMLAttributes<T> {
|
|
545
|
+
cite?: string;
|
|
546
|
+
dateTime?: string;
|
|
547
|
+
}
|
|
548
|
+
export interface InsHTMLAttributes<T extends HTMLModElement = HTMLModElement> extends HTMLAttributes<T> {
|
|
549
|
+
cite?: string;
|
|
550
|
+
dateTime?: string;
|
|
551
|
+
}
|
|
552
|
+
export interface SVGAttributes<T extends Element = SVGElement> extends AriaAttributes, DOMAttributes<T> {
|
|
553
|
+
id?: Reactive<string>;
|
|
554
|
+
class?: Reactive<string>;
|
|
555
|
+
className?: Reactive<string>;
|
|
556
|
+
style?: Reactive<string | CSSProperties>;
|
|
557
|
+
tabIndex?: Reactive<number>;
|
|
558
|
+
key?: string | number | symbol;
|
|
559
|
+
ref?: (el: T) => void;
|
|
560
|
+
children?: Children;
|
|
561
|
+
color?: Reactive<string>;
|
|
562
|
+
fill?: Reactive<string>;
|
|
563
|
+
fillOpacity?: Reactive<number | string>;
|
|
564
|
+
fillRule?: Reactive<"nonzero" | "evenodd" | "inherit">;
|
|
565
|
+
stroke?: Reactive<string>;
|
|
566
|
+
strokeWidth?: Reactive<number | string>;
|
|
567
|
+
strokeOpacity?: Reactive<number | string>;
|
|
568
|
+
strokeLinecap?: Reactive<"butt" | "round" | "square" | "inherit">;
|
|
569
|
+
strokeLinejoin?: Reactive<"miter" | "round" | "bevel" | "inherit">;
|
|
570
|
+
strokeDasharray?: Reactive<string | number>;
|
|
571
|
+
strokeDashoffset?: Reactive<string | number>;
|
|
572
|
+
strokeMiterlimit?: Reactive<number | string>;
|
|
573
|
+
opacity?: Reactive<number | string>;
|
|
574
|
+
visibility?: Reactive<string>;
|
|
575
|
+
display?: Reactive<string>;
|
|
576
|
+
overflow?: Reactive<string>;
|
|
577
|
+
clipPath?: Reactive<string>;
|
|
578
|
+
clipRule?: Reactive<"nonzero" | "evenodd" | "inherit">;
|
|
579
|
+
mask?: Reactive<string>;
|
|
580
|
+
filter?: Reactive<string>;
|
|
581
|
+
transform?: Reactive<string>;
|
|
582
|
+
x?: Reactive<number | string>;
|
|
583
|
+
y?: Reactive<number | string>;
|
|
584
|
+
width?: Reactive<number | string>;
|
|
585
|
+
height?: Reactive<number | string>;
|
|
586
|
+
cx?: Reactive<number | string>;
|
|
587
|
+
cy?: Reactive<number | string>;
|
|
588
|
+
r?: Reactive<number | string>;
|
|
589
|
+
rx?: Reactive<number | string>;
|
|
590
|
+
ry?: Reactive<number | string>;
|
|
591
|
+
d?: Reactive<string>;
|
|
592
|
+
points?: Reactive<string>;
|
|
593
|
+
fontSize?: Reactive<number | string>;
|
|
594
|
+
fontFamily?: Reactive<string>;
|
|
595
|
+
fontStyle?: Reactive<string>;
|
|
596
|
+
fontWeight?: Reactive<number | string>;
|
|
597
|
+
textAnchor?: Reactive<"start" | "middle" | "end" | "inherit">;
|
|
598
|
+
dominantBaseline?: Reactive<string>;
|
|
599
|
+
letterSpacing?: Reactive<number | string>;
|
|
600
|
+
wordSpacing?: Reactive<number | string>;
|
|
601
|
+
gradientUnits?: Reactive<"userSpaceOnUse" | "objectBoundingBox">;
|
|
602
|
+
gradientTransform?: Reactive<string>;
|
|
603
|
+
spreadMethod?: Reactive<"pad" | "reflect" | "repeat">;
|
|
604
|
+
patternUnits?: Reactive<"userSpaceOnUse" | "objectBoundingBox">;
|
|
605
|
+
patternTransform?: Reactive<string>;
|
|
606
|
+
href?: Reactive<string>;
|
|
607
|
+
xlinkHref?: Reactive<string>;
|
|
608
|
+
viewBox?: Reactive<string>;
|
|
609
|
+
preserveAspectRatio?: Reactive<string>;
|
|
610
|
+
xmlns?: string;
|
|
611
|
+
"xmlns:xlink"?: string;
|
|
612
|
+
in?: Reactive<string>;
|
|
613
|
+
result?: Reactive<string>;
|
|
614
|
+
stdDeviation?: Reactive<number | string>;
|
|
615
|
+
offset?: Reactive<number | string>;
|
|
616
|
+
stopColor?: Reactive<string>;
|
|
617
|
+
stopOpacity?: Reactive<number | string>;
|
|
618
|
+
markerWidth?: Reactive<number | string>;
|
|
619
|
+
markerHeight?: Reactive<number | string>;
|
|
620
|
+
markerUnits?: Reactive<string>;
|
|
621
|
+
refX?: Reactive<number | string>;
|
|
622
|
+
refY?: Reactive<number | string>;
|
|
623
|
+
orient?: Reactive<string>;
|
|
624
|
+
maskUnits?: Reactive<string>;
|
|
625
|
+
maskContentUnits?: Reactive<string>;
|
|
626
|
+
clipPathUnits?: Reactive<string>;
|
|
627
|
+
textLength?: Reactive<number | string>;
|
|
628
|
+
lengthAdjust?: Reactive<string>;
|
|
629
|
+
dy?: Reactive<number | string>;
|
|
630
|
+
dx?: Reactive<number | string>;
|
|
631
|
+
x1?: Reactive<number | string>;
|
|
632
|
+
y1?: Reactive<number | string>;
|
|
633
|
+
x2?: Reactive<number | string>;
|
|
634
|
+
y2?: Reactive<number | string>;
|
|
635
|
+
}
|
|
636
|
+
export {};
|
|
637
|
+
//# sourceMappingURL=dom-types.d.ts.map
|