ripple 0.3.59 → 0.3.61

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.
@@ -43,8 +43,422 @@ export function Fragment(props: { children?: any }): void;
43
43
 
44
44
  export type ClassValue = string | import('clsx').ClassArray | import('clsx').ClassDictionary;
45
45
 
46
+ type Event<
47
+ Target extends globalThis.EventTarget,
48
+ EventType extends globalThis.Event,
49
+ > = EventType & {
50
+ readonly currentTarget: Target;
51
+ };
52
+
53
+ type EventHandler<Target extends globalThis.EventTarget, EventType extends globalThis.Event> = (
54
+ this: Target,
55
+ event: Event<Target, EventType>,
56
+ ) => void;
57
+
58
+ type EventHandlerObject<
59
+ Target extends globalThis.EventTarget,
60
+ EventType extends globalThis.Event,
61
+ > = Omit<AddEventObject, 'handleEvent'> & {
62
+ handleEvent(this: Target, event: Event<Target, EventType>): void;
63
+ };
64
+
65
+ type EventHandlerValue<Target extends globalThis.EventTarget, EventType extends globalThis.Event> =
66
+ | EventHandler<Target, EventType>
67
+ | EventHandlerObject<Target, EventType>;
68
+
69
+ type ElementEventHandler<
70
+ Target extends globalThis.EventTarget,
71
+ Type extends keyof GlobalEventHandlersEventMap,
72
+ > = EventHandlerValue<Target, GlobalEventHandlersEventMap[Type]>;
73
+
74
+ type SVGElementAttributes<Tag extends keyof SVGElementTagNameMap> = HTMLAttributes<
75
+ SVGElementTagNameMap[Tag]
76
+ > &
77
+ SVGAttributes<SVGElementTagNameMap[Tag]>;
78
+
79
+ type BaseHTMLAttributes<Target extends HTMLBaseElement = HTMLBaseElement> =
80
+ HTMLAttributes<Target> & {
81
+ href?: Nullable<string>;
82
+ target?: Nullable<string>;
83
+ };
84
+
85
+ type LinkHTMLAttributes<Target extends HTMLLinkElement = HTMLLinkElement> =
86
+ HTMLAttributes<Target> & {
87
+ rel?: Nullable<string>;
88
+ href?: Nullable<string>;
89
+ type?: Nullable<string>;
90
+ media?: Nullable<string>;
91
+ as?: Nullable<string>;
92
+ crossOrigin?: 'anonymous' | 'use-credentials';
93
+ integrity?: Nullable<string>;
94
+ };
95
+
96
+ type MetaHTMLAttributes<Target extends HTMLMetaElement = HTMLMetaElement> =
97
+ HTMLAttributes<Target> & {
98
+ name?: Nullable<string>;
99
+ content?: Nullable<string>;
100
+ charSet?: Nullable<string>;
101
+ httpEquiv?: Nullable<string>;
102
+ property?: Nullable<string>;
103
+ };
104
+
105
+ type StyleHTMLAttributes<Target extends HTMLStyleElement = HTMLStyleElement> =
106
+ HTMLAttributes<Target> & {
107
+ type?: Nullable<string>;
108
+ media?: Nullable<string>;
109
+ };
110
+
111
+ type BlockquoteHTMLAttributes<Target extends HTMLQuoteElement = HTMLQuoteElement> =
112
+ HTMLAttributes<Target> & {
113
+ cite?: Nullable<string>;
114
+ };
115
+
116
+ type LiHTMLAttributes<Target extends HTMLLIElement = HTMLLIElement> = HTMLAttributes<Target> & {
117
+ value?: Nullable<number>;
118
+ };
119
+
120
+ type OlHTMLAttributes<Target extends HTMLOListElement = HTMLOListElement> =
121
+ HTMLAttributes<Target> & {
122
+ reversed?: boolean;
123
+ start?: Nullable<number>;
124
+ type?: '1' | 'a' | 'A' | 'i' | 'I';
125
+ };
126
+
127
+ type AnchorHTMLAttributes<Target extends HTMLAnchorElement = HTMLAnchorElement> =
128
+ HTMLAttributes<Target> & {
129
+ href?: Nullable<string>;
130
+ target?: Nullable<string>;
131
+ rel?: Nullable<string>;
132
+ download?: string | boolean;
133
+ hrefLang?: Nullable<string>;
134
+ type?: Nullable<string>;
135
+ referrerPolicy?: Nullable<string>;
136
+ };
137
+
138
+ type DataHTMLAttributes<Target extends HTMLDataElement = HTMLDataElement> =
139
+ HTMLAttributes<Target> & {
140
+ value?: Nullable<string>;
141
+ };
142
+
143
+ type QuoteHTMLAttributes<Target extends HTMLQuoteElement = HTMLQuoteElement> =
144
+ HTMLAttributes<Target> & {
145
+ cite?: Nullable<string>;
146
+ };
147
+
148
+ type TimeHTMLAttributes<Target extends HTMLTimeElement = HTMLTimeElement> =
149
+ HTMLAttributes<Target> & {
150
+ dateTime?: Nullable<string>;
151
+ };
152
+
153
+ type AreaHTMLAttributes<Target extends HTMLAreaElement = HTMLAreaElement> =
154
+ HTMLAttributes<Target> & {
155
+ alt?: Nullable<string>;
156
+ coords?: Nullable<string>;
157
+ download?: Nullable<string>;
158
+ href?: Nullable<string>;
159
+ hrefLang?: Nullable<string>;
160
+ media?: Nullable<string>;
161
+ rel?: Nullable<string>;
162
+ shape?: 'rect' | 'circle' | 'poly' | 'default';
163
+ target?: Nullable<string>;
164
+ };
165
+
166
+ type AudioHTMLAttributes<Target extends HTMLAudioElement = HTMLAudioElement> =
167
+ HTMLAttributes<Target> & {
168
+ src?: Nullable<string>;
169
+ autoplay?: boolean;
170
+ controls?: boolean;
171
+ loop?: boolean;
172
+ muted?: boolean;
173
+ preload?: 'none' | 'metadata' | 'auto';
174
+ crossOrigin?: 'anonymous' | 'use-credentials';
175
+ };
176
+
177
+ type ImgHTMLAttributes<Target extends HTMLImageElement = HTMLImageElement> =
178
+ HTMLAttributes<Target> & {
179
+ src?: Nullable<string>;
180
+ alt?: Nullable<string>;
181
+ width?: string | number;
182
+ height?: string | number;
183
+ loading?: 'eager' | 'lazy';
184
+ crossOrigin?: 'anonymous' | 'use-credentials';
185
+ decoding?: 'sync' | 'async' | 'auto';
186
+ fetchPriority?: 'high' | 'low' | 'auto';
187
+ referrerPolicy?: Nullable<string>;
188
+ sizes?: Nullable<string>;
189
+ srcSet?: Nullable<string>;
190
+ useMap?: Nullable<string>;
191
+ };
192
+
193
+ type MapHTMLAttributes<Target extends HTMLMapElement = HTMLMapElement> = HTMLAttributes<Target> & {
194
+ name?: Nullable<string>;
195
+ };
196
+
197
+ type TrackHTMLAttributes<Target extends HTMLTrackElement = HTMLTrackElement> =
198
+ HTMLAttributes<Target> & {
199
+ default?: boolean;
200
+ kind?: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata';
201
+ label?: Nullable<string>;
202
+ src?: Nullable<string>;
203
+ srcLang?: Nullable<string>;
204
+ };
205
+
206
+ type VideoHTMLAttributes<Target extends HTMLVideoElement = HTMLVideoElement> =
207
+ HTMLAttributes<Target> & {
208
+ src?: Nullable<string>;
209
+ autoplay?: boolean;
210
+ controls?: boolean;
211
+ loop?: boolean;
212
+ muted?: boolean;
213
+ preload?: 'none' | 'metadata' | 'auto';
214
+ poster?: Nullable<string>;
215
+ width?: string | number;
216
+ height?: string | number;
217
+ crossOrigin?: 'anonymous' | 'use-credentials';
218
+ playsInline?: boolean;
219
+ };
220
+
221
+ type EmbedHTMLAttributes<Target extends HTMLEmbedElement = HTMLEmbedElement> =
222
+ HTMLAttributes<Target> & {
223
+ src?: Nullable<string>;
224
+ type?: Nullable<string>;
225
+ width?: string | number;
226
+ height?: string | number;
227
+ };
228
+
229
+ type IframeHTMLAttributes<Target extends HTMLIFrameElement = HTMLIFrameElement> =
230
+ HTMLAttributes<Target> & {
231
+ src?: Nullable<string>;
232
+ srcdoc?: Nullable<string>;
233
+ name?: Nullable<string>;
234
+ sandbox?: Nullable<string>;
235
+ allow?: Nullable<string>;
236
+ allowFullScreen?: boolean;
237
+ width?: string | number;
238
+ height?: string | number;
239
+ loading?: 'eager' | 'lazy';
240
+ referrerPolicy?: Nullable<string>;
241
+ };
242
+
243
+ type ObjectHTMLAttributes<Target extends HTMLObjectElement = HTMLObjectElement> =
244
+ HTMLAttributes<Target> & {
245
+ data?: Nullable<string>;
246
+ type?: Nullable<string>;
247
+ name?: Nullable<string>;
248
+ useMap?: Nullable<string>;
249
+ width?: string | number;
250
+ height?: string | number;
251
+ };
252
+
253
+ type PortalHTMLAttributes<Target extends HTMLElement = HTMLElement> = HTMLAttributes<Target> & {
254
+ referrerPolicy?: Nullable<string>;
255
+ src?: Nullable<string>;
256
+ };
257
+
258
+ type SourceHTMLAttributes<Target extends HTMLSourceElement = HTMLSourceElement> =
259
+ HTMLAttributes<Target> & {
260
+ src?: Nullable<string>;
261
+ type?: Nullable<string>;
262
+ media?: Nullable<string>;
263
+ sizes?: Nullable<string>;
264
+ srcSet?: Nullable<string>;
265
+ };
266
+
267
+ type CanvasHTMLAttributes<Target extends HTMLCanvasElement = HTMLCanvasElement> =
268
+ HTMLAttributes<Target> & {
269
+ width?: string | number;
270
+ height?: string | number;
271
+ };
272
+
273
+ type ScriptHTMLAttributes<Target extends HTMLScriptElement = HTMLScriptElement> =
274
+ HTMLAttributes<Target> & {
275
+ src?: Nullable<string>;
276
+ type?: Nullable<string>;
277
+ async?: boolean;
278
+ defer?: boolean;
279
+ crossOrigin?: 'anonymous' | 'use-credentials';
280
+ integrity?: Nullable<string>;
281
+ noModule?: boolean;
282
+ referrerPolicy?: Nullable<string>;
283
+ };
284
+
285
+ type ModHTMLAttributes<Target extends HTMLModElement = HTMLModElement> = HTMLAttributes<Target> & {
286
+ cite?: Nullable<string>;
287
+ dateTime?: Nullable<string>;
288
+ };
289
+
290
+ type ColHTMLAttributes<Target extends HTMLTableColElement = HTMLTableColElement> =
291
+ HTMLAttributes<Target> & {
292
+ span?: Nullable<number>;
293
+ };
294
+
295
+ type TableCellHTMLAttributes<Target extends HTMLTableCellElement = HTMLTableCellElement> =
296
+ HTMLAttributes<Target> & {
297
+ colSpan?: Nullable<number>;
298
+ rowSpan?: Nullable<number>;
299
+ headers?: Nullable<string>;
300
+ };
301
+
302
+ type ThHTMLAttributes<Target extends HTMLTableCellElement = HTMLTableCellElement> =
303
+ TableCellHTMLAttributes<Target> & {
304
+ scope?: 'row' | 'col' | 'rowgroup' | 'colgroup';
305
+ abbr?: Nullable<string>;
306
+ };
307
+
308
+ type ButtonHTMLAttributes<Target extends HTMLButtonElement = HTMLButtonElement> =
309
+ HTMLAttributes<Target> & {
310
+ type?: 'button' | 'submit' | 'reset';
311
+ disabled?: boolean;
312
+ form?: Nullable<string>;
313
+ formAction?: Nullable<string>;
314
+ formEncType?: Nullable<string>;
315
+ formMethod?: Nullable<string>;
316
+ formNoValidate?: boolean;
317
+ formTarget?: Nullable<string>;
318
+ name?: Nullable<string>;
319
+ value?: Nullable<string>;
320
+ };
321
+
322
+ type FieldsetHTMLAttributes<Target extends HTMLFieldSetElement = HTMLFieldSetElement> =
323
+ HTMLAttributes<Target> & {
324
+ disabled?: boolean;
325
+ form?: Nullable<string>;
326
+ name?: Nullable<string>;
327
+ };
328
+
329
+ type FormHTMLAttributes<Target extends HTMLFormElement = HTMLFormElement> =
330
+ HTMLAttributes<Target> & {
331
+ action?: Nullable<string>;
332
+ method?: 'get' | 'post' | 'dialog';
333
+ encType?: Nullable<string>;
334
+ acceptCharset?: Nullable<string>;
335
+ autoComplete?: 'on' | 'off';
336
+ noValidate?: boolean;
337
+ target?: Nullable<string>;
338
+ };
339
+
340
+ type InputHTMLAttributes<Target extends HTMLInputElement = HTMLInputElement> =
341
+ HTMLAttributes<Target> & {
342
+ type?: Nullable<string>;
343
+ value?: string | number;
344
+ placeholder?: Nullable<string>;
345
+ disabled?: boolean;
346
+ name?: Nullable<string>;
347
+ accept?: Nullable<string>;
348
+ autoComplete?: Nullable<string>;
349
+ autoFocus?: boolean;
350
+ checked?: boolean;
351
+ form?: Nullable<string>;
352
+ formAction?: Nullable<string>;
353
+ formEncType?: Nullable<string>;
354
+ formMethod?: Nullable<string>;
355
+ formNoValidate?: boolean;
356
+ formTarget?: Nullable<string>;
357
+ list?: Nullable<string>;
358
+ max?: string | number;
359
+ maxLength?: Nullable<number>;
360
+ min?: string | number;
361
+ minLength?: Nullable<number>;
362
+ multiple?: boolean;
363
+ pattern?: Nullable<string>;
364
+ readOnly?: boolean;
365
+ required?: boolean;
366
+ size?: Nullable<number>;
367
+ src?: Nullable<string>;
368
+ step?: string | number;
369
+ width?: string | number;
370
+ height?: string | number;
371
+ };
372
+
373
+ type LabelHTMLAttributes<Target extends HTMLLabelElement = HTMLLabelElement> =
374
+ HTMLAttributes<Target> & {
375
+ for?: Nullable<string>;
376
+ htmlFor?: Nullable<string>;
377
+ };
378
+
379
+ type MeterHTMLAttributes<Target extends HTMLMeterElement = HTMLMeterElement> =
380
+ HTMLAttributes<Target> & {
381
+ value?: Nullable<number>;
382
+ min?: Nullable<number>;
383
+ max?: Nullable<number>;
384
+ low?: Nullable<number>;
385
+ high?: Nullable<number>;
386
+ optimum?: Nullable<number>;
387
+ };
388
+
389
+ type OptgroupHTMLAttributes<Target extends HTMLOptGroupElement = HTMLOptGroupElement> =
390
+ HTMLAttributes<Target> & {
391
+ disabled?: boolean;
392
+ label?: Nullable<string>;
393
+ };
394
+
395
+ type OptionHTMLAttributes<Target extends HTMLOptionElement = HTMLOptionElement> =
396
+ HTMLAttributes<Target> & {
397
+ value?: string | number;
398
+ selected?: boolean;
399
+ disabled?: boolean;
400
+ label?: Nullable<string>;
401
+ };
402
+
403
+ type OutputHTMLAttributes<Target extends HTMLOutputElement = HTMLOutputElement> =
404
+ HTMLAttributes<Target> & {
405
+ for?: Nullable<string>;
406
+ htmlFor?: Nullable<string>;
407
+ form?: Nullable<string>;
408
+ name?: Nullable<string>;
409
+ };
410
+
411
+ type ProgressHTMLAttributes<Target extends HTMLProgressElement = HTMLProgressElement> =
412
+ HTMLAttributes<Target> & {
413
+ value?: Nullable<number>;
414
+ max?: Nullable<number>;
415
+ };
416
+
417
+ type SelectHTMLAttributes<Target extends HTMLSelectElement = HTMLSelectElement> =
418
+ HTMLAttributes<Target> & {
419
+ disabled?: boolean;
420
+ form?: Nullable<string>;
421
+ multiple?: boolean;
422
+ name?: Nullable<string>;
423
+ required?: boolean;
424
+ size?: Nullable<number>;
425
+ autoComplete?: Nullable<string>;
426
+ };
427
+
428
+ type TextareaHTMLAttributes<Target extends HTMLTextAreaElement = HTMLTextAreaElement> =
429
+ HTMLAttributes<Target> & {
430
+ placeholder?: Nullable<string>;
431
+ disabled?: boolean;
432
+ rows?: Nullable<number>;
433
+ cols?: Nullable<number>;
434
+ name?: Nullable<string>;
435
+ form?: Nullable<string>;
436
+ maxLength?: Nullable<number>;
437
+ minLength?: Nullable<number>;
438
+ readOnly?: boolean;
439
+ required?: boolean;
440
+ wrap?: 'soft' | 'hard';
441
+ autoComplete?: Nullable<string>;
442
+ autoFocus?: boolean;
443
+ };
444
+
445
+ type DetailsHTMLAttributes<Target extends HTMLDetailsElement = HTMLDetailsElement> =
446
+ HTMLAttributes<Target> & {
447
+ open?: boolean;
448
+ };
449
+
450
+ type DialogHTMLAttributes<Target extends HTMLDialogElement = HTMLDialogElement> =
451
+ HTMLAttributes<Target> & {
452
+ open?: boolean;
453
+ };
454
+
455
+ type SlotHTMLAttributes<Target extends HTMLSlotElement = HTMLSlotElement> =
456
+ HTMLAttributes<Target> & {
457
+ name?: Nullable<string>;
458
+ };
459
+
46
460
  // Base HTML attributes
47
- interface HTMLAttributes {
461
+ interface HTMLAttributes<Target extends globalThis.Element = globalThis.HTMLElement> {
48
462
  class?: ClassValue | undefined | null;
49
463
  className?: Nullable<string>;
50
464
  id?: Nullable<string>;
@@ -84,53 +498,93 @@ interface HTMLAttributes {
84
498
  'aria-valuetext'?: Nullable<string>;
85
499
 
86
500
  // Event handlers
87
- onClick?: EventListener | AddEventObject;
88
- onDblClick?: EventListener | AddEventObject;
89
- onInput?: EventListener | AddEventObject;
90
- onChange?: EventListener | AddEventObject;
91
- onSubmit?: EventListener | AddEventObject;
92
- onFocus?: EventListener | AddEventObject;
93
- onBlur?: EventListener | AddEventObject;
94
- onKeyDown?: EventListener | AddEventObject;
95
- onKeyUp?: EventListener | AddEventObject;
96
- onKeyPress?: EventListener | AddEventObject;
97
- onMouseDown?: EventListener | AddEventObject;
98
- onMouseUp?: EventListener | AddEventObject;
99
- onMouseEnter?: EventListener | AddEventObject;
100
- onMouseLeave?: EventListener | AddEventObject;
101
- onMouseMove?: EventListener | AddEventObject;
102
- onMouseOver?: EventListener | AddEventObject;
103
- onMouseOut?: EventListener | AddEventObject;
104
- onWheel?: EventListener | AddEventObject;
105
- onScroll?: EventListener | AddEventObject;
106
- onTouchStart?: EventListener | AddEventObject;
107
- onTouchMove?: EventListener | AddEventObject;
108
- onTouchEnd?: EventListener | AddEventObject;
109
- onTouchCancel?: EventListener | AddEventObject;
110
- onDragStart?: EventListener | AddEventObject;
111
- onDrag?: EventListener | AddEventObject;
112
- onDragEnd?: EventListener | AddEventObject;
113
- onDragEnter?: EventListener | AddEventObject;
114
- onDragLeave?: EventListener | AddEventObject;
115
- onDragOver?: EventListener | AddEventObject;
116
- onDrop?: EventListener | AddEventObject;
117
- onCopy?: EventListener | AddEventObject;
118
- onCut?: EventListener | AddEventObject;
119
- onPaste?: EventListener | AddEventObject;
120
- onLoad?: EventListener | AddEventObject;
121
- onError?: EventListener | AddEventObject;
122
- onResize?: EventListener | AddEventObject;
123
- onAnimationStart?: EventListener | AddEventObject;
124
- onAnimationEnd?: EventListener | AddEventObject;
125
- onAnimationIteration?: EventListener | AddEventObject;
126
- onTransitionEnd?: EventListener | AddEventObject;
501
+ onClick?: ElementEventHandler<Target, 'click'>;
502
+ onClickCapture?: ElementEventHandler<Target, 'click'>;
503
+ onDblClick?: ElementEventHandler<Target, 'dblclick'>;
504
+ onDblClickCapture?: ElementEventHandler<Target, 'dblclick'>;
505
+ onInput?: ElementEventHandler<Target, 'input'>;
506
+ onInputCapture?: ElementEventHandler<Target, 'input'>;
507
+ onChange?: ElementEventHandler<Target, 'change'>;
508
+ onChangeCapture?: ElementEventHandler<Target, 'change'>;
509
+ onSubmit?: ElementEventHandler<Target, 'submit'>;
510
+ onSubmitCapture?: ElementEventHandler<Target, 'submit'>;
511
+ onFocus?: ElementEventHandler<Target, 'focus'>;
512
+ onFocusCapture?: ElementEventHandler<Target, 'focus'>;
513
+ onBlur?: ElementEventHandler<Target, 'blur'>;
514
+ onBlurCapture?: ElementEventHandler<Target, 'blur'>;
515
+ onKeyDown?: ElementEventHandler<Target, 'keydown'>;
516
+ onKeyDownCapture?: ElementEventHandler<Target, 'keydown'>;
517
+ onKeyUp?: ElementEventHandler<Target, 'keyup'>;
518
+ onKeyUpCapture?: ElementEventHandler<Target, 'keyup'>;
519
+ onKeyPress?: ElementEventHandler<Target, 'keypress'>;
520
+ onKeyPressCapture?: ElementEventHandler<Target, 'keypress'>;
521
+ onMouseDown?: ElementEventHandler<Target, 'mousedown'>;
522
+ onMouseDownCapture?: ElementEventHandler<Target, 'mousedown'>;
523
+ onMouseUp?: ElementEventHandler<Target, 'mouseup'>;
524
+ onMouseUpCapture?: ElementEventHandler<Target, 'mouseup'>;
525
+ onMouseEnter?: ElementEventHandler<Target, 'mouseenter'>;
526
+ onMouseEnterCapture?: ElementEventHandler<Target, 'mouseenter'>;
527
+ onMouseLeave?: ElementEventHandler<Target, 'mouseleave'>;
528
+ onMouseLeaveCapture?: ElementEventHandler<Target, 'mouseleave'>;
529
+ onMouseMove?: ElementEventHandler<Target, 'mousemove'>;
530
+ onMouseMoveCapture?: ElementEventHandler<Target, 'mousemove'>;
531
+ onMouseOver?: ElementEventHandler<Target, 'mouseover'>;
532
+ onMouseOverCapture?: ElementEventHandler<Target, 'mouseover'>;
533
+ onMouseOut?: ElementEventHandler<Target, 'mouseout'>;
534
+ onMouseOutCapture?: ElementEventHandler<Target, 'mouseout'>;
535
+ onWheel?: ElementEventHandler<Target, 'wheel'>;
536
+ onWheelCapture?: ElementEventHandler<Target, 'wheel'>;
537
+ onScroll?: ElementEventHandler<Target, 'scroll'>;
538
+ onScrollCapture?: ElementEventHandler<Target, 'scroll'>;
539
+ onTouchStart?: ElementEventHandler<Target, 'touchstart'>;
540
+ onTouchStartCapture?: ElementEventHandler<Target, 'touchstart'>;
541
+ onTouchMove?: ElementEventHandler<Target, 'touchmove'>;
542
+ onTouchMoveCapture?: ElementEventHandler<Target, 'touchmove'>;
543
+ onTouchEnd?: ElementEventHandler<Target, 'touchend'>;
544
+ onTouchEndCapture?: ElementEventHandler<Target, 'touchend'>;
545
+ onTouchCancel?: ElementEventHandler<Target, 'touchcancel'>;
546
+ onTouchCancelCapture?: ElementEventHandler<Target, 'touchcancel'>;
547
+ onDragStart?: ElementEventHandler<Target, 'dragstart'>;
548
+ onDragStartCapture?: ElementEventHandler<Target, 'dragstart'>;
549
+ onDrag?: ElementEventHandler<Target, 'drag'>;
550
+ onDragCapture?: ElementEventHandler<Target, 'drag'>;
551
+ onDragEnd?: ElementEventHandler<Target, 'dragend'>;
552
+ onDragEndCapture?: ElementEventHandler<Target, 'dragend'>;
553
+ onDragEnter?: ElementEventHandler<Target, 'dragenter'>;
554
+ onDragEnterCapture?: ElementEventHandler<Target, 'dragenter'>;
555
+ onDragLeave?: ElementEventHandler<Target, 'dragleave'>;
556
+ onDragLeaveCapture?: ElementEventHandler<Target, 'dragleave'>;
557
+ onDragOver?: ElementEventHandler<Target, 'dragover'>;
558
+ onDragOverCapture?: ElementEventHandler<Target, 'dragover'>;
559
+ onDrop?: ElementEventHandler<Target, 'drop'>;
560
+ onDropCapture?: ElementEventHandler<Target, 'drop'>;
561
+ onCopy?: ElementEventHandler<Target, 'copy'>;
562
+ onCopyCapture?: ElementEventHandler<Target, 'copy'>;
563
+ onCut?: ElementEventHandler<Target, 'cut'>;
564
+ onCutCapture?: ElementEventHandler<Target, 'cut'>;
565
+ onPaste?: ElementEventHandler<Target, 'paste'>;
566
+ onPasteCapture?: ElementEventHandler<Target, 'paste'>;
567
+ onLoad?: ElementEventHandler<Target, 'load'>;
568
+ onLoadCapture?: ElementEventHandler<Target, 'load'>;
569
+ onError?: ElementEventHandler<Target, 'error'>;
570
+ onErrorCapture?: ElementEventHandler<Target, 'error'>;
571
+ onResize?: ElementEventHandler<Target, 'resize'>;
572
+ onResizeCapture?: ElementEventHandler<Target, 'resize'>;
573
+ onAnimationStart?: ElementEventHandler<Target, 'animationstart'>;
574
+ onAnimationStartCapture?: ElementEventHandler<Target, 'animationstart'>;
575
+ onAnimationEnd?: ElementEventHandler<Target, 'animationend'>;
576
+ onAnimationEndCapture?: ElementEventHandler<Target, 'animationend'>;
577
+ onAnimationIteration?: ElementEventHandler<Target, 'animationiteration'>;
578
+ onAnimationIterationCapture?: ElementEventHandler<Target, 'animationiteration'>;
579
+ onTransitionEnd?: ElementEventHandler<Target, 'transitionend'>;
580
+ onTransitionEndCapture?: ElementEventHandler<Target, 'transitionend'>;
127
581
 
128
582
  children?: any;
129
583
  [key: string]: any;
130
584
  }
131
585
 
132
586
  // SVG common attributes
133
- interface SVGAttributes {
587
+ interface SVGAttributes<Target extends globalThis.SVGElement = globalThis.SVGElement> {
134
588
  // Core attributes
135
589
  id?: Nullable<string>;
136
590
  lang?: Nullable<string>;
@@ -266,18 +720,30 @@ interface SVGAttributes {
266
720
  'xmlns:xlink'?: Nullable<string>;
267
721
 
268
722
  // Event handlers (inherited from HTML but included for clarity)
269
- onClick?: EventListener | AddEventObject;
270
- onMouseDown?: EventListener | AddEventObject;
271
- onMouseUp?: EventListener | AddEventObject;
272
- onMouseMove?: EventListener | AddEventObject;
273
- onMouseEnter?: EventListener | AddEventObject;
274
- onMouseLeave?: EventListener | AddEventObject;
275
- onMouseOver?: EventListener | AddEventObject;
276
- onMouseOut?: EventListener | AddEventObject;
277
- onFocus?: EventListener | AddEventObject;
278
- onBlur?: EventListener | AddEventObject;
279
- onLoad?: EventListener | AddEventObject;
280
- onError?: EventListener | AddEventObject;
723
+ onClick?: ElementEventHandler<Target, 'click'>;
724
+ onClickCapture?: ElementEventHandler<Target, 'click'>;
725
+ onMouseDown?: ElementEventHandler<Target, 'mousedown'>;
726
+ onMouseDownCapture?: ElementEventHandler<Target, 'mousedown'>;
727
+ onMouseUp?: ElementEventHandler<Target, 'mouseup'>;
728
+ onMouseUpCapture?: ElementEventHandler<Target, 'mouseup'>;
729
+ onMouseMove?: ElementEventHandler<Target, 'mousemove'>;
730
+ onMouseMoveCapture?: ElementEventHandler<Target, 'mousemove'>;
731
+ onMouseEnter?: ElementEventHandler<Target, 'mouseenter'>;
732
+ onMouseEnterCapture?: ElementEventHandler<Target, 'mouseenter'>;
733
+ onMouseLeave?: ElementEventHandler<Target, 'mouseleave'>;
734
+ onMouseLeaveCapture?: ElementEventHandler<Target, 'mouseleave'>;
735
+ onMouseOver?: ElementEventHandler<Target, 'mouseover'>;
736
+ onMouseOverCapture?: ElementEventHandler<Target, 'mouseover'>;
737
+ onMouseOut?: ElementEventHandler<Target, 'mouseout'>;
738
+ onMouseOutCapture?: ElementEventHandler<Target, 'mouseout'>;
739
+ onFocus?: ElementEventHandler<Target, 'focus'>;
740
+ onFocusCapture?: ElementEventHandler<Target, 'focus'>;
741
+ onBlur?: ElementEventHandler<Target, 'blur'>;
742
+ onBlurCapture?: ElementEventHandler<Target, 'blur'>;
743
+ onLoad?: ElementEventHandler<Target, 'load'>;
744
+ onLoadCapture?: ElementEventHandler<Target, 'load'>;
745
+ onError?: ElementEventHandler<Target, 'error'>;
746
+ onErrorCapture?: ElementEventHandler<Target, 'error'>;
281
747
 
282
748
  children?: any;
283
749
  [key: string]: any;
@@ -308,7 +774,9 @@ interface SVGAnimationAttributes {
308
774
  }
309
775
 
310
776
  // SVG gradient attributes
311
- interface SVGGradientAttributes extends SVGAttributes {
777
+ interface SVGGradientAttributes<
778
+ Target extends globalThis.SVGElement = globalThis.SVGElement,
779
+ > extends SVGAttributes<Target> {
312
780
  gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
313
781
  gradientTransform?: Nullable<string>;
314
782
  spreadMethod?: 'pad' | 'reflect' | 'repeat';
@@ -356,253 +824,130 @@ declare global {
356
824
 
357
825
  interface IntrinsicElements {
358
826
  // Document metadata
359
- head: HTMLAttributes;
360
- title: HTMLAttributes;
361
- base: HTMLAttributes & {
362
- href?: Nullable<string>;
363
- target?: Nullable<string>;
364
- };
365
- link: HTMLAttributes & {
366
- rel?: Nullable<string>;
367
- href?: Nullable<string>;
368
- type?: Nullable<string>;
369
- media?: Nullable<string>;
370
- as?: Nullable<string>;
371
- crossOrigin?: 'anonymous' | 'use-credentials';
372
- integrity?: Nullable<string>;
373
- };
374
- meta: HTMLAttributes & {
375
- name?: Nullable<string>;
376
- content?: Nullable<string>;
377
- charSet?: Nullable<string>;
378
- httpEquiv?: Nullable<string>;
379
- property?: Nullable<string>;
380
- };
381
- style: HTMLAttributes & {
382
- type?: Nullable<string>;
383
- media?: Nullable<string>;
384
- };
827
+ head: HTMLAttributes<HTMLHeadElement>;
828
+ title: HTMLAttributes<HTMLTitleElement>;
829
+ base: BaseHTMLAttributes<HTMLBaseElement>;
830
+ link: LinkHTMLAttributes<HTMLLinkElement>;
831
+ meta: MetaHTMLAttributes<HTMLMetaElement>;
832
+ style: StyleHTMLAttributes<HTMLStyleElement>;
385
833
 
386
834
  // Sectioning root
387
- body: HTMLAttributes;
835
+ body: HTMLAttributes<HTMLBodyElement>;
388
836
 
389
837
  // Content sectioning
390
- address: HTMLAttributes;
391
- article: HTMLAttributes;
392
- aside: HTMLAttributes;
393
- footer: HTMLAttributes;
394
- header: HTMLAttributes;
395
- h1: HTMLAttributes;
396
- h2: HTMLAttributes;
397
- h3: HTMLAttributes;
398
- h4: HTMLAttributes;
399
- h5: HTMLAttributes;
400
- h6: HTMLAttributes;
401
- hgroup: HTMLAttributes;
402
- main: HTMLAttributes;
403
- nav: HTMLAttributes;
404
- section: HTMLAttributes;
405
- search: HTMLAttributes;
838
+ address: HTMLAttributes<HTMLElement>;
839
+ article: HTMLAttributes<HTMLElement>;
840
+ aside: HTMLAttributes<HTMLElement>;
841
+ footer: HTMLAttributes<HTMLElement>;
842
+ header: HTMLAttributes<HTMLElement>;
843
+ h1: HTMLAttributes<HTMLHeadingElement>;
844
+ h2: HTMLAttributes<HTMLHeadingElement>;
845
+ h3: HTMLAttributes<HTMLHeadingElement>;
846
+ h4: HTMLAttributes<HTMLHeadingElement>;
847
+ h5: HTMLAttributes<HTMLHeadingElement>;
848
+ h6: HTMLAttributes<HTMLHeadingElement>;
849
+ hgroup: HTMLAttributes<HTMLElement>;
850
+ main: HTMLAttributes<HTMLElement>;
851
+ nav: HTMLAttributes<HTMLElement>;
852
+ section: HTMLAttributes<HTMLElement>;
853
+ search: HTMLAttributes<HTMLElement>;
406
854
 
407
855
  // Text content
408
- blockquote: HTMLAttributes & {
409
- cite?: Nullable<string>;
410
- };
411
- dd: HTMLAttributes;
412
- div: HTMLAttributes;
413
- dl: HTMLAttributes;
414
- dt: HTMLAttributes;
415
- figcaption: HTMLAttributes;
416
- figure: HTMLAttributes;
417
- hr: HTMLAttributes;
418
- li: HTMLAttributes & {
419
- value?: Nullable<number>;
420
- };
421
- menu: HTMLAttributes;
422
- ol: HTMLAttributes & {
423
- reversed?: boolean;
424
- start?: Nullable<number>;
425
- type?: '1' | 'a' | 'A' | 'i' | 'I';
426
- };
427
- p: HTMLAttributes;
428
- pre: HTMLAttributes;
429
- ul: HTMLAttributes;
856
+ blockquote: BlockquoteHTMLAttributes<HTMLQuoteElement>;
857
+ dd: HTMLAttributes<HTMLElement>;
858
+ div: HTMLAttributes<HTMLDivElement>;
859
+ dl: HTMLAttributes<HTMLDListElement>;
860
+ dt: HTMLAttributes<HTMLElement>;
861
+ figcaption: HTMLAttributes<HTMLElement>;
862
+ figure: HTMLAttributes<HTMLElement>;
863
+ hr: HTMLAttributes<HTMLHRElement>;
864
+ li: LiHTMLAttributes<HTMLLIElement>;
865
+ menu: HTMLAttributes<HTMLMenuElement>;
866
+ ol: OlHTMLAttributes<HTMLOListElement>;
867
+ p: HTMLAttributes<HTMLParagraphElement>;
868
+ pre: HTMLAttributes<HTMLPreElement>;
869
+ ul: HTMLAttributes<HTMLUListElement>;
430
870
 
431
871
  // Inline text semantics
432
- a: HTMLAttributes & {
433
- href?: Nullable<string>;
434
- target?: Nullable<string>;
435
- rel?: Nullable<string>;
436
- download?: string | boolean;
437
- hrefLang?: Nullable<string>;
438
- type?: Nullable<string>;
439
- referrerPolicy?: Nullable<string>;
440
- };
441
- abbr: HTMLAttributes;
442
- b: HTMLAttributes;
443
- bdi: HTMLAttributes;
444
- bdo: HTMLAttributes;
445
- br: HTMLAttributes;
446
- cite: HTMLAttributes;
447
- code: HTMLAttributes;
448
- data: HTMLAttributes & {
449
- value?: Nullable<string>;
450
- };
451
- dfn: HTMLAttributes;
452
- em: HTMLAttributes;
453
- i: HTMLAttributes;
454
- kbd: HTMLAttributes;
455
- mark: HTMLAttributes;
456
- q: HTMLAttributes & {
457
- cite?: Nullable<string>;
458
- };
459
- rp: HTMLAttributes;
460
- rt: HTMLAttributes;
461
- ruby: HTMLAttributes;
462
- s: HTMLAttributes;
463
- samp: HTMLAttributes;
464
- small: HTMLAttributes;
465
- span: HTMLAttributes;
466
- strong: HTMLAttributes;
467
- sub: HTMLAttributes;
468
- sup: HTMLAttributes;
469
- time: HTMLAttributes & {
470
- dateTime?: Nullable<string>;
471
- };
472
- u: HTMLAttributes;
473
- var: HTMLAttributes;
474
- wbr: HTMLAttributes;
872
+ a: AnchorHTMLAttributes<HTMLAnchorElement>;
873
+ abbr: HTMLAttributes<HTMLElement>;
874
+ b: HTMLAttributes<HTMLElement>;
875
+ bdi: HTMLAttributes<HTMLElement>;
876
+ bdo: HTMLAttributes<HTMLElement>;
877
+ br: HTMLAttributes<HTMLBRElement>;
878
+ cite: HTMLAttributes<HTMLElement>;
879
+ code: HTMLAttributes<HTMLElement>;
880
+ data: DataHTMLAttributes<HTMLDataElement>;
881
+ dfn: HTMLAttributes<HTMLElement>;
882
+ em: HTMLAttributes<HTMLElement>;
883
+ i: HTMLAttributes<HTMLElement>;
884
+ kbd: HTMLAttributes<HTMLElement>;
885
+ mark: HTMLAttributes<HTMLElement>;
886
+ q: QuoteHTMLAttributes<HTMLQuoteElement>;
887
+ rp: HTMLAttributes<HTMLElement>;
888
+ rt: HTMLAttributes<HTMLElement>;
889
+ ruby: HTMLAttributes<HTMLElement>;
890
+ s: HTMLAttributes<HTMLElement>;
891
+ samp: HTMLAttributes<HTMLElement>;
892
+ small: HTMLAttributes<HTMLElement>;
893
+ span: HTMLAttributes<HTMLSpanElement>;
894
+ strong: HTMLAttributes<HTMLElement>;
895
+ sub: HTMLAttributes<HTMLElement>;
896
+ sup: HTMLAttributes<HTMLElement>;
897
+ time: TimeHTMLAttributes<HTMLTimeElement>;
898
+ u: HTMLAttributes<HTMLElement>;
899
+ var: HTMLAttributes<HTMLElement>;
900
+ wbr: HTMLAttributes<HTMLElement>;
475
901
 
476
902
  // Image and multimedia
477
- area: HTMLAttributes & {
478
- alt?: Nullable<string>;
479
- coords?: Nullable<string>;
480
- download?: Nullable<string>;
481
- href?: Nullable<string>;
482
- hrefLang?: Nullable<string>;
483
- media?: Nullable<string>;
484
- rel?: Nullable<string>;
485
- shape?: 'rect' | 'circle' | 'poly' | 'default';
486
- target?: Nullable<string>;
487
- };
488
- audio: HTMLAttributes & {
489
- src?: Nullable<string>;
490
- autoplay?: boolean;
491
- controls?: boolean;
492
- loop?: boolean;
493
- muted?: boolean;
494
- preload?: 'none' | 'metadata' | 'auto';
495
- crossOrigin?: 'anonymous' | 'use-credentials';
496
- };
497
- img: HTMLAttributes & {
498
- src?: Nullable<string>;
499
- alt?: Nullable<string>;
500
- width?: string | number;
501
- height?: string | number;
502
- loading?: 'eager' | 'lazy';
503
- crossOrigin?: 'anonymous' | 'use-credentials';
504
- decoding?: 'sync' | 'async' | 'auto';
505
- fetchPriority?: 'high' | 'low' | 'auto';
506
- referrerPolicy?: Nullable<string>;
507
- sizes?: Nullable<string>;
508
- srcSet?: Nullable<string>;
509
- useMap?: Nullable<string>;
510
- };
511
- map: HTMLAttributes & {
512
- name?: Nullable<string>;
513
- };
514
- track: HTMLAttributes & {
515
- default?: boolean;
516
- kind?: 'subtitles' | 'captions' | 'descriptions' | 'chapters' | 'metadata';
517
- label?: Nullable<string>;
518
- src?: Nullable<string>;
519
- srcLang?: Nullable<string>;
520
- };
521
- video: HTMLAttributes & {
522
- src?: Nullable<string>;
523
- autoplay?: boolean;
524
- controls?: boolean;
525
- loop?: boolean;
526
- muted?: boolean;
527
- preload?: 'none' | 'metadata' | 'auto';
528
- poster?: Nullable<string>;
529
- width?: string | number;
530
- height?: string | number;
531
- crossOrigin?: 'anonymous' | 'use-credentials';
532
- playsInline?: boolean;
533
- };
903
+ area: AreaHTMLAttributes<HTMLAreaElement>;
904
+ audio: AudioHTMLAttributes<HTMLAudioElement>;
905
+ img: ImgHTMLAttributes<HTMLImageElement>;
906
+ map: MapHTMLAttributes<HTMLMapElement>;
907
+ track: TrackHTMLAttributes<HTMLTrackElement>;
908
+ video: VideoHTMLAttributes<HTMLVideoElement>;
534
909
 
535
910
  // Embedded content
536
- embed: HTMLAttributes & {
537
- src?: Nullable<string>;
538
- type?: Nullable<string>;
539
- width?: string | number;
540
- height?: string | number;
541
- };
542
- iframe: HTMLAttributes & {
543
- src?: Nullable<string>;
544
- srcdoc?: Nullable<string>;
545
- name?: Nullable<string>;
546
- sandbox?: Nullable<string>;
547
- allow?: Nullable<string>;
548
- allowFullScreen?: boolean;
549
- width?: string | number;
550
- height?: string | number;
551
- loading?: 'eager' | 'lazy';
552
- referrerPolicy?: Nullable<string>;
553
- };
554
- object: HTMLAttributes & {
555
- data?: Nullable<string>;
556
- type?: Nullable<string>;
557
- name?: Nullable<string>;
558
- useMap?: Nullable<string>;
559
- width?: string | number;
560
- height?: string | number;
561
- };
562
- picture: HTMLAttributes;
563
- portal: HTMLAttributes & {
564
- referrerPolicy?: Nullable<string>;
565
- src?: Nullable<string>;
566
- };
567
- source: HTMLAttributes & {
568
- src?: Nullable<string>;
569
- type?: Nullable<string>;
570
- media?: Nullable<string>;
571
- sizes?: Nullable<string>;
572
- srcSet?: Nullable<string>;
573
- };
911
+ embed: EmbedHTMLAttributes<HTMLEmbedElement>;
912
+ iframe: IframeHTMLAttributes<HTMLIFrameElement>;
913
+ object: ObjectHTMLAttributes<HTMLObjectElement>;
914
+ picture: HTMLAttributes<HTMLPictureElement>;
915
+ portal: PortalHTMLAttributes<HTMLElement>;
916
+ source: SourceHTMLAttributes<HTMLSourceElement>;
574
917
 
575
918
  // SVG and MathML
576
- svg: HTMLAttributes & SVGAttributes;
577
- math: HTMLAttributes;
919
+ svg: HTMLAttributes<SVGElementTagNameMap['svg']> & SVGAttributes<SVGElementTagNameMap['svg']>;
920
+ math: HTMLAttributes<MathMLElementTagNameMap['math']>;
578
921
 
579
922
  // SVG elements
580
- animate: HTMLAttributes & SVGAnimationAttributes;
581
- animateMotion: HTMLAttributes & SVGAnimationAttributes;
582
- animateTransform: HTMLAttributes &
923
+ animate: HTMLAttributes<SVGElementTagNameMap['animate']> & SVGAnimationAttributes;
924
+ animateMotion: HTMLAttributes<SVGElementTagNameMap['animateMotion']> & SVGAnimationAttributes;
925
+ animateTransform: HTMLAttributes<SVGElementTagNameMap['animateTransform']> &
583
926
  SVGAnimationAttributes & {
584
927
  type?: 'translate' | 'scale' | 'rotate' | 'skewX' | 'skewY';
585
928
  };
586
- circle: HTMLAttributes &
587
- SVGAttributes & {
929
+ circle: HTMLAttributes<SVGElementTagNameMap['circle']> &
930
+ SVGAttributes<SVGElementTagNameMap['circle']> & {
588
931
  cx?: string | number;
589
932
  cy?: string | number;
590
933
  r?: string | number;
591
934
  };
592
- clipPath: HTMLAttributes &
593
- SVGAttributes & {
935
+ clipPath: HTMLAttributes<SVGElementTagNameMap['clipPath']> &
936
+ SVGAttributes<SVGElementTagNameMap['clipPath']> & {
594
937
  clipPathUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
595
938
  };
596
- defs: HTMLAttributes & SVGAttributes;
597
- desc: HTMLAttributes & SVGAttributes;
598
- ellipse: HTMLAttributes &
599
- SVGAttributes & {
939
+ defs: HTMLAttributes<SVGElementTagNameMap['defs']> &
940
+ SVGAttributes<SVGElementTagNameMap['defs']>;
941
+ desc: HTMLAttributes<SVGElementTagNameMap['desc']> &
942
+ SVGAttributes<SVGElementTagNameMap['desc']>;
943
+ ellipse: HTMLAttributes<SVGElementTagNameMap['ellipse']> &
944
+ SVGAttributes<SVGElementTagNameMap['ellipse']> & {
600
945
  cx?: string | number;
601
946
  cy?: string | number;
602
947
  rx?: string | number;
603
948
  ry?: string | number;
604
949
  };
605
- feBlend: HTMLAttributes &
950
+ feBlend: HTMLAttributes<SVGElementTagNameMap['feBlend']> &
606
951
  SVGFilterAttributes & {
607
952
  mode?:
608
953
  | 'normal'
@@ -623,13 +968,14 @@ declare global {
623
968
  | 'luminosity';
624
969
  in2?: Nullable<string>;
625
970
  };
626
- feColorMatrix: HTMLAttributes &
971
+ feColorMatrix: HTMLAttributes<SVGElementTagNameMap['feColorMatrix']> &
627
972
  SVGFilterAttributes & {
628
973
  type?: 'matrix' | 'saturate' | 'hueRotate' | 'luminanceToAlpha';
629
974
  values?: Nullable<string>;
630
975
  };
631
- feComponentTransfer: HTMLAttributes & SVGFilterAttributes;
632
- feComposite: HTMLAttributes &
976
+ feComponentTransfer: HTMLAttributes<SVGElementTagNameMap['feComponentTransfer']> &
977
+ SVGFilterAttributes;
978
+ feComposite: HTMLAttributes<SVGElementTagNameMap['feComposite']> &
633
979
  SVGFilterAttributes & {
634
980
  operator?: 'over' | 'in' | 'out' | 'atop' | 'xor' | 'lighter' | 'arithmetic';
635
981
  in2?: Nullable<string>;
@@ -638,54 +984,58 @@ declare global {
638
984
  k3?: Nullable<number>;
639
985
  k4?: Nullable<number>;
640
986
  };
641
- feConvolveMatrix: HTMLAttributes & SVGFilterAttributes;
642
- feDiffuseLighting: HTMLAttributes & SVGFilterAttributes;
643
- feDisplacementMap: HTMLAttributes & SVGFilterAttributes;
644
- feDistantLight: HTMLAttributes &
987
+ feConvolveMatrix: HTMLAttributes<SVGElementTagNameMap['feConvolveMatrix']> &
988
+ SVGFilterAttributes;
989
+ feDiffuseLighting: HTMLAttributes<SVGElementTagNameMap['feDiffuseLighting']> &
990
+ SVGFilterAttributes;
991
+ feDisplacementMap: HTMLAttributes<SVGElementTagNameMap['feDisplacementMap']> &
992
+ SVGFilterAttributes;
993
+ feDistantLight: HTMLAttributes<SVGElementTagNameMap['feDistantLight']> &
645
994
  SVGFilterAttributes & {
646
995
  azimuth?: Nullable<number>;
647
996
  elevation?: Nullable<number>;
648
997
  };
649
- feDropShadow: HTMLAttributes &
998
+ feDropShadow: HTMLAttributes<SVGElementTagNameMap['feDropShadow']> &
650
999
  SVGFilterAttributes & {
651
1000
  dx?: Nullable<number>;
652
1001
  dy?: Nullable<number>;
653
1002
  stdDeviation?: number | string;
654
1003
  };
655
- feFlood: HTMLAttributes &
1004
+ feFlood: HTMLAttributes<SVGElementTagNameMap['feFlood']> &
656
1005
  SVGFilterAttributes & {
657
1006
  'flood-color'?: Nullable<string>;
658
1007
  'flood-opacity'?: number | string;
659
1008
  };
660
- feFuncA: HTMLAttributes & SVGTransferFunctionAttributes;
661
- feFuncB: HTMLAttributes & SVGTransferFunctionAttributes;
662
- feFuncG: HTMLAttributes & SVGTransferFunctionAttributes;
663
- feFuncR: HTMLAttributes & SVGTransferFunctionAttributes;
664
- feGaussianBlur: HTMLAttributes &
1009
+ feFuncA: HTMLAttributes<SVGElementTagNameMap['feFuncA']> & SVGTransferFunctionAttributes;
1010
+ feFuncB: HTMLAttributes<SVGElementTagNameMap['feFuncB']> & SVGTransferFunctionAttributes;
1011
+ feFuncG: HTMLAttributes<SVGElementTagNameMap['feFuncG']> & SVGTransferFunctionAttributes;
1012
+ feFuncR: HTMLAttributes<SVGElementTagNameMap['feFuncR']> & SVGTransferFunctionAttributes;
1013
+ feGaussianBlur: HTMLAttributes<SVGElementTagNameMap['feGaussianBlur']> &
665
1014
  SVGFilterAttributes & {
666
1015
  stdDeviation?: number | string;
667
1016
  };
668
- feImage: HTMLAttributes & SVGFilterAttributes;
669
- feMerge: HTMLAttributes & SVGFilterAttributes;
670
- feMergeNode: HTMLAttributes & SVGFilterAttributes;
671
- feMorphology: HTMLAttributes &
1017
+ feImage: HTMLAttributes<SVGElementTagNameMap['feImage']> & SVGFilterAttributes;
1018
+ feMerge: HTMLAttributes<SVGElementTagNameMap['feMerge']> & SVGFilterAttributes;
1019
+ feMergeNode: HTMLAttributes<SVGElementTagNameMap['feMergeNode']> & SVGFilterAttributes;
1020
+ feMorphology: HTMLAttributes<SVGElementTagNameMap['feMorphology']> &
672
1021
  SVGFilterAttributes & {
673
1022
  operator?: 'erode' | 'dilate';
674
1023
  radius?: number | string;
675
1024
  };
676
- feOffset: HTMLAttributes &
1025
+ feOffset: HTMLAttributes<SVGElementTagNameMap['feOffset']> &
677
1026
  SVGFilterAttributes & {
678
1027
  dx?: Nullable<number>;
679
1028
  dy?: Nullable<number>;
680
1029
  };
681
- fePointLight: HTMLAttributes &
1030
+ fePointLight: HTMLAttributes<SVGElementTagNameMap['fePointLight']> &
682
1031
  SVGFilterAttributes & {
683
1032
  x?: Nullable<number>;
684
1033
  y?: Nullable<number>;
685
1034
  z?: Nullable<number>;
686
1035
  };
687
- feSpecularLighting: HTMLAttributes & SVGFilterAttributes;
688
- feSpotLight: HTMLAttributes &
1036
+ feSpecularLighting: HTMLAttributes<SVGElementTagNameMap['feSpecularLighting']> &
1037
+ SVGFilterAttributes;
1038
+ feSpotLight: HTMLAttributes<SVGElementTagNameMap['feSpotLight']> &
689
1039
  SVGFilterAttributes & {
690
1040
  x?: Nullable<number>;
691
1041
  y?: Nullable<number>;
@@ -696,8 +1046,8 @@ declare global {
696
1046
  specularExponent?: Nullable<number>;
697
1047
  limitingConeAngle?: Nullable<number>;
698
1048
  };
699
- feTile: HTMLAttributes & SVGFilterAttributes;
700
- feTurbulence: HTMLAttributes &
1049
+ feTile: HTMLAttributes<SVGElementTagNameMap['feTile']> & SVGFilterAttributes;
1050
+ feTurbulence: HTMLAttributes<SVGElementTagNameMap['feTurbulence']> &
701
1051
  SVGFilterAttributes & {
702
1052
  baseFrequency?: number | string;
703
1053
  numOctaves?: Nullable<number>;
@@ -705,8 +1055,8 @@ declare global {
705
1055
  stitchTiles?: 'stitch' | 'noStitch';
706
1056
  type?: 'fractalNoise' | 'turbulence';
707
1057
  };
708
- filter: HTMLAttributes &
709
- SVGAttributes & {
1058
+ filter: HTMLAttributes<SVGElementTagNameMap['filter']> &
1059
+ SVGAttributes<SVGElementTagNameMap['filter']> & {
710
1060
  filterUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
711
1061
  primitiveUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
712
1062
  x?: string | number;
@@ -714,16 +1064,16 @@ declare global {
714
1064
  width?: string | number;
715
1065
  height?: string | number;
716
1066
  };
717
- foreignObject: HTMLAttributes &
718
- SVGAttributes & {
1067
+ foreignObject: HTMLAttributes<SVGElementTagNameMap['foreignObject']> &
1068
+ SVGAttributes<SVGElementTagNameMap['foreignObject']> & {
719
1069
  x?: string | number;
720
1070
  y?: string | number;
721
1071
  width?: string | number;
722
1072
  height?: string | number;
723
1073
  };
724
- g: HTMLAttributes & SVGAttributes;
725
- image: HTMLAttributes &
726
- SVGAttributes & {
1074
+ g: HTMLAttributes<SVGElementTagNameMap['g']> & SVGAttributes<SVGElementTagNameMap['g']>;
1075
+ image: HTMLAttributes<SVGElementTagNameMap['image']> &
1076
+ SVGAttributes<SVGElementTagNameMap['image']> & {
727
1077
  href?: Nullable<string>;
728
1078
  'xlink:href'?: Nullable<string>;
729
1079
  x?: string | number;
@@ -732,22 +1082,22 @@ declare global {
732
1082
  height?: string | number;
733
1083
  preserveAspectRatio?: Nullable<string>;
734
1084
  };
735
- line: HTMLAttributes &
736
- SVGAttributes & {
1085
+ line: HTMLAttributes<SVGElementTagNameMap['line']> &
1086
+ SVGAttributes<SVGElementTagNameMap['line']> & {
737
1087
  x1?: string | number;
738
1088
  y1?: string | number;
739
1089
  x2?: string | number;
740
1090
  y2?: string | number;
741
1091
  };
742
- linearGradient: HTMLAttributes &
743
- SVGGradientAttributes & {
1092
+ linearGradient: HTMLAttributes<SVGElementTagNameMap['linearGradient']> &
1093
+ SVGGradientAttributes<SVGElementTagNameMap['linearGradient']> & {
744
1094
  x1?: string | number;
745
1095
  y1?: string | number;
746
1096
  x2?: string | number;
747
1097
  y2?: string | number;
748
1098
  };
749
- marker: HTMLAttributes &
750
- SVGAttributes & {
1099
+ marker: HTMLAttributes<SVGElementTagNameMap['marker']> &
1100
+ SVGAttributes<SVGElementTagNameMap['marker']> & {
751
1101
  markerHeight?: string | number;
752
1102
  markerUnits?: 'strokeWidth' | 'userSpaceOnUse';
753
1103
  markerWidth?: string | number;
@@ -755,8 +1105,8 @@ declare global {
755
1105
  refX?: string | number;
756
1106
  refY?: string | number;
757
1107
  };
758
- mask: HTMLAttributes &
759
- SVGAttributes & {
1108
+ mask: HTMLAttributes<SVGElementTagNameMap['mask']> &
1109
+ SVGAttributes<SVGElementTagNameMap['mask']> & {
760
1110
  maskContentUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
761
1111
  maskUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
762
1112
  x?: string | number;
@@ -764,18 +1114,19 @@ declare global {
764
1114
  width?: string | number;
765
1115
  height?: string | number;
766
1116
  };
767
- metadata: HTMLAttributes & SVGAttributes;
768
- mpath: HTMLAttributes &
769
- SVGAttributes & {
1117
+ metadata: HTMLAttributes<SVGElementTagNameMap['metadata']> &
1118
+ SVGAttributes<SVGElementTagNameMap['metadata']>;
1119
+ mpath: HTMLAttributes<SVGElementTagNameMap['mpath']> &
1120
+ SVGAttributes<SVGElementTagNameMap['mpath']> & {
770
1121
  'xlink:href'?: Nullable<string>;
771
1122
  };
772
- path: HTMLAttributes &
773
- SVGAttributes & {
1123
+ path: HTMLAttributes<SVGElementTagNameMap['path']> &
1124
+ SVGAttributes<SVGElementTagNameMap['path']> & {
774
1125
  d?: Nullable<string>;
775
1126
  pathLength?: Nullable<number>;
776
1127
  };
777
- pattern: HTMLAttributes &
778
- SVGAttributes & {
1128
+ pattern: HTMLAttributes<SVGElementTagNameMap['pattern']> &
1129
+ SVGAttributes<SVGElementTagNameMap['pattern']> & {
779
1130
  patternContentUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
780
1131
  patternTransform?: Nullable<string>;
781
1132
  patternUnits?: 'userSpaceOnUse' | 'objectBoundingBox';
@@ -784,16 +1135,16 @@ declare global {
784
1135
  width?: string | number;
785
1136
  height?: string | number;
786
1137
  };
787
- polygon: HTMLAttributes &
788
- SVGAttributes & {
1138
+ polygon: HTMLAttributes<SVGElementTagNameMap['polygon']> &
1139
+ SVGAttributes<SVGElementTagNameMap['polygon']> & {
789
1140
  points?: Nullable<string>;
790
1141
  };
791
- polyline: HTMLAttributes &
792
- SVGAttributes & {
1142
+ polyline: HTMLAttributes<SVGElementTagNameMap['polyline']> &
1143
+ SVGAttributes<SVGElementTagNameMap['polyline']> & {
793
1144
  points?: Nullable<string>;
794
1145
  };
795
- radialGradient: HTMLAttributes &
796
- SVGGradientAttributes & {
1146
+ radialGradient: HTMLAttributes<SVGElementTagNameMap['radialGradient']> &
1147
+ SVGGradientAttributes<SVGElementTagNameMap['radialGradient']> & {
797
1148
  cx?: string | number;
798
1149
  cy?: string | number;
799
1150
  r?: string | number;
@@ -801,8 +1152,8 @@ declare global {
801
1152
  fy?: string | number;
802
1153
  fr?: string | number;
803
1154
  };
804
- rect: HTMLAttributes &
805
- SVGAttributes & {
1155
+ rect: HTMLAttributes<SVGElementTagNameMap['rect']> &
1156
+ SVGAttributes<SVGElementTagNameMap['rect']> & {
806
1157
  x?: string | number;
807
1158
  y?: string | number;
808
1159
  width?: string | number;
@@ -810,24 +1161,27 @@ declare global {
810
1161
  rx?: string | number;
811
1162
  ry?: string | number;
812
1163
  };
813
- set: HTMLAttributes & SVGAnimationAttributes;
814
- stop: HTMLAttributes &
815
- SVGAttributes & {
1164
+ set: HTMLAttributes<SVGElementTagNameMap['set']> & SVGAnimationAttributes;
1165
+ stop: HTMLAttributes<SVGElementTagNameMap['stop']> &
1166
+ SVGAttributes<SVGElementTagNameMap['stop']> & {
816
1167
  offset?: string | number;
817
1168
  'stop-color'?: Nullable<string>;
818
1169
  'stop-opacity'?: number | string;
819
1170
  };
820
- switch: HTMLAttributes & SVGAttributes;
821
- symbol: HTMLAttributes &
822
- SVGAttributes & {
1171
+ switch: HTMLAttributes<SVGElementTagNameMap['switch']> &
1172
+ SVGAttributes<SVGElementTagNameMap['switch']>;
1173
+ symbol: HTMLAttributes<SVGElementTagNameMap['symbol']> &
1174
+ SVGAttributes<SVGElementTagNameMap['symbol']> & {
823
1175
  viewBox?: Nullable<string>;
824
1176
  preserveAspectRatio?: Nullable<string>;
825
1177
  refX?: string | number;
826
1178
  refY?: string | number;
827
1179
  };
828
- text: HTMLAttributes & SVGAttributes & SVGTextAttributes;
829
- textPath: HTMLAttributes &
830
- SVGAttributes &
1180
+ text: HTMLAttributes<SVGElementTagNameMap['text']> &
1181
+ SVGAttributes<SVGElementTagNameMap['text']> &
1182
+ SVGTextAttributes;
1183
+ textPath: HTMLAttributes<SVGElementTagNameMap['textPath']> &
1184
+ SVGAttributes<SVGElementTagNameMap['textPath']> &
831
1185
  SVGTextAttributes & {
832
1186
  href?: Nullable<string>;
833
1187
  'xlink:href'?: Nullable<string>;
@@ -835,9 +1189,11 @@ declare global {
835
1189
  method?: 'align' | 'stretch';
836
1190
  spacing?: 'auto' | 'exact';
837
1191
  };
838
- tspan: HTMLAttributes & SVGAttributes & SVGTextAttributes;
839
- use: HTMLAttributes &
840
- SVGAttributes & {
1192
+ tspan: HTMLAttributes<SVGElementTagNameMap['tspan']> &
1193
+ SVGAttributes<SVGElementTagNameMap['tspan']> &
1194
+ SVGTextAttributes;
1195
+ use: HTMLAttributes<SVGElementTagNameMap['use']> &
1196
+ SVGAttributes<SVGElementTagNameMap['use']> & {
841
1197
  href?: Nullable<string>;
842
1198
  'xlink:href'?: Nullable<string>;
843
1199
  x?: string | number;
@@ -845,199 +1201,60 @@ declare global {
845
1201
  width?: string | number;
846
1202
  height?: string | number;
847
1203
  };
848
- view: HTMLAttributes &
849
- SVGAttributes & {
1204
+ view: HTMLAttributes<SVGElementTagNameMap['view']> &
1205
+ SVGAttributes<SVGElementTagNameMap['view']> & {
850
1206
  viewBox?: Nullable<string>;
851
1207
  preserveAspectRatio?: Nullable<string>;
852
1208
  };
853
1209
 
854
1210
  // Scripting
855
- canvas: HTMLAttributes & {
856
- width?: string | number;
857
- height?: string | number;
858
- };
859
- noscript: HTMLAttributes;
860
- script: HTMLAttributes & {
861
- src?: Nullable<string>;
862
- type?: Nullable<string>;
863
- async?: boolean;
864
- defer?: boolean;
865
- crossOrigin?: 'anonymous' | 'use-credentials';
866
- integrity?: Nullable<string>;
867
- noModule?: boolean;
868
- referrerPolicy?: Nullable<string>;
869
- };
1211
+ canvas: CanvasHTMLAttributes<HTMLCanvasElement>;
1212
+ noscript: HTMLAttributes<HTMLElement>;
1213
+ script: ScriptHTMLAttributes<HTMLScriptElement>;
870
1214
 
871
1215
  // Demarcating edits
872
- del: HTMLAttributes & {
873
- cite?: Nullable<string>;
874
- dateTime?: Nullable<string>;
875
- };
876
- ins: HTMLAttributes & {
877
- cite?: Nullable<string>;
878
- dateTime?: Nullable<string>;
879
- };
1216
+ del: ModHTMLAttributes<HTMLModElement>;
1217
+ ins: ModHTMLAttributes<HTMLModElement>;
880
1218
 
881
1219
  // Table content
882
- caption: HTMLAttributes;
883
- col: HTMLAttributes & {
884
- span?: Nullable<number>;
885
- };
886
- colgroup: HTMLAttributes & {
887
- span?: Nullable<number>;
888
- };
889
- table: HTMLAttributes;
890
- tbody: HTMLAttributes;
891
- td: HTMLAttributes & {
892
- colSpan?: Nullable<number>;
893
- rowSpan?: Nullable<number>;
894
- headers?: Nullable<string>;
895
- };
896
- tfoot: HTMLAttributes;
897
- th: HTMLAttributes & {
898
- colSpan?: Nullable<number>;
899
- rowSpan?: Nullable<number>;
900
- headers?: Nullable<string>;
901
- scope?: 'row' | 'col' | 'rowgroup' | 'colgroup';
902
- abbr?: Nullable<string>;
903
- };
904
- thead: HTMLAttributes;
905
- tr: HTMLAttributes;
1220
+ caption: HTMLAttributes<HTMLTableCaptionElement>;
1221
+ col: ColHTMLAttributes<HTMLTableColElement>;
1222
+ colgroup: ColHTMLAttributes<HTMLTableColElement>;
1223
+ table: HTMLAttributes<HTMLTableElement>;
1224
+ tbody: HTMLAttributes<HTMLTableSectionElement>;
1225
+ td: TableCellHTMLAttributes<HTMLTableCellElement>;
1226
+ tfoot: HTMLAttributes<HTMLTableSectionElement>;
1227
+ th: ThHTMLAttributes<HTMLTableCellElement>;
1228
+ thead: HTMLAttributes<HTMLTableSectionElement>;
1229
+ tr: HTMLAttributes<HTMLTableRowElement>;
906
1230
 
907
1231
  // Forms
908
- button: HTMLAttributes & {
909
- type?: 'button' | 'submit' | 'reset';
910
- disabled?: boolean;
911
- form?: Nullable<string>;
912
- formAction?: Nullable<string>;
913
- formEncType?: Nullable<string>;
914
- formMethod?: Nullable<string>;
915
- formNoValidate?: boolean;
916
- formTarget?: Nullable<string>;
917
- name?: Nullable<string>;
918
- value?: Nullable<string>;
919
- };
920
- datalist: HTMLAttributes;
921
- fieldset: HTMLAttributes & {
922
- disabled?: boolean;
923
- form?: Nullable<string>;
924
- name?: Nullable<string>;
925
- };
926
- form: HTMLAttributes & {
927
- action?: Nullable<string>;
928
- method?: 'get' | 'post' | 'dialog';
929
- encType?: Nullable<string>;
930
- acceptCharset?: Nullable<string>;
931
- autoComplete?: 'on' | 'off';
932
- noValidate?: boolean;
933
- target?: Nullable<string>;
934
- };
935
- input: HTMLAttributes & {
936
- type?: Nullable<string>;
937
- value?: string | number;
938
- placeholder?: Nullable<string>;
939
- disabled?: boolean;
940
- name?: Nullable<string>;
941
- accept?: Nullable<string>;
942
- autoComplete?: Nullable<string>;
943
- autoFocus?: boolean;
944
- checked?: boolean;
945
- form?: Nullable<string>;
946
- formAction?: Nullable<string>;
947
- formEncType?: Nullable<string>;
948
- formMethod?: Nullable<string>;
949
- formNoValidate?: boolean;
950
- formTarget?: Nullable<string>;
951
- list?: Nullable<string>;
952
- max?: string | number;
953
- maxLength?: Nullable<number>;
954
- min?: string | number;
955
- minLength?: Nullable<number>;
956
- multiple?: boolean;
957
- pattern?: Nullable<string>;
958
- readOnly?: boolean;
959
- required?: boolean;
960
- size?: Nullable<number>;
961
- src?: Nullable<string>;
962
- step?: string | number;
963
- width?: string | number;
964
- height?: string | number;
965
- };
966
- label: HTMLAttributes & {
967
- for?: Nullable<string>;
968
- htmlFor?: Nullable<string>;
969
- };
970
- legend: HTMLAttributes;
971
- meter: HTMLAttributes & {
972
- value?: Nullable<number>;
973
- min?: Nullable<number>;
974
- max?: Nullable<number>;
975
- low?: Nullable<number>;
976
- high?: Nullable<number>;
977
- optimum?: Nullable<number>;
978
- };
979
- optgroup: HTMLAttributes & {
980
- disabled?: boolean;
981
- label?: Nullable<string>;
982
- };
983
- option: HTMLAttributes & {
984
- value?: string | number;
985
- selected?: boolean;
986
- disabled?: boolean;
987
- label?: Nullable<string>;
988
- };
989
- output: HTMLAttributes & {
990
- for?: Nullable<string>;
991
- htmlFor?: Nullable<string>;
992
- form?: Nullable<string>;
993
- name?: Nullable<string>;
994
- };
995
- progress: HTMLAttributes & {
996
- value?: Nullable<number>;
997
- max?: Nullable<number>;
998
- };
999
- select: HTMLAttributes & {
1000
- disabled?: boolean;
1001
- form?: Nullable<string>;
1002
- multiple?: boolean;
1003
- name?: Nullable<string>;
1004
- required?: boolean;
1005
- size?: Nullable<number>;
1006
- autoComplete?: Nullable<string>;
1007
- };
1008
- textarea: HTMLAttributes & {
1009
- placeholder?: Nullable<string>;
1010
- disabled?: boolean;
1011
- rows?: Nullable<number>;
1012
- cols?: Nullable<number>;
1013
- name?: Nullable<string>;
1014
- form?: Nullable<string>;
1015
- maxLength?: Nullable<number>;
1016
- minLength?: Nullable<number>;
1017
- readOnly?: boolean;
1018
- required?: boolean;
1019
- wrap?: 'soft' | 'hard';
1020
- autoComplete?: Nullable<string>;
1021
- autoFocus?: boolean;
1022
- };
1232
+ button: ButtonHTMLAttributes<HTMLButtonElement>;
1233
+ datalist: HTMLAttributes<HTMLDataListElement>;
1234
+ fieldset: FieldsetHTMLAttributes<HTMLFieldSetElement>;
1235
+ form: FormHTMLAttributes<HTMLFormElement>;
1236
+ input: InputHTMLAttributes<HTMLInputElement>;
1237
+ label: LabelHTMLAttributes<HTMLLabelElement>;
1238
+ legend: HTMLAttributes<HTMLLegendElement>;
1239
+ meter: MeterHTMLAttributes<HTMLMeterElement>;
1240
+ optgroup: OptgroupHTMLAttributes<HTMLOptGroupElement>;
1241
+ option: OptionHTMLAttributes<HTMLOptionElement>;
1242
+ output: OutputHTMLAttributes<HTMLOutputElement>;
1243
+ progress: ProgressHTMLAttributes<HTMLProgressElement>;
1244
+ select: SelectHTMLAttributes<HTMLSelectElement>;
1245
+ textarea: TextareaHTMLAttributes<HTMLTextAreaElement>;
1023
1246
 
1024
1247
  // Interactive elements
1025
- details: HTMLAttributes & {
1026
- open?: boolean;
1027
- };
1028
- dialog: HTMLAttributes & {
1029
- open?: boolean;
1030
- };
1031
- summary: HTMLAttributes;
1248
+ details: DetailsHTMLAttributes<HTMLDetailsElement>;
1249
+ dialog: DialogHTMLAttributes<HTMLDialogElement>;
1250
+ summary: HTMLAttributes<HTMLElement>;
1032
1251
 
1033
1252
  // Web Components
1034
- slot: HTMLAttributes & {
1035
- name?: Nullable<string>;
1036
- };
1037
- template: HTMLAttributes;
1253
+ slot: SlotHTMLAttributes<HTMLSlotElement>;
1254
+ template: HTMLAttributes<HTMLTemplateElement>;
1038
1255
 
1039
1256
  // Catch-all for any other elements
1040
- [elemName: string]: HTMLAttributes;
1257
+ [elemName: string]: HTMLAttributes<never>;
1041
1258
  }
1042
1259
 
1043
1260
  interface ElementChildrenAttribute {