astro 1.0.0-beta.64 → 1.0.0-beta.65

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/astro-jsx.d.ts CHANGED
@@ -1,10 +1,10 @@
1
1
  /// <reference lib="dom" />
2
2
  /* eslint @typescript-eslint/no-unused-vars: off */
3
3
  /**
4
- * Adapted from jsx-dom
5
- * @see https://github.com/proteriax/jsx-dom/blob/be06937ba16908d87bf8aa4372a3583133e02b8a/index.d.ts
4
+ * Adapted from babel-plugin-react-html-attrs's TypeScript definition from DefinitelyTyped.
5
+ * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/babel-plugin-react-html-attrs/index.d.ts
6
6
  *
7
- * which was adapted from
7
+ * and
8
8
  *
9
9
  * Adapted from React’s TypeScript definition from DefinitelyTyped.
10
10
  * @see https://github.com/DefinitelyTyped/DefinitelyTyped/blob/master/types/react/index.d.ts
@@ -36,164 +36,141 @@ declare namespace astroHTML.JSX {
36
36
  type AstroComponent = import('astro').AstroComponentFactory;
37
37
  type Element = HTMLElement | AstroComponent;
38
38
 
39
- //
40
- // Event Handler Types
41
- // ----------------------------------------------------------------------
42
- type EventHandler<E extends Event = Event, T extends EventTarget = HTMLElement> = (
43
- event: E & { currentTarget: EventTarget & T }
44
- ) => any;
45
-
46
- type ClipboardEventHandler<T extends EventTarget> = EventHandler<ClipboardEvent, T>;
47
- type CompositionEventHandler<T extends EventTarget> = EventHandler<CompositionEvent, T>;
48
- type DragEventHandler<T extends EventTarget> = EventHandler<DragEvent, T>;
49
- type FocusEventHandler<T extends EventTarget> = EventHandler<FocusEvent, T>;
50
- type FormEventHandler<T extends EventTarget> = EventHandler<Event, T>;
51
- type ChangeEventHandler<T extends EventTarget> = EventHandler<Event, T>;
52
- type KeyboardEventHandler<T extends EventTarget> = EventHandler<KeyboardEvent, T>;
53
- type MouseEventHandler<T extends EventTarget> = EventHandler<MouseEvent, T>;
54
- type TouchEventHandler<T extends EventTarget> = EventHandler<TouchEvent, T>;
55
- type PointerEventHandler<T extends EventTarget> = EventHandler<PointerEvent, T>;
56
- type UIEventHandler<T extends EventTarget> = EventHandler<UIEvent, T>;
57
- type WheelEventHandler<T extends EventTarget> = EventHandler<WheelEvent, T>;
58
- type AnimationEventHandler<T extends EventTarget> = EventHandler<AnimationEvent, T>;
59
- type TransitionEventHandler<T extends EventTarget> = EventHandler<TransitionEvent, T>;
60
- type MessageEventHandler<T extends EventTarget> = EventHandler<MessageEvent, T>;
61
-
62
- interface DOMAttributes<T extends EventTarget> {
39
+ interface DOMAttributes {
63
40
  children?: Children;
64
41
 
65
42
  // Clipboard Events
66
- oncopy?: ClipboardEventHandler<T> | string | undefined | null;
67
- oncut?: ClipboardEventHandler<T> | string | undefined | null;
68
- onpaste?: ClipboardEventHandler<T> | string | undefined | null;
43
+ oncopy?: string | undefined | null;
44
+ oncut?: string | undefined | null;
45
+ onpaste?: string | undefined | null;
69
46
 
70
47
  // Composition Events
71
- oncompositionend?: CompositionEventHandler<T> | string | undefined | null;
72
- oncompositionstart?: CompositionEventHandler<T> | string | undefined | null;
73
- oncompositionupdate?: CompositionEventHandler<T> | string | undefined | null;
48
+ oncompositionend?: string | undefined | null;
49
+ oncompositionstart?: string | undefined | null;
50
+ oncompositionupdate?: string | undefined | null;
74
51
 
75
52
  // Focus Events
76
- onfocus?: FocusEventHandler<T> | string | undefined | null;
77
- onfocusin?: FocusEventHandler<T> | string | undefined | null;
78
- onfocusout?: FocusEventHandler<T> | string | undefined | null;
79
- onblur?: FocusEventHandler<T> | string | undefined | null;
53
+ onfocus?: string | undefined | null;
54
+ onfocusin?: string | undefined | null;
55
+ onfocusout?: string | undefined | null;
56
+ onblur?: string | undefined | null;
80
57
 
81
58
  // Form Events
82
- onchange?: FormEventHandler<T> | string | undefined | null;
83
- oninput?: FormEventHandler<T> | string | undefined | null;
84
- onreset?: FormEventHandler<T> | string | undefined | null;
85
- onsubmit?: EventHandler<SubmitEvent, T> | string | undefined | null;
86
- oninvalid?: EventHandler<Event, T> | string | undefined | null;
87
- onbeforeinput?: EventHandler<InputEvent, T> | string | undefined | null;
59
+ onchange?: string | undefined | null;
60
+ oninput?: string | undefined | null;
61
+ onreset?: string | undefined | null;
62
+ onsubmit?: string | undefined | null;
63
+ oninvalid?: string | undefined | null;
64
+ onbeforeinput?: string | undefined | null;
88
65
 
89
66
  // Image Events
90
- onload?: EventHandler | string | undefined | null;
91
- onerror?: EventHandler | string | undefined | null; // also a Media Event
67
+ onload?: string | undefined | null;
68
+ onerror?: string | undefined | null; // also a Media Event
92
69
 
93
70
  // Detail Events
94
- ontoggle?: EventHandler<Event, T> | string | undefined | null;
71
+ ontoggle?: string | undefined | null;
95
72
 
96
73
  // Keyboard Events
97
- onkeydown?: KeyboardEventHandler<T> | string | undefined | null;
98
- onkeypress?: KeyboardEventHandler<T> | string | undefined | null;
99
- onkeyup?: KeyboardEventHandler<T> | string | undefined | null;
74
+ onkeydown?: string | undefined | null;
75
+ onkeypress?: string | undefined | null;
76
+ onkeyup?: string | undefined | null;
100
77
 
101
78
  // Media Events
102
- onabort?: EventHandler<Event, T> | string | undefined | null;
103
- oncanplay?: EventHandler<Event, T> | string | undefined | null;
104
- oncanplaythrough?: EventHandler<Event, T> | string | undefined | null;
105
- oncuechange?: EventHandler<Event, T> | string | undefined | null;
106
- ondurationchange?: EventHandler<Event, T> | string | undefined | null;
107
- onemptied?: EventHandler<Event, T> | string | undefined | null;
108
- onencrypted?: EventHandler<Event, T> | string | undefined | null;
109
- onended?: EventHandler<Event, T> | string | undefined | null;
110
- onloadeddata?: EventHandler<Event, T> | string | undefined | null;
111
- onloadedmetadata?: EventHandler<Event, T> | string | undefined | null;
112
- onloadstart?: EventHandler<Event, T> | string | undefined | null;
113
- onpause?: EventHandler<Event, T> | string | undefined | null;
114
- onplay?: EventHandler<Event, T> | string | undefined | null;
115
- onplaying?: EventHandler<Event, T> | string | undefined | null;
116
- onprogress?: EventHandler<Event, T> | string | undefined | null;
117
- onratechange?: EventHandler<Event, T> | string | undefined | null;
118
- onseeked?: EventHandler<Event, T> | string | undefined | null;
119
- onseeking?: EventHandler<Event, T> | string | undefined | null;
120
- onstalled?: EventHandler<Event, T> | string | undefined | null;
121
- onsuspend?: EventHandler<Event, T> | string | undefined | null;
122
- ontimeupdate?: EventHandler<Event, T> | string | undefined | null;
123
- onvolumechange?: EventHandler<Event, T> | string | undefined | null;
124
- onwaiting?: EventHandler<Event, T> | string | undefined | null;
79
+ onabort?: string | undefined | null;
80
+ oncanplay?: string | undefined | null;
81
+ oncanplaythrough?: string | undefined | null;
82
+ oncuechange?: string | undefined | null;
83
+ ondurationchange?: string | undefined | null;
84
+ onemptied?: string | undefined | null;
85
+ onencrypted?: string | undefined | null;
86
+ onended?: string | undefined | null;
87
+ onloadeddata?: string | undefined | null;
88
+ onloadedmetadata?: string | undefined | null;
89
+ onloadstart?: string | undefined | null;
90
+ onpause?: string | undefined | null;
91
+ onplay?: string | undefined | null;
92
+ onplaying?: string | undefined | null;
93
+ onprogress?: string | undefined | null;
94
+ onratechange?: string | undefined | null;
95
+ onseeked?: string | undefined | null;
96
+ onseeking?: string | undefined | null;
97
+ onstalled?: string | undefined | null;
98
+ onsuspend?: string | undefined | null;
99
+ ontimeupdate?: string | undefined | null;
100
+ onvolumechange?: string | undefined | null;
101
+ onwaiting?: string | undefined | null;
125
102
 
126
103
  // MouseEvents
127
- onauxclick?: MouseEventHandler<T> | string | undefined | null;
128
- onclick?: MouseEventHandler<T> | string | undefined | null;
129
- oncontextmenu?: MouseEventHandler<T> | string | undefined | null;
130
- ondblclick?: MouseEventHandler<T> | string | undefined | null;
131
- ondrag?: DragEventHandler<T> | string | undefined | null;
132
- ondragend?: DragEventHandler<T> | string | undefined | null;
133
- ondragenter?: DragEventHandler<T> | string | undefined | null;
134
- ondragexit?: DragEventHandler<T> | string | undefined | null;
135
- ondragleave?: DragEventHandler<T> | string | undefined | null;
136
- ondragover?: DragEventHandler<T> | string | undefined | null;
137
- ondragstart?: DragEventHandler<T> | string | undefined | null;
138
- ondrop?: DragEventHandler<T> | string | undefined | null;
139
- onmousedown?: MouseEventHandler<T> | string | undefined | null;
140
- onmouseenter?: MouseEventHandler<T> | string | undefined | null;
141
- onmouseleave?: MouseEventHandler<T> | string | undefined | null;
142
- onmousemove?: MouseEventHandler<T> | string | undefined | null;
143
- onmouseout?: MouseEventHandler<T> | string | undefined | null;
144
- onmouseover?: MouseEventHandler<T> | string | undefined | null;
145
- onmouseup?: MouseEventHandler<T> | string | undefined | null;
104
+ onauxclick?: string | undefined | null;
105
+ onclick?: string | undefined | null;
106
+ oncontextmenu?: string | undefined | null;
107
+ ondblclick?: string | undefined | null;
108
+ ondrag?: string | undefined | null;
109
+ ondragend?: string | undefined | null;
110
+ ondragenter?: string | undefined | null;
111
+ ondragexit?: string | undefined | null;
112
+ ondragleave?: string | undefined | null;
113
+ ondragover?: string | undefined | null;
114
+ ondragstart?: string | undefined | null;
115
+ ondrop?: string | undefined | null;
116
+ onmousedown?: string | undefined | null;
117
+ onmouseenter?: string | undefined | null;
118
+ onmouseleave?: string | undefined | null;
119
+ onmousemove?: string | undefined | null;
120
+ onmouseout?: string | undefined | null;
121
+ onmouseover?: string | undefined | null;
122
+ onmouseup?: string | undefined | null;
146
123
 
147
124
  // Selection Events
148
- onselect?: EventHandler<Event, T> | string | undefined | null;
149
- onselectionchange?: EventHandler<Event, T> | string | undefined | null;
150
- onselectstart?: EventHandler<Event, T> | string | undefined | null;
125
+ onselect?: string | undefined | null;
126
+ onselectionchange?: string | undefined | null;
127
+ onselectstart?: string | undefined | null;
151
128
 
152
129
  // Touch Events
153
- ontouchcancel?: TouchEventHandler<T> | string | undefined | null;
154
- ontouchend?: TouchEventHandler<T> | string | undefined | null;
155
- ontouchmove?: TouchEventHandler<T> | string | undefined | null;
156
- ontouchstart?: TouchEventHandler<T> | string | undefined | null;
130
+ ontouchcancel?: string | undefined | null;
131
+ ontouchend?: string | undefined | null;
132
+ ontouchmove?: string | undefined | null;
133
+ ontouchstart?: string | undefined | null;
157
134
 
158
135
  // Pointer Events
159
- ongotpointercapture?: PointerEventHandler<T> | string | undefined | null;
160
- onpointercancel?: PointerEventHandler<T> | string | undefined | null;
161
- onpointerdown?: PointerEventHandler<T> | string | undefined | null;
162
- onpointerenter?: PointerEventHandler<T> | string | undefined | null;
163
- onpointerleave?: PointerEventHandler<T> | string | undefined | null;
164
- onpointermove?: PointerEventHandler<T> | string | undefined | null;
165
- onpointerout?: PointerEventHandler<T> | string | undefined | null;
166
- onpointerover?: PointerEventHandler<T> | string | undefined | null;
167
- onpointerup?: PointerEventHandler<T> | string | undefined | null;
168
- onlostpointercapture?: PointerEventHandler<T> | string | undefined | null;
136
+ ongotpointercapture?: string | undefined | null;
137
+ onpointercancel?: string | undefined | null;
138
+ onpointerdown?: string | undefined | null;
139
+ onpointerenter?: string | undefined | null;
140
+ onpointerleave?: string | undefined | null;
141
+ onpointermove?: string | undefined | null;
142
+ onpointerout?: string | undefined | null;
143
+ onpointerover?: string | undefined | null;
144
+ onpointerup?: string | undefined | null;
145
+ onlostpointercapture?: string | undefined | null;
169
146
 
170
147
  // UI Events
171
- onscroll?: UIEventHandler<T> | string | undefined | null;
172
- onresize?: UIEventHandler<T> | string | undefined | null;
148
+ onscroll?: string | undefined | null;
149
+ onresize?: string | undefined | null;
173
150
 
174
151
  // Wheel Events
175
- onwheel?: WheelEventHandler<T> | string | undefined | null;
152
+ onwheel?: string | undefined | null;
176
153
 
177
154
  // Animation Events
178
- onanimationstart?: AnimationEventHandler<T> | string | undefined | null;
179
- onanimationend?: AnimationEventHandler<T> | string | undefined | null;
180
- onanimationiteration?: AnimationEventHandler<T> | string | undefined | null;
155
+ onanimationstart?: string | undefined | null;
156
+ onanimationend?: string | undefined | null;
157
+ onanimationiteration?: string | undefined | null;
181
158
 
182
159
  // Transition Events
183
- ontransitionstart?: TransitionEventHandler<T> | string | undefined | null;
184
- ontransitionrun?: TransitionEventHandler<T> | string | undefined | null;
185
- ontransitionend?: TransitionEventHandler<T> | string | undefined | null;
186
- ontransitioncancel?: TransitionEventHandler<T> | string | undefined | null;
160
+ ontransitionstart?: string | undefined | null;
161
+ ontransitionrun?: string | undefined | null;
162
+ ontransitionend?: string | undefined | null;
163
+ ontransitioncancel?: string | undefined | null;
187
164
 
188
165
  // Message Events
189
- onmessage?: MessageEventHandler<T> | string | undefined | null;
190
- onmessageerror?: MessageEventHandler<T> | string | undefined | null;
166
+ onmessage?: string | undefined | null;
167
+ onmessageerror?: string | undefined | null;
191
168
 
192
169
  // Global Events
193
- oncancel?: EventHandler<Event, T> | string | undefined | null;
194
- onclose?: EventHandler<Event, T> | string | undefined | null;
195
- onfullscreenchange?: EventHandler<Event, T> | string | undefined | null;
196
- onfullscreenerror?: EventHandler<Event, T> | string | undefined | null;
170
+ oncancel?: string | undefined | null;
171
+ onclose?: string | undefined | null;
172
+ onfullscreenchange?: string | undefined | null;
173
+ onfullscreenerror?: string | undefined | null;
197
174
  }
198
175
 
199
176
  // All the WAI-ARIA 1.1 attributes from https://www.w3.org/TR/wai-aria-1.1/
@@ -218,17 +195,17 @@ declare namespace astroHTML.JSX {
218
195
  * Defines the total number of columns in a table, grid, or treegrid.
219
196
  * @see aria-colindex.
220
197
  */
221
- 'aria-colcount'?: number | undefined | null;
198
+ 'aria-colcount'?: number | string | undefined | null;
222
199
  /**
223
200
  * Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
224
201
  * @see aria-colcount @see aria-colspan.
225
202
  */
226
- 'aria-colindex'?: number | undefined | null;
203
+ 'aria-colindex'?: number | string | undefined | null;
227
204
  /**
228
205
  * Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
229
206
  * @see aria-colindex @see aria-rowspan.
230
207
  */
231
- 'aria-colspan'?: number | undefined | null;
208
+ 'aria-colspan'?: number | string | undefined | null;
232
209
  /**
233
210
  * Identifies the element (or elements) whose contents or presence are controlled by the current element.
234
211
  * @see aria-owns.
@@ -318,7 +295,7 @@ declare namespace astroHTML.JSX {
318
295
  */
319
296
  'aria-labelledby'?: string | undefined | null;
320
297
  /** Defines the hierarchical level of an element within a structure. */
321
- 'aria-level'?: number | undefined | null;
298
+ 'aria-level'?: number | string | undefined | null;
322
299
  /** 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. */
323
300
  'aria-live'?: 'off' | 'assertive' | 'polite' | undefined | null;
324
301
  /** Indicates whether an element is modal when displayed. */
@@ -344,7 +321,7 @@ declare namespace astroHTML.JSX {
344
321
  * 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.
345
322
  * @see aria-setsize.
346
323
  */
347
- 'aria-posinset'?: number | undefined | null;
324
+ 'aria-posinset'?: number | string | undefined | null;
348
325
  /**
349
326
  * Indicates the current "pressed" state of toggle buttons.
350
327
  * @see aria-checked @see aria-selected.
@@ -380,17 +357,17 @@ declare namespace astroHTML.JSX {
380
357
  * Defines the total number of rows in a table, grid, or treegrid.
381
358
  * @see aria-rowindex.
382
359
  */
383
- 'aria-rowcount'?: number | undefined | null;
360
+ 'aria-rowcount'?: number | string | undefined | null;
384
361
  /**
385
362
  * Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
386
363
  * @see aria-rowcount @see aria-rowspan.
387
364
  */
388
- 'aria-rowindex'?: number | undefined | null;
365
+ 'aria-rowindex'?: number | string | undefined | null;
389
366
  /**
390
367
  * Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
391
368
  * @see aria-rowindex @see aria-colspan.
392
369
  */
393
- 'aria-rowspan'?: number | undefined | null;
370
+ 'aria-rowspan'?: number | string | undefined | null;
394
371
  /**
395
372
  * Indicates the current "selected" state of various widgets.
396
373
  * @see aria-checked @see aria-pressed.
@@ -400,86 +377,103 @@ declare namespace astroHTML.JSX {
400
377
  * 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.
401
378
  * @see aria-posinset.
402
379
  */
403
- 'aria-setsize'?: number | undefined | null;
380
+ 'aria-setsize'?: number | string | undefined | null;
404
381
  /** Indicates if items in a table or grid are sorted in ascending or descending order. */
405
382
  'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other' | undefined | null;
406
383
  /** Defines the maximum allowed value for a range widget. */
407
- 'aria-valuemax'?: number | undefined | null;
384
+ 'aria-valuemax'?: number | string | undefined | null;
408
385
  /** Defines the minimum allowed value for a range widget. */
409
- 'aria-valuemin'?: number | undefined | null;
386
+ 'aria-valuemin'?: number | string | undefined | null;
410
387
  /**
411
388
  * Defines the current value for a range widget.
412
389
  * @see aria-valuetext.
413
390
  */
414
- 'aria-valuenow'?: number | undefined | null;
391
+ 'aria-valuenow'?: number | string | undefined | null;
415
392
  /** Defines the human readable text alternative of aria-valuenow for a range widget. */
416
393
  'aria-valuetext'?: string | undefined | null;
417
394
  }
418
395
 
419
- interface HTMLAttributes<T extends EventTarget>
420
- extends AriaAttributes,
421
- DOMAttributes<T>,
422
- AstroBuiltinAttributes {
396
+ // All the WAI-ARIA 1.1 role attribute values from https://www.w3.org/TR/wai-aria-1.1/#role_definitions
397
+ type AriaRole =
398
+ | 'alert'
399
+ | 'alertdialog'
400
+ | 'application'
401
+ | 'article'
402
+ | 'banner'
403
+ | 'button'
404
+ | 'cell'
405
+ | 'checkbox'
406
+ | 'columnheader'
407
+ | 'combobox'
408
+ | 'complementary'
409
+ | 'contentinfo'
410
+ | 'definition'
411
+ | 'dialog'
412
+ | 'directory'
413
+ | 'document'
414
+ | 'feed'
415
+ | 'figure'
416
+ | 'form'
417
+ | 'grid'
418
+ | 'gridcell'
419
+ | 'group'
420
+ | 'heading'
421
+ | 'img'
422
+ | 'link'
423
+ | 'list'
424
+ | 'listbox'
425
+ | 'listitem'
426
+ | 'log'
427
+ | 'main'
428
+ | 'marquee'
429
+ | 'math'
430
+ | 'menu'
431
+ | 'menubar'
432
+ | 'menuitem'
433
+ | 'menuitemcheckbox'
434
+ | 'menuitemradio'
435
+ | 'navigation'
436
+ | 'none'
437
+ | 'note'
438
+ | 'option'
439
+ | 'presentation'
440
+ | 'progressbar'
441
+ | 'radio'
442
+ | 'radiogroup'
443
+ | 'region'
444
+ | 'row'
445
+ | 'rowgroup'
446
+ | 'rowheader'
447
+ | 'scrollbar'
448
+ | 'search'
449
+ | 'searchbox'
450
+ | 'separator'
451
+ | 'slider'
452
+ | 'spinbutton'
453
+ | 'status'
454
+ | 'switch'
455
+ | 'tab'
456
+ | 'table'
457
+ | 'tablist'
458
+ | 'tabpanel'
459
+ | 'term'
460
+ | 'textbox'
461
+ | 'timer'
462
+ | 'toolbar'
463
+ | 'tooltip'
464
+ | 'tree'
465
+ | 'treegrid'
466
+ | 'treeitem';
467
+
468
+ interface HTMLAttributes extends AriaAttributes, DOMAttributes, AstroBuiltinAttributes {
423
469
  // Standard HTML Attributes
424
- class?: string | undefined | null;
425
- dataset?: object | undefined | null; // eslint-disable-line
426
- accept?: string | undefined | null;
427
- acceptcharset?: string | undefined | null;
428
470
  accesskey?: string | undefined | null;
429
- action?: string | undefined | null;
430
- allow?: string | undefined | null;
431
- allowfullscreen?: boolean | undefined | null;
432
- allowtransparency?: boolean | undefined | null;
433
- allowpaymentrequest?: boolean | undefined | null;
434
- alt?: string | undefined | null;
435
- as?: string | undefined | null;
436
- async?: boolean | undefined | null;
437
- autocomplete?: string | undefined | null;
438
- autofocus?: boolean | undefined | null;
439
- autoplay?: boolean | undefined | null;
440
- capture?: 'environment' | 'user' | boolean | undefined | null;
441
- cellpadding?: number | string | undefined | null;
442
- cellspacing?: number | string | undefined | null;
443
- charset?: string | undefined | null;
444
- challenge?: string | undefined | null;
445
- checked?: boolean | undefined | null;
446
- cite?: string | undefined | null;
447
- classid?: string | undefined | null;
448
- cols?: number | undefined | null;
449
- colspan?: number | undefined | null;
450
- content?: string | URL | undefined | null;
451
- contenteditable?: 'true' | 'false' | boolean | undefined | null;
452
-
453
- // Doesn't work when used as HTML attribute
454
- /**
455
- * Elements with the contenteditable attribute support innerHTML and textContent bindings.
456
- */
457
- innerHTML?: string | undefined | null;
458
- // Doesn't work when used as HTML attribute
459
- /**
460
- * Elements with the contenteditable attribute support innerHTML and textContent bindings.
461
- */
462
-
463
- textContent?: string | undefined | null;
464
-
465
- contextmenu?: string | undefined | null;
466
- controls?: boolean | undefined | null;
467
- coords?: string | undefined | null;
468
- crossorigin?: string | boolean | undefined | null;
469
- currenttime?: number | undefined | null;
470
- decoding?: 'async' | 'sync' | 'auto' | undefined | null;
471
- data?: string | undefined | null;
472
- datetime?: string | undefined | null;
473
- default?: boolean | undefined | null;
474
- defaultmuted?: boolean | undefined | null;
475
- defaultplaybackrate?: number | undefined | null;
476
- defer?: boolean | undefined | null;
471
+ autocapitalize?: string | undefined | null;
472
+ autofocus?: boolean | string | undefined | null;
473
+ class?: string | undefined | null;
474
+ contenteditable?: 'true' | 'false' | boolean | 'inherit' | string | undefined | null;
477
475
  dir?: string | undefined | null;
478
- dirname?: string | undefined | null;
479
- disabled?: boolean | undefined | null;
480
- download?: any | undefined | null;
481
- draggable?: boolean | 'true' | 'false' | undefined | null;
482
- enctype?: string | undefined | null;
476
+ draggable?: 'true' | 'false' | boolean | undefined | null;
483
477
  enterkeyhint?:
484
478
  | 'enter'
485
479
  | 'done'
@@ -490,127 +484,516 @@ declare namespace astroHTML.JSX {
490
484
  | 'send'
491
485
  | undefined
492
486
  | null;
493
- for?: string | undefined | null;
487
+ hidden?: boolean | string | undefined | null;
488
+ id?: string | undefined | null;
489
+ inert?: boolean | string | undefined | null;
490
+ inputmode?:
491
+ | 'none'
492
+ | 'text'
493
+ | 'tel'
494
+ | 'url'
495
+ | 'email'
496
+ | 'numeric'
497
+ | 'decimal'
498
+ | 'search'
499
+ | undefined
500
+ | null;
501
+ is?: string | undefined | null;
502
+ itemid?: string | undefined | null;
503
+ itemprop?: string | undefined | null;
504
+ itemref?: string | undefined | null;
505
+ itemscope?: boolean | string | undefined | null;
506
+ itemtype?: string | undefined | null;
507
+ lang?: string | undefined | null;
508
+ slot?: string | undefined | null;
509
+ spellcheck?: 'true' | 'false' | boolean | undefined | null;
510
+ style?: string | undefined | null;
511
+ tabindex?: number | string | undefined | null;
512
+ title?: string | undefined | null;
513
+ translate?: 'yes' | 'no' | undefined | null;
514
+
515
+ // <command>, <menuitem>
516
+ radiogroup?: string | undefined | null;
517
+
518
+ // WAI-ARIA
519
+ role?: AriaRole | undefined | null;
520
+
521
+ // RDFa Attributes
522
+ about?: string | undefined | null;
523
+ datatype?: string | undefined | null;
524
+ inlist?: any;
525
+ prefix?: string | undefined | null;
526
+ property?: string | undefined | null;
527
+ resource?: string | undefined | null;
528
+ typeof?: string | undefined | null;
529
+ vocab?: string | undefined | null;
530
+
531
+ // Non-standard Attributes
532
+ contextmenu?: string | undefined | null; // Obsolete
533
+ autosave?: string | undefined | null; // Apple exclusive
534
+ color?: string | undefined | null;
535
+ results?: number | string | undefined | null;
536
+ security?: string | undefined | null;
537
+ unselectable?: 'on' | 'off' | undefined | null; // Internet Explorer
538
+ }
539
+
540
+ type HTMLAttributeReferrerPolicy =
541
+ | ''
542
+ | 'no-referrer'
543
+ | 'no-referrer-when-downgrade'
544
+ | 'origin'
545
+ | 'origin-when-cross-origin'
546
+ | 'same-origin'
547
+ | 'strict-origin'
548
+ | 'strict-origin-when-cross-origin'
549
+ | 'unsafe-url';
550
+
551
+ type HTMLAttributeAnchorTarget = '_self' | '_blank' | '_parent' | '_top';
552
+
553
+ interface AnchorHTMLAttributes extends HTMLAttributes {
554
+ download?: string | boolean | undefined | null;
555
+ href?: string | URL | undefined | null;
556
+ hreflang?: string | undefined | null;
557
+ media?: string | undefined | null;
558
+ ping?: string | undefined | null;
559
+ rel?: string | undefined | null;
560
+ target?: HTMLAttributeAnchorTarget | undefined | null;
561
+ type?: string | undefined | null;
562
+ referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null;
563
+ }
564
+
565
+ interface AudioHTMLAttributes extends MediaHTMLAttributes {}
566
+
567
+ interface AreaHTMLAttributes extends HTMLAttributes {
568
+ alt?: string | undefined | null;
569
+ coords?: string | undefined | null;
570
+ download?: any;
571
+ href?: string | undefined | null;
572
+ hreflang?: string | undefined | null;
573
+ media?: string | undefined | null;
574
+ referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null;
575
+ rel?: string | undefined | null;
576
+ shape?: string | undefined | null;
577
+ target?: string | undefined | null;
578
+ }
579
+
580
+ interface BaseHTMLAttributes extends HTMLAttributes {
581
+ href?: string | undefined | null;
582
+ target?: string | undefined | null;
583
+ }
584
+
585
+ interface BlockquoteHTMLAttributes extends HTMLAttributes {
586
+ cite?: string | undefined | null;
587
+ }
588
+
589
+ interface ButtonHTMLAttributes extends HTMLAttributes {
590
+ disabled?: boolean | string | undefined | null;
494
591
  form?: string | undefined | null;
495
592
  formaction?: string | undefined | null;
496
593
  formenctype?: string | undefined | null;
497
594
  formmethod?: string | undefined | null;
498
- formnovalidate?: boolean | undefined | null;
595
+ formnovalidate?: boolean | string | undefined | null;
499
596
  formtarget?: string | undefined | null;
597
+ name?: string | undefined | null;
598
+ type?: 'submit' | 'reset' | 'button' | undefined | null;
599
+ value?: string | string[] | number | undefined | null;
600
+ }
601
+
602
+ interface CanvasHTMLAttributes extends HTMLAttributes {
603
+ height?: number | string | undefined | null;
604
+ width?: number | string | undefined | null;
605
+ }
606
+
607
+ interface ColHTMLAttributes extends HTMLAttributes {
608
+ span?: number | string | undefined | null;
609
+ width?: number | string | undefined | null;
610
+ }
611
+
612
+ interface ColgroupHTMLAttributes extends HTMLAttributes {
613
+ span?: number | string | undefined | null;
614
+ }
615
+
616
+ interface DataHTMLAttributes extends HTMLAttributes {
617
+ value?: string | string[] | number | undefined | null;
618
+ }
619
+
620
+ interface DetailsHTMLAttributes extends HTMLAttributes {
621
+ open?: boolean | string | undefined | null;
622
+ }
623
+
624
+ interface DelHTMLAttributes extends HTMLAttributes {
625
+ cite?: string | undefined | null;
626
+ datetime?: string | undefined | null;
627
+ }
628
+
629
+ interface DialogHTMLAttributes extends HTMLAttributes {
630
+ open?: boolean | string | undefined | null;
631
+ }
632
+
633
+ interface EmbedHTMLAttributes extends HTMLAttributes {
634
+ height?: number | string | undefined | null;
635
+ src?: string | undefined | null;
636
+ type?: string | undefined | null;
637
+ width?: number | string | undefined | null;
638
+ }
639
+
640
+ interface FieldsetHTMLAttributes extends HTMLAttributes {
641
+ disabled?: boolean | string | undefined | null;
642
+ form?: string | undefined | null;
643
+ name?: string | undefined | null;
644
+ }
645
+
646
+ interface FormHTMLAttributes extends HTMLAttributes {
647
+ 'accept-charset'?: string | undefined | null;
648
+ action?: string | undefined | null;
649
+ autocomplete?: string | undefined | null;
650
+ autocorrect?: string | undefined | null;
651
+ enctype?: string | undefined | null;
652
+ method?: string | undefined | null;
653
+ name?: string | undefined | null;
654
+ novalidate?: boolean | string | undefined | null;
655
+ target?: string | undefined | null;
656
+ }
657
+
658
+ interface HtmlHTMLAttributes extends HTMLAttributes {
659
+ manifest?: string | undefined | null;
660
+ }
661
+
662
+ interface IframeHTMLAttributes extends HTMLAttributes {
663
+ allow?: string | undefined | null;
664
+ allowfullscreen?: boolean | string | undefined | null;
665
+ allowtransparency?: boolean | string | undefined | null;
666
+ /** @deprecated */
500
667
  frameborder?: number | string | undefined | null;
501
- headers?: string | undefined | null;
502
668
  height?: number | string | undefined | null;
503
- hidden?: boolean | undefined | null;
504
- high?: number | undefined | null;
505
- href?: string | URL | undefined | null;
506
- hreflang?: string | undefined | null;
507
- htmlfor?: string | undefined | null;
508
- httpequiv?: string | undefined | null;
509
- id?: string | undefined | null;
510
- inputmode?: string | undefined | null;
511
- integrity?: string | undefined | null;
512
- is?: string | undefined | null;
513
- ismap?: boolean | undefined | null;
514
- keyparams?: string | undefined | null;
515
- keytype?: string | undefined | null;
516
- kind?: string | undefined | null;
517
- label?: string | undefined | null;
518
- lang?: string | undefined | null;
669
+ /** @deprecated */
670
+ marginheight?: number | string | undefined | null;
671
+ /** @deprecated */
672
+ marginwidth?: number | string | undefined | null;
673
+ name?: string | undefined | null;
674
+ referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null;
675
+ sandbox?: string | undefined | null;
676
+ /** @deprecated */
677
+ scrolling?: string | undefined | null;
678
+ seamless?: boolean | string | undefined | null;
679
+ src?: string | undefined | null;
680
+ srcdoc?: string | undefined | null;
681
+ width?: number | string | undefined | null;
682
+ }
683
+
684
+ interface ImgHTMLAttributes extends HTMLAttributes {
685
+ alt?: string | undefined | null;
686
+ crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined | null;
687
+ decoding?: 'async' | 'auto' | 'sync' | undefined | null;
688
+ height?: number | string | undefined | null;
689
+ loading?: 'eager' | 'lazy' | undefined | null;
690
+ referrerpolicy?: HTMLAttributeReferrerPolicy | undefined | null;
691
+ sizes?: string | undefined | null;
692
+ src?: string | undefined | null;
693
+ srcset?: string | undefined | null;
694
+ usemap?: string | undefined | null;
695
+ width?: number | string | undefined | null;
696
+ }
697
+
698
+ interface InsHTMLAttributes extends HTMLAttributes {
699
+ cite?: string | undefined | null;
700
+ datetime?: string | undefined | null;
701
+ }
702
+
703
+ type HTMLInputTypeAttribute =
704
+ | 'button'
705
+ | 'checkbox'
706
+ | 'color'
707
+ | 'date'
708
+ | 'datetime-local'
709
+ | 'email'
710
+ | 'file'
711
+ | 'hidden'
712
+ | 'image'
713
+ | 'month'
714
+ | 'number'
715
+ | 'password'
716
+ | 'radio'
717
+ | 'range'
718
+ | 'reset'
719
+ | 'search'
720
+ | 'submit'
721
+ | 'tel'
722
+ | 'text'
723
+ | 'time'
724
+ | 'url'
725
+ | 'week';
726
+
727
+ interface InputHTMLAttributes extends HTMLAttributes {
728
+ accept?: string | undefined | null;
729
+ alt?: string | undefined | null;
730
+ autocomplete?: string | undefined | null;
731
+ autocorrect?: string | undefined | null;
732
+ capture?: boolean | string | undefined | null;
733
+ checked?: boolean | string | undefined | null;
734
+ crossorigin?: string | undefined | null;
735
+ dirname?: string | undefined | null;
736
+ disabled?: boolean | string | undefined | null;
737
+ form?: string | undefined | null;
738
+ formaction?: string | undefined | null;
739
+ formenctype?: string | undefined | null;
740
+ formmethod?: string | undefined | null;
741
+ formnovalidate?: boolean | string | undefined | null;
742
+ formtarget?: string | undefined | null;
743
+ height?: number | string | undefined | null;
519
744
  list?: string | undefined | null;
520
- loading?: string | undefined | null;
521
- loop?: boolean | undefined | null;
522
- low?: number | undefined | null;
523
- manifest?: string | undefined | null;
524
- marginheight?: number | undefined | null;
525
- marginwidth?: number | undefined | null;
526
745
  max?: number | string | undefined | null;
527
- maxlength?: number | undefined | null;
528
- media?: string | undefined | null;
529
- mediagroup?: string | undefined | null;
530
- method?: string | undefined | null;
746
+ maxlength?: number | string | undefined | null;
531
747
  min?: number | string | undefined | null;
532
- minlength?: number | undefined | null;
533
- multiple?: boolean | undefined | null;
534
- muted?: boolean | undefined | null;
748
+ minlength?: number | string | undefined | null;
749
+ multiple?: boolean | string | undefined | null;
535
750
  name?: string | undefined | null;
536
- nonce?: string | undefined | null;
537
- novalidate?: boolean | undefined | null;
538
- open?: boolean | undefined | null;
539
- optimum?: number | undefined | null;
540
- part?: string | undefined | null;
541
751
  pattern?: string | undefined | null;
542
752
  placeholder?: string | undefined | null;
543
- playsinline?: boolean | undefined | null;
544
- poster?: string | undefined | null;
545
- preload?: string | undefined | null;
546
- radiogroup?: string | undefined | null;
547
- readonly?: boolean | undefined | null;
548
- referrerpolicy?: string | undefined | null;
753
+ readonly?: boolean | string | undefined | null;
754
+ required?: boolean | string | undefined | null;
755
+ size?: number | string | undefined | null;
756
+ src?: string | undefined | null;
757
+ step?: number | string | undefined | null;
758
+ type?: HTMLInputTypeAttribute | string | undefined | null;
759
+ value?: string | string[] | number | undefined | null;
760
+ width?: number | string | undefined | null;
761
+ }
762
+
763
+ interface KeygenHTMLAttributes extends HTMLAttributes {
764
+ challenge?: string | undefined | null;
765
+ disabled?: boolean | string | undefined | null;
766
+ form?: string | undefined | null;
767
+ keytype?: string | undefined | null;
768
+ keyparams?: string | undefined | null;
769
+ name?: string | undefined | null;
770
+ }
771
+
772
+ interface LabelHTMLAttributes extends HTMLAttributes {
773
+ form?: string | undefined | null;
774
+ for?: string | undefined | null;
775
+ }
776
+
777
+ interface LiHTMLAttributes extends HTMLAttributes {
778
+ value?: string | number | undefined | null;
779
+ }
780
+
781
+ interface LinkHTMLAttributes extends HTMLAttributes {
782
+ as?: string | undefined | null;
783
+ crossorigin?: boolean | string | undefined | null;
784
+ href?: string | URL | undefined | null;
785
+ hreflang?: string | undefined | null;
786
+ integrity?: string | undefined | null;
787
+ media?: string | undefined | null;
788
+ imageSrcSet?: string | undefined | null;
789
+ imageSizes?: string | undefined | null;
790
+ referrerPolicy?: HTMLAttributeReferrerPolicy | undefined | null;
549
791
  rel?: string | undefined | null;
550
- required?: boolean | undefined | null;
551
- reversed?: boolean | undefined | null;
552
- role?: string | undefined | null;
553
- rows?: number | undefined | null;
554
- rowspan?: number | undefined | null;
555
- sandbox?: string | undefined | null;
556
- scope?: string | undefined | null;
557
- scoped?: boolean | undefined | null;
558
- scrolling?: string | undefined | null;
559
- seamless?: boolean | undefined | null;
560
- selected?: boolean | undefined | null;
561
- shape?: string | undefined | null;
562
- size?: number | undefined | null;
563
792
  sizes?: string | undefined | null;
564
- slot?: string | undefined | null;
565
- span?: number | undefined | null;
566
- spellcheck?: boolean | 'true' | 'false' | undefined | null;
793
+ type?: string | undefined | null;
794
+ charset?: string | undefined | null;
795
+ }
796
+
797
+ interface MapHTMLAttributes extends HTMLAttributes {
798
+ name?: string | undefined | null;
799
+ }
800
+
801
+ interface MenuHTMLAttributes extends HTMLAttributes {
802
+ type?: string | undefined | null;
803
+ }
804
+
805
+ interface MediaHTMLAttributes extends HTMLAttributes {
806
+ autoplay?: boolean | string | undefined | null;
807
+ controls?: boolean | string | undefined | null;
808
+ controlslist?: string | undefined | null;
809
+ crossorigin?: string | undefined | null;
810
+ loop?: boolean | string | undefined | null;
811
+ mediagroup?: string | undefined | null;
812
+ muted?: boolean | string | undefined | null;
813
+ playsinline?: boolean | string | undefined | null;
814
+ preload?: string | undefined | null;
567
815
  src?: string | undefined | null;
568
- srcdoc?: string | undefined | null;
569
- srclang?: string | undefined | null;
570
- srcset?: string | undefined | null;
571
- start?: number | undefined | null;
572
- step?: number | string | undefined | null;
573
- style?: string | undefined | null;
574
- summary?: string | undefined | null;
575
- tabindex?: number | undefined | null;
576
- target?: string | undefined | null;
577
- title?: string | undefined | null;
578
- translate?: 'yes' | 'no' | '' | undefined | null;
816
+ }
817
+
818
+ interface MetaHTMLAttributes extends HTMLAttributes {
819
+ charset?: string | undefined | null;
820
+ content?: string | URL | undefined | null;
821
+ 'http-equiv'?: string | undefined | null;
822
+ name?: string | undefined | null;
823
+ }
824
+
825
+ interface MeterHTMLAttributes extends HTMLAttributes {
826
+ form?: string | undefined | null;
827
+ high?: number | string | undefined | null;
828
+ low?: number | string | undefined | null;
829
+ max?: number | string | undefined | null;
830
+ min?: number | string | undefined | null;
831
+ optimum?: number | string | undefined | null;
832
+ value?: string | string[] | number | undefined | null;
833
+ }
834
+
835
+ interface QuoteHTMLAttributes extends HTMLAttributes {
836
+ cite?: string | undefined | null;
837
+ }
838
+
839
+ interface ObjectHTMLAttributes extends HTMLAttributes {
840
+ classid?: string | undefined | null;
841
+ data?: string | undefined | null;
842
+ form?: string | undefined | null;
843
+ height?: number | string | undefined | null;
844
+ name?: string | undefined | null;
579
845
  type?: string | undefined | null;
580
846
  usemap?: string | undefined | null;
581
- value?: any | undefined | null;
582
- /**
583
- * a value between 0 and 1
584
- */
585
- volume?: number | undefined | null;
586
847
  width?: number | string | undefined | null;
587
848
  wmode?: string | undefined | null;
588
- wrap?: string | undefined | null;
849
+ }
589
850
 
590
- // RDFa Attributes
591
- about?: string | undefined | null;
592
- datatype?: string | undefined | null;
593
- inlist?: any | undefined | null;
594
- prefix?: string | undefined | null;
595
- property?: string | undefined | null;
596
- resource?: string | undefined | null;
597
- typeof?: string | undefined | null;
598
- vocab?: string | undefined | null;
851
+ interface OlHTMLAttributes extends HTMLAttributes {
852
+ reversed?: boolean | string | undefined | null;
853
+ start?: number | string | undefined | null;
854
+ type?: '1' | 'a' | 'A' | 'i' | 'I' | undefined | null;
855
+ }
599
856
 
600
- // Non-standard Attributes
601
- autocapitalize?: string | undefined | null;
857
+ interface OptgroupHTMLAttributes extends HTMLAttributes {
858
+ disabled?: boolean | string | undefined | null;
859
+ label?: string | undefined | null;
860
+ }
861
+
862
+ interface OptionHTMLAttributes extends HTMLAttributes {
863
+ disabled?: boolean | string | undefined | null;
864
+ label?: string | undefined | null;
865
+ selected?: boolean | string | undefined | null;
866
+ value?: string | string[] | number | undefined | null;
867
+ }
868
+
869
+ interface OutputHTMLAttributes extends HTMLAttributes {
870
+ form?: string | undefined | null;
871
+ for?: string | undefined | null;
872
+ name?: string | undefined | null;
873
+ }
874
+
875
+ interface ParamHTMLAttributes extends HTMLAttributes {
876
+ name?: string | undefined | null;
877
+ value?: string | string[] | number | undefined | null;
878
+ }
879
+
880
+ interface ProgressHTMLAttributes extends HTMLAttributes {
881
+ max?: number | string | undefined | null;
882
+ value?: string | string[] | number | undefined | null;
883
+ }
884
+
885
+ interface SlotHTMLAttributes extends HTMLAttributes {
886
+ name?: string | undefined | null;
887
+ }
888
+
889
+ interface ScriptHTMLAttributes extends HTMLAttributes {
890
+ async?: boolean | string | undefined | null;
891
+ charset?: string | undefined | null;
892
+ crossorigin?: string | undefined | null;
893
+ defer?: boolean | string | undefined | null;
894
+ integrity?: string | undefined | null;
895
+ nomodule?: boolean | string | undefined | null;
896
+ nonce?: string | undefined | null;
897
+ src?: string | undefined | null;
898
+ type?: string | undefined | null;
899
+ }
900
+
901
+ interface SelectHTMLAttributes extends HTMLAttributes {
902
+ autocomplete?: string | undefined | null;
602
903
  autocorrect?: string | undefined | null;
603
- autosave?: string | undefined | null;
604
- color?: string | undefined | null;
605
- controlslist?: 'nodownload' | 'nofullscreen' | 'noplaybackrate' | 'noremoteplayback';
606
- itemprop?: string | undefined | null;
607
- itemscope?: boolean | undefined | null;
608
- itemtype?: string | undefined | null;
609
- itemid?: string | undefined | null;
610
- itemref?: string | undefined | null;
611
- results?: number | undefined | null;
612
- security?: string | undefined | null;
613
- unselectable?: boolean | undefined | null;
904
+ disabled?: boolean | string | undefined | null;
905
+ form?: string | undefined | null;
906
+ multiple?: boolean | string | undefined | null;
907
+ name?: string | undefined | null;
908
+ required?: boolean | string | undefined | null;
909
+ size?: number | string | undefined | null;
910
+ value?: string | string[] | number | undefined | null;
911
+ }
912
+
913
+ interface SourceHTMLAttributes extends HTMLAttributes {
914
+ height?: number | string | undefined | null;
915
+ media?: string | undefined | null;
916
+ sizes?: string | undefined | null;
917
+ src?: string | undefined | null;
918
+ srcset?: string | undefined | null;
919
+ type?: string | undefined | null;
920
+ width?: number | string | undefined | null;
921
+ }
922
+
923
+ interface StyleHTMLAttributes extends HTMLAttributes {
924
+ media?: string | undefined | null;
925
+ nonce?: string | undefined | null;
926
+ scoped?: boolean | string | undefined | null;
927
+ type?: string | undefined | null;
928
+ }
929
+
930
+ interface TableHTMLAttributes extends HTMLAttributes {
931
+ align?: 'left' | 'center' | 'right' | undefined | null;
932
+ bgcolor?: string | undefined | null;
933
+ border?: number | undefined | null;
934
+ cellpadding?: number | string | undefined | null;
935
+ cellspacing?: number | string | undefined | null;
936
+ frame?: boolean | undefined | null;
937
+ rules?: 'none' | 'groups' | 'rows' | 'columns' | 'all' | undefined | null;
938
+ summary?: string | undefined | null;
939
+ width?: number | string | undefined | null;
940
+ }
941
+
942
+ interface TextareaHTMLAttributes extends HTMLAttributes {
943
+ autocomplete?: string | undefined | null;
944
+ autocorrect?: string | undefined | null;
945
+ cols?: number | string | undefined | null;
946
+ dirname?: string | undefined | null;
947
+ disabled?: boolean | string | undefined | null;
948
+ form?: string | undefined | null;
949
+ maxlength?: number | string | undefined | null;
950
+ minlength?: number | string | undefined | null;
951
+ name?: string | undefined | null;
952
+ placeholder?: string | undefined | null;
953
+ readonly?: boolean | string | undefined | null;
954
+ required?: boolean | string | undefined | null;
955
+ rows?: number | string | undefined | null;
956
+ value?: string | string[] | number | undefined | null;
957
+ wrap?: string | undefined | null;
958
+ }
959
+
960
+ interface TdHTMLAttributes extends HTMLAttributes {
961
+ align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined | null;
962
+ colspan?: number | string | undefined | null;
963
+ headers?: string | undefined | null;
964
+ rowspan?: number | string | undefined | null;
965
+ scope?: string | undefined | null;
966
+ abbr?: string | undefined | null;
967
+ valign?: 'top' | 'middle' | 'bottom' | 'baseline' | undefined | null;
968
+ }
969
+
970
+ interface ThHTMLAttributes extends HTMLAttributes {
971
+ align?: 'left' | 'center' | 'right' | 'justify' | 'char' | undefined | null;
972
+ colspan?: number | string | undefined | null;
973
+ headers?: string | undefined | null;
974
+ rowspan?: number | string | undefined | null;
975
+ scope?: string | undefined | null;
976
+ abbr?: string | undefined | null;
977
+ }
978
+
979
+ interface TimeHTMLAttributes extends HTMLAttributes {
980
+ datetime?: string | undefined | null;
981
+ }
982
+
983
+ interface TrackHTMLAttributes extends HTMLAttributes {
984
+ default?: boolean | string | undefined | null;
985
+ kind?: string | undefined | null;
986
+ label?: string | undefined | null;
987
+ src?: string | undefined | null;
988
+ srclang?: string | undefined | null;
989
+ }
990
+
991
+ interface VideoHTMLAttributes extends MediaHTMLAttributes {
992
+ height?: number | string | undefined | null;
993
+ playsinline?: boolean | string | undefined | null;
994
+ poster?: string | undefined | null;
995
+ width?: number | string | undefined | null;
996
+ disablepictureinpicture?: boolean | string | undefined | null;
614
997
  }
615
998
 
616
999
  // this list is "complete" in that it contains every SVG attribute
@@ -621,12 +1004,8 @@ declare namespace astroHTML.JSX {
621
1004
  // - "number | string"
622
1005
  // - "string"
623
1006
  // - union of string literals
624
- interface SVGAttributes<T extends EventTarget>
625
- extends AriaAttributes,
626
- DOMAttributes<T>,
627
- AstroBuiltinAttributes {
1007
+ interface SVGAttributes extends AriaAttributes, DOMAttributes, AstroBuiltinAttributes {
628
1008
  // Attributes which also defined in HTMLAttributes
629
- className?: string | undefined | null;
630
1009
  class?: string | undefined | null;
631
1010
  color?: string | undefined | null;
632
1011
  height?: number | string | undefined | null;
@@ -643,8 +1022,8 @@ declare namespace astroHTML.JSX {
643
1022
  width?: number | string | undefined | null;
644
1023
 
645
1024
  // Other HTML properties supported by SVG elements in browsers
646
- role?: string | undefined | null;
647
- tabindex?: number | undefined | null;
1025
+ role?: AriaRole | undefined | null;
1026
+ tabindex?: number | string | undefined | null;
648
1027
  crossorigin?: 'anonymous' | 'use-credentials' | '' | undefined | null;
649
1028
 
650
1029
  // SVG Specific attributes
@@ -906,184 +1285,181 @@ declare namespace astroHTML.JSX {
906
1285
  zoomAndPan?: string | undefined | null;
907
1286
  }
908
1287
 
909
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
910
- interface HTMLProps<T extends EventTarget> extends HTMLAttributes<T> {}
911
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
912
- interface SVGProps<T extends EventTarget> extends SVGAttributes<T> {}
913
-
914
1288
  interface IntrinsicElements {
915
1289
  // HTML
916
- a: HTMLProps<HTMLAnchorElement>;
917
- abbr: HTMLProps<HTMLElement>;
918
- address: HTMLProps<HTMLElement>;
919
- area: HTMLProps<HTMLAreaElement>;
920
- article: HTMLProps<HTMLElement>;
921
- aside: HTMLProps<HTMLElement>;
922
- audio: HTMLProps<HTMLAudioElement>;
923
- b: HTMLProps<HTMLElement>;
924
- base: HTMLProps<HTMLBaseElement>;
925
- bdi: HTMLProps<HTMLElement>;
926
- bdo: HTMLProps<HTMLElement>;
927
- big: HTMLProps<HTMLElement>;
928
- blockquote: HTMLProps<HTMLElement>;
929
- body: HTMLProps<HTMLBodyElement>;
930
- br: HTMLProps<HTMLBRElement>;
931
- button: HTMLProps<HTMLButtonElement>;
932
- canvas: HTMLProps<HTMLCanvasElement>;
933
- caption: HTMLProps<HTMLElement>;
934
- cite: HTMLProps<HTMLElement>;
935
- code: HTMLProps<HTMLElement>;
936
- col: HTMLProps<HTMLTableColElement>;
937
- colgroup: HTMLProps<HTMLTableColElement>;
938
- data: HTMLProps<HTMLElement>;
939
- datalist: HTMLProps<HTMLDataListElement>;
940
- dd: HTMLProps<HTMLElement>;
941
- del: HTMLProps<HTMLElement>;
942
- details: HTMLProps<HTMLElement>;
943
- dfn: HTMLProps<HTMLElement>;
944
- dialog: HTMLProps<HTMLElement>;
945
- div: HTMLProps<HTMLDivElement>;
946
- dl: HTMLProps<HTMLDListElement>;
947
- dt: HTMLProps<HTMLElement>;
948
- em: HTMLProps<HTMLElement>;
949
- embed: HTMLProps<HTMLEmbedElement>;
950
- fieldset: HTMLProps<HTMLFieldSetElement>;
951
- figcaption: HTMLProps<HTMLElement>;
952
- figure: HTMLProps<HTMLElement>;
953
- footer: HTMLProps<HTMLElement>;
954
- form: HTMLProps<HTMLFormElement>;
955
- h1: HTMLProps<HTMLHeadingElement>;
956
- h2: HTMLProps<HTMLHeadingElement>;
957
- h3: HTMLProps<HTMLHeadingElement>;
958
- h4: HTMLProps<HTMLHeadingElement>;
959
- h5: HTMLProps<HTMLHeadingElement>;
960
- h6: HTMLProps<HTMLHeadingElement>;
961
- head: HTMLProps<HTMLHeadElement>;
962
- header: HTMLProps<HTMLElement>;
963
- hgroup: HTMLProps<HTMLElement>;
964
- hr: HTMLProps<HTMLHRElement>;
965
- html: HTMLProps<HTMLHtmlElement>;
966
- i: HTMLProps<HTMLElement>;
967
- iframe: HTMLProps<HTMLIFrameElement>;
968
- img: HTMLProps<HTMLImageElement>;
969
- input: HTMLProps<HTMLInputElement>;
970
- ins: HTMLProps<HTMLModElement>;
971
- kbd: HTMLProps<HTMLElement>;
972
- keygen: HTMLProps<HTMLElement>;
973
- label: HTMLProps<HTMLLabelElement>;
974
- legend: HTMLProps<HTMLLegendElement>;
975
- li: HTMLProps<HTMLLIElement>;
976
- link: HTMLProps<HTMLLinkElement>;
977
- main: HTMLProps<HTMLElement>;
978
- map: HTMLProps<HTMLMapElement>;
979
- mark: HTMLProps<HTMLElement>;
980
- menu: HTMLProps<HTMLElement>;
981
- menuitem: HTMLProps<HTMLElement>;
982
- meta: HTMLProps<HTMLMetaElement>;
983
- meter: HTMLProps<HTMLElement>;
984
- nav: HTMLProps<HTMLElement>;
985
- noindex: HTMLProps<HTMLElement>;
986
- noscript: HTMLProps<HTMLElement>;
987
- object: HTMLProps<HTMLObjectElement>;
988
- ol: HTMLProps<HTMLOListElement>;
989
- optgroup: HTMLProps<HTMLOptGroupElement>;
990
- option: HTMLProps<HTMLOptionElement>;
991
- output: HTMLProps<HTMLElement>;
992
- p: HTMLProps<HTMLParagraphElement>;
993
- param: HTMLProps<HTMLParamElement>;
994
- picture: HTMLProps<HTMLElement>;
995
- pre: HTMLProps<HTMLPreElement>;
996
- progress: HTMLProps<HTMLProgressElement>;
997
- q: HTMLProps<HTMLQuoteElement>;
998
- rp: HTMLProps<HTMLElement>;
999
- rt: HTMLProps<HTMLElement>;
1000
- ruby: HTMLProps<HTMLElement>;
1001
- s: HTMLProps<HTMLElement>;
1002
- samp: HTMLProps<HTMLElement>;
1003
- script: HTMLProps<HTMLElement> & AstroScriptAttributes;
1004
- section: HTMLProps<HTMLElement>;
1005
- select: HTMLProps<HTMLSelectElement>;
1006
- small: HTMLProps<HTMLElement>;
1007
- source: HTMLProps<HTMLSourceElement>;
1008
- span: HTMLProps<HTMLSpanElement>;
1009
- strong: HTMLProps<HTMLElement>;
1010
- style: HTMLProps<HTMLStyleElement> & AstroStyleAttributes;
1011
- sub: HTMLProps<HTMLElement>;
1012
- summary: HTMLProps<HTMLElement>;
1013
- sup: HTMLProps<HTMLElement>;
1014
- table: HTMLProps<HTMLTableElement>;
1015
- tbody: HTMLProps<HTMLTableSectionElement>;
1016
- td: HTMLProps<HTMLTableCellElement>;
1017
- textarea: HTMLProps<HTMLTextAreaElement>;
1018
- tfoot: HTMLProps<HTMLTableSectionElement>;
1019
- th: HTMLProps<HTMLTableCellElement>;
1020
- thead: HTMLProps<HTMLTableSectionElement>;
1021
- time: HTMLProps<HTMLElement>;
1022
- title: HTMLProps<HTMLTitleElement>;
1023
- tr: HTMLProps<HTMLTableRowElement>;
1024
- track: HTMLProps<HTMLTrackElement>;
1025
- u: HTMLProps<HTMLElement>;
1026
- ul: HTMLProps<HTMLUListElement>;
1027
- var: HTMLProps<HTMLElement>;
1028
- video: HTMLProps<HTMLVideoElement>;
1029
- wbr: HTMLProps<HTMLElement>;
1030
-
1031
- svg: SVGProps<SVGSVGElement>;
1032
-
1033
- animate: SVGProps<SVGAnimateElement>;
1034
- circle: SVGProps<SVGCircleElement>;
1035
- clipPath: SVGProps<SVGClipPathElement>;
1036
- defs: SVGProps<SVGDefsElement>;
1037
- desc: SVGProps<SVGDescElement>;
1038
- ellipse: SVGProps<SVGEllipseElement>;
1039
- feBlend: SVGProps<SVGFEBlendElement>;
1040
- feColorMatrix: SVGProps<SVGFEColorMatrixElement>;
1041
- feComponentTransfer: SVGProps<SVGFEComponentTransferElement>;
1042
- feComposite: SVGProps<SVGFECompositeElement>;
1043
- feConvolveMatrix: SVGProps<SVGFEConvolveMatrixElement>;
1044
- feDiffuseLighting: SVGProps<SVGFEDiffuseLightingElement>;
1045
- feDisplacementMap: SVGProps<SVGFEDisplacementMapElement>;
1046
- feDistantLight: SVGProps<SVGFEDistantLightElement>;
1047
- feFlood: SVGProps<SVGFEFloodElement>;
1048
- feFuncA: SVGProps<SVGFEFuncAElement>;
1049
- feFuncB: SVGProps<SVGFEFuncBElement>;
1050
- feFuncG: SVGProps<SVGFEFuncGElement>;
1051
- feFuncR: SVGProps<SVGFEFuncRElement>;
1052
- feGaussianBlur: SVGProps<SVGFEGaussianBlurElement>;
1053
- feImage: SVGProps<SVGFEImageElement>;
1054
- feMerge: SVGProps<SVGFEMergeElement>;
1055
- feMergeNode: SVGProps<SVGFEMergeNodeElement>;
1056
- feMorphology: SVGProps<SVGFEMorphologyElement>;
1057
- feOffset: SVGProps<SVGFEOffsetElement>;
1058
- fePointLight: SVGProps<SVGFEPointLightElement>;
1059
- feSpecularLighting: SVGProps<SVGFESpecularLightingElement>;
1060
- feSpotLight: SVGProps<SVGFESpotLightElement>;
1061
- feTile: SVGProps<SVGFETileElement>;
1062
- feTurbulence: SVGProps<SVGFETurbulenceElement>;
1063
- filter: SVGProps<SVGFilterElement>;
1064
- foreignObject: SVGProps<SVGForeignObjectElement>;
1065
- g: SVGProps<SVGGElement>;
1066
- image: SVGProps<SVGImageElement>;
1067
- line: SVGProps<SVGLineElement>;
1068
- linearGradient: SVGProps<SVGLinearGradientElement>;
1069
- marker: SVGProps<SVGMarkerElement>;
1070
- mask: SVGProps<SVGMaskElement>;
1071
- metadata: SVGProps<SVGMetadataElement>;
1072
- path: SVGProps<SVGPathElement>;
1073
- pattern: SVGProps<SVGPatternElement>;
1074
- polygon: SVGProps<SVGPolygonElement>;
1075
- polyline: SVGProps<SVGPolylineElement>;
1076
- radialGradient: SVGProps<SVGRadialGradientElement>;
1077
- rect: SVGProps<SVGRectElement>;
1078
- stop: SVGProps<SVGStopElement>;
1079
- switch: SVGProps<SVGSwitchElement>;
1080
- symbol: SVGProps<SVGSymbolElement>;
1081
- text: SVGProps<SVGTextElement>;
1082
- textPath: SVGProps<SVGTextPathElement>;
1083
- tspan: SVGProps<SVGTSpanElement>;
1084
- use: SVGProps<SVGUseElement>;
1085
- view: SVGProps<SVGViewElement>;
1290
+ a: AnchorHTMLAttributes;
1291
+ abbr: HTMLAttributes;
1292
+ address: HTMLAttributes;
1293
+ area: AreaHTMLAttributes;
1294
+ article: HTMLAttributes;
1295
+ aside: HTMLAttributes;
1296
+ audio: AudioHTMLAttributes;
1297
+ b: HTMLAttributes;
1298
+ base: BaseHTMLAttributes;
1299
+ bdi: HTMLAttributes;
1300
+ bdo: HTMLAttributes;
1301
+ big: HTMLAttributes;
1302
+ blockquote: BlockquoteHTMLAttributes;
1303
+ body: HTMLAttributes;
1304
+ br: HTMLAttributes;
1305
+ button: ButtonHTMLAttributes;
1306
+ canvas: CanvasHTMLAttributes;
1307
+ caption: HTMLAttributes;
1308
+ cite: HTMLAttributes;
1309
+ code: HTMLAttributes;
1310
+ col: ColHTMLAttributes;
1311
+ colgroup: ColgroupHTMLAttributes;
1312
+ data: DataHTMLAttributes;
1313
+ datalist: HTMLAttributes;
1314
+ dd: HTMLAttributes;
1315
+ del: DelHTMLAttributes;
1316
+ details: DetailsHTMLAttributes;
1317
+ dfn: HTMLAttributes;
1318
+ dialog: DialogHTMLAttributes;
1319
+ div: HTMLAttributes;
1320
+ dl: HTMLAttributes;
1321
+ dt: HTMLAttributes;
1322
+ em: HTMLAttributes;
1323
+ embed: EmbedHTMLAttributes;
1324
+ fieldset: FieldsetHTMLAttributes;
1325
+ figcaption: HTMLAttributes;
1326
+ figure: HTMLAttributes;
1327
+ footer: HTMLAttributes;
1328
+ form: FormHTMLAttributes;
1329
+ h1: HTMLAttributes;
1330
+ h2: HTMLAttributes;
1331
+ h3: HTMLAttributes;
1332
+ h4: HTMLAttributes;
1333
+ h5: HTMLAttributes;
1334
+ h6: HTMLAttributes;
1335
+ head: HTMLAttributes;
1336
+ header: HTMLAttributes;
1337
+ hgroup: HTMLAttributes;
1338
+ hr: HTMLAttributes;
1339
+ html: HtmlHTMLAttributes;
1340
+ i: HTMLAttributes;
1341
+ iframe: IframeHTMLAttributes;
1342
+ img: ImgHTMLAttributes;
1343
+ input: InputHTMLAttributes;
1344
+ ins: InsHTMLAttributes;
1345
+ kbd: HTMLAttributes;
1346
+ keygen: KeygenHTMLAttributes;
1347
+ label: LabelHTMLAttributes;
1348
+ legend: HTMLAttributes;
1349
+ li: LiHTMLAttributes;
1350
+ link: LinkHTMLAttributes;
1351
+ main: HTMLAttributes;
1352
+ map: MapHTMLAttributes;
1353
+ mark: HTMLAttributes;
1354
+ menu: MenuHTMLAttributes;
1355
+ menuitem: HTMLAttributes;
1356
+ meta: MetaHTMLAttributes;
1357
+ meter: MeterHTMLAttributes;
1358
+ nav: HTMLAttributes;
1359
+ noindex: HTMLAttributes; // https://en.wikipedia.org/wiki/Noindex#%3Cnoindex%3E_tag
1360
+ noscript: HTMLAttributes;
1361
+ object: ObjectHTMLAttributes;
1362
+ ol: OlHTMLAttributes;
1363
+ optgroup: OptgroupHTMLAttributes;
1364
+ option: OptionHTMLAttributes;
1365
+ output: OutputHTMLAttributes;
1366
+ p: HTMLAttributes;
1367
+ param: ParamHTMLAttributes;
1368
+ picture: HTMLAttributes;
1369
+ pre: HTMLAttributes;
1370
+ progress: ProgressHTMLAttributes;
1371
+ q: QuoteHTMLAttributes;
1372
+ rp: HTMLAttributes;
1373
+ rt: HTMLAttributes;
1374
+ ruby: HTMLAttributes;
1375
+ s: HTMLAttributes;
1376
+ samp: HTMLAttributes;
1377
+ slot: SlotHTMLAttributes;
1378
+ script: ScriptHTMLAttributes & AstroScriptAttributes;
1379
+ section: HTMLAttributes;
1380
+ select: SelectHTMLAttributes;
1381
+ small: HTMLAttributes;
1382
+ source: SourceHTMLAttributes;
1383
+ span: HTMLAttributes;
1384
+ strong: HTMLAttributes;
1385
+ style: StyleHTMLAttributes & AstroStyleAttributes;
1386
+ sub: HTMLAttributes;
1387
+ summary: HTMLAttributes;
1388
+ sup: HTMLAttributes;
1389
+ table: TableHTMLAttributes;
1390
+ tbody: HTMLAttributes;
1391
+ td: TdHTMLAttributes;
1392
+ textarea: TextareaHTMLAttributes;
1393
+ tfoot: HTMLAttributes;
1394
+ th: ThHTMLAttributes;
1395
+ thead: HTMLAttributes;
1396
+ time: TimeHTMLAttributes;
1397
+ title: HTMLAttributes;
1398
+ tr: HTMLAttributes;
1399
+ track: TrackHTMLAttributes;
1400
+ u: HTMLAttributes;
1401
+ ul: HTMLAttributes;
1402
+ var: HTMLAttributes;
1403
+ video: VideoHTMLAttributes;
1404
+ wbr: HTMLAttributes;
1405
+
1406
+ // SVG
1407
+ svg: SVGAttributes;
1408
+ animate: SVGAttributes;
1409
+ circle: SVGAttributes;
1410
+ clipPath: SVGAttributes;
1411
+ defs: SVGAttributes;
1412
+ desc: SVGAttributes;
1413
+ ellipse: SVGAttributes;
1414
+ feBlend: SVGAttributes;
1415
+ feColorMatrix: SVGAttributes;
1416
+ feComponentTransfer: SVGAttributes;
1417
+ feComposite: SVGAttributes;
1418
+ feConvolveMatrix: SVGAttributes;
1419
+ feDiffuseLighting: SVGAttributes;
1420
+ feDisplacementMap: SVGAttributes;
1421
+ feDistantLight: SVGAttributes;
1422
+ feFlood: SVGAttributes;
1423
+ feFuncA: SVGAttributes;
1424
+ feFuncB: SVGAttributes;
1425
+ feFuncG: SVGAttributes;
1426
+ feFuncR: SVGAttributes;
1427
+ feGaussianBlur: SVGAttributes;
1428
+ feImage: SVGAttributes;
1429
+ feMerge: SVGAttributes;
1430
+ feMergeNode: SVGAttributes;
1431
+ feMorphology: SVGAttributes;
1432
+ feOffset: SVGAttributes;
1433
+ fePointLight: SVGAttributes;
1434
+ feSpecularLighting: SVGAttributes;
1435
+ feSpotLight: SVGAttributes;
1436
+ feTile: SVGAttributes;
1437
+ feTurbulence: SVGAttributes;
1438
+ filter: SVGAttributes;
1439
+ foreignObject: SVGAttributes;
1440
+ g: SVGAttributes;
1441
+ image: SVGAttributes;
1442
+ line: SVGAttributes;
1443
+ linearGradient: SVGAttributes;
1444
+ marker: SVGAttributes;
1445
+ mask: SVGAttributes;
1446
+ metadata: SVGAttributes;
1447
+ path: SVGAttributes;
1448
+ pattern: SVGAttributes;
1449
+ polygon: SVGAttributes;
1450
+ polyline: SVGAttributes;
1451
+ radialGradient: SVGAttributes;
1452
+ rect: SVGAttributes;
1453
+ stop: SVGAttributes;
1454
+ switch: SVGAttributes;
1455
+ symbol: SVGAttributes;
1456
+ text: SVGAttributes;
1457
+ textPath: SVGAttributes;
1458
+ tspan: SVGAttributes;
1459
+ use: SVGAttributes;
1460
+ view: SVGAttributes;
1086
1461
 
1462
+ // Allow for arbitrary elements
1087
1463
  [name: string]: { [name: string]: any };
1088
1464
  }
1089
1465
  }