@stencil/core 5.0.0-alpha.3 → 5.0.0-alpha.31
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/dist/app-data/index.d.ts +2 -0
- package/dist/{runtime/app-data → app-data}/index.js +17 -11
- package/dist/{client-CSm3x5ke.mjs → client-D1MsT-Rp.mjs} +2717 -2424
- package/dist/compiler/index.d.mts +170 -6
- package/dist/compiler/index.mjs +4 -3
- package/dist/compiler/utils/index.d.mts +272 -2
- package/dist/compiler/utils/index.mjs +4 -3
- package/dist/{compiler-D6iP7Bzb.mjs → compiler-Cddp97Pg.mjs} +14953 -12327
- package/dist/declarations/stencil-ext-modules.d.ts +5 -5
- package/dist/declarations/stencil-public-compiler.d.ts +728 -287
- package/dist/declarations/stencil-public-compiler.js +2 -3
- package/dist/declarations/stencil-public-docs.d.ts +19 -0
- package/dist/declarations/stencil-public-runtime.d.ts +131 -17
- package/dist/fragment-Di1hWOC8.mjs +4 -0
- package/dist/{index-tUR6pD3J.d.mts → index-BHj3EBl2.d.mts} +1052 -668
- package/dist/{index-CyrGY82h.d.ts → index-D2PAsXxx.d.ts} +215 -40
- package/dist/index-VK8okIiF.d.mts +108 -0
- package/dist/index.d.mts +4 -1
- package/dist/index.mjs +91 -2
- package/dist/jsx-runtime.d.mts +18 -0
- package/dist/jsx-runtime.mjs +3 -0
- package/dist/{node-Bg-mO5dw.mjs → node-BQR4L-TG.mjs} +76 -73
- package/dist/reactive-controller-BdCpSAQP.d.mts +13 -0
- package/dist/{regular-expression-D5pGVpCu.mjs → regular-expression-XqU5zmPp.mjs} +141 -31
- package/dist/{chunk-CjcI7cDX.mjs → rolldown-runtime-BhDjJH2R.mjs} +1 -1
- package/dist/{runtime-BBCnuprF.js → runtime/client/lazy.js} +2987 -2443
- package/dist/runtime/client/{index.d.ts → runtime.d.ts} +228 -83
- package/dist/runtime/client/{index.js → runtime.js} +2852 -2432
- package/dist/runtime/index.d.ts +48 -29
- package/dist/runtime/index.js +5069 -2
- package/dist/runtime/server/index.d.mts +182 -75
- package/dist/runtime/server/index.mjs +2769 -2283
- package/dist/runtime/server/runner.d.mts +47 -32
- package/dist/runtime/server/runner.mjs +563 -687
- package/dist/signals/index.d.ts +49 -0
- package/dist/signals/index.js +199 -0
- package/dist/sys/node/index.d.mts +1 -2
- package/dist/sys/node/index.mjs +1 -1
- package/dist/sys/node/worker.d.mts +1 -1
- package/dist/sys/node/worker.mjs +6 -3
- package/dist/testing/index.d.mts +98 -9
- package/dist/testing/index.mjs +395 -70
- package/dist/util-BIa-iHnt.mjs +724 -0
- package/dist/validation-Dd3g77T5.mjs +778 -0
- package/package.json +49 -36
- package/dist/index-CXHCTQNt.d.mts +0 -190
- package/dist/index-hS-KBdAP.d.ts +0 -30
- package/dist/jsx-runtime-DlDkTqps.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/validation-Byxie0Uk.mjs +0 -1445
- /package/{LICENSE.md → LICENSE} +0 -0
- /package/dist/{runtime/app-globals → app-globals}/index.d.ts +0 -0
- /package/dist/{runtime/app-globals → app-globals}/index.js +0 -0
|
@@ -1,4 +1,6 @@
|
|
|
1
1
|
import { ListenTargetOptions, ResolutionHandler } from "./stencil-public-runtime.js";
|
|
2
|
+
import { InputOptions, SourceMap as RolldownSourceMap } from "rolldown";
|
|
3
|
+
import "typescript";
|
|
2
4
|
//#region src/utils/result.d.ts
|
|
3
5
|
/**
|
|
4
6
|
* A Result wraps up a success state and a failure state, allowing you to
|
|
@@ -45,15 +47,6 @@ type Err<T> = {
|
|
|
45
47
|
isErr: true;
|
|
46
48
|
value: T;
|
|
47
49
|
};
|
|
48
|
-
/**
|
|
49
|
-
* Create an `Ok` given a value. This doesn't do any checking that the value is
|
|
50
|
-
* 'ok-ish' since doing so would make an undue assumption about what is 'ok'.
|
|
51
|
-
* Instead, this trusts the user to determine, at the call site, whether
|
|
52
|
-
* something is `ok()` or `err()`.
|
|
53
|
-
*
|
|
54
|
-
* @param value the value to wrap up in an `Ok`
|
|
55
|
-
* @returns an Ok wrapping the value
|
|
56
|
-
*/
|
|
57
50
|
//#endregion
|
|
58
51
|
//#region src/compiler/sys/in-memory-fs.d.ts
|
|
59
52
|
/**
|
|
@@ -230,10 +223,6 @@ declare const createInMemoryFs: (sys: CompilerSystem) => {
|
|
|
230
223
|
* `[ source, destination ]`
|
|
231
224
|
*/
|
|
232
225
|
type FileCopyTuple = [string, string];
|
|
233
|
-
/**
|
|
234
|
-
* Collected instructions for all pending filesystem operations saved
|
|
235
|
-
* to the in-memory filesystem.
|
|
236
|
-
*/
|
|
237
226
|
/**
|
|
238
227
|
* Results from committing pending filesystem operations
|
|
239
228
|
*/
|
|
@@ -244,14 +233,6 @@ interface FsCommitResults {
|
|
|
244
233
|
dirsDeleted: string[];
|
|
245
234
|
dirsAdded: string[];
|
|
246
235
|
}
|
|
247
|
-
/**
|
|
248
|
-
* Given the current state of the in-memory proxy filesystem, collect all of
|
|
249
|
-
* the changes that need to be made in order to commit the currently-pending
|
|
250
|
-
* operations (e.g. write, copy, delete) to the OS filesystem.
|
|
251
|
-
*
|
|
252
|
-
* @param items the storage data structure for the in-memory FS cache
|
|
253
|
-
* @returns a collection of all the operations that need to be done
|
|
254
|
-
*/
|
|
255
236
|
//#endregion
|
|
256
237
|
//#region src/declarations/stencil-public-docs.d.ts
|
|
257
238
|
/**
|
|
@@ -274,6 +255,13 @@ interface JsonDocs {
|
|
|
274
255
|
* The metadata for the JSDocs for each component in a Stencil project
|
|
275
256
|
*/
|
|
276
257
|
components: JsonDocsComponent[];
|
|
258
|
+
/**
|
|
259
|
+
* Project-level usage content, collected from markdown files in a `usage`
|
|
260
|
+
* directory at the project's {@link Config.srcDir} root (as opposed to
|
|
261
|
+
* per-component usage content, which lives in {@link JsonDocsComponent.usage}).
|
|
262
|
+
* Keyed by file name (without extension), same shape as component usage.
|
|
263
|
+
*/
|
|
264
|
+
usage?: JsonDocsUsage;
|
|
277
265
|
/**
|
|
278
266
|
* The timestamp at which the metadata was generated, in the format YYYY-MM-DDThh:mm:ss
|
|
279
267
|
*/
|
|
@@ -670,6 +658,103 @@ interface PrintLine {
|
|
|
670
658
|
errorCharStart: number;
|
|
671
659
|
errorLength?: number;
|
|
672
660
|
}
|
|
661
|
+
interface BuildFeatures {
|
|
662
|
+
style: boolean;
|
|
663
|
+
mode: boolean;
|
|
664
|
+
formAssociated: boolean;
|
|
665
|
+
shadowDom: boolean;
|
|
666
|
+
shadowDelegatesFocus: boolean;
|
|
667
|
+
shadowModeClosed: boolean;
|
|
668
|
+
shadowSlotAssignmentManual: boolean;
|
|
669
|
+
scoped: boolean;
|
|
670
|
+
/**
|
|
671
|
+
* Every component has a render function
|
|
672
|
+
*/
|
|
673
|
+
allRenderFn: boolean;
|
|
674
|
+
/**
|
|
675
|
+
* At least one component has a render function
|
|
676
|
+
*/
|
|
677
|
+
hasRenderFn: boolean;
|
|
678
|
+
vdomRender: boolean;
|
|
679
|
+
vdomAttribute: boolean;
|
|
680
|
+
vdomClass: boolean;
|
|
681
|
+
vdomFunctional: boolean;
|
|
682
|
+
vdomKey: boolean;
|
|
683
|
+
vdomListener: boolean;
|
|
684
|
+
vdomPropOrAttr: boolean;
|
|
685
|
+
vdomRef: boolean;
|
|
686
|
+
vdomStyle: boolean;
|
|
687
|
+
vdomText: boolean;
|
|
688
|
+
vdomXlink: boolean;
|
|
689
|
+
vdomSignals: boolean;
|
|
690
|
+
slotRelocation: boolean;
|
|
691
|
+
patchAll: boolean;
|
|
692
|
+
patchChildren: boolean;
|
|
693
|
+
patchClone: boolean;
|
|
694
|
+
patchInsert: boolean;
|
|
695
|
+
slot: boolean;
|
|
696
|
+
svg: boolean;
|
|
697
|
+
element: boolean;
|
|
698
|
+
event: boolean;
|
|
699
|
+
hostListener: boolean;
|
|
700
|
+
hostListenerTargetWindow: boolean;
|
|
701
|
+
hostListenerTargetDocument: boolean;
|
|
702
|
+
hostListenerTargetBody: boolean;
|
|
703
|
+
hostListenerTarget: boolean;
|
|
704
|
+
method: boolean;
|
|
705
|
+
prop: boolean;
|
|
706
|
+
propChangeCallback: boolean;
|
|
707
|
+
propMutable: boolean;
|
|
708
|
+
state: boolean;
|
|
709
|
+
member: boolean;
|
|
710
|
+
updatable: boolean;
|
|
711
|
+
propBoolean: boolean;
|
|
712
|
+
propNumber: boolean;
|
|
713
|
+
propString: boolean;
|
|
714
|
+
serializer: boolean;
|
|
715
|
+
deserializer: boolean;
|
|
716
|
+
lifecycle: boolean;
|
|
717
|
+
asyncLoading: boolean;
|
|
718
|
+
observeAttribute: boolean;
|
|
719
|
+
reflect: boolean;
|
|
720
|
+
taskQueue: boolean;
|
|
721
|
+
}
|
|
722
|
+
interface BuildConditionals extends Partial<BuildFeatures> {
|
|
723
|
+
hotModuleReplacement?: boolean;
|
|
724
|
+
isDebug?: boolean;
|
|
725
|
+
isTesting?: boolean;
|
|
726
|
+
isDev?: boolean;
|
|
727
|
+
devTools?: boolean;
|
|
728
|
+
invisiblePrehydration?: boolean;
|
|
729
|
+
hydrateServerSide?: boolean;
|
|
730
|
+
hydrateClientSide?: boolean;
|
|
731
|
+
lifecycleDOMEvents?: boolean;
|
|
732
|
+
cssAnnotations?: boolean;
|
|
733
|
+
lazyLoad?: boolean;
|
|
734
|
+
profile?: boolean;
|
|
735
|
+
constructableCSS?: boolean;
|
|
736
|
+
/** True when `compat.lightDomPatches === true` - enables `applyLightDomPatches` shortcut. */
|
|
737
|
+
lightDomPatches?: boolean;
|
|
738
|
+
/** Patch `childNodes`/`children` getters on light-dom slotted components. */
|
|
739
|
+
slotChildNodes?: boolean;
|
|
740
|
+
/** Patch `cloneNode()` on light-dom slotted components. */
|
|
741
|
+
slotCloneNode?: boolean;
|
|
742
|
+
/** Patch `appendChild`/`insertBefore`/`removeChild` on light-dom slotted components. */
|
|
743
|
+
slotDomMutations?: boolean;
|
|
744
|
+
/** Patch `textContent` on light-dom slotted components. */
|
|
745
|
+
slotTextContent?: boolean;
|
|
746
|
+
hydratedAttribute?: boolean;
|
|
747
|
+
hydratedClass?: boolean;
|
|
748
|
+
hydratedSelectorName?: string;
|
|
749
|
+
/** True when a global-style input contains `@import "stencil-hydrate"` - suppresses dynamic style injection in the loader. */
|
|
750
|
+
staticHydrationStyles?: boolean;
|
|
751
|
+
initializeNextTick?: boolean;
|
|
752
|
+
asyncQueue?: boolean;
|
|
753
|
+
additionalTagTransformers?: boolean | 'prod';
|
|
754
|
+
signalBacking?: boolean;
|
|
755
|
+
/** True when JSX signal bypass is active - text nodes and attributes backed by Signal objects update the DOM directly. Auto-enabled when `signalBacking: true`. */
|
|
756
|
+
vdomSignals?: boolean;
|
|
757
|
+
}
|
|
673
758
|
type ModuleFormat = 'amd' | 'cjs' | 'es' | 'iife' | 'system' | 'umd' | 'commonjs' | 'esm' | 'module' | 'systemjs';
|
|
674
759
|
interface RolldownResultModule {
|
|
675
760
|
id: string;
|
|
@@ -715,15 +800,17 @@ interface BuildCtx {
|
|
|
715
800
|
hasScriptChanges: boolean;
|
|
716
801
|
hasStyleChanges: boolean;
|
|
717
802
|
hasWarning: boolean;
|
|
718
|
-
|
|
803
|
+
ssrAppFilePath: string;
|
|
719
804
|
indexBuildCount: number;
|
|
720
805
|
indexDoc: Document;
|
|
806
|
+
/** All non-entry HTML files found in srcDir, keyed by path relative to srcDir */
|
|
807
|
+
htmlDocs: Map<string, Document>;
|
|
721
808
|
isRebuild: boolean;
|
|
722
809
|
/**
|
|
723
810
|
* A collection of Stencil's intermediate representation of components, tied to the current build
|
|
724
811
|
*/
|
|
725
812
|
moduleFiles: Module[];
|
|
726
|
-
packageJson: PackageJsonData;
|
|
813
|
+
packageJson: PackageJsonData | null;
|
|
727
814
|
pendingCopyTasks: Promise<CopyResults>[];
|
|
728
815
|
progress(task: BuildTask): void;
|
|
729
816
|
requiresFullBuild: boolean;
|
|
@@ -767,8 +854,6 @@ interface CompilerBuildStats {
|
|
|
767
854
|
options: {
|
|
768
855
|
minifyJs: boolean;
|
|
769
856
|
minifyCss: boolean;
|
|
770
|
-
hashFileNames: boolean;
|
|
771
|
-
hashedFileNameLength: number;
|
|
772
857
|
};
|
|
773
858
|
formats: {
|
|
774
859
|
esmBrowser: ReadonlyArray<CompilerBuildStatBundle>;
|
|
@@ -817,16 +902,6 @@ interface RolldownChunkResult {
|
|
|
817
902
|
moduleFormat: ModuleFormat;
|
|
818
903
|
map?: RolldownSourceMap;
|
|
819
904
|
}
|
|
820
|
-
interface RolldownSourceMap {
|
|
821
|
-
file: string;
|
|
822
|
-
mappings: string;
|
|
823
|
-
names: string[];
|
|
824
|
-
sources: string[];
|
|
825
|
-
sourcesContent: string[];
|
|
826
|
-
version: number;
|
|
827
|
-
toString(): string;
|
|
828
|
-
toUrl(): string;
|
|
829
|
-
}
|
|
830
905
|
interface BundleModule {
|
|
831
906
|
entryKey: string;
|
|
832
907
|
rolldownResult: RolldownChunkResult;
|
|
@@ -862,12 +937,32 @@ interface CollectionCompilerMeta {
|
|
|
862
937
|
bundles?: {
|
|
863
938
|
components: string[];
|
|
864
939
|
}[];
|
|
940
|
+
buildFlags?: Partial<BuildConditionals>;
|
|
865
941
|
}
|
|
866
942
|
interface CollectionCompilerVersion {
|
|
867
943
|
name: string;
|
|
868
944
|
version: string;
|
|
869
945
|
typescriptVersion?: string;
|
|
870
946
|
}
|
|
947
|
+
/**
|
|
948
|
+
* A memoized result of the SASS + Lightning CSS transformation for a single stylesheet, keyed by
|
|
949
|
+
* the annotated Rolldown import id (e.g. `/path/to/comp.scss?tag=ion-button&encapsulation=shadow`).
|
|
950
|
+
*
|
|
951
|
+
* Storing this allows all output targets (customElements, lazy, hydrate) that process the same
|
|
952
|
+
* stylesheets to share a single computation instead of repeating it N times.
|
|
953
|
+
*/
|
|
954
|
+
interface CssTransformCacheEntry {
|
|
955
|
+
/** Resolved file ID after plugin (SASS) transforms */
|
|
956
|
+
pluginTransformId: string;
|
|
957
|
+
/** CSS source produced by the SASS / plugin pipeline */
|
|
958
|
+
pluginTransformCode: string;
|
|
959
|
+
/** File dependencies discovered during the SASS transform (e.g. `@import`-ed partials) */
|
|
960
|
+
pluginTransformDependencies: string[];
|
|
961
|
+
/** Diagnostics emitted during the plugin transform pass */
|
|
962
|
+
pluginTransformDiagnostics: Diagnostic[];
|
|
963
|
+
/** Full output of the subsequent `transformCssToEsm` call */
|
|
964
|
+
cssTransformOutput: TransformCssToEsmOutput;
|
|
965
|
+
}
|
|
871
966
|
interface CompilerCtx {
|
|
872
967
|
version: number;
|
|
873
968
|
activeBuildId: number;
|
|
@@ -880,7 +975,8 @@ interface CompilerCtx {
|
|
|
880
975
|
addWatchFile: (path: string) => void;
|
|
881
976
|
cache: Cache;
|
|
882
977
|
cssModuleImports: Map<string, string[]>;
|
|
883
|
-
|
|
978
|
+
/** Cache of built global styles, keyed by input file path */
|
|
979
|
+
globalStyleCache: Map<string, string>;
|
|
884
980
|
collections: CollectionCompilerMeta[];
|
|
885
981
|
compilerOptions: any;
|
|
886
982
|
events: BuildEvents;
|
|
@@ -894,7 +990,7 @@ interface CompilerCtx {
|
|
|
894
990
|
moduleMap: ModuleMap;
|
|
895
991
|
nodeMap: NodeMap;
|
|
896
992
|
resolvedCollections: Set<string>;
|
|
897
|
-
|
|
993
|
+
rolldownCacheSsr: any;
|
|
898
994
|
rolldownCacheLazy: any;
|
|
899
995
|
rolldownCacheNative: any;
|
|
900
996
|
styleModeNames: Set<string>;
|
|
@@ -902,6 +998,32 @@ interface CompilerCtx {
|
|
|
902
998
|
changedFiles: Set<string>;
|
|
903
999
|
worker?: CompilerWorkerContext;
|
|
904
1000
|
rolldownCache: Map<string, any>;
|
|
1001
|
+
/**
|
|
1002
|
+
* Cross-build cache for {@link ts.transpileModule} results.
|
|
1003
|
+
* Keyed by `"${bundleId}:${normalizedFilePath}"`. Invalidated for any
|
|
1004
|
+
* file that appears in {@link changedModules} after TypeScript re-emits.
|
|
1005
|
+
* @see transpileCache in compiler-ctx.ts
|
|
1006
|
+
*/
|
|
1007
|
+
transpileCache: Map<string, {
|
|
1008
|
+
outputText: string;
|
|
1009
|
+
sourceMapText: string | null;
|
|
1010
|
+
}>;
|
|
1011
|
+
/**
|
|
1012
|
+
* Cross-build cache of the last style text pushed to the HMR client.
|
|
1013
|
+
* Keyed by getScopeId result (e.g. "ion-accordion$ios"). Used by
|
|
1014
|
+
* extTransformsPlugin to avoid re-pushing unchanged styles on every rebuild.
|
|
1015
|
+
*/
|
|
1016
|
+
prevStylesMap: Map<string, string>;
|
|
1017
|
+
/**
|
|
1018
|
+
* Cross-output-target cache for the SASS + Lightning CSS computation.
|
|
1019
|
+
* Keyed by the annotated Rolldown import id. Null entries indicate that the
|
|
1020
|
+
* source file could not be read (propagated as a `null` return from the
|
|
1021
|
+
* transform hook).
|
|
1022
|
+
*
|
|
1023
|
+
* Entries are invalidated in `invalidateRolldownCaches` whenever a
|
|
1024
|
+
* source file or one of its SASS dependencies is modified.
|
|
1025
|
+
*/
|
|
1026
|
+
cssTransformCache: Map<string, CssTransformCacheEntry | null>;
|
|
905
1027
|
reset(): void;
|
|
906
1028
|
}
|
|
907
1029
|
type NodeMap = WeakMap<any, ComponentCompilerMeta>;
|
|
@@ -962,10 +1084,12 @@ interface ComponentCompilerFeatures {
|
|
|
962
1084
|
hasVdomStyle: boolean;
|
|
963
1085
|
hasVdomText: boolean;
|
|
964
1086
|
hasVdomXlink: boolean;
|
|
1087
|
+
hasSignalsImport: boolean;
|
|
965
1088
|
hasWatchCallback: boolean;
|
|
966
1089
|
htmlAttrNames: string[];
|
|
967
1090
|
htmlTagNames: string[];
|
|
968
1091
|
htmlParts: string[];
|
|
1092
|
+
htmlSlots: string[];
|
|
969
1093
|
isUpdateable: boolean;
|
|
970
1094
|
/**
|
|
971
1095
|
* A plain component is one that doesn't have:
|
|
@@ -1059,6 +1183,7 @@ interface ComponentCompilerMeta extends ComponentCompilerFeatures {
|
|
|
1059
1183
|
states: ComponentCompilerState[];
|
|
1060
1184
|
styleDocs: CompilerStyleDoc[];
|
|
1061
1185
|
styles: StyleCompiler[];
|
|
1186
|
+
globalStyles: ComponentGlobalStyle[];
|
|
1062
1187
|
tagName: string;
|
|
1063
1188
|
virtualProperties: ComponentCompilerVirtualProperty[];
|
|
1064
1189
|
watchers: ComponentCompilerChangeHandler[];
|
|
@@ -1075,7 +1200,7 @@ type Encapsulation = 'shadow' | 'scoped' | 'none';
|
|
|
1075
1200
|
* These enable proper slot behavior when not using native Shadow DOM.
|
|
1076
1201
|
*/
|
|
1077
1202
|
interface ComponentPatches {
|
|
1078
|
-
/** Apply all slot patches (equivalent to
|
|
1203
|
+
/** Apply all slot patches (equivalent to lightDomPatches) */
|
|
1079
1204
|
all?: boolean;
|
|
1080
1205
|
/** Patch child node accessors (children, firstChild, lastChild, etc.) */
|
|
1081
1206
|
children?: boolean;
|
|
@@ -1135,6 +1260,11 @@ interface ComponentCompilerPropertyComplexType {
|
|
|
1135
1260
|
* annotation in the original source file.
|
|
1136
1261
|
*/
|
|
1137
1262
|
references: ComponentCompilerTypeReferences;
|
|
1263
|
+
/**
|
|
1264
|
+
* @internal TypeScript AST node used for semantic type analysis during compilation.
|
|
1265
|
+
* Not serialized, only used internally for improved type renaming logic.
|
|
1266
|
+
*/
|
|
1267
|
+
_astNode?: any;
|
|
1138
1268
|
}
|
|
1139
1269
|
/**
|
|
1140
1270
|
* A record of `ComponentCompilerTypeReference` entities.
|
|
@@ -1228,6 +1358,11 @@ interface ComponentCompilerMethodComplexType {
|
|
|
1228
1358
|
parameters: JsonDocMethodParameter[];
|
|
1229
1359
|
references: ComponentCompilerTypeReferences;
|
|
1230
1360
|
return: string;
|
|
1361
|
+
/**
|
|
1362
|
+
* @internal TypeScript AST method node used for semantic type analysis during compilation.
|
|
1363
|
+
* Not serialized, only used internally for improved type renaming logic.
|
|
1364
|
+
*/
|
|
1365
|
+
_astNode?: any;
|
|
1231
1366
|
}
|
|
1232
1367
|
interface ComponentCompilerChangeHandler {
|
|
1233
1368
|
propName: string;
|
|
@@ -1363,6 +1498,7 @@ interface Module {
|
|
|
1363
1498
|
htmlAttrNames: string[];
|
|
1364
1499
|
htmlTagNames: string[];
|
|
1365
1500
|
htmlParts: string[];
|
|
1501
|
+
htmlSlots: string[];
|
|
1366
1502
|
isCollectionDependency: boolean;
|
|
1367
1503
|
isLegacy: boolean;
|
|
1368
1504
|
jsFilePath: string;
|
|
@@ -1392,6 +1528,7 @@ interface Module {
|
|
|
1392
1528
|
hasVdomStyle: boolean;
|
|
1393
1529
|
hasVdomText: boolean;
|
|
1394
1530
|
hasVdomXlink: boolean;
|
|
1531
|
+
hasSignalsImport: boolean;
|
|
1395
1532
|
}
|
|
1396
1533
|
interface PrerenderUrlResults {
|
|
1397
1534
|
anchorUrls: string[];
|
|
@@ -1404,7 +1541,7 @@ interface PrerenderUrlRequest {
|
|
|
1404
1541
|
baseUrl: string;
|
|
1405
1542
|
componentGraphPath: string;
|
|
1406
1543
|
devServerHostUrl: string;
|
|
1407
|
-
|
|
1544
|
+
ssrAppFilePath: string;
|
|
1408
1545
|
isDebug: boolean;
|
|
1409
1546
|
prerenderConfigPath: string;
|
|
1410
1547
|
staticSite: boolean;
|
|
@@ -1424,6 +1561,12 @@ interface ExternalStyleCompiler {
|
|
|
1424
1561
|
relativePath: string;
|
|
1425
1562
|
originalComponentPath: string;
|
|
1426
1563
|
}
|
|
1564
|
+
interface ComponentGlobalStyle {
|
|
1565
|
+
/** Absolute path to the CSS file, or null for inline styles */
|
|
1566
|
+
absolutePath: string | null;
|
|
1567
|
+
/** Raw inline CSS string, or null for file-based styles */
|
|
1568
|
+
styleStr: string | null;
|
|
1569
|
+
}
|
|
1427
1570
|
/**
|
|
1428
1571
|
* Input CSS to be transformed into ESM
|
|
1429
1572
|
*/
|
|
@@ -1487,7 +1630,6 @@ interface PackageJsonData {
|
|
|
1487
1630
|
browser?: string;
|
|
1488
1631
|
module?: string;
|
|
1489
1632
|
'jsnext:main'?: string;
|
|
1490
|
-
'collection:main'?: string;
|
|
1491
1633
|
unpkg?: string;
|
|
1492
1634
|
collection?: string;
|
|
1493
1635
|
types?: string;
|
|
@@ -1614,20 +1756,6 @@ interface StencilConfig {
|
|
|
1614
1756
|
* @default false
|
|
1615
1757
|
*/
|
|
1616
1758
|
generateExportMaps?: boolean;
|
|
1617
|
-
/**
|
|
1618
|
-
* When the hashFileNames config is set to true, and it is a production build,
|
|
1619
|
-
* the hashedFileNameLength config is used to determine how many characters the file name's hash should be.
|
|
1620
|
-
*/
|
|
1621
|
-
hashedFileNameLength?: number;
|
|
1622
|
-
/**
|
|
1623
|
-
* During production builds, the content of each generated file is hashed to represent the content,
|
|
1624
|
-
* and the hashed value is used as the filename. If the content isn't updated between builds,
|
|
1625
|
-
* then it receives the same filename. When the content is updated, then the filename is different.
|
|
1626
|
-
*
|
|
1627
|
-
* By doing this, deployed apps can "forever-cache" the build directory and take full advantage of
|
|
1628
|
-
* content delivery networks (CDNs) and heavily caching files for faster apps.
|
|
1629
|
-
*/
|
|
1630
|
-
hashFileNames?: boolean;
|
|
1631
1759
|
/**
|
|
1632
1760
|
* The namespace config is a string representing a namespace for the app.
|
|
1633
1761
|
* For apps that are not meant to be a library of reusable components,
|
|
@@ -1668,16 +1796,6 @@ interface StencilConfig {
|
|
|
1668
1796
|
* This behavior defaults to `true`, but may be opted-out of by setting this flag to `false`.
|
|
1669
1797
|
*/
|
|
1670
1798
|
transformAliasedImportPaths?: boolean;
|
|
1671
|
-
/**
|
|
1672
|
-
* When `true`, Stencil will suppress diagnostics which warn about public members using reserved names
|
|
1673
|
-
* (for example, decorating a method named `focus` with `@Method()`). Defaults to `false`.
|
|
1674
|
-
*/
|
|
1675
|
-
suppressReservedPublicNameWarnings?: boolean;
|
|
1676
|
-
/**
|
|
1677
|
-
* When `true`, we will validate a project's `package.json` based on the output target the user has designated
|
|
1678
|
-
* as `isPrimaryPackageOutputTarget: true` in their Stencil config.
|
|
1679
|
-
*/
|
|
1680
|
-
validatePrimaryPackageOutputTarget?: boolean;
|
|
1681
1799
|
/**
|
|
1682
1800
|
* Passes custom configuration down to the "@rolldown/plugin-node-resolve" that Stencil uses under the hood.
|
|
1683
1801
|
* For further information: https://stenciljs.com/docs/module-bundling
|
|
@@ -1697,24 +1815,24 @@ interface StencilConfig {
|
|
|
1697
1815
|
* Defaults to `false` in dev mode and `true` in production mode.
|
|
1698
1816
|
*/
|
|
1699
1817
|
minifyCss?: boolean;
|
|
1700
|
-
/**
|
|
1701
|
-
* Forces Stencil to run in `dev` mode if the value is `true` and `production` mode
|
|
1702
|
-
* if it's `false`.
|
|
1703
|
-
*
|
|
1704
|
-
* Defaults to `false` (ie. production) unless the `--dev` flag is used in the CLI.
|
|
1705
|
-
*/
|
|
1706
|
-
devMode?: boolean;
|
|
1707
1818
|
/**
|
|
1708
1819
|
* Object to provide a custom logger. By default a `logger` is already provided for the
|
|
1709
1820
|
* platform the compiler is running on, such as NodeJS or a browser.
|
|
1710
1821
|
*/
|
|
1711
1822
|
logger?: Logger;
|
|
1712
1823
|
/**
|
|
1713
|
-
*
|
|
1714
|
-
*
|
|
1715
|
-
* are opt-in since not all users will require the additional runtime.
|
|
1824
|
+
* Compatibility and workaround flags for framework/bundler edge cases
|
|
1825
|
+
* and rarely-needed diagnostic suppressions.
|
|
1716
1826
|
*/
|
|
1717
|
-
|
|
1827
|
+
compat?: ConfigCompat;
|
|
1828
|
+
/**
|
|
1829
|
+
* Replace `@State` and `@Prop` internals with `@preact/signals-core` signal primitives.
|
|
1830
|
+
* Enables cross-framework reactive interop - component state becomes subscribable by
|
|
1831
|
+
* Solid, Angular, Preact and any TC39-signal-compatible library without event/attribute
|
|
1832
|
+
* roundtrips. No API changes required in component code.
|
|
1833
|
+
* Defaults to `false`.
|
|
1834
|
+
*/
|
|
1835
|
+
signalBacking?: boolean;
|
|
1718
1836
|
/**
|
|
1719
1837
|
* The hydrated flag identifies if a component and all of its child components
|
|
1720
1838
|
* have finished hydrating. This helps prevent any flash of unstyled content (FOUC)
|
|
@@ -1779,14 +1897,6 @@ interface StencilConfig {
|
|
|
1779
1897
|
after?: any[];
|
|
1780
1898
|
};
|
|
1781
1899
|
entryComponentsHint?: string[];
|
|
1782
|
-
/**
|
|
1783
|
-
* Sets whether Stencil will write files to `dist/` during the build or not.
|
|
1784
|
-
*
|
|
1785
|
-
* By default this value is set to the opposite value of {@link devMode},
|
|
1786
|
-
* i.e. it will be `true` when building for production and `false` when
|
|
1787
|
-
* building for development.
|
|
1788
|
-
*/
|
|
1789
|
-
buildDist?: boolean;
|
|
1790
1900
|
buildLogFilePath?: string;
|
|
1791
1901
|
devInspector?: boolean;
|
|
1792
1902
|
devServer?: StencilDevServerConfig;
|
|
@@ -1814,7 +1924,7 @@ interface StencilConfig {
|
|
|
1814
1924
|
* An array of component tag names to exclude from production builds.
|
|
1815
1925
|
* Useful to remove test, demo or experimental components from final output.
|
|
1816
1926
|
*
|
|
1817
|
-
* **Note:** Exclusion only applies to production builds (default
|
|
1927
|
+
* **Note:** Exclusion only applies to production builds (the default).
|
|
1818
1928
|
* Development builds (with `--dev` flag) will include all components to support local testing.
|
|
1819
1929
|
*
|
|
1820
1930
|
* Supports glob patterns for matching multiple components:
|
|
@@ -1838,14 +1948,78 @@ interface StencilConfig {
|
|
|
1838
1948
|
* Set whether unused dependencies should be excluded from the built output.
|
|
1839
1949
|
*/
|
|
1840
1950
|
excludeUnusedDependencies?: boolean;
|
|
1841
|
-
|
|
1951
|
+
/**
|
|
1952
|
+
* Declares the set of valid style "modes" (e.g. `ios`, `md`) used by mode-keyed
|
|
1953
|
+
* `styleUrls`/`styles` in `@Component()`. When set, the compiler validates that
|
|
1954
|
+
* every mode key used in a component matches one of these entries, catching typos
|
|
1955
|
+
* at build time. Entries marked `required` must be present on every component that
|
|
1956
|
+
* defines any mode-keyed styles.
|
|
1957
|
+
*
|
|
1958
|
+
* @example
|
|
1959
|
+
* ```ts
|
|
1960
|
+
* export const config: Config = {
|
|
1961
|
+
* modes: ['ios', { mode: 'md', required: true }],
|
|
1962
|
+
* };
|
|
1963
|
+
* ```
|
|
1964
|
+
*
|
|
1965
|
+
* @default []
|
|
1966
|
+
*/
|
|
1967
|
+
modes?: (string | ModeConfig)[];
|
|
1968
|
+
/**
|
|
1969
|
+
* Explicitly declare which npm packages are Stencil collections to be re-bundled into this project.
|
|
1970
|
+
*
|
|
1971
|
+
* Without this option, collection ingestion is triggered only by a side-effect import:
|
|
1972
|
+
* ```ts
|
|
1973
|
+
* import '@ionic/core';
|
|
1974
|
+
* ```
|
|
1975
|
+
* @example
|
|
1976
|
+
* ```ts
|
|
1977
|
+
* export const config: Config = {
|
|
1978
|
+
* collections: ['@ionic/core', '@my-org/design-system'],
|
|
1979
|
+
* };
|
|
1980
|
+
* ```
|
|
1981
|
+
*
|
|
1982
|
+
* @default []
|
|
1983
|
+
*/
|
|
1984
|
+
collections?: string[];
|
|
1842
1985
|
}
|
|
1843
|
-
|
|
1986
|
+
/**
|
|
1987
|
+
* DOM patches for light-dom / scoped components that use `<slot>`.
|
|
1988
|
+
*
|
|
1989
|
+
* These patches shield the component's slot machinery from framework DOM mutations
|
|
1990
|
+
* (e.g. when Angular or React insert / remove nodes they route directly to the host
|
|
1991
|
+
* element, bypassing the slot polyfill) and prevent hydration errors when a framework
|
|
1992
|
+
* encounters Stencil's internal slot reference nodes during SSR reconciliation.
|
|
1993
|
+
*
|
|
1994
|
+
* Patches are only applied at runtime when a component is both non-shadow **and**
|
|
1995
|
+
* declares at least one `<slot>`, so enabling them has no effect on pure shadow-DOM
|
|
1996
|
+
* components.
|
|
1997
|
+
*
|
|
1998
|
+
* Set to `true` (default) to enable all patches, `false` to disable all, or an object
|
|
1999
|
+
* for granular control.
|
|
2000
|
+
*/
|
|
2001
|
+
type LightDomPatches = {
|
|
2002
|
+
/** Patches `childNodes`/`children` getters to return only slotted content. */
|
|
2003
|
+
childNodes?: boolean;
|
|
2004
|
+
/** Patches `cloneNode()` to correctly deep-clone slotted content. */
|
|
2005
|
+
cloneNode?: boolean;
|
|
2006
|
+
/** Patches `appendChild()`, `insertBefore()`, and `removeChild()` to route to the correct slot. */
|
|
2007
|
+
domMutations?: boolean;
|
|
2008
|
+
/** Patches `textContent` to act like shadow DOM (reads/writes slotted text only). */
|
|
2009
|
+
textContent?: boolean;
|
|
2010
|
+
};
|
|
2011
|
+
/**
|
|
2012
|
+
* Compatibility and workaround flags, primarily for shielding non-shadow DOM components
|
|
2013
|
+
* from consuming frameworks that mutate internals they don't know about, plus other
|
|
2014
|
+
* framework/bundler integration edge cases and rarely-needed diagnostic suppressions.
|
|
2015
|
+
* These are opt-in behaviors that aren't needed by every project.
|
|
2016
|
+
*/
|
|
2017
|
+
interface ConfigCompat {
|
|
1844
2018
|
/**
|
|
1845
2019
|
* Projects that use a Stencil library built using the `dist` output target may have trouble lazily
|
|
1846
2020
|
* loading components when using a bundler such as Vite or Parcel. Setting this flag to `true` will change how Stencil
|
|
1847
2021
|
* lazily loads components in a way that works with additional bundlers. Setting this flag to `true` will increase
|
|
1848
|
-
* the size of the compiled output. Defaults to `
|
|
2022
|
+
* the size of the compiled output. Defaults to `true`.
|
|
1849
2023
|
*/
|
|
1850
2024
|
enableImportInjection?: boolean;
|
|
1851
2025
|
/**
|
|
@@ -1860,70 +2034,27 @@ interface ConfigExtrasBase {
|
|
|
1860
2034
|
*/
|
|
1861
2035
|
initializeNextTick?: boolean;
|
|
1862
2036
|
/**
|
|
1863
|
-
* Adds `transformTag` calls to css strings and querySelector(All) calls
|
|
2037
|
+
* Adds `transformTag` calls to css strings and querySelector(All) calls.
|
|
2038
|
+
* Use `'prod'` to enable only in production builds.
|
|
1864
2039
|
*/
|
|
1865
2040
|
additionalTagTransformers?: boolean | 'prod';
|
|
1866
2041
|
/**
|
|
1867
|
-
*
|
|
1868
|
-
*
|
|
1869
|
-
* Shadow DOM when using `slot`s.
|
|
1870
|
-
* Defaults to `false`.
|
|
1871
|
-
*/
|
|
1872
|
-
experimentalScopedSlotChanges?: boolean;
|
|
1873
|
-
/**
|
|
1874
|
-
* By default Stencil turns the stylesheet provided to `globalStyle` into a constructable stylesheet
|
|
1875
|
-
* and adds it to each component when rendered on the client which can be useful for sharing styles
|
|
1876
|
-
* efficiently across components.
|
|
1877
|
-
*
|
|
1878
|
-
* If you want Stencil to also add the `globalStyle` to each component when rendering on the server
|
|
1879
|
-
* then set this to `true`. If your `globalStyle` sheet is large then doing this may bloat the size
|
|
1880
|
-
* of your SSR output when using declarative-shadow-dom.
|
|
1881
|
-
*
|
|
1882
|
-
* Setting this to `false` will prevent Stencil from adding any `globalStyle` to each component.
|
|
1883
|
-
*
|
|
1884
|
-
* Defaults to `'client'`.
|
|
1885
|
-
*/
|
|
1886
|
-
addGlobalStyleToComponents?: boolean | 'client';
|
|
1887
|
-
}
|
|
1888
|
-
type ConfigExtrasSlotFixes<ExperimentalFixesEnabled extends boolean, IndividualFlags extends boolean> = {
|
|
1889
|
-
/**
|
|
1890
|
-
* By default, the slot polyfill does not update `appendChild()` so that it appends
|
|
1891
|
-
* new child nodes into the correct child slot like how shadow dom works. This is an opt-in
|
|
1892
|
-
* polyfill for those who need it when using `element.appendChild(node)` and expecting the
|
|
1893
|
-
* child to be appended in the same location shadow dom would. This is not required for
|
|
1894
|
-
* IE11 or Edge 18, but can be enabled if the app is using `appendChild()`. Defaults to `false`.
|
|
1895
|
-
*/
|
|
1896
|
-
appendChildSlotFix?: IndividualFlags;
|
|
1897
|
-
/**
|
|
1898
|
-
* By default, the runtime does not polyfill `cloneNode()` when cloning a component
|
|
1899
|
-
* that uses the slot polyfill. This is an opt-in polyfill for those who need it.
|
|
1900
|
-
* This is not required for IE11 or Edge 18, but can be enabled if the app is using
|
|
1901
|
-
* `cloneNode()` and unexpected node are being cloned due to the slot polyfill
|
|
1902
|
-
* simulating shadow dom. Defaults to `false`.
|
|
1903
|
-
*/
|
|
1904
|
-
cloneNodeFix?: IndividualFlags;
|
|
1905
|
-
/**
|
|
1906
|
-
* Experimental flag to align the behavior of invoking `textContent` on a scoped component to act more like a
|
|
1907
|
-
* component that uses the shadow DOM. Defaults to `false`
|
|
2042
|
+
* DOM patches for light-dom / scoped components that use `<slot>`.
|
|
2043
|
+
* See {@link LightDomPatches} for granular control. Defaults to `true`.
|
|
1908
2044
|
*/
|
|
1909
|
-
|
|
2045
|
+
lightDomPatches?: boolean | LightDomPatches;
|
|
1910
2046
|
/**
|
|
1911
|
-
*
|
|
1912
|
-
*
|
|
1913
|
-
* getters are not patched to only show the child nodes and elements of the default slot.
|
|
1914
|
-
* Defaults to `false`.
|
|
2047
|
+
* When `true`, Stencil will suppress diagnostics which warn about public members using reserved names
|
|
2048
|
+
* (for example, decorating a method named `focus` with `@Method()`). Defaults to `false`.
|
|
1915
2049
|
*/
|
|
1916
|
-
|
|
2050
|
+
suppressPublicNameWarnings?: boolean;
|
|
1917
2051
|
/**
|
|
1918
|
-
*
|
|
1919
|
-
* {@link scopedSlotTextContentFix}.
|
|
2052
|
+
* When `true`, Stencil will suppress diagnostics which warn about event names conflicting with native DOM event names. Defaults to `false`.
|
|
1920
2053
|
*/
|
|
1921
|
-
|
|
1922
|
-
}
|
|
1923
|
-
type ConfigExtras = ConfigExtrasBase & (ConfigExtrasSlotFixes<true, true> | ConfigExtrasSlotFixes<false, boolean>);
|
|
2054
|
+
suppressEventNameWarnings?: boolean;
|
|
2055
|
+
}
|
|
1924
2056
|
interface Config extends StencilConfig {
|
|
1925
2057
|
buildAppCore?: boolean;
|
|
1926
|
-
buildDocs?: boolean;
|
|
1927
2058
|
configPath?: string;
|
|
1928
2059
|
writeLog?: boolean;
|
|
1929
2060
|
devServer?: DevServerConfig;
|
|
@@ -1937,6 +2068,11 @@ interface Config extends StencilConfig {
|
|
|
1937
2068
|
tsWatchOptions?: any;
|
|
1938
2069
|
_isValidated?: boolean;
|
|
1939
2070
|
_isTesting?: boolean;
|
|
2071
|
+
/**
|
|
2072
|
+
* Internal flag set when --docs CLI flag is used.
|
|
2073
|
+
* Forces docs output targets to build even in dev mode.
|
|
2074
|
+
*/
|
|
2075
|
+
_docsFlag?: boolean;
|
|
1940
2076
|
/**
|
|
1941
2077
|
* Whether running in a CI environment (disables interactive features, adjusts worker count)
|
|
1942
2078
|
*/
|
|
@@ -2015,11 +2151,11 @@ type UnvalidatedConfig = Loose<Config>;
|
|
|
2015
2151
|
* type ReqFieldFoo = RequireFields<Foo, 'bar'>; // { bar: number, baz?: string }
|
|
2016
2152
|
* ```
|
|
2017
2153
|
*/
|
|
2018
|
-
type RequireFields<T, K extends keyof T> = T & { [P in K]-?: T[P] };
|
|
2154
|
+
type RequireFields<T, K extends keyof T> = T & { [P in K]-?: T[P]; };
|
|
2019
2155
|
/**
|
|
2020
2156
|
* Fields in {@link Config} to make required for {@link ValidatedConfig}
|
|
2021
2157
|
*/
|
|
2022
|
-
type StrictConfigFields = keyof Pick<Config, 'cacheDir' | '
|
|
2158
|
+
type StrictConfigFields = keyof Pick<Config, 'cacheDir' | 'devServer' | 'compat' | 'fsNamespace' | 'hydratedFlag' | 'logLevel' | 'logger' | 'minifyCss' | 'minifyJs' | 'namespace' | 'outputTargets' | 'packageJsonFilePath' | 'rolldownConfig' | 'rootDir' | 'srcDir' | 'srcIndexHtml' | 'sys' | 'transformAliasedImportPaths'>;
|
|
2023
2159
|
/**
|
|
2024
2160
|
* A version of {@link Config} that makes certain fields required. This type represents a valid configuration entity.
|
|
2025
2161
|
* When a configuration is received by the user, it is a bag of unverified data. In order to make stricter guarantees
|
|
@@ -2027,8 +2163,24 @@ type StrictConfigFields = keyof Pick<Config, 'cacheDir' | 'devMode' | 'devServer
|
|
|
2027
2163
|
* validations have occurred at runtime.
|
|
2028
2164
|
*/
|
|
2029
2165
|
type ValidatedConfig = RequireFields<Config, StrictConfigFields> & {
|
|
2166
|
+
/**
|
|
2167
|
+
* Whether the build is running in development mode.
|
|
2168
|
+
* Set by the `--dev` CLI flag. Not user-configurable in `stencil.config.ts`.
|
|
2169
|
+
*/
|
|
2170
|
+
devMode: boolean;
|
|
2030
2171
|
sourceMap: boolean;
|
|
2031
2172
|
};
|
|
2173
|
+
interface ModeConfig {
|
|
2174
|
+
/**
|
|
2175
|
+
* The mode name, matched against `styleUrls`/`styles` object keys in `@Component()`.
|
|
2176
|
+
*/
|
|
2177
|
+
mode: string;
|
|
2178
|
+
/**
|
|
2179
|
+
* When `true`, every component that defines mode-keyed `styleUrls` or `styles`
|
|
2180
|
+
* must include this mode. Defaults to `false`.
|
|
2181
|
+
*/
|
|
2182
|
+
required?: boolean;
|
|
2183
|
+
}
|
|
2032
2184
|
interface HydratedFlag {
|
|
2033
2185
|
/**
|
|
2034
2186
|
* Defaults to `hydrated`.
|
|
@@ -2231,11 +2383,11 @@ interface PrerenderConfig {
|
|
|
2231
2383
|
* Run after each `document` is hydrated, but before it is serialized
|
|
2232
2384
|
* into an HTML string. Hook is passed the `document` and its `URL`.
|
|
2233
2385
|
*/
|
|
2234
|
-
|
|
2386
|
+
afterSsr?(document: Document, url: URL, results: PrerenderUrlResults): any | Promise<any>;
|
|
2235
2387
|
/**
|
|
2236
2388
|
* Run before each `document` is hydrated. Hook is passed the `document` it's `URL`.
|
|
2237
2389
|
*/
|
|
2238
|
-
|
|
2390
|
+
beforeSsr?(document: Document, url: URL): any | Promise<any>;
|
|
2239
2391
|
/**
|
|
2240
2392
|
* Runs after the template Document object has serialize into an
|
|
2241
2393
|
* HTML formatted string. Returns an HTML string to be used as the
|
|
@@ -2279,9 +2431,9 @@ interface PrerenderConfig {
|
|
|
2279
2431
|
*/
|
|
2280
2432
|
filePath?(url: URL, filePath: string): string;
|
|
2281
2433
|
/**
|
|
2282
|
-
* Returns the
|
|
2434
|
+
* Returns the prerender options to use for each individual prerendered page.
|
|
2283
2435
|
*/
|
|
2284
|
-
|
|
2436
|
+
prerenderOptions?(url: URL): PrerenderOptions;
|
|
2285
2437
|
/**
|
|
2286
2438
|
* Returns the template file's content. The template is the base
|
|
2287
2439
|
* HTML used for all prerendered pages.
|
|
@@ -2305,7 +2457,7 @@ interface PrerenderConfig {
|
|
|
2305
2457
|
*/
|
|
2306
2458
|
trailingSlash?: boolean;
|
|
2307
2459
|
}
|
|
2308
|
-
interface
|
|
2460
|
+
interface SsrDocumentOptions {
|
|
2309
2461
|
/**
|
|
2310
2462
|
* Build ID that will be added to `<html data-stencil-build="BUILD_ID">`. By default
|
|
2311
2463
|
* a random ID will be generated
|
|
@@ -2322,7 +2474,7 @@ interface HydrateDocumentOptions {
|
|
|
2322
2474
|
* JavaScript to read the structure of the HTML and rebuild each
|
|
2323
2475
|
* component. Defaults to `true`.
|
|
2324
2476
|
*/
|
|
2325
|
-
|
|
2477
|
+
clientSsrAnnotations?: boolean;
|
|
2326
2478
|
/**
|
|
2327
2479
|
* Constrain `setTimeout()` to 1ms, but still async. Also
|
|
2328
2480
|
* only allows `setInterval()` to fire once, also constrained to 1ms.
|
|
@@ -2421,10 +2573,19 @@ interface HydrateDocumentOptions {
|
|
|
2421
2573
|
default: 'declarative-shadow-dom' | 'scoped';
|
|
2422
2574
|
} | boolean;
|
|
2423
2575
|
}
|
|
2424
|
-
|
|
2576
|
+
/**
|
|
2577
|
+
* Backwards compat for v4
|
|
2578
|
+
* @deprecated - use SsrDocumentOptions instead
|
|
2579
|
+
*/
|
|
2580
|
+
interface HydrateDocumentOptions extends SsrDocumentOptions {}
|
|
2581
|
+
interface SerializeDocumentOptions extends SsrDocumentOptions {
|
|
2425
2582
|
/**
|
|
2426
2583
|
* Runs after the `document` has been hydrated.
|
|
2427
2584
|
*/
|
|
2585
|
+
afterSsr?(document: any): any | Promise<any>;
|
|
2586
|
+
/**
|
|
2587
|
+
* @deprecated Use `afterSsr` instead.
|
|
2588
|
+
*/
|
|
2428
2589
|
afterHydrate?(document: any): any | Promise<any>;
|
|
2429
2590
|
/**
|
|
2430
2591
|
* Sets an approximate line width the HTML should attempt to stay within.
|
|
@@ -2437,6 +2598,10 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
|
2437
2598
|
/**
|
|
2438
2599
|
* Runs before the `document` has been hydrated.
|
|
2439
2600
|
*/
|
|
2601
|
+
beforeSsr?(document: any): any | Promise<any>;
|
|
2602
|
+
/**
|
|
2603
|
+
* @deprecated Use `beforeSsr` instead.
|
|
2604
|
+
*/
|
|
2440
2605
|
beforeHydrate?(document: any): any | Promise<any>;
|
|
2441
2606
|
/**
|
|
2442
2607
|
* Format the HTML in a nicely indented format.
|
|
@@ -2474,12 +2639,17 @@ interface SerializeDocumentOptions extends HydrateDocumentOptions {
|
|
|
2474
2639
|
*/
|
|
2475
2640
|
modes?: ResolutionHandler[];
|
|
2476
2641
|
}
|
|
2477
|
-
interface
|
|
2642
|
+
interface SsrFactoryOptions extends SerializeDocumentOptions {
|
|
2478
2643
|
serializeToHtml: boolean;
|
|
2479
2644
|
destroyWindow: boolean;
|
|
2480
2645
|
destroyDocument: boolean;
|
|
2481
2646
|
}
|
|
2482
|
-
|
|
2647
|
+
/**
|
|
2648
|
+
* Backwards compat for v4
|
|
2649
|
+
* @deprecated - use SsrFactoryOptions instead
|
|
2650
|
+
*/
|
|
2651
|
+
interface HydrateFactoryOptions extends SsrFactoryOptions {}
|
|
2652
|
+
interface PrerenderOptions extends SerializeDocumentOptions {
|
|
2483
2653
|
/**
|
|
2484
2654
|
* Adds `<link rel="modulepreload">` for modules that will eventually be requested.
|
|
2485
2655
|
* Defaults to `true`.
|
|
@@ -2514,6 +2684,11 @@ interface PrerenderHydrateOptions extends SerializeDocumentOptions {
|
|
|
2514
2684
|
*/
|
|
2515
2685
|
staticDocument?: boolean;
|
|
2516
2686
|
}
|
|
2687
|
+
/**
|
|
2688
|
+
* v4 backwards compat
|
|
2689
|
+
* @deprecated - use PrerenderOptions instead
|
|
2690
|
+
*/
|
|
2691
|
+
interface PrerenderHydrateOptions extends PrerenderOptions {}
|
|
2517
2692
|
interface RobotsTxtOpts {
|
|
2518
2693
|
urls: string[];
|
|
2519
2694
|
sitemapUrl: string;
|
|
@@ -2822,18 +2997,18 @@ interface ResolveModuleIdResults {
|
|
|
2822
2997
|
* A controller which provides for communication and coordination between
|
|
2823
2998
|
* threaded workers.
|
|
2824
2999
|
*/
|
|
2825
|
-
interface WorkerMainController {
|
|
3000
|
+
interface WorkerMainController<T extends Record<string, (...args: any[]) => Promise<any>> = Record<string, (...args: any[]) => Promise<any>>> {
|
|
2826
3001
|
/**
|
|
2827
3002
|
* Send a given set of arguments to a worker
|
|
2828
3003
|
*/
|
|
2829
|
-
send(...args:
|
|
3004
|
+
send<K extends keyof T>(methodName: K, ...args: Parameters<T[K]>): ReturnType<T[K]>;
|
|
2830
3005
|
/**
|
|
2831
3006
|
* Handle a particular method
|
|
2832
3007
|
*
|
|
2833
3008
|
* @param name of the method to be passed to a worker
|
|
2834
3009
|
* @returns a Promise wrapping the results
|
|
2835
3010
|
*/
|
|
2836
|
-
handler(name:
|
|
3011
|
+
handler<K extends keyof T>(name: K): T[K];
|
|
2837
3012
|
/**
|
|
2838
3013
|
* Destroy the worker represented by this instance, rejecting all outstanding
|
|
2839
3014
|
* tasks and killing the child process.
|
|
@@ -2900,6 +3075,7 @@ interface BuildNoChangeResults {
|
|
|
2900
3075
|
interface CompilerBuildResults {
|
|
2901
3076
|
buildId: number;
|
|
2902
3077
|
componentGraph?: BuildResultsComponentGraph;
|
|
3078
|
+
components: ComponentCompilerMeta[];
|
|
2903
3079
|
diagnostics: Diagnostic[];
|
|
2904
3080
|
dirsAdded: string[];
|
|
2905
3081
|
dirsDeleted: string[];
|
|
@@ -2911,9 +3087,10 @@ interface CompilerBuildResults {
|
|
|
2911
3087
|
hasError: boolean;
|
|
2912
3088
|
hasSuccessfulBuild: boolean;
|
|
2913
3089
|
hmr?: HotModuleReplacement;
|
|
2914
|
-
|
|
3090
|
+
ssrAppFilePath?: string;
|
|
2915
3091
|
isRebuild: boolean;
|
|
2916
3092
|
namespace: string;
|
|
3093
|
+
fsNamespace: string;
|
|
2917
3094
|
outputs: BuildOutput[];
|
|
2918
3095
|
rootDir: string;
|
|
2919
3096
|
srcDir: string;
|
|
@@ -3074,8 +3251,8 @@ interface ConfigBundle {
|
|
|
3074
3251
|
}
|
|
3075
3252
|
/**
|
|
3076
3253
|
* A file and/or directory copy operation that may be specified as part of
|
|
3077
|
-
* certain output targets for Stencil (in particular `
|
|
3078
|
-
* `
|
|
3254
|
+
* certain output targets for Stencil (in particular `loader-bundle`,
|
|
3255
|
+
* `standalone`, and `www`).
|
|
3079
3256
|
*/
|
|
3080
3257
|
interface CopyTask {
|
|
3081
3258
|
/**
|
|
@@ -3096,8 +3273,9 @@ interface CopyTask {
|
|
|
3096
3273
|
*/
|
|
3097
3274
|
dest?: string;
|
|
3098
3275
|
/**
|
|
3099
|
-
*
|
|
3100
|
-
*
|
|
3276
|
+
* Additional glob patterns to exclude from the copy operation, merged with
|
|
3277
|
+
* the built-in defaults: `__mocks__`, `__fixtures__`, `dist`, hidden dirs,
|
|
3278
|
+
* `.ds_store`, `.gitignore`, `desktop.ini`, `thumbs.db`.
|
|
3101
3279
|
*/
|
|
3102
3280
|
ignore?: string[];
|
|
3103
3281
|
/**
|
|
@@ -3176,39 +3354,12 @@ interface StencilDocsConfig {
|
|
|
3176
3354
|
};
|
|
3177
3355
|
};
|
|
3178
3356
|
}
|
|
3179
|
-
|
|
3180
|
-
|
|
3181
|
-
browser?: boolean;
|
|
3182
|
-
moduleDirectories?: string[];
|
|
3183
|
-
modulePaths?: string[];
|
|
3184
|
-
dedupe?: string[] | ((importee: string) => boolean);
|
|
3185
|
-
extensions?: readonly string[];
|
|
3186
|
-
jail?: string;
|
|
3187
|
-
mainFields?: readonly string[];
|
|
3188
|
-
modulesOnly?: boolean;
|
|
3189
|
-
preferBuiltins?: boolean | ((module: string) => boolean);
|
|
3190
|
-
resolveOnly?: ReadonlyArray<string | RegExp> | null | ((module: string) => boolean);
|
|
3191
|
-
rootDir?: string;
|
|
3192
|
-
allowExportsFolderMapping?: boolean;
|
|
3193
|
-
}
|
|
3357
|
+
/** Options for rolldown's built-in module resolver, passed directly to rolldown's `resolve` input option. */
|
|
3358
|
+
type NodeResolveConfig = NonNullable<InputOptions['resolve']>;
|
|
3194
3359
|
interface RolldownConfig {
|
|
3195
|
-
inputOptions?: RolldownInputOptions;
|
|
3196
|
-
outputOptions?: RolldownOutputOptions;
|
|
3197
|
-
}
|
|
3198
|
-
interface RolldownInputOptions {
|
|
3199
|
-
context?: string;
|
|
3200
|
-
moduleContext?: ((id: string) => string) | {
|
|
3201
|
-
[id: string]: string;
|
|
3202
|
-
};
|
|
3203
3360
|
treeshake?: boolean;
|
|
3204
|
-
maxParallelFileOps?: number;
|
|
3205
3361
|
external?: (string | RegExp)[] | string | RegExp | ((source: string, importer: string | undefined, isResolved: boolean) => boolean | null | undefined);
|
|
3206
3362
|
}
|
|
3207
|
-
interface RolldownOutputOptions {
|
|
3208
|
-
globals?: {
|
|
3209
|
-
[name: string]: string;
|
|
3210
|
-
} | ((name: string) => string);
|
|
3211
|
-
}
|
|
3212
3363
|
/**
|
|
3213
3364
|
* This sets the log level hierarchy for our terminal logger, ranging from
|
|
3214
3365
|
* most to least verbose.
|
|
@@ -3273,57 +3424,91 @@ interface LoggerTimeSpan {
|
|
|
3273
3424
|
duration(): number;
|
|
3274
3425
|
finish(finishedMsg: string, color?: string, bold?: boolean, newLineSuffix?: boolean): number;
|
|
3275
3426
|
}
|
|
3276
|
-
|
|
3277
|
-
|
|
3427
|
+
/**
|
|
3428
|
+
* Output target for generating lazy-loaded component bundles with a loader infrastructure.
|
|
3429
|
+
* This creates an optimized distribution for CDN usage and applications that benefit from
|
|
3430
|
+
* lazy-loading components on demand.
|
|
3431
|
+
*
|
|
3432
|
+
* Formerly known as 'dist' in v4.
|
|
3433
|
+
*
|
|
3434
|
+
* @example
|
|
3435
|
+
* ```typescript
|
|
3436
|
+
* {
|
|
3437
|
+
* type: 'loader-bundle',
|
|
3438
|
+
* dir: 'dist/loader-bundle'
|
|
3439
|
+
* }
|
|
3440
|
+
* ```
|
|
3441
|
+
*/
|
|
3442
|
+
interface OutputTargetLoaderBundle extends OutputTargetBaseNext {
|
|
3443
|
+
type: 'loader-bundle';
|
|
3444
|
+
/**
|
|
3445
|
+
* Directory where lazy-loaded bundles will be written.
|
|
3446
|
+
* @default '' (root of output directory)
|
|
3447
|
+
*/
|
|
3278
3448
|
buildDir?: string;
|
|
3279
|
-
|
|
3449
|
+
copy?: CopyTask[];
|
|
3450
|
+
empty?: boolean;
|
|
3280
3451
|
/**
|
|
3281
|
-
*
|
|
3282
|
-
* a project's `tsconfig.json` to relative import paths in the compiled output's
|
|
3283
|
-
* `dist-collection` bundle if it is generated (i.e. `collectionDir` is set).
|
|
3284
|
-
*
|
|
3285
|
-
* Paths will be left in aliased format if `false`.
|
|
3452
|
+
* Whether to generate CommonJS (CJS) bundles.
|
|
3286
3453
|
*
|
|
3287
|
-
*
|
|
3288
|
-
*
|
|
3289
|
-
* {
|
|
3290
|
-
* paths: {
|
|
3291
|
-
* "@utils/*": ['/src/utils/*']
|
|
3292
|
-
* }
|
|
3293
|
-
* }
|
|
3454
|
+
* When `true`, generates CJS output in `cjs/` subdirectory.
|
|
3455
|
+
* When `false` (default in v5+), only ESM bundles are generated.
|
|
3294
3456
|
*
|
|
3295
|
-
*
|
|
3296
|
-
* import * as dateUtils from '@utils/date-utils';
|
|
3297
|
-
* // Output file
|
|
3298
|
-
* import * as dateUtils from '../utils/date-utils';
|
|
3457
|
+
* @default false
|
|
3299
3458
|
*/
|
|
3300
|
-
|
|
3301
|
-
typesDir?: string;
|
|
3459
|
+
cjs?: boolean;
|
|
3302
3460
|
/**
|
|
3303
|
-
*
|
|
3461
|
+
* Custom path for the loader directory; files you can import
|
|
3304
3462
|
* in an initiation script within your application to register all your components for
|
|
3305
3463
|
* lazy loading.
|
|
3306
3464
|
*
|
|
3307
|
-
* @default
|
|
3465
|
+
* @default 'loader' (relative to output directory)
|
|
3308
3466
|
*/
|
|
3309
|
-
|
|
3310
|
-
copy?: CopyTask[];
|
|
3311
|
-
empty?: boolean;
|
|
3467
|
+
loaderPath?: string;
|
|
3312
3468
|
/**
|
|
3313
|
-
*
|
|
3469
|
+
* Hash the filenames of generated chunks based on their content.
|
|
3470
|
+
* Enables forever-caching of CDN-served bundles.
|
|
3314
3471
|
*
|
|
3315
|
-
*
|
|
3316
|
-
|
|
3472
|
+
* @default true in production, false in dev mode
|
|
3473
|
+
*/
|
|
3474
|
+
hashFileNames?: boolean;
|
|
3475
|
+
/**
|
|
3476
|
+
* Number of characters to use for the content hash in filenames.
|
|
3477
|
+
*
|
|
3478
|
+
* @default 8
|
|
3479
|
+
*/
|
|
3480
|
+
hashedFileNameLength?: number;
|
|
3481
|
+
/**
|
|
3482
|
+
* When `true`, marks `@stencil/core` as an external dependency in the bundler (ESM/CJS)
|
|
3483
|
+
* distribution output. Consumers must provide `@stencil/core` themselves.
|
|
3484
|
+
*
|
|
3485
|
+
* Has no effect on the browser/CDN build - the runtime is always bundled there.
|
|
3317
3486
|
*
|
|
3318
3487
|
* @default false
|
|
3319
3488
|
*/
|
|
3320
|
-
|
|
3489
|
+
externalRuntime?: boolean;
|
|
3321
3490
|
}
|
|
3322
|
-
|
|
3323
|
-
|
|
3491
|
+
/**
|
|
3492
|
+
* Output target for generating Stencil component source for downstream re-bundling.
|
|
3493
|
+
* This output contains transpiled source code, component metadata, and configuration
|
|
3494
|
+
* that downstream Stencil projects can re-compile and bundle.
|
|
3495
|
+
*
|
|
3496
|
+
* Formerly 'dist-collection' sub-output in v4, now a first-class output target in v5.
|
|
3497
|
+
*
|
|
3498
|
+
* In production builds, this output is auto-generated unless explicitly configured.
|
|
3499
|
+
*
|
|
3500
|
+
* @example
|
|
3501
|
+
* ```typescript
|
|
3502
|
+
* {
|
|
3503
|
+
* type: 'collection',
|
|
3504
|
+
* dir: 'dist/collection',
|
|
3505
|
+
* transformAliasedImportPaths: true
|
|
3506
|
+
* }
|
|
3507
|
+
* ```
|
|
3508
|
+
*/
|
|
3509
|
+
interface OutputTargetCollection extends OutputTargetBaseNext {
|
|
3510
|
+
type: 'collection';
|
|
3324
3511
|
empty?: boolean;
|
|
3325
|
-
dir: string;
|
|
3326
|
-
collectionDir: string;
|
|
3327
3512
|
/**
|
|
3328
3513
|
* When `true` this flag will transform aliased import paths defined in
|
|
3329
3514
|
* a project's `tsconfig.json` to relative import paths in the compiled output.
|
|
@@ -3345,10 +3530,25 @@ interface OutputTargetDistCollection extends OutputTargetValidationConfig {
|
|
|
3345
3530
|
*/
|
|
3346
3531
|
transformAliasedImportPaths?: boolean | null;
|
|
3347
3532
|
}
|
|
3348
|
-
|
|
3349
|
-
|
|
3350
|
-
|
|
3351
|
-
|
|
3533
|
+
/**
|
|
3534
|
+
* Output target for generating TypeScript type definitions (.d.ts files).
|
|
3535
|
+
*
|
|
3536
|
+
* Formerly a sub-output of 'dist' and 'dist-custom-elements' in v4,
|
|
3537
|
+
* now a first-class output target in v5 that can be shared across multiple outputs.
|
|
3538
|
+
*
|
|
3539
|
+
* In production builds, this output is auto-generated unless explicitly configured.
|
|
3540
|
+
*
|
|
3541
|
+
* @example
|
|
3542
|
+
* ```typescript
|
|
3543
|
+
* {
|
|
3544
|
+
* type: 'types',
|
|
3545
|
+
* dir: 'dist/types'
|
|
3546
|
+
* }
|
|
3547
|
+
* ```
|
|
3548
|
+
*/
|
|
3549
|
+
interface OutputTargetTypes extends OutputTargetBaseNext {
|
|
3550
|
+
type: 'types';
|
|
3551
|
+
empty?: boolean;
|
|
3352
3552
|
}
|
|
3353
3553
|
interface OutputTargetDistLazy extends OutputTargetBase {
|
|
3354
3554
|
type: 'dist-lazy';
|
|
@@ -3358,22 +3558,106 @@ interface OutputTargetDistLazy extends OutputTargetBase {
|
|
|
3358
3558
|
isBrowserBuild?: boolean;
|
|
3359
3559
|
esmIndexFile?: string;
|
|
3360
3560
|
cjsIndexFile?: string;
|
|
3561
|
+
loaderDir?: string;
|
|
3562
|
+
typesDir?: string;
|
|
3361
3563
|
empty?: boolean;
|
|
3564
|
+
/** Inherited from parent output target (loader-bundle or www). Only meaningful for browser builds. */
|
|
3565
|
+
hashFileNames?: boolean;
|
|
3566
|
+
/** Inherited from parent output target (loader-bundle or www). */
|
|
3567
|
+
hashedFileNameLength?: number;
|
|
3568
|
+
/** Inherited from loader-bundle. When true, @stencil/core is external in this bundler output. */
|
|
3569
|
+
externalRuntime?: boolean;
|
|
3362
3570
|
}
|
|
3363
|
-
|
|
3364
|
-
|
|
3365
|
-
|
|
3571
|
+
/**
|
|
3572
|
+
* Output target for global styles.
|
|
3573
|
+
* Generates a CSS file from an input stylesheet.
|
|
3574
|
+
*
|
|
3575
|
+
* Can be configured in two ways:
|
|
3576
|
+
* 1. **Implicit** (backwards compat): Set `globalStyle` in the config and this output is auto-generated
|
|
3577
|
+
* 2. **Explicit**: Define this output target with an `input` property
|
|
3578
|
+
*
|
|
3579
|
+
* Multiple `global-style` outputs are supported for building separate CSS bundles.
|
|
3580
|
+
*
|
|
3581
|
+
* @example
|
|
3582
|
+
* ```typescript
|
|
3583
|
+
* // Explicit configuration with custom input/output
|
|
3584
|
+
* {
|
|
3585
|
+
* type: 'global-style',
|
|
3586
|
+
* input: './src/theme.css',
|
|
3587
|
+
* fileName: 'theme.css',
|
|
3588
|
+
* dir: 'dist/assets',
|
|
3589
|
+
* copyToLoaderBrowser: false
|
|
3590
|
+
* }
|
|
3591
|
+
* ```
|
|
3592
|
+
*/
|
|
3593
|
+
interface OutputTargetGlobalStyle extends OutputTargetBaseNext {
|
|
3594
|
+
type: 'global-style';
|
|
3595
|
+
/**
|
|
3596
|
+
* Path to the input CSS file to compile.
|
|
3597
|
+
* When specified, this takes precedence over the `globalStyle` config option.
|
|
3598
|
+
*
|
|
3599
|
+
* If neither `input` nor `globalStyle` config is set, no CSS will be built.
|
|
3600
|
+
*/
|
|
3601
|
+
input?: string;
|
|
3602
|
+
/**
|
|
3603
|
+
* Output filename for the compiled CSS.
|
|
3604
|
+
* @default '{namespace}.css' when using globalStyle config, or basename of input file
|
|
3605
|
+
*/
|
|
3606
|
+
fileName?: string;
|
|
3607
|
+
/**
|
|
3608
|
+
* When `true`, also copies the global style CSS to the loader-bundle browser directory
|
|
3609
|
+
* for backwards compatibility with existing CDN consumers who have hardcoded CSS paths.
|
|
3610
|
+
*
|
|
3611
|
+
* @default true
|
|
3612
|
+
*/
|
|
3613
|
+
copyToLoaderBrowser?: boolean;
|
|
3614
|
+
/**
|
|
3615
|
+
* Controls whether this global stylesheet is injected into component shadow DOMs
|
|
3616
|
+
* as a constructable stylesheet at runtime.
|
|
3617
|
+
*
|
|
3618
|
+
* - `'none'` (default): Don't inject - stylesheet must be loaded externally (e.g., via `<link>`)
|
|
3619
|
+
* - `'client'`: Inject only in client builds, not SSR (reduces SSR output size)
|
|
3620
|
+
* - `'all'`: Inject in both client and SSR builds
|
|
3621
|
+
*
|
|
3622
|
+
* @default 'none'
|
|
3623
|
+
*/
|
|
3624
|
+
inject?: 'none' | 'client' | 'all';
|
|
3366
3625
|
}
|
|
3367
|
-
|
|
3368
|
-
|
|
3369
|
-
|
|
3370
|
-
|
|
3371
|
-
|
|
3372
|
-
|
|
3373
|
-
|
|
3626
|
+
/**
|
|
3627
|
+
* Output target for component assets.
|
|
3628
|
+
* Copies all component `assetsDirs` to a unified location.
|
|
3629
|
+
*
|
|
3630
|
+
* auto-generated when components have `assetsDirs` unless explicitly configured.
|
|
3631
|
+
* The output is placed in `dist/assets/` by default and is available to all distribution strategies.
|
|
3632
|
+
*
|
|
3633
|
+
* @example
|
|
3634
|
+
* ```typescript
|
|
3635
|
+
* {
|
|
3636
|
+
* type: 'assets',
|
|
3637
|
+
* dir: 'dist/assets'
|
|
3638
|
+
* }
|
|
3639
|
+
* ```
|
|
3640
|
+
*/
|
|
3641
|
+
interface OutputTargetAssets extends OutputTargetBaseNext {
|
|
3642
|
+
type: 'assets';
|
|
3374
3643
|
}
|
|
3375
|
-
|
|
3376
|
-
|
|
3644
|
+
/**
|
|
3645
|
+
* Output target for server-side rendering (SSR) and hydration.
|
|
3646
|
+
* Generates a script that can be used for SSR and static site generation (prerendering).
|
|
3647
|
+
*
|
|
3648
|
+
* Formerly known as 'dist-hydrate-script' in v4.
|
|
3649
|
+
*
|
|
3650
|
+
* @example
|
|
3651
|
+
* ```typescript
|
|
3652
|
+
* {
|
|
3653
|
+
* type: 'ssr',
|
|
3654
|
+
* dir: 'dist/ssr',
|
|
3655
|
+
* minify: true
|
|
3656
|
+
* }
|
|
3657
|
+
* ```
|
|
3658
|
+
*/
|
|
3659
|
+
interface OutputTargetSsr extends OutputTargetBase {
|
|
3660
|
+
type: 'ssr';
|
|
3377
3661
|
dir?: string;
|
|
3378
3662
|
/**
|
|
3379
3663
|
* Module IDs that should not be bundled into the script.
|
|
@@ -3393,6 +3677,13 @@ interface OutputTargetHydrate extends OutputTargetBase {
|
|
|
3393
3677
|
*/
|
|
3394
3678
|
cjs?: boolean;
|
|
3395
3679
|
}
|
|
3680
|
+
interface OutputTargetSsrWasm extends OutputTargetBase {
|
|
3681
|
+
type: 'ssr-wasm';
|
|
3682
|
+
/** Output directory. @default 'dist/ssr-wasm' */
|
|
3683
|
+
dir?: string;
|
|
3684
|
+
empty?: boolean;
|
|
3685
|
+
minify?: boolean;
|
|
3686
|
+
}
|
|
3396
3687
|
interface OutputTargetCustom extends OutputTargetBase {
|
|
3397
3688
|
type: 'custom';
|
|
3398
3689
|
name: string;
|
|
@@ -3450,6 +3741,22 @@ interface OutputTargetDocsReadme extends OutputTargetBase {
|
|
|
3450
3741
|
overwriteExisting?: boolean | 'if-missing';
|
|
3451
3742
|
footer?: string;
|
|
3452
3743
|
strict?: boolean;
|
|
3744
|
+
/**
|
|
3745
|
+
* Add extra columns to the generated Properties/Events tables, e.g. to
|
|
3746
|
+
* surface custom JSDoc tags as a column of their own.
|
|
3747
|
+
*/
|
|
3748
|
+
customColumns?: {
|
|
3749
|
+
props?: DocsReadmeCustomColumn<JsonDocsProp>[];
|
|
3750
|
+
events?: DocsReadmeCustomColumn<JsonDocsEvent>[];
|
|
3751
|
+
};
|
|
3752
|
+
}
|
|
3753
|
+
/**
|
|
3754
|
+
* A custom column to render in a `docs-readme` Properties/Events table.
|
|
3755
|
+
* `content` is invoked once per row.
|
|
3756
|
+
*/
|
|
3757
|
+
interface DocsReadmeCustomColumn<T> {
|
|
3758
|
+
header: string;
|
|
3759
|
+
content: (member: T, cmp: JsonDocsComponent) => string;
|
|
3453
3760
|
}
|
|
3454
3761
|
interface OutputTargetDocsJson extends OutputTargetBase {
|
|
3455
3762
|
type: 'docs-json';
|
|
@@ -3490,18 +3797,46 @@ interface OutputTargetDocsCustom extends OutputTargetBase {
|
|
|
3490
3797
|
generator: (docs: JsonDocs, config: Config) => void | Promise<void>;
|
|
3491
3798
|
strict?: boolean;
|
|
3492
3799
|
}
|
|
3800
|
+
/**
|
|
3801
|
+
* Output target for generating an [Agent Skill](https://agentskills.io)
|
|
3802
|
+
* (`SKILL.md` + per-component reference files) describing a component
|
|
3803
|
+
* library, so AI coding agents can consume its API and usage examples
|
|
3804
|
+
* directly.
|
|
3805
|
+
*/
|
|
3806
|
+
interface OutputTargetDocsAgentSkill extends OutputTargetBase {
|
|
3807
|
+
type: 'docs-agent-skill';
|
|
3808
|
+
/**
|
|
3809
|
+
* The root directory where the skill (`SKILL.md` + `components/*.md`) is written.
|
|
3810
|
+
*
|
|
3811
|
+
* defaults to `dist/skill`
|
|
3812
|
+
*/
|
|
3813
|
+
dir?: string;
|
|
3814
|
+
/**
|
|
3815
|
+
* The skill's name, used in the `SKILL.md` frontmatter.
|
|
3816
|
+
*
|
|
3817
|
+
* Defaults to a kebab-cased form of {@link Config.namespace}.
|
|
3818
|
+
*/
|
|
3819
|
+
name?: string;
|
|
3820
|
+
/**
|
|
3821
|
+
* The skill's description, used in the `SKILL.md` frontmatter - this is the
|
|
3822
|
+
* text agents use to decide when to load the skill.
|
|
3823
|
+
*
|
|
3824
|
+
* Defaults to an auto-generated sentence built from the project's
|
|
3825
|
+
* {@link JsonDocs.usage} (if present) or its component tags.
|
|
3826
|
+
*/
|
|
3827
|
+
description?: string;
|
|
3828
|
+
}
|
|
3493
3829
|
interface OutputTargetStats extends OutputTargetBase {
|
|
3494
3830
|
type: 'stats';
|
|
3495
3831
|
file?: string;
|
|
3496
3832
|
}
|
|
3497
|
-
interface OutputTargetBaseNext {
|
|
3498
|
-
type: string;
|
|
3833
|
+
interface OutputTargetBaseNext extends OutputTargetBase {
|
|
3499
3834
|
dir?: string;
|
|
3500
3835
|
}
|
|
3501
3836
|
/**
|
|
3502
3837
|
* The collection of valid export behaviors.
|
|
3503
3838
|
* Used to generate a type for typed configs as well as output target validation
|
|
3504
|
-
* for the `
|
|
3839
|
+
* for the `standalone` output target.
|
|
3505
3840
|
*
|
|
3506
3841
|
* Adding a value to this const array will automatically add it as a valid option on the
|
|
3507
3842
|
* output target configuration for `customElementsExportBehavior`.
|
|
@@ -3510,8 +3845,7 @@ interface OutputTargetBaseNext {
|
|
|
3510
3845
|
* - `auto-define-custom-elements`: Enables the auto-definition of a component and its children (recursively) in the custom elements registry. This
|
|
3511
3846
|
* functionality allows consumers to bypass the explicit call to define a component, its children, its children's
|
|
3512
3847
|
* children, etc. Users of this flag should be aware that enabling this functionality may increase bundle size.
|
|
3513
|
-
* - `bundle`: A `defineCustomElements` function will be exported from the distribution directory.
|
|
3514
|
-
* from `dist-custom-elements-bundle` to `dist-custom-elements`.
|
|
3848
|
+
* - `bundle`: A `defineCustomElements` function will be exported from the distribution directory.
|
|
3515
3849
|
* - `single-export-module`: All components will be re-exported from the specified directory's root `index.js` file.
|
|
3516
3850
|
*/
|
|
3517
3851
|
declare const CustomElementsExportBehaviorOptions: readonly ["default", "auto-define-custom-elements", "bundle", "single-export-module"];
|
|
@@ -3520,23 +3854,40 @@ declare const CustomElementsExportBehaviorOptions: readonly ["default", "auto-de
|
|
|
3520
3854
|
* This is used on the output target config for intellisense in typed configs.
|
|
3521
3855
|
*/
|
|
3522
3856
|
type CustomElementsExportBehavior = (typeof CustomElementsExportBehaviorOptions)[number];
|
|
3523
|
-
|
|
3524
|
-
|
|
3857
|
+
/**
|
|
3858
|
+
* Output target for generating standalone component modules.
|
|
3859
|
+
* Each component is output as an individual ES module that can be directly imported.
|
|
3860
|
+
*
|
|
3861
|
+
* This output target is ideal for npm consumption and tree-shaking, as consumers
|
|
3862
|
+
* can import only the components they need.
|
|
3863
|
+
*
|
|
3864
|
+
* Formerly known as 'dist-custom-elements' in v4.
|
|
3865
|
+
*
|
|
3866
|
+
* @example
|
|
3867
|
+
* ```typescript
|
|
3868
|
+
* {
|
|
3869
|
+
* type: 'standalone',
|
|
3870
|
+
* dir: 'dist/standalone',
|
|
3871
|
+
* externalRuntime: true,
|
|
3872
|
+
* autoLoader: true
|
|
3873
|
+
* }
|
|
3874
|
+
* ```
|
|
3875
|
+
*/
|
|
3876
|
+
interface OutputTargetStandalone extends OutputTargetBaseNext {
|
|
3877
|
+
type: 'standalone';
|
|
3525
3878
|
empty?: boolean;
|
|
3526
3879
|
/**
|
|
3527
3880
|
* Triggers the following behaviors when enabled:
|
|
3528
3881
|
* 1. All `@stencil/core/*` module references are treated as external during bundling.
|
|
3529
3882
|
* 2. File names are not hashed.
|
|
3530
3883
|
* 3. File minification will follow the behavior defined at the root of the Stencil config.
|
|
3884
|
+
*
|
|
3885
|
+
* @default false
|
|
3531
3886
|
*/
|
|
3532
3887
|
externalRuntime?: boolean;
|
|
3533
3888
|
copy?: CopyTask[];
|
|
3534
3889
|
includeGlobalScripts?: boolean;
|
|
3535
3890
|
minify?: boolean;
|
|
3536
|
-
/**
|
|
3537
|
-
* Enables the generation of type definition files for the output target.
|
|
3538
|
-
*/
|
|
3539
|
-
generateTypeDeclarations?: boolean;
|
|
3540
3891
|
/**
|
|
3541
3892
|
* Define the export/definition behavior for the output target's generated output.
|
|
3542
3893
|
* This controls if/how custom elements will be defined or where components will be exported from.
|
|
@@ -3547,6 +3898,8 @@ interface OutputTargetDistCustomElements extends OutputTargetValidationConfig {
|
|
|
3547
3898
|
* Generate an auto-loader script that uses MutationObserver to lazily load
|
|
3548
3899
|
* and define custom elements as they appear in the DOM.
|
|
3549
3900
|
*
|
|
3901
|
+
* @default true
|
|
3902
|
+
*
|
|
3550
3903
|
* When set to `true`, generates a `loader.js` file that auto-starts on import.
|
|
3551
3904
|
* Can also be configured with an object for more control:
|
|
3552
3905
|
* - `fileName`: Custom filename for the loader (default: 'loader.js')
|
|
@@ -3586,27 +3939,45 @@ interface OutputTargetBase {
|
|
|
3586
3939
|
* A unique string to differentiate one output target from another
|
|
3587
3940
|
*/
|
|
3588
3941
|
type: string;
|
|
3942
|
+
/**
|
|
3943
|
+
* When `true`, this output target will be skipped during development builds (`--dev`).
|
|
3944
|
+
* This improves dev build times by not generating production-only artifacts.
|
|
3945
|
+
*
|
|
3946
|
+
* Defaults vary by output target type:
|
|
3947
|
+
* - `loader-bundle`: `false` (always builds)
|
|
3948
|
+
* - `standalone`: `true` (skips in dev)
|
|
3949
|
+
* - `ssr`: `true` (skips in dev, unless `devServer.ssr` is enabled)
|
|
3950
|
+
* - `docs-*`: `true` (skips in dev)
|
|
3951
|
+
* - `custom`: `true` (skips in dev)
|
|
3952
|
+
* - `www`, `copy`, `stats`: `false` (always runs)
|
|
3953
|
+
*/
|
|
3954
|
+
skipInDev?: boolean;
|
|
3589
3955
|
}
|
|
3590
|
-
|
|
3591
|
-
* Output targets that can have validation for common `package.json` field values
|
|
3592
|
-
* (module, types, etc.). This allows them to be marked for validation in a project's Stencil config.
|
|
3593
|
-
*/
|
|
3594
|
-
interface OutputTargetValidationConfig extends OutputTargetBaseNext {
|
|
3595
|
-
isPrimaryPackageOutputTarget?: boolean;
|
|
3596
|
-
}
|
|
3597
|
-
type EligiblePrimaryPackageOutputTarget = OutputTargetDist | OutputTargetDistCustomElements | OutputTargetDistCollection | OutputTargetDistTypes;
|
|
3598
|
-
type OutputTargetBuild = OutputTargetDistCollection | OutputTargetDistLazy;
|
|
3956
|
+
type OutputTargetBuild = OutputTargetCollection | OutputTargetDistLazy;
|
|
3599
3957
|
interface OutputTargetCopy extends OutputTargetBase {
|
|
3600
3958
|
type: 'copy';
|
|
3601
3959
|
dir: string;
|
|
3602
3960
|
copy?: CopyTask[];
|
|
3603
|
-
copyAssets?: 'collection' | 'dist';
|
|
3604
3961
|
}
|
|
3605
3962
|
interface OutputTargetWww extends OutputTargetBase {
|
|
3606
3963
|
/**
|
|
3607
3964
|
* Webapp output target.
|
|
3608
3965
|
*/
|
|
3609
3966
|
type: 'www';
|
|
3967
|
+
/**
|
|
3968
|
+
* Choose how components are bundled for the www output.
|
|
3969
|
+
*
|
|
3970
|
+
* - `'loader'` (default): Uses the loader-bundle architecture with chunk
|
|
3971
|
+
* splitting and a loader infrastructure. Best for production apps with many
|
|
3972
|
+
* components where you want optimal loading performance.
|
|
3973
|
+
*
|
|
3974
|
+
* - `'standalone'`: Uses standalone component modules with an auto-loader that
|
|
3975
|
+
* uses MutationObserver to dynamically import components as they appear in
|
|
3976
|
+
* the DOM. Simpler architecture, easier debugging, one module per component.
|
|
3977
|
+
*
|
|
3978
|
+
* Default: `'loader'`
|
|
3979
|
+
*/
|
|
3980
|
+
bundleMode?: 'loader' | 'standalone';
|
|
3610
3981
|
/**
|
|
3611
3982
|
* The directory to write the app's JavaScript and CSS build
|
|
3612
3983
|
* files to. The default is to place this directory as a child
|
|
@@ -3653,7 +4024,7 @@ interface OutputTargetWww extends OutputTargetBase {
|
|
|
3653
4024
|
* Path to an external node module which has exports of the prerender config object.
|
|
3654
4025
|
* ```
|
|
3655
4026
|
* module.exports = {
|
|
3656
|
-
*
|
|
4027
|
+
* afterSsr(document, url) {
|
|
3657
4028
|
* document.title = `URL: ${url.href}`;
|
|
3658
4029
|
* }
|
|
3659
4030
|
* }
|
|
@@ -3661,15 +4032,35 @@ interface OutputTargetWww extends OutputTargetBase {
|
|
|
3661
4032
|
*/
|
|
3662
4033
|
prerenderConfig?: string;
|
|
3663
4034
|
/**
|
|
3664
|
-
* Service worker config for production builds.
|
|
3665
|
-
*
|
|
3666
|
-
*
|
|
3667
|
-
*
|
|
4035
|
+
* Service worker config for production builds. In development mode, a script
|
|
4036
|
+
* to deregister existing service workers is always injected. Defaults to
|
|
4037
|
+
* `null` (disabled). Set to `true` to enable with default settings, or provide
|
|
4038
|
+
* a config object for custom settings.
|
|
3668
4039
|
*/
|
|
3669
|
-
serviceWorker?: ServiceWorkerConfig |
|
|
4040
|
+
serviceWorker?: ServiceWorkerConfig | true | null;
|
|
3670
4041
|
appDir?: string;
|
|
4042
|
+
/**
|
|
4043
|
+
* Hash the filenames of generated chunks based on their content.
|
|
4044
|
+
* Enables forever-caching of CDN-served bundles.
|
|
4045
|
+
*
|
|
4046
|
+
* @default true in production, false in dev mode
|
|
4047
|
+
*/
|
|
4048
|
+
hashFileNames?: boolean;
|
|
4049
|
+
/**
|
|
4050
|
+
* Number of characters to use for the content hash in filenames.
|
|
4051
|
+
*
|
|
4052
|
+
* @default 8
|
|
4053
|
+
*/
|
|
4054
|
+
hashedFileNameLength?: number;
|
|
3671
4055
|
}
|
|
3672
|
-
type OutputTarget = OutputTargetCopy | OutputTargetCustom |
|
|
4056
|
+
type OutputTarget = OutputTargetCopy | OutputTargetCustom | OutputTargetLoaderBundle | OutputTargetStandalone | OutputTargetSsr | OutputTargetSsrWasm | OutputTargetCollection | OutputTargetTypes | OutputTargetGlobalStyle | OutputTargetAssets | OutputTargetDistLazy | OutputTargetDocsJson | OutputTargetDocsCustom | OutputTargetDocsReadme | OutputTargetDocsVscode | OutputTargetDocsCustomElementsManifest | OutputTargetDocsAgentSkill | OutputTargetWww | OutputTargetStats;
|
|
4057
|
+
/**
|
|
4058
|
+
* A post-validation form of {@link OutputTargetWww} where `serviceWorker`
|
|
4059
|
+
* has been normalized - `true` is resolved to a {@link ServiceWorkerConfig}.
|
|
4060
|
+
*/
|
|
4061
|
+
type ValidatedOutputTargetWww = Omit<OutputTargetWww, 'serviceWorker'> & {
|
|
4062
|
+
serviceWorker?: ServiceWorkerConfig | null;
|
|
4063
|
+
};
|
|
3673
4064
|
/**
|
|
3674
4065
|
* Our custom configuration interface for generated caching Service Workers
|
|
3675
4066
|
* using the Workbox library (see https://developer.chrome.com/docs/workbox/).
|
|
@@ -3717,12 +4108,6 @@ interface LoadConfigInit {
|
|
|
3717
4108
|
configPath?: string;
|
|
3718
4109
|
logger?: Logger;
|
|
3719
4110
|
sys?: CompilerSystem;
|
|
3720
|
-
/**
|
|
3721
|
-
* When set to true, if the "tsconfig.json" file is not found
|
|
3722
|
-
* it'll automatically generate and save a default tsconfig
|
|
3723
|
-
* within the root directory.
|
|
3724
|
-
*/
|
|
3725
|
-
initTsConfig?: boolean;
|
|
3726
4111
|
}
|
|
3727
4112
|
/**
|
|
3728
4113
|
* Results from an attempt to load a config. The values on this interface
|
|
@@ -3764,24 +4149,13 @@ interface WorkerOptions {
|
|
|
3764
4149
|
maxConcurrentTasksPerWorker?: number;
|
|
3765
4150
|
logger?: Logger;
|
|
3766
4151
|
}
|
|
3767
|
-
interface RolldownInterface {
|
|
3768
|
-
rolldown: {
|
|
3769
|
-
(config: any): Promise<any>;
|
|
3770
|
-
};
|
|
3771
|
-
plugins: {
|
|
3772
|
-
nodeResolve(opts: any): any;
|
|
3773
|
-
replace(opts: any): any;
|
|
3774
|
-
commonjs(opts: any): any;
|
|
3775
|
-
json(): any;
|
|
3776
|
-
};
|
|
3777
|
-
}
|
|
3778
4152
|
interface ResolveModuleOptions {
|
|
3779
4153
|
manuallyResolve?: boolean;
|
|
3780
4154
|
packageJson?: boolean;
|
|
3781
4155
|
}
|
|
3782
4156
|
interface PrerenderStartOptions {
|
|
3783
4157
|
buildId?: string;
|
|
3784
|
-
|
|
4158
|
+
ssrAppFilePath?: string;
|
|
3785
4159
|
componentGraph?: BuildResultsComponentGraph;
|
|
3786
4160
|
srcIndexHtmlPath?: string;
|
|
3787
4161
|
}
|
|
@@ -3856,6 +4230,18 @@ interface Compiler {
|
|
|
3856
4230
|
createWatcher(): Promise<CompilerWatcher>;
|
|
3857
4231
|
destroy(): Promise<void>;
|
|
3858
4232
|
sys: CompilerSystem;
|
|
4233
|
+
/**
|
|
4234
|
+
* @internal - Testing only. Access to the in-memory filesystem
|
|
4235
|
+
*/
|
|
4236
|
+
fs?: InMemoryFileSystem;
|
|
4237
|
+
/**
|
|
4238
|
+
* @internal - Testing only. Access to the validated configuration
|
|
4239
|
+
*/
|
|
4240
|
+
config?: ValidatedConfig;
|
|
4241
|
+
/**
|
|
4242
|
+
* @internal - Testing only. Access to the compiler context
|
|
4243
|
+
*/
|
|
4244
|
+
compilerCtx?: CompilerCtx;
|
|
3859
4245
|
}
|
|
3860
4246
|
interface CompilerWatcher extends BuildOnEvents {
|
|
3861
4247
|
start: () => Promise<WatcherCloseResults>;
|
|
@@ -3896,7 +4282,7 @@ interface TranspileOptions {
|
|
|
3896
4282
|
componentMetadata?: 'runtimestatic' | 'compilerstatic' | string | undefined;
|
|
3897
4283
|
/**
|
|
3898
4284
|
* The actual internal import path for any `@stencil/core` imports.
|
|
3899
|
-
* Default is `@stencil/core/runtime/client`.
|
|
4285
|
+
* Default is `@stencil/core/runtime/client/standalone`.
|
|
3900
4286
|
*/
|
|
3901
4287
|
coreImportPath?: string;
|
|
3902
4288
|
/**
|
|
@@ -3982,7 +4368,51 @@ interface TranspileOptions {
|
|
|
3982
4368
|
* Adds `transformTag` calls to css strings and querySelector(All) calls
|
|
3983
4369
|
*/
|
|
3984
4370
|
additionalTagTransformers?: boolean;
|
|
4371
|
+
/**
|
|
4372
|
+
* Callback used to resolve parent-class source for inheritance-chain analysis.
|
|
4373
|
+
* Called when a component's `extends` clause references a class from another
|
|
4374
|
+
* module. Return the resolved absolute path and source text of that module,
|
|
4375
|
+
* or `null` to skip inheritance resolution for that specifier.
|
|
4376
|
+
*
|
|
4377
|
+
* @example
|
|
4378
|
+
* ```ts
|
|
4379
|
+
* transpile(myComponentCode, {
|
|
4380
|
+
* resolveImport: (specifier, importer) => {
|
|
4381
|
+
* const resolved = require.resolve(specifier, { paths: [path.dirname(importer)] });
|
|
4382
|
+
* return { code: fs.readFileSync(resolved, 'utf8'), path: resolved };
|
|
4383
|
+
* },
|
|
4384
|
+
* });
|
|
4385
|
+
* ```
|
|
4386
|
+
*/
|
|
4387
|
+
resolveImport?: (specifier: string, importer: string) => {
|
|
4388
|
+
code: string;
|
|
4389
|
+
path: string;
|
|
4390
|
+
} | null;
|
|
4391
|
+
/**
|
|
4392
|
+
* When `true` class declarations at the end of a `@Component` inheritance chain
|
|
4393
|
+
* * that have no `extends` clause * will get `extends HTMLElement` injected, and a minimal
|
|
4394
|
+
* `constructor() { super(); }`. Any stencil static meta-getters are also stripped.
|
|
4395
|
+
*/
|
|
4396
|
+
transformAsBaseClass?: boolean;
|
|
4397
|
+
/**
|
|
4398
|
+
* Overrides for Stencil's BUILD feature flags in the generated output.
|
|
4399
|
+
* When set, a BUILD mutation statement is prepended to the compiled code so
|
|
4400
|
+
* that the specified flags take effect for this component at runtime.
|
|
4401
|
+
*/
|
|
4402
|
+
buildOverrides?: BuildOverrides;
|
|
3985
4403
|
}
|
|
4404
|
+
/**
|
|
4405
|
+
* Keys of {@link BuildConditionals} that can be meaningfully overridden at
|
|
4406
|
+
* transpile time — config-driven flags that are not derived from component
|
|
4407
|
+
* scanning or runtime environment detection.
|
|
4408
|
+
*/
|
|
4409
|
+
type BuildOverrideKeys = 'hotModuleReplacement' | 'signalBacking' | 'vdomSignals' | 'lightDomPatches' | 'slotChildNodes' | 'slotCloneNode' | 'slotDomMutations' | 'slotTextContent' | 'lifecycleDOMEvents' | 'initializeNextTick';
|
|
4410
|
+
/**
|
|
4411
|
+
* Subset of Stencil's BUILD feature flags that can be overridden at transpile
|
|
4412
|
+
* time. Derived from {@link BuildConditionals} via `Pick` so the field list
|
|
4413
|
+
* and types stay in sync with the authoritative definition.
|
|
4414
|
+
*/
|
|
4415
|
+
type BuildOverrides = Pick<BuildConditionals, BuildOverrideKeys>;
|
|
3986
4416
|
type CompileTarget = 'latest' | 'esnext' | 'es2020' | 'es2019' | 'es2018' | 'es2017' | 'es2015' | string | undefined;
|
|
3987
4417
|
interface TranspileResults {
|
|
3988
4418
|
code: string;
|
|
@@ -4008,6 +4438,17 @@ interface TransformOptions {
|
|
|
4008
4438
|
style: 'static' | null;
|
|
4009
4439
|
styleImportData: 'queryparams' | null;
|
|
4010
4440
|
target?: string;
|
|
4441
|
+
/**
|
|
4442
|
+
* @see {@link TranspileOptions.resolveImport}
|
|
4443
|
+
*/
|
|
4444
|
+
resolveImport?: (specifier: string, importer: string) => {
|
|
4445
|
+
code: string;
|
|
4446
|
+
path: string;
|
|
4447
|
+
} | null;
|
|
4448
|
+
/** @see {@link TranspileOptions.transformAsBaseClass} */
|
|
4449
|
+
transformAsBaseClass?: boolean;
|
|
4450
|
+
/** @see {@link TranspileOptions.buildOverrides} */
|
|
4451
|
+
buildOverrides?: BuildOverrides;
|
|
4011
4452
|
}
|
|
4012
4453
|
interface CompileScriptMinifyOptions {
|
|
4013
4454
|
target?: CompileTarget;
|
|
@@ -4028,4 +4469,4 @@ interface CliInitOptions {
|
|
|
4028
4469
|
sys: CompilerSystem;
|
|
4029
4470
|
}
|
|
4030
4471
|
//#endregion
|
|
4031
|
-
export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildResultsComponentGraph, CacheStorage, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, Config, ConfigBundle,
|
|
4472
|
+
export { AutoprefixerOptions, BuildEmitEvents, BuildEvents, BuildLog, BuildNoChangeResults, BuildOnEventRemove, BuildOnEvents, BuildOutput, BuildOverrides, BuildResultsComponentGraph, CacheStorage, CliInitOptions, CompileScriptMinifyOptions, CompileTarget, Compiler, CompilerBuildResults, CompilerBuildStart, CompilerDependency, CompilerEventBuildFinish, CompilerEventBuildLog, CompilerEventBuildNoChange, CompilerEventBuildStart, CompilerEventDirAdd, CompilerEventDirDelete, CompilerEventFileAdd, CompilerEventFileDelete, CompilerEventFileUpdate, CompilerEventFsChange, CompilerEventName, CompilerFileWatcher, CompilerFileWatcherCallback, CompilerFileWatcherEvent, CompilerFsStats, CompilerRequest, CompilerRequestResponse, CompilerSystem, CompilerSystemCreateDirectoryOptions, CompilerSystemCreateDirectoryResults, CompilerSystemRealpathResults, CompilerSystemRemoveDirectoryOptions, CompilerSystemRemoveDirectoryResults, CompilerSystemRemoveFileResults, CompilerSystemRenameResults, CompilerSystemRenamedPath, CompilerSystemWriteFileResults, CompilerWatcher, Config, ConfigBundle, ConfigCompat, CopyResults, CopyTask, Credentials, CustomElementsExportBehavior, CustomElementsExportBehaviorOptions, DevServer, DevServerConfig, DevServerEditor, Diagnostic, DocsReadmeCustomColumn, FsWatchResults, HistoryApiFallback, HmrStyleUpdate, HotModuleReplacement, HydrateDocumentOptions, HydrateFactoryOptions, HydratedFlag, JsonDocMethodParameter, JsonDocs, JsonDocsComponent, JsonDocsCustomState, JsonDocsDependencyGraph, JsonDocsEvent, JsonDocsListener, JsonDocsMethod, JsonDocsMethodReturn, JsonDocsPart, JsonDocsProp, JsonDocsSlot, JsonDocsStyle, JsonDocsTag, JsonDocsTypeLibrary, JsonDocsUsage, JsonDocsValue, LOG_LEVELS, LazyRequire, LightDomPatches, LoadConfigInit, LoadConfigResults, LogLevel, Logger, LoggerLineUpdater, LoggerTimeSpan, ModeConfig, NodeResolveConfig, OptimizeCssInput, OptimizeCssOutput, OptimizeJsInput, OptimizeJsOutput, OutputTarget, OutputTargetAssets, OutputTargetBase, OutputTargetBaseNext, OutputTargetBuild, OutputTargetCollection, OutputTargetCopy, OutputTargetCustom, OutputTargetDistLazy, OutputTargetDocsAgentSkill, OutputTargetDocsCustom, OutputTargetDocsCustomElementsManifest, OutputTargetDocsJson, OutputTargetDocsReadme, OutputTargetDocsVscode, OutputTargetGlobalStyle, OutputTargetLoaderBundle, OutputTargetSsr, OutputTargetSsrWasm, OutputTargetStandalone, OutputTargetStats, OutputTargetTypes, OutputTargetWww, PageReloadStrategy, ParsedPath, PlatformPath, PrerenderConfig, PrerenderHydrateOptions, PrerenderOptions, PrerenderResults, PrerenderStartOptions, ResolveModuleIdOptions, ResolveModuleIdResults, ResolveModuleOptions, RobotsTxtOpts, RobotsTxtResults, RolldownConfig, SerializeDocumentOptions, ServiceWorkerConfig, SitemapXmpOpts, SitemapXmpResults, SsrDocumentOptions, SsrFactoryOptions, StencilConfig, StencilDevServerConfig, StencilDocsConfig, StyleDoc, SystemDetails, TransformOptions, TranspileOnlyResults, TranspileOptions, TranspileResults, UnvalidatedConfig, ValidatedConfig, ValidatedOutputTargetWww, WatcherCloseResults, WorkerMainController, WorkerOptions };
|