@stencil/core 5.0.0-alpha.1 → 5.0.0-alpha.11
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/dist/app-data/index.d.ts +2 -0
- package/dist/{runtime/app-data → app-data}/index.js +17 -12
- package/dist/{client-B1nuvCd2.mjs → client-aTQ7xHxx.mjs} +2432 -2278
- package/dist/compiler/index.d.mts +6 -6
- package/dist/compiler/index.mjs +2 -2
- package/dist/compiler/utils/index.d.mts +2 -2
- package/dist/compiler/utils/index.mjs +3 -3
- package/dist/{compiler-LX4_RKKd.mjs → compiler-DCN7Np2A.mjs} +14854 -13500
- package/dist/declarations/stencil-public-compiler.d.ts +4374 -2
- package/dist/declarations/stencil-public-compiler.js +2 -4
- package/dist/declarations/stencil-public-docs.d.ts +504 -1
- package/dist/declarations/stencil-public-runtime.d.ts +1982 -2
- package/dist/{index-fIuYTL9f.d.mts → index-BvkyxSY6.d.mts} +29 -2
- package/dist/{index-D-LlB2nw.d.mts → index-vY35H18z.d.mts} +795 -1188
- package/dist/{index-BONzXKJt.d.ts → index-xAkMgLX_.d.ts} +88 -39
- package/dist/index.d.mts +1 -1
- package/dist/index.mjs +2 -2
- package/dist/jsx-runtime.d.mts +18 -0
- package/dist/jsx-runtime.mjs +2 -0
- package/dist/{node-SxQIOCZE.mjs → node--akYC-sG.mjs} +20 -30
- package/dist/regular-expression-CFVJOTUh.mjs +508 -0
- package/dist/{runtime-CF9DJtSu.js → runtime/client/lazy.js} +2675 -2493
- package/dist/runtime/client/{index.d.ts → runtime.d.ts} +106 -78
- package/dist/runtime/client/{index.js → runtime.js} +2545 -2487
- package/dist/runtime/index.d.ts +58 -29
- package/dist/runtime/index.js +4795 -2
- package/dist/runtime/server/index.d.mts +103 -70
- package/dist/runtime/server/index.mjs +2545 -2350
- package/dist/runtime/server/runner.d.mts +44 -48
- package/dist/runtime/server/runner.mjs +347 -751
- package/dist/signals/index.d.ts +47 -0
- package/dist/signals/index.js +199 -0
- package/dist/sys/node/index.d.mts +1 -1
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.mjs +2 -2
- package/dist/testing/index.d.mts +97 -3
- package/dist/testing/index.mjs +367 -59
- package/dist/{validation-CaCgjw-f.mjs → validation-ByxKj8bC.mjs} +116 -99
- package/package.json +47 -38
- package/dist/index-CHjZtib0.d.ts +0 -30
- package/dist/jsx-runtime-DBzBJLKk.d.ts +0 -28
- package/dist/jsx-runtime.d.ts +0 -2
- package/dist/jsx-runtime.js +0 -2
- package/dist/runtime/app-data/index.d.ts +0 -2
- package/dist/serialize-BkYHk7Mi.mjs +0 -766
- package/dist/stencil-public-compiler-C_X1iolo.d.ts +0 -4455
- package/dist/stencil-public-runtime-DlV8o7-z.d.ts +0 -1845
- /package/dist/{runtime/app-globals → app-globals}/index.d.ts +0 -0
- /package/dist/{runtime/app-globals → app-globals}/index.js +0 -0
- /package/dist/{chunk-CjcI7cDX.mjs → chunk-z9aeyW2b.mjs} +0 -0
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { BUILD, Env, NAMESPACE } from "@stencil/core/
|
|
1
|
+
import { BUILD, Env, NAMESPACE } from "@stencil/core/app-data";
|
|
2
2
|
//#region src/declarations/stencil-public-runtime.d.ts
|
|
3
3
|
interface UserBuildConditionals {
|
|
4
4
|
isDev: boolean;
|
|
@@ -105,7 +105,7 @@ interface FunctionalUtilities {
|
|
|
105
105
|
map: (children: VNode[], cb: (vnode: ChildNode$1, index: number, array: ChildNode$1[]) => ChildNode$1) => VNode[];
|
|
106
106
|
}
|
|
107
107
|
interface FunctionalComponent<T = {}> {
|
|
108
|
-
(props: T, children: VNode[], utils: FunctionalUtilities): VNode |
|
|
108
|
+
(props: T, children: VNode[], utils: FunctionalUtilities): VNode | null;
|
|
109
109
|
}
|
|
110
110
|
/**
|
|
111
111
|
* A Child VDOM node
|
|
@@ -116,7 +116,7 @@ interface FunctionalComponent<T = {}> {
|
|
|
116
116
|
* {@link FunctionalUtilities}).
|
|
117
117
|
*/
|
|
118
118
|
interface ChildNode$1 {
|
|
119
|
-
vtag?: string | number | Function;
|
|
119
|
+
vtag?: string | number | Function | symbol | null;
|
|
120
120
|
vkey?: string | number;
|
|
121
121
|
vtext?: string;
|
|
122
122
|
vchildren?: VNode[];
|
|
@@ -128,19 +128,21 @@ interface ChildNode$1 {
|
|
|
128
128
|
*/
|
|
129
129
|
interface VNode {
|
|
130
130
|
$flags$: number;
|
|
131
|
-
$tag$: string | number | Function;
|
|
131
|
+
$tag$: string | number | Function | symbol | null;
|
|
132
132
|
$elm$: any;
|
|
133
133
|
$text$: string;
|
|
134
134
|
$children$: VNode[];
|
|
135
135
|
$attrs$?: any;
|
|
136
136
|
$name$?: string;
|
|
137
137
|
$key$?: string | number;
|
|
138
|
+
/** Signal reference for vdom bypass: signal text nodes store the signal here. */
|
|
139
|
+
$signal$?: any;
|
|
138
140
|
}
|
|
139
141
|
interface CustomElementsDefineOptions {
|
|
140
142
|
exclude?: string[];
|
|
141
143
|
syncQueue?: boolean;
|
|
142
|
-
/**
|
|
143
|
-
|
|
144
|
+
/** Scoped custom element registry to define components in. Defaults to the global registry. */
|
|
145
|
+
registry?: CustomElementRegistry;
|
|
144
146
|
jmp?: (c: Function) => any;
|
|
145
147
|
raf?: (c: FrameRequestCallback) => number;
|
|
146
148
|
ael?: (el: EventTarget, eventName: string, listener: EventListenerOrEventListenerObject, options: boolean | AddEventListenerOptions) => void;
|
|
@@ -149,7 +151,7 @@ interface CustomElementsDefineOptions {
|
|
|
149
151
|
}
|
|
150
152
|
//#endregion
|
|
151
153
|
//#region src/declarations/stencil-public-compiler.d.ts
|
|
152
|
-
interface
|
|
154
|
+
interface SsrDocumentOptions {
|
|
153
155
|
/**
|
|
154
156
|
* Build ID that will be added to `<html data-stencil-build="BUILD_ID">`. By default
|
|
155
157
|
* a random ID will be generated
|
|
@@ -166,7 +168,7 @@ interface HydrateDocumentOptions {
|
|
|
166
168
|
* JavaScript to read the structure of the HTML and rebuild each
|
|
167
169
|
* component. Defaults to `true`.
|
|
168
170
|
*/
|
|
169
|
-
|
|
171
|
+
clientSsrAnnotations?: boolean;
|
|
170
172
|
/**
|
|
171
173
|
* Constrain `setTimeout()` to 1ms, but still async. Also
|
|
172
174
|
* only allows `setInterval()` to fire once, also constrained to 1ms.
|
|
@@ -265,10 +267,14 @@ interface HydrateDocumentOptions {
|
|
|
265
267
|
default: 'declarative-shadow-dom' | 'scoped';
|
|
266
268
|
} | boolean;
|
|
267
269
|
}
|
|
268
|
-
interface SerializeDocumentOptions extends
|
|
270
|
+
interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
269
271
|
/**
|
|
270
272
|
* Runs after the `document` has been hydrated.
|
|
271
273
|
*/
|
|
274
|
+
afterSsr?(document: any): any | Promise<any>;
|
|
275
|
+
/**
|
|
276
|
+
* @deprecated Use `afterSsr` instead.
|
|
277
|
+
*/
|
|
272
278
|
afterHydrate?(document: any): any | Promise<any>;
|
|
273
279
|
/**
|
|
274
280
|
* Sets an approximate line width the HTML should attempt to stay within.
|
|
@@ -281,6 +287,10 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
|
281
287
|
/**
|
|
282
288
|
* Runs before the `document` has been hydrated.
|
|
283
289
|
*/
|
|
290
|
+
beforeSsr?(document: any): any | Promise<any>;
|
|
291
|
+
/**
|
|
292
|
+
* @deprecated Use `beforeSsr` instead.
|
|
293
|
+
*/
|
|
284
294
|
beforeHydrate?(document: any): any | Promise<any>;
|
|
285
295
|
/**
|
|
286
296
|
* Format the HTML in a nicely indented format.
|
|
@@ -318,7 +328,7 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
|
318
328
|
*/
|
|
319
329
|
modes?: ResolutionHandler[];
|
|
320
330
|
}
|
|
321
|
-
interface
|
|
331
|
+
interface SsrFactoryOptions extends SerializeDocumentOptions {
|
|
322
332
|
serializeToHtml: boolean;
|
|
323
333
|
destroyWindow: boolean;
|
|
324
334
|
destroyDocument: boolean;
|
|
@@ -412,7 +422,7 @@ interface HostElement extends HTMLElement {
|
|
|
412
422
|
disconnectedCallback?: () => void;
|
|
413
423
|
host?: Element;
|
|
414
424
|
forceUpdate?: () => void;
|
|
415
|
-
|
|
425
|
+
__s_ghr?: () => HostRef;
|
|
416
426
|
/**
|
|
417
427
|
* Unique stencil id for this element
|
|
418
428
|
*/
|
|
@@ -468,7 +478,7 @@ interface HostElement extends HTMLElement {
|
|
|
468
478
|
['s-p']?: Promise<void>[];
|
|
469
479
|
componentOnReady?: () => Promise<this>;
|
|
470
480
|
}
|
|
471
|
-
interface
|
|
481
|
+
interface SsrResults {
|
|
472
482
|
buildId: string;
|
|
473
483
|
diagnostics: Diagnostic[];
|
|
474
484
|
url: string;
|
|
@@ -480,42 +490,42 @@ interface HydrateResults {
|
|
|
480
490
|
search: string | null;
|
|
481
491
|
hash: string | null;
|
|
482
492
|
html: string | null;
|
|
483
|
-
components:
|
|
484
|
-
anchors:
|
|
485
|
-
imgs:
|
|
486
|
-
scripts:
|
|
487
|
-
styles:
|
|
488
|
-
staticData:
|
|
493
|
+
components: SsrComponent[];
|
|
494
|
+
anchors: SsrAnchorElement[];
|
|
495
|
+
imgs: SsrImgElement[];
|
|
496
|
+
scripts: SsrScriptElement[];
|
|
497
|
+
styles: SsrStyleElement[];
|
|
498
|
+
staticData: SsrStaticData[];
|
|
489
499
|
title: string | null;
|
|
490
500
|
hydratedCount: number;
|
|
491
501
|
httpStatus: number | null;
|
|
492
502
|
}
|
|
493
|
-
interface
|
|
503
|
+
interface SsrComponent {
|
|
494
504
|
tag: string;
|
|
495
505
|
mode: string;
|
|
496
506
|
count: number;
|
|
497
507
|
depth: number;
|
|
498
508
|
}
|
|
499
|
-
interface
|
|
509
|
+
interface SsrElement {
|
|
500
510
|
[attrName: string]: string | undefined;
|
|
501
511
|
}
|
|
502
|
-
interface
|
|
512
|
+
interface SsrAnchorElement extends SsrElement {
|
|
503
513
|
href?: string;
|
|
504
514
|
target?: string;
|
|
505
515
|
}
|
|
506
|
-
interface
|
|
516
|
+
interface SsrImgElement extends SsrElement {
|
|
507
517
|
src?: string;
|
|
508
518
|
}
|
|
509
|
-
interface
|
|
519
|
+
interface SsrScriptElement extends SsrElement {
|
|
510
520
|
src?: string;
|
|
511
521
|
type?: string;
|
|
512
522
|
}
|
|
513
|
-
interface
|
|
523
|
+
interface SsrStyleElement extends SsrElement {
|
|
514
524
|
id?: string;
|
|
515
525
|
href?: string;
|
|
516
526
|
content?: string;
|
|
517
527
|
}
|
|
518
|
-
interface
|
|
528
|
+
interface SsrStaticData {
|
|
519
529
|
id: string;
|
|
520
530
|
type: string;
|
|
521
531
|
content: string;
|
|
@@ -612,61 +622,61 @@ interface RenderNode extends HostElement {
|
|
|
612
622
|
['s-en']?: '' | /*shadow*/'c';
|
|
613
623
|
/**
|
|
614
624
|
* On a `scoped: true` component
|
|
615
|
-
* with `
|
|
625
|
+
* with `lightDomPatches` flag enabled,
|
|
616
626
|
* returns the internal `childNodes` of the component
|
|
617
627
|
*/
|
|
618
628
|
readonly __childNodes?: NodeListOf<ChildNode>;
|
|
619
629
|
/**
|
|
620
630
|
* On a `scoped: true` component
|
|
621
|
-
* with `
|
|
631
|
+
* with `lightDomPatches` flag enabled,
|
|
622
632
|
* returns the internal `children` of the component
|
|
623
633
|
*/
|
|
624
634
|
readonly __children?: HTMLCollectionOf<Element>;
|
|
625
635
|
/**
|
|
626
636
|
* On a `scoped: true` component
|
|
627
|
-
* with `
|
|
637
|
+
* with `lightDomPatches` flag enabled,
|
|
628
638
|
* returns the internal `firstChild` of the component
|
|
629
639
|
*/
|
|
630
640
|
readonly __firstChild?: ChildNode;
|
|
631
641
|
/**
|
|
632
642
|
* On a `scoped: true` component
|
|
633
|
-
* with `
|
|
643
|
+
* with `lightDomPatches` flag enabled,
|
|
634
644
|
* returns the internal `lastChild` of the component
|
|
635
645
|
*/
|
|
636
646
|
readonly __lastChild?: ChildNode;
|
|
637
647
|
/**
|
|
638
648
|
* On a `scoped: true` component
|
|
639
|
-
* with `
|
|
649
|
+
* with `lightDomPatches` flag enabled,
|
|
640
650
|
* returns the internal `textContent` of the component
|
|
641
651
|
*/
|
|
642
652
|
__textContent?: string;
|
|
643
653
|
/**
|
|
644
654
|
* On a `scoped: true` component
|
|
645
|
-
* with `
|
|
655
|
+
* with `lightDomPatches` flag enabled,
|
|
646
656
|
* gives access to the original `append` method
|
|
647
657
|
*/
|
|
648
658
|
__append?: (...nodes: (Node | string)[]) => void;
|
|
649
659
|
/**
|
|
650
660
|
* On a `scoped: true` component
|
|
651
|
-
* with `
|
|
661
|
+
* with `lightDomPatches` flag enabled,
|
|
652
662
|
* gives access to the original `prepend` method
|
|
653
663
|
*/
|
|
654
664
|
__prepend?: (...nodes: (Node | string)[]) => void;
|
|
655
665
|
/**
|
|
656
666
|
* On a `scoped: true` component
|
|
657
|
-
* with `
|
|
667
|
+
* with `lightDomPatches` flag enabled,
|
|
658
668
|
* gives access to the original `appendChild` method
|
|
659
669
|
*/
|
|
660
670
|
__appendChild?: <T extends Node>(newChild: T) => T;
|
|
661
671
|
/**
|
|
662
672
|
* On a `scoped: true` component
|
|
663
|
-
* with `
|
|
673
|
+
* with `lightDomPatches` flag enabled,
|
|
664
674
|
* gives access to the original `insertBefore` method
|
|
665
675
|
*/
|
|
666
676
|
__insertBefore?: <T extends Node>(node: T, child: Node | null) => T;
|
|
667
677
|
/**
|
|
668
678
|
* On a `scoped: true` component
|
|
669
|
-
* with `
|
|
679
|
+
* with `lightDomPatches` flag enabled,
|
|
670
680
|
* gives access to the original `removeChild` method
|
|
671
681
|
*/
|
|
672
682
|
__removeChild?: <T extends Node>(child: T) => T;
|
|
@@ -704,31 +714,31 @@ interface PatchedSlotNode extends Node {
|
|
|
704
714
|
['s-sr']?: boolean;
|
|
705
715
|
/**
|
|
706
716
|
* On a `scoped: true` component
|
|
707
|
-
* with `
|
|
717
|
+
* with `lightDomPatches` flag enabled,
|
|
708
718
|
* returns the actual `parentNode` of the component
|
|
709
719
|
*/
|
|
710
720
|
__parentNode?: RenderNode;
|
|
711
721
|
/**
|
|
712
722
|
* On a `scoped: true` component
|
|
713
|
-
* with `
|
|
723
|
+
* with `lightDomPatches` flag enabled,
|
|
714
724
|
* returns the actual `nextSibling` of the component
|
|
715
725
|
*/
|
|
716
726
|
__nextSibling?: RenderNode;
|
|
717
727
|
/**
|
|
718
728
|
* On a `scoped: true` component
|
|
719
|
-
* with `
|
|
729
|
+
* with `lightDomPatches` flag enabled,
|
|
720
730
|
* returns the actual `previousSibling` of the component
|
|
721
731
|
*/
|
|
722
732
|
__previousSibling?: RenderNode;
|
|
723
733
|
/**
|
|
724
734
|
* On a `scoped: true` component
|
|
725
|
-
* with `
|
|
735
|
+
* with `lightDomPatches` flag enabled,
|
|
726
736
|
* returns the actual `nextElementSibling` of the component
|
|
727
737
|
*/
|
|
728
738
|
__nextElementSibling?: RenderNode;
|
|
729
739
|
/**
|
|
730
740
|
* On a `scoped: true` component
|
|
731
|
-
* with `
|
|
741
|
+
* with `lightDomPatches` flag enabled,
|
|
732
742
|
* returns the actual `nextElementSibling` of the component
|
|
733
743
|
*/
|
|
734
744
|
__previousElementSibling?: RenderNode;
|
|
@@ -829,7 +839,7 @@ type ComponentRuntimeReflectingAttr = [string, string | undefined];
|
|
|
829
839
|
* associated {@link HostRef} instance.
|
|
830
840
|
*/
|
|
831
841
|
type RuntimeRef = HostElement | {
|
|
832
|
-
|
|
842
|
+
__s_ghr?: () => HostRef;
|
|
833
843
|
};
|
|
834
844
|
/**
|
|
835
845
|
* Interface used to track an Element, it's virtual Node (`VNode`), and other data
|
|
@@ -840,6 +850,9 @@ interface HostRef {
|
|
|
840
850
|
$cmpMeta$: ComponentRuntimeMeta;
|
|
841
851
|
$hostElement$: HostElement;
|
|
842
852
|
$instanceValues$?: Map<string, any>;
|
|
853
|
+
$signalValues$?: Map<string, import('@preact/signals-core').Signal<any>>;
|
|
854
|
+
/** Dispose function that tears down all signal effects for this component. */
|
|
855
|
+
$signalCleanup$?: () => void;
|
|
843
856
|
$serializerValues$?: Map<string, string>;
|
|
844
857
|
$lazyInstance$?: ComponentInterface;
|
|
845
858
|
/**
|
|
@@ -930,19 +943,26 @@ type ChildType = VNode | number | string;
|
|
|
930
943
|
//#region src/server/platform/h-async.d.ts
|
|
931
944
|
declare const hAsync: (nodeName: any, vnodeData: any, ...children: ChildType[]) => VNode | Promise<VNode>;
|
|
932
945
|
//#endregion
|
|
933
|
-
//#region src/server/platform/
|
|
934
|
-
|
|
935
|
-
|
|
936
|
-
|
|
937
|
-
|
|
938
|
-
|
|
946
|
+
//#region src/server/platform/ssr-app.d.ts
|
|
947
|
+
/**
|
|
948
|
+
* SSR a Document by patching the DOM APIs to wait for components to be connected and hydrated
|
|
949
|
+
* before allowing them to be added to the document.
|
|
950
|
+
* Once all components are hydrated, the `afterSsr` callback is called so that the caller can serialize
|
|
951
|
+
* the document to HTML and send it back to the client.
|
|
952
|
+
* @param win The window to use for SSR. This should be a patched window created by `patchDomImplementation`.
|
|
953
|
+
* @param opts The options to use for SSR. This is used to configure which components should be hydrated, how long to wait for hydration, etc.
|
|
954
|
+
* @param results The results object to store the hydration results.
|
|
955
|
+
* @param afterSsr The callback to be called after SSR is complete.
|
|
956
|
+
* @param resolve The resolve function to be called when SSR is complete.
|
|
957
|
+
*/
|
|
958
|
+
declare function ssrApp(win: Window & typeof globalThis, opts: SsrFactoryOptions, results: SsrResults, afterSsr: (win: Window, opts: SsrFactoryOptions, results: SsrResults, resolve: (results: SsrResults) => void) => void, resolve: (results: SsrResults) => void): void;
|
|
939
959
|
//#endregion
|
|
940
|
-
//#region src/runtime/bootstrap-
|
|
960
|
+
//#region src/runtime/bootstrap-standalone.d.ts
|
|
941
961
|
declare const defineCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMetaCompact) => void;
|
|
942
962
|
declare const proxyCustomElement: (Cstr: any, compactMeta: ComponentRuntimeMetaCompact) => any;
|
|
943
963
|
declare const forceModeUpdate: (elm: RenderNode) => void;
|
|
944
964
|
//#endregion
|
|
945
|
-
//#region src/runtime/bootstrap-
|
|
965
|
+
//#region src/runtime/bootstrap-loader.d.ts
|
|
946
966
|
declare const bootstrapLazy: (lazyBundles: LazyBundlesRuntimeData, options?: CustomElementsDefineOptions) => void;
|
|
947
967
|
//#endregion
|
|
948
968
|
//#region src/runtime/connected-callback.d.ts
|
|
@@ -953,6 +973,18 @@ declare const disconnectedCallback: (elm: HostElement) => Promise<void>;
|
|
|
953
973
|
//#endregion
|
|
954
974
|
//#region src/runtime/element.d.ts
|
|
955
975
|
declare const getElement: (ref: any) => HostElement;
|
|
976
|
+
/**
|
|
977
|
+
* Get the shadow root for a Stencil component's host element.
|
|
978
|
+
* This works for both open and closed shadow DOM modes.
|
|
979
|
+
*
|
|
980
|
+
* For closed shadow DOM, `element.shadowRoot` returns `null` by design,
|
|
981
|
+
* but Stencil stores the reference internally so components can still
|
|
982
|
+
* access their own shadow root.
|
|
983
|
+
*
|
|
984
|
+
* @param element The host element (from @Element() decorator)
|
|
985
|
+
* @returns The shadow root, or null if no shadow root exists
|
|
986
|
+
*/
|
|
987
|
+
declare const getShadowRoot: (element: HTMLElement) => ShadowRoot | null;
|
|
956
988
|
//#endregion
|
|
957
989
|
//#region src/runtime/event-emitter.d.ts
|
|
958
990
|
declare const createEvent: (ref: RuntimeRef, name: string, flags: number) => {
|
|
@@ -963,7 +995,7 @@ declare const createEvent: (ref: RuntimeRef, name: string, flags: number) => {
|
|
|
963
995
|
declare const Fragment: FunctionalComponent;
|
|
964
996
|
//#endregion
|
|
965
997
|
//#region src/runtime/host-listener.d.ts
|
|
966
|
-
declare const addHostEventListeners: (elm: HostElement, hostRef: HostRef, listeners?: ComponentRuntimeHostListener[]
|
|
998
|
+
declare const addHostEventListeners: (elm: HostElement, hostRef: HostRef, listeners?: ComponentRuntimeHostListener[]) => void;
|
|
967
999
|
//#endregion
|
|
968
1000
|
//#region src/runtime/mixin.d.ts
|
|
969
1001
|
type Ctor<T = {}> = new (...args: any[]) => T;
|
|
@@ -1053,26 +1085,11 @@ declare const forceUpdate: (ref: any) => boolean;
|
|
|
1053
1085
|
declare const Host: {};
|
|
1054
1086
|
//#endregion
|
|
1055
1087
|
//#region src/runtime/vdom/jsx-runtime.d.ts
|
|
1056
|
-
/**
|
|
1057
|
-
* JSX runtime function for creating elements in production mode.
|
|
1058
|
-
* Called by TypeScript's jsx transform for elements without static children.
|
|
1059
|
-
*
|
|
1060
|
-
* @param type - The element type (string tag name or functional component)
|
|
1061
|
-
* @param props - The element props (includes children)
|
|
1062
|
-
* @param key - Optional key for the element
|
|
1063
|
-
* @returns A virtual DOM node
|
|
1064
|
-
*/
|
|
1065
1088
|
declare function jsx(type: any, props: any, key?: string): VNode;
|
|
1066
1089
|
/**
|
|
1067
|
-
*
|
|
1068
|
-
* Called by TypeScript's jsx transform as an optimization when children are static.
|
|
1069
|
-
*
|
|
1070
|
-
* @param type - The element type (string tag name or functional component)
|
|
1071
|
-
* @param props - The element props (includes children)
|
|
1072
|
-
* @param key - Optional key for the element
|
|
1073
|
-
* @returns A virtual DOM node
|
|
1090
|
+
* @alias
|
|
1074
1091
|
*/
|
|
1075
|
-
declare
|
|
1092
|
+
declare const jsxs: typeof jsx;
|
|
1076
1093
|
//#endregion
|
|
1077
1094
|
//#region src/runtime/vdom/vdom-annotations.d.ts
|
|
1078
1095
|
/**
|
|
@@ -1126,7 +1143,6 @@ declare const setPlatformHelpers: (helpers: {
|
|
|
1126
1143
|
rel?: (el: any, eventName: string, listener: any, options: any) => void;
|
|
1127
1144
|
ce?: (eventName: string, opts?: any) => any;
|
|
1128
1145
|
}) => void;
|
|
1129
|
-
declare const supportsShadow: boolean;
|
|
1130
1146
|
declare const supportsListenerOptions = false;
|
|
1131
1147
|
declare const supportsConstructableStylesheets = false;
|
|
1132
1148
|
declare const supportsMutableAdoptedStyleSheets = false;
|
|
@@ -1136,11 +1152,28 @@ declare const registerHost: (elm: HostElement, cmpMeta: ComponentRuntimeMeta) =>
|
|
|
1136
1152
|
declare const Build: UserBuildConditionals;
|
|
1137
1153
|
declare const styles: StyleMap;
|
|
1138
1154
|
declare const modeResolutionChain: ResolutionHandler[];
|
|
1155
|
+
/**
|
|
1156
|
+
* Server-side implementation of getAssetPath.
|
|
1157
|
+
*
|
|
1158
|
+
* Unlike the client-side version, this doesn't use import.meta.url as a fallback
|
|
1159
|
+
* because it doesn't make sense in the bundled hydrate factory context.
|
|
1160
|
+
* The base URL must come from plt.$resourcesUrl$ (set via hydration options).
|
|
1161
|
+
* @param path - The relative path to the asset
|
|
1162
|
+
* @returns The resolved asset path, which may be an absolute URL if resourcesUrl is set to an external URL, or a relative path if resourcesUrl is a relative path or not set at all
|
|
1163
|
+
*/
|
|
1164
|
+
declare const getAssetPath: (path: string) => string;
|
|
1165
|
+
/**
|
|
1166
|
+
* Sets the base URL for resolving asset paths in the server/hydrate context.
|
|
1167
|
+
* @param path - The base URL to use for resolving asset paths. This should typically be set to the same value as the `resourcesUrl` option passed to `ssrDocument` to ensure that asset paths are resolved correctly in the server/hydrate context.
|
|
1168
|
+
* If not set, it defaults to './', which is a reasonable default for server-side rendering.
|
|
1169
|
+
* @returns void
|
|
1170
|
+
*/
|
|
1171
|
+
declare const setAssetPath: (path: string) => string;
|
|
1139
1172
|
/**
|
|
1140
1173
|
* Checks to see any components are rendered with `scoped`
|
|
1141
1174
|
* @param opts - SSR options
|
|
1142
1175
|
*/
|
|
1143
|
-
declare const
|
|
1176
|
+
declare const setScopedSsr: (opts: SsrFactoryOptions) => void;
|
|
1144
1177
|
declare const needsScopedSSR: () => boolean;
|
|
1145
1178
|
//#endregion
|
|
1146
|
-
export { BUILD, Build, Env, Fragment, Host, Mixin, NAMESPACE, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, getValue, hAsync as h,
|
|
1179
|
+
export { BUILD, Build, Env, Fragment, Host, Mixin, NAMESPACE, addHostEventListeners, bootstrapLazy, cmpModules, connectedCallback, consoleDevError, consoleDevInfo, consoleDevWarn, consoleError, createEvent, defineCustomElement, disconnectedCallback, forceModeUpdate, forceUpdate, getAssetPath, getElement, getHostRef, getMode, getRenderingRef, getShadowRoot, getValue, hAsync as h, insertVdomAnnotations, isMemberInElement, jsx, jsxs, loadModule, modeResolutionChain, needsScopedSSR, nextTick, parsePropertyValue, plt, postUpdateComponent, proxyComponent, proxyCustomElement, readTask, registerComponents, registerHost, registerInstance, renderVdom, setAssetPath, setErrorHandler, setMode, setNonce, setPlatformHelpers, setScopedSsr, setTagTransformer, setValue, ssrApp, styles, supportsConstructableStylesheets, supportsListenerOptions, supportsMutableAdoptedStyleSheets, transformTag, win, writeTask };
|