forked from stenciljs/core
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathstencil-public-runtime.ts
1885 lines (1722 loc) · 60.1 KB
/
stencil-public-runtime.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
declare type CustomMethodDecorator<T> = (
target: Object,
propertyKey: string | symbol,
descriptor: TypedPropertyDescriptor<T>,
) => TypedPropertyDescriptor<T> | void;
export interface ComponentDecorator {
(opts?: ComponentOptions): ClassDecorator;
}
export interface ComponentOptions {
/**
* When set to `true` this component will be form-associated. See
* https://stenciljs.com/docs/next/form-associated documentation on how to
* build form-associated Stencil components that integrate into forms like
* native browser elements such as `<input>` and `<textarea>`.
*
* The {@link AttachInternals} decorator allows for access to the
* `ElementInternals` object to modify the associated form.
*/
formAssociated?: boolean;
/**
* Tag name of the web component. Ideally, the tag name must be globally unique,
* so it's recommended to choose an unique prefix for all your components within the same collection.
*
* In addition, tag name must contain a '-'
*/
tag: string;
/**
* If `true`, the component will use scoped stylesheets. Similar to shadow-dom,
* but without native isolation. Defaults to `false`.
*/
scoped?: boolean;
/**
* If `true`, the component will use native shadow-dom encapsulation, it will fallback to
* `scoped` if the browser does not support shadow-dom natively. Defaults to `false`.
* Additionally, `shadow` can also be given options when attaching the shadow root.
*/
shadow?: boolean | ShadowRootOptions;
/**
* Relative URL to some external stylesheet file. It should be a `.css` file unless some
* external plugin is installed like `@stencil/sass`.
*/
styleUrl?: string;
/**
* Similar as `styleUrl` but allows to specify different stylesheets for different modes.
*/
styleUrls?: string[] | ModeStyles;
/**
* String that contains inlined CSS instead of using an external stylesheet.
* The performance characteristics of this feature are the same as using an external stylesheet.
*
* Notice, you can't use sass, or less, only `css` is allowed using `styles`, use `styleUrl` is you need more advanced features.
*/
styles?: string | { [modeName: string]: any };
/**
* Array of relative links to folders of assets required by the component.
*/
assetsDirs?: string[];
}
export interface ShadowRootOptions {
/**
* When set to `true`, specifies behavior that mitigates custom element issues
* around focusability. When a non-focusable part of the shadow DOM is clicked, the first
* focusable part is given focus, and the shadow host is given any available `:focus` styling.
*/
delegatesFocus?: boolean;
}
export interface ModeStyles {
[modeName: string]: string | string[];
}
export interface PropDecorator {
(opts?: PropOptions): PropertyDecorator;
}
export interface PropOptions {
/**
* The name of the associated DOM attribute.
* Stencil uses different heuristics to determine the default name of the attribute,
* but using this property, you can override the default behavior.
*/
attribute?: string | null;
/**
* A Prop is _by default_ immutable from inside the component logic.
* Once a value is set by a user, the component cannot update it internally.
* However, it's possible to explicitly allow a Prop to be mutated from inside the component,
* by setting this `mutable` option to `true`.
*/
mutable?: boolean;
/**
* In some cases it may be useful to keep a Prop in sync with an attribute.
* In this case you can set the `reflect` option to `true`, since it defaults to `false`:
*/
reflect?: boolean;
}
export interface MethodDecorator {
(opts?: MethodOptions): CustomMethodDecorator<any>;
}
export interface MethodOptions {}
export interface ElementDecorator {
(): PropertyDecorator;
}
export interface EventDecorator {
(opts?: EventOptions): PropertyDecorator;
}
export interface EventOptions {
/**
* A string custom event name to override the default.
*/
eventName?: string;
/**
* A Boolean indicating whether the event bubbles up through the DOM or not.
*/
bubbles?: boolean;
/**
* A Boolean indicating whether the event is cancelable.
*/
cancelable?: boolean;
/**
* A Boolean value indicating whether or not the event can bubble across the boundary between the shadow DOM and the regular DOM.
*/
composed?: boolean;
}
export interface AttachInternalsDecorator {
(): PropertyDecorator;
}
export interface ListenDecorator {
(eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
}
export interface ListenOptions {
/**
* Handlers can also be registered for an event other than the host itself.
* The `target` option can be used to change where the event listener is attached,
* this is useful for listening to application-wide events.
*/
target?: ListenTargetOptions;
/**
* Event listener attached with `@Listen` does not "capture" by default,
* When a event listener is set to "capture", means the event will be dispatched
* during the "capture phase". Please see
* https://www.quirksmode.org/js/events_order.html for further information.
*/
capture?: boolean;
/**
* By default, Stencil uses several heuristics to determine if
* it must attach a `passive` event listener or not.
*
* Using the `passive` option can be used to change the default behavior.
* Please see https://developers.google.com/web/updates/2016/06/passive-event-listeners for further information.
*/
passive?: boolean;
}
export type ListenTargetOptions = 'body' | 'document' | 'window';
export interface StateDecorator {
(): PropertyDecorator;
}
export interface WatchDecorator {
(propName: string): CustomMethodDecorator<any>;
}
export interface UserBuildConditionals {
isDev: boolean;
isBrowser: boolean;
isServer: boolean;
isTesting: boolean;
}
/**
* The `Build` object provides many build conditionals that can be used to
* include or exclude code depending on the build.
*/
export declare const Build: UserBuildConditionals;
/**
* The `Env` object provides access to the "env" object declared in the project's `stencil.config.ts`.
*/
export declare const Env: { [prop: string]: string | undefined };
/**
* The `@Component()` decorator is used to provide metadata about the component class.
* https://stenciljs.com/docs/component
*/
export declare const Component: ComponentDecorator;
/**
* The `@Element()` decorator is a reference to the actual host element
* once it has rendered.
*/
export declare const Element: ElementDecorator;
/**
* Components can emit data and events using the Event Emitter decorator.
* To dispatch Custom DOM events for other components to handle, use the
* `@Event()` decorator. The Event decorator also makes it easier for Stencil
* to automatically build types and documentation for the event data.
* https://stenciljs.com/docs/events
*/
export declare const Event: EventDecorator;
/**
* If the `formAssociated` option is set in options passed to the
* `@Component()` decorator then this decorator may be used to get access to the
* `ElementInternals` instance associated with the component.
*/
export declare const AttachInternals: AttachInternalsDecorator;
/**
* The `Listen()` decorator is for listening DOM events, including the ones
* dispatched from `@Events()`.
* https://stenciljs.com/docs/events#listen-decorator
*/
export declare const Listen: ListenDecorator;
/**
* The `@Method()` decorator is used to expose methods on the public API.
* Class methods decorated with the @Method() decorator can be called directly
* from the element, meaning they are intended to be callable from the outside.
* https://stenciljs.com/docs/methods
*/
export declare const Method: MethodDecorator;
/**
* Props are custom attribute/properties exposed publicly on the element
* that developers can provide values for. Children components do not need to
* know about or reference parent components, so Props can be used to pass
* data down from the parent to the child. Components need to explicitly
* declare the Props they expect to receive using the `@Prop()` decorator.
* Any value changes to a Prop will cause a re-render.
* https://stenciljs.com/docs/properties
*/
export declare const Prop: PropDecorator;
/**
* The `@State()` decorator can be used to manage internal data for a component.
* This means that a user cannot modify this data from outside the component,
* but the component can modify it however it sees fit. Any value changes to a
* `@State()` property will cause the components render function to be called again.
* https://stenciljs.com/docs/state
*/
export declare const State: StateDecorator;
/**
* When a property's value has changed, a method decorated with `@Watch()` will be
* called and passed the new value of the prop along with the old value. Watch is
* useful for validating props or handling side effects. Watch decorator does not
* fire when a component initially loads.
* https://stenciljs.com/docs/reactive-data#watch-decorator
*/
export declare const Watch: WatchDecorator;
export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
export type ErrorHandler = (err: any, element?: HTMLElement) => void;
/**
* `setMode()` is used for libraries which provide multiple "modes" for styles.
*/
export declare const setMode: (handler: ResolutionHandler) => void;
/**
* `getMode()` is used for libraries which provide multiple "modes" for styles.
* @param ref a reference to the node to get styles for
* @returns the current mode or undefined, if not found
*/
export declare function getMode<T = string | undefined>(ref: any): T;
export declare function setPlatformHelpers(helpers: {
jmp?: (c: any) => any;
raf?: (c: any) => number;
ael?: (el: any, eventName: string, listener: any, options: any) => void;
rel?: (el: any, eventName: string, listener: any, options: any) => void;
ce?: (eventName: string, opts?: any) => any;
}): void;
/**
* Get the base path to where the assets can be found. Use `setAssetPath(path)`
* if the path needs to be customized.
* @param path the path to use in calculating the asset path. this value will be
* used in conjunction with the base asset path
* @returns the base path
*/
export declare function getAssetPath(path: string): string;
/**
* Used to manually set the base path where assets can be found. For lazy-loaded
* builds the asset path is automatically set and assets copied to the correct
* build directory. However, for custom elements builds, the `setAssetPath(path)` could
* be used to customize the asset path depending on how the script file is consumed.
* If the script is used as "module", it's recommended to use "import.meta.url", such
* as `setAssetPath(import.meta.url)`. Other options include
* `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
* dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
* But do note that this configuration depends on how your script is bundled, or lack of
* bundling, and where your assets can be loaded from. Additionally custom bundling
* will have to ensure the static assets are copied to its build directory.
* @param path the asset path to set
* @returns the set path
*/
export declare function setAssetPath(path: string): string;
/**
* Used to specify a nonce value that corresponds with an application's
* [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
* When set, the nonce will be added to all dynamically created script and style tags at runtime.
* Alternatively, the nonce value can be set on a `meta` tag in the DOM head
* (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
* @param nonce The value to be used for the nonce attribute.
*/
export declare function setNonce(nonce: string): void;
/**
* Retrieve a Stencil element for a given reference
* @param ref the ref to get the Stencil element for
* @returns a reference to the element
*/
export declare function getElement(ref: any): HTMLStencilElement;
/**
* Schedules a new render of the given instance or element even if no state changed.
*
* Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
*
* @param ref the node/element to force the re-render of
*/
export declare function forceUpdate(ref: any): void;
/**
* getRenderingRef
* @returns the rendering ref
*/
export declare function getRenderingRef(): any;
export interface HTMLStencilElement extends HTMLElement {
componentOnReady(): Promise<this>;
}
/**
* Schedules a DOM-write task. The provided callback will be executed
* in the best moment to perform DOM mutation without causing layout thrashing.
*
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
*
* @param task the DOM-write to schedule
*/
export declare function writeTask(task: RafCallback): void;
/**
* Schedules a DOM-read task. The provided callback will be executed
* in the best moment to perform DOM reads without causing layout thrashing.
*
* For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
*
* @param task the DOM-read to schedule
*/
export declare function readTask(task: RafCallback): void;
/**
* `setErrorHandler()` can be used to inject a custom global error handler.
* Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
*/
export declare const setErrorHandler: (handler: ErrorHandler) => void;
/**
* This file gets copied to all distributions of stencil component collections.
* - no imports
*/
export interface ComponentWillLoad {
/**
* The component is about to load and it has not
* rendered yet.
*
* This is the best place to make any data updates
* before the first render.
*
* componentWillLoad will only be called once.
*/
componentWillLoad(): Promise<void> | void;
}
export interface ComponentDidLoad {
/**
* The component has loaded and has already rendered.
*
* Updating data in this method will cause the
* component to re-render.
*
* componentDidLoad will only be called once.
*/
componentDidLoad(): void;
}
export interface ComponentWillUpdate {
/**
* The component is about to update and re-render.
*
* Called multiple times throughout the life of
* the component as it updates.
*
* componentWillUpdate is not called on the first render.
*/
componentWillUpdate(): Promise<void> | void;
}
export interface ComponentDidUpdate {
/**
* The component has just re-rendered.
*
* Called multiple times throughout the life of
* the component as it updates.
*
* componentWillUpdate is not called on the
* first render.
*/
componentDidUpdate(): void;
}
export interface ComponentInterface {
connectedCallback?(): void;
disconnectedCallback?(): void;
componentWillRender?(): Promise<void> | void;
componentDidRender?(): void;
/**
* The component is about to load and it has not
* rendered yet.
*
* This is the best place to make any data updates
* before the first render.
*
* componentWillLoad will only be called once.
*/
componentWillLoad?(): Promise<void> | void;
/**
* The component has loaded and has already rendered.
*
* Updating data in this method will cause the
* component to re-render.
*
* componentDidLoad will only be called once.
*/
componentDidLoad?(): void;
/**
* A `@Prop` or `@State` property changed and a rerender is about to be requested.
*
* Called multiple times throughout the life of
* the component as its properties change.
*
* componentShouldUpdate is not called on the first render.
*/
componentShouldUpdate?(newVal: any, oldVal: any, propName: string): boolean | void;
/**
* The component is about to update and re-render.
*
* Called multiple times throughout the life of
* the component as it updates.
*
* componentWillUpdate is not called on the first render.
*/
componentWillUpdate?(): Promise<void> | void;
/**
* The component has just re-rendered.
*
* Called multiple times throughout the life of
* the component as it updates.
*
* componentWillUpdate is not called on the
* first render.
*/
componentDidUpdate?(): void;
render?(): any;
[memberName: string]: any;
}
// General types important to applications using stencil built components
export interface EventEmitter<T = any> {
emit: (data?: T) => CustomEvent<T>;
}
export interface RafCallback {
(timeStamp: number): void;
}
export interface QueueApi {
tick: (cb: RafCallback) => void;
read: (cb: RafCallback) => void;
write: (cb: RafCallback) => void;
clear?: () => void;
flush?: (cb?: () => void) => void;
}
/**
* Host
*/
export interface HostAttributes {
class?: string | { [className: string]: boolean };
style?: { [key: string]: string | undefined };
ref?: (el: HTMLElement | null) => void;
[prop: string]: any;
}
/**
* Utilities for working with functional Stencil components. An object
* conforming to this interface is passed by the Stencil runtime as the third
* argument to a functional component, allowing component authors to work with
* features like children.
*
* The children of a functional component will be passed as the second
* argument, so a functional component which uses these utils to transform its
* children might look like the following:
*
* ```ts
* export const AddClass: FunctionalComponent = (_, children, utils) => (
* utils.map(children, child => ({
* ...child,
* vattrs: {
* ...child.vattrs,
* class: `${child.vattrs.class} add-class`
* }
* }))
* );
* ```
*
* For more see the Stencil documentation, here:
* https://stenciljs.com/docs/functional-components
*/
export interface FunctionalUtilities {
/**
* Utility for reading the children of a functional component at runtime.
* Since the Stencil runtime uses a different interface for children it is
* not recommended to read the children directly, and is preferable to use
* this utility to, for instance, perform a side effect for each child.
*/
forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
/**
* Utility for transforming the children of a functional component. Given an
* array of children and a callback this will return a list of the results of
* passing each child to the supplied callback.
*/
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
}
export interface FunctionalComponent<T = {}> {
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
}
/**
* A Child VDOM node
*
* This has most of the same properties as {@link VNode} but friendlier names
* (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in
* order to provide a friendlier public interface for users of the
* {@link FunctionalUtilities}).
*/
export interface ChildNode {
vtag?: string | number | Function;
vkey?: string | number;
vtext?: string;
vchildren?: VNode[];
vattrs?: any;
vname?: string;
}
/**
* Host is a functional component can be used at the root of the render function
* to set attributes and event listeners to the host element itself.
*
* For further information: https://stenciljs.com/docs/host-element
*/
export declare const Host: FunctionalComponent<HostAttributes>;
/**
* Fragment
*/
export declare const Fragment: FunctionalComponent<{}>;
/* eslint-disable jsdoc/require-param, jsdoc/require-returns -- we don't want to JSDoc these overloads at this time */
/**
* The "h" namespace is used to import JSX types for elements and attributes.
* It is imported in order to avoid conflicting global JSX issues.
*/
export declare namespace h {
export function h(sel: any): VNode;
export function h(sel: Node, data: VNodeData | null): VNode;
export function h(sel: any, data: VNodeData | null): VNode;
export function h(sel: any, text: string): VNode;
export function h(sel: any, children: Array<VNode | undefined | null>): VNode;
export function h(sel: any, data: VNodeData | null, text: string): VNode;
export function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
export function h(sel: any, data: VNodeData | null, children: VNode): VNode;
export namespace JSX {
interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {
[tagName: string]: any;
}
}
}
/* eslint-enable jsdoc/require-param, jsdoc/require-returns -- we don't want to JSDoc these overloads at this time */
export declare function h(sel: any): VNode;
export declare function h(sel: Node, data: VNodeData | null): VNode;
export declare function h(sel: any, data: VNodeData | null): VNode;
export declare function h(sel: any, text: string): VNode;
export declare function h(sel: any, children: Array<VNode | undefined | null>): VNode;
export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
/**
* A virtual DOM node
*/
export interface VNode {
$flags$: number;
$tag$: string | number | Function;
$elm$: any;
$text$: string;
$children$: VNode[];
$attrs$?: any;
$name$?: string;
$key$?: string | number;
}
export interface VNodeData {
class?: { [className: string]: boolean };
style?: any;
[attrName: string]: any;
}
declare namespace LocalJSX {
export interface Element {}
export interface IntrinsicElements {}
}
export { LocalJSX as JSX };
export namespace JSXBase {
export interface IntrinsicElements {
// Stencil elements
slot: JSXBase.SlotAttributes;
// HTML
a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
abbr: JSXBase.HTMLAttributes;
address: JSXBase.HTMLAttributes;
area: JSXBase.AreaHTMLAttributes<HTMLAreaElement>;
article: JSXBase.HTMLAttributes;
aside: JSXBase.HTMLAttributes;
audio: JSXBase.AudioHTMLAttributes<HTMLAudioElement>;
b: JSXBase.HTMLAttributes;
base: JSXBase.BaseHTMLAttributes<HTMLBaseElement>;
bdi: JSXBase.HTMLAttributes;
bdo: JSXBase.HTMLAttributes;
big: JSXBase.HTMLAttributes;
blockquote: JSXBase.BlockquoteHTMLAttributes<HTMLQuoteElement>;
body: JSXBase.HTMLAttributes<HTMLBodyElement>;
br: JSXBase.HTMLAttributes<HTMLBRElement>;
button: JSXBase.ButtonHTMLAttributes<HTMLButtonElement>;
canvas: JSXBase.CanvasHTMLAttributes<HTMLCanvasElement>;
caption: JSXBase.HTMLAttributes<HTMLTableCaptionElement>;
cite: JSXBase.HTMLAttributes;
code: JSXBase.HTMLAttributes;
col: JSXBase.ColHTMLAttributes<HTMLTableColElement>;
colgroup: JSXBase.ColgroupHTMLAttributes<HTMLTableColElement>;
data: JSXBase.HTMLAttributes<HTMLDataElement>;
datalist: JSXBase.HTMLAttributes<HTMLDataListElement>;
dd: JSXBase.HTMLAttributes;
del: JSXBase.DelHTMLAttributes<HTMLModElement>;
details: JSXBase.DetailsHTMLAttributes<HTMLElement>;
dfn: JSXBase.HTMLAttributes;
dialog: JSXBase.DialogHTMLAttributes<HTMLDialogElement>;
div: JSXBase.HTMLAttributes<HTMLDivElement>;
dl: JSXBase.HTMLAttributes<HTMLDListElement>;
dt: JSXBase.HTMLAttributes;
em: JSXBase.HTMLAttributes;
embed: JSXBase.EmbedHTMLAttributes<HTMLEmbedElement>;
fieldset: JSXBase.FieldsetHTMLAttributes<HTMLFieldSetElement>;
figcaption: JSXBase.HTMLAttributes;
figure: JSXBase.HTMLAttributes;
footer: JSXBase.HTMLAttributes;
form: JSXBase.FormHTMLAttributes<HTMLFormElement>;
h1: JSXBase.HTMLAttributes<HTMLHeadingElement>;
h2: JSXBase.HTMLAttributes<HTMLHeadingElement>;
h3: JSXBase.HTMLAttributes<HTMLHeadingElement>;
h4: JSXBase.HTMLAttributes<HTMLHeadingElement>;
h5: JSXBase.HTMLAttributes<HTMLHeadingElement>;
h6: JSXBase.HTMLAttributes<HTMLHeadingElement>;
head: JSXBase.HTMLAttributes<HTMLHeadElement>;
header: JSXBase.HTMLAttributes;
hgroup: JSXBase.HTMLAttributes;
hr: JSXBase.HTMLAttributes<HTMLHRElement>;
html: JSXBase.HTMLAttributes<HTMLHtmlElement>;
i: JSXBase.HTMLAttributes;
iframe: JSXBase.IframeHTMLAttributes<HTMLIFrameElement>;
img: JSXBase.ImgHTMLAttributes<HTMLImageElement>;
input: JSXBase.InputHTMLAttributes<HTMLInputElement>;
ins: JSXBase.InsHTMLAttributes<HTMLModElement>;
kbd: JSXBase.HTMLAttributes;
keygen: JSXBase.KeygenHTMLAttributes<HTMLElement>;
label: JSXBase.LabelHTMLAttributes<HTMLLabelElement>;
legend: JSXBase.HTMLAttributes<HTMLLegendElement>;
li: JSXBase.LiHTMLAttributes<HTMLLIElement>;
link: JSXBase.LinkHTMLAttributes<HTMLLinkElement>;
main: JSXBase.HTMLAttributes;
map: JSXBase.MapHTMLAttributes<HTMLMapElement>;
mark: JSXBase.HTMLAttributes;
menu: JSXBase.MenuHTMLAttributes<HTMLMenuElement>;
menuitem: JSXBase.HTMLAttributes;
meta: JSXBase.MetaHTMLAttributes<HTMLMetaElement>;
meter: JSXBase.MeterHTMLAttributes<HTMLMeterElement>;
nav: JSXBase.HTMLAttributes;
noscript: JSXBase.HTMLAttributes;
object: JSXBase.ObjectHTMLAttributes<HTMLObjectElement>;
ol: JSXBase.OlHTMLAttributes<HTMLOListElement>;
optgroup: JSXBase.OptgroupHTMLAttributes<HTMLOptGroupElement>;
option: JSXBase.OptionHTMLAttributes<HTMLOptionElement>;
output: JSXBase.OutputHTMLAttributes<HTMLOutputElement>;
p: JSXBase.HTMLAttributes<HTMLParagraphElement>;
param: JSXBase.ParamHTMLAttributes<HTMLParamElement>;
picture: JSXBase.HTMLAttributes<HTMLPictureElement>;
pre: JSXBase.HTMLAttributes<HTMLPreElement>;
progress: JSXBase.ProgressHTMLAttributes<HTMLProgressElement>;
q: JSXBase.QuoteHTMLAttributes<HTMLQuoteElement>;
rp: JSXBase.HTMLAttributes;
rt: JSXBase.HTMLAttributes;
ruby: JSXBase.HTMLAttributes;
s: JSXBase.HTMLAttributes;
samp: JSXBase.HTMLAttributes;
script: JSXBase.ScriptHTMLAttributes<HTMLScriptElement>;
section: JSXBase.HTMLAttributes;
select: JSXBase.SelectHTMLAttributes<HTMLSelectElement>;
small: JSXBase.HTMLAttributes;
source: JSXBase.SourceHTMLAttributes<HTMLSourceElement>;
span: JSXBase.HTMLAttributes<HTMLSpanElement>;
strong: JSXBase.HTMLAttributes;
style: JSXBase.StyleHTMLAttributes<HTMLStyleElement>;
sub: JSXBase.HTMLAttributes;
summary: JSXBase.HTMLAttributes;
sup: JSXBase.HTMLAttributes;
table: JSXBase.TableHTMLAttributes<HTMLTableElement>;
tbody: JSXBase.HTMLAttributes<HTMLTableSectionElement>;
td: JSXBase.TdHTMLAttributes<HTMLTableDataCellElement>;
textarea: JSXBase.TextareaHTMLAttributes<HTMLTextAreaElement>;
tfoot: JSXBase.HTMLAttributes<HTMLTableSectionElement>;
th: JSXBase.ThHTMLAttributes<HTMLTableHeaderCellElement>;
thead: JSXBase.HTMLAttributes<HTMLTableSectionElement>;
time: JSXBase.TimeHTMLAttributes<HTMLTimeElement>;
title: JSXBase.HTMLAttributes<HTMLTitleElement>;
tr: JSXBase.HTMLAttributes<HTMLTableRowElement>;
track: JSXBase.TrackHTMLAttributes<HTMLTrackElement>;
u: JSXBase.HTMLAttributes;
ul: JSXBase.HTMLAttributes<HTMLUListElement>;
var: JSXBase.HTMLAttributes;
video: JSXBase.VideoHTMLAttributes<HTMLVideoElement>;
wbr: JSXBase.HTMLAttributes;
// SVG
animate: JSXBase.SVGAttributes;
circle: JSXBase.SVGAttributes;
clipPath: JSXBase.SVGAttributes;
defs: JSXBase.SVGAttributes;
desc: JSXBase.SVGAttributes;
ellipse: JSXBase.SVGAttributes;
feBlend: JSXBase.SVGAttributes;
feColorMatrix: JSXBase.SVGAttributes;
feComponentTransfer: JSXBase.SVGAttributes;
feComposite: JSXBase.SVGAttributes;
feConvolveMatrix: JSXBase.SVGAttributes;
feDiffuseLighting: JSXBase.SVGAttributes;
feDisplacementMap: JSXBase.SVGAttributes;
feDistantLight: JSXBase.SVGAttributes;
feDropShadow: JSXBase.SVGAttributes;
feFlood: JSXBase.SVGAttributes;
feFuncA: JSXBase.SVGAttributes;
feFuncB: JSXBase.SVGAttributes;
feFuncG: JSXBase.SVGAttributes;
feFuncR: JSXBase.SVGAttributes;
feGaussianBlur: JSXBase.SVGAttributes;
feImage: JSXBase.SVGAttributes;
feMerge: JSXBase.SVGAttributes;
feMergeNode: JSXBase.SVGAttributes;
feMorphology: JSXBase.SVGAttributes;
feOffset: JSXBase.SVGAttributes;
fePointLight: JSXBase.SVGAttributes;
feSpecularLighting: JSXBase.SVGAttributes;
feSpotLight: JSXBase.SVGAttributes;
feTile: JSXBase.SVGAttributes;
feTurbulence: JSXBase.SVGAttributes;
filter: JSXBase.SVGAttributes;
foreignObject: JSXBase.SVGAttributes;
g: JSXBase.SVGAttributes;
image: JSXBase.SVGAttributes;
line: JSXBase.SVGAttributes;
linearGradient: JSXBase.SVGAttributes;
marker: JSXBase.SVGAttributes;
mask: JSXBase.SVGAttributes;
metadata: JSXBase.SVGAttributes;
path: JSXBase.SVGAttributes;
pattern: JSXBase.SVGAttributes;
polygon: JSXBase.SVGAttributes;
polyline: JSXBase.SVGAttributes;
radialGradient: JSXBase.SVGAttributes;
rect: JSXBase.SVGAttributes;
stop: JSXBase.SVGAttributes;
svg: JSXBase.SVGAttributes;
switch: JSXBase.SVGAttributes;
symbol: JSXBase.SVGAttributes;
text: JSXBase.SVGAttributes;
textPath: JSXBase.SVGAttributes;
tspan: JSXBase.SVGAttributes;
use: JSXBase.SVGAttributes;
view: JSXBase.SVGAttributes;
}
export interface SlotAttributes extends JSXAttributes {
name?: string;
slot?: string;
onSlotchange?: (event: Event) => void;
}
export interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
download?: any;
href?: string;
hrefLang?: string;
hreflang?: string;
media?: string;
ping?: string;
rel?: string;
target?: string;
referrerPolicy?: ReferrerPolicy;
}
export interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {}
export interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
alt?: string;
coords?: string;
download?: any;
href?: string;
hrefLang?: string;
hreflang?: string;
media?: string;
rel?: string;
shape?: string;
target?: string;
}
export interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
href?: string;
target?: string;
}
export interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
cite?: string;
}
export interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
disabled?: boolean;
form?: string;
formAction?: string;
formaction?: string;
formEncType?: string;
formenctype?: string;
formMethod?: string;
formmethod?: string;
formNoValidate?: boolean;
formnovalidate?: boolean;
formTarget?: string;
formtarget?: string;
name?: string;
type?: string;
value?: string | string[] | number;
// popover
popoverTargetAction?: string;
popoverTargetElement?: Element | null;
popoverTarget?: string;
}
export interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
height?: number | string;
width?: number | string;
}
export interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
span?: number;
}
export interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
span?: number;
}
export interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
open?: boolean;
name?: string;
onToggle?: (event: Event) => void;
}
export interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
cite?: string;
dateTime?: string;
datetime?: string;
}
export interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
onCancel?: (event: Event) => void;
onClose?: (event: Event) => void;
open?: boolean;
returnValue?: string;
}
export interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
height?: number | string;
src?: string;
type?: string;
width?: number | string;
}
export interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
disabled?: boolean;
form?: string;
name?: string;
}
export interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
acceptCharset?: string;
acceptcharset?: string;
action?: string;
autoComplete?: string;
autocomplete?: string;
encType?: string;
enctype?: string;
method?: string;
name?: string;
noValidate?: boolean;
novalidate?: boolean | string;
target?: string;
}
export interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
manifest?: string;
}
export interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
allow?: string;
allowFullScreen?: boolean;
allowfullScreen?: string | boolean;
allowTransparency?: boolean;
allowtransparency?: string | boolean;
frameBorder?: number | string;
frameborder?: number | string;
importance?: 'low' | 'auto' | 'high';
height?: number | string;
loading?: 'lazy' | 'auto' | 'eager';
marginHeight?: number;
marginheight?: string | number;
marginWidth?: number;
marginwidth?: string | number;
name?: string;
referrerPolicy?: ReferrerPolicy;
sandbox?: string;
scrolling?: string;
seamless?: boolean;
src?: string;
srcDoc?: string;
srcdoc?: string;
width?: number | string;
}
export interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
alt?: string;