@stencil/core 5.0.0-next.0 → 5.0.0-rc.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +94 -0
- package/bin/stencil.mjs +1 -1
- package/dist/app-data/index.d.ts +2 -0
- package/dist/{runtime/app-data → app-data}/index.js +23 -15
- package/dist/{runtime/app-globals → app-globals}/index.js +1 -2
- package/dist/client-BMtGBEQV.mjs +2498 -0
- package/dist/compiler/browser.d.ts +1573 -0
- package/dist/compiler/browser.js +16998 -0
- package/dist/compiler/index.d.mts +284 -7
- package/dist/compiler/index.mjs +3 -9
- package/dist/compiler/utils/index.d.mts +272 -3
- package/dist/compiler/utils/index.mjs +4 -5
- package/dist/{transpile-CJQcQEVa.mjs → compiler-C_Y38j4m.mjs} +20984 -15554
- package/dist/declarations/stencil-ext-modules.d.ts +8 -8
- package/dist/declarations/stencil-public-compiler.d.ts +1016 -840
- package/dist/declarations/stencil-public-compiler.js +3 -5
- package/dist/declarations/stencil-public-docs.d.ts +441 -376
- package/dist/declarations/stencil-public-docs.js +0 -0
- package/dist/declarations/stencil-public-runtime.d.ts +361 -113
- package/dist/fragment-Di1hWOC8.mjs +4 -0
- package/dist/helpers-pTCZhNi0.mjs +529 -0
- package/dist/{index-szczUd2l.d.mts → index-CFiy6MZ3.d.mts} +1471 -2044
- package/dist/index-CViiWNQ9.d.mts +104 -0
- package/dist/{stencil-private-Cgcr414u.d.ts → index-XQHZl0MW.d.ts} +308 -114
- package/dist/index.d.mts +14 -2
- package/dist/index.mjs +171 -4
- package/dist/jsx-runtime.d.mts +24 -0
- package/dist/jsx-runtime.mjs +3 -0
- package/dist/mock-doc.mjs +2 -3
- package/dist/{node-sys-BGURUNOZ.mjs → node-Bkq8vRnu.mjs} +176 -197
- package/dist/rolldown-runtime-BhDjJH2R.mjs +15 -0
- package/dist/{client-DR9zhmKG.mjs → runtime/client/lazy.js} +3794 -2659
- package/dist/runtime/client/{index.d.ts → runtime.d.ts} +516 -227
- package/dist/runtime/client/{index.js → runtime.js} +3596 -2857
- package/dist/runtime/index.d.ts +90 -72
- package/dist/runtime/index.js +3528 -2897
- package/dist/runtime/server/index.d.mts +243 -219
- package/dist/runtime/server/index.mjs +3770 -3352
- package/dist/runtime/server/runner.d.mts +114 -47
- package/dist/runtime/server/runner.mjs +12710 -763
- package/dist/signals/index.d.ts +58 -0
- package/dist/signals/index.js +182 -0
- package/dist/sys/node/index.d.mts +1 -3
- package/dist/sys/node/index.mjs +2 -7
- package/dist/sys/node/worker.d.mts +1 -1
- package/dist/sys/node/worker.mjs +3 -12
- package/dist/testing/index.d.mts +4763 -12
- package/dist/testing/index.mjs +7945 -618
- package/dist/util-CP6-333M.mjs +731 -0
- package/dist/validation-C1mr0klL.mjs +825 -0
- package/package.json +91 -59
- package/dist/chunk-ClPoSABd.mjs +0 -21
- package/dist/index-Bxo2jCf6.d.mts +0 -77
- package/dist/runtime/app-data/index.d.ts +0 -30
- package/dist/serialize-BJvhE9aQ.mjs +0 -775
- package/dist/validation-BdcPruW_.mjs +0 -1451
- /package/{LICENSE.md → LICENSE} +0 -0
- /package/dist/{runtime/app-globals → app-globals}/index.d.ts +0 -0
|
@@ -6,16 +6,6 @@ interface ComponentDecorator {
|
|
|
6
6
|
(opts?: ComponentOptions): ClassDecorator;
|
|
7
7
|
}
|
|
8
8
|
interface ComponentOptions {
|
|
9
|
-
/**
|
|
10
|
-
* When set to `true` this component will be form-associated. See
|
|
11
|
-
* https://stenciljs.com/docs/next/form-associated documentation on how to
|
|
12
|
-
* build form-associated Stencil components that integrate into forms like
|
|
13
|
-
* native browser elements such as `<input>` and `<textarea>`.
|
|
14
|
-
*
|
|
15
|
-
* The {@link AttachInternals} decorator allows for access to the
|
|
16
|
-
* `ElementInternals` object to modify the associated form.
|
|
17
|
-
*/
|
|
18
|
-
formAssociated?: boolean;
|
|
19
9
|
/**
|
|
20
10
|
* Tag name of the web component. Ideally, the tag name must be globally unique,
|
|
21
11
|
* so it's recommended to choose an unique prefix for all your components within the same collection.
|
|
@@ -24,16 +14,25 @@ interface ComponentOptions {
|
|
|
24
14
|
*/
|
|
25
15
|
tag: string;
|
|
26
16
|
/**
|
|
27
|
-
*
|
|
28
|
-
*
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
*
|
|
33
|
-
*
|
|
34
|
-
*
|
|
17
|
+
* Encapsulation strategy for the component. Determines how styles and DOM are isolated.
|
|
18
|
+
*
|
|
19
|
+
* @example
|
|
20
|
+
* ```tsx
|
|
21
|
+
* // Shadow DOM (recommended for isolation)
|
|
22
|
+
* encapsulation: { type: 'shadow' }
|
|
23
|
+
* encapsulation: { type: 'shadow', mode: 'closed', delegatesFocus: true }
|
|
24
|
+
*
|
|
25
|
+
* // Scoped styles (class-based isolation without Shadow DOM)
|
|
26
|
+
* encapsulation: { type: 'scoped' }
|
|
27
|
+
*
|
|
28
|
+
* // No encapsulation (light DOM)
|
|
29
|
+
* encapsulation: { type: 'none' }
|
|
30
|
+
* encapsulation: { type: 'none', patches: ['all'] } // with slot patches
|
|
31
|
+
* ```
|
|
32
|
+
*
|
|
33
|
+
* If not specified, defaults to `{ type: 'none' }` (no encapsulation).
|
|
35
34
|
*/
|
|
36
|
-
|
|
35
|
+
encapsulation?: EncapsulationOptions;
|
|
37
36
|
/**
|
|
38
37
|
* Relative URL to some external stylesheet file. It should be a `.css` file unless some
|
|
39
38
|
* external plugin is installed like `@stencil/sass`.
|
|
@@ -56,7 +55,111 @@ interface ComponentOptions {
|
|
|
56
55
|
* Array of relative links to folders of assets required by the component.
|
|
57
56
|
*/
|
|
58
57
|
assetsDirs?: string[];
|
|
58
|
+
/**
|
|
59
|
+
* Relative URL to an external stylesheet providing document-level styles for this component.
|
|
60
|
+
* Unlike `styleUrl`, these styles are not scoped to shadow/scoped DOM - they are collected
|
|
61
|
+
* at build time and injected wherever `@import "stencil-component-globals"` appears in a global stylesheet.
|
|
62
|
+
*
|
|
63
|
+
* Useful for
|
|
64
|
+
* - pre-first-js-render styles (combatting cumulative layout shift)
|
|
65
|
+
* - host element and slotted content style
|
|
66
|
+
* - 'css-only' CEs - those that don't use a JS runtime at all
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```tsx
|
|
70
|
+
* @Component({ tag: 'my-button', globalStyleUrl: './my-button.global.css' })
|
|
71
|
+
* ```
|
|
72
|
+
*/
|
|
73
|
+
globalStyleUrl?: string;
|
|
74
|
+
/**
|
|
75
|
+
* Inline CSS string providing document-level styles for this component.
|
|
76
|
+
* Collected at build time and injected wherever `@import "stencil-component-globals"` appears.
|
|
77
|
+
* @see globalStyleUrl
|
|
78
|
+
*/
|
|
79
|
+
globalStyle?: string;
|
|
80
|
+
}
|
|
81
|
+
/**
|
|
82
|
+
* Shadow DOM encapsulation options for the `encapsulation` property.
|
|
83
|
+
* Uses native Shadow DOM for style and DOM isolation.
|
|
84
|
+
*/
|
|
85
|
+
interface ShadowEncapsulation {
|
|
86
|
+
type: 'shadow';
|
|
87
|
+
/**
|
|
88
|
+
* The mode of the shadow root. Defaults to `'open'`.
|
|
89
|
+
* - `'open'`: The shadow root is accessible via `element.shadowRoot`
|
|
90
|
+
* - `'closed'`: The shadow root is not accessible via `element.shadowRoot`
|
|
91
|
+
*/
|
|
92
|
+
mode?: 'open' | 'closed';
|
|
93
|
+
/**
|
|
94
|
+
* When set to `true`, specifies behavior that mitigates custom element issues
|
|
95
|
+
* around focusability. When a non-focusable part of the shadow DOM is clicked, the first
|
|
96
|
+
* focusable part is given focus, and the shadow host is given any available `:focus` styling.
|
|
97
|
+
*/
|
|
98
|
+
delegatesFocus?: boolean;
|
|
99
|
+
/**
|
|
100
|
+
* Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
|
|
101
|
+
* slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
|
|
102
|
+
* declarative slotting behavior.
|
|
103
|
+
*/
|
|
104
|
+
slotAssignment?: 'manual' | 'named';
|
|
105
|
+
/**
|
|
106
|
+
* When set to `true`, the shadow root is preserved when the host element is deep-cloned via
|
|
107
|
+
* `Node.cloneNode(true)`. Without this, cloning a shadow host produces an empty shell.
|
|
108
|
+
*/
|
|
109
|
+
clonable?: boolean;
|
|
110
|
+
/**
|
|
111
|
+
* When set to `true`, marks the shadow root as serializable so it is included when the host
|
|
112
|
+
* element is serialized via `Element.getHTML({ serializableShadowRoots: true })`.
|
|
113
|
+
*/
|
|
114
|
+
serializable?: boolean;
|
|
115
|
+
/**
|
|
116
|
+
* The `id` of an element inside the shadow root that IDREF attributes pointing at the host
|
|
117
|
+
* (e.g. `<label for>`, `aria-labelledby`, `aria-describedby`) should resolve to instead.
|
|
118
|
+
* Lets a label or ARIA relationship outside the component target an internal element.
|
|
119
|
+
*
|
|
120
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/ShadowRoot/referenceTarget
|
|
121
|
+
*/
|
|
122
|
+
referenceTarget?: string;
|
|
59
123
|
}
|
|
124
|
+
/**
|
|
125
|
+
* Patch types for non-shadow DOM components that use slots.
|
|
126
|
+
* - `'all'`: Apply all slot-related patches (equivalent to `lightDomPatches: true`)
|
|
127
|
+
* - `'children'`: Patch child node accessors (children, firstChild, lastChild, etc.)
|
|
128
|
+
* - `'clone'`: Patch `cloneNode()` to handle slotted content
|
|
129
|
+
* - `'insert'`: Patch `appendChild()`, `insertBefore()`, etc. for slot relocation
|
|
130
|
+
*/
|
|
131
|
+
type SlotPatch = 'all' | 'children' | 'clone' | 'insert';
|
|
132
|
+
/**
|
|
133
|
+
* No encapsulation - component renders to light DOM with optional slot patches.
|
|
134
|
+
*/
|
|
135
|
+
interface NoneEncapsulation {
|
|
136
|
+
type: 'none';
|
|
137
|
+
/**
|
|
138
|
+
* Patches to apply for slot handling in light DOM.
|
|
139
|
+
* Only relevant if the component uses `<slot>` elements.
|
|
140
|
+
*/
|
|
141
|
+
patches?: SlotPatch[];
|
|
142
|
+
}
|
|
143
|
+
/**
|
|
144
|
+
* Scoped CSS encapsulation - styles are scoped via class names without Shadow DOM.
|
|
145
|
+
*/
|
|
146
|
+
interface ScopedEncapsulation {
|
|
147
|
+
type: 'scoped';
|
|
148
|
+
/**
|
|
149
|
+
* Patches to apply for slot handling with scoped styles.
|
|
150
|
+
* Only relevant if the component uses `<slot>` elements.
|
|
151
|
+
*/
|
|
152
|
+
patches?: SlotPatch[];
|
|
153
|
+
}
|
|
154
|
+
/**
|
|
155
|
+
* Encapsulation options for the `@Component()` decorator.
|
|
156
|
+
* Determines how styles and DOM are isolated for the component.
|
|
157
|
+
*/
|
|
158
|
+
type EncapsulationOptions = ShadowEncapsulation | NoneEncapsulation | ScopedEncapsulation;
|
|
159
|
+
/**
|
|
160
|
+
* @deprecated Use `ShadowEncapsulation` with the `encapsulation` property instead.
|
|
161
|
+
* This interface is retained for internal use during the v4→v5 migration period.
|
|
162
|
+
*/
|
|
60
163
|
interface ShadowRootOptions {
|
|
61
164
|
/**
|
|
62
165
|
* When set to `true`, specifies behavior that mitigates custom element issues
|
|
@@ -96,6 +199,16 @@ interface PropOptions {
|
|
|
96
199
|
* In this case you can set the `reflect` option to `true`, since it defaults to `false`:
|
|
97
200
|
*/
|
|
98
201
|
reflect?: boolean;
|
|
202
|
+
/**
|
|
203
|
+
* Carry the prop's value from a server render to the browser in its attribute, as JSON:
|
|
204
|
+
* shorthand for a `@PropSerialize()` that writes `JSON.stringify(value)` on the server and an
|
|
205
|
+
* `@AttrDeserialize()` that reads it back with `JSON.parse()`. Attribute values that aren't
|
|
206
|
+
* valid JSON leave the prop as it is (with a warning in dev builds).
|
|
207
|
+
*
|
|
208
|
+
* For other formats (a `Map`, a `Date`...), write the `@PropSerialize()` /
|
|
209
|
+
* `@AttrDeserialize()` pair yourself.
|
|
210
|
+
*/
|
|
211
|
+
serialize?: 'json';
|
|
99
212
|
}
|
|
100
213
|
interface MethodDecorator {
|
|
101
214
|
(opts?: MethodOptions): CustomMethodDecorator<any>;
|
|
@@ -126,6 +239,17 @@ interface EventOptions {
|
|
|
126
239
|
composed?: boolean;
|
|
127
240
|
}
|
|
128
241
|
interface AttachInternalsOptions {
|
|
242
|
+
/**
|
|
243
|
+
* Whether this component should be form-associated. When `true` (the default),
|
|
244
|
+
* the component can participate in forms like native elements such as `<input>`.
|
|
245
|
+
*
|
|
246
|
+
* Set to `false` if you only need ElementInternals for custom states or ARIA
|
|
247
|
+
* without form participation.
|
|
248
|
+
*
|
|
249
|
+
* @default true
|
|
250
|
+
* @see https://stenciljs.com/docs/form-associated
|
|
251
|
+
*/
|
|
252
|
+
formAssociated?: boolean;
|
|
129
253
|
/**
|
|
130
254
|
* Initial custom states to set on the ElementInternals.states CustomStateSet.
|
|
131
255
|
* Each key is the state name and the value is the initial boolean state.
|
|
@@ -227,9 +351,23 @@ declare const Element: ElementDecorator;
|
|
|
227
351
|
*/
|
|
228
352
|
declare const Event: EventDecorator;
|
|
229
353
|
/**
|
|
230
|
-
*
|
|
231
|
-
*
|
|
232
|
-
*
|
|
354
|
+
* Decorator to attach an `ElementInternals` instance to a component.
|
|
355
|
+
* By default, this makes the component form-associated, allowing it to
|
|
356
|
+
* participate in forms like native elements (`<input>`, `<textarea>`).
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
* ```tsx
|
|
360
|
+
* // Form-associated component (default)
|
|
361
|
+
* @AttachInternals()
|
|
362
|
+
* internals: ElementInternals;
|
|
363
|
+
*
|
|
364
|
+
* // Opt-out of form association (for custom states/ARIA only)
|
|
365
|
+
* @AttachInternals({ formAssociated: false })
|
|
366
|
+
* internals: ElementInternals;
|
|
367
|
+
* ```
|
|
368
|
+
*
|
|
369
|
+
* @see https://stenciljs.com/docs/form-associated
|
|
370
|
+
* @see https://developer.mozilla.org/en-US/docs/Web/API/ElementInternals
|
|
233
371
|
*/
|
|
234
372
|
declare const AttachInternals: AttachInternalsDecorator;
|
|
235
373
|
/**
|
|
@@ -243,6 +381,7 @@ declare const Listen: ListenDecorator;
|
|
|
243
381
|
* and object properties to their string literal values. This allows variables to be
|
|
244
382
|
* used in `@Listen` and `@Event` decorators instead of hardcoded strings.
|
|
245
383
|
*
|
|
384
|
+
*
|
|
246
385
|
* @example
|
|
247
386
|
* ```ts
|
|
248
387
|
* const MY_EVENT = 'myEvent';
|
|
@@ -342,7 +481,7 @@ declare function getAssetPath(path: string): string;
|
|
|
342
481
|
* @param vnode - The virtual DOM tree to render
|
|
343
482
|
* @param container - The container element to render the virtual DOM tree to
|
|
344
483
|
*/
|
|
345
|
-
declare function render(vnode: VNode, container: Element): void;
|
|
484
|
+
declare function render(vnode: VNode, container: globalThis.Element): void;
|
|
346
485
|
/**
|
|
347
486
|
* Used to manually set the base path where assets can be found. For lazy-loaded
|
|
348
487
|
* builds the asset path is automatically set and assets copied to the correct
|
|
@@ -362,7 +501,7 @@ declare function setAssetPath(path: string): string;
|
|
|
362
501
|
/**
|
|
363
502
|
* Used to specify a nonce value that corresponds with an application's
|
|
364
503
|
* [Content Security Policy (CSP)](https://developer.mozilla.org/en-US/docs/Web/HTTP/CSP).
|
|
365
|
-
* When set, the nonce will be added to all dynamically created
|
|
504
|
+
* When set, the nonce will be added to all dynamically created style tags at runtime.
|
|
366
505
|
* Alternatively, the nonce value can be set on a `meta` tag in the DOM head
|
|
367
506
|
* (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
|
|
368
507
|
* @param nonce The value to be used for the nonce attribute.
|
|
@@ -373,7 +512,19 @@ declare function setNonce(nonce: string): void;
|
|
|
373
512
|
* @param ref the ref to get the Stencil element for
|
|
374
513
|
* @returns a reference to the element
|
|
375
514
|
*/
|
|
376
|
-
declare function getElement(ref: any):
|
|
515
|
+
declare function getElement<T extends HTMLElement = HTMLStencilElement>(ref: any): T;
|
|
516
|
+
/**
|
|
517
|
+
* Get the shadow root for a Stencil component's host element.
|
|
518
|
+
* This works for both open and closed shadow DOM modes.
|
|
519
|
+
*
|
|
520
|
+
* For closed shadow DOM, `element.shadowRoot` returns `null` by design,
|
|
521
|
+
* but Stencil stores the reference internally so components can still
|
|
522
|
+
* access their own shadow root.
|
|
523
|
+
*
|
|
524
|
+
* @param element The host element (from @Element() decorator)
|
|
525
|
+
* @returns The shadow root, or null if no shadow root exists
|
|
526
|
+
*/
|
|
527
|
+
declare function getShadowRoot(element: HTMLElement): ShadowRoot | null;
|
|
377
528
|
/**
|
|
378
529
|
* Schedules a new render of the given instance or element even if no state changed.
|
|
379
530
|
*
|
|
@@ -435,14 +586,31 @@ declare function setTagTransformer(transformer: TagTransformer): void;
|
|
|
435
586
|
*/
|
|
436
587
|
declare function transformTag(tag: string): string;
|
|
437
588
|
/**
|
|
438
|
-
*
|
|
589
|
+
* Registers a root - a shadowRoot, or `document` - to receive every plain CSS import
|
|
590
|
+
* (e.g. a dependency's own `import './foo.css'`) applied as a side effect.
|
|
591
|
+
* Call once per component instance that needs it, e.g. in `connectedCallback`.
|
|
592
|
+
* Pair with {@link unregisterSideEffectStyleTarget} in `disconnectedCallback`.
|
|
593
|
+
*
|
|
594
|
+
* @param root the root to register
|
|
595
|
+
*/
|
|
596
|
+
declare function registerSideEffectStyleTarget(root: DocumentOrShadowRoot): void;
|
|
597
|
+
/**
|
|
598
|
+
* Removes a root registered via {@link registerSideEffectStyleTarget} - call in
|
|
599
|
+
* `disconnectedCallback`.
|
|
600
|
+
*
|
|
601
|
+
* @param root the root to unregister
|
|
602
|
+
*/
|
|
603
|
+
declare function unregisterSideEffectStyleTarget(root: DocumentOrShadowRoot): void;
|
|
604
|
+
type MixinFactory = (base: MixedInCtor) => MixedInCtor;
|
|
605
|
+
/**
|
|
606
|
+
* A constructor type that can be used as the base for mixin factories.
|
|
607
|
+
*
|
|
439
608
|
* ```ts
|
|
440
609
|
* import { MixedInCtor } from '@stencil/core';
|
|
441
610
|
*
|
|
442
611
|
* const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
|
|
443
612
|
* ```
|
|
444
613
|
*/
|
|
445
|
-
type MixinFactory = (base: MixedInCtor) => MixedInCtor;
|
|
446
614
|
type MixedInCtor<T = {}> = new (...args: any[]) => T;
|
|
447
615
|
/**
|
|
448
616
|
* Compose multiple mixin classes into a single constructor.
|
|
@@ -515,6 +683,17 @@ interface ComponentDidUpdate {
|
|
|
515
683
|
*/
|
|
516
684
|
componentDidUpdate(): void;
|
|
517
685
|
}
|
|
686
|
+
/**
|
|
687
|
+
* A map of `@Prop`/`@State` property names to their new and previous
|
|
688
|
+
* values, passed to `componentShouldUpdate` once per render cycle.
|
|
689
|
+
*
|
|
690
|
+
* Pass `this` as `T` to type `changes` against your component's own
|
|
691
|
+
* members, e.g. `componentShouldUpdate(changes: ComponentShouldUpdateChanges<this>)`.
|
|
692
|
+
*/
|
|
693
|
+
type ComponentShouldUpdateChanges<T = any> = { [K in Extract<keyof T, string>]?: {
|
|
694
|
+
newVal: T[K];
|
|
695
|
+
oldVal: T[K];
|
|
696
|
+
}; };
|
|
518
697
|
interface ComponentInterface {
|
|
519
698
|
connectedCallback?(): void;
|
|
520
699
|
disconnectedCallback?(): void;
|
|
@@ -540,14 +719,18 @@ interface ComponentInterface {
|
|
|
540
719
|
*/
|
|
541
720
|
componentDidLoad?(): void;
|
|
542
721
|
/**
|
|
543
|
-
*
|
|
722
|
+
* One or more `@Prop` or `@State` properties changed and a rerender is
|
|
723
|
+
* about to be requested. `changes` contains every property that changed
|
|
724
|
+
* since the last render, keyed by property name.
|
|
544
725
|
*
|
|
545
|
-
* Called
|
|
546
|
-
*
|
|
726
|
+
* Called once per render cycle, batching all properties that changed
|
|
727
|
+
* synchronously since the last render.
|
|
728
|
+
*
|
|
729
|
+
* Return `false` to prevent the pending render.
|
|
547
730
|
*
|
|
548
731
|
* componentShouldUpdate is not called on the first render.
|
|
549
732
|
*/
|
|
550
|
-
componentShouldUpdate?(
|
|
733
|
+
componentShouldUpdate?(changes: ComponentShouldUpdateChanges<this>): boolean | void;
|
|
551
734
|
/**
|
|
552
735
|
* The component is about to update and re-render.
|
|
553
736
|
*
|
|
@@ -570,6 +753,54 @@ interface ComponentInterface {
|
|
|
570
753
|
render?(): any;
|
|
571
754
|
[memberName: string]: any;
|
|
572
755
|
}
|
|
756
|
+
/**
|
|
757
|
+
* A reusable behavior that hooks into a `ReactiveControllerHost`'s lifecycle. Modeled after Lit's
|
|
758
|
+
* `ReactiveController` pattern: implement the hooks you need, then register an instance with a host
|
|
759
|
+
* via `host.addController(this)`.
|
|
760
|
+
*/
|
|
761
|
+
interface ReactiveController {
|
|
762
|
+
hostConnected?(): void;
|
|
763
|
+
hostDisconnected?(): void;
|
|
764
|
+
hostWillLoad?(): Promise<void> | void;
|
|
765
|
+
hostDidLoad?(): void;
|
|
766
|
+
hostWillRender?(): Promise<void> | void;
|
|
767
|
+
hostDidRender?(): void;
|
|
768
|
+
hostWillUpdate?(): Promise<void> | void;
|
|
769
|
+
hostDidUpdate?(): void;
|
|
770
|
+
}
|
|
771
|
+
/**
|
|
772
|
+
* The shape added to a component by mixing in `ReactiveControllerHost` (see below).
|
|
773
|
+
*/
|
|
774
|
+
interface ReactiveControllerHostInterface extends ComponentInterface, HTMLElement {
|
|
775
|
+
readonly controllers: ReadonlySet<ReactiveController>;
|
|
776
|
+
addController(controller: ReactiveController): void;
|
|
777
|
+
removeController(controller: ReactiveController): void;
|
|
778
|
+
requestUpdate(): void;
|
|
779
|
+
/**
|
|
780
|
+
* Resolves once the next pending render commits. Matches the shape of Lit's
|
|
781
|
+
* `ReactiveControllerHost.updateComplete`, for interop with controllers written against Lit's API
|
|
782
|
+
* (e.g. `@lit/context`).
|
|
783
|
+
*/
|
|
784
|
+
readonly updateComplete: Promise<boolean>;
|
|
785
|
+
}
|
|
786
|
+
/**
|
|
787
|
+
* A mixin factory (for use with `Mixin()`) that adds `ReactiveController` support to a component,
|
|
788
|
+
* forwarding each Stencil lifecycle method to every registered controller's matching `hostX` hook.
|
|
789
|
+
*
|
|
790
|
+
* ```ts
|
|
791
|
+
* import { Mixin, ReactiveControllerHost } from '@stencil/core';
|
|
792
|
+
* import { MouseController } from './mouse-controller';
|
|
793
|
+
*
|
|
794
|
+
* class MyComponent extends Mixin(ReactiveControllerHost) {
|
|
795
|
+
* private mouse = new MouseController(this);
|
|
796
|
+
* render() { return <Host>{this.mouse.pos.x}, {this.mouse.pos.y}</Host>; }
|
|
797
|
+
* }
|
|
798
|
+
* ```
|
|
799
|
+
*
|
|
800
|
+
* @param Base the class to extend.
|
|
801
|
+
* @returns a class extending `Base` with reactive-controller support.
|
|
802
|
+
*/
|
|
803
|
+
declare function ReactiveControllerHost<B extends MixedInCtor>(Base: B): MixedInCtor<InstanceType<B> & ReactiveControllerHostInterface>;
|
|
573
804
|
interface EventEmitter<T = any> {
|
|
574
805
|
emit: (data?: T) => CustomEvent<T>;
|
|
575
806
|
}
|
|
@@ -583,13 +814,21 @@ interface QueueApi {
|
|
|
583
814
|
clear?: () => void;
|
|
584
815
|
flush?: (cb?: () => void) => void;
|
|
585
816
|
}
|
|
817
|
+
/**
|
|
818
|
+
* Minimal interface matched by signal objects (from @stencil/core/signals).
|
|
819
|
+
* Used in JSX attribute types.
|
|
820
|
+
*/
|
|
821
|
+
interface SignalRef<T = any> {
|
|
822
|
+
readonly value: T;
|
|
823
|
+
peek(): T;
|
|
824
|
+
}
|
|
586
825
|
/**
|
|
587
826
|
* Host
|
|
588
827
|
*/
|
|
589
828
|
interface HostAttributes {
|
|
590
829
|
class?: string | {
|
|
591
830
|
[className: string]: boolean;
|
|
592
|
-
}
|
|
831
|
+
} | SignalRef<string>;
|
|
593
832
|
style?: {
|
|
594
833
|
[key: string]: string | undefined;
|
|
595
834
|
};
|
|
@@ -637,7 +876,7 @@ interface FunctionalUtilities {
|
|
|
637
876
|
map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
|
|
638
877
|
}
|
|
639
878
|
interface FunctionalComponent<T = {}> {
|
|
640
|
-
(props: T, children: VNode[], utils: FunctionalUtilities): VNode |
|
|
879
|
+
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | null;
|
|
641
880
|
}
|
|
642
881
|
/**
|
|
643
882
|
* A Child VDOM node
|
|
@@ -648,7 +887,7 @@ interface FunctionalComponent<T = {}> {
|
|
|
648
887
|
* {@link FunctionalUtilities}).
|
|
649
888
|
*/
|
|
650
889
|
interface ChildNode {
|
|
651
|
-
vtag?: string | number | Function;
|
|
890
|
+
vtag?: string | number | Function | symbol | null;
|
|
652
891
|
vkey?: string | number;
|
|
653
892
|
vtext?: string;
|
|
654
893
|
vchildren?: VNode[];
|
|
@@ -661,11 +900,11 @@ interface ChildNode {
|
|
|
661
900
|
*
|
|
662
901
|
* For further information: https://stenciljs.com/docs/host-element
|
|
663
902
|
*/
|
|
664
|
-
declare const Host:
|
|
903
|
+
declare const Host: (props: HostAttributes) => VNode;
|
|
665
904
|
/**
|
|
666
905
|
* Fragment
|
|
667
906
|
*/
|
|
668
|
-
declare const Fragment:
|
|
907
|
+
declare const Fragment: (props: {}) => VNode;
|
|
669
908
|
/**
|
|
670
909
|
* The "h" namespace is used to import JSX types for elements and attributes.
|
|
671
910
|
* It is imported in order to avoid conflicting global JSX issues.
|
|
@@ -681,6 +920,7 @@ declare namespace h {
|
|
|
681
920
|
function h(sel: any, data: VNodeData | null, children: VNode): VNode;
|
|
682
921
|
function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
|
|
683
922
|
namespace JSX {
|
|
923
|
+
type Element = VNode;
|
|
684
924
|
interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {
|
|
685
925
|
[tagName: string]: any;
|
|
686
926
|
}
|
|
@@ -712,30 +952,20 @@ declare function jsx(type: any, props: any, key?: string): VNode;
|
|
|
712
952
|
* @returns a jsx vnode
|
|
713
953
|
*/
|
|
714
954
|
declare function jsxs(type: any, props: any, key?: string): VNode;
|
|
715
|
-
/**
|
|
716
|
-
* Automatic JSX runtime functions for TypeScript's react-jsxdev mode.
|
|
717
|
-
* These functions are called automatically by TypeScript when using "jsx": "react-jsxdev".
|
|
718
|
-
* @param type type of node
|
|
719
|
-
* @param props properties of node
|
|
720
|
-
* @param key optional key for the node
|
|
721
|
-
* @param isStaticChildren indicates if the children are static
|
|
722
|
-
* @param source source information
|
|
723
|
-
* @param self reference to the component instance
|
|
724
|
-
* @returns a jsx vnode
|
|
725
|
-
*/
|
|
726
|
-
declare function jsxDEV(type: any, props: any, key?: string | number, isStaticChildren?: boolean, source?: any, self?: any): VNode;
|
|
727
955
|
/**
|
|
728
956
|
* A virtual DOM node
|
|
729
957
|
*/
|
|
730
958
|
interface VNode {
|
|
731
959
|
$flags$: number;
|
|
732
|
-
$tag$: string | number | Function;
|
|
960
|
+
$tag$: string | number | Function | symbol | null;
|
|
733
961
|
$elm$: any;
|
|
734
962
|
$text$: string;
|
|
735
963
|
$children$: VNode[];
|
|
736
964
|
$attrs$?: any;
|
|
737
965
|
$name$?: string;
|
|
738
966
|
$key$?: string | number;
|
|
967
|
+
/** Signal reference for vdom bypass: signal text nodes store the signal here. */
|
|
968
|
+
$signal$?: any;
|
|
739
969
|
}
|
|
740
970
|
interface VNodeData {
|
|
741
971
|
class?: {
|
|
@@ -749,7 +979,7 @@ declare namespace LocalJSX {
|
|
|
749
979
|
interface IntrinsicElements {}
|
|
750
980
|
}
|
|
751
981
|
declare namespace JSXBase {
|
|
752
|
-
interface IntrinsicElements {
|
|
982
|
+
export interface IntrinsicElements {
|
|
753
983
|
slot: JSXBase.SlotAttributes<HTMLSlotElement>;
|
|
754
984
|
a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
|
|
755
985
|
abbr: JSXBase.HTMLAttributes;
|
|
@@ -920,12 +1150,12 @@ declare namespace JSXBase {
|
|
|
920
1150
|
use: JSXBase.SVGAttributes;
|
|
921
1151
|
view: JSXBase.SVGAttributes;
|
|
922
1152
|
}
|
|
923
|
-
interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
|
|
1153
|
+
export interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
|
|
924
1154
|
name?: string;
|
|
925
1155
|
slot?: string;
|
|
926
1156
|
onSlotchange?: (event: Event) => void;
|
|
927
1157
|
}
|
|
928
|
-
interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1158
|
+
export interface AnchorHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
929
1159
|
download?: any;
|
|
930
1160
|
href?: string;
|
|
931
1161
|
hrefLang?: string;
|
|
@@ -936,8 +1166,8 @@ declare namespace JSXBase {
|
|
|
936
1166
|
target?: string;
|
|
937
1167
|
referrerPolicy?: ReferrerPolicy;
|
|
938
1168
|
}
|
|
939
|
-
interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {}
|
|
940
|
-
interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1169
|
+
export interface AudioHTMLAttributes<T> extends MediaHTMLAttributes<T> {}
|
|
1170
|
+
export interface AreaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
941
1171
|
alt?: string;
|
|
942
1172
|
coords?: string;
|
|
943
1173
|
download?: any;
|
|
@@ -949,14 +1179,14 @@ declare namespace JSXBase {
|
|
|
949
1179
|
shape?: string;
|
|
950
1180
|
target?: string;
|
|
951
1181
|
}
|
|
952
|
-
interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1182
|
+
export interface BaseHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
953
1183
|
href?: string;
|
|
954
1184
|
target?: string;
|
|
955
1185
|
}
|
|
956
|
-
interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1186
|
+
export interface BlockquoteHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
957
1187
|
cite?: string;
|
|
958
1188
|
}
|
|
959
|
-
interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1189
|
+
export interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
960
1190
|
disabled?: boolean;
|
|
961
1191
|
form?: string;
|
|
962
1192
|
formAction?: string;
|
|
@@ -973,50 +1203,51 @@ declare namespace JSXBase {
|
|
|
973
1203
|
type?: string;
|
|
974
1204
|
value?: string | string[] | number;
|
|
975
1205
|
popoverTargetAction?: string;
|
|
976
|
-
popoverTargetElement?: Element | null;
|
|
1206
|
+
popoverTargetElement?: globalThis.Element | null;
|
|
977
1207
|
popoverTarget?: string;
|
|
978
1208
|
command?: string;
|
|
979
1209
|
commandFor?: string;
|
|
980
1210
|
commandfor?: string;
|
|
981
1211
|
}
|
|
982
|
-
interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1212
|
+
export interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
983
1213
|
height?: number | string;
|
|
984
1214
|
width?: number | string;
|
|
985
1215
|
}
|
|
986
|
-
interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1216
|
+
export interface ColHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
987
1217
|
span?: number;
|
|
988
1218
|
}
|
|
989
|
-
interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1219
|
+
export interface ColgroupHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
990
1220
|
span?: number;
|
|
991
1221
|
}
|
|
992
|
-
interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1222
|
+
export interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
993
1223
|
open?: boolean;
|
|
994
1224
|
name?: string;
|
|
995
1225
|
onToggle?: (event: ToggleEvent) => void;
|
|
996
1226
|
}
|
|
997
|
-
interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1227
|
+
export interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
998
1228
|
cite?: string;
|
|
999
1229
|
dateTime?: string;
|
|
1000
1230
|
datetime?: string;
|
|
1001
1231
|
}
|
|
1002
|
-
interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1232
|
+
export interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1003
1233
|
onCancel?: (event: Event) => void;
|
|
1004
1234
|
onClose?: (event: Event) => void;
|
|
1005
1235
|
open?: boolean;
|
|
1006
1236
|
returnValue?: string;
|
|
1237
|
+
closedby?: 'any' | 'closerequest' | 'none';
|
|
1007
1238
|
}
|
|
1008
|
-
interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1239
|
+
export interface EmbedHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1009
1240
|
height?: number | string;
|
|
1010
1241
|
src?: string;
|
|
1011
1242
|
type?: string;
|
|
1012
1243
|
width?: number | string;
|
|
1013
1244
|
}
|
|
1014
|
-
interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1245
|
+
export interface FieldsetHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1015
1246
|
disabled?: boolean;
|
|
1016
1247
|
form?: string;
|
|
1017
1248
|
name?: string;
|
|
1018
1249
|
}
|
|
1019
|
-
interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1250
|
+
export interface FormHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1020
1251
|
acceptCharset?: string;
|
|
1021
1252
|
acceptcharset?: string;
|
|
1022
1253
|
action?: string;
|
|
@@ -1030,10 +1261,10 @@ declare namespace JSXBase {
|
|
|
1030
1261
|
novalidate?: boolean | string;
|
|
1031
1262
|
target?: string;
|
|
1032
1263
|
}
|
|
1033
|
-
interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1264
|
+
export interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1034
1265
|
manifest?: string;
|
|
1035
1266
|
}
|
|
1036
|
-
interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1267
|
+
export interface IframeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1037
1268
|
allow?: string;
|
|
1038
1269
|
allowFullScreen?: boolean;
|
|
1039
1270
|
allowfullScreen?: string | boolean;
|
|
@@ -1041,6 +1272,8 @@ declare namespace JSXBase {
|
|
|
1041
1272
|
allowtransparency?: string | boolean;
|
|
1042
1273
|
frameBorder?: number | string;
|
|
1043
1274
|
frameborder?: number | string;
|
|
1275
|
+
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1276
|
+
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1044
1277
|
importance?: 'low' | 'auto' | 'high';
|
|
1045
1278
|
height?: number | string;
|
|
1046
1279
|
loading?: 'lazy' | 'auto' | 'eager';
|
|
@@ -1058,14 +1291,17 @@ declare namespace JSXBase {
|
|
|
1058
1291
|
srcdoc?: string;
|
|
1059
1292
|
width?: number | string;
|
|
1060
1293
|
}
|
|
1061
|
-
interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1294
|
+
export interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1062
1295
|
alt?: string;
|
|
1063
1296
|
crossOrigin?: string;
|
|
1064
1297
|
crossorigin?: string;
|
|
1065
1298
|
decoding?: 'async' | 'auto' | 'sync';
|
|
1299
|
+
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1300
|
+
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1066
1301
|
importance?: 'low' | 'auto' | 'high';
|
|
1067
1302
|
height?: number | string;
|
|
1068
1303
|
loading?: 'lazy' | 'auto' | 'eager';
|
|
1304
|
+
referrerPolicy?: ReferrerPolicy;
|
|
1069
1305
|
sizes?: string;
|
|
1070
1306
|
src?: string;
|
|
1071
1307
|
srcSet?: string;
|
|
@@ -1074,12 +1310,12 @@ declare namespace JSXBase {
|
|
|
1074
1310
|
usemap?: string;
|
|
1075
1311
|
width?: number | string;
|
|
1076
1312
|
}
|
|
1077
|
-
interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1313
|
+
export interface InsHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1078
1314
|
cite?: string;
|
|
1079
1315
|
dateTime?: string;
|
|
1080
1316
|
datetime?: string;
|
|
1081
1317
|
}
|
|
1082
|
-
interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1318
|
+
export interface InputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1083
1319
|
accept?: string;
|
|
1084
1320
|
allowdirs?: boolean;
|
|
1085
1321
|
alt?: string;
|
|
@@ -1139,10 +1375,10 @@ declare namespace JSXBase {
|
|
|
1139
1375
|
webkitEntries?: any;
|
|
1140
1376
|
width?: number | string;
|
|
1141
1377
|
popoverTargetAction?: string;
|
|
1142
|
-
popoverTargetElement?: Element | null;
|
|
1378
|
+
popoverTargetElement?: globalThis.Element | null;
|
|
1143
1379
|
popoverTarget?: string;
|
|
1144
1380
|
}
|
|
1145
|
-
interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1381
|
+
export interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1146
1382
|
challenge?: string;
|
|
1147
1383
|
disabled?: boolean;
|
|
1148
1384
|
form?: string;
|
|
@@ -1152,15 +1388,17 @@ declare namespace JSXBase {
|
|
|
1152
1388
|
keyparams?: string;
|
|
1153
1389
|
name?: string;
|
|
1154
1390
|
}
|
|
1155
|
-
interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1391
|
+
export interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1156
1392
|
form?: string;
|
|
1157
1393
|
htmlFor?: string;
|
|
1158
1394
|
}
|
|
1159
|
-
interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1395
|
+
export interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1160
1396
|
value?: string | string[] | number;
|
|
1161
1397
|
}
|
|
1162
|
-
interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1398
|
+
export interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1163
1399
|
as?: string;
|
|
1400
|
+
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1401
|
+
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1164
1402
|
href?: string;
|
|
1165
1403
|
hrefLang?: string;
|
|
1166
1404
|
hreflang?: string;
|
|
@@ -1171,13 +1409,13 @@ declare namespace JSXBase {
|
|
|
1171
1409
|
sizes?: string;
|
|
1172
1410
|
type?: string;
|
|
1173
1411
|
}
|
|
1174
|
-
interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1412
|
+
export interface MapHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1175
1413
|
name?: string;
|
|
1176
1414
|
}
|
|
1177
|
-
interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1415
|
+
export interface MenuHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1178
1416
|
type?: string;
|
|
1179
1417
|
}
|
|
1180
|
-
interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1418
|
+
export interface MediaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1181
1419
|
autoPlay?: boolean;
|
|
1182
1420
|
autoplay?: boolean | string;
|
|
1183
1421
|
controls?: boolean;
|
|
@@ -1217,7 +1455,7 @@ declare namespace JSXBase {
|
|
|
1217
1455
|
onVolumeChange?: (event: Event) => void;
|
|
1218
1456
|
onWaiting?: (event: Event) => void;
|
|
1219
1457
|
}
|
|
1220
|
-
interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1458
|
+
export interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1221
1459
|
charSet?: string;
|
|
1222
1460
|
charset?: string;
|
|
1223
1461
|
content?: string;
|
|
@@ -1225,7 +1463,7 @@ declare namespace JSXBase {
|
|
|
1225
1463
|
httpequiv?: string;
|
|
1226
1464
|
name?: string;
|
|
1227
1465
|
}
|
|
1228
|
-
interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1466
|
+
export interface MeterHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1229
1467
|
form?: string;
|
|
1230
1468
|
high?: number;
|
|
1231
1469
|
low?: number;
|
|
@@ -1234,10 +1472,10 @@ declare namespace JSXBase {
|
|
|
1234
1472
|
optimum?: number;
|
|
1235
1473
|
value?: string | string[] | number;
|
|
1236
1474
|
}
|
|
1237
|
-
interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1475
|
+
export interface QuoteHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1238
1476
|
cite?: string;
|
|
1239
1477
|
}
|
|
1240
|
-
interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1478
|
+
export interface ObjectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1241
1479
|
classID?: string;
|
|
1242
1480
|
classid?: string;
|
|
1243
1481
|
data?: string;
|
|
@@ -1250,47 +1488,49 @@ declare namespace JSXBase {
|
|
|
1250
1488
|
width?: number | string;
|
|
1251
1489
|
wmode?: string;
|
|
1252
1490
|
}
|
|
1253
|
-
interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1491
|
+
export interface OlHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1254
1492
|
reversed?: boolean;
|
|
1255
1493
|
start?: number;
|
|
1256
1494
|
}
|
|
1257
|
-
interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1495
|
+
export interface OptgroupHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1258
1496
|
disabled?: boolean;
|
|
1259
1497
|
label?: string;
|
|
1260
1498
|
}
|
|
1261
|
-
interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1499
|
+
export interface OptionHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1262
1500
|
disabled?: boolean;
|
|
1263
1501
|
label?: string;
|
|
1264
1502
|
selected?: boolean;
|
|
1265
1503
|
value?: string | string[] | number;
|
|
1266
1504
|
}
|
|
1267
|
-
interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1505
|
+
export interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1268
1506
|
form?: string;
|
|
1269
1507
|
htmlFor?: string;
|
|
1270
1508
|
name?: string;
|
|
1271
1509
|
}
|
|
1272
|
-
interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1510
|
+
export interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1273
1511
|
name?: string;
|
|
1274
1512
|
value?: string | string[] | number;
|
|
1275
1513
|
}
|
|
1276
|
-
interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1514
|
+
export interface ProgressHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1277
1515
|
max?: number | string;
|
|
1278
1516
|
value?: string | string[] | number;
|
|
1279
1517
|
}
|
|
1280
|
-
interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1518
|
+
export interface ScriptHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1281
1519
|
async?: boolean;
|
|
1282
1520
|
charSet?: string;
|
|
1283
1521
|
charset?: string;
|
|
1284
1522
|
crossOrigin?: string;
|
|
1285
1523
|
crossorigin?: string;
|
|
1286
1524
|
defer?: boolean;
|
|
1525
|
+
fetchPriority?: 'high' | 'low' | 'auto';
|
|
1526
|
+
fetchpriority?: 'high' | 'low' | 'auto';
|
|
1287
1527
|
importance?: 'low' | 'auto' | 'high';
|
|
1288
1528
|
integrity?: string;
|
|
1289
1529
|
nonce?: string;
|
|
1290
1530
|
src?: string;
|
|
1291
1531
|
type?: string;
|
|
1292
1532
|
}
|
|
1293
|
-
interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1533
|
+
export interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1294
1534
|
disabled?: boolean;
|
|
1295
1535
|
form?: string;
|
|
1296
1536
|
multiple?: boolean;
|
|
@@ -1300,7 +1540,7 @@ declare namespace JSXBase {
|
|
|
1300
1540
|
autoComplete?: string;
|
|
1301
1541
|
autocomplete?: string;
|
|
1302
1542
|
}
|
|
1303
|
-
interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1543
|
+
export interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1304
1544
|
height?: number;
|
|
1305
1545
|
media?: string;
|
|
1306
1546
|
sizes?: string;
|
|
@@ -1309,20 +1549,20 @@ declare namespace JSXBase {
|
|
|
1309
1549
|
type?: string;
|
|
1310
1550
|
width?: number;
|
|
1311
1551
|
}
|
|
1312
|
-
interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1552
|
+
export interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1313
1553
|
media?: string;
|
|
1314
1554
|
nonce?: string;
|
|
1315
1555
|
scoped?: boolean;
|
|
1316
1556
|
type?: string;
|
|
1317
1557
|
}
|
|
1318
|
-
interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1558
|
+
export interface TableHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1319
1559
|
cellPadding?: number | string;
|
|
1320
1560
|
cellpadding?: number | string;
|
|
1321
1561
|
cellSpacing?: number | string;
|
|
1322
1562
|
cellspacing?: number | string;
|
|
1323
1563
|
summary?: string;
|
|
1324
1564
|
}
|
|
1325
|
-
interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1565
|
+
export interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1326
1566
|
autoComplete?: string;
|
|
1327
1567
|
autocomplete?: string;
|
|
1328
1568
|
cols?: number;
|
|
@@ -1343,12 +1583,12 @@ declare namespace JSXBase {
|
|
|
1343
1583
|
value?: string | string[] | number;
|
|
1344
1584
|
wrap?: string;
|
|
1345
1585
|
}
|
|
1346
|
-
interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1586
|
+
export interface TdHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1347
1587
|
colSpan?: number;
|
|
1348
1588
|
headers?: string;
|
|
1349
1589
|
rowSpan?: number;
|
|
1350
1590
|
}
|
|
1351
|
-
interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1591
|
+
export interface ThHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1352
1592
|
abbr?: string;
|
|
1353
1593
|
colSpan?: number;
|
|
1354
1594
|
headers?: string;
|
|
@@ -1356,10 +1596,10 @@ declare namespace JSXBase {
|
|
|
1356
1596
|
rowspan?: number | string;
|
|
1357
1597
|
scope?: string;
|
|
1358
1598
|
}
|
|
1359
|
-
interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1599
|
+
export interface TimeHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1360
1600
|
dateTime?: string;
|
|
1361
1601
|
}
|
|
1362
|
-
interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1602
|
+
export interface TrackHTMLAttributes<T> extends HTMLAttributes<T> {
|
|
1363
1603
|
default?: boolean;
|
|
1364
1604
|
kind?: string;
|
|
1365
1605
|
label?: string;
|
|
@@ -1367,28 +1607,28 @@ declare namespace JSXBase {
|
|
|
1367
1607
|
srcLang?: string;
|
|
1368
1608
|
srclang?: string;
|
|
1369
1609
|
}
|
|
1370
|
-
interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
|
|
1610
|
+
export interface VideoHTMLAttributes<T> extends MediaHTMLAttributes<T> {
|
|
1371
1611
|
height?: number | string;
|
|
1372
1612
|
playsInline?: boolean;
|
|
1373
1613
|
playsinline?: boolean | string;
|
|
1374
1614
|
poster?: string;
|
|
1375
1615
|
width?: number | string;
|
|
1376
1616
|
}
|
|
1377
|
-
interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
|
|
1617
|
+
export interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
|
|
1378
1618
|
innerHTML?: string;
|
|
1379
1619
|
accessKey?: string;
|
|
1380
1620
|
autoFocus?: boolean;
|
|
1381
1621
|
autofocus?: boolean | string;
|
|
1382
1622
|
class?: string | {
|
|
1383
1623
|
[className: string]: boolean;
|
|
1384
|
-
}
|
|
1624
|
+
} | SignalRef<string>;
|
|
1385
1625
|
contentEditable?: boolean | string;
|
|
1386
1626
|
contenteditable?: boolean | string;
|
|
1387
1627
|
contextMenu?: string;
|
|
1388
1628
|
contextmenu?: string;
|
|
1389
1629
|
dir?: string;
|
|
1390
1630
|
draggable?: boolean;
|
|
1391
|
-
hidden?: boolean;
|
|
1631
|
+
hidden?: boolean | 'until-found';
|
|
1392
1632
|
id?: string;
|
|
1393
1633
|
inert?: boolean;
|
|
1394
1634
|
lang?: string;
|
|
@@ -1399,7 +1639,10 @@ declare namespace JSXBase {
|
|
|
1399
1639
|
tabIndex?: number;
|
|
1400
1640
|
tabindex?: number | string;
|
|
1401
1641
|
title?: string;
|
|
1642
|
+
translate?: 'yes' | 'no' | (string & {});
|
|
1402
1643
|
popover?: string | null;
|
|
1644
|
+
focusgroup?: string;
|
|
1645
|
+
focusgroupstart?: boolean;
|
|
1403
1646
|
inputMode?: string;
|
|
1404
1647
|
inputmode?: string;
|
|
1405
1648
|
enterKeyHint?: string;
|
|
@@ -1437,10 +1680,10 @@ declare namespace JSXBase {
|
|
|
1437
1680
|
security?: string;
|
|
1438
1681
|
unselectable?: boolean;
|
|
1439
1682
|
}
|
|
1440
|
-
interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> {
|
|
1683
|
+
export interface SVGAttributes<T = SVGElement> extends DOMAttributes<T> {
|
|
1441
1684
|
class?: string | {
|
|
1442
1685
|
[className: string]: boolean;
|
|
1443
|
-
}
|
|
1686
|
+
} | SignalRef<string>;
|
|
1444
1687
|
color?: string;
|
|
1445
1688
|
height?: number | string;
|
|
1446
1689
|
id?: string;
|
|
@@ -1699,13 +1942,15 @@ declare namespace JSXBase {
|
|
|
1699
1942
|
zoomAndPan?: string;
|
|
1700
1943
|
}
|
|
1701
1944
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
|
|
1702
|
-
interface ToggleEvent extends Event {
|
|
1945
|
+
export interface ToggleEvent extends Event {
|
|
1703
1946
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
|
|
1704
1947
|
readonly newState: string;
|
|
1705
1948
|
/** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
|
|
1706
1949
|
readonly oldState: string;
|
|
1707
1950
|
}
|
|
1708
|
-
|
|
1951
|
+
type AriaIDLPropertyName = { [K in keyof ARIAMixin]: ARIAMixin[K] extends string | null ? K : never; }[keyof ARIAMixin];
|
|
1952
|
+
type JSXAriaProperties = { [K in AriaIDLPropertyName]?: string | boolean | undefined; };
|
|
1953
|
+
export interface DOMAttributes<T> extends JSXAttributes<T>, JSXAriaProperties {
|
|
1709
1954
|
slot?: string;
|
|
1710
1955
|
part?: string;
|
|
1711
1956
|
exportparts?: string;
|
|
@@ -1835,18 +2080,21 @@ declare namespace JSXBase {
|
|
|
1835
2080
|
onTransitionStart?: (event: TransitionEvent) => void;
|
|
1836
2081
|
onTransitionStartCapture?: (event: TransitionEvent) => void;
|
|
1837
2082
|
[key: `aria-${string}`]: string | boolean | undefined;
|
|
1838
|
-
[key: `aria${string}`]: string | boolean | undefined;
|
|
1839
2083
|
}
|
|
2084
|
+
export {};
|
|
1840
2085
|
}
|
|
1841
|
-
interface JSXAttributes<T = Element> {
|
|
2086
|
+
interface JSXAttributes<T = globalThis.Element> {
|
|
1842
2087
|
key?: string | number;
|
|
1843
2088
|
ref?: (elm?: T) => void;
|
|
2089
|
+
children?: any;
|
|
2090
|
+
[key: `attr:${string}`]: any;
|
|
2091
|
+
[key: `prop:${string}`]: any;
|
|
1844
2092
|
}
|
|
1845
2093
|
interface CustomElementsDefineOptions {
|
|
1846
2094
|
exclude?: string[];
|
|
1847
2095
|
syncQueue?: boolean;
|
|
1848
|
-
/**
|
|
1849
|
-
|
|
2096
|
+
/** Scoped custom element registry to define components in. Defaults to the global registry. */
|
|
2097
|
+
registry?: CustomElementRegistry;
|
|
1850
2098
|
jmp?: (c: Function) => any;
|
|
1851
2099
|
raf?: (c: FrameRequestCallback) => number;
|
|
1852
2100
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
@@ -1854,4 +2102,4 @@ interface CustomElementsDefineOptions {
|
|
|
1854
2102
|
ce?: (eventName: string, opts?: any) => CustomEvent;
|
|
1855
2103
|
}
|
|
1856
2104
|
//#endregion
|
|
1857
|
-
export { AttachInternals, AttachInternalsDecorator, AttachInternalsOptions, AttrDeserialize, AttrDeserializeDecorator, Build, ChildNode, Component, ComponentDecorator, ComponentDidLoad, ComponentDidUpdate, ComponentInterface, ComponentOptions, ComponentWillLoad, ComponentWillUpdate, CustomElementsDefineOptions, Element, ElementDecorator, Env, ErrorHandler, Event, EventDecorator, EventEmitter, EventOptions, Fragment, FunctionalComponent, FunctionalUtilities, HTMLStencilElement, Host, HostAttributes, LocalJSX as JSX, JSXAttributes, JSXBase, Listen, ListenDecorator, ListenOptions, ListenTargetOptions, Method, MethodDecorator, MethodOptions, MixedInCtor, Mixin,
|
|
2105
|
+
export { AttachInternals, AttachInternalsDecorator, AttachInternalsOptions, AttrDeserialize, AttrDeserializeDecorator, Build, ChildNode, Component, ComponentDecorator, ComponentDidLoad, ComponentDidUpdate, ComponentInterface, ComponentOptions, ComponentShouldUpdateChanges, ComponentWillLoad, ComponentWillUpdate, CustomElementsDefineOptions, Element, ElementDecorator, EncapsulationOptions, Env, ErrorHandler, Event, EventDecorator, EventEmitter, EventOptions, Fragment, FunctionalComponent, FunctionalUtilities, HTMLStencilElement, Host, HostAttributes, LocalJSX as JSX, JSXAttributes, JSXBase, Listen, ListenDecorator, ListenOptions, ListenTargetOptions, Method, MethodDecorator, MethodOptions, MixedInCtor, Mixin, ModeStyles, NoneEncapsulation, Prop, PropDecorator, PropOptions, PropSerialize, PropSerializeDecorator, QueueApi, RafCallback, ReactiveController, ReactiveControllerHost, ReactiveControllerHostInterface, ResolutionHandler, ResolveVarFunction, ScopedEncapsulation, ShadowEncapsulation, ShadowRootOptions, SignalRef, SlotPatch, State, StateDecorator, TagTransformer, UserBuildConditionals, VNode, VNodeData, Watch, WatchDecorator, forceUpdate, getAssetPath, getElement, getMode, getRenderingRef, getShadowRoot, h, jsx, jsxs, readTask, registerSideEffectStyleTarget, render, resolveVar, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setTagTransformer, transformTag, unregisterSideEffectStyleTarget, writeTask };
|