skeleton-webcomponent-loader 2.1.4 → 3.0.0

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.
Files changed (58) hide show
  1. package/dist/cjs/app-globals-V2Kpy_OQ.js +5 -0
  2. package/dist/cjs/index-BKUCi6S8.js +1522 -0
  3. package/dist/cjs/loader.cjs.js +7 -29
  4. package/dist/cjs/nb-skeleton.cjs.entry.js +168 -114
  5. package/dist/cjs/skeleton-webcomponent.cjs.js +17 -15
  6. package/dist/collection/collection-manifest.json +4 -3
  7. package/dist/collection/components/skeleton/skeleton.js +460 -304
  8. package/dist/{custom-elements → components}/index.d.ts +13 -23
  9. package/dist/components/index.js +1 -0
  10. package/dist/components/nb-skeleton.d.ts +11 -0
  11. package/dist/components/nb-skeleton.js +1 -0
  12. package/dist/esm/app-globals-DQuL1Twl.js +3 -0
  13. package/dist/esm/index-D_NQrSVN.js +1515 -0
  14. package/dist/esm/loader.js +7 -27
  15. package/dist/esm/nb-skeleton.entry.js +168 -112
  16. package/dist/esm/skeleton-webcomponent.js +15 -15
  17. package/dist/esm-es5/app-globals-DQuL1Twl.js +1 -0
  18. package/dist/esm-es5/index-D_NQrSVN.js +2 -0
  19. package/dist/esm-es5/loader.js +1 -1
  20. package/dist/esm-es5/nb-skeleton.entry.js +1 -1
  21. package/dist/esm-es5/skeleton-webcomponent.js +1 -1
  22. package/dist/skeleton-webcomponent/p-0ab2f3bc.system.entry.js +1 -0
  23. package/dist/skeleton-webcomponent/p-BbPAtVJG.system.js +1 -0
  24. package/dist/skeleton-webcomponent/p-CEkATbjM.system.js +2 -0
  25. package/dist/skeleton-webcomponent/p-DQuL1Twl.js +1 -0
  26. package/dist/skeleton-webcomponent/p-D_NQrSVN.js +2 -0
  27. package/dist/skeleton-webcomponent/p-DikQ2aXB.system.js +1 -0
  28. package/dist/skeleton-webcomponent/p-e5fc5295.entry.js +1 -0
  29. package/dist/skeleton-webcomponent/skeleton-webcomponent.esm.js +1 -1
  30. package/dist/skeleton-webcomponent/skeleton-webcomponent.js +14 -19
  31. package/dist/types/components/skeleton/skeleton.d.ts +101 -67
  32. package/dist/types/components.d.ts +75 -2
  33. package/dist/types/stencil-public-runtime.d.ts +335 -40
  34. package/loader/cdn.js +1 -2
  35. package/loader/index.cjs.js +1 -2
  36. package/loader/index.d.ts +13 -1
  37. package/loader/index.es2017.js +1 -2
  38. package/loader/index.js +1 -2
  39. package/package.json +5 -5
  40. package/readme.md +0 -3
  41. package/CHANGELOG.md +0 -26
  42. package/dist/cjs/css-shim-b3e497ca.js +0 -6
  43. package/dist/cjs/index-b5d2dca0.js +0 -1156
  44. package/dist/custom-elements/index.js +0 -142
  45. package/dist/esm/css-shim-2f04a37a.js +0 -4
  46. package/dist/esm/index-63fd3905.js +0 -1128
  47. package/dist/esm/polyfills/css-shim.js +0 -1
  48. package/dist/esm-es5/css-shim-2f04a37a.js +0 -1
  49. package/dist/esm-es5/index-63fd3905.js +0 -1
  50. package/dist/skeleton-webcomponent/p-12077897.js +0 -1
  51. package/dist/skeleton-webcomponent/p-16aec442.system.js +0 -1
  52. package/dist/skeleton-webcomponent/p-63ed3b45.entry.js +0 -1
  53. package/dist/skeleton-webcomponent/p-7e96e5d4.js +0 -1
  54. package/dist/skeleton-webcomponent/p-8bef7229.system.js +0 -1
  55. package/dist/skeleton-webcomponent/p-dc1bf577.system.entry.js +0 -1
  56. package/dist/skeleton-webcomponent/p-f59432d4.system.js +0 -1
  57. package/loader/package.json +0 -10
  58. /package/dist/skeleton-webcomponent/{p-50ea2036.system.js → p-YWpyar7R.system.js} +0 -0
@@ -1,8 +1,20 @@
1
- declare type CustomMethodDecorator<T> = (target: Object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
1
+ type CustomMethodDecorator<T> = (target: object, propertyKey: string | symbol, descriptor: TypedPropertyDescriptor<T>) => TypedPropertyDescriptor<T> | void;
2
+ type UnionToIntersection<U> = (U extends any ? (k: U) => void : never) extends (k: infer I) => void ? I : never;
3
+ type MixinInstance<F> = F extends (base: MixedInCtor) => MixedInCtor<infer I> ? I : never;
2
4
  export interface ComponentDecorator {
3
5
  (opts?: ComponentOptions): ClassDecorator;
4
6
  }
5
7
  export interface ComponentOptions {
8
+ /**
9
+ * When set to `true` this component will be form-associated. See
10
+ * https://stenciljs.com/docs/next/form-associated documentation on how to
11
+ * build form-associated Stencil components that integrate into forms like
12
+ * native browser elements such as `<input>` and `<textarea>`.
13
+ *
14
+ * The {@link AttachInternals} decorator allows for access to the
15
+ * `ElementInternals` object to modify the associated form.
16
+ */
17
+ formAssociated?: boolean;
6
18
  /**
7
19
  * Tag name of the web component. Ideally, the tag name must be globally unique,
8
20
  * so it's recommended to choose an unique prefix for all your components within the same collection.
@@ -51,6 +63,12 @@ export interface ShadowRootOptions {
51
63
  * focusable part is given focus, and the shadow host is given any available `:focus` styling.
52
64
  */
53
65
  delegatesFocus?: boolean;
66
+ /**
67
+ * Sets the slot assignment mode for the shadow root. When set to `'manual'`, enables imperative
68
+ * slotting using the `HTMLSlotElement.assign()` method. Defaults to `'named'` for standard
69
+ * declarative slotting behavior.
70
+ */
71
+ slotAssignment?: 'manual' | 'named';
54
72
  }
55
73
  export interface ModeStyles {
56
74
  [modeName: string]: string | string[];
@@ -62,7 +80,7 @@ export interface PropOptions {
62
80
  /**
63
81
  * The name of the associated DOM attribute.
64
82
  * Stencil uses different heuristics to determine the default name of the attribute,
65
- * but using this property, you can override the default behaviour.
83
+ * but using this property, you can override the default behavior.
66
84
  */
67
85
  attribute?: string | null;
68
86
  /**
@@ -107,9 +125,34 @@ export interface EventOptions {
107
125
  */
108
126
  composed?: boolean;
109
127
  }
128
+ export interface AttachInternalsOptions {
129
+ /**
130
+ * Initial custom states to set on the ElementInternals.states CustomStateSet.
131
+ * Each key is the state name and the value is the initial boolean state.
132
+ *
133
+ * These states can be targeted with the CSS `:state()` pseudo-class.
134
+ *
135
+ * @example
136
+ * ```tsx
137
+ * @AttachInternals({ states: { open: true, active: false } })
138
+ * internals: ElementInternals;
139
+ * ```
140
+ *
141
+ * @see https://developer.mozilla.org/en-US/docs/Web/API/CustomStateSet
142
+ */
143
+ states?: {
144
+ [stateName: string]: boolean;
145
+ };
146
+ }
147
+ export interface AttachInternalsDecorator {
148
+ (opts?: AttachInternalsOptions): PropertyDecorator;
149
+ }
110
150
  export interface ListenDecorator {
111
151
  (eventName: string, opts?: ListenOptions): CustomMethodDecorator<any>;
112
152
  }
153
+ export interface ResolveVarFunction {
154
+ <T>(variable: T): string;
155
+ }
113
156
  export interface ListenOptions {
114
157
  /**
115
158
  * Handlers can also be registered for an event other than the host itself.
@@ -128,17 +171,25 @@ export interface ListenOptions {
128
171
  * By default, Stencil uses several heuristics to determine if
129
172
  * it must attach a `passive` event listener or not.
130
173
  *
131
- * Using the `passive` option can be used to change the default behaviour.
174
+ * Using the `passive` option can be used to change the default behavior.
132
175
  * Please see https://developers.google.com/web/updates/2016/06/passive-event-listeners for further information.
133
176
  */
134
177
  passive?: boolean;
135
178
  }
136
- export declare type ListenTargetOptions = 'body' | 'document' | 'window';
179
+ export type ListenTargetOptions = 'body' | 'document' | 'window';
137
180
  export interface StateDecorator {
138
181
  (): PropertyDecorator;
139
182
  }
140
183
  export interface WatchDecorator {
141
- (propName: string): CustomMethodDecorator<any>;
184
+ (propName: any, watchOptions?: {
185
+ immediate?: boolean;
186
+ }): CustomMethodDecorator<(newValue?: any, oldValue?: any, propName?: any, ...args: any[]) => any | void>;
187
+ }
188
+ export interface PropSerializeDecorator {
189
+ (propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => string | null>;
190
+ }
191
+ export interface AttrDeserializeDecorator {
192
+ (propName: any): CustomMethodDecorator<(newValue?: any, propName?: string, ...args: any[]) => any>;
142
193
  }
143
194
  export interface UserBuildConditionals {
144
195
  isDev: boolean;
@@ -175,12 +226,36 @@ export declare const Element: ElementDecorator;
175
226
  * https://stenciljs.com/docs/events
176
227
  */
177
228
  export declare const Event: EventDecorator;
229
+ /**
230
+ * If the `formAssociated` option is set in options passed to the
231
+ * `@Component()` decorator then this decorator may be used to get access to the
232
+ * `ElementInternals` instance associated with the component.
233
+ */
234
+ export declare const AttachInternals: AttachInternalsDecorator;
178
235
  /**
179
236
  * The `Listen()` decorator is for listening DOM events, including the ones
180
237
  * dispatched from `@Events()`.
181
238
  * https://stenciljs.com/docs/events#listen-decorator
182
239
  */
183
240
  export declare const Listen: ListenDecorator;
241
+ /**
242
+ * The `resolveVar()` function is a compile-time utility that resolves const variables
243
+ * and object properties to their string literal values. This allows variables to be
244
+ * used in `@Listen` and `@Event` decorators instead of hardcoded strings.
245
+ *
246
+ * @example
247
+ * ```ts
248
+ * const MY_EVENT = 'myEvent';
249
+ * @Listen(resolveVar(MY_EVENT))
250
+ * ```
251
+ *
252
+ * @example
253
+ * ```ts
254
+ * const EVENTS = { MY_EVENT: 'myEvent' } as const;
255
+ * @Event({ eventName: resolveVar(EVENTS.MY_EVENT) })
256
+ * ```
257
+ */
258
+ export declare const resolveVar: ResolveVarFunction;
184
259
  /**
185
260
  * The `@Method()` decorator is used to expose methods on the public API.
186
261
  * Class methods decorated with the @Method() decorator can be called directly
@@ -214,14 +289,24 @@ export declare const State: StateDecorator;
214
289
  * https://stenciljs.com/docs/reactive-data#watch-decorator
215
290
  */
216
291
  export declare const Watch: WatchDecorator;
217
- export declare type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
218
- export declare type ErrorHandler = (err: any, element?: HTMLElement) => void;
292
+ /**
293
+ * Decorator to serialize a property to an attribute string.
294
+ */
295
+ export declare const PropSerialize: PropSerializeDecorator;
296
+ /**
297
+ * Decorator to deserialize an attribute string to a property.
298
+ */
299
+ export declare const AttrDeserialize: AttrDeserializeDecorator;
300
+ export type ResolutionHandler = (elm: HTMLElement) => string | undefined | null;
301
+ export type ErrorHandler = (err: any, element?: HTMLElement) => void;
219
302
  /**
220
303
  * `setMode()` is used for libraries which provide multiple "modes" for styles.
221
304
  */
222
305
  export declare const setMode: (handler: ResolutionHandler) => void;
223
306
  /**
224
- * getMode
307
+ * `getMode()` is used for libraries which provide multiple "modes" for styles.
308
+ * @param ref a reference to the node to get styles for
309
+ * @returns the current mode or undefined, if not found
225
310
  */
226
311
  export declare function getMode<T = string | undefined>(ref: any): T;
227
312
  export declare function setPlatformHelpers(helpers: {
@@ -234,8 +319,30 @@ export declare function setPlatformHelpers(helpers: {
234
319
  /**
235
320
  * Get the base path to where the assets can be found. Use `setAssetPath(path)`
236
321
  * if the path needs to be customized.
322
+ * @param path the path to use in calculating the asset path. this value will be
323
+ * used in conjunction with the base asset path
324
+ * @returns the base path
237
325
  */
238
326
  export declare function getAssetPath(path: string): string;
327
+ /**
328
+ * Method to render a virtual DOM tree to a container element.
329
+ *
330
+ * @example
331
+ * ```tsx
332
+ * import { render } from '@stencil/core';
333
+ *
334
+ * const vnode = (
335
+ * <div>
336
+ * <h1>Hello, world!</h1>
337
+ * </div>
338
+ * );
339
+ * render(vnode, document.body);
340
+ * ```
341
+ *
342
+ * @param vnode - The virtual DOM tree to render
343
+ * @param container - The container element to render the virtual DOM tree to
344
+ */
345
+ export declare function render(vnode: VNode, container: Element): void;
239
346
  /**
240
347
  * Used to manually set the base path where assets can be found. For lazy-loaded
241
348
  * builds the asset path is automatically set and assets copied to the correct
@@ -246,22 +353,38 @@ export declare function getAssetPath(path: string): string;
246
353
  * `setAssetPath(document.currentScript.src)`, or using a bundler's replace plugin to
247
354
  * dynamically set the path at build time, such as `setAssetPath(process.env.ASSET_PATH)`.
248
355
  * But do note that this configuration depends on how your script is bundled, or lack of
249
- * bunding, and where your assets can be loaded from. Additionally custom bundling
356
+ * bundling, and where your assets can be loaded from. Additionally custom bundling
250
357
  * will have to ensure the static assets are copied to its build directory.
358
+ * @param path the asset path to set
359
+ * @returns the set path
251
360
  */
252
361
  export declare function setAssetPath(path: string): string;
253
362
  /**
254
- * getElement
363
+ * Used to specify a nonce value that corresponds with an application's
364
+ * [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 script and style tags at runtime.
366
+ * Alternatively, the nonce value can be set on a `meta` tag in the DOM head
367
+ * (<meta name="csp-nonce" content="{ nonce value here }" />) and will result in the same behavior.
368
+ * @param nonce The value to be used for the nonce attribute.
369
+ */
370
+ export declare function setNonce(nonce: string): void;
371
+ /**
372
+ * Retrieve a Stencil element for a given reference
373
+ * @param ref the ref to get the Stencil element for
374
+ * @returns a reference to the element
255
375
  */
256
376
  export declare function getElement(ref: any): HTMLStencilElement;
257
377
  /**
258
378
  * Schedules a new render of the given instance or element even if no state changed.
259
379
  *
260
- * Notice `forceUpdate()` is not syncronous and might perform the DOM render in the next frame.
380
+ * Notice `forceUpdate()` is not synchronous and might perform the DOM render in the next frame.
381
+ *
382
+ * @param ref the node/element to force the re-render of
261
383
  */
262
384
  export declare function forceUpdate(ref: any): void;
263
385
  /**
264
386
  * getRenderingRef
387
+ * @returns the rendering ref
265
388
  */
266
389
  export declare function getRenderingRef(): any;
267
390
  export interface HTMLStencilElement extends HTMLElement {
@@ -272,6 +395,8 @@ export interface HTMLStencilElement extends HTMLElement {
272
395
  * in the best moment to perform DOM mutation without causing layout thrashing.
273
396
  *
274
397
  * For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
398
+ *
399
+ * @param task the DOM-write to schedule
275
400
  */
276
401
  export declare function writeTask(task: RafCallback): void;
277
402
  /**
@@ -279,6 +404,8 @@ export declare function writeTask(task: RafCallback): void;
279
404
  * in the best moment to perform DOM reads without causing layout thrashing.
280
405
  *
281
406
  * For further information: https://developers.google.com/web/fundamentals/performance/rendering/avoid-large-complex-layouts-and-layout-thrashing
407
+ *
408
+ * @param task the DOM-read to schedule
282
409
  */
283
410
  export declare function readTask(task: RafCallback): void;
284
411
  /**
@@ -286,6 +413,58 @@ export declare function readTask(task: RafCallback): void;
286
413
  * Unhandled exception raised while rendering, during event handling, or lifecycles will trigger the custom event handler.
287
414
  */
288
415
  export declare const setErrorHandler: (handler: ErrorHandler) => void;
416
+ export type TagTransformer = (tag: string) => string;
417
+ /**
418
+ * Sets a tag transformer to be used when rendering your custom elements.
419
+ * ```ts
420
+ * setTagTransformer((tag) => {
421
+ * if (tag.startsWith('my-')) return `new-${tag}`
422
+ * return tag;
423
+ * });
424
+ * ```
425
+ * Will mean all your components that start with `my-` are defined instead with `new-my-` prefix.
426
+ *
427
+ * @param transformer the transformer function to use which must return a string.
428
+ */
429
+ export declare function setTagTransformer(transformer: TagTransformer): void;
430
+ /**
431
+ * Transforms a tag name using a transformer set via `setTagTransformer`
432
+ *
433
+ * @param tag - the tag to transform e.g. `my-tag`
434
+ * @returns the transformed tag e.g. `new-my-tag`
435
+ */
436
+ export declare function transformTag(tag: string): string;
437
+ /**
438
+ * @deprecated - Use `MixedInCtor` instead:
439
+ * ```ts
440
+ * import { MixedInCtor } from '@stencil/core';
441
+ *
442
+ * const AFactoryFn = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
443
+ * ```
444
+ */
445
+ export type MixinFactory = (base: MixedInCtor) => MixedInCtor;
446
+ export type MixedInCtor<T = {}> = new (...args: any[]) => T;
447
+ /**
448
+ * Compose multiple mixin classes into a single constructor.
449
+ * The resulting class has the combined instance types of all mixed-in classes.
450
+ *
451
+ * Example:
452
+ * ```ts
453
+ * import { Mixin, MixedInCtor } from '@stencil/core';
454
+ *
455
+ * const AWrap = <B extends MixedInCtor>(Base: B) => {class A extends Base { propA = A }; return A;}
456
+ * const BWrap = <B extends MixedInCtor>(Base: B) => {class B extends Base { propB = B }; return B;}
457
+ * const CWrap = <B extends MixedInCtor>(Base: B) => {class C extends Base { propC = C }; return C;}
458
+ *
459
+ * class X extends Mixin(AWrap, BWrap, CWrap) {
460
+ * render() { return <div>{this.propA} {this.propB} {this.propC}</div>; }
461
+ * }
462
+ * ```
463
+ *
464
+ * @param mixinFactories mixin factory functions that return a class which extends from the provided class.
465
+ * @returns a class that is composed from extending each of the provided classes in the order they were provided.
466
+ */
467
+ export declare function Mixin<const TMixins extends readonly MixinFactory[]>(...mixinFactories: TMixins): abstract new (...args: any[]) => UnionToIntersection<MixinInstance<TMixins[number]>>;
289
468
  /**
290
469
  * This file gets copied to all distributions of stencil component collections.
291
470
  * - no imports
@@ -407,7 +586,7 @@ export interface QueueApi {
407
586
  /**
408
587
  * Host
409
588
  */
410
- interface HostAttributes {
589
+ export interface HostAttributes {
411
590
  class?: string | {
412
591
  [className: string]: boolean;
413
592
  };
@@ -417,13 +596,57 @@ interface HostAttributes {
417
596
  ref?: (el: HTMLElement | null) => void;
418
597
  [prop: string]: any;
419
598
  }
599
+ /**
600
+ * Utilities for working with functional Stencil components. An object
601
+ * conforming to this interface is passed by the Stencil runtime as the third
602
+ * argument to a functional component, allowing component authors to work with
603
+ * features like children.
604
+ *
605
+ * The children of a functional component will be passed as the second
606
+ * argument, so a functional component which uses these utils to transform its
607
+ * children might look like the following:
608
+ *
609
+ * ```ts
610
+ * export const AddClass: FunctionalComponent = (_, children, utils) => (
611
+ * utils.map(children, child => ({
612
+ * ...child,
613
+ * vattrs: {
614
+ * ...child.vattrs,
615
+ * class: `${child.vattrs.class} add-class`
616
+ * }
617
+ * }))
618
+ * );
619
+ * ```
620
+ *
621
+ * For more see the Stencil documentation, here:
622
+ * https://stenciljs.com/docs/functional-components
623
+ */
420
624
  export interface FunctionalUtilities {
625
+ /**
626
+ * Utility for reading the children of a functional component at runtime.
627
+ * Since the Stencil runtime uses a different interface for children it is
628
+ * not recommended to read the children directly, and is preferable to use
629
+ * this utility to, for instance, perform a side effect for each child.
630
+ */
421
631
  forEach: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => void) => void;
632
+ /**
633
+ * Utility for transforming the children of a functional component. Given an
634
+ * array of children and a callback this will return a list of the results of
635
+ * passing each child to the supplied callback.
636
+ */
422
637
  map: (children: VNode[], cb: (vnode: ChildNode, index: number, array: ChildNode[]) => ChildNode) => VNode[];
423
638
  }
424
639
  export interface FunctionalComponent<T = {}> {
425
- (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[];
640
+ (props: T, children: VNode[], utils: FunctionalUtilities): VNode | VNode[] | null;
426
641
  }
642
+ /**
643
+ * A Child VDOM node
644
+ *
645
+ * This has most of the same properties as {@link VNode} but friendlier names
646
+ * (i.e. `vtag` instead of `$tag$`, `vchildren` instead of `$children$`) in
647
+ * order to provide a friendlier public interface for users of the
648
+ * {@link FunctionalUtilities}).
649
+ */
427
650
  export interface ChildNode {
428
651
  vtag?: string | number | Function;
429
652
  vkey?: string | number;
@@ -456,6 +679,7 @@ export declare namespace h {
456
679
  function h(sel: any, data: VNodeData | null, text: string): VNode;
457
680
  function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
458
681
  function h(sel: any, data: VNodeData | null, children: VNode): VNode;
682
+ function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
459
683
  namespace JSX {
460
684
  interface IntrinsicElements extends LocalJSX.IntrinsicElements, JSXBase.IntrinsicElements {
461
685
  [tagName: string]: any;
@@ -470,6 +694,39 @@ export declare function h(sel: any, children: Array<VNode | undefined | null>):
470
694
  export declare function h(sel: any, data: VNodeData | null, text: string): VNode;
471
695
  export declare function h(sel: any, data: VNodeData | null, children: Array<VNode | undefined | null>): VNode;
472
696
  export declare function h(sel: any, data: VNodeData | null, children: VNode): VNode;
697
+ export declare function h(sel: any, data: VNodeData | null, ...children: (VNode | string | number)[]): VNode;
698
+ /**
699
+ * Automatic JSX runtime functions for TypeScript's react-jsx mode.
700
+ * These functions are called automatically by TypeScript when using "jsx": "react-jsx".
701
+ * @param type type of node
702
+ * @param props properties of node
703
+ * @param key optional key for the node
704
+ * @returns a jsx vnode
705
+ */
706
+ export declare function jsx(type: any, props: any, key?: string): VNode;
707
+ /**
708
+ * Automatic JSX runtime functions for TypeScript's react-jsxmode with multiple children.
709
+ * @param type type of node
710
+ * @param props properties of node
711
+ * @param key optional key for the node
712
+ * @returns a jsx vnode
713
+ */
714
+ export 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
+ export declare function jsxDEV(type: any, props: any, key?: string | number, isStaticChildren?: boolean, source?: any, self?: any): VNode;
727
+ /**
728
+ * A virtual DOM node
729
+ */
473
730
  export interface VNode {
474
731
  $flags$: number;
475
732
  $tag$: string | number | Function;
@@ -496,7 +753,7 @@ declare namespace LocalJSX {
496
753
  export { LocalJSX as JSX };
497
754
  export declare namespace JSXBase {
498
755
  interface IntrinsicElements {
499
- slot: JSXBase.SlotAttributes;
756
+ slot: JSXBase.SlotAttributes<HTMLSlotElement>;
500
757
  a: JSXBase.AnchorHTMLAttributes<HTMLAnchorElement>;
501
758
  abbr: JSXBase.HTMLAttributes;
502
759
  address: JSXBase.HTMLAttributes;
@@ -666,7 +923,7 @@ export declare namespace JSXBase {
666
923
  use: JSXBase.SVGAttributes;
667
924
  view: JSXBase.SVGAttributes;
668
925
  }
669
- interface SlotAttributes extends JSXAttributes {
926
+ interface SlotAttributes<T = HTMLSlotElement> extends JSXAttributes<T> {
670
927
  name?: string;
671
928
  slot?: string;
672
929
  onSlotchange?: (event: Event) => void;
@@ -677,6 +934,7 @@ export declare namespace JSXBase {
677
934
  hrefLang?: string;
678
935
  hreflang?: string;
679
936
  media?: string;
937
+ ping?: string;
680
938
  rel?: string;
681
939
  target?: string;
682
940
  referrerPolicy?: ReferrerPolicy;
@@ -703,7 +961,6 @@ export declare namespace JSXBase {
703
961
  cite?: string;
704
962
  }
705
963
  interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
706
- autoFocus?: boolean;
707
964
  disabled?: boolean;
708
965
  form?: string;
709
966
  formAction?: string;
@@ -719,6 +976,12 @@ export declare namespace JSXBase {
719
976
  name?: string;
720
977
  type?: string;
721
978
  value?: string | string[] | number;
979
+ popoverTargetAction?: string;
980
+ popoverTargetElement?: Element | null;
981
+ popoverTarget?: string;
982
+ command?: string;
983
+ commandFor?: string;
984
+ commandfor?: string;
722
985
  }
723
986
  interface CanvasHTMLAttributes<T> extends HTMLAttributes<T> {
724
987
  height?: number | string;
@@ -732,7 +995,8 @@ export declare namespace JSXBase {
732
995
  }
733
996
  interface DetailsHTMLAttributes<T> extends HTMLAttributes<T> {
734
997
  open?: boolean;
735
- onToggle?: (event: Event) => void;
998
+ name?: string;
999
+ onToggle?: (event: ToggleEvent) => void;
736
1000
  }
737
1001
  interface DelHTMLAttributes<T> extends HTMLAttributes<T> {
738
1002
  cite?: string;
@@ -740,6 +1004,7 @@ export declare namespace JSXBase {
740
1004
  datetime?: string;
741
1005
  }
742
1006
  interface DialogHTMLAttributes<T> extends HTMLAttributes<T> {
1007
+ onCancel?: (event: Event) => void;
743
1008
  onClose?: (event: Event) => void;
744
1009
  open?: boolean;
745
1010
  returnValue?: string;
@@ -799,6 +1064,8 @@ export declare namespace JSXBase {
799
1064
  }
800
1065
  interface ImgHTMLAttributes<T> extends HTMLAttributes<T> {
801
1066
  alt?: string;
1067
+ crossOrigin?: string;
1068
+ crossorigin?: string;
802
1069
  decoding?: 'async' | 'auto' | 'sync';
803
1070
  importance?: 'low' | 'auto' | 'high';
804
1071
  height?: number | string;
@@ -820,12 +1087,10 @@ export declare namespace JSXBase {
820
1087
  accept?: string;
821
1088
  allowdirs?: boolean;
822
1089
  alt?: string;
823
- autoCapitalize?: any;
824
- autocapitalize?: any;
1090
+ autoCapitalize?: string;
1091
+ autocapitalize?: string;
825
1092
  autoComplete?: string;
826
1093
  autocomplete?: string;
827
- autoFocus?: boolean;
828
- autofocus?: boolean | string;
829
1094
  capture?: string;
830
1095
  checked?: boolean;
831
1096
  crossOrigin?: string;
@@ -857,6 +1122,8 @@ export declare namespace JSXBase {
857
1122
  minlength?: number | string;
858
1123
  multiple?: boolean;
859
1124
  name?: string;
1125
+ onSelect?: (event: Event) => void;
1126
+ onselect?: (event: Event) => void;
860
1127
  pattern?: string;
861
1128
  placeholder?: string;
862
1129
  readOnly?: boolean;
@@ -875,10 +1142,11 @@ export declare namespace JSXBase {
875
1142
  webkitdirectory?: boolean;
876
1143
  webkitEntries?: any;
877
1144
  width?: number | string;
1145
+ popoverTargetAction?: string;
1146
+ popoverTargetElement?: Element | null;
1147
+ popoverTarget?: string;
878
1148
  }
879
1149
  interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
880
- autoFocus?: boolean;
881
- autofocus?: boolean | string;
882
1150
  challenge?: string;
883
1151
  disabled?: boolean;
884
1152
  form?: string;
@@ -891,7 +1159,6 @@ export declare namespace JSXBase {
891
1159
  interface LabelHTMLAttributes<T> extends HTMLAttributes<T> {
892
1160
  form?: string;
893
1161
  htmlFor?: string;
894
- htmlfor?: string;
895
1162
  }
896
1163
  interface LiHTMLAttributes<T> extends HTMLAttributes<T> {
897
1164
  value?: string | string[] | number;
@@ -918,6 +1185,8 @@ export declare namespace JSXBase {
918
1185
  autoPlay?: boolean;
919
1186
  autoplay?: boolean | string;
920
1187
  controls?: boolean;
1188
+ controlslist?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
1189
+ controlsList?: 'nodownload' | 'nofullscreen' | 'noremoteplayback';
921
1190
  crossOrigin?: string;
922
1191
  crossorigin?: string;
923
1192
  loop?: boolean;
@@ -1002,7 +1271,6 @@ export declare namespace JSXBase {
1002
1271
  interface OutputHTMLAttributes<T> extends HTMLAttributes<T> {
1003
1272
  form?: string;
1004
1273
  htmlFor?: string;
1005
- htmlfor?: string;
1006
1274
  name?: string;
1007
1275
  }
1008
1276
  interface ParamHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -1027,7 +1295,6 @@ export declare namespace JSXBase {
1027
1295
  type?: string;
1028
1296
  }
1029
1297
  interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
1030
- autoFocus?: boolean;
1031
1298
  disabled?: boolean;
1032
1299
  form?: string;
1033
1300
  multiple?: boolean;
@@ -1038,11 +1305,13 @@ export declare namespace JSXBase {
1038
1305
  autocomplete?: string;
1039
1306
  }
1040
1307
  interface SourceHTMLAttributes<T> extends HTMLAttributes<T> {
1308
+ height?: number;
1041
1309
  media?: string;
1042
1310
  sizes?: string;
1043
1311
  src?: string;
1044
1312
  srcSet?: string;
1045
1313
  type?: string;
1314
+ width?: number;
1046
1315
  }
1047
1316
  interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
1048
1317
  media?: string;
@@ -1058,8 +1327,8 @@ export declare namespace JSXBase {
1058
1327
  summary?: string;
1059
1328
  }
1060
1329
  interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
1061
- autoFocus?: boolean;
1062
- autofocus?: boolean | string;
1330
+ autoComplete?: string;
1331
+ autocomplete?: string;
1063
1332
  cols?: number;
1064
1333
  disabled?: boolean;
1065
1334
  form?: string;
@@ -1068,6 +1337,8 @@ export declare namespace JSXBase {
1068
1337
  minLength?: number;
1069
1338
  minlength?: number | string;
1070
1339
  name?: string;
1340
+ onSelect?: (event: Event) => void;
1341
+ onselect?: (event: Event) => void;
1071
1342
  placeholder?: string;
1072
1343
  readOnly?: boolean;
1073
1344
  readonly?: boolean | string;
@@ -1110,6 +1381,8 @@ export declare namespace JSXBase {
1110
1381
  interface HTMLAttributes<T = HTMLElement> extends DOMAttributes<T> {
1111
1382
  innerHTML?: string;
1112
1383
  accessKey?: string;
1384
+ autoFocus?: boolean;
1385
+ autofocus?: boolean | string;
1113
1386
  class?: string | {
1114
1387
  [className: string]: boolean;
1115
1388
  };
@@ -1121,6 +1394,7 @@ export declare namespace JSXBase {
1121
1394
  draggable?: boolean;
1122
1395
  hidden?: boolean;
1123
1396
  id?: string;
1397
+ inert?: boolean;
1124
1398
  lang?: string;
1125
1399
  spellcheck?: 'true' | 'false' | any;
1126
1400
  style?: {
@@ -1129,6 +1403,7 @@ export declare namespace JSXBase {
1129
1403
  tabIndex?: number;
1130
1404
  tabindex?: number | string;
1131
1405
  title?: string;
1406
+ popover?: string | null;
1132
1407
  inputMode?: string;
1133
1408
  inputmode?: string;
1134
1409
  enterKeyHint?: string;
@@ -1145,8 +1420,8 @@ export declare namespace JSXBase {
1145
1420
  resource?: string;
1146
1421
  typeof?: string;
1147
1422
  vocab?: string;
1148
- autoCapitalize?: any;
1149
- autocapitalize?: any;
1423
+ autoCapitalize?: string;
1424
+ autocapitalize?: string;
1150
1425
  autoCorrect?: string;
1151
1426
  autocorrect?: string;
1152
1427
  autoSave?: string;
@@ -1214,7 +1489,7 @@ export declare namespace JSXBase {
1214
1489
  clipPathUnits?: number | string;
1215
1490
  'clip-rule'?: number | string;
1216
1491
  'color-interpolation'?: number | string;
1217
- 'color-interpolation-filters'?: 'auto' | 's-rGB' | 'linear-rGB' | 'inherit';
1492
+ 'color-interpolation-filters'?: 'auto' | 'sRGB' | 'linearRGB';
1218
1493
  'color-profile'?: number | string;
1219
1494
  'color-rendering'?: number | string;
1220
1495
  contentScriptType?: number | string;
@@ -1427,6 +1702,13 @@ export declare namespace JSXBase {
1427
1702
  z?: number | string;
1428
1703
  zoomAndPan?: string;
1429
1704
  }
1705
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent) */
1706
+ interface ToggleEvent extends Event {
1707
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/newState) */
1708
+ readonly newState: string;
1709
+ /** [MDN Reference](https://developer.mozilla.org/docs/Web/API/ToggleEvent/oldState) */
1710
+ readonly oldState: string;
1711
+ }
1430
1712
  interface DOMAttributes<T> extends JSXAttributes<T> {
1431
1713
  slot?: string;
1432
1714
  part?: string;
@@ -1437,12 +1719,16 @@ export declare namespace JSXBase {
1437
1719
  onCutCapture?: (event: ClipboardEvent) => void;
1438
1720
  onPaste?: (event: ClipboardEvent) => void;
1439
1721
  onPasteCapture?: (event: ClipboardEvent) => void;
1440
- onCompositionEnd?: (event: CompositionEvent) => void;
1441
- onCompositionEndCapture?: (event: CompositionEvent) => void;
1442
- onCompositionStart?: (event: CompositionEvent) => void;
1443
- onCompositionStartCapture?: (event: CompositionEvent) => void;
1444
- onCompositionUpdate?: (event: CompositionEvent) => void;
1445
- onCompositionUpdateCapture?: (event: CompositionEvent) => void;
1722
+ onCompositionend?: (event: CompositionEvent) => void;
1723
+ onCompositionendCapture?: (event: CompositionEvent) => void;
1724
+ onCompositionstart?: (event: CompositionEvent) => void;
1725
+ onCompositionstartCapture?: (event: CompositionEvent) => void;
1726
+ onCompositionupdate?: (event: CompositionEvent) => void;
1727
+ onCompositionupdateCapture?: (event: CompositionEvent) => void;
1728
+ onBeforeToggle?: (event: ToggleEvent) => void;
1729
+ onBeforeToggleCapture?: (event: ToggleEvent) => void;
1730
+ onToggle?: (event: ToggleEvent) => void;
1731
+ onToggleCapture?: (event: ToggleEvent) => void;
1446
1732
  onFocus?: (event: FocusEvent) => void;
1447
1733
  onFocusCapture?: (event: FocusEvent) => void;
1448
1734
  onFocusin?: (event: FocusEvent) => void;
@@ -1453,8 +1739,8 @@ export declare namespace JSXBase {
1453
1739
  onBlurCapture?: (event: FocusEvent) => void;
1454
1740
  onChange?: (event: Event) => void;
1455
1741
  onChangeCapture?: (event: Event) => void;
1456
- onInput?: (event: Event) => void;
1457
- onInputCapture?: (event: Event) => void;
1742
+ onInput?: (event: InputEvent) => void;
1743
+ onInputCapture?: (event: InputEvent) => void;
1458
1744
  onReset?: (event: Event) => void;
1459
1745
  onResetCapture?: (event: Event) => void;
1460
1746
  onSubmit?: (event: Event) => void;
@@ -1472,7 +1758,7 @@ export declare namespace JSXBase {
1472
1758
  onKeyUp?: (event: KeyboardEvent) => void;
1473
1759
  onKeyUpCapture?: (event: KeyboardEvent) => void;
1474
1760
  onAuxClick?: (event: MouseEvent) => void;
1475
- onClick?: (event: MouseEvent) => void;
1761
+ onClick?: (event: PointerEvent) => void;
1476
1762
  onClickCapture?: (event: MouseEvent) => void;
1477
1763
  onContextMenu?: (event: MouseEvent) => void;
1478
1764
  onContextMenuCapture?: (event: MouseEvent) => void;
@@ -1544,8 +1830,16 @@ export declare namespace JSXBase {
1544
1830
  onAnimationEndCapture?: (event: AnimationEvent) => void;
1545
1831
  onAnimationIteration?: (event: AnimationEvent) => void;
1546
1832
  onAnimationIterationCapture?: (event: AnimationEvent) => void;
1833
+ onTransitionCancel?: (event: TransitionEvent) => void;
1834
+ onTransitionCancelCapture?: (event: TransitionEvent) => void;
1547
1835
  onTransitionEnd?: (event: TransitionEvent) => void;
1548
1836
  onTransitionEndCapture?: (event: TransitionEvent) => void;
1837
+ onTransitionRun?: (event: TransitionEvent) => void;
1838
+ onTransitionRunCapture?: (event: TransitionEvent) => void;
1839
+ onTransitionStart?: (event: TransitionEvent) => void;
1840
+ onTransitionStartCapture?: (event: TransitionEvent) => void;
1841
+ [key: `aria-${string}`]: string | boolean | undefined;
1842
+ [key: `aria${string}`]: string | boolean | undefined;
1549
1843
  }
1550
1844
  }
1551
1845
  export interface JSXAttributes<T = Element> {
@@ -1556,6 +1850,7 @@ export interface CustomElementsDefineOptions {
1556
1850
  exclude?: string[];
1557
1851
  resourcesUrl?: string;
1558
1852
  syncQueue?: boolean;
1853
+ /** @deprecated in-favour of `setTagTransformer` and `transformTag` */
1559
1854
  transformTagName?: (tagName: string) => string;
1560
1855
  jmp?: (c: Function) => any;
1561
1856
  raf?: (c: FrameRequestCallback) => number;