-
Notifications
You must be signed in to change notification settings - Fork 2
/
index.d.ts
2835 lines (2730 loc) · 104 KB
/
index.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
/// <reference lib="dom" />
/// <reference lib="es2023" />
import type { Properties, Property } from 'csstype';
export interface RefObject<T> {
readonly current: T
}
export type RefCallback<T> = (instance: T) => void
type TChild =
| Node
| Element
| HTMLElement
| SVGElement
| DocumentFragment
| Text
| Comment
| MathMLElement
| TChild[]
| string
| number
| bigint
| false
| null
| undefined
export type PropsWithChildren<P> = P & { children?: TChild | TChild[] }
export declare function jsx<
K extends keyof JSX.IntrinsicElements | (string & {}),
R = K extends keyof HTMLElementTagNameMap
? HTMLElementTagNameMap[K]
: K extends keyof HTMLElementDeprecatedTagNameMap
? HTMLElementDeprecatedTagNameMap[K]
: K extends keyof SVGElementTagNameMap
? SVGElementTagNameMap[K]
: K extends keyof MathMLElementTagNameMap
? MathMLElementTagNameMap[K]
: Element
>(
tag: K,
props: K extends keyof JSX.IntrinsicElements
? JSX.IntrinsicElements[K]
: JSX.HTMLAttributes<R>,
): R
export type FunctionComponent<P = {}> = JSX.FC<P>
export { FunctionComponent as FC };
export declare const properties: Set<string>;
export declare const extensions: Map<
string,
(node: Element, value: any, key: string) => void
>;
export declare const svgNs = 'http://www.w3.org/2000/svg';
export declare const mathmlNs = 'http://www.w3.org/1998/Math/MathML';
export declare function useRef<T = any>(current?: T): RefObject<T>
export declare function useText<T = string>(initContent?: T): readonly [
Text,
(content: T) => void
]
export declare function parseFromString(html: string): DocumentFragment
export declare function Fragment(children?: TChild | TChild[]): DocumentFragment
export declare function Template(props: { children: string }): DocumentFragment
export interface CurrentTarget<T> {
readonly currentTarget: EventTarget & T
}
export interface EventHandlerObject<Ev = Event, T = Element> {
handleEvent(event: Ev & CurrentTarget<T>): void
}
type EventHandler<Ev, T> = (this: T, event: Ev & CurrentTarget<T>) => void
type EvHandler<Ev, T> = EventHandler<Ev, T> | EventHandlerObject<Ev, T>
export type AnimationEventHandler<T = Element> = EventHandler<AnimationEvent, T>
export type ClipboardEventHandler<T = Element> = EventHandler<ClipboardEvent, T>
export type CompositionEventHandler<T = Element> = EventHandler<CompositionEvent, T>
export type DragEventHandler<T = Element> = EventHandler<DragEvent, T>
export type FocusEventHandler<T = Element> = EventHandler<FocusEvent, T>
export type FormDataEventHandler<T = Element> = EventHandler<FormDataEvent, T>
export type GenericEventHandler<T = Element> = EventHandler<Event, T>
export type InputEventHandler<T = Element> = EventHandler<InputEvent, T>
export type KeyboardEventHandler<T = Element> = EventHandler<KeyboardEvent, T>
export type MediaEncryptedEventHandler<T = Element> = EventHandler<MediaEncryptedEvent, T>
export type MouseEventHandler<T = Element> = EventHandler<MouseEvent, T>
export type PictureInPictureEventHandler<T = Element> = EventHandler<PictureInPictureEvent, T>
export type PointerEventHandler<T = Element> = EventHandler<PointerEvent, T>
export type SubmitEventHandler<T = Element> = EventHandler<SubmitEvent, T>
export type ToggleEventHandler<T = Element> = EventHandler<ToggleEvent, T>
export type TouchEventHandler<T = Element> = EventHandler<TouchEvent, T>
export type TransitionEventHandler<T = Element> = EventHandler<TransitionEvent, T>
export type UIEventHandler<T = Element> = EventHandler<UIEvent, T>
export type WebGLContextEventHandler<T = Element> = EventHandler<WebGLContextEvent, T>
export type WheelEventHandler<T = Element> = EventHandler<WheelEvent, T>
export interface CSSProperties extends Properties<number | string> {
cssText?: string | null
[key: `--${string}`]: number | string
}
export type ControlsList = 'nodownload' | 'nofullscreen' | 'noremoteplayback'
export interface AriaAttributes {
/** Identifies the currently active element when DOM focus is on a composite widget, textbox, group, or application. */
'aria-activedescendant'?: string
/** Indicates whether assistive technologies will present all, or only parts of, the changed region based on the change notifications defined by the aria-relevant attribute. */
'aria-atomic'?: boolean | 'true' | 'false'
/**
* Indicates whether inputting text could trigger display of one or more predictions of the user's intended value for an input and specifies how predictions would be
* presented if they are made.
*/
'aria-autocomplete'?: 'none' | 'inline' | 'list' | 'both'
/**
* Defines a string value that labels the current element, which is intended to be converted into Braille.
* @see aria-label.
*/
'aria-braillelabel'?: string
/**
* Defines a human-readable, author-localized abbreviated description for the role of an element, which is intended to be converted into Braille.
* @see aria-roledescription.
*/
'aria-brailleroledescription'?: string
/** Indicates an element is being modified and that assistive technologies MAY want to wait until the modifications are complete before exposing them to the user. */
'aria-busy'?: boolean | 'true' | 'false'
/**
* Indicates the current "checked" state of checkboxes, radio buttons, and other widgets.
* @see aria-pressed @see aria-selected.
*/
'aria-checked'?: boolean | 'true' | 'false' | 'mixed'
/**
* Defines the total number of columns in a table, grid, or treegrid.
* @see aria-colindex.
*/
'aria-colcount'?: number | `${number}`
/**
* Defines an element's column index or position with respect to the total number of columns within a table, grid, or treegrid.
* @see aria-colcount @see aria-colspan.
*/
'aria-colindex'?: number | `${number}`
/**
* Defines a human readable text alternative of aria-colindex.
* @see aria-rowindextext.
*/
'aria-colindextext'?: string
/**
* Defines the number of columns spanned by a cell or gridcell within a table, grid, or treegrid.
* @see aria-colindex @see aria-rowspan.
*/
'aria-colspan'?: number | `${number}`
/**
* Identifies the element (or elements) whose contents or presence are controlled by the current element.
* @see aria-owns.
*/
'aria-controls'?: string
/** Indicates the element that represents the current item within a container or set of related elements. */
'aria-current'?: boolean | 'true' | 'false' | 'page' | 'step' | 'location' | 'date' | 'time'
/**
* Identifies the element (or elements) that describes the object.
* @see aria-labelledby
*/
'aria-describedby'?: string
/**
* Defines a string value that describes or annotates the current element.
* @see related aria-describedby.
*/
'aria-description'?: string
/**
* Identifies the element that provides a detailed, extended description for the object.
* @see aria-describedby.
*/
'aria-details'?: string
/**
* Indicates that the element is perceivable but disabled, so it is not editable or otherwise operable.
* @see aria-hidden @see aria-readonly.
*/
'aria-disabled'?: boolean | 'true' | 'false'
/**
* Indicates what functions can be performed when a dragged object is released on the drop target.
* @deprecated in ARIA 1.1
*/
'aria-dropeffect'?: 'none' | 'copy' | 'execute' | 'link' | 'move' | 'popup'
/**
* Identifies the element that provides an error message for the object.
* @see aria-invalid @see aria-describedby.
*/
'aria-errormessage'?: string
/** Indicates whether the element, or another grouping element it controls, is currently expanded or collapsed. */
'aria-expanded'?: boolean | 'true' | 'false'
/**
* Identifies the next element (or elements) in an alternate reading order of content which, at the user's discretion,
* allows assistive technology to override the general default of reading in document source order.
*/
'aria-flowto'?: string
/**
* Indicates an element's "grabbed" state in a drag-and-drop operation.
* @deprecated in ARIA 1.1
*/
'aria-grabbed'?: boolean | 'true' | 'false'
/** Indicates the availability and type of interactive popup element, such as menu or dialog, that can be triggered by an element. */
'aria-haspopup'?: boolean | 'true' | 'false' | 'menu' | 'listbox' | 'tree' | 'grid' | 'dialog'
/**
* Indicates whether the element is exposed to an accessibility API.
* @see aria-disabled.
*/
'aria-hidden'?: boolean | 'true' | 'false'
/**
* Indicates the entered value does not conform to the format expected by the application.
* @see aria-errormessage.
*/
'aria-invalid'?: boolean | 'true' | 'false' | 'grammar' | 'spelling'
/** Indicates keyboard shortcuts that an author has implemented to activate or give focus to an element. */
'aria-keyshortcuts'?: string
/**
* Defines a string value that labels the current element.
* @see aria-labelledby.
*/
'aria-label'?: string
/**
* Identifies the element (or elements) that labels the current element.
* @see aria-describedby.
*/
'aria-labelledby'?: string
/** Defines the hierarchical level of an element within a structure. */
'aria-level'?: number | `${number}`
/** 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. */
'aria-live'?: 'off' | 'assertive' | 'polite'
/** Indicates whether an element is modal when displayed. */
'aria-modal'?: boolean | 'true' | 'false'
/** Indicates whether a text box accepts multiple lines of input or only a single line. */
'aria-multiline'?: boolean | 'true' | 'false'
/** Indicates that the user may select more than one item from the current selectable descendants. */
'aria-multiselectable'?: boolean | 'true' | 'false'
/** Indicates whether the element's orientation is horizontal, vertical, or unknown/ambiguous. */
'aria-orientation'?: 'horizontal' | 'vertical'
/**
* Identifies an element (or elements) in order to define a visual, functional, or contextual parent/child relationship
* between DOM elements where the DOM hierarchy cannot be used to represent the relationship.
* @see aria-controls.
*/
'aria-owns'?: string
/**
* Defines a short hint (a word or short phrase) intended to aid the user with data entry when the control has no value.
* A hint could be a sample value or a brief description of the expected format.
*/
'aria-placeholder'?: string
/**
* 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.
* @see aria-setsize.
*/
'aria-posinset'?: number | `${number}`
/**
* Indicates the current "pressed" state of toggle buttons.
* @see aria-checked @see aria-selected.
*/
'aria-pressed'?: boolean | 'true' | 'false' | 'mixed'
/**
* Indicates that the element is not editable, but is otherwise operable.
* @see aria-disabled.
*/
'aria-readonly'?: boolean | 'true' | 'false'
/**
* Indicates what notifications the user agent will trigger when the accessibility tree within a live region is modified.
* @see aria-atomic.
*/
'aria-relevant'?:
| 'additions'
| 'additions removals'
| 'additions text'
| 'all'
| 'removals'
| 'removals additions'
| 'removals text'
| 'text'
| 'text additions'
| 'text removals'
/** Indicates that user input is required on the element before a form may be submitted. */
'aria-required'?: boolean | 'true' | 'false'
/** Defines a human-readable, author-localized description for the role of an element. */
'aria-roledescription'?: string
/**
* Defines the total number of rows in a table, grid, or treegrid.
* @see aria-rowindex.
*/
'aria-rowcount'?: number | `${number}`
/**
* Defines an element's row index or position with respect to the total number of rows within a table, grid, or treegrid.
* @see aria-rowcount @see aria-rowspan.
*/
'aria-rowindex'?: number | `${number}`
/**
* Defines a human readable text alternative of aria-rowindex.
* @see aria-colindextext.
*/
'aria-rowindextext'?: string
/**
* Defines the number of rows spanned by a cell or gridcell within a table, grid, or treegrid.
* @see aria-rowindex @see aria-colspan.
*/
'aria-rowspan'?: number | `${number}`
/**
* Indicates the current "selected" state of various widgets.
* @see aria-checked @see aria-pressed.
*/
'aria-selected'?: boolean | 'true' | 'false'
/**
* 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.
* @see aria-posinset.
*/
'aria-setsize'?: number | `${number}`
/** Indicates if items in a table or grid are sorted in ascending or descending order. */
'aria-sort'?: 'none' | 'ascending' | 'descending' | 'other'
/** Defines the maximum allowed value for a range widget. */
'aria-valuemax'?: number | `${number}`
/** Defines the minimum allowed value for a range widget. */
'aria-valuemin'?: number | `${number}`
/**
* Defines the current value for a range widget.
* @see aria-valuetext.
*/
'aria-valuenow'?: number | `${number}`
/** Defines the human readable text alternative of aria-valuenow for a range widget. */
'aria-valuetext'?: string
/**
* All the WAI-ARIA 1.2 role attribute values
* @see https://www.w3.org/TR/wai-aria-1.2/#role_definitions
* All the Digital Publishing WAI-ARIA 1.0 role attribute values
* @see https://www.w3.org/TR/dpub-aria-1.0/#role_definitions
*/
role?:
| 'alert'
| 'alertdialog'
| 'application'
| 'article'
| 'banner'
| 'blockquote'
| 'button'
| 'caption'
| 'cell'
| 'checkbox'
| 'code'
| 'columnheader'
| 'combobox'
| 'command'
| 'complementary'
| 'composite'
| 'contentinfo'
| 'definition'
| 'deletion'
| 'dialog'
| 'directory'
| 'document'
| 'emphasis'
| 'feed'
| 'figure'
| 'form'
| 'generic'
| 'grid'
| 'gridcell'
| 'group'
| 'heading'
| 'img'
| 'input'
| 'insertion'
| 'landmark'
| 'link'
| 'list'
| 'listbox'
| 'listitem'
| 'log'
| 'main'
| 'marquee'
| 'math'
| 'meter'
| 'menu'
| 'menubar'
| 'menuitem'
| 'menuitemcheckbox'
| 'menuitemradio'
| 'navigation'
| 'none'
| 'note'
| 'option'
| 'paragraph'
| 'presentation'
| 'progressbar'
| 'radio'
| 'radiogroup'
| 'range'
| 'region'
| 'roletype'
| 'row'
| 'rowgroup'
| 'rowheader'
| 'scrollbar'
| 'search'
| 'searchbox'
| 'section'
| 'sectionhead'
| 'select'
| 'separator'
| 'slider'
| 'spinbutton'
| 'status'
| 'strong'
| 'structure'
| 'subscript'
| 'superscript'
| 'switch'
| 'tab'
| 'table'
| 'tablist'
| 'tabpanel'
| 'term'
| 'textbox'
| 'time'
| 'timer'
| 'toolbar'
| 'tooltip'
| 'tree'
| 'treegrid'
| 'treeitem'
| 'widget'
| 'window'
| 'none presentation'
// the Digital Publishing WAI-ARIA
| 'doc-abstract'
| 'doc-acknowledgments'
| 'doc-afterword'
| 'doc-appendix'
| 'doc-backlink'
| 'doc-biblioentry'
| 'doc-bibliography'
| 'doc-biblioref'
| 'doc-chapter'
| 'doc-colophon'
| 'doc-conclusion'
| 'doc-cover'
| 'doc-credit'
| 'doc-credits'
| 'doc-dedication'
| 'doc-endnote'
| 'doc-endnotes'
| 'doc-epigraph'
| 'doc-epilogue'
| 'doc-errata'
| 'doc-example'
| 'doc-footnote'
| 'doc-foreword'
| 'doc-glossary'
| 'doc-glossref'
| 'doc-index'
| 'doc-introduction'
| 'doc-noteref'
| 'doc-notice'
| 'doc-pagebreak'
| 'doc-pagelist'
| 'doc-part'
| 'doc-preface'
| 'doc-prologue'
| 'doc-pullquote'
| 'doc-qna'
| 'doc-subtitle'
| 'doc-tip'
| 'doc-toc'
}
declare global {
namespace JSX {
type Element = globalThis.Element | DocumentFragment
interface ElementChildrenAttribute { children: {} }
type FC<P = {}> = (props: PropsWithChildren<P>) => Element | null
type Ref<T = unknown> = RefCallback<T> | RefObject<T>
type AnimationEventListener<T = globalThis.Element> = EvHandler<AnimationEvent, T>
type ClipboardEventListener<T = globalThis.Element> = EvHandler<ClipboardEvent, T>
type CompositionEventListener<T = globalThis.Element> = EvHandler<CompositionEvent, T>
type DragEventListener<T = globalThis.Element> = EvHandler<DragEvent, T>
type EventListener<T = globalThis.Element> = EvHandler<Event, T>
type FocusEventListener<T = globalThis.Element> = EvHandler<FocusEvent, T>
type FormDataEventListener<T = globalThis.Element> = EvHandler<FormDataEvent, T>
type InputEventListener<T = globalThis.Element> = EvHandler<InputEvent, T>
type KeyboardEventListener<T = globalThis.Element> = EvHandler<KeyboardEvent, T>
type MediaEncryptedEventListener<T = globalThis.Element> = EvHandler<MediaEncryptedEvent, T>
type MouseEventListener<T = globalThis.Element> = EvHandler<MouseEvent, T>
type PictureInPictureEventListener<T = globalThis.Element> = EvHandler<PictureInPictureEvent, T>
type PointerEventListener<T = globalThis.Element> = EvHandler<PointerEvent, T>
type SubmitEventListener<T = globalThis.Element> = EvHandler<SubmitEvent, T>
type ToggleEventListener<T = globalThis.Element> = EvHandler<ToggleEvent, T>
type TouchEventListener<T = globalThis.Element> = EvHandler<TouchEvent, T>
type TransitionEventListener<T = globalThis.Element> = EvHandler<TransitionEvent, T>
type UIEventListener<T = globalThis.Element> = EvHandler<UIEvent, T>
type WebGLContextEventListener<T = globalThis.Element> = EvHandler<WebGLContextEvent, T>
type WheelEventListener<T = globalThis.Element> = EvHandler<WheelEvent, T>
interface Attributes {
accessKey?: string
class?: string
/**
* Making document regions editable
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/contenteditable
*/
contentEditable?: boolean | '' | 'true' | 'false' | 'plaintext-only'
/**
* This feature is no longer recommended. Though some browsers might still support it, it may have already been removed from the relevant web standards, may be in the process of being dropped, or may only be kept for compatibility purposes
* @deprecated
*/
contextMenu?: string
dir?: 'ltr' | 'rtl' | 'auto'
/**
* This attribute is enumerated and not Boolean. A value of `true` or `false` is mandatory, and shorthand like `<img draggable>` is forbidden. The correct usage is `<img draggable="true">`
* @see https://developer.mozilla.org/en-US/docs/Glossary/Enumerated
*/
draggable?: 'true' | 'false'
hidden?: boolean | 'hidden' | 'until-found' | ''
id?: string
inert?: boolean | ''
lang?: string
slot?: string
/**
* This attribute is enumerated and not Boolean. A value of `true` or `false` is mandatory, and shorthand like `<input spellcheck>` is forbidden. The correct usage is `<input spellcheck="true">`
* @see https://developer.mozilla.org/en-US/docs/Glossary/Enumerated
*/
spellcheck?: 'true' | 'false'
style?: string | CSSProperties
tabIndex?: number | `${number}`
title?: string
translate?: 'yes' | 'no'
// Unknown
radioGroup?: string // <command>, <menuitem>
// RDFa Attributes
about?: string
datatype?: string
inlist?: any
property?: string
resource?: string
typeof?: string
vocab?: string
autocapitalize?: 'none' | 'off' | 'on' | 'sentences' | 'words' | 'characters'
/**
* Non-standard attribute. Safari only. A string which indicates whether to activate automatic correction while the user is editing this field
*/
autocorrect?: 'on' | 'off'
autosave?: string
color?: Property.Color
itemProp?: string
itemScope?: boolean | ''
itemType?: string
itemID?: string
itemRef?: string
results?: number | `${number}`
security?: string
unselectable?: 'on' | 'off'
// Living Standard
/**
* Hints at the type of data that might be entered by the user while editing the element or its contents
* @see https://html.spec.whatwg.org/multipage/interaction.html#input-modalities:-the-inputmode-attribute
*/
inputMode?: 'none' | 'text' | 'tel' | 'url' | 'email' | 'numeric' | 'decimal' | 'search'
/**
* Specify that a standard HTML element should behave like a defined custom built-in element
* @see https://html.spec.whatwg.org/multipage/custom-elements.html#attr-is
*/
is?: string
popover?: boolean | 'auto' | 'manual' | ''
/**
* A space-separated list of the part names of the element. Part names allows CSS to select and style specific elements in a shadow tree via the `::part` pseudo-element.
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/part
*/
part?: string
/**
* Allows you to select and style elements existing in nested shadow trees, by exporting their `part` names.
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/exportparts
*/
exportparts?: string
/**
* Used to indicate that an element is flagged for tracking by `PerformanceObserver` objects using the "element" type.
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Attributes/elementtiming
*/
elementTiming?: string
/**
* This is an experimental technology
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/virtualkeyboardpolicy
*/
virtualkeyboardpolicy?: 'auto' | 'manual'
/**
* In browsers that support them, writing suggestions are enabled by default. To disable them, set the writingsuggestions attribute's value to `false`. Setting the attribute's value to `true`, or omitting the value, enables writing suggestions
* @see https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/writingsuggestions
*/
writingsuggestions?: boolean | '' | 'true' | 'false'
}
export interface HTMLAttributes<T> extends AriaAttributes, Attributes {
_?: string
$?: Record<string, EventListener<T>>
ref?: Ref<T>
children?: TChild | TChild[]
// ClipboardEvent
oncopy?: ClipboardEventHandler<T>
'on:copy'?: ClipboardEventListener<T>
oncut?: ClipboardEventHandler<T>
'on:cut'?: ClipboardEventListener<T>
onpaste?: ClipboardEventHandler<T>
'on:paste'?: ClipboardEventListener<T>
// CompositionEvent
oncompositionend?: CompositionEventHandler<T>
'on:compositionEnd'?: CompositionEventListener<T>
oncompositionstart?: CompositionEventHandler<T>
'on:compositionStart'?: CompositionEventListener<T>
oncompositionupdate?: CompositionEventHandler<T>
'on:compositionUpdate'?: CompositionEventListener<T>
// FocusEvent
onfocus?: FocusEventHandler<T>
'on:focus'?: FocusEventListener<T>
onblur?: FocusEventHandler<T>
'on:blur'?: FocusEventListener<T>
'on:focusIn'?: FocusEventListener<T>
'on:focusOut'?: FocusEventListener<T>
// InputEvent
onbeforeinput?: InputEventHandler<T>
'on:beforeInput'?: InputEventListener<T>
oninput?: InputEventHandler<T>
'on:input'?: InputEventListener<T>
// [Form] Event
onchange?: GenericEventHandler<T>
'on:change'?: EventListener<T>
onreset?: GenericEventHandler<T>
'on:reset'?: EventListener<T>
oninvalid?: GenericEventHandler<T>
'on:invalid'?: EventListener<T>
// Event
onload?: GenericEventHandler<T>
'on:load'?: EventListener<T>
onerror?: GenericEventHandler<T>
'on:error'?: EventListener<T>
onselect?: GenericEventHandler<T>
'on:select'?: EventListener<T>
// SubmitEvent
onsubmit?: SubmitEventHandler<T>
'on:submit'?: SubmitEventListener<T>
// KeyboardEvent
onkeydown?: KeyboardEventHandler<T>
'on:keyDown'?: KeyboardEventListener<T>
/**
* This feature is no longer recommended.
* Since event has been deprecated, you should use `onbeforeinput` or `onkeydown` instead
* @deprecated
*/
onkeypress?: KeyboardEventHandler<T>
/**
* This feature is no longer recommended.
* Since event has been deprecated, you should use `on:beforeInput` or `on:keyDown` instead
* @deprecated
*/
'on:keyPress'?: KeyboardEventListener<T>
onkeyup?: KeyboardEventHandler<T>
'on:keyUp'?: KeyboardEventListener<T>
// [Media] Event
onabort?: GenericEventHandler<T>
'on:abort'?: EventListener<T>
oncanplay?: GenericEventHandler<T>
'on:canPlay'?: EventListener<T>
oncanplaythrough?: GenericEventHandler<T>
'on:canPlayThrough'?: EventListener<T>
ondurationchange?: GenericEventHandler<T>
'on:durationChange'?: EventListener<T>
onemptied?: GenericEventHandler<T>
'on:emptied'?: EventListener<T>
onended?: GenericEventHandler<T>
'on:ended'?: EventListener<T>
onloadeddata?: GenericEventHandler<T>
'on:loadedData'?: EventListener<T>
onloadedmetadata?: GenericEventHandler<T>
'on:loadedMetadata'?: EventListener<T>
onloadstart?: GenericEventHandler<T>
'on:loadStart'?: EventListener<T>
onpause?: GenericEventHandler<T>
'on:pause'?: EventListener<T>
onplay?: GenericEventHandler<T>
'on:play'?: EventListener<T>
onplaying?: GenericEventHandler<T>
'on:playing'?: EventListener<T>
onprogress?: GenericEventHandler<T>
'on:progress'?: EventListener<T>
onratechange?: GenericEventHandler<T>
'on:rateChange'?: EventListener<T>
onseeked?: GenericEventHandler<T>
'on:seeked'?: EventListener<T>
onseeking?: GenericEventHandler<T>
'on:seeking'?: EventListener<T>
onstalled?: GenericEventHandler<T>
'on:stalled'?: EventListener<T>
onsuspend?: GenericEventHandler<T>
'on:suspend'?: EventListener<T>
ontimeupdate?: GenericEventHandler<T>
'on:timeUpdate'?: EventListener<T>
onvolumechange?: GenericEventHandler<T>
'on:volumeChange'?: EventListener<T>
onwaiting?: GenericEventHandler<T>
'on:waiting'?: EventListener<T>
// MouseEvent
onauxclick?: MouseEventHandler<T>
'on:auxclick'?: MouseEventHandler<T>
onclick?: MouseEventHandler<T>
'on:click'?: MouseEventListener<T>
oncontextmenu?: MouseEventHandler<T>
'on:contextMenu'?: MouseEventListener<T>
ondblclick?: MouseEventHandler<T>
'on:dblClick'?: MouseEventListener<T>
onmousedown?: MouseEventHandler<T>
'on:mouseDown'?: MouseEventListener<T>
onmouseenter?: MouseEventHandler<T>
'on:mouseEnter'?: MouseEventListener<T>
onmouseleave?: MouseEventHandler<T>
'on:mouseLeave'?: MouseEventListener<T>
onmousemove?: MouseEventHandler<T>
'on:mouseMove'?: MouseEventListener<T>
onmouseout?: MouseEventHandler<T>
'on:mouseOut'?: MouseEventListener<T>
onmouseover?: MouseEventHandler<T>
'on:mouseOver'?: MouseEventListener<T>
onmouseup?: MouseEventHandler<T>
'on:mouseUp'?: MouseEventListener<T>
// DragEvent
ondrag?: DragEventHandler<T>
'on:drag'?: DragEventListener<T>
ondragend?: DragEventHandler<T>
'on:dragEnd'?: DragEventListener<T>
ondragenter?: DragEventHandler<T>
'on:dragEnter'?: DragEventListener<T>
/** @deprecated */
ondragexit?: DragEventHandler<T>
/** @deprecated */
'on:dragExit'?: DragEventListener<T>
ondragleave?: DragEventHandler<T>
'on:dragLeave'?: DragEventListener<T>
ondragover?: DragEventHandler<T>
'on:dragOver'?: DragEventListener<T>
ondragstart?: DragEventHandler<T>
'on:dragStart'?: DragEventListener<T>
ondrop?: DragEventHandler<T>
'on:drop'?: DragEventListener<T>
// TouchEvent
ontouchcancel?: TouchEventHandler<T>
'on:touchCancel'?: TouchEventListener<T>
ontouchend?: TouchEventHandler<T>
'on:touchEnd'?: TouchEventListener<T>
ontouchmove?: TouchEventHandler<T>
'on:touchMove'?: TouchEventListener<T>
ontouchstart?: TouchEventHandler<T>
'on:touchStart'?: TouchEventListener<T>
// PointerEvent
onpointerdown?: PointerEventHandler<T>
'on:pointerDown'?: PointerEventListener<T>
onpointermove?: PointerEventHandler<T>
'on:pointerMove'?: PointerEventListener<T>
onpointerup?: PointerEventHandler<T>
'on:pointerUp'?: PointerEventListener<T>
onpointercancel?: PointerEventHandler<T>
'on:pointerCancel'?: PointerEventListener<T>
onpointerenter?: PointerEventHandler<T>
'on:pointerEnter'?: PointerEventListener<T>
onpointerleave?: PointerEventHandler<T>
'on:pointerLeave'?: PointerEventListener<T>
onpointerover?: PointerEventHandler<T>
'on:pointerOver'?: PointerEventListener<T>
onpointerout?: PointerEventHandler<T>
'on:pointerOut'?: PointerEventListener<T>
ongotpointercapture?: PointerEventHandler<T>
'on:gotPointerCapture'?: PointerEventListener<T>
onlostpointercapture?: PointerEventHandler<T>
'on:lostPointerCapture'?: PointerEventListener<T>
// UIEvent
onscroll?: UIEventHandler<T>
'on:scroll'?: UIEventListener<T>
onscrollend?: UIEventHandler<T>
'on:scrollEnd'?: UIEventListener<T>
// WheelEvent
onwheel?: WheelEventHandler<T>
'on:wheel'?: WheelEventListener<T>
// AnimationEvent
onanimationstart?: AnimationEventHandler<T>
'on:animationStart'?: AnimationEventListener<T>
onanimationend?: AnimationEventHandler<T>
'on:animationEnd'?: AnimationEventListener<T>
onanimationiteration?: AnimationEventHandler<T>
'on:animationIteration'?: AnimationEventListener<T>
onanimationcancel?: AnimationEventHandler<T>
'on:animationCancel'?: AnimationEventListener<T>
// TransitionEvent
ontransitionstart?: TransitionEventHandler<T>
'on:transitionStart'?: TransitionEventListener<T>
ontransitionend?: TransitionEventHandler<T>
'on:transitionEnd'?: TransitionEventListener<T>
ontransitionrun?: TransitionEventHandler<T>
'on:transitionRun'?: TransitionEventListener<T>
ontransitioncancel?: TransitionEventHandler<T>
'on:transitionCancel'?: TransitionEventListener<T>
// Fullscreen API
onfullscreenchange?: GenericEventHandler<T>
'on:fullscreenChange'?: EventListener<T>
onfullscreenerror?: GenericEventHandler<T>
'on:fullscreenError'?: EventListener<T>
// ToggleEvent
onbeforetoggle?: ToggleEventHandler<T>
'on:beforeToggle'?: ToggleEventListener<T>
ontoggle?: ToggleEventHandler<T>
'on:toggle'?: ToggleEventListener<T>
// ContentVisibilityAutoStateChangeEvent
oncontentvisibilityautostatechange?: GenericEventHandler<T>
'on:contentVisibilityAutoStateChange'?: EventListener<T>
}
export interface SVGAttributes<T extends EventTarget> extends HTMLAttributes<T> {
_?: typeof svgNs
xmlns?: typeof svgNs
href?: string
cx?: number | string
cy?: number | string
fx?: number | string
fy?: number | string
fr?: string
d?: string
/**
* The `accent-height` attribute defines the distance from the origin to the top of accent characters, measured by a distance within the font coordinate system
* @deprecated
*/
'accent-height'?: number | `${number}`
accumulate?: 'none' | 'sum'
additive?: 'replace' | 'sum'
'alignment-baseline'?: Property.AlignmentBaseline
allowReorder?: 'no' | 'yes'
/** @deprecated */
alphabetic?: number | string
amplitude?: number | `${number}`
/** @deprecated */
'arabic-form'?: 'initial' | 'medial' | 'terminal' | 'isolated'
/**
* The `ascent` attribute defines the maximum unaccented height of the font within the font coordinate system
* @deprecated
*/
ascent?: number | `${number}`
attributeName?: string
/** @deprecated */
attributeType?: 'CSS' | 'XML' | 'auto'
autoReverse?: number | string
azimuth?: number | `${number}`
baseFrequency?: number | string
'baseline-shift'?: Property.BaselineShift
baseProfile?: number | string
/** @deprecated */
bbox?: number | string
begin?: number | string
bias?: number | `${number}`
by?: number | string
calcMode?: 'discrete' | 'linear' | 'paced' | 'spline'
/** @deprecated */
'cap-height'?: number | string
/** @deprecated */
clip?: Property.Clip
'clip-path'?: Property.ClipPath
clipPathUnits?: 'userSpaceOnUse' | 'objectBoundingBox'
'clip-rule'?: Property.ClipRule
'color-interpolation'?: Property.ColorInterpolation
'color-interpolation-filters'?: Property.ColorInterpolation
/** @deprecated */
'color-profile'?: Property.Color
/** @deprecated */
'color-rendering'?: Property.ColorRendering
/** @deprecated */
contentScriptType?: string
/** @deprecated */
contentStyleType?: string
cursor?: Property.Cursor
decelerate?: number | string
descent?: number | string
diffuseConstant?: number | `${number}`
direction?: Property.Direction
display?: Property.Display
divisor?: number | string
'dominant-baseline'?: Property.DominantBaseline
dur?: number | string
dx?: number | string
dy?: number | string
edgeMode?: 'duplicate' | 'wrap' | 'none'
elevation?: number | `${number}`
/** @deprecated */
'enable-background'?: number | string
end?: number | string
exponent?: number | `${number}`
externalResourcesRequired?: number | string
fill?: Property.Fill
'fill-opacity'?: Property.FillOpacity
'fill-rule'?: Property.FillRule
filter?: Property.Filter
/** @deprecated */
filterRes?: number | string
filterUnits?: 'userSpaceOnUse' | 'objectBoundingBox'
'flood-color'?: Property.FloodColor
'flood-opacity'?: Property.FillOpacity
focusable?: 'true' | 'false' | 'auto'
focusHighlight?: 'auto' | 'none'
'font-family'?: Property.FontFamily
'font-size'?: Property.FontSize
'font-size-adjust'?: Property.FontSizeAdjust
'font-stretch'?: Property.FontStretch
'font-style'?: Property.FontStyle
'font-variant'?: Property.FontVariant
'font-weight'?: Property.FontWeight
/** @deprecated */
format?: string
from?: number | string
/** @deprecated */
g1?: number | string
/** @deprecated */
g2?: number | string
/** @deprecated */
'glyph-name'?: string
/** @deprecated */
'glyph-orientation-horizontal'?: string
/** @deprecated */
'glyph-orientation-vertical'?: Property.GlyphOrientationVertical
/** @deprecated */
glyphRef?: string
gradientTransform?: string
gradientUnits?: 'userSpaceOnUse' | 'objectBoundingBox'
/** @deprecated */
hanging?: number | `${number}`
/** @deprecated */
'horiz-adv-x'?: number | `${number}`
/** @deprecated */
'horiz-origin-x'?: number | `${number}`
/** @deprecated */
'horiz-origin-y'?: number | `${number}`
/** @deprecated */
ideographic?: number | `${number}`
'image-rendering'?: Property.ImageRendering
in2?: string
in?: string
intercept?: number | `${number}`
k1?: number | `${number}`
k2?: number | `${number}`
k3?: number | `${number}`
k4?: number | `${number}`
/** @deprecated */
k?: number | `${number}`
kernelMatrix?: number | string
/** @deprecated */
kernelUnitLength?: number | string
/** @deprecated */
kerning?: number | string
keyPoints?: number | string
keySplines?: number | string
keyTimes?: number | string
lang?: string
lengthAdjust?: 'spacing' | 'spacingAndGlyphs'
'letter-spacing'?: Property.LetterSpacing
'lighting-color'?: Property.LightingColor
limitingConeAngle?: number | `${number}`
marker?: Property.Marker
'marker-start'?: Property.MarkerStart
'marker-end'?: Property.MarkerEnd
'marker-mid'?: Property.MarkerMid
markerHeight?: number | string
markerUnits?: 'userSpaceOnUse' | 'strokeWidth'
markerWidth?: number | string
local?: string
mask?: Property.Mask
maskContentUnits?: 'userSpaceOnUse' | 'objectBoundingBox'
maskUnits?: 'userSpaceOnUse' | 'objectBoundingBox'
/** @deprecated */
mathematical?: number | `${number}`
max?: string
min?: string
media?: string
method?: 'align' | 'stretch'
mode?: string
name?: string
numOctaves?: number | `${number}`
offset?: Property.Offset
opacity?: Property.Opacity
operator?: 'over' | 'in' | 'out' | 'atop' | 'xor' | 'lighter' | 'arithmetic' | 'erode' | 'dilate'
order?: Property.Order
orient?: 'auto' | 'auto-start-reverse' | number | (string & {})
/** @deprecated */
orientation?: 'h' | 'v'
origin?: 'default' | (string & {})
overflow?: Property.Overflow
'overline-position'?: number | `${number}`
'overline-thickness'?: number | `${number}`
'paint-order'?: Property.PaintOrder